[U-Boot] [PATCH] i.MX6: mx6qsabrelite: Add keypress support

Eric Nelson
2012-03-03T15:35:00Z

On 03/03/2012 02:15 AM, Wolfgang Denk wrote:
> Dear Eric Nelson,
>
> In message<1330732824-15345-1-git-send-email-eric.nelson@boundarydevices.com> you 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:
>
> I don't like introducing yet another way to handle key presses and
> create menu like interfaces from this.
>
> We already have two of these:
>
> - We have the powerful and flexible method to map key preesses to
> envrionment variables which can in turn hold commands (variables
> "magic_keys" and "key_magic*") as used for example on the enbw_cmc,
> lwmon5, hmi1001, mucmc52, pcs440ep, r360mpi and mucmc52 boards.
>
> - We have the menu system as implemented by common/menu.c etc.
>
> Please use either of these, but don't invent a new one. Thanks.
>

Thanks for the pointers. I'll rework accordingly.

Grepping the sources rarely results in this kind of insight.

Regards,

Eric