input: resend of 5 touchscreen patches
Subsystems (4)
cover input: resend of 5 touchscreen patches
Hi Dmitry,
Thank you for merging the 2 silead touchscreen firmware loading patches into your for-linus branch.
Here is a resend of 5 patches intended for next, which do not seem to be getting anywhere hence the resend. Esp. patches 4 and 5, which already have Robh's ack for the dt bits seem ready for merging to me.
Rob, patches 1, 2 have a dt-bindings component, you had some questions about the dt bits in patch 1, which I've answered here:
http://www.spinics.net/lists/arm-kernel/msg521450.html
Regards,
Hans
p.s.
Thank you both for all the great work you're doing on the kernel.
PATCH RESEND 1/5 input: touchscreen: Add generic touchscreen softbutton handling code
Some touchscreens extend over the display they cover and have a number of capacative softbuttons outside of the display the cover.
With some hardware these softbuttons simply report touches with coordinates outside of the normal coordinate space for touches on the display.
This commit adds a devicetree binding for describing such buttons in devicetree and a bunch of helper functions to easily add support for these to existing touchscreen drivers.
--- .../bindings/input/touchscreen/softbuttons.txt | 58 +++++++++ drivers/input/touchscreen/Makefile | 2 +- drivers/input/touchscreen/softbuttons.c | 145 +++++++++++++++++++++ include/linux/input/touchscreen.h | 9 ++ 4 files changed, 213 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/input/touchscreen/softbuttons.txt create mode 100644 drivers/input/touchscreen/softbuttons.c
Documentation/devicetree/bindings/input/touchscreen/softbuttons.txt new file +58 -0
@@ -0,0 +1,58 @@ +General Touchscreen Softbutton Properties: + +Some touchscreens extend over the display they cover and have a number +of capacative softbuttons outside of the display the cover. + +Some of these softbuttons simply report touches with coordinates outside of +the normal coordinate space for touches on the display. This binding is for +describing such buttons in devicetree. + +Each softkey is represented as a sub-node of the touchscreen node. + +Required subnode-properties: + - label : Descriptive name of the key. + - linux,code : Keycode to emit. + - softbutton-min-x : X start of the area the softbutton area covers + - softbutton-max-x : X end of the area the softbutton area covers + - softbutton-min-y : Y start of the area the softbutton area covers + - softbutton-max-y : Y end of the area the softbutton area covers + +Example: + +#include <dt-bindings/input/input.h> + +&i2c2 { + ft5406ee8: touchscreen at 38 { + compatible = "edt,edt-ft5406"; + reg = <0x38>; + touchscreen-size-x = <1024>; + touchscreen-size-y = <768>; + + button at 0 { + label = "Esc"; + linux,code = <KEY_ESC>; + softbutton-min-x = <1084>; + softbutton-max-x = <1098>; + softbutton-min-y = <0>; + softbutton-max-y = <49>; + }; + + button at 1 { + label = "Home"; + linux,code = <KEY_HOMEPAGE>; + softbutton-min-x = <1084>; + softbutton-max-x = <1098>; + softbutton-min-y = <50>; + softbutton-max-y = <99>; + }; + + button at 2 { + label = "Menu"; + linux,code = <KEY_MENU>; + softbutton-min-x = <1084>; + softbutton-max-x = <1098>; + softbutton-min-y = <100>; + softbutton-max-y = <149>; + }; + }; +};
drivers/input/touchscreen/Makefile +1 -1
@@ -6,7 +6,7 @@ wm97xx-ts-y := wm97xx-core.o -obj-$(CONFIG_TOUCHSCREEN_PROPERTIES) += of_touchscreen.o +obj-$(CONFIG_TOUCHSCREEN_PROPERTIES) += of_touchscreen.o softbuttons.o obj-$(CONFIG_TOUCHSCREEN_88PM860X) += 88pm860x-ts.o obj-$(CONFIG_TOUCHSCREEN_AD7877) += ad7877.o obj-$(CONFIG_TOUCHSCREEN_AD7879) += ad7879.o
drivers/input/touchscreen/softbuttons.c new file +145 -0
145 lines not on this page · raw message
include/linux/input/touchscreen.h +9 -0
@@ -9,8 +9,11 @@ #ifndef _TOUCHSCREEN_H #define _TOUCHSCREEN_H +#include <linux/types.h> + struct input_dev; struct input_mt_pos; +struct touchscreen_softbutton_info; struct touchscreen_properties { unsigned int max_x;
@@ -32,4 +35,10 @@ void touchscreen_report_pos(struct input_dev *input, unsigned int x, unsigned int y, bool multitouch); +struct touchscreen_softbutton_info *devm_touchscreen_alloc_softbuttons ( +struct input_dev *input); + +bool touchscreen_handle_softbuttons (struct touchscreen_softbutton_info *info, +unsigned int x,unsigned int y,bool down); +#endif
Signature · 1 line
2.9.3
Rob Herring
maintainerPATCH RESEND 1/5 input: touchscreen: Add generic touchscreen softbutton handling code
Quoted 35 lines · Hans de Goede
Some touchscreens extend over the display they cover and have a number of capacative softbuttons outside of the display the cover.
With some hardware these softbuttons simply report touches with coordinates outside of the normal coordinate space for touches on the display.
This commit adds a devicetree binding for describing such buttons in devicetree and a bunch of helper functions to easily add support for these to existing touchscreen drivers.
Signed-off-by Hans de Goede <[email protected]>--- .../bindings/input/touchscreen/softbuttons.txt | 58 +++++++++ drivers/input/touchscreen/Makefile | 2 +- drivers/input/touchscreen/softbuttons.c | 145 +++++++++++++++++++++ include/linux/input/touchscreen.h | 9 ++ 4 files changed, 213 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/input/touchscreen/softbuttons.txt create mode 100644 drivers/input/touchscreen/softbuttons.cDocumentation/devicetree/bindings/input/touchscreen/softbuttons.txt new file +8
-0@@ -0,0 +1,58 @@ +General Touchscreen Softbutton Properties: + +Some touchscreens extend over the display they cover and have a number +of capacative softbuttons outside of the display the cover. + +Some of these softbuttons simply report touches with coordinates outside of +the normal coordinate space for touches on the display. This binding is for +describing such buttons in devicetree.
Documentation/devicetree/bindings/input/touchscreen/softbuttons.txt line 18
Quoted 10 lines
Documentation/devicetree/bindings/input/touchscreen/softbuttons.txt new file +10
-0+ +Each softkey is represented as a sub-node of the touchscreen node. + +Required subnode-properties: + - label : Descriptive name of the key. + - linux,code : Keycode to emit. + - softbutton-min-x : X start of the area the softbutton area covers + - softbutton-max-x : X end of the area the softbutton area covers + - softbutton-min-y : Y start of the area the softbutton area covers + - softbutton-max-y : Y end of the area the softbutton area covers
Please add the note about these values are signed.
With that,
Rob
PATCH RESEND 2/5 input: touchscreen: Add LED trigger support to the softbutton code
In reply to Hans de GoedeIn some hardware there are 1 or more LEDs behind the touchscreen softbuttons, which are intended to provide visual feedback to the user that the softbutton has been pressed, this commit adds support for this.
--- .../bindings/input/touchscreen/softbuttons.txt | 4 ++ drivers/input/touchscreen/softbuttons.c | 49 +++++++++++++++++++++- 2 files changed, 52 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/input/touchscreen/softbuttons.txt +4 -0
@@ -17,6 +17,10 @@ Required subnode-properties: - softbutton-min-y : Y start of the area the softbutton area covers - softbutton-max-y : Y end of the area the softbutton area covers +Optional subnode-properties: +- linux,led-trigger : String for a LED trigger for providing visual + feedback that the softbutton has been pressed + Example: #include <dt-bindings/input/input.h>
drivers/input/touchscreen/softbuttons.c +48 -1
85 lines not on this page · raw message
Signature · 1 line
2.9.3
Rob Herring
maintainerPATCH RESEND 2/5 input: touchscreen: Add LED trigger support to the softbutton code
Quoted 16 lines · Hans de Goede
In some hardware there are 1 or more LEDs behind the touchscreen softbuttons, which are intended to provide visual feedback to the user that the softbutton has been pressed, this commit adds support for this.
Signed-off-by Hans de Goede <[email protected]>--- .../bindings/input/touchscreen/softbuttons.txt | 4 ++ drivers/input/touchscreen/softbuttons.c | 49 +++++++++++++++++++++- 2 files changed, 52 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/input/touchscreen/softbuttons.txt +0
-0
Documentation/devicetree/bindings/input/touchscreen/softbuttons.txt Required subnode-properties: · line 22
Quoted 6 lines
Documentation/devicetree/bindings/input/touchscreen/softbuttons.txt +3
-0@@ -17,6 +17,10 @@ Required subnode-properties: - softbutton-min-y : Y start of the area the softbutton area covers - softbutton-max-y : Y end of the area the softbutton area covers +Optional subnode-properties: +- linux,led-trigger : String for a LED trigger for providing visual + feedback that the softbutton has been pressed
This should just be a phandle to the LED if you want to describe the link. Or standardize the trigger naming (in the kernel) for buttons and just use the existing 'linux,default-trigger' in the LED node.
Rob
PATCH RESEND 3/5 input: touchscreen: edt-ft5x06: Add support for softbuttons
In reply to Hans de GoedeAdd support for softbuttons to the edt-ft5x06 driver.
--- drivers/input/touchscreen/edt-ft5x06.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/input/touchscreen/edt-ft5x06.c +8 -0
@@ -86,6 +86,7 @@ struct edt_reg_addr {struct edt_ft5x06_ts_data {struct i2c_client *client;struct input_dev *input; +struct touchscreen_softbutton_info *buttons;struct touchscreen_properties prop;u16 num_x;u16 num_y;
@@ -241,6 +242,9 @@ static irqreturn_t edt_ft5x06_ts_isr(int irq, void *dev_id) id = (buf[2 ] >>4 ) &0x0f ; down = type !=TOUCH_EVENT_UP ; +if (touchscreen_handle_softbuttons (tsdata->buttons, x, y, down)) +continue ; +input_mt_slot (tsdata->input, id);input_mt_report_slot_state (tsdata->input,MT_TOOL_FINGER , down);
@@ -975,6 +979,10 @@ static int edt_ft5x06_ts_probe(struct i2c_client *client,touchscreen_parse_properties (input, true, &tsdata->prop); + tsdata->buttons =devm_touchscreen_alloc_softbuttons (input); +if (IS_ERR (tsdata->buttons)) +return PTR_ERR (tsdata->buttons); + error =input_mt_init_slots (input, tsdata->max_support_points,INPUT_MT_DIRECT );if (error) {
Signature · 1 line
2.9.3
PATCH RESEND 4/5 input: touchscreen: silead: Add regulator support
In reply to Hans de GoedeOn some tablets the touchscreen controller is powered by seperate regulators, add support for this.
--- .../bindings/input/touchscreen/silead_gsl1680.txt | 2 + drivers/input/touchscreen/silead.c | 51 ++++++++++++++++++++-- 2 files changed, 49 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/input/touchscreen/silead_gsl1680.txt +2 -0
@@ -18,6 +18,8 @@ Optional properties: - touchscreen-inverted-y : See touchscreen.txt - touchscreen-swapped-x-y : See touchscreen.txt - silead,max-fingers : maximum number of fingers the touchscreen can detect +- vddio-supply : regulator phandle for controller VDDIO +- avdd-supply : regulator phandle for controller AVDD Example:
drivers/input/touchscreen/silead.c +47 -4
90 lines not on this page · raw message
Signature · 1 line
2.9.3
PATCH RESEND 5/5 input: touchscreen: Add support for Elan eKTF2127 touchscreen controller
In reply to Hans de GoedeFrom: Siebren Vroegindeweij <[email protected]>
This adds a driver for the Elan eKTF2127 touchscreen controller, which speaks an i2c protocol which is distinctly different from the already supported eKTH controllers.
---
Changes in v2:
-Improve devicetree bindings document
-Use touchscreen_parse_properties and touchscreen_report_pos instead of DIY -Remove a bunch of unused defines (copy and paste leftover from chipone driver) -Some other minor cleanups and review comments addressed
-Add defines for some command / address hex-values
-Check packet header in interrupt handler
--- .../bindings/input/touchscreen/ektf2127.txt | 27 ++ drivers/input/touchscreen/Kconfig | 12 + drivers/input/touchscreen/Makefile | 1 + drivers/input/touchscreen/ektf2127.c | 333 +++++++++++++++++++++ 4 files changed, 373 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/touchscreen/ektf2127.txt create mode 100644 drivers/input/touchscreen/ektf2127.c
Documentation/devicetree/bindings/input/touchscreen/ektf2127.txt new file +27 -0
@@ -0,0 +1,27 @@ +* Elan eKTF2127 I2C touchscreen controller + +Required properties: + - compatible : "elan,ektf2127" + - 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 ektf2127 interrupt + - power-gpios : GPIO specification for the pin connected to the + ektf2127's wake input. This needs to be driven high + to take ektf2127 out of it's low power state + +For additional optional properties see: touchscreen.txt + +Example: + +i2c at 00000000 { + ektf2127: touchscreen at 15 { + compatible = "elan,ektf2127"; + reg = <0x15>; + interrupt-parent = <&pio>; + interrupts = <6 11 IRQ_TYPE_EDGE_FALLING>; + power-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; + touchscreen-inverted-x; + touchscreen-swapped-x-y; + }; +};
drivers/input/touchscreen/Kconfig +12 -0
@@ -396,6 +396,18 @@ config TOUCHSCREEN_ELAN To compile this driver as a module, choose M here: the module will be called elants_i2c. +config TOUCHSCREEN_EKTF2127 + tristate "Elan eKTF2127 I2C touchscreen" + depends on I2C + help + Say Y here if you have an Elan eKTF2127 touchscreen + connected to your system. + + If unsure, say N. + + To compile this driver as a module, choose M here: the + module will be called ektf2127. + config TOUCHSCREEN_ELO tristate "Elo serial touchscreens" select SERIO
drivers/input/touchscreen/Makefile +1 -0
@@ -33,6 +33,7 @@ obj-$(CONFIG_TOUCHSCREEN_HAMPSHIRE) += hampshire.o obj-$(CONFIG_TOUCHSCREEN_GUNZE) += gunze.o obj-$(CONFIG_TOUCHSCREEN_EETI) += eeti_ts.o obj-$(CONFIG_TOUCHSCREEN_ELAN) += elants_i2c.o +obj-$(CONFIG_TOUCHSCREEN_EKTF2127) += ektf2127.o obj-$(CONFIG_TOUCHSCREEN_ELO) += elo.o obj-$(CONFIG_TOUCHSCREEN_EGALAX) += egalax_ts.o obj-$(CONFIG_TOUCHSCREEN_EGALAX_SERIAL) += egalax_ts_serial.o
drivers/input/touchscreen/ektf2127.c new file +333 -0
333 lines not on this page · raw message
Signature · 1 line
2.9.3