On 11/22/17 13:06, Anders Andersson wrote:
On Tue, Nov 21, 2017 at 11:19 PM, STeve Andre' <and...@msu.edu> wrote:
On 11/21/17 16:31, Mark Kettenis wrote:
The diff below exposes voltage regulators as sensors. This makes it
easy to look at the current settings of these regulators. The
downside is that these aren't really sensors as the voltages are not
actually measured.
The functionality is optional; callers can pass NULL in the
regulator_register() if the regulators aren't particularly
interesting.
This is what it looks like on the rk3399-firefly:
milhaud$ sysctl hw.sensors
hw.sensors.rktemp0.temp0=23.89 degC (CPU)
hw.sensors.rktemp0.temp1=28.75 degC (GPU)
hw.sensors.rkpmic0.volt0=0.90 VDC (vdd_cpu_l)
hw.sensors.rkpmic0.volt1=1.80 VDC (vcc1v8_dvp)
hw.sensors.rkpmic0.volt2=1.80 VDC (vcc1v8_pmu)
hw.sensors.rkpmic0.volt3=3.00 VDC (vcc_sd)
hw.sensors.rkpmic0.volt4=1.80 VDC (vcca1v8_codec)
hw.sensors.rkpmic0.volt5=3.00 VDC (vcc_3v0)
thoughts?
As someone who does hardware stuff, having easy access to these sensorts
can't hurt, and might be useful in some situations. I've measured voltages
before and found during extreme temperature conditions things changed. So
it's possibly useful and doesn't cost much.
This reply illustrates the problem, and I think it won't be the last
time someone misunderstands the feature.
They are *not* sensors, so they will not vary under load. They don't
reflect the actual voltage, so they are useless for checking if the
hardware works as it should. I bet that a lot of people will still
assume that they can be used as such, leading people to believe that
everything is OK with their hardware when it's not.
That's true. Hardware often lies. That's why I like the ability to
monitor stuff.
--STeve Andre'