06 May, 2020

1 commit

  • The i.MX6SL EVK needs this driver in android fastboot support. Add
    this driver to u-boot.

    To use the driver, user must define:

    CONFIG_MXC_KPD Enable the driver
    CONFIG_MXC_KEYMAPPING Key mapping matrix
    CONFIG_MXC_KPD_COLMAX The column size of key mapping matrix
    CONFIG_MXC_KPD_ROWMAX The row size of the key mapping matrix

    Signed-off-by: Ye Li
    (cherry picked from commit 5096e572667ff41217deb4ba9b1bd15e93fa6b59)
    (cherry picked from commit e84160eaf5c057da45a227039c6f8a7911f43a82)
    (cherry picked from commit 7f8757016e97adeacba256bd0cb6ad8882f6a51e)
    (cherry picked from commit 79f5e8a3cc9bb1460dd06fa4909ff200d147377c)

    Ye Li
     

20 Nov, 2019

1 commit


12 Aug, 2019

1 commit


21 Feb, 2019

1 commit

  • Migrate TEGRA_KEYBOARD from headers to Kconfig, only the seaboard uses it but we
    drop CONFIG_KEYBOARD as the driver doesn't use the legacy drv_keyboard_init.

    Signed-off-by: Peter Robinson
    Cc: Tom Warren
    Cc: Stephen Warren
    Signed-off-by: Tom Warren

    Peter Robinson
     

05 Dec, 2018

1 commit

  • We should not have exported functions in a driver. The i8042_disable()
    function is used to disable the keyboard. Provide a remove() method
    instead, which is the standard way of disabling a device.

    We could potentially add a method to flush input but that does not seem
    necessary.

    Signed-off-by: Simon Glass

    Simon Glass
     

09 Oct, 2018

1 commit


18 Aug, 2018

1 commit


07 May, 2018

1 commit

  • When U-Boot started using SPDX tags we were among the early adopters and
    there weren't a lot of other examples to borrow from. So we picked the
    area of the file that usually had a full license text and replaced it
    with an appropriate SPDX-License-Identifier: entry. Since then, the
    Linux Kernel has adopted SPDX tags and they place it as the very first
    line in a file (except where shebangs are used, then it's second line)
    and with slightly different comment styles than us.

    In part due to community overlap, in part due to better tag visibility
    and in part for other minor reasons, switch over to that style.

    This commit changes all instances where we have a single declared
    license in the tag as both the before and after are identical in tag
    contents. There's also a few places where I found we did not have a tag
    and have introduced one.

    Signed-off-by: Tom Rini

    Tom Rini
     

28 Apr, 2018

1 commit


07 Apr, 2018

1 commit


05 Mar, 2018

1 commit


16 Aug, 2017

1 commit

  • We are now using an env_ prefix for environment functions. Rename these
    two functions for consistency. Also add function comments in common.h.

    Quite a few places use getenv() in a condition context, provoking a
    warning from checkpatch. These are fixed up in this patch also.

    Suggested-by: Wolfgang Denk
    Signed-off-by: Simon Glass

    Simon Glass
     

16 Jun, 2017

1 commit


01 Jun, 2017

2 commits

  • Update this driver and key_matrix to support a live device tree.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • These support the flat device tree. We want to use the dev_read_..()
    prefix for functions that support both flat tree and live tree. So rename
    the existing functions to avoid confusion.

    In the end we will have:

    1. dev_read_addr...() - works on devices, supports flat/live tree
    2. devfdt_get_addr...() - current functions, flat tree only
    3. of_get_address() etc. - new functions, live tree only

    All drivers will be written to use 1. That function will in turn call
    either 2 or 3 depending on whether the flat or live tree is in use.

    Note this involves changing some dead code - the imx_lpi2c.c file.

    Signed-off-by: Simon Glass

    Simon Glass
     

08 Feb, 2017

1 commit

  • At present devices use a simple integer offset to record the device tree
    node associated with the device. In preparation for supporting a live
    device tree, which uses a node pointer instead, refactor existing code to
    access this field through an inline function.

    Signed-off-by: Simon Glass

    Simon Glass
     

24 Nov, 2016

3 commits


02 Oct, 2016

1 commit


17 Mar, 2016

1 commit


16 Mar, 2016

1 commit


17 Feb, 2016

1 commit


20 Nov, 2015

17 commits

  • The console includes a global variable and several functions that are only
    used by a small subset of U-Boot files. Before adding more functions, move
    the definitions into their own header file.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • When 'Num Lock' is not on, we should not send these digit numbers
    (0-9 and dot) to the output buffer.

    Signed-off-by: Bin Meng
    Acked-by: Simon Glass

    Bin Meng
     
  • When sending LED update command to an i8042 compatible keyboard,
    bit1 is 'Num Lock' and bit2 is 'Caps Lock' in the data byte. But
    input library defines bit1 as 'Caps Lock' and bit2 as 'Num Lock'.
    This causes a wrong LED to be set on an i8042 compatible keyboard.
    Change the LED state bits to be i8042 compatible, and change the
    keyboard flags as well.

    Signed-off-by: Bin Meng
    Acked-by: Simon Glass

    Bin Meng
     
  • We should request keyboard to turn on/off its LED when detecting
    any changes on the LEDs.

    Signed-off-by: Bin Meng
    Acked-by: Simon Glass
    Minor changes to allow this to build without CONFIG_DM_KEYBOARD:
    Signed-off-by: Simon Glass

    Bin Meng
     
  • Currently keyboard's LED state is wrongly saved to config->leds in
    process_modifier(). It should really be config->flags.

    Signed-off-by: Bin Meng
    Acked-by: Simon Glass

    Bin Meng
     
  • This has duplicated scan code tables and logic. We can use the input
    library to implement most of the features here.

    This needs testing. The only supported board appears to be TQM5200.
    Unfortunately no maintainer is listed for this board.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Sometimes we seem to get 0xaa twice which causes the config read to fail.
    This causes chromebook_link to fail to set up the keyboard.

    Add a check for this and read the config again when detected.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng

    Simon Glass
     
  • Adjust this driver to support driver model. The only users are x86 boards
    so this should be safe.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng
    Tested-by: Bin Meng

    Simon Glass
     
  • Add a new option CONFIG_I8042_KEYB which will replace the current
    CONFIG_I8042_KBD. This new name fits better with existing drivers.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng

    Simon Glass
     
  • At present the i8042 driver has its own logic and keymaps. In an effort to
    unify the code, move it over to use the input library. This changes most of
    the keycode-processing logic since it is now in that library. The main
    responsibilities of the driver are now to handle the LEDs, deal with the
    PS/2 extended keycodes and initialise the the keyboard.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng
    Tested-by: Bin Meng

    Simon Glass
     
  • Add a function which returns a new keyboard LED value when the LEDs need
    updating.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng

    Simon Glass
     
  • When caps lock is enabled we should convert lower case to upper case. Add
    this to the input key processing so that caps lock works correctly.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng
    Tested-by: Bin Meng

    Simon Glass
     
  • Move all the '!release' code into one block so that it is clear that it only
    applies on key release.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng

    Simon Glass
     
  • Add support for the German keymap, taken from i8042.c. This can be selected
    when the input library it initialised.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng

    Simon Glass
     
  • Generally the input library handles processing of a list of scanned keys.
    Repeated keys need to be generated based on a timer in this case, since all
    that is provided is a list of keys current depressed.

    Keyboards which do their own scanning will resend codes when they want to
    inject a repeating key. Provide a function which tells the input library to
    accept repeating keys and not to try to second-guess the caller.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng

    Simon Glass
     
  • 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 a 'break' code is sent. This means that the driver needs to
    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
    Reviewed-by: Bin Meng

    Simon Glass
     
  • The slash and * are missing from the keycode tables. Add these so that
    these keypad keys can be used.

    Signed-off-by: Simon Glass

    Simon Glass