lkml.org 
[lkml]   [2013]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/4] gpio: palmas: Add support for Palams GPIO
On Thu, Jan 10, 2013 at 11:57:10AM +0100, Linus Walleij wrote:
> On Thu, Jan 3, 2013 at 11:46 AM, Laxman Dewangan <ldewangan@nvidia.com> wrote:

> > Add gpio driver for TI Palmas series PMIC. This has 8 gpio which can
> > work as input/output.

> > Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>

> This driver seems unnecessary. Can't you just use
> drivers/gpio/gpio-generic.c ?

This only works for memory mapped devices but this is an I2C controlled
MFD. Someone should really do a regmap gpio-chip (or convert the
gpio-generic driver to regmap, regmap does support MMIO now but it does
add a little overhead).

> > +static int palmas_gpio_to_irq(struct gpio_chip *gc, unsigned offset)
> > +{
> > + struct palmas_gpio *pg = to_palmas_gpio(gc);
> > + struct palmas *palmas = pg->palmas;
> > +
> > + return palmas_irq_get_virq(palmas, PALMAS_GPIO_0_IRQ + offset);
> > +}

> Why are you implementing this for a driver which does not even expose
> the ability to trigger IRQs? If it's supposed to support IRQs it should
> register a struct irq_chip.

The irq_chip is in the MFD core for the device.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2013-01-10 12:41    [W:2.287 / U:0.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site