mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-18 19:30:54 +00:00
GL518SM driver
To be done: support for GL518SM revision 0x80 and GL520SM Kyösti, if you have some time soon, could you please test it? git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@56 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
0e8799ff27
commit
5dd41b1046
10 files changed
+1332
-15
No files matched your search
+11
-6
@@ -751,9 +751,9 @@ void lm78_in(struct i2c_client *client, int operation, int ctl_name,
|
||||
lm78_write_value(client,LM78_REG_IN_MIN(nr),data->in_min[nr]);
|
||||
}
|
||||
if (*nrels_mag >= 2) {
|
||||
data->in_max[nr] = IN_TO_REG(results[1],nr);
|
||||
lm78_write_value(client,LM78_REG_IN_MAX(nr),data->in_max[nr]);
|
||||
}
|
||||
data->in_max[nr] = IN_TO_REG(results[1],nr);
|
||||
lm78_write_value(client,LM78_REG_IN_MAX(nr),data->in_max[nr]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -833,6 +833,8 @@ void lm78_fan_div(struct i2c_client *client, int operation, int ctl_name,
|
||||
int *nrels_mag, long *results)
|
||||
{
|
||||
struct lm78_data *data = client->data;
|
||||
int old;
|
||||
|
||||
if (operation == SENSORS_PROC_REAL_INFO)
|
||||
*nrels_mag = 0;
|
||||
else if (operation == SENSORS_PROC_REAL_READ) {
|
||||
@@ -842,12 +844,15 @@ void lm78_fan_div(struct i2c_client *client, int operation, int ctl_name,
|
||||
results[2] = 2;
|
||||
*nrels_mag = 3;
|
||||
} else if (operation == SENSORS_PROC_REAL_WRITE) {
|
||||
if (*nrels_mag >= 2)
|
||||
old = lm78_read_value(client,LM78_REG_VID_FANDIV);
|
||||
if (*nrels_mag >= 2) {
|
||||
data->fan_div[1] = DIV_TO_REG(results[1]);
|
||||
old = (old & 0x3f) | (data->fan_div[1] << 6);
|
||||
}
|
||||
if (*nrels_mag >= 1) {
|
||||
data->fan_div[0] = DIV_TO_REG(results[0]);
|
||||
lm78_write_value(client,LM78_REG_VID_FANDIV,
|
||||
(data->fan_div[0] >> 4) | (data->fan_div[1] >> 6));
|
||||
old = (old & 0xcf) | (data->fan_div[0] << 4);
|
||||
lm78_write_value(client,LM78_REG_VID_FANDIV,old);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user