summaryrefslogtreecommitdiffstats
path: root/drivers/thermal/int340x_thermal/int3400_thermal.c
AgeCommit message (Collapse)Author
2015-08-03thermal: consistently use int for temperaturesSascha Hauer
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 <s.hauer@pengutronix.de> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com> Reviewed-by: Darren Hart <dvhart@linux.intel.com> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Peter Feuerer <peter@piie.net> Cc: Punit Agrawal <punit.agrawal@arm.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Jean Delvare <jdelvare@suse.de> Cc: Peter Feuerer <peter@piie.net> Cc: Heiko Stuebner <heiko@sntech.de> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Stephen Warren <swarren@wwwdotorg.org> Cc: Thierry Reding <thierry.reding@gmail.com> 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 <linux@roeck-us.net> Cc: Rafael J. Wysocki <rjw@rjwysocki.net> Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Cc: Darren Hart <dvhart@infradead.org> Cc: lm-sensors@lm-sensors.org Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2015-02-28thermal: int340x_thermal: Ignore missing _ART, _TRT tablesSrinivas Pandruvada
It is possible that _ART/_TRT tables are missing or have errors. Ignore those failures, as INT3400 thermal zone is still required for _OSC or mode switch. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2015-02-06Thermal/int340x_thermal: remove unused uuids.Zhang Rui
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2014-12-22thermal: int340x_thermal: drop owner assignment from platform_driversWolfram Sang
This platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2014-12-09thermal/int3400: export uuidsSrinivas Pandruvada
INT3400 currently supports only one policy, which can't be changed. This change exports all available policies (uuids) to user space and allow this to be changed. It introduces an attribute group uuids in INT3400 platform driver. There are two attributes exposed: - available_uuids - current_uuid User space can set current_uuid via this interface to one of the available uuids. The uuid change is communicated to firmware, only when the current zone mode is changed to "enabled". So the ideal sequence should be - set INT3400 zone mode to "disabled" - change current_uuid - set INT3400 zone mode to "enabled" Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2014-10-11Thermal: int3400_thermal: use acpi_thermal_rel parsing APIsJacob Pan
ACPI _TRT and _ART parsing code has been moved to acpi_thermal_rel such that it can be used by other devices in the future. Use the parsing APIs in acpi_thermal_rel.c instead. Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2014-10-10Thermal: int3400 thermal: register to thermal frameworkZhang Rui
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2014-10-10Thermal: int3400 thermal: add capability to detect supporting UUIDsZhang Rui
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2014-10-10Thermal: introduce int3400 thermal driverZhang Rui
Introduce int3400 thermal driver. And make INT3400 driver enumerate the other int340x thermal components shown in _ART/_TRT. Signed-off-by: Zhang Rui <rui.zhang@intel.com>