- 23 11月, 2016 5 次提交
-
-
由 Eduardo Valentin 提交于
emul_temp creation is dependent on a compile time condition. Moving to tz->device.groups. Cc: Zhang Rui <rui.zhang@intel.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: NEduardo Valentin <edubezval@gmail.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Eduardo Valentin 提交于
Thermal zones attributes are all being created using device_create_file(). This has the disadvantage of making the code complicated and sometimes we may miss the cleanup of them. This patch starts to move the thermal zone sysfs attributes to the dev.groups, so Linux device core manage them for us. For now, this patch only moves those attributes are always present regardless of thermal zone condition. This change has also the advantage of cleaning up the thermal zone parameters sysfs entries that are left unclean after device registration. Cc: Zhang Rui <rui.zhang@intel.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: NEduardo Valentin <edubezval@gmail.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Eduardo Valentin 提交于
Simple code reorganization to group files that are always created when registering a thermal zone. Cc: Zhang Rui <rui.zhang@intel.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: NEduardo Valentin <edubezval@gmail.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Eduardo Valentin 提交于
Simply reorganize the code to have all DEVICE_ATTR's in one point in the file. Cc: Zhang Rui <rui.zhang@intel.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: NEduardo Valentin <edubezval@gmail.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Eduardo Valentin 提交于
There are APIs that rely on tz->type. This patch prevent thermal zones without it to be registered. Cc: Zhang Rui <rui.zhang@intel.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: NEduardo Valentin <edubezval@gmail.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
- 21 11月, 2016 1 次提交
-
-
由 Jacob Pan 提交于
Commit 3105f234 replaced module cpu id table with a cpu feature check, which is logically correct. But we need the module device table to allow module auto loading. Cc: stable@vger.kernel.org # 4.8 Fixes:3105f234 thermal/powerclamp: correct cpu support check Signed-off-by: NJacob Pan <jacob.jun.pan@linux.intel.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
- 20 10月, 2016 3 次提交
-
-
由 Eric Ernst 提交于
Initial logic for checking CPU match resulted in OR of CPU features rather than the intended AND. Updated to use boot_cpu_has macro rather than x86_match_cpu. In addition, MWAIT is the only required CPU feature for idle injection to work. Drop other feature requirements since they are only needed for optimal efficiency. CC: stable@vger.kernel.org #v4.7 Signed-off-by: NEric Ernst <eric.ernst@linux.intel.com> Acked-by: NJacob Pan <jacob.jun.pan@linux.intel.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Srinivas Pandruvada 提交于
Added missing support for Haswell PCH thermal sensor. Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Srinivas Pandruvada 提交于
On the platforms which has an ACPI companion device associated with PCH thermal device, read passive trip temperature via ACPI _PSV control method. Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
- 27 9月, 2016 31 次提交
-
-
由 Srinivas Pandruvada 提交于
When ACPI sends notification for trip point change re-read trips and notify thermal core, so that this can be passed to user space thermal controller. Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Srinivas Pandruvada 提交于
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: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Srinivas Pandruvada 提交于
Add additional properties: NAME= Thermal zone type TEMP= Temperature sample value TRIP= Violated trip index EVENT= The notification event (new temperature sample, trip violation trip changed) This is the additional information to what kobject_uevent already provides. So it will not impact existing user spaces. Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Srinivas Pandruvada 提交于
Added one additional parameter to thermal_zone_device_update() to provide caller with an optional capability to specify reason. Currently this event is used by user space governor to trigger different processing based on event code. Also it saves an additional call to read temperature when the event is received. The following events are cuurently defined: - Unspecified event - New temperature sample - Trip point violated - Trip point changed - thermal device up and down - thermal device power capability changed Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Wei Ni 提交于
Tegra132 use CCROC throttle registers to configure pulse skiper, set these registers to enable throttle function for Tegra132. Signed-off-by: NWei Ni <wni@nvidia.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Wei Ni 提交于
Tegra soctherm support HW throttle, when the soctherm snesors' temperature is above the throttle trip point, it will trigger pulse skiper to tune clocks accroding to the throttle depth. Add this function for Tegra124 and Tegra210. Since Tegra132 use different registers to configure pulse skiper, will support it in next patch. Signed-off-by: NWei Ni <wni@nvidia.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Axel Lin 提交于
devm_thermal_zone_of_sensor_register can fail, so check it's return value. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Reviewed-by: NMatthias Brugger <matthias.bgg@gmail.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 dawei.chien@mediatek.com 提交于
This patch adds support for mt2701 chip to mtk_thermal, and integrate both mt8173 and mt2701 on the same driver. MT8173 has four banks and five sensors, and MT2701 has only one bank and three sensors. Signed-off-by: NDawei Chien <dawei.chien@mediatek.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Laxman Dewangan 提交于
Maxim Semiconductor Max77620 supports alarm interrupts when its die temperature crosses 120C and 140C. These threshold temperatures are not configurable. Add thermal driver to register PMIC die temperature as thermal zone sensor and capture the die temperature warning interrupts to notifying the client. Signed-off-by: NLaxman Dewangan <ldewangan@nvidia.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Marc Gonzalez 提交于
When this platform is suspended, firmware powers the entire SoC down, except a few hardware blocks waiting for wakeup events. There is no context to save for this particular block. Therefore, there is nothing useful for the driver to do on suspend; so we define a NULL suspend hook. On resume, the driver initializes the block exactly as is done in the probe callback. Signed-off-by: NMarc Gonzalez <marc_gonzalez@sigmadesigns.com> Reviewed-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Shawn Lin 提交于
We could see that state is defined as unsigned type, so it should never be less than zero. Let' remove this check. Signed-off-by: NShawn Lin <shawn.lin@rock-chips.com> Reviewed-by: NChanwoo Choi <cw00.choi@samsung.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Bui Duc Phuc 提交于
devm_thermal_zone_of_sensor_register() case doesn't need to call thermal_zone_device_unregister(). Otherwise, rcar-thermal can't register thermal zone again after rebind. This patch fixes it. Signed-off-by: NBui Duc Phuc <bd-phuc@jinso.co.jp> Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Zhang Rui 提交于
Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Peter Robinson 提交于
Not much use unless the SoC is selected so depend on the ARCH_MXC and COMPILE_TEST like all the other thermal drivers. v2: drop extraneous OF Signed-off-by: NPeter Robinson <pbrobinson@gmail.com> Acked-by: NShawn Guo <shawn.guo@linaro.org> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Wei Yongjun 提交于
In case of error, the function of_iomap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. And the function devm_regmap_init_mmio() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: NWei Yongjun <weiyj.lk@gmail.com> Acked-by: NRajendra Nayak <rnayak@codeaurora.org> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Rocky Hao 提交于
In less than 10 ms, the temperature of soc will arise 10 degree. 250 ms is too big for soc tempeture control. Setting 2.5 ms will speed up temperature accessing speed but introduce no more cpu's computing overhead. We set AUTO_PERIOD_TIME and TSADCV3_AUTO_PERIOD_HT_TIME the same value, because normal temperature update speed is also our consern in IPA. Signed-off-by: NRocky Hao <rocky.hao@rock-chips.com> Signed-off-by: NCaesar Wang <wxt@rock-chips.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: Heiko Stuebner <heiko@sntech.de> Cc: linux-pm@vger.kernel.org Tested-by: NStephen Barber <smbarber@chromium.org> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Rocky Hao 提交于
Due to the voltage ripple, the sensing data of the tsadc is not accurate. And in this patch, the bandgap feature is enhanced to remove the voltage ripple, and then the tsadc can sense the temperature more precisely. Obsolete codes are removed as well. Signed-off-by: NRocky Hao <rocky.hao@rock-chips.com> Signed-off-by: NCaesar Wang <wxt@rock-chips.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Heiko Stuebner <heiko@sntech.de> Cc: linux-pm@vger.kernel.org Tested-by: NStephen Barber <smbarber@chromium.org> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Arnd Bergmann 提交于
The newly added tsens-8916 driver produces warnings when CONFIG_PM is disabled: drivers/thermal/qcom/tsens.c:53:12: error: 'tsens_resume' defined but not used [-Werror=unused-function] static int tsens_resume(struct device *dev) ^~~~~~~~~~~~ drivers/thermal/qcom/tsens.c:43:12: error: 'tsens_suspend' defined but not used [-Werror=unused-function] static int tsens_suspend(struct device *dev) ^~~~~~~~~~~~~ This marks both functions __maybe_unused to let the compiler know that they might be used in other configurations, without adding ugly #ifdef logic. Signed-off-by: NArnd Bergmann <arnd@arndb.de> Reviewed-by: NRajendra Nayak <rnayak@codeaurora.org> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Jia Hongtao 提交于
This driver add thermal management support by enabling TMU (Thermal Monitoring Unit) on QorIQ platform. It's based on thermal of framework: - Trip points defined in device tree. - Cpufreq as cooling device registered in qoriq cpufreq driver. Signed-off-by: NJia Hongtao <hongtao.jia@nxp.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Kuninori Morimoto 提交于
rcar-thermal is supporting both thermal_zone_of_sensor_register() and thermal_zone_device_register(). But thermal_zone_of_sensor_register() doesn't enable hwmon as default. This patch enables it to keep compatibility Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Keerthy 提交于
Currently thermal zone set_emul_temp is set unconditionally with of_thermal_set_emul_temp function. Set this only if the set_emul_temp hook is provided for thermal_zone_of_device_ops. This fixes emul_temp failures on platforms for which set_emul_temp hook is not populated. Fixes: "184a4bf6 (thermal: of: Extend current of-thermal.c code to allow setting emulated temp)" Suggested-by: NEduardo Valentin <edubezval@gmail.com> Signed-off-by: NKeerthy <j-keerthy@ti.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com> Conflicts: drivers/thermal/of-thermal.c Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Caesar Wang 提交于
The hardware-tracked trips will set the alarm interrupt value for registers. Then when the thermal zone has no trips to be set, That make the thermal trips callback a over range value. The root cause is the rk_tsadcv2_temp_to_code() function to handle the invalid temperature range is indeed incorrect, let's fix it on now. Otherwise, the thermal alarm interrupt will be triggered all the time on some SoCs. Fox example: localhost tmp # grep thermal /proc/interrupts; sleep 5; grep thermal /proc/interrupts 23: 994830 .. GICv3 129 Level rockchip_thermal 23: 1003423 .. GICv3 129 Level rockchip_thermal Reported-by: NRocky Hao <rocky.hao@rock-chips.com> Signed-off-by: NCaesar Wang <wxt@rock-chips.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: Heiko Stuebner <heiko@sntech.de> Cc: linux-pm@vger.kernel.org Signed-off-by: NEduardo Valentin <edubezval@gmail.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Caesar Wang 提交于
We should increase the period cycles to save power since the rk3399 has the high frequency for tsadc clock. Fixes commit b0d70338 ("thermal: rockchip: Support the RK3399 SoCs in thermal driver") Signed-off-by: NCaesar Wang <wxt@rock-chips.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: Heiko Stuebner <heiko@sntech.de> Cc: linux-pm@vger.kernel.org Signed-off-by: NEduardo Valentin <edubezval@gmail.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Caesar Wang 提交于
Whenever the current temperature is updated, the trip points immediately below and above the current temperature are found. A sensor driver callback `set_trips' is then called with the temperatures. Lastly, The sensor will trigger the hardware high temperature interrupts to increase the sampleing rate and throttle frequency to limit the temperature rising When performing passive cooling. Signed-off-by: NCaesar Wang <wxt@rock-chips.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: linux-pm@vger.kernel.org Tested-by: NStephen Barber <smbarber@chromium.org> Signed-off-by: NEduardo Valentin <edubezval@gmail.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Sascha Hauer 提交于
With interrupt driven thermal zones we pass the lower and upper temperature on which shall be acted, so in the governor we have to act on the exact lower temperature to be consistent. Otherwise an interrupt maybe generated on the exact lower temperature, but the bang bang governor does not react since The polling driven zones have to be one step cooler before the governor reacts. Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NCaesar Wang <wxt@rock-chips.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: linux-pm@vger.kernel.org Acked-by: NPeter Feuerer <peter@piie.net> Signed-off-by: NEduardo Valentin <edubezval@gmail.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Sascha Hauer 提交于
The .get_trend callback in struct thermal_zone_device_ops has the prototype: int (*get_trend) (struct thermal_zone_device *, int, enum thermal_trend *); whereas the .get_trend callback in struct thermal_zone_of_device_ops has: int (*get_trend)(void *, long *); Streamline both prototypes and add the trip argument to the OF callback aswell and use enum thermal_trend * instead of an integer pointer. While the OF prototype may be the better one, this should be decided at framework level and not on OF level. Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NCaesar Wang <wxt@rock-chips.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: linux-pm@vger.kernel.org Reviewed-by: NKeerthy <j-keerthy@ti.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Sascha Hauer 提交于
This patch implements .set_trips for device tree thermal zones. As the hardware-tracked trip points is supported by thermal core patch[0]. patch[0] "thermal: Add support for hardware-tracked trip points". Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NCaesar Wang <wxt@rock-chips.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Reviewed-by: NJavi Merino <javi.merino@arm.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Sascha Hauer 提交于
This adds support for hardware-tracked trip points to the device tree thermal sensor framework. The framework supports an arbitrary number of trip points. Whenever the current temperature is updated, the trip points immediately below and above the current temperature are found. A .set_trips callback is then called with the temperatures. If there is no trip point above or below the current temperature, the passed trip temperature will be -INT_MAX or INT_MAX respectively. In this callback, the driver should program the hardware such that it is notified when either of these trip points are triggered. When a trip point is triggered, the driver should call `thermal_zone_device_update' for the respective thermal zone. This will cause the trip points to be updated again. If .set_trips is not implemented, the framework behaves as before. This patch is based on an earlier version from Mikko Perttunen <mikko.perttunen@kapsi.fi> Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NCaesar Wang <wxt@rock-chips.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: linux-pm@vger.kernel.org Reviewed-by: NJavi Merino <javi.merino@arm.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Eduardo Valentin 提交于
Trivial: remove the following: drivers/thermal/qcom/tsens-8916.c:103:24: warning: symbol 'ops_8916' was not declared. Should it be static? drivers/thermal/qcom/tsens-8996.c:76:24: warning: symbol 'ops_8996' was not declared. Should it be static? drivers/thermal/qcom/tsens-8974.c:235:24: warning: symbol 'ops_8974' was not declared. Should it be static? drivers/thermal/qcom/tsens-8960.c:279:24: warning: symbol 'ops_8960' was not declared. Should it be static? Cc: Zhang Rui <rui.zhang@intel.com> Cc: Rajendra Nayak <rnayak@codeaurora.org> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: NEduardo Valentin <edubezval@gmail.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Rajendra Nayak 提交于
The TSENS controller in 8996 family of SoCs is capable of converting the ADC code outputs to real temperature values (in decidegree Celsius). It can also be programmed to provide raw ADC code, but the secure software on 8996 programs it to provide real temperatures and also does the needed calibrations. We check the valid bit to ensure valid data is read by the AHB master. And the spec recommends the below algorithm to read data 3 consecutive times, which takes care of the worst case delay taken to propagate the updated data to the register. Signed-off-by: NRajendra Nayak <rnayak@codeaurora.org> Signed-off-by: NEduardo Valentin <edubezval@gmail.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Rajendra Nayak 提交于
8960 family of SoCs have the TSENS device as part of GCC, hence the driver probes the virtual child device created by GCC and uses the parent to extract all DT properties and reuses the GCC regmap. Also GCC/TSENS are part of a domain thats not always ON. Hence add .suspend and .resume hooks to save and restore some of the inited register context. Also 8960 family have some of the TSENS init sequence thats required to be done by the HLOS driver (some later versions of TSENS do not export these registers to non-secure world, and hence need these initializations to be done by secure bootloaders) 8660 from the same family has just one sensor and hence some register offset/layout differences which need special handling in the driver. Based on the original code from Siddartha Mohanadoss, Stephen Boyd and Narendran Rajan. Signed-off-by: NRajendra Nayak <rnayak@codeaurora.org> Signed-off-by: NEduardo Valentin <edubezval@gmail.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-