public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Jacek Anaszewski <j.anaszewski@samsung.com>
To: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: pavel@ucw.cz, sakari.ailus@iki.fi,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	linux-leds@vger.kernel.org, linux-media@vger.kernel.org,
	kyungmin.park@samsung.com, cooloney@gmail.com, rpurdie@rpsys.net,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v4 01/12] DT: leds: Improve description of flash LEDs related properties
Date: Wed, 08 Apr 2015 13:58:21 +0200	[thread overview]
Message-ID: <552517DD.2040905@samsung.com> (raw)
In-Reply-To: <5524FCEF.7060901@samsung.com>

Hi Sylwester,

On 04/08/2015 12:03 PM, Sylwester Nawrocki wrote:
> Hello,
>
> On 31/03/15 15:52, Jacek Anaszewski wrote:
>> Description of flash LEDs related properties was not precise regarding
>> the state of corresponding settings in case a property is missing.
>> Add relevant statements.
>> Removed is also the requirement making the flash-max-microamp
>> property obligatory for flash LEDs. It was inconsistent as the property
>> is defined as optional. Devices which require the property will have
>> to assert this in their DT bindings.
>>
>> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
>> Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
>> Cc: Bryan Wu <cooloney@gmail.com>
>> Cc: Richard Purdie <rpurdie@rpsys.net>
>> Cc: Pavel Machek <pavel@ucw.cz>
>> Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
>> Cc: devicetree@vger.kernel.org
>> ---
>>   Documentation/devicetree/bindings/leds/common.txt |   16 +++++++++-------
>>   1 file changed, 9 insertions(+), 7 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/leds/common.txt b/Documentation/devicetree/bindings/leds/common.txt
>> index 747c538..21a25e4 100644
>> --- a/Documentation/devicetree/bindings/leds/common.txt
>> +++ b/Documentation/devicetree/bindings/leds/common.txt
>> @@ -29,13 +29,15 @@ Optional properties for child nodes:
>>        "ide-disk" - LED indicates disk activity
>>        "timer" - LED flashes at a fixed, configurable rate
>>
>> -- max-microamp : maximum intensity in microamperes of the LED
>> -		 (torch LED for flash devices)
>> -- flash-max-microamp : maximum intensity in microamperes of the
>> -                       flash LED; it is mandatory if the LED should
>> -		       support the flash mode
>> -- flash-timeout-us : timeout in microseconds after which the flash
>> -                     LED is turned off
>> +- max-microamp : Maximum intensity in microamperes of the LED
>> +		 (torch LED for flash devices). If omitted this will default
>> +		 to the maximum current allowed by the device.
>> +- flash-max-microamp : Maximum intensity in microamperes of the flash LED.
>> +		       If omitted this will default to the maximum
>> +		       current allowed by the device.
>> +- flash-timeout-us : Timeout in microseconds after which the flash
>> +                     LED is turned off. If omitted this will default to the
>> +		     maximum timeout allowed by the device.
>
> Sorry about late comments on that, but since we can still change these
> properties and it seems we're going to do that, I'd like throw in my
> few preferences on the colour of this bike...
>
> IMO "max-microamp" is a poor property name, how about:
>
> s/max-microamp/led-max-current-ua,
> s/flash-max-microamp/flash-max-current-ua,
>
> so we have more consistent set of properties like:
>
> led-max-current-ua
> flash-max-current-ua
> flash-timeout-us

The "-microamp' suffix is consistent with regulator bindings.
Please refer to [1].

> Also expressing light intensity in micro-amperes seems technically wrong.
> I would propose to substitute word "intensity in microamperes" with "LED
> supply current in microamperes".

OK, I will address this in the next version of the patch.

> I also think we should require the maximum current properties and
> the driver should warn if they are missing and limit current to some
> potentially safe value, e.g. small fraction of the maximum current.

TBD.

> Also from the description it should be clear whether the current
> limits refer to capabilities of a LED or the desired settings we want
> to be applied at the LED driver device.
> We could, for example, add a sentence after the above 3 properties:
>
> "Required properties for Flash LEDs:
>
>   - led-max-current-ua
>   - flash-max-current-ua
>   - flash-timeout-us
>
> These properties determine a LED driver IC settings required for
> safe operation."
>
> Or something along these lines.

OK.


[1] http://www.spinics.net/lists/linux-leds/msg02674.html

-- 
Best Regards,
Jacek Anaszewski

  parent reply	other threads:[~2015-04-08 11:58 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-31 13:52 [PATCH v4 00/12] LED / flash API integration Jacek Anaszewski
2015-03-31 13:52 ` [PATCH v4 01/12] DT: leds: Improve description of flash LEDs related properties Jacek Anaszewski
2015-04-02 14:41   ` Pavel Machek
2015-04-03 12:09   ` Sakari Ailus
2015-04-03 12:56     ` Jacek Anaszewski
2015-04-03 20:37       ` Pavel Machek
2015-04-08  1:20         ` Bryan Wu
2015-04-08  7:48           ` Sakari Ailus
2015-04-08  9:13           ` Pavel Machek
2015-04-08  8:54     ` Jacek Anaszewski
2015-04-08  9:11       ` Sakari Ailus
2015-04-08  9:17         ` Pavel Machek
2015-04-08 10:23         ` Jacek Anaszewski
2015-04-08 10:44           ` Sakari Ailus
2015-04-08 10:03   ` Sylwester Nawrocki
2015-04-08 10:36     ` Pavel Machek
2015-04-08 11:58     ` Jacek Anaszewski [this message]
2015-04-08 14:45       ` Sylwester Nawrocki
2015-03-31 13:52 ` [PATCH v4 02/12] leds: unify the location of led-trigger API Jacek Anaszewski
2015-04-08  1:25   ` Bryan Wu
2015-03-31 13:52 ` [PATCH v4 03/12] leds: Add support for max77693 mfd flash cell Jacek Anaszewski
2015-03-31 13:52 ` [PATCH v4 04/12] DT: Add documentation for the mfd Maxim max77693 Jacek Anaszewski
2015-03-31 14:34   ` Jacek Anaszewski
2015-03-31 13:52 ` [PATCH v4 05/12] leds: Add driver for AAT1290 flash LED controller Jacek Anaszewski
2015-03-31 13:52 ` [PATCH v4 06/12] of: Add Skyworks Solutions, Inc. vendor prefix Jacek Anaszewski
2015-04-08 11:59   ` Sakari Ailus
2015-03-31 13:52 ` [PATCH v4 07/12] DT: Add documentation for the Skyworks AAT1290 Jacek Anaszewski
2015-03-31 13:52 ` [PATCH v4 08/12] media: Add registration helpers for V4L2 flash sub-devices Jacek Anaszewski
2015-03-31 13:52 ` [PATCH v4 09/12] Documentation: leds: Add description of v4l2-flash sub-device Jacek Anaszewski

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=552517DD.2040905@samsung.com \
    --to=j.anaszewski@samsung.com \
    --cc=cooloney@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rpurdie@rpsys.net \
    --cc=s.nawrocki@samsung.com \
    --cc=sakari.ailus@iki.fi \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox