Merge from trunk (4303:4355) out to 3.0.0 branch.

git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4357 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Mark M. Hoffman committed 2007-04-03 12:55:30 +00:00
1 parent 2bb6b1859a
commit c5ffa7b635
50 files changed
+1024 -888

No files matched your search

+1 -2
View File
@@ -143,8 +143,7 @@ static inline u8 FAN_TO_REG(long rpm, int div)
#define VID_FROM_REG(val) ((val)==0x1f?0:(val)>=0x10?510-(val)*10:\
205-(val)*5)
/* For each registered ADM1024, we need to keep some data in memory. That
data is pointed to by adm1024_list[NR]->data. The structure itself is
/* For each registered ADM1024, we need to keep some data in memory. It is
dynamically allocated, at the same time when a new adm1024 client is
allocated. */
struct adm1024_data {
+1 -2
View File
@@ -112,8 +112,7 @@ SENSORS_INSMOD_2(adm1025, ne1619);
#define ALARMS_FROM_REG(val) (val)
/* For each registered ADM1025, we need to keep some data in memory. That
data is pointed to by adm1025_list[NR]->data. The structure itself is
/* For each registered ADM1025, we need to keep some data in memory. It is
dynamically allocated, at the same time when a new adm1025 client is
allocated. */
struct adm1025_data {
-1
View File
@@ -298,7 +298,6 @@ static int adm1026_scaling[] = { /* .001 Volts */
struct adm1026_data {
struct i2c_client client;
struct semaphore lock;
int sysctl_id;
enum chips type;
+2 -3
View File
@@ -38,7 +38,6 @@
*/
struct bmcsensors_data {
struct semaphore lock;
int sysctl_id;
struct semaphore update_lock;
@@ -880,7 +879,7 @@ static void bmcsensors_update_client(struct i2c_client *client)
if(state != STATE_READING) {
state = STATE_READING;
#ifdef DEBUG
printk(KERN_DEBUG "bmcsensors.o: starting update\n", j);
printk(KERN_DEBUG "bmcsensors.o: starting update\n");
#endif
bmcsensors_get_reading(client, 0);
}
@@ -888,7 +887,7 @@ static void bmcsensors_update_client(struct i2c_client *client)
while(state == STATE_READING && j++ < 100)
bmc_do_pause(HZ / 25);
#ifdef DEBUG
printk("bmcsensors.o: update complete; j = %d\n", j);
printk(KERN_DEBUG "bmcsensors.o: update complete; j = %d\n", j);
#endif
data->last_updated = jiffies;
data->valid = 1;
+1 -2
View File
@@ -103,8 +103,7 @@ SENSORS_INSMOD_1(fscher);
/* Initial limits */
/* For each registered FSCHER, we need to keep some data in memory. That
data is pointed to by fscher_list[NR]->data. The structure itself is
/* For each registered FSCHER, we need to keep some data in memory. It is
dynamically allocated, at the same time when a new fscher client is
allocated. */
struct fscher_data {
+1 -2
View File
@@ -107,8 +107,7 @@ SENSORS_INSMOD_1(fscpos);
/* Initial limits */
/* For each registered FSCPOS, we need to keep some data in memory. That
data is pointed to by fscpos_list[NR]->data. The structure itself is
/* For each registered FSCPOS, we need to keep some data in memory. It is
dynamically allocated, at the same time when a new fscpos client is
allocated. */
struct fscpos_data {
+1 -2
View File
@@ -151,8 +151,7 @@ SENSORS_INSMOD_1(fscscy);
/* Initial limits */
/* For each registered FSCSCY, we need to keep some data in memory. That
data is pointed to by fscscy_list[NR]->data. The structure itself is
/* For each registered FSCSCY, we need to keep some data in memory. It is
dynamically allocated, at the same time when a new fscscy client is
allocated. */
struct fscscy_data {
+1 -2
View File
@@ -215,8 +215,7 @@ extern inline u8 DIV_TO_REG(long val)
}
#define DIV_FROM_REG(val) (1 << (val))
/* For each registered IT87, we need to keep some data in memory. That
data is pointed to by it87_list[NR]->data. The structure itself is
/* For each registered IT87, we need to keep some data in memory. It is
dynamically allocated, at the same time when a new it87 client is
allocated. */
struct it87_data {
+1 -2
View File
@@ -111,8 +111,7 @@ static inline u8 FAN_TO_REG(long rpm, int div)
bad. Quite a lot of bookkeeping is done. A real driver can often cut
some corners. */
/* For each registered LM78, we need to keep some data in memory. That
data is pointed to by lm78_list[NR]->data. The structure itself is
/* For each registered LM78, we need to keep some data in memory. It is
dynamically allocated, at the same time when a new lm78 client is
allocated. */
struct lm78_data {
-1
View File
@@ -373,7 +373,6 @@ struct lm85_autofan {
struct lm85_data {
struct i2c_client client;
struct semaphore lock;
int sysctl_id;
enum chips type;
+1 -1
View File
@@ -302,7 +302,7 @@ static ctl_table adm1032_dir_table_template[] =
*/
/* The ADM1032 supports PEC but not on write byte transactions, so we need
to explicitely ask for a transaction without PEC. */
to explicitly ask for a transaction without PEC. */
static inline s32 adm1032_write_byte(struct i2c_client *client, u8 value)
{
return i2c_smbus_xfer(client->adapter, client->addr,
+1 -2
View File
@@ -233,8 +233,7 @@ enum maxi_type { cristal, cognac, ashaki, nba };
enum sensor_type { fan, temp, vid, pll, lcd, alarm };
/* For each registered MaxiLife controller, we need to keep some data in
memory. That data is pointed to by maxi_list[NR]->data. The structure
itself is dynamically allocated, at the same time when a new MaxiLife
memory. It is dynamically allocated, at the same time when a new MaxiLife
client is allocated. We assume MaxiLife will only be present on the
SMBus and not on the ISA bus. */
struct maxi_data {
+1 -2
View File
@@ -54,8 +54,7 @@ SENSORS_INSMOD_1(mic74);
/* Initial values */
/* All registers are 0, except for MIC74_REG_DATA which is 0xFF */
/* For each registered MIC74, we need to keep some data in memory. That
data is pointed to by mic74_list[NR]->data. The structure itself is
/* For each registered MIC74, we need to keep some data in memory. It is
dynamically allocated, at the same time when a new mic74 client is
allocated. */
struct mic74_data {
+1 -2
View File
@@ -161,8 +161,7 @@ static inline u8 FAN_TO_REG(long rpm, int div)
#define DIV_FROM_REG(val) (1 << (val))
#define DIV_TO_REG(val) ((val)==8?3:(val)==4?2:(val)==1?0:1)
/* For the SIS5595, we need to keep some data in memory. That
data is pointed to by sis5595_list[NR]->data. The structure itself is
/* For the SIS5595, we need to keep some data in memory. It is
dynamically allocated, at the time when the new sis5595 client is
allocated. */
struct sis5595_data {
+159 -64
View File
@@ -38,7 +38,8 @@ static unsigned short normal_i2c_range[] = { SENSORS_I2C_END };
static unsigned int normal_isa[] = { 0x0000, SENSORS_ISA_END };
static unsigned int normal_isa_range[] = { SENSORS_ISA_END };
SENSORS_INSMOD_1(smsc47m1);
SENSORS_INSMOD_2(smsc47m1, smsc47m2);
static u8 devid;
/* modified from kernel/include/traps.c */
#define REG 0x2e /* The register to read/write */
@@ -87,8 +88,13 @@ superio_exit(void)
* can do much more besides (device id 0x60).
* The LPC47M997 is undocumented, but seems to be compatible with
* the LPC47M192, and has the same device id.
* The LPC47M292 (device id 0x6B) is somewhat compatible, but it
* supports a 3rd fan, and the pin configuration registers are
* unfortunately different.
*/
#define SMSC_DEVID_MATCH(id) ((id) == 0x51 || (id) == 0x59 || (id) == 0x5F || (id) == 0x60)
#define SMSC_DEVID_MATCH(id) ((id) == 0x51 || (id) == 0x59 || \
(id) == 0x5F || (id) == 0x60 || \
(id) == 0x6B)
#define SMSC_ACT_REG 0x30
#define SMSC_BASE_REG 0x60
@@ -99,10 +105,17 @@ superio_exit(void)
#define SMSC47M1_REG_TPIN2 0x33
#define SMSC47M1_REG_TPIN1 0x34
#define SMSC47M1_REG_PPIN(nr) (0x37 - (nr))
#define SMSC47M1_REG_PWM(nr) (0x55 + (nr))
#define SMSC47M1_REG_FANDIV 0x58
#define SMSC47M1_REG_FAN(nr) (0x58 + (nr))
#define SMSC47M1_REG_FAN_MIN(nr) (0x5a + (nr))
static const u8 SMSC47M1_REG_PWM[3] = { 0x56, 0x57, 0x69 };
static const u8 SMSC47M1_REG_FAN[3] = { 0x59, 0x5a, 0x6b };
static const u8 SMSC47M1_REG_FAN_MIN[3] = { 0x5b, 0x5c, 0x6c };
#define SMSC47M2_REG_ALARM6 0x09
#define SMSC47M2_REG_TPIN3 0x2d
#define SMSC47M2_REG_TPIN2 0x37
#define SMSC47M2_REG_TPIN1 0x38
#define SMSC47M2_REG_FANDIV3 0x6a
static inline u8 MIN_TO_REG(long rpm, int div)
{
@@ -125,18 +138,18 @@ static inline u8 MIN_TO_REG(long rpm, int div)
struct smsc47m1_data {
struct i2c_client client;
struct semaphore lock;
int sysctl_id;
enum chips type;
struct semaphore update_lock;
char valid; /* !=0 if following fields are valid */
unsigned long last_updated; /* In jiffies */
u8 fan[2]; /* Register value */
u8 fan_min[2]; /* Register value */
u8 fan_div[2]; /* Register encoding, shifted right */
u8 fan[3]; /* Register value */
u8 fan_min[3]; /* Register value */
u8 fan_div[3]; /* Register encoding, shifted right */
u8 alarms; /* Register encoding */
u8 pwm[2]; /* Register value (bit 0 is disable) */
u8 pwm[3]; /* Register value (bit 0 is disable) */
};
@@ -144,10 +157,6 @@ static int smsc47m1_attach_adapter(struct i2c_adapter *adapter);
static int smsc47m1_detect(struct i2c_adapter *adapter, int address,
unsigned short flags, int kind);
static int smsc47m1_detach_client(struct i2c_client *client);
static int smsc47m1_read_value(struct i2c_client *client, u8 register);
static int smsc47m1_write_value(struct i2c_client *client, u8 register,
u8 value);
static void smsc47m1_update_client(struct i2c_client *client);
static void smsc47m1_init_client(struct i2c_client *client);
@@ -172,13 +181,16 @@ static struct i2c_driver smsc47m1_driver = {
/* -- SENSORS SYSCTL START -- */
#define SMSC47M1_SYSCTL_FAN1 1101 /* Rotations/min */
#define SMSC47M1_SYSCTL_FAN2 1102
#define SMSC47M1_SYSCTL_FAN3 1103
#define SMSC47M1_SYSCTL_PWM1 1401
#define SMSC47M1_SYSCTL_PWM2 1402
#define SMSC47M1_SYSCTL_PWM3 1403
#define SMSC47M1_SYSCTL_FAN_DIV 2000 /* 1, 2, 4 or 8 */
#define SMSC47M1_SYSCTL_ALARMS 2004 /* bitvector */
#define SMSC47M1_ALARM_FAN1 0x0001
#define SMSC47M1_ALARM_FAN2 0x0002
#define SMSC47M1_ALARM_FAN3 0x0004
/* -- SENSORS SYSCTL END -- */
@@ -198,6 +210,26 @@ static ctl_table smsc47m1_dir_table_template[] = {
{0}
};
static ctl_table smsc47m2_dir_table_template[] = {
{SMSC47M1_SYSCTL_FAN1, "fan1", NULL, 0, 0644, NULL, &i2c_proc_real,
&i2c_sysctl_real, NULL, &smsc47m1_fan},
{SMSC47M1_SYSCTL_FAN2, "fan2", NULL, 0, 0644, NULL, &i2c_proc_real,
&i2c_sysctl_real, NULL, &smsc47m1_fan},
{SMSC47M1_SYSCTL_FAN3, "fan3", NULL, 0, 0644, NULL, &i2c_proc_real,
&i2c_sysctl_real, NULL, &smsc47m1_fan},
{SMSC47M1_SYSCTL_FAN_DIV, "fan_div", NULL, 0, 0644, NULL, &i2c_proc_real,
&i2c_sysctl_real, NULL, &smsc47m1_fan_div},
{SMSC47M1_SYSCTL_ALARMS, "alarms", NULL, 0, 0444, NULL, &i2c_proc_real,
&i2c_sysctl_real, NULL, &smsc47m1_alarms},
{SMSC47M1_SYSCTL_PWM1, "pwm1", NULL, 0, 0644, NULL, &i2c_proc_real,
&i2c_sysctl_real, NULL, &smsc47m1_pwm},
{SMSC47M1_SYSCTL_PWM2, "pwm2", NULL, 0, 0644, NULL, &i2c_proc_real,
&i2c_sysctl_real, NULL, &smsc47m1_pwm},
{SMSC47M1_SYSCTL_PWM3, "pwm3", NULL, 0, 0644, NULL, &i2c_proc_real,
&i2c_sysctl_real, NULL, &smsc47m1_pwm},
{0}
};
static int smsc47m1_attach_adapter(struct i2c_adapter *adapter)
{
return i2c_detect(adapter, &addr_data, smsc47m1_detect);
@@ -208,8 +240,8 @@ static int __init smsc47m1_find(int *address)
u16 val;
superio_enter();
val= superio_inb(DEVID);
if (!SMSC_DEVID_MATCH(val)) {
devid = superio_inb(DEVID);
if (!SMSC_DEVID_MATCH(devid)) {
superio_exit();
return -ENODEV;
}
@@ -237,8 +269,8 @@ int smsc47m1_detect(struct i2c_adapter *adapter, int address,
struct i2c_client *new_client;
struct smsc47m1_data *data;
int err = 0;
const char *type_name = "smsc47m1";
const char *client_name = "47M1xx chip";
const char *type_name;
const char *client_name;
if (!i2c_is_isa_adapter(adapter)) {
return 0;
@@ -263,9 +295,35 @@ int smsc47m1_detect(struct i2c_adapter *adapter, int address,
return -ENOMEM;
}
switch (devid) {
case 0x51:
kind = smsc47m1;
type_name = "smsc47m1";
client_name = "LPC47B27x chip";
break;
case 0x5F:
kind = smsc47m1;
type_name = "smsc47m1";
client_name = "LPC47M14x chip";
break;
case 0x60:
kind = smsc47m1;
type_name = "smsc47m1";
client_name = "LPC47M192 chip";
break;
case 0x6B:
kind = smsc47m2;
type_name = "smsc47m2";
client_name = "LPC47M292 chip";
break;
default:
kind = smsc47m1;
type_name = "smsc47m1";
client_name = "LPC47M1xx chip";
}
new_client = &data->client;
new_client->addr = address;
init_MUTEX(&data->lock);
new_client->data = data;
new_client->adapter = adapter;
new_client->driver = &smsc47m1_driver;
@@ -273,6 +331,7 @@ int smsc47m1_detect(struct i2c_adapter *adapter, int address,
request_region(address, SMSC_EXTENT, "smsc47m1-fans");
strcpy(new_client->name, client_name);
data->type = kind;
data->valid = 0;
init_MUTEX(&data->update_lock);
@@ -281,7 +340,9 @@ int smsc47m1_detect(struct i2c_adapter *adapter, int address,
if ((i = i2c_register_entry((struct i2c_client *) new_client,
type_name,
smsc47m1_dir_table_template,
kind == smsc47m2 ?
smsc47m2_dir_table_template :
smsc47m1_dir_table_template,
THIS_MODULE)) < 0) {
err = i;
goto ERROR4;
@@ -318,47 +379,64 @@ static int smsc47m1_detach_client(struct i2c_client *client)
return 0;
}
static int smsc47m1_read_value(struct i2c_client *client, u8 reg)
static inline int smsc47m1_read_value(struct i2c_client *client, u8 reg)
{
int res;
down(&(((struct smsc47m1_data *) (client->data))->lock));
res = inb_p(client->addr + reg);
up(&(((struct smsc47m1_data *) (client->data))->lock));
return res;
return inb_p(client->addr + reg);
}
static int smsc47m1_write_value(struct i2c_client *client, u8 reg, u8 value)
static inline void smsc47m1_write_value(struct i2c_client *client, u8 reg,
u8 value)
{
down(&(((struct smsc47m1_data *) (client->data))->lock));
outb_p(value, client->addr + reg);
up(&(((struct smsc47m1_data *) (client->data))->lock));
return 0;
}
static void smsc47m1_init_client(struct i2c_client *client)
{
/* configure pins for tach function */
smsc47m1_write_value(client, SMSC47M1_REG_TPIN1, 0x05);
smsc47m1_write_value(client, SMSC47M1_REG_TPIN2, 0x05);
struct smsc47m1_data *data = client->data;
u8 reg;
switch (data->type) {
case smsc47m2:
/* For the new LPC47M292 chip, I prefer to play it safe and
only report the pin configuration */
reg = smsc47m1_read_value(client, SMSC47M2_REG_TPIN1);
if ((reg & 0x0d) != 0x09)
printk(KERN_NOTICE "smsc47m1: GP35 not configured for "
"fan input, ignore fan1 values\n");
reg = smsc47m1_read_value(client, SMSC47M2_REG_TPIN2);
if ((reg & 0x0d) != 0x09)
printk(KERN_NOTICE "smsc47m1: GP34 not configured for "
"fan input, ignore fan2 values\n");
reg = smsc47m1_read_value(client, SMSC47M2_REG_TPIN3);
if ((reg & 0x0d) != 0x0d)
printk(KERN_NOTICE "smsc47m1: GP33 not configured for "
"fan input, ignore fan3 values\n");
break;
default:
/* configure pins for tach function */
smsc47m1_write_value(client, SMSC47M1_REG_TPIN1, 0x05);
smsc47m1_write_value(client, SMSC47M1_REG_TPIN2, 0x05);
}
}
static void smsc47m1_update_client(struct i2c_client *client)
{
struct smsc47m1_data *data = client->data;
int i;
down(&data->update_lock);
if ((jiffies - data->last_updated > HZ + HZ / 2) ||
(jiffies < data->last_updated) || !data->valid) {
for (i = 1; i <= 2; i++) {
data->fan[i - 1] =
smsc47m1_read_value(client, SMSC47M1_REG_FAN(i));
data->fan_min[i - 1] =
smsc47m1_read_value(client, SMSC47M1_REG_FAN_MIN(i));
data->pwm[i - 1] =
smsc47m1_read_value(client, SMSC47M1_REG_PWM(i));
int i, fan_nr;
fan_nr = data->type == smsc47m2 ? 3 : 2;
for (i = 0; i < fan_nr; i++) {
data->fan[i] =
smsc47m1_read_value(client, SMSC47M1_REG_FAN[i]);
data->fan_min[i] =
smsc47m1_read_value(client, SMSC47M1_REG_FAN_MIN[i]);
data->pwm[i] =
smsc47m1_read_value(client, SMSC47M1_REG_PWM[i]);
}
i = smsc47m1_read_value(client, SMSC47M1_REG_FANDIV);
@@ -368,6 +446,18 @@ static void smsc47m1_update_client(struct i2c_client *client)
smsc47m1_read_value(client, SMSC47M1_REG_ALARM1) >> 6;
if(data->alarms)
smsc47m1_write_value(client, SMSC47M1_REG_ALARM1, 0xc0);
if (fan_nr >= 3) {
data->fan_div[2] = (smsc47m1_read_value(client,
SMSC47M2_REG_FANDIV3) >> 4) & 0x03;
data->alarms |= (smsc47m1_read_value(client,
SMSC47M2_REG_ALARM6) & 0x40) >> 4;
if (data->alarms & 0x04)
smsc47m1_write_value(client,
SMSC47M2_REG_ALARM6,
0x40);
}
data->last_updated = jiffies;
data->valid = 1;
}
@@ -380,26 +470,24 @@ void smsc47m1_fan(struct i2c_client *client, int operation, int ctl_name,
int *nrels_mag, long *results)
{
struct smsc47m1_data *data = client->data;
int nr = ctl_name - SMSC47M1_SYSCTL_FAN1 + 1;
int nr = ctl_name - SMSC47M1_SYSCTL_FAN1;
if (operation == SENSORS_PROC_REAL_INFO)
*nrels_mag = 0;
else if (operation == SENSORS_PROC_REAL_READ) {
smsc47m1_update_client(client);
results[0] = MIN_FROM_REG(data->fan_min[nr - 1],
DIV_FROM_REG(data->fan_div[nr - 1]));
results[1] = FAN_FROM_REG(data->fan[nr - 1],
DIV_FROM_REG(data->fan_div[nr - 1]),
data->fan_min[nr - 1]);
results[0] = MIN_FROM_REG(data->fan_min[nr],
DIV_FROM_REG(data->fan_div[nr]));
results[1] = FAN_FROM_REG(data->fan[nr],
DIV_FROM_REG(data->fan_div[nr]),
data->fan_min[nr]);
*nrels_mag = 2;
} else if (operation == SENSORS_PROC_REAL_WRITE) {
if (*nrels_mag >= 1) {
data->fan_min[nr - 1] = MIN_TO_REG(results[0],
DIV_FROM_REG
(data->
fan_div[nr-1]));
smsc47m1_write_value(client, SMSC47M1_REG_FAN_MIN(nr),
data->fan_min[nr - 1]);
data->fan_min[nr] = MIN_TO_REG(results[0],
DIV_FROM_REG(data->fan_div[nr]));
smsc47m1_write_value(client, SMSC47M1_REG_FAN_MIN[nr],
data->fan_min[nr]);
}
}
}
@@ -433,6 +521,13 @@ void smsc47m1_fan_div(struct i2c_client *client, int operation,
*nrels_mag = 2;
} else if (operation == SENSORS_PROC_REAL_WRITE) {
old = smsc47m1_read_value(client, SMSC47M1_REG_FANDIV);
if (*nrels_mag >= 3 && data->type == smsc47m2) {
data->fan_div[2] = DIV_TO_REG(results[2]);
smsc47m1_write_value(client, SMSC47M2_REG_FANDIV3,
(smsc47m1_read_value(client,
SMSC47M2_REG_FANDIV3) & 0xcf)
| (data->fan_div[2] << 4));
}
if (*nrels_mag >= 2) {
data->fan_div[1] = DIV_TO_REG(results[1]);
old = (old & 0x3f) | (data->fan_div[1] << 6);
@@ -449,31 +544,31 @@ void smsc47m1_pwm(struct i2c_client *client, int operation, int ctl_name,
int *nrels_mag, long *results)
{
struct smsc47m1_data *data = client->data;
int nr = 1 + ctl_name - SMSC47M1_SYSCTL_PWM1;
int nr = ctl_name - SMSC47M1_SYSCTL_PWM1;
if (operation == SENSORS_PROC_REAL_INFO)
*nrels_mag = 0;
else if (operation == SENSORS_PROC_REAL_READ) {
smsc47m1_update_client(client);
results[0] = PWM_FROM_REG(data->pwm[nr - 1]);
results[1] = !(data->pwm[nr - 1] & 0x01);
results[0] = PWM_FROM_REG(data->pwm[nr]);
results[1] = !(data->pwm[nr] & 0x01);
*nrels_mag = 2;
} else if (operation == SENSORS_PROC_REAL_WRITE) {
if (*nrels_mag >= 1) {
data->pwm[nr - 1] = smsc47m1_read_value(client,
SMSC47M1_REG_PWM(nr)) & 0x81;
data->pwm[nr - 1] |= PWM_TO_REG(results[0]);
data->pwm[nr] = smsc47m1_read_value(client,
SMSC47M1_REG_PWM[nr]) & 0x81;
data->pwm[nr] |= PWM_TO_REG(results[0]);
if (*nrels_mag >= 2) {
if (results[1]) {
/* enable PWM */
data->pwm[nr - 1] &= 0xfe;
data->pwm[nr] &= 0xfe;
} else {
/* disable PWM */
data->pwm[nr - 1] |= 0x01;
data->pwm[nr] |= 0x01;
}
}
smsc47m1_write_value(client, SMSC47M1_REG_PWM(nr),
data->pwm[nr - 1]);
smsc47m1_write_value(client, SMSC47M1_REG_PWM[nr],
data->pwm[nr]);
}
}
}
+1 -2
View File
@@ -281,8 +281,7 @@ static inline u8 DIV_TO_REG(long val)
return ((u8) i);
}
/* For each registered chip, we need to keep some data in memory. That
data is pointed to by w83627hf_list[NR]->data. The structure itself is
/* For each registered chip, we need to keep some data in memory. It is
dynamically allocated, at the same time when a new client is allocated. */
struct w83627hf_data {
struct i2c_client client;
+1 -2
View File
@@ -246,8 +246,7 @@ static inline u8 DIV_TO_REG(long val, enum chips type)
bad. Quite a lot of bookkeeping is done. A real driver can often cut
some corners. */
/* For each registered W83781D, we need to keep some data in memory. That
data is pointed to by w83781d_list[NR]->data. The structure itself is
/* For each registered W83781D, we need to keep some data in memory. It is
dynamically allocated, at the same time when a new w83781d client is
allocated. */
struct w83781d_data {