devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Markus Pargmann <mpa-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: zbr-i6C2adt8DTjR7s880joybQ@public.gmane.org,
	grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org
Cc: fabio.estevam-KZfg59tc24xl57MIdRCFDg@public.gmane.org,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
	s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org,
	kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org,
	Markus Pargmann <mpa-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: [PATCH 1/2] Drivers: w1: mxc_w1, Add support for DT
Date: Sat, 23 Feb 2013 18:35:57 +0100	[thread overview]
Message-ID: <1361640958-1876-1-git-send-email-mpa@pengutronix.de> (raw)

Add devicetree support for mxc_w1 driver.

Signed-off-by: Markus Pargmann <mpa-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
---
 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,<chip>-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,
-- 
1.8.1.2

             reply	other threads:[~2013-02-23 17:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-23 17:35 Markus Pargmann [this message]
     [not found] ` <1361640958-1876-1-git-send-email-mpa-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2013-02-23 17:35   ` [PATCH 2/2] Drivers: w1: mxc_w1, Add driver owner Markus Pargmann
2013-02-24 11:37   ` [PATCH 1/2] Drivers: w1: mxc_w1, Add support for DT Martin Fuzzey
     [not found]     ` <CALBypN4+ioS=YDrw7YnvtS1AeS+UH=FidYd2zG1_NsBWDh9bgQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-02-24 12:36       ` Markus Pargmann
2013-02-23 21:18 ` Sergei Shtylyov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1361640958-1876-1-git-send-email-mpa@pengutronix.de \
    --to=mpa-bicnvbalz9megne8c9+irq@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=fabio.estevam-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
    --cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
    --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
    --cc=kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
    --cc=s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    --cc=zbr-i6C2adt8DTjR7s880joybQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).