platform/x86: int3472: Stop setting a supply-name for GPIO regulators
authorHans de Goede <hdegoede@redhat.com>
Thu, 17 Apr 2025 11:13:30 +0000 (13:13 +0200)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Thu, 24 Apr 2025 13:05:31 +0000 (16:05 +0300)
The supply_name field is not mandatory and is supposed to be set to
the name of another regulator when it is known that the regulator being
registered is supplied by that other regulator.

Having a regulator supplying the regulator which is being registered does
not apply to the INT3472 GPIO regulator, stop setting a supply_name.

Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: David Heidelberg <david@ixit.cz> # Dell Latitude 9440
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Link: https://lore.kernel.org/r/20250417111337.38142-3-hdegoede@redhat.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/intel/int3472/clk_and_regulator.c
drivers/platform/x86/intel/int3472/common.h

index 837990a..4043459 100644 (file)
@@ -256,12 +256,9 @@ int skl_int3472_register_regulator(struct int3472_discrete_device *int3472,
        snprintf(int3472->regulator.regulator_name,
                 sizeof(int3472->regulator.regulator_name), "%s-regulator",
                 acpi_dev_name(int3472->adev));
-       snprintf(int3472->regulator.supply_name,
-                GPIO_REGULATOR_SUPPLY_NAME_LENGTH, "supply-0");
 
        int3472->regulator.rdesc = INT3472_REGULATOR(
                                                int3472->regulator.regulator_name,
-                                               int3472->regulator.supply_name,
                                                &int3472_gpio_regulator_ops);
 
        int3472->regulator.gpio = gpio;
index 145dec6..72ef222 100644 (file)
 #define INT3472_MAX_SENSOR_GPIOS                               3
 
 #define GPIO_REGULATOR_NAME_LENGTH                             21
-#define GPIO_REGULATOR_SUPPLY_NAME_LENGTH                      9
 #define GPIO_REGULATOR_SUPPLY_MAP_COUNT                                2
 
 #define INT3472_LED_MAX_NAME_LEN                               32
 
 #define CIO2_SENSOR_SSDB_MCLKSPEED_OFFSET                      86
 
-#define INT3472_REGULATOR(_name, _supply, _ops)                        \
+#define INT3472_REGULATOR(_name, _ops)                         \
        (const struct regulator_desc) {                         \
                .name = _name,                                  \
-               .supply_name = _supply,                         \
                .type = REGULATOR_VOLTAGE,                      \
                .ops = _ops,                                    \
                .owner = THIS_MODULE,                           \
@@ -82,7 +80,6 @@ struct int3472_discrete_device {
                /* SUPPLY_MAP_COUNT * 2 to make room for second sensor mappings */
                struct regulator_consumer_supply supply_map[GPIO_REGULATOR_SUPPLY_MAP_COUNT * 2];
                char regulator_name[GPIO_REGULATOR_NAME_LENGTH];
-               char supply_name[GPIO_REGULATOR_SUPPLY_NAME_LENGTH];
                struct gpio_desc *gpio;
                struct regulator_dev *rdev;
                struct regulator_desc rdesc;