- 07 4月, 2017 2 次提交
-
-
由 Steve Twiss 提交于
Add junction temperature monitoring supervisor device driver, compatible with the DA9062 and DA9061 PMICs. A MODULE_DEVICE_TABLE() macro is added. If the PMIC's internal junction temperature rises above T_WARN (125 degC) an interrupt is issued. This T_WARN level is defined as the THERMAL_TRIP_HOT trip-wire inside the device driver. The thermal triggering mechanism is interrupt based and happens when the temperature rises above a given threshold level. The component cannot return an exact temperature, it only has knowledge if the temperature is above or below a given threshold value. A status bit must be polled to detect when the temperature falls below that threshold level again. A kernel work queue is configured to repeatedly poll and detect when the temperature falls below this trip-wire, between 1 and 10 second intervals (defaulting at 3 seconds). This scheme is provided as an example. It would be expected that any final implementation will also include a notify() function and any of these settings could be altered to match the application where appropriate. When over-temperature is reached, the interrupt from the DA9061/2 will be repeatedly triggered. The IRQ is therefore disabled when the first over-temperature event happens and the status bit is polled using a work-queue until it becomes false. This strategy is designed to allow the periodic transmission of uevents (HOT trip point) as the first level of temperature supervision method. It is intended for non-invasive temperature control, where the necessary measures for cooling the system down are left to the host software. Once the temperature falls again, the IRQ is re-enabled so a new critical over-temperature event can be detected. Reviewed-by: NLukasz Luba <lukasz.luba@arm.com> Signed-off-by: NSteve Twiss <stwiss.opensource@diasemi.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Rafał Miłecki 提交于
Northstar is a SoC family commonly used in home routers. This commit adds a driver for checking CPU temperature. As Northstar Plus seems to also have this IP block this new symbol gets ARCH_BCM_IPROC dependency. Signed-off-by: NRafał Miłecki <rafal@milecki.pl> Signed-off-by: NJon Mason <jon.mason@broadcom.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
- 02 4月, 2017 1 次提交
-
-
由 Stefan Wahren 提交于
Add basic thermal driver for bcm2835 SoC. This driver currently make sure that tsense HW block is set up correctly. Tested-by: NRafał Miłecki <rafal@milecki.pl> Signed-off-by: NMartin Sperl <kernel@martin.sperl.org> Signed-off-by: NStefan Wahren <stefan.wahren@i2se.com> Acked-by: NEric Anholt <eric@anholt.net> Acked-by: NEduardo Valentin <edubezval@gmail.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
- 31 3月, 2017 7 次提交
-
-
由 Niklas Söderlund 提交于
To restore operation it's easiest to reinitialise all TSCs. In order to do this the current trip window needs to be stored in the TSC structure so that it can be restored upon resume. Signed-off-by: NNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Niklas Söderlund 提交于
The device match data needs to be accessible outside the probe function, store it in the private data structure. Signed-off-by: NNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: NGeert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Niklas Söderlund 提交于
Enable hardware trip points by implementing the set_trips callback. The thermal core will take care of setting the initial trip point window and to update it once the driver reports a TSC has moved outside it. The interrupt structure for this device is a bit odd. There is not a dedicated IRQ for each TSC, instead the interrupts are shared between all TSCs. IRQn is fired if the temp monitored in IRQTEMPn is reached in any of the TSCs, example IRQ3 is fired if temperature in IRQTEMP3 is reached in either TSC0, TSC1 or TSC2. For this reason the usage of interrupts in this driver is an all-on or all-off design. When an interrupt happens all TSCs are checked and all thermal zones are updated. This could be refined to be more fine grained but the thermal core takes care of only updating the thermal zones that have left their trip point window. Signed-off-by: NNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Niklas Söderlund 提交于
Record how many TSCs are found in struct rcar_gen3_thermal_priv, this is needed to be able to add hardware interrupts for trip points later. Also add a check to make sure at least one TSC is found. Signed-off-by: NNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: NGeert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Niklas Söderlund 提交于
Move the check for a TSC resource before allocating memory for a new TSC. If no TSC is found there is little point in allocating memory for it. Signed-off-by: NNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: NGeert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Niklas Söderlund 提交于
There is no point in protecting a register read with a lock. This is most likely a leftover from when the driver was reworked before being submitted for upstream. Signed-off-by: NNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: NGeert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Niklas Söderlund 提交于
The .thermal_init needs to be delayed a short amount of time to allow for the TEMP register to contain something useful. If it's not delayed these warnings are common during boot: thermal thermal_zone0: failed to read out thermal zone (-5) thermal thermal_zone1: failed to read out thermal zone (-5) thermal thermal_zone2: failed to read out thermal zone (-5) The warnings are triggered by the first call to .get_temp() while the TEMP register contains 0 and rcar_gen3_thermal_get_temp() returns -EIO since a TEMP value of 0 will result in a temperature reading which is out of specifications. This should have been done in the initial commit which adds the driver as the same issue was found and corrected for r8a7795. Fixes: 564e73d2 ("thermal: rcar_gen3_thermal: Add R-Car Gen3 thermal driver") Signed-off-by: NNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: NGeert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
- 30 3月, 2017 3 次提交
-
-
由 Keerthy 提交于
ti_thermal_expose_sensor always takes the devm_thermal_zone_of_sensor_register call for registration with the device tree nodes present for all the bandgap sensors for omap3/4/5 and dra7 family. There are large chunks of unused code. Removing all of them. Signed-off-by: NKeerthy <j-keerthy@ti.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Keerthy 提交于
Now that slope and offset data are being passed from device tree no need to populate in driver data. Signed-off-by: NKeerthy <j-keerthy@ti.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Keerthy 提交于
Currently slope and offset values for calculating the hot spot temperature of a thermal zone is being taken directly from driver data. So fetch them from device tree. Signed-off-by: NKeerthy <j-keerthy@ti.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
- 02 3月, 2017 1 次提交
-
-
由 Ingo Molnar 提交于
We are going to move scheduler ABI details to <uapi/linux/sched/types.h>, which will be used from a number of .c files. Create empty placeholder header that maps to <linux/types.h>. Include the new header in the files that are going to need it. Acked-by: NLinus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Signed-off-by: NIngo Molnar <mingo@kernel.org>
-
- 19 2月, 2017 7 次提交
-
-
由 Vivek Gautam 提交于
Sparse throws following warnings: drivers/thermal/mtk_thermal.c:186:11: warning: symbol 'mt8173_bank_data' was not declared. Should it be static? drivers/thermal/mtk_thermal.c:193:11: warning: symbol 'mt8173_msr' was not declared. Should it be static? drivers/thermal/mtk_thermal.c:197:11: warning: symbol 'mt8173_adcpnp' was not declared. Should it be static? drivers/thermal/mtk_thermal.c:201:11: warning: symbol 'mt8173_mux_values' was not declared. Should it be static? drivers/thermal/mtk_thermal.c:204:11: warning: symbol 'mt2701_bank_data' was not declared. Should it be static? drivers/thermal/mtk_thermal.c:208:11: warning: symbol 'mt2701_msr' was not declared. Should it be static? drivers/thermal/mtk_thermal.c:212:11: warning: symbol 'mt2701_adcpnp' was not declared. Should it be static? drivers/thermal/mtk_thermal.c:216:11: warning: symbol 'mt2701_mux_values' was not declared. Should it be static? Make these variables as static to fix these warnings. Signed-off-by: NVivek Gautam <vivek.gautam@codeaurora.org> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Keerthy 提交于
No configuration needs to be done for TSHUT from software. Hence remove all the unnecessary definitions. Signed-off-by: NKeerthy <j-keerthy@ti.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Keerthy 提交于
Technical Reference Manual [1] mandates that software should not be configuring the thermal shutdown thresholds. Hence removing TSHUT_CONFIG. [1] http://www.ti.com/lit/ug/sprui30b/sprui30b.pdfSigned-off-by: NKeerthy <j-keerthy@ti.com> Reported-by: NRavikumar Kattekola <rk@ti.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Keerthy 提交于
Currently when CPU_THERMAL is not defined the thermal sensors are not even exposed consequently no cooling is possible. CPU_THERMAL eventually depends on CPUFREQ. CPPUFREQ is not the only cooling for CPU. The thermal shutdown for critical temperatures is another cooling solution which will currently not get enabled if CPU_THERMAL is not defined. Remove this dependency so as to have the last level of thermal protection working even without CPUFREQ defined. Signed-off-by: NKeerthy <j-keerthy@ti.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Shailendra Verma 提交于
of_device_get_match_data could return NULL, and so can cause a NULL pointer dereference later. Signed-off-by: NShailendra Verma <shailendra.v@samsung.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Krzysztof Kozlowski 提交于
The property samsung,tmu_cal_mode is not used and not used. We can safely remove it. Signed-off-by: NKrzysztof Kozlowski <krzk@kernel.org> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Baoyou Xie 提交于
This patch adds thermal driver for ZTE's zx2967 family. Signed-off-by: NBaoyou Xie <baoyou.xie@linaro.org> Reviewed-by: NMathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
- 10 2月, 2017 1 次提交
-
-
由 Arnd Bergmann 提交于
Putting a bare cpumask structure on the stack produces a warning on large SMP configurations: drivers/thermal/cpu_cooling.c: In function 'cpufreq_state2power': drivers/thermal/cpu_cooling.c:644:1: warning: the frame size of 1056 bytes is larger than 1024 bytes [-Wframe-larger-than=] drivers/thermal/cpu_cooling.c: In function '__cpufreq_cooling_register': drivers/thermal/cpu_cooling.c:898:1: warning: the frame size of 1104 bytes is larger than 1024 bytes [-Wframe-larger-than=] The recommended workaround is to use cpumask_var_t, which behaves just like a normal cpu mask in most cases, but turns into a dynamic allocation when CONFIG_CPUMASK_OFFSTACK is set. Signed-off-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NViresh Kumar <viresh.kumar@linaro.org> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
- 07 2月, 2017 1 次提交
-
-
由 Augusto Mecking Caringi 提交于
In poll_pkg_cstate() function, the variables jiffies_last and jiffies_now are set but never used. This has been detected by building the driver with W=1: drivers/thermal/intel_powerclamp.c: In function ‘poll_pkg_cstate’: drivers/thermal/intel_powerclamp.c:464:23: warning: variable ‘jiffies_last’ set but not used [-Wunused-but-set-variable] static unsigned long jiffies_last; ^ Signed-off-by: NAugusto Mecking Caringi <augustocaringi@gmail.com> Acked-by: NJacob Pan <jacob.jun.pan@linux.intel.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
- 30 1月, 2017 1 次提交
-
-
由 Viresh Kumar 提交于
This patch updates dev_pm_opp_find_freq_*() routines to get a reference to the OPPs returned by them. Also updates the users of dev_pm_opp_find_freq_*() routines to call dev_pm_opp_put() after they are done using the OPPs. As it is guaranteed the that OPPs wouldn't get freed while being used, the RCU read side locking present with the users isn't required anymore. Drop it as well. This patch also updates all users of devfreq_recommended_opp() which was returning an OPP received from the OPP core. Note that some of the OPP core routines have gained rcu_read_{lock|unlock}() calls, as those still use RCU specific APIs within them. Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com> [Devfreq] Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 25 1月, 2017 1 次提交
-
-
由 Fabio Estevam 提交于
This reverts commit 7611fb68 ("thermal: thermal_hwmon: Convert to hwmon_device_register_with_info()"). Pavel Machek reported breakage in the Nokia N900 due to this commit. We can revisit a proper fix for the warning later. Reported-by: NPavel Machek <pavel@ucw.cz> Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com> Acked-by: NGuenter Roeck <linux@roeck-us.net> Acked-by: NPavel Machek <pavel@ucw.cz> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
- 20 1月, 2017 1 次提交
-
-
由 Wolfram Sang 提交于
Add support for R-Car Gen3 thermal sensors. Polling only for now, interrupts will be added incrementally. Same goes for reading fuses. This is documented already, but no hardware available for now. Signed-off-by: NHien Dang <hien.dang.eb@renesas.com> Signed-off-by: NThao Nguyen <thao.nguyen.yb@rvc.renesas.com> Signed-off-by: NKhiem Nguyen <khiem.nguyen.xt@renesas.com> Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> [Niklas: document and rework temperature calculation] Signed-off-by: NNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
- 17 1月, 2017 1 次提交
-
-
由 Caesar Wang 提交于
As Ayaka reported the thermal was abormal on rk3288 at booting time. thermal thermal_zone1: critical temperature reached(125 C),shutting down thermal thermal_zone2: critical temperature reached(125 C),shutting down thermal thermal_zone1: critical temperature reached(125 C),shutting down thermal thermal_zone2: critical temperature reached(125 C),shutting down ... The root caused by reading the invald analogic value, the value is zero will convert the 125 degree to trigger the critical temperature. Fixes it with insteading of the incorrect reading now. Fixes commit cadf29dc ("thermal: rockchip: optimize the conversion table") Reported-by: Nayaka <ayaka@soulik.info> Signed-off-by: NCaesar Wang <wxt@rock-chips.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
- 06 1月, 2017 1 次提交
-
-
由 Jacob von Chorus 提交于
The device_unregister call in thermal_zone_device_unregister causes the thermal_zone_device structure to be freed before the call to free the dynamically allocated attribute groups. This leads to a kernel panic. Furthermore, the 4 calls to free the trip point attribute structures occur before the call to unregister the device, leading to a kernel panic when sysfs attempts to access the attributes to remove them. Here is an example of a kernel panic when the cpu thermal zones are removed upon cpu offline: BUG: unable to handle kernel NULL pointer dereference at (null) IP: strlen+0x0/0x20 <snip> Call Trace: ? kernfs_name_hash+0x17/0x80 kernfs_find_ns+0x3f/0xd0 kernfs_remove_by_name_ns+0x36/0xa0 remove_files.isra.1+0x36/0x70 sysfs_remove_group+0x44/0x90 sysfs_remove_groups+0x2e/0x50 device_remove_attrs+0x5e/0x90 device_del+0x1ea/0x350 device_unregister+0x1a/0x60 thermal_zone_device_unregister+0x1f2/0x210 pkg_thermal_cpu_offline+0x14f/0x1a0 [x86_pkg_temp_thermal] ? kzalloc.constprop.2+0x10/0x10 [x86_pkg_temp_thermal] cpuhp_invoke_callback+0x8d/0x3f0 cpuhp_down_callbacks+0x42/0x80 cpuhp_thread_fun+0x8b/0xf0 smpboot_thread_fn+0x110/0x160 kthread+0x101/0x140 ? sort_range+0x30/0x30 ? kthread_park+0x90/0x90 ret_from_fork+0x25/0x30 This patch moves the kfree calls to clean up the dynamic attributes to the thermal_class's thermal_zone_device release function. 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 Tested-by: NYasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> Signed-off-by: NJacob von Chorus <jacobvonchorus@cwphoto.ca> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
- 04 1月, 2017 5 次提交
-
-
由 Matthew Wilcox 提交于
thermal devfreq cooling does not use the ability to look up pointers by ID, so convert it from using an IDR to the more space-efficient IDA. Signed-off-by: NMatthew Wilcox <mawilcox@microsoft.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Matthew Wilcox 提交于
thermal cpu cooling does not use the ability to look up pointers by ID, so convert it from using an IDR to the more space-efficient IDA. The cooling_cpufreq_lock was being used to protect cpufreq_dev_count as well as the IDR. Rather than keep the mutex to protect a single integer, I expanded the scope of cooling_list_lock to also cover cpufreq_dev_count. We could also convert cpufreq_dev_count into an atomic. Signed-off-by: NMatthew Wilcox <mawilcox@microsoft.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Matthew Wilcox 提交于
thermal clock cooling does not use the ability to look up pointers by ID, so convert it from using an IDR to the more space-efficient IDA. Signed-off-by: NMatthew Wilcox <mawilcox@microsoft.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Matthew Wilcox 提交于
The thermal core does not use the ability to look up pointers by ID, so convert it from using an IDR to the more space-efficient IDA. Signed-off-by: NMatthew Wilcox <mawilcox@microsoft.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Fabio Estevam 提交于
Booting Linux on a mx6q based board leads to the following warning: (NULL device *): hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info(). ,so do as suggested. Also, this results in the core taking care of creating the 'name' attribute, so drop the code doing that from the thermal driver. Suggested-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
- 14 12月, 2016 5 次提交
-
-
由 Caesar Wang 提交于
In some cases, some sensors didn't need the trip points, the set_trips will pass {-INT_MAX, INT_MAX} to trigger tsadc alarm in the end, ignore this case and disable the high temperature interrupt. Signed-off-by: NCaesar Wang <wxt@rock-chips.com> Reviewed-by: NBrian Norris <briannorris@chromium.org> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Caesar Wang 提交于
In order to support the valid temperature can conver to analog value. The rockchip thermal driver has not supported the all valid temperature to convert the analog value. (e.g.: 61C, 62C, 63C....) For example: In some cases, we need adjust the trip point. $cd /sys/class/thermal/thermal_zone* $echo 68000 > trip_point_0_temp That will return the max analogic value indicates the invalid before posting this patch. So, this patch will optimize the conversion table to support the other cases. Signed-off-by: NCaesar Wang <wxt@rock-chips.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Caesar Wang 提交于
The temp_to_code function will return 0 when we set the temperature to a invalid value (e.g. 61C, 62C, 63C....), that's unpractical. This patch will prevent this case happening. That will return the max analog value to indicate the temperature is invalid or over table temperature range. Signed-off-by: NCaesar Wang <wxt@rock-chips.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Brian Norris 提交于
This driver passes struct chip_tsadc_table by value throughout; this is inefficient, and AFAICT, there is no reason for it. Let's pass pointers instead. Signed-off-by: NBrian Norris <briannorris@chromium.org> Reviewed-by: NCaesar Wang <wxt@rock-chips.com> Signed-off-by: NCaesar Wang <wxt@rock-chips.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Brian Norris 提交于
These error messages don't give much information about what went wrong. It would be nice, for one, to see what invalid temperature was being requested when conversion fails. It's also good to return an error when we can't handle a conversion properly. While we're at it, fix the grammar too. Signed-off-by: NBrian Norris <briannorris@chromium.org> Signed-off-by: NCaesar Wang <wxt@rock-chips.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
- 10 12月, 2016 1 次提交
-
-
由 Thomas Gleixner 提交于
One include less is always a good thing(tm). Good riddance. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Signed-off-by: NBorislav Petkov <bp@suse.de> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lkml.kernel.org/r/20161209182912.2726-6-bp@alien8.deSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
-
- 30 11月, 2016 1 次提交
-
-
Install the callbacks via the state machine and let the core invoke the callbacks on the already online CPUs. Replace the wrmsr/rdmrs_on_cpu() calls in the hotplug callbacks as they are guaranteed to be invoked on the incoming/outgoing cpu. Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Tested-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-