Skip to content

Commit 8013295

Browse files
Mani-Sadhasivamandersson
authored andcommitted
arm64: dts: qcom: sc8280xp: Add label property to vadc channel nodes
For uniquely identifying the vadc channels, label property has to be used. The initial commit adding vadc support assumed that the driver will use the unit address along with the node name to identify the channels. But this assumption is now broken by, commit 701c875 ("iio: adc: qcom-spmi-adc5: Fix the channel name") that stripped unit address from channel names. This results in probe failure of the vadc driver: [ 8.380370] iio iio:device0: tried to double register : in_temp_pmic-die-temp_input [ 8.380383] qcom-spmi-adc5 c440000.spmi:pmic@0:adc@3100: Failed to register sysfs interfaces [ 8.380386] qcom-spmi-adc5: probe of c440000.spmi:pmic@0:adc@3100 failed with error -16 Hence, let's get rid of the assumption about drivers and rely on label property to uniquely identify the channels. The labels are derived from the schematics for each PMIC. For internal adc channels such as die and xo, the PMIC names are used as a prefix. Fixes: 7c01513 ("arm64: dts: qcom: sc8280xp-x13s: Add PM8280_{1/2} ADC_TM5 channels") Fixes: 9d41cd1 ("arm64: dts: qcom: sc8280xp-x13s: Add PMR735A VADC channel") Fixes: 3375151 ("arm64: dts: qcom: sc8280xp-x13s: Add PM8280_{1/2} VADC channels") Fixes: 9a6b304 ("arm64: dts: qcom: sc8280xp-x13s: Add PMK8280 VADC channels") Reported-by: Steev Klimaszewski <[email protected]> Signed-off-by: Manivannan Sadhasivam <[email protected]> Signed-off-by: Bjorn Andersson <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 672a58f commit 8013295

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,75 +772,88 @@
772772
pmic-die-temp@3 {
773773
reg = <PMK8350_ADC7_DIE_TEMP>;
774774
qcom,pre-scaling = <1 1>;
775+
label = "pmk8350_die_temp";
775776
};
776777

777778
xo-therm@44 {
778779
reg = <PMK8350_ADC7_AMUX_THM1_100K_PU>;
779780
qcom,hw-settle-time = <200>;
780781
qcom,ratiometric;
782+
label = "pmk8350_xo_therm";
781783
};
782784

783785
pmic-die-temp@103 {
784786
reg = <PM8350_ADC7_DIE_TEMP(1)>;
785787
qcom,pre-scaling = <1 1>;
788+
label = "pmc8280_1_die_temp";
786789
};
787790

788791
sys-therm@144 {
789792
reg = <PM8350_ADC7_AMUX_THM1_100K_PU(1)>;
790793
qcom,hw-settle-time = <200>;
791794
qcom,ratiometric;
795+
label = "sys_therm1";
792796
};
793797

794798
sys-therm@145 {
795799
reg = <PM8350_ADC7_AMUX_THM2_100K_PU(1)>;
796800
qcom,hw-settle-time = <200>;
797801
qcom,ratiometric;
802+
label = "sys_therm2";
798803
};
799804

800805
sys-therm@146 {
801806
reg = <PM8350_ADC7_AMUX_THM3_100K_PU(1)>;
802807
qcom,hw-settle-time = <200>;
803808
qcom,ratiometric;
809+
label = "sys_therm3";
804810
};
805811

806812
sys-therm@147 {
807813
reg = <PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
808814
qcom,hw-settle-time = <200>;
809815
qcom,ratiometric;
816+
label = "sys_therm4";
810817
};
811818

812819
pmic-die-temp@303 {
813820
reg = <PM8350_ADC7_DIE_TEMP(3)>;
814821
qcom,pre-scaling = <1 1>;
822+
label = "pmc8280_2_die_temp";
815823
};
816824

817825
sys-therm@344 {
818826
reg = <PM8350_ADC7_AMUX_THM1_100K_PU(3)>;
819827
qcom,hw-settle-time = <200>;
820828
qcom,ratiometric;
829+
label = "sys_therm5";
821830
};
822831

823832
sys-therm@345 {
824833
reg = <PM8350_ADC7_AMUX_THM2_100K_PU(3)>;
825834
qcom,hw-settle-time = <200>;
826835
qcom,ratiometric;
836+
label = "sys_therm6";
827837
};
828838

829839
sys-therm@346 {
830840
reg = <PM8350_ADC7_AMUX_THM3_100K_PU(3)>;
831841
qcom,hw-settle-time = <200>;
832842
qcom,ratiometric;
843+
label = "sys_therm7";
833844
};
834845

835846
sys-therm@347 {
836847
reg = <PM8350_ADC7_AMUX_THM4_100K_PU(3)>;
837848
qcom,hw-settle-time = <200>;
838849
qcom,ratiometric;
850+
label = "sys_therm8";
839851
};
840852

841853
pmic-die-temp@403 {
842854
reg = <PMR735A_ADC7_DIE_TEMP>;
843855
qcom,pre-scaling = <1 1>;
856+
label = "pmr735a_die_temp";
844857
};
845858
};
846859

0 commit comments

Comments
 (0)