v4l2-subdev/int3472: Use "privacy" as con_id for the LED lookup
Hans de Goede
maintainercover 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
Hans de Goede
maintainerPATCH 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
@@ -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
Hans de Goede
maintainerPATCH 2/2 platform/x86: int3472: Use "privacy" as con_id for the LED lookup
In reply to Hans de GoedeDuring 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
@@ -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
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_idis 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
Hans de Goede
maintainerHi 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_idis undesirable since it already is clear that it is a LED:
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
Sakari Ailus
maintainerHi 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_idis 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
Ilpo Järvinen
maintainerQuoted 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_idis undesirable since it already is clear that it is a LED: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.
Ilpo Järvinen
maintainerQuoted 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_idis 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.
Hans de Goede
maintainerHi 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_idis 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
Ilpo Järvinen
maintainerQuoted 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_idis 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/ledsfor 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.