Skip to contentSkip to conversation

i2c: imx-lpi2c: select CONFIG_I2C_SLAVE

PATCH Applied Arnd Bergmann 3 participants 3 messages Jan 22, 2025 – Jan 26, 2025 I2C subsystem host drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c: imx-lpi2c: select CONFIG_I2C_SLAVE

From: Arnd Bergmann <[email protected]>

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")
---
 drivers/i2c/busses/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/i2c/busses/Kconfig +1 -0
index 3fb1fa8244fb..60736a2831ba 100644
@@ -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.
Signature · 1 line
2.39.5
Acked-by on v1 1/1
#1 lore raw
Quoted 28 lines

From: Arnd Bergmann <[email protected]>

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")
---
 drivers/i2c/busses/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/i2c/busses/Kconfig index renamed from drivers/i2c/busses/Kconfig +0 -0

3fb1fa8244fb..60736a2831ba 100644

drivers/i2c/busses/Kconfig config I2C_IMX

Quoted 8 lines
drivers/i2c/busses/Kconfig +1 -1
@@ -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.
--

Hi, Arnd

Thank you for very much for your fix!:)

You may add my ack:

Best Regards
Carlos

Quoted 1 line

2.39.5

Applied
#2 lore raw
In reply to Arnd Bergmann
Quoted 12 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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,
      |          ^~~~~~~~~~~~
Quoted 4 lines

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

Fixes 1ee867e465c1 ("i2c: imx-lpi2c: add target mode support")

Applied to for-current, thanks!