mbox series

[V2,0/4] thermal/drivers/hisi: Add hi3660 thermal driver support

Message ID 1508512267-18302-1-git-send-email-daniel.lezcano@linaro.org
Headers show
Series thermal/drivers/hisi: Add hi3660 thermal driver support | expand

Message

Daniel Lezcano Oct. 20, 2017, 3:11 p.m. UTC
This series adds the support for the hikey960 thermal driver. The tsensor
is almost the same than the hi6220 but with a memory shared updated by a
Cortex-M4.

In order to handle both, the hi6220 and the hi3660, the current code should
be prefixed with the platform name as we will add functions with the same
purpose but slightly different. In addition, the core driver code is
maintained untouched by using a set of ops filled at boot time.

Changelog:

 - V2 : 
        - Fixed extra carriage return, description length reported
          by checkpatch
        - Removed the multi-threshold interrupt
        - Removed DT bindings documentation and DT change as it is
          merge in the arm-soc tree now
        - Tested on hi6220

 - V1 : initial post

Kevin Wangtao (4):
  thermal/drivers/hisi: Put platform code together
  thermal/drivers/hisi: Add platform prefix to function name
  thermal/drivers/hisi: Prepare to add support for other hisi platforms
  thermal/drivers/hisi: Add support for hi3660 SoC

 drivers/thermal/hisi_thermal.c | 452 +++++++++++++++++++++++++++++------------
 1 file changed, 319 insertions(+), 133 deletions(-)

-- 
2.7.4

Comments

Daniel Lezcano Oct. 21, 2017, 8:14 a.m. UTC | #1
On 20/10/2017 22:58, Eduardo Valentin wrote:
> On Fri, Oct 20, 2017 at 05:11:06PM +0200, Daniel Lezcano wrote:

>> From: Kevin Wangtao <kevin.wangtao@linaro.org>

>>

>> For platform compatibility, add the tsensor ops to a thermal data

>> structure. Each platform has its own probe function to register proper

>> tsensor ops function to the pointer, platform related resource request

>> are also implemented in the platform probe function.

>>

>> Signed-off-by: Kevin Wangtao <kevin.wangtao@linaro.org>

>> Tested-by: Daniel Lezcano <daniel.lezcano@linaro.org> # hikey6220

>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

> 

> This patch adds this issue to hisi driver (sparse)

> 

> drivers/thermal/hisi_thermal.c:398:24: warning: incorrect type in assignment (different modifiers)

> drivers/thermal/hisi_thermal.c:398:24:    expected int ( *platform_probe )( ... )

> drivers/thermal/hisi_thermal.c:398:24:    got void const *

> 

> essentially you are casting a const into a non const.

> 

> Please fix and resend.


I was not able to reproduce the warning. I tried the C=1, C=2 options,
cross compiled or compiled on x86 with COMPILE_TEST, the warning does
not appear.

Are you using make C=1 or something else to run sparse on the kernel
sources ?



-- 
 <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
Daniel Lezcano Oct. 22, 2017, 8:55 a.m. UTC | #2
On 21/10/2017 21:08, Eduardo Valentin wrote:
> Heym

> 

> On Sat, Oct 21, 2017 at 08:33:07PM +0200, Daniel Lezcano wrote:

>> What sparse version are you using ?

> 

> 

> Does it really matter? You are still assigning a const pointer to a non-const pointer.


Finally find the installed sparse version I have is a dev version.
Moving back to the distro version showed the warning.


-- 
 <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