Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1189698

Re: [PATCH/RFC 01/51] leds: Add led_set_brightness_sync to the public LED subsystem API

From Pavel Machek <pavel@ucw.cz>
Newsgroups linux.kernel
Subject Re: [PATCH/RFC 01/51] leds: Add led_set_brightness_sync to the public LED subsystem API
Date 2015-07-22 09:30 +0200
Message-ID <pOWDw-8tv-13@gated-at.bofh.it> (permalink)
References <pN9vb-kw-3@gated-at.bofh.it> <pN9Ye-18j-27@gated-at.bofh.it> <pOCv8-4Le-17@gated-at.bofh.it> <pOHXR-4c6-61@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue 2015-07-21 17:43:17, Jacek Anaszewski wrote:
> On 21.07.2015 11:50, Pavel Machek wrote:
> >On Fri 2015-07-17 10:46:47, Jacek Anaszewski wrote:
> >>led_set_brightness_sync function was visible only internally to the
> >>LED subsystem. It is now being made publicly available since it has
> >>become apparent that this is a caller who should decide whether
> >>brightness is to be set in a synchronous or an asynchronous way.
> >>The function is modified to use brightness_set op as the second
> >>option if brightness_set_sync is not implemented. Eventually all
> >>LED subsystem drivers will be modfified to set brightness only in
> >>a synchronous way with use of brightness_set op and brightness_set_sync
> >>op will be removed. LED core will take care of calling brightness_set
> >>op asynchronously if needed.
> >
> >As I explained before, having single brightness_set callback sometimes
> >block and sometimes not based on flag elsewhere is a bad design.
> 
> The flag is not "elsewhere" but defined by the same driver that
> implements the op.

Single callback sometimes blocks and sometimes does not, based on flag
elsewhere (*). Making both human and computer analysis more tricky. Just
don't do it.

									Pavel

(*) sure, in the same driver, somewhere. but that info should be in
the callback name.
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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 | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH/RFC v4 00/51] Remove work queues from LED class drivers Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 10:50 +0200
  [PATCH/RFC 32/51] leds: gpio: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 10:50 +0200
  [PATCH/RFC 10/51] leds: bd2802: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 10:50 +0200
  [PATCH/RFC 27/51] leds: mc13783: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 10:50 +0200
  [PATCH/RFC 39/51] leds: ss4200: Mark the LED fast Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 10:50 +0200
  [PATCH/RFC 04/51] leds: Improve setting brightness in a non sleeping  way Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 10:50 +0200
  [PATCH/RFC 44/51] leds: cobalt-qube: Mark the LED fast Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:00 +0200
  [PATCH/RFC 47/51] leds: locomo: Mark the LED fast Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:00 +0200
  [PATCH/RFC 42/51] leds: net48xx: Mark the LED fast Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:00 +0200
  [PATCH/RFC 45/51] leds: fsg: Mark the LED fast Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:00 +0200
  [PATCH/RFC 48/51] leds: dell: Mark the LED fast Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:00 +0200
  [PATCH/RFC 37/51] leds: ot200: Mark the LED fast Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:00 +0200
  [PATCH/RFC 33/51] leds: cobalt-raq: Mark the LED fast Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:00 +0200
  [PATCH/RFC 49/51] leds: rb532: Mark the LED fast Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:00 +0200
  [PATCH/RFC 50/51] leds: sunfire: Mark the LED fast Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:00 +0200
  [PATCH/RFC 38/51] leds: s3c24xx: Mark the LED fast Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:00 +0200
  [PATCH/RFC 35/51] leds: bcm6358: Mark the LED fast Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:00 +0200
  [PATCH/RFC 46/51] leds: hp6xx: Mark the LED fast Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:00 +0200
  [PATCH/RFC 34/51] leds: bcm6328: Mark the LED fast Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:00 +0200
  [PATCH/RFC 41/51] leds: wrap: Mark the LED fast Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:00 +0200
  [PATCH/RFC 43/51] leds: asic3: Mark the LED fast Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:00 +0200
  [PATCH/RFC 40/51] leds: versatile: Mark the LED fast Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:00 +0200
    Re: [PATCH/RFC 40/51] leds: versatile: Mark the LED fast Linus Walleij <linus.walleij@linaro.org> - 2015-07-17 15:50 +0200
  [PATCH/RFC 51/51] leds: ipaq-micro: Mark the LED fast Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:00 +0200
    Re: [PATCH/RFC 51/51] leds: ipaq-micro: Mark the LED fast Linus Walleij <linus.walleij@linaro.org> - 2015-07-17 15:50 +0200
  [PATCH/RFC 23/51] leds: da9052: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:10 +0200
  [PATCH/RFC 20/51] leds: pca963x: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:10 +0200
  [PATCH/RFC 25/51] leds: lt3593: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:10 +0200
  [PATCH/RFC 26/51] leds: max8997: Remove unneeded workqueue include Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:10 +0200
  [PATCH/RFC 18/51] leds: lp8860: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:10 +0200
    Re: [PATCH/RFC 18/51] leds: lp8860: Remove work queue Dan Murphy <dmurphy@ti.com> - 2015-07-17 16:00 +0200
  [PATCH/RFC 19/51] leds: pca955x: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:10 +0200
  [PATCH/RFC 28/51] leds: regulator: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:10 +0200
  [PATCH/RFC 15/51] leds: lp3944: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:10 +0200
  [PATCH/RFC 21/51] leds: wm831x: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:10 +0200
    Re: [PATCH/RFC 21/51] leds: wm831x: Remove work queue Mark Brown <broonie@kernel.org> - 2015-07-17 12:10 +0200
  [PATCH/RFC 16/51] leds: lp55xx: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:10 +0200
  [PATCH/RFC 13/51] leds: lm3642: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:10 +0200
  [PATCH/RFC 17/51] leds: lp8788: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:10 +0200
  [PATCH/RFC 31/51] leds: lm355x: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:10 +0200
  [PATCH/RFC 29/51] leds: wm8350: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:10 +0200
    Re: [PATCH/RFC 29/51] leds: wm8350: Remove work queue Mark Brown <broonie@kernel.org> - 2015-07-17 12:10 +0200
  [PATCH/RFC 06/51] media: flash: use led_set_brightness_sync for torch  brightness Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:20 +0200
  [PATCH/RFC 03/51] leds: Add an internal led_set_brightness_nosleep  function Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:20 +0200
  [PATCH/RFC 07/51] leds: tlc591xx: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:20 +0200
  [PATCH/RFC 12/51] leds: lm3533: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:20 +0200
    Re: [PATCH/RFC 12/51] leds: lm3533: Remove work queue Johan Hovold <johan@kernel.org> - 2015-07-17 11:30 +0200
  [PATCH/RFC 01/51] leds: Add led_set_brightness_sync to the public LED  subsystem API Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:20 +0200
    Re: [PATCH/RFC 01/51] leds: Add led_set_brightness_sync to the  public LED subsystem API Pavel Machek <pavel@ucw.cz> - 2015-07-22 09:30 +0200
  [PATCH/RFC 11/51] leds: blinkm: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:20 +0200
  [PATCH/RFC 05/51] leds: Drivers shouldn't enforce SYNC/ASYNC  brightness setting Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-07-17 11:20 +0200

csiph-web