Re: [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support

2012-08-10 Thread Russell King - ARM Linux
On Fri, Aug 10, 2012 at 10:41:58AM +0200, Linus Walleij wrote: > On Fri, Aug 10, 2012 at 10:35 AM, Thierry Reding > wrote: > >> Consult the following article on LWN: > >> http://lwn.net/Articles/470820/ > >> > >> Then grep your gitlog and you'll see we got rid of it from ARM. > > > > Then why is

Re: [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support

2012-08-10 Thread Thierry Reding
On Fri, Aug 10, 2012 at 10:41:58AM +0200, Linus Walleij wrote: > On Fri, Aug 10, 2012 at 10:35 AM, Thierry Reding > wrote: > >> Consult the following article on LWN: > >> http://lwn.net/Articles/470820/ > >> > >> Then grep your gitlog and you'll see we got rid of it from ARM. > > > > Then why is

Re: [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support

2012-08-10 Thread Linus Walleij
On Fri, Aug 10, 2012 at 10:35 AM, Thierry Reding wrote: >> Consult the following article on LWN: >> http://lwn.net/Articles/470820/ >> >> Then grep your gitlog and you'll see we got rid of it from ARM. > > Then why is there still the following in arch/arm/include/asm/irq.h? > > /* >

Re: [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support

2012-08-10 Thread Thierry Reding
On Fri, Aug 10, 2012 at 10:19:02AM +0200, Linus Walleij wrote: > On Thu, Aug 9, 2012 at 10:20 PM, Thierry Reding > wrote: > > On Sun, Jul 29, 2012 at 07:13:57PM +0200, Linus Walleij wrote: > >> > + client->irq = irq_of_parse_and_map(client->dev.of_node, 0); > >> > + if (client->irq ==

Re: [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support

2012-08-10 Thread Linus Walleij
On Thu, Aug 9, 2012 at 10:20 PM, Thierry Reding wrote: > On Sun, Jul 29, 2012 at 07:13:57PM +0200, Linus Walleij wrote: >> > + client->irq = irq_of_parse_and_map(client->dev.of_node, 0); >> > + if (client->irq == NO_IRQ) >> >> Just if (!client->irq) since NO_IRQ is 0 nowadays. > > At

Re: [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support

2012-08-10 Thread Linus Walleij
On Thu, Aug 9, 2012 at 10:20 PM, Thierry Reding thierry.red...@avionic-design.de wrote: On Sun, Jul 29, 2012 at 07:13:57PM +0200, Linus Walleij wrote: + client-irq = irq_of_parse_and_map(client-dev.of_node, 0); + if (client-irq == NO_IRQ) Just if (!client-irq) since NO_IRQ is 0

Re: [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support

2012-08-10 Thread Thierry Reding
On Fri, Aug 10, 2012 at 10:19:02AM +0200, Linus Walleij wrote: On Thu, Aug 9, 2012 at 10:20 PM, Thierry Reding thierry.red...@avionic-design.de wrote: On Sun, Jul 29, 2012 at 07:13:57PM +0200, Linus Walleij wrote: + client-irq = irq_of_parse_and_map(client-dev.of_node, 0); +

Re: [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support

2012-08-10 Thread Linus Walleij
On Fri, Aug 10, 2012 at 10:35 AM, Thierry Reding thierry.red...@avionic-design.de wrote: Consult the following article on LWN: http://lwn.net/Articles/470820/ Then grep your gitlog and you'll see we got rid of it from ARM. Then why is there still the following in arch/arm/include/asm/irq.h?

Re: [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support

2012-08-10 Thread Thierry Reding
On Fri, Aug 10, 2012 at 10:41:58AM +0200, Linus Walleij wrote: On Fri, Aug 10, 2012 at 10:35 AM, Thierry Reding thierry.red...@avionic-design.de wrote: Consult the following article on LWN: http://lwn.net/Articles/470820/ Then grep your gitlog and you'll see we got rid of it from ARM.

Re: [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support

2012-08-10 Thread Russell King - ARM Linux
On Fri, Aug 10, 2012 at 10:41:58AM +0200, Linus Walleij wrote: On Fri, Aug 10, 2012 at 10:35 AM, Thierry Reding thierry.red...@avionic-design.de wrote: Consult the following article on LWN: http://lwn.net/Articles/470820/ Then grep your gitlog and you'll see we got rid of it from ARM.

Re: [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support

2012-08-09 Thread Thierry Reding
On Sun, Jul 29, 2012 at 07:13:57PM +0200, Linus Walleij wrote: > On Mon, Jul 23, 2012 at 1:59 PM, Thierry Reding > wrote: > > +static __devinit int adnp_i2c_probe(struct i2c_client *client, > > + const struct i2c_device_id *id) > > +{ > > + struct adnp

Re: [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support

2012-08-09 Thread Thierry Reding
On Sun, Aug 05, 2012 at 12:50:54PM +0200, Linus Walleij wrote: > On Mon, Jul 30, 2012 at 9:47 AM, Thierry Reding > wrote: > > On Sun, Jul 29, 2012 at 07:13:57PM +0200, Linus Walleij wrote: > >> On Mon, Jul 23, 2012 at 1:59 PM, Thierry Reding > >> wrote: > > >> > +- interrupt-controller: Marks

Re: [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support

2012-08-09 Thread Thierry Reding
On Sun, Aug 05, 2012 at 12:50:54PM +0200, Linus Walleij wrote: On Mon, Jul 30, 2012 at 9:47 AM, Thierry Reding thierry.red...@avionic-design.de wrote: On Sun, Jul 29, 2012 at 07:13:57PM +0200, Linus Walleij wrote: On Mon, Jul 23, 2012 at 1:59 PM, Thierry Reding

Re: [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support

2012-08-09 Thread Thierry Reding
On Sun, Jul 29, 2012 at 07:13:57PM +0200, Linus Walleij wrote: On Mon, Jul 23, 2012 at 1:59 PM, Thierry Reding thierry.red...@avionic-design.de wrote: +static __devinit int adnp_i2c_probe(struct i2c_client *client, + const struct i2c_device_id *id) +{ +

Re: [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support

2012-08-06 Thread Linus Walleij
On Mon, Aug 6, 2012 at 7:11 AM, Thierry Reding wrote: > On Sun, Aug 05, 2012 at 12:50:54PM +0200, Linus Walleij wrote: >> We're working on a goal of a "single zImage" (one unified ARM >> kernel) which means your platform must be able to handle the >> case where this is turned on anyway, so I

Re: [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support

2012-08-06 Thread Linus Walleij
On Mon, Aug 6, 2012 at 7:11 AM, Thierry Reding thierry.red...@avionic-design.de wrote: On Sun, Aug 05, 2012 at 12:50:54PM +0200, Linus Walleij wrote: We're working on a goal of a single zImage (one unified ARM kernel) which means your platform must be able to handle the case where this is

Re: [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support

2012-08-05 Thread Thierry Reding
On Sun, Aug 05, 2012 at 12:50:54PM +0200, Linus Walleij wrote: > On Mon, Jul 30, 2012 at 9:47 AM, Thierry Reding > wrote: > > On Sun, Jul 29, 2012 at 07:13:57PM +0200, Linus Walleij wrote: > >> On Mon, Jul 23, 2012 at 1:59 PM, Thierry Reding > >> wrote: > > >> > +- interrupt-controller: Marks

Re: [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support

2012-08-05 Thread Linus Walleij
On Mon, Jul 30, 2012 at 9:47 AM, Thierry Reding wrote: > On Sun, Jul 29, 2012 at 07:13:57PM +0200, Linus Walleij wrote: >> On Mon, Jul 23, 2012 at 1:59 PM, Thierry Reding >> wrote: >> > +- interrupt-controller: Marks the device as an interrupt controller. >> > +- nr-gpios: The number of pins

Re: [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support

2012-08-05 Thread Linus Walleij
On Mon, Jul 30, 2012 at 9:47 AM, Thierry Reding thierry.red...@avionic-design.de wrote: On Sun, Jul 29, 2012 at 07:13:57PM +0200, Linus Walleij wrote: On Mon, Jul 23, 2012 at 1:59 PM, Thierry Reding thierry.red...@avionic-design.de wrote: +- interrupt-controller: Marks the device as an

Re: [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support

2012-08-05 Thread Thierry Reding
On Sun, Aug 05, 2012 at 12:50:54PM +0200, Linus Walleij wrote: On Mon, Jul 30, 2012 at 9:47 AM, Thierry Reding thierry.red...@avionic-design.de wrote: On Sun, Jul 29, 2012 at 07:13:57PM +0200, Linus Walleij wrote: On Mon, Jul 23, 2012 at 1:59 PM, Thierry Reding

Re: [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support

2012-08-02 Thread Thierry Reding
On Tue, Jul 31, 2012 at 05:03:05PM -0500, Rob Herring wrote: > For nr-gpios, I think it is typically not needed. Generally, you will > know how many gpio lines the h/w has based on the compatible string. If > this part really is the same part but different packages with different > numbers of

Re: [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support

2012-08-02 Thread Thierry Reding
On Tue, Jul 31, 2012 at 05:03:05PM -0500, Rob Herring wrote: For nr-gpios, I think it is typically not needed. Generally, you will know how many gpio lines the h/w has based on the compatible string. If this part really is the same part but different packages with different numbers of gpio,

Re: [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support

2012-07-31 Thread Stephen Warren
On 07/31/2012 04:03 PM, Rob Herring wrote: > On 07/30/2012 02:47 AM, Thierry Reding wrote: >> On Sun, Jul 29, 2012 at 07:13:57PM +0200, Linus Walleij wrote: >>> On Mon, Jul 23, 2012 at 1:59 PM, Thierry Reding >>> wrote: >>> This commit adds a driver for the Avionic Design N-bit GPIO

Re: [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support

2012-07-31 Thread Rob Herring
On 07/30/2012 02:47 AM, Thierry Reding wrote: > On Sun, Jul 29, 2012 at 07:13:57PM +0200, Linus Walleij wrote: >> On Mon, Jul 23, 2012 at 1:59 PM, Thierry Reding >> wrote: >> >>> This commit adds a driver for the Avionic Design N-bit GPIO expander. >>> The expander provides a variable number of

Re: [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support

2012-07-31 Thread Rob Herring
On 07/30/2012 02:47 AM, Thierry Reding wrote: On Sun, Jul 29, 2012 at 07:13:57PM +0200, Linus Walleij wrote: On Mon, Jul 23, 2012 at 1:59 PM, Thierry Reding thierry.red...@avionic-design.de wrote: This commit adds a driver for the Avionic Design N-bit GPIO expander. The expander provides a

Re: [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support

2012-07-31 Thread Stephen Warren
On 07/31/2012 04:03 PM, Rob Herring wrote: On 07/30/2012 02:47 AM, Thierry Reding wrote: On Sun, Jul 29, 2012 at 07:13:57PM +0200, Linus Walleij wrote: On Mon, Jul 23, 2012 at 1:59 PM, Thierry Reding thierry.red...@avionic-design.de wrote: This commit adds a driver for the Avionic Design

Re: [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support

2012-07-30 Thread Thierry Reding
On Sun, Jul 29, 2012 at 07:13:57PM +0200, Linus Walleij wrote: > On Mon, Jul 23, 2012 at 1:59 PM, Thierry Reding > wrote: > > > This commit adds a driver for the Avionic Design N-bit GPIO expander. > > The expander provides a variable number of GPIO pins with interrupt > > support. > (...) > >

Re: [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support

2012-07-30 Thread Thierry Reding
On Sun, Jul 29, 2012 at 07:13:57PM +0200, Linus Walleij wrote: On Mon, Jul 23, 2012 at 1:59 PM, Thierry Reding thierry.red...@avionic-design.de wrote: This commit adds a driver for the Avionic Design N-bit GPIO expander. The expander provides a variable number of GPIO pins with interrupt

Re: [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support

2012-07-29 Thread Arnd Bergmann
On Sunday 29 July 2012, Linus Walleij wrote: > > +- #interrupt-cells: Should be 2. The first cell contains the GPIO number, > > + whereas the second cell is used to specify flags: > > +bits[3:0] trigger type and level flags > > + 1 = low-to-high edge triggered > > + 2 = high-to-low

Re: [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support

2012-07-29 Thread Linus Walleij
On Mon, Jul 23, 2012 at 1:59 PM, Thierry Reding wrote: > This commit adds a driver for the Avionic Design N-bit GPIO expander. > The expander provides a variable number of GPIO pins with interrupt > support. (...) > diff --git a/Documentation/devicetree/bindings/gpio/gpio-adnp.txt >

Re: [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support

2012-07-29 Thread Linus Walleij
On Mon, Jul 23, 2012 at 1:59 PM, Thierry Reding thierry.red...@avionic-design.de wrote: This commit adds a driver for the Avionic Design N-bit GPIO expander. The expander provides a variable number of GPIO pins with interrupt support. (...) diff --git

Re: [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support

2012-07-29 Thread Arnd Bergmann
On Sunday 29 July 2012, Linus Walleij wrote: +- #interrupt-cells: Should be 2. The first cell contains the GPIO number, + whereas the second cell is used to specify flags: +bits[3:0] trigger type and level flags + 1 = low-to-high edge triggered + 2 = high-to-low edge

[PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support

2012-07-23 Thread Thierry Reding
This commit adds a driver for the Avionic Design N-bit GPIO expander. The expander provides a variable number of GPIO pins with interrupt support. Cc: Grant Likely Cc: Rob Herring Cc: devicetree-disc...@lists.ozlabs.org Cc: Linus Walleij Signed-off-by: Thierry Reding --- Changes in v2: -

[PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support

2012-07-23 Thread Thierry Reding
This commit adds a driver for the Avionic Design N-bit GPIO expander. The expander provides a variable number of GPIO pins with interrupt support. Cc: Grant Likely grant.lik...@secretlab.ca Cc: Rob Herring rob.herr...@calxeda.com Cc: devicetree-disc...@lists.ozlabs.org Cc: Linus Walleij