From: Hans de Goede <hdegoede@redhat.com>
To: Dan Scally <dan.scally@ideasonboard.com>,
Andy Shevchenko <andy@kernel.org>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Mark Gross <markgross@kernel.org>,
Daniel Scally <djrscally@gmail.com>,
platform-driver-x86@vger.kernel.org,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Kate Hsuan <hpa@redhat.com>,
linux-media@vger.kernel.org
Subject: Re: [PATCH 0/3] platform/x86: int3472/discrete: Make it work with IPU6
Date: Fri, 25 Nov 2022 12:23:18 +0100 [thread overview]
Message-ID: <8f736a26-9942-4fda-0237-313da5bf9c6b@redhat.com> (raw)
In-Reply-To: <aa42a60b-fe34-a418-3ada-af55f260592e@ideasonboard.com>
Hi,
On 11/25/22 12:11, Dan Scally wrote:
>
> On 25/11/2022 11:06, Andy Shevchenko wrote:
>> On Fri, Nov 25, 2022 at 12:58:46PM +0200, Laurent Pinchart wrote:
>>> On Fri, Nov 25, 2022 at 10:17:17AM +0000, Dan Scally wrote:
>> ...
>>
>>> Can the LED framework be used without having the LED exposed to
>>> userspace ?
>> I believe the correct question here is "can the states of some leds be
>> read-only from user perspective" (this way any changes into led subsystems
>> looks less intrusive, esp. taking into account that subsystem is de facto
>> unmaintained).
>>
>
> I think the answer to that is yes:
>
>
> https://elixir.bootlin.com/linux/latest/source/drivers/leds/led-class.c#L47
Interesting, I did not know that. But what is the added value of
using the LED subsytem then for a simple only on/off LED driven
by a GPIO?
One of the challenges with using LED triggers for the privacy led,
is that we need at least 2 triggers: "camera-front" and "camera-back"
and then somehow to let what ever code sets the triggers know if
it is dealing with the front or back sensor.
Where as with GPIO-s we *bind* them to the sensor i2c_client so if
we just have the sensor-driver look for an optional GPIO called
"privacy-led" then we don't have this how to we bind the LED to
the sensor problem; and if we drop the sysfs interface I fail to
see the value in using the LED subsystem for GPIO a driven LED.
Also see my other reply for a proposal to be able to share the
code dealing with this between sensor drivers (and also remove
some other gpio/clk/regulator boilerplate from sensor drivers).
Regards,
Hans
next prev parent reply other threads:[~2022-11-25 11:24 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-24 20:00 [PATCH 0/3] platform/x86: int3472/discrete: Make it work with IPU6 Hans de Goede
2022-11-24 20:00 ` [PATCH 1/3] platform/x86: int3472/discrete: Refactor GPIO to sensor mapping Hans de Goede
2022-11-24 20:09 ` Andy Shevchenko
2022-11-24 20:20 ` Hans de Goede
2022-11-24 22:19 ` Andy Shevchenko
2022-11-25 16:00 ` Dan Scally
2022-11-28 10:56 ` Hans de Goede
2022-11-24 20:00 ` [PATCH 2/3] platform/x86: int3472/discrete: Get the polarity from the _DSM entry Hans de Goede
2022-11-24 20:13 ` Andy Shevchenko
2022-11-24 20:26 ` Hans de Goede
2022-11-25 10:42 ` Dan Scally
2022-11-25 16:01 ` Dan Scally
2022-11-29 21:56 ` Hans de Goede
2022-11-24 20:00 ` [PATCH 3/3] platform/x86: int3472/discrete: Add support for sensor-drivers which expect clken + pled GPIOs Hans de Goede
2022-11-25 14:36 ` Laurent Pinchart
2022-11-25 16:07 ` Dan Scally
2022-11-25 18:38 ` Hans de Goede
2022-11-28 7:39 ` Dan Scally
2022-11-28 10:04 ` Hans de Goede
2022-11-25 10:17 ` [PATCH 0/3] platform/x86: int3472/discrete: Make it work with IPU6 Dan Scally
2022-11-25 10:58 ` Laurent Pinchart
2022-11-25 11:03 ` Dan Scally
2022-11-25 11:06 ` Andy Shevchenko
2022-11-25 11:11 ` Dan Scally
2022-11-25 11:23 ` Hans de Goede [this message]
2022-11-25 11:42 ` Dan Scally
2022-11-25 12:00 ` Hans de Goede
2022-11-25 11:15 ` Hans de Goede
2022-11-25 14:46 ` Laurent Pinchart
2022-11-28 16:11 ` Hans de Goede
2022-11-28 18:22 ` Laurent Pinchart
2022-11-25 11:02 ` Hans de Goede
2022-11-25 14:40 ` Laurent Pinchart
2022-11-28 11:28 ` Hans de Goede
-- strict thread matches above, loose matches on Subject: below --
2022-11-24 19:57 Hans de Goede
2022-11-24 19:59 ` Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8f736a26-9942-4fda-0237-313da5bf9c6b@redhat.com \
--to=hdegoede@redhat.com \
--cc=andy@kernel.org \
--cc=dan.scally@ideasonboard.com \
--cc=djrscally@gmail.com \
--cc=hpa@redhat.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=markgross@kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=sakari.ailus@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.