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.

--STeve Andre'

Reply via email to