Re: [PATCH 1/2] GPIO: Add support for dual channel in gpio-xilinx.c

2013-06-24 Thread Linus Walleij
On Thu, Jun 20, 2013 at 2:12 PM, Michal Simek wrote: > xlnx,is-dual is always present in the HW and in all DTSes and it > is generated for several years > > Based on my experience with hardware guys what happen when they add > new channel is that they will use xlnx,is-dual = 2 for 3 channels, > x

Re: [PATCH 1/2] GPIO: Add support for dual channel in gpio-xilinx.c

2013-06-20 Thread Michal Simek
On 06/20/2013 01:33 PM, Linus Walleij wrote: > On Thu, Jun 20, 2013 at 12:59 PM, Michal Simek wrote: >> On 06/20/2013 11:23 AM, Linus Walleij wrote: > >>> What about something like this: >>> >>> static bool is_dual (struct device_node *np) >>> { >>> struct property *prop = of_find_property(np

Re: [PATCH 1/2] GPIO: Add support for dual channel in gpio-xilinx.c

2013-06-20 Thread Linus Walleij
On Thu, Jun 20, 2013 at 12:59 PM, Michal Simek wrote: > On 06/20/2013 11:23 AM, Linus Walleij wrote: >> What about something like this: >> >> static bool is_dual (struct device_node *np) >> { >> struct property *prop = of_find_property(np, "xlnx,is-dual", NULL); >> int ret; >> u32 val

Re: [PATCH 1/2] GPIO: Add support for dual channel in gpio-xilinx.c

2013-06-20 Thread Michal Simek
On 06/20/2013 11:23 AM, Linus Walleij wrote: > On Thu, Jun 20, 2013 at 9:51 AM, Michal Simek wrote: >> On 06/17/2013 07:29 AM, Linus Walleij wrote: > >>> I think of_property_read_bool() will accept >>> xlnx,is-dual = <1>; to mean the same as xlnx,is-dual; >>> try it. >> >> First of all sorry for

Re: [PATCH 1/2] GPIO: Add support for dual channel in gpio-xilinx.c

2013-06-20 Thread Linus Walleij
On Thu, Jun 20, 2013 at 9:51 AM, Michal Simek wrote: > On 06/17/2013 07:29 AM, Linus Walleij wrote: >> I think of_property_read_bool() will accept >> xlnx,is-dual = <1>; to mean the same as xlnx,is-dual; >> try it. > > First of all sorry for delay. > You are right that of_property_read_bool() > a

Re: [PATCH 1/2] GPIO: Add support for dual channel in gpio-xilinx.c

2013-06-20 Thread Michal Simek
On 06/17/2013 07:29 AM, Linus Walleij wrote: > On Fri, May 31, 2013 at 9:34 AM, Michal Simek wrote: >> On 05/31/2013 09:14 AM, Linus Walleij wrote: > >>> It's OK, but fix the boolean member so as to just needing to >>> be present: >>> >>> xlnx,is-dual; >>> >>> Rather than >>> >>> xlnx,is-dual = <

Re: [PATCH 1/2] GPIO: Add support for dual channel in gpio-xilinx.c

2013-06-16 Thread Linus Walleij
On Fri, May 31, 2013 at 9:34 AM, Michal Simek wrote: > On 05/31/2013 09:14 AM, Linus Walleij wrote: >> It's OK, but fix the boolean member so as to just needing to >> be present: >> >> xlnx,is-dual; >> >> Rather than >> >> xlnx,is-dual = <1>; > > Surely I can do it but it means to change our BSP

Re: [PATCH 1/2] GPIO: Add support for dual channel in gpio-xilinx.c

2013-05-31 Thread Michal Simek
On 05/31/2013 09:14 AM, Linus Walleij wrote: > On Fri, May 31, 2013 at 7:43 AM, Michal Simek wrote: >> On 05/30/2013 09:46 PM, Linus Walleij wrote: > >>> (...) +/* Read/Write access to the GPIO registers */ +#define xgpio_readreg(offset) __raw_readl(offset) +#define xgpio_

Re: [PATCH 1/2] GPIO: Add support for dual channel in gpio-xilinx.c

2013-05-31 Thread Linus Walleij
On Fri, May 31, 2013 at 7:43 AM, Michal Simek wrote: > On 05/30/2013 09:46 PM, Linus Walleij wrote: >> (...) >>> +/* Read/Write access to the GPIO registers */ >>> +#define xgpio_readreg(offset) __raw_readl(offset) >>> +#define xgpio_writereg(offset, val)__raw_writel(val, offset) >>

Re: [PATCH 1/2] GPIO: Add support for dual channel in gpio-xilinx.c

2013-05-30 Thread Michal Simek
Hi Linus, On 05/30/2013 09:46 PM, Linus Walleij wrote: > On Wed, May 29, 2013 at 1:27 PM, Michal Simek wrote: > >> Supporting the second channel in the driver. >> Offset is 0x8 and both channnels share the same >> IRQ. >> >> Signed-off-by: Michal Simek > > (...) >> +/* Read/Write access to the

Re: [PATCH 1/2] GPIO: Add support for dual channel in gpio-xilinx.c

2013-05-30 Thread Linus Walleij
On Wed, May 29, 2013 at 1:27 PM, Michal Simek wrote: > Supporting the second channel in the driver. > Offset is 0x8 and both channnels share the same > IRQ. > > Signed-off-by: Michal Simek (...) > +/* Read/Write access to the GPIO registers */ > +#define xgpio_readreg(offset) __raw_rea

[PATCH 1/2] GPIO: Add support for dual channel in gpio-xilinx.c

2013-05-29 Thread Michal Simek
Supporting the second channel in the driver. Offset is 0x8 and both channnels share the same IRQ. Signed-off-by: Michal Simek --- drivers/gpio/gpio-xilinx.c | 93 -- 1 file changed, 81 insertions(+), 12 deletions(-) diff --git a/drivers/gpio/gpio-xili