Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755758AbcKJSSI (ORCPT ); Thu, 10 Nov 2016 13:18:08 -0500 Received: from fllnx209.ext.ti.com ([198.47.19.16]:48018 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754703AbcKJSSG (ORCPT ); Thu, 10 Nov 2016 13:18:06 -0500 From: Mugunthan V N To: CC: Dmitry Torokhov , Jonathan Cameron , Rob Herring , Mark Rutland , Lee Jones , Sekhar Nori , Vignesh R , , , , Mugunthan V N Subject: [PATCH v2 1/3] dt/binding: ti-tsc-adc: deprecate ti,charge-delay and add binding doc for ti,charge-delay-ns Date: Thu, 10 Nov 2016 22:05:13 +0530 Message-ID: <20161110163515.27598-2-mugunthanvnm@ti.com> X-Mailer: git-send-email 2.11.0.rc0.7.gbe5a750 In-Reply-To: <20161110163515.27598-1-mugunthanvnm@ti.com> References: <20161110163515.27598-1-mugunthanvnm@ti.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2980 Lines: 60 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 --- .../bindings/input/touchscreen/ti-tsc-adc.txt | 32 ++++++++++++++-------- 1 file changed, 21 insertions(+), 11 deletions(-) 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 -- 2.11.0.rc0.7.gbe5a750