projects/linux·commit 3e069ada

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

3e069ada · Linus Torvalds <[email protected]> · 2015-11-06 11:57:41 -08:00

Pull input updates from Dmitry Torokhov:
 "Items of note:

   - evdev users can now limit or mask the kind of events they will
     receive.  This will allow applications such as power manager or
     network manager to only be woken when user presses special keys
     such as KEY_POWER or KEY_WIFI and not be bothered with ordinary
     key presses coming from keyboard

   - support for FocalTech FT6236 touchscreen controller

   - support for ROHM BU21023/24 touchscreen controller

   - edt-ft5x06 touchscreen driver got a face lift and can now be used
     with FT5506

   - support for Google Fiber TV Box remote controls

   - improvements in xpad driver (with more to come)

   - several parport-based drivers have been switched to the new device
     model

   - other miscellaneous driver improvements"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (70 commits)
  HID: hid-gfrm: avoid warning for input_configured API change
  HID: hid-input: allow input_configured callback return errors
  Input: evdev - fix bug in checking duplicate clock change request
  Input: add userio module
  Input: evdev - add event-mask API
  Input: snvs_pwrkey - remove duplicated semicolon
  HID: hid-gfrm: Google Fiber TV Box remote controls
  Input: e3x0-button - update Kconfig description
  Input: tegra-kbc - drop use of IRQF_NO_SUSPEND flag
  Input: tegra-kbc - enable support for the standard "wakeup-source" property
  Input: xen - check return value of xenbus_printf
  Input: hp_sdc_rtc - fix y2038 problem in proc_show
  Input: nomadik-ske-keypad - fix a trivial typo
  Input: xpad - fix clash of presence handling with LED setting
  Input: edt-ft5x06 - work around FT5506 firmware bug
  Input: edt-ft5x06 - add support for FT5506
  Input: edt-ft5x06 - add support for different max support points
  Input: edt-ft5x06 - use max support points to determine how much to read
  Input: rotary-encoder - add support for quarter-period mode
  Input: rotary-encoder - use of_property_read_bool
  ...
Commit
3e069adabc9487b5e28065a17e6a228da3412dfd
Parents
02f0d3f7 · e60e063c

Merge commit. Changes below are compared with the first parent: 02f0d3f7.

Changes

78 files changed · +4547 −2282

FileStatusAddDelContent
Documentation/devicetree/bindings/input/da9062-onkey.txtadded+32−0View file
Documentation/devicetree/bindings/input/gpio-keys-polled.txtmodified+8−1View file
Documentation/devicetree/bindings/input/rotary-encoder.txtmodified+10−0View file
Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txtmodified+5−3View file
Documentation/devicetree/bindings/input/touchscreen/focaltech-ft6236.txtadded+35−0View file
Documentation/devicetree/bindings/vendor-prefixes.txtmodified+1−0View file
Documentation/input/rotary-encoder.txtmodified+7−2View file
Documentation/input/userio.txtadded+70−0View file
MAINTAINERSmodified+6−0View file
arch/arm/boot/dts/am437x-sk-evm.dtsmodified+1−1View file
arch/arm/boot/dts/imx28-tx28.dtsmodified+2−1View file
arch/arm/boot/dts/imx53-tx53-x03x.dtsmodified+2−1View file
arch/arm/boot/dts/imx6qdl-tx6.dtsimodified+2−1View file
drivers/hid/Kconfigmodified+6−0View file
drivers/hid/Makefilemodified+1−0View file
drivers/hid/hid-appleir.cmodified+3−1View file
drivers/hid/hid-elo.cmodified+3−1View file
drivers/hid/hid-gfrm.cadded+159−0View file
drivers/hid/hid-input.cmodified+6−4View file
drivers/hid/hid-lenovo.cmodified+3−1View file
drivers/hid/hid-logitech-hidpp.cmodified+3−1View file
drivers/hid/hid-magicmouse.cmodified+6−2View file
drivers/hid/hid-multitouch.cmodified+15−5View file
drivers/hid/hid-ntrig.cmodified+4−2View file
drivers/hid/hid-rmi.cmodified+7−4View file
drivers/hid/hid-sony.cmodified+10−3View file
drivers/hid/hid-uclogic.cmodified+4−2View file
drivers/input/evdev.cmodified+251−19View file
drivers/input/ff-core.cmodified+7−2View file
drivers/input/input.cmodified+19−6View file
drivers/input/joydev.cmodified+6−16View file
drivers/input/joystick/db9.cmodified+58−55View file
drivers/input/joystick/gamecon.cmodified+55−48View file
drivers/input/joystick/turbografx.cmodified+54−50View file
drivers/input/joystick/walkera0701.cmodified+37−27View file
drivers/input/joystick/xpad.cmodified+279−255View file
drivers/input/keyboard/Kconfigmodified+1−1View file
drivers/input/keyboard/gpio_keys.cmodified+7−1View file
drivers/input/keyboard/gpio_keys_polled.cmodified+79−9View file
drivers/input/keyboard/nomadik-ske-keypad.cmodified+1−1View file
drivers/input/keyboard/snvs_pwrkey.cmodified+1−2View file
drivers/input/keyboard/tegra-kbc.cmodified+3−2View file
drivers/input/misc/Kconfigmodified+6−6View file
drivers/input/misc/ad714x-i2c.cmodified+0−10View file
drivers/input/misc/ad714x-spi.cmodified+0−10View file
drivers/input/misc/ad714x.cmodified+82−132View file
drivers/input/misc/ad714x.hmodified+0−1View file
drivers/input/misc/da9063_onkey.cmodified+104−25View file
drivers/input/misc/hp_sdc_rtc.cmodified+26−26View file
drivers/input/misc/kxtj9.cmodified+1−2View file
drivers/input/misc/rotary_encoder.cmodified+120−9View file
drivers/input/misc/xen-kbdfront.cmodified+8−2View file
drivers/input/serio/Kconfigmodified+14−0View file
drivers/input/serio/Makefilemodified+1−0View file
drivers/input/serio/parkbd.cmodified+37−18View file
drivers/input/serio/userio.cadded+285−0View file
drivers/input/touchscreen/Kconfigmodified+24−0View file
drivers/input/touchscreen/Makefilemodified+2−0View file
drivers/input/touchscreen/ads7846.cmodified+1−3View file
drivers/input/touchscreen/auo-pixcir-ts.cmodified+1−6View file
drivers/input/touchscreen/cyttsp4_i2c.cmodified+1−4View file
drivers/input/touchscreen/edt-ft5x06.cmodified+94−152View file
drivers/input/touchscreen/ft6236.cadded+326−0View file
drivers/input/touchscreen/pixcir_i2c_ts.cmodified+0−12View file
drivers/input/touchscreen/rohm_bu21023.cadded+1218−0View file
drivers/input/touchscreen/tps6507x-ts.cmodified+1−8View file
drivers/input/touchscreen/zforce_ts.cmodified+1−6View file
include/dt-bindings/input/input.hmodified+1−509View file
include/dt-bindings/input/linux-event-codes.hadded+1−0View file
include/linux/hid.hmodified+2−2View file
include/linux/input.hmodified+2−0View file
include/linux/input/edt-ft5x06.hdeleted+0−24View before deletion
include/linux/miscdevice.hmodified+1−0View file
include/linux/rotary_encoder.hmodified+2−1View file
include/uapi/linux/Kbuildmodified+1−0View file
include/uapi/linux/input-event-codes.hadded+805−0View file
include/uapi/linux/input.hmodified+66−784View file
include/uapi/linux/userio.hadded+44−0View file

Only the first 600 diff lines are shown. Download the complete patch.

Documentation/devicetree/bindings/input/da9062-onkey.txt

View file
diff --git a/Documentation/devicetree/bindings/input/da9062-onkey.txt b/Documentation/devicetree/bindings/input/da9062-onkey.txt
new file mode 100644
index 0000000..ab0e048
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/da9062-onkey.txt
@@ -0,0 +1,32 @@
+* Dialog DA9062/63 OnKey Module
+
+This module is part of the DA9062/DA9063. For more details about entire
+chips see Documentation/devicetree/bindings/mfd/da9062.txt and
+Documentation/devicetree/bindings/mfd/da9063.txt
+
+This module provides KEY_POWER, KEY_SLEEP and events.
+
+Required properties:
+
+- compatible: should be one of:
+ dlg,da9062-onkey
+ dlg,da9063-onkey
+
+Optional properties:
+
+ - dlg,disable-key-power : Disable power-down using a long key-press. If this
+ entry exists the OnKey driver will remove support for the KEY_POWER key
+ press. If this entry does not exist then by default the key-press
+ triggered power down is enabled and the OnKey will support both KEY_POWER
+ and KEY_SLEEP.
+
+Example:
+
+ pmic0: da9062@58 {
+
+ onkey {
+ compatible = "dlg,da9063-onkey";
+ dlg,disable-key-power;
+ };
+
+ };

Documentation/devicetree/bindings/input/gpio-keys-polled.txt

View file
diff --git a/Documentation/devicetree/bindings/input/gpio-keys-polled.txt b/Documentation/devicetree/bindings/input/gpio-keys-polled.txt
index 5b91f5a..97e2467 100644
--- a/Documentation/devicetree/bindings/input/gpio-keys-polled.txt
+++ b/Documentation/devicetree/bindings/input/gpio-keys-polled.txt
@@ -13,11 +13,18 @@ Subnode properties:
- gpios: OF device-tree gpio specification.
- label: Descriptive name of the key.
- - linux,code: Keycode to emit.
+ - linux,code: Key / Axis code to emit.
Optional subnode-properties:
- linux,input-type: Specify event type this button/key generates.
If not specified defaults to <1> == EV_KEY.
+ - linux,input-value: If linux,input-type is EV_ABS or EV_REL then this
+ value is sent for events this button generates when pressed.
+ EV_ABS/EV_REL axis will generate an event with a value of 0 when
+ all buttons with linux,input-type == type and linux,code == axis
+ are released. This value is interpreted as a signed 32 bit value,
+ e.g. to make a button generate a value of -1 use:
+ linux,input-value = <0xffffffff>; /* -1 */
- debounce-interval: Debouncing interval time in milliseconds.
If not specified defaults to 5.
- wakeup-source: Boolean, button can wake-up the system.

Documentation/devicetree/bindings/input/rotary-encoder.txt

View file
diff --git a/Documentation/devicetree/bindings/input/rotary-encoder.txt b/Documentation/devicetree/bindings/input/rotary-encoder.txt
index 3315495..de99cbb 100644
--- a/Documentation/devicetree/bindings/input/rotary-encoder.txt
+++ b/Documentation/devicetree/bindings/input/rotary-encoder.txt
@@ -14,7 +14,17 @@ Optional properties:
device, hence no steps need to be passed.
- rotary-encoder,rollover: Automatic rollove when the rotary value becomes
greater than the specified steps or smaller than 0. For absolute axis only.
+- rotary-encoder,steps-per-period: Number of steps (stable states) per period.
+ The values have the following meaning:
+ 1: Full-period mode (default)
+ 2: Half-period mode
+ 4: Quarter-period mode
+- wakeup-source: Boolean, rotary encoder can wake up the system.
+
+Deprecated properties:
- rotary-encoder,half-period: Makes the driver work on half-period mode.
+ This property is deprecated. Instead, a 'steps-per-period ' value should
+ be used, such as "rotary-encoder,steps-per-period = <2>".
See Documentation/input/rotary-encoder.txt for more information.

Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt

View file
diff --git a/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt
index 76db967..f99528d 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt
+++ b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt
@@ -5,6 +5,7 @@ There are 3 variants of the chip for various touch panel sizes
FT5206GE1 2.8" .. 3.8"
FT5306DE4 4.3" .. 7"
FT5406EE8 7" .. 8.9"
+FT5506EEG 7" .. 8.9"
The software interface is identical for all those chips, so that
currently there is no need for the driver to distinguish between the
@@ -17,6 +18,7 @@ Required properties:
- compatible: "edt,edt-ft5206"
or: "edt,edt-ft5306"
or: "edt,edt-ft5406"
+ or: "edt,edt-ft5506"
- reg: I2C slave address of the chip (0x38)
- interrupt-parent: a phandle pointing to the interrupt controller
@@ -49,7 +51,7 @@ Example:
pinctrl-names = "default";
pinctrl-0 = <&edt_ft5x06_pins>;
interrupt-parent = <&gpio2>;
- interrupts = <5 0>;
- reset-gpios = <&gpio2 6 1>;
- wake-gpios = <&gpio4 9 0>;
+ interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
+ reset-gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;
+ wake-gpios = <&gpio4 9 GPIO_ACTIVE_HIGH>;
};

Documentation/devicetree/bindings/input/touchscreen/focaltech-ft6236.txt

View file
diff --git a/Documentation/devicetree/bindings/input/touchscreen/focaltech-ft6236.txt b/Documentation/devicetree/bindings/input/touchscreen/focaltech-ft6236.txt
new file mode 100644
index 0000000..777521d
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/touchscreen/focaltech-ft6236.txt
@@ -0,0 +1,35 @@
+* FocalTech FT6236 I2C touchscreen controller
+
+Required properties:
+ - compatible : "focaltech,ft6236"
+ - reg : I2C slave address of the chip (0x38)
+ - interrupt-parent : a phandle pointing to the interrupt controller
+ serving the interrupt for this chip
+ - interrupts : interrupt specification for the touch controller
+ interrupt
+ - reset-gpios : GPIO specification for the RSTN input
+ - touchscreen-size-x : horizontal resolution of touchscreen (in pixels)
+ - touchscreen-size-y : vertical resolution of touchscreen (in pixels)
+
+Optional properties:
+ - 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:
+
+ ft6x06@38 {
+ compatible = "focaltech,ft6236";
+ reg = <0x38>;
+ interrupt-parent = <&gpio>;
+ interrupts = <23 2>;
+ touchscreen-size-x = <320>;
+ touchscreen-size-y = <480>;
+ touchscreen-inverted-x;
+ touchscreen-swapped-x-y;
+ };

Documentation/devicetree/bindings/vendor-prefixes.txt

View file
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 13e54a0..a79185f 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -82,6 +82,7 @@ everspin Everspin Technologies, Inc.
excito Excito
fcs Fairchild Semiconductor
firefly Firefly
+focaltech FocalTech Systems Co.,Ltd
fsl Freescale Semiconductor
GEFanuc GE Fanuc Intelligent Platforms Embedded Systems, Inc.
gef GE Fanuc Intelligent Platforms Embedded Systems, Inc.

Documentation/input/rotary-encoder.txt

View file
diff --git a/Documentation/input/rotary-encoder.txt b/Documentation/input/rotary-encoder.txt
index 5737e35..46a74f0 100644
--- a/Documentation/input/rotary-encoder.txt
+++ b/Documentation/input/rotary-encoder.txt
@@ -9,8 +9,9 @@ peripherals with two wires. The outputs are phase-shifted by 90 degrees
and by triggering on falling and rising edges, the turn direction can
be determined.
-Some encoders have both outputs low in stable states, whereas others also have
-a stable state with both outputs high (half-period mode).
+Some encoders have both outputs low in stable states, others also have
+a stable state with both outputs high (half-period mode) and some have
+a stable state in all steps (quarter-period mode).
The phase diagram of these two outputs look like this:
@@ -32,6 +33,9 @@ The phase diagram of these two outputs look like this:
|<-->|
one step (half-period mode)
+ |<>|
+ one step (quarter-period mode)
+
For more information, please see
https://en.wikipedia.org/wiki/Rotary_encoder
@@ -109,6 +113,7 @@ static struct rotary_encoder_platform_data my_rotary_encoder_info = {
.inverted_a = 0,
.inverted_b = 0,
.half_period = false,
+ .wakeup_source = false,
};
static struct platform_device rotary_encoder_device = {

Documentation/input/userio.txt

View file
diff --git a/Documentation/input/userio.txt b/Documentation/input/userio.txt
new file mode 100644
index 0000000..0880c0f
--- /dev/null
+++ b/Documentation/input/userio.txt
@@ -0,0 +1,70 @@
+ The userio Protocol
+ (c) 2015 Stephen Chandler Paul <[email protected]>
+ Sponsored by Red Hat
+--------------------------------------------------------------------------------
+
+1. Introduction
+~~~~~~~~~~~~~~~
+ This module is intended to try to make the lives of input driver developers
+easier by allowing them to test various serio devices (mainly the various
+touchpads found on laptops) without having to have the physical device in front
+of them. userio accomplishes this by allowing any privileged userspace program
+to directly interact with the kernel's serio driver and control a virtual serio
+port from there.
+
+2. Usage overview
+~~~~~~~~~~~~~~~~~
+ In order to interact with the userio kernel module, one simply opens the
+/dev/userio character device in their applications. Commands are sent to the
+kernel module by writing to the device, and any data received from the serio
+driver is read as-is from the /dev/userio device. All of the structures and
+macros you need to interact with the device are defined in <linux/userio.h> and
+<linux/serio.h>.
+
+3. Command Structure
+~~~~~~~~~~~~~~~~~~~~
+ The struct used for sending commands to /dev/userio is as follows:
+
+ struct userio_cmd {
+ __u8 type;
+ __u8 data;
+ };
+
+ "type" describes the type of command that is being sent. This can be any one
+of the USERIO_CMD macros defined in <linux/userio.h>. "data" is the argument
+that goes along with the command. In the event that the command doesn't have an
+argument, this field can be left untouched and will be ignored by the kernel.
+Each command should be sent by writing the struct directly to the character
+device. In the event that the command you send is invalid, an error will be
+returned by the character device and a more descriptive error will be printed
+to the kernel log. Only one command can be sent at a time, any additional data
+written to the character device after the initial command will be ignored.
+ To close the virtual serio port, just close /dev/userio.
+
+4. Commands
+~~~~~~~~~~~
+
+4.1 USERIO_CMD_REGISTER
+~~~~~~~~~~~~~~~~~~~~~~~
+ Registers the port with the serio driver and begins transmitting data back and
+forth. Registration can only be performed once a port type is set with
+USERIO_CMD_SET_PORT_TYPE. Has no argument.
+
+4.2 USERIO_CMD_SET_PORT_TYPE
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ Sets the type of port we're emulating, where "data" is the port type being
+set. Can be any of the macros from <linux/serio.h>. For example: SERIO_8042
+would set the port type to be a normal PS/2 port.
+
+4.3 USERIO_CMD_SEND_INTERRUPT
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ Sends an interrupt through the virtual serio port to the serio driver, where
+"data" is the interrupt data being sent.
+
+5. Userspace tools
+~~~~~~~~~~~~~~~~~~
+ The userio userspace tools are able to record PS/2 devices using some of the
+debugging information from i8042, and play back the devices on /dev/userio. The
+latest version of these tools can be found at:
+
+ https://github.com/Lyude/ps2emu

MAINTAINERS

View file
diff --git a/MAINTAINERS b/MAINTAINERS
index 0f327cc..e2b8cbb 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -11306,6 +11306,12 @@ S: Maintained
F: drivers/media/v4l2-core/videobuf2-*
F: include/media/videobuf2-*
+VIRTUAL SERIO DEVICE DRIVER
+M: Stephen Chandler Paul <[email protected]>
+S: Maintained
+F: drivers/input/serio/userio.c
+F: include/uapi/linux/userio.h
+
VIRTIO CONSOLE DRIVER
M: Amit Shah <[email protected]>

arch/arm/boot/dts/am437x-sk-evm.dts

View file
diff --git a/arch/arm/boot/dts/am437x-sk-evm.dts b/arch/arm/boot/dts/am437x-sk-evm.dts
index 7da7c2d..0bb36e9 100644
--- a/arch/arm/boot/dts/am437x-sk-evm.dts
+++ b/arch/arm/boot/dts/am437x-sk-evm.dts
@@ -502,7 +502,7 @@
reg = <0x38>;
interrupt-parent = <&gpio0>;
- interrupts = <31 0>;
+ interrupts = <31 IRQ_TYPE_EDGE_FALLING>;
reset-gpios = <&gpio1 28 GPIO_ACTIVE_LOW>;

arch/arm/boot/dts/imx28-tx28.dts

View file
diff --git a/arch/arm/boot/dts/imx28-tx28.dts b/arch/arm/boot/dts/imx28-tx28.dts
index a5b27c8..4ea8934 100644
--- a/arch/arm/boot/dts/imx28-tx28.dts
+++ b/arch/arm/boot/dts/imx28-tx28.dts
@@ -13,6 +13,7 @@
/dts-v1/;
#include "imx28.dtsi"
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
/ {
model = "Ka-Ro electronics TX28 module";
@@ -324,7 +325,7 @@
pinctrl-names = "default";
pinctrl-0 = <&tx28_edt_ft5x06_pins>;
interrupt-parent = <&gpio2>;
- interrupts = <5 0>;
+ interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
reset-gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;
wake-gpios = <&gpio4 9 GPIO_ACTIVE_HIGH>;
};

arch/arm/boot/dts/imx53-tx53-x03x.dts

View file
diff --git a/arch/arm/boot/dts/imx53-tx53-x03x.dts b/arch/arm/boot/dts/imx53-tx53-x03x.dts
index 3b73e81..13e842b 100644
--- a/arch/arm/boot/dts/imx53-tx53-x03x.dts
+++ b/arch/arm/boot/dts/imx53-tx53-x03x.dts
@@ -12,6 +12,7 @@
/dts-v1/;
#include "imx53-tx53.dtsi"
#include <dt-bindings/input/input.h>
+#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pwm/pwm.h>
/ {
@@ -216,7 +217,7 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_edt_ft5x06_1>;
interrupt-parent = <&gpio6>;
- interrupts = <15 0>;
+ interrupts = <15 IRQ_TYPE_EDGE_FALLING>;
reset-gpios = <&gpio2 22 GPIO_ACTIVE_LOW>;
wake-gpios = <&gpio2 21 GPIO_ACTIVE_HIGH>;
};

arch/arm/boot/dts/imx6qdl-tx6.dtsi

View file
diff --git a/arch/arm/boot/dts/imx6qdl-tx6.dtsi b/arch/arm/boot/dts/imx6qdl-tx6.dtsi
index da08de3..13cb7cc 100644
--- a/arch/arm/boot/dts/imx6qdl-tx6.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-tx6.dtsi
@@ -11,6 +11,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pwm/pwm.h>
/ {
@@ -272,7 +273,7 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_edt_ft5x06>;
interrupt-parent = <&gpio6>;
- interrupts = <15 0>;
+ interrupts = <15 IRQ_TYPE_EDGE_FALLING>;
reset-gpios = <&gpio2 22 GPIO_ACTIVE_LOW>;
wake-gpios = <&gpio2 21 GPIO_ACTIVE_HIGH>;
linux,wakeup;

drivers/hid/Kconfig

View file
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 6ab51ae..7245b7f 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -257,6 +257,12 @@ config HID_GEMBIRD
---help---
Support for Gembird JPD-DualForce 2.
+config HID_GFRM
+ tristate "Google Fiber TV Box remote control support"
+ depends on HID
+ ---help---
+ Support for Google Fiber TV Box remote controls
+
config HID_HOLTEK
tristate "Holtek HID devices"
depends on USB_HID

drivers/hid/Makefile

View file
diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile
index e6441bc..571d176 100644
--- a/drivers/hid/Makefile
+++ b/drivers/hid/Makefile
@@ -37,6 +37,7 @@ obj-$(CONFIG_HID_ELECOM) += hid-elecom.o
obj-$(CONFIG_HID_ELO) += hid-elo.o
obj-$(CONFIG_HID_EZKEY) += hid-ezkey.o
obj-$(CONFIG_HID_GEMBIRD) += hid-gembird.o
+obj-$(CONFIG_HID_GFRM) += hid-gfrm.o
obj-$(CONFIG_HID_GT683R) += hid-gt683r.o
obj-$(CONFIG_HID_GYRATION) += hid-gyration.o
obj-$(CONFIG_HID_HOLTEK) += hid-holtek-kbd.o

drivers/hid/hid-appleir.c

View file
diff --git a/drivers/hid/hid-appleir.c b/drivers/hid/hid-appleir.c
index 0e6a42d..07cbc70 100644
--- a/drivers/hid/hid-appleir.c
+++ b/drivers/hid/hid-appleir.c
@@ -256,7 +256,7 @@ out:
return 0;
}
-static void appleir_input_configured(struct hid_device *hid,
+static int appleir_input_configured(struct hid_device *hid,
struct hid_input *hidinput)
{
struct input_dev *input_dev = hidinput->input;
@@ -275,6 +275,8 @@ static void appleir_input_configured(struct hid_device *hid,
for (i = 0; i < ARRAY_SIZE(appleir_key_table); i++)
set_bit(appleir->keymap[i], input_dev->keybit);
clear_bit(KEY_RESERVED, input_dev->keybit);
+
+ return 0;
}
static int appleir_input_mapping(struct hid_device *hid,

drivers/hid/hid-elo.c

View file
diff --git a/drivers/hid/hid-elo.c b/drivers/hid/hid-elo.c
index 4e49462..aad8c16 100644
--- a/drivers/hid/hid-elo.c
+++ b/drivers/hid/hid-elo.c
@@ -37,7 +37,7 @@ static bool use_fw_quirk = true;
module_param(use_fw_quirk, bool, S_IRUGO);
MODULE_PARM_DESC(use_fw_quirk, "Do periodic pokes for broken M firmwares (default = true)");
-static void elo_input_configured(struct hid_device *hdev,
+static int elo_input_configured(struct hid_device *hdev,
struct hid_input *hidinput)
{
struct input_dev *input = hidinput->input;
@@ -45,6 +45,8 @@ static void elo_input_configured(struct hid_device *hdev,
set_bit(BTN_TOUCH, input->keybit);
set_bit(ABS_PRESSURE, input->absbit);
input_set_abs_params(input, ABS_PRESSURE, 0, 256, 0, 0);
+
+ return 0;
}
static void elo_process_data(struct input_dev *input, const u8 *data, int size)

drivers/hid/hid-gfrm.c

View file
diff --git a/drivers/hid/hid-gfrm.c b/drivers/hid/hid-gfrm.c
new file mode 100644
index 0000000..075b1c0
--- /dev/null
+++ b/drivers/hid/hid-gfrm.c
@@ -0,0 +1,159 @@
+/*
+ * HID driver for Google Fiber TV Box remote controls
+ *
+ * Copyright (c) 2014-2015 Google Inc.
+ *
+ * Author: Petri Gynther <[email protected]>
+ *
+ * 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; either version 2 of the License, or (at your option)
+ * any later version.
+ */
+#include <linux/device.h>
+#include <linux/hid.h>
+#include <linux/input.h>
+#include <linux/module.h>
+
+#include "hid-ids.h"
+
+#define GFRM100 1 /* Google Fiber GFRM100 (Bluetooth classic) */
+#define GFRM200 2 /* Google Fiber GFRM200 (Bluetooth LE) */
+
+#define GFRM100_SEARCH_KEY_REPORT_ID 0xF7
+#define GFRM100_SEARCH_KEY_DOWN 0x0
+#define GFRM100_SEARCH_KEY_AUDIO_DATA 0x1
+#define GFRM100_SEARCH_KEY_UP 0x2
+
+static u8 search_key_dn[3] = {0x40, 0x21, 0x02};
+static u8 search_key_up[3] = {0x40, 0x00, 0x00};
+
+static int gfrm_input_mapping(struct hid_device *hdev, struct hid_input *hi,
+ struct hid_field *field, struct hid_usage *usage,
+ unsigned long **bit, int *max)
+{
+ unsigned long hdev_type = (unsigned long) hid_get_drvdata(hdev);
+
+ if (hdev_type == GFRM100) {
+ if (usage->hid == (HID_UP_CONSUMER | 0x4)) {
+ /* Consumer.0004 -> KEY_INFO */
+ hid_map_usage_clear(hi, usage, bit, max, EV_KEY, KEY_INFO);
+ return 1;
+ }
+
+ if (usage->hid == (HID_UP_CONSUMER | 0x41)) {
+ /* Consumer.0041 -> KEY_OK */
+ hid_map_usage_clear(hi, usage, bit, max, EV_KEY, KEY_OK);
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
+static int gfrm_raw_event(struct hid_device *hdev, struct hid_report *report,
+ u8 *data, int size)
+{
+ unsigned long hdev_type = (unsigned long) hid_get_drvdata(hdev);
+ int ret = 0;
+
+ if (hdev_type != GFRM100)
+ return 0;
+
+ if (size < 2 || data[0] != GFRM100_SEARCH_KEY_REPORT_ID)
+ return 0;
+
+ /*
+ * Convert GFRM100 Search key reports into Consumer.0221 (Key.Search)
+ * reports. Ignore audio data.
+ */
+ switch (data[1]) {
+ case GFRM100_SEARCH_KEY_DOWN:
+ ret = hid_report_raw_event(hdev, HID_INPUT_REPORT, search_key_dn,
+ sizeof(search_key_dn), 1);
+ break;
+
+ case GFRM100_SEARCH_KEY_AUDIO_DATA:
+ break;
+
+ case GFRM100_SEARCH_KEY_UP:
+ ret = hid_report_raw_event(hdev, HID_INPUT_REPORT, search_key_up,
+ sizeof(search_key_up), 1);
+ break;
+
+ default:
+ break;
+ }
+
+ return (ret < 0) ? ret : -1;
+}
+
+static int gfrm_input_configured(struct hid_device *hid, struct hid_input *hidinput)
+{
+ /*
+ * Enable software autorepeat with:
+ * - repeat delay: 400 msec
+ * - repeat period: 100 msec
+ */
+ input_enable_softrepeat(hidinput->input, 400, 100);
+ return 0;
+}
+
+static int gfrm_probe(struct hid_device *hdev, const struct hid_device_id *id)
+{
+ int ret;
+
+ hid_set_drvdata(hdev, (void *) id->driver_data);
+
+ ret = hid_parse(hdev);
+ if (ret)
+ goto done;
+
+ if (id->driver_data == GFRM100) {
+ /*
+ * GFRM100 HID Report Descriptor does not describe the Search
+ * key reports. Thus, we need to add it manually here, so that
+ * those reports reach gfrm_raw_event() from hid_input_report().
+ */
+ if (!hid_register_report(hdev, HID_INPUT_REPORT,
+ GFRM100_SEARCH_KEY_REPORT_ID)) {
+ ret = -ENOMEM;
+ goto done;
+ }
+ }
+
+ ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
+done:
+ return ret;
+}
+
+static void gfrm_remove(struct hid_device *hdev)
+{
+ hid_hw_stop(hdev);
+ hid_set_drvdata(hdev, NULL);
+}
+
+static const struct hid_device_id gfrm_devices[] = {
+ { HID_BLUETOOTH_DEVICE(0x58, 0x2000),
+ .driver_data = GFRM100 },
+ { HID_BLUETOOTH_DEVICE(0x471, 0x2210),
+ .driver_data = GFRM200 },
+ { }
+};
+MODULE_DEVICE_TABLE(hid, gfrm_devices);
+
+static struct hid_driver gfrm_driver = {
+ .name = "gfrm",
+ .id_table = gfrm_devices,
+ .probe = gfrm_probe,
+ .remove = gfrm_remove,
+ .input_mapping = gfrm_input_mapping,

This diff is incomplete. Download the complete patch.

drivers/hid/hid-input.c

View file

This diff is incomplete. Download the complete patch.

drivers/hid/hid-lenovo.c

View file

This diff is incomplete. Download the complete patch.

drivers/hid/hid-logitech-hidpp.c

View file

This diff is incomplete. Download the complete patch.

drivers/hid/hid-magicmouse.c

View file

This diff is incomplete. Download the complete patch.

drivers/hid/hid-multitouch.c

View file

This diff is incomplete. Download the complete patch.

drivers/hid/hid-ntrig.c

View file

This diff is incomplete. Download the complete patch.

drivers/hid/hid-rmi.c

View file

This diff is incomplete. Download the complete patch.

drivers/hid/hid-sony.c

View file

This diff is incomplete. Download the complete patch.

drivers/hid/hid-uclogic.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/evdev.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/ff-core.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/input.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/joydev.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/joystick/db9.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/joystick/gamecon.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/joystick/turbografx.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/joystick/walkera0701.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/joystick/xpad.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/keyboard/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/input/keyboard/gpio_keys.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/keyboard/gpio_keys_polled.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/keyboard/nomadik-ske-keypad.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/keyboard/snvs_pwrkey.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/keyboard/tegra-kbc.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/misc/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/input/misc/ad714x-i2c.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/misc/ad714x-spi.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/misc/ad714x.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/misc/ad714x.h

View file

This diff is incomplete. Download the complete patch.

drivers/input/misc/da9063_onkey.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/misc/hp_sdc_rtc.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/misc/kxtj9.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/misc/rotary_encoder.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/misc/xen-kbdfront.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/serio/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/input/serio/Makefile

View file

This diff is incomplete. Download the complete patch.

drivers/input/serio/parkbd.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/serio/userio.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/Makefile

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/ads7846.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/auo-pixcir-ts.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/cyttsp4_i2c.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/edt-ft5x06.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/ft6236.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/pixcir_i2c_ts.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/rohm_bu21023.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/tps6507x-ts.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/zforce_ts.c

View file

This diff is incomplete. Download the complete patch.

include/dt-bindings/input/input.h

View file

This diff is incomplete. Download the complete patch.

include/dt-bindings/input/linux-event-codes.h

View file

This diff is incomplete. Download the complete patch.

include/linux/hid.h

View file

This diff is incomplete. Download the complete patch.

include/linux/input.h

View file

This diff is incomplete. Download the complete patch.

include/linux/input/edt-ft5x06.h

View before deletion

This diff is incomplete. Download the complete patch.

include/linux/miscdevice.h

View file

This diff is incomplete. Download the complete patch.

include/linux/rotary_encoder.h

View file

This diff is incomplete. Download the complete patch.

include/uapi/linux/Kbuild

View file

This diff is incomplete. Download the complete patch.

include/uapi/linux/input-event-codes.h

View file

This diff is incomplete. Download the complete patch.

include/uapi/linux/input.h

View file

This diff is incomplete. Download the complete patch.

include/uapi/linux/userio.h

View file

This diff is incomplete. Download the complete patch.