From: Sourav Poddar <sourav.poddar@ti.com> To: zbr@ioremap.net, tony@atomide.com, michael.opdenacker@free-electrons.com, wsa@the-dreams.de, paul@pwsan.com, bcousson@baylibre.com Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, balbi@ti.com, Sourav Poddar <sourav.poddar@ti.com> Subject: [PATCH 2/5] w1: omap_hdq: Add compatible property for omap hdq driver. Date: Wed, 16 Apr 2014 18:02:09 +0530 [thread overview] Message-ID: <1397651532-31456-3-git-send-email-sourav.poddar@ti.com> (raw) In-Reply-To: <1397651532-31456-1-git-send-email-sourav.poddar@ti.com> Add compatible property for omap hdq driver. Signed-off-by: Sourav Poddar <sourav.poddar@ti.com> --- .../devicetree/bindings/hdq1w/omap_hdq.txt | 20 ++++++++++++++++++++ drivers/w1/masters/omap_hdq.c | 8 ++++++++ 2 files changed, 28 insertions(+) create mode 100644 Documentation/devicetree/bindings/hdq1w/omap_hdq.txt diff --git a/Documentation/devicetree/bindings/hdq1w/omap_hdq.txt b/Documentation/devicetree/bindings/hdq1w/omap_hdq.txt new file mode 100644 index 0000000..a7e011e --- /dev/null +++ b/Documentation/devicetree/bindings/hdq1w/omap_hdq.txt @@ -0,0 +1,20 @@ +HDQ/1w for OMAP platforms + +Required properties : +- compatible : Must be "ti,am43xx-hdq". +- ti,hwmods : Must be "hdq1w". +- reg: Should contain register location and length. +- interrupts: Should contain interrupt. +- clock: Clock input to HDQ1w controller. + +Example: + + hdq: hdq@48347000 { + compatible = "ti,am43xx-hdq"; + reg = <0x48347000 0x1000>; + interrupts = <GIC_SPI 139 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&func_12m_clk>; + clock-names = "fck"; + ti,hwmods = "hdq1w"; + status = "disabled"; + }; diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c index 0a7bf7f..ec36bee 100644 --- a/drivers/w1/masters/omap_hdq.c +++ b/drivers/w1/masters/omap_hdq.c @@ -17,6 +17,7 @@ #include <linux/io.h> #include <linux/sched.h> #include <linux/pm_runtime.h> +#include <linux/of.h> #include "../w1.h" #include "../w1_int.h" @@ -73,11 +74,18 @@ struct hdq_data { static int omap_hdq_probe(struct platform_device *pdev); static int omap_hdq_remove(struct platform_device *pdev); +static const struct of_device_id omap_hdq_dt_match[] = { + { .compatible = "ti,am43xx-hdq"}, + {}, +}; +MODULE_DEVICE_TABLE(of, omap_hdq_dt_match); + static struct platform_driver omap_hdq_driver = { .probe = omap_hdq_probe, .remove = omap_hdq_remove, .driver = { .name = "omap_hdq", + .of_match_table = of_match_ptr(omap_hdq_dt_match), }, }; -- 1.7.9.5
WARNING: multiple messages have this Message-ID (diff)
From: sourav.poddar@ti.com (Sourav Poddar) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/5] w1: omap_hdq: Add compatible property for omap hdq driver. Date: Wed, 16 Apr 2014 18:02:09 +0530 [thread overview] Message-ID: <1397651532-31456-3-git-send-email-sourav.poddar@ti.com> (raw) In-Reply-To: <1397651532-31456-1-git-send-email-sourav.poddar@ti.com> Add compatible property for omap hdq driver. Signed-off-by: Sourav Poddar <sourav.poddar@ti.com> --- .../devicetree/bindings/hdq1w/omap_hdq.txt | 20 ++++++++++++++++++++ drivers/w1/masters/omap_hdq.c | 8 ++++++++ 2 files changed, 28 insertions(+) create mode 100644 Documentation/devicetree/bindings/hdq1w/omap_hdq.txt diff --git a/Documentation/devicetree/bindings/hdq1w/omap_hdq.txt b/Documentation/devicetree/bindings/hdq1w/omap_hdq.txt new file mode 100644 index 0000000..a7e011e --- /dev/null +++ b/Documentation/devicetree/bindings/hdq1w/omap_hdq.txt @@ -0,0 +1,20 @@ +HDQ/1w for OMAP platforms + +Required properties : +- compatible : Must be "ti,am43xx-hdq". +- ti,hwmods : Must be "hdq1w". +- reg: Should contain register location and length. +- interrupts: Should contain interrupt. +- clock: Clock input to HDQ1w controller. + +Example: + + hdq: hdq at 48347000 { + compatible = "ti,am43xx-hdq"; + reg = <0x48347000 0x1000>; + interrupts = <GIC_SPI 139 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&func_12m_clk>; + clock-names = "fck"; + ti,hwmods = "hdq1w"; + status = "disabled"; + }; diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c index 0a7bf7f..ec36bee 100644 --- a/drivers/w1/masters/omap_hdq.c +++ b/drivers/w1/masters/omap_hdq.c @@ -17,6 +17,7 @@ #include <linux/io.h> #include <linux/sched.h> #include <linux/pm_runtime.h> +#include <linux/of.h> #include "../w1.h" #include "../w1_int.h" @@ -73,11 +74,18 @@ struct hdq_data { static int omap_hdq_probe(struct platform_device *pdev); static int omap_hdq_remove(struct platform_device *pdev); +static const struct of_device_id omap_hdq_dt_match[] = { + { .compatible = "ti,am43xx-hdq"}, + {}, +}; +MODULE_DEVICE_TABLE(of, omap_hdq_dt_match); + static struct platform_driver omap_hdq_driver = { .probe = omap_hdq_probe, .remove = omap_hdq_remove, .driver = { .name = "omap_hdq", + .of_match_table = of_match_ptr(omap_hdq_dt_match), }, }; -- 1.7.9.5
next prev parent reply other threads:[~2014-04-16 12:32 UTC|newest] Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-04-16 12:32 [PATCH 0/5] AM437x: HDQ/1wire protocol Sourav Poddar 2014-04-16 12:32 ` Sourav Poddar 2014-04-16 12:32 ` [PATCH 1/5] drivers: w1: omap_hdq: cleanup and bug fixes Sourav Poddar 2014-04-16 12:32 ` Sourav Poddar 2014-04-28 19:19 ` Paul Walmsley 2014-04-28 19:19 ` Paul Walmsley 2014-04-29 9:15 ` sourav 2014-04-29 9:15 ` sourav 2014-04-16 12:32 ` Sourav Poddar [this message] 2014-04-16 12:32 ` [PATCH 2/5] w1: omap_hdq: Add compatible property for omap hdq driver Sourav Poddar 2014-04-16 12:32 ` [PATCH 3/5] arm: omap2: skip device build from platform code for dt Sourav Poddar 2014-04-16 12:32 ` Sourav Poddar 2014-04-28 18:28 ` Paul Walmsley 2014-04-28 18:28 ` Paul Walmsley 2014-04-28 18:39 ` Felipe Balbi 2014-04-28 18:39 ` Felipe Balbi 2014-04-29 8:51 ` sourav 2014-04-29 8:51 ` sourav 2014-04-16 12:32 ` [PATCH 4/5] arm: dts: am4372: Add hdq device tree data Sourav Poddar 2014-04-16 12:32 ` Sourav Poddar 2014-04-16 12:32 ` [PATCH 5/5] arm: hwmod: am437x: Add hwmod data for hdq1w Sourav Poddar 2014-04-16 12:32 ` Sourav Poddar 2014-04-28 22:07 ` Paul Walmsley 2014-04-28 22:07 ` Paul Walmsley 2014-04-29 8:49 ` sourav 2014-04-29 8:49 ` sourav
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=1397651532-31456-3-git-send-email-sourav.poddar@ti.com \ --to=sourav.poddar@ti.com \ --cc=balbi@ti.com \ --cc=bcousson@baylibre.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-omap@vger.kernel.org \ --cc=michael.opdenacker@free-electrons.com \ --cc=paul@pwsan.com \ --cc=tony@atomide.com \ --cc=wsa@the-dreams.de \ --cc=zbr@ioremap.net \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.