Is it required that regulator sensors implement threshold interfaces?

Ed Tanous ed.tanous at intel.com
Fri Sep 27 06:07:27 AEST 2019


On 9/26/19 11:15 AM, Shawn McCarney wrote:
> Hi,
> 
> I am working on an application that will configure voltage regulators
> (VRMs) and read their sensors.
> 
> I'll be putting about 9 sensors per VRM on D-Bus that will implement the
> Sensor.Value interface.  However, I'd rather not implement the warning
> and critical Threshold interfaces for those sensors.
> 
> Is there any reason that would cause a problem?

Nope.  There are plenty of sensors that don't implement warning or
critical interfaces, although I would recommend you do for logging
purposes, even if they are artificially high, but that's up to what
you're wanting to implement.

> 
> Also, the Sensor.Value interface has MinValue and MaxValue properties. 
> Are these required to have valid (non-zero) values? What breaks if they
> are just set to 0?  I'd rather not provide these values as well.
> 

For some implementations, these are used to appropriately scale the SDR,
and provide the redfish interfaces for those properties.  pid-control
also uses it to scale readings to 0-100% for ease in defining clamp
values.  I'm not really following why you wouldn't want to implement
those.  They don't have to be exact, and there are plenty of cases where
they are set to INT8_MAX and INT8_MIN.  Usually you will know based on
the spec you're implementing if the values fall into a
uint8/int8/int16/uint16 range, and you can just put in the specified
range limits.


More information about the openbmc mailing list