From 64017d46debdaf7136a54c2b5d8e081b3f2ce8a7 Mon Sep 17 00:00:00 2001 From: Alexis Czezar Torreno Date: Mon, 8 Jun 2026 10:53:28 +0800 Subject: [PATCH 1/7] dt-bindings: hwmon: (pmbus/max20830): add enable-gpios property Adding a missing entry for the MAX20830 EN (enable) pin. Signed-off-by: Alexis Czezar Torreno --- .../devicetree/bindings/hwmon/pmbus/adi,max20830.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/hwmon/pmbus/adi,max20830.yaml b/Documentation/devicetree/bindings/hwmon/pmbus/adi,max20830.yaml index 1625dd59417f1b..ab8f6324866f29 100644 --- a/Documentation/devicetree/bindings/hwmon/pmbus/adi,max20830.yaml +++ b/Documentation/devicetree/bindings/hwmon/pmbus/adi,max20830.yaml @@ -39,6 +39,11 @@ properties: description: Optional 2.5V to 5.5V LDO input supply. + enable-gpios: + description: + GPIO connected to the EN (enable) pin. + maxItems: 1 + pwr-good-gpios: description: GPIO connected to the power-good status output pin. From 77fb1581302c8f3aa972827aa22b6ba8ff565859 Mon Sep 17 00:00:00 2001 From: Alexis Czezar Torreno Date: Mon, 8 Jun 2026 10:58:30 +0800 Subject: [PATCH 2/7] hwmon: (pmbus/max20830): add support for enable GPIO Add support for the GPIO controlled EN pin. The EN pin is asserted high for device to operate. Signed-off-by: Alexis Czezar Torreno --- drivers/hwmon/pmbus/max20830.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/hwmon/pmbus/max20830.c b/drivers/hwmon/pmbus/max20830.c index e3470118fd36c8..f116cc2687fc7e 100644 --- a/drivers/hwmon/pmbus/max20830.c +++ b/drivers/hwmon/pmbus/max20830.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include @@ -28,8 +29,14 @@ static struct pmbus_driver_info max20830_info = { static int max20830_probe(struct i2c_client *client) { u8 buf[I2C_SMBUS_BLOCK_MAX + 1] = {}; + struct gpio_desc *enable_gpio; int ret; + enable_gpio = devm_gpiod_get_optional(&client->dev, "enable", GPIOD_OUT_HIGH); + if (IS_ERR(enable_gpio)) + return dev_err_probe(&client->dev, PTR_ERR(enable_gpio), + "Failed to get enable GPIO\n"); + if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_READ_BLOCK_DATA) && !i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_READ_I2C_BLOCK)) return -ENODEV; From 6bb908b643c5d0b185d37aa87b031ff68aa98b44 Mon Sep 17 00:00:00 2001 From: Alexis Czezar Torreno Date: Thu, 25 Jun 2026 08:59:36 +0800 Subject: [PATCH 3/7] dt-bindings: hwmon: (pmbus/max20830): add VOUT feedback resistor properties Add adi,vout-rfb1-ohms and adi,vout-rfb2-ohms properties to support external voltage divider configuration for VOUT sensing. When the desired output voltage is higher than VREF, a resistor divider (RFB1 and RFB2) is required to reach the intended value. The properties use a dependency constraint to ensure both resistors are specified together, or neither. This prevents misconfiguration where only one resistor value is provided. Signed-off-by: Alexis Czezar Torreno --- .../bindings/hwmon/pmbus/adi,max20830.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Documentation/devicetree/bindings/hwmon/pmbus/adi,max20830.yaml b/Documentation/devicetree/bindings/hwmon/pmbus/adi,max20830.yaml index ab8f6324866f29..caedad40bc592c 100644 --- a/Documentation/devicetree/bindings/hwmon/pmbus/adi,max20830.yaml +++ b/Documentation/devicetree/bindings/hwmon/pmbus/adi,max20830.yaml @@ -49,11 +49,26 @@ properties: GPIO connected to the power-good status output pin. maxItems: 1 + adi,vout-rfb1-ohms: + description: + Top feedback resistor (RFB1) value in ohms for VOUT sensing divider. + When the desired output voltage is higher than VREF, a resistor divider + is required. VOUT = VREF × (1 + RFB1/RFB2) + + adi,vout-rfb2-ohms: + description: + Bottom feedback resistor (RFB2) value in ohms for VOUT sensing divider. + Datasheet recommends that RFB2 does not exceed 2.5kΩ. + required: - compatible - reg - vddh-supply +dependencies: + adi,vout-rfb1-ohms: ['adi,vout-rfb2-ohms'] + adi,vout-rfb2-ohms: ['adi,vout-rfb1-ohms'] + unevaluatedProperties: false examples: @@ -66,6 +81,8 @@ examples: compatible = "adi,max20830"; reg = <0x30>; vddh-supply = <&vddh>; + adi,vout-rfb1-ohms = <10000>; + adi,vout-rfb2-ohms = <2000>; }; }; ... From 28a7a1180045ac86c0501bd8c13486da0498f8f9 Mon Sep 17 00:00:00 2001 From: Alexis Czezar Torreno Date: Thu, 25 Jun 2026 09:31:52 +0800 Subject: [PATCH 4/7] hwmon: (pmbus/max20830): add VOUT feedback resistor scaling support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implement support for external voltage divider scaling using the adi,vout-rfb1-ohms and adi,vout-rfb2-ohms device tree properties. When the desired output voltage exceeds VREF, a resistor divider (RFB1 and RFB2) is used to scale down the feedback voltage. The driver reads these resistor values from device tree and applies the scaling formula: VOUT_actual = VOUT_measured × (1 + RFB1/RFB2) The properties are optional. If not specified, the driver assumes no voltage divider is present and reports the raw VOUT reading. Signed-off-by: Alexis Czezar Torreno --- drivers/hwmon/pmbus/max20830.c | 43 ++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/drivers/hwmon/pmbus/max20830.c b/drivers/hwmon/pmbus/max20830.c index f116cc2687fc7e..a3abd24437e8e7 100644 --- a/drivers/hwmon/pmbus/max20830.c +++ b/drivers/hwmon/pmbus/max20830.c @@ -8,12 +8,43 @@ #include #include #include +#include +#include #include #include #include "pmbus.h" #define MAX20830_IC_DEVICE_ID_LENGTH 9 +struct max20830_data { + struct pmbus_driver_info info; + u32 vout_rfb1; + u32 vout_rfb2; +}; + +static int max20830_read_word_data(struct i2c_client *client, int page, + int phase, int reg) +{ + const struct pmbus_driver_info *info = pmbus_get_driver_info(client); + const struct max20830_data *data = container_of(info, struct max20830_data, info); + int ret; + + switch (reg) { + case PMBUS_READ_VOUT: + ret = pmbus_read_word_data(client, page, phase, reg); + if (ret < 0) + return ret; + + /* Apply voltage divider scaling if resistors are non-zero */ + if (data->vout_rfb1 && data->vout_rfb2) + ret = DIV_ROUND_CLOSEST_ULL((u64)ret * (data->vout_rfb1 + + data->vout_rfb2), data->vout_rfb2); + return ret; + default: + return -ENODATA; + } +} + static struct pmbus_driver_info max20830_info = { .pages = 1, .format[PSC_VOLTAGE_IN] = linear, @@ -24,14 +55,26 @@ static struct pmbus_driver_info max20830_info = { PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_VOUT | PMBUS_HAVE_STATUS_IOUT | PMBUS_HAVE_STATUS_INPUT | PMBUS_HAVE_STATUS_TEMP, + .read_word_data = max20830_read_word_data, }; static int max20830_probe(struct i2c_client *client) { u8 buf[I2C_SMBUS_BLOCK_MAX + 1] = {}; + struct max20830_data *data; struct gpio_desc *enable_gpio; int ret; + data = devm_kzalloc(&client->dev, sizeof(*data), GFP_KERNEL); + if (!data) + return -ENOMEM; + + data->info = max20830_info; + + /* Read optional voltage divider resistor values */ + device_property_read_u32(&client->dev, "adi,vout-rfb1-ohms", &data->vout_rfb1); + device_property_read_u32(&client->dev, "adi,vout-rfb2-ohms", &data->vout_rfb2); + enable_gpio = devm_gpiod_get_optional(&client->dev, "enable", GPIOD_OUT_HIGH); if (IS_ERR(enable_gpio)) return dev_err_probe(&client->dev, PTR_ERR(enable_gpio), From 1708c7b84c45430f4e2f2fcf8114d5c623d6dee2 Mon Sep 17 00:00:00 2001 From: Alexis Czezar Torreno Date: Mon, 8 Jun 2026 10:47:58 +0800 Subject: [PATCH 5/7] dt-bindings: hwmon: (pmbus/max20830): add max20830c and max20840c support Add compatible strings for variants of MAX20830 which are MAX20830C and MAX20840C. These devices have the same register functionality with MAX20830 but with a longer IC_DEVICE_ID. Signed-off-by: Alexis Czezar Torreno --- .../devicetree/bindings/hwmon/pmbus/adi,max20830.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/hwmon/pmbus/adi,max20830.yaml b/Documentation/devicetree/bindings/hwmon/pmbus/adi,max20830.yaml index caedad40bc592c..b8ca8ec0446fae 100644 --- a/Documentation/devicetree/bindings/hwmon/pmbus/adi,max20830.yaml +++ b/Documentation/devicetree/bindings/hwmon/pmbus/adi,max20830.yaml @@ -22,7 +22,13 @@ allOf: properties: compatible: - const: adi,max20830 + oneOf: + - const: adi,max20830 + - items: + - enum: + - adi,max20830c + - adi,max20840c + - const: adi,max20830 # Fallback compatible reg: maxItems: 1 From 6f50196dfc1250fe2521504ebaa0a07914b5b5c9 Mon Sep 17 00:00:00 2001 From: Alexis Czezar Torreno Date: Fri, 5 Jun 2026 14:06:30 +0800 Subject: [PATCH 6/7] hwmon: (pmbus/max20830): add support for max20830c and max20840c Add support for MAX20830C and MAX20840 step-down DC-DC switching regulator with PMBus interface. MAX20830C is a different packaging for MAX20830, and MAX20840C supports 40A regulation compared to MAX20830 that is only 30A. Signed-off-by: Alexis Czezar Torreno --- Documentation/hwmon/max20830.rst | 27 ++++++++++--- drivers/hwmon/pmbus/max20830.c | 68 ++++++++++++++++++++++---------- 2 files changed, 70 insertions(+), 25 deletions(-) diff --git a/Documentation/hwmon/max20830.rst b/Documentation/hwmon/max20830.rst index 936e409dcc5c08..b850f3b6e40d1f 100644 --- a/Documentation/hwmon/max20830.rst +++ b/Documentation/hwmon/max20830.rst @@ -13,6 +13,22 @@ Supported chips: Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/max20830.pdf + * Analog Devices MAX20830C + + Prefix: 'max20830c' + + Addresses scanned: - + + Datasheet: + + * Analog Devices MAX20840C + + Prefix: 'max20840c' + + Addresses scanned: - + + Datasheet: + Author: - Alexis Czezar Torreno @@ -21,12 +37,13 @@ Author: Description ----------- -This driver supports hardware monitoring for Analog Devices MAX20830 -Step-Down Switching Regulator with PMBus Interface. +This driver supports hardware monitoring for Analog Devices MAX20830, MAX20830C +and MAX20840C. These are Step-Down Switching Regulator with PMBus Interface. -The MAX20830 is a 2.7V to 16V, 30A fully integrated step-down DC-DC switching -regulator. Through the PMBus interface, the device can monitor input/output -voltages, output current and temperature. +MAX20830, and MAX20830C are 2.7V to 16V, 30A fully integrated step-down DC-DC +switching regulators. MAX20840C is similar but can reach 40A. Through the PMBus +interface, these devices can monitor input/output voltages, output current and +temperature. The driver is a client driver to the core PMBus driver. Please see Documentation/hwmon/pmbus.rst for details on PMBus client drivers. diff --git a/drivers/hwmon/pmbus/max20830.c b/drivers/hwmon/pmbus/max20830.c index a3abd24437e8e7..252c77beb243c5 100644 --- a/drivers/hwmon/pmbus/max20830.c +++ b/drivers/hwmon/pmbus/max20830.c @@ -14,7 +14,30 @@ #include #include "pmbus.h" -#define MAX20830_IC_DEVICE_ID_LENGTH 9 +struct max20830_chip_info { + const char *id_str; + u8 id_length; +}; + +static const struct max20830_chip_info max20830_chip = { + /* + * MAX20830 IC_DEVICE_ID has a byte length of 9 despite being an 8 + * character string, as it includes a null terminator. The other + * devices do not include null. + */ + .id_str = "MAX20830\0", + .id_length = 9, +}; + +static const struct max20830_chip_info max20830c_chip = { + .id_str = "MAX20830C", + .id_length = 9, +}; + +static const struct max20830_chip_info max20840c_chip = { + .id_str = "MAX20840C", + .id_length = 9, +}; struct max20830_data { struct pmbus_driver_info info; @@ -60,11 +83,14 @@ static struct pmbus_driver_info max20830_info = { static int max20830_probe(struct i2c_client *client) { + const struct max20830_chip_info *chip; u8 buf[I2C_SMBUS_BLOCK_MAX + 1] = {}; struct max20830_data *data; struct gpio_desc *enable_gpio; int ret; + chip = i2c_get_match_data(client); + data = devm_kzalloc(&client->dev, sizeof(*data), GFP_KERNEL); if (!data) return -ENOMEM; @@ -90,16 +116,14 @@ static int max20830_probe(struct i2c_client *client) * which do not support SMBus block reads. */ if (i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_READ_BLOCK_DATA)) { - /* Reads 9 Data bytes from MAX20830 */ ret = i2c_smbus_read_block_data(client, PMBUS_IC_DEVICE_ID, buf); if (ret < 0) return dev_err_probe(&client->dev, ret, "Failed to read IC_DEVICE_ID\n"); } else { - /* Reads 1 length byte + 9 Data bytes from MAX20830 */ + /* Reads 1 length byte + data bytes */ ret = i2c_smbus_read_i2c_block_data(client, PMBUS_IC_DEVICE_ID, - MAX20830_IC_DEVICE_ID_LENGTH + 1, - buf); + chip->id_length + 1, buf); if (ret < 0) return dev_err_probe(&client->dev, ret, "Failed to read IC_DEVICE_ID\n"); @@ -108,36 +132,40 @@ static int max20830_probe(struct i2c_client *client) * match the format of i2c_smbus_read_block_data(). * Also adjust return value to reflect length byte removal. */ - memmove(buf, buf + 1, MAX20830_IC_DEVICE_ID_LENGTH); + memmove(buf, buf + 1, chip->id_length); ret = ret - 1; } - /* - * MAX20830 IC_DEVICE_ID sends string data "MAX20830\0". - * Return value should at least be 9 bytes of data. - */ - if (ret < MAX20830_IC_DEVICE_ID_LENGTH) + /* Verify we read the expected number of bytes */ + if (ret < chip->id_length) return dev_err_probe(&client->dev, -ENODEV, - "IC_DEVICE_ID too short: expected at least 9 bytes, got %d\n", - ret); + "IC_DEVICE_ID too short: expected %d bytes, got %d\n", + chip->id_length, ret); + + /* Null-terminate the string */ + buf[chip->id_length] = '\0'; - /* 9 bytes of data, buf[0]-buf[7] = "MAX20830", buf[8] = '\0' */ - buf[MAX20830_IC_DEVICE_ID_LENGTH - 1] = '\0'; - if (strncmp(buf, "MAX20830", MAX20830_IC_DEVICE_ID_LENGTH - 1)) + /* Verify the device ID matches what we expect */ + if (strncmp(buf, chip->id_str, chip->id_length)) return dev_err_probe(&client->dev, -ENODEV, - "Unsupported device: '%s'\n", buf); + "Device mismatch: expected '%s', got '%s'\n", + chip->id_str, buf); - return pmbus_do_probe(client, &max20830_info); + return pmbus_do_probe(client, &data->info); } static const struct i2c_device_id max20830_id[] = { - {"max20830"}, + { "max20830", (kernel_ulong_t)&max20830_chip }, + { "max20830c", (kernel_ulong_t)&max20830c_chip }, + { "max20840c", (kernel_ulong_t)&max20840c_chip }, { } }; MODULE_DEVICE_TABLE(i2c, max20830_id); static const struct of_device_id max20830_of_match[] = { - { .compatible = "adi,max20830" }, + { .compatible = "adi,max20830", .data = &max20830_chip }, + { .compatible = "adi,max20830c", .data = &max20830c_chip }, + { .compatible = "adi,max20840c", .data = &max20840c_chip }, { } }; MODULE_DEVICE_TABLE(of, max20830_of_match); From 35316c0f8e0169ff9fd874678a9d865782bb7dd0 Mon Sep 17 00:00:00 2001 From: Alexis Czezar Torreno Date: Tue, 28 Jul 2026 15:42:19 +0800 Subject: [PATCH 7/7] temp running ci/cd Signed-off-by: Alexis Czezar Torreno --- drivers/hwmon/pmbus/max20830.c | 100 ++++++++++++++++----------------- 1 file changed, 48 insertions(+), 52 deletions(-) diff --git a/drivers/hwmon/pmbus/max20830.c b/drivers/hwmon/pmbus/max20830.c index 252c77beb243c5..94433deda0113a 100644 --- a/drivers/hwmon/pmbus/max20830.c +++ b/drivers/hwmon/pmbus/max20830.c @@ -6,7 +6,6 @@ */ #include -#include #include #include #include @@ -14,30 +13,7 @@ #include #include "pmbus.h" -struct max20830_chip_info { - const char *id_str; - u8 id_length; -}; - -static const struct max20830_chip_info max20830_chip = { - /* - * MAX20830 IC_DEVICE_ID has a byte length of 9 despite being an 8 - * character string, as it includes a null terminator. The other - * devices do not include null. - */ - .id_str = "MAX20830\0", - .id_length = 9, -}; - -static const struct max20830_chip_info max20830c_chip = { - .id_str = "MAX20830C", - .id_length = 9, -}; - -static const struct max20830_chip_info max20840c_chip = { - .id_str = "MAX20840C", - .id_length = 9, -}; +#define MAX20830_IC_DEVICE_ID_LENGTH 9 struct max20830_data { struct pmbus_driver_info info; @@ -45,12 +21,37 @@ struct max20830_data { u32 vout_rfb2; }; +static const char * const supported_chip_ids[] = { + "MAX20830", + "MAX20830C", + "MAX20840C", +}; + +/* + * MAX20830 only supports READ_VOUT for VOUT monitoring. + * + * Limit registers (VOUT_OV_WARN_LIMIT, VOUT_OV_FAULT_LIMIT, etc.) are not + * supported by this driver and return -ENODATA. This means sysfs attributes + * like in1_max, in1_crit, etc. will not be available. Only in1_input (the + * scaled output voltage) is supported. + * + * MAX20830 uses an external resistor divider for voltage sensing: + * - VOUT_COMMAND and VOUT_MAX set the reference voltage at the feedback pin + * - READ_VOUT reports the feedback voltage, which needs to be scaled for actual + * output voltage + * + * Scaling formula: vout_actual = vout_fb × (1 + RFB1 / RFB2) + * + * If regulator support is added in the future, some adjustments are needed to + * ensure correct feedback voltages are set. + */ static int max20830_read_word_data(struct i2c_client *client, int page, int phase, int reg) { const struct pmbus_driver_info *info = pmbus_get_driver_info(client); const struct max20830_data *data = container_of(info, struct max20830_data, info); int ret; + u64 temp; switch (reg) { case PMBUS_READ_VOUT: @@ -59,9 +60,11 @@ static int max20830_read_word_data(struct i2c_client *client, int page, return ret; /* Apply voltage divider scaling if resistors are non-zero */ - if (data->vout_rfb1 && data->vout_rfb2) - ret = DIV_ROUND_CLOSEST_ULL((u64)ret * (data->vout_rfb1 + - data->vout_rfb2), data->vout_rfb2); + if (data->vout_rfb1 && data->vout_rfb2) { + temp = (u64)data->vout_rfb1 + (u64)data->vout_rfb2; + temp = DIV_ROUND_CLOSEST_ULL((u64)ret * temp, data->vout_rfb2); + ret = clamp_val(temp, 0, 0xFFFF); + } return ret; default: return -ENODATA; @@ -83,13 +86,9 @@ static struct pmbus_driver_info max20830_info = { static int max20830_probe(struct i2c_client *client) { - const struct max20830_chip_info *chip; u8 buf[I2C_SMBUS_BLOCK_MAX + 1] = {}; struct max20830_data *data; - struct gpio_desc *enable_gpio; - int ret; - - chip = i2c_get_match_data(client); + int i, ret; data = devm_kzalloc(&client->dev, sizeof(*data), GFP_KERNEL); if (!data) @@ -101,11 +100,6 @@ static int max20830_probe(struct i2c_client *client) device_property_read_u32(&client->dev, "adi,vout-rfb1-ohms", &data->vout_rfb1); device_property_read_u32(&client->dev, "adi,vout-rfb2-ohms", &data->vout_rfb2); - enable_gpio = devm_gpiod_get_optional(&client->dev, "enable", GPIOD_OUT_HIGH); - if (IS_ERR(enable_gpio)) - return dev_err_probe(&client->dev, PTR_ERR(enable_gpio), - "Failed to get enable GPIO\n"); - if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_READ_BLOCK_DATA) && !i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_READ_I2C_BLOCK)) return -ENODEV; @@ -123,7 +117,8 @@ static int max20830_probe(struct i2c_client *client) } else { /* Reads 1 length byte + data bytes */ ret = i2c_smbus_read_i2c_block_data(client, PMBUS_IC_DEVICE_ID, - chip->id_length + 1, buf); + MAX20830_IC_DEVICE_ID_LENGTH + 1, + buf); if (ret < 0) return dev_err_probe(&client->dev, ret, "Failed to read IC_DEVICE_ID\n"); @@ -132,40 +127,41 @@ static int max20830_probe(struct i2c_client *client) * match the format of i2c_smbus_read_block_data(). * Also adjust return value to reflect length byte removal. */ - memmove(buf, buf + 1, chip->id_length); + memmove(buf, buf + 1, MAX20830_IC_DEVICE_ID_LENGTH); ret = ret - 1; } /* Verify we read the expected number of bytes */ - if (ret < chip->id_length) + if (ret < MAX20830_IC_DEVICE_ID_LENGTH) return dev_err_probe(&client->dev, -ENODEV, "IC_DEVICE_ID too short: expected %d bytes, got %d\n", - chip->id_length, ret); + MAX20830_IC_DEVICE_ID_LENGTH, ret); /* Null-terminate the string */ - buf[chip->id_length] = '\0'; + buf[ret] = '\0'; /* Verify the device ID matches what we expect */ - if (strncmp(buf, chip->id_str, chip->id_length)) + for (i = 0; i < ARRAY_SIZE(supported_chip_ids); i++) { + if (!strcmp(buf, supported_chip_ids[i])) + break; + } + + /* No match found - unsupported device */ + if (i == ARRAY_SIZE(supported_chip_ids)) return dev_err_probe(&client->dev, -ENODEV, - "Device mismatch: expected '%s', got '%s'\n", - chip->id_str, buf); + "Unsupported device: '%*pE'\n", ret, buf); return pmbus_do_probe(client, &data->info); } static const struct i2c_device_id max20830_id[] = { - { "max20830", (kernel_ulong_t)&max20830_chip }, - { "max20830c", (kernel_ulong_t)&max20830c_chip }, - { "max20840c", (kernel_ulong_t)&max20840c_chip }, + {"max20830"}, { } }; MODULE_DEVICE_TABLE(i2c, max20830_id); static const struct of_device_id max20830_of_match[] = { - { .compatible = "adi,max20830", .data = &max20830_chip }, - { .compatible = "adi,max20830c", .data = &max20830c_chip }, - { .compatible = "adi,max20840c", .data = &max20840c_chip }, + { .compatible = "adi,max20830" }, { } }; MODULE_DEVICE_TABLE(of, max20830_of_match);