Re: [PATCH v2] platform/x86: ideapad-laptop: Report camera switch as SW_CAMERA_LENS_COVER
From: Marco Giunta
Date: Wed Sep 23 2026 - 09:12:08 EST
Hi Rong,
> >
> > 1. overall I changed my mind regarding the conditional switch registration.
> > I no longer really see it as particularly problematic in practice; as Rong
> > said earlier, in practice it's mostly a theoretical concern given the
> > typical userspace usage of this switch.
> >
> > I do agree that if we can find a smart way to filter for switch presence
> > based on a good criterion, like a suitable wmi method, it would
> > definitively be an improvement to patch v3. And I also appreciate that
> > gaining a better understanding of these issues may improve other lenovo
> > drivers. Finally, in general, I am certainly not trying to stifle the
> > useful discussion going on here; what I'm trying to say is: as far as the
> > camera switch patch is concerned, I am perfectly fine with the simple
> > approach of v3 (at least for now, we can add more complexity later IMO).
>
> Agreed. More comments below.
Nice. Mark, any thoughts on this?
>
> >
> > 2. here https://github.com/marco-giunta/lenovo-acpi-dump you can find
> > all raw & decompiled ACPI tables and bmof files from both my yoga and my
> > legion. Feel free to ask for more data.
>
> Good job. They are exactly what I want to cross-check with. They'll also
> be useful when I develop future patches for lenovo-wmi-*.
Thanks, I'm happy to contribute this data (I assume no one has assembled
a general database of this stuff)
> Then we can't query the switch's state via WMI on the Yoga.
> Then we can't query the switch's state via WMI on the Legion.
yeah, that leaves only the v1/v2 approach as feasible for a conditional
registration AFAICT. If a maintainer prefers that, it's easy to revert
to the older patch, but my guess is that the simplified v3 is overall
preferable.
> > 5. I have basically no experience parsing WMI data and very little with
> > ACPI tables in general. Please feel free to correct me! And in general
> > take the above with a pinch of salt.
> > I hope the linked files will prove more useful than me in this regard.
>
> Your interpretation is well done and impressive!
Thanks, I spent the last few days studying acpi and wmi documentation/code
to be able to parse these files.
>
> In conclusion, I agreed that we should take the simple approach, i.e.,
> exposing KEY_SW unconditionally. If we see a report for a 0x00200000-
> capable device, we can add support for it then. For the time being, let's
> focus on what we have first.
>
> >
> >
> > Thanks again for your work on this, I am learning a lot from this thread.
>
> Thanks a lot for your help, too.
Happy to help.
I'll make sure to CC you for future pd/x86 patches targeting the Legion.
>
> I will submit my patch with your C-d-b, S-o-b, and T-b.
>
Looking forward to that. And don't forget to cc Huang, so they can offer
their reviewed-by for v3 as well.
Best regards,
Marco