Re: [PATCH v3 2/2] platform/x86: int3472: Add support for GPIO type 0x02 (strobe LED)

From: Andy Shevchenko

Date: Thu Mar 26 2026 - 07:15:05 EST


On Wed, Mar 25, 2026 at 11:38:23PM +0100, Marco Nenciarini wrote:
> Some ACPI INT3472 devices include a GPIO with DSM type 0x02, used for
> IR flood (strobe) illumination. This GPIO type was previously
> unhandled, resulting in the following warning during probe:
>
> int3472-discrete INT3472:00: GPIO type 0x02 is not currently
> supported
>
> Add INT3472_GPIO_TYPE_STROBE (0x02) handling that registers the GPIO
> as an LED class device via skl_int3472_register_led(). An enum
> int3472_led_type parameter controls both the LED name suffix and
> whether a lookup is registered for the sensor driver. Unlike the
> privacy LED, the strobe LED is not consumed by the sensor driver, so
> no LED lookup is registered.
>
> To support devices that have both a privacy and a strobe LED, the
> single struct int3472_led member is replaced with an array and the
> container_of in the brightness callback now references the int3472_led
> struct directly.

...

> case INT3472_GPIO_TYPE_PRIVACY_LED:
> - ret = skl_int3472_register_led(int3472, gpio);
> + ret = skl_int3472_register_led(int3472, gpio,
> + INT3472_LED_TYPE_PRIVACY);

Split this conversion to yet another separate change. At the end of the day
you should have something like this:

Patch 1: rename pled --> led
Patch 2: Use local led variable instead of dereferencing (as Ilpo asked for)
Patch 3: introduce led type and update API to use it
Patch 4: add IR flood support

> + if (ret)
> + err_msg = "Failed to register LED\n";

Move this now to the callee which may add a name/con_id of the led to the error
message.

--
With Best Regards,
Andy Shevchenko