From patchwork Mon Jan 11 18:00:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Kaneko X-Patchwork-Id: 8007741 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EC5489F88A for ; Mon, 11 Jan 2016 18:00:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 160532028D for ; Mon, 11 Jan 2016 18:00:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3071420328 for ; Mon, 11 Jan 2016 18:00:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759567AbcAKSAo (ORCPT ); Mon, 11 Jan 2016 13:00:44 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:35558 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757307AbcAKSAn (ORCPT ); Mon, 11 Jan 2016 13:00:43 -0500 Received: by mail-pf0-f196.google.com with SMTP id 65so3855129pff.2; Mon, 11 Jan 2016 10:00:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=rWBN/cxBjhW17ttx/xDwZ1iN9P/xqESkfhJnoRPgh2M=; b=VDtKmMtLjOJYga5FoEqzDsJYaN8x1qDh2jQ4P+1EVgMH2XpvlDrP/zsmUe7+tf80ky hLynzT0PY2A2d/+/ncFOB2Mh45a4BAqZkpBIeDntfVnH8UVmvCi2BtGajolX5F97yDV5 SEgP1qVrXQlNYvho/NV3n1rWXL6PQO+MBL8SCCrdlLG++064TLEn3tT+YvJXTs8yiaiw gsHCz3W4ngiRD//y8JTHU44Flh4dC9NDFL9Q6mNWuyBl5c1JJFNeuoQc1tu1SDKqkMLi u7TlUcxxkHQJVxMV4s5dfxPJfLKnqutUKSmycj8dSpkxiZmmnJXQ5Sm40zbOCZ8/LhdJ M2UA== X-Received: by 10.98.18.76 with SMTP id a73mr27720868pfj.65.1452535242705; Mon, 11 Jan 2016 10:00:42 -0800 (PST) Received: from localhost.localdomain (KD118152108246.ppp-bb.dion.ne.jp. [118.152.108.246]) by smtp.gmail.com with ESMTPSA id f12sm120336270pat.20.2016.01.11.10.00.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 11 Jan 2016 10:00:41 -0800 (PST) From: Yoshihiro Kaneko To: linux-media@vger.kernel.org Cc: Guennadi Liakhovetski , Simon Horman , Magnus Damm , linux-sh@vger.kernel.org Subject: [PATCH 1/3] media: soc_camera: rcar_vin: Add rcar fallback compatibility string Date: Tue, 12 Jan 2016 03:00:09 +0900 Message-Id: <1452535211-4869-2-git-send-email-ykaneko0929@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1452535211-4869-1-git-send-email-ykaneko0929@gmail.com> References: <1452535211-4869-1-git-send-email-ykaneko0929@gmail.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add fallback compatibility string for R-Car Gen2 and Gen3, This is in keeping with the fallback scheme being adopted wherever appropriate for drivers for Renesas SoCs. Signed-off-by: Yoshihiro Kaneko --- Documentation/devicetree/bindings/media/rcar_vin.txt | 8 +++++++- drivers/media/platform/soc_camera/rcar_vin.c | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/media/rcar_vin.txt b/Documentation/devicetree/bindings/media/rcar_vin.txt index 9dafe6b..c13ec5a 100644 --- a/Documentation/devicetree/bindings/media/rcar_vin.txt +++ b/Documentation/devicetree/bindings/media/rcar_vin.txt @@ -6,12 +6,18 @@ family of devices. The current blocks are always slaves and suppot one input channel which can be either RGB, YUYV or BT656. - compatible: Must be one of the following + - "renesas,rcar-gen2-vin" for R-Car Gen2 Series + - "renesas,rcar-gen3-vin" for R-Car Gen3 Series - "renesas,vin-r8a7794" for the R8A7794 device - "renesas,vin-r8a7793" for the R8A7793 device - "renesas,vin-r8a7791" for the R8A7791 device - "renesas,vin-r8a7790" for the R8A7790 device - "renesas,vin-r8a7779" for the R8A7779 device - "renesas,vin-r8a7778" for the R8A7778 device + + When compatible with the generic version, nodes must list the SoC-specific + version corresponding to the platform first followed by the generic version. + - reg: the register base and size for the device registers - interrupts: the interrupt for the device - clocks: Reference to the parent clock @@ -36,7 +42,7 @@ Device node example }; vin0: vin@0xe6ef0000 { - compatible = "renesas,vin-r8a7790"; + compatible = "renesas,vin-r8a7790","renesas,rcar-gen2-vin"; clocks = <&mstp8_clks R8A7790_CLK_VIN0>; reg = <0 0xe6ef0000 0 0x1000>; interrupts = <0 188 IRQ_TYPE_LEVEL_HIGH>; diff --git a/drivers/media/platform/soc_camera/rcar_vin.c b/drivers/media/platform/soc_camera/rcar_vin.c index b7fd695..cccd859 100644 --- a/drivers/media/platform/soc_camera/rcar_vin.c +++ b/drivers/media/platform/soc_camera/rcar_vin.c @@ -143,6 +143,7 @@ #define RCAR_VIN_BT656 (1 << 3) enum chip_id { + RCAR_GEN3, RCAR_GEN2, RCAR_H1, RCAR_M1, @@ -1818,6 +1819,8 @@ static struct soc_camera_host_ops rcar_vin_host_ops = { #ifdef CONFIG_OF static const struct of_device_id rcar_vin_of_table[] = { + { .compatible = "renesas,rcar-gen2-vin", .data = (void *)RCAR_GEN2 }, + { .compatible = "renesas,rcar-gen3-vin", .data = (void *)RCAR_GEN3 }, { .compatible = "renesas,vin-r8a7794", .data = (void *)RCAR_GEN2 }, { .compatible = "renesas,vin-r8a7793", .data = (void *)RCAR_GEN2 }, { .compatible = "renesas,vin-r8a7791", .data = (void *)RCAR_GEN2 },