2023-12-06 12:38:49

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH] usb: typec: nb7vpq904m: add CONFIG_OF dependency

From: Arnd Bergmann <[email protected]>

DRM_AUX_BRIDGE depends on CONFIG_OF, so the same dependency is needed
here to avoid a build failure:

WARNING: unmet direct dependencies detected for DRM_AUX_BRIDGE
Depends on [n]: HAS_IOMEM [=y] && DRM_BRIDGE [=y] && OF [=n]
Selected by [y]:
- TYPEC_MUX_NB7VPQ904M [=y] && USB_SUPPORT [=y] && TYPEC [=y] && I2C [=y] && (DRM [=y] || DRM [=y]=n) && DRM_BRIDGE [=y]
x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_register':
aux-bridge.c:(.text+0x13b): undefined reference to `auxiliary_device_init'
x86_64-linux-ld: aux-bridge.c:(.text+0x14d): undefined reference to `__auxiliary_device_add'
x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_drv_init':
aux-bridge.c:(.init.text+0x15): undefined reference to `__auxiliary_driver_register'
x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_drv_exit':
aux-bridge.c:(.exit.text+0x9): undefined reference to `auxiliary_driver_unregister'

Fixes: c5d296bad640 ("usb: typec: nb7vpq904m: switch to DRM_AUX_BRIDGE")
Signed-off-by: Arnd Bergmann <[email protected]>
---
drivers/usb/typec/mux/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/usb/typec/mux/Kconfig b/drivers/usb/typec/mux/Kconfig
index 5120942f309d..818624f59120 100644
--- a/drivers/usb/typec/mux/Kconfig
+++ b/drivers/usb/typec/mux/Kconfig
@@ -40,6 +40,7 @@ config TYPEC_MUX_NB7VPQ904M
tristate "On Semiconductor NB7VPQ904M Type-C redriver driver"
depends on I2C
depends on DRM || DRM=n
+ depends on OF
select DRM_AUX_BRIDGE if DRM_BRIDGE
select REGMAP_I2C
help
--
2.39.2


2023-12-06 17:22:46

by Randy Dunlap

[permalink] [raw]
Subject: Re: [PATCH] usb: typec: nb7vpq904m: add CONFIG_OF dependency



On 12/6/23 04:38, Arnd Bergmann wrote:
> From: Arnd Bergmann <[email protected]>
>
> DRM_AUX_BRIDGE depends on CONFIG_OF, so the same dependency is needed
> here to avoid a build failure:
>
> WARNING: unmet direct dependencies detected for DRM_AUX_BRIDGE
> Depends on [n]: HAS_IOMEM [=y] && DRM_BRIDGE [=y] && OF [=n]
> Selected by [y]:
> - TYPEC_MUX_NB7VPQ904M [=y] && USB_SUPPORT [=y] && TYPEC [=y] && I2C [=y] && (DRM [=y] || DRM [=y]=n) && DRM_BRIDGE [=y]
> x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_register':
> aux-bridge.c:(.text+0x13b): undefined reference to `auxiliary_device_init'
> x86_64-linux-ld: aux-bridge.c:(.text+0x14d): undefined reference to `__auxiliary_device_add'
> x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_drv_init':
> aux-bridge.c:(.init.text+0x15): undefined reference to `__auxiliary_driver_register'
> x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_drv_exit':
> aux-bridge.c:(.exit.text+0x9): undefined reference to `auxiliary_driver_unregister'
>
> Fixes: c5d296bad640 ("usb: typec: nb7vpq904m: switch to DRM_AUX_BRIDGE")
> Signed-off-by: Arnd Bergmann <[email protected]>

Acked-by: Randy Dunlap <[email protected]>
Tested-by: Randy Dunlap <[email protected]>

Thanks.

> ---
> drivers/usb/typec/mux/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/typec/mux/Kconfig b/drivers/usb/typec/mux/Kconfig
> index 5120942f309d..818624f59120 100644
> --- a/drivers/usb/typec/mux/Kconfig
> +++ b/drivers/usb/typec/mux/Kconfig
> @@ -40,6 +40,7 @@ config TYPEC_MUX_NB7VPQ904M
> tristate "On Semiconductor NB7VPQ904M Type-C redriver driver"
> depends on I2C
> depends on DRM || DRM=n
> + depends on OF
> select DRM_AUX_BRIDGE if DRM_BRIDGE
> select REGMAP_I2C
> help

--
~Randy

2023-12-07 11:54:02

by Heikki Krogerus

[permalink] [raw]
Subject: Re: [PATCH] usb: typec: nb7vpq904m: add CONFIG_OF dependency

On Wed, Dec 06, 2023 at 01:38:14PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <[email protected]>
>
> DRM_AUX_BRIDGE depends on CONFIG_OF, so the same dependency is needed
> here to avoid a build failure:
>
> WARNING: unmet direct dependencies detected for DRM_AUX_BRIDGE
> Depends on [n]: HAS_IOMEM [=y] && DRM_BRIDGE [=y] && OF [=n]
> Selected by [y]:
> - TYPEC_MUX_NB7VPQ904M [=y] && USB_SUPPORT [=y] && TYPEC [=y] && I2C [=y] && (DRM [=y] || DRM [=y]=n) && DRM_BRIDGE [=y]
> x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_register':
> aux-bridge.c:(.text+0x13b): undefined reference to `auxiliary_device_init'
> x86_64-linux-ld: aux-bridge.c:(.text+0x14d): undefined reference to `__auxiliary_device_add'
> x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_drv_init':
> aux-bridge.c:(.init.text+0x15): undefined reference to `__auxiliary_driver_register'
> x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_drv_exit':
> aux-bridge.c:(.exit.text+0x9): undefined reference to `auxiliary_driver_unregister'
>
> Fixes: c5d296bad640 ("usb: typec: nb7vpq904m: switch to DRM_AUX_BRIDGE")
> Signed-off-by: Arnd Bergmann <[email protected]>
> ---
> drivers/usb/typec/mux/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/typec/mux/Kconfig b/drivers/usb/typec/mux/Kconfig
> index 5120942f309d..818624f59120 100644
> --- a/drivers/usb/typec/mux/Kconfig
> +++ b/drivers/usb/typec/mux/Kconfig
> @@ -40,6 +40,7 @@ config TYPEC_MUX_NB7VPQ904M
> tristate "On Semiconductor NB7VPQ904M Type-C redriver driver"
> depends on I2C
> depends on DRM || DRM=n
> + depends on OF
> select DRM_AUX_BRIDGE if DRM_BRIDGE
> select REGMAP_I2C
> help

Shouldn't DRM_BRIDGE depend on OF instead?

thanks,

--
heikki

2023-12-07 11:56:08

by Dmitry Baryshkov

[permalink] [raw]
Subject: Re: [PATCH] usb: typec: nb7vpq904m: add CONFIG_OF dependency

On Thu, 7 Dec 2023 at 13:53, Heikki Krogerus
<[email protected]> wrote:
>
> On Wed, Dec 06, 2023 at 01:38:14PM +0100, Arnd Bergmann wrote:
> > From: Arnd Bergmann <[email protected]>
> >
> > DRM_AUX_BRIDGE depends on CONFIG_OF, so the same dependency is needed
> > here to avoid a build failure:
> >
> > WARNING: unmet direct dependencies detected for DRM_AUX_BRIDGE
> > Depends on [n]: HAS_IOMEM [=y] && DRM_BRIDGE [=y] && OF [=n]
> > Selected by [y]:
> > - TYPEC_MUX_NB7VPQ904M [=y] && USB_SUPPORT [=y] && TYPEC [=y] && I2C [=y] && (DRM [=y] || DRM [=y]=n) && DRM_BRIDGE [=y]
> > x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_register':
> > aux-bridge.c:(.text+0x13b): undefined reference to `auxiliary_device_init'
> > x86_64-linux-ld: aux-bridge.c:(.text+0x14d): undefined reference to `__auxiliary_device_add'
> > x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_drv_init':
> > aux-bridge.c:(.init.text+0x15): undefined reference to `__auxiliary_driver_register'
> > x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_drv_exit':
> > aux-bridge.c:(.exit.text+0x9): undefined reference to `auxiliary_driver_unregister'
> >
> > Fixes: c5d296bad640 ("usb: typec: nb7vpq904m: switch to DRM_AUX_BRIDGE")
> > Signed-off-by: Arnd Bergmann <[email protected]>
> > ---
> > drivers/usb/typec/mux/Kconfig | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/usb/typec/mux/Kconfig b/drivers/usb/typec/mux/Kconfig
> > index 5120942f309d..818624f59120 100644
> > --- a/drivers/usb/typec/mux/Kconfig
> > +++ b/drivers/usb/typec/mux/Kconfig
> > @@ -40,6 +40,7 @@ config TYPEC_MUX_NB7VPQ904M
> > tristate "On Semiconductor NB7VPQ904M Type-C redriver driver"
> > depends on I2C
> > depends on DRM || DRM=n
> > + depends on OF
> > select DRM_AUX_BRIDGE if DRM_BRIDGE
> > select REGMAP_I2C
> > help
>
> Shouldn't DRM_BRIDGE depend on OF instead?

No. DRM_AUX_BRIDGE depends on OF, DRM_BRIDGE framework doesn't.


--
With best wishes
Dmitry

2023-12-07 11:57:37

by Heikki Krogerus

[permalink] [raw]
Subject: Re: [PATCH] usb: typec: nb7vpq904m: add CONFIG_OF dependency

On Thu, Dec 07, 2023 at 01:55:06PM +0200, Dmitry Baryshkov wrote:
> On Thu, 7 Dec 2023 at 13:53, Heikki Krogerus
> <[email protected]> wrote:
> >
> > On Wed, Dec 06, 2023 at 01:38:14PM +0100, Arnd Bergmann wrote:
> > > From: Arnd Bergmann <[email protected]>
> > >
> > > DRM_AUX_BRIDGE depends on CONFIG_OF, so the same dependency is needed
> > > here to avoid a build failure:
> > >
> > > WARNING: unmet direct dependencies detected for DRM_AUX_BRIDGE
> > > Depends on [n]: HAS_IOMEM [=y] && DRM_BRIDGE [=y] && OF [=n]
> > > Selected by [y]:
> > > - TYPEC_MUX_NB7VPQ904M [=y] && USB_SUPPORT [=y] && TYPEC [=y] && I2C [=y] && (DRM [=y] || DRM [=y]=n) && DRM_BRIDGE [=y]
> > > x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_register':
> > > aux-bridge.c:(.text+0x13b): undefined reference to `auxiliary_device_init'
> > > x86_64-linux-ld: aux-bridge.c:(.text+0x14d): undefined reference to `__auxiliary_device_add'
> > > x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_drv_init':
> > > aux-bridge.c:(.init.text+0x15): undefined reference to `__auxiliary_driver_register'
> > > x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_drv_exit':
> > > aux-bridge.c:(.exit.text+0x9): undefined reference to `auxiliary_driver_unregister'
> > >
> > > Fixes: c5d296bad640 ("usb: typec: nb7vpq904m: switch to DRM_AUX_BRIDGE")
> > > Signed-off-by: Arnd Bergmann <[email protected]>
> > > ---
> > > drivers/usb/typec/mux/Kconfig | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/drivers/usb/typec/mux/Kconfig b/drivers/usb/typec/mux/Kconfig
> > > index 5120942f309d..818624f59120 100644
> > > --- a/drivers/usb/typec/mux/Kconfig
> > > +++ b/drivers/usb/typec/mux/Kconfig
> > > @@ -40,6 +40,7 @@ config TYPEC_MUX_NB7VPQ904M
> > > tristate "On Semiconductor NB7VPQ904M Type-C redriver driver"
> > > depends on I2C
> > > depends on DRM || DRM=n
> > > + depends on OF
> > > select DRM_AUX_BRIDGE if DRM_BRIDGE
> > > select REGMAP_I2C
> > > help
> >
> > Shouldn't DRM_BRIDGE depend on OF instead?
>
> No. DRM_AUX_BRIDGE depends on OF, DRM_BRIDGE framework doesn't.

Okay, so this probable should also be

select DRM_AUX_BRIDGE if DRM_BRIDGE and OF

No?

thanks,

--
heikki

2023-12-07 11:59:07

by Dmitry Baryshkov

[permalink] [raw]
Subject: Re: [PATCH] usb: typec: nb7vpq904m: add CONFIG_OF dependency

On Thu, 7 Dec 2023 at 13:57, Heikki Krogerus
<[email protected]> wrote:
>
> On Thu, Dec 07, 2023 at 01:55:06PM +0200, Dmitry Baryshkov wrote:
> > On Thu, 7 Dec 2023 at 13:53, Heikki Krogerus
> > <[email protected]> wrote:
> > >
> > > On Wed, Dec 06, 2023 at 01:38:14PM +0100, Arnd Bergmann wrote:
> > > > From: Arnd Bergmann <[email protected]>
> > > >
> > > > DRM_AUX_BRIDGE depends on CONFIG_OF, so the same dependency is needed
> > > > here to avoid a build failure:
> > > >
> > > > WARNING: unmet direct dependencies detected for DRM_AUX_BRIDGE
> > > > Depends on [n]: HAS_IOMEM [=y] && DRM_BRIDGE [=y] && OF [=n]
> > > > Selected by [y]:
> > > > - TYPEC_MUX_NB7VPQ904M [=y] && USB_SUPPORT [=y] && TYPEC [=y] && I2C [=y] && (DRM [=y] || DRM [=y]=n) && DRM_BRIDGE [=y]
> > > > x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_register':
> > > > aux-bridge.c:(.text+0x13b): undefined reference to `auxiliary_device_init'
> > > > x86_64-linux-ld: aux-bridge.c:(.text+0x14d): undefined reference to `__auxiliary_device_add'
> > > > x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_drv_init':
> > > > aux-bridge.c:(.init.text+0x15): undefined reference to `__auxiliary_driver_register'
> > > > x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_drv_exit':
> > > > aux-bridge.c:(.exit.text+0x9): undefined reference to `auxiliary_driver_unregister'
> > > >
> > > > Fixes: c5d296bad640 ("usb: typec: nb7vpq904m: switch to DRM_AUX_BRIDGE")
> > > > Signed-off-by: Arnd Bergmann <[email protected]>
> > > > ---
> > > > drivers/usb/typec/mux/Kconfig | 1 +
> > > > 1 file changed, 1 insertion(+)
> > > >
> > > > diff --git a/drivers/usb/typec/mux/Kconfig b/drivers/usb/typec/mux/Kconfig
> > > > index 5120942f309d..818624f59120 100644
> > > > --- a/drivers/usb/typec/mux/Kconfig
> > > > +++ b/drivers/usb/typec/mux/Kconfig
> > > > @@ -40,6 +40,7 @@ config TYPEC_MUX_NB7VPQ904M
> > > > tristate "On Semiconductor NB7VPQ904M Type-C redriver driver"
> > > > depends on I2C
> > > > depends on DRM || DRM=n
> > > > + depends on OF
> > > > select DRM_AUX_BRIDGE if DRM_BRIDGE
> > > > select REGMAP_I2C
> > > > help
> > >
> > > Shouldn't DRM_BRIDGE depend on OF instead?
> >
> > No. DRM_AUX_BRIDGE depends on OF, DRM_BRIDGE framework doesn't.
>
> Okay, so this probable should also be
>
> select DRM_AUX_BRIDGE if DRM_BRIDGE and OF

Yes, this is what a patch from Nathan does:
https://patchwork.freedesktop.org/patch/570638/?series=127385&rev=1

--
With best wishes
Dmitry

2023-12-07 12:00:58

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH] usb: typec: nb7vpq904m: add CONFIG_OF dependency

On Thu, Dec 7, 2023, at 12:57, Heikki Krogerus wrote:
> On Thu, Dec 07, 2023 at 01:55:06PM +0200, Dmitry Baryshkov wrote:

> Okay, so this probable should also be
>
> select DRM_AUX_BRIDGE if DRM_BRIDGE and OF
>
> No?

I think that fails if CONFIG_OF is disabled and
CONFIG_DRM_AUX_BRIDGE, since drm_aux_bridge_register()
will still be called from a built-in driver in that
case but can't be linked against.

Arnd

2023-12-07 12:02:05

by Heikki Krogerus

[permalink] [raw]
Subject: Re: [PATCH] usb: typec: nb7vpq904m: add CONFIG_OF dependency

On Thu, Dec 07, 2023 at 01:58:31PM +0200, Dmitry Baryshkov wrote:
> On Thu, 7 Dec 2023 at 13:57, Heikki Krogerus
> <[email protected]> wrote:
> >
> > On Thu, Dec 07, 2023 at 01:55:06PM +0200, Dmitry Baryshkov wrote:
> > > On Thu, 7 Dec 2023 at 13:53, Heikki Krogerus
> > > <[email protected]> wrote:
> > > >
> > > > On Wed, Dec 06, 2023 at 01:38:14PM +0100, Arnd Bergmann wrote:
> > > > > From: Arnd Bergmann <[email protected]>
> > > > >
> > > > > DRM_AUX_BRIDGE depends on CONFIG_OF, so the same dependency is needed
> > > > > here to avoid a build failure:
> > > > >
> > > > > WARNING: unmet direct dependencies detected for DRM_AUX_BRIDGE
> > > > > Depends on [n]: HAS_IOMEM [=y] && DRM_BRIDGE [=y] && OF [=n]
> > > > > Selected by [y]:
> > > > > - TYPEC_MUX_NB7VPQ904M [=y] && USB_SUPPORT [=y] && TYPEC [=y] && I2C [=y] && (DRM [=y] || DRM [=y]=n) && DRM_BRIDGE [=y]
> > > > > x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_register':
> > > > > aux-bridge.c:(.text+0x13b): undefined reference to `auxiliary_device_init'
> > > > > x86_64-linux-ld: aux-bridge.c:(.text+0x14d): undefined reference to `__auxiliary_device_add'
> > > > > x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_drv_init':
> > > > > aux-bridge.c:(.init.text+0x15): undefined reference to `__auxiliary_driver_register'
> > > > > x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_drv_exit':
> > > > > aux-bridge.c:(.exit.text+0x9): undefined reference to `auxiliary_driver_unregister'
> > > > >
> > > > > Fixes: c5d296bad640 ("usb: typec: nb7vpq904m: switch to DRM_AUX_BRIDGE")
> > > > > Signed-off-by: Arnd Bergmann <[email protected]>
> > > > > ---
> > > > > drivers/usb/typec/mux/Kconfig | 1 +
> > > > > 1 file changed, 1 insertion(+)
> > > > >
> > > > > diff --git a/drivers/usb/typec/mux/Kconfig b/drivers/usb/typec/mux/Kconfig
> > > > > index 5120942f309d..818624f59120 100644
> > > > > --- a/drivers/usb/typec/mux/Kconfig
> > > > > +++ b/drivers/usb/typec/mux/Kconfig
> > > > > @@ -40,6 +40,7 @@ config TYPEC_MUX_NB7VPQ904M
> > > > > tristate "On Semiconductor NB7VPQ904M Type-C redriver driver"
> > > > > depends on I2C
> > > > > depends on DRM || DRM=n
> > > > > + depends on OF
> > > > > select DRM_AUX_BRIDGE if DRM_BRIDGE
> > > > > select REGMAP_I2C
> > > > > help
> > > >
> > > > Shouldn't DRM_BRIDGE depend on OF instead?
> > >
> > > No. DRM_AUX_BRIDGE depends on OF, DRM_BRIDGE framework doesn't.
> >
> > Okay, so this probable should also be
> >
> > select DRM_AUX_BRIDGE if DRM_BRIDGE and OF
>
> Yes, this is what a patch from Nathan does:
> https://patchwork.freedesktop.org/patch/570638/?series=127385&rev=1

Ah, sorry about the noise.

thanks,

--
heikki

2023-12-07 12:13:02

by Dmitry Baryshkov

[permalink] [raw]
Subject: Re: [PATCH] usb: typec: nb7vpq904m: add CONFIG_OF dependency

On Thu, 7 Dec 2023 at 14:00, Arnd Bergmann <[email protected]> wrote:
>
> On Thu, Dec 7, 2023, at 12:57, Heikki Krogerus wrote:
> > On Thu, Dec 07, 2023 at 01:55:06PM +0200, Dmitry Baryshkov wrote:
>
> > Okay, so this probable should also be
> >
> > select DRM_AUX_BRIDGE if DRM_BRIDGE and OF
> >
> > No?
>
> I think that fails if CONFIG_OF is disabled and
> CONFIG_DRM_AUX_BRIDGE, since drm_aux_bridge_register()
> will still be called from a built-in driver in that
> case but can't be linked against.

If DRM_AUX_BRIDGE is not enabled, then the stubs from
include/drm/bridge/aux-bridge will be used instead.

--
With best wishes
Dmitry

2023-12-07 12:18:07

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH] usb: typec: nb7vpq904m: add CONFIG_OF dependency

On Thu, Dec 7, 2023, at 13:12, Dmitry Baryshkov wrote:
> On Thu, 7 Dec 2023 at 14:00, Arnd Bergmann <[email protected]> wrote:
>>
>> On Thu, Dec 7, 2023, at 12:57, Heikki Krogerus wrote:
>> > On Thu, Dec 07, 2023 at 01:55:06PM +0200, Dmitry Baryshkov wrote:
>>
>> > Okay, so this probable should also be
>> >
>> > select DRM_AUX_BRIDGE if DRM_BRIDGE and OF
>> >
>> > No?
>>
>> I think that fails if CONFIG_OF is disabled and
>> CONFIG_DRM_AUX_BRIDGE, since drm_aux_bridge_register()
>> will still be called from a built-in driver in that
>> case but can't be linked against.
>
> If DRM_AUX_BRIDGE is not enabled, then the stubs from
> include/drm/bridge/aux-bridge will be used instead.

Sorry, I meant to write CONFIG_DRM_AUX_BRIDGE=m here.

Arnd

2023-12-07 12:21:50

by Dmitry Baryshkov

[permalink] [raw]
Subject: Re: [PATCH] usb: typec: nb7vpq904m: add CONFIG_OF dependency

On Thu, 7 Dec 2023 at 14:17, Arnd Bergmann <[email protected]> wrote:
>
> On Thu, Dec 7, 2023, at 13:12, Dmitry Baryshkov wrote:
> > On Thu, 7 Dec 2023 at 14:00, Arnd Bergmann <[email protected]> wrote:
> >>
> >> On Thu, Dec 7, 2023, at 12:57, Heikki Krogerus wrote:
> >> > On Thu, Dec 07, 2023 at 01:55:06PM +0200, Dmitry Baryshkov wrote:
> >>
> >> > Okay, so this probable should also be
> >> >
> >> > select DRM_AUX_BRIDGE if DRM_BRIDGE and OF
> >> >
> >> > No?
> >>
> >> I think that fails if CONFIG_OF is disabled and
> >> CONFIG_DRM_AUX_BRIDGE, since drm_aux_bridge_register()
> >> will still be called from a built-in driver in that
> >> case but can't be linked against.
> >
> > If DRM_AUX_BRIDGE is not enabled, then the stubs from
> > include/drm/bridge/aux-bridge will be used instead.
>
> Sorry, I meant to write CONFIG_DRM_AUX_BRIDGE=m here.

Like having NB7VPQ904M=y, OF=n and DRM_AUX_BRIDGE=m? And the select
will not work, since the condition is not fulfilled. Good question.

--
With best wishes
Dmitry