From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79AD9C2BA1E for ; Mon, 6 Apr 2020 11:42:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 50C802076C for ; Mon, 6 Apr 2020 11:42:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.b="nQh+pg6B" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727441AbgDFLma (ORCPT ); Mon, 6 Apr 2020 07:42:30 -0400 Received: from mail27.static.mailgun.info ([104.130.122.27]:21295 "EHLO mail27.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727409AbgDFLm1 (ORCPT ); Mon, 6 Apr 2020 07:42:27 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1586173347; h=Content-Transfer-Encoding: Content-Type: In-Reply-To: MIME-Version: Date: Message-ID: From: References: Cc: To: Subject: Sender; bh=uLA+aP168I0ocVcL3/x2EZUaB7OeJIyHoWNUAc8lggA=; b=nQh+pg6BFscBUiK9sp+IS4Bc5xADYGr26Tv/ZAxoggFdo6YXQr5xmOnLVIClpf+gun+L0NbP leBiDB9YOTC4DoNSKAKHa1xqqfflCXdr+GfrGbpGSr+gXmRcUWtZzHVjPH1fnzloU3CtjCFe 6PbUiCZCINQYmmPBZxx0iP+Rts0= X-Mailgun-Sending-Ip: 104.130.122.27 X-Mailgun-Sid: WyI1MzIzYiIsICJsaW51eC1hcm0tbXNtQHZnZXIua2VybmVsLm9yZyIsICJiZTllNGEiXQ== Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by mxa.mailgun.org with ESMTP id 5e8b15a2.7f40aa4c8260-smtp-out-n04; Mon, 06 Apr 2020 11:42:26 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 2728CC4478F; Mon, 6 Apr 2020 11:42:25 +0000 (UTC) Received: from [192.168.1.100] (unknown [157.44.182.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jprakash) by smtp.codeaurora.org (Postfix) with ESMTPSA id 01F4BC433D2; Mon, 6 Apr 2020 11:42:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 01F4BC433D2 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=jprakash@codeaurora.org Subject: Re: [PATCH 1/3] iio: adc: Convert the QCOM SPMI ADC bindings to .yaml format To: Jonathan Cameron Cc: agross@kernel.org, bjorn.andersson@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, mka@chromium.org, linus.walleij@linaro.org, sboyd@codeaurora.org, Jonathan.Cameron@huawei.com, smohanad@codeaurora.org, kgunda@codeaurora.org, aghayal@codeaurora.org, Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Rob Herring , Mark Rutland , Amit Kucheria , Andy Gross , linux-iio@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-msm-owner@vger.kernel.org References: <1585064650-16235-1-git-send-email-jprakash@codeaurora.org> <1585064650-16235-2-git-send-email-jprakash@codeaurora.org> <20200328165113.6fdeedd3@archlinux> From: Jishnu Prakash Message-ID: Date: Mon, 6 Apr 2020 17:11:56 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20200328165113.6fdeedd3@archlinux> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Hi Jonathan, On 3/28/2020 10:21 PM, Jonathan Cameron wrote: > On Tue, 24 Mar 2020 21:14:08 +0530 > Jishnu Prakash wrote: > >> Convert the adc bindings from .txt to .yaml format. >> >> Signed-off-by: Jishnu Prakash > Hi Jishnu, > > Looks to me like we can tighten the checks a fair bit in here rather > than just using uint32s > > Now, my yaml isn't great so I won't try to say how, but there are plenty > of examples in tree. > > Thanks, > > Jonathan > > + > + qcom,decimation: > + description: | > + This parameter is used to decrease ADC sampling rate. > + Quicker measurements can be made by reducing decimation ratio. > + - For compatible property "qcom,spmi-vadc", valid values are > + 512, 1024, 2048, 4096. If property is not found, default value > + of 512 will be used. > + - For compatible property "qcom,spmi-adc5", valid values are 250, 420 > + and 840. If property is not found, default value of 840 is used. > + - For compatible property "qcom,spmi-adc-rev2", valid values are 256, > + 512 and 1024. If property is not present, default value is 1024. > + allOf: > + - $ref: /schemas/types.yaml#/definitions/uint32 > Should ideally verify all the values against models etc rather than a uint32 binding. I'll add constraints for all properties for which it's applicable in the next post. > >> + >> + qcom,pre-scaling: >> + description: | >> + Used for scaling the channel input signal before the signal is >> + fed to VADC. The configuration for this node is to know the >> + pre-determined ratio and use it for post scaling. Select one from >> + the following options. >> + <1 1>, <1 3>, <1 4>, <1 6>, <1 20>, <1 8>, <10 81>, <1 10> > >> + >> +examples: >> + - | >> + /* VADC node */ >> + pmic_vadc: vadc@3100 { > Should really be using generic names, so adc@3100 preferred. I'll change it in the next post.