mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] i2c: imx: Switch to new reg_target/unreg_target callbacks
@ 2026-05-27 17:10 Liem
  0 siblings, 0 replies; only message in thread
From: Liem @ 2026-05-27 17:10 UTC (permalink / raw)
  To: Oleksij Rempel, Andi Shyti, linux-i2c
  Cc: kernel, Frank.Li, s.hauer, festevam, imx, linux-arm-kernel,
	linux-kernel, Liem

The reg_slave and unreg_slave members of i2c_algorithm are deprecated
and will be removed. The i.MX I2C driver still uses the old names for
both the struct members and the callback implementations.

Switch to the new reg_target and unreg_target members, and rename the
corresponding callback functions from reg_slave/unreg_slave to
reg_target/unreg_target. This aligns the driver with the ongoing
terminology migration in the I2C subsystem and avoids future build
issues.

Signed-off-by: Liem <liem16213@gmail.com>
---
 drivers/i2c/busses/i2c-imx.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index a208fefd3c3b..c9ecca3ef580 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -922,7 +922,7 @@ static void i2c_imx_slave_init(struct imx_i2c_struct *i2c_imx)
 	i2c_imx_enable_bus_idle(i2c_imx);
 }
 
-static int i2c_imx_reg_slave(struct i2c_client *client)
+static int i2c_imx_reg_target(struct i2c_client *client)
 {
 	struct imx_i2c_struct *i2c_imx = i2c_get_adapdata(client->adapter);
 	int ret;
@@ -945,7 +945,7 @@ static int i2c_imx_reg_slave(struct i2c_client *client)
 	return 0;
 }
 
-static int i2c_imx_unreg_slave(struct i2c_client *client)
+static int i2c_imx_unreg_target(struct i2c_client *client)
 {
 	struct imx_i2c_struct *i2c_imx = i2c_get_adapdata(client->adapter);
 	int ret;
@@ -1704,8 +1704,8 @@ static const struct i2c_algorithm i2c_imx_algo = {
 	.xfer = i2c_imx_xfer,
 	.xfer_atomic = i2c_imx_xfer_atomic,
 	.functionality = i2c_imx_func,
-	.reg_slave = i2c_imx_reg_slave,
-	.unreg_slave = i2c_imx_unreg_slave,
+	.reg_target = i2c_imx_reg_target,
+	.unreg_target = i2c_imx_unreg_target,
 };
 
 static int i2c_imx_probe(struct platform_device *pdev)
-- 
2.34.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-05-27 17:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-27 17:10 [PATCH] i2c: imx: Switch to new reg_target/unreg_target callbacks Liem

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

all inboxes | Powered by JetHome®