From: Laxman Dewangan <ldewangan@nvidia.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: "grant.likely@secretlab.ca" <grant.likely@secretlab.ca>,
"linus.walleij@stericsson.com" <linus.walleij@stericsson.com>,
"david@protonic.nl" <david@protonic.nl>,
"tklauser@distanz.ch" <tklauser@distanz.ch>,
"alexander.stein@informatik.tu-chemnitz.de"
<alexander.stein@informatik.tu-chemnitz.de>,
"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V1] input: keyboard: gpio: Support for interrupt only key
Date: Mon, 19 Mar 2012 12:54:21 +0530 [thread overview]
Message-ID: <4F66DF25.9000909@nvidia.com> (raw)
In-Reply-To: <20120319060610.GA8835@core.coreip.homeip.net>
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;
prev parent reply other threads:[~2012-03-19 7:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-14 8:52 [PATCH V1] input: keyboard: gpio: Support for interrupt only key Laxman Dewangan
2012-03-14 16:00 ` Dmitry Torokhov
2012-03-19 6:06 ` Dmitry Torokhov
2012-03-19 7:24 ` Laxman Dewangan [this message]
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=4F66DF25.9000909@nvidia.com \
--to=ldewangan@nvidia.com \
--cc=alexander.stein@informatik.tu-chemnitz.de \
--cc=david@protonic.nl \
--cc=dmitry.torokhov@gmail.com \
--cc=grant.likely@secretlab.ca \
--cc=linus.walleij@stericsson.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tklauser@distanz.ch \
/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.