IpmbSensor:Fix SMBus configuration for VR Temp.
The SMBus index configuration for VR Temp sensor is different
for some platforms.
Hence, SMBus index in which these sensors are connected
is made as D-Bus property, read from xx_baseboard.json file.
Also, sensor read request commands modified to use this value.
Tested :
1.Dediprog and redfish flash the different platforms,
with[SMBus index read from json file] and
without[default SMBus index =3] this configuration change.
- System up and running.
- VR Temp sensor and other sensor readings shows
correctly in 'ipmitool sensor list' output.
Signed-off-by: Anoop S <anoopx.s@intel.com>
Change-Id: Ia106f1c699f5f1515c90585309a65ede37906f18
diff --git a/include/IpmbSensor.hpp b/include/IpmbSensor.hpp
index c3e7393..4207d1c 100644
--- a/include/IpmbSensor.hpp
+++ b/include/IpmbSensor.hpp
@@ -80,7 +80,8 @@
const std::string& sensorConfiguration,
sdbusplus::asio::object_server& objectServer,
std::vector<thresholds::Threshold>&& thresholds,
- uint8_t deviceAddress, std::string& sensorTypeName);
+ uint8_t deviceAddress, uint8_t hostSMbusIndex,
+ std::string& sensorTypeName);
~IpmbSensor();
void checkThresholds(void) override;
@@ -99,6 +100,7 @@
uint8_t command;
uint8_t deviceAddress;
uint8_t errorCount;
+ uint8_t hostSMbusIndex;
std::vector<uint8_t> commandData;
std::optional<uint8_t> initCommand;
std::vector<uint8_t> initData;