Drivers: w1: mxc_w1, Add support for DT
PATCH 1/2 Drivers: w1: mxc_w1, Add support for DT
Add devicetree support for mxc_w1 driver.
--- 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
Documentation/devicetree/bindings/w1/fsl,mxc-w1.txt new file +13 -0
@@ -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 at 10009000 { + compatible = "fsl,imx27-w1"; + reg = <0x10009000 0x1000>; + };
drivers/w1/masters/mxc_w1.c +7 -0
@@ -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,
Signature · 1 line
1.8.1.2
PATCH 2/2 Drivers: w1: mxc_w1, Add driver owner
Driver owner was missing.
--- drivers/w1/masters/mxc_w1.c | 1 + 1 file changed, 1 insertion(+)
drivers/w1/masters/mxc_w1.c +1 -0
@@ -195,6 +195,7 @@ MODULE_DEVICE_TABLE(of, mxc_w1_of_ids);static struct platform_driver mxc_w1_driver = { .driver = { .name ="mxc_w1" , + .owner =THIS_MODULE , .of_match_table = mxc_w1_of_ids, }, .probe = mxc_w1_probe,
Signature · 1 line
1.8.1.2
PATCH 1/2 Drivers: w1: mxc_w1, Add support for DT
In reply to Markus PargmannHello.
Quoted 15 lines · Markus Pargmann
Add devicetree support for
mxc_w1driver.Signed-off-by Markus Pargmann <[email protected]>--- 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.txtDocumentation/devicetree/bindings/w1/fsl,mxc-w1.txt new file +0
-0
Documentation/devicetree/bindings/w1/fsl,mxc-w1.txt line 1
Quoted 1 line
Documentation/devicetree/bindings/w1/fsl,mxc-w1.txt new file +1
-0@@ -0,0 +1,13 @@ +Freescale driver for Dalla's 1-wire bus master on imx chips
You meant "Dallas'".
WBR, Sergei
A message that is not in the archive (sent off-list or not yet received): 1361640958-1876-1-git-send-email-mpa-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org
Hi Markus,
I've already submitted basically this and it's in linux-next:
http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=commitdiff;h=28c55dc1acc863cb29832b5be2464ebcdafdc3d5
Also:
+Example:
+ w1: w1@10009000 {
+ compatible = "fsl,imx27-w1";
+ reg = <0x10009000 0x1000>;
+ };
...
+struct of_device_id mxc_w1_of_ids[] = {
+ { .compatible = "fsl,imx21-w1", },
+ { /* sentinel */ }
+};
Isn't there a mismatch imx27 vs imx21 here?
Regards,
Martin
Quoted 54 lines · Markus Pargmann
Add devicetree support for
mxc_w1driver.Signed-off-by Markus Pargmann <[email protected]>--- 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.txtDocumentation/devicetree/bindings/w1/fsl,mxc-w1.txt new file +13
-0@@ -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>; + };drivers/w1/masters/mxc_w1.c +7
-1@@ -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
Quoted 5 lines
_______________________________________________
linux-arm-kernel mailing list linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
_______________________________________________
devicetree-discuss mailing list devicetree-discuss-uLR06cmDAlY/[email protected]
https://lists.ozlabs.org/listinfo/devicetree-discuss
PATCH 1/2 Drivers: w1: mxc_w1, Add support for DT
Hi Martin,
Quoted 5 lines · Martin Fuzzey
Hi Markus,
I've already submitted basically this and it's in linux-next:
http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=commitdiff;h=28c55dc1acc863cb29832b5be2464ebcdafdc3d5
Ok, but 2/2 is still needed.
Quoted 13 lines
Also:
Documentation/devicetree/bindings/w1/fsl,mxc-w1.txt new file +9
-0+Example: + w1: w1 at 10009000 { + compatible = "fsl,imx27-w1"; + reg = <0x10009000 0x1000>; + }; +struct of_device_id mxc_w1_of_ids[] = { + { .compatible = "fsl,imx21-w1", }, + { /* sentinel */ } +};
Quoted 1 line
Isn't there a mismatch imx27 vs imx21 here?
Yes that's a mismatch from a previous version.
Thanks
Markus
Quoted 69 lines
Regards,
Martin
On Sat, Feb 23, 2013 at 6:35 PM, Markus Pargmann <[email protected]> wrote:
Add devicetree support for mxc_w1 driver. Signed-off-by: Markus Pargmann <[email protected]> --- 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 at 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |