[U-Boot] [PATCH v2 15/28] input: Add a function to add a keycode to the existing set

Simon Glass sjg at chromium.org
Fri Oct 30 21:24:48 CET 2015


On 22 October 2015 at 22:12, Bin Meng <bmeng.cn at gmail.com> wrote:
> Hi Simon,
>
> On Mon, Oct 19, 2015 at 11:17 AM, Simon Glass <sjg at chromium.org> wrote:
>> Most keyboards can be scanned to produce a list of the keycodes which are
>> depressed. With the i8042 keyboard this scanning is done internally and
>> only the processed results are returned.
>>
>> In this case, when a key is pressed, a 'make' code is sent. When the key
>> is released an 'unmake' code is sent. This means that the driver needs to
>
> nits: 'unmake' -> 'break'

Fixed.

Applied to u-boot-dm.

>
>> keep track of which keys are pressed. It also means that any protocol error
>> can lead to stuck keys.
>>
>> In order to support this type of keyboard, add a function when can be used
>> to provide a single keycode and either add it to the list of what is pressed
>> or remove it from the list. Then the normal input_send_keycodes() function
>> can be used to actually do the decoding work.
>>
>> Add debugging to display the ASCII characters written to the input queue
>> also.
>>
>> Signed-off-by: Simon Glass <sjg at chromium.org>
>> ---
>
> Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
>
>>
>> Changes in v2: None
>>
>>  drivers/input/input.c | 46 ++++++++++++++++++++++++++++++++++++++++++----
>>  include/input.h       | 20 ++++++++++++++++++++
>>  2 files changed, 62 insertions(+), 4 deletions(-)


More information about the U-Boot mailing list