mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hans de Goede <hansg@kernel.org>
To: Leif Skunberg <diamondback@cohunt.app>,
	dan.scally@ideasonboard.com, sakari.ailus@linux.intel.com
Cc: ilpo.jarvinen@linux.intel.com,
	platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] platform/x86: int3472: Handle GPIO type 0x10 (DOVDD)
Date: Tue, 10 Feb 2026 14:31:08 +0100	[thread overview]
Message-ID: <068af0f9-596d-4c74-af64-b99062ff8f76@kernel.org> (raw)
In-Reply-To: <20260210132129.17943-1-diamondback@cohunt.app>

Hi,

On 10-Feb-26 14:21, Leif Skunberg wrote:
> 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>

Thanks, patch looks good to me:

Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>

Regards,

Hans




> ---
>  drivers/platform/x86/intel/int3472/discrete.c | 7 +++++++
>  include/linux/platform_data/x86/int3472.h     | 5 +++--
>  2 files changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/platform/x86/intel/int3472/discrete.c b/drivers/platform/x86/intel/int3472/discrete.c
> index 1505fc3ef..fec8a899c 100644
> --- a/drivers/platform/x86/intel/int3472/discrete.c
> +++ b/drivers/platform/x86/intel/int3472/discrete.c
> @@ -223,6 +223,10 @@ static void int3472_get_con_id_and_polarity(struct int3472_discrete_device *int3
>  		*con_id = "avdd";
>  		*gpio_flags = GPIO_ACTIVE_HIGH;
>  		break;
> +	case INT3472_GPIO_TYPE_DOVDD:
> +		*con_id = "dovdd";
> +		*gpio_flags = GPIO_ACTIVE_HIGH;
> +		break;
>  	case INT3472_GPIO_TYPE_HANDSHAKE:
>  		*con_id = "dvdd";
>  		*gpio_flags = GPIO_ACTIVE_HIGH;
> @@ -251,6 +255,7 @@ static void int3472_get_con_id_and_polarity(struct int3472_discrete_device *int3
>   * 0x0b Power enable
>   * 0x0c Clock enable
>   * 0x0d Privacy LED
> + * 0x10 DOVDD (digital I/O voltage)
>   * 0x13 Hotplug detect
>   *
>   * There are some known platform specific quirks where that does not quite
> @@ -332,6 +337,7 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares,
>  	case INT3472_GPIO_TYPE_CLK_ENABLE:
>  	case INT3472_GPIO_TYPE_PRIVACY_LED:
>  	case INT3472_GPIO_TYPE_POWER_ENABLE:
> +	case INT3472_GPIO_TYPE_DOVDD:
>  	case INT3472_GPIO_TYPE_HANDSHAKE:
>  		gpio = skl_int3472_gpiod_get_from_temp_lookup(int3472, agpio, con_id, gpio_flags);
>  		if (IS_ERR(gpio)) {
> @@ -356,6 +362,7 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares,
>  		case INT3472_GPIO_TYPE_POWER_ENABLE:
>  			second_sensor = int3472->quirks.avdd_second_sensor;
>  			fallthrough;
> +		case INT3472_GPIO_TYPE_DOVDD:
>  		case INT3472_GPIO_TYPE_HANDSHAKE:
>  			ret = skl_int3472_register_regulator(int3472, gpio, enable_time_us,
>  							     con_id, second_sensor);
> diff --git a/include/linux/platform_data/x86/int3472.h b/include/linux/platform_data/x86/int3472.h
> index b1b837583..dbe745dc8 100644
> --- a/include/linux/platform_data/x86/int3472.h
> +++ b/include/linux/platform_data/x86/int3472.h
> @@ -26,6 +26,7 @@
>  #define INT3472_GPIO_TYPE_POWER_ENABLE				0x0b
>  #define INT3472_GPIO_TYPE_CLK_ENABLE				0x0c
>  #define INT3472_GPIO_TYPE_PRIVACY_LED				0x0d
> +#define INT3472_GPIO_TYPE_DOVDD					0x10
>  #define INT3472_GPIO_TYPE_HANDSHAKE				0x12
>  #define INT3472_GPIO_TYPE_HOTPLUG_DETECT			0x13
>  
> @@ -33,8 +34,8 @@
>  #define INT3472_MAX_SENSOR_GPIOS				3
>  #define INT3472_MAX_REGULATORS					3
>  
> -/* E.g. "avdd\0" */
> -#define GPIO_SUPPLY_NAME_LENGTH				5
> +/* E.g. "dovdd\0" */
> +#define GPIO_SUPPLY_NAME_LENGTH				6
>  /* 12 chars for acpi_dev_name() + "-", e.g. "ABCD1234:00-" */
>  #define GPIO_REGULATOR_NAME_LENGTH				(12 + GPIO_SUPPLY_NAME_LENGTH)
>  /* lower- and upper-case mapping */


  reply	other threads:[~2026-02-10 13:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-10  8:56 [PATCH 2/2] platform/x86: int3472: Handle GPIO type 0x10 (DOVDD) for OV5675 Leif Skunberg
2026-02-10 13:21 ` [PATCH v2] platform/x86: int3472: Handle GPIO type 0x10 (DOVDD) Leif Skunberg
2026-02-10 13:31   ` Hans de Goede [this message]
2026-02-23 16:34   ` Ilpo Järvinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=068af0f9-596d-4c74-af64-b99062ff8f76@kernel.org \
    --to=hansg@kernel.org \
    --cc=dan.scally@ideasonboard.com \
    --cc=diamondback@cohunt.app \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®