[PATCH v4 4/4] Input: cyttsp - perform hard reset of the chip during probe

2016-01-21 Thread Oreste Salerno
Since we removed support for calling an init() callback from the platform data, introduce a function which initializes the chip by performing a hard reset, using the reset gpio defined in the device properties. Signed-off-by: Oreste Salerno --- drivers/input/touchscreen/cyttsp_core.c | 10

[PATCH v4 1/4] Input: cyttsp - use devres managed resource allocations

2016-01-21 Thread Oreste Salerno
Use devm_() functions for allocating memory, input device and IRQ. Signed-off-by: Oreste Salerno --- drivers/input/touchscreen/cyttsp_core.c | 26 +- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/drivers/input/touchscreen/cyttsp_core.c b/drivers/input

[PATCH v4 0/4] Add device tree support to the cyttsp driver

2016-01-21 Thread Oreste Salerno
tions instead of of_property() - Use touchscreen_parse_properties to parse common properties - Drop support for platform data - Used devres managed allocations Changes in v3: - Rework binding names and descriptions Changes in v2: - Fix err_cast.cocci warning in patch 2/3 Oreste Saler

[PATCH v4 2/4] Input: cyttsp - check return value of input_mt_init_slots

2016-01-21 Thread Oreste Salerno
Signed-off-by: Oreste Salerno --- drivers/input/touchscreen/cyttsp_core.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/cyttsp_core.c b/drivers/input/touchscreen/cyttsp_core.c index 3c2ee84..10379bc 100644 --- a/drivers/input/touchscreen

[PATCH v4 3/4] Input: cyttsp - switch to using device properties

2016-01-21 Thread Oreste Salerno
Drop support for platform data passed via a C-structure and switch to device properties instead, which should make the driver compatible with all platforms: OF, ACPI and static boards. Static boards should use property sets to communicate device parameters to the driver. Signed-off-by: Oreste

Re: [PATCH v4 3/4] Input: cyttsp - switch to using device properties

2016-01-21 Thread Oreste Salerno
On Thu, Jan 21, 2016 at 08:21:15PM +0100, Oreste Salerno wrote: > Drop support for platform data passed via a C-structure and switch to > device properties instead, which should make the driver compatible > with all platforms: OF, ACPI and static boards. Static boards should > use prop

Re: [PATCH v4 1/4] Input: cyttsp - use devres managed resource allocations

2016-01-21 Thread Oreste Salerno
On Thu, Jan 21, 2016 at 11:29:24AM -0800, Dmitry Torokhov wrote: > Hi Oreste, > > On Thu, Jan 21, 2016 at 08:21:13PM +0100, Oreste Salerno wrote: > > Use devm_() functions for allocating memory, input device and IRQ. > > > > ... > > > @@ -625,11 +620

Re: [PATCH v4 3/4] Input: cyttsp - switch to using device properties

2016-01-21 Thread Oreste Salerno
On Thu, Jan 21, 2016 at 11:35:46AM -0800, Dmitry Torokhov wrote: > On Thu, Jan 21, 2016 at 08:25:53PM +0100, Oreste Salerno wrote: > > On Thu, Jan 21, 2016 at 08:21:15PM +0100, Oreste Salerno wrote: > > > Drop support for platform data passed via a C-structure and switch to >

[PATCH v5 4/4] Input: cyttsp - perform hard reset of the chip during probe

2016-01-21 Thread Oreste Salerno
Since we removed support for calling an init() callback from the platform data, introduce a function which initializes the chip by performing a hard reset, using the reset gpio defined in the device properties. Signed-off-by: Oreste Salerno --- drivers/input/touchscreen/cyttsp_core.c | 12

[PATCH v5 1/4] Input: cyttsp - use devres managed resource allocations

2016-01-21 Thread Oreste Salerno
Use devm_() functions for allocating memory, input device and IRQ. Signed-off-by: Oreste Salerno --- drivers/input/touchscreen/cyttsp_core.c | 65 ++--- drivers/input/touchscreen/cyttsp_core.h | 1 - drivers/input/touchscreen/cyttsp_i2c.c | 10 - drivers/input

[PATCH v5 0/4] Add device tree support to the cyttsp driver

2016-01-21 Thread Oreste Salerno
in v3: - Rework binding names and descriptions Changes in v2: - Fix err_cast.cocci warning in patch 2/3 Oreste Salerno (4): Input: cyttsp - use devres managed resource allocations Input: cyttsp - check return value of input_mt_init_slots Input: cyttsp - switch to using device properties

[PATCH v5 2/4] Input: cyttsp - check return value of input_mt_init_slots

2016-01-21 Thread Oreste Salerno
Signed-off-by: Oreste Salerno --- drivers/input/touchscreen/cyttsp_core.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/cyttsp_core.c b/drivers/input/touchscreen/cyttsp_core.c index e6437f2..c269a19 100644 --- a/drivers/input/touchscreen

[PATCH v5 3/4] Input: cyttsp - switch to using device properties

2016-01-21 Thread Oreste Salerno
Drop support for platform data passed via a C-structure and switch to device properties instead, which should make the driver compatible with all platforms: OF, ACPI and static boards. Static boards should use property sets to communicate device parameters to the driver. Signed-off-by: Oreste

[PATCH v2 2/3] Input: cyttsp - add device tree support

2016-01-05 Thread Oreste Salerno
Add support for retrieving the platform data from the device tree. Signed-off-by: Oreste Salerno --- .../bindings/input/touchscreen/cyttsp.txt | 73 ++ drivers/input/touchscreen/cyttsp_core.c| 108 +++-- include/linux/input/cyttsp.h

[PATCH v2 0/3] Add device tree support to the cyttsp driver

2016-01-05 Thread Oreste Salerno
This set of patches adds support to the cyttsp touchscreen driver to retrieve platform data details from the device tree. Additionally, they define a default init function that performs a hard reset of the chip on boot. --- Changes in v2: - Fix err_cast.cocci warning in patch 2/3 Oreste

[PATCH v2 1/3] Input: cyttsp - remove unused irq_gpio from platform_data

2016-01-05 Thread Oreste Salerno
This field is not being used and the irq is anyway passed via the 'irq' parameter to cyttsp_probe. Signed-off-by: Oreste Salerno --- include/linux/input/cyttsp.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/input/cyttsp.h b/include/linux/input/cyttsp.h index 5af7c6

[PATCH v2 3/3] Input: cyttsp - add default init function

2016-01-05 Thread Oreste Salerno
When using device trees, it's not possible to assign an init() function in the platform data. In case the init function has not been assigned, attempt to perform a hard reset of the chip, using reset gpio defined in the platform data / device tree. Signed-off-by: Oreste Salerno --- dr

[PATCH 0/3] Add device tree support to the cyttsp driver

2015-12-27 Thread Oreste Salerno
This set of patches adds support to the cyttsp touchscreen driver to retrieve platform data details from the device tree. Additionally, they define a default init function that performs a hard reset of the chip on boot. Oreste Salerno (3): Input: cyttsp - remove unused irq_gpio from

[PATCH 1/3] Input: cyttsp - remove unused irq_gpio from platform_data

2015-12-27 Thread Oreste Salerno
This field is not being used and the irq is anyway passed via the 'irq' parameter to cyttsp_probe. Signed-off-by: Oreste Salerno --- include/linux/input/cyttsp.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/input/cyttsp.h b/include/linux/input/cyttsp.h index 5af7c6

[PATCH 3/3] Input: cyttsp - add default init function

2015-12-27 Thread Oreste Salerno
When using device trees, it's not possible to assign an init() function in the platform data. In case the init function has not been assigned, attempt to perform a hard reset of the chip, using reset gpio defined in the platform data / device tree. Signed-off-by: Oreste Salerno --- dr

[PATCH 2/3] Input: cyttsp - add device tree support

2015-12-27 Thread Oreste Salerno
Add support for retrieving the platform data from the device tree. Signed-off-by: Oreste Salerno --- .../bindings/input/touchscreen/cyttsp.txt | 73 ++ drivers/input/touchscreen/cyttsp_core.c| 108 +++-- include/linux/input/cyttsp.h