LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] mfd: omap-usb-host: Fix dts probe of children
@ 2018-04-25 14:29 Tony Lindgren
  2018-04-26 10:25 ` Roger Quadros
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Tony Lindgren @ 2018-04-25 14:29 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-kernel, linux-omap, Roger Quadros

It currently only works if the parent bus uses "simple-bus". We
currently try to probe children with non-existing compatible values.
And we're missing .probe.

I noticed this while testing devices configured to probe using ti-sysc
interconnect target module driver. For that we also may want to rebind
the driver, so let's remove __init and __exit.

Cc: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---

This is OK to wait for v4.18 merge window as the related dts node has
not yet been updated to probe via ti-sysc interconnect target driver.

---
 drivers/mfd/omap-usb-host.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
--- a/drivers/mfd/omap-usb-host.c
+++ b/drivers/mfd/omap-usb-host.c
@@ -548,8 +548,8 @@ static int usbhs_omap_get_dt_pdata(struct device *dev,
 }
 
 static const struct of_device_id usbhs_child_match_table[] = {
-	{ .compatible = "ti,omap-ehci", },
-	{ .compatible = "ti,omap-ohci", },
+	{ .compatible = "ti,ehci-omap", },
+	{ .compatible = "ti,ohci-omap3", },
 	{ }
 };
 
@@ -875,6 +875,7 @@ static struct platform_driver usbhs_omap_driver = {
 		.pm		= &usbhsomap_dev_pm_ops,
 		.of_match_table = usbhs_omap_dt_ids,
 	},
+	.probe		= usbhs_omap_probe,
 	.remove		= usbhs_omap_remove,
 };
 
@@ -884,9 +885,9 @@ MODULE_ALIAS("platform:" USBHS_DRIVER_NAME);
 MODULE_LICENSE("GPL v2");
 MODULE_DESCRIPTION("usb host common core driver for omap EHCI and OHCI");
 
-static int __init omap_usbhs_drvinit(void)
+static int omap_usbhs_drvinit(void)
 {
-	return platform_driver_probe(&usbhs_omap_driver, usbhs_omap_probe);
+	return platform_driver_register(&usbhs_omap_driver);
 }
 
 /*
@@ -898,7 +899,7 @@ static int __init omap_usbhs_drvinit(void)
  */
 fs_initcall_sync(omap_usbhs_drvinit);
 
-static void __exit omap_usbhs_drvexit(void)
+static void omap_usbhs_drvexit(void)
 {
 	platform_driver_unregister(&usbhs_omap_driver);
 }
-- 
2.17.0

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

* Re: [PATCH] mfd: omap-usb-host: Fix dts probe of children
  2018-04-25 14:29 [PATCH] mfd: omap-usb-host: Fix dts probe of children Tony Lindgren
@ 2018-04-26 10:25 ` Roger Quadros
  2018-08-30 22:18 ` Tony Lindgren
  2018-09-11 15:48 ` Lee Jones
  2 siblings, 0 replies; 6+ messages in thread
From: Roger Quadros @ 2018-04-26 10:25 UTC (permalink / raw)
  To: Tony Lindgren, Lee Jones; +Cc: linux-kernel, linux-omap

On 25/04/18 17:29, Tony Lindgren wrote:
> It currently only works if the parent bus uses "simple-bus". We
> currently try to probe children with non-existing compatible values.
> And we're missing .probe.
> 
> I noticed this while testing devices configured to probe using ti-sysc
> interconnect target module driver. For that we also may want to rebind
> the driver, so let's remove __init and __exit.
> 
> Cc: Roger Quadros <rogerq@ti.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>

Acked-by: Roger Quadros <rogerq@ti.com>

> ---
> 
> This is OK to wait for v4.18 merge window as the related dts node has
> not yet been updated to probe via ti-sysc interconnect target driver.
> 
> ---
>  drivers/mfd/omap-usb-host.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
> --- a/drivers/mfd/omap-usb-host.c
> +++ b/drivers/mfd/omap-usb-host.c
> @@ -548,8 +548,8 @@ static int usbhs_omap_get_dt_pdata(struct device *dev,
>  }
>  
>  static const struct of_device_id usbhs_child_match_table[] = {
> -	{ .compatible = "ti,omap-ehci", },
> -	{ .compatible = "ti,omap-ohci", },
> +	{ .compatible = "ti,ehci-omap", },
> +	{ .compatible = "ti,ohci-omap3", },
>  	{ }
>  };
>  
> @@ -875,6 +875,7 @@ static struct platform_driver usbhs_omap_driver = {
>  		.pm		= &usbhsomap_dev_pm_ops,
>  		.of_match_table = usbhs_omap_dt_ids,
>  	},
> +	.probe		= usbhs_omap_probe,
>  	.remove		= usbhs_omap_remove,
>  };
>  
> @@ -884,9 +885,9 @@ MODULE_ALIAS("platform:" USBHS_DRIVER_NAME);
>  MODULE_LICENSE("GPL v2");
>  MODULE_DESCRIPTION("usb host common core driver for omap EHCI and OHCI");
>  
> -static int __init omap_usbhs_drvinit(void)
> +static int omap_usbhs_drvinit(void)
>  {
> -	return platform_driver_probe(&usbhs_omap_driver, usbhs_omap_probe);
> +	return platform_driver_register(&usbhs_omap_driver);
>  }
>  
>  /*
> @@ -898,7 +899,7 @@ static int __init omap_usbhs_drvinit(void)
>   */
>  fs_initcall_sync(omap_usbhs_drvinit);
>  
> -static void __exit omap_usbhs_drvexit(void)
> +static void omap_usbhs_drvexit(void)
>  {
>  	platform_driver_unregister(&usbhs_omap_driver);
>  }
> 

-- 
cheers,
-roger

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

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

* Re: [PATCH] mfd: omap-usb-host: Fix dts probe of children
  2018-04-25 14:29 [PATCH] mfd: omap-usb-host: Fix dts probe of children Tony Lindgren
  2018-04-26 10:25 ` Roger Quadros
@ 2018-08-30 22:18 ` Tony Lindgren
  2018-09-10 11:14   ` Lee Jones
  2018-09-11 15:48 ` Lee Jones
  2 siblings, 1 reply; 6+ messages in thread
From: Tony Lindgren @ 2018-08-30 22:18 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-kernel, linux-omap, Roger Quadros

Lee,

* Tony Lindgren <tony@atomide.com> [180425 07:31]:
> It currently only works if the parent bus uses "simple-bus". We
> currently try to probe children with non-existing compatible values.
> And we're missing .probe.
> 
> I noticed this while testing devices configured to probe using ti-sysc
> interconnect target module driver. For that we also may want to rebind
> the driver, so let's remove __init and __exit.
> 
> Cc: Roger Quadros <rogerq@ti.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
> 
> This is OK to wait for v4.18 merge window as the related dts node has
> not yet been updated to probe via ti-sysc interconnect target driver.

Sorry I just noticed this is still pending, it should be
applied as a fix for the -rc series.

Do you want me to resend the patch?

Regards,

Tony

>  drivers/mfd/omap-usb-host.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
> --- a/drivers/mfd/omap-usb-host.c
> +++ b/drivers/mfd/omap-usb-host.c
> @@ -548,8 +548,8 @@ static int usbhs_omap_get_dt_pdata(struct device *dev,
>  }
>  
>  static const struct of_device_id usbhs_child_match_table[] = {
> -	{ .compatible = "ti,omap-ehci", },
> -	{ .compatible = "ti,omap-ohci", },
> +	{ .compatible = "ti,ehci-omap", },
> +	{ .compatible = "ti,ohci-omap3", },
>  	{ }
>  };
>  
> @@ -875,6 +875,7 @@ static struct platform_driver usbhs_omap_driver = {
>  		.pm		= &usbhsomap_dev_pm_ops,
>  		.of_match_table = usbhs_omap_dt_ids,
>  	},
> +	.probe		= usbhs_omap_probe,
>  	.remove		= usbhs_omap_remove,
>  };
>  
> @@ -884,9 +885,9 @@ MODULE_ALIAS("platform:" USBHS_DRIVER_NAME);
>  MODULE_LICENSE("GPL v2");
>  MODULE_DESCRIPTION("usb host common core driver for omap EHCI and OHCI");
>  
> -static int __init omap_usbhs_drvinit(void)
> +static int omap_usbhs_drvinit(void)
>  {
> -	return platform_driver_probe(&usbhs_omap_driver, usbhs_omap_probe);
> +	return platform_driver_register(&usbhs_omap_driver);
>  }
>  
>  /*
> @@ -898,7 +899,7 @@ static int __init omap_usbhs_drvinit(void)
>   */
>  fs_initcall_sync(omap_usbhs_drvinit);
>  
> -static void __exit omap_usbhs_drvexit(void)
> +static void omap_usbhs_drvexit(void)
>  {
>  	platform_driver_unregister(&usbhs_omap_driver);
>  }
> -- 
> 2.17.0
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: [PATCH] mfd: omap-usb-host: Fix dts probe of children
  2018-08-30 22:18 ` Tony Lindgren
@ 2018-09-10 11:14   ` Lee Jones
  2018-09-10 14:00     ` Tony Lindgren
  0 siblings, 1 reply; 6+ messages in thread
From: Lee Jones @ 2018-09-10 11:14 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-kernel, linux-omap, Roger Quadros

On Thu, 30 Aug 2018, Tony Lindgren wrote:

> Lee,
> 
> * Tony Lindgren <tony@atomide.com> [180425 07:31]:
> > It currently only works if the parent bus uses "simple-bus". We
> > currently try to probe children with non-existing compatible values.
> > And we're missing .probe.
> > 
> > I noticed this while testing devices configured to probe using ti-sysc
> > interconnect target module driver. For that we also may want to rebind
> > the driver, so let's remove __init and __exit.
> > 
> > Cc: Roger Quadros <rogerq@ti.com>
> > Signed-off-by: Tony Lindgren <tony@atomide.com>
> > ---
> > 
> > This is OK to wait for v4.18 merge window as the related dts node has
> > not yet been updated to probe via ti-sysc interconnect target driver.
> 
> Sorry I just noticed this is still pending, it should be
> applied as a fix for the -rc series.
> 
> Do you want me to resend the patch?

Just back from vacation.

No thanks, I'll get to it.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH] mfd: omap-usb-host: Fix dts probe of children
  2018-09-10 11:14   ` Lee Jones
@ 2018-09-10 14:00     ` Tony Lindgren
  0 siblings, 0 replies; 6+ messages in thread
From: Tony Lindgren @ 2018-09-10 14:00 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-kernel, linux-omap, Roger Quadros

* Lee Jones <lee.jones@linaro.org> [180910 11:18]:
> On Thu, 30 Aug 2018, Tony Lindgren wrote:
> 
> > Lee,
> > 
> > * Tony Lindgren <tony@atomide.com> [180425 07:31]:
> > > It currently only works if the parent bus uses "simple-bus". We
> > > currently try to probe children with non-existing compatible values.
> > > And we're missing .probe.
> > > 
> > > I noticed this while testing devices configured to probe using ti-sysc
> > > interconnect target module driver. For that we also may want to rebind
> > > the driver, so let's remove __init and __exit.
> > > 
> > > Cc: Roger Quadros <rogerq@ti.com>
> > > Signed-off-by: Tony Lindgren <tony@atomide.com>
> > > ---
> > > 
> > > This is OK to wait for v4.18 merge window as the related dts node has
> > > not yet been updated to probe via ti-sysc interconnect target driver.
> > 
> > Sorry I just noticed this is still pending, it should be
> > applied as a fix for the -rc series.
> > 
> > Do you want me to resend the patch?
> 
> Just back from vacation.

Welcome back :)

> No thanks, I'll get to it.

OK thanks!

Tony


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

* Re: [PATCH] mfd: omap-usb-host: Fix dts probe of children
  2018-04-25 14:29 [PATCH] mfd: omap-usb-host: Fix dts probe of children Tony Lindgren
  2018-04-26 10:25 ` Roger Quadros
  2018-08-30 22:18 ` Tony Lindgren
@ 2018-09-11 15:48 ` Lee Jones
  2 siblings, 0 replies; 6+ messages in thread
From: Lee Jones @ 2018-09-11 15:48 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-kernel, linux-omap, Roger Quadros

On Wed, 25 Apr 2018, Tony Lindgren wrote:

> It currently only works if the parent bus uses "simple-bus". We
> currently try to probe children with non-existing compatible values.
> And we're missing .probe.
> 
> I noticed this while testing devices configured to probe using ti-sysc
> interconnect target module driver. For that we also may want to rebind
> the driver, so let's remove __init and __exit.
> 
> Cc: Roger Quadros <rogerq@ti.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
> 
> This is OK to wait for v4.18 merge window as the related dts node has
> not yet been updated to probe via ti-sysc interconnect target driver.
> 
> ---
>  drivers/mfd/omap-usb-host.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

end of thread, other threads:[~2018-09-11 15:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-25 14:29 [PATCH] mfd: omap-usb-host: Fix dts probe of children Tony Lindgren
2018-04-26 10:25 ` Roger Quadros
2018-08-30 22:18 ` Tony Lindgren
2018-09-10 11:14   ` Lee Jones
2018-09-10 14:00     ` Tony Lindgren
2018-09-11 15:48 ` Lee Jones

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).