mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-09-06 13:09:58 +00:00
dt-bindings: iio: adc: qcom,spmi-vadc: extend example
Cleanup existing example (generic node name for spmi, use 4-space indentation) and add example for ADCv7 copied from Documentation/devicetree/bindings/thermal/qcom-spmi-adc-tm5.yaml. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20221027143411.277980-2-krzysztof.kozlowski@linaro.org
This commit is contained in:
parent
0953777640
commit
74e903461b
@ -238,42 +238,72 @@ additionalProperties: false
|
|||||||
|
|
||||||
examples:
|
examples:
|
||||||
- |
|
- |
|
||||||
spmi_bus {
|
spmi {
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <0>;
|
|
||||||
/* VADC node */
|
|
||||||
pmic_vadc: adc@3100 {
|
|
||||||
compatible = "qcom,spmi-vadc";
|
|
||||||
reg = <0x3100>;
|
|
||||||
interrupts = <0x0 0x31 0x0 0x1>;
|
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
#io-channel-cells = <1>;
|
/* VADC node */
|
||||||
|
pmic_vadc: adc@3100 {
|
||||||
|
compatible = "qcom,spmi-vadc";
|
||||||
|
reg = <0x3100>;
|
||||||
|
interrupts = <0x0 0x31 0x0 0x1>;
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
#io-channel-cells = <1>;
|
||||||
|
|
||||||
/* Channel node */
|
/* Channel node */
|
||||||
adc-chan@39 {
|
adc-chan@39 {
|
||||||
reg = <0x39>;
|
reg = <0x39>;
|
||||||
qcom,decimation = <512>;
|
qcom,decimation = <512>;
|
||||||
qcom,ratiometric;
|
qcom,ratiometric;
|
||||||
qcom,hw-settle-time = <200>;
|
qcom,hw-settle-time = <200>;
|
||||||
qcom,avg-samples = <1>;
|
qcom,avg-samples = <1>;
|
||||||
qcom,pre-scaling = <1 3>;
|
qcom,pre-scaling = <1 3>;
|
||||||
};
|
};
|
||||||
|
|
||||||
adc-chan@9 {
|
adc-chan@9 {
|
||||||
reg = <0x9>;
|
reg = <0x9>;
|
||||||
};
|
};
|
||||||
|
|
||||||
adc-chan@a {
|
adc-chan@a {
|
||||||
reg = <0xa>;
|
reg = <0xa>;
|
||||||
};
|
};
|
||||||
|
|
||||||
adc-chan@e {
|
adc-chan@e {
|
||||||
reg = <0xe>;
|
reg = <0xe>;
|
||||||
};
|
};
|
||||||
|
|
||||||
adc-chan@f {
|
adc-chan@f {
|
||||||
reg = <0xf>;
|
reg = <0xf>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
- |
|
||||||
|
#include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
|
||||||
|
#include <dt-bindings/iio/qcom,spmi-adc7-pm8350.h>
|
||||||
|
#include <dt-bindings/interrupt-controller/irq.h>
|
||||||
|
|
||||||
|
spmi {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
adc@3100 {
|
||||||
|
reg = <0x3100>;
|
||||||
|
compatible = "qcom,spmi-adc7";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
#io-channel-cells = <1>;
|
||||||
|
|
||||||
|
/* Other properties are omitted */
|
||||||
|
xo-therm@44 {
|
||||||
|
reg = <PMK8350_ADC7_AMUX_THM1_100K_PU>;
|
||||||
|
qcom,ratiometric;
|
||||||
|
qcom,hw-settle-time = <200>;
|
||||||
|
};
|
||||||
|
|
||||||
|
conn-therm@47 {
|
||||||
|
reg = <PM8350_ADC7_AMUX_THM4_100K_PU>;
|
||||||
|
qcom,ratiometric;
|
||||||
|
qcom,hw-settle-time = <200>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user