Re: [PATCH 5/8] thermal/drivers/int3400: Use thermal zone device wrappers

From: Daniel Lezcano
Date: Wed Jul 05 2023 - 06:41:18 EST



Hi Srinivas,

thanks for your answer. What about the patch 6?


On 03/07/2023 18:15, srinivas pandruvada wrote:
Hi Daniel,

On Mon, 2023-07-03 at 12:49 +0200, Daniel Lezcano wrote:

Hi Srinivas,

do you agree with the changes in patches 5 and 6 ?

Thanks

   -- Daniel


On 25/05/2023 16:01, Daniel Lezcano wrote:
The driver is accessing the thermal zone device structure but the
accessors are already existing and we want to consolidate the
thermal
core code by preventing accesses to the internals from the drivers.

Let's use these accessors.

On the other side, the code is getting directly the temperature
from
tz->temperature, but the temperature is a faked on, so we can
replace
this access by the fake temp and remove the thermal zone device
structure access.

May be something simple description like this will be enough.

"
Use thermal core API to access thermal zone "type" field instead of
directly using the structure field.
While here, remove access to temperature field, as this driver is
reporting fake temperature, which can be replaced with
INT3400_FAKE_TEMP. Also replace hardcoded 20C with INT3400_FAKE_TEMP.
"

The change itself looks fine.


--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog