All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Jun Li <jun.li@nxp.com>
Cc: "myungjoo.ham@samsung.com" <myungjoo.ham@samsung.com>,
	"cw00.choi@samsung.com" <cw00.choi@samsung.com>,
	"linux-kernel@vger.kernel.org" <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
Date: Tue, 19 Apr 2022 10:29:57 +0200	[thread overview]
Message-ID: <3dafc432-849b-0a78-f3dd-954d88c74a61@linaro.org> (raw)
In-Reply-To: <VI1PR04MB43330369E23F47E26248853989F29@VI1PR04MB4333.eurprd04.prod.outlook.com>

On 19/04/2022 10:23, Jun Li wrote:
> 
> 
>> -----Original Message-----
>> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> Sent: Tuesday, April 19, 2022 3:57 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 Tue, 19 Apr 2022 at 09:53, Jun Li <jun.li@nxp.com> wrote:
>>>>>> @@ -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.
>>
>> What build problem exactly? Aren't there stubs for !USB_ROLE_SWITCH case?
> 
> Mostly cases USB_ROLE_SWITCH is enabled, but I cannot 100% ensure
> that, at least I can via make menuconfig change by removing some
> controllers drivers to create a config to generate a build break:
> 
> /opt/fsl-imx-internal-xwayland/5.15-honister/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-ld: drivers/extcon/extcon-ptn5150.o: in function `ptn5150_work_sync_and_put':
> extcon-ptn5150.c:(.text+0x20): undefined reference to `usb_role_switch_put'

This is some old kernel - v5.15. Please test your changes on mainline. I
don't see such issue can happen on a recent kernel - there is an EXPORT
and a stub. Maybe your driver misses proper headers?

Best regards,
Krzysztof

  reply	other threads:[~2022-04-19  8:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20220406131913epcas1p485cd66f0f208031dc93579158e95be18@epcas1p4.samsung.com>
2022-04-06  9:42 ` [PATCH] extcon: ptn5150: add usb role class support Li Jun
2022-04-06 10:15   ` Krzysztof Kozlowski
2022-04-06 11:48     ` Jun Li
2022-04-19  7:53       ` Jun Li
2022-04-19  7:56         ` Krzysztof Kozlowski
2022-04-19  8:23           ` Jun Li
2022-04-19  8:29             ` Krzysztof Kozlowski [this message]
2022-04-19  8:51               ` Jun Li
2022-04-19  9:12                 ` Krzysztof Kozlowski
2022-04-19  9:52                   ` Krzysztof Kozlowski
2022-04-19 10:00                     ` Jun Li
2022-04-06 18:53   ` kernel test robot
2022-04-07  2:17   ` Chanwoo Choi
2022-04-19  7:48     ` Jun Li

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=3dafc432-849b-0a78-f3dd-954d88c74a61@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=cw00.choi@samsung.com \
    --cc=frank.li@nxp.com \
    --cc=jun.li@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=xu.yang_2@nxp.com \
    /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.