Thread (25 messages) 25 messages, 4 authors, 2015-09-08

Re: [PATCH 1/3] leds: Add of_led_get() and led_put()

From: Tomi Valkeinen <hidden>
Date: 2015-08-25 12:53:18
Also in: linux-leds


On 25/08/15 15:18, Andrew Lunn wrote:
On Tue, Aug 25, 2015 at 02:34:00PM +0300, Tomi Valkeinen wrote:
quoted
This patch adds basic support for a kernel driver to get a LED device.
This will be used by the led-backlight driver.

Only OF version is implemented for now, and the behavior is similar to
PWM's of_pwm_get() and pwm_put().
Hi Tomi

Is this the correct way to do it?  I would of expected an xlate
function.
I don't know. To be honest I haven't worked much with this kind of code,
and I didn't want to start writing full blown "of" support for leds. My
solution cuts the corners a bit... Probably this is more of an RFC than
a ready patch series.

I need to look what the of_xlate functions are doing in other frameworks.
I'm also wondering if this is the right place, in the class. Don't you
just need the core?
I'm using the "static struct class *leds_class;" to find the actual
led_classdev, and that variable is local to led-class.c.

 Tomi

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help