[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150630183016.GA15047@amd>
Date: Tue, 30 Jun 2015 20:30:16 +0200
From: Pavel Machek <pavel@...x.de>
To: Jacek Anaszewski <j.anaszewski@...sung.com>
Cc: linux-leds@...r.kernel.org, linux-kernel@...r.kernel.org,
cooloney@...il.com, rpurdie@...ys.net, stsp@...rs.sourceforge.net,
sakari.ailus@...ux.intel.com, andreas.werner@....de,
andrew@...n.ch, ospite@...denti.unina.it, anemo@....ocn.ne.jp,
ben@...tec.co.uk, bootc@...tc.net, dmurphy@...com,
daniel.jeong@...com, daniel@...que.org, davem@...emloft.net,
fabio.baltieri@...il.com, balbi@...com, florian@...nwrt.org,
gshark.jeong@...il.com, g.liakhovetski@....de,
ingi2.kim@...sung.com, dl9pf@....de, johan@...nel.org,
lenz@...wisc.edu, jogo@...nwrt.org, q1.kim@...sung.com,
kris@...sk.org, kristoffer.ericson@...il.com,
linus.walleij@...aro.org, broonie@...nel.org,
michael.hennerich@...log.com, milo.kim@...com, nm127@...email.hu,
ncase@...-inc.com, neilb@...e.de, nick.forbes@...epta.com,
lost.distance@...oo.com, p.meerwald@...-electronic.com,
n0-1@...ewrt.org, philippe.retornaz@...l.ch, raph@...com,
rpurdie@...nedhand.com, rod@...tby.id.au, dave@...1.net,
giometti@...ux.it, bigeasy@...utronix.de, shuahkhan@...il.com,
sguinot@...ie.com
Subject: Re: [PATCH/RFC v2 1/5] leds: Use set_brightness_work for
brightness_set ops that can sleep
>
> /* Set LED brightness level */
> /* Must not sleep, use a workqueue if needed */
> void (*brightness_set)(struct led_classdev *led_cdev,
> enum led_brightness 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);
> /* Get LED brightness level */
> enum led_brightness (*brightness_get)(struct led_classdev *led_cdev);
>
NAK. Feel free to rearrange the code so that driver's work is easier,
but keep separate callbacks for "can sleep" and "can not sleep"
situations. 4 bytes are not worth the confusion.
Pavel
--
(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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists