mirror of https://github.com/torvalds/linux.git
hwmon: (pmbus/adm1275) add sq24905c support
Add support for sq24905c which is similar to adm1275 and other chips of the series. Signed-off-by: ChiShih Tsai <tomtsai764@gmail.com> Link: https://lore.kernel.org/r/20250806223724.1207-3-tomtsai764@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
parent
3331e54692
commit
1ba272bfdf
|
|
@ -67,6 +67,14 @@ Supported chips:
|
|||
|
||||
Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/ADM1293_1294.pdf
|
||||
|
||||
* Silergy SQ24905C
|
||||
|
||||
Prefix: 'mc09c'
|
||||
|
||||
Addresses scanned: -
|
||||
|
||||
Datasheet: https://www.silergy.com/download/downloadFile?id=5669&type=product&ftype=note
|
||||
|
||||
Author: Guenter Roeck <linux@roeck-us.net>
|
||||
|
||||
|
||||
|
|
@ -74,14 +82,14 @@ Description
|
|||
-----------
|
||||
|
||||
This driver supports hardware monitoring for Analog Devices ADM1075, ADM1272,
|
||||
ADM1273, ADM1275, ADM1276, ADM1278, ADM1281, ADM1293, and ADM1294 Hot-Swap
|
||||
Controller and Digital Power Monitors.
|
||||
ADM1273, ADM1275, ADM1276, ADM1278, ADM1281, ADM1293, ADM1294, and SQ24905C
|
||||
Hot-Swap Controller and Digital Power Monitors.
|
||||
|
||||
ADM1075, ADM1272, ADM1273, ADM1275, ADM1276, ADM1278, ADM1281, ADM1293, and
|
||||
ADM1294 are hot-swap controllers that allow a circuit board to be removed from
|
||||
or inserted into a live backplane. They also feature current and voltage
|
||||
readback via an integrated 12 bit analog-to-digital converter (ADC), accessed
|
||||
using a PMBus interface.
|
||||
ADM1075, ADM1272, ADM1273, ADM1275, ADM1276, ADM1278, ADM1281, ADM1293,
|
||||
ADM1294 and SQ24905C are hot-swap controllers that allow a circuit board to be
|
||||
removed from or inserted into a live backplane. They also feature current and
|
||||
voltage readback via an integrated 12 bit analog-to-digital converter (ADC),
|
||||
accessed using a PMBus interface.
|
||||
|
||||
The driver is a client driver to the core PMBus driver. Please see
|
||||
Documentation/hwmon/pmbus.rst for details on PMBus client drivers.
|
||||
|
|
@ -160,5 +168,5 @@ temp1_highest Highest observed temperature.
|
|||
temp1_reset_history Write any value to reset history.
|
||||
|
||||
Temperature attributes are supported on ADM1272,
|
||||
ADM1273, ADM1278, and ADM1281.
|
||||
ADM1273, ADM1278, ADM1281 and SQ24905C.
|
||||
======================= =======================================================
|
||||
|
|
|
|||
|
|
@ -52,7 +52,8 @@ config SENSORS_ADM1275
|
|||
help
|
||||
If you say yes here you get hardware monitoring support for Analog
|
||||
Devices ADM1075, ADM1272, ADM1273, ADM1275, ADM1276, ADM1278, ADM1281,
|
||||
ADM1293, and ADM1294 Hot-Swap Controller and Digital Power Monitors.
|
||||
ADM1293, ADM1294 and SQ24905C Hot-Swap Controller and
|
||||
Digital Power Monitors.
|
||||
|
||||
This driver can also be built as a module. If so, the module will
|
||||
be called adm1275.
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@
|
|||
#include <linux/log2.h>
|
||||
#include "pmbus.h"
|
||||
|
||||
enum chips { adm1075, adm1272, adm1273, adm1275, adm1276, adm1278, adm1281, adm1293, adm1294 };
|
||||
enum chips { adm1075, adm1272, adm1273, adm1275, adm1276, adm1278, adm1281,
|
||||
adm1293, adm1294, sq24905c };
|
||||
|
||||
#define ADM1275_MFR_STATUS_IOUT_WARN2 BIT(0)
|
||||
#define ADM1293_MFR_STATUS_VAUX_UV_WARN BIT(5)
|
||||
|
|
@ -486,6 +487,7 @@ static const struct i2c_device_id adm1275_id[] = {
|
|||
{ "adm1281", adm1281 },
|
||||
{ "adm1293", adm1293 },
|
||||
{ "adm1294", adm1294 },
|
||||
{ "mc09c", sq24905c },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, adm1275_id);
|
||||
|
|
@ -532,7 +534,8 @@ static int adm1275_probe(struct i2c_client *client)
|
|||
dev_err(&client->dev, "Failed to read Manufacturer ID\n");
|
||||
return ret;
|
||||
}
|
||||
if (ret != 3 || strncmp(block_buffer, "ADI", 3)) {
|
||||
if ((ret != 3 || strncmp(block_buffer, "ADI", 3)) &&
|
||||
(ret != 2 || strncmp(block_buffer, "SY", 2))) {
|
||||
dev_err(&client->dev, "Unsupported Manufacturer ID\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
|
@ -558,7 +561,8 @@ static int adm1275_probe(struct i2c_client *client)
|
|||
|
||||
if (mid->driver_data == adm1272 || mid->driver_data == adm1273 ||
|
||||
mid->driver_data == adm1278 || mid->driver_data == adm1281 ||
|
||||
mid->driver_data == adm1293 || mid->driver_data == adm1294)
|
||||
mid->driver_data == adm1293 || mid->driver_data == adm1294 ||
|
||||
mid->driver_data == sq24905c)
|
||||
config_read_fn = i2c_smbus_read_word_data;
|
||||
else
|
||||
config_read_fn = i2c_smbus_read_byte_data;
|
||||
|
|
@ -708,6 +712,7 @@ static int adm1275_probe(struct i2c_client *client)
|
|||
break;
|
||||
case adm1278:
|
||||
case adm1281:
|
||||
case sq24905c:
|
||||
data->have_vout = true;
|
||||
data->have_pin_max = true;
|
||||
data->have_temp_max = true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue