lkml.org 
[lkml]   [2022]   [Jan]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] iio: stm: don't always auto-enable I2C and SPI interface drivers
On Sun, Jan 2, 2022 at 2:02 AM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> On Wed, Dec 29, 2021 at 8:29 AM Nikita Yushchenko
> <nikita.yoush@cogentembedded.com> wrote:
>
> > config IIO_ST_ACCEL_I2C_3AXIS
> > - tristate
> > - depends on IIO_ST_ACCEL_3AXIS
> > - depends on IIO_ST_SENSORS_I2C
> > + tristate "STMicroelectronics accelerometers 3-Axis I2C Interface"
> > + depends on (I2C && IIO_ST_ACCEL_3AXIS)
> > + default y if (I2C && IIO_ST_ACCEL_3AXIS)
> > + select IIO_ST_SENSORS_I2C
>
> This thing that a Kconfig symbol is made to depend on itself just
> boggles my head but it wouldn't surprise me if KConfig is this weird :(
>
> I CCed Arnd who knows KConfig a bit better than anyone I know.

It looks fine to me, the only thing I'd change is to write the default as

default I2C && IIO_ST_SENSORS_I2C

rather than 'default y', which is less intuitive for the case where one
of the dependencies is =m.

Arnd

\
 
 \ /
  Last update: 2022-01-02 14:51    [W:0.059 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site