Thanks, Alec,

I see that my "fix" of the sysfs name for the raw.voltage.12v sensor was not 
really appropriate.  I'll revert it.

Is there any reason NOT to put the ROACH2 rev2 scaling factors into hwmon.c?  
They can always be overridden in tcpbporphserver3.init for rev1 boards and it 
would make the default readings more useful on the more widespread ROACH2 rev2 
boards than with the unity scaling they have now.

Looking at the tcpborphserver3.init file that lives inside the ROMFS image 
file, I understand all the scaling factors except for the 12v and 5v current 
scaling factors.  In the file those scaling factors are 100/500 == 0.20 and 
100/200 == 0.50, resp.  Based on my admittedly fuzzy understanding of the 
MAX16071 chip, I calculate these as 28/153 =~ 0.18 and 70/153 =~ 0.46, resp.  
These differ by about 10% from the much "rounder" numbers in 
tcpborphserver3.init.  FWIW, I calculated the current scaling factor as 
14/(10*Rs*Av*255).  This is derived from the formula in the MAX16071 datasheet. 
 Using (5/1000) ohms for Rs and 6 for Av leads to the scaling factor of 28/153. 
 Using (2/1000) ohms for Rs and 6 for Av leads to the scaling factor of 70/153. 
 Does this match with your calculations and you just rounded (or added margin) 
or am I doing something wrong?

Thanks,
Dave


Reply via email to