@@ -293,7 +293,7 @@ examples:
/* Other properties are omitted */
xo-therm@44 {
- reg = <PMK8350_ADC7_AMUX_THM1_100K_PU>;
+ reg = <PMK8350_ADC7_AMUX_THM1_100K_PU(0)>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
@@ -218,7 +218,7 @@ examples:
/* Other properties are omitted */
xo-therm@44 {
- reg = <PMK8350_ADC7_AMUX_THM1_100K_PU>;
+ reg = <PMK8350_ADC7_AMUX_THM1_100K_PU(0)>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
@@ -240,7 +240,7 @@ examples:
pmk8350-xo-therm@0 {
reg = <0>;
- io-channels = <&pmk8350_vadc PMK8350_ADC7_AMUX_THM1_100K_PU>;
+ io-channels = <&pmk8350_vadc PMK8350_ADC7_AMUX_THM1_100K_PU(0)>;
qcom,decimation = <340>;
qcom,ratiometric;
qcom,hw-settle-time-us = <200>;
@@ -433,7 +433,7 @@ &pcie1_phy {
&pmk8350_vadc {
pmk8350-die-temp@3 {
- reg = <PMK8350_ADC7_DIE_TEMP>;
+ reg = <PMK8350_ADC7_DIE_TEMP(0)>;
label = "pmk8350_die_temp";
qcom,pre-scaling = <1 1>;
};
@@ -389,7 +389,7 @@ &pm8350c_pwm {
&pmk8350_vadc {
pmk8350-die-temp@3 {
- reg = <PMK8350_ADC7_DIE_TEMP>;
+ reg = <PMK8350_ADC7_DIE_TEMP(0)>;
label = "pmk8350_die_temp";
qcom,pre-scaling = <1 1>;
};
@@ -824,13 +824,13 @@ &pmk8280_vadc {
status = "okay";
pmic-die-temp@3 {
- reg = <PMK8350_ADC7_DIE_TEMP>;
+ reg = <PMK8350_ADC7_DIE_TEMP(0)>;
qcom,pre-scaling = <1 1>;
label = "pmk8350_die_temp";
};
xo-therm@44 {
- reg = <PMK8350_ADC7_AMUX_THM1_100K_PU>;
+ reg = <PMK8350_ADC7_AMUX_THM1_100K_PU(0)>;
qcom,hw-settle-time = <200>;
qcom,ratiometric;
label = "pmk8350_xo_therm";
@@ -516,7 +516,7 @@ &pmk8350_rtc {
&pmk8350_vadc {
adc-chan@644 {
- reg = <PMK8350_ADC7_AMUX_THM1_100K_PU>;
+ reg = <PMK8350_ADC7_AMUX_THM1_100K_PU(0)>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
@@ -6,41 +6,37 @@
#ifndef _DT_BINDINGS_QCOM_SPMI_VADC_PMK8350_H
#define _DT_BINDINGS_QCOM_SPMI_VADC_PMK8350_H
-#ifndef PMK8350_SID
-#define PMK8350_SID 0
-#endif
-
/* ADC channels for PMK8350_ADC for PMIC7 */
-#define PMK8350_ADC7_REF_GND (PMK8350_SID << 8 | 0x0)
-#define PMK8350_ADC7_1P25VREF (PMK8350_SID << 8 | 0x01)
-#define PMK8350_ADC7_VREF_VADC (PMK8350_SID << 8 | 0x02)
-#define PMK8350_ADC7_DIE_TEMP (PMK8350_SID << 8 | 0x03)
+#define PMK8350_ADC7_REF_GND(sid) ((sid) << 8 | 0x0)
+#define PMK8350_ADC7_1P25VREF(sid) ((sid) << 8 | 0x01)
+#define PMK8350_ADC7_VREF_VADC(sid) ((sid) << 8 | 0x02)
+#define PMK8350_ADC7_DIE_TEMP(sid) ((sid) << 8 | 0x03)
-#define PMK8350_ADC7_AMUX_THM1 (PMK8350_SID << 8 | 0x04)
-#define PMK8350_ADC7_AMUX_THM2 (PMK8350_SID << 8 | 0x05)
-#define PMK8350_ADC7_AMUX_THM3 (PMK8350_SID << 8 | 0x06)
-#define PMK8350_ADC7_AMUX_THM4 (PMK8350_SID << 8 | 0x07)
-#define PMK8350_ADC7_AMUX_THM5 (PMK8350_SID << 8 | 0x08)
+#define PMK8350_ADC7_AMUX_THM1(sid) ((sid) << 8 | 0x04)
+#define PMK8350_ADC7_AMUX_THM2(sid) ((sid) << 8 | 0x05)
+#define PMK8350_ADC7_AMUX_THM3(sid) ((sid) << 8 | 0x06)
+#define PMK8350_ADC7_AMUX_THM4(sid) ((sid) << 8 | 0x07)
+#define PMK8350_ADC7_AMUX_THM5(sid) ((sid) << 8 | 0x08)
/* 30k pull-up1 */
-#define PMK8350_ADC7_AMUX_THM1_30K_PU (PMK8350_SID << 8 | 0x24)
-#define PMK8350_ADC7_AMUX_THM2_30K_PU (PMK8350_SID << 8 | 0x25)
-#define PMK8350_ADC7_AMUX_THM3_30K_PU (PMK8350_SID << 8 | 0x26)
-#define PMK8350_ADC7_AMUX_THM4_30K_PU (PMK8350_SID << 8 | 0x27)
-#define PMK8350_ADC7_AMUX_THM5_30K_PU (PMK8350_SID << 8 | 0x28)
+#define PMK8350_ADC7_AMUX_THM1_30K_PU(sid) ((sid) << 8 | 0x24)
+#define PMK8350_ADC7_AMUX_THM2_30K_PU(sid) ((sid) << 8 | 0x25)
+#define PMK8350_ADC7_AMUX_THM3_30K_PU(sid) ((sid) << 8 | 0x26)
+#define PMK8350_ADC7_AMUX_THM4_30K_PU(sid) ((sid) << 8 | 0x27)
+#define PMK8350_ADC7_AMUX_THM5_30K_PU(sid) ((sid) << 8 | 0x28)
/* 100k pull-up2 */
-#define PMK8350_ADC7_AMUX_THM1_100K_PU (PMK8350_SID << 8 | 0x44)
-#define PMK8350_ADC7_AMUX_THM2_100K_PU (PMK8350_SID << 8 | 0x45)
-#define PMK8350_ADC7_AMUX_THM3_100K_PU (PMK8350_SID << 8 | 0x46)
-#define PMK8350_ADC7_AMUX_THM4_100K_PU (PMK8350_SID << 8 | 0x47)
-#define PMK8350_ADC7_AMUX_THM5_100K_PU (PMK8350_SID << 8 | 0x48)
+#define PMK8350_ADC7_AMUX_THM1_100K_PU(sid) ((sid) << 8 | 0x44)
+#define PMK8350_ADC7_AMUX_THM2_100K_PU(sid) ((sid) << 8 | 0x45)
+#define PMK8350_ADC7_AMUX_THM3_100K_PU(sid) ((sid) << 8 | 0x46)
+#define PMK8350_ADC7_AMUX_THM4_100K_PU(sid) ((sid) << 8 | 0x47)
+#define PMK8350_ADC7_AMUX_THM5_100K_PU(sid) ((sid) << 8 | 0x48)
/* 400k pull-up3 */
-#define PMK8350_ADC7_AMUX_THM1_400K_PU (PMK8350_SID << 8 | 0x64)
-#define PMK8350_ADC7_AMUX_THM2_400K_PU (PMK8350_SID << 8 | 0x65)
-#define PMK8350_ADC7_AMUX_THM3_400K_PU (PMK8350_SID << 8 | 0x66)
-#define PMK8350_ADC7_AMUX_THM4_400K_PU (PMK8350_SID << 8 | 0x67)
-#define PMK8350_ADC7_AMUX_THM5_400K_PU (PMK8350_SID << 8 | 0x68)
+#define PMK8350_ADC7_AMUX_THM1_400K_PU(sid) ((sid) << 8 | 0x64)
+#define PMK8350_ADC7_AMUX_THM2_400K_PU(sid) ((sid) << 8 | 0x65)
+#define PMK8350_ADC7_AMUX_THM3_400K_PU(sid) ((sid) << 8 | 0x66)
+#define PMK8350_ADC7_AMUX_THM4_400K_PU(sid) ((sid) << 8 | 0x67)
+#define PMK8350_ADC7_AMUX_THM5_400K_PU(sid) ((sid) << 8 | 0x68)
#endif /* _DT_BINDINGS_QCOM_SPMI_VADC_PMK8350_H */