i2c: imx-lpi2c: select CONFIG_I2C_SLAVE
authorArnd Bergmann <arnd@arndb.de>
Wed, 22 Jan 2025 06:48:36 +0000 (07:48 +0100)
committerWolfram Sang <wsa+renesas@sang-engineering.com>
Sun, 26 Jan 2025 11:01:28 +0000 (12:01 +0100)
The addition of target mode causes a build failure when CONFIG_I2C_SLAVE
is turned off:

drivers/i2c/busses/i2c-imx-lpi2c.c:1273:10: error: 'const struct i2c_algorithm' has no member named 'reg_target'
 1273 |         .reg_target     = lpi2c_imx_register_target,
      |          ^~~~~~~~~~
drivers/i2c/busses/i2c-imx-lpi2c.c:1274:10: error: 'const struct i2c_algorithm' has no member named 'unreg_target'
 1274 |         .unreg_target   = lpi2c_imx_unregister_target,
      |          ^~~~~~~~~~~~

Select the Kconfig symbol like we do for other similar drivers.

Fixes: 1ee867e465c1 ("i2c: imx-lpi2c: add target mode support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Carlos Song <carlos.song@nxp.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
drivers/i2c/busses/Kconfig

index eec95c724b25b6cd476772a10e7ef0d0ec80946f..fc438f4457713d5559d163840a7b11e8cdbb8f58 100644 (file)
@@ -756,6 +756,7 @@ config I2C_IMX
 config I2C_IMX_LPI2C
        tristate "IMX Low Power I2C interface"
        depends on ARCH_MXC || COMPILE_TEST
+       select I2C_SLAVE
        help
          Say Y here if you want to use the Low Power IIC bus controller
          on the Freescale i.MX processors.