lkml.org 
[lkml]   [2022]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] extcon: ptn5150: add usb role class support
Date


> -----Original Message-----
> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Sent: Tuesday, April 19, 2022 5:52 PM
> To: Jun Li <jun.li@nxp.com>
> Cc: myungjoo.ham@samsung.com; cw00.choi@samsung.com;
> linux-kernel@vger.kernel.org; Frank Li <frank.li@nxp.com>; Xu Yang
> <xu.yang_2@nxp.com>
> Subject: Re: [PATCH] extcon: ptn5150: add usb role class support
>
> On 19/04/2022 11:12, Krzysztof Kozlowski wrote:
> > On 19/04/2022 10:51, Jun Li wrote:
> >> My test config is making USB_ROLE_SWITCH=m, but PTN5150=y
> >>
> >> So with below header file:
> >>
> >> #if IS_ENABLED(CONFIG_USB_ROLE_SWITCH)
> >> void usb_role_switch_put(struct usb_role_switch *sw); #else static
> >> inline void usb_role_switch_put(struct usb_role_switch *sw) { }
> >> #endif
> >>
> >> Will have link error.
> >
> > Yep, true. I cannot remember the solution for that... With the select
> > you cannot disable USB_ROLE_SWITCH. With "depends on X || depends on
> > !X", one still cannot disable USB_ROLE_SWITCH. However this is a
> > common problem and I am pretty sure people were working on this. :)
>
> Use:
> depends on USB_ROLE_SWITCH || !USB_ROLE_SWITCH'
>
> this should solve the problem.

This works, thanks for the review and suggestion, I will send out v3.

Li Jun
>
> Best regards,
> Krzysztof
\
 
 \ /
  Last update: 2022-04-19 12:02    [W:0.542 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site