mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-01 13:20:30 +00:00
Add some temporary PWM debugging stuff.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2495 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
ab201099f6
commit
b46272cb2a
1 file changed
+12
-3
+12
-3
@@ -117,9 +117,8 @@ static inline void superio_exit(void)
|
||||
#define FAN_CONFIG_INVERT(val,nr) (((val) >> (4 + nr * 3)) & 1)
|
||||
|
||||
#define PWM_FROM_REG(val) (val)
|
||||
#define PWM_TO_REG(val) (((val) < 0) ? 0 : \
|
||||
((val) > 255) ? 255 : \
|
||||
(val))
|
||||
#define PWM_TO_REG(val) ((val) < 0 ? 0 : \
|
||||
(val) > 255 ? 255 : (val))
|
||||
|
||||
/*
|
||||
* Voltage registers and conversions
|
||||
@@ -823,7 +822,17 @@ void pc87360_pwm(struct i2c_client *client, int operation, int ctl_name,
|
||||
else if (operation == SENSORS_PROC_REAL_WRITE) {
|
||||
if (*nrels_mag >= 1)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printk(KERN_DEBUG "pc87360.o: Old PWM%u register: %u\n",
|
||||
nr+1, data->pwm[nr]);
|
||||
printk(KERN_DEBUG "pc87360.o: Wanted PWM%u value: %ld\n",
|
||||
nr+1, results[0]);
|
||||
#endif
|
||||
data->pwm[nr] = PWM_TO_REG(results[0]);
|
||||
#ifdef DEBUG
|
||||
printk(KERN_DEBUG "pc87360.o: Writing %u to register %u\n",
|
||||
data->pwm[nr], PC87360_REG_PWM(nr));
|
||||
#endif
|
||||
pc87360_write_value(data, LD_FAN, NO_BANK,
|
||||
PC87360_REG_PWM(nr),
|
||||
data->pwm[nr]);
|
||||
|
||||
Reference in new issue
Block a user