LM83 driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > 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.

OK, I've done that. Looks better for sure, thanks for the tip.

-- 
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/



[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux