[PATCH] i2c: imx: Switch to new reg_target/unreg_target callbacks

From: Liem

Date: Wed May 27 2026 - 13:11:15 EST


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@xxxxxxxxx>
---
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