Re: [PATCH] misc: Kconfig: add a new dependency for HISI_HIKEY_USB

2020-10-07 Thread Mauro Carvalho Chehab
Em Wed, 7 Oct 2020 19:52:56 -0700
Randy Dunlap  escreveu:

> On 10/7/20 7:18 PM, Nathan Chancellor wrote:
> > On Wed, Oct 07, 2020 at 07:09:54AM +0200, Mauro Carvalho Chehab wrote:  
> >> As warned by Randy:
> >>
> >>on x86_64:
> >>CONFIG_USB_ROLE_SWITCH=m
> >>and HISI_HIKEY_USB=y.
> >>
> >>ld: drivers/misc/hisi_hikey_usb.o: in function `hisi_hikey_usb_remove':
> >>hisi_hikey_usb.c:(.text+0x61): undefined reference to 
> >> `usb_role_switch_unregister'
> >>ld: hisi_hikey_usb.c:(.text+0xa4): undefined reference to 
> >> `usb_role_switch_put'
> >>ld: drivers/misc/hisi_hikey_usb.o: in function 
> >> `hub_usb_role_switch_set':
> >>hisi_hikey_usb.c:(.text+0xd3): undefined reference to 
> >> `usb_role_switch_get_drvdata'
> >>ld: drivers/misc/hisi_hikey_usb.o: in function `relay_set_role_switch':
> >>hisi_hikey_usb.c:(.text+0x54d): undefined reference to 
> >> `usb_role_switch_set_role'
> >>ld: drivers/misc/hisi_hikey_usb.o: in function `hisi_hikey_usb_probe':
> >>hisi_hikey_usb.c:(.text+0x8a5): undefined reference to 
> >> `usb_role_switch_get'
> >>ld: hisi_hikey_usb.c:(.text+0xa08): undefined reference to 
> >> `usb_role_switch_register'
> >>ld: hisi_hikey_usb.c:(.text+0xa6e): undefined reference to 
> >> `usb_role_switch_put'
> >>
> >> Make it dependent on CONFIG_USB_ROLE_SWITCH.
> >>
> >> Reported-by: Randy Dunlap 
> >> Signed-off-by: Mauro Carvalho Chehab 
> >> ---
> >>  drivers/misc/Kconfig | 1 +
> >>  1 file changed, 1 insertion(+)
> >>
> >> diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
> >> index e19e1dcceb41..7cee2b72c09e 100644
> >> --- a/drivers/misc/Kconfig
> >> +++ b/drivers/misc/Kconfig
> >> @@ -459,6 +459,7 @@ config PVPANIC
> >>  config HISI_HIKEY_USB
> >>tristate "USB GPIO Hub on HiSilicon Hikey 960/970 Platform"
> >>depends on (OF && GPIOLIB) || COMPILE_TEST
> >> +  depends on CONFIG_USB_ROLE_SWITCH  
> > 
> > Shouldn't this be
> > 
> > depends on USB_ROLE_SWITCH  
> 
> Obviously. Thanks for catching that.
> 
> > ? Now it will never be selectable.

Thanks for catching this one! Sent a v2 fixing this.
(and double-checked that the driver was built after the
changes).

Thanks,
Mauro


Re: [PATCH] misc: Kconfig: add a new dependency for HISI_HIKEY_USB

2020-10-07 Thread Greg Kroah-Hartman
On Wed, Oct 07, 2020 at 07:18:02PM -0700, Nathan Chancellor wrote:
> On Wed, Oct 07, 2020 at 07:09:54AM +0200, Mauro Carvalho Chehab wrote:
> > As warned by Randy:
> > 
> > on x86_64:
> > CONFIG_USB_ROLE_SWITCH=m
> > and HISI_HIKEY_USB=y.
> > 
> > ld: drivers/misc/hisi_hikey_usb.o: in function `hisi_hikey_usb_remove':
> > hisi_hikey_usb.c:(.text+0x61): undefined reference to 
> > `usb_role_switch_unregister'
> > ld: hisi_hikey_usb.c:(.text+0xa4): undefined reference to 
> > `usb_role_switch_put'
> > ld: drivers/misc/hisi_hikey_usb.o: in function 
> > `hub_usb_role_switch_set':
> > hisi_hikey_usb.c:(.text+0xd3): undefined reference to 
> > `usb_role_switch_get_drvdata'
> > ld: drivers/misc/hisi_hikey_usb.o: in function `relay_set_role_switch':
> > hisi_hikey_usb.c:(.text+0x54d): undefined reference to 
> > `usb_role_switch_set_role'
> > ld: drivers/misc/hisi_hikey_usb.o: in function `hisi_hikey_usb_probe':
> > hisi_hikey_usb.c:(.text+0x8a5): undefined reference to 
> > `usb_role_switch_get'
> > ld: hisi_hikey_usb.c:(.text+0xa08): undefined reference to 
> > `usb_role_switch_register'
> > ld: hisi_hikey_usb.c:(.text+0xa6e): undefined reference to 
> > `usb_role_switch_put'
> > 
> > Make it dependent on CONFIG_USB_ROLE_SWITCH.
> > 
> > Reported-by: Randy Dunlap 
> > Signed-off-by: Mauro Carvalho Chehab 
> > ---
> >  drivers/misc/Kconfig | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
> > index e19e1dcceb41..7cee2b72c09e 100644
> > --- a/drivers/misc/Kconfig
> > +++ b/drivers/misc/Kconfig
> > @@ -459,6 +459,7 @@ config PVPANIC
> >  config HISI_HIKEY_USB
> > tristate "USB GPIO Hub on HiSilicon Hikey 960/970 Platform"
> > depends on (OF && GPIOLIB) || COMPILE_TEST
> > +   depends on CONFIG_USB_ROLE_SWITCH
> 
> Shouldn't this be
> 
> depends on USB_ROLE_SWITCH
> 
> ? Now it will never be selectable.

{sigh}

Yes, that is correct.

Mauro, can you send a fix-up patch for this, as your original is now in
my tree.

thanks,

greg k-h


Re: [PATCH] misc: Kconfig: add a new dependency for HISI_HIKEY_USB

2020-10-07 Thread Randy Dunlap
On 10/7/20 7:18 PM, Nathan Chancellor wrote:
> On Wed, Oct 07, 2020 at 07:09:54AM +0200, Mauro Carvalho Chehab wrote:
>> As warned by Randy:
>>
>>  on x86_64:
>>  CONFIG_USB_ROLE_SWITCH=m
>>  and HISI_HIKEY_USB=y.
>>
>>  ld: drivers/misc/hisi_hikey_usb.o: in function `hisi_hikey_usb_remove':
>>  hisi_hikey_usb.c:(.text+0x61): undefined reference to 
>> `usb_role_switch_unregister'
>>  ld: hisi_hikey_usb.c:(.text+0xa4): undefined reference to 
>> `usb_role_switch_put'
>>  ld: drivers/misc/hisi_hikey_usb.o: in function 
>> `hub_usb_role_switch_set':
>>  hisi_hikey_usb.c:(.text+0xd3): undefined reference to 
>> `usb_role_switch_get_drvdata'
>>  ld: drivers/misc/hisi_hikey_usb.o: in function `relay_set_role_switch':
>>  hisi_hikey_usb.c:(.text+0x54d): undefined reference to 
>> `usb_role_switch_set_role'
>>  ld: drivers/misc/hisi_hikey_usb.o: in function `hisi_hikey_usb_probe':
>>  hisi_hikey_usb.c:(.text+0x8a5): undefined reference to 
>> `usb_role_switch_get'
>>  ld: hisi_hikey_usb.c:(.text+0xa08): undefined reference to 
>> `usb_role_switch_register'
>>  ld: hisi_hikey_usb.c:(.text+0xa6e): undefined reference to 
>> `usb_role_switch_put'
>>
>> Make it dependent on CONFIG_USB_ROLE_SWITCH.
>>
>> Reported-by: Randy Dunlap 
>> Signed-off-by: Mauro Carvalho Chehab 
>> ---
>>  drivers/misc/Kconfig | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
>> index e19e1dcceb41..7cee2b72c09e 100644
>> --- a/drivers/misc/Kconfig
>> +++ b/drivers/misc/Kconfig
>> @@ -459,6 +459,7 @@ config PVPANIC
>>  config HISI_HIKEY_USB
>>  tristate "USB GPIO Hub on HiSilicon Hikey 960/970 Platform"
>>  depends on (OF && GPIOLIB) || COMPILE_TEST
>> +depends on CONFIG_USB_ROLE_SWITCH
> 
> Shouldn't this be
> 
> depends on USB_ROLE_SWITCH

Obviously. Thanks for catching that.

> ? Now it will never be selectable.
>
>>  help
>>If you say yes here this adds support for the on-board USB GPIO hub
>>found on HiKey 960/970 boards, which is necessary to support
>> -- 
>> 2.26.2
>>
> 
> Cheers,
> Nathan
> 


-- 
~Randy



Re: [PATCH] misc: Kconfig: add a new dependency for HISI_HIKEY_USB

2020-10-07 Thread Nathan Chancellor
On Wed, Oct 07, 2020 at 07:09:54AM +0200, Mauro Carvalho Chehab wrote:
> As warned by Randy:
> 
>   on x86_64:
>   CONFIG_USB_ROLE_SWITCH=m
>   and HISI_HIKEY_USB=y.
> 
>   ld: drivers/misc/hisi_hikey_usb.o: in function `hisi_hikey_usb_remove':
>   hisi_hikey_usb.c:(.text+0x61): undefined reference to 
> `usb_role_switch_unregister'
>   ld: hisi_hikey_usb.c:(.text+0xa4): undefined reference to 
> `usb_role_switch_put'
>   ld: drivers/misc/hisi_hikey_usb.o: in function 
> `hub_usb_role_switch_set':
>   hisi_hikey_usb.c:(.text+0xd3): undefined reference to 
> `usb_role_switch_get_drvdata'
>   ld: drivers/misc/hisi_hikey_usb.o: in function `relay_set_role_switch':
>   hisi_hikey_usb.c:(.text+0x54d): undefined reference to 
> `usb_role_switch_set_role'
>   ld: drivers/misc/hisi_hikey_usb.o: in function `hisi_hikey_usb_probe':
>   hisi_hikey_usb.c:(.text+0x8a5): undefined reference to 
> `usb_role_switch_get'
>   ld: hisi_hikey_usb.c:(.text+0xa08): undefined reference to 
> `usb_role_switch_register'
>   ld: hisi_hikey_usb.c:(.text+0xa6e): undefined reference to 
> `usb_role_switch_put'
> 
> Make it dependent on CONFIG_USB_ROLE_SWITCH.
> 
> Reported-by: Randy Dunlap 
> Signed-off-by: Mauro Carvalho Chehab 
> ---
>  drivers/misc/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
> index e19e1dcceb41..7cee2b72c09e 100644
> --- a/drivers/misc/Kconfig
> +++ b/drivers/misc/Kconfig
> @@ -459,6 +459,7 @@ config PVPANIC
>  config HISI_HIKEY_USB
>   tristate "USB GPIO Hub on HiSilicon Hikey 960/970 Platform"
>   depends on (OF && GPIOLIB) || COMPILE_TEST
> + depends on CONFIG_USB_ROLE_SWITCH

Shouldn't this be

depends on USB_ROLE_SWITCH

? Now it will never be selectable.

>   help
> If you say yes here this adds support for the on-board USB GPIO hub
> found on HiKey 960/970 boards, which is necessary to support
> -- 
> 2.26.2
> 

Cheers,
Nathan


Re: [PATCH] misc: Kconfig: add a new dependency for HISI_HIKEY_USB

2020-10-06 Thread Randy Dunlap
On 10/6/20 10:09 PM, Mauro Carvalho Chehab wrote:
> As warned by Randy:
> 
>   on x86_64:
>   CONFIG_USB_ROLE_SWITCH=m
>   and HISI_HIKEY_USB=y.
> 
>   ld: drivers/misc/hisi_hikey_usb.o: in function `hisi_hikey_usb_remove':
>   hisi_hikey_usb.c:(.text+0x61): undefined reference to 
> `usb_role_switch_unregister'
>   ld: hisi_hikey_usb.c:(.text+0xa4): undefined reference to 
> `usb_role_switch_put'
>   ld: drivers/misc/hisi_hikey_usb.o: in function 
> `hub_usb_role_switch_set':
>   hisi_hikey_usb.c:(.text+0xd3): undefined reference to 
> `usb_role_switch_get_drvdata'
>   ld: drivers/misc/hisi_hikey_usb.o: in function `relay_set_role_switch':
>   hisi_hikey_usb.c:(.text+0x54d): undefined reference to 
> `usb_role_switch_set_role'
>   ld: drivers/misc/hisi_hikey_usb.o: in function `hisi_hikey_usb_probe':
>   hisi_hikey_usb.c:(.text+0x8a5): undefined reference to 
> `usb_role_switch_get'
>   ld: hisi_hikey_usb.c:(.text+0xa08): undefined reference to 
> `usb_role_switch_register'
>   ld: hisi_hikey_usb.c:(.text+0xa6e): undefined reference to 
> `usb_role_switch_put'
> 
> Make it dependent on CONFIG_USB_ROLE_SWITCH.
> 
> Reported-by: Randy Dunlap 
> Signed-off-by: Mauro Carvalho Chehab 

Acked-by: Randy Dunlap  # build-tested

Thanks.

> ---
>  drivers/misc/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
> index e19e1dcceb41..7cee2b72c09e 100644
> --- a/drivers/misc/Kconfig
> +++ b/drivers/misc/Kconfig
> @@ -459,6 +459,7 @@ config PVPANIC
>  config HISI_HIKEY_USB
>   tristate "USB GPIO Hub on HiSilicon Hikey 960/970 Platform"
>   depends on (OF && GPIOLIB) || COMPILE_TEST
> + depends on CONFIG_USB_ROLE_SWITCH
>   help
> If you say yes here this adds support for the on-board USB GPIO hub
> found on HiKey 960/970 boards, which is necessary to support
> 


-- 
~Randy