From nobody Thu Apr 2 23:53:27 2026 Received: from spark.kcore.it (spark.kcore.it [49.13.27.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 72F4430AAB8; Wed, 25 Mar 2026 22:38:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=49.13.27.68 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774478310; cv=none; b=WMa0AsHfwZ4ev4L7FT4++qpfPzyIBgDmPshnbQSZ+ZTy1HKCtxo7Aeb4tGOEC5uL5K1ed2W63hUqPGAui5k4OM4ND2UxLyg3ezOJGp5rr1LfsPNsuJCtHBslqE53BGtDOc6B6e6UiH3s8ehAdaqP73Q9s+zTD0dkjIZQdc2qXak= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774478310; c=relaxed/simple; bh=XabR+D6caPVcw5pMeDJ0xbZ0klUbE5q5+/bGSg7MBHk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=tZhtq930F1qbkxmGwO05mA6num45juBlVxiHRoL6Cf9tabJITK4HrhIPDL9qeQ16wwDp/nKSjvn6a/V7pVDu4H0HqOMsll8sdhDrf5x7THwVfmTtNb3rI52z06TY+GLanKV/zHm7DaD1t4WU2RUF6RDMUd+RN5Br4E7KjVgWH9Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kcore.it; spf=pass smtp.mailfrom=kcore.it; dkim=pass (1024-bit key) header.d=kcore.it header.i=@kcore.it header.b=WQro1RRW; arc=none smtp.client-ip=49.13.27.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kcore.it Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kcore.it Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=kcore.it header.i=@kcore.it header.b="WQro1RRW" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kcore.it; s=spark; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Yayt7xPdJdpEYZ0uw4TdYu5pmV+0IJBIHEA8MsGaG3c=; b=WQro1RRWQxDaYtBWScsF9+mnI0 Vh3htoniJMWd8EJjUQ4WTKg1Mc089r7kjBr6DU56oTsxYndMJHwxPkfUeP+K9rVi2OnJhm6jFK8QN 2Dt7LFGHCygDrJi6cqYbLVz36OFUPSUYRbKk9pWEhkXppptP+htxNxCUgsJ3Xnbg5MxI=; Received: from mnencia by spark.kcore.it with local (Exim 4.96) (envelope-from ) id 1w5Wrn-0065Yj-0T; Wed, 25 Mar 2026 23:38:23 +0100 From: Marco Nenciarini To: Daniel Scally , Sakari Ailus , Hans de Goede , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Cc: Andy Shevchenko , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Marco Nenciarini Subject: [PATCH v3 1/2] platform/x86: int3472: Rename pled to led in LED registration code Date: Wed, 25 Mar 2026 23:38:22 +0100 Message-Id: <03e1e03a275915d41c6b705d61bbf318e7958029.1774477895.git.mnencia@kcore.it> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Rename the privacy LED functions, struct type and member from pled/int3472_pled/register_pled to led/int3472_led/register_led to prepare for supporting additional LED types (e.g. strobe/IR flood). No functional change. Cc: Andy Shevchenko Signed-off-by: Marco Nenciarini --- Changes in v3: - New patch, split out from v2 single patch per Andy Shevchenko's request drivers/platform/x86/intel/int3472/discrete.c | 4 +- drivers/platform/x86/intel/int3472/led.c | 45 ++++++++++--------- include/linux/platform_data/x86/int3472.h | 8 ++-- 3 files changed, 29 insertions(+), 28 deletions(-) diff --git a/drivers/platform/x86/intel/int3472/discrete.c b/drivers/platfo= rm/x86/intel/int3472/discrete.c index 1505fc3..cb24763 100644 --- a/drivers/platform/x86/intel/int3472/discrete.c +++ b/drivers/platform/x86/intel/int3472/discrete.c @@ -348,7 +348,7 @@ static int skl_int3472_handle_gpio_resources(struct acp= i_resource *ares, =20 break; case INT3472_GPIO_TYPE_PRIVACY_LED: - ret =3D skl_int3472_register_pled(int3472, gpio); + ret =3D skl_int3472_register_led(int3472, gpio); if (ret) err_msg =3D "Failed to register LED\n"; =20 @@ -422,7 +422,7 @@ void int3472_discrete_cleanup(struct int3472_discrete_d= evice *int3472) gpiod_remove_lookup_table(&int3472->gpios); =20 skl_int3472_unregister_clock(int3472); - skl_int3472_unregister_pled(int3472); + skl_int3472_unregister_led(int3472); skl_int3472_unregister_regulator(int3472); } EXPORT_SYMBOL_NS_GPL(int3472_discrete_cleanup, "INTEL_INT3472_DISCRETE"); diff --git a/drivers/platform/x86/intel/int3472/led.c b/drivers/platform/x8= 6/intel/int3472/led.c index b1d84b9..8b26929 100644 --- a/drivers/platform/x86/intel/int3472/led.c +++ b/drivers/platform/x86/intel/int3472/led.c @@ -6,55 +6,56 @@ #include #include =20 -static int int3472_pled_set(struct led_classdev *led_cdev, - enum led_brightness brightness) +static int int3472_led_set(struct led_classdev *led_cdev, + enum led_brightness brightness) { struct int3472_discrete_device *int3472 =3D - container_of(led_cdev, struct int3472_discrete_device, pled.classdev); + container_of(led_cdev, struct int3472_discrete_device, led.classdev); =20 - gpiod_set_value_cansleep(int3472->pled.gpio, brightness); + gpiod_set_value_cansleep(int3472->led.gpio, brightness); return 0; } =20 -int skl_int3472_register_pled(struct int3472_discrete_device *int3472, str= uct gpio_desc *gpio) +int skl_int3472_register_led(struct int3472_discrete_device *int3472, + struct gpio_desc *gpio) { char *p; int ret; =20 - if (int3472->pled.classdev.dev) + if (int3472->led.classdev.dev) return -EBUSY; =20 - int3472->pled.gpio =3D gpio; + int3472->led.gpio =3D gpio; =20 /* Generate the name, replacing the ':' in the ACPI devname with '_' */ - snprintf(int3472->pled.name, sizeof(int3472->pled.name), + snprintf(int3472->led.name, sizeof(int3472->led.name), "%s::privacy_led", acpi_dev_name(int3472->sensor)); - p =3D strchr(int3472->pled.name, ':'); + p =3D strchr(int3472->led.name, ':'); if (p) *p =3D '_'; =20 - int3472->pled.classdev.name =3D int3472->pled.name; - int3472->pled.classdev.max_brightness =3D 1; - int3472->pled.classdev.brightness_set_blocking =3D int3472_pled_set; + int3472->led.classdev.name =3D int3472->led.name; + int3472->led.classdev.max_brightness =3D 1; + int3472->led.classdev.brightness_set_blocking =3D int3472_led_set; =20 - ret =3D led_classdev_register(int3472->dev, &int3472->pled.classdev); + ret =3D led_classdev_register(int3472->dev, &int3472->led.classdev); if (ret) return ret; =20 - int3472->pled.lookup.provider =3D int3472->pled.name; - int3472->pled.lookup.dev_id =3D int3472->sensor_name; - int3472->pled.lookup.con_id =3D "privacy"; - led_add_lookup(&int3472->pled.lookup); + int3472->led.lookup.provider =3D int3472->led.name; + int3472->led.lookup.dev_id =3D int3472->sensor_name; + int3472->led.lookup.con_id =3D "privacy"; + led_add_lookup(&int3472->led.lookup); =20 return 0; } =20 -void skl_int3472_unregister_pled(struct int3472_discrete_device *int3472) +void skl_int3472_unregister_led(struct int3472_discrete_device *int3472) { - if (IS_ERR_OR_NULL(int3472->pled.classdev.dev)) + if (IS_ERR_OR_NULL(int3472->led.classdev.dev)) return; =20 - led_remove_lookup(&int3472->pled.lookup); - led_classdev_unregister(&int3472->pled.classdev); - gpiod_put(int3472->pled.gpio); + led_remove_lookup(&int3472->led.lookup); + led_classdev_unregister(&int3472->led.classdev); + gpiod_put(int3472->led.gpio); } diff --git a/include/linux/platform_data/x86/int3472.h b/include/linux/plat= form_data/x86/int3472.h index b1b8375..7af6731 100644 --- a/include/linux/platform_data/x86/int3472.h +++ b/include/linux/platform_data/x86/int3472.h @@ -121,12 +121,12 @@ struct int3472_discrete_device { u8 imgclk_index; } clock; =20 - struct int3472_pled { + struct int3472_led { struct led_classdev classdev; struct led_lookup_data lookup; char name[INT3472_LED_MAX_NAME_LEN]; struct gpio_desc *gpio; - } pled; + } led; =20 struct int3472_discrete_quirks quirks; =20 @@ -160,7 +160,7 @@ int skl_int3472_register_regulator(struct int3472_discr= ete_device *int3472, const char *second_sensor); void skl_int3472_unregister_regulator(struct int3472_discrete_device *int3= 472); =20 -int skl_int3472_register_pled(struct int3472_discrete_device *int3472, str= uct gpio_desc *gpio); -void skl_int3472_unregister_pled(struct int3472_discrete_device *int3472); +int skl_int3472_register_led(struct int3472_discrete_device *int3472, stru= ct gpio_desc *gpio); +void skl_int3472_unregister_led(struct int3472_discrete_device *int3472); =20 #endif --=20 2.47.3 From nobody Thu Apr 2 23:53:27 2026 Received: from spark.kcore.it (spark.kcore.it [49.13.27.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A4C9633C532; Wed, 25 Mar 2026 22:38:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=49.13.27.68 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774478311; cv=none; b=XKrRNQ/RwKaKfwoQ701jJL3hQIqFef/g38MfWbQ6O7w3lh68z1v1dx5pQTuJJdwub96jzWmP/YyZv+RtuO5XlcWA9XAigCrnk2ZlDxQhEvRO1wEibZTlJjRnjins3ilrc+Q3tCByFehTjyUiM56gji9h/r+RPjr3o4mGIQRHcwo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774478311; c=relaxed/simple; bh=6iVToaSEZNpwuLrG1ZxY8DjD/JxfGguimfhQ811Puuw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=V1EZRxhzMygb9qz7jhKmSKgQnUMAqvY285XmJC+YX9PNqeTIh+EA92dUNNq9EzkWbkW4HHl/PYX1fwHdMlYobg9xDutw5ayeXvS+YherAIOUA2wOMm88iZe4P34sIcUM46d4Ffpf0S9XHXxepiQk3zE2IdUiAuwK1fWQjX68Ty8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kcore.it; spf=pass smtp.mailfrom=kcore.it; dkim=pass (1024-bit key) header.d=kcore.it header.i=@kcore.it header.b=vtwGKTq+; arc=none smtp.client-ip=49.13.27.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kcore.it Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kcore.it Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=kcore.it header.i=@kcore.it header.b="vtwGKTq+" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kcore.it; s=spark; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=z+2HjvaO+hkpy1Zavx+fKY2cbmLITfhH8KqLbEyusyM=; b=vtwGKTq+JN4CPc1Ishd9+HGn3+ BWjcO3vLKR3GZwTj9pGsMSbs94PGg1GF90pRVHTl/s8/w1VgAY4Ii0M6z8y56gt9mcsw0/4rq1ov8 iRQffUCeUN4c6BU7oP/DCxTjFps+MQGK9n654DVEeOxeTmD5dZvN3tGaifbjZ1QMAHA4=; Received: from mnencia by spark.kcore.it with local (Exim 4.96) (envelope-from ) id 1w5Wrn-0065Ym-0Y; Wed, 25 Mar 2026 23:38:23 +0100 From: Marco Nenciarini To: Daniel Scally , Sakari Ailus , Hans de Goede , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Cc: Andy Shevchenko , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Marco Nenciarini Subject: [PATCH v3 2/2] platform/x86: int3472: Add support for GPIO type 0x02 (strobe LED) Date: Wed, 25 Mar 2026 23:38:23 +0100 Message-Id: <1834b9729482d629c1d2d28443b88323cbae2764.1774477895.git.mnencia@kcore.it> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Cc: Andy Shevchenko Signed-off-by: Marco Nenciarini --- Changes in v3: - Use enum int3472_led_type to control name and lookup behavior - Convert single LED member to array for multi-LED support - Add default: return -EINVAL for safety drivers/platform/x86/intel/int3472/discrete.c | 18 ++++- drivers/platform/x86/intel/int3472/led.c | 74 +++++++++++++------ include/linux/platform_data/x86/int3472.h | 17 ++++- 3 files changed, 80 insertions(+), 29 deletions(-) diff --git a/drivers/platform/x86/intel/int3472/discrete.c b/drivers/platfo= rm/x86/intel/int3472/discrete.c index cb24763..0cffd13 100644 --- a/drivers/platform/x86/intel/int3472/discrete.c +++ b/drivers/platform/x86/intel/int3472/discrete.c @@ -207,6 +207,10 @@ static void int3472_get_con_id_and_polarity(struct int= 3472_discrete_device *int3 *con_id =3D "powerdown"; *gpio_flags =3D GPIO_ACTIVE_LOW; break; + case INT3472_GPIO_TYPE_STROBE: + *con_id =3D "strobe"; + *gpio_flags =3D GPIO_ACTIVE_HIGH; + break; case INT3472_GPIO_TYPE_CLK_ENABLE: *con_id =3D "clk-enable"; *gpio_flags =3D GPIO_ACTIVE_HIGH; @@ -248,6 +252,7 @@ static void int3472_get_con_id_and_polarity(struct int3= 472_discrete_device *int3 * * 0x00 Reset * 0x01 Power down + * 0x02 Strobe (IR flood LED) * 0x0b Power enable * 0x0c Clock enable * 0x0d Privacy LED @@ -329,6 +334,7 @@ static int skl_int3472_handle_gpio_resources(struct acp= i_resource *ares, err_msg =3D "Failed to map GPIO pin to sensor\n"; =20 break; + case INT3472_GPIO_TYPE_STROBE: case INT3472_GPIO_TYPE_CLK_ENABLE: case INT3472_GPIO_TYPE_PRIVACY_LED: case INT3472_GPIO_TYPE_POWER_ENABLE: @@ -348,7 +354,15 @@ static int skl_int3472_handle_gpio_resources(struct ac= pi_resource *ares, =20 break; case INT3472_GPIO_TYPE_PRIVACY_LED: - ret =3D skl_int3472_register_led(int3472, gpio); + ret =3D skl_int3472_register_led(int3472, gpio, + INT3472_LED_TYPE_PRIVACY); + if (ret) + err_msg =3D "Failed to register LED\n"; + + break; + case INT3472_GPIO_TYPE_STROBE: + ret =3D skl_int3472_register_led(int3472, gpio, + INT3472_LED_TYPE_STROBE); if (ret) err_msg =3D "Failed to register LED\n"; =20 @@ -422,7 +436,7 @@ void int3472_discrete_cleanup(struct int3472_discrete_d= evice *int3472) gpiod_remove_lookup_table(&int3472->gpios); =20 skl_int3472_unregister_clock(int3472); - skl_int3472_unregister_led(int3472); + skl_int3472_unregister_leds(int3472); skl_int3472_unregister_regulator(int3472); } EXPORT_SYMBOL_NS_GPL(int3472_discrete_cleanup, "INTEL_INT3472_DISCRETE"); diff --git a/drivers/platform/x86/intel/int3472/led.c b/drivers/platform/x8= 6/intel/int3472/led.c index 8b26929..de475db 100644 --- a/drivers/platform/x86/intel/int3472/led.c +++ b/drivers/platform/x86/intel/int3472/led.c @@ -9,53 +9,79 @@ static int int3472_led_set(struct led_classdev *led_cdev, enum led_brightness brightness) { - struct int3472_discrete_device *int3472 =3D - container_of(led_cdev, struct int3472_discrete_device, led.classdev); + struct int3472_led *led =3D + container_of(led_cdev, struct int3472_led, classdev); =20 - gpiod_set_value_cansleep(int3472->led.gpio, brightness); + gpiod_set_value_cansleep(led->gpio, brightness); return 0; } =20 int skl_int3472_register_led(struct int3472_discrete_device *int3472, - struct gpio_desc *gpio) + struct gpio_desc *gpio, + enum int3472_led_type type) { + struct int3472_led *led; + const char *name_suffix; + bool add_lookup; char *p; int ret; =20 - if (int3472->led.classdev.dev) - return -EBUSY; + if (int3472->n_leds >=3D INT3472_MAX_LEDS) + return -ENOSPC; =20 - int3472->led.gpio =3D gpio; + switch (type) { + case INT3472_LED_TYPE_PRIVACY: + name_suffix =3D "privacy"; + add_lookup =3D true; + break; + case INT3472_LED_TYPE_STROBE: + name_suffix =3D "strobe"; + add_lookup =3D false; + break; + default: + return -EINVAL; + } + + led =3D &int3472->leds[int3472->n_leds]; + led->gpio =3D gpio; =20 /* Generate the name, replacing the ':' in the ACPI devname with '_' */ - snprintf(int3472->led.name, sizeof(int3472->led.name), - "%s::privacy_led", acpi_dev_name(int3472->sensor)); - p =3D strchr(int3472->led.name, ':'); + snprintf(led->name, sizeof(led->name), + "%s::%s_led", acpi_dev_name(int3472->sensor), name_suffix); + p =3D strchr(led->name, ':'); if (p) *p =3D '_'; =20 - int3472->led.classdev.name =3D int3472->led.name; - int3472->led.classdev.max_brightness =3D 1; - int3472->led.classdev.brightness_set_blocking =3D int3472_led_set; + led->classdev.name =3D led->name; + led->classdev.max_brightness =3D 1; + led->classdev.brightness_set_blocking =3D int3472_led_set; =20 - ret =3D led_classdev_register(int3472->dev, &int3472->led.classdev); + ret =3D led_classdev_register(int3472->dev, &led->classdev); if (ret) return ret; =20 - int3472->led.lookup.provider =3D int3472->led.name; - int3472->led.lookup.dev_id =3D int3472->sensor_name; - int3472->led.lookup.con_id =3D "privacy"; - led_add_lookup(&int3472->led.lookup); + if (add_lookup) { + led->lookup.provider =3D led->name; + led->lookup.dev_id =3D int3472->sensor_name; + led->lookup.con_id =3D name_suffix; + led_add_lookup(&led->lookup); + led->has_lookup =3D true; + } =20 + int3472->n_leds++; return 0; } =20 -void skl_int3472_unregister_led(struct int3472_discrete_device *int3472) +void skl_int3472_unregister_leds(struct int3472_discrete_device *int3472) { - if (IS_ERR_OR_NULL(int3472->led.classdev.dev)) - return; + unsigned int i; + + for (i =3D 0; i < int3472->n_leds; i++) { + struct int3472_led *led =3D &int3472->leds[i]; =20 - led_remove_lookup(&int3472->led.lookup); - led_classdev_unregister(&int3472->led.classdev); - gpiod_put(int3472->led.gpio); + if (led->has_lookup) + led_remove_lookup(&led->lookup); + led_classdev_unregister(&led->classdev); + gpiod_put(led->gpio); + } } diff --git a/include/linux/platform_data/x86/int3472.h b/include/linux/plat= form_data/x86/int3472.h index 7af6731..9893711 100644 --- a/include/linux/platform_data/x86/int3472.h +++ b/include/linux/platform_data/x86/int3472.h @@ -23,6 +23,7 @@ /* PMIC GPIO Types */ #define INT3472_GPIO_TYPE_RESET 0x00 #define INT3472_GPIO_TYPE_POWERDOWN 0x01 +#define INT3472_GPIO_TYPE_STROBE 0x02 #define INT3472_GPIO_TYPE_POWER_ENABLE 0x0b #define INT3472_GPIO_TYPE_CLK_ENABLE 0x0c #define INT3472_GPIO_TYPE_PRIVACY_LED 0x0d @@ -49,6 +50,7 @@ #define GPIO_REGULATOR_OFF_ON_DELAY (2 * USEC_PER_MSEC) =20 #define INT3472_LED_MAX_NAME_LEN 32 +#define INT3472_MAX_LEDS 2 =20 #define CIO2_SENSOR_SSDB_MCLKSPEED_OFFSET 86 =20 @@ -68,6 +70,11 @@ #define to_int3472_device(clk) \ container_of(clk, struct int3472_discrete_device, clock) =20 +enum int3472_led_type { + INT3472_LED_TYPE_PRIVACY, + INT3472_LED_TYPE_STROBE, +}; + struct acpi_device; struct dmi_system_id; struct i2c_client; @@ -126,7 +133,9 @@ struct int3472_discrete_device { struct led_lookup_data lookup; char name[INT3472_LED_MAX_NAME_LEN]; struct gpio_desc *gpio; - } led; + bool has_lookup; + } leds[INT3472_MAX_LEDS]; + unsigned int n_leds; =20 struct int3472_discrete_quirks quirks; =20 @@ -160,7 +169,9 @@ int skl_int3472_register_regulator(struct int3472_discr= ete_device *int3472, const char *second_sensor); void skl_int3472_unregister_regulator(struct int3472_discrete_device *int3= 472); =20 -int skl_int3472_register_led(struct int3472_discrete_device *int3472, stru= ct gpio_desc *gpio); -void skl_int3472_unregister_led(struct int3472_discrete_device *int3472); +int skl_int3472_register_led(struct int3472_discrete_device *int3472, + struct gpio_desc *gpio, + enum int3472_led_type type); +void skl_int3472_unregister_leds(struct int3472_discrete_device *int3472); =20 #endif --=20 2.47.3