From: Philippe Langlais <philippe.langlais@stericsson.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Rabin VINCENT <rabin.vincent@stericsson.com>,
"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
STEricsson_nomadik_linux <STEricsson_nomadik_linux@list.st.com>,
Trilok Soni <tsoni@codeaurora.org>,
"lee.jones@linaro.org" <lee.jones@linaro.org>
Subject: Re: [PATCH] input: replace request_irq by request_any_context_irq in keyboard GPIO driver
Date: Thu, 20 Jan 2011 13:14:50 +0100 [thread overview]
Message-ID: <4D38273A.4020602@stericsson.com> (raw)
In-Reply-To: <20110120100419.GA3515@core.coreip.homeip.net>
Dmitry,
Sorry, I arrive after the war, thanks Rabin for your answer.
When can I hope this patch merged in kernel?
Philippe
On 01/20/11 11:04, Dmitry Torokhov wrote:
> On Thu, Jan 20, 2011 at 02:53:30PM +0530, Rabin Vincent wrote:
>> On Thu, Jan 20, 2011 at 08:53:48 +0100, Dmitry Torokhov wrote:
>>> On Wed, Jan 12, 2011 at 10:41:32AM +0100, Philippe Langlais wrote:
>>>> diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
>>>> index 6069abe..eb30063 100644
>>>> --- a/drivers/input/keyboard/gpio_keys.c
>>>> +++ b/drivers/input/keyboard/gpio_keys.c
>>>> @@ -322,7 +322,7 @@ static void gpio_keys_report_event(struct gpio_button_data *bdata)
>>>> struct gpio_keys_button *button = bdata->button;
>>>> struct input_dev *input = bdata->input;
>>>> unsigned int type = button->type ?: EV_KEY;
>>>> - int state = (gpio_get_value(button->gpio) ? 1 : 0) ^ button->active_low;
>>>> + int state = (gpio_get_value_cansleep(button->gpio) ? 1 : 0) ^ button->active_low;
>>>>
>>>> input_event(input, type, button->code, !!state);
>>>> input_sync(input);
>>>> @@ -410,8 +410,8 @@ static int __devinit gpio_keys_setup_key(struct platform_device *pdev,
>>>> if (!button->can_disable)
>>>> irqflags |= IRQF_SHARED;
>>>>
>>>> - error = request_irq(irq, gpio_keys_isr, irqflags, desc, bdata);
>>>> - if (error) {
>>>> + error = request_any_context_irq(irq, gpio_keys_isr, irqflags, desc, bdata);
>>>> + if (error< 0) {
>>> No, this it not correct. request_any_context_irq() means that you could
>>> either get a hardirq or a treaded one. However above you are changing to
>>> gpio_get_value_cansleep() which indicates that you can sleep.
>> Note that gpio_get_value_cansleep() is not being called from the interrupt
>> handler (threaded or not), but from a work queue.
>>
> Ah, then everything is good, sorry about the noise.
>
next prev parent reply other threads:[~2011-01-20 12:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-12 9:41 Changes in keyboard GPIO driver Philippe Langlais
2011-01-12 9:41 ` [PATCH] input: replace request_irq by request_any_context_irq " Philippe Langlais
2011-01-20 7:53 ` Dmitry Torokhov
2011-01-20 8:00 ` Trilok Soni
2011-01-20 8:13 ` Dmitry Torokhov
2011-01-20 8:56 ` Trilok Soni
2011-01-20 9:23 ` Rabin Vincent
2011-01-20 10:04 ` Dmitry Torokhov
2011-01-20 12:14 ` Philippe Langlais [this message]
2011-01-21 7:10 ` Dmitry Torokhov
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=4D38273A.4020602@stericsson.com \
--to=philippe.langlais@stericsson.com \
--cc=STEricsson_nomadik_linux@list.st.com \
--cc=dmitry.torokhov@gmail.com \
--cc=lee.jones@linaro.org \
--cc=linux-input@vger.kernel.org \
--cc=rabin.vincent@stericsson.com \
--cc=tsoni@codeaurora.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.