* [lm-sensors] ina209 driver + using calulate lines in sensors3.conf
@ 2009-08-13 17:43 Ira W. Snyder
0 siblings, 0 replies; only message in thread
From: Ira W. Snyder @ 2009-08-13 17:43 UTC (permalink / raw)
To: lm-sensors
Hello all.
I'm working on a driver (posted here previously) for the INA209 chip.
The chip itself has support for power and current readings, though they
will only be valid if a special calibration register is set
appropriately. The units used for interpreting the power and current
registers change depending on the value in the calibration register;
they are not constant.
It is possible to calculate the power and current from userspace using
the sense resistor reading + the sense resistor value (which changes
between implementations).
I am aware of the "calculate" lines in sensors3.conf, which should be
able to do this kind of calculation.
My previous postings of this driver have mostly been ignored, probably
due to set the calibration register before use. This is something not
supported by the hwmon sysfs-interface. Using the userspace sensors
program to handle this instead removes the need to set the calibration
register.
I have two possible solutions:
1) Have curr1_input output the sense resistor voltage in mV and use the
sensors program (using "calculate") to convert it appropriately
2) Have curr1_input always read back 0 uA, and have the sensors program
use in0_input (the sense resistor voltage in mV) in the calculate
line, ignoring the reading from curr1_input
I can figure out how to use calculate for #1, but I cannot figure out
how to reference a different sensor in a calculate line. The
documentation claims this is possible, but I cannot find any examples.
Which of these two solutions would be more acceptable?
Thanks,
Ira
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-08-13 17:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-13 17:43 [lm-sensors] ina209 driver + using calulate lines in sensors3.conf Ira W. Snyder
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.