login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
July
»
17
Re: [PATCH v3] leds: implement OpenFirmare GPIO LED driver
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Anton Vorontsov
Subject:
Re: [PATCH v3] leds: implement OpenFirmare GPIO LED driver
Date: Thursday, July 17, 2008 - 7:05 am
On Wed, Jul 16, 2008 at 10:15:31PM -0600, Grant Likely wrote:
quoted text
> On Wed, Jul 16, 2008 at 04:18:52PM -0700, Trent Piepho wrote: > > On Tue, 15 Jul 2008, Anton Vorontsov wrote: > > > Despite leds-gpio and leds-openfirmware-gpio similar purposes, there > > > is not much code can be shared between the two drivers (both are mostly > > > driver bindings anyway). > > > > Why can't this driver use the existing gpio-led driver? Basically, do > > something like this: > > > > of_gpio_leds_probe(...) > > { > > gpio = of_get_gpio(np, 0); > > label = of_get_property(np, "label", NULL); > > > > struct gpio_led led = { > > .name = label, > > .gpio = gpio, > > }; > > > > pdev = platform_device_register_simple("leds-gpio", 0, NULL, 0); > > platform_device_add_data(pdev, &led, sizeof(led)); > > } > > Ugh; that means registering *2* 'struct device' with the kernel instead of > one. One as a platform device and one as an of_platform device. > It's bad enough that the LED scheme we're using for OF bindings has a > separate registration for every single LED. > > Now that it comes to it, I worry that this driver takes the wrong > approach. The number of resources dedicated per LED in this driver > seems pretty loony to me (one of_platform device per LED). The fact > that the binding specifies one node per LED makes of_platform not a very > efficient solution. > > I think it would be better to have a module that scans the device tree > for LED nodes and registers a single leds-gpio platform device for the > whole lot. > > Thoughts?
I like the idea, thanks. -- Anton Vorontsov email:
cbouatmailru@gmail.com
irc://irc.freenode.net/bd2 --
unsubscribe notice
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/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH] leds: implement OpenFirmare GPIO LED driver
, Anton Vorontsov
, (Mon Jul 14, 9:41 am)
Re: [PATCH] leds: implement OpenFirmare GPIO LED driver
, Stephen Rothwell
, (Mon Jul 14, 8:10 pm)
Re: [PATCH] leds: implement OpenFirmare GPIO LED driver
, Anton Vorontsov
, (Tue Jul 15, 5:38 am)
[PATCH v2] leds: implement OpenFirmare GPIO LED driver
, Anton Vorontsov
, (Tue Jul 15, 5:40 am)
Re: [PATCH v2] leds: implement OpenFirmare GPIO LED driver
, Richard Purdie
, (Tue Jul 15, 5:54 am)
Re: [PATCH v2] leds: implement OpenFirmare GPIO LED driver
, Anton Vorontsov
, (Tue Jul 15, 6:24 am)
Re: [PATCH v2] leds: implement OpenFirmare GPIO LED driver
, Richard Purdie
, (Tue Jul 15, 6:31 am)
Re: [PATCH v2] leds: implement OpenFirmare GPIO LED driver
, Anton Vorontsov
, (Tue Jul 15, 7:23 am)
Re: [PATCH v2] leds: implement OpenFirmare GPIO LED driver
, Richard Purdie
, (Tue Jul 15, 7:43 am)
[PATCH v3] leds: implement OpenFirmare GPIO LED driver
, Anton Vorontsov
, (Tue Jul 15, 8:19 am)
Re: [PATCH v3] leds: implement OpenFirmare GPIO LED driver
, Trent Piepho
, (Wed Jul 16, 4:18 pm)
Re: [PATCH v2] leds: implement OpenFirmare GPIO LED driver
, Trent Piepho
, (Wed Jul 16, 4:22 pm)
Re: [PATCH v3] leds: implement OpenFirmare GPIO LED driver
, Grant Likely
, (Wed Jul 16, 9:15 pm)
Re: [PATCH v3] leds: implement OpenFirmare GPIO LED driver
, Trent Piepho
, (Wed Jul 16, 10:13 pm)
Re: [PATCH] leds: implement OpenFirmare GPIO LED driver
, Segher Boessenkool
, (Wed Jul 16, 10:59 pm)
Re: [PATCH] leds: implement OpenFirmare GPIO LED driver
, Anton Vorontsov
, (Thu Jul 17, 4:07 am)
Re: [PATCH v3] leds: implement OpenFirmare GPIO LED driver
, Anton Vorontsov
, (Thu Jul 17, 6:55 am)
Re: [PATCH v3] leds: implement OpenFirmare GPIO LED driver
, Anton Vorontsov
, (Thu Jul 17, 7:05 am)
Re: [PATCH v3] leds: implement OpenFirmare GPIO LED driver
, Anton Vorontsov
, (Thu Jul 17, 7:13 am)
Re: [PATCH] leds: implement OpenFirmare GPIO LED driver
, Sean MacLennan
, (Thu Jul 17, 7:58 am)
Re: [PATCH v3] leds: implement OpenFirmare GPIO LED driver
, Grant Likely
, (Thu Jul 17, 8:04 am)
Re: [PATCH] leds: implement OpenFirmare GPIO LED driver
, Grant Likely
, (Thu Jul 17, 8:07 am)
Re: [PATCH v3] leds: implement OpenFirmare GPIO LED driver
, Anton Vorontsov
, (Thu Jul 17, 8:20 am)
Re: [PATCH v3] leds: implement OpenFirmare GPIO LED driver
, Grant Likely
, (Thu Jul 17, 11:05 am)
Re: [PATCH v3] leds: implement OpenFirmare GPIO LED driver
, Trent Piepho
, (Thu Jul 17, 1:01 pm)
Re: [PATCH v3] leds: implement OpenFirmare GPIO LED driver
, Trent Piepho
, (Thu Jul 17, 1:18 pm)
Re: [PATCH v3] leds: implement OpenFirmare GPIO LED driver
, Grant Likely
, (Thu Jul 17, 1:49 pm)
Re: [PATCH v3] leds: implement OpenFirmare GPIO LED driver
, Nate Case
, (Thu Jul 17, 2:29 pm)
Re: [PATCH v3] leds: implement OpenFirmare GPIO LED driver
, Anton Vorontsov
, (Thu Jul 17, 4:42 pm)
Re: [PATCH] leds: implement OpenFirmare GPIO LED driver
, David Gibson
, (Thu Jul 17, 8:35 pm)
Re: [PATCH] leds: implement OpenFirmare GPIO LED driver
, Grant Likely
, (Thu Jul 17, 9:44 pm)
Re: [PATCH v3] leds: implement OpenFirmare GPIO LED driver
, Grant Likely
, (Thu Jul 17, 10:09 pm)
Re: [PATCH v3] leds: implement OpenFirmare GPIO LED driver
, Trent Piepho
, (Fri Jul 18, 2:20 am)
Re: [PATCH v3] leds: implement OpenFirmare GPIO LED driver
, Anton Vorontsov
, (Fri Jul 18, 3:05 am)
Re: PIXIS gpio controller and gpio flags
, Trent Piepho
, (Sat Jul 19, 2:08 pm)
Re: PIXIS gpio controller and gpio flags
, Anton Vorontsov
, (Mon Jul 21, 10:53 am)
Re: PIXIS gpio controller and gpio flags
, Trent Piepho
, (Mon Jul 21, 2:12 pm)
Re: PIXIS gpio controller and gpio flags
, Anton Vorontsov
, (Wed Jul 23, 7:56 am)
Re: PIXIS gpio controller and gpio flags
, Trent Piepho
, (Wed Jul 23, 4:42 pm)
[RFC PATCH] of_gpio: implement of_get_gpio_flags()
, Anton Vorontsov
, (Fri Jul 25, 9:48 am)
Re: [PATCH v3] leds: implement OpenFirmare GPIO LED driver
, Trent Piepho
, (Fri Jul 25, 1:38 pm)
[PATCH 1/2] leds: make the default trigger name const
, Trent Piepho
, (Fri Jul 25, 2:01 pm)
[PATCH 2/2] leds: Support OpenFirmware led bindings
, Trent Piepho
, (Fri Jul 25, 2:01 pm)
Re: [RFC PATCH] of_gpio: implement of_get_gpio_flags()
, Trent Piepho
, (Sat Jul 26, 1:26 am)
Re: [PATCH 1/2] leds: make the default trigger name const
, Grant Likely
, (Sat Jul 26, 7:08 pm)
Re: [PATCH 2/2] leds: Support OpenFirmware led bindings
, Grant Likely
, (Sat Jul 26, 7:21 pm)
Re: [PATCH 1/2] leds: make the default trigger name const
, Stephen Rothwell
, (Sun Jul 27, 6:11 am)
Re: [PATCH 1/2] leds: make the default trigger name const
, Trent Piepho
, (Sun Jul 27, 6:56 pm)
[PATCH v2] leds: make the default trigger name const
, Trent Piepho
, (Sun Jul 27, 7:02 pm)
Re: [PATCH 2/2] leds: Support OpenFirmware led bindings
, Trent Piepho
, (Mon Jul 28, 1:31 am)
Re: [PATCH 1/2] leds: make the default trigger name const
, Anton Vorontsov
, (Mon Jul 28, 2:53 am)
Re: [PATCH 2/2] leds: Support OpenFirmware led bindings
, Grant Likely
, (Mon Jul 28, 10:09 am)
Re: [PATCH 2/2] leds: Support OpenFirmware led bindings
, Anton Vorontsov
, (Mon Jul 28, 11:02 am)
Re: [PATCH 2/2] leds: Support OpenFirmware led bindings
, Grant Likely
, (Mon Jul 28, 11:06 am)
Re: [PATCH 2/2] leds: Support OpenFirmware led bindings
, Trent Piepho
, (Mon Jul 28, 11:26 am)
Re: [PATCH 2/2] leds: Support OpenFirmware led bindings