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

Configure Feed

Select the types of activity you want to include in your feed.

platform/x86: int3472: Handle GPIO type 0x10 (DOVDD)

The Lenovo ThinkPad X1 Fold 16 Gen 1 has an OV5675 sensor (ACPI HID
OVTI5675) behind an INT3472 discrete PMIC controller. The INT3472
_DSM returns GPIO type 0x10 for one of the pins, which controls the
DOVDD (digital I/O power) regulator enable.

Type 0x10 is not currently handled by the driver, causing the GPIO to
be ignored with a warning. Add INT3472_GPIO_TYPE_DOVDD (0x10) and
handle it as a regulator with con_id "dovdd" to match the supply name
used by sensor drivers (e.g. ov5675).

Also increase GPIO_SUPPLY_NAME_LENGTH from 5 to 6 to accommodate
the "dovdd" name (5 chars + null terminator).

Signed-off-by: Leif Skunberg <diamondback@cohunt.app>
Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Link: https://patch.msgid.link/20260210132129.17943-1-diamondback@cohunt.app
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

authored by

Leif Skunberg and committed by
Ilpo Järvinen
2a7b7652 37da69db

+10 -2
+7
drivers/platform/x86/intel/int3472/discrete.c
··· 223 223 *con_id = "avdd"; 224 224 *gpio_flags = GPIO_ACTIVE_HIGH; 225 225 break; 226 + case INT3472_GPIO_TYPE_DOVDD: 227 + *con_id = "dovdd"; 228 + *gpio_flags = GPIO_ACTIVE_HIGH; 229 + break; 226 230 case INT3472_GPIO_TYPE_HANDSHAKE: 227 231 *con_id = "dvdd"; 228 232 *gpio_flags = GPIO_ACTIVE_HIGH; ··· 255 251 * 0x0b Power enable 256 252 * 0x0c Clock enable 257 253 * 0x0d Privacy LED 254 + * 0x10 DOVDD (digital I/O voltage) 258 255 * 0x13 Hotplug detect 259 256 * 260 257 * There are some known platform specific quirks where that does not quite ··· 337 332 case INT3472_GPIO_TYPE_CLK_ENABLE: 338 333 case INT3472_GPIO_TYPE_PRIVACY_LED: 339 334 case INT3472_GPIO_TYPE_POWER_ENABLE: 335 + case INT3472_GPIO_TYPE_DOVDD: 340 336 case INT3472_GPIO_TYPE_HANDSHAKE: 341 337 gpio = skl_int3472_gpiod_get_from_temp_lookup(int3472, agpio, con_id, gpio_flags); 342 338 if (IS_ERR(gpio)) { ··· 362 356 case INT3472_GPIO_TYPE_POWER_ENABLE: 363 357 second_sensor = int3472->quirks.avdd_second_sensor; 364 358 fallthrough; 359 + case INT3472_GPIO_TYPE_DOVDD: 365 360 case INT3472_GPIO_TYPE_HANDSHAKE: 366 361 ret = skl_int3472_register_regulator(int3472, gpio, enable_time_us, 367 362 con_id, second_sensor);
+3 -2
include/linux/platform_data/x86/int3472.h
··· 26 26 #define INT3472_GPIO_TYPE_POWER_ENABLE 0x0b 27 27 #define INT3472_GPIO_TYPE_CLK_ENABLE 0x0c 28 28 #define INT3472_GPIO_TYPE_PRIVACY_LED 0x0d 29 + #define INT3472_GPIO_TYPE_DOVDD 0x10 29 30 #define INT3472_GPIO_TYPE_HANDSHAKE 0x12 30 31 #define INT3472_GPIO_TYPE_HOTPLUG_DETECT 0x13 31 32 ··· 34 33 #define INT3472_MAX_SENSOR_GPIOS 3 35 34 #define INT3472_MAX_REGULATORS 3 36 35 37 - /* E.g. "avdd\0" */ 38 - #define GPIO_SUPPLY_NAME_LENGTH 5 36 + /* E.g. "dovdd\0" */ 37 + #define GPIO_SUPPLY_NAME_LENGTH 6 39 38 /* 12 chars for acpi_dev_name() + "-", e.g. "ABCD1234:00-" */ 40 39 #define GPIO_REGULATOR_NAME_LENGTH (12 + GPIO_SUPPLY_NAME_LENGTH) 41 40 /* lower- and upper-case mapping */