Re: [PATCH v1 09/43] clocksource: ep93xx: Add driver for Cirrus Logic EP93xx

From: Andy Shevchenko
Date: Mon Jun 05 2023 - 09:45:50 EST


On Sun, Jun 4, 2023 at 10:34 PM Arnd Bergmann <arnd@xxxxxxxx> wrote:
> On Sun, Jun 4, 2023, at 21:24, Andy Shevchenko wrote:
> > On Sun, Jun 4, 2023 at 8:19 PM Arnd Bergmann <arnd@xxxxxxxx> wrote:
> >> On Sat, Jun 3, 2023, at 22:06, andy.shevchenko@xxxxxxxxx wrote:
> >> > Thu, Jun 01, 2023 at 08:34:00AM +0300, Nikita Shubin kirjoitti:
> >
> >> As long as the platform selects it, this is the normal
> >> way to add a clocksource driver.
> >
> > Shall we now require this format of COMPILE_TEST for all new code
> > (which is selectable)?
>
> It's somewhat subsystem specific. For irqchip and clocksource drivers,
> I think it's already done this way, but these are the ones that expect
> a platform Kconfig option to select the drivers, which is usually
> not done for other subsystems.
>
> If the driver is not selected by the platform, you usually have
>
> config FOO
> tristate "description"
> depends on ${PLATFORM} || COMPILE_TEST
> default ${PLATFORM}
>
> which makes it possible to still disable it, or (optionally)
> hide the option by adding "if COMPILE_TEST && !${PLATFORM}"
> which I personally find a little too complicated but is
> appropriate for some drivers that are required for booting.

Thank you for this nice elaboration (every day to learn something new)!

--
With Best Regards,
Andy Shevchenko