| cd810918 | 12-Nov-2015 |
Bin Meng <bmeng.cn@gmail.com> |
input: Call keyboard's update_leds() method when the LEDs change
We should request keyboard to turn on/off its LED when detecting any changes on the LEDs.
Signed-off-by: Bin Meng <bmeng.cn@gmail.co
input: Call keyboard's update_leds() method when the LEDs change
We should request keyboard to turn on/off its LED when detecting any changes on the LEDs.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org> Minor changes to allow this to build without CONFIG_DM_KEYBOARD: Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 533c81a9 | 12-Nov-2015 |
Bin Meng <bmeng.cn@gmail.com> |
input: Save keyboard's LED state to correct place
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 <
input: Save keyboard's LED state to correct place
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 <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 91f81545 | 11-Nov-2015 |
Simon Glass <sjg@chromium.org> |
input: Convert 'keyboard' driver to use input library
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 on
input: Convert 'keyboard' driver to use input library
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 <sjg@chromium.org>
show more ...
|
| 011d89d6 | 11-Nov-2015 |
Simon Glass <sjg@chromium.org> |
i8042: Handle a duplicate power-on-reset response
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 f
i8042: Handle a duplicate power-on-reset response
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 <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| dcbf8257 | 11-Nov-2015 |
Simon Glass <sjg@chromium.org> |
input: Convert i8042 to driver model
Adjust this driver to support driver model. The only users are x86 boards so this should be safe.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin
input: Convert i8042 to driver model
Adjust this driver to support driver model. The only users are x86 boards so this should be safe.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| b0abfeff | 11-Nov-2015 |
Simon Glass <sjg@chromium.org> |
input: Add a Kconfig option for the i8042 keyboard
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
input: Add a Kconfig option for the i8042 keyboard
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 <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| 2ec739db | 11-Nov-2015 |
Simon Glass <sjg@chromium.org> |
input: i8042: Convert to use the input library
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
input: i8042: Convert to use the input library
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 <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| 3b5f6f50 | 11-Nov-2015 |
Simon Glass <sjg@chromium.org> |
input: Allow updating of keyboard LEDs
Add a function which returns a new keyboard LED value when the LEDs need updating.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.
input: Allow updating of keyboard LEDs
Add a function which returns a new keyboard LED value when the LEDs need updating.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| ba420342 | 11-Nov-2015 |
Simon Glass <sjg@chromium.org> |
input: Handle caps lock
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 <sjg
input: Handle caps lock
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 <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| a683d0d3 | 11-Nov-2015 |
Simon Glass <sjg@chromium.org> |
input: Adjust structure of code in process_modifier()
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 <sjg@chromium.o
input: Adjust structure of code in process_modifier()
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 <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| b1d7a187 | 11-Nov-2015 |
Simon Glass <sjg@chromium.org> |
input: Support the German keymap
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 <sjg@chromium.org> Rev
input: Support the German keymap
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 <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| 0b186c08 | 19-Oct-2015 |
Simon Glass <sjg@chromium.org> |
input: Allow repeat filtering to be disabled
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 tha
input: Allow repeat filtering to be disabled
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 <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| 3a85e436 | 19-Oct-2015 |
Simon Glass <sjg@chromium.org> |
input: Add a function to add a keycode to the existing set
Most keyboards can be scanned to produce a list of the keycodes which are depressed. With the i8042 keyboard this scanning is done internal
input: Add a function to add a keycode to the existing set
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 <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| 77c7f045 | 19-Oct-2015 |
Simon Glass <sjg@chromium.org> |
input: Add a few more keyboard keycodes
The slash and * are missing from the keycode tables. Add these so that these keypad keys can be used.
Signed-off-by: Simon Glass <sjg@chromium.org> |
| 2e5513bd | 19-Oct-2015 |
Simon Glass <sjg@chromium.org> |
input: Correct keycode for Ctrl-Y
This code is currently incorrect, perhaps due to a typo. Fix it.
Signed-off-by: Simon Glass <sjg@chromium.org> |
| c5d257f9 | 19-Oct-2015 |
Simon Glass <sjg@chromium.org> |
i8042: Adjust keyboard init to assume success
Modify i8042_kbd_init() so that the normal pass is sucessful init and failure exits early. This will make the code easier to extend and is easier to rea
i8042: Adjust keyboard init to assume success
Modify i8042_kbd_init() so that the normal pass is sucessful init and failure exits early. This will make the code easier to extend and is easier to read.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| 4f087bac | 19-Oct-2015 |
Simon Glass <sjg@chromium.org> |
i8042: Adjust kbd_reset() to collect all failures
Rather than lots of 'return' statements, use goto to a single return.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn
i8042: Adjust kbd_reset() to collect all failures
Rather than lots of 'return' statements, use goto to a single return.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| 31d38ee6 | 19-Oct-2015 |
Simon Glass <sjg@chromium.org> |
i8042: Use functions to handle register access
At present the register access in kbd_reset() is quite primitive. This makes it hard to follow.
Create functions to read and write data, both to a sin
i8042: Use functions to handle register access
At present the register access in kbd_reset() is quite primitive. This makes it hard to follow.
Create functions to read and write data, both to a single register, and via the command/data approach.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-on: Intel Crown Bay and QEMU Tested-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| 7fe0933c | 19-Oct-2015 |
Simon Glass <sjg@chromium.org> |
video: Drop unused console functions
CONFIG_CONSOLE_CURSOR, CONFIG_SYS_CONSOLE_BLINK_COUNT and CONFIG_CONSOLE_TIME are not used by any board. The implementation is not great and stands in the way of
video: Drop unused console functions
CONFIG_CONSOLE_CURSOR, CONFIG_SYS_CONSOLE_BLINK_COUNT and CONFIG_CONSOLE_TIME are not used by any board. The implementation is not great and stands in the way of a refactor of i8042. Drop these for now. They can be re-introduced quite easily later, perhaps with driver-model real-time-clock (RTC) support.
When reintroducing, it might be useful to make a few changes: - Blink time would be more useful than blink count - The confusing #ifdefs should be avoided - The time functions should support driver model - It would be best keyed off console_tstc() or some similar idle loop rather than a particular input driver (i8042 in this case)
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| 1fa4bfde | 19-Oct-2015 |
Simon Glass <sjg@chromium.org> |
dm: cros_ec: Convert cros_ec keyboard driver to driver model
Adjust the cros_ec keyboard driver to support driver model. Make this the default for all Exynos boards so that those that use a keyboard
dm: cros_ec: Convert cros_ec keyboard driver to driver model
Adjust the cros_ec keyboard driver to support driver model. Make this the default for all Exynos boards so that those that use a keyboard will build correctly with this driver.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| f77f5e9b | 19-Oct-2015 |
Simon Glass <sjg@chromium.org> |
dm: tegra: Convert keyboard driver to driver model
Adjust the tegra keyboard driver to support driver model, using the new uclass. Make this the default for all Tegra boards so that those that use a
dm: tegra: Convert keyboard driver to driver model
Adjust the tegra keyboard driver to support driver model, using the new uclass. Make this the default for all Tegra boards so that those that use a keyboard will build correctly with this driver.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 745009c4 | 19-Oct-2015 |
Simon Glass <sjg@chromium.org> |
cros_ec: Use udevice instead of cros_ec_dev for keyboard functions
In preparation for converting the cros_ec keyboard driver to driver model, adjust the cros_ec functions it will use to use a normal
cros_ec: Use udevice instead of cros_ec_dev for keyboard functions
In preparation for converting the cros_ec keyboard driver to driver model, adjust the cros_ec functions it will use to use a normal struct udevice.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 66877b0f | 19-Oct-2015 |
Simon Glass <sjg@chromium.org> |
input: Add the keycode translation tables separately
Require the caller to add the keycode translation tables separately so that it can select which ones to use. In a later patch we will add the opt
input: Add the keycode translation tables separately
Require the caller to add the keycode translation tables separately so that it can select which ones to use. In a later patch we will add the option to add German tables.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| 92778b27 | 19-Oct-2015 |
Simon Glass <sjg@chromium.org> |
input: Return -ENOSPC when there is not space
Return a useful error instead of -1 when something goes wrong.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> |
| e84421d8 | 19-Oct-2015 |
Simon Glass <sjg@chromium.org> |
dm: input: Create a keyboard uclass
Add a uclass for keyboard input, mirroring the existing stdio methods. This is enabled by a new CONFIG_DM_KEYBOARD option.
Signed-off-by: Simon Glass <sjg@chromi
dm: input: Create a keyboard uclass
Add a uclass for keyboard input, mirroring the existing stdio methods. This is enabled by a new CONFIG_DM_KEYBOARD option.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|