Re: [PATCH 2/6] mfd: da9052: Introduce da9052-irq.c

2012-10-04 Thread Arnd Bergmann
On Thursday 04 October 2012, Mark Brown wrote: > Aside from hiding the lookup of the irqdomian a bit there's a couple of > reasons for existing devices having them: > > - With some devices like WM8994 the interrupts are optional so it's >useful to eat errors due to the interrupts not

Re: [PATCH 2/6] mfd: da9052: Introduce da9052-irq.c

2012-10-04 Thread Mark Brown
On Thu, Oct 04, 2012 at 12:15:05AM -0300, Fabio Estevam wrote: > From: Fabio Estevam > > Create a da9052-irq.c file so that it can handle interrupt related functions. > > This is useful for allowing the da9052 drivers to use such functions > when dealing with da9052 interrupts. Reviewed-by:

Re: [PATCH 2/6] mfd: da9052: Introduce da9052-irq.c

2012-10-04 Thread Mark Brown
On Thu, Oct 04, 2012 at 07:12:48AM +, Arnd Bergmann wrote: > On Thursday 04 October 2012, Fabio Estevam wrote: > > +int da9052_enable_irq(struct da9052 *da9052, int irq) > > +{ > > + irq = da9052_map_irq(da9052, irq); > > + if (irq < 0) > > + return irq; > > + > > +

Re: [PATCH 2/6] mfd: da9052: Introduce da9052-irq.c

2012-10-04 Thread Arnd Bergmann
On Thursday 04 October 2012, Fabio Estevam wrote: > +static int da9052_map_irq(struct da9052 *da9052, int irq) > +{ > + return regmap_irq_get_virq(da9052->irq_data, irq); > +} > + > +int da9052_enable_irq(struct da9052 *da9052, int irq) > +{ > + irq = da9052_map_irq(da9052, irq); > +

Re: [PATCH 2/6] mfd: da9052: Introduce da9052-irq.c

2012-10-04 Thread Arnd Bergmann
On Thursday 04 October 2012, Fabio Estevam wrote: +static int da9052_map_irq(struct da9052 *da9052, int irq) +{ + return regmap_irq_get_virq(da9052-irq_data, irq); +} + +int da9052_enable_irq(struct da9052 *da9052, int irq) +{ + irq = da9052_map_irq(da9052, irq); + if

Re: [PATCH 2/6] mfd: da9052: Introduce da9052-irq.c

2012-10-04 Thread Mark Brown
On Thu, Oct 04, 2012 at 07:12:48AM +, Arnd Bergmann wrote: On Thursday 04 October 2012, Fabio Estevam wrote: +int da9052_enable_irq(struct da9052 *da9052, int irq) +{ + irq = da9052_map_irq(da9052, irq); + if (irq 0) + return irq; + +

Re: [PATCH 2/6] mfd: da9052: Introduce da9052-irq.c

2012-10-04 Thread Mark Brown
On Thu, Oct 04, 2012 at 12:15:05AM -0300, Fabio Estevam wrote: From: Fabio Estevam fabio.este...@freescale.com Create a da9052-irq.c file so that it can handle interrupt related functions. This is useful for allowing the da9052 drivers to use such functions when dealing with da9052

Re: [PATCH 2/6] mfd: da9052: Introduce da9052-irq.c

2012-10-04 Thread Arnd Bergmann
On Thursday 04 October 2012, Mark Brown wrote: Aside from hiding the lookup of the irqdomian a bit there's a couple of reasons for existing devices having them: - With some devices like WM8994 the interrupts are optional so it's useful to eat errors due to the interrupts not existing.

[PATCH 2/6] mfd: da9052: Introduce da9052-irq.c

2012-10-03 Thread Fabio Estevam
From: Fabio Estevam Create a da9052-irq.c file so that it can handle interrupt related functions. This is useful for allowing the da9052 drivers to use such functions when dealing with da9052 interrupts. Signed-off-by: Fabio Estevam --- drivers/mfd/Makefile |1 +

[PATCH 2/6] mfd: da9052: Introduce da9052-irq.c

2012-10-03 Thread Fabio Estevam
From: Fabio Estevam fabio.este...@freescale.com Create a da9052-irq.c file so that it can handle interrupt related functions. This is useful for allowing the da9052 drivers to use such functions when dealing with da9052 interrupts. Signed-off-by: Fabio Estevam fabio.este...@freescale.com ---