- 03 1月, 2019 1 次提交
-
-
由 Stephen Rothwell 提交于
Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
-
- 02 1月, 2019 15 次提交
-
-
由 Bjorn Andersson 提交于
First correct the edge case to return the last element if we're outside the range, rather than at the last element, so that interpolation is not omitted for points between the two last entries in the table. Then correct the formula to perform linear interpolation based the two points surrounding the read ADC value. The indices for temp are kept as "hi" and "lo" to pair with the adc indices, but there's no requirement that the temperature is provided in descendent order. mult_frac() is used to prevent issues with overflowing the int. Cc: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Yoshihiro Kaneko 提交于
Add support for R-Car E3 (R8A77990) thermal support. Signed-off-by: NYoshihiro Kaneko <ykaneko0929@gmail.com> Reviewed-by: NGeert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: NSimon Horman <horms+renesas@verge.net.au> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Fabrizio Castro 提交于
Add thermal support for the RZ/G2E SoC (a.k.a. R8A774C0). Signed-off-by: NFabrizio Castro <fabrizio.castro@bp.renesas.com> Reviewed-by: NGeert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: NSimon Horman <horms+renesas@verge.net.au> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Miquel Raynal 提交于
The IP can manage to trigger interrupts on overheat situation from all the sensors. However, the interrupt source changes along with the last selected source (ie. the last read sensor), which is an inconsistent behavior. Avoid possible glitches by always selecting back only one channel which will then be referenced as the "overheat_sensor" (arbitrarily: the first in the DT which has a critical trip point filled in). It is possible that the scan of all thermal zone nodes did not bring a critical trip point from which the overheat interrupt could be configured. In this case just complain but do not fail the probe. Also disable sensor switch during overheat situations because changing the channel while the system is too hot could clear the overheat state by changing the source while the temperature is still very high. Even if the overheat state is not declared, overheat interrupt must be cleared by reading the DFX interrupt cause _after_ the temperature has fallen down to the low threshold, otherwise future possible interrupts would not be served. A work polls the corresponding register until the overheat flag gets cleared in this case. Suggested-by: NDavid Sniatkiwicz <davidsn@marvell.com> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Arnd Bergmann 提交于
When STM32_THERMAL is enabled, this overrides all previously enabled files in the same directory, as seen from this link failure: ERROR: "st_thermal_pm_ops" [drivers/thermal/st/st_thermal_syscfg.ko] undefined! ERROR: "st_thermal_register" [drivers/thermal/st/st_thermal_syscfg.ko] undefined! ERROR: "st_thermal_unregister" [drivers/thermal/st/st_thermal_syscfg.ko] undefined! The correct syntax in Makefile requires using += instead of :=. Fixes: 1d693155 ("thermal: add stm32 thermal driver") Signed-off-by: NArnd Bergmann <arnd@arndb.de> Reviewed-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Kunihiko Hayashi 提交于
This converts license boilerplate to SPDX identifier, and removes unnecessary lines. Signed-off-by: NKunihiko Hayashi <hayashi.kunihiko@socionext.com> Reviewed-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Yangtao Li 提交于
Use macro to simplify the code. Signed-off-by: NYangtao Li <tiny.windzz@gmail.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Yangtao Li 提交于
Use macro to simplify the code. Signed-off-by: NYangtao Li <tiny.windzz@gmail.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Anson Huang 提交于
Put return value checks of calling imx_init_from_nvmem_cells() into one block to save one condition block for normal case. Signed-off-by: NAnson Huang <Anson.Huang@nxp.com> Acked-by: NViresh Kumar <viresh.kumar@linaro.org> Reviewed-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Anson Huang 提交于
The thermal driver is a standalone driver for monitoring SoC temperature by enabling thermal sensor, so it can be enabled even when CONFIG_CPU_FREQ is NOT set. So remove the dependency with CPU_THERMAL. Introduce dummy function of legacy cooling register/unregister to make thermal driver probe successfully when CONFIG_CPU_FREQ is NOT set. Signed-off-by: NAnson Huang <Anson.Huang@nxp.com> Acked-by: NViresh Kumar <viresh.kumar@linaro.org> Reviewed-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Srinivas Kandagatla 提交于
Regmap would use device name to create debugfs entries. If the device has multiple regmaps it is recommended to use name field in regmap_config. Fix this by providing name to the regmap configs correctly. Without this patch we would see below error on DB820c. qcom-tsens 4a9000.thermal-sensor: Failed to create 4a9000.thermal-sensor debugfs directory Signed-off-by: NSrinivas Kandagatla <srinivas.kandagatla@linaro.org> Acked-by: NAmit Kucheria <amit.kucheria@linaro.org> Tested-by: NAmit Kucheria <amit.kucheria@linaro.org> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 YueHaibing 提交于
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: NYueHaibing <yuehaibing@huawei.com> Reviewed-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Julia Lawall 提交于
Using devm_thermal_zone_of_sensor_register allows to simplify some error handling code, drop a label, and drop the remove function. Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Reviewed-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Matthias Brugger 提交于
By defaul of-based thermal driver do not enable hwmon. This patch does this explicitly, so that the temperature can be read through the common hwmon sysfs. Signed-off-by: NMatthias Brugger <mbrugger@suse.com> Acked-by: NStefan Wahren <stefan.wahren@i2se.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Eduardo Valentin 提交于
Avoid warnings like this: thermal_hwmon.h:29:1: warning: ‘thermal_remove_hwmon_sysfs’ defined but not used [-Wunused-function] thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz) Fixes: 0dd88793 ("thermal: hwmon: move hwmon support to single file") Reviewed-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
- 21 12月, 2018 1 次提交
-
-
由 Masahiro Yamada 提交于
The Kconfig lexer supports special characters such as '.' and '/' in the parameter context. In my understanding, the reason is just to support bare file paths in the source statement. I do not see a good reason to complicate Kconfig for the room of ambiguity. The majority of code already surrounds file paths with double quotes, and it makes sense since file paths are constant string literals. Make it treewide consistent now. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Acked-by: NWolfram Sang <wsa@the-dreams.de> Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org> Acked-by: NIngo Molnar <mingo@kernel.org>
-
- 11 12月, 2018 4 次提交
-
-
由 David HERNANDEZ SANCHEZ 提交于
Adding brackets allows to multiply the register value, masked by TS1_RAMP_COEFF_MASK, by an ADJUST value properly and not to multiply ADJUST by register value and then mask the whole. Fixes: 1d693155 ("thermal: add stm32 thermal driver") Reviewed-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: NDavid Hernandez Sanchez <david.hernandezsanchez@st.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 David HERNANDEZ SANCHEZ 提交于
Calling stm_thermal_read_factory_settings before clocking internal peripheral causes bad register values and makes temperature computation wrong. Calling stm_thermal_read_factory_settings inside stm_thermal_prepare fixes this problem as internal peripheral is well clocked at this stage. Fixes: 1d693155 ("thermal: add stm32 thermal driver") Reviewed-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: NDavid Hernandez Sanchez <david.hernandezsanchez@st.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Daniel Lezcano 提交于
Without this patch the thermal driver is broken on hi3660. The dual sensors support patchset was partially merged, unfortunately the dual thermal zones definition is not available in the DT yet, so when the driver tries to register all the sensors that fails. By reducing to 1 the number of sensors on the hi3660, we switch back to the previous functionnality. Fixes: 8c6c3684 (thermal/drivers/hisi: Add the dual clusters sensors for hi3660) Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Daniel Lezcano 提交于
Without this patch, the thermal driver on hi6220 and hi3660 is broken. That is due because part of the posted patchset was merged but a small change in the DT was dropped. The hi6220 and hi3660 do not have an interrupt name in the DT, so finding interrupt by name fails. Fix this by returning back to the platform_get_irq() function call. Fixes: 2cffaeff (thermal/drivers/hisi: Use platform_get_irq_byname) Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
- 07 12月, 2018 2 次提交
-
-
由 Amit Kucheria 提交于
This cleans up the directory a bit allowing just one place to look for thermal related drivers for QCOM platforms instead of being scattered in the root directory and the qcom/ subdirectory. Compile-tested with ARCH=arm64 defconfig and the driver explicitly enabled with menuconfig. Signed-off-by: NAmit Kucheria <amit.kucheria@linaro.org> Acked-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Amit Kucheria 提交于
This cleans up the directory a bit, now that we have several other platforms using platform-specific sub-directories. Compile-tested with ARCH=x86 defconfig and the drivers explicitly enabled with menuconfig. Signed-off-by: NAmit Kucheria <amit.kucheria@linaro.org> Acked-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
- 05 12月, 2018 5 次提交
-
-
由 Julia Lawall 提交于
The thermal_zone_of_device_ops structure can be const as it is only passed as the last argument of thermal_zone_of_sensor_register and the corresponding parameter is declared as const. Done with the help of Coccinelle. Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Reviewed-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Julia Lawall 提交于
The thermal_zone_of_device_ops structure can be const as it is only passed as the last argument of devm_thermal_zone_of_sensor_register and the corresponding parameter is declared as const. Done with the help of Coccinelle. Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Reviewed-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Stefan Wahren 提交于
Adopt the SPDX license identifier headers to ease license compliance management. Cc: Martin Sperl <kernel@martin.sperl.org> Signed-off-by: NStefan Wahren <stefan.wahren@i2se.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Russell King 提交于
When the armada thermal module is inserted, removed and then reinserted, the system panics as per the messages below. The reason is that "edit" a live resource in the resource tree twice, and end up with it pointing to some other hardware. Editing live resources (resources that are part of the registered resource tree) is not permissible - the resource tree is an ordered set of resources, sorted by start address, and when a new resource is inserted, it is validated that it (a) fits within its parent resource and (b) does not overlap a neighbouring resource. Get rid of this resource editing. We can instead adjust the return value from ioremap() as ioremap() deals with the creation of page- based mappings - provided the adjustment does not cross a page boundary. SError Interrupt on CPU1, code 0xbf000000 -- SError CPU: 1 PID: 2749 Comm: modprobe Not tainted 4.19.0+ #175 Hardware name: Marvell 8040 MACCHIATOBin Double shot (DT) pstate: 20400085 (nzCv daIf +PAN -UAO) pc : regmap_mmio_read+0x3c/0x60 lr : regmap_mmio_read+0x3c/0x60 sp : ffffff800d453900 x29: ffffff800d453900 x28: ffffff800096a1d0 x27: 0000000000000100 x26: ffffff80009696d8 x25: ffffff8000969000 x24: ffffffc13a588918 x23: ffffffc13a9a28a8 x22: ffffff800d4539dc x21: 0000000000000084 x20: ffffff800d4539dc x19: ffffffc13a5d5480 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000030 x11: 0101010101010101 x10: 7f7f7f7f7f7f7f7f x9 : 0000000000000000 x8 : ffffffc13a5d5a80 x7 : 0000000000000000 x6 : 000000000000003f x5 : 0000000000000000 x4 : 0000000000000000 x3 : ffffff800851be70 x2 : ffffff800851bd60 x1 : ffffff800d492ff8 x0 : 0000000000000000 Kernel panic - not syncing: Asynchronous SError Interrupt CPU: 1 PID: 2749 Comm: modprobe Not tainted 4.19.0+ #175 Hardware name: Marvell 8040 MACCHIATOBin Double shot (DT) Call trace: dump_backtrace+0x0/0x158 show_stack+0x14/0x1c dump_stack+0x90/0xb0 panic+0x128/0x298 print_tainted+0x0/0xa8 arm64_serror_panic+0x74/0x80 do_serror+0x5c/0xb8 el1_error+0xb4/0x144 regmap_mmio_read+0x3c/0x60 _regmap_bus_reg_read+0x18/0x20 _regmap_read+0x64/0x180 regmap_read+0x44/0x6c armada_ap806_init+0x24/0x5c [armada_thermal] armada_thermal_probe+0x2c8/0x37c [armada_thermal] platform_drv_probe+0x4c/0xb0 really_probe+0x21c/0x2b4 driver_probe_device+0x58/0xfc __driver_attach+0xd4/0xd8 bus_for_each_dev+0x50/0xa0 driver_attach+0x20/0x28 bus_add_driver+0x1c4/0x228 driver_register+0x6c/0x124 __platform_driver_register+0x4c/0x54 armada_thermal_driver_init+0x20/0x1000 [armada_thermal] do_one_initcall+0x30/0x204 do_init_module+0x5c/0x1d4 load_module+0x1a88/0x212c __se_sys_finit_module+0xa0/0xac __arm64_sys_finit_module+0x1c/0x24 el0_svc_common+0x94/0xf0 el0_svc_handler+0x24/0x80 el0_svc+0x8/0x3c0 SMP: stopping secondary CPUs Kernel Offset: disabled CPU features: 0x0,21806000 Memory Limit: none Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk> Tested-by: NMiquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Russell King 提交于
Commit 8c0e64ac ("thermal: armada: get rid of the ->is_valid() pointer") removed the unnecessary indirection through a function pointer, but in doing so, also removed the negation operator too: - if (priv->data->is_valid && !priv->data->is_valid(priv)) { + if (armada_is_valid(priv)) { which results in: armada_thermal f06f808c.thermal: Temperature sensor reading not valid armada_thermal f2400078.thermal: Temperature sensor reading not valid armada_thermal f4400078.thermal: Temperature sensor reading not valid at boot, or whenever the "temp" sysfs file is read. Replace the negation operator. Fixes: 8c0e64ac ("thermal: armada: get rid of the ->is_valid() pointer") Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
- 30 11月, 2018 8 次提交
-
-
由 Thara Gopinath 提交于
Sysfs interface to update cooling device cur_state does not currently holding cooling device lock sometimes leading to stale values in cur_state if getting updated simultanelously from user space and thermal framework. Adding the proper locking code fixes this issue. Signed-off-by: NThara Gopinath <thara.gopinath@linaro.org> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Wei Wang 提交于
commit ff140fea ("Thermal: handle thermal zone device properly during system sleep") added PM hook to call thermal zone reset during sleep. However resetting thermal zone will also clear the passive state and thus cancel the polling queue which leads the passive cooling device state not being cleared properly after sleep. thermal_pm_notify => thermal_zone_device_reset set passive to 0 thermal_zone_trip_update will skip update passive as `old_target == instance->target'. monitor_thermal_zone => thermal_zone_device_set_polling will cancel tz->poll_queue, so the cooling device state will not be changed afterwards. Reported-by: NKame Wang <kamewang@google.com> Signed-off-by: NWei Wang <wvw@google.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Wolfram Sang 提交于
We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: NShawn Guo <shawnguo@kernel.org> Reviewed-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Wolfram Sang 提交于
We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Wolfram Sang 提交于
We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Wolfram Sang 提交于
We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NHeiko Stuebner <heiko@sntech.de> Reviewed-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Wolfram Sang 提交于
We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Lukasz Luba 提交于
Clean unused parameter from internal framework function. Signed-off-by: NLukasz Luba <l.luba@partner.samsung.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
- 26 10月, 2018 4 次提交
-
-
由 Geert Uytterhoeven 提交于
The workqueue used for monitoring the hardware may run while the device is already suspended. Fix this by using the freezable system workqueue instead, cfr. commit 51e20d0e ("thermal: Prevent polling from happening during system suspend"). Fixes: 608567aa ("thermal: da9062/61: Thermal junction temperature monitoring driver") Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Acked-by: NSteve Twiss <stwiss.opensource@diasemi.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Geert Uytterhoeven 提交于
When testing bind/unbind on r8a7791/koelsch: WARNING: CPU: 1 PID: 697 at lib/debugobjects.c:329 debug_print_object+0x8c/0xb4 ODEBUG: free active (active state 0) object type: timer_list hint: delayed_work_timer_fn+0x0/0x10 This happens if the workqueue runs after the device has been unbound. Fix this by cancelling any queued work during remove. Fixes: e0a5172e ("thermal: rcar: add interrupt support") Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: NNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Geert Uytterhoeven 提交于
On r8a7791/koelsch, sometimes the following message is printed during system suspend: rcar_thermal e61f0000.thermal: thermal sensor was broken This happens if the workqueue runs while the device is already suspended. Fix this by using the freezable system workqueue instead, cfr. commit 51e20d0e ("thermal: Prevent polling from happening during system suspend"). Fixes: e0a5172e ("thermal: rcar: add interrupt support") Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: NNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Sergei Shtylyov 提交于
Add the R-Car V3H (R8A77980) SoC support to the R-Car gen3 thermal driver. Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com> Reviewed-by: NSimon Horman <horms+renesas@verge.net.au> Reviewed-by: NNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-