linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacek Anaszewski <j.anaszewski@samsung.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, andrew@lunn.ch
Subject: Re: [PATCH 2/5] Documentation: leds: Add description of brightness setting API
Date: Tue, 22 Sep 2015 13:03:35 +0200	[thread overview]
Message-ID: <56013587.9040009@samsung.com> (raw)
In-Reply-To: <56012CC0.3030405@linux.intel.com>

Hi Sakari,

On 09/22/2015 12:26 PM, Sakari Ailus wrote:
> Hi Jacek,
>
> Jacek Anaszewski wrote:
>> This patch adds description of the LED subsystem API for
>> setting an LED brightness.
>>
>> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
>> ---
>>   Documentation/leds/leds-class.txt |   21 +++++++++++++++++++++
>>   1 file changed, 21 insertions(+)
>>
>> diff --git a/Documentation/leds/leds-class.txt b/Documentation/leds/leds-class.txt
>> index 62261c0..2cc38fa 100644
>> --- a/Documentation/leds/leds-class.txt
>> +++ b/Documentation/leds/leds-class.txt
>> @@ -52,6 +52,27 @@ above leaves scope for further attributes should they be needed. If sections
>>   of the name don't apply, just leave that section blank.
>>
>>
>> +Brightness setting API
>> +======================
>> +
>> +LED subsystem core exposes following API for setting brightness:
>> +
>> +    - led_set_brightness : if necessary, cancels the software blink timer that
>> +		implements blinking when the hardware doesn't; it is guaranteed
>> +		not to sleep, which implies the possibility of delegating the
>> +		job to a work queue task (uses led_set_brightness_nosleep
>> +		underneath - see below),
>> +    - led_set_brightness_sync : for use cases when immediate effect is desired;
>> +		it can block the caller for the time required for accessing
>> +		device registers and can sleep,
>> +    - led_set_brightness_nosleep : sets an LEDs brightness using either
>> +		brightness_set op, which is guaranteed not to sleep, or, if only
>> +		brightness_set_blocking op is available, delegates it to a work
>> +		queue task; this API is inteded for use by LED core and
>> +		led-triggers, as they can be called from atomic context, and thus
>> +		cannot sleep.
>
> led_set_brightness_nosleep() isn't part of the API intended to be used
> outside the LED framework --- I wouldn't document it here, only the part
> relevant for users outside the LED class and triggers frameworks.

OK, I'll move this description to drivers/leds/leds.h, next to the
function declaration.

>> +
>> +
>>   Hardware accelerated blink of LEDs
>>   ==================================
>>
>>
>
>


-- 
Best Regards,
Jacek Anaszewski

  reply	other threads:[~2015-09-22 11:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-21 14:29 [PATCH 0/5] LED flash: Set brightness in a sync way on demand Jacek Anaszewski
2015-09-21 14:29 ` [PATCH 1/5] leds: core: Drivers shouldn't enforce SYNC/ASYNC brightness setting Jacek Anaszewski
2015-09-22  6:42   ` Sakari Ailus
2015-09-22  7:09     ` Jacek Anaszewski
2015-09-22 19:16   ` Andrew Lunn
2015-10-08 15:50   ` Pavel Machek
2015-10-09  6:28     ` Jacek Anaszewski
2015-10-09  7:02       ` Pavel Machek
2015-10-09  8:08         ` Jacek Anaszewski
2015-10-09 11:16           ` Pavel Machek
2015-09-21 14:29 ` [PATCH 2/5] Documentation: leds: Add description of brightness setting API Jacek Anaszewski
2015-09-22 10:26   ` Sakari Ailus
2015-09-22 11:03     ` Jacek Anaszewski [this message]
2015-09-22 19:27   ` Andrew Lunn
2015-09-23  9:24     ` Jacek Anaszewski
2015-09-21 14:29 ` [PATCH 3/5] leds: max77693: Remove work queue Jacek Anaszewski
2015-09-22 10:28   ` Sakari Ailus
2015-09-21 14:29 ` [PATCH 4/5] leds: aat1290: " Jacek Anaszewski
2015-09-21 14:29 ` [PATCH 5/5] leds: ktd2692: " Jacek Anaszewski
2015-10-08 15:50   ` Pavel Machek

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=56013587.9040009@samsung.com \
    --to=j.anaszewski@samsung.com \
    --cc=andrew@lunn.ch \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).