RE: [PATCH] extcon: ptn5150: add usb role class support
From: Jun Li
Date: Tue Apr 19 2022 - 03:53:59 EST
> -----Original Message-----
> From: Jun Li
> Sent: Wednesday, April 6, 2022 7:49 PM
> To: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>;
> myungjoo.ham@xxxxxxxxxxx; cw00.choi@xxxxxxxxxxx
> Cc: linux-kernel@xxxxxxxxxxxxxxx; Frank Li <frank.li@xxxxxxx>; Xu Yang
> <xu.yang_2@xxxxxxx>
> Subject: RE: [PATCH] extcon: ptn5150: add usb role class support
>
>
>
> > -----Original Message-----
> > From: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>
> > Sent: Wednesday, April 6, 2022 6:16 PM
> > To: Jun Li <jun.li@xxxxxxx>; myungjoo.ham@xxxxxxxxxxx;
> > cw00.choi@xxxxxxxxxxx
> > Cc: linux-kernel@xxxxxxxxxxxxxxx; Frank Li <frank.li@xxxxxxx>; Xu Yang
> > <xu.yang_2@xxxxxxx>
> > Subject: Re: [PATCH] extcon: ptn5150: add usb role class support
> >
> > On 06/04/2022 11:42, Li Jun wrote:
> > > Add support of usb role class consumer to do role switch.
> >
> > Please mention also why you are doing this.
>
> Will improve in v2.
>
> >
> > >
> > > Signed-off-by: Li Jun <jun.li@xxxxxxx>
> > > ---
> > > drivers/extcon/Kconfig | 1 +
> > > drivers/extcon/extcon-ptn5150.c | 39
> > > +++++++++++++++++++++++++++++++++
> > > 2 files changed, 40 insertions(+)
> > >
> > > diff --git a/drivers/extcon/Kconfig b/drivers/extcon/Kconfig index
> > > 0d42e49105dd..9828ade787a8 100644
> > > --- a/drivers/extcon/Kconfig
> > > +++ b/drivers/extcon/Kconfig
> > > @@ -132,6 +132,7 @@ config EXTCON_PTN5150
> > > tristate "NXP PTN5150 CC LOGIC USB EXTCON support"
> > > depends on I2C && (GPIOLIB || COMPILE_TEST)
> > > select REGMAP_I2C
> > > + select USB_ROLE_SWITCH
> >
> > You do not need to select it. Driver will work without role switch,
> > won't it? If it works, then probably it should be just imply.
>
> Okay, usb role class provider should enable this for me, will drop it.
A second check on this and I think I still need this, there
maybe some usb controller driver without usb role switch
+ ptn5150 via extcon, so no need USB_ROLE_SWITCH, I need
select it to avoid build break.
Li Jun