public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2c: imx-lpi2c: select CONFIG_I2C_SLAVE
@ 2025-01-22  6:48 Arnd Bergmann
  2025-01-24  4:59 ` Carlos Song
  2025-01-26 11:02 ` Wolfram Sang
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2025-01-22  6:48 UTC (permalink / raw)
  To: Andi Shyti, Carlos Song
  Cc: Arnd Bergmann, Wolfram Sang, linux-i2c, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

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

diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index 3fb1fa8244fb..60736a2831ba 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -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.
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH] i2c: imx-lpi2c: select CONFIG_I2C_SLAVE
  2025-01-22  6:48 [PATCH] i2c: imx-lpi2c: select CONFIG_I2C_SLAVE Arnd Bergmann
@ 2025-01-24  4:59 ` Carlos Song
  2025-01-26 11:02 ` Wolfram Sang
  1 sibling, 0 replies; 3+ messages in thread
From: Carlos Song @ 2025-01-24  4:59 UTC (permalink / raw)
  To: Arnd Bergmann, Andi Shyti
  Cc: Arnd Bergmann, Wolfram Sang, linux-i2c@vger.kernel.org,
	linux-kernel@vger.kernel.org


> From: Arnd Bergmann <arnd@arndb.de>
> 
> 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>
> ---
>  drivers/i2c/busses/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index
> 3fb1fa8244fb..60736a2831ba 100644
> --- a/drivers/i2c/busses/Kconfig
> +++ b/drivers/i2c/busses/Kconfig
> @@ -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:
Acked-by: Carlos Song <carlos.song@nxp.com>

Best Regards
Carlos
> 2.39.5


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] i2c: imx-lpi2c: select CONFIG_I2C_SLAVE
  2025-01-22  6:48 [PATCH] i2c: imx-lpi2c: select CONFIG_I2C_SLAVE Arnd Bergmann
  2025-01-24  4:59 ` Carlos Song
@ 2025-01-26 11:02 ` Wolfram Sang
  1 sibling, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2025-01-26 11:02 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Andi Shyti, Carlos Song, Arnd Bergmann, linux-i2c, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 860 bytes --]

On Wed, Jan 22, 2025 at 07:48:36AM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> 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>

Applied to for-current, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-01-26 11:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-22  6:48 [PATCH] i2c: imx-lpi2c: select CONFIG_I2C_SLAVE Arnd Bergmann
2025-01-24  4:59 ` Carlos Song
2025-01-26 11:02 ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox