Commit Graph

161 Commits

Author SHA1 Message Date
Devendra Naga 043e4652bf thermal: exynos_thermal: return a proper error code while thermal_zone_device_register fail.
we are returning EINVAL while the thermal_zone_device_register function fail.
instead we can use the return value from the thermal_zone_device_register by
using PTR_ERR.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-03-11 23:09:29 +08:00
Devendra Naga fb84d9907f thermal: rcar_thermal: propagate return value of thermal_zone_device_register
thermal_zone_device_register returns a value contained in the pointer itself
use PTR_ERR to obtain the address and return it at the end.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-03-11 23:09:24 +08:00
Sachin Kamat aa3b5d222d Thermal: kirkwood: Convert to devm_ioremap_resource()
Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() which provides more consistent error handling.

devm_ioremap_resource() provides its own error messages; so all explicit
error messages can be removed from the failure code paths.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
Acked-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-03-11 23:09:18 +08:00
Sachin Kamat 5095526faf Thermal: rcar: Convert to devm_ioremap_resource()
Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() which provides more consistent error handling.

devm_ioremap_resource() provides its own error messages; so all explicit
error messages can be removed from the failure code paths.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-03-11 23:09:12 +08:00
Sachin Kamat 6bc51b6622 Thermal: dove: Convert to devm_ioremap_resource()
Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() which provides more consistent error handling.

devm_ioremap_resource() provides its own error messages; so all explicit
error messages can be removed from the failure code paths.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-03-11 23:09:02 +08:00
Wei Yongjun f0e68fc3ca thermal: rcar: fix missing unlock on error in rcar_thermal_update_temp()
Add the missing unlock before return from function rcar_thermal_update_temp()
in the error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-03-11 23:08:33 +08:00
Linus Torvalds 19cc90f58d Fix mis-merge of intel_powerclamp.c resulting in compile error
The new intel_powerclamp thermal cooling device driver was merged in
commit 2af78448ff (Pull thermal management updates from Zhang Rui)
without any data conflicts.  But there was a more subtle conflict I
missed: the driver uses MAX_USER_RT_PRIO, but commit 8bd75c77b7
("sched/rt: Move rt specific bits into new header file") had moved that
define from <linux/sched.h> to <linux/sched/rt.h>.

Which caused this build failure:

  drivers/thermal/intel_powerclamp.c: In function ‘clamp_thread’:
  drivers/thermal/intel_powerclamp.c:360:21: error: ‘MAX_USER_RT_PRIO’ undeclared (first use in this function)
  drivers/thermal/intel_powerclamp.c:360:21: note: each undeclared identifier is reported only once for each function it appears in

And because I don't do a full "make allmodconfig" build after each pull,
I didn't notice until too late.  So now the fix is here, separately from
the merge commit.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-28 20:23:09 -08:00
Linus Torvalds 2af78448ff Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
Pull thermal management updates from Zhang Rui:
 "Highlights:

   - introduction of Dove thermal sensor driver.

   - introduction of Kirkwood thermal sensor driver.

   - introduction of intel_powerclamp thermal cooling device driver.

   - add interrupt and DT support for rcar thermal driver.

   - add thermal emulation support which allows platform thermal driver
     to do software/hardware emulation for thermal issues."

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (36 commits)
  thermal: rcar: remove __devinitconst
  thermal: return an error on failure to register thermal class
  Thermal: rename thermal governor Kconfig option to avoid generic naming
  thermal: exynos: Use the new thermal trend type for quick cooling action.
  Thermal: exynos: Add support for temperature falling interrupt.
  Thermal: Dove: Add Themal sensor support for Dove.
  thermal: Add support for the thermal sensor on Kirkwood SoCs
  thermal: rcar: add Device Tree support
  thermal: rcar: remove machine_power_off() from rcar_thermal_notify()
  thermal: rcar: add interrupt support
  thermal: rcar: add read/write functions for common/priv data
  thermal: rcar: multi channel support
  thermal: rcar: use mutex lock instead of spin lock
  thermal: rcar: enable CPCTL to use hardware TSC deciding
  thermal: rcar: use parenthesis on macro
  Thermal: fix a build warning when CONFIG_THERMAL_EMULATION cleared
  Thermal: fix a wrong comment
  thermal: sysfs: Add a new sysfs node emul_temp for thermal emulation
  PM: intel_powerclamp: off by one in start_power_clamp()
  thermal: exynos: Miscellaneous fixes to support falling threshold interrupt
  ...
2013-02-28 19:48:26 -08:00
Tejun Heo 6deb69face thermal: convert to idr_alloc()
Convert to the much saner new idr interface.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-27 19:10:19 -08:00
Arnd Bergmann f5b6d45f8c thermal: rcar: remove __devinitconst
commit 76cc18874 "thermal: rcar: add Device Tree support"
added device tree support for this driver, but also added
an instance of __devinitconst, which is no longer defined

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Zhang Rui <rui.zhang@intel.com>
2013-02-22 17:38:40 +08:00
Richard Guy Briggs da28d966f6 thermal: return an error on failure to register thermal class
The return code from the registration of the thermal class is used to
unallocate resources, but this failure isn't passed back to the caller of
thermal_init.  Return this failure back to the caller.

This bug was introduced in changeset 4cb18728 which overwrote the return code
when the variable was re-used to catch the return code of the registration of
the genetlink thermal socket family.

Signed-off-by: Richard Guy Briggs <rbriggs@redhat.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-02-22 17:38:40 +08:00
Zhang Rui 9d185d0417 Thermal: rename thermal governor Kconfig option to avoid generic naming
Currently, we have three Kconfig options for thermal governors, aka,
CONFIG_FAIR_SHARE, CONFIG_USER_SPACE and CONFIG_STEP_WISE.
But these names are too generic that may bring confusion to users.

Rename them to CONFIG_THERMAL_GOV_FAIR_SHARE,
CONFIG_THERMAL_GOV_USER_SPACE, CONFIG_THERMAL_GOV_STEP_WISE
to avoid the generic naming.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-02-08 20:33:42 +08:00
Amit Daniel Kachhap ce760ed3f4 thermal: exynos: Use the new thermal trend type for quick cooling action.
This patch uses the quick thermal cooling trend type macros. This is needed
as exynos5 and other thermal sensors now supports only interrupt method for
thresold temperature check.

Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-02-08 20:26:14 +08:00
Jonghwa Lee 4f0a684781 Thermal: exynos: Add support for temperature falling interrupt.
This patch introduces using temperature falling interrupt in exynos
thermal driver. Former patch, it only use polling way to check
whether if system themperature is fallen. However, exynos SOC also
provides temperature falling interrupt way to do same things by hw.
This feature is not supported in exynos4210.

Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-02-08 20:26:07 +08:00
Andrew Lunn 74ffa64c23 Thermal: Dove: Add Themal sensor support for Dove.
The Marvell Dove SoC has a thermal sensor. Add a driver using the
thermal framework.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-02-08 20:26:02 +08:00
Nobuhiro Iwamatsu 7060aa3664 thermal: Add support for the thermal sensor on Kirkwood SoCs
This patch adds support for Kirkwood 88F6282 and 88F6283 thermal sensor.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-02-08 20:25:56 +08:00
Kuninori Morimoto 76cc188749 thermal: rcar: add Device Tree support
Support for loading the Renesas R-Car thermal module via devicetree.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-02-08 20:25:36 +08:00
Kuninori Morimoto e6e053f4e4 thermal: rcar: remove machine_power_off() from rcar_thermal_notify()
Machine/System power-off is run in thermal frame work if
it become critical temperature.
This patch removed pointless machine_power_off()
from thermal_zone_device_ops :: .notify

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-02-06 14:13:59 +08:00
Kuninori Morimoto e0a5172e9e thermal: rcar: add interrupt support
This patch adds interrupt support for R-Car thermal driver.

New generation R-Car thermal sensor interrupt controller was
different from old generation.
This patch supports new generation sensor only,
since the old generation interrupt controller had never been used before,
and will never be used in the future.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-02-06 14:13:59 +08:00
Kuninori Morimoto e9137a582f thermal: rcar: add read/write functions for common/priv data
R-Car thermal driver will use struct common in next
feature (interrupt support).
But the register address is different between struct priv and common.
This patch adds read/write functions for struct common,
and use macro technique to avoid wrong register access.

This is preparation patch for next feature (interrupt support),
therefore, there is no user to use this common read/write
function at this point.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-02-06 14:13:58 +08:00
Kuninori Morimoto 3676d1dd3d thermal: rcar: multi channel support
R-Car thermal sensor will be multi channel sensor in next generation.
But "IRQ controlling method" and "register mapping" are
different between old/new chip.

This patch adds multi sensor support.
Then, this driver assumes there is common register
if platform has IRQ resource.

The IRQ will be supported soon.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-02-06 14:13:58 +08:00
Kuninori Morimoto b2bbc6a2ac thermal: rcar: use mutex lock instead of spin lock
Current R-Car thermal driver is using spin lock for each
registers read/write, but it is pointless lock.
This lock is required while reading temperature,
but it needs long wait (= 300ms).
So, this patch used mutex lock while reading temperature,
instead of spin lock for each registers.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-02-06 14:13:57 +08:00
Kuninori Morimoto f8f53e1874 thermal: rcar: enable CPCTL to use hardware TSC deciding
If CPCTL was 1 on R-Car thermal, the thermal comparator offset
is automatically decided by hardware.
And this CPCTL is the conditions which validate interrupt.
This patch enabled CPCTL.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-02-06 14:13:57 +08:00
Kuninori Morimoto 9dde8f8608 thermal: rcar: use parenthesis on macro
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-02-06 14:13:57 +08:00
Zhang Rui 5e20b2e51d Thermal: fix a build warning when CONFIG_THERMAL_EMULATION cleared
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-02-06 14:13:56 +08:00
Zhang Rui 475f41c3ab Thermal: fix a wrong comment
"level" parameter of get_cpu_frequency equals cooling state
of cpu cooling device, and it starts from 0.

Fix the misleading comment.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-02-06 14:13:56 +08:00
Amit Daniel Kachhap e6e238c38b thermal: sysfs: Add a new sysfs node emul_temp for thermal emulation
This patch adds support to set the emulated temperature method in
thermal zone (sensor). After setting this feature thermal zone may
report this temperature and not the actual temperature. The emulation
implementation may be based on sensor capability through platform
specific handler or pure software emulation if no platform handler defined.

This is useful in debugging different temperature threshold and its
associated cooling action. Critical threshold's cannot be emulated.
Writing 0 on this node should disable emulation.

Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-02-06 13:45:42 +08:00
Dan Carpenter c8165dc0ea PM: intel_powerclamp: off by one in start_power_clamp()
This value has already been clamped correctly to 0 through 49 in
powerclamp_set_cur_state() so this patch doesn't actually change
anything.  But we should fix it anyway for consistency.

set_target_ratio is used as an offset into an array with
MAX_TARGET_RATIO (50) elements.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-02-06 13:45:39 +08:00
Amit Daniel Kachhap 3ad9524a15 thermal: exynos: Miscellaneous fixes to support falling threshold interrupt
Below fixes are done to support falling threshold interrupt,
* Falling interrupt status macro corrected according to exynos5 data sheet.
* The get trend function modified to calculate trip temperature correctly.
* The clearing of interrupt status in the isr is now done after handling
  the event that caused the interrupt.

Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-02-06 13:45:19 +08:00
Jacob Pan d6d71ee4a1 PM: Introduce Intel PowerClamp Driver
Intel PowerClamp driver performs synchronized idle injection across
all online CPUs. The goal is to maintain a given package level C-state
ratio.

Compared to other throttling methods already exist in the kernel,
such as ACPI PAD (taking CPUs offline) and clock modulation, this is often
more efficient in terms of performance per watt.

Please refer to Documentation/thermal/intel_powerclamp.txt for more details.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-02-06 13:45:00 +08:00
Thierry Reding ca36b1ba8c thermal: Convert to devm_ioremap_resource()
Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.

devm_ioremap_resource() provides its own error messages so all explicit
error messages can be removed from the failure code paths.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 12:21:47 -08:00
Eduardo Valentin 6b2aa51d69 thermal: check for invalid trip setup when registering thermal device
This patch adds an extra check in the data structure while registering
a thermal device. The check is to avoid registering zones with a number
of trips greater than zero, but with no .get_trip_temp nor .get_trip_type
callbacks. Receiving such data structure may end in wrong data access.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Reviewed-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-01-17 15:09:22 +08:00
Eduardo Valentin 923e0b1e8d thermal: cleanup: use dev_* helper functions
Change the logging messages to used dev_* helper functions.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Reviewed-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-01-16 10:47:18 +08:00
Eduardo Valentin ba38bb8c72 thermal: remove unnecessary include
No need for spinlocks in this file, then removing its header.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Reviewed-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-01-16 10:47:02 +08:00
Eduardo Valentin 8ab3e6a08a thermal: Use thermal zone device id in netlink messages
This patch changes the function thermal_generate_netlink_event
to receive a thermal zone device instead of a originator id.

This way, the messages will always be bound to a thermal zone.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Reviewed-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-01-16 10:46:46 +08:00
Sachin Kamat c076fc42a4 thermal: db8500: Use of_match_ptr() macro in db8500_cpufreq_cooling.c
This eliminates having an #ifdef returning NULL for the case
when OF is disabled.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Reviewed-by: Hongbo Zhang <hongbo.zhang@stericsson.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-01-04 15:40:03 +08:00
Sachin Kamat c313637641 thermal: db8500: Use of_match_ptr() macro in db8500_thermal.c
This eliminates having an #ifdef returning NULL for the case
when OF is disabled.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Reviewed-by: Hongbo Zhang <hongbo.zhang@stericsson.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-01-04 15:39:32 +08:00
Sachin Kamat caa5cbd5a1 thermal: exynos: Use of_match_ptr() macro
This eliminates having an #ifdef returning NULL for the case
when OF is disabled.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-01-04 15:38:55 +08:00
Julia Lawall 03b79bda8d drivers/thermal/spear_thermal.c: use devm_clk_get
devm_clk_get allocates a resource that is released when a driver detaches.
This patch uses devm_clk_get for data that is allocated in the probe
function of a platform device and is only released in the remove function.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-01-04 15:38:25 +08:00
kuninori.morimoto.gx@renesas.com d2a73e225d thermal: rcar: add .get_trip_type/temp and .notify support
This patch adds .get_trip_type(), .get_trip_temp(), and .notify()
on rcar_thermal_zone_ops.
Driver will try platform power OFF if it reached to
critical temperature.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-01-04 15:37:45 +08:00
Jonghwa Lee bbf63be4f3 Thermal: exynos: Add sysfs node supporting exynos's emulation mode.
This patch supports exynos's emulation mode with newly created sysfs node.
Exynos 4x12 (4212, 4412) and 5 series provide emulation mode for thermal
management unit. Thermal emulation mode supports software debug for TMU's
operation. User can set temperature manually with software code and TMU
will read current temperature from user value not from sensor's value.
This patch includes also documentary placed under Documentation/thermal/.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-01-04 15:22:37 +08:00
Zhang Rui b8bb6cb999 step_wise: Unify the code for both throttle and dethrottle
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-01-04 15:22:37 +08:00
Zhang Rui 3dbfff3dfe Introduce THERMAL_TREND_RAISE/DROP_FULL support for step_wise governor
step_wise governor should set the device cooling state to
upper/lower limit directly when THERMAL_TREND_RAISE/DROP_FULL.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-01-04 15:22:37 +08:00
Greg Kroah-Hartman 4eab7a9eb2 Drivers: thermal: remove __dev* attributes.
CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
markings need to be removed.

This change removes the use of __devinit, __devexit_p, __devinitdata,
and __devexit from these drivers.

Based on patches originally written by Bill Pemberton, but redone by me
in order to handle some of the coding style issues better, by hand.

Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-03 15:57:02 -08:00
Linus Torvalds a2013a13e6 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
Pull trivial branch from Jiri Kosina:
 "Usual stuff -- comment/printk typo fixes, documentation updates, dead
  code elimination."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
  HOWTO: fix double words typo
  x86 mtrr: fix comment typo in mtrr_bp_init
  propagate name change to comments in kernel source
  doc: Update the name of profiling based on sysfs
  treewide: Fix typos in various drivers
  treewide: Fix typos in various Kconfig
  wireless: mwifiex: Fix typo in wireless/mwifiex driver
  messages: i2o: Fix typo in messages/i2o
  scripts/kernel-doc: check that non-void fcts describe their return value
  Kernel-doc: Convention: Use a "Return" section to describe return values
  radeon: Fix typo and copy/paste error in comments
  doc: Remove unnecessary declarations from Documentation/accounting/getdelays.c
  various: Fix spelling of "asynchronous" in comments.
  Fix misspellings of "whether" in comments.
  eisa: Fix spelling of "asynchronous".
  various: Fix spelling of "registered" in comments.
  doc: fix quite a few typos within Documentation
  target: iscsi: fix comment typos in target/iscsi drivers
  treewide: fix typo of "suport" in various comments and Kconfig
  treewide: fix typo of "suppport" in various comments
  ...
2012-12-13 12:00:02 -08:00
Zhang Rui 1f53ef17d3 Thermal: Fix DEFAULT_THERMAL_GOVERNOR
Fix DEFAULT_THERMAL_GOVERNOR to be consistant with the
default governor selected in kernel config file.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-12-12 15:34:48 +08:00
Zhang Rui d567c686ae Thermal: fix a NULL pointer dereference when generic thermal layer is built as a module
[   12.761956] BUG: unable to handle kernel NULL pointer dereference at 0000000000000018
[   12.762016] IP: [<ffffffffa0005277>] handle_thermal_trip+0x47/0x130 [thermal_sys]
[   12.762060] PGD 1fec74067 PUD 1fee5b067 PMD 0
[   12.762127] Oops: 0000 [#1] SMP
[   12.762177] Modules linked in: hid_generic crc32c_intel usbhid hid firewire_ohci(+) e1000e(+) firewire_core crc_itu_t xhci_hcd(+) thermal(+) fan thermal_sys hwmon
[   12.762423] CPU 1
[   12.762443] Pid: 187, comm: modprobe Tainted: G       A     3.7.0-thermal-module+ #25                  /DH77DF
[   12.762496] RIP: 0010:[<ffffffffa0005277>]  [<ffffffffa0005277>] handle_thermal_trip+0x47/0x130 [thermal_sys]
[   12.762682] RSP: 0018:ffff8801fe7ddc18  EFLAGS: 00010282
[   12.762704] RAX: 0000000000000000 RBX: ffff8801ff3e9c00 RCX: ffff8801fdc39800
[   12.762728] RDX: ffff8801fe7ddc24 RSI: 0000000000000001 RDI: ffff8801ff3e9c00
[   12.762764] RBP: ffff8801fe7ddc48 R08: 0000000004000000 R09: ffffffffa001f568
[   12.762797] R10: ffffffff81363083 R11: 0000000000000001 R12: 0000000000000001
[   12.762832] R13: 0000000000000000 R14: 0000000000000001 R15: ffff8801fde73e68
[   12.762866] FS:  00007f5548516700(0000) GS:ffff88021f240000(0000) knlGS:0000000000000000
[   12.762912] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   12.762946] CR2: 0000000000000018 CR3: 00000001fefe2000 CR4: 00000000001407e0
[   12.762979] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   12.763014] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[   12.763048] Process modprobe (pid: 187, threadinfo ffff8801fe7dc000, task ffff8801fe5bdb40)
[   12.763095] Stack:
[   12.763122]  0000000000019640 00000000fdc39800 ffff8801fe7ddc48 ffff8801ff3e9c00
[   12.763225]  0000000000000002 0000000000000000 ffff8801fe7ddc78 ffffffffa00053e7
[   12.763338]  ffff8801ff3e9c00 0000000000006c98 ffffffffa0007480 ffff8801ff3e9c00
[   12.763440] Call Trace:
[   12.763470]  [<ffffffffa00053e7>] thermal_zone_device_update+0x77/0xa0 [thermal_sys]
[   12.763515]  [<ffffffffa0006d38>] thermal_zone_device_register+0x788/0xa88 [thermal_sys]
[   12.763562]  [<ffffffffa001f394>] acpi_thermal_add+0x360/0x4c8 [thermal]
[   12.763598]  [<ffffffff8133902a>] acpi_device_probe+0x50/0x190
[   12.763632]  [<ffffffff811bd793>] ? sysfs_create_link+0x13/0x20
[   12.763666]  [<ffffffff813cc41b>] driver_probe_device+0x7b/0x240
[   12.763699]  [<ffffffff813cc68b>] __driver_attach+0xab/0xb0
[   12.763732]  [<ffffffff813cc5e0>] ? driver_probe_device+0x240/0x240
[   12.763766]  [<ffffffff813ca836>] bus_for_each_dev+0x56/0x90
[   12.763799]  [<ffffffff813cbf4e>] driver_attach+0x1e/0x20
[   12.763831]  [<ffffffff813cbac0>] bus_add_driver+0x190/0x290
[   12.763864]  [<ffffffffa0022000>] ? 0xffffffffa0021fff
[   12.763896]  [<ffffffff813ccbea>] driver_register+0x7a/0x160
[   12.763928]  [<ffffffffa0022000>] ? 0xffffffffa0021fff
[   12.763960]  [<ffffffff813399fb>] acpi_bus_register_driver+0x43/0x45
[   12.763995]  [<ffffffffa002203a>] acpi_thermal_init+0x3a/0x42 [thermal]
[   12.764029]  [<ffffffff8100207f>] do_one_initcall+0x3f/0x170
[   12.764063]  [<ffffffff810b1a5f>] sys_init_module+0x8f/0x200
[   12.764097]  [<ffffffff815ff259>] system_call_fastpath+0x16/0x1b
[   12.764129] Code: 48 8b 87 c8 02 00 00 41 89 f4 48 8d 55 dc ff 50 28 44 8b 6d dc 41 8d 45 fe 83 f8 01 76 5e 48 8b 83 d8 02 00 00 44 89 e6 48 89 df <ff> 50 18 4c 8d a3 10 03 00 00 4c 89 e7 e8 87 f1 5e e1 8b 83 bc
[   12.765164] RIP  [<ffffffffa0005277>] handle_thermal_trip+0x47/0x130 [thermal_sys]
[   12.765223]  RSP <ffff8801fe7ddc18>
[   12.765252] CR2: 0000000000000018
[   12.765284] ---[ end trace 7723294cdfb00d2a ]---

This is because thermal_zone_device_update() is invoked before
any thermal governors being registered.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-12-12 15:23:54 +08:00
Masanari Iida e41e85cc17 treewide: Fix typos in various Kconfig
Correct spelling typo within various Kconfig.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-12-03 11:03:56 +01:00
Kuninori Morimoto d12250ef8d thermal: rcar: add rcar_zone_to_priv() macro
This patch adds rcar_zone_to_priv()
which is a helper macro for gettign private data.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-11-26 11:03:55 +08:00
Kuninori Morimoto c499703e64 thermal: rcar: fixup the unit of temperature
The unit of temperature is Milli-Celsius.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-11-26 11:03:45 +08:00