thermal: armada: Add support for Armada AP806
authorBaruch Siach <baruch@tkos.co.il>
Fri, 22 Dec 2017 16:14:08 +0000 (17:14 +0100)
committerEduardo Valentin <edubezval@gmail.com>
Mon, 1 Jan 2018 21:18:06 +0000 (13:18 -0800)
commit2ff127999289a8ed29b2dae3a15f2f484d560463
tree98f4b30a04b2a781b1065e41a05a68ec1b8cbc2b
parent8371b8a3324b4dcee2a51983a3309c5a8bc6cd3b
thermal: armada: Add support for Armada AP806

The AP806 component is integrated in the Armada 8K and 7K lines of
processors.

The thermal sensor sample field on the status register is a signed
value. Extend armada_get_temp() and the driver structure to handle
signed values.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
[<miquel.raynal@free-electrons.com>: Changes when applying over the
previous patches, including the register names changes, also switched
the coefficients values to s64 instead of unsigned long to deal with
negative values and used do_div instead of the traditionnal '/']
Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
Reviewed-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/armada_thermal.c