Re: [GIT PULL] Backlight for v6.1

From: Hans de Goede
Date: Sun Oct 09 2022 - 08:58:16 EST


Hi,

On 10/9/22 01:23, Linus Torvalds wrote:
> On Sat, Oct 8, 2022 at 12:59 PM Hans de Goede <hdegoede@xxxxxxxxxx> wrote:
>>>
>>> Yeah, I don't expect he driver to work on real hardware,
>>
>> I'm not sure what you mean here. I guess you mean that you
>> do not expect to be able to test the driver on real hw
>> yourself?
>
> Well, that too, but I really along the lines of "make it build as a
> module when I2C_DESIGNWARE_PLATFORM is a module"

Actually because the driver only works properly when builtin the
driver itself is a bool option not a tristate. So I am not sure
if even if we change the the:

depends on I2C_DESIGNWARE_PLATFORM=y

to:

depends on I2C_DESIGNWARE_PLATFORM=y || COMPILE_TEST

it still will not be build with an "allmodconfig" build? I must
admit I don't know what that does with bool options.

If it says yes to bool options, then yes adding the " || COMPILE_TEST"
will give you build coverage with an "allmodconfig" build and
I would be happy to submit a patch adding this for all the affected
x86 PMIC drivers.

> Because if it depends on some symbols from I2C_DESIGNWARE_PLATFORM,
> and that one can be a module, then the Intel PMIC driver also needs to
> be built as a module to just get the build coverage, at least.

See above, currently these are bool-s I guess we may be able to
come up with some Kconfig magic where they can be build as module
only when COMPILE_TEST is set ? Anyone now the right Kconfig magic
for this ?

> And I can imagine that that will not work very well on actual hardware
> with some of these core drivers that may want to initialize early?

Right, we want to enforce things, including the i2c controller driver
to be build in because that is necessary on actual hw and allowing
these to be build as modules has lead to bug reports in the past.

> But I'd love to at least have the build coverage.

I agree, see above for some gotchas though.

FWIW as a side-project I actively work on keeping these platforms working
well with the latest mainline kernel, so I do build these with the latest
rc kernels all the time.

Regards.

Hans