Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

hwmon: Remove I2C_CLASS_HWMON from drivers w/o detect() and address_list

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>

authored by

Heiner Kallweit and committed by
Guenter Roeck
e7b631d7 f7ab2d18

-17
-1
drivers/hwmon/adm1177.c
··· 250 250 MODULE_DEVICE_TABLE(of, adm1177_dt_ids); 251 251 252 252 static struct i2c_driver adm1177_driver = { 253 - .class = I2C_CLASS_HWMON, 254 253 .driver = { 255 254 .name = "adm1177", 256 255 .of_match_table = adm1177_dt_ids,
-1
drivers/hwmon/ds1621.c
··· 380 380 381 381 /* This is the driver that will be inserted */ 382 382 static struct i2c_driver ds1621_driver = { 383 - .class = I2C_CLASS_HWMON, 384 383 .driver = { 385 384 .name = "ds1621", 386 385 },
-1
drivers/hwmon/ds620.c
··· 241 241 242 242 /* This is the driver that will be inserted */ 243 243 static struct i2c_driver ds620_driver = { 244 - .class = I2C_CLASS_HWMON, 245 244 .driver = { 246 245 .name = "ds620", 247 246 },
-1
drivers/hwmon/ina209.c
··· 589 589 590 590 /* This is the driver that will be inserted */ 591 591 static struct i2c_driver ina209_driver = { 592 - .class = I2C_CLASS_HWMON, 593 592 .driver = { 594 593 .name = "ina209", 595 594 .of_match_table = of_match_ptr(ina209_of_match),
-1
drivers/hwmon/ina238.c
··· 629 629 MODULE_DEVICE_TABLE(of, ina238_of_match); 630 630 631 631 static struct i2c_driver ina238_driver = { 632 - .class = I2C_CLASS_HWMON, 633 632 .driver = { 634 633 .name = "ina238", 635 634 .of_match_table = of_match_ptr(ina238_of_match),
-1
drivers/hwmon/max127.c
··· 335 335 MODULE_DEVICE_TABLE(i2c, max127_id); 336 336 337 337 static struct i2c_driver max127_driver = { 338 - .class = I2C_CLASS_HWMON, 339 338 .driver = { 340 339 .name = "max127", 341 340 },
-1
drivers/hwmon/max31760.c
··· 578 578 max31760_resume); 579 579 580 580 static struct i2c_driver max31760_driver = { 581 - .class = I2C_CLASS_HWMON, 582 581 .driver = { 583 582 .name = "max31760", 584 583 .of_match_table = max31760_of_match,
-1
drivers/hwmon/max31790.c
··· 543 543 MODULE_DEVICE_TABLE(i2c, max31790_id); 544 544 545 545 static struct i2c_driver max31790_driver = { 546 - .class = I2C_CLASS_HWMON, 547 546 .probe = max31790_probe, 548 547 .driver = { 549 548 .name = "max31790",
-1
drivers/hwmon/max31827.c
··· 652 652 MODULE_DEVICE_TABLE(of, max31827_of_match); 653 653 654 654 static struct i2c_driver max31827_driver = { 655 - .class = I2C_CLASS_HWMON, 656 655 .driver = { 657 656 .name = "max31827", 658 657 .of_match_table = max31827_of_match,
-1
drivers/hwmon/max6621.c
··· 549 549 MODULE_DEVICE_TABLE(of, max6621_of_match); 550 550 551 551 static struct i2c_driver max6621_driver = { 552 - .class = I2C_CLASS_HWMON, 553 552 .driver = { 554 553 .name = MAX6621_DRV_NAME, 555 554 .of_match_table = of_match_ptr(max6621_of_match),
-1
drivers/hwmon/max6697.c
··· 780 780 MODULE_DEVICE_TABLE(of, max6697_of_match); 781 781 782 782 static struct i2c_driver max6697_driver = { 783 - .class = I2C_CLASS_HWMON, 784 783 .driver = { 785 784 .name = "max6697", 786 785 .of_match_table = of_match_ptr(max6697_of_match),
-1
drivers/hwmon/occ/p8_i2c.c
··· 241 241 MODULE_DEVICE_TABLE(of, p8_i2c_occ_of_match); 242 242 243 243 static struct i2c_driver p8_i2c_occ_driver = { 244 - .class = I2C_CLASS_HWMON, 245 244 .driver = { 246 245 .name = "occ-hwmon", 247 246 .of_match_table = p8_i2c_occ_of_match,
-1
drivers/hwmon/pmbus/ir36021.c
··· 63 63 MODULE_DEVICE_TABLE(of, ir36021_of_id); 64 64 65 65 static struct i2c_driver ir36021_driver = { 66 - .class = I2C_CLASS_HWMON, 67 66 .driver = { 68 67 .name = "ir36021", 69 68 .of_match_table = of_match_ptr(ir36021_of_id),
-1
drivers/hwmon/powr1220.c
··· 323 323 MODULE_DEVICE_TABLE(i2c, powr1220_ids); 324 324 325 325 static struct i2c_driver powr1220_driver = { 326 - .class = I2C_CLASS_HWMON, 327 326 .driver = { 328 327 .name = "powr1220", 329 328 },
-1
drivers/hwmon/sbrmi.c
··· 342 342 MODULE_DEVICE_TABLE(of, sbrmi_of_match); 343 343 344 344 static struct i2c_driver sbrmi_driver = { 345 - .class = I2C_CLASS_HWMON, 346 345 .driver = { 347 346 .name = "sbrmi", 348 347 .of_match_table = of_match_ptr(sbrmi_of_match),
-1
drivers/hwmon/sbtsi_temp.c
··· 232 232 MODULE_DEVICE_TABLE(of, sbtsi_of_match); 233 233 234 234 static struct i2c_driver sbtsi_driver = { 235 - .class = I2C_CLASS_HWMON, 236 235 .driver = { 237 236 .name = "sbtsi", 238 237 .of_match_table = of_match_ptr(sbtsi_of_match),
-1
drivers/hwmon/w83773g.c
··· 290 290 } 291 291 292 292 static struct i2c_driver w83773_driver = { 293 - .class = I2C_CLASS_HWMON, 294 293 .driver = { 295 294 .name = "w83773g", 296 295 .of_match_table = of_match_ptr(w83773_of_match),