Re: [PATCH 1/3] iio: adc: Convert the QCOM SPMI ADC bindings to .yaml format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jonathan,

On 3/28/2020 10:21 PM, Jonathan Cameron wrote:
On Tue, 24 Mar 2020 21:14:08 +0530
Jishnu Prakash <jprakash@xxxxxxxxxxxxxx> wrote:

Convert the adc bindings from .txt to .yaml format.

Signed-off-by: Jishnu Prakash <jprakash@xxxxxxxxxxxxxx>
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.



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux