Skip to content

Commit

Permalink
Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
torvalds committed Jan 31, 2012
2 parents 8e2a288 + ad77c3e commit c5d2bc1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
8 changes: 1 addition & 7 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -4281,13 +4281,6 @@ S: Orphan
F: drivers/video/matrox/matroxfb_*
F: include/linux/matroxfb.h

MAX1668 TEMPERATURE SENSOR DRIVER
M: "David George" <david.george@ska.ac.za>
L: lm-sensors@lm-sensors.org
S: Maintained
F: Documentation/hwmon/max1668
F: drivers/hwmon/max1668.c

MAX6650 HARDWARE MONITOR AND FAN CONTROLLER DRIVER
M: "Hans J. Koch" <hjk@hansjkoch.de>
L: lm-sensors@lm-sensors.org
Expand Down Expand Up @@ -7371,6 +7364,7 @@ S: Supported
F: Documentation/hwmon/wm83??
F: arch/arm/mach-s3c64xx/mach-crag6410*
F: drivers/leds/leds-wm83*.c
F: drivers/hwmon/wm83??-hwmon.c
F: drivers/input/misc/wm831x-on.c
F: drivers/input/touchscreen/wm831x-ts.c
F: drivers/input/touchscreen/wm97*.c
Expand Down
10 changes: 5 additions & 5 deletions drivers/hwmon/f71805f.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,11 @@ static inline long temp_from_reg(u8 reg)

static inline u8 temp_to_reg(long val)
{
if (val < 0)
val = 0;
else if (val > 1000 * 0xff)
val = 0xff;
return ((val + 500) / 1000);
if (val <= 0)
return 0;
if (val >= 1000 * 0xff)
return 0xff;
return (val + 500) / 1000;
}

/*
Expand Down
3 changes: 2 additions & 1 deletion drivers/hwmon/sht15.c
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ static int sht15_invalidate_voltage(struct notifier_block *nb,

static int __devinit sht15_probe(struct platform_device *pdev)
{
int ret = 0;
int ret;
struct sht15_data *data = kzalloc(sizeof(*data), GFP_KERNEL);
u8 status = 0;

Expand All @@ -901,6 +901,7 @@ static int __devinit sht15_probe(struct platform_device *pdev)
init_waitqueue_head(&data->wait_queue);

if (pdev->dev.platform_data == NULL) {
ret = -EINVAL;
dev_err(&pdev->dev, "no platform data supplied\n");
goto err_free_data;
}
Expand Down
6 changes: 6 additions & 0 deletions drivers/hwmon/w83627ehf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1319,6 +1319,7 @@ store_pwm_mode(struct device *dev, struct device_attribute *attr,
{
struct w83627ehf_data *data = dev_get_drvdata(dev);
struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr);
struct w83627ehf_sio_data *sio_data = dev->platform_data;
int nr = sensor_attr->index;
unsigned long val;
int err;
Expand All @@ -1330,6 +1331,11 @@ store_pwm_mode(struct device *dev, struct device_attribute *attr,

if (val > 1)
return -EINVAL;

/* On NCT67766F, DC mode is only supported for pwm1 */
if (sio_data->kind == nct6776 && nr && val != 1)
return -EINVAL;

mutex_lock(&data->update_lock);
reg = w83627ehf_read_value(data, W83627EHF_REG_PWM_ENABLE[nr]);
data->pwm_mode[nr] = val;
Expand Down

0 comments on commit c5d2bc1

Please sign in to comment.