diff mbox

[3/3] Add ACPI bindings for the EHCI platform driver.

Message ID 1439416290-21228-4-git-send-email-jeremy.linton@arm.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jeremy Linton Aug. 12, 2015, 9:51 p.m. UTC
This enables USB on the ARM juno board when booted with
an ACPI kernel. The PNP id comes from the PNP/ACPI registry
and describes a EHCI controller without debug.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
---
 drivers/usb/host/ehci-platform.c | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Hanjun Guo Aug. 13, 2015, 11:50 a.m. UTC | #1
Hi Jeremy,

Just minor comments below. (resend as it's blocked by mailist)

On 2015/8/13 5:51, Jeremy Linton wrote:
> This enables USB on the ARM juno board when booted with
> an ACPI kernel. The PNP id comes from the PNP/ACPI registry
> and describes a EHCI controller without debug.
>
> Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
> ---
>  drivers/usb/host/ehci-platform.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c
> index 82e396f..1807baa 100644
> --- a/drivers/usb/host/ehci-platform.c
> +++ b/drivers/usb/host/ehci-platform.c
> @@ -27,6 +27,7 @@
>  #include <linux/io.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
> +#include <linux/acpi.h>

this file list the head file in alphabetical order, I think it's
better to follow that rule.

>  #include <linux/phy/phy.h>
>  #include <linux/platform_device.h>
>  #include <linux/reset.h>
> @@ -382,6 +383,13 @@ static const struct of_device_id vt8500_ehci_ids[] = {
>  };
>  MODULE_DEVICE_TABLE(of, vt8500_ehci_ids);
>  
> +static const struct acpi_device_id ehci_acpi_match[] = {
> +	{ "PNP0D20", 0 },
> +	{ }
> +};
> +MODULE_DEVICE_TABLE(acpi, ehci_acpi_match);
> +
> +

Single empty line will be fine :)

>  static const struct platform_device_id ehci_platform_table[] = {
>  	{ "ehci-platform", 0 },
>  	{ }
> @@ -400,6 +408,7 @@ static struct platform_driver ehci_platform_driver = {
>  		.name	= "ehci-platform",
>  		.pm	= &ehci_platform_pm_ops,
>  		.of_match_table = vt8500_ehci_ids,
> +		.acpi_match_table = ACPI_PTR(ehci_acpi_match),
>  	}
>  };
>  

With that minor fixes,

Reviewed-by: Hanjun Guo <hanjun.guo@linaro.org>

Thanks
Hanjun
Jeremy Linton Aug. 13, 2015, 2:45 p.m. UTC | #2
Hello Hanjun,


On 08/13/2015 06:50 AM, Hanjun Guo wrote:
> With that minor fixes,
>
> Reviewed-by: Hanjun Guo <hanjun.guo@linaro.org>


Fixes applied, thanks.
Alan Stern Aug. 13, 2015, 2:53 p.m. UTC | #3
On Wed, 12 Aug 2015, Jeremy Linton wrote:

> This enables USB on the ARM juno board when booted with
> an ACPI kernel. The PNP id comes from the PNP/ACPI registry
> and describes a EHCI controller without debug.
> 
> Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>

Looks okay, but...

> ---
>  drivers/usb/host/ehci-platform.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c
> index 82e396f..1807baa 100644
> --- a/drivers/usb/host/ehci-platform.c
> +++ b/drivers/usb/host/ehci-platform.c
> @@ -27,6 +27,7 @@
>  #include <linux/io.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
> +#include <linux/acpi.h>
>  #include <linux/phy/phy.h>
>  #include <linux/platform_device.h>
>  #include <linux/reset.h>
> @@ -382,6 +383,13 @@ static const struct of_device_id vt8500_ehci_ids[] = {
>  };
>  MODULE_DEVICE_TABLE(of, vt8500_ehci_ids);
>  
> +static const struct acpi_device_id ehci_acpi_match[] = {
> +	{ "PNP0D20", 0 },

How about a comment on this line?  Something like:

+	{ "PNP0D20", 0 },	/* EHCI controller without debug */

I realize the of_device_id table doesn't include similar comments, but 
there the entries are more or less self-documenting.  The same cannot 
be said for "PNP0D20".

> +	{ }
> +};
> +MODULE_DEVICE_TABLE(acpi, ehci_acpi_match);
> +
> +

Undesired extra blank line.

>  static const struct platform_device_id ehci_platform_table[] = {
>  	{ "ehci-platform", 0 },
>  	{ }
> @@ -400,6 +408,7 @@ static struct platform_driver ehci_platform_driver = {
>  		.name	= "ehci-platform",
>  		.pm	= &ehci_platform_pm_ops,
>  		.of_match_table = vt8500_ehci_ids,
> +		.acpi_match_table = ACPI_PTR(ehci_acpi_match),
>  	}
>  };

With these changes:

Acked-by: Alan Stern <stern@rowland.harvard.edu>

Alan Stern
Jeremy Linton Aug. 13, 2015, 3:13 p.m. UTC | #4
Alan,

On 08/13/2015 09:53 AM, Alan Stern wrote:
> With these changes:

	Applied..

> Acked-by: Alan Stern <stern@rowland.harvard.edu>

	Thanks,
Huang Shijie Aug. 18, 2015, 3:35 a.m. UTC | #5
On Thu, Aug 13, 2015 at 10:13:44AM -0500, Jeremy Linton wrote:
Hi Jeremy,

    Please add my tested-by for your next version:

    Tested-by: Huang Shijie <shijie.huang@arm.com>


thanks
Huang Shijie
diff mbox

Patch

diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c
index 82e396f..1807baa 100644
--- a/drivers/usb/host/ehci-platform.c
+++ b/drivers/usb/host/ehci-platform.c
@@ -27,6 +27,7 @@ 
 #include <linux/io.h>
 #include <linux/module.h>
 #include <linux/of.h>
+#include <linux/acpi.h>
 #include <linux/phy/phy.h>
 #include <linux/platform_device.h>
 #include <linux/reset.h>
@@ -382,6 +383,13 @@  static const struct of_device_id vt8500_ehci_ids[] = {
 };
 MODULE_DEVICE_TABLE(of, vt8500_ehci_ids);
 
+static const struct acpi_device_id ehci_acpi_match[] = {
+	{ "PNP0D20", 0 },
+	{ }
+};
+MODULE_DEVICE_TABLE(acpi, ehci_acpi_match);
+
+
 static const struct platform_device_id ehci_platform_table[] = {
 	{ "ehci-platform", 0 },
 	{ }
@@ -400,6 +408,7 @@  static struct platform_driver ehci_platform_driver = {
 		.name	= "ehci-platform",
 		.pm	= &ehci_platform_pm_ops,
 		.of_match_table = vt8500_ehci_ids,
+		.acpi_match_table = ACPI_PTR(ehci_acpi_match),
 	}
 };