summaryrefslogtreecommitdiff
path: root/drivers/input
AgeCommit message (Collapse)Author
2013-07-24Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
2013-06-26cros: adds cros_ec keyboard driverHung-ying Tyan
This patch adds the driver for keyboard that's controlled by ChromeOS EC. Signed-off-by: Randall Spangler <rspangler@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Vincent Palatin <vpalatin@chromium.org> Signed-off-by: Hung-ying Tyan <tyanh@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
2013-06-06input: Finish simplifing key_matrix_decode_fdt()Stephen Warren
[trini: Applied v1 of the series rather than v2, this commit is the delta from v1 to v2] Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Rini <trini@ti.com>
2013-06-04input: simplify key_matrix_decode_fdt()Stephen Warren
We know the exact property names that the code wants to process. Look these up directly with fdt_get_property(), rather than iterating over all properties within the node, and checking each property's name, in a convoluted fashion, against the expected name. Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-06-04input: fix unaligned access in key_matrix_decode_fdt()Stephen Warren
Initialized character arrays on the stack can cause gcc to emit code that performs unaligned accessess. Make the data static to avoid this. Note that the unaligned accesses are made when copying data to prefix[] on the stack from .rodata. By making the data static, the copy is completely avoided. All explicitly written code treats the data as u8[], so will never cause any unaligned accesses. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
2013-02-04ppc: Move mpc5xxx clocks to arch_global_dataSimon Glass
Move ipb_clk and pci_clk into arch_global_data and tidy up. Signed-off-by: Simon Glass <sjg@chromium.org>
2012-11-19tegra: add CONSOLE_MUX support to tegra-kbcAllen Martin
Add support for CONSOLE_MUX to tegra-kbc driver. This requires adding a flag to struct keyb to know the driver has already been initialized so if we try to initialize it again we can just return success. Also call into iomux_doenv() from drv_keyboard_init to re-evaluate the stdin string. Signed-off-by: Allen Martin <amartin@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
2012-11-04drivers/input/input.c: sparse fixKim Phillips
input.c:97:5: warning: symbol 'input_queue_ascii' was not declared. Should it be Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Acked-by: Simon Glass <sjg@chromium.org>
2012-10-19input: Add ANSI 3.64 escape sequence generation.Hung-Te Lin
To support Non-ASCII keys (ex, Fn, PgUp/Dn, arrow keys, ...), we need to translate key code into escape sequence. (Updated by sjg@chromium.org to move away from a function to store keycodes, so we can easily record how many were sent. We now need to return this from input_send_keycodes() so we know whether keys were generated.) Signed-off-by: Hung-Te Lin <hungte@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@ti.com>
2012-10-19input: Fix i8042 keyboard resetMarc Jones
The i8042 keyboard reset was not checking the results of the output buffer after the reset command. This can jam up some KBC/keyboards. Also, remove a write to the wrong register and the CONFIG setting around the incorrect write. Signed-off-by: Marc Jones <marc.jones@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@ti.com>
2012-10-19input: i8042: Provide feature to disable keyboard before booting kernelLouis Yung-Chieh Lo
The BIOS leaves the keyboard enabled during boot time so that any keystroke would interfere kernel driver initialization. Add a way to disable the keyboard to make sure no scancode will be generated during the boot time. Note that the keyboard will be re-enabled again after the kernel driver is up. This code can be called from the board functions. Signed-off-by: Louis Yung-Chieh Lo <yjlou@chromium.org> Signed-off-by: Louis Yung-Chieh Lo <yjlou@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@ti.com>
2012-10-19input: Provide a board specific mechanism to decide whether to skip i8042 initGabe Black
This change adds a board overridable function which can be used to decide whether or not to initialize the i8042 keyboard controller. On systems where it isn't actually connected to anything, this can save a significant amount of boot time. On Stumpy, this saves about 200ms on boot. Signed-off-by: Gabe Black <gabeblack@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@ti.com>
2012-10-19input: Use finer grain udelays while waitng for the i8042 keyboard buffer to ↵Gabe Black
empty On x86, the i8042 keyboard controller driver frequently waits for the keyboard input buffer to be empty to make sure the controller has had a chance to process the data it was given. The way the delay loop was structured, if the controller hadn't cleared the corresponding status bit immediately, it would wait 1ms before checking again. If the keyboard responded quickly but not instantly, the driver would still wait a full 1ms when perhaps 1us would have been sufficient. Because udelay is a busy wait anyway, this change decreases the delay between checks to 1us. Also, this change gets rid of a hardcoded 250ms delay. On Stumpy, this saves 100-150ms during boot. Signed-off-by: Gabe Black <gabeblack@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@ti.com>
2012-10-15Tegra20: Move some include files to arch-tegra for sharing with Tegra30Tom Warren
The move is pretty straight-forward. ap20.h and tegra20.h were renamed to ap.h and tegra.h. Some files remain in arch-tegra20 but 'include' a file in 'arch-tegra' with #defines & structs that will be common between T20 and T30 HW. HW-specific #defines, etc. stay in the 'arch-tegra20' 'root' file. All boards build OK w/MAKEALL -s tegra20. Checkpatch.pl runs clean. Seaboard works OK. Signed-off-by: Tom Warren <twarren@nvidia.com>
2012-10-15input: Add debugging for key matrix key codesSimon Glass
These are read from the fdt - add a debug feature to display the mapping on start-up. See that we get debug output listing the keycodes Signed-off-by: Simon Glass <sjg@chromium.org>
2012-10-15input: Allow key ghosting filter to be disabledSimon Glass
Some keyboards will not need a key ghosting filter, so make this feature optional. Signed-off-by: Simon Glass <sjg@chromium.org>
2012-10-15input: Separate out keyboard repeat/delay from initSimon Glass
It is inconvenient to have to specify the keyboard repeat and delay at init time if it is not yet available, so move this into a separate function. Some drivers will want to do this when their keyboard init routine is actually called. Signed-off-by: Simon Glass <sjg@chromium.org>
2012-10-15input: Correct key_matrix fdt decodingSimon Glass
Some issues with this were not addressed in the previous series. Fix up the binding decoding to deal with what is actually expected in the fdt. This corrects the broken keyboard on seaboard. Signed-off-by: Simon Glass <sjg@chromium.org>
2012-09-21Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini
2012-09-10Tegra: Change Tegra20 to Tegra in common code, prep for T30Tom Warren
Convert TEGRA20_ defines to either TEGRA_ or NV_PA_ where appropriate. Convert tegra20_ source file and function names to tegra_, also. Upcoming Tegra30 port will use common code/defines/names where possible. Signed-off-by: Tom Warren <twarren@nvidia.com> Acked-by: Stephen Warren <swarren@nvidia.com>
2012-09-02input: key_matrix: fix header inclusionStephan Linz
On Microblaze with device tree support enabled we run into the error below. I'm not sure, but I think that all source code should include at least the common.h and just this fix the problem on Microblaz architecture. The error is: In file included from key_matrix.c:29: include/malloc.h:364: error: conflicting types for 'memset' include/linux/string.h:71: error: previous declaration of 'memset' was here include/malloc.h:365: error: conflicting types for 'memcpy' include/linux/string.h:74: error: previous declaration of 'memcpy' was here Signed-off-by: Stephan Linz <linz@li-pro.net> CC: Bernie Thompson <bhthompson@chromium.org> CC: Simon Glass <sjg@chromium.org> CC: Tom Warren <twarren@nvidia.com> CC: Michal Simek <monstr@monstr.eu> Acked-by: Simon Glass <sjg@chromium.org> Acked-by: Michal Simek <monstr@monstr.eu>
2012-09-01tegra20: rename tegra2 -> tegra20Allen Martin
This is make naming consistent with the kernel and devicetree and in preparation of pulling out the common tegra20 code. Signed-off-by: Allen Martin <amartin@nvidia.com> Acked-by: Stephen Warren <swarren@wwwdotorg.org> Tested-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Tom Warren <twarren@nvidia.com>
2012-05-15tegra: Add tegra keyboard driverRakesh Iyer
Add support for internal matrix keyboard controller for Nvidia Tegra platforms. This driver uses the fdt decode function to obtain its key codes. Support for the Ctrl modifier is provided. The left and right ctrl keys are dealt with in the same way. This uses the new keyboard input library (drivers/input/input.c) to decode keys and handle most of the common input logic. The new key matrix library is also used to decode (row, column) key positions into key codes. The intent is to make this driver purely about dealing with the hardware. Key detection before the driver is loaded is supported. This key will be picked up when the keyboard driver is initialized. Modified by Bernie Thompson <bhthompson@chromium.org> and Simon Glass <sjg@chromium.org> for device tree, input layer, key matrix and various other things. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
2012-05-15input: Add support for keyboard matrix decoding from an fdtBernie Thompson
Matrix keyboards require a key map to be set up, and must also deal with key ghosting. Create a keyboard matrix management implementation which can be leveraged by various keyboard drivers. This includes code to read the keymap from the FDT and perform debouncing. Signed-off-by: Bernie Thompson <bhthompson@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
2012-05-15input: Add generic keyboard input handlerSimon Glass
Add a module which understands converting key codes (or scan codes) to ASCII characters. It includes FIFO support and can call back to drivers to read new characters when its FIFO is empty. Keycode maps are provided for un-modified, shift and ctrl keys. The plan is to use this module where such mapping is required. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
2011-11-29x86: Fix some bugs in the i8402 driver when no controller is presentGabe Black
If no controller is present, the i8402 driver should return immediately and not attempt to operate on the missing hardware. In kbd_input_empty, the status register is checked every millisecond to see whether the input buffer is empty, up to a timeout which is tracked by decrimenting a counter each time the check is performed. The decrement is performed with a postfix -- operator, and the value of the counter is checked in place. That means that when the counter reaches zero and the loop terminates, it will actually be decrimented one more time and become -1. That value is returned as the return value of the function. That would give the right answer if it wasn't for that extra decrement because a timeout would indicate that the buffer never became empty. This change fixes both of those bugs. Signed-off-by: Gabe Black <gabeblack@chromium.org>
2011-11-29x86: Make the i8042 driver checkpatch cleanGabe Black
Signed-off-by: Gabe Black <gabeblack@chromium.org>
2010-11-17Switch from archive libraries to partial linkingSebastien Carlier
Before this commit, weak symbols were not overridden by non-weak symbols found in archive libraries when linking with recent versions of binutils. As stated in the System V ABI, "the link editor does not extract archive members to resolve undefined weak symbols". This commit changes all Makefiles to use partial linking (ld -r) instead of creating library archives, which forces all symbols to participate in linking, allowing non-weak symbols to override weak symbols as intended. This approach is also used by Linux, from which the gmake function cmd_link_o_target (defined in config.mk and used in all Makefiles) is inspired. The name of each former library archive is preserved except for extensions which change from ".a" to ".o". This commit updates references accordingly where needed, in particular in some linker scripts. This commit reveals board configurations that exclude some features but include source files that depend these disabled features in the build, resulting in undefined symbols. Known such cases include: - disabling CMD_NET but not CMD_NFS; - enabling CONFIG_OF_LIBFDT but not CONFIG_QE. Signed-off-by: Sebastien Carlier <sebastien.carlier@gmail.com>
2010-09-19Remove HMI10 board supportWolfgang Denk
Recent changes caused that the HMI10 board now is included in the boards built by MAKEALL, which revealed that compilation for this board has been broken for a long time: ps2ser.c: In function 'ps2ser_init': ps2ser.c:155: error: 'UART_LCR' undeclared (first use in this function) ps2ser.c:155: error: (Each undeclared identifier is reported only once ps2ser.c:155: error: for each function it appears in.) ps2ser.c:156: error: 'UART_DLL' undeclared (first use in this function) ps2ser.c:157: error: 'UART_DLM' undeclared (first use in this function) ps2ser.c:159: error: 'UART_IER' undeclared (first use in this function) ps2ser.c:160: error: 'UART_MCR' undeclared (first use in this function) ps2ser.c:161: error: 'UART_FCR' undeclared (first use in this function) ps2ser.c:162: error: 'UART_FCR_ENABLE_FIFO' undeclared (first use in this function) ps2ser.c:166: error: 'UART_LSR' undeclared (first use in this function) ps2ser.c: In function 'ps2ser_putc': ps2ser.c:198: error: 'UART_LSR' undeclared (first use in this function) ps2ser.c:200: error: 'UART_TX' undeclared (first use in this function) ps2ser.c: In function 'ps2ser_getc_hw': ps2ser.c:224: error: 'UART_LSR' undeclared (first use in this function) ps2ser.c:225: error: 'UART_RX' undeclared (first use in this function) ps2ser.c: In function 'ps2ser_interrupt': ps2ser.c:293: error: 'UART_IIR' undeclared (first use in this function) The board is orphaned, and AFAICT has reached EOL. Drop support for it. Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-03-21mpc5xxx: Remove all references to MGT5100Detlev Zundel
We do not support a processor that never reached a real customer. Signed-off-by: Detlev Zundel <dzu@denx.de>
2009-09-04License cleanup: remove unintended "All Rights Reserved" notices.Wolfgang Denk
Some files included my old standerd file header which had a "All Rights Reserved" part. As this has never been my intention, I remove these lines to make the files compatible with GPL v.2 and later. Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-07-17stdio/device: rework function naming conventionJean-Christophe PLAGNIOL-VILLARD
So far the console API uses the following naming convention: ======Extract====== typedef struct device_t; int device_register (device_t * dev); int devices_init (void); int device_deregister(char *devname); struct list_head* device_get_list(void); device_t* device_get_by_name(char* name); device_t* device_clone(device_t *dev); ======= which is too generic and confusing. Instead of using device_XX and device_t we change this into stdio_XX and stdio_dev This will also allow to add later a generic device mechanism in order to have support for multiple devices and driver instances. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Edited commit message. Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-04-03Rename common ns16550 constants with UART_ prefix to prevent conflictsDetlev Zundel
Fix problems introduced in commit 7b5611cdd12ca0cc33f994f0d4a4454788fc3124 [inka4x0: Add hardware diagnosis functions for inka4x0] which redefined MSR_RI which is already used on PowerPC systems. Also eliminate redundant definitions in ps2mult.h. More cleanup will be needed for other redundant occurrences though. Signed-off-by: Detlev Zundel <dzu@denx.de>
2008-10-18rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-12drivers/input: Move conditional compilation to MakefileJean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-07-14Code cleanup: fix old style assignment ambiguities like "=-" etc.Wolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-06-11TQM8548: Basic support for the TQM8548 modulesWolfgang Grandegger
This patch adds basic support for the TQM8548 module from TQ-Components (http://www.tqc.de/) including DDR2 SDRAM initialisation and support for eTSEC 3 and 4 Furthermore Flash buffer write has been enabled to speed up output to the Flash by approx. a factor of 10. Signed-off-by: Thomas Waehner <thomas.waehner@tqs.de> Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
2008-05-20Big white-space cleanup.Wolfgang Denk
This commit gets rid of a huge amount of silly white-space issues. Especially, all sequences of SPACEs followed by TAB characters get removed (unless they appear in print statements). Also remove all embedded "vim:" and "vi:" statements which hide indentation problems. Signed-off-by: Wolfgang Denk <wd@denx.de>
2007-11-25drivers/input : move input drivers to drivers/inputJean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>