Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions arch/arm64/boot/dts/qcom/qcm6490-shift-otter.dts
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,20 @@
};
};

mem-thermal {
polling-delay-passive = <0>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can be removed since it's 0

Copy link

@yogo1212 yogo1212 Oct 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@z3ntu while it does work without, it is not uncommon to include it.
(the verbosity makes it easier to understand the delay)

if (ret == -EINVAL) {
    *pdelay = 0;
$ git grep -E 'polling-delay-passive.*<0>' | wc -l
134

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it's not uncommon because this piece of code in the kernel hasn't existed for long, so in the past you had to explicitly set it to 0.

So it shouldn't be added anymore because it's redundant info


thermal-sensors = <&pm7250b_adc_tm 2>;

trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};

quiet-thermal {
polling-delay-passive = <0>;

Expand Down Expand Up @@ -654,6 +668,9 @@
};

&pm7250b_adc {
pinctrl-0 = <&pm7250b_adc_default>;
pinctrl-names = "default";

channel@4d {
reg = <ADC5_AMUX_THM1_100K_PU>;
qcom,ratiometric;
Expand All @@ -669,6 +686,14 @@
qcom,pre-scaling = <1 1>;
label = "conn_therm";
};

channel@53 {
reg = <ADC5_GPIO2_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
label = "mem_therm";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idk if it also applies to adc, but generally generic properties first, then vendor specific ones. And boolean ones go to the end.

So reg - label - qcom,hw-settle-time - qcom,pre-scaling - qcom,ratiometric.

But also fine to keep it in this order since the ones above have this order so it'd make it inconsistent to change it

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm. yeah 😅

the ordering is 'preferred' but lots of (merged) device trees do it weirdly.

here's what the fairphone 5 has:

    reg = <ADC5_GPIO2_100K_PU>;
    qcom,ratiometric;
    qcom,hw-settle-time = <200>;
    qcom,pre-scaling = <1 1>;
    label = "mem_therm";

all qcom ADCs i've encountered have the label at the bottom for some reason. seems to be more of a "feels right" order.

no idea when and how and of these commits would go mainline. if they do, one could ask the maintainer whether they deem starting to do it correctly worthy of their time.

};
};

&pm7250b_adc_tm {
Expand All @@ -687,6 +712,21 @@
qcom,ratiometric;
qcom,hw-settle-time-us = <200>;
};

mem-therm@2 {
reg = <2>;
io-channels = <&pm7250b_adc ADC5_GPIO2_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time-us = <200>;
};
};

&pm7250b_gpios {
pm7250b_adc_default: adc-default-state {
pins = "gpio12";
function = PMIC_GPIO_FUNC_NORMAL;
bias-high-impedance;
};
};

&pm7325_gpios {
Expand Down