Re: [PATCH] leds: implement OpenFirmare GPIO LED driver

2008-07-17 Thread Grant Likely
On Fri, Jul 18, 2008 at 01:35:12PM +1000, David Gibson wrote: > This brings us back to the issue we also have with DCR controlled > devices. Possibly we should have two ways of representing these > connections: for "pure" GPIO-only or DCR-only devices, they appear > under the relevant controller w

Re: [PATCH] leds: implement OpenFirmare GPIO LED driver

2008-07-17 Thread David Gibson
On Thu, Jul 17, 2008 at 09:07:15AM -0600, Grant Likely wrote: > On Thu, Jul 17, 2008 at 03:07:30PM +0400, Anton Vorontsov wrote: > > On Thu, Jul 17, 2008 at 07:59:03AM +0200, Segher Boessenkool wrote: > > > What would be the parent node of this, btw? > > > > This is tricky question. Personally I p

Re: [PATCH] leds: implement OpenFirmare GPIO LED driver

2008-07-17 Thread Grant Likely
On Thu, Jul 17, 2008 at 03:07:30PM +0400, Anton Vorontsov wrote: > On Thu, Jul 17, 2008 at 07:59:03AM +0200, Segher Boessenkool wrote: > > What would be the parent node of this, btw? > > This is tricky question. Personally I place them inside the gpio > controller node that is responsible for the

Re: [PATCH] leds: implement OpenFirmare GPIO LED driver

2008-07-17 Thread Sean MacLennan
On Thu, 17 Jul 2008 15:07:30 +0400 "Anton Vorontsov" <[EMAIL PROTECTED]> wrote: > This is tricky question. Personally I place them inside the gpio > controller node that is responsible for the LED. But I think placing > the led nodes at top level would be also fine (maybe with "leds { }" > node as

Re: [PATCH] leds: implement OpenFirmare GPIO LED driver

2008-07-17 Thread Anton Vorontsov
On Thu, Jul 17, 2008 at 07:59:03AM +0200, Segher Boessenkool wrote: >> diff --git a/Documentation/powerpc/dts-bindings/gpio/led.txt >> b/Documentation/powerpc/dts-bindings/gpio/led.txt >> new file mode 100644 >> index 000..7e9ce81 >> --- /dev/null >> +++ b/Documentation/powerpc/dts-bindings/g

Re: [PATCH] leds: implement OpenFirmare GPIO LED driver

2008-07-16 Thread Segher Boessenkool
diff --git a/Documentation/powerpc/dts-bindings/gpio/led.txt b/Documentation/powerpc/dts-bindings/gpio/led.txt new file mode 100644 index 000..7e9ce81 --- /dev/null +++ b/Documentation/powerpc/dts-bindings/gpio/led.txt @@ -0,0 +1,15 @@ +LED connected to GPIO + +Required properties: +- compati

Re: [PATCH] leds: implement OpenFirmare GPIO LED driver

2008-07-15 Thread Anton Vorontsov
Hello Stephen, On Tue, Jul 15, 2008 at 01:10:04PM +1000, Stephen Rothwell wrote: [...] > > + led->np = np; > > You need to take a reference if you are keeping a pointer to a > device_node, so: > led->np = of_node_get(np); > > > + led->cdev.name = of_get_property(np, "label", NULL); > >

Re: [PATCH] leds: implement OpenFirmare GPIO LED driver

2008-07-14 Thread Stephen Rothwell
Hi Anton, On Mon, 14 Jul 2008 20:41:14 +0400 Anton Vorontsov <[EMAIL PROTECTED]> wrote: > > +static int __devinit of_gpio_leds_probe(struct of_device *ofdev, > + const struct of_device_id *match) > +{ > + int ret; > + struct of_gpio_led *led; > + str