On Mon, Jul 18, 2022 at 4:50 PM Daniel Lezcano
<daniel.lezcano@xxxxxxxxxx> wrote:
By convention the trips points are declared in the ascending
temperature order. However, no specification for the device tree, ACPI
or documentation tells the trip points must be ordered this way.
In the other hand, we need those to be ordered to browse them at the
s/In/On/
thermal events.
What if they are all inspected every time?
But if we assume they are ordered and change the code
based on this assumption, any platform with shuffled trip points
description will be broken (if they exist).
Instead of taking the risk of breaking the existing platforms, use an
array of temperature ordered trip identifiers and make it available
for the code needing to browse the trip points in an ordered way.
Well, having ops->get_trip_temp() suggests that the trip temperatures
can be dynamic. Is the ordering guaranteed to be preserved in that
case?
Anyway, if they need to be sorted, why don't we just sort them
properly instead of adding this extra array?