Re: as3645a flash userland interface
From: Pavel Machek <hidden>
Date: 2017-09-14 11:53:23
Also in:
linux-leds, linux-media
Attachments
- signature.asc [application/pgp-signature] 181 bytes
From: Pavel Machek <hidden>
Date: 2017-09-14 11:53:23
Also in:
linux-leds, linux-media
On Thu 2017-09-14 13:01:19, Sylwester Nawrocki wrote:
On 09/14/2017 12:07 PM, Pavel Machek wrote:quoted
quoted
Isn't the V4L2 subdev/Media Controller API supposed to provide means for associating flash LEDs with camera sensors? You seem to be insisting on using the sysfs leds interface for that, which is not a primary interface for camera flash AFAICT.a) subdev/media controller API currently does not provide such means.Yes, but it should, that's what it was designed for AFAIK.quoted
b) if we have /sys/class/leds interface to userland, it should be useful.At the same time we shouldn't overcomplicate it with the camera functionality.
I'm advocating adding label = "main_camera" into the .dts. That's all.
quoted
c) having flashlight application going through media controller API is a bad joke.It doesn't have to, maybe I misunderstood what you exactly ask for. Nevertheless what's missing is some user visible name/label for each flash LED, right? Currently enumerating flash LEDs can be done by looking at the function part of /sys/class/leds/<led-controller>:<colour>: <function> path. Could additional information be appended to the <function> part, so user can identify which LED is which? E.g. "flash(rear)", "flash(front)", etc. This could be achieved by simply adding label property in DT. Or is the list of supported <function> strings already standardized?
label = "flash_main_camera" would work for me, yes. And yes, I'd prefer to do this before 4.14 release, so that userland-visible interface does not change. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html