hwmon: Remove I2C_CLASS_HWMON from drivers w/o detect() and address_list
authorHeiner Kallweit <hkallweit1@gmail.com>
Sat, 27 Jan 2024 15:02:54 +0000 (16:02 +0100)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 11 Feb 2024 21:43:08 +0000 (13:43 -0800)
Class-based I2C probing requires detect() and address_list to be
set in the I2C client driver, see checks in i2c_detect().
It's misleading to declare I2C_CLASS_HWMON support if this
precondition isn't met.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://lore.kernel.org/r/75747c6a-d414-4b07-8f66-5a5cdddc3c36@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
17 files changed:
drivers/hwmon/adm1177.c
drivers/hwmon/ds1621.c
drivers/hwmon/ds620.c
drivers/hwmon/ina209.c
drivers/hwmon/ina238.c
drivers/hwmon/max127.c
drivers/hwmon/max31760.c
drivers/hwmon/max31790.c
drivers/hwmon/max31827.c
drivers/hwmon/max6621.c
drivers/hwmon/max6697.c
drivers/hwmon/occ/p8_i2c.c
drivers/hwmon/pmbus/ir36021.c
drivers/hwmon/powr1220.c
drivers/hwmon/sbrmi.c
drivers/hwmon/sbtsi_temp.c
drivers/hwmon/w83773g.c

index 60a893f271597bc57b919983b4752a65b6cc443b..3390102d2d4acfcc2a083a69d47ec3e70f06c453 100644 (file)
@@ -250,7 +250,6 @@ static const struct of_device_id adm1177_dt_ids[] = {
 MODULE_DEVICE_TABLE(of, adm1177_dt_ids);
 
 static struct i2c_driver adm1177_driver = {
-       .class = I2C_CLASS_HWMON,
        .driver = {
                .name = "adm1177",
                .of_match_table = adm1177_dt_ids,
index 21b6350465211f621d1fcba1e781c6dcdaddf4ff..bffbc80401718d7adfd392d28c26cd6fc903a47d 100644 (file)
@@ -380,7 +380,6 @@ MODULE_DEVICE_TABLE(i2c, ds1621_id);
 
 /* This is the driver that will be inserted */
 static struct i2c_driver ds1621_driver = {
-       .class          = I2C_CLASS_HWMON,
        .driver = {
                .name   = "ds1621",
        },
index 2b09536630cb6abb06cc68847dd055dea69e0eea..4fc4df012fac70198343f63a86d36b524c8d58b9 100644 (file)
@@ -241,7 +241,6 @@ MODULE_DEVICE_TABLE(i2c, ds620_id);
 
 /* This is the driver that will be inserted */
 static struct i2c_driver ds620_driver = {
-       .class = I2C_CLASS_HWMON,
        .driver = {
                   .name = "ds620",
        },
index c558143e5285da77f85834e7a654f90b15270fb9..d9b57a4b3e41fbd52d96ac1d57bb4a6377aa3cb0 100644 (file)
@@ -589,7 +589,6 @@ MODULE_DEVICE_TABLE(of, ina209_of_match);
 
 /* This is the driver that will be inserted */
 static struct i2c_driver ina209_driver = {
-       .class          = I2C_CLASS_HWMON,
        .driver = {
                .name   = "ina209",
                .of_match_table = of_match_ptr(ina209_of_match),
index ca9f5d2c811bb6ed0eb53f3ee1a3563c5c1d3b0f..69289293bc38ccb3c234eef1faec06fc5d4e7ed2 100644 (file)
@@ -629,7 +629,6 @@ static const struct of_device_id __maybe_unused ina238_of_match[] = {
 MODULE_DEVICE_TABLE(of, ina238_of_match);
 
 static struct i2c_driver ina238_driver = {
-       .class          = I2C_CLASS_HWMON,
        .driver = {
                .name   = "ina238",
                .of_match_table = of_match_ptr(ina238_of_match),
index ee5ead06d612df21bcfab212fa5d5d5ecfc7fa42..da2289e3560aa0066840d193935600fcf11266d0 100644 (file)
@@ -335,7 +335,6 @@ static const struct i2c_device_id max127_id[] = {
 MODULE_DEVICE_TABLE(i2c, max127_id);
 
 static struct i2c_driver max127_driver = {
-       .class          = I2C_CLASS_HWMON,
        .driver = {
                .name   = "max127",
        },
index 79945eb466ae43e5925ae25322f1338c0cda6549..1b6f71bc61cb54ef9aebc44540d38887c992cc17 100644 (file)
@@ -578,7 +578,6 @@ static DEFINE_SIMPLE_DEV_PM_OPS(max31760_pm_ops, max31760_suspend,
                                max31760_resume);
 
 static struct i2c_driver max31760_driver = {
-       .class          = I2C_CLASS_HWMON,
        .driver = {
                .name   = "max31760",
                .of_match_table = max31760_of_match,
index 0cd44c1e998a2e093da4e706063f0c113dde213e..3dc95196b229ad46376d3a3b6928cf866e5b42d0 100644 (file)
@@ -543,7 +543,6 @@ static const struct i2c_device_id max31790_id[] = {
 MODULE_DEVICE_TABLE(i2c, max31790_id);
 
 static struct i2c_driver max31790_driver = {
-       .class          = I2C_CLASS_HWMON,
        .probe          = max31790_probe,
        .driver = {
                .name   = "max31790",
index 4a8c3e37c5d3235ae7da212f50837a8bf99782f8..f8a13b30f100f2f80c106338e678d97a2e714e79 100644 (file)
@@ -652,7 +652,6 @@ static const struct of_device_id max31827_of_match[] = {
 MODULE_DEVICE_TABLE(of, max31827_of_match);
 
 static struct i2c_driver max31827_driver = {
-       .class = I2C_CLASS_HWMON,
        .driver = {
                .name = "max31827",
                .of_match_table = max31827_of_match,
index af7e62685898315173fe15dcb865534fba4854dc..05426cde0e36353ebeabdd2ac544b0c68eb4ec6d 100644 (file)
@@ -549,7 +549,6 @@ static const struct of_device_id __maybe_unused max6621_of_match[] = {
 MODULE_DEVICE_TABLE(of, max6621_of_match);
 
 static struct i2c_driver max6621_driver = {
-       .class          = I2C_CLASS_HWMON,
        .driver = {
                .name = MAX6621_DRV_NAME,
                .of_match_table = of_match_ptr(max6621_of_match),
index 7d10dd434f2e11dfbafe136d6f8f64197d648e01..d161ba0e7813cd5963f592eff06d88b6032fb4a9 100644 (file)
@@ -780,7 +780,6 @@ static const struct of_device_id __maybe_unused max6697_of_match[] = {
 MODULE_DEVICE_TABLE(of, max6697_of_match);
 
 static struct i2c_driver max6697_driver = {
-       .class = I2C_CLASS_HWMON,
        .driver = {
                .name   = "max6697",
                .of_match_table = of_match_ptr(max6697_of_match),
index 06095975f5c8d2fe014a574a7490cf17399b1677..31159606cec7b41244067383cf6fb33861a9cc9e 100644 (file)
@@ -241,7 +241,6 @@ static const struct of_device_id p8_i2c_occ_of_match[] = {
 MODULE_DEVICE_TABLE(of, p8_i2c_occ_of_match);
 
 static struct i2c_driver p8_i2c_occ_driver = {
-       .class = I2C_CLASS_HWMON,
        .driver = {
                .name = "occ-hwmon",
                .of_match_table = p8_i2c_occ_of_match,
index 382ba6b6031a0374ac03d20a3738b7c3c1a3e7e6..a263afeb8ac1e147cab240584b7270c7ab5abe81 100644 (file)
@@ -63,7 +63,6 @@ static const struct of_device_id __maybe_unused ir36021_of_id[] = {
 MODULE_DEVICE_TABLE(of, ir36021_of_id);
 
 static struct i2c_driver ir36021_driver = {
-       .class = I2C_CLASS_HWMON,
        .driver = {
                .name = "ir36021",
                .of_match_table = of_match_ptr(ir36021_of_id),
index 4120cadb00aebc4f8a3629926ca769410e0023b5..2388d0565e7ec7ef4d6e496cd42b23568bc4d903 100644 (file)
@@ -323,7 +323,6 @@ static const struct i2c_device_id powr1220_ids[] = {
 MODULE_DEVICE_TABLE(i2c, powr1220_ids);
 
 static struct i2c_driver powr1220_driver = {
-       .class          = I2C_CLASS_HWMON,
        .driver = {
                .name   = "powr1220",
        },
index 484703f0ea5f882e266c096e6920ae79460974a6..4318f5121145e0e3f7e15d34c10f878a6a13562a 100644 (file)
@@ -342,7 +342,6 @@ static const struct of_device_id __maybe_unused sbrmi_of_match[] = {
 MODULE_DEVICE_TABLE(of, sbrmi_of_match);
 
 static struct i2c_driver sbrmi_driver = {
-       .class = I2C_CLASS_HWMON,
        .driver = {
                .name = "sbrmi",
                .of_match_table = of_match_ptr(sbrmi_of_match),
index dd85cf89f008a99c938fc2837774e1d40c603675..a4181acb1aa6b596b17217038ddecc42ff47c56c 100644 (file)
@@ -232,7 +232,6 @@ static const struct of_device_id __maybe_unused sbtsi_of_match[] = {
 MODULE_DEVICE_TABLE(of, sbtsi_of_match);
 
 static struct i2c_driver sbtsi_driver = {
-       .class = I2C_CLASS_HWMON,
        .driver = {
                .name = "sbtsi",
                .of_match_table = of_match_ptr(sbtsi_of_match),
index 045eea8378c2da7b167696124ed00632b07e2f57..401a28f55f931f938efe0278937c33a3f3bff0e7 100644 (file)
@@ -290,7 +290,6 @@ static int w83773_probe(struct i2c_client *client)
 }
 
 static struct i2c_driver w83773_driver = {
-       .class = I2C_CLASS_HWMON,
        .driver = {
                .name   = "w83773g",
                .of_match_table = of_match_ptr(w83773_of_match),