input, touch, atmel_mxt_ts: use atmel driver
Subsystems (8)
RFC PATCH 1/1 input, touch, atmel_mxt_ts: use atmel driver
try to bring the driver from
https://github.com/ndyer/linux for-next
to mainline. Post this as a RFC, to see if this is possible...
based on:
commit dda0a5570574cfe467c1c794cf7a17e1d742ec02 ("Input:atmel_mxt_ts - implement improved debug message interface")
from Nick Dyer <[email protected]>
added:
- remove some (not all) checkpatch warnings
- Add support for voltage regulator
- Add support for Device Tree support
--- .../bindings/input/touchscreen/atmel_mxt_ts.txt | 27 + arch/arm/mach-s5pv210/mach-goni.c | 27 + drivers/input/touchscreen/atmel_mxt_ts.c | 2666 ++++++++++++++++---- include/linux/i2c/atmel_mxt_ts.h | 8 +- 4 files changed, 2245 insertions(+), 483 deletions(-) create mode 100644 Documentation/devicetree/bindings/input/touchscreen/atmel_mxt_ts.txt
Documentation/devicetree/bindings/input/touchscreen/atmel_mxt_ts.txt new file +27 -0
@@ -0,0 +1,27 @@ +* Atmel maXtouch touchscreen controller + +Required properties: +- compatible: must be "atmel,maxtouch" +- reg: I2C address of the chip +- interrupt-parent: interrupt controller which provides the interrupt +- interrupts: interrupt signal to which the chip is connected + +Optional properties: +- vdd-supply: voltage regulator used for power control and reading + operating voltage + +Example: + + i2c at 00000000 { + /* ... */ + + tsp at 4a { + compatible = "atmel,maxtouch"; + reg = <0x4a>; + interrupt-parent = <&gpe1>; + interrupts = <7 2>; + vdd-supply = <&tsp_reg>; + }; + + /* ... */ + };
arch/arm/mach-s5pv210/mach-goni.c +27 -0
@@ -233,6 +233,32 @@ static void __init goni_radio_init(void) }/* TSP */ +static struct regulator_consumer_supply tsp_fixed_consumer = +REGULATOR_SUPPLY ("vdd" ,"2-004a" ); + +static struct regulator_init_data tsp_fixed_voltage_init_data = { + .constraints = { + .name ="TSP_2.8V" , + }, + .num_consumer_supplies =1 , + .consumer_supplies = &tsp_fixed_consumer, +}; + +static struct fixed_voltage_config tsp_fixed_voltage_config = { + .supply_name ="TSP_VDD" , + .microvolts =2800000 , + .gpio = -EINVAL , + .init_data = &tsp_fixed_voltage_init_data, +}; + +static struct platform_device tsp_fixed_voltage = { + .name ="reg-fixed-voltage" , + .id =3 , + .dev = { + .platform_data = &tsp_fixed_voltage_config, + }, +}; +static struct mxt_platform_data qt602240_platform_data = { .irqflags =IRQF_TRIGGER_FALLING , };
@@ -832,6 +858,7 @@ static struct platform_device *goni_devices[] __initdata = { &s3c_device_usb_hsotg, &samsung_device_keypad, &s3c_device_i2c1, + &tsp_fixed_voltage, &s3c_device_i2c2, &wm8994_fixed_voltage0, &wm8994_fixed_voltage1,
drivers/input/touchscreen/atmel_mxt_ts.c +2186 -480
2,934 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.8.3.1
Part of the diff is not shown here. View the raw message.
RFC PATCH 1/1 input, touch, atmel_mxt_ts: use atmel driver
Quoted 9 lines · Heiko Schocher
try to bring the driver from
https://github.com/ndyer/linux for-nextto mainline. Post this as a RFC, to see if this is possible...
based on:
commitdda0a5570574cfe467c1c794cf7a17e1d742ec02("Input:atmel_mxt_ts- implement improved debug message interface")
Quoted 6 lines
from Nick Dyer <[email protected]>
added:
- remove some (not all) checkpatch warnings
- Add support for voltage regulator
- Add support for Device Tree support
My thinking has been that the maintainers will more likely accept a series of small patches than to make such a huge change to the entire driver, my for-next tree is where I'm working on this, and I plan to post another set of 15 patches soon, when I've fixed up some issues to do with probe/remove cycles.
You should note that my for-next branch has moved on slightly since you have taken this, because I have implemented device tree support and changed the config download to use the request_firmware_async() function.
Your device tree stuff for mach-goni.c looks really useful, however - if you can send me a patch for that against my current for-next branch I can include it with my version of the device tree support.
all the best
Nick
RFC PATCH 1/1 input, touch, atmel_mxt_ts: use atmel driver
Hello Nick,
Am 11.06.2014 14:06, schrieb Nick Dyer:
Quoted 17 lines
Quoted 9 lines · Heiko Schocher
try to bring the driver from
https://github.com/ndyer/linux for-nextto mainline. Post this as a RFC, to see if this is possible...
based on:
commitdda0a5570574cfe467c1c794cf7a17e1d742ec02("Input:atmel_mxt_ts- implement improved debug message interface")Quoted 6 lines
from Nick Dyer<[email protected]>
added:
- remove some (not all) checkpatch warnings
- Add support for voltage regulator
- Add support for Device Tree support
Quoted 5 lines
My thinking has been that the maintainers will more likely accept a series of small patches than to make such a huge change to the entire driver, my for-next tree is where I'm working on this, and I plan to post another set of 15 patches soon, when I've fixed up some issues to do with probe/remove cycles.
Sound good!
Quoted 3 lines
You should note that my for-next branch has moved on slightly since you have taken this, because I have implemented device tree support and changed the config download to use the
request_firmware_async()function.
Oh, I take a look at this, thanks!
Quoted 3 lines
Your device tree stuff for
mach-goni.clooks really useful, however - if you can send me a patch for that against my current for-next branch I can include it with my version of the device tree support.
Ok, I send you this ASAP.
Thanks for this info.
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany