aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorPawel Dembicki <paweldembicki@gmail.com>2025-05-11 05:55:48 +0200
committerGuenter Roeck <linux@roeck-us.net>2025-05-12 09:45:26 -0700
commit8fcefe7812f246fff86d6f7ad8e166a564916202 (patch)
treeeea14e38079a2acaa7f431602cc7dc54ac0aa4c2 /drivers/hwmon
parentc27291468eb957b11dc81cd35fad36faf0861c07 (diff)
downloadnet-8fcefe7812f246fff86d6f7ad8e166a564916202.tar.gz
hwmon: pmbus: mpq8785: Add support for MPM3695 family
Add support for the Monolithic Power Systems MPM3695 family. It contains four devices with suffixes: -10, -20, -25 and -100. The device is PMBus compliant and shares characteristics with the MPM82504. MPM3695-25 has different VOLTAGE_SCALE_LOOP register size [11:0] and therefore needs to have a separate compatible entry. Tested with device tree based matching (MPM3695-10). Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com> Link: https://lore.kernel.org/r/20250511035701.2607947-6-paweldembicki@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/pmbus/mpq8785.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/hwmon/pmbus/mpq8785.c b/drivers/hwmon/pmbus/mpq8785.c
index 8827d5a5731033..1f56aaf4dde807 100644
--- a/drivers/hwmon/pmbus/mpq8785.c
+++ b/drivers/hwmon/pmbus/mpq8785.c
@@ -12,9 +12,11 @@
#define MPM82504_READ_TEMPERATURE_1_SIGN_POS 9
-enum chips { mpm82504, mpq8785 };
+enum chips { mpm3695, mpm3695_25, mpm82504, mpq8785 };
static u16 voltage_scale_loop_max_val[] = {
+ [mpm3695] = GENMASK(9, 0),
+ [mpm3695_25] = GENMASK(11, 0),
[mpm82504] = GENMASK(9, 0),
[mpq8785] = GENMASK(10, 0),
};
@@ -81,6 +83,8 @@ static struct pmbus_driver_info mpq8785_info = {
};
static const struct i2c_device_id mpq8785_id[] = {
+ { "mpm3695", mpm3695 },
+ { "mpm3695-25", mpm3695_25 },
{ "mpm82504", mpm82504 },
{ "mpq8785", mpq8785 },
{ },
@@ -88,6 +92,8 @@ static const struct i2c_device_id mpq8785_id[] = {
MODULE_DEVICE_TABLE(i2c, mpq8785_id);
static const struct of_device_id __maybe_unused mpq8785_of_match[] = {
+ { .compatible = "mps,mpm3695", .data = (void *)mpm3695 },
+ { .compatible = "mps,mpm3695-25", .data = (void *)mpm3695_25 },
{ .compatible = "mps,mpm82504", .data = (void *)mpm82504 },
{ .compatible = "mps,mpq8785", .data = (void *)mpq8785 },
{}
@@ -112,6 +118,8 @@ static int mpq8785_probe(struct i2c_client *client)
chip_id = (kernel_ulong_t)i2c_get_match_data(client);
switch (chip_id) {
+ case mpm3695:
+ case mpm3695_25:
case mpm82504:
info->format[PSC_VOLTAGE_OUT] = direct;
info->m[PSC_VOLTAGE_OUT] = 8;