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 01:33:11PM +0100, Bryan O'Donoghue wrote:
> When I switched on USB role switching for the tps6598x I completely forgot
> to add the Kconfig dependency.
> 
> Ensure USB_ROLE_SWITCH is selected to prevent the typs6598x driver being
> compiled in but the role-switch driver being compiled as a module, leading
> to link error.
> 
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@xxxxxxxxxx>
> ---
>  drivers/usb/typec/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/typec/Kconfig b/drivers/usb/typec/Kconfig
> index b4f2aac7ae8a..a6cdf4ec0be6 100644
> --- a/drivers/usb/typec/Kconfig
> +++ b/drivers/usb/typec/Kconfig
> @@ -64,6 +64,7 @@ config TYPEC_HD3SS3220
>  config TYPEC_TPS6598X
>  	tristate "TI TPS6598x USB Power Delivery controller driver"
>  	depends on I2C
> +	select USB_ROLE_SWITCH
>  	select REGMAP_I2C
>  	help
>  	  Say Y or M here if your system has TI TPS65982 or TPS65983 USB Power

The same here. You can depend on the class, but you do not select it.
Note that we need to be able to handle this situation:

CONFIG_TYPEC_TPS6598X=y
CONFIG_USB_ROLE_SWITCH=m

and this covers that case:

        depends on USB_ROLE_SWITCH || !USB_ROLE_SWITCH

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