diff mbox

[v2,1/3] dt/binding: ti-tsc-adc: deprecate ti,charge-delay and add binding doc for ti,charge-delay-ns

Message ID 20161110163515.27598-2-mugunthanvnm@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mugunthan V N Nov. 10, 2016, 4:35 p.m. UTC
ti,charge-delay represents the duration that ADC should wait
before sampling the ADC line to detect the touch location and pen
up/downs. Currently the ADC clock is set at 3MHz. The device-tree
entry for ti,charge-delay is based on assumption of ADC clock at
3MHz, but it can be operated up to 24MHz clock. Representing the
charge delay of touchscreen in terms of ADC clocks is incorrect.
So change this representation to ti,charge-delay-ns, which driver
can convert it to number clock cycles based on ref clock
frequency.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
 .../bindings/input/touchscreen/ti-tsc-adc.txt      | 32 ++++++++++++++--------
 1 file changed, 21 insertions(+), 11 deletions(-)

Comments

Rob Herring (Arm) Nov. 15, 2016, 1:54 a.m. UTC | #1
On Thu, Nov 10, 2016 at 10:05:13PM +0530, Mugunthan V N wrote:
> ti,charge-delay represents the duration that ADC should wait
> before sampling the ADC line to detect the touch location and pen
> up/downs. Currently the ADC clock is set at 3MHz. The device-tree
> entry for ti,charge-delay is based on assumption of ADC clock at
> 3MHz, but it can be operated up to 24MHz clock. Representing the
> charge delay of touchscreen in terms of ADC clocks is incorrect.
> So change this representation to ti,charge-delay-ns, which driver
> can convert it to number clock cycles based on ref clock
> frequency.
> 
> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
> ---
>  .../bindings/input/touchscreen/ti-tsc-adc.txt      | 32 ++++++++++++++--------
>  1 file changed, 21 insertions(+), 11 deletions(-)

Acked-by: Rob Herring <robh@kernel.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/input/touchscreen/ti-tsc-adc.txt b/Documentation/devicetree/bindings/input/touchscreen/ti-tsc-adc.txt
index b1163bf97146..83570776c804 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/ti-tsc-adc.txt
+++ b/Documentation/devicetree/bindings/input/touchscreen/ti-tsc-adc.txt
@@ -30,17 +30,27 @@  Required properties:
 
 Optional properties:
 - child "tsc"
-	ti,charge-delay: Length of touch screen charge delay step in terms of
-			 ADC clock cycles. Charge delay value should be large
-			 in order to avoid false pen-up events. This value
-			 effects the overall sampling speed, hence need to be
-			 kept as low as possible, while avoiding false pen-up
-			 event. Start from a lower value, say 0x400, and
-			 increase value until false pen-up events are avoided.
-			 The pen-up detection happens immediately after the
-			 charge step, so this does in fact function as a
-			 hardware knob for adjusting the amount of "settling
-			 time".
+	ti,charge-delay-ns: Length of touch screen charge delay step in terms of
+			    nano Seconds. Charge delay value should be large
+			    in order to avoid false pen-up events. This value
+			    effects the overall sampling speed, hence need to be
+			    kept as low as possible, while avoiding false pen-up
+			    event. Start from a lower value, say 41000nS, and
+			    increase value until false pen-up events are avoided.
+			    The pen-up detection happens immediately after the
+			    charge step, so this does in fact function as a
+			    hardware knob for adjusting the amount of "settling
+			    time".
+	ti,charge-delay: Deprecated as representing charge delay should be
+			 represented in time as the ADC clock may be different.
+			 Currently this value is calculated based on 3MHz ADC
+			 ref clock, but ADC clock can operate upto 24MHz clock.
+			 ADC clock will be changed to 24MHz to increase the
+			 number of ADC samples. So to keep the backward
+			 compatibility, driver will consider this value is
+			 calculated for 3MHz clock so the value will be
+			 multiplied by 8 to compensate the change in reference
+			 clock.
 
 - child "adc"
 	ti,chan-step-opendelay: List of open delays for each channel of