[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4F66DF25.9000909@nvidia.com>
Date: Mon, 19 Mar 2012 12:54:21 +0530
From: Laxman Dewangan <ldewangan@...dia.com>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>
CC: "grant.likely@...retlab.ca" <grant.likely@...retlab.ca>,
"linus.walleij@...ricsson.com" <linus.walleij@...ricsson.com>,
"david@...tonic.nl" <david@...tonic.nl>,
"tklauser@...tanz.ch" <tklauser@...tanz.ch>,
"alexander.stein@...ormatik.tu-chemnitz.de"
<alexander.stein@...ormatik.tu-chemnitz.de>,
"linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V1] input: keyboard: gpio: Support for interrupt only
key
Hi Dmitry,
On Monday 19 March 2012 11:36 AM, Dmitry Torokhov wrote:
>
> OK, so I am generally happy with the patch; the only issue is that in
> interrupt mode the only event type that makes sense is EV_KEY so we need
> to make sure we do not accept anything else.
>
Thanks for taking care of patch. I am ok with this policy.
> Also, I do not think that having button_irq() that is called all the
> time is the best solution; I;d rather pulled RQ number up into button
> data.
>
Yes, this is nice cleanups.
> I tried doing the above in the patch below. Please let me know if it
> still works for you. Note that it depends on some other patches for
> gpio_keys that I have; I am attaching them for your reference.
>
This works fine with one small change.
The function gpio_keys_report_event() is gettign called from probe for
initialing the key state. This function should bypass if it is not the
gpio based otherwise system crash.
I made following change and after that it works fine.
static void gpio_keys_report_event(struct gpio_button_data *bdata)
{
const struct gpio_keys_button *button = bdata->button;
struct input_dev *input = bdata->input;
unsigned int type = button->type ?: EV_KEY;
int state;
if (!gpio_is_valid(button->gpio))
return;
state = (gpio_get_value_cansleep(button->gpio) ? 1 : 0) ^
button->active_low;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists