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/jdelvare/staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  hwmon: (dme1737) Minor cleanups
  hwmon: (dme1737) Add support for in7 for SCH5127
  hwmon: (emc1403) Add EMC1423 support
  hwmon: (w83627hf) Document W83627THF voltage pin mapping
  hwmon: (w83793) Drop useless mutex
  hwmon: (fschmd) Drop useless mutex
  hwmon: (w83781d) Use pr_fmt and pr_<level>
  hwmon: (pc87427) Use pr_fmt and pr_<level>
  hwmon: (pc87360) Use pr_fmt and pr_<level>
  hwmon: (lm78) Use pr_fmt and pr_<level>
  hwmon: (it87) Use pr_fmt and pr_<level>
  hwmon: Schedule the removal of the old intrusion detection interfaces
  hwmon: (w83793) Implement the standard intrusion detection interface
  hwmon: (w83792d) Implement the standard intrusion detection interface
  hwmon: (adm9240) Implement the standard intrusion detection interface
  hwmon: (via686a) Initialize fan_div values
  hwmon: (w83795) Silent false warning from gcc
  hwmon: (ads7828) Update email contact details
  • Loading branch information
Linus Torvalds committed Jan 13, 2011
2 parents 1896a13 + 06f3d9f commit 174a86d
Show file tree
Hide file tree
Showing 21 changed files with 370 additions and 182 deletions.
10 changes: 10 additions & 0 deletions Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -590,3 +590,13 @@ Why: The functions have been superceded by cancel_delayed_work_sync()
Who: Tejun Heo <tj@kernel.org>

----------------------------

What: Legacy, non-standard chassis intrusion detection interface.
When: June 2011
Why: The adm9240, w83792d and w83793 hardware monitoring drivers have
legacy interfaces for chassis intrusion detection. A standard
interface has been added to each driver, so the legacy interface
can be removed.
Who: Jean Delvare <khali@linux-fr.org>

----------------------------
2 changes: 1 addition & 1 deletion Documentation/hwmon/adm9240
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ connected to a normally open switch.
The ADM9240 provides an internal open drain on this line, and may output
a 20 ms active low pulse to reset an external Chassis Intrusion latch.

Clear the CI latch by writing value 1 to the sysfs chassis_clear file.
Clear the CI latch by writing value 0 to the sysfs intrusion0_alarm file.

Alarm flags reported as 16-bit word

Expand Down
2 changes: 1 addition & 1 deletion Documentation/hwmon/ads7828
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Supported chips:
http://focus.ti.com/lit/ds/symlink/ads7828.pdf

Authors:
Steve Hardy <steve@linuxrealtime.co.uk>
Steve Hardy <shardy@redhat.com>

Module Parameters
-----------------
Expand Down
12 changes: 7 additions & 5 deletions Documentation/hwmon/dme1737
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Description
This driver implements support for the hardware monitoring capabilities of the
SMSC DME1737 and Asus A8000 (which are the same), SMSC SCH5027, SCH311x,
and SCH5127 Super-I/O chips. These chips feature monitoring of 3 temp sensors
temp[1-3] (2 remote diodes and 1 internal), 7 voltages in[0-6] (6 external and
temp[1-3] (2 remote diodes and 1 internal), 8 voltages in[0-7] (7 external and
1 internal) and up to 6 fan speeds fan[1-6]. Additionally, the chips implement
up to 5 PWM outputs pwm[1-3,5-6] for controlling fan speeds both manually and
automatically.
Expand Down Expand Up @@ -105,6 +105,7 @@ SCH5127:
in4: V1_IN 0V - 1.5V
in5: VTR (+3.3V standby) 0V - 4.38V
in6: Vbat (+3.0V) 0V - 4.38V
in7: Vtrip (+1.5V) 0V - 1.99V

Each voltage input has associated min and max limits which trigger an alarm
when crossed.
Expand Down Expand Up @@ -217,10 +218,10 @@ cpu0_vid RO CPU core reference voltage in
vrm RW Voltage regulator module version
number.

in[0-6]_input RO Measured voltage in millivolts.
in[0-6]_min RW Low limit for voltage input.
in[0-6]_max RW High limit for voltage input.
in[0-6]_alarm RO Voltage input alarm. Returns 1 if
in[0-7]_input RO Measured voltage in millivolts.
in[0-7]_min RW Low limit for voltage input.
in[0-7]_max RW High limit for voltage input.
in[0-7]_alarm RO Voltage input alarm. Returns 1 if
voltage input is or went outside the
associated min-max range, 0 otherwise.

Expand Down Expand Up @@ -324,3 +325,4 @@ fan5 opt opt
pwm5 opt opt
fan6 opt opt
pwm6 opt opt
in7 yes
22 changes: 22 additions & 0 deletions Documentation/hwmon/w83627hf
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,25 @@ isaset -y -f 0x2e 0xaa

The above sequence assumes a Super-I/O config space at 0x2e/0x2f, but
0x4e/0x4f is also possible.

Voltage pin mapping
-------------------

Here is a summary of the voltage pin mapping for the W83627THF. This
can be useful to convert data provided by board manufacturers into
working libsensors configuration statements.

W83627THF |
Pin | Name | Register | Sysfs attribute
-----------------------------------------------------
100 | CPUVCORE | 20h | in0
99 | VIN0 | 21h | in1
98 | VIN1 | 22h | in2
97 | VIN2 | 24h | in4
114 | AVCC | 23h | in3
61 | 5VSB | 50h (bank 5) | in7
74 | VBAT | 51h (bank 5) | in8

For other supported devices, you'll have to take the hard path and
look up the information in the datasheet yourself (and then add it
to this document please.)
2 changes: 1 addition & 1 deletion Documentation/hwmon/w83793
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ This driver implements support for Winbond W83793G/W83793R chips.

* Chassis
If the case open alarm triggers, it will stay in this state unless cleared
by any write to the sysfs file "chassis".
by writing 0 to the sysfs file "intrusion0_alarm".

* VID and VRM
The VRM version is detected automatically, don't modify the it unless you
Expand Down
4 changes: 2 additions & 2 deletions drivers/hwmon/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -809,10 +809,10 @@ config SENSORS_DME1737
will be called dme1737.

config SENSORS_EMC1403
tristate "SMSC EMC1403 thermal sensor"
tristate "SMSC EMC1403/23 thermal sensor"
depends on I2C
help
If you say yes here you get support for the SMSC EMC1403
If you say yes here you get support for the SMSC EMC1403/23
temperature monitoring chip.

Threshold values can be configured using sysfs.
Expand Down
32 changes: 29 additions & 3 deletions drivers/hwmon/adm9240.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* Alarms 16-bit map of active alarms
* Analog Out 0..1250 mV output
*
* Chassis Intrusion: clear CI latch with 'echo 1 > chassis_clear'
* Chassis Intrusion: clear CI latch with 'echo 0 > intrusion0_alarm'
*
* Test hardware: Intel SE440BX-2 desktop motherboard --Grant
*
Expand Down Expand Up @@ -476,21 +476,46 @@ static ssize_t set_aout(struct device *dev,
static DEVICE_ATTR(aout_output, S_IRUGO | S_IWUSR, show_aout, set_aout);

/* chassis_clear */
static ssize_t chassis_clear(struct device *dev,
static ssize_t chassis_clear_legacy(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
struct i2c_client *client = to_i2c_client(dev);
unsigned long val = simple_strtol(buf, NULL, 10);

dev_warn(dev, "Attribute chassis_clear is deprecated, "
"use intrusion0_alarm instead\n");

if (val == 1) {
i2c_smbus_write_byte_data(client,
ADM9240_REG_CHASSIS_CLEAR, 0x80);
dev_dbg(&client->dev, "chassis intrusion latch cleared\n");
}
return count;
}
static DEVICE_ATTR(chassis_clear, S_IWUSR, NULL, chassis_clear);
static DEVICE_ATTR(chassis_clear, S_IWUSR, NULL, chassis_clear_legacy);

static ssize_t chassis_clear(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
struct i2c_client *client = to_i2c_client(dev);
struct adm9240_data *data = i2c_get_clientdata(client);
unsigned long val;

if (strict_strtoul(buf, 10, &val) || val != 0)
return -EINVAL;

mutex_lock(&data->update_lock);
i2c_smbus_write_byte_data(client, ADM9240_REG_CHASSIS_CLEAR, 0x80);
data->valid = 0; /* Force cache refresh */
mutex_unlock(&data->update_lock);
dev_dbg(&client->dev, "chassis intrusion latch cleared\n");

return count;
}
static SENSOR_DEVICE_ATTR(intrusion0_alarm, S_IRUGO | S_IWUSR, show_alarm,
chassis_clear, 12);

static struct attribute *adm9240_attributes[] = {
&sensor_dev_attr_in0_input.dev_attr.attr,
Expand Down Expand Up @@ -532,6 +557,7 @@ static struct attribute *adm9240_attributes[] = {
&dev_attr_alarms.attr,
&dev_attr_aout_output.attr,
&dev_attr_chassis_clear.attr,
&sensor_dev_attr_intrusion0_alarm.dev_attr.attr,
&dev_attr_cpu0_vid.attr,
NULL
};
Expand Down
4 changes: 2 additions & 2 deletions drivers/hwmon/ads7828.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
This driver is based on the lm75 and other lm_sensors/hwmon drivers
Written by Steve Hardy <steve@linuxrealtime.co.uk>
Written by Steve Hardy <shardy@redhat.com>
Datasheet available at: http://focus.ti.com/lit/ds/symlink/ads7828.pdf
Expand Down Expand Up @@ -271,7 +271,7 @@ static void __exit sensors_ads7828_exit(void)
i2c_del_driver(&ads7828_driver);
}

MODULE_AUTHOR("Steve Hardy <steve@linuxrealtime.co.uk>");
MODULE_AUTHOR("Steve Hardy <shardy@redhat.com>");
MODULE_DESCRIPTION("ADS7828 driver");
MODULE_LICENSE("GPL");

Expand Down
Loading

0 comments on commit 174a86d

Please sign in to comment.