All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: linux-usb@vger.kernel.org, gregkh@linuxfoundation.org
Subject: Re: [PATCH v2 1/2] usb: typec: Ensure USB_ROLE_SWITCH is selected for tps6598x
Date: Wed, 20 May 2020 16:17:28 +0300	[thread overview]
Message-ID: <20200520131728.GJ1298122@kuha.fi.intel.com> (raw)
In-Reply-To: <20200520123312.320281-2-bryan.odonoghue@linaro.org>

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@linaro.org>
> ---
>  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

  reply	other threads:[~2020-05-20 13:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-20 12:33 [PATCH v2 0/2] Fix role-switch selection in type-c drivers Bryan O'Donoghue
2020-05-20 12:33 ` [PATCH v2 1/2] usb: typec: Ensure USB_ROLE_SWITCH is selected for tps6598x Bryan O'Donoghue
2020-05-20 13:17   ` Heikki Krogerus [this message]
2020-05-20 13:24     ` Bryan O'Donoghue
2020-05-20 13:32       ` Bryan O'Donoghue
2020-05-20 13:39         ` Heikki Krogerus
2020-05-20 15:31           ` Bryan O'Donoghue
2020-05-20 12:33 ` [PATCH v2 2/2] usb: typec: Ensure USB_ROLE_SWITCH is selected for hd3ss3220 Bryan O'Donoghue
2020-05-20 13:13   ` Heikki Krogerus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200520131728.GJ1298122@kuha.fi.intel.com \
    --to=heikki.krogerus@linux.intel.com \
    --cc=bryan.odonoghue@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.