FruDevice/Entity Manager vs hwmon

Ed Tanous edtanous at google.com
Thu Jun 3 01:26:42 AEST 2021


On Sat, May 29, 2021 at 12:42 PM Mahesh Kurapati
<mahesh.kurapati at keysight.com> wrote:
>
> Hello,
>
>
>
> I want to define temperature sensors, fans and PSUs for our new platform.  Going through the documentation and sources,  I understand that there are two approaches.  One is to define them with the same i2c path as mentioned in the device tree as part of the hwmon configuration, and the other approach is to define a json file with appropriate probe in the entity-manager/configurations folder so that the FruDevice and Entity Manager apps detect the devices as per the probe and create the matching dbus objects, while the dbus-sensors do the instrumentation.  With entity manager approach I understand that the i2c devices are created/probed when they are detected.  My questions is we don’t need the device defined in the device tree file if I go by this approach?

Correct, although you can still include them if you like.
Entity-manager relies on the new_device sysfs interface to create
devices as they're found.  In the past we've used runtime-generated
device tree overlays to accomplish the same thing (something I'd like
to see us get back to, but that's a different story).

> I understand that this helps the dynamic detection of the FRU.  Also we have LM73, and other temp sensor TMP431c that is not defined in the FruDevice record map.

What record map are you referring to?  So far as I'm aware, those
devices would exist in hwmontempsensor, not fru device.  TMP73 and
TMP431c could be added if they have linux driver implementations.

>  Next question is do I need to add support for the LM73 tmp75MP431C and other one in the FruDevice so that it gets created properly? Can I use any existing strings/mapping for these sensors?

I'm not following.  What "mappings" are you referring to?

>  This is not needed if I define the entries in the device tree, and integrate with hwmon I have everything needed.  I see that hwmon and FruDevice/Entity Manager/dbus-sensors provide similar functionality.  Can I have both of these services running at the same time on the BMC?

Hypothetically you can, but it's a bit messy, and I would recommend against it.

> Will it cause any conflicts?  Please help me understand.
>
>
>
> Thank you,
>
> Mahesh


More information about the openbmc mailing list