summaryrefslogtreecommitdiffstats
path: root/drivers/thermal/int340x_thermal/processor_thermal_device.c
Commit message (Collapse)AuthorAgeFilesLines
* thermal: int340x: processor_thermal: Add GeminiLake supportSumeet Pawnikar2018-05-301-0/+4
| | | | | | | Added PCI device id of GeminiLake thermal device. Signed-off-by: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* thermal: int340x: processor_thermal: Add Coffee Lake supportSrinivas Pandruvada2017-11-021-0/+2
| | | | | | | Add new PCI id for Coffee lake processor thermal device. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* thermal: int340x: processor_thermal: Add Cannon Lake supportSrinivas Pandruvada2017-11-021-0/+4
| | | | | | | Added PCI-ID of Cannon Lake thermal device. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* thermal: int340x_thermal: Constify attribute_group structures.Arvind Yadav2017-08-081-1/+1
| | | | | | | | | | | | | | | | | attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by <linux/sysfs.h> work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 3152 1096 8 4256 10a0 processor_thermal_device.o File size After adding 'const': text data bss dec hex filename 3216 1032 8 4256 10a0 processor_thermal_device.o Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* thermal: int340x: New Interface to read trip and notifySrinivas Pandruvada2016-09-271-1/+2
| | | | | | | | | | | | Separated the code for reading trip points from int340x_thermal_zone_add to a standalone function int340x_thermal_read_trips. This standlone interface to read is exported so that int340x drivers can re-read trips on ACPI notification for trip point change. Also the appropriate notification events are sent by int340x driver based on the acpi event using int340x_thermal_zone_device_update(). Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* thermal: int340x: processor_thermal: support acpi notificationSrinivas Pandruvada2016-05-071-31/+77
| | | | | | | | BIOS/EC can change PPCC element dynamically and inform OS about the change. When this driver receives notification, it will read PPCC element again. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* Thermal: Enable Broxton SoC thermal reporting deviceAmy Wiles2015-12-291-0/+10
| | | | | Signed-off-by: Amy Wiles <amy.l.wiles@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* thermal: consistently use int for temperaturesSascha Hauer2015-08-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* int340x_thermal/processor_thermal_device: add support to Skylake processorsBrian Bian2015-05-011-0/+4
| | | | | | | Add PCI ID of Skylake thermal reporting device. Signed-off-by: Brian Bian <brian.bian@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* Thermal/int340x/processor_thermal: Enable auxiliary DTS for BraswellSrinivas Pandruvada2015-05-011-1/+54
| | | | | | | | Support two auxiliary DTS present on Braswell platform using side band IOSF interface. This supports two read write trips, which can be used to get notification on trip violation. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
* thermal: int340x: fix sparse warningLad, Prabhakar2015-02-061-1/+1
| | | | | | | | | this patch fixes following sparse warning: processor_thermal_device.c:188:6: warning: symbol 'proc_thermal_remove' was not declared. Should it be static? Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* Thermal/int340x/processor_thermal: Add thermal zone supportSrinivas Pandruvada2015-01-201-0/+90
| | | | | | | | | | | | Added thermal zones for processor thermal using APIs provided by int340x thermal zone module. Like other INT340x devices, processor thermal device can also contain trip points and way to get temperature. On some platform there is no ACPI _TMP method, in those platform using IA64 architecture MSRs to get temperature. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* int340x_thermal/processor_thermal_device: return failure whenZhang Rui2015-01-061-0/+2
| | | | | | | | | | | | | | there is no ACPI device object processor_thermal_device driver needs ACPI support to work. Thus, the driver probing should fail when there is no ACPI device object asscociated. This fixes a NULL pointer dereference when the driver is loaded with INT340X feature disabled in BIOS. Reported-by: Chen Yu <yu.c.chen@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com> Tested-by: Chen Yu <yu.c.chen@intel.com>
* Thermal/int340x/processor_thermal: Fix memory leakSrinivas Pandruvada2014-12-241-9/+20
| | | | | | | Address memory leak for buffer allocated with ACPI_ALLOCATE_BUFFER. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* thermal: int340x: Introduce processor reporting deviceSrinivas Pandruvada2014-12-241-0/+298
The Int340x thermal provides a processor thermal device, which is used to control processor thermal states. These devices are either reported as a PCI device or an ACPI device. This device provides power limits, control states and optional temperature. This change implements minimal requirements to expose processor power limits which can be used during thermal power limiting. Power limits are exposed via an attribute group called "power_limits" under the device. The exported attributes are: power_limit_0_max_uw power_limit_1_max_uw power_limit_0_min_uw power_limit_1_min_uw power_limit_0_tmin_us power_limit_1_tmin_us power_limit_0_tmax_us power_limit_1_tmax_us power_limit_0_step_uw power_limit_1_step_uw Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>