Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964945AbcKKDav (ORCPT ); Thu, 10 Nov 2016 22:30:51 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:34059 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965755AbcKKDat (ORCPT ); Thu, 10 Nov 2016 22:30:49 -0500 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: Re: [PATCH] drivers: mfd: ti_am335x_tscadc: increase ADC ref clock to 24MHz From: John Syne In-Reply-To: Date: Thu, 10 Nov 2016 19:30:45 -0800 Cc: Lee Jones , "N, Mugunthan V" , "linux-iio@vger.kernel.org" , Tony Lindgren , Jonathan Cameron , "linux-omap@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "Nori, Sekhar" , "Ujfalusi, Peter" Message-Id: <30CF3CC1-A4F1-4C31-B51F-A1AB1D352AF5@gmail.com> References: <20161024060226.4170-1-mugunthanvnm@ti.com> <038C6B01-8443-4321-9C65-BAC4095237D3@gmail.com> <086ab2fa-63ee-c5ab-2715-b2efd78270d7@ti.com> <12725C92-9BB8-4F77-A7B4-F3C3DA9F8B0B@gmail.com> <20161025063847.GD8574@dell> <20161026084811.GI8574@dell> To: Vignesh R X-Mailer: Apple Mail (2.3251) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id uAB3UuNq027922 Content-Length: 2451 Lines: 65 > On Nov 9, 2016, at 9:07 PM, Vignesh R wrote: > > Hi, > > On Thursday 10 November 2016 05:23 AM, John Syne wrote: >> OK, then back to my original question. Given that these DT properties are supported in the driver >> > > Below properties are supported by only by ti_am3335x_adc driver and not > ti_am335x_tsc driver. As author of this patch pointed out in another > reply, there is no need to change step-opendelay for tsc. AFAIK, I don't > see a use case where these values needs to be tweaked for tsc channels, > therefore it does not make sense to be DT properties. Yeah, the confusion was mine because the author of this patch series was proposing to hard code these settings while DT properties already existed in the ti_am335x_adc driver. I use the ADC for sensor measurement and do not use the touchscreen features. I already pointed out where these DT parameters should be added by referencing how this was done in one of the BBB DT overlay files [1]. I am just proposing the same is done as a default in the AM33xx.dtsi and AM4372.dtsi files. Here is what I was proposing. Granted, the adc-channels should be restricted to the subset of channels not used by tsc, but you get the idea. tscadc: tscadc@44e0d000 { compatible = "ti,am3359-tscadc"; reg = <0x44e0d000 0x1000>; interrupt-parent = <&intc>; interrupts = <16>; ti,hwmods = "adc_tsc"; status = "disabled"; dmas = <&edma 53 0>, <&edma 57 0>; dma-names = "fifo0", "fifo1”; tsc { compatible = "ti,am3359-tsc"; }; am335x_adc: adc { #io-channel-cells = <1>; ti,adc-channels = <0 1 2 3 4 5 6>; ti,chan-step-avg = <0x16 0x16 0x16 0x16 0x16 0x16 0x16>; ti,chan-step-opendelay = <0x98 0x98 0x98 0x98 0x98 0x98 0x98>; ti,chan-step-sampledelay = <0x0 0x0 0x0 0x0 0x0 0x0 0x0>; compatible = "ti,am3359-adc"; }; }; [1]https://github.com/RobertCNelson/bb.org-overlays/blob/master/src/arm/BB-ADC-00A0.dts Regards, John > >> shouldn’t the following be added to am33xx.dtsi and am4372.dtsi? > > Its totally upto board dts files to allocate channels for tsc and adc. > So, how could these be added to dtsi files? > >> ti,chan-step-avg = <0x16 0x16 0x16 0x16 0x16 0x16 0x16>; >> ti,chan-step-opendelay = <0x500 0x500 0x500 0x500 0x500 0x500 0x500>; >> ti,chan-step-sampledelay = <0x0 0x0 0x0 0x0 0x0 0x0 0x0>; >> >> Regards, >> John >>> >>> -- >>> Regards >>> Vignesh >> > > -- > Regards > Vignesh