On Thu, 12 Aug 2010 10:16:09 -0700, Guenter Roeck wrote: > On Wed, 2010-08-11 at 11:10 -0400, Jean Delvare wrote: > > Add initial support for PWM outputs of the PC87427 Super-I/O chip. > > Only mode change and manual fan speed control are supported. Automatic > > mode configuration isn't supported, and won't be until at least one > > board is known, which makes uses of the PWM outputs. > > > > Signed-off-by: Jean Delvare <khali@xxxxxxxxxxxx> > > Acked-by: Guenter Roeck <guenter.roeck@xxxxxxxxxxxx> > > Minor question inline. > > > (...) > > @@ -188,6 +196,61 @@ static inline u16 fan_to_reg(unsigned lo > > } > > > > /* > > + * PWM registers and conversions > > + */ > > + > > +#define PC87427_REG_PWM_ENABLE 0x10 > > +#define PC87427_REG_PWM_DUTY 0x12 > > + > > +#define PWM_ENABLE_MODE_MASK (7 << 4) > > +#define PWM_ENABLE_CTLEN (1 << 0) > > + > > +#define PWM_MODE_MANUAL (0 << 4) > > +#define PWM_MODE_AUTO (1 << 4) > > +#define PWM_MODE_OFF (2 << 4) > > +#define PWM_MODE_ON (7 << 4) > > Just wondering ... ON is 0x01110000, not 0x01000000 ? Yes. > No problem with it, only that the OFF overlaps the ON bit which seems a > bit odd. This isn't a bitfield, this is a 3-bit value (as can be deduced from PWM_ENABLE_MODE_MASK.) No idea why they left values 3 to 6 unused, instead of simply going for a 2-bit value. -- Jean Delvare _______________________________________________ lm-sensors mailing list lm-sensors@xxxxxxxxxxxxxx http://lists.lm-sensors.org/mailman/listinfo/lm-sensors