Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1231286
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Jacek Anaszewski <j.anaszewski@samsung.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/5] leds: Rename brightness_set_sync op to brightness_set_blocking |
| Date | Wed, 23 Sep 2015 11:40:02 +0200 |
| Message-ID | <qbOGS-bd-33@gated-at.bofh.it> (permalink) |
| References | <q9irL-226-3@gated-at.bofh.it> <q9irM-226-21@gated-at.bofh.it> <qbB6W-5Uu-29@gated-at.bofh.it> <qbNKO-7hp-9@gated-at.bofh.it> |
| X-Original-To | Andrew Lunn <andrew@lunn.ch> |
| X-Auditid | cbfec7f5-f794b6d000001495-e9-5602721092ad |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130804 Thunderbird/17.0.8 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Brightmail-Tracker | H4sIAAAAAAAAA+NgFupkkeLIzCtJLcpLzFFi42I5/e/4VV2BIqYwg9d7TS3O3z3EbDHnfAuL xZQ/y5ksLu+aw2ax9c06Rovf3btZLPoOSVrcPXWUzaKrex6Txact35gsOvumsThwe6y4d5fJ Y8vKm0weO2fdZfe4c20Pm8e8k4EeO3d8ZvI4dGEdi8eK1d/ZPZpOtbN6fN4kF8AVxWWTkpqT WZZapG+XwJVxeOFjpoIGoYrVW9qZGhj7+LoYOTkkBEwk2g98YoSwxSQu3FvP1sXIxSEksJRR 4ti0tewQzjNGiYau48wgVbwCWhLX9qwCs1kEVCWubL/OBmKzCRhK/HzxmgnEFhWIkPhzeh8r RL2gxI/J91hAbBEBBYkpJ/+wggxlFuhlkvj+bTNYs7BApMTy9pXMENtOMkpcm3cQrINTQFui cdY9sKnMAtYSKydtY4Sw5SU2r3nLPIFRYBaSJbOQlM1CUraAkXkVo2hqaXJBcVJ6rpFecWJu cWleul5yfu4mRkgEfd3BuPSY1SFGAQ5GJR5ei++MYUKsiWXFlbmHGCU4mJVEeJ8GMIUJ8aYk VlalFuXHF5XmpBYfYpTmYFES5525632IkEB6YklqdmpqQWoRTJaJg1OqgTHswlbvondrhGcI HPx59deKAOGkitNsXz/0el51VvnCffp7h/CWkCUBOue3nTulZHVySjmXr177Iwv9dCFenS9L znE/Y57eNtWvhTPiFNO6V/ct7l+//59D1JA9ocGOq8H0Javbx3oFzYmKFXdZ7D4aCm2XNtu9 dwNTu8Eq860zs/iVhRfU6yuxFGckGmoxFxUnAgBwqIkRnAIAAA== |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 61 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, sakari.ailus@linux.intel.com, stsp@users.sourceforge.net, pavel@ucw.cz, ospite@studenti.unina.it, davem@davemloft.net, linus.walleij@linaro.org, ricardo.ribalda@gmail.com, p.meerwald@bct-electronic.com |
| X-Original-Date | Wed, 23 Sep 2015 11:34:07 +0200 |
| X-Original-Message-ID | <5602720F.7080405@samsung.com> |
| X-Original-References | <1442400464-27367-1-git-send-email-j.anaszewski@samsung.com> <1442400464-27367-4-git-send-email-j.anaszewski@samsung.com> <20150922185426.GC20029@lunn.ch> <5602648D.9040609@samsung.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1231286 |
Show key headers only | View raw
On 09/23/2015 10:36 AM, Jacek Anaszewski wrote: > On 09/22/2015 08:54 PM, Andrew Lunn wrote: >> On Wed, Sep 16, 2015 at 12:47:42PM +0200, Jacek Anaszewski wrote: >>> The initial purpose of brightness_set_sync op, introduced along with >>> the LED flash class extension, was to add a means for setting torch LED >>> brightness as soon as possible, which couldn't have been guaranteed by >>> brightness_set op. This patch renames the op to brightness_set_blocking, >>> which describes its purpose in a more generic way, and is beneficial >>> in view of the prospective changes in the core related to using >>> LED core's set_brightness_work for setting brightness for LED class >>> drivers that can sleep or use delays while setting brightness. >> >> ... >> >>> - /* >>> - * Set LED brightness level immediately - it can block the >>> caller for >>> - * the time required for accessing a LED device register. >>> - */ >>> - int (*brightness_set_sync)(struct led_classdev *led_cdev, >>> - enum led_brightness brightness); >>> + /* Can sleep or use delays */ >>> + int (*brightness_set_blocking)(struct led_classdev *led_cdev, >> >> I'm no expert when it comes to flash photography with digital >> cameras. > > This op is now not specific to flash LEDs. The last sentence in the > commit message explains this, but now I see that it is too long. > Let's change it to: > > "This patch renames the op to brightness_set_blocking, > which describes its purpose in a more generic way. It is beneficial > in view of the prospective changes in the LED core, aiming at removing > the need for using work queues in LED class drivers that can sleep > or use delays while setting brightness." > >> But to me the old comment seems better. > > I changed it to highlight the essence of how it differs from > brightness_set. > >> Doesn't the caller >> want to know the flash is now giving out light? > > We have strobe_get op for this, but it is in led-class-flash extension. > This is irrelevant here. I focused myself on flash mode of flash LED, but you asked probably about brightness in torch mode, which can be obtained with brightness_get op, if implemented by the driver. -- Best Regards, Jacek Anaszewski -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH 3/5] leds: Rename brightness_set_sync op to brightness_set_blocking Andrew Lunn <andrew@lunn.ch> - 2015-09-22 21:10 +0200
Re: [PATCH 3/5] leds: Rename brightness_set_sync op to brightness_set_blocking Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-09-23 10:40 +0200
Re: [PATCH 3/5] leds: Rename brightness_set_sync op to brightness_set_blocking Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-09-23 11:40 +0200
csiph-web