Skip to contentSkip to conversation

v4l2-subdev/int3472: Use "privacy" as con_id for the LED lookup

PATCH Superseded Hans de Goede 4 participants 10 messages Sep 9, 2025 – Sep 10, 2025

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Hans de Goede

author maintainer
#0 lore raw

cover v4l2-subdev/int3472: Use "privacy" as con_id for the LED lookup

Hi All,

During DT-binding review for extending the V4L2 camera sensor privacy LED support to systems using devicetree, it has come up that having a "-led" suffix for the LED name / con_id is undesirable since it already is clear that it is a LED:

https://lore.kernel.org/linux-media/[email protected]/

There was discussion about making an exception for "privacy-led" since that is already used on x86/ACPI platforms, but I'm afraid that will set a bad example which ends up being copy and pasted, so lets just drop the "-led" prefix from the x86/ACPI side, which we can do since there this is only an in-kernel "API".

Note both patches do need to be merged at the same time to avoid breakage. Since the changes are tiny I think it would be best to just have Sakari merge them both through the linux-media tree.

Ilpo can you give your ack for patch 2/2 getting merged through the linux-media tree?

Regards,

Hans

Hans de Goede (2):
media: v4l2-subdev: Use "privacy" as con_id when getting the privacy
LED
platform/x86: int3472: Use "privacy" as con_id for the LED lookup

 drivers/media/v4l2-core/v4l2-subdev.c    | 2 +-
 drivers/platform/x86/intel/int3472/led.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.51.0
author maintainer
#1 lore raw

PATCH 1/2 media: v4l2-subdev: Use "privacy" as con_id when getting the privacy LED

During DT-binding review for extending the V4L2 camera sensor privacy LED support to systems using devicetree, it has come up that having a "-led" suffix for the LED name / con_id is undesirable since it already is clear that it is a LED.

Drop the "-led" suffix from the con_id argument to led_get().

---
Note this needs to be merged in the same kernel cycle as the matching "platform/x86: int3472: Use "privacy" as con_id for the LED lookup" patch.

---
 drivers/media/v4l2-core/v4l2-subdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/v4l2-core/v4l2-subdev.c +1 -1
index 113eb74eb7c1..babcc1120354 100644
@@ -2602,7 +2602,7 @@ EXPORT_SYMBOL_GPL(v4l2_subdev_is_streaming);
 int v4l2_subdev_get_privacy_led(struct v4l2_subdev *sd)
 {
 #if IS_REACHABLE(CONFIG_LEDS_CLASS)
-	sd->privacy_led = led_get(sd->dev, "privacy-led");
+	sd->privacy_led = led_get(sd->dev, "privacy");
 	if (IS_ERR(sd->privacy_led) && PTR_ERR(sd->privacy_led) != -ENOENT)
 		return dev_err_probe(sd->dev, PTR_ERR(sd->privacy_led),
 				     "getting privacy LED\n");
Signature · 1 line
2.51.0
author maintainer
#2 lore raw

PATCH 2/2 platform/x86: int3472: Use "privacy" as con_id for the LED lookup

In reply to Hans de Goede

During DT-binding review for extending the V4L2 camera sensor privacy LED support to systems using devicetree, it has come up that having a "-led" suffix for the LED name / con_id is undesirable since it already is clear that it is a LED.

Drop the "-led" suffix from the privacy LED's lookup table con_id.

---
Note this needs to be merged in the same kernel cycle as the matching "media: v4l2-subdev: Use "privacy" as con_id when getting the privacy LED" patch.

---
 drivers/platform/x86/intel/int3472/led.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/intel/int3472/led.c +1 -1
index f1d6d7b0cb75..b1d84b968112 100644
@@ -43,7 +43,7 @@ int skl_int3472_register_pled(struct int3472_discrete_device *int3472, struct gp
 
 	int3472->pled.lookup.provider = int3472->pled.name;
 	int3472->pled.lookup.dev_id = int3472->sensor_name;
-	int3472->pled.lookup.con_id = "privacy-led";
+	int3472->pled.lookup.con_id = "privacy";
 	led_add_lookup(&int3472->pled.lookup);
 
 	return 0;
Signature · 1 line
2.51.0
#3 lore raw
In reply to Hans de Goede
Quoted 6 lines · Hans de Goede

During DT-binding review for extending the V4L2 camera sensor privacy LED support to systems using devicetree, it has come up that having a "-led" suffix for the LED name / con_id is undesirable since it already is clear that it is a LED:

Quoted 7 lines

https://lore.kernel.org/linux-media/[email protected]/

There was discussion about making an exception for "privacy-led" since that is already used on x86/ACPI platforms, but I'm afraid that will set a bad example which ends up being copy and pasted, so lets just drop the "-led" prefix from the x86/ACPI side, which we can do since there this is only an in-kernel "API".

Since it's an in-kernel API, why can't these two be simply squashed?

Signature · 2 lines
With Best Regards,
Andy Shevchenko
author maintainer
#4 lore raw

Hi Andy,

Quoted 9 lines · Andy Shevchenko
Quoted 8 lines · Hans de Goede

During DT-binding review for extending the V4L2 camera sensor privacy LED support to systems using devicetree, it has come up that having a "-led" suffix for the LED name / con_id is undesirable since it already is clear that it is a LED:

https://lore.kernel.org/linux-media/[email protected]/

Quoted 7 lines
Quoted 5 lines

There was discussion about making an exception for "privacy-led" since that is already used on x86/ACPI platforms, but I'm afraid that will set a bad example which ends up being copy and pasted, so lets just drop the "-led" prefix from the x86/ACPI side, which we can do since there this is only an in-kernel "API".

Since it's an in-kernel API, why can't these two be simply squashed?

Good question, this is only a runtime thing when running on actual hw with a privacy LED. So having this separately will not break the build in the middle.

As such it seems better to have this as 2 patches since it involves 2 different subsystems.

Regards,

Hans

maintainer
#5 lore raw

Hi Hans, Andy, Ilpo,

Quoted 18 lines · Hans de Goede

Hi Andy,

Quoted 15 lines · Andy Shevchenko
Quoted 13 lines · Hans de Goede

During DT-binding review for extending the V4L2 camera sensor privacy LED support to systems using devicetree, it has come up that having a "-led" suffix for the LED name / con_id is undesirable since it already is clear that it is a LED:

https://lore.kernel.org/linux-media/[email protected]/

There was discussion about making an exception for "privacy-led" since that is already used on x86/ACPI platforms, but I'm afraid that will set a bad example which ends up being copy and pasted, so lets just drop the "-led" prefix from the x86/ACPI side, which we can do since there this is only an in-kernel "API".

Quoted 8 lines
Quoted 1 line

Since it's an in-kernel API, why can't these two be simply squashed?

Good question, this is only a runtime thing when running on actual hw with a privacy LED. So having this separately will not break the build in the middle.

As such it seems better to have this as 2 patches since it involves 2 different subsystems.

Seems good to me.

Ilpo: are you fine with merging this via the media tree?

Signature · 3 lines
Kind regards,

Sakari Ailus
maintainer
#6 lore raw
Quoted 27 lines · Sakari Ailus

Hi Hans, Andy, Ilpo,

Quoted 24 lines · Hans de Goede

Hi Andy,

Quoted 9 lines · Andy Shevchenko
Quoted 8 lines · Hans de Goede

During DT-binding review for extending the V4L2 camera sensor privacy LED support to systems using devicetree, it has come up that having a "-led" suffix for the LED name / con_id is undesirable since it already is clear that it is a LED:

https://lore.kernel.org/linux-media/[email protected]/

Quoted 7 lines
Quoted 5 lines

There was discussion about making an exception for "privacy-led" since that is already used on x86/ACPI platforms, but I'm afraid that will set a bad example which ends up being copy and pasted, so lets just drop the "-led" prefix from the x86/ACPI side, which we can do since there this is only an in-kernel "API".

Since it's an in-kernel API, why can't these two be simply squashed?

Good question, this is only a runtime thing when running on actual hw with a privacy LED. So having this separately will not break the build in the middle.

Quoted 6 lines
Quoted 2 lines

As such it seems better to have this as 2 patches since it involves 2 different subsystems.

Seems good to me.

Ilpo: are you fine with merging this via the media tree?

Yes, but please take the v2 instead which has the changes squashed together.

Signature · 1 line
 i.
maintainer
#7 lore raw
In reply to Hans de Goede
Quoted 16 lines · Hans de Goede
Quoted 15 lines · Andy Shevchenko
Quoted 13 lines · Hans de Goede

During DT-binding review for extending the V4L2 camera sensor privacy LED support to systems using devicetree, it has come up that having a "-led" suffix for the LED name / con_id is undesirable since it already is clear that it is a LED:

https://lore.kernel.org/linux-media/[email protected]/

There was discussion about making an exception for "privacy-led" since that is already used on x86/ACPI platforms, but I'm afraid that will set a bad example which ends up being copy and pasted, so lets just drop the "-led" prefix from the x86/ACPI side, which we can do since there this is only an in-kernel "API".

Quoted 8 lines
Quoted 1 line

Since it's an in-kernel API, why can't these two be simply squashed?

Good question, this is only a runtime thing when running on actual hw with a privacy LED. So having this separately will not break the build in the middle.

As such it seems better to have this as 2 patches since it involves 2 different subsystems.

But it's still only a single logical change, and not something with monsterous complexity which would warrant splitting it at the subsystem boundary.

Or do you immediately know about something that would conflict with either of these changes which would warrant splitting it per subsystem to avoid merge challenges? If not, I agree with Andy this should just be squashed into a single patch.

Another question, is the "privacy_led" suffix added into pled.name still acceptable despite the "led" suffix?

Signature · 1 line
 i.
author maintainer
#8 lore raw

Hi Ilpo,

Quoted 26 lines · Ilpo Järvinen
Quoted 16 lines · Hans de Goede
Quoted 15 lines · Andy Shevchenko
Quoted 13 lines · Hans de Goede

During DT-binding review for extending the V4L2 camera sensor privacy LED support to systems using devicetree, it has come up that having a "-led" suffix for the LED name / con_id is undesirable since it already is clear that it is a LED:

https://lore.kernel.org/linux-media/[email protected]/

There was discussion about making an exception for "privacy-led" since that is already used on x86/ACPI platforms, but I'm afraid that will set a bad example which ends up being copy and pasted, so lets just drop the "-led" prefix from the x86/ACPI side, which we can do since there this is only an in-kernel "API".

Quoted 8 lines
Quoted 1 line

Since it's an in-kernel API, why can't these two be simply squashed?

Good question, this is only a runtime thing when running on actual hw with a privacy LED. So having this separately will not break the build in the middle.

As such it seems better to have this as 2 patches since it involves 2 different subsystems.

Quoted 8 lines

But it's still only a single logical change, and not something with monsterous complexity which would warrant splitting it at the subsystem boundary.

Or do you immediately know about something that would conflict with either of these changes which would warrant splitting it per subsystem to avoid merge challenges? If not, I agree with Andy this should just be squashed into a single patch.

Ok, since both you and Andy are in favor of squashing the 2 patches together I'll send out a v2 with the 2 patches squashed into 1 patch.

Quoted 2 lines

Another question, is the "privacy_led" suffix added into pled.name still acceptable despite the "led" suffix?

That is just the name of the directory added under /sys/class/leds for the LED some others, e.g. "phy0-led" also use a led suffix, so IMHO it is fine to keep this as is.

Regards,

Hans

maintainer
#9 lore raw
Quoted 42 lines · Hans de Goede

Hi Ilpo,

Quoted 26 lines · Ilpo Järvinen
Quoted 16 lines · Hans de Goede
Quoted 15 lines · Andy Shevchenko
Quoted 13 lines · Hans de Goede

During DT-binding review for extending the V4L2 camera sensor privacy LED support to systems using devicetree, it has come up that having a "-led" suffix for the LED name / con_id is undesirable since it already is clear that it is a LED:

https://lore.kernel.org/linux-media/[email protected]/

There was discussion about making an exception for "privacy-led" since that is already used on x86/ACPI platforms, but I'm afraid that will set a bad example which ends up being copy and pasted, so lets just drop the "-led" prefix from the x86/ACPI side, which we can do since there this is only an in-kernel "API".

Quoted 8 lines
Quoted 1 line

Since it's an in-kernel API, why can't these two be simply squashed?

Good question, this is only a runtime thing when running on actual hw with a privacy LED. So having this separately will not break the build in the middle.

As such it seems better to have this as 2 patches since it involves 2 different subsystems.

Quoted 8 lines

But it's still only a single logical change, and not something with monsterous complexity which would warrant splitting it at the subsystem boundary.

Or do you immediately know about something that would conflict with either of these changes which would warrant splitting it per subsystem to avoid merge challenges? If not, I agree with Andy this should just be squashed into a single patch.

Ok, since both you and Andy are in favor of squashing the 2 patches together I'll send out a v2 with the 2 patches squashed into 1 patch.

Quoted 6 lines
Quoted 2 lines

Another question, is the "privacy_led" suffix added into pled.name still acceptable despite the "led" suffix?

That is just the name of the directory added under /sys/class/leds for the LED some others, e.g. "phy0-led" also use a led suffix, so IMHO it is fine to keep this as is.

Okay, I'd no strong opinion on it but it felt like a similar case so asked. We can leave it as is.

Signature · 1 line
 i.