Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

ChiShih Tsai and committed by
Guenter Roeck
1ba272bf 3331e546

+26 -12
+16 -8
Documentation/hwmon/adm1275.rst
··· 67 67 68 68 Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/ADM1293_1294.pdf 69 69 70 + * Silergy SQ24905C 71 + 72 + Prefix: 'mc09c' 73 + 74 + Addresses scanned: - 75 + 76 + Datasheet: https://www.silergy.com/download/downloadFile?id=5669&type=product&ftype=note 77 + 70 78 Author: Guenter Roeck <linux@roeck-us.net> 71 79 72 80 ··· 82 74 ----------- 83 75 84 76 This driver supports hardware monitoring for Analog Devices ADM1075, ADM1272, 85 - ADM1273, ADM1275, ADM1276, ADM1278, ADM1281, ADM1293, and ADM1294 Hot-Swap 86 - Controller and Digital Power Monitors. 77 + ADM1273, ADM1275, ADM1276, ADM1278, ADM1281, ADM1293, ADM1294, and SQ24905C 78 + Hot-Swap Controller and Digital Power Monitors. 87 79 88 - ADM1075, ADM1272, ADM1273, ADM1275, ADM1276, ADM1278, ADM1281, ADM1293, and 89 - ADM1294 are hot-swap controllers that allow a circuit board to be removed from 90 - or inserted into a live backplane. They also feature current and voltage 91 - readback via an integrated 12 bit analog-to-digital converter (ADC), accessed 92 - using a PMBus interface. 80 + ADM1075, ADM1272, ADM1273, ADM1275, ADM1276, ADM1278, ADM1281, ADM1293, 81 + ADM1294 and SQ24905C are hot-swap controllers that allow a circuit board to be 82 + removed from or inserted into a live backplane. They also feature current and 83 + voltage readback via an integrated 12 bit analog-to-digital converter (ADC), 84 + accessed using a PMBus interface. 93 85 94 86 The driver is a client driver to the core PMBus driver. Please see 95 87 Documentation/hwmon/pmbus.rst for details on PMBus client drivers. ··· 168 160 temp1_reset_history Write any value to reset history. 169 161 170 162 Temperature attributes are supported on ADM1272, 171 - ADM1273, ADM1278, and ADM1281. 163 + ADM1273, ADM1278, ADM1281 and SQ24905C. 172 164 ======================= =======================================================
+2 -1
drivers/hwmon/pmbus/Kconfig
··· 52 52 help 53 53 If you say yes here you get hardware monitoring support for Analog 54 54 Devices ADM1075, ADM1272, ADM1273, ADM1275, ADM1276, ADM1278, ADM1281, 55 - ADM1293, and ADM1294 Hot-Swap Controller and Digital Power Monitors. 55 + ADM1293, ADM1294 and SQ24905C Hot-Swap Controller and 56 + Digital Power Monitors. 56 57 57 58 This driver can also be built as a module. If so, the module will 58 59 be called adm1275.
+8 -3
drivers/hwmon/pmbus/adm1275.c
··· 18 18 #include <linux/log2.h> 19 19 #include "pmbus.h" 20 20 21 - enum chips { adm1075, adm1272, adm1273, adm1275, adm1276, adm1278, adm1281, adm1293, adm1294 }; 21 + enum chips { adm1075, adm1272, adm1273, adm1275, adm1276, adm1278, adm1281, 22 + adm1293, adm1294, sq24905c }; 22 23 23 24 #define ADM1275_MFR_STATUS_IOUT_WARN2 BIT(0) 24 25 #define ADM1293_MFR_STATUS_VAUX_UV_WARN BIT(5) ··· 487 486 { "adm1281", adm1281 }, 488 487 { "adm1293", adm1293 }, 489 488 { "adm1294", adm1294 }, 489 + { "mc09c", sq24905c }, 490 490 { } 491 491 }; 492 492 MODULE_DEVICE_TABLE(i2c, adm1275_id); ··· 534 532 dev_err(&client->dev, "Failed to read Manufacturer ID\n"); 535 533 return ret; 536 534 } 537 - if (ret != 3 || strncmp(block_buffer, "ADI", 3)) { 535 + if ((ret != 3 || strncmp(block_buffer, "ADI", 3)) && 536 + (ret != 2 || strncmp(block_buffer, "SY", 2))) { 538 537 dev_err(&client->dev, "Unsupported Manufacturer ID\n"); 539 538 return -ENODEV; 540 539 } ··· 561 558 562 559 if (mid->driver_data == adm1272 || mid->driver_data == adm1273 || 563 560 mid->driver_data == adm1278 || mid->driver_data == adm1281 || 564 - mid->driver_data == adm1293 || mid->driver_data == adm1294) 561 + mid->driver_data == adm1293 || mid->driver_data == adm1294 || 562 + mid->driver_data == sq24905c) 565 563 config_read_fn = i2c_smbus_read_word_data; 566 564 else 567 565 config_read_fn = i2c_smbus_read_byte_data; ··· 712 708 break; 713 709 case adm1278: 714 710 case adm1281: 711 + case sq24905c: 715 712 data->have_vout = true; 716 713 data->have_pin_max = true; 717 714 data->have_temp_max = true;