linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] usb: chipidea: usb2: constify zynq_pdata
@ 2020-04-03 23:59 Michał Mirosław
  2020-04-04  0:00 ` [PATCH 3/5] usb: chipidea: usb2: make clock optional Michał Mirosław
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Michał Mirosław @ 2020-04-03 23:59 UTC (permalink / raw)
  To: Peter Chen, Greg Kroah-Hartman; +Cc: linux-usb, linux-kernel

pdata is copied anyway to allow setting device name.
Make the source const.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
---
 drivers/usb/chipidea/ci_hdrc_usb2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/chipidea/ci_hdrc_usb2.c b/drivers/usb/chipidea/ci_hdrc_usb2.c
index c044fba463e4..62cf8a99cf78 100644
--- a/drivers/usb/chipidea/ci_hdrc_usb2.c
+++ b/drivers/usb/chipidea/ci_hdrc_usb2.c
@@ -28,7 +28,7 @@ static const struct ci_hdrc_platform_data ci_default_pdata = {
 	.flags		= CI_HDRC_DISABLE_STREAMING,
 };
 
-static struct ci_hdrc_platform_data ci_zynq_pdata = {
+static const struct ci_hdrc_platform_data ci_zynq_pdata = {
 	.capoffset	= DEF_CAPOFFSET,
 };
 
-- 
2.20.1


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

* [PATCH 2/5] usb: chipidea: usb2: fix formatting
  2020-04-03 23:59 [PATCH 1/5] usb: chipidea: usb2: constify zynq_pdata Michał Mirosław
  2020-04-04  0:00 ` [PATCH 3/5] usb: chipidea: usb2: make clock optional Michał Mirosław
@ 2020-04-04  0:00 ` Michał Mirosław
  2020-04-04  0:00 ` [PATCH 4/5] usb: chipidea: usb2: absorb zevio glue driver Michał Mirosław
  2020-04-04  0:00 ` [PATCH 5/5] usb: chipidea: allow disabling glue drivers if EMBEDDED Michał Mirosław
  3 siblings, 0 replies; 8+ messages in thread
From: Michał Mirosław @ 2020-04-04  0:00 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Peter Chen; +Cc: linux-kernel, linux-usb

Add spaces before closing braces.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
---
 drivers/usb/chipidea/ci_hdrc_usb2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/chipidea/ci_hdrc_usb2.c b/drivers/usb/chipidea/ci_hdrc_usb2.c
index 62cf8a99cf78..bf300a234e64 100644
--- a/drivers/usb/chipidea/ci_hdrc_usb2.c
+++ b/drivers/usb/chipidea/ci_hdrc_usb2.c
@@ -33,8 +33,8 @@ static const struct ci_hdrc_platform_data ci_zynq_pdata = {
 };
 
 static const struct of_device_id ci_hdrc_usb2_of_match[] = {
-	{ .compatible = "chipidea,usb2"},
-	{ .compatible = "xlnx,zynq-usb-2.20a", .data = &ci_zynq_pdata},
+	{ .compatible = "chipidea,usb2" },
+	{ .compatible = "xlnx,zynq-usb-2.20a", .data = &ci_zynq_pdata },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, ci_hdrc_usb2_of_match);
-- 
2.20.1


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

* [PATCH 3/5] usb: chipidea: usb2: make clock optional
  2020-04-03 23:59 [PATCH 1/5] usb: chipidea: usb2: constify zynq_pdata Michał Mirosław
@ 2020-04-04  0:00 ` Michał Mirosław
  2020-04-04  0:00 ` [PATCH 2/5] usb: chipidea: usb2: fix formatting Michał Mirosław
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Michał Mirosław @ 2020-04-04  0:00 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Peter Chen; +Cc: linux-kernel, linux-usb

Allow clock to be missing from DT (assume it's enabled then).

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
---
 drivers/usb/chipidea/ci_hdrc_usb2.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/usb/chipidea/ci_hdrc_usb2.c b/drivers/usb/chipidea/ci_hdrc_usb2.c
index bf300a234e64..9086514840ed 100644
--- a/drivers/usb/chipidea/ci_hdrc_usb2.c
+++ b/drivers/usb/chipidea/ci_hdrc_usb2.c
@@ -64,13 +64,14 @@ static int ci_hdrc_usb2_probe(struct platform_device *pdev)
 	if (!priv)
 		return -ENOMEM;
 
-	priv->clk = devm_clk_get(dev, NULL);
-	if (!IS_ERR(priv->clk)) {
-		ret = clk_prepare_enable(priv->clk);
-		if (ret) {
-			dev_err(dev, "failed to enable the clock: %d\n", ret);
-			return ret;
-		}
+	priv->clk = devm_clk_get_optional(dev, NULL);
+	if (IS_ERR(priv->clk))
+		return PTR_ERR(priv->clk);;
+
+	ret = clk_prepare_enable(priv->clk);
+	if (ret) {
+		dev_err(dev, "failed to enable the clock: %d\n", ret);
+		return ret;
 	}
 
 	ci_pdata->name = dev_name(dev);
@@ -94,8 +95,7 @@ static int ci_hdrc_usb2_probe(struct platform_device *pdev)
 	return 0;
 
 clk_err:
-	if (!IS_ERR(priv->clk))
-		clk_disable_unprepare(priv->clk);
+	clk_disable_unprepare(priv->clk);
 	return ret;
 }
 
-- 
2.20.1


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

* [PATCH 4/5] usb: chipidea: usb2: absorb zevio glue driver
  2020-04-03 23:59 [PATCH 1/5] usb: chipidea: usb2: constify zynq_pdata Michał Mirosław
  2020-04-04  0:00 ` [PATCH 3/5] usb: chipidea: usb2: make clock optional Michał Mirosław
  2020-04-04  0:00 ` [PATCH 2/5] usb: chipidea: usb2: fix formatting Michał Mirosław
@ 2020-04-04  0:00 ` Michał Mirosław
  2020-04-04  0:00 ` [PATCH 5/5] usb: chipidea: allow disabling glue drivers if EMBEDDED Michał Mirosław
  3 siblings, 0 replies; 8+ messages in thread
From: Michał Mirosław @ 2020-04-04  0:00 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Peter Chen; +Cc: linux-kernel, linux-usb

ZEVIO glue code is is identical to generic binding now, but doesn't
enable runtime PM. Let's squash the driver and get runtime PM for free.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
---
 drivers/usb/chipidea/Makefile        |  1 -
 drivers/usb/chipidea/ci_hdrc_usb2.c  |  6 +++
 drivers/usb/chipidea/ci_hdrc_zevio.c | 67 ----------------------------
 3 files changed, 6 insertions(+), 68 deletions(-)

diff --git a/drivers/usb/chipidea/Makefile b/drivers/usb/chipidea/Makefile
index 12df94f78f72..985663ba6e68 100644
--- a/drivers/usb/chipidea/Makefile
+++ b/drivers/usb/chipidea/Makefile
@@ -10,7 +10,6 @@ ci_hdrc-$(CONFIG_USB_OTG_FSM)		+= otg_fsm.o
 
 obj-$(CONFIG_USB_CHIPIDEA)	+= ci_hdrc_usb2.o
 obj-$(CONFIG_USB_CHIPIDEA)	+= ci_hdrc_msm.o
-obj-$(CONFIG_USB_CHIPIDEA)	+= ci_hdrc_zevio.o
 
 obj-$(CONFIG_USB_CHIPIDEA_PCI)	+= ci_hdrc_pci.o
 
diff --git a/drivers/usb/chipidea/ci_hdrc_usb2.c b/drivers/usb/chipidea/ci_hdrc_usb2.c
index 9086514840ed..93c864759135 100644
--- a/drivers/usb/chipidea/ci_hdrc_usb2.c
+++ b/drivers/usb/chipidea/ci_hdrc_usb2.c
@@ -32,9 +32,15 @@ static const struct ci_hdrc_platform_data ci_zynq_pdata = {
 	.capoffset	= DEF_CAPOFFSET,
 };
 
+static const struct ci_hdrc_platform_data ci_zevio_pdata = {
+	.capoffset	= DEF_CAPOFFSET,
+	.flags		= CI_HDRC_REGS_SHARED | CI_HDRC_FORCE_FULLSPEED,
+};
+
 static const struct of_device_id ci_hdrc_usb2_of_match[] = {
 	{ .compatible = "chipidea,usb2" },
 	{ .compatible = "xlnx,zynq-usb-2.20a", .data = &ci_zynq_pdata },
+	{ .compatible = "lsi,zevio-usb", .data = &ci_zevio_pdata },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, ci_hdrc_usb2_of_match);
diff --git a/drivers/usb/chipidea/ci_hdrc_zevio.c b/drivers/usb/chipidea/ci_hdrc_zevio.c
deleted file mode 100644
index e1634da4a4b1..000000000000
--- a/drivers/usb/chipidea/ci_hdrc_zevio.c
+++ /dev/null
@@ -1,67 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- *	Copyright (C) 2013 Daniel Tang <tangrs@tangrs.id.au>
- *
- * Based off drivers/usb/chipidea/ci_hdrc_msm.c
- */
-
-#include <linux/module.h>
-#include <linux/platform_device.h>
-#include <linux/usb/gadget.h>
-#include <linux/usb/chipidea.h>
-
-#include "ci.h"
-
-static struct ci_hdrc_platform_data ci_hdrc_zevio_platdata = {
-	.name			= "ci_hdrc_zevio",
-	.flags			= CI_HDRC_REGS_SHARED | CI_HDRC_FORCE_FULLSPEED,
-	.capoffset		= DEF_CAPOFFSET,
-};
-
-static int ci_hdrc_zevio_probe(struct platform_device *pdev)
-{
-	struct platform_device *ci_pdev;
-
-	dev_dbg(&pdev->dev, "ci_hdrc_zevio_probe\n");
-
-	ci_pdev = ci_hdrc_add_device(&pdev->dev,
-				pdev->resource, pdev->num_resources,
-				&ci_hdrc_zevio_platdata);
-
-	if (IS_ERR(ci_pdev)) {
-		dev_err(&pdev->dev, "ci_hdrc_add_device failed!\n");
-		return PTR_ERR(ci_pdev);
-	}
-
-	platform_set_drvdata(pdev, ci_pdev);
-
-	return 0;
-}
-
-static int ci_hdrc_zevio_remove(struct platform_device *pdev)
-{
-	struct platform_device *ci_pdev = platform_get_drvdata(pdev);
-
-	ci_hdrc_remove_device(ci_pdev);
-
-	return 0;
-}
-
-static const struct of_device_id ci_hdrc_zevio_dt_ids[] = {
-	{ .compatible = "lsi,zevio-usb", },
-	{ /* sentinel */ }
-};
-
-static struct platform_driver ci_hdrc_zevio_driver = {
-	.probe = ci_hdrc_zevio_probe,
-	.remove = ci_hdrc_zevio_remove,
-	.driver = {
-		.name = "zevio_usb",
-		.of_match_table = ci_hdrc_zevio_dt_ids,
-	},
-};
-
-MODULE_DEVICE_TABLE(of, ci_hdrc_zevio_dt_ids);
-module_platform_driver(ci_hdrc_zevio_driver);
-
-MODULE_LICENSE("GPL v2");
-- 
2.20.1


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

* [PATCH 5/5] usb: chipidea: allow disabling glue drivers if EMBEDDED
  2020-04-03 23:59 [PATCH 1/5] usb: chipidea: usb2: constify zynq_pdata Michał Mirosław
                   ` (2 preceding siblings ...)
  2020-04-04  0:00 ` [PATCH 4/5] usb: chipidea: usb2: absorb zevio glue driver Michał Mirosław
@ 2020-04-04  0:00 ` Michał Mirosław
  2020-04-07  3:12   ` Peter Chen
  3 siblings, 1 reply; 8+ messages in thread
From: Michał Mirosław @ 2020-04-04  0:00 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Peter Chen; +Cc: linux-kernel, linux-usb

Allow to cut down on driver size for embedded config.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
---
 drivers/usb/chipidea/Kconfig  | 37 ++++++++++++++++++++++++-----------
 drivers/usb/chipidea/Makefile | 12 +++++-------
 2 files changed, 31 insertions(+), 18 deletions(-)

diff --git a/drivers/usb/chipidea/Kconfig b/drivers/usb/chipidea/Kconfig
index d53db520e209..8bafcfc6080d 100644
--- a/drivers/usb/chipidea/Kconfig
+++ b/drivers/usb/chipidea/Kconfig
@@ -18,17 +18,6 @@ config USB_CHIPIDEA
 
 if USB_CHIPIDEA
 
-config USB_CHIPIDEA_OF
-	tristate
-	depends on OF
-	default USB_CHIPIDEA
-
-config USB_CHIPIDEA_PCI
-	tristate
-	depends on USB_PCI
-	depends on NOP_USB_XCEIV
-	default USB_CHIPIDEA
-
 config USB_CHIPIDEA_UDC
 	bool "ChipIdea device controller"
 	depends on USB_GADGET
@@ -43,4 +32,30 @@ config USB_CHIPIDEA_HOST
 	help
 	  Say Y here to enable host controller functionality of the
 	  ChipIdea driver.
+
+config USB_CHIPIDEA_PCI
+	tristate "Enable PCI glue driver" if EMBEDDED
+	depends on USB_PCI
+	depends on NOP_USB_XCEIV
+	default USB_CHIPIDEA
+
+config USB_CHIPIDEA_MSM
+	tristate "Enable MSM hsusb glue driver" if EMBEDDED
+	default USB_CHIPIDEA
+
+config USB_CHIPIDEA_IMX
+	tristate "Enable i.MX USB glue driver" if EMBEDDED
+	depends on OF
+	default USB_CHIPIDEA
+
+config USB_CHIPIDEA_GENERIC
+	tristate "Enable generic USB2 glue driver" if EMBEDDED
+	default USB_CHIPIDEA
+
+config USB_CHIPIDEA_TEGRA
+	tristate "Enable Tegra UDC glue driver" if EMBEDDED
+	depends on OF
+	depends on USB_CHIPIDEA_UDC
+	default USB_CHIPIDEA
+
 endif
diff --git a/drivers/usb/chipidea/Makefile b/drivers/usb/chipidea/Makefile
index 985663ba6e68..fae779a23866 100644
--- a/drivers/usb/chipidea/Makefile
+++ b/drivers/usb/chipidea/Makefile
@@ -8,10 +8,8 @@ ci_hdrc-$(CONFIG_USB_OTG_FSM)		+= otg_fsm.o
 
 # Glue/Bridge layers go here
 
-obj-$(CONFIG_USB_CHIPIDEA)	+= ci_hdrc_usb2.o
-obj-$(CONFIG_USB_CHIPIDEA)	+= ci_hdrc_msm.o
-
-obj-$(CONFIG_USB_CHIPIDEA_PCI)	+= ci_hdrc_pci.o
-
-obj-$(CONFIG_USB_CHIPIDEA_OF)	+= usbmisc_imx.o ci_hdrc_imx.o
-obj-$(CONFIG_USB_CHIPIDEA_OF)	+= ci_hdrc_tegra.o
+obj-$(CONFIG_USB_CHIPIDEA_GENERIC)	+= ci_hdrc_usb2.o
+obj-$(CONFIG_USB_CHIPIDEA_MSM)		+= ci_hdrc_msm.o
+obj-$(CONFIG_USB_CHIPIDEA_PCI)		+= ci_hdrc_pci.o
+obj-$(CONFIG_USB_CHIPIDEA_IMX)		+= ci_hdrc_imx.o usbmisc_imx.o
+obj-$(CONFIG_USB_CHIPIDEA_TEGRA)	+= ci_hdrc_tegra.o
-- 
2.20.1


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

* Re: [PATCH 5/5] usb: chipidea: allow disabling glue drivers if EMBEDDED
  2020-04-04  0:00 ` [PATCH 5/5] usb: chipidea: allow disabling glue drivers if EMBEDDED Michał Mirosław
@ 2020-04-07  3:12   ` Peter Chen
  2020-04-07 20:00     ` Michał Mirosław
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Chen @ 2020-04-07  3:12 UTC (permalink / raw)
  To: Michał Mirosław; +Cc: Greg Kroah-Hartman, linux-kernel, linux-usb

On 20-04-04 02:00:06, Michał Mirosław wrote:
> Allow to cut down on driver size for embedded config.
> 
> Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> ---
>  drivers/usb/chipidea/Kconfig  | 37 ++++++++++++++++++++++++-----------
>  drivers/usb/chipidea/Makefile | 12 +++++-------
>  2 files changed, 31 insertions(+), 18 deletions(-)
> 
> diff --git a/drivers/usb/chipidea/Kconfig b/drivers/usb/chipidea/Kconfig
> index d53db520e209..8bafcfc6080d 100644
> --- a/drivers/usb/chipidea/Kconfig
> +++ b/drivers/usb/chipidea/Kconfig
> @@ -18,17 +18,6 @@ config USB_CHIPIDEA
>  
>  if USB_CHIPIDEA
>  
> -config USB_CHIPIDEA_OF
> -	tristate
> -	depends on OF
> -	default USB_CHIPIDEA
> -
> -config USB_CHIPIDEA_PCI
> -	tristate
> -	depends on USB_PCI
> -	depends on NOP_USB_XCEIV
> -	default USB_CHIPIDEA
> -
>  config USB_CHIPIDEA_UDC
>  	bool "ChipIdea device controller"
>  	depends on USB_GADGET
> @@ -43,4 +32,30 @@ config USB_CHIPIDEA_HOST
>  	help
>  	  Say Y here to enable host controller functionality of the
>  	  ChipIdea driver.
> +
> +config USB_CHIPIDEA_PCI
> +	tristate "Enable PCI glue driver" if EMBEDDED

Why depends on EMBEDDED for this driver? Not everyone needs this
configuration.

Peter
> +	depends on USB_PCI
> +	depends on NOP_USB_XCEIV
> +	default USB_CHIPIDEA
> +
> +config USB_CHIPIDEA_MSM
> +	tristate "Enable MSM hsusb glue driver" if EMBEDDED
> +	default USB_CHIPIDEA
> +
> +config USB_CHIPIDEA_IMX
> +	tristate "Enable i.MX USB glue driver" if EMBEDDED
> +	depends on OF
> +	default USB_CHIPIDEA
> +
> +config USB_CHIPIDEA_GENERIC
> +	tristate "Enable generic USB2 glue driver" if EMBEDDED
> +	default USB_CHIPIDEA
> +
> +config USB_CHIPIDEA_TEGRA
> +	tristate "Enable Tegra UDC glue driver" if EMBEDDED
> +	depends on OF
> +	depends on USB_CHIPIDEA_UDC
> +	default USB_CHIPIDEA
> +
>  endif
> diff --git a/drivers/usb/chipidea/Makefile b/drivers/usb/chipidea/Makefile
> index 985663ba6e68..fae779a23866 100644
> --- a/drivers/usb/chipidea/Makefile
> +++ b/drivers/usb/chipidea/Makefile
> @@ -8,10 +8,8 @@ ci_hdrc-$(CONFIG_USB_OTG_FSM)		+= otg_fsm.o
>  
>  # Glue/Bridge layers go here
>  
> -obj-$(CONFIG_USB_CHIPIDEA)	+= ci_hdrc_usb2.o
> -obj-$(CONFIG_USB_CHIPIDEA)	+= ci_hdrc_msm.o
> -
> -obj-$(CONFIG_USB_CHIPIDEA_PCI)	+= ci_hdrc_pci.o
> -
> -obj-$(CONFIG_USB_CHIPIDEA_OF)	+= usbmisc_imx.o ci_hdrc_imx.o
> -obj-$(CONFIG_USB_CHIPIDEA_OF)	+= ci_hdrc_tegra.o
> +obj-$(CONFIG_USB_CHIPIDEA_GENERIC)	+= ci_hdrc_usb2.o
> +obj-$(CONFIG_USB_CHIPIDEA_MSM)		+= ci_hdrc_msm.o
> +obj-$(CONFIG_USB_CHIPIDEA_PCI)		+= ci_hdrc_pci.o
> +obj-$(CONFIG_USB_CHIPIDEA_IMX)		+= ci_hdrc_imx.o usbmisc_imx.o
> +obj-$(CONFIG_USB_CHIPIDEA_TEGRA)	+= ci_hdrc_tegra.o
> -- 
> 2.20.1
> 

-- 

Thanks,
Peter Chen

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

* Re: [PATCH 5/5] usb: chipidea: allow disabling glue drivers if EMBEDDED
  2020-04-07  3:12   ` Peter Chen
@ 2020-04-07 20:00     ` Michał Mirosław
  2020-04-08  1:41       ` Peter Chen
  0 siblings, 1 reply; 8+ messages in thread
From: Michał Mirosław @ 2020-04-07 20:00 UTC (permalink / raw)
  To: Peter Chen; +Cc: Greg Kroah-Hartman, linux-kernel, linux-usb

On Tue, Apr 07, 2020 at 03:12:36AM +0000, Peter Chen wrote:
> On 20-04-04 02:00:06, Michał Mirosław wrote:
> > Allow to cut down on driver size for embedded config.
> > 
> > Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> > ---
> >  drivers/usb/chipidea/Kconfig  | 37 ++++++++++++++++++++++++-----------
> >  drivers/usb/chipidea/Makefile | 12 +++++-------
> >  2 files changed, 31 insertions(+), 18 deletions(-)
> > 
> > diff --git a/drivers/usb/chipidea/Kconfig b/drivers/usb/chipidea/Kconfig
> > index d53db520e209..8bafcfc6080d 100644
> > --- a/drivers/usb/chipidea/Kconfig
> > +++ b/drivers/usb/chipidea/Kconfig
> > @@ -18,17 +18,6 @@ config USB_CHIPIDEA
> >  
> >  if USB_CHIPIDEA
> >  
> > -config USB_CHIPIDEA_OF
> > -	tristate
> > -	depends on OF
> > -	default USB_CHIPIDEA
> > -
> > -config USB_CHIPIDEA_PCI
> > -	tristate
> > -	depends on USB_PCI
> > -	depends on NOP_USB_XCEIV
> > -	default USB_CHIPIDEA
> > -
> >  config USB_CHIPIDEA_UDC
> >  	bool "ChipIdea device controller"
> >  	depends on USB_GADGET
> > @@ -43,4 +32,30 @@ config USB_CHIPIDEA_HOST
> >  	help
> >  	  Say Y here to enable host controller functionality of the
> >  	  ChipIdea driver.
> > +
> > +config USB_CHIPIDEA_PCI
> > +	tristate "Enable PCI glue driver" if EMBEDDED
[...]
> Why depends on EMBEDDED for this driver? Not everyone needs this
> configuration.

This does not make the driver depend on EMBEDDED, only the prompts are.
By default (without CONFIG_EMBEDDED) you will have all glue layers built
if you enable the driver. I can remove the 'if EMBEDDED', but
I suppose those options are only relevant for people building for
resource-constrained systems, so would have EMBEDDED enabled anyway.

Best Regards,
Michał Mirosław

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

* Re: [PATCH 5/5] usb: chipidea: allow disabling glue drivers if EMBEDDED
  2020-04-07 20:00     ` Michał Mirosław
@ 2020-04-08  1:41       ` Peter Chen
  0 siblings, 0 replies; 8+ messages in thread
From: Peter Chen @ 2020-04-08  1:41 UTC (permalink / raw)
  To: Michał Mirosław; +Cc: Greg Kroah-Hartman, linux-kernel, linux-usb

On 20-04-07 22:00:37, Michał Mirosław wrote:
> On Tue, Apr 07, 2020 at 03:12:36AM +0000, Peter Chen wrote:
> > On 20-04-04 02:00:06, Michał Mirosław wrote:
> > > Allow to cut down on driver size for embedded config.
> > > 
> > > Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> > > ---
> > >  drivers/usb/chipidea/Kconfig  | 37 ++++++++++++++++++++++++-----------
> > >  drivers/usb/chipidea/Makefile | 12 +++++-------
> > >  2 files changed, 31 insertions(+), 18 deletions(-)
> > > 
> > > diff --git a/drivers/usb/chipidea/Kconfig b/drivers/usb/chipidea/Kconfig
> > > index d53db520e209..8bafcfc6080d 100644
> > > --- a/drivers/usb/chipidea/Kconfig
> > > +++ b/drivers/usb/chipidea/Kconfig
> > > @@ -18,17 +18,6 @@ config USB_CHIPIDEA
> > >  
> > >  if USB_CHIPIDEA
> > >  
> > > -config USB_CHIPIDEA_OF
> > > -	tristate
> > > -	depends on OF
> > > -	default USB_CHIPIDEA
> > > -
> > > -config USB_CHIPIDEA_PCI
> > > -	tristate
> > > -	depends on USB_PCI
> > > -	depends on NOP_USB_XCEIV
> > > -	default USB_CHIPIDEA
> > > -
> > >  config USB_CHIPIDEA_UDC
> > >  	bool "ChipIdea device controller"
> > >  	depends on USB_GADGET
> > > @@ -43,4 +32,30 @@ config USB_CHIPIDEA_HOST
> > >  	help
> > >  	  Say Y here to enable host controller functionality of the
> > >  	  ChipIdea driver.
> > > +
> > > +config USB_CHIPIDEA_PCI
> > > +	tristate "Enable PCI glue driver" if EMBEDDED
> [...]
> > Why depends on EMBEDDED for this driver? Not everyone needs this
> > configuration.
> 
> This does not make the driver depend on EMBEDDED, only the prompts are.
> By default (without CONFIG_EMBEDDED) you will have all glue layers built
> if you enable the driver. I can remove the 'if EMBEDDED', but
> I suppose those options are only relevant for people building for
> resource-constrained systems, so would have EMBEDDED enabled anyway.
> 

Make sense. I applied this series, thanks.

-- 

Thanks,
Peter Chen

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

end of thread, other threads:[~2020-04-08  1:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-03 23:59 [PATCH 1/5] usb: chipidea: usb2: constify zynq_pdata Michał Mirosław
2020-04-04  0:00 ` [PATCH 3/5] usb: chipidea: usb2: make clock optional Michał Mirosław
2020-04-04  0:00 ` [PATCH 2/5] usb: chipidea: usb2: fix formatting Michał Mirosław
2020-04-04  0:00 ` [PATCH 4/5] usb: chipidea: usb2: absorb zevio glue driver Michał Mirosław
2020-04-04  0:00 ` [PATCH 5/5] usb: chipidea: allow disabling glue drivers if EMBEDDED Michał Mirosław
2020-04-07  3:12   ` Peter Chen
2020-04-07 20:00     ` Michał Mirosław
2020-04-08  1:41       ` Peter Chen

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