linux/drivers/hwmon
Sascha Hauer 17e8351a77 thermal: consistently use int for temperatures
The thermal code uses int, long and unsigned long for temperatures
in different places.

Using an unsigned type limits the thermal framework to positive
temperatures without need. Also several drivers currently will report
temperatures near UINT_MAX for temperatures below 0°C. This will probably
immediately shut the machine down due to overtemperature if started below
0°C.

'long' is 64bit on several architectures. This is not needed since INT_MAX °mC
is above the melting point of all known materials.

Consistently use a plain 'int' for temperatures throughout the thermal code and
the drivers. This only changes the places in the drivers where the temperature
is passed around as pointer, when drivers internally use another type this is
not changed.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
Reviewed-by: Darren Hart <dvhart@linux.intel.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Peter Feuerer <peter@piie.net>
Cc: Punit Agrawal <punit.agrawal@arm.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Jean Delvare <jdelvare@suse.de>
Cc: Peter Feuerer <peter@piie.net>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: linux-acpi@vger.kernel.org
Cc: platform-driver-x86@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-omap@vger.kernel.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Darren Hart <dvhart@infradead.org>
Cc: lm-sensors@lm-sensors.org
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2015-08-03 23:15:50 +08:00
..
pmbus kconfig: use bool instead of boolean for type definition attributes 2015-01-07 13:08:04 +01:00
Kconfig Char/Misc driver patches for 4.2-rc1 2015-06-26 14:51:15 -07:00
Makefile Char/Misc driver patches for 4.2-rc1 2015-06-26 14:51:15 -07:00
ab8500.c hwmon: (ab8500) Call kernel_power_off instead of pm_power_off 2014-10-03 08:19:02 -07:00
abituguru.c hwmon: drop owner assignment from platform_drivers 2014-10-20 16:20:36 +02:00
abituguru3.c hwmon: drop owner assignment from platform_drivers 2014-10-20 16:20:36 +02:00
abx500.c hwmon: (abx500) Fix format string warnings 2015-01-25 21:23:59 -08:00
abx500.h hwmon: Add ST-Ericsson ABX500 hwmon driver 2013-04-16 18:27:52 -07:00
acpi_power_meter.c ACPI: Clean up inclusions of ACPI header files 2013-12-07 01:03:14 +01:00
ad7314.c hwmon: (ad7314) Do proper sign extension 2015-01-25 21:23:59 -08:00
ad7414.c hwmon: (ad7414) Convert to devm_hwmon_device_register_with_groups 2014-08-04 07:01:35 -07:00
ad7418.c hwmon: (ad7418) Convert to devm_hwmon_device_register_with_groups 2014-08-04 07:01:35 -07:00
adc128d818.c hwmon: (adc128d818) Do proper sign extension 2015-01-25 21:24:00 -08:00
adcxx.c hwmon: (adcxx) Remove redundant spi_set_drvdata 2013-10-18 09:12:01 -07:00
adm1021.c hwmon: (adm1021) Avoid forward declaration 2014-08-04 07:01:36 -07:00
adm1025.c hwmon: (adm1025) Fix vrm write operation 2014-08-05 19:44:36 -07:00
adm1026.c hwmon: (adm1026) Fix vrm write operation 2014-08-05 19:44:36 -07:00
adm1029.c hwmon: (adm1029) Convert to devm_hwmon_device_register_with_groups 2014-08-04 07:01:35 -07:00
adm1031.c hwmon: (adm1031) Convert to devm_hwmon_device_register_with_groups 2014-08-04 07:01:37 -07:00
adm9240.c hwmon: (adm9240) Convert to devm_hwmon_device_register_with_groups 2014-08-04 07:01:37 -07:00
ads1015.c hwmon: (ads1015) Use of_property_read_u32 at appropriate places 2014-09-22 11:14:51 -07:00
ads7828.c hwmon: (ads7828) Check return value of devm_regmap_init_i2c 2015-02-22 20:10:30 -08:00
ads7871.c hwmon: Fix CamelCase checkpatch warnings 2013-04-07 21:16:40 -07:00
adt7x10.c hwmon: (adt7x10) Add alarm interrupt support 2013-04-07 21:16:38 -07:00
adt7x10.h hwmon: (adt7x10) Add alarm interrupt support 2013-04-07 21:16:38 -07:00
adt7310.c hwmon: (adt7310) Use spi_w8r16be() instead spi_w8r16() 2013-10-03 13:52:15 +01:00
adt7410.c hwmon: (adt7x10) Add alarm interrupt support 2013-04-07 21:16:38 -07:00
adt7411.c hwmon: (adt7411) Convert to devm_hwmon_device_register_with_groups 2014-08-04 07:01:40 -07:00
adt7462.c hwmon: (adt7462) Convert to devm_hwmon_device_register_with_groups 2014-08-04 07:01:39 -07:00
adt7470.c hwmon: (adt7470) Convert to devm_hwmon_device_register_with_groups 2014-08-04 07:01:39 -07:00
adt7475.c Update Jean Delvare's e-mail address 2014-01-29 20:40:08 +01:00
amc6821.c hwmon: (amc6821) Convert to devm_hwmon_device_register_with_groups 2014-08-04 07:01:35 -07:00
applesmc.c hwmon: drop owner assignment from platform_drivers 2014-10-20 16:20:36 +02:00
asb100.c hwmon: (asb100) Fix vrm write operation 2014-08-05 19:44:36 -07:00
asc7621.c hwmon: (asc7621) Make map tables const 2014-08-04 07:01:38 -07:00
asus_atk0110.c fs.h, drivers/hwmon/asus_atk0110.c: fix DEFINE_SIMPLE_ATTRIBUTE semicolon definition and use 2014-08-06 18:01:23 -07:00
atxp1.c hwmon: (atxp1) Drop auto-detection 2015-05-31 22:58:36 -07:00
coretemp.c coretemp: Replace cpu_sibling_mask() with topology_sibling_cpumask() 2015-05-27 15:22:15 +02:00
da9052-hwmon.c hwmon: drop owner assignment from platform_drivers 2014-10-20 16:20:36 +02:00
da9055-hwmon.c hwmon: drop owner assignment from platform_drivers 2014-10-20 16:20:36 +02:00
dell-smm-hwmon.c hwmon: (dell-smm-hwmon) Use a valid name attribute 2015-07-01 13:56:27 -07:00
dme1737.c hwmon: drop owner assignment from platform_drivers 2014-10-20 16:20:36 +02:00
ds620.c hwmon: (ds620) Convert to devm_hwmon_device_register_with_groups 2014-08-04 07:01:38 -07:00
ds1621.c hwmon: (ds1621) Update zbits after conversion rate change 2014-08-28 11:18:47 -07:00
emc6w201.c hwmon: (emc6w201) Fix temperature limit range 2014-08-05 17:49:12 -07:00
emc1403.c hwmon: Make regmap configs const 2014-08-04 07:01:35 -07:00
emc2103.c hwmon: (emc2103) Convert to devm_hwmon_device_register_with_groups 2014-08-04 07:01:40 -07:00
f71805f.c hwmon: drop owner assignment from platform_drivers 2014-10-20 16:20:36 +02:00
f71882fg.c hwmon: drop owner assignment from platform_drivers 2014-10-20 16:20:36 +02:00
f75375s.c hwmon: (f75375s) Don't crash the kernel unnecessarily 2013-10-13 16:16:27 -07:00
fam15h_power.c hwmon: (fam15h_power) Fix NB device ID for F16h M30h 2014-11-11 10:39:45 -08:00
fschmd.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
g760a.c hwmon: (g760a) Convert to devm_hwmon_device_register_with_groups 2014-08-04 07:01:37 -07:00
g762.c hwmon: (g762) fix call to devm_hwmon_device_register_with_groups() 2014-11-19 14:06:47 -08:00
gl518sm.c hwmon: (gl518sm) Convert to devm_hwmon_device_register_with_groups 2014-08-04 07:01:36 -07:00
gl520sm.c hwmon: (gl520sm) Convert to devm_hwmon_device_register_with_groups 2014-08-04 07:01:36 -07:00
gpio-fan.c hwmon: (gpio-fan) Move the thermal registration after registration is complete 2015-04-08 20:34:43 -07:00
hih6130.c hwmon: (hih6130) Fix missing hih6130->write_length setting 2014-08-05 19:40:27 -07:00
htu21.c hwmon: (htu21) Convert to devm_hwmon_device_register_with_groups 2014-08-04 07:01:35 -07:00
hwmon-vid.c hwmon: (hwmon-vid) Add __maybe_unused attribute to dummy variable 2013-09-10 06:28:17 -07:00
hwmon.c hwmon: Do not accept invalid name attributes 2014-03-03 08:01:06 -08:00
i5k_amb.c hwmon: drop owner assignment from platform_drivers 2014-10-20 16:20:36 +02:00
i5500_temp.c hwmon: (i5500_temp) Convert to use ATTRIBUTE_GROUPS macro 2015-01-24 14:16:22 +01:00
ibmaem.c hwmon: ibmaem: Use ktime_get_ns() 2014-07-23 15:01:44 -07:00
ibmpex.c hwmon: (ibmpex) Allow format string checking 2015-03-09 09:59:35 -07:00
ibmpowernv.c hwmon: (ibmpowernv) Fix build error seen for some configurations 2015-04-08 21:03:39 -07:00
iio_hwmon.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
ina2xx.c hwmon: (ina2xx) replace ina226_avg_bits() with find_closest() 2015-04-17 09:03:54 -04:00
ina209.c hwmon: (ina209) Convert to use devm_hwmon_device_register_with_groups 2013-10-18 09:11:57 -07:00
it87.c hwmon: (it87) Use feature macros on sio_data 2015-04-09 06:39:11 -07:00
jc42.c hwmon: (jc42) Add support for additional IDT temperature sensors 2015-03-09 09:59:35 -07:00
jz4740-hwmon.c hwmon: drop owner assignment from platform_drivers 2014-10-20 16:20:36 +02:00
k8temp.c hwmon: remove DEFINE_PCI_DEVICE_TABLE macro 2014-01-14 21:36:30 -08:00
k10temp.c hwmon: (k10temp) Convert to devm_hwmon_device_register_with_groups 2014-09-22 11:14:52 -07:00
lineage-pem.c hwmon: (lineage-pem) Convert to devm_hwmon_device_register_with_groups 2014-08-04 07:01:37 -07:00
lm63.c hwmon: (lm63) Fix smatch warnings 2014-08-04 07:01:36 -07:00
lm70.c hwmon: (lm70) Convert to use devm_hwmon_device_register_with_groups 2014-05-21 16:02:20 -07:00
lm73.c hwmon: (lm73) Convert to use devm_hwmon_device_register_with_groups 2013-10-13 16:16:28 -07:00
lm75.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
lm75.h hwmon: (lm75.h) Update header inclusion 2013-03-18 21:19:49 +01:00
lm77.c hwmon: (lm77) Prevent overflow problem when writing large limits 2014-07-31 09:41:46 -07:00
lm78.c hwmon: drop owner assignment from platform_drivers 2014-10-20 16:20:36 +02:00
lm80.c hwmon: (lm80) Rearrange code to avoid forward declarations 2014-05-21 16:02:26 -07:00
lm83.c hwmon: (lm83) Convert to use devm_hwmon_device_register_with_groups 2014-05-21 16:02:26 -07:00
lm85.c hwmon: (lm85) use find_closest() in x_TO_REG() functions 2015-04-17 09:03:55 -04:00
lm87.c hwmon: (lm87) Fix vrm write operation 2014-08-05 19:44:42 -07:00
lm90.c hwmon: (lm90) Convert to use hwmon_device_register_with_groups 2014-04-04 18:01:35 +02:00
lm92.c hwmon: (lm92) Prevent overflow problem when writing large limits 2014-08-05 17:48:52 -07:00
lm93.c hwmon: (lm93) Convert to devm_hwmon_device_register_with_groups 2014-08-04 07:01:36 -07:00
lm95234.c hwmon: (lm95234) Add support for LM95233 2014-12-02 06:11:53 -08:00
lm95241.c hwmon: (lm95241) Avoid initializing the same field twice 2014-03-03 08:01:04 -08:00
lm95245.c hwmon: (lm95245) Add support for LM95235 2014-12-02 03:44:18 -08:00
ltc2945.c hwmon: Make regmap configs const 2014-08-04 07:01:35 -07:00
ltc4151.c hwmon: (ltc4151) Convert to devm_hwmon_device_register_with_groups 2014-06-12 08:36:47 -07:00
ltc4215.c hwmon: (ltc4215) Convert to devm_hwmon_device_register_with_groups 2014-03-03 08:01:05 -08:00
ltc4222.c hwmon: Make regmap configs const 2014-08-04 07:01:35 -07:00
ltc4245.c hwmon: (ltc4245) Remove devicetree conditionals 2014-03-03 08:01:05 -08:00
ltc4260.c hwmon: Make regmap configs const 2014-08-04 07:01:35 -07:00
ltc4261.c hwmon: (ltc4261) fix coccinelle warnings 2013-10-18 09:12:00 -07:00
max197.c hwmon: (max197) Constify platform_device_id 2015-05-31 22:58:36 -07:00
max1111.c hwmon: (max1111) remove unnecessary OOM messages 2014-05-21 16:02:22 -07:00
max1619.c hwmon: (max1619) Convert to use devm_hwmon_device_register_with_groups 2014-05-21 16:02:25 -07:00
max1668.c hwmon: (max1668) Make max1668_addr_list array const 2014-08-04 07:01:39 -07:00
max6639.c hwmon: (max6639) Make normal_i2c array const 2014-08-04 07:01:39 -07:00
max6642.c Update Jean Delvare's e-mail address 2014-01-29 20:40:08 +01:00
max6650.c hwmon: (max6650) Introduce local 'dev' variable 2014-03-03 08:01:06 -08:00
max6697.c hwmon: (max6697) Use of_property_read_bool at appropriate places 2014-08-04 07:01:40 -07:00
max16065.c hwmon: (max16065) Use PTR_ERR_OR_ZERO 2014-08-04 07:01:38 -07:00
mc13783-adc.c hwmon: drop owner assignment from platform_drivers 2014-10-20 16:20:36 +02:00
mcp3021.c hwmon: (mcp3021) Fix broken output scaling 2015-07-01 13:56:27 -07:00
menf21bmc_hwmon.c Merge branch 'platform/remove_owner' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next 2014-11-03 19:53:56 -08:00
nct6683.c hwmon: (nct6683) Add missing sysfs attribute initialization 2015-05-29 17:47:42 -07:00
nct6775.c hwmon: (nct6775) Add missing sysfs attribute initialization 2015-05-29 17:47:33 -07:00
nct7802.c hwmon: (nct7802) Fix integer overflow seen when writing voltage limits 2015-07-29 20:06:50 -07:00
nct7904.c hwmon: (nct7904) Rename pwm attributes to match hwmon ABI 2015-07-29 20:06:46 -07:00
ntc_thermistor.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
pc87360.c hwmon: drop owner assignment from platform_drivers 2014-10-20 16:20:36 +02:00
pc87427.c hwmon: drop owner assignment from platform_drivers 2014-10-20 16:20:36 +02:00
pcf8591.c Update Jean Delvare's e-mail address 2014-01-29 20:40:08 +01:00
powr1220.c hwmon: Add support for Lattice's POWR1220 power manager IC 2014-08-04 07:01:33 -07:00
pwm-fan.c hwmon: (pwm-fan) Update the duty cycle inorder to control the pwm-fan 2015-04-12 15:59:11 -07:00
s3c-hwmon.c hwmon: drop owner assignment from platform_drivers 2014-10-20 16:20:36 +02:00
sch56xx-common.c hwmon: Fix checkpatch warning 'quoted string split across lines' 2013-04-07 21:16:40 -07:00
sch56xx-common.h watchdog: sch56xx: Use watchdog core 2012-05-30 07:55:38 +02:00
sch5627.c hwmon: drop owner assignment from platform_drivers 2014-10-20 16:20:36 +02:00
sch5636.c hwmon: drop owner assignment from platform_drivers 2014-10-20 16:20:36 +02:00
sht15.c hwmon: (sht15) Constify platform_device_id 2015-05-31 22:58:36 -07:00
sht21.c hwmon: (sht21) Convert to devm_hwmon_device_register_with_groups 2014-08-04 07:01:38 -07:00
shtc1.c hwmon: add support for Sensirion SHTC1 sensor 2014-06-12 08:36:48 -07:00
sis5595.c hwmon: drop owner assignment from platform_drivers 2014-10-20 16:20:36 +02:00
smm665.c hwmon: (smm665) Convert to devm_hwmon_device_register_with_groups 2014-08-04 07:01:37 -07:00
smsc47b397.c hwmon: drop owner assignment from platform_drivers 2014-10-20 16:20:36 +02:00
smsc47m1.c hwmon: drop owner assignment from platform_drivers 2014-10-20 16:20:36 +02:00
smsc47m192.c hwmon: (smsc47m192) Convert to devm_hwmon_device_register_with_groups 2014-08-04 07:01:39 -07:00
tc74.c hwmon: add driver for Microchip TC74 2015-06-21 22:54:53 -07:00
thmc50.c hwmon: (thmc50) Convert to devm_hwmon_device_register_with_groups 2014-08-04 07:01:39 -07:00
tmp102.c thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
tmp103.c hwmon: (tmp103) Fix resource leak bug in tmp103 temperature sensor driver 2014-09-22 11:11:48 -07:00
tmp401.c hwmon: (tmp401) Do not auto-detect chip on I2C address 0x37 2015-05-29 13:37:06 -07:00
tmp421.c hwmon: (tmp421) Drop FSF mailing address 2014-08-04 07:01:38 -07:00
twl4030-madc-hwmon.c hwmon: drop owner assignment from platform_drivers 2014-10-20 16:20:36 +02:00
ultra45_env.c hwmon: drop owner assignment from platform_drivers 2014-10-20 16:20:36 +02:00
vexpress.c hwmon: (pwm-fan, vexpress) Constify of_device_id array 2015-03-16 13:00:32 -07:00
via-cputemp.c hwmon: drop owner assignment from platform_drivers 2014-10-20 16:20:36 +02:00
via686a.c hwmon: drop owner assignment from platform_drivers 2014-10-20 16:20:36 +02:00
vt1211.c hwmon: drop owner assignment from platform_drivers 2014-10-20 16:20:36 +02:00
vt8231.c hwmon: drop owner assignment from platform_drivers 2014-10-20 16:20:36 +02:00
w83l785ts.c hwmon: Avoid initializing the same field twice 2014-04-04 18:01:34 +02:00
w83l786ng.c hwmon: (w83l786ng) Convert to devm_hwmon_device_register_with_groups 2014-08-04 07:01:34 -07:00
w83627ehf.c hwmon: (w83627ehf) Use swap() in w82627ehf_swap_tempreg() 2015-07-03 14:39:06 +02:00
w83627hf.c hwmon: drop owner assignment from platform_drivers 2014-10-20 16:20:36 +02:00
w83781d.c hwmon: drop owner assignment from platform_drivers 2014-10-20 16:20:36 +02:00
w83791d.c hwmon: (w83791d) Fix vrm write operation 2014-08-05 19:44:42 -07:00
w83792d.c hwmon: (w83792d) Additional PWM outputs support 2015-07-03 14:39:05 +02:00
w83793.c hwmon: (w83793) Fix vrm write operation 2014-08-05 19:44:42 -07:00
w83795.c hwmon: (w83795) use find_closest_descending() in pwm_freq_to_reg() 2015-04-17 09:03:55 -04:00
wm831x-hwmon.c hwmon: drop owner assignment from platform_drivers 2014-10-20 16:20:36 +02:00
wm8350-hwmon.c hwmon: drop owner assignment from platform_drivers 2014-10-20 16:20:36 +02:00