From: Denis Karpov <ext-denis.2.karpov@nokia.com>
To: "ext Menon, Nishanth" <nm@ti.com>
Cc: tony@atomide.com, linux-omap@vger.kernel.org
Subject: Re: [PATCH 0/2] power button repeat input events
Date: Mon, 14 Mar 2011 16:35:33 +0200 [thread overview]
Message-ID: <20110314143533.GA15827@smart.research.nokia.com> (raw)
In-Reply-To: <AANLkTinrU2ziCS+xZibz=dSTuFaxypbD7Xh-0yHqty7z@mail.gmail.com>
On Mon, Mar 14, 2011 at 05:10:22PM +0530, ext Menon, Nishanth wrote:
> Date: Mon, 14 Mar 2011 17:10:22 +0530
> From: "ext Menon, Nishanth" <nm@ti.com>
> To: Denis Karpov <ext-denis.2.karpov@nokia.com>
> CC: tony@atomide.com, linux-omap@vger.kernel.org
> Subject: Re: [PATCH 0/2] power button repeat input events
> In-Reply-To: <20110314111327.GA10563@smart.research.nokia.com>
>
> On Mon, Mar 14, 2011 at 16:43, Denis Karpov
> <ext-denis.2.karpov@nokia.com> wrote:
> >
> > On Fri, Mar 11, 2011 at 10:25:27PM +0530, ext Nishanth Menon wrote:
> > >
> > > Denis Karpov wrote, on 03/11/2011 10:07 PM:
> > > >Hi,
> > > >
> > > >this patchset adds optional generation of repeat input events for
> > > >twl4030 power button. It adds optional platform data for
> > > >twl4030-pwrbutton and initializes it for RX51/N900 (default
> > > >behavior kept - repeated input events disabled).
> > > >
> > > >We are working on an OMAP3 with TWL5031 MFD. In one of the use
> > > >scenarios userspace wants to receive repeated input events from
> > > >long press of power button.
> > >
> > > dumb question - is'nt this a userspace responsibility as far as power
> > > button is concerned? what is the benefit of providing repeat events
> > > like a generic keypad for the power button?
> >
> > In our case userspace needs this to track the continuous button press
> > of power button.
> thanks for your explanation, but a follow on dumb question:
> include/linux/input.h
> #define KEY_POWER 116 /* SC System Power Down */
>
> in twl-powerbutton.c, I see:
> input_report_key(pwr, KEY_POWER, value & PWR_PWRON_IRQ);
> where value is the value from the register status, should'nt we get
> two events? one on press and one on release after say 10 mins(assuming
> person keeps it pressed for 10 mins?
>
> Is there different behavior we intend to implement in userspace which
> differentiates 1 KEY_POWER event Vs 10 KEY_POWER event?
No, but due to specifics of userspace sw components involved it seems
not to be possible to reliably save the state for power button to detect
long keypresses.
I thought that this change if implemented as optional feature and
localized to scpecific devices/boards would not hurt.
twl-keypad.c implements exactly same behavior for keypad keys, why not
to do this for the power key ?
Denis
next prev parent reply other threads:[~2011-03-14 14:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-11 16:37 [PATCH 0/2] power button repeat input events Denis Karpov
2011-03-11 16:37 ` [PATCH 1/2] input: twl4030-pwrbutton: add support for platform data Denis Karpov
2011-03-11 16:37 ` [PATCH 2/2] omap: rx51: initialize platform data for twl4030 powerbutton Denis Karpov
2011-03-11 19:05 ` Tony Lindgren
2011-03-14 10:57 ` Aaro Koskinen
2011-03-14 11:14 ` Denis Karpov
2011-03-11 16:55 ` [PATCH 0/2] power button repeat input events Nishanth Menon
2011-03-14 11:13 ` Denis Karpov
2011-03-14 11:40 ` Menon, Nishanth
2011-03-14 14:35 ` Denis Karpov [this message]
2011-03-14 14:59 ` Nishanth Menon
2011-03-11 19:04 ` Tony Lindgren
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=20110314143533.GA15827@smart.research.nokia.com \
--to=ext-denis.2.karpov@nokia.com \
--cc=linux-omap@vger.kernel.org \
--cc=nm@ti.com \
--cc=tony@atomide.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;
as well as URLs for NNTP newsgroup(s).