Re: [PATCH] drm/bridge: fix RC_CORE dependency

From: Arnd Bergmann
Date: Fri Jul 19 2019 - 04:34:19 EST


On Fri, Jul 19, 2019 at 9:01 AM Andrzej Hajda <a.hajda@xxxxxxxxxxx> wrote:
>
> On 18.07.2019 15:42, Arnd Bergmann wrote:
> > Using 'imply' causes a new problem, as it allows the case of
> > CONFIG_INPUT=m with RC_CORE=y, which fails to link:
>
>
> I have reviewed dependencies and I wonder how such configuration is
> possible at all.
>
> RC_CORE depends on INPUT (at least on today's next branch) so if INPUT=m
> then RC_CORE should be either n either m, am I right?

Right.

> Arnd, are there unknown to me changes in RC/INPUT dependencies?

I think this is 'imply' behaving oddly when we have conflicting requirements:

- INPUT=m forces RC_CORE to be =m or =n
- DRM_SIL_SII8620=y asks RC_CORE to be =y unless it cannot be enabled

Kconfig decided to make this RC_CORE=y, which caused the link
failure. Making it RC_CORE=m however would not work either because
then we'd get a link failure from the sii8620 driver to rc_core.

so a pure 'imply' cannot work here, and we need a dependency, one of:

a)
depends on INPUT || !INPUT
select RC_CORE if INPUT

b) depends on RC_CORE || !RC_CORE

b) is what othe drivers use, e.g. SMS_SDIO_DRV

Arnd