Message ID | 20220906164720.330701-1-daniel.lezcano@linaro.org |
---|---|
Headers | show |
Series | Rework the trip points creation | expand |
On 06/09/2022 18:46, Daniel Lezcano wrote: > The thermal framework gives the possibility to register the trip > points with the thermal zone. When that is done, no get_trip_* ops are > needed and they can be removed. > > Convert ops content logic into generic trip points and register them with the > thermal zone. > > Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof
On 06/09/2022 18:47, Daniel Lezcano wrote: > The thermal_zone_get_trip() does the same check as > of_thermal_is_trip_valid(). Replace the call to > of_thermal_is_trip_valid() by thermal_zone_get_trip(). > > Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> > --- > drivers/thermal/samsung/exynos_tmu.c | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) > > diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c > index 91e6860b5ec4..5e6bb74c67f0 100644 > --- a/drivers/thermal/samsung/exynos_tmu.c > +++ b/drivers/thermal/samsung/exynos_tmu.c > @@ -554,13 +554,15 @@ static void exynos4210_tmu_control(struct platform_device *pdev, bool on) > { > struct exynos_tmu_data *data = platform_get_drvdata(pdev); > struct thermal_zone_device *tz = data->tzd; > + struct thermal_trip trip; > unsigned int con, interrupt_en = 0, i; > > con = get_con_reg(data, readl(data->base + EXYNOS_TMU_REG_CONTROL)); > > if (on) { > for (i = 0; i < data->ntrip; i++) { > - if (!of_thermal_is_trip_valid(tz, i)) > + > + if (thermal_zone_get_trip(tz, i, &trip)) No need for empty line before. Ditto in other places. Best regards, Krzysztof