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


Groups > linux.kernel > #1211283

Re: [PATCH/RFC v6 05/36] leds: Improve setting brightness in a non sleeping way

From Andrew Lunn <andrew@lunn.ch>
Newsgroups linux.kernel
Subject Re: [PATCH/RFC v6 05/36] leds: Improve setting brightness in a non sleeping way
Date 2015-08-21 20:00 +0200
Message-ID <pZYLE-2oU-5@gated-at.bofh.it> (permalink)
References <pZzkd-7Tp-3@gated-at.bofh.it> <pZzkf-7Tp-51@gated-at.bofh.it> <pZAJk-1B8-1@gated-at.bofh.it> <pZQO8-7UZ-39@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Aug 21, 2015 at 11:22:33AM +0200, Jacek Anaszewski wrote:
> Hi Andrew,
> 
> Thanks for the review.
> 
> On 08/20/2015 06:09 PM, Andrew Lunn wrote:
> >On Thu, Aug 20, 2015 at 04:43:35PM +0200, Jacek Anaszewski wrote:
> >>This patch replaces led_set_brightness_async with
> >>led_set_brightness_nosleep in all places where the most vital was setting
> >>brightness in a non sleeping way but not necessarily asynchronously, which
> >>is not needed for non-blocking drivers.
> >
> >O.K, so i've lost the plot. _sync, _asymc, _nosleep, etc. Too many
> >changes without a clearly documented vision of what you are trying to
> >achieve.
> >
> >How about splitting this up into at least two patch sets.
> >
> >1) Add the brightness_set_blocking op and the minimum of changes
> >needed to the core to make it work, and the driver changes taking out
> >the work queue.
> 
> The minimum of changes needed includes harnessing existing
> set_brightness_work for setting brightness instead of the work queues
> in the drivers.

I'm not sure that is the correct architecture.

The work queue is in the class, not the core. So you need to define
the core API to not need this work queue. What exactly is the core
API? What does it say about blocking and non-blocking, synchronous and
non-synchronous?

Adding the work queue to the core is the quick and simple way of
removing it from the drivers. Maybe that is the way forward. You can
then later come back and sort out the core API and the class API, and
clean up the documentation.

      Andrew


--
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 v6 00/36] Remove work queues from LED class drivers Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 16:50 +0200
  [PATCH/RFC v6 31/36] leds: mc13783: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 16:50 +0200
  [PATCH/RFC v6 14/36] leds: bd2802: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 16:50 +0200
  [PATCH/RFC v6 07/36] Documentation: leds: Add description of  brightness_set* ops Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 16:50 +0200
  [PATCH/RFC v6 02/36] leds: Add led_set_brightness_sync to the public  LED subsystem API Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 16:50 +0200
    Re: [PATCH/RFC v6 02/36] leds: Add led_set_brightness_sync to the  public LED subsystem API Andrew Lunn <andrew@lunn.ch> - 2015-08-20 18:00 +0200
  [PATCH/RFC v6 27/36] leds: da9052: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 16:50 +0200
  [PATCH/RFC v6 01/36] leds: Add brightness_set_blocking op Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 16:50 +0200
    Re: [PATCH/RFC v6 01/36] leds: Add brightness_set_blocking op Andrew Lunn <andrew@lunn.ch> - 2015-08-20 17:30 +0200
    Re: [PATCH/RFC v6 01/36] leds: Add brightness_set_blocking op Pavel Machek <pavel@ucw.cz> - 2015-08-24 13:50 +0200
  [PATCH/RFC v6 17/36] leds: lm3642: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 16:50 +0200
  [PATCH/RFC v6 06/36] leds: Drivers shouldn't enforce SYNC/ASYNC  brightness setting Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 16:50 +0200
  [PATCH/RFC v6 34/36] leds: gpio: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 16:50 +0200
  [PATCH/RFC v6 09/36] leds: aat1290: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 16:50 +0200
  [PATCH/RFC v6 03/36] leds: Improve asynchronous path of setting  brightness Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 16:50 +0200
  [PATCH/RFC v6 16/36] leds: lm3533: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 16:50 +0200
  [PATCH/RFC v6 36/36] leds: lm355x: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 16:50 +0200
  [PATCH/RFC v6 08/36] leds: ktd2692: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 16:50 +0200
  [PATCH/RFC v6 33/36] leds: wm8350: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 16:50 +0200
  [PATCH/RFC v6 18/36] leds: pca9532: Remove work queue for LEDs. Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 16:50 +0200
  [PATCH/RFC v6 13/36] leds: adp5520: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 16:50 +0200
  [PATCH/RFC v6 05/36] leds: Improve setting brightness in a non  sleeping way Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 16:50 +0200
    Re: [PATCH/RFC v6 05/36] leds: Improve setting brightness in a non  sleeping way Andrew Lunn <andrew@lunn.ch> - 2015-08-20 18:20 +0200
      Re: [PATCH/RFC v6 05/36] leds: Improve setting brightness in a non  sleeping way Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-21 11:30 +0200
        Re: [PATCH/RFC v6 05/36] leds: Improve setting brightness in a non  sleeping way Andrew Lunn <andrew@lunn.ch> - 2015-08-21 20:00 +0200
          Re: [PATCH/RFC v6 05/36] leds: Improve setting brightness in a non  sleeping way Jacek Anaszewski <jacek.anaszewski@gmail.com> - 2015-08-21 22:40 +0200
            Re: [PATCH/RFC v6 05/36] leds: Improve setting brightness in a non  sleeping way Andrew Lunn <andrew@lunn.ch> - 2015-08-21 22:50 +0200
              Re: [PATCH/RFC v6 05/36] leds: Improve setting brightness in a non  sleeping way Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-24 10:20 +0200
  [PATCH/RFC v6 12/36] leds: 88pm860x: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 16:50 +0200
  [PATCH/RFC v6 21/36] leds: lp8788: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 16:50 +0200
  [PATCH/RFC v6 29/36] leds: lt3593: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 16:50 +0200
  [PATCH/RFC v6 30/36] leds: max8997: Remove unneeded workqueue include Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 16:50 +0200
  [PATCH/RFC v6 10/36] leds: max77693: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 16:50 +0200
  [PATCH/RFC v6 15/36] leds: blinkm: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 16:50 +0200
  [PATCH/RFC v6 22/36] leds: lp8860: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 16:50 +0200
  [PATCH/RFC v6 11/36] leds: tlc591xx: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 16:50 +0200
  [PATCH/RFC v6 32/36] leds: regulator: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 16:50 +0200
    Re: [PATCH/RFC v6 32/36] leds: regulator: Remove work queue Antonio Ospite <ao2@ao2.it> - 2015-08-21 09:50 +0200
  [PATCH/RFC v6 19/36] leds: lp3944: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 16:50 +0200
    Re: [PATCH/RFC v6 19/36] leds: lp3944: Remove work queue Antonio Ospite <ao2@ao2.it> - 2015-08-21 09:50 +0200
  [PATCH/RFC v6 20/36] leds: lp55xx: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 16:50 +0200
  [PATCH/RFC v6 04/36] leds: Add an internal led_set_brightness_nosleep  function Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 16:50 +0200
  [PATCH/RFC v6 35/36] leds: pwm: remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 16:50 +0200
  [PATCH/RFC v6 28/36] leds: dac124d085: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 17:00 +0200
  [PATCH/RFC v6 25/36] leds: wm831x: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 17:00 +0200
  [PATCH/RFC v6 26/36] leds: da903x: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 17:00 +0200
  [PATCH/RFC v6 24/36] leds: pca963x: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 17:00 +0200
  [PATCH/RFC v6 23/36] leds: pca955x: Remove work queue Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-20 17:00 +0200

csiph-web