Skip to content

Commit a76539b

Browse files
kda88groeck
authored andcommitted
hwmon: pmbus: dps920ab: Add ability to instantiate through i2c
Add support for instantiating the Delta DPS920AB PSU through I2C on systems without devicetree support. Signed-off-by: Denis Kirjanov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]>
1 parent ecf1cf1 commit a76539b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/hwmon/pmbus/dps920ab.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,12 +190,19 @@ static const struct of_device_id __maybe_unused dps920ab_of_match[] = {
190190

191191
MODULE_DEVICE_TABLE(of, dps920ab_of_match);
192192

193+
static const struct i2c_device_id dps920ab_device_id[] = {
194+
{ "dps920ab" },
195+
{}
196+
};
197+
MODULE_DEVICE_TABLE(i2c, dps920ab_device_id);
198+
193199
static struct i2c_driver dps920ab_driver = {
194200
.driver = {
195201
.name = "dps920ab",
196202
.of_match_table = of_match_ptr(dps920ab_of_match),
197203
},
198204
.probe = dps920ab_probe,
205+
.id_table = dps920ab_device_id,
199206
};
200207

201208
module_i2c_driver(dps920ab_driver);

0 commit comments

Comments
 (0)