mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] w1: omap-hdq: support device probing with device-tree.
@ 2014-11-07 23:30 NeilBrown
  2014-11-10  0:10 ` Евгений Поляков
  0 siblings, 1 reply; 3+ messages in thread
From: NeilBrown @ 2014-11-07 23:30 UTC (permalink / raw)
  To: Evgeniy Polyakov, Tony Lindgren
  Cc: devicetree, linux-kernel, linux-omap, GTA04 owners

[-- Attachment #1: Type: text/plain, Size: 1584 bytes --]



This driver has no 'compatible' string and so is not found when
using device-tree.

Add one with value to match
		hdqw1w: 1w@480b2000 {
device in omap3.dtsi.

Signed-off-by: NeilBrown <neilb@suse.de>

diff --git a/Documentation/devicetree/bindings/w1/omap-hdq.txt b/Documentation/devicetree/bindings/w1/omap-hdq.txt
new file mode 100644
index 000000000000..fef794741bd1
--- /dev/null
+++ b/Documentation/devicetree/bindings/w1/omap-hdq.txt
@@ -0,0 +1,17 @@
+* OMAP HDQ One wire bus master controller
+
+Required properties:
+- compatible : should be "ti,omap3-1w"
+- reg : Address and length of the register set for the device
+- interrupts : interrupt line.
+- ti,hwmods : "hdq1w"
+
+Example:
+
+- From omap3.dtsi
+  hdqw1w: 1w@480b2000 {
+	compatible = "ti,omap3-1w";
+	reg = <0x480b2000 0x1000>;
+	interrupts = <58>;
+	ti,hwmods = "hdq1w";
+  };
diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c
index 9900e8ec7393..03321d6a2684 100644
--- a/drivers/w1/masters/omap_hdq.c
+++ b/drivers/w1/masters/omap_hdq.c
@@ -72,11 +72,18 @@ struct hdq_data {
 static int omap_hdq_probe(struct platform_device *pdev);
 static int omap_hdq_remove(struct platform_device *pdev);
 
+static struct of_device_id omap_hdq_dt_ids[] = {
+	{ .compatible = "ti,omap3-1w" },
+	{}
+};
+MODULE_DEVICE_TABLE(of, omap_hdq_dt_ids);
+
 static struct platform_driver omap_hdq_driver = {
 	.probe =	omap_hdq_probe,
 	.remove =	omap_hdq_remove,
 	.driver =	{
 		.name =	"omap_hdq",
+		.of_match_table = omap_hdq_dt_ids,
 	},
 };
 

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] w1: omap-hdq: support device probing with device-tree.
  2014-11-07 23:30 [PATCH] w1: omap-hdq: support device probing with device-tree NeilBrown
@ 2014-11-10  0:10 ` Евгений Поляков
  2014-11-10 23:59   ` Tony Lindgren
  0 siblings, 1 reply; 3+ messages in thread
From: Евгений Поляков @ 2014-11-10  0:10 UTC (permalink / raw)
  To: NeilBrown, Tony Lindgren
  Cc: devicetree, linux-kernel, linux-omap, GTA04 owners

Hi

08.11.2014, 02:30, "NeilBrown" <neilb@suse.de>:
> This driver has no 'compatible' string and so is not found when
> using device-tree.
>
> Add one with value to match
>                 hdqw1w: 1w@480b2000 {
> device in omap3.dtsi.
>
> Signed-off-by: NeilBrown <neilb@suse.de>

Looks good to me
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] w1: omap-hdq: support device probing with device-tree.
  2014-11-10  0:10 ` Евгений Поляков
@ 2014-11-10 23:59   ` Tony Lindgren
  0 siblings, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2014-11-10 23:59 UTC (permalink / raw)
  To: Евгений
	Поляков
  Cc: NeilBrown, devicetree, linux-kernel, linux-omap, GTA04 owners

* Евгений Поляков <zbr@ioremap.net> [141109 16:11]:
> Hi
> 
> 08.11.2014, 02:30, "NeilBrown" <neilb@suse.de>:
> > This driver has no 'compatible' string and so is not found when
> > using device-tree.
> >
> > Add one with value to match
> >                 hdqw1w: 1w@480b2000 {
> > device in omap3.dtsi.
> >
> > Signed-off-by: NeilBrown <neilb@suse.de>
> 
> Looks good to me
> Acked-by: Evgeniy Polyakov <zbr@ioremap.net>

Applying into omap-for-v3.19/drivers branch thanks.

Tony

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-11-11  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-07 23:30 [PATCH] w1: omap-hdq: support device probing with device-tree NeilBrown
2014-11-10  0:10 ` Евгений Поляков
2014-11-10 23:59   ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome