Skip to content

Commit

Permalink
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6
Browse files Browse the repository at this point in the history
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6: (36 commits)
  [PATCH] hwmon: add required idr locking
  [PATCH] I2C: hwmon: Rename register parameters
  [PATCH] I2C: Drop unneeded i2c-dev.h includes
  [PATCH] I2C: i2c-ixp4xx: Add hwmon class
  [PATCH] I2C: i2c-piix4: Add Broadcom HT-1000 support
  [PATCH] I2C: i2c-amd756-s4882: Improve static mutex initialization
  [PATCH] I2C: i2c-ali1535: Drop redundant mutex
  [PATCH] i2c: Cleanup isp1301_omap
  [PATCH] i2c: Fix i2c-ite name initialization
  [PATCH] i2c: Drop the i2c-frodo bus driver
  [PATCH] i2c: Optimize core_lists mutex usage
  [PATCH] w83781d: Don't reset the chip by default
  [PATCH] w83781d: Document the alarm and beep bits
  [PATCH] w83627ehf: Refactor the sysfs interface
  [PATCH] hwmon: Support the Pentium M VID code
  [PATCH] hwmon: Add support for the Winbond W83687THF
  [PATCH] hwmon: f71805f semaphore to mutex conversions
  [PATCH] hwmon: Semaphore to mutex conversions
  [PATCH] i2c: Semaphore to mutex conversions, part 3
  [PATCH] i2c: Semaphore to mutex conversions, part 2
  ...
  • Loading branch information
Linus Torvalds committed Mar 23, 2006
2 parents a3ea9b5 + ded2b66 commit b6585de
Show file tree
Hide file tree
Showing 81 changed files with 1,706 additions and 1,786 deletions.
4 changes: 4 additions & 0 deletions Documentation/hwmon/w83627hf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ Supported chips:
Prefix: 'w83637hf'
Addresses scanned: ISA address retrieved from Super I/O registers
Datasheet: http://www.winbond.com/PDF/sheet/w83637hf.pdf
* Winbond W83687THF
Prefix: 'w83687thf'
Addresses scanned: ISA address retrieved from Super I/O registers
Datasheet: Provided by Winbond on request

Authors:
Frodo Looijaard <frodol@dds.nl>,
Expand Down
24 changes: 24 additions & 0 deletions Documentation/hwmon/w83781d
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ Module parameters
Use 'init=0' to bypass initializing the chip.
Try this if your computer crashes when you load the module.

* reset int
(default 0)
The driver used to reset the chip on load, but does no more. Use
'reset=1' to restore the old behavior. Report if you need to do this.

force_subclients=bus,caddr,saddr,saddr
This is used to force the i2c addresses for subclients of
a certain chip. Typical usage is `force_subclients=0,0x2d,0x4a,0x4b'
Expand Down Expand Up @@ -123,6 +128,25 @@ When an alarm goes off, you can be warned by a beeping signal through
your computer speaker. It is possible to enable all beeping globally,
or only the beeping for some alarms.

Individual alarm and beep bits:

0x000001: in0
0x000002: in1
0x000004: in2
0x000008: in3
0x000010: temp1
0x000020: temp2 (+temp3 on W83781D)
0x000040: fan1
0x000080: fan2
0x000100: in4
0x000200: in5
0x000400: in6
0x000800: fan3
0x001000: chassis
0x002000: temp3 (W83782D and W83627HF only)
0x010000: in7 (W83782D and W83627HF only)
0x020000: in8 (W83782D and W83627HF only)

If an alarm triggers, it will remain triggered until the hardware register
is read at least once. This means that the cause for the alarm may
already have disappeared! Note that in the current implementation, all
Expand Down
2 changes: 1 addition & 1 deletion Documentation/i2c/busses/i2c-piix4
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Supported adapters:
* Intel 82371AB PIIX4 and PIIX4E
* Intel 82443MX (440MX)
Datasheet: Publicly available at the Intel website
* ServerWorks OSB4, CSB5 and CSB6 southbridges
* ServerWorks OSB4, CSB5, CSB6 and HT-1000 southbridges
Datasheet: Only available via NDA from ServerWorks
* Standard Microsystems (SMSC) SLC90E66 (Victory66) southbridge
Datasheet: Publicly available at the SMSC website http://www.smsc.com
Expand Down
5 changes: 3 additions & 2 deletions Documentation/i2c/busses/scx200_acb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ Module Parameters
-----------------

* base: int
Base addresses for the ACCESS.bus controllers
Base addresses for the ACCESS.bus controllers on SCx200 and SC1100 devices

Description
-----------

Enable the use of the ACCESS.bus controllers of a SCx200 processor.
Enable the use of the ACCESS.bus controller on the Geode SCx200 and
SC1100 processors and the CS5535 and CS5536 Geode companion devices.
7 changes: 4 additions & 3 deletions drivers/hwmon/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -406,13 +406,14 @@ config SENSORS_W83L785TS
will be called w83l785ts.

config SENSORS_W83627HF
tristate "Winbond W83627HF, W83627THF, W83637HF, W83697HF"
depends on HWMON && I2C && EXPERIMENTAL
tristate "Winbond W83627HF, W83627THF, W83637HF, W83687THF, W83697HF"
depends on HWMON && I2C
select I2C_ISA
select HWMON_VID
help
If you say yes here you get support for the Winbond W836X7 series
of sensor chips: the W83627HF, W83627THF, W83637HF, and the W83697HF
of sensor chips: the W83627HF, W83627THF, W83637HF, W83687THF and
W83697HF.

This driver can also be built as a module. If so, the module
will be called w83627hf.
Expand Down
13 changes: 7 additions & 6 deletions drivers/hwmon/adm1021.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <linux/i2c.h>
#include <linux/hwmon.h>
#include <linux/err.h>
#include <linux/mutex.h>


/* Addresses to scan */
Expand Down Expand Up @@ -92,7 +93,7 @@ struct adm1021_data {
struct class_device *class_dev;
enum chips type;

struct semaphore update_lock;
struct mutex update_lock;
char valid; /* !=0 if following fields are valid */
unsigned long last_updated; /* In jiffies */

Expand Down Expand Up @@ -162,10 +163,10 @@ static ssize_t set_##value(struct device *dev, struct device_attribute *attr, co
struct adm1021_data *data = i2c_get_clientdata(client); \
int temp = simple_strtoul(buf, NULL, 10); \
\
down(&data->update_lock); \
mutex_lock(&data->update_lock); \
data->value = TEMP_TO_REG(temp); \
adm1021_write_value(client, reg, data->value); \
up(&data->update_lock); \
mutex_unlock(&data->update_lock); \
return count; \
}
set(temp_max, ADM1021_REG_TOS_W);
Expand Down Expand Up @@ -275,7 +276,7 @@ static int adm1021_detect(struct i2c_adapter *adapter, int address, int kind)
strlcpy(new_client->name, type_name, I2C_NAME_SIZE);
data->type = kind;
data->valid = 0;
init_MUTEX(&data->update_lock);
mutex_init(&data->update_lock);

/* Tell the I2C layer a new client has arrived */
if ((err = i2c_attach_client(new_client)))
Expand Down Expand Up @@ -351,7 +352,7 @@ static struct adm1021_data *adm1021_update_device(struct device *dev)
struct i2c_client *client = to_i2c_client(dev);
struct adm1021_data *data = i2c_get_clientdata(client);

down(&data->update_lock);
mutex_lock(&data->update_lock);

if (time_after(jiffies, data->last_updated + HZ + HZ / 2)
|| !data->valid) {
Expand All @@ -375,7 +376,7 @@ static struct adm1021_data *adm1021_update_device(struct device *dev)
data->valid = 1;
}

up(&data->update_lock);
mutex_unlock(&data->update_lock);

return data;
}
Expand Down
25 changes: 13 additions & 12 deletions drivers/hwmon/adm1025.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
#include <linux/hwmon.h>
#include <linux/hwmon-vid.h>
#include <linux/err.h>
#include <linux/mutex.h>

/*
* Addresses to scan
Expand Down Expand Up @@ -133,7 +134,7 @@ static struct i2c_driver adm1025_driver = {
struct adm1025_data {
struct i2c_client client;
struct class_device *class_dev;
struct semaphore update_lock;
struct mutex update_lock;
char valid; /* zero until following fields are valid */
unsigned long last_updated; /* in jiffies */

Expand Down Expand Up @@ -207,11 +208,11 @@ static ssize_t set_in##offset##_min(struct device *dev, struct device_attribute
struct adm1025_data *data = i2c_get_clientdata(client); \
long val = simple_strtol(buf, NULL, 10); \
\
down(&data->update_lock); \
mutex_lock(&data->update_lock); \
data->in_min[offset] = IN_TO_REG(val, in_scale[offset]); \
i2c_smbus_write_byte_data(client, ADM1025_REG_IN_MIN(offset), \
data->in_min[offset]); \
up(&data->update_lock); \
mutex_unlock(&data->update_lock); \
return count; \
} \
static ssize_t set_in##offset##_max(struct device *dev, struct device_attribute *attr, const char *buf, \
Expand All @@ -221,11 +222,11 @@ static ssize_t set_in##offset##_max(struct device *dev, struct device_attribute
struct adm1025_data *data = i2c_get_clientdata(client); \
long val = simple_strtol(buf, NULL, 10); \
\
down(&data->update_lock); \
mutex_lock(&data->update_lock); \
data->in_max[offset] = IN_TO_REG(val, in_scale[offset]); \
i2c_smbus_write_byte_data(client, ADM1025_REG_IN_MAX(offset), \
data->in_max[offset]); \
up(&data->update_lock); \
mutex_unlock(&data->update_lock); \
return count; \
} \
static DEVICE_ATTR(in##offset##_min, S_IWUSR | S_IRUGO, \
Expand All @@ -247,11 +248,11 @@ static ssize_t set_temp##offset##_min(struct device *dev, struct device_attribut
struct adm1025_data *data = i2c_get_clientdata(client); \
long val = simple_strtol(buf, NULL, 10); \
\
down(&data->update_lock); \
mutex_lock(&data->update_lock); \
data->temp_min[offset-1] = TEMP_TO_REG(val); \
i2c_smbus_write_byte_data(client, ADM1025_REG_TEMP_LOW(offset-1), \
data->temp_min[offset-1]); \
up(&data->update_lock); \
mutex_unlock(&data->update_lock); \
return count; \
} \
static ssize_t set_temp##offset##_max(struct device *dev, struct device_attribute *attr, const char *buf, \
Expand All @@ -261,11 +262,11 @@ static ssize_t set_temp##offset##_max(struct device *dev, struct device_attribut
struct adm1025_data *data = i2c_get_clientdata(client); \
long val = simple_strtol(buf, NULL, 10); \
\
down(&data->update_lock); \
mutex_lock(&data->update_lock); \
data->temp_max[offset-1] = TEMP_TO_REG(val); \
i2c_smbus_write_byte_data(client, ADM1025_REG_TEMP_HIGH(offset-1), \
data->temp_max[offset-1]); \
up(&data->update_lock); \
mutex_unlock(&data->update_lock); \
return count; \
} \
static DEVICE_ATTR(temp##offset##_min, S_IWUSR | S_IRUGO, \
Expand Down Expand Up @@ -404,7 +405,7 @@ static int adm1025_detect(struct i2c_adapter *adapter, int address, int kind)
/* We can fill in the remaining client fields */
strlcpy(new_client->name, name, I2C_NAME_SIZE);
data->valid = 0;
init_MUTEX(&data->update_lock);
mutex_init(&data->update_lock);

/* Tell the I2C layer a new client has arrived */
if ((err = i2c_attach_client(new_client)))
Expand Down Expand Up @@ -523,7 +524,7 @@ static struct adm1025_data *adm1025_update_device(struct device *dev)
struct i2c_client *client = to_i2c_client(dev);
struct adm1025_data *data = i2c_get_clientdata(client);

down(&data->update_lock);
mutex_lock(&data->update_lock);

if (time_after(jiffies, data->last_updated + HZ * 2) || !data->valid) {
int i;
Expand Down Expand Up @@ -558,7 +559,7 @@ static struct adm1025_data *adm1025_update_device(struct device *dev)
data->valid = 1;
}

up(&data->update_lock);
mutex_unlock(&data->update_lock);

return data;
}
Expand Down
Loading

0 comments on commit b6585de

Please sign in to comment.