Skip to content

Commit adc52dd

Browse files
jemfgeronimogroeck
authored andcommitted
hwmon: (pmbus/adm1275) add adm1273 support
Add support for adm1273 which is similar to adm1275 and other chips of the series. Signed-off-by: John Erasmus Mari Geronimo <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]>
1 parent 2b2b62a commit adc52dd

File tree

3 files changed

+25
-15
lines changed

3 files changed

+25
-15
lines changed

Documentation/hwmon/adm1275.rst

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ Supported chips:
1919

2020
Datasheet: www.analog.com/static/imported-files/data_sheets/ADM1272.pdf
2121

22+
* Analog Devices ADM1273
23+
24+
Prefix: 'adm1273'
25+
26+
Addresses scanned: -
27+
28+
Datasheet: Not yet publicly available
29+
2230
* Analog Devices ADM1275
2331

2432
Prefix: 'adm1275'
@@ -66,14 +74,14 @@ Description
6674
-----------
6775

6876
This driver supports hardware monitoring for Analog Devices ADM1075, ADM1272,
69-
ADM1275, ADM1276, ADM1278, ADM1281, ADM1293, and ADM1294 Hot-Swap Controller and
70-
Digital Power Monitors.
77+
ADM1273, ADM1275, ADM1276, ADM1278, ADM1281, ADM1293, and ADM1294 Hot-Swap
78+
Controller and Digital Power Monitors.
7179

72-
ADM1075, ADM1272, ADM1275, ADM1276, ADM1278, ADM1281, ADM1293, and ADM1294 are hot-swap
73-
controllers that allow a circuit board to be removed from or inserted into
74-
a live backplane. They also feature current and voltage readback via an
75-
integrated 12 bit analog-to-digital converter (ADC), accessed using a
76-
PMBus interface.
80+
ADM1075, ADM1272, ADM1273, ADM1275, ADM1276, ADM1278, ADM1281, ADM1293, and
81+
ADM1294 are hot-swap controllers that allow a circuit board to be removed from
82+
or inserted into a live backplane. They also feature current and voltage
83+
readback via an integrated 12 bit analog-to-digital converter (ADC), accessed
84+
using a PMBus interface.
7785

7886
The driver is a client driver to the core PMBus driver. Please see
7987
Documentation/hwmon/pmbus.rst for details on PMBus client drivers.
@@ -141,7 +149,7 @@ power1_input_highest Highest observed input power.
141149
power1_reset_history Write any value to reset history.
142150

143151
Power attributes are supported on ADM1075, ADM1272,
144-
ADM1276, ADM1293, and ADM1294.
152+
ADM1273, ADM1276, ADM1293, and ADM1294.
145153

146154
temp1_input Chip temperature.
147155
temp1_max Maximum chip temperature.
@@ -151,6 +159,6 @@ temp1_crit_alarm Critical temperature high alarm.
151159
temp1_highest Highest observed temperature.
152160
temp1_reset_history Write any value to reset history.
153161

154-
Temperature attributes are supported on ADM1272 and
155-
ADM1278, and ADM1281.
162+
Temperature attributes are supported on ADM1272,
163+
ADM1273, ADM1278, and ADM1281.
156164
======================= =======================================================

drivers/hwmon/pmbus/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ config SENSORS_ADM1275
5151
tristate "Analog Devices ADM1275 and compatibles"
5252
help
5353
If you say yes here you get hardware monitoring support for Analog
54-
Devices ADM1075, ADM1272, ADM1275, ADM1276, ADM1278, ADM1281,
54+
Devices ADM1075, ADM1272, ADM1273, ADM1275, ADM1276, ADM1278, ADM1281,
5555
ADM1293, and ADM1294 Hot-Swap Controller and Digital Power Monitors.
5656

5757
This driver can also be built as a module. If so, the module will

drivers/hwmon/pmbus/adm1275.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include <linux/log2.h>
1919
#include "pmbus.h"
2020

21-
enum chips { adm1075, adm1272, adm1275, adm1276, adm1278, adm1281, adm1293, adm1294 };
21+
enum chips { adm1075, adm1272, adm1273, adm1275, adm1276, adm1278, adm1281, adm1293, adm1294 };
2222

2323
#define ADM1275_MFR_STATUS_IOUT_WARN2 BIT(0)
2424
#define ADM1293_MFR_STATUS_VAUX_UV_WARN BIT(5)
@@ -479,6 +479,7 @@ static int adm1275_read_byte_data(struct i2c_client *client, int page, int reg)
479479
static const struct i2c_device_id adm1275_id[] = {
480480
{ "adm1075", adm1075 },
481481
{ "adm1272", adm1272 },
482+
{ "adm1273", adm1273 },
482483
{ "adm1275", adm1275 },
483484
{ "adm1276", adm1276 },
484485
{ "adm1278", adm1278 },
@@ -555,9 +556,9 @@ static int adm1275_probe(struct i2c_client *client)
555556
"Device mismatch: Configured %s, detected %s\n",
556557
client->name, mid->name);
557558

558-
if (mid->driver_data == adm1272 || mid->driver_data == adm1278 ||
559-
mid->driver_data == adm1281 || mid->driver_data == adm1293 ||
560-
mid->driver_data == adm1294)
559+
if (mid->driver_data == adm1272 || mid->driver_data == adm1273 ||
560+
mid->driver_data == adm1278 || mid->driver_data == adm1281 ||
561+
mid->driver_data == adm1293 || mid->driver_data == adm1294)
561562
config_read_fn = i2c_smbus_read_word_data;
562563
else
563564
config_read_fn = i2c_smbus_read_byte_data;
@@ -630,6 +631,7 @@ static int adm1275_probe(struct i2c_client *client)
630631
PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT;
631632
break;
632633
case adm1272:
634+
case adm1273:
633635
data->have_vout = true;
634636
data->have_pin_max = true;
635637
data->have_temp_max = true;

0 commit comments

Comments
 (0)