Re: [PATCH v2 1/2] usb: typec: Ensure USB_ROLE_SWITCH is selected for tps6598x

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 20, 2020 at 02:32:31PM +0100, Bryan O'Donoghue wrote:
> On 20/05/2020 14:24, Bryan O'Donoghue wrote:
> > On 20/05/2020 14:17, Heikki Krogerus wrote:
> > > depends on USB_ROLE_SWITCH || !USB_ROLE_SWITCH
> > 
> > Hmm.
> > 
> > That broke for me with a recursive dependency
> > 
> > but this will work
> > 
> > +       depends on REGMAP_I2C
> > +       depends on USB_ROLE_SWITCH || !USB_ROLE_SWITCH
> > 
> 
> Sorry Heikki.
> 
> If I make the above change and then do this to switch off where the USB
> controller in my build is selecting - role switch
> 
> index d53db520e209..636a5428b47e 100644
> --- a/drivers/usb/chipidea/Kconfig
> +++ b/drivers/usb/chipidea/Kconfig
> @@ -6,7 +6,6 @@ config USB_CHIPIDEA
>         select EXTCON
>         select RESET_CONTROLLER
>         select USB_ULPI_BUS
> -       select USB_ROLE_SWITCH
>         select USB_TEGRA_PHY if ARCH_TEGRA
>         help

That driver is a switch supplier. You should select the class here.

> it breaks
> 
> drivers/usb/dwc3/drd.o: In function `dwc3_usb_role_switch_get':
> /home/deckard/Development/qualcomm/qlt-kernel/drivers/usb/dwc3/drd.c:508:
> undefined reference to `usb_role_switch_get_drvdata'
> drivers/usb/dwc3/drd.o: In function `dwc3_usb_role_switch_set':
> /home/deckard/Development/qualcomm/qlt-kernel/drivers/usb/dwc3/drd.c:484:
> undefined reference to `usb_role_switch_get_drvdata'
> drivers/usb/dwc3/drd.o: In function `dwc3_setup_role_switch':
> /home/deckard/Development/qualcomm/qlt-kernel/drivers/usb/dwc3/drd.c:555:
> undefined reference to `usb_role_switch_register'
> drivers/usb/dwc3/drd.o: In function `dwc3_drd_exit':
> /home/deckard/Development/qualcomm/qlt-kernel/drivers/usb/dwc3/drd.c:628:
> undefined reference to `usb_role_switch_unregister'
> drivers/usb/chipidea/core.o: In function `ci_usb_role_switch_get':
> /home/deckard/Development/qualcomm/qlt-kernel/drivers/usb/chipidea/core.c:621:
> undefined reference to `usb_role_switch_get_drvdata'
> drivers/usb/chipidea/core.o: In function `ci_usb_role_switch_set':
> /home/deckard/Development/qualcomm/qlt-kernel/drivers/usb/chipidea/core.c:635:
> undefined reference to `usb_role_switch_get_drvdata'
> drivers/usb/chipidea/core.o: In function `ci_hdrc_remove':
> /home/deckard/Development/qualcomm/qlt-kernel/drivers/usb/chipidea/core.c:1231:
> undefined reference to `usb_role_switch_unregister'
> drivers/usb/chipidea/core.o: In function `ci_hdrc_probe':
> /home/deckard/Development/qualcomm/qlt-kernel/drivers/usb/chipidea/core.c:1210:
> undefined reference to `usb_role_switch_unregister'
> /home/deckard/Development/qualcomm/qlt-kernel/drivers/usb/chipidea/core.c:1143:
> undefined reference to `usb_role_switch_register'
> make[1]: *** [/home/deckard/Development/qualcomm/qlt-kernel/Makefile:1106:
> vmlinux] Error 1
> make[1]: Leaving directory '/home/deckard/Development/qualcomm/qlt-kernel-tools/qlt-kernel/build/square_5.x-tracking'
> 
> to do what you want to do - shouldn't we have to make all of those "select
> USB_ROLE_SWITCH" into "depends on USB_ROLE_SWITCH" ?
> 
> i.e. make all of the consumers depends on instead of selects ?

Yes, ideally.

thanks,

-- 
heikki



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux