From patchwork Mon Jan 11 19:10:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Kaneko X-Patchwork-Id: 8008421 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C71AEBEEE5 for ; Mon, 11 Jan 2016 19:10:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E83AD2024C for ; Mon, 11 Jan 2016 19:10:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 05EFA20256 for ; Mon, 11 Jan 2016 19:10:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934339AbcAKTKa (ORCPT ); Mon, 11 Jan 2016 14:10:30 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:33286 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934275AbcAKTK3 (ORCPT ); Mon, 11 Jan 2016 14:10:29 -0500 Received: by mail-pf0-f193.google.com with SMTP id e65so3933035pfe.0; Mon, 11 Jan 2016 11:10:29 -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=7lf4uesXube/cq1uqi2/VREHIhxr0VB/kXQUPjUuCd4=; b=oF+BdmORxBB4Vfz7H6aT+hH5rLKOlt7EcIibcH/YUTZXqJpW1gk6tM1sy39aQCZg6S +C9YsKw7hWjT1EcCnApImwZRM6auT3F8+dDv83WOXyYp0j1ZeM6XEYONly7RdaXMQKnV 2Y2xogp3AK1gO6DcpkwZ5Bz1scV3FnhmMYA8oh9aqXdYUkHQCdn/zqGB/0ZghYdm96aA VBT++yY+HcuJbsi31yovDZPdEUPJVayzqD4SaIWTF2xw3mssvMoQAt4nWZFJZfxF3C75 YvnJ69eRbsHKuY1H4V0WiKszRO7ZYyiP7ShBiScqC0gfcA1OcDsWOkNlwYSdI09yimNa T19Q== X-Received: by 10.98.19.148 with SMTP id 20mr12197409pft.22.1452539429068; Mon, 11 Jan 2016 11:10:29 -0800 (PST) Received: from localhost.localdomain (KD118152108246.ppp-bb.dion.ne.jp. [118.152.108.246]) by smtp.gmail.com with ESMTPSA id i76sm24986475pfj.68.2016.01.11.11.10.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 11 Jan 2016 11:10:28 -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 v2] media: soc_camera: rcar_vin: Add rcar fallback compatibility string Date: Tue, 12 Jan 2016 04:10:16 +0900 Message-Id: <1452539418-28480-2-git-send-email-ykaneko0929@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1452539418-28480-1-git-send-email-ykaneko0929@gmail.com> References: <1452539418-28480-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=ham 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 --- v2 [Yoshihiro Kaneko] * As suggested by Geert Uytterhoeven drivers/media/platform/soc_camera/rcar_vin.c: - The generic compatibility values are listed at the end of the rcar_vin_of_table[]. 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..f72de0b 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, @@ -1824,6 +1825,8 @@ static const struct of_device_id rcar_vin_of_table[] = { { .compatible = "renesas,vin-r8a7790", .data = (void *)RCAR_GEN2 }, { .compatible = "renesas,vin-r8a7779", .data = (void *)RCAR_H1 }, { .compatible = "renesas,vin-r8a7778", .data = (void *)RCAR_M1 }, + { .compatible = "renesas,rcar-gen2-vin", .data = (void *)RCAR_GEN2 }, + { .compatible = "renesas,rcar-gen3-vin", .data = (void *)RCAR_GEN3 }, { }, }; MODULE_DEVICE_TABLE(of, rcar_vin_of_table);