From patchwork Sat Feb 23 17:35:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Pargmann X-Patchwork-Id: 2178591 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 E0A57DF25A for ; Sat, 23 Feb 2013 17:39:48 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U9J1g-0003Kl-Qs; Sat, 23 Feb 2013 17:36:44 +0000 Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1U9J1d-0003KA-VZ for linux-arm-kernel@lists.infradead.org; Sat, 23 Feb 2013 17:36:42 +0000 Received: from dude.hi.pengutronix.de ([2001:6f8:1178:2:21e:67ff:fe11:9c5c]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1U9J1M-0004yX-IE; Sat, 23 Feb 2013 18:36:24 +0100 Received: from mpa by dude.hi.pengutronix.de with local (Exim 4.80) (envelope-from ) id 1U9J1J-0000Uv-FS; Sat, 23 Feb 2013 18:36:21 +0100 From: Markus Pargmann To: zbr@ioremap.net, grant.likely@secretlab.ca, rob.herring@calxeda.com Subject: [PATCH 1/2] Drivers: w1: mxc_w1, Add support for DT Date: Sat, 23 Feb 2013 18:35:57 +0100 Message-Id: <1361640958-1876-1-git-send-email-mpa@pengutronix.de> X-Mailer: git-send-email 1.7.10.4 X-SA-Exim-Connect-IP: 2001:6f8:1178:2:21e:67ff:fe11:9c5c X-SA-Exim-Mail-From: mpa@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130223_123642_345574_D92AF222 X-CRM114-Status: GOOD ( 13.14 ) 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.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] Cc: fabio.estevam@freescale.com, gregkh@linuxfoundation.org, s.hauer@pengutronix.de, kernel@pengutronix.de, Markus Pargmann , devicetree-discuss@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org 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: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add devicetree support for mxc_w1 driver. Signed-off-by: Markus Pargmann --- Documentation/devicetree/bindings/w1/fsl,mxc-w1.txt | 13 +++++++++++++ drivers/w1/masters/mxc_w1.c | 7 +++++++ 2 files changed, 20 insertions(+) create mode 100644 Documentation/devicetree/bindings/w1/fsl,mxc-w1.txt diff --git a/Documentation/devicetree/bindings/w1/fsl,mxc-w1.txt b/Documentation/devicetree/bindings/w1/fsl,mxc-w1.txt new file mode 100644 index 0000000..686ced4 --- /dev/null +++ b/Documentation/devicetree/bindings/w1/fsl,mxc-w1.txt @@ -0,0 +1,13 @@ +Freescale driver for Dalla's 1-wire bus master on imx chips + +This driver supports imx21,27,31,35. + +Required properties: +- compatible : "fsl,-w1" +- reg : Should be the memory range. + +Example: + w1: w1@10009000 { + compatible = "fsl,imx27-w1"; + reg = <0x10009000 0x1000>; + }; diff --git a/drivers/w1/masters/mxc_w1.c b/drivers/w1/masters/mxc_w1.c index 708a25f..827ff7f 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; } +struct of_device_id mxc_w1_of_ids[] = { + { .compatible = "fsl,imx21-w1", }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, mxc_w1_of_ids); + static struct platform_driver mxc_w1_driver = { .driver = { .name = "mxc_w1", + .of_match_table = mxc_w1_of_ids, }, .probe = mxc_w1_probe, .remove = mxc_w1_remove,