03 Aug, 2015
1 commit
-
The thermal code uses int, long and unsigned long for temperatures
in different places.Using an unsigned type limits the thermal framework to positive
temperatures without need. Also several drivers currently will report
temperatures near UINT_MAX for temperatures below 0°C. This will probably
immediately shut the machine down due to overtemperature if started below
0°C.'long' is 64bit on several architectures. This is not needed since INT_MAX °mC
is above the melting point of all known materials.Consistently use a plain 'int' for temperatures throughout the thermal code and
the drivers. This only changes the places in the drivers where the temperature
is passed around as pointer, when drivers internally use another type this is
not changed.Signed-off-by: Sascha Hauer
Acked-by: Geert Uytterhoeven
Reviewed-by: Jean Delvare
Reviewed-by: Lukasz Majewski
Reviewed-by: Darren Hart
Reviewed-by: Heiko Stuebner
Reviewed-by: Peter Feuerer
Cc: Punit Agrawal
Cc: Zhang Rui
Cc: Eduardo Valentin
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Jean Delvare
Cc: Peter Feuerer
Cc: Heiko Stuebner
Cc: Lukasz Majewski
Cc: Stephen Warren
Cc: Thierry Reding
Cc: linux-acpi@vger.kernel.org
Cc: platform-driver-x86@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-omap@vger.kernel.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: Guenter Roeck
Cc: Rafael J. Wysocki
Cc: Maxime Ripard
Cc: Darren Hart
Cc: lm-sensors@lm-sensors.org
Signed-off-by: Zhang Rui
20 Oct, 2014
1 commit
-
A platform_driver does not need to set an owner, it will be populated by the
driver core.Signed-off-by: Wolfram Sang
28 May, 2013
2 commits
-
'kirkwood_thermal_id_table' is always compiled in and the driver
is dependent on OF. Hence use of of_match_ptr is unnecessary.Signed-off-by: Sachin Kamat
Cc: Nobuhiro Iwamatsu
Acked-by: Eduardo Valentin
Signed-off-by: Zhang Rui
20 May, 2013
1 commit
-
devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.Signed-off-by: Wolfram Sang
Acked-by: Eduardo Valentin
Signed-off-by: Zhang Rui
06 May, 2013
1 commit
-
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.Signed-off-by: Sachin Kamat
Cc: Nobuhiro Iwamatsu
Acked-by: Eduardo Valentin
Acked-by: Nobuhiro Iwamatsu
Signed-off-by: Zhang Rui
26 Mar, 2013
2 commits
-
The currently formula has been taken from the 88AP510 SoC datasheet,
which is not exactly correct. The correct value for the temperature
in Celcius of the sensor present in this SoC is:Celsius = (322-reg)/1.3625
Signed-off-by: Lior Amsalem
Signed-off-by: Ezequiel Garcia
Acked-by: Andrew Lunn
Signed-off-by: Zhang Rui -
The correct value is obtain by first shifting the register by the offset,
later applying the valid mask and finally invert the result.
This check was lacking an extra parenthesis to be strictly correct.Signed-off-by: Ezequiel Garcia
Signed-off-by: Zhang Rui
11 Mar, 2013
1 commit
-
Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() which provides more consistent error handling.devm_ioremap_resource() provides its own error messages; so all explicit
error messages can be removed from the failure code paths.Signed-off-by: Sachin Kamat
Cc: Nobuhiro Iwamatsu
Reviewed-by: Thierry Reding
Acked-by: Nobuhiro Iwamatsu
Signed-off-by: Zhang Rui
08 Feb, 2013
1 commit
-
This patch adds support for Kirkwood 88F6282 and 88F6283 thermal sensor.
Signed-off-by: Nobuhiro Iwamatsu
Signed-off-by: Andrew Lunn
Signed-off-by: Zhang Rui