Linux Hardware Monitor development
 help / color / mirror / Atom feed
From: Denis Kirjanov <kirjanov@gmail.com>
To: robert.marko@sartura.hr, jdelvare@suse.com, linux@roeck-us.net
Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org,
	Denis Kirjanov <kirjanov@gmail.com>
Subject: [PATCH v3] hwmon: pmbus: dps920ab: Add ability to instantiate through i2c
Date: Thu,  9 Jan 2025 13:09:12 +0300	[thread overview]
Message-ID: <20250109100912.10054-1-kirjanov@gmail.com> (raw)

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

Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
---
 drivers/hwmon/pmbus/dps920ab.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/hwmon/pmbus/dps920ab.c b/drivers/hwmon/pmbus/dps920ab.c
index cc5aac9dfdb3..c002ed41f517 100644
--- a/drivers/hwmon/pmbus/dps920ab.c
+++ b/drivers/hwmon/pmbus/dps920ab.c
@@ -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);
-- 
2.43.0


             reply	other threads:[~2025-01-09 10:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-09 10:09 Denis Kirjanov [this message]
2025-01-09 14:08 ` [PATCH v3] hwmon: pmbus: dps920ab: Add ability to instantiate through i2c Guenter Roeck
2025-01-10  1:24 ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250109100912.10054-1-kirjanov@gmail.com \
    --to=kirjanov@gmail.com \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=robert.marko@sartura.hr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox