public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: Andi Shyti <andi.shyti@kernel.org>, Carlos Song <carlos.song@nxp.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] i2c: imx-lpi2c: select CONFIG_I2C_SLAVE
Date: Wed, 22 Jan 2025 07:48:36 +0100	[thread overview]
Message-ID: <20250122064906.1220557-1-arnd@kernel.org> (raw)

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


             reply	other threads:[~2025-01-22  6:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-22  6:48 Arnd Bergmann [this message]
2025-01-24  4:59 ` [PATCH] i2c: imx-lpi2c: select CONFIG_I2C_SLAVE Carlos Song
2025-01-26 11:02 ` Wolfram Sang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250122064906.1220557-1-arnd@kernel.org \
    --to=arnd@kernel.org \
    --cc=andi.shyti@kernel.org \
    --cc=arnd@arndb.de \
    --cc=carlos.song@nxp.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wsa+renesas@sang-engineering.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox