mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Laxman Dewangan <ldewangan@nvidia.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "sameo@linux.intel.com" <sameo@linux.intel.com>,
	"grant.likely@secretlab.ca" <grant.likely@secretlab.ca>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"a.zummo@towertech.it" <a.zummo@towertech.it>,
	"broonie@opensource.wolfsonmicro.com" 
	<broonie@opensource.wolfsonmicro.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"rtc-linux@googlegroups.com" <rtc-linux@googlegroups.com>
Subject: Re: [PATCH 3/4] gpio: palmas: Add support for Palams GPIO
Date: Thu, 10 Jan 2013 16:33:23 +0530	[thread overview]
Message-ID: <50EE9FFB.4040807@nvidia.com> (raw)
In-Reply-To: <CACRpkdbSW+aj9RSedsAMyF3UtSL+w=0KM+pxc2bGdceSy+rXaw@mail.gmail.com>

On Thursday 10 January 2013 04:27 PM, 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 ?
The gpio-generic driver is for the MMIO based interface. This is for the 
PMIC-Palma which is in i2c interface and so need to have register access 
through the i2c call exposed by palma mfd driver.



>
>> +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 interrupts are registered in mfd core via the regmap-irq_chip.
This api converts the gpio number to corresponding irq.


  reply	other threads:[~2013-01-10 11:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-03 10:46 [PATCH 0/4] mfd: palma: add RTC and GPIO support Laxman Dewangan
2013-01-03 10:46 ` [PATCH 1/4] mfd: palmas: add rtc irq number as irq resource for palmas-rtc Laxman Dewangan
2013-01-03 10:46 ` [PATCH 2/4] mfd: palmas: add apis to access the Palmas' registers Laxman Dewangan
2013-01-03 10:46 ` [PATCH 3/4] gpio: palmas: Add support for Palams GPIO Laxman Dewangan
2013-01-10 10:57   ` Linus Walleij
2013-01-10 11:03     ` Laxman Dewangan [this message]
2013-01-10 11:05     ` Mark Brown
2013-01-17 10:34   ` Linus Walleij
2013-01-17 10:35     ` Mark Brown
2013-01-17 10:37       ` Laxman Dewangan
2013-01-17 13:58         ` [rtc-linux] " Linus Walleij
2013-01-03 10:47 ` [PATCH 4/4] rtc: palmas: add RTC driver Palmas series PMIC Laxman Dewangan
2013-01-24  4:49 ` [PATCH 0/4] mfd: palma: add RTC and GPIO support Laxman Dewangan
2013-01-27  0:28 ` Samuel Ortiz
2013-01-27  8:45   ` Laxman Dewangan
2013-01-27 21:28     ` Samuel Ortiz
2013-01-28  5:30       ` Laxman Dewangan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50EE9FFB.4040807@nvidia.com \
    --to=ldewangan@nvidia.com \
    --cc=a.zummo@towertech.it \
    --cc=akpm@linux-foundation.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=grant.likely@secretlab.ca \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rtc-linux@googlegroups.com \
    --cc=sameo@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome