Skip to contentSkip to conversation

hwmon: pmbus: dps920ab: Add ability to instantiate through i2c

PATCH Superseded Denis Kirjanov 2 participants 3 messages Jan 9, 2025 – Jan 10, 2025

Subsystems (2)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 hwmon: pmbus: dps920ab: Add ability to instantiate through i2c

Add support for instantiating the Delta DPS920AB PSU through I2C on systems without devicetree support.

---
 drivers/hwmon/pmbus/dps920ab.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/hwmon/pmbus/dps920ab.c +7 -0
index cc5aac9dfdb3..c002ed41f517 100644
@@ -190,12 +190,19 @@ static const struct of_device_id __maybe_unused dps920ab_of_match[] = {
 
 MODULE_DEVICE_TABLE(of, dps920ab_of_match);
 
+static struct i2c_device_id dps920ab_i2c_match[] = {
+	{ "dps920ab" },
+	{}
+};
+MODULE_DEVICE_TABLE(i2c, dps920ab_i2c_match);
+
 static struct i2c_driver dps920ab_driver = {
 	.driver = {
 		   .name = "dps920ab",
 		   .of_match_table = of_match_ptr(dps920ab_of_match),
 	},
 	.probe = dps920ab_probe,
+	.id_table = dps920ab_device_id,
 };
 
 module_i2c_driver(dps920ab_driver);
Signature · 1 line
2.43.0
maintainer
#1 lore raw
Quoted 5 lines · Denis Kirjanov

Add support for instantiating the Delta DPS920AB PSU through I2C on systems without devicetree support.

---

Change log goes here.

Quoted 27 lines
  drivers/hwmon/pmbus/dps920ab.c | 7 +++++++
  1 file changed, 7 insertions(+)
drivers/hwmon/pmbus/dps920ab.c +7 -0
index cc5aac9dfdb3..c002ed41f517 100644
@@ -190,12 +190,19 @@ static const struct of_device_id __maybe_unused dps920ab_of_match[] = {
 
  MODULE_DEVICE_TABLE(of, dps920ab_of_match);
 
+static struct i2c_device_id dps920ab_i2c_match[] = {
+	{ "dps920ab" },
+	{}
+};
+MODULE_DEVICE_TABLE(i2c, dps920ab_i2c_match);
+
  static struct i2c_driver dps920ab_driver = {
  	.driver = {
  		   .name = "dps920ab",
  		   .of_match_table = of_match_ptr(dps920ab_of_match),
  	},
  	.probe = dps920ab_probe,
+	.id_table = dps920ab_device_id,
  };
 
  module_i2c_driver(dps920ab_driver);