Commit a748d30c authored by Cosmin Tanislav's avatar Cosmin Tanislav Committed by Guenter Roeck

hwmon: (adt7x10) Use devm_hwmon_device_register_with_info

Describe the only available channel, implement read, write
and is_visible callbacks.
Also, pass name to core driver for the i2c device so that
it can be used to register hwmon device.
Signed-off-by: default avatarCosmin Tanislav <cosmin.tanislav@analog.com>
Link: https://lore.kernel.org/r/20211221215841.2641417-4-demonsingur@gmail.com
[groeck: Adjusted to use regmap]
Tested-by: default avatarCosmin Tanislav <cosmin.tanislav@analog.com>
Reviewed-by: default avatarCosmin Tanislav <cosmin.tanislav@analog.com>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent af910e92
...@@ -84,7 +84,7 @@ static int adt7410_i2c_probe(struct i2c_client *client) ...@@ -84,7 +84,7 @@ static int adt7410_i2c_probe(struct i2c_client *client)
if (IS_ERR(regmap)) if (IS_ERR(regmap))
return PTR_ERR(regmap); return PTR_ERR(regmap);
return adt7x10_probe(&client->dev, NULL, client->irq, regmap); return adt7x10_probe(&client->dev, client->name, client->irq, regmap);
} }
static int adt7410_i2c_remove(struct i2c_client *client) static int adt7410_i2c_remove(struct i2c_client *client)
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment