LM83 driver

Mark D. Studebaker mds at paradyne.com
Sun Jul 20 02:54:06 CEST 2003

Jean Delvare wrote:
>>- You could have done one /proc callback function rather than 4
> Hm, how do I know who's calling me then? Using ctl_name and the
> LM83_SYSCTL_* constants defined earlier? I don't exactly see the
> interest yet. Though the functions are similar, most of the code really
> depend on the sensor, so I don't think we'll win in clarity nor code
> size. But maybe it's just me. Where could I look at a similar situation
> in our code?

See w83781d_pwm() in w83781d.c which uses subtraction to convert the SYSCTL number
to PWM number, and the W83781D_REG_PWM macro which indexes into a static array of
register numbers.

More information about the lm-sensors mailing list