Skip to contentSkip to conversation

staging: olpc_dcon: Remove I2C_CLASS_DDC support

PATCH In review Heiner Kallweit 2 participants 2 messages Oct 26, 2023 – Oct 28, 2023

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

PATCH 1/1 staging: olpc_dcon: Remove I2C_CLASS_DDC support

olpc_dcon is the only remaining i2c client device driver declaring I2C_CLASS_DDC support after the legacy eeprom driver has been removed.

olpc_dcon is only used on olpc devices, connected to an i2c adapter driven by scx200_acb. This adapter driver declares support for I2C_CLASS_HWMON and I2C_CLASS_SPD. Therefore we can safely drop I2C_CLASS_DDC support in olpc_dcon.

That's the last step before I2C_CLASS_DDC can be removed in general.

This patch is solely based on documentation, and I don't have an olpc device for testing. Therefore some testing would be appreciated before patch is applied.

---
 drivers/staging/olpc_dcon/olpc_dcon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/olpc_dcon/olpc_dcon.c +1 -1
index d5271eac1..08ec3aae9 100644
@@ -777,7 +777,7 @@ static struct i2c_driver dcon_driver = {
 		.name	= "olpc_dcon",
 		.pm = &dcon_pm_ops,
 	},
-	.class = I2C_CLASS_DDC | I2C_CLASS_HWMON,
+	.class = I2C_CLASS_HWMON,
 	.id_table = dcon_idtable,
 	.probe = dcon_probe,
 	.remove = dcon_remove,
Signature · 1 line
2.42.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Heiner Kallweit

olpc_dcon is the only remaining i2c client device driver declaring I2C_CLASS_DDC support after the legacy eeprom driver has been removed.

olpc_dcon is only used on olpc devices, connected to an i2c adapter driven by scx200_acb. This adapter driver declares support for I2C_CLASS_HWMON and I2C_CLASS_SPD. Therefore we can safely drop I2C_CLASS_DDC support in olpc_dcon.

Quoted 5 lines

That's the last step before I2C_CLASS_DDC can be removed in general.

This patch is solely based on documentation, and I don't have an olpc device for testing. Therefore some testing would be appreciated before patch is applied.

Yes, testing would be good, for sure. Still, I think we can apply it even without. Because we are not dealing with HW features here, but only with the Linux internal handling of i2c adapter classes. So:

Quoted 22 lines
---
 drivers/staging/olpc_dcon/olpc_dcon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/olpc_dcon/olpc_dcon.c +1 -1
index d5271eac1..08ec3aae9 100644
@@ -777,7 +777,7 @@ static struct i2c_driver dcon_driver = {
 		.name	= "olpc_dcon",
 		.pm = &dcon_pm_ops,
 	},
-	.class = I2C_CLASS_DDC | I2C_CLASS_HWMON,
+	.class = I2C_CLASS_HWMON,
 	.id_table = dcon_idtable,
 	.probe = dcon_probe,
 	.remove = dcon_remove,
Signature · 1 line
2.42.0