aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-01-30 20:08:40 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-30 20:08:40 -0500
commitc5d2bc11030568966f04a2af35bacf33d3e37af7 (patch)
tree3ecbdea56f5c46ad80dd0486a37e04de6a7cc95c
parent8e2a2880a5c67988104b6f2d5fafac7b78687a9d (diff)
parentad77c3e1808f07fa70f707b1c92a683b7c7d3f85 (diff)
Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (w83627ehf) Disable setting DC mode for pwm2, pwm3 on NCT6776F hwmon: (sht15) fix bad error code MAINTAINERS: Drop maintainer for MAX1668 hwmon driver MAINTAINERS: Add hwmon entries for Wolfson hwmon: (f71805f) Fix clamping of temperature limits
-rw-r--r--MAINTAINERS8
-rw-r--r--drivers/hwmon/f71805f.c10
-rw-r--r--drivers/hwmon/sht15.c3
-rw-r--r--drivers/hwmon/w83627ehf.c6
4 files changed, 14 insertions, 13 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 2bd630d9a103..6803338dc885 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4281,13 +4281,6 @@ S: Orphan
4281F: drivers/video/matrox/matroxfb_* 4281F: drivers/video/matrox/matroxfb_*
4282F: include/linux/matroxfb.h 4282F: include/linux/matroxfb.h
4283 4283
4284MAX1668 TEMPERATURE SENSOR DRIVER
4285M: "David George" <david.george@ska.ac.za>
4286L: lm-sensors@lm-sensors.org
4287S: Maintained
4288F: Documentation/hwmon/max1668
4289F: drivers/hwmon/max1668.c
4290
4291MAX6650 HARDWARE MONITOR AND FAN CONTROLLER DRIVER 4284MAX6650 HARDWARE MONITOR AND FAN CONTROLLER DRIVER
4292M: "Hans J. Koch" <hjk@hansjkoch.de> 4285M: "Hans J. Koch" <hjk@hansjkoch.de>
4293L: lm-sensors@lm-sensors.org 4286L: lm-sensors@lm-sensors.org
@@ -7371,6 +7364,7 @@ S: Supported
7371F: Documentation/hwmon/wm83?? 7364F: Documentation/hwmon/wm83??
7372F: arch/arm/mach-s3c64xx/mach-crag6410* 7365F: arch/arm/mach-s3c64xx/mach-crag6410*
7373F: drivers/leds/leds-wm83*.c 7366F: drivers/leds/leds-wm83*.c
7367F: drivers/hwmon/wm83??-hwmon.c
7374F: drivers/input/misc/wm831x-on.c 7368F: drivers/input/misc/wm831x-on.c
7375F: drivers/input/touchscreen/wm831x-ts.c 7369F: drivers/input/touchscreen/wm831x-ts.c
7376F: drivers/input/touchscreen/wm97*.c 7370F: drivers/input/touchscreen/wm97*.c
diff --git a/drivers/hwmon/f71805f.c b/drivers/hwmon/f71805f.c
index 92f949767ece..6dbfd3e516e4 100644
--- a/drivers/hwmon/f71805f.c
+++ b/drivers/hwmon/f71805f.c
@@ -283,11 +283,11 @@ static inline long temp_from_reg(u8 reg)
283 283
284static inline u8 temp_to_reg(long val) 284static inline u8 temp_to_reg(long val)
285{ 285{
286 if (val < 0) 286 if (val <= 0)
287 val = 0; 287 return 0;
288 else if (val > 1000 * 0xff) 288 if (val >= 1000 * 0xff)
289 val = 0xff; 289 return 0xff;
290 return ((val + 500) / 1000); 290 return (val + 500) / 1000;
291} 291}
292 292
293/* 293/*
diff --git a/drivers/hwmon/sht15.c b/drivers/hwmon/sht15.c
index 6ddeae049058..91fdd1fe18b0 100644
--- a/drivers/hwmon/sht15.c
+++ b/drivers/hwmon/sht15.c
@@ -883,7 +883,7 @@ static int sht15_invalidate_voltage(struct notifier_block *nb,
883 883
884static int __devinit sht15_probe(struct platform_device *pdev) 884static int __devinit sht15_probe(struct platform_device *pdev)
885{ 885{
886 int ret = 0; 886 int ret;
887 struct sht15_data *data = kzalloc(sizeof(*data), GFP_KERNEL); 887 struct sht15_data *data = kzalloc(sizeof(*data), GFP_KERNEL);
888 u8 status = 0; 888 u8 status = 0;
889 889
@@ -901,6 +901,7 @@ static int __devinit sht15_probe(struct platform_device *pdev)
901 init_waitqueue_head(&data->wait_queue); 901 init_waitqueue_head(&data->wait_queue);
902 902
903 if (pdev->dev.platform_data == NULL) { 903 if (pdev->dev.platform_data == NULL) {
904 ret = -EINVAL;
904 dev_err(&pdev->dev, "no platform data supplied\n"); 905 dev_err(&pdev->dev, "no platform data supplied\n");
905 goto err_free_data; 906 goto err_free_data;
906 } 907 }
diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c
index 0e0af0445222..2dfae7d7cc5b 100644
--- a/drivers/hwmon/w83627ehf.c
+++ b/drivers/hwmon/w83627ehf.c
@@ -1319,6 +1319,7 @@ store_pwm_mode(struct device *dev, struct device_attribute *attr,
1319{ 1319{
1320 struct w83627ehf_data *data = dev_get_drvdata(dev); 1320 struct w83627ehf_data *data = dev_get_drvdata(dev);
1321 struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); 1321 struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr);
1322 struct w83627ehf_sio_data *sio_data = dev->platform_data;
1322 int nr = sensor_attr->index; 1323 int nr = sensor_attr->index;
1323 unsigned long val; 1324 unsigned long val;
1324 int err; 1325 int err;
@@ -1330,6 +1331,11 @@ store_pwm_mode(struct device *dev, struct device_attribute *attr,
1330 1331
1331 if (val > 1) 1332 if (val > 1)
1332 return -EINVAL; 1333 return -EINVAL;
1334
1335 /* On NCT67766F, DC mode is only supported for pwm1 */
1336 if (sio_data->kind == nct6776 && nr && val != 1)
1337 return -EINVAL;
1338
1333 mutex_lock(&data->update_lock); 1339 mutex_lock(&data->update_lock);
1334 reg = w83627ehf_read_value(data, W83627EHF_REG_PWM_ENABLE[nr]); 1340 reg = w83627ehf_read_value(data, W83627EHF_REG_PWM_ENABLE[nr]);
1335 data->pwm_mode[nr] = val; 1341 data->pwm_mode[nr] = val;