diff mbox

[U-Boot,07/12] usb: USB_KEYBOARD move to usb Kconfig

Message ID 1437554735-11728-7-git-send-email-contact@paulk.fr
State Superseded
Delegated to: Marek Vasut
Headers show

Commit Message

Paul Kocialkowski July 22, 2015, 8:45 a.m. UTC
The USB_KEYBOARD Kconfig is not specific to sunxi, so we can move it to the
common USB Kconfig.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
---
 board/sunxi/Kconfig | 5 -----
 drivers/usb/Kconfig | 6 ++++++
 2 files changed, 6 insertions(+), 5 deletions(-)

Comments

Hans de Goede July 22, 2015, 9:22 a.m. UTC | #1
Hi,

On 22-07-15 10:45, Paul Kocialkowski wrote:
> The USB_KEYBOARD Kconfig is not specific to sunxi, so we can move it to the
> common USB Kconfig.
>
> Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
> ---
>   board/sunxi/Kconfig | 5 -----
>   drivers/usb/Kconfig | 6 ++++++
>   2 files changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
> index 9c25d49..66d2c4e 100644
> --- a/board/sunxi/Kconfig
> +++ b/board/sunxi/Kconfig
> @@ -531,13 +531,8 @@ config VIDEO_LCD_TL059WV5C0
>
>   endchoice
>
> -
>   config USB_KEYBOARD
> -	boolean "Enable USB keyboard support"
>   	default y
> -	---help---
> -	Say Y here to add support for using a USB keyboard (typically used
> -	in combination with a graphical console).
>
>   config GMAC_TX_DELAY
>   	int "GMAC Transmit Clock Delay Chain"

This leaves with just:

config USB_KEYBOARD
    	default y

And we've just gone to a whole bunch of removals of Kconfig
code like this because it breaks "make savedefconfig" when
used with non sunxi boards (in this case).

> diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig
> index d602e44..ab2a6a1 100644
> --- a/drivers/usb/Kconfig
> +++ b/drivers/usb/Kconfig
> @@ -66,4 +66,10 @@ config USB_STORAGE
>   	  Say Y here if you want to connect USB mass storage devices to your
>   	  board's USB port.
>
> +config USB_KEYBOARD
> +	boolean "Enable USB keyboard support"
> +	---help---
> +	  Say Y here to add support for using a USB keyboard (typically used
> +	  in combination with a graphical console).
> +
>   endif

So we need to set the default here, how about we add a
CONFIG_USB_HAS_HCD hidden bool option, and then select that from
CONFIG_USB_EHCI, CONFIG_USB_MUSB_HOST, etc, and then here do:

	default y if CONFIG_USB_HAS_HCD

?

Regards,

Hans
Paul Kocialkowski July 24, 2015, 5:18 p.m. UTC | #2
Le mercredi 22 juillet 2015 à 11:22 +0200, Hans de Goede a écrit :
> Hi,
> 
> On 22-07-15 10:45, Paul Kocialkowski wrote:
> > The USB_KEYBOARD Kconfig is not specific to sunxi, so we can move it to the
> > common USB Kconfig.
> >
> > Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
> > ---
> >   board/sunxi/Kconfig | 5 -----
> >   drivers/usb/Kconfig | 6 ++++++
> >   2 files changed, 6 insertions(+), 5 deletions(-)
> >
> > diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
> > index 9c25d49..66d2c4e 100644
> > --- a/board/sunxi/Kconfig
> > +++ b/board/sunxi/Kconfig
> > @@ -531,13 +531,8 @@ config VIDEO_LCD_TL059WV5C0
> >
> >   endchoice
> >
> > -
> >   config USB_KEYBOARD
> > -	boolean "Enable USB keyboard support"
> >   	default y
> > -	---help---
> > -	Say Y here to add support for using a USB keyboard (typically used
> > -	in combination with a graphical console).
> >
> >   config GMAC_TX_DELAY
> >   	int "GMAC Transmit Clock Delay Chain"
> 
> This leaves with just:
> 
> config USB_KEYBOARD
>     	default y
> 
> And we've just gone to a whole bunch of removals of Kconfig
> code like this because it breaks "make savedefconfig" when
> used with non sunxi boards (in this case).

Okay, I hadn't followed those developments. My mistake.

> > diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig
> > index d602e44..ab2a6a1 100644
> > --- a/drivers/usb/Kconfig
> > +++ b/drivers/usb/Kconfig
> > @@ -66,4 +66,10 @@ config USB_STORAGE
> >   	  Say Y here if you want to connect USB mass storage devices to your
> >   	  board's USB port.
> >
> > +config USB_KEYBOARD
> > +	boolean "Enable USB keyboard support"
> > +	---help---
> > +	  Say Y here to add support for using a USB keyboard (typically used
> > +	  in combination with a graphical console).
> > +
> >   endif
> 
> So we need to set the default here, how about we add a
> CONFIG_USB_HAS_HCD hidden bool option, and then select that from
> CONFIG_USB_EHCI, CONFIG_USB_MUSB_HOST, etc, and then here do:
> 
> 	default y if CONFIG_USB_HAS_HCD

This would work. I'm not sure it is expected for Kconfig options to be
"phony", but if you think it's fine, I'll go with it.

> Regards,
> 
> Hans
diff mbox

Patch

diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index 9c25d49..66d2c4e 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -531,13 +531,8 @@  config VIDEO_LCD_TL059WV5C0
 
 endchoice
 
-
 config USB_KEYBOARD
-	boolean "Enable USB keyboard support"
 	default y
-	---help---
-	Say Y here to add support for using a USB keyboard (typically used
-	in combination with a graphical console).
 
 config GMAC_TX_DELAY
 	int "GMAC Transmit Clock Delay Chain"
diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig
index d602e44..ab2a6a1 100644
--- a/drivers/usb/Kconfig
+++ b/drivers/usb/Kconfig
@@ -66,4 +66,10 @@  config USB_STORAGE
 	  Say Y here if you want to connect USB mass storage devices to your
 	  board's USB port.
 
+config USB_KEYBOARD
+	boolean "Enable USB keyboard support"
+	---help---
+	  Say Y here to add support for using a USB keyboard (typically used
+	  in combination with a graphical console).
+
 endif