From patchwork Mon Dec 22 12:14:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 423380 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3F9071400E7 for ; Mon, 22 Dec 2014 23:15:38 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754596AbaLVMPh (ORCPT ); Mon, 22 Dec 2014 07:15:37 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:50218 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754401AbaLVMPh (ORCPT ); Mon, 22 Dec 2014 07:15:37 -0500 Received: from localhost.localdomain ([178.25.105.80]) by mrelayeu.kundenserver.de (mreue001) with ESMTPSA (Nemesis) id 0M2U69-1Xn10g0W17-00sN8K; Mon, 22 Dec 2014 13:15:15 +0100 From: Stefan Wahren To: jic23@kernel.org Cc: festevam@gmail.com, kristina.martsenko@gmail.com, knaack.h@gmx.de, marex@denx.de, kernel@pengutronix.de, pawel.moll@arm.com, ijc+devicetree@hellion.org.uk, robh+dt@kernel.org, galak@codeaurora.org, mark.rutland@arm.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, Stefan Wahren Subject: [PATCH 1/2] DT: mxs-lradc: fix ranges of ts properties Date: Mon, 22 Dec 2014 12:14:35 +0000 Message-Id: <1419250476-2393-2-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1419250476-2393-1-git-send-email-stefan.wahren@i2se.com> References: <1419250476-2393-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K0:svdHagdVuvoPjx27w9fMPXt5OJmlABQyTfHi32yP6J8y7bn6W9h pHaliDHyFlYhBxgnc0XEIRznsgKLpDF6rm7qQ6ED6iGGwEbki5eKXZWvuz+LW8567HDI9B3 /19jYjqcRGR1gae0LwzRjPXU220MWJ9CmUb7hFTsJYHqAM68wnAp4doJkVpSyHEIWx4tPYb kx+SqnAqXcp0HvK1YZnfw== X-UI-Out-Filterresults: notjunk:1; Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This patch fixes off-by-one issues in the devicetree binding of mxs-lradc. According to the i.MX23 and i.MX28 reference manuals [1][2] the range of NUM_SAMPLES is 0..31, but property ave-ctrl is substracted by 1 before used. Considering all limitations the range of DELAY is 1..2047, but also property ave-delay is substracted by 1 before used. The patch has been suggested by Hartmut Knaack and Kristina Martsenko. [1] - http://cache.freescale.com/files/dsp/doc/ref_manual/IMX23RM.pdf [2] - http://cache.freescale.com/files/dsp/doc/ref_manual/MCIMX28RM.pdf Signed-off-by: Stefan Wahren --- .../bindings/staging/iio/adc/mxs-lradc.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/staging/iio/adc/mxs-lradc.txt b/Documentation/devicetree/bindings/staging/iio/adc/mxs-lradc.txt index ee05dc3..3075377 100644 --- a/Documentation/devicetree/bindings/staging/iio/adc/mxs-lradc.txt +++ b/Documentation/devicetree/bindings/staging/iio/adc/mxs-lradc.txt @@ -12,9 +12,9 @@ Optional properties: property is not present, then the touchscreen is disabled. 5 wires is valid for i.MX28 SoC only. - fsl,ave-ctrl: number of samples per direction to calculate an average value. - Allowed value is 1 ... 31, default is 4 + Allowed value is 1 ... 32, default is 4 - fsl,ave-delay: delay between consecutive samples. Allowed value is - 1 ... 2047. It is used if 'fsl,ave-ctrl' > 1, counts at + 2 ... 2048. It is used if 'fsl,ave-ctrl' > 1, counts at 2 kHz and its default is 2 (= 1 ms) - fsl,settling: delay between plate switch to next sample. Allowed value is 1 ... 2047. It counts at 2 kHz and its default is