public inbox for linux-leds@vger.kernel.org
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	linux-leds@vger.kernel.org, linux-media@vger.kernel.org,
	niklas.soderlund@ragnatech.se, robh@kernel.org,
	hverkuil@xs4all.nl, laurent.pinchart@ideasonboard.com,
	devicetree@vger.kernel.org, sre@kernel.org
Subject: Re: as3645a flash userland interface
Date: Thu, 14 Sep 2017 15:16:29 +0200	[thread overview]
Message-ID: <82a4a519-e402-8eae-0352-e3e287fc508f@samsung.com> (raw)
In-Reply-To: <20170914115323.GA1850@amd>

On 09/14/2017 01:53 PM, Pavel Machek wrote:
> On Thu 2017-09-14 13:01:19, Sylwester Nawrocki wrote:
>> On 09/14/2017 12:07 PM, Pavel Machek wrote:
>>>> 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.
>>
>>> 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.
> 
>>> 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.

Looking at existing label entries in DT (git grep label.*led
-- arch/arm/boot/dts | sed 's\^.*label\label\' | sort | uniq)
I can't see why something like this couldn't be added.
Or label = "as3645a::flash_main_camera" so we abide the LED device
naming rules described in Documentation/leds/leds-class.txt.

-- 
Regards,
Sylwester

  reply	other threads:[~2017-09-14 13:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20170912084236.1154-1-sakari.ailus@linux.intel.com>
     [not found] ` <20170912084236.1154-25-sakari.ailus@linux.intel.com>
     [not found]   ` <20170912084236.1154-25-sakari.ailus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-09-12 10:36     ` as3645a flash userland interface Pavel Machek
2017-09-12 10:47       ` Sakari Ailus
2017-09-12 11:40         ` Pavel Machek
2017-09-12 12:04           ` Sakari Ailus
2017-09-12 18:53       ` Jacek Anaszewski
2017-09-12 21:55         ` Pavel Machek
2017-09-13 17:53           ` Jacek Anaszewski
     [not found]             ` <CGME20170914092415epcas2p26c049a698851778673034c16afb290b9@epcas2p2.samsung.com>
     [not found]               ` <21824758-28a1-7007-6db5-86a900025d14-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-09-14  9:24                 ` Sylwester Nawrocki
     [not found]                   ` <4bf12e8e-beff-0199-cdee-4a52ebe7cdaf-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2017-09-14 10:07                     ` Pavel Machek
2017-09-14 10:28                       ` Sakari Ailus
2017-09-14 11:01                       ` Sylwester Nawrocki
     [not found]                         ` <1f34a891-edb1-251c-86a8-ba4a90c485d3-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2017-09-14 11:53                           ` Pavel Machek
2017-09-14 13:16                             ` Sylwester Nawrocki [this message]
     [not found]         ` <7b679cb3-ce58-e1d1-60bf-995896bf46eb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-09-18  9:12           ` Sakari Ailus

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=82a4a519-e402-8eae-0352-e3e287fc508f@samsung.com \
    --to=s.nawrocki@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=hverkuil@xs4all.nl \
    --cc=jacek.anaszewski@gmail.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=niklas.soderlund@ragnatech.se \
    --cc=pavel@ucw.cz \
    --cc=robh@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=sre@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox