On Tue, Dec 17, 2024 at 02:52:10PM -0800, Guenter Roeck wrote: > Hide register size differences in regmap access functions to simplify > runtime code and to simplify adding support for I3C devices. Also > use regmap API functions for bit operations where possible. > > Cc: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx> > Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx> > --- > This should help with adding I3C support. > Module tested only. Does that mean 'build tested as a module only'? With the following small patch on top, it works \o/ I suggest that I will include your patch in my series for adding I3C support. I have a few patches on top already. I think this makes dependency handling a bit easier? diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c index f2550f623bee..1ef47ba6b458 100644 --- a/drivers/hwmon/lm75.c +++ b/drivers/hwmon/lm75.c @@ -653,6 +653,7 @@ static int lm75_probe(struct i2c_client *client) if (!data) return -ENOMEM; + /* Set this early. Our custom regmap callbacks need it */ dev_set_drvdata(dev, data); data->client = client; @@ -662,7 +663,7 @@ static int lm75_probe(struct i2c_client *client) if (IS_ERR(data->vs)) return PTR_ERR(data->vs); - data->regmap = devm_regmap_init_i2c(client, &lm75_regmap_config); + data->regmap = devm_regmap_init(&client->dev, NULL, data, &lm75_regmap_config); if (IS_ERR(data->regmap)) return PTR_ERR(data->regmap);
Attachment:
signature.asc
Description: PGP signature