| ca617669 | 09-Jul-2024 |
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> |
thermal/drivers/exynos: Simplify with dev_err_probe()
Error handling in probe() can be a bit simpler with dev_err_probe().
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link:
thermal/drivers/exynos: Simplify with dev_err_probe()
Error handling in probe() can be a bit simpler with dev_err_probe().
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240709-thermal-probe-v1-5-241644e2b6e0@linaro.org Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
show more ...
|
| 5314b154 | 01-Dec-2023 |
Mateusz Majewski <m.majewski2@samsung.com> |
thermal/drivers/exynos: Use set_trips ops
Currently, each trip point defined in the device tree corresponds to a single hardware interrupt. This commit instead switches to using two hardware interru
thermal/drivers/exynos: Use set_trips ops
Currently, each trip point defined in the device tree corresponds to a single hardware interrupt. This commit instead switches to using two hardware interrupts, whose values are set dynamically using the set_trips callback. Additionally, the critical temperature threshold is handled specifically.
Setting interrupts in this way also fixes a long-standing lockdep warning, which was caused by calling thermal_zone_get_trips with our lock being held. Do note that this requires TMU initialization to be split into two parts, as done by the parent commit: parts of the initialization call into the thermal_zone_device structure and so must be done after its registration, but the initialization is also responsible for setting up calibration, which must be done before thermal_zone_device registration, which will call set_trips for the first time; if the calibration is not done in time, the interrupt values will be silently wrong!
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com> Signed-off-by: Mateusz Majewski <m.majewski2@samsung.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20231201095625.301884-10-m.majewski2@samsung.com
show more ...
|
| af00d488 | 01-Dec-2023 |
Mateusz Majewski <m.majewski2@samsung.com> |
thermal/drivers/exynos: Use BIT wherever possible
The original driver did not use that macro and it allows us to make our intentions slightly clearer.
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
thermal/drivers/exynos: Use BIT wherever possible
The original driver did not use that macro and it allows us to make our intentions slightly clearer.
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com> Signed-off-by: Mateusz Majewski <m.majewski2@samsung.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20231201095625.301884-9-m.majewski2@samsung.com
show more ...
|
| b72ba67b | 01-Dec-2023 |
Mateusz Majewski <m.majewski2@samsung.com> |
thermal/drivers/exynos: Split initialization of TMU and the thermal zone
This will be needed in the future, as the thermal zone subsystem might call our callbacks right after devm_thermal_of_zone_re
thermal/drivers/exynos: Split initialization of TMU and the thermal zone
This will be needed in the future, as the thermal zone subsystem might call our callbacks right after devm_thermal_of_zone_register. Currently we just make get_temp return EAGAIN in such case, but this will not be possible with state-modifying callbacks, for instance set_trips.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Mateusz Majewski <m.majewski2@samsung.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20231201095625.301884-8-m.majewski2@samsung.com
show more ...
|
| d7a5b431 | 01-Dec-2023 |
Mateusz Majewski <m.majewski2@samsung.com> |
thermal/drivers/exynos: Stop using the threshold mechanism on Exynos 4210
Exynos 4210 supports setting a base threshold value, which is added to all trip points. This might be useful, but is not rea
thermal/drivers/exynos: Stop using the threshold mechanism on Exynos 4210
Exynos 4210 supports setting a base threshold value, which is added to all trip points. This might be useful, but is not really necessary in our usecase, so we always set it to 0 to simplify the code a bit.
Additionally, this change makes it so that we convert the value to the calibrated one in a slightly different place. This is more correct morally, though it does not make any change when single-point calibration is being used (which is the case currently).
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Mateusz Majewski <m.majewski2@samsung.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20231201095625.301884-7-m.majewski2@samsung.com
show more ...
|
| 5d6976d0 | 01-Dec-2023 |
Mateusz Majewski <m.majewski2@samsung.com> |
thermal/drivers/exynos: Simplify regulator (de)initialization
We rewrite the initialization to enable the regulator as part of devm, which allows us to not handle the struct instance manually.
Revi
thermal/drivers/exynos: Simplify regulator (de)initialization
We rewrite the initialization to enable the regulator as part of devm, which allows us to not handle the struct instance manually.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Mateusz Majewski <m.majewski2@samsung.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20231201095625.301884-6-m.majewski2@samsung.com
show more ...
|
| 52ef6f56 | 01-Dec-2023 |
Mateusz Majewski <m.majewski2@samsung.com> |
thermal/drivers/exynos: Handle devm_regulator_get_optional return value correctly
Currently, if regulator is required in the SoC, but devm_regulator_get_optional fails for whatever reason, the execu
thermal/drivers/exynos: Handle devm_regulator_get_optional return value correctly
Currently, if regulator is required in the SoC, but devm_regulator_get_optional fails for whatever reason, the execution will proceed without propagating the error. Meanwhile there is no reason to output the error in case of -ENODEV.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Mateusz Majewski <m.majewski2@samsung.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20231201095625.301884-5-m.majewski2@samsung.com
show more ...
|
| 20009a81 | 01-Dec-2023 |
Mateusz Majewski <m.majewski2@samsung.com> |
thermal/drivers/exynos: Wwitch from workqueue-driven interrupt handling to threaded interrupts
The workqueue boilerplate is mostly one-to-one what the threaded interrupts do.
Reviewed-by: Krzysztof
thermal/drivers/exynos: Wwitch from workqueue-driven interrupt handling to threaded interrupts
The workqueue boilerplate is mostly one-to-one what the threaded interrupts do.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Mateusz Majewski <m.majewski2@samsung.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20231201095625.301884-4-m.majewski2@samsung.com
show more ...
|
| 0ac3e1cf | 01-Dec-2023 |
Mateusz Majewski <m.majewski2@samsung.com> |
thermal/drivers/exynos: Drop id field
We do not use the value, and only Exynos 7 defines this alias anyway.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Mateusz
thermal/drivers/exynos: Drop id field
We do not use the value, and only Exynos 7 defines this alias anyway.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Mateusz Majewski <m.majewski2@samsung.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20231201095625.301884-3-m.majewski2@samsung.com
show more ...
|
| 1892f9f0 | 10-Aug-2023 |
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> |
thermal/drivers/samsung: Fix Wvoid-pointer-to-enum-cast warning
'soc' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes:
exynos_tmu.c:890:14: error: cast to smaller integer
thermal/drivers/samsung: Fix Wvoid-pointer-to-enum-cast warning
'soc' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes:
exynos_tmu.c:890:14: error: cast to smaller integer type 'enum soc_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20230810091318.70261-1-krzysztof.kozlowski@linaro.org
show more ...
|
| 03ef4855 | 03-Oct-2022 |
Daniel Lezcano <daniel.lezcano@linaro.org> |
thermal/drivers/exynos: Replace of_thermal_is_trip_valid() by thermal_zone_get_trip()
The thermal_zone_get_trip() does the same check as of_thermal_is_trip_valid(). Replace the call to of_thermal_is
thermal/drivers/exynos: Replace of_thermal_is_trip_valid() by thermal_zone_get_trip()
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> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20221003092602.1323944-10-daniel.lezcano@linaro.org
show more ...
|
| a3b3dd38 | 03-Oct-2022 |
Daniel Lezcano <daniel.lezcano@linaro.org> |
thermal/drivers/exynos: of_thermal_get_ntrips()
The thermal core framework allows to get the number of thermal trips, use it instead of visiting the thermal core structure internals.
Signed-off-by:
thermal/drivers/exynos: of_thermal_get_ntrips()
The thermal core framework allows to get the number of thermal trips, use it instead of visiting the thermal core structure internals.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20221003092602.1323944-9-daniel.lezcano@linaro.org
show more ...
|