Changeset 2504
- Timestamp:
- 05/02/04 15:49:14 (9 years ago)
- Location:
- lm-sensors/trunk
- Files:
-
- 3 modified
-
doc/chips/w83781d (modified) (1 diff)
-
kernel/chips/w83781d.c (modified) (2 diffs)
-
prog/sensors/chips.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/doc/chips/w83781d
r2428 r2504 196 196 197 197 Note that the individual beep bits are inverted from the other chips. 198 Th at is, in the second entry in the 'beep' file, a '1' bit means199 d isable, not enable. This may be changed in the future.198 The driver now takes care of this so that user-space applications 199 don't have to know about it. 200 200 201 201 Known problems: -
lm-sensors/trunk/kernel/chips/w83781d.c
r2437 r2504 208 208 #define PWM_FROM_REG(val) (val) 209 209 #define PWM_TO_REG(val) (SENSORS_LIMIT((val),0,255)) 210 #define BEEPS_FROM_REG(val ) (val)211 #define BEEPS_TO_REG(val ) ((val) &0xffffff)210 #define BEEPS_FROM_REG(val,type) ((type)==as99127f?(val)^0x7FFF:(val)) 211 #define BEEPS_TO_REG(val,type) ((type)==as99127f?(~(val))&0x7FFF:(val)&0xffffff) 212 212 213 213 #define BEEP_ENABLE_TO_REG(val) ((val)?1:0) … … 1712 1712 w83781d_update_client(client); 1713 1713 results[0] = BEEP_ENABLE_FROM_REG(data->beep_enable); 1714 results[1] = BEEPS_FROM_REG(data->beeps );1714 results[1] = BEEPS_FROM_REG(data->beeps, data->type); 1715 1715 *nrels_mag = 2; 1716 1716 } else if (operation == SENSORS_PROC_REAL_WRITE) { 1717 1717 if (*nrels_mag >= 2) { 1718 data->beeps = BEEPS_TO_REG(results[1] );1718 data->beeps = BEEPS_TO_REG(results[1], data->type); 1719 1719 w83781d_write_value(client, W83781D_REG_BEEP_INTS1, 1720 1720 data->beeps & 0xff); -
lm-sensors/trunk/prog/sensors/chips.c
r2487 r2504 2101 2101 if (!sensors_get_feature(*name,SENSORS_W83781D_BEEPS,&cur)) { 2102 2102 beeps = cur + 0.5; 2103 /* strangely, as99127f beep bits are inverted */2104 if (!strcmp(name->prefix,"as99127f"))2105 beeps = ~beeps;2106 2103 } else { 2107 2104 printf("ERROR: Can't get beep data!\n");
