<div dir="ltr">Thanks for asking this. In particular, in PSUsensor it seems there is only an ability to customize the scaling factor for an entire category of sensors at once: InScaleFactor, CurrScaleFactor, PowerScaleFactor, TempScaleFactor, and so on.<div><br></div><div><a href="https://github.com/openbmc/dbus-sensors/blob/2adc95cb4d9ac879f66aa9ef12a6ce8b7c1578fe/src/PSUSensorMain.cpp#L408">https://github.com/openbmc/dbus-sensors/blob/2adc95cb4d9ac879f66aa9ef12a6ce8b7c1578fe/src/PSUSensorMain.cpp#L408</a><br></div><div><br></div><div>Ideally, there would be a way to customize the scaling factor on a per-sensor basis, for example to customize the scaling of Vout without also affecting Vin.</div><div><br></div><div>Josh</div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div style="line-height:1.5em;padding-top:10px;margin-top:10px;color:rgb(85,85,85);font-family:sans-serif"><span style="border-width:2px 0px 0px;border-style:solid;border-color:rgb(213,15,37);padding-top:2px;margin-top:2px">Josh Lehan |</span><span style="border-width:2px 0px 0px;border-style:solid;border-color:rgb(51,105,232);padding-top:2px;margin-top:2px"> Software Engineer |</span><span style="border-width:2px 0px 0px;border-style:solid;border-color:rgb(0,153,57);padding-top:2px;margin-top:2px"> <a href="mailto:krellan@google.com" target="_blank">krellan@google.com</a> |</span><span style="border-width:2px 0px 0px;border-style:solid;border-color:rgb(238,178,17);padding-top:2px;margin-top:2px"> +1 650-733-8941</span></div><br></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 3, 2019 at 5:03 PM Patrick Venture <<a href="mailto:venture@google.com">venture@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">James;<br>
<br>
We have some sensors that need a gain and offset value set in the json<br>
file, for PSU sensors, but only vout/vin or some specific ones, and<br>
not applied to all sensors.<br>
<br>
Akin to: <a href="https://github.com/openbmc/phosphor-hwmon/blob/2227bd52c5bb8d62dcfe33b58d65515d21e9be17/sensor.cpp#L59" rel="noreferrer" target="_blank">https://github.com/openbmc/phosphor-hwmon/blob/2227bd52c5bb8d62dcfe33b58d65515d21e9be17/sensor.cpp#L59</a><br>
<br>
Also, is there a way to customize the very verbose suffixes PSUsensor applies<br>
such as "Temperature" and "Output_Power".  With IPMI we're only<br>
granted 16 characters for the name and ipmid uses the last part of the<br>
dbus path for the name.<br>
<br>
Perhaps ipmid should allow overriding the name value.<br>
<br>
Patrick<br>
</blockquote></div>