Message ID | 20241203-lsm6dsx-v1-1-6d7893443bc8@geanix.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | iio: imu: st_lsm6dsx: don't always auto-enable I2C, I3C and SPI interface drivers | expand |
On Tue, 03 Dec 2024 08:20:17 +0100 Sean Nyekjaer <sean@geanix.com> wrote: > This patch makes I2C, I3C and SPI interface drivers for ST lsm6dsx > individually selectable via Kconfig. > > The default is kept unchanged - I2C, I3C and SPI interface drivers are > still selected by default if the corresponding bus support is available. > > However, the patch makes it possible to explicitly disable drivers > that are not needed for a particular target. > > Signed-off-by: Sean Nyekjaer <sean@geanix.com> Fair enough. Well explained and I guess you have a config which restricted enough that this makes sense. Applied to the togreg branch of iio.git and pushed out as testing for 0-day to see what we missed this time Jonathan > --- > drivers/iio/imu/st_lsm6dsx/Kconfig | 18 +++++++++--------- > 1 file changed, 9 insertions(+), 9 deletions(-) > > diff --git a/drivers/iio/imu/st_lsm6dsx/Kconfig b/drivers/iio/imu/st_lsm6dsx/Kconfig > index 89d687ec3099cc3ecb848e44f610c5cd64c80ad1..3cabec3b152d21403b40668a20ca7d175109a79e 100644 > --- a/drivers/iio/imu/st_lsm6dsx/Kconfig > +++ b/drivers/iio/imu/st_lsm6dsx/Kconfig > @@ -6,9 +6,6 @@ config IIO_ST_LSM6DSX > select IIO_BUFFER > select IIO_TRIGGERED_BUFFER > select IIO_KFIFO_BUF > - select IIO_ST_LSM6DSX_I2C if (I2C) > - select IIO_ST_LSM6DSX_SPI if (SPI_MASTER) > - select IIO_ST_LSM6DSX_I3C if (I3C) > help > Say yes here to build support for STMicroelectronics LSM6DSx imu > sensor. > @@ -42,16 +39,19 @@ config IIO_ST_LSM6DSX > will be called st_lsm6dsx. > > config IIO_ST_LSM6DSX_I2C > - tristate > - depends on IIO_ST_LSM6DSX > + tristate "ST_LSM6DSx driver for STM 6-axis IMU MEMS sensors I2C Interface" > + depends on I2C && IIO_ST_LSM6DSX > + default I2C && IIO_ST_LSM6DSX > select REGMAP_I2C > > config IIO_ST_LSM6DSX_SPI > - tristate > - depends on IIO_ST_LSM6DSX > + tristate "ST_LSM6DSx driver for STM 6-axis IMU MEMS sensors SPI Interface" > + depends on SPI_MASTER && IIO_ST_LSM6DSX > + default SPI_MASTER && IIO_ST_LSM6DSX > select REGMAP_SPI > > config IIO_ST_LSM6DSX_I3C > - tristate > - depends on IIO_ST_LSM6DSX > + tristate "ST_LSM6DSx driver for STM 6-axis IMU MEMS sensors I3C Interface" > + depends on I3C && IIO_ST_LSM6DSX > + default I3C && IIO_ST_LSM6DSX > select REGMAP_I3C > > --- > base-commit: 4ecd1edf4994bc5385609c6ea9e599b4ee958706 > change-id: 20241202-lsm6dsx-585182084202 > > Best regards,
diff --git a/drivers/iio/imu/st_lsm6dsx/Kconfig b/drivers/iio/imu/st_lsm6dsx/Kconfig index 89d687ec3099cc3ecb848e44f610c5cd64c80ad1..3cabec3b152d21403b40668a20ca7d175109a79e 100644 --- a/drivers/iio/imu/st_lsm6dsx/Kconfig +++ b/drivers/iio/imu/st_lsm6dsx/Kconfig @@ -6,9 +6,6 @@ config IIO_ST_LSM6DSX select IIO_BUFFER select IIO_TRIGGERED_BUFFER select IIO_KFIFO_BUF - select IIO_ST_LSM6DSX_I2C if (I2C) - select IIO_ST_LSM6DSX_SPI if (SPI_MASTER) - select IIO_ST_LSM6DSX_I3C if (I3C) help Say yes here to build support for STMicroelectronics LSM6DSx imu sensor. @@ -42,16 +39,19 @@ config IIO_ST_LSM6DSX will be called st_lsm6dsx. config IIO_ST_LSM6DSX_I2C - tristate - depends on IIO_ST_LSM6DSX + tristate "ST_LSM6DSx driver for STM 6-axis IMU MEMS sensors I2C Interface" + depends on I2C && IIO_ST_LSM6DSX + default I2C && IIO_ST_LSM6DSX select REGMAP_I2C config IIO_ST_LSM6DSX_SPI - tristate - depends on IIO_ST_LSM6DSX + tristate "ST_LSM6DSx driver for STM 6-axis IMU MEMS sensors SPI Interface" + depends on SPI_MASTER && IIO_ST_LSM6DSX + default SPI_MASTER && IIO_ST_LSM6DSX select REGMAP_SPI config IIO_ST_LSM6DSX_I3C - tristate - depends on IIO_ST_LSM6DSX + tristate "ST_LSM6DSx driver for STM 6-axis IMU MEMS sensors I3C Interface" + depends on I3C && IIO_ST_LSM6DSX + default I3C && IIO_ST_LSM6DSX select REGMAP_I3C
This patch makes I2C, I3C and SPI interface drivers for ST lsm6dsx individually selectable via Kconfig. The default is kept unchanged - I2C, I3C and SPI interface drivers are still selected by default if the corresponding bus support is available. However, the patch makes it possible to explicitly disable drivers that are not needed for a particular target. Signed-off-by: Sean Nyekjaer <sean@geanix.com> --- drivers/iio/imu/st_lsm6dsx/Kconfig | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) --- base-commit: 4ecd1edf4994bc5385609c6ea9e599b4ee958706 change-id: 20241202-lsm6dsx-585182084202 Best regards,