All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: "Arve Hjønnevåg" <arve@android.com>
Cc: dmitry.torokhov@gmail.com, linux-input@vger.kernel.org,
	kernel-team@android.com, john.stultz@linaro.org
Subject: Re: [PATCH v2] sysrq: supplementing reset sequence with timeout functionality
Date: Wed, 20 Mar 2013 09:11:23 -0600	[thread overview]
Message-ID: <5149D19B.7090503@linaro.org> (raw)
In-Reply-To: <CAMP5XgfSHcnarDmju-oEJwPbAzeOOOhfq7C1bvrQ5Zt7Wbid2A@mail.gmail.com>

On 13-03-18 06:44 PM, Arve Hjønnevåg wrote:
> On Sat, Mar 16, 2013 at 10:14 AM,  <mathieu.poirier@linaro.org> wrote:
>> From: "Mathieu J. Poirier" <mathieu.poirier@linaro.org>
>>
>> Some devices have too few buttons, which it makes it hard to have
>> a reset combo that won't trigger automatically.  As such a
>> timeout functionality that requires the combination to be held for
>> a given amount of time before triggering is introduced.
>>
>> If a key combo is recognized and held for a 'timeout' amount of time,
>> the system triggers a reset.
> 
> The code seems to only require one of the keys in the combo to be held
> for the full 'timeout' amount of time:
> 
> ...
>>                 /* key release */
>> -               if (--state->reset_seq_cnt == 0)
>> +               if (--state->reset_seq_cnt == 0) {
>>                         state->reset_canceled = false;
>> +                       del_timer(&state->keyreset_timeout);
>> +               }
> 

I think the case you are referring to is when keys are released - please
correct me if I'm wrong.

You are correct, after the timer has been initialised (meaning that
_all_ the keys have been pressed) only a single key need to be held down
to carry out the reset order.

The current keyreset driver works exactly the same way - I just tried it
on my board.

Get back to me if you want to see this corrected.

Thanks,
Mathieu.
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2013-03-20 15:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-16 17:14 [PATCH v2] sysrq: supplementing reset sequence with timeout functionality mathieu.poirier
2013-03-19  0:44 ` Arve Hjønnevåg
2013-03-20 15:11   ` Mathieu Poirier [this message]
2013-03-20 21:56     ` Arve Hjønnevåg

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=5149D19B.7090503@linaro.org \
    --to=mathieu.poirier@linaro.org \
    --cc=arve@android.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=john.stultz@linaro.org \
    --cc=kernel-team@android.com \
    --cc=linux-input@vger.kernel.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.