Question about chip driver policy

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

 



In the new-drivers document, under the heading "Write the new driver", it
says:

  "Remember that you want to output the direct measurements done by the
  chip. If these sensor values need scaling, this should be done through
  the configuration file."

However, many of the existing drivers don't do this. For example, lm85.c has
this macro:

#define FAN_FROM_REG(val) ((val)==0?-1:(val)==0xffff?0:5400000/(val))

which the driver uses to convert from register values to rps. There are lots
of similar constructs in other drivers.

Which is the right way for new drivers - the code or the documentation?






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

  Powered by Linux