dbus-sdr: Add sensor mutability

Sensor ValueMutability interface has already been merged into
openbmc/phosphor-dbus-interfaces here:
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/36333

This change adds the IPMI server-side changes, namely, the test for
the "Mutable" member of this interface existing and being "true".
If so, it grants external write permission to this sensor, otherwise,
it will remain read-only (which is the default).

It replaces a previous compile-time constant that could only be changed
at compilation time, and would affect all sensors globally, neither of
which was desirable.

This "Mutable" interface boolean can be used to grant write
permission to sensors, such as external sensors and fan PWM sensors in
manual mode. IPMI setting sensor reading will check the mutability
first.

It achieves feature parity with the old
"mutability: Mutability::Write|Mutability::Read" settings,
in the old hardcoded YAML configuration files.

Also see the dbus-sensors changes, namely, the reading of this
parameter from entity-manager configuration, and setting
this D-Bus property accordingly, if "Mutable" is true:
https://gerrit.openbmc-project.xyz/c/openbmc/dbus-sensors/+/45405

Tested: With both 45405 and 45407 changes in, this feature has been
working nicely in our local environment for some time now.

Signed-off-by: Jie Yang <jjy@google.com>
Change-Id: I4ecff1a0424c0bc23d3a90466e1bb4b655f07859
Signed-off-by: Josh Lehan <krellan@google.com>
4 files changed