Skip to contentSkip to conversation

Input: bma150: remove I2C_CLASS_HWMON from drivers w/o detect and address_list

PATCH In review Heiner Kallweit 2 participants 3 messages Jan 27, 2024 – Mar 2, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Input: bma150: 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.

---
 drivers/input/misc/bma150.c | 1 -
 1 file changed, 1 deletion(-)
drivers/input/misc/bma150.c +0 -1
index 0fb4cc628..22feaa8c1 100644
@@ -549,7 +549,6 @@ static struct i2c_driver bma150_driver = {
 		.name	= BMA150_DRIVER,
 		.pm	= &bma150_pm,
 	},
-	.class		= I2C_CLASS_HWMON,
 	.id_table	= bma150_id,
 	.probe		= bma150_probe,
 	.remove		= bma150_remove,
Signature · 1 line
2.43.0
#2 lore raw
In reply to Heiner Kallweit
Quoted 5 lines · Heiner Kallweit

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.

Any feedback here? Should this better go through the I2C tree?

Quoted 17 lines
---
 drivers/input/misc/bma150.c | 1 -
 1 file changed, 1 deletion(-)
drivers/input/misc/bma150.c +0 -1
index 0fb4cc628..22feaa8c1 100644
@@ -549,7 +549,6 @@ static struct i2c_driver bma150_driver = {
 		.name	= BMA150_DRIVER,
 		.pm	= &bma150_pm,
 	},
-	.class		= I2C_CLASS_HWMON,
 	.id_table	= bma150_id,
 	.probe		= bma150_probe,
 	.remove		= bma150_remove,