* [2/4] usb: musb: jz4740: Add support for devicetree
@ 2018-12-13 14:45 Paul Cercueil
0 siblings, 0 replies; 2+ messages in thread
From: Paul Cercueil @ 2018-12-13 14:45 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Mark Rutland, Bin Liu
Cc: linux-usb, devicetree, linux-kernel, od, Paul Cercueil
Add support for probing the driver from devicetree.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
drivers/usb/musb/jz4740.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/usb/musb/jz4740.c b/drivers/usb/musb/jz4740.c
index 04d8b2bc205a..9a2cebcac260 100644
--- a/drivers/usb/musb/jz4740.c
+++ b/drivers/usb/musb/jz4740.c
@@ -10,6 +10,7 @@
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/module.h>
+#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/usb/usb_phy_generic.h>
@@ -188,11 +189,17 @@ static int jz4740_remove(struct platform_device *pdev)
return 0;
}
+static const struct of_device_id jz4740_musb_of_match[] = {
+ { .compatible = "ingenic,jz4740-musb" },
+ {},
+};
+
static struct platform_driver jz4740_driver = {
.probe = jz4740_probe,
.remove = jz4740_remove,
.driver = {
.name = "musb-jz4740",
+ .of_match_table = of_match_ptr(jz4740_musb_of_match),
},
};
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [2/4] usb: musb: jz4740: Add support for devicetree
@ 2019-01-07 19:47 Bin Liu
0 siblings, 0 replies; 2+ messages in thread
From: Bin Liu @ 2019-01-07 19:47 UTC (permalink / raw)
To: Paul Cercueil
Cc: Greg Kroah-Hartman, Rob Herring, Mark Rutland, linux-usb,
devicetree, linux-kernel, od
Hi,
On Thu, Dec 13, 2018 at 03:45:53PM +0100, Paul Cercueil wrote:
> Add support for probing the driver from devicetree.
>
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---
> drivers/usb/musb/jz4740.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/usb/musb/jz4740.c b/drivers/usb/musb/jz4740.c
> index 04d8b2bc205a..9a2cebcac260 100644
> --- a/drivers/usb/musb/jz4740.c
> +++ b/drivers/usb/musb/jz4740.c
> @@ -10,6 +10,7 @@
> #include <linux/errno.h>
> #include <linux/kernel.h>
> #include <linux/module.h>
> +#include <linux/of_device.h>
> #include <linux/platform_device.h>
> #include <linux/usb/usb_phy_generic.h>
>
> @@ -188,11 +189,17 @@ static int jz4740_remove(struct platform_device *pdev)
> return 0;
> }
>
> +static const struct of_device_id jz4740_musb_of_match[] = {
> + { .compatible = "ingenic,jz4740-musb" },
> + {},
> +};
should be wrapped by '#ifdef CONFIG_OF'?
miss MODULE_DEVICE_TABLE()
> +
> static struct platform_driver jz4740_driver = {
> .probe = jz4740_probe,
> .remove = jz4740_remove,
> .driver = {
> .name = "musb-jz4740",
> + .of_match_table = of_match_ptr(jz4740_musb_of_match),
> },
> };
>
Regards,
-Bin.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-01-07 19:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-07 19:47 [2/4] usb: musb: jz4740: Add support for devicetree Bin Liu
-- strict thread matches above, loose matches on Subject: below --
2018-12-13 14:45 Paul Cercueil
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).