From patchwork Wed Jul 29 10:19:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Suchanek X-Patchwork-Id: 6893711 Return-Path: X-Original-To: patchwork-linux-arm@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 14E849F380 for ; Wed, 29 Jul 2015 12:06:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4925F20690 for ; Wed, 29 Jul 2015 12:06:22 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 65BF4207A2 for ; Wed, 29 Jul 2015 12:06:21 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZKQ5r-000834-7w; Wed, 29 Jul 2015 12:04:19 +0000 Received: from dec59.ruk.cuni.cz ([2001:718:1e03:4::11]) by bombadil.infradead.org with smtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZKQ5l-0007yE-TK for linux-arm-kernel@lists.infradead.org; Wed, 29 Jul 2015 12:04:14 +0000 Received: (qmail 63126 invoked by uid 2313); 29 Jul 2015 12:03:48 -0000 MBOX-Line: From 557c1962448393b2a8736f26bfa2a3a5ba4aeb7a Mon Sep 17 00:00:00 2001 Message-Id: <557c1962448393b2a8736f26bfa2a3a5ba4aeb7a.1438170519.git.hramrach@gmail.com> In-Reply-To: References: From: Michal Suchanek Date: Wed, 29 Jul 2015 12:19:57 +0200 Subject: [RFC PATCH 2/2] dt: spi: s3c64xx: add compatible to controller-data To: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , David Woodhouse , Brian Norris , Kukjin Kim , Krzysztof Kozlowski , Mark Brown , Michal Suchanek , Padmavathi Venna , Boris BREZILLON , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-spi@vger.kernel.org, X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150729_050414_343777_502573B9 X-CRM114-Status: UNSURE ( 8.94 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.5 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,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 The controller-data subnode has no compatible. This can lead to other drivers getting confused by it. Add a compatible to make devicetreee unambiguous. Signed-off-by: Michal Suchanek --- Documentation/devicetree/bindings/spi/spi-samsung.txt | 3 +++ drivers/spi/spi-s3c64xx.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/Documentation/devicetree/bindings/spi/spi-samsung.txt b/Documentation/devicetree/bindings/spi/spi-samsung.txt index 6dbdeb3..b1e98d1 100644 --- a/Documentation/devicetree/bindings/spi/spi-samsung.txt +++ b/Documentation/devicetree/bindings/spi/spi-samsung.txt @@ -92,16 +92,19 @@ Example: spi-max-frequency = <10000>; controller-data { + compatible = "samsung,s3c-controller-data"; samsung,spi-feedback-delay = <0>; }; partition@0 { + compatible = "linux,ofpart-partition"; label = "U-Boot"; reg = <0x0 0x40000>; read-only; }; partition@40000 { + compatible = "linux,ofpart-partition"; label = "Kernel"; reg = <0x40000 0xc0000>; }; diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 2a8c513..9964db3 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -760,6 +760,10 @@ static struct s3c64xx_spi_csinfo *s3c64xx_get_slave_ctrldata( dev_err(&spi->dev, "child node 'controller-data' not found\n"); return ERR_PTR(-EINVAL); } + if (!of_get_property(data_np, "compatible", NULL) || + strcmp(of_get_property(data_np, "compatible", NULL), + "samsung,s3c-controller-data")) + dev_err(&spi->dev, "child node 'controller-data' does not have correct compatible\n"); cs = kzalloc(sizeof(*cs), GFP_KERNEL); if (!cs) {