aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/intel/int3472/discrete.c
diff options
context:
space:
mode:
authorHans de Goede <[email protected]>2025-04-17 11:13:33 +0000
committerIlpo Järvinen <[email protected]>2025-04-24 13:05:36 +0000
commit033234bdc6cfb88a797a16aa3a9df815bbe01a28 (patch)
treed66ccd53fabbafdab748342cab71d6f8f01b77ab /drivers/platform/x86/intel/int3472/discrete.c
parentplatform/x86: int3472: Rework AVDD second sensor quirk handling (diff)
downloadkernel-033234bdc6cfb88a797a16aa3a9df815bbe01a28.tar.gz
kernel-033234bdc6cfb88a797a16aa3a9df815bbe01a28.zip
platform/x86: int3472: Make regulator supply name configurable
This is a preparation patch for registering multiple regulators, which requires a different supply-name for each regulator. Make supply-name a parameter to skl_int3472_register_regulator() and use con-id to set it so that the existing int3472_gpio_map remapping can be used with it. Since supply-name is a parameter now, drop the fixed skl_int3472_regulator_map_supplies[] array and instead add lower- and upper-case mappings of the passed-in supply-name to the regulator. Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Tested-by: David Heidelberg <[email protected]> # Dell Latitude 9440 Reviewed-by: Sakari Ailus <[email protected]> Link: https://lore.kernel.org/r/[email protected] [ij: GPIO_SUPPPLY_NAME_LENGTH -> GPIO_SUPPLY_NAME_LENGTH] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
Diffstat (limited to 'drivers/platform/x86/intel/int3472/discrete.c')
-rw-r--r--drivers/platform/x86/intel/int3472/discrete.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/platform/x86/intel/int3472/discrete.c b/drivers/platform/x86/intel/int3472/discrete.c
index cbf39459bdf0..f6dae82739e5 100644
--- a/drivers/platform/x86/intel/int3472/discrete.c
+++ b/drivers/platform/x86/intel/int3472/discrete.c
@@ -188,7 +188,7 @@ static void int3472_get_con_id_and_polarity(struct acpi_device *adev, u8 *type,
*gpio_flags = GPIO_ACTIVE_HIGH;
break;
case INT3472_GPIO_TYPE_POWER_ENABLE:
- *con_id = "power-enable";
+ *con_id = "avdd";
*gpio_flags = GPIO_ACTIVE_HIGH;
break;
default:
@@ -311,7 +311,7 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares,
break;
case INT3472_GPIO_TYPE_POWER_ENABLE:
- ret = skl_int3472_register_regulator(int3472, gpio,
+ ret = skl_int3472_register_regulator(int3472, gpio, con_id,
int3472->quirks.avdd_second_sensor);
if (ret)
err_msg = "Failed to map regulator to sensor\n";