lkml.org 
[lkml]   [2020]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/3] iio: adc: Convert the QCOM SPMI ADC bindings to .yaml format
From
Date
Hi Jonathan,

On 3/28/2020 10:21 PM, Jonathan Cameron wrote:
> On Tue, 24 Mar 2020 21:14:08 +0530
> Jishnu Prakash <jprakash@codeaurora.org> wrote:
>
>> Convert the adc bindings from .txt to .yaml format.
>>
>> Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
> 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.

\
 
 \ /
  Last update: 2020-04-06 13:42    [W:0.089 / U:1.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site