All of lore.kernel.org
 help / color / mirror / Atom feed
From: b.brezillon.dev@gmail.com (Boris BREZILLON)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 3/9] at91: pinctrl: don't request GPIOs used for interrupts but lock them as IRQ
Date: Mon, 17 Mar 2014 12:33:59 +0100	[thread overview]
Message-ID: <5326DDA7.3010504@gmail.com> (raw)
In-Reply-To: <CACh+v5N+Ms9ZVFN=F_sQQhRbwhiYFg6LO+383UL8iw7qYaPKtQ@mail.gmail.com>

Le 17/03/2014 12:14, Jean-Jacques Hiblot a ?crit :
> Hi Boris,
>
> Sorry for being late, I was on vacation.
> Yes this patch can be dropped from the serie.
That's fine, Nicolas dropped it ;-).


>
> 2014-03-12 13:59 GMT+01:00 Boris BREZILLON <b.brezillon.dev@gmail.com>:
>> Hi JJ,
>>
>> IIRC this patch was necessary for the DM9000 device, which is not defined
>> in this series anymore.
>> And, correct me if I'm wrong, but there's still a discussion about how
>> this should be fixed properly (https://lkml.org/lkml/2014/2/25/388).
>>
>> As a result, shouldn't we remove this patch from this series ?
>>
>> Best Regards,
>>
>> Boris
>>
>> Le 03/03/2014 11:05, Jean-Jacques Hiblot a ?crit :
>>
>>> During the xlate stage of the DT interrupt parsing, the at91 pinctrl
>>> driver
>>> requests the GPIOs that are described as interrupt sources. This prevents
>>> a
>>> driver to request the gpio later to get its electrical value.
>>> This patch replaces the gpio_request with a gpio_lock_as_irq to prevent
>>> the
>>> gpio to be set as an ouput while allowing a subsequent gpio_request to
>>> succeed
>>>
>>> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@traphandler.com>
>>> ---
>>>    drivers/pinctrl/pinctrl-at91.c | 5 ++---
>>>    1 file changed, 2 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/pinctrl/pinctrl-at91.c
>>> b/drivers/pinctrl/pinctrl-at91.c
>>> index d990e33..db55b96 100644
>>> --- a/drivers/pinctrl/pinctrl-at91.c
>>> +++ b/drivers/pinctrl/pinctrl-at91.c
>>> @@ -1478,18 +1478,17 @@ static int at91_gpio_irq_domain_xlate(struct
>>> irq_domain *d,
>>>    {
>>>          struct at91_gpio_chip *at91_gpio = d->host_data;
>>>          int ret;
>>> -       int pin = at91_gpio->chip.base + intspec[0];
>>>          if (WARN_ON(intsize < 2))
>>>                  return -EINVAL;
>>>          *out_hwirq = intspec[0];
>>>          *out_type = intspec[1] & IRQ_TYPE_SENSE_MASK;
>>>    -     ret = gpio_request(pin, ctrlr->full_name);
>>> +       ret = gpio_lock_as_irq(&at91_gpio->chip, intspec[0]);
>>>          if (ret)
>>>                  return ret;
>>>    -     ret = gpio_direction_input(pin);
>>> +       ret = at91_gpio_direction_input(&at91_gpio->chip, intspec[0]);
>>>          if (ret)
>>>                  return ret;
>>>
>>

WARNING: multiple messages have this Message-ID (diff)
From: Boris BREZILLON <b.brezillon.dev@gmail.com>
To: Jean-Jacques Hiblot <jjhiblot@traphandler.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>,
	Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Gregory CLEMENT <gregory.clement@free-electrons.com>,
	devicetree <devicetree@vger.kernel.org>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	Alexandre Belloni <alexandre.belloni@free-electrons.com>
Subject: Re: [PATCH v5 3/9] at91: pinctrl: don't request GPIOs used for interrupts but lock them as IRQ
Date: Mon, 17 Mar 2014 12:33:59 +0100	[thread overview]
Message-ID: <5326DDA7.3010504@gmail.com> (raw)
In-Reply-To: <CACh+v5N+Ms9ZVFN=F_sQQhRbwhiYFg6LO+383UL8iw7qYaPKtQ@mail.gmail.com>

Le 17/03/2014 12:14, Jean-Jacques Hiblot a écrit :
> Hi Boris,
>
> Sorry for being late, I was on vacation.
> Yes this patch can be dropped from the serie.
That's fine, Nicolas dropped it ;-).


>
> 2014-03-12 13:59 GMT+01:00 Boris BREZILLON <b.brezillon.dev@gmail.com>:
>> Hi JJ,
>>
>> IIRC this patch was necessary for the DM9000 device, which is not defined
>> in this series anymore.
>> And, correct me if I'm wrong, but there's still a discussion about how
>> this should be fixed properly (https://lkml.org/lkml/2014/2/25/388).
>>
>> As a result, shouldn't we remove this patch from this series ?
>>
>> Best Regards,
>>
>> Boris
>>
>> Le 03/03/2014 11:05, Jean-Jacques Hiblot a écrit :
>>
>>> During the xlate stage of the DT interrupt parsing, the at91 pinctrl
>>> driver
>>> requests the GPIOs that are described as interrupt sources. This prevents
>>> a
>>> driver to request the gpio later to get its electrical value.
>>> This patch replaces the gpio_request with a gpio_lock_as_irq to prevent
>>> the
>>> gpio to be set as an ouput while allowing a subsequent gpio_request to
>>> succeed
>>>
>>> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@traphandler.com>
>>> ---
>>>    drivers/pinctrl/pinctrl-at91.c | 5 ++---
>>>    1 file changed, 2 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/pinctrl/pinctrl-at91.c
>>> b/drivers/pinctrl/pinctrl-at91.c
>>> index d990e33..db55b96 100644
>>> --- a/drivers/pinctrl/pinctrl-at91.c
>>> +++ b/drivers/pinctrl/pinctrl-at91.c
>>> @@ -1478,18 +1478,17 @@ static int at91_gpio_irq_domain_xlate(struct
>>> irq_domain *d,
>>>    {
>>>          struct at91_gpio_chip *at91_gpio = d->host_data;
>>>          int ret;
>>> -       int pin = at91_gpio->chip.base + intspec[0];
>>>          if (WARN_ON(intsize < 2))
>>>                  return -EINVAL;
>>>          *out_hwirq = intspec[0];
>>>          *out_type = intspec[1] & IRQ_TYPE_SENSE_MASK;
>>>    -     ret = gpio_request(pin, ctrlr->full_name);
>>> +       ret = gpio_lock_as_irq(&at91_gpio->chip, intspec[0]);
>>>          if (ret)
>>>                  return ret;
>>>    -     ret = gpio_direction_input(pin);
>>> +       ret = at91_gpio_direction_input(&at91_gpio->chip, intspec[0]);
>>>          if (ret)
>>>                  return ret;
>>>
>>

  reply	other threads:[~2014-03-17 11:33 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-03 10:05 [PATCH v5 0/9] Device Tree support for the at91sam9261ek Jean-Jacques Hiblot
2014-03-03 10:05 ` Jean-Jacques Hiblot
2014-03-03 10:05 ` Jean-Jacques Hiblot
2014-03-03 10:05 ` [PATCH v5 1/9] at91: dt: Adds support for the bus matrix declaration in the DT Jean-Jacques Hiblot
2014-03-03 10:05   ` Jean-Jacques Hiblot
2014-03-03 10:05   ` Jean-Jacques Hiblot
2014-03-03 10:05 ` [PATCH v5 2/9] dt: bindings: at91: Add a new binding for the bus matrix Jean-Jacques Hiblot
2014-03-03 10:05   ` Jean-Jacques Hiblot
2014-03-03 10:05 ` [PATCH v5 3/9] at91: pinctrl: don't request GPIOs used for interrupts but lock them as IRQ Jean-Jacques Hiblot
2014-03-03 10:05   ` Jean-Jacques Hiblot
2014-03-12 12:59   ` Boris BREZILLON
2014-03-12 12:59     ` Boris BREZILLON
2014-03-12 12:59     ` Boris BREZILLON
2014-03-17 11:14     ` Jean-Jacques Hiblot
2014-03-17 11:14       ` Jean-Jacques Hiblot
2014-03-17 11:14       ` Jean-Jacques Hiblot
2014-03-17 11:33       ` Boris BREZILLON [this message]
2014-03-17 11:33         ` Boris BREZILLON
2014-03-03 10:05 ` [PATCH v5 4/9] at91: dt: Add at91sam9261 dt SoC support Jean-Jacques Hiblot
2014-03-03 10:05   ` Jean-Jacques Hiblot
2014-03-03 18:40   ` Alexandre Belloni
2014-03-03 18:40     ` Alexandre Belloni
2014-03-03 18:40     ` Alexandre Belloni
2014-03-12 13:29     ` Nicolas Ferre
2014-03-12 13:29       ` Nicolas Ferre
2014-03-12 13:29       ` Nicolas Ferre
2014-03-17 11:40   ` Jean-Christophe PLAGNIOL-VILLARD
2014-03-17 11:40     ` Jean-Christophe PLAGNIOL-VILLARD
2014-03-17 11:40     ` Jean-Christophe PLAGNIOL-VILLARD
2014-03-17 11:48     ` Alexandre Belloni
2014-03-17 11:48       ` Alexandre Belloni
2014-03-17 11:48       ` Alexandre Belloni
2014-03-03 10:05 ` [PATCH v5 5/9] at91: dt: defconfig: Added the sam9261 to the list of DT-enabled SOCs Jean-Jacques Hiblot
2014-03-03 10:05   ` Jean-Jacques Hiblot
2014-03-03 10:05 ` [PATCH v5 6/9] at91: dt: sam9261: Device Tree support for the at91sam9261ek Jean-Jacques Hiblot
2014-03-03 10:05   ` Jean-Jacques Hiblot
2014-03-03 18:38   ` Alexandre Belloni
2014-03-03 18:38     ` Alexandre Belloni
2014-03-03 18:38     ` Alexandre Belloni
2014-03-12 13:35     ` Nicolas Ferre
2014-03-12 13:35       ` Nicolas Ferre
2014-03-12 13:35       ` Nicolas Ferre
2014-03-17 11:38   ` Jean-Christophe PLAGNIOL-VILLARD
2014-03-17 11:38     ` Jean-Christophe PLAGNIOL-VILLARD
2014-03-03 10:06 ` [PATCH v5 7/9] at91: updated the at91_dt_defconfig with support for the ADS7846 Jean-Jacques Hiblot
2014-03-03 10:06   ` Jean-Jacques Hiblot
2014-03-03 10:06 ` [PATCH v5 8/9] ARM: at91: prepare common clk transition for sam9261 SoC Jean-Jacques Hiblot
2014-03-03 10:06   ` Jean-Jacques Hiblot
2014-03-03 10:06 ` [PATCH v5 9/9] ARM: at91: move sam9261 SoC to common clk Jean-Jacques Hiblot
2014-03-03 10:06   ` Jean-Jacques Hiblot
2014-03-03 18:41 ` [PATCH v5 0/9] Device Tree support for the at91sam9261ek Alexandre Belloni
2014-03-03 18:41   ` Alexandre Belloni
2014-03-03 18:41   ` Alexandre Belloni
2014-03-12 13:05 ` Nicolas Ferre
2014-03-12 13:05   ` Nicolas Ferre
2014-03-12 13:05   ` Nicolas Ferre

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=5326DDA7.3010504@gmail.com \
    --to=b.brezillon.dev@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.