From: Eric Nelson <eric.nelson@boundarydevices.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] i.MX6: mx6qsabrelite: Add keypress support
Date: Fri, 02 Mar 2012 17:11:01 -0700 [thread overview]
Message-ID: <4F516195.3060301@boundarydevices.com> (raw)
In-Reply-To: <1330732824-15345-1-git-send-email-eric.nelson@boundarydevices.com>
On 03/02/2012 05:00 PM, Eric Nelson wrote:
> This patch adds support for the GPIO keyboard used on MX6Q SabreLite.
>
> This is generally used for invoking Android "recovery mode" in
> response to a long press of volume key down during boot.
>
> This can be tested by a boot script like so:
> if keypress voldown&& sleep 1&& keypress voldown ; then
> echo "do recovery thing" ;
> fi
>
> Key values can be seen by issuing keypress with no arguments:
>
> MX6QSABRELITE U-Boot> keypress
> keys: !menu !back !search !home !volup !voldown
> ---
> board/freescale/mx6qsabrelite/mx6qsabrelite.c | 76 +++++++++++++++++++++++++
> 1 files changed, 76 insertions(+), 0 deletions(-)
>
> <snip>
I didn't want to litter the commit message with a lot of extraneous
discussion, but it appears that Android recovery mode can be invoked
either by Android itself or by a user pressing keys.
When Android wants to invoke recovery mode, it creates a special
"recovery" file and then re-boots.
The Freescale U-Boot release accomplishes this by having special
code to detect the keypress or the presence of the magic file.
http://opensource.freescale.com/git?p=imx/uboot-imx.git;a=blob;f=board/freescale/common/recovery.c;h=16e0be479ba543a8ceb865c3c2eee55379186bda;hb=imx_v2009.08_11.11.01
http://opensource.freescale.com/git?p=imx/uboot-imx.git;a=blob;f=board/freescale/mx53_loco/mx53_loco.c;h=fda52dc4abff6482d6cb102002529a3f2edd3bbb;hb=imx_v2009.08_11.11.01#l733
Since U-Boot can test files using the hush parser, it seems cleaner to just
enable keyboard detection and allow express the boot flow in boot commands.
I looked for, but didn't find precedent for testing keys.
Please advise if there's a more standard way to accomplish keypress
detection.
Regards,
Eric
next prev parent reply other threads:[~2012-03-03 0:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-03 0:00 [U-Boot] [PATCH] i.MX6: mx6qsabrelite: Add keypress support Eric Nelson
2012-03-03 0:11 ` Eric Nelson [this message]
2012-03-03 2:18 ` Marek Vasut
2012-03-03 15:30 ` Eric Nelson
2012-03-03 15:48 ` Wolfgang Denk
2012-03-03 15:51 ` Eric Nelson
2012-03-24 7:13 ` Dirk Behme
2012-03-24 22:39 ` Eric Nelson
2012-03-03 9:15 ` Wolfgang Denk
2012-03-03 15:35 ` Eric Nelson
2012-03-03 15:50 ` Wolfgang Denk
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=4F516195.3060301@boundarydevices.com \
--to=eric.nelson@boundarydevices.com \
--cc=u-boot@lists.denx.de \
/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.