From patchwork Tue Jan 29 15:46:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Fuzzey X-Patchwork-Id: 2062541 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 6C360DF23E for ; Tue, 29 Jan 2013 15:49:11 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U0DOg-0000qo-Nf; Tue, 29 Jan 2013 15:46:54 +0000 Received: from mta1.parkeon.com ([91.121.43.66]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1U0DOA-0000fP-B1 for linux-arm-kernel@lists.infradead.org; Tue, 29 Jan 2013 15:46:24 +0000 Received: from mta2.parkeon.com ([81.80.172.220]) by mta1.parkeon.com with esmtp (Exim 4.76) (envelope-from ) id 1U0DNz-0000kn-0d; Tue, 29 Jan 2013 16:46:11 +0100 Received: from [10.32.16.23] (helo=mail.besancon.parkeon.com) by mta2.parkeon.com with esmtp (Exim 4.77) (envelope-from ) id 1U0DNv-0008Rn-VW; Tue, 29 Jan 2013 16:46:07 +0100 Received: from [10.32.51.221] (port=33574 helo=[127.0.0.1]) by mail.besancon.parkeon.com with esmtp (Exim 4.71) (envelope-from ) id 1U0DNy-000062-Sa; Tue, 29 Jan 2013 16:46:10 +0100 Subject: [PATCH V3 1/5] W1: Add device tree support to MXC onewire master. To: Evgeniy Polyakov , Sascha Hauer , Shawn Guao , linux-arm-kernel@lists.infradead.org From: Martin Fuzzey Date: Tue, 29 Jan 2013 16:46:10 +0100 Message-ID: <20130129154610.5184.91342.stgit@localhost> In-Reply-To: <20130129154608.5184.46101.stgit@localhost> References: <20130129154608.5184.46101.stgit@localhost> User-Agent: StGit/0.15 MIME-Version: 1.0 X-Virus-Scanned: by ClamAV at mta2.parkeon.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130129_104622_592652_BD4BB52E X-CRM114-Status: GOOD ( 12.65 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Signed-off-by: Martin Fuzzey Acked-by: Sascha Hauer Acked-by: Evgeniy Polyakov --- .../devicetree/bindings/w1/fsl-imx-owire.txt | 20 ++++++++++++++++++++ drivers/w1/masters/mxc_w1.c | 9 ++++++++- 2 files changed, 28 insertions(+), 1 deletions(-) create mode 100644 Documentation/devicetree/bindings/w1/fsl-imx-owire.txt diff --git a/Documentation/devicetree/bindings/w1/fsl-imx-owire.txt b/Documentation/devicetree/bindings/w1/fsl-imx-owire.txt new file mode 100644 index 0000000..b6d53b0 --- /dev/null +++ b/Documentation/devicetree/bindings/w1/fsl-imx-owire.txt @@ -0,0 +1,20 @@ +* Freescale i.MX One wire bus master controller + +Required properties: +- compatible : should be "fsl,imx21-owire" +- reg : Address and length of the register set for the device + +Optional properties: +- clocks : phandle of clock that supplies the module (required if platform + clock bindings use device tree) + +Example: + +- From imx53.dtsi: +owire: owire@63fa4000 { + compatible = "fsl,imx53-owire", "fsl,imx21-owire"; + reg = <0x63fa4000 0x4000>; + clocks = <&clks 159>; + status = "disabled"; +}; + diff --git a/drivers/w1/masters/mxc_w1.c b/drivers/w1/masters/mxc_w1.c index 708a25f..949e566 100644 --- a/drivers/w1/masters/mxc_w1.c +++ b/drivers/w1/masters/mxc_w1.c @@ -186,9 +186,16 @@ static int mxc_w1_remove(struct platform_device *pdev) return 0; } +static struct of_device_id mxc_w1_dt_ids[] = { + { .compatible = "fsl,imx21-owire" }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, mxc_w1_dt_ids); + static struct platform_driver mxc_w1_driver = { .driver = { - .name = "mxc_w1", + .name = "mxc_w1", + .of_match_table = mxc_w1_dt_ids, }, .probe = mxc_w1_probe, .remove = mxc_w1_remove,