diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-13 21:05:13 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-13 21:05:13 -0400 |
| commit | 18fb38e2f58ff7a66e30cbb71af81425edf1c9a1 (patch) | |
| tree | 8ff2cc5b0d1a11c87a0e2576d6fe863b87faf69a | |
| parent | be9c6d9169705504296bdb42ffec8f406691d99f (diff) | |
| parent | 88ce3c3ca3df754e8a2a63b01c38bd1667fcae70 (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull second round of input updates from Dmitry Torokhov:
"An update to Elantech driver to support hardware v7, fix to the new
cyttsp4 driver to use proper addressing, ads7846 device tree support
and nspire-keypad got a small cleanup."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: nspire-keypad - replace magic offset with define
Input: elantech - fix for newer hardware versions (v7)
Input: cyttsp4 - use 16bit address for I2C/SPI communication
Input: ads7846 - add device tree bindings
Input: ads7846 - make sure we do not change platform data
| -rw-r--r-- | Documentation/devicetree/bindings/input/ads7846.txt | 91 | ||||
| -rw-r--r-- | drivers/input/keyboard/nspire-keypad.c | 2 | ||||
| -rw-r--r-- | drivers/input/mouse/elantech.c | 17 | ||||
| -rw-r--r-- | drivers/input/touchscreen/ads7846.c | 123 | ||||
| -rw-r--r-- | drivers/input/touchscreen/cyttsp4_core.h | 12 | ||||
| -rw-r--r-- | drivers/input/touchscreen/cyttsp4_spi.c | 20 | ||||
| -rw-r--r-- | drivers/input/touchscreen/cyttsp_core.h | 8 | ||||
| -rw-r--r-- | drivers/input/touchscreen/cyttsp_i2c_common.c | 30 | ||||
| -rw-r--r-- | drivers/input/touchscreen/cyttsp_spi.c | 6 |
9 files changed, 253 insertions, 56 deletions
diff --git a/Documentation/devicetree/bindings/input/ads7846.txt b/Documentation/devicetree/bindings/input/ads7846.txt new file mode 100644 index 000000000000..5f7619c22743 --- /dev/null +++ b/Documentation/devicetree/bindings/input/ads7846.txt | |||
| @@ -0,0 +1,91 @@ | |||
| 1 | Device tree bindings for TI's ADS7843, ADS7845, ADS7846, ADS7873, TSC2046 | ||
| 2 | SPI driven touch screen controllers. | ||
| 3 | |||
| 4 | The node for this driver must be a child node of a SPI controller, hence | ||
| 5 | all mandatory properties described in | ||
| 6 | |||
| 7 | Documentation/devicetree/bindings/spi/spi-bus.txt | ||
| 8 | |||
| 9 | must be specified. | ||
| 10 | |||
| 11 | Additional required properties: | ||
| 12 | |||
| 13 | compatible Must be one of the following, depending on the | ||
| 14 | model: | ||
| 15 | "ti,tsc2046" | ||
| 16 | "ti,ads7843" | ||
| 17 | "ti,ads7845" | ||
| 18 | "ti,ads7846" | ||
| 19 | "ti,ads7873" | ||
| 20 | |||
| 21 | interrupt-parent | ||
| 22 | interrupts An interrupt node describing the IRQ line the chip's | ||
| 23 | !PENIRQ pin is connected to. | ||
| 24 | vcc-supply A regulator node for the supply voltage. | ||
| 25 | |||
| 26 | |||
| 27 | Optional properties: | ||
| 28 | |||
| 29 | ti,vref-delay-usecs vref supply delay in usecs, 0 for | ||
| 30 | external vref (u16). | ||
| 31 | ti,vref-mv The VREF voltage, in millivolts (u16). | ||
| 32 | ti,keep-vref-on set to keep vref on for differential | ||
| 33 | measurements as well | ||
| 34 | ti,swap-xy swap x and y axis | ||
| 35 | ti,settle-delay-usec Settling time of the analog signals; | ||
| 36 | a function of Vcc and the capacitance | ||
| 37 | on the X/Y drivers. If set to non-zero, | ||
| 38 | two samples are taken with settle_delay | ||
| 39 | us apart, and the second one is used. | ||
| 40 | ~150 uSec with 0.01uF caps (u16). | ||
| 41 | ti,penirq-recheck-delay-usecs If set to non-zero, after samples are | ||
| 42 | taken this delay is applied and penirq | ||
| 43 | is rechecked, to help avoid false | ||
| 44 | events. This value is affected by the | ||
| 45 | material used to build the touch layer | ||
| 46 | (u16). | ||
| 47 | ti,x-plate-ohms Resistance of the X-plate, | ||
| 48 | in Ohms (u16). | ||
| 49 | ti,y-plate-ohms Resistance of the Y-plate, | ||
| 50 | in Ohms (u16). | ||
| 51 | ti,x-min Minimum value on the X axis (u16). | ||
| 52 | ti,y-min Minimum value on the Y axis (u16). | ||
| 53 | ti,x-max Maximum value on the X axis (u16). | ||
| 54 | ti,y-max Minimum value on the Y axis (u16). | ||
| 55 | ti,pressure-min Minimum reported pressure value | ||
| 56 | (threshold) - u16. | ||
| 57 | ti,pressure-max Maximum reported pressure value (u16). | ||
| 58 | ti,debounce-max Max number of additional readings per | ||
| 59 | sample (u16). | ||
| 60 | ti,debounce-tol Tolerance used for filtering (u16). | ||
| 61 | ti,debounce-rep Additional consecutive good readings | ||
| 62 | required after the first two (u16). | ||
| 63 | ti,pendown-gpio-debounce Platform specific debounce time for the | ||
| 64 | pendown-gpio (u32). | ||
| 65 | pendown-gpio GPIO handle describing the pin the !PENIRQ | ||
| 66 | line is connected to. | ||
| 67 | linux,wakeup use any event on touchscreen as wakeup event. | ||
| 68 | |||
| 69 | |||
| 70 | Example for a TSC2046 chip connected to an McSPI controller of an OMAP SoC:: | ||
| 71 | |||
| 72 | spi_controller { | ||
| 73 | tsc2046@0 { | ||
| 74 | reg = <0>; /* CS0 */ | ||
| 75 | compatible = "ti,tsc2046"; | ||
| 76 | interrupt-parent = <&gpio1>; | ||
| 77 | interrupts = <8 0>; /* BOOT6 / GPIO 8 */ | ||
| 78 | spi-max-frequency = <1000000>; | ||
| 79 | pendown-gpio = <&gpio1 8 0>; | ||
| 80 | vcc-supply = <®_vcc3>; | ||
| 81 | |||
| 82 | ti,x-min = /bits/ 16 <0>; | ||
| 83 | ti,x-max = /bits/ 16 <8000>; | ||
| 84 | ti,y-min = /bits/ 16 <0>; | ||
| 85 | ti,y-max = /bits/ 16 <4800>; | ||
| 86 | ti,x-plate-ohms = /bits/ 16 <40>; | ||
| 87 | ti,pressure-max = /bits/ 16 <255>; | ||
| 88 | |||
| 89 | linux,wakeup; | ||
| 90 | }; | ||
| 91 | }; | ||
diff --git a/drivers/input/keyboard/nspire-keypad.c b/drivers/input/keyboard/nspire-keypad.c index e0a1339e40e6..20d872d6f603 100644 --- a/drivers/input/keyboard/nspire-keypad.c +++ b/drivers/input/keyboard/nspire-keypad.c | |||
| @@ -122,7 +122,7 @@ static int nspire_keypad_chip_init(struct nspire_keypad *keypad) | |||
| 122 | 122 | ||
| 123 | /* Enable interrupts */ | 123 | /* Enable interrupts */ |
| 124 | keypad->int_mask = 1 << 1; | 124 | keypad->int_mask = 1 << 1; |
| 125 | writel(keypad->int_mask, keypad->reg_base + 0xc); | 125 | writel(keypad->int_mask, keypad->reg_base + KEYPAD_INTMSK); |
| 126 | 126 | ||
| 127 | /* Disable GPIO interrupts to prevent hanging on touchpad */ | 127 | /* Disable GPIO interrupts to prevent hanging on touchpad */ |
| 128 | /* Possibly used to detect touchpad events */ | 128 | /* Possibly used to detect touchpad events */ |
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c index 1e8e42fb03a4..57b2637e153a 100644 --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c | |||
| @@ -694,18 +694,18 @@ static int elantech_packet_check_v3(struct psmouse *psmouse) | |||
| 694 | static int elantech_packet_check_v4(struct psmouse *psmouse) | 694 | static int elantech_packet_check_v4(struct psmouse *psmouse) |
| 695 | { | 695 | { |
| 696 | unsigned char *packet = psmouse->packet; | 696 | unsigned char *packet = psmouse->packet; |
| 697 | unsigned char packet_type = packet[3] & 0x03; | ||
| 697 | 698 | ||
| 698 | if ((packet[0] & 0x0c) == 0x04 && | 699 | switch (packet_type) { |
| 699 | (packet[3] & 0x1f) == 0x11) | 700 | case 0: |
| 701 | return PACKET_V4_STATUS; | ||
| 702 | |||
| 703 | case 1: | ||
| 700 | return PACKET_V4_HEAD; | 704 | return PACKET_V4_HEAD; |
| 701 | 705 | ||
| 702 | if ((packet[0] & 0x0c) == 0x04 && | 706 | case 2: |
| 703 | (packet[3] & 0x1f) == 0x12) | ||
| 704 | return PACKET_V4_MOTION; | 707 | return PACKET_V4_MOTION; |
| 705 | 708 | } | |
| 706 | if ((packet[0] & 0x0c) == 0x04 && | ||
| 707 | (packet[3] & 0x1f) == 0x10) | ||
| 708 | return PACKET_V4_STATUS; | ||
| 709 | 709 | ||
| 710 | return PACKET_UNKNOWN; | 710 | return PACKET_UNKNOWN; |
| 711 | } | 711 | } |
| @@ -1282,6 +1282,7 @@ static int elantech_set_properties(struct elantech_data *etd) | |||
| 1282 | etd->hw_version = 3; | 1282 | etd->hw_version = 3; |
| 1283 | break; | 1283 | break; |
| 1284 | case 6: | 1284 | case 6: |
| 1285 | case 7: | ||
| 1285 | etd->hw_version = 4; | 1286 | etd->hw_version = 4; |
| 1286 | break; | 1287 | break; |
| 1287 | default: | 1288 | default: |
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 84ccf140c1bb..ea195360747e 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c | |||
| @@ -27,6 +27,9 @@ | |||
| 27 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
| 28 | #include <linux/slab.h> | 28 | #include <linux/slab.h> |
| 29 | #include <linux/pm.h> | 29 | #include <linux/pm.h> |
| 30 | #include <linux/of.h> | ||
| 31 | #include <linux/of_gpio.h> | ||
| 32 | #include <linux/of_device.h> | ||
| 30 | #include <linux/gpio.h> | 33 | #include <linux/gpio.h> |
| 31 | #include <linux/spi/spi.h> | 34 | #include <linux/spi/spi.h> |
| 32 | #include <linux/spi/ads7846.h> | 35 | #include <linux/spi/ads7846.h> |
| @@ -961,9 +964,9 @@ static int ads7846_resume(struct device *dev) | |||
