Commit 8691c130 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input subsystem updates from Dmitry Torokhov:
 "You will get the following new drivers:

   - Qualcomm PM8941 power key drver
   - ChipOne icn8318 touchscreen controller driver
   - Broadcom iProc touchscreen and keypad drivers
   - Semtech SX8654 I2C touchscreen controller driver

  ALPS driver now supports newer SS4 devices; Elantech got a fix that
  should make it work on some ASUS laptops; and a slew of other
  enhancements and random fixes"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (51 commits)
  Input: alps - non interleaved V2 dualpoint has separate stick button bits
  Input: alps - fix touchpad buttons getting stuck when used with trackpoint
  Input: atkbd - document "no new force-release quirks" policy
  Input: ALPS - make alps_get_pkt_id_ss4_v2() and others static
  Input: ALPS - V7 devices can report 5-finger taps
  Input: ALPS - add support for SS4 touchpad devices
  Input: ALPS - refactor alps_set_abs_params_mt()
  Input: elantech - fix absolute mode setting on some ASUS laptops
  Input: atmel_mxt_ts - split out touchpad initialisation logic
  Input: atmel_mxt_ts - implement support for T100 touch object
  Input: cros_ec_keyb - fix clearing keyboard state on wakeup
  Input: gscps2 - drop pci_ids dependency
  Input: synaptics - allocate 3 slots to keep stability in image sensors
  Input: Revert "Revert "synaptics - use dmax in input_mt_assign_slots""
  Input: MT - make slot assignment work for overcovered solutions
  mfd: tc3589x: enforce device-tree only mode
  Input: tc3589x - localize platform data
  Input: tsc2007 - Convert msecs to jiffies only once
  Input: edt-ft5x06 - remove EV_SYN event report
  Input: edt-ft5x06 - allow to setting the maximum axes value through the DT
  ...
parents c3a416a6 85a36858
* Broadcom Keypad Controller device tree bindings
Broadcom Keypad controller is used to interface a SoC with a matrix-type
keypad device. The keypad controller supports multiple row and column lines.
A key can be placed at each intersection of a unique row and a unique column.
The keypad controller can sense a key-press and key-release and report the
event using a interrupt to the cpu.
This binding is based on the matrix-keymap binding with the following
changes:
keypad,num-rows and keypad,num-columns are required.
Required SoC Specific Properties:
- compatible: should be "brcm,bcm-keypad"
- reg: physical base address of the controller and length of memory mapped
region.
- interrupts: The interrupt number to the cpu.
Board Specific Properties:
- keypad,num-rows: Number of row lines connected to the keypad
controller.
- keypad,num-columns: Number of column lines connected to the
keypad controller.
- col-debounce-filter-period: The debounce period for the Column filter.
KEYPAD_DEBOUNCE_1_ms = 0
KEYPAD_DEBOUNCE_2_ms = 1
KEYPAD_DEBOUNCE_4_ms = 2
KEYPAD_DEBOUNCE_8_ms = 3
KEYPAD_DEBOUNCE_16_ms = 4
KEYPAD_DEBOUNCE_32_ms = 5
KEYPAD_DEBOUNCE_64_ms = 6
KEYPAD_DEBOUNCE_128_ms = 7
- status-debounce-filter-period: The debounce period for the Status filter.
KEYPAD_DEBOUNCE_1_ms = 0
KEYPAD_DEBOUNCE_2_ms = 1
KEYPAD_DEBOUNCE_4_ms = 2
KEYPAD_DEBOUNCE_8_ms = 3
KEYPAD_DEBOUNCE_16_ms = 4
KEYPAD_DEBOUNCE_32_ms = 5
KEYPAD_DEBOUNCE_64_ms = 6
KEYPAD_DEBOUNCE_128_ms = 7
- row-output-enabled: An optional property indicating whether the row or
column is being used as output. If specified the row is being used
as the output. Else defaults to column.
- pull-up-enabled: An optional property indicating the Keypad scan mode.
If specified implies the keypad scan pull-up has been enabled.
- autorepeat: Boolean, Enable auto repeat feature of Linux input
subsystem (optional).
- linux,keymap: The keymap for keys as described in the binding document
devicetree/bindings/input/matrix-keymap.txt.
Example:
#include "dt-bindings/input/input.h"
/ {
keypad: keypad@180ac000 {
/* Required SoC specific properties */
compatible = "brcm,bcm-keypad";
/* Required Board specific properties */
keypad,num-rows = <5>;
keypad,num-columns = <5>;
status = "okay";
linux,keymap = <MATRIX_KEY(0x00, 0x02, KEY_F) /* key_forward */
MATRIX_KEY(0x00, 0x03, KEY_HOME) /* key_home */
MATRIX_KEY(0x00, 0x04, KEY_M) /* key_message */
MATRIX_KEY(0x01, 0x00, KEY_A) /* key_contacts */
MATRIX_KEY(0x01, 0x01, KEY_1) /* key_1 */
MATRIX_KEY(0x01, 0x02, KEY_2) /* key_2 */
MATRIX_KEY(0x01, 0x03, KEY_3) /* key_3 */
MATRIX_KEY(0x01, 0x04, KEY_S) /* key_speaker */
MATRIX_KEY(0x02, 0x00, KEY_P) /* key_phone */
MATRIX_KEY(0x02, 0x01, KEY_4) /* key_4 */
MATRIX_KEY(0x02, 0x02, KEY_5) /* key_5 */
MATRIX_KEY(0x02, 0x03, KEY_6) /* key_6 */
MATRIX_KEY(0x02, 0x04, KEY_VOLUMEUP) /* key_vol_up */
MATRIX_KEY(0x03, 0x00, KEY_C) /* key_call_log */
MATRIX_KEY(0x03, 0x01, KEY_7) /* key_7 */
MATRIX_KEY(0x03, 0x02, KEY_8) /* key_8 */
MATRIX_KEY(0x03, 0x03, KEY_9) /* key_9 */
MATRIX_KEY(0x03, 0x04, KEY_VOLUMEDOWN) /* key_vol_down */
MATRIX_KEY(0x04, 0x00, KEY_H) /* key_headset */
MATRIX_KEY(0x04, 0x01, KEY_KPASTERISK) /* key_* */
MATRIX_KEY(0x04, 0x02, KEY_0) /* key_0 */
MATRIX_KEY(0x04, 0x03, KEY_GRAVE) /* key_# */
MATRIX_KEY(0x04, 0x04, KEY_MUTE) /* key_mute */
>;
/* Optional board specific properties */
col-debounce-filter-period = <5>;
row-output-enabled;
pull-up-enabled;
};
};
Qualcomm PM8941 PMIC Power Key
PROPERTIES
- compatible:
Usage: required
Value type: <string>
Definition: must be one of:
"qcom,pm8941-pwrkey"
- reg:
Usage: required
Value type: <prop-encoded-array>
Definition: base address of registers for block
- interrupts:
Usage: required
Value type: <prop-encoded-array>
Definition: key change interrupt; The format of the specifier is
defined by the binding document describing the node's
interrupt parent.
- debounce:
Usage: optional
Value type: <u32>
Definition: time in microseconds that key must be pressed or released
for state change interrupt to trigger.
- bias-pull-up:
Usage: optional
Value type: <empty>
Definition: presence of this property indicates that the KPDPWR_N pin
should be configured for pull up.
EXAMPLE
pwrkey@800 {
compatible = "qcom,pm8941-pwrkey";
reg = <0x800>;
interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
debounce = <15625>;
bias-pull-up;
};
* Broadcom's IPROC Touchscreen Controller
Required properties:
- compatible: must be "brcm,iproc-touchscreen"
- reg: physical base address of the controller and length of memory mapped
region.
- clocks: The clock provided by the SOC to driver the tsc
- clock-name: name for the clock
- interrupts: The touchscreen controller's interrupt
Optional properties:
- scanning_period: Time between scans. Each step is 1024 us. Valid 1-256.
- debounce_timeout: Each step is 512 us. Valid 0-255
- settling_timeout: The settling duration (in ms) is the amount of time
the tsc waits to allow the voltage to settle after
turning on the drivers in detection mode.
Valid values: 0-11
0 = 0.008 ms
1 = 0.01 ms
2 = 0.02 ms
3 = 0.04 ms
4 = 0.08 ms
5 = 0.16 ms
6 = 0.32 ms
7 = 0.64 ms
8 = 1.28 ms
9 = 2.56 ms
10 = 5.12 ms
11 = 10.24 ms
- touch_timeout: The continuous number of scan periods in which touch is
not detected before the controller returns to idle state.
Valid values 0-255.
- average_data: Number of data samples which are averaged before a final
data point is placed into the FIFO
Valid values 0-7
0 = 1 sample
1 = 2 samples
2 = 4 samples
3 = 8 samples
4 = 16 samples
5 = 32 samples
6 = 64 samples
7 = 128 samples
- fifo_threshold: Interrupt is generated whenever the number of fifo
entries exceeds this value
Valid values 0-31
- touchscreen-size-x: horizontal resolution of touchscreen (in pixels)
- touchscreen-size-y: vertical resolution of touchscreen (in pixels)
- touchscreen-fuzz-x: horizontal noise value of the absolute input
device (in pixels)
- touchscreen-fuzz-y: vertical noise value of the absolute input
device (in pixels)
- touchscreen-inverted-x: X axis is inverted (boolean)
- touchscreen-inverted-y: Y axis is inverted (boolean)
Example:
touchscreen: tsc@0x180A6000 {
compatible = "brcm,iproc-touchscreen";
#address-cells = <1>;
#size-cells = <1>;
reg = <0x180A6000 0x40>;
clocks = <&adc_clk>;
clock-names = "tsc_clk";
interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>;
scanning_period = <5>;
debounce_timeout = <40>;
settling_timeout = <7>;
touch_timeout = <10>;
average_data = <5>;
fifo_threshold = <1>;
/* Touchscreen is rotated 180 degrees. */
touchscreen-inverted-x;
touchscreen-inverted-y;
};
* ChipOne icn8318 I2C touchscreen controller
Required properties:
- compatible : "chipone,icn8318"
- reg : I2C slave address of the chip (0x40)
- interrupt-parent : a phandle pointing to the interrupt controller
serving the interrupt for this chip
- interrupts : interrupt specification for the icn8318 interrupt
- wake-gpios : GPIO specification for the WAKE input
- touchscreen-size-x : horizontal resolution of touchscreen (in pixels)
- touchscreen-size-y : vertical resolution of touchscreen (in pixels)
Optional properties:
- pinctrl-names : should be "default"
- pinctrl-0: : a phandle pointing to the pin settings for the
control gpios
- touchscreen-fuzz-x : horizontal noise value of the absolute input
device (in pixels)
- touchscreen-fuzz-y : vertical noise value of the absolute input
device (in pixels)
- touchscreen-inverted-x : X axis is inverted (boolean)
- touchscreen-inverted-y : Y axis is inverted (boolean)
- touchscreen-swapped-x-y : X and Y axis are swapped (boolean)
Swapping is done after inverting the axis
Example:
i2c@00000000 {
/* ... */
chipone_icn8318@40 {
compatible = "chipone,icn8318";
reg = <0x40>;
interrupt-parent = <&pio>;
interrupts = <9 IRQ_TYPE_EDGE_FALLING>; /* EINT9 (PG9) */
pinctrl-names = "default";
pinctrl-0 = <&ts_wake_pin_p66>;
wake-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
touchscreen-size-x = <800>;
touchscreen-size-y = <480>;
touchscreen-inverted-x;
touchscreen-swapped-x-y;
};
/* ... */
};
Device tree bindings for Goodix GT9xx series touchscreen controller
Required properties:
- compatible : Should be "goodix,gt911"
or "goodix,gt9110"
or "goodix,gt912"
or "goodix,gt927"
or "goodix,gt9271"
or "goodix,gt928"
or "goodix,gt967"
- reg : I2C address of the chip. Should be 0x5d or 0x14
- interrupt-parent : Interrupt controller to which the chip is connected
- interrupts : Interrupt to which the chip is connected
Example:
i2c@00000000 {
/* ... */
gt928@5d {
compatible = "goodix,gt928";
reg = <0x5d>;
interrupt-parent = <&gpio>;
interrupts = <0 0>;
};
/* ... */
};
......@@ -2,14 +2,27 @@ sun4i resistive touchscreen controller
--------------------------------------
Required properties:
- compatible: "allwinner,sun4i-a10-ts" or "allwinner,sun6i-a31-ts"
- compatible: "allwinner,sun4i-a10-ts", "allwinner,sun5i-a13-ts" or
"allwinner,sun6i-a31-ts"
- reg: mmio address range of the chip
- interrupts: interrupt to which the chip is connected
- #thermal-sensor-cells: shall be 0
Optional properties:
- allwinner,ts-attached: boolean indicating that an actual touchscreen is
attached to the controller
- allwinner,ts-attached : boolean indicating that an actual touchscreen
is attached to the controller
- allwinner,tp-sensitive-adjust : integer (4 bits)
adjust sensitivity of pen down detection
between 0 (least sensitive) and 15
(defaults to 15)
- allwinner,filter-type : integer (2 bits)
select median and averaging filter
samples used for median / averaging filter
0: 4/2
1: 5/3
2: 8/4
3: 16/8
(defaults to 1)
Example:
......@@ -19,4 +32,7 @@ Example:
interrupts = <29>;
allwinner,ts-attached;
#thermal-sensor-cells = <0>;
/* sensitive/noisy touch panel */
allwinner,tp-sensitive-adjust = <0>;
allwinner,filter-type = <3>;
};
* Semtech SX8654 I2C Touchscreen Controller
Required properties:
- compatible: must be "semtech,sx8654"
- reg: i2c slave address
- interrupt-parent: the phandle for the interrupt controller
- interrupts: touch controller interrupt
Example:
sx8654@48 {
compatible = "semtech,sx8654";
reg = <0x48>;
interrupt-parent = <&gpio6>;
interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
};
......@@ -16,6 +16,8 @@ Optional properties for Touchscreens:
controller)
- touchscreen-inverted-x : X axis is inverted (boolean)
- touchscreen-inverted-y : Y axis is inverted (boolean)
- touchscreen-swapped-x-y : X and Y axis are swapped (boolean)
Swapping is done after inverting the axis
Deprecated properties for Touchscreens:
- x-size : deprecated name for touchscreen-size-x
......
......@@ -37,6 +37,7 @@ capella Capella Microsystems, Inc
cavium Cavium, Inc.
cdns Cadence Design Systems Inc.
chipidea Chipidea, Inc
chipone ChipOne
chipspark ChipSPARK
chrp Common Hardware Reference Platform
chunghwa Chunghwa Picture Tubes Ltd.
......@@ -78,6 +79,7 @@ geniatech Geniatech, Inc.
giantplus Giantplus Technology Co., Ltd.
globalscale Globalscale Technologies, Inc.
gmt Global Mixed-mode Technology, Inc.
goodix Shenzhen Huiding Technology Co., Ltd.
google Google, Inc.
gumstix Gumstix, Inc.
gw Gateworks Corporation
......
......@@ -2525,6 +2525,13 @@ L: linux-usb@vger.kernel.org
S: Maintained
F: drivers/usb/chipidea/
CHIPONE ICN8318 I2C TOUCHSCREEN DRIVER
M: Hans de Goede <hdegoede@redhat.com>
L: linux-input@vger.kernel.org
S: Maintained
F: Documentation/devicetree/bindings/input/touchscreen/chipone_icn8318.txt
F: drivers/input/touchscreen/chipone_icn8318.c
CHROME HARDWARE PLATFORM SUPPORT
M: Olof Johansson <olof@lixom.net>
S: Maintained
......
......@@ -815,7 +815,7 @@ static const char *keys[KEY_MAX + 1] = {
[KEY_DELETEFILE] = "DeleteFile", [KEY_XFER] = "X-fer",
[KEY_PROG1] = "Prog1", [KEY_PROG2] = "Prog2",
[KEY_WWW] = "WWW", [KEY_MSDOS] = "MSDOS",
[KEY_COFFEE] = "Coffee", [KEY_DIRECTION] = "Direction",
[KEY_COFFEE] = "Coffee", [KEY_ROTATE_DISPLAY] = "RotateDisplay",
[KEY_CYCLEWINDOWS] = "CycleWindows", [KEY_MAIL] = "Mail",
[KEY_BOOKMARKS] = "Bookmarks", [KEY_COMPUTER] = "Computer",
[KEY_BACK] = "Back", [KEY_FORWARD] = "Forward",
......
......@@ -368,27 +368,35 @@ static void input_mt_set_slots(struct input_mt *mt,
int *slots, int num_pos)
{
struct input_mt_slot *s;
int *w = mt->red, *p;
int *w = mt->red, j;
for (p = slots; p != slots + num_pos; p++)
*p = -1;
for (j = 0; j != num_pos; j++)
slots[j] = -1;
for (s = mt->slots; s != mt->slots + mt->num_slots; s++) {
if (!input_mt_is_active(s))
continue;
for (p = slots; p != slots + num_pos; p++)
if (*w++ < 0)
*p = s - mt->slots;
for (j = 0; j != num_pos; j++) {
if (w[j] < 0) {
slots[j] = s - mt->slots;
break;
}
}
w += num_pos;
}
for (s = mt->slots; s != mt->slots + mt->num_slots; s++) {
if (input_mt_is_active(s))
continue;
for (p = slots; p != slots + num_pos; p++)
if (*p < 0) {
*p = s - mt->slots;
for (j = 0; j != num_pos; j++) {
if (slots[j] < 0) {
slots[j] = s - mt->slots;
break;
}
}
}
}
......
......@@ -588,6 +588,16 @@ config KEYBOARD_DAVINCI
To compile this driver as a module, choose M here: the
module will be called davinci_keyscan.
config KEYBOARD_IPAQ_MICRO
tristate "Buttons on Micro SoC (iPaq h3100,h3600,h3700)"
depends on MFD_IPAQ_MICRO
help
Say Y to enable support for the buttons attached to
Micro peripheral controller on iPAQ h3100/h3600/h3700
To compile this driver as a module, choose M here: the
module will be called ipaq-micro-keys.
config KEYBOARD_OMAP
tristate "TI OMAP keypad support"
depends on ARCH_OMAP1
......@@ -686,4 +696,15 @@ config KEYBOARD_CAP11XX
To compile this driver as a module, choose M here: the
module will be called cap11xx.
config KEYBOARD_BCM
tristate "Broadcom keypad driver"
depends on OF && HAVE_CLK
select INPUT_MATRIXKMAP
default ARCH_BCM_CYGNUS
help
Say Y here if you want to use Broadcom keypad.
To compile this driver as a module, choose M here: the
module will be called bcm-keypad.
endif
......@@ -10,6 +10,7 @@ obj-$(CONFIG_KEYBOARD_ADP5589) += adp5589-keys.o
obj-$(CONFIG_KEYBOARD_AMIGA) += amikbd.o
obj-$(CONFIG_KEYBOARD_ATARI) += atakbd.o
obj-$(CONFIG_KEYBOARD_ATKBD) += atkbd.o
obj-$(CONFIG_KEYBOARD_BCM) += bcm-keypad.o
obj-$(CONFIG_KEYBOARD_BFIN) += bf54x-keys.o
obj-$(CONFIG_KEYBOARD_CAP11XX) += cap11xx.o
obj-$(CONFIG_KEYBOARD_CLPS711X) += clps711x-keypad.o
......@@ -23,6 +24,7 @@ obj-$(CONFIG_KEYBOARD_TCA6416) += tca6416-keypad.o
obj-$(CONFIG_KEYBOARD_TCA8418) += tca8418_keypad.o
obj-$(CONFIG_KEYBOARD_HIL) += hil_kbd.o
obj-$(CONFIG_KEYBOARD_HIL_OLD) += hilkbd.o
obj-$(CONFIG_KEYBOARD_IPAQ_MICRO) += ipaq-micro-keys.o
obj-$(CONFIG_KEYBOARD_IMX) += imx_keypad.o
obj-$(CONFIG_KEYBOARD_HP6XX) += jornada680_kbd.o
obj-$(CONFIG_KEYBOARD_HP7XX) += jornada720_kbd.o
......
......@@ -1653,6 +1653,12 @@ static int __init atkbd_deactivate_fixup(const struct dmi_system_id *id)
return 1;
}
/*
* NOTE: do not add any more "force release" quirks to this table. The
* task of adjusting list of keys that should be "released" automatically
* by the driver is now delegated to userspace tools, such as udev, so
* submit such quirks there.
*/
static const struct dmi_system_id atkbd_dmi_quirk_table[] __initconst = {
{
.matches = {
......
/*
* Copyright (C) 2014 Broadcom Corporation
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation version 2.
*
* This program is distributed "as is" WITHOUT ANY WARRANTY of any
* kind, whether express or implied; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <linux/bitops.h>
#include <linux/clk.h>
#include <linux/gfp.h>
#include <linux/io.h>
#include <linux/input.h>
#include <linux/input/matrix_keypad.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/stddef.h>
#include <linux/types.h>
#define DEFAULT_CLK_HZ 31250
#define MAX_ROWS 8
#define MAX_COLS 8
/* Register/field definitions */
#define KPCR_OFFSET 0x00000080
#define KPCR_MODE 0x00000002
#define KPCR_MODE_SHIFT 1
#define KPCR_MODE_MASK 1
#define KPCR_ENABLE 0x00000001
#define KPCR_STATUSFILTERENABLE 0x00008000
#define KPCR_STATUSFILTERTYPE_SHIFT 12
#define KPCR_COLFILTERENABLE 0x00000800
#define KPCR_COLFILTERTYPE_SHIFT 8
#define KPCR_ROWWIDTH_SHIFT 20
#define KPCR_COLUMNWIDTH_SHIFT 16
#define KPIOR_OFFSET 0x00000084
#define KPIOR_ROWOCONTRL_SHIFT 24
#define KPIOR_ROWOCONTRL_MASK 0xFF000000
#define KPIOR_COLUMNOCONTRL_SHIFT 16
#define KPIOR_COLUMNOCONTRL_MASK 0x00FF0000
#define KPIOR_COLUMN_IO_DATA_SHIFT 0
#define KPEMR0_OFFSET 0x00000090
#define KPEMR1_OFFSET 0x00000094
#define KPEMR2_OFFSET 0x00000098
#define KPEMR3_OFFSET 0x0000009C
#define KPEMR_EDGETYPE_BOTH 3
#define KPSSR0_OFFSET 0x000000A0
#define KPSSR1_OFFSET 0x000000A4
#define KPSSRN_OFFSET(reg_n) (KPSSR0_OFFSET + 4 * (reg_n))
#define KPIMR0_OFFSET 0x000000B0
#define KPIMR1_OFFSET 0x000000B4
#define KPICR0_OFFSET 0x000000B8
#define KPICR1_OFFSET 0x000000BC
#define KPICRN_OFFSET(reg_n) (KPICR0_OFFSET + 4 * (reg_n))
#define KPISR0_OFFSET 0x000000C0
#define KPISR1_OFFSET 0x000000C4
#define KPCR_STATUSFILTERTYPE_MAX 7
#define KPCR_COLFILTERTYPE_MAX 7
/* Macros to determine the row/column from a bit that is set in SSR0/1. */
#define BIT_TO_ROW_SSRN(bit_nr, reg_n) (((bit_nr) >> 3) + 4 * (reg_n))