* [PATCH 0/3] Add Device Tree support for tps6507x-ts
@ 2016-02-01 6:28 ` Sushaanth Srirangapathi
0 siblings, 0 replies; 26+ messages in thread
From: Sushaanth Srirangapathi @ 2016-02-01 6:28 UTC (permalink / raw)
To: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Russell King, Dmitry Torokhov, Joe Perches,
Javier Martinez Canillas
Cc: devicetree, linux-kernel, linux-arm-kernel, linux-input,
Sushaanth Srirangapathi
Add DT support for touchscreen input device tps6507x-ts which is part
of MFD device "TPS6507x"
Sushaanth Srirangapathi (3):
Input: tps6507x-ts - add binding for tps6507x-ts
Input: tps6507x-ts - Add device tree support
ARM: DTS: da850: add DT node for tps6507x-ts
Documentation/devicetree/bindings/mfd/tps6507x.txt | 10 +++-
arch/arm/boot/dts/da850-evm.dts | 3 ++
drivers/input/touchscreen/tps6507x-ts.c | 51 ++++++++++++++++++--
3 files changed, 59 insertions(+), 5 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 0/3] Add Device Tree support for tps6507x-ts
@ 2016-02-01 6:28 ` Sushaanth Srirangapathi
0 siblings, 0 replies; 26+ messages in thread
From: Sushaanth Srirangapathi @ 2016-02-01 6:28 UTC (permalink / raw)
To: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Russell King, Dmitry Torokhov, Joe Perches,
Javier Martinez Canillas
Cc: devicetree, linux-kernel, linux-arm-kernel, linux-input,
Sushaanth Srirangapathi
Add DT support for touchscreen input device tps6507x-ts which is part
of MFD device "TPS6507x"
Sushaanth Srirangapathi (3):
Input: tps6507x-ts - add binding for tps6507x-ts
Input: tps6507x-ts - Add device tree support
ARM: DTS: da850: add DT node for tps6507x-ts
Documentation/devicetree/bindings/mfd/tps6507x.txt | 10 +++-
arch/arm/boot/dts/da850-evm.dts | 3 ++
drivers/input/touchscreen/tps6507x-ts.c | 51 ++++++++++++++++++--
3 files changed, 59 insertions(+), 5 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 0/3] Add Device Tree support for tps6507x-ts
@ 2016-02-01 6:28 ` Sushaanth Srirangapathi
0 siblings, 0 replies; 26+ messages in thread
From: Sushaanth Srirangapathi @ 2016-02-01 6:28 UTC (permalink / raw)
To: linux-arm-kernel
Add DT support for touchscreen input device tps6507x-ts which is part
of MFD device "TPS6507x"
Sushaanth Srirangapathi (3):
Input: tps6507x-ts - add binding for tps6507x-ts
Input: tps6507x-ts - Add device tree support
ARM: DTS: da850: add DT node for tps6507x-ts
Documentation/devicetree/bindings/mfd/tps6507x.txt | 10 +++-
arch/arm/boot/dts/da850-evm.dts | 3 ++
drivers/input/touchscreen/tps6507x-ts.c | 51 ++++++++++++++++++--
3 files changed, 59 insertions(+), 5 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 1/3] Input: tps6507x-ts - add binding for tps6507x-ts
2016-02-01 6:28 ` Sushaanth Srirangapathi
(?)
@ 2016-02-01 6:28 ` Sushaanth Srirangapathi
-1 siblings, 0 replies; 26+ messages in thread
From: Sushaanth Srirangapathi @ 2016-02-01 6:28 UTC (permalink / raw)
To: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Russell King, Dmitry Torokhov, Joe Perches,
Javier Martinez Canillas
Cc: devicetree, linux-kernel, linux-arm-kernel, linux-input,
Sushaanth Srirangapathi
add binding information for tps6507x touchscreen input.
"ti,min-pressure" was added as TI specific binding because it
was specific to tps6507x IP and not applicable or relevant for
other touchscreen drivers.
Signed-off-by: Sushaanth Srirangapathi <sushaanth.s@ti.com>
---
Documentation/devicetree/bindings/mfd/tps6507x.txt | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/mfd/tps6507x.txt b/Documentation/devicetree/bindings/mfd/tps6507x.txt
index 8fffa3c..52df806 100644
--- a/Documentation/devicetree/bindings/mfd/tps6507x.txt
+++ b/Documentation/devicetree/bindings/mfd/tps6507x.txt
@@ -23,6 +23,8 @@ Required properties:
vindcdc1_2-supply: VDCDC1 and VDCDC2 input.
vindcdc3-supply : VDCDC3 input.
vldo1_2-supply : VLDO1 and VLDO2 input.
+- touchscreen: This is the child node that specifes the touchscreen
+ properties.
Regulator Optional properties:
- defdcdc_default: It's property of DCDC2 and DCDC3 regulators.
@@ -30,6 +32,10 @@ Regulator Optional properties:
1: If defdcdc pin of DCDC2/DCDC3 is driven HIGH.
If this property is not defined, it defaults to 0 (not enabled).
+Touchscreen Optional properties:
+- ti,min-pressure : pressure level above which the event is considered as a
+ valid touch.
+
Example:
pmu: tps6507x@48 {
@@ -87,5 +93,7 @@ Example:
regulator-boot-on;
};
};
-
+ touchscreen {
+ ti,min-pressure = <0x30>;
+ };
};
--
1.7.9.5
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 1/3] Input: tps6507x-ts - add binding for tps6507x-ts
@ 2016-02-01 6:28 ` Sushaanth Srirangapathi
0 siblings, 0 replies; 26+ messages in thread
From: Sushaanth Srirangapathi @ 2016-02-01 6:28 UTC (permalink / raw)
To: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Russell King, Dmitry Torokhov, Joe Perches,
Javier Martinez Canillas
Cc: devicetree, linux-kernel, linux-arm-kernel, linux-input,
Sushaanth Srirangapathi
add binding information for tps6507x touchscreen input.
"ti,min-pressure" was added as TI specific binding because it
was specific to tps6507x IP and not applicable or relevant for
other touchscreen drivers.
Signed-off-by: Sushaanth Srirangapathi <sushaanth.s@ti.com>
---
Documentation/devicetree/bindings/mfd/tps6507x.txt | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/mfd/tps6507x.txt b/Documentation/devicetree/bindings/mfd/tps6507x.txt
index 8fffa3c..52df806 100644
--- a/Documentation/devicetree/bindings/mfd/tps6507x.txt
+++ b/Documentation/devicetree/bindings/mfd/tps6507x.txt
@@ -23,6 +23,8 @@ Required properties:
vindcdc1_2-supply: VDCDC1 and VDCDC2 input.
vindcdc3-supply : VDCDC3 input.
vldo1_2-supply : VLDO1 and VLDO2 input.
+- touchscreen: This is the child node that specifes the touchscreen
+ properties.
Regulator Optional properties:
- defdcdc_default: It's property of DCDC2 and DCDC3 regulators.
@@ -30,6 +32,10 @@ Regulator Optional properties:
1: If defdcdc pin of DCDC2/DCDC3 is driven HIGH.
If this property is not defined, it defaults to 0 (not enabled).
+Touchscreen Optional properties:
+- ti,min-pressure : pressure level above which the event is considered as a
+ valid touch.
+
Example:
pmu: tps6507x@48 {
@@ -87,5 +93,7 @@ Example:
regulator-boot-on;
};
};
-
+ touchscreen {
+ ti,min-pressure = <0x30>;
+ };
};
--
1.7.9.5
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 1/3] Input: tps6507x-ts - add binding for tps6507x-ts
@ 2016-02-01 6:28 ` Sushaanth Srirangapathi
0 siblings, 0 replies; 26+ messages in thread
From: Sushaanth Srirangapathi @ 2016-02-01 6:28 UTC (permalink / raw)
To: linux-arm-kernel
add binding information for tps6507x touchscreen input.
"ti,min-pressure" was added as TI specific binding because it
was specific to tps6507x IP and not applicable or relevant for
other touchscreen drivers.
Signed-off-by: Sushaanth Srirangapathi <sushaanth.s@ti.com>
---
Documentation/devicetree/bindings/mfd/tps6507x.txt | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/mfd/tps6507x.txt b/Documentation/devicetree/bindings/mfd/tps6507x.txt
index 8fffa3c..52df806 100644
--- a/Documentation/devicetree/bindings/mfd/tps6507x.txt
+++ b/Documentation/devicetree/bindings/mfd/tps6507x.txt
@@ -23,6 +23,8 @@ Required properties:
vindcdc1_2-supply: VDCDC1 and VDCDC2 input.
vindcdc3-supply : VDCDC3 input.
vldo1_2-supply : VLDO1 and VLDO2 input.
+- touchscreen: This is the child node that specifes the touchscreen
+ properties.
Regulator Optional properties:
- defdcdc_default: It's property of DCDC2 and DCDC3 regulators.
@@ -30,6 +32,10 @@ Regulator Optional properties:
1: If defdcdc pin of DCDC2/DCDC3 is driven HIGH.
If this property is not defined, it defaults to 0 (not enabled).
+Touchscreen Optional properties:
+- ti,min-pressure : pressure level above which the event is considered as a
+ valid touch.
+
Example:
pmu: tps6507x at 48 {
@@ -87,5 +93,7 @@ Example:
regulator-boot-on;
};
};
-
+ touchscreen {
+ ti,min-pressure = <0x30>;
+ };
};
--
1.7.9.5
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 1/3] Input: tps6507x-ts - add support for tps6507x-ts
2016-02-01 6:28 ` Sushaanth Srirangapathi
(?)
@ 2016-02-01 6:28 ` Sushaanth Srirangapathi
-1 siblings, 0 replies; 26+ messages in thread
From: Sushaanth Srirangapathi @ 2016-02-01 6:28 UTC (permalink / raw)
To: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Russell King, Dmitry Torokhov, Joe Perches,
Javier Martinez Canillas
Cc: devicetree, linux-kernel, linux-arm-kernel, linux-input,
Sushaanth Srirangapathi
add binding information for tps6507x touchscreen input.
Signed-off-by: Sushaanth Srirangapathi <sushaanth.s@ti.com>
---
Documentation/devicetree/bindings/mfd/tps6507x.txt | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/mfd/tps6507x.txt b/Documentation/devicetree/bindings/mfd/tps6507x.txt
index 8fffa3c..74c768b 100644
--- a/Documentation/devicetree/bindings/mfd/tps6507x.txt
+++ b/Documentation/devicetree/bindings/mfd/tps6507x.txt
@@ -23,6 +23,8 @@ Required properties:
vindcdc1_2-supply: VDCDC1 and VDCDC2 input.
vindcdc3-supply : VDCDC3 input.
vldo1_2-supply : VLDO1 and VLDO2 input.
+- touchscreen: This is child node which specify touchscreen
+ properties.
Regulator Optional properties:
- defdcdc_default: It's property of DCDC2 and DCDC3 regulators.
@@ -30,6 +32,12 @@ Regulator Optional properties:
1: If defdcdc pin of DCDC2/DCDC3 is driven HIGH.
If this property is not defined, it defaults to 0 (not enabled).
+Touchscreen Optional properties:
+- ti,min-pressure : pressure level above which the event is considered as a
+ valid touch.
+This binding was not added as a generic binding because there was no driver
+using such a property.
+
Example:
pmu: tps6507x@48 {
@@ -87,5 +95,7 @@ Example:
regulator-boot-on;
};
};
-
+ touchscreen {
+ ti,min-pressure = <0x30>;
+ };
};
--
1.7.9.5
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 1/3] Input: tps6507x-ts - add support for tps6507x-ts
@ 2016-02-01 6:28 ` Sushaanth Srirangapathi
0 siblings, 0 replies; 26+ messages in thread
From: Sushaanth Srirangapathi @ 2016-02-01 6:28 UTC (permalink / raw)
To: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Russell King, Dmitry Torokhov, Joe Perches,
Javier Martinez Canillas
Cc: devicetree, linux-kernel, linux-arm-kernel, linux-input,
Sushaanth Srirangapathi
add binding information for tps6507x touchscreen input.
Signed-off-by: Sushaanth Srirangapathi <sushaanth.s@ti.com>
---
Documentation/devicetree/bindings/mfd/tps6507x.txt | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/mfd/tps6507x.txt b/Documentation/devicetree/bindings/mfd/tps6507x.txt
index 8fffa3c..74c768b 100644
--- a/Documentation/devicetree/bindings/mfd/tps6507x.txt
+++ b/Documentation/devicetree/bindings/mfd/tps6507x.txt
@@ -23,6 +23,8 @@ Required properties:
vindcdc1_2-supply: VDCDC1 and VDCDC2 input.
vindcdc3-supply : VDCDC3 input.
vldo1_2-supply : VLDO1 and VLDO2 input.
+- touchscreen: This is child node which specify touchscreen
+ properties.
Regulator Optional properties:
- defdcdc_default: It's property of DCDC2 and DCDC3 regulators.
@@ -30,6 +32,12 @@ Regulator Optional properties:
1: If defdcdc pin of DCDC2/DCDC3 is driven HIGH.
If this property is not defined, it defaults to 0 (not enabled).
+Touchscreen Optional properties:
+- ti,min-pressure : pressure level above which the event is considered as a
+ valid touch.
+This binding was not added as a generic binding because there was no driver
+using such a property.
+
Example:
pmu: tps6507x@48 {
@@ -87,5 +95,7 @@ Example:
regulator-boot-on;
};
};
-
+ touchscreen {
+ ti,min-pressure = <0x30>;
+ };
};
--
1.7.9.5
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 1/3] Input: tps6507x-ts - add support for tps6507x-ts
@ 2016-02-01 6:28 ` Sushaanth Srirangapathi
0 siblings, 0 replies; 26+ messages in thread
From: Sushaanth Srirangapathi @ 2016-02-01 6:28 UTC (permalink / raw)
To: linux-arm-kernel
add binding information for tps6507x touchscreen input.
Signed-off-by: Sushaanth Srirangapathi <sushaanth.s@ti.com>
---
Documentation/devicetree/bindings/mfd/tps6507x.txt | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/mfd/tps6507x.txt b/Documentation/devicetree/bindings/mfd/tps6507x.txt
index 8fffa3c..74c768b 100644
--- a/Documentation/devicetree/bindings/mfd/tps6507x.txt
+++ b/Documentation/devicetree/bindings/mfd/tps6507x.txt
@@ -23,6 +23,8 @@ Required properties:
vindcdc1_2-supply: VDCDC1 and VDCDC2 input.
vindcdc3-supply : VDCDC3 input.
vldo1_2-supply : VLDO1 and VLDO2 input.
+- touchscreen: This is child node which specify touchscreen
+ properties.
Regulator Optional properties:
- defdcdc_default: It's property of DCDC2 and DCDC3 regulators.
@@ -30,6 +32,12 @@ Regulator Optional properties:
1: If defdcdc pin of DCDC2/DCDC3 is driven HIGH.
If this property is not defined, it defaults to 0 (not enabled).
+Touchscreen Optional properties:
+- ti,min-pressure : pressure level above which the event is considered as a
+ valid touch.
+This binding was not added as a generic binding because there was no driver
+using such a property.
+
Example:
pmu: tps6507x at 48 {
@@ -87,5 +95,7 @@ Example:
regulator-boot-on;
};
};
-
+ touchscreen {
+ ti,min-pressure = <0x30>;
+ };
};
--
1.7.9.5
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 2/3] Input: tps6507x-ts - Add device tree support
2016-02-01 6:28 ` Sushaanth Srirangapathi
(?)
@ 2016-02-01 6:28 ` Sushaanth Srirangapathi
-1 siblings, 0 replies; 26+ messages in thread
From: Sushaanth Srirangapathi @ 2016-02-01 6:28 UTC (permalink / raw)
To: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Russell King, Dmitry Torokhov, Joe Perches,
Javier Martinez Canillas
Cc: devicetree, linux-kernel, linux-arm-kernel, linux-input,
Sushaanth Srirangapathi
Add device tree support for TPS6507x touchscreen input device.
Signed-off-by: Sushaanth Srirangapathi <sushaanth.s@ti.com>
---
drivers/input/touchscreen/tps6507x-ts.c | 51 ++++++++++++++++++++++++++++---
1 file changed, 47 insertions(+), 4 deletions(-)
diff --git a/drivers/input/touchscreen/tps6507x-ts.c b/drivers/input/touchscreen/tps6507x-ts.c
index a340bfc..4c28369 100644
--- a/drivers/input/touchscreen/tps6507x-ts.c
+++ b/drivers/input/touchscreen/tps6507x-ts.c
@@ -19,6 +19,7 @@
#include <linux/input.h>
#include <linux/input-polldev.h>
#include <linux/platform_device.h>
+#include <linux/of.h>
#include <linux/mfd/tps6507x.h>
#include <linux/input/tps6507x-ts.h>
#include <linux/delay.h>
@@ -32,6 +33,10 @@
TPS6507X_ADCONFIG_INPUT_REAL_TSC)
#define TPS6507X_ADCONFIG_POWER_DOWN_TS (TPS6507X_ADCONFIG_INPUT_REAL_TSC)
+#define TPS6507X_VENDOR 0
+#define TPS6507X_PRODUCT 65070
+#define TPS6507X_VERSION 0x100
+
struct ts_event {
u16 x;
u16 y;
@@ -199,6 +204,44 @@ done:
tps6507x_adc_standby(tsc);
}
+static struct tps6507x_board *tps6507x_ts_parse_dt_reg_data(
+ struct platform_device *pdev) {
+ struct tps6507x_board *tps_board;
+ struct device_node *np = pdev->dev.parent->of_node;
+ struct touchscreen_init_data *reg_data;
+ struct device_node *touchscreen;
+ u32 min_pressure;
+
+ tps_board = devm_kzalloc(&pdev->dev, sizeof(*tps_board),
+ GFP_KERNEL);
+ if (!tps_board)
+ return NULL;
+
+ touchscreen = of_get_child_by_name(np, "touchscreen");
+ if (!touchscreen) {
+ dev_err(&pdev->dev, "touchscreen node not found\n");
+ return NULL;
+ }
+
+ reg_data = devm_kzalloc(&pdev->dev, sizeof(struct touchscreen_init_data),
+ GFP_KERNEL);
+ if (!reg_data)
+ return NULL;
+
+ reg_data->poll_period = TSC_DEFAULT_POLL_PERIOD;
+ reg_data->vendor = TPS6507X_VENDOR;
+ reg_data->product = TPS6507X_PRODUCT;
+ reg_data->version = TPS6507X_VERSION;
+ if (!of_property_read_u32(touchscreen, "ti,min-pressure",
+ &min_pressure))
+ reg_data->min_pressure = min_pressure;
+ else
+ reg_data->min_pressure = TPS_DEFAULT_MIN_PRESSURE;
+ tps_board->tps6507x_ts_init_data = reg_data;
+
+ return tps_board;
+}
+
static int tps6507x_ts_probe(struct platform_device *pdev)
{
struct tps6507x_dev *tps6507x_dev = dev_get_drvdata(pdev->dev.parent);
@@ -214,10 +257,10 @@ static int tps6507x_ts_probe(struct platform_device *pdev)
* coming from the board-evm file.
*/
tps_board = dev_get_platdata(tps6507x_dev->dev);
- if (!tps_board) {
- dev_err(tps6507x_dev->dev,
- "Could not find tps6507x platform data\n");
- return -ENODEV;
+
+ if (IS_ENABLED(CONFIG_OF) && !tps_board &&
+ tps6507x_dev->dev->of_node) {
+ tps_board = tps6507x_ts_parse_dt_reg_data(pdev);
}
/*
--
1.7.9.5
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 2/3] Input: tps6507x-ts - Add device tree support
@ 2016-02-01 6:28 ` Sushaanth Srirangapathi
0 siblings, 0 replies; 26+ messages in thread
From: Sushaanth Srirangapathi @ 2016-02-01 6:28 UTC (permalink / raw)
To: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Russell King, Dmitry Torokhov, Joe Perches,
Javier Martinez Canillas
Cc: devicetree, Sushaanth Srirangapathi, linux-kernel,
linux-arm-kernel, linux-input
Add device tree support for TPS6507x touchscreen input device.
Signed-off-by: Sushaanth Srirangapathi <sushaanth.s@ti.com>
---
drivers/input/touchscreen/tps6507x-ts.c | 51 ++++++++++++++++++++++++++++---
1 file changed, 47 insertions(+), 4 deletions(-)
diff --git a/drivers/input/touchscreen/tps6507x-ts.c b/drivers/input/touchscreen/tps6507x-ts.c
index a340bfc..4c28369 100644
--- a/drivers/input/touchscreen/tps6507x-ts.c
+++ b/drivers/input/touchscreen/tps6507x-ts.c
@@ -19,6 +19,7 @@
#include <linux/input.h>
#include <linux/input-polldev.h>
#include <linux/platform_device.h>
+#include <linux/of.h>
#include <linux/mfd/tps6507x.h>
#include <linux/input/tps6507x-ts.h>
#include <linux/delay.h>
@@ -32,6 +33,10 @@
TPS6507X_ADCONFIG_INPUT_REAL_TSC)
#define TPS6507X_ADCONFIG_POWER_DOWN_TS (TPS6507X_ADCONFIG_INPUT_REAL_TSC)
+#define TPS6507X_VENDOR 0
+#define TPS6507X_PRODUCT 65070
+#define TPS6507X_VERSION 0x100
+
struct ts_event {
u16 x;
u16 y;
@@ -199,6 +204,44 @@ done:
tps6507x_adc_standby(tsc);
}
+static struct tps6507x_board *tps6507x_ts_parse_dt_reg_data(
+ struct platform_device *pdev) {
+ struct tps6507x_board *tps_board;
+ struct device_node *np = pdev->dev.parent->of_node;
+ struct touchscreen_init_data *reg_data;
+ struct device_node *touchscreen;
+ u32 min_pressure;
+
+ tps_board = devm_kzalloc(&pdev->dev, sizeof(*tps_board),
+ GFP_KERNEL);
+ if (!tps_board)
+ return NULL;
+
+ touchscreen = of_get_child_by_name(np, "touchscreen");
+ if (!touchscreen) {
+ dev_err(&pdev->dev, "touchscreen node not found\n");
+ return NULL;
+ }
+
+ reg_data = devm_kzalloc(&pdev->dev, sizeof(struct touchscreen_init_data),
+ GFP_KERNEL);
+ if (!reg_data)
+ return NULL;
+
+ reg_data->poll_period = TSC_DEFAULT_POLL_PERIOD;
+ reg_data->vendor = TPS6507X_VENDOR;
+ reg_data->product = TPS6507X_PRODUCT;
+ reg_data->version = TPS6507X_VERSION;
+ if (!of_property_read_u32(touchscreen, "ti,min-pressure",
+ &min_pressure))
+ reg_data->min_pressure = min_pressure;
+ else
+ reg_data->min_pressure = TPS_DEFAULT_MIN_PRESSURE;
+ tps_board->tps6507x_ts_init_data = reg_data;
+
+ return tps_board;
+}
+
static int tps6507x_ts_probe(struct platform_device *pdev)
{
struct tps6507x_dev *tps6507x_dev = dev_get_drvdata(pdev->dev.parent);
@@ -214,10 +257,10 @@ static int tps6507x_ts_probe(struct platform_device *pdev)
* coming from the board-evm file.
*/
tps_board = dev_get_platdata(tps6507x_dev->dev);
- if (!tps_board) {
- dev_err(tps6507x_dev->dev,
- "Could not find tps6507x platform data\n");
- return -ENODEV;
+
+ if (IS_ENABLED(CONFIG_OF) && !tps_board &&
+ tps6507x_dev->dev->of_node) {
+ tps_board = tps6507x_ts_parse_dt_reg_data(pdev);
}
/*
--
1.7.9.5
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 2/3] Input: tps6507x-ts - Add device tree support
@ 2016-02-01 6:28 ` Sushaanth Srirangapathi
0 siblings, 0 replies; 26+ messages in thread
From: Sushaanth Srirangapathi @ 2016-02-01 6:28 UTC (permalink / raw)
To: linux-arm-kernel
Add device tree support for TPS6507x touchscreen input device.
Signed-off-by: Sushaanth Srirangapathi <sushaanth.s@ti.com>
---
drivers/input/touchscreen/tps6507x-ts.c | 51 ++++++++++++++++++++++++++++---
1 file changed, 47 insertions(+), 4 deletions(-)
diff --git a/drivers/input/touchscreen/tps6507x-ts.c b/drivers/input/touchscreen/tps6507x-ts.c
index a340bfc..4c28369 100644
--- a/drivers/input/touchscreen/tps6507x-ts.c
+++ b/drivers/input/touchscreen/tps6507x-ts.c
@@ -19,6 +19,7 @@
#include <linux/input.h>
#include <linux/input-polldev.h>
#include <linux/platform_device.h>
+#include <linux/of.h>
#include <linux/mfd/tps6507x.h>
#include <linux/input/tps6507x-ts.h>
#include <linux/delay.h>
@@ -32,6 +33,10 @@
TPS6507X_ADCONFIG_INPUT_REAL_TSC)
#define TPS6507X_ADCONFIG_POWER_DOWN_TS (TPS6507X_ADCONFIG_INPUT_REAL_TSC)
+#define TPS6507X_VENDOR 0
+#define TPS6507X_PRODUCT 65070
+#define TPS6507X_VERSION 0x100
+
struct ts_event {
u16 x;
u16 y;
@@ -199,6 +204,44 @@ done:
tps6507x_adc_standby(tsc);
}
+static struct tps6507x_board *tps6507x_ts_parse_dt_reg_data(
+ struct platform_device *pdev) {
+ struct tps6507x_board *tps_board;
+ struct device_node *np = pdev->dev.parent->of_node;
+ struct touchscreen_init_data *reg_data;
+ struct device_node *touchscreen;
+ u32 min_pressure;
+
+ tps_board = devm_kzalloc(&pdev->dev, sizeof(*tps_board),
+ GFP_KERNEL);
+ if (!tps_board)
+ return NULL;
+
+ touchscreen = of_get_child_by_name(np, "touchscreen");
+ if (!touchscreen) {
+ dev_err(&pdev->dev, "touchscreen node not found\n");
+ return NULL;
+ }
+
+ reg_data = devm_kzalloc(&pdev->dev, sizeof(struct touchscreen_init_data),
+ GFP_KERNEL);
+ if (!reg_data)
+ return NULL;
+
+ reg_data->poll_period = TSC_DEFAULT_POLL_PERIOD;
+ reg_data->vendor = TPS6507X_VENDOR;
+ reg_data->product = TPS6507X_PRODUCT;
+ reg_data->version = TPS6507X_VERSION;
+ if (!of_property_read_u32(touchscreen, "ti,min-pressure",
+ &min_pressure))
+ reg_data->min_pressure = min_pressure;
+ else
+ reg_data->min_pressure = TPS_DEFAULT_MIN_PRESSURE;
+ tps_board->tps6507x_ts_init_data = reg_data;
+
+ return tps_board;
+}
+
static int tps6507x_ts_probe(struct platform_device *pdev)
{
struct tps6507x_dev *tps6507x_dev = dev_get_drvdata(pdev->dev.parent);
@@ -214,10 +257,10 @@ static int tps6507x_ts_probe(struct platform_device *pdev)
* coming from the board-evm file.
*/
tps_board = dev_get_platdata(tps6507x_dev->dev);
- if (!tps_board) {
- dev_err(tps6507x_dev->dev,
- "Could not find tps6507x platform data\n");
- return -ENODEV;
+
+ if (IS_ENABLED(CONFIG_OF) && !tps_board &&
+ tps6507x_dev->dev->of_node) {
+ tps_board = tps6507x_ts_parse_dt_reg_data(pdev);
}
/*
--
1.7.9.5
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 3/3] ARM: DTS: da850: add DT node for tps6507x-ts
2016-02-01 6:28 ` Sushaanth Srirangapathi
(?)
@ 2016-02-01 6:28 ` Sushaanth Srirangapathi
-1 siblings, 0 replies; 26+ messages in thread
From: Sushaanth Srirangapathi @ 2016-02-01 6:28 UTC (permalink / raw)
To: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Russell King, Dmitry Torokhov, Joe Perches,
Javier Martinez Canillas
Cc: devicetree, linux-kernel, linux-arm-kernel, linux-input,
Sushaanth Srirangapathi
add tps6507x touchscreen device tree node information to
DA850 EVM
Signed-off-by: Sushaanth Srirangapathi <sushaanth.s@ti.com>
---
arch/arm/boot/dts/da850-evm.dts | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index ef061e9..b4f54fc 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -222,6 +222,9 @@
regulator-boot-on;
};
};
+ touchscreen {
+ ti,min-pressure = <0x30>;
+ };
};
&mcasp0 {
--
1.7.9.5
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 3/3] ARM: DTS: da850: add DT node for tps6507x-ts
@ 2016-02-01 6:28 ` Sushaanth Srirangapathi
0 siblings, 0 replies; 26+ messages in thread
From: Sushaanth Srirangapathi @ 2016-02-01 6:28 UTC (permalink / raw)
To: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Russell King, Dmitry Torokhov, Joe Perches,
Javier Martinez Canillas
Cc: devicetree, Sushaanth Srirangapathi, linux-kernel,
linux-arm-kernel, linux-input
add tps6507x touchscreen device tree node information to
DA850 EVM
Signed-off-by: Sushaanth Srirangapathi <sushaanth.s@ti.com>
---
arch/arm/boot/dts/da850-evm.dts | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index ef061e9..b4f54fc 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -222,6 +222,9 @@
regulator-boot-on;
};
};
+ touchscreen {
+ ti,min-pressure = <0x30>;
+ };
};
&mcasp0 {
--
1.7.9.5
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 3/3] ARM: DTS: da850: add DT node for tps6507x-ts
@ 2016-02-01 6:28 ` Sushaanth Srirangapathi
0 siblings, 0 replies; 26+ messages in thread
From: Sushaanth Srirangapathi @ 2016-02-01 6:28 UTC (permalink / raw)
To: linux-arm-kernel
add tps6507x touchscreen device tree node information to
DA850 EVM
Signed-off-by: Sushaanth Srirangapathi <sushaanth.s@ti.com>
---
arch/arm/boot/dts/da850-evm.dts | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index ef061e9..b4f54fc 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -222,6 +222,9 @@
regulator-boot-on;
};
};
+ touchscreen {
+ ti,min-pressure = <0x30>;
+ };
};
&mcasp0 {
--
1.7.9.5
^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH 1/3] Input: tps6507x-ts - add support for tps6507x-ts
2016-02-01 6:28 ` Sushaanth Srirangapathi
(?)
@ 2016-02-01 6:42 ` Sushaanth Srirangapathi
-1 siblings, 0 replies; 26+ messages in thread
From: Sushaanth Srirangapathi @ 2016-02-01 6:42 UTC (permalink / raw)
To: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Russell King, Dmitry Torokhov, Joe Perches,
Javier Martinez Canillas
Cc: devicetree, linux-kernel, linux-arm-kernel, linux-input
On Monday 01 February 2016 11:58 AM, Sushaanth Srirangapathi wrote:
> add binding information for tps6507x touchscreen input.
>
> Signed-off-by: Sushaanth Srirangapathi <sushaanth.s@ti.com>
Please ignore this patch. It was an older version which was sent by
mistake.
Thanks,
Sushaanth
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 1/3] Input: tps6507x-ts - add support for tps6507x-ts
@ 2016-02-01 6:42 ` Sushaanth Srirangapathi
0 siblings, 0 replies; 26+ messages in thread
From: Sushaanth Srirangapathi @ 2016-02-01 6:42 UTC (permalink / raw)
To: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Russell King, Dmitry Torokhov, Joe Perches,
Javier Martinez Canillas
Cc: devicetree, linux-kernel, linux-arm-kernel, linux-input
On Monday 01 February 2016 11:58 AM, Sushaanth Srirangapathi wrote:
> add binding information for tps6507x touchscreen input.
>
> Signed-off-by: Sushaanth Srirangapathi <sushaanth.s@ti.com>
Please ignore this patch. It was an older version which was sent by
mistake.
Thanks,
Sushaanth
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 1/3] Input: tps6507x-ts - add support for tps6507x-ts
@ 2016-02-01 6:42 ` Sushaanth Srirangapathi
0 siblings, 0 replies; 26+ messages in thread
From: Sushaanth Srirangapathi @ 2016-02-01 6:42 UTC (permalink / raw)
To: linux-arm-kernel
On Monday 01 February 2016 11:58 AM, Sushaanth Srirangapathi wrote:
> add binding information for tps6507x touchscreen input.
>
> Signed-off-by: Sushaanth Srirangapathi <sushaanth.s@ti.com>
Please ignore this patch. It was an older version which was sent by
mistake.
Thanks,
Sushaanth
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 1/3] Input: tps6507x-ts - add binding for tps6507x-ts
2016-02-01 6:28 ` Sushaanth Srirangapathi
@ 2016-02-01 14:39 ` Rob Herring
-1 siblings, 0 replies; 26+ messages in thread
From: Rob Herring @ 2016-02-01 14:39 UTC (permalink / raw)
To: Sushaanth Srirangapathi
Cc: Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala, Russell King,
Dmitry Torokhov, Joe Perches, Javier Martinez Canillas,
devicetree, linux-kernel, linux-arm-kernel, linux-input
On Mon, Feb 01, 2016 at 11:58:47AM +0530, Sushaanth Srirangapathi wrote:
> add binding information for tps6507x touchscreen input.
>
> "ti,min-pressure" was added as TI specific binding because it
> was specific to tps6507x IP and not applicable or relevant for
> other touchscreen drivers.
>
> Signed-off-by: Sushaanth Srirangapathi <sushaanth.s@ti.com>
> ---
> Documentation/devicetree/bindings/mfd/tps6507x.txt | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
Seems like you would need other properties from the common touchscreen
binding.
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 1/3] Input: tps6507x-ts - add binding for tps6507x-ts
@ 2016-02-01 14:39 ` Rob Herring
0 siblings, 0 replies; 26+ messages in thread
From: Rob Herring @ 2016-02-01 14:39 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Feb 01, 2016 at 11:58:47AM +0530, Sushaanth Srirangapathi wrote:
> add binding information for tps6507x touchscreen input.
>
> "ti,min-pressure" was added as TI specific binding because it
> was specific to tps6507x IP and not applicable or relevant for
> other touchscreen drivers.
>
> Signed-off-by: Sushaanth Srirangapathi <sushaanth.s@ti.com>
> ---
> Documentation/devicetree/bindings/mfd/tps6507x.txt | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
Seems like you would need other properties from the common touchscreen
binding.
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 3/3] ARM: DTS: da850: add DT node for tps6507x-ts
2016-02-01 6:28 ` Sushaanth Srirangapathi
(?)
@ 2016-02-17 13:26 ` Sekhar Nori
-1 siblings, 0 replies; 26+ messages in thread
From: Sekhar Nori @ 2016-02-17 13:26 UTC (permalink / raw)
To: Sushaanth Srirangapathi, Rob Herring, Pawel Moll, Mark Rutland,
Ian Campbell, Kumar Gala, Russell King, Dmitry Torokhov,
Joe Perches, Javier Martinez Canillas
Cc: devicetree, linux-kernel, linux-arm-kernel, linux-input
On Monday 01 February 2016 11:58 AM, Sushaanth Srirangapathi wrote:
> add tps6507x touchscreen device tree node information to
> DA850 EVM
>
> Signed-off-by: Sushaanth Srirangapathi <sushaanth.s@ti.com>
Acked-by: Sekhar Nori <nsekhar@ti.com>
I can queue 3/3 once driver changes are accepted (let me know about that
because I am not copied on this series).
If Dmitry wants to queue the whole series once he has had a look, thats
fine too. I have nothing that will clash with this.
Regards,
Sekhar
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 3/3] ARM: DTS: da850: add DT node for tps6507x-ts
@ 2016-02-17 13:26 ` Sekhar Nori
0 siblings, 0 replies; 26+ messages in thread
From: Sekhar Nori @ 2016-02-17 13:26 UTC (permalink / raw)
To: Sushaanth Srirangapathi, Rob Herring, Pawel Moll, Mark Rutland,
Ian Campbell, Kumar Gala, Russell King, Dmitry Torokhov,
Joe Perches, Javier Martinez Canillas
Cc: devicetree, linux-kernel, linux-arm-kernel, linux-input
On Monday 01 February 2016 11:58 AM, Sushaanth Srirangapathi wrote:
> add tps6507x touchscreen device tree node information to
> DA850 EVM
>
> Signed-off-by: Sushaanth Srirangapathi <sushaanth.s@ti.com>
Acked-by: Sekhar Nori <nsekhar@ti.com>
I can queue 3/3 once driver changes are accepted (let me know about that
because I am not copied on this series).
If Dmitry wants to queue the whole series once he has had a look, thats
fine too. I have nothing that will clash with this.
Regards,
Sekhar
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 3/3] ARM: DTS: da850: add DT node for tps6507x-ts
@ 2016-02-17 13:26 ` Sekhar Nori
0 siblings, 0 replies; 26+ messages in thread
From: Sekhar Nori @ 2016-02-17 13:26 UTC (permalink / raw)
To: linux-arm-kernel
On Monday 01 February 2016 11:58 AM, Sushaanth Srirangapathi wrote:
> add tps6507x touchscreen device tree node information to
> DA850 EVM
>
> Signed-off-by: Sushaanth Srirangapathi <sushaanth.s@ti.com>
Acked-by: Sekhar Nori <nsekhar@ti.com>
I can queue 3/3 once driver changes are accepted (let me know about that
because I am not copied on this series).
If Dmitry wants to queue the whole series once he has had a look, thats
fine too. I have nothing that will clash with this.
Regards,
Sekhar
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 3/3] ARM: DTS: da850: add DT node for tps6507x-ts
2016-02-17 13:26 ` Sekhar Nori
(?)
@ 2016-04-07 9:36 ` Sekhar Nori
-1 siblings, 0 replies; 26+ messages in thread
From: Sekhar Nori @ 2016-04-07 9:36 UTC (permalink / raw)
To: Sushaanth Srirangapathi, Rob Herring, Pawel Moll, Mark Rutland,
Ian Campbell, Kumar Gala, Russell King, Dmitry Torokhov,
Joe Perches, Javier Martinez Canillas
Cc: devicetree, linux-kernel, linux-arm-kernel, linux-input
On Wednesday 17 February 2016 06:56 PM, Sekhar Nori wrote:
> On Monday 01 February 2016 11:58 AM, Sushaanth Srirangapathi wrote:
>> add tps6507x touchscreen device tree node information to
>> DA850 EVM
>>
>> Signed-off-by: Sushaanth Srirangapathi <sushaanth.s@ti.com>
>
> Acked-by: Sekhar Nori <nsekhar@ti.com>
>
> I can queue 3/3 once driver changes are accepted (let me know about that
> because I am not copied on this series).
This missed v4.6 merge window. So it should probably be resent for v4.7
after rebasing to v4.6-rc1
Thanks,
Sekhar
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 3/3] ARM: DTS: da850: add DT node for tps6507x-ts
@ 2016-04-07 9:36 ` Sekhar Nori
0 siblings, 0 replies; 26+ messages in thread
From: Sekhar Nori @ 2016-04-07 9:36 UTC (permalink / raw)
To: Sushaanth Srirangapathi, Rob Herring, Pawel Moll, Mark Rutland,
Ian Campbell, Kumar Gala, Russell King, Dmitry Torokhov,
Joe Perches, Javier Martinez Canillas
Cc: devicetree, linux-kernel, linux-arm-kernel, linux-input
On Wednesday 17 February 2016 06:56 PM, Sekhar Nori wrote:
> On Monday 01 February 2016 11:58 AM, Sushaanth Srirangapathi wrote:
>> add tps6507x touchscreen device tree node information to
>> DA850 EVM
>>
>> Signed-off-by: Sushaanth Srirangapathi <sushaanth.s@ti.com>
>
> Acked-by: Sekhar Nori <nsekhar@ti.com>
>
> I can queue 3/3 once driver changes are accepted (let me know about that
> because I am not copied on this series).
This missed v4.6 merge window. So it should probably be resent for v4.7
after rebasing to v4.6-rc1
Thanks,
Sekhar
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 3/3] ARM: DTS: da850: add DT node for tps6507x-ts
@ 2016-04-07 9:36 ` Sekhar Nori
0 siblings, 0 replies; 26+ messages in thread
From: Sekhar Nori @ 2016-04-07 9:36 UTC (permalink / raw)
To: linux-arm-kernel
On Wednesday 17 February 2016 06:56 PM, Sekhar Nori wrote:
> On Monday 01 February 2016 11:58 AM, Sushaanth Srirangapathi wrote:
>> add tps6507x touchscreen device tree node information to
>> DA850 EVM
>>
>> Signed-off-by: Sushaanth Srirangapathi <sushaanth.s@ti.com>
>
> Acked-by: Sekhar Nori <nsekhar@ti.com>
>
> I can queue 3/3 once driver changes are accepted (let me know about that
> because I am not copied on this series).
This missed v4.6 merge window. So it should probably be resent for v4.7
after rebasing to v4.6-rc1
Thanks,
Sekhar
^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~2016-04-07 9:38 UTC | newest]
Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-01 6:28 [PATCH 0/3] Add Device Tree support for tps6507x-ts Sushaanth Srirangapathi
2016-02-01 6:28 ` Sushaanth Srirangapathi
2016-02-01 6:28 ` Sushaanth Srirangapathi
2016-02-01 6:28 ` [PATCH 1/3] Input: tps6507x-ts - add binding " Sushaanth Srirangapathi
2016-02-01 6:28 ` Sushaanth Srirangapathi
2016-02-01 6:28 ` Sushaanth Srirangapathi
2016-02-01 14:39 ` Rob Herring
2016-02-01 14:39 ` Rob Herring
2016-02-01 6:28 ` [PATCH 1/3] Input: tps6507x-ts - add support " Sushaanth Srirangapathi
2016-02-01 6:28 ` Sushaanth Srirangapathi
2016-02-01 6:28 ` Sushaanth Srirangapathi
2016-02-01 6:42 ` Sushaanth Srirangapathi
2016-02-01 6:42 ` Sushaanth Srirangapathi
2016-02-01 6:42 ` Sushaanth Srirangapathi
2016-02-01 6:28 ` [PATCH 2/3] Input: tps6507x-ts - Add device tree support Sushaanth Srirangapathi
2016-02-01 6:28 ` Sushaanth Srirangapathi
2016-02-01 6:28 ` Sushaanth Srirangapathi
2016-02-01 6:28 ` [PATCH 3/3] ARM: DTS: da850: add DT node for tps6507x-ts Sushaanth Srirangapathi
2016-02-01 6:28 ` Sushaanth Srirangapathi
2016-02-01 6:28 ` Sushaanth Srirangapathi
2016-02-17 13:26 ` Sekhar Nori
2016-02-17 13:26 ` Sekhar Nori
2016-02-17 13:26 ` Sekhar Nori
2016-04-07 9:36 ` Sekhar Nori
2016-04-07 9:36 ` Sekhar Nori
2016-04-07 9:36 ` Sekhar Nori
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.