eeprom: update pt5161l getVersion()
Add a step to read fw_load_status before fetching the firmware
version. This ensures the service only proceeds when the device
reports a normal status.
Test on Harma:
```
<7> Host state xyz.openbmc_project.State.Host.HostState.Running matches to retrieve the version
<3> Status from file: /sys/kernel/debug/pt5161l/21-0024/fw_load_status is invalid: abnormal
<7> Host state xyz.openbmc_project.State.Host.HostState.Running matches to retrieve the version
<7> Device version is ready
<7> Harma_MB_Retimer_0_2251: set version 2.8.19
<7> Device version is ready
<7> Harma_MB_Retimer_1_8040: set version 2.8.19
```
Change-Id: I7b665652d8bee20956da3e3d15ff1d222560a656
Signed-off-by: Daniel Hsu <Daniel-Hsu@quantatw.com>
diff --git a/eeprom-device/eeprom_device_version.hpp b/eeprom-device/eeprom_device_version.hpp
index b05b2c1..814443c 100644
--- a/eeprom-device/eeprom_device_version.hpp
+++ b/eeprom-device/eeprom_device_version.hpp
@@ -17,6 +17,10 @@
chipModel(chipModel), bus(bus), address(address)
{}
+ virtual bool isDeviceReady()
+ {
+ return true;
+ }
virtual std::string getVersion() = 0;
virtual std::optional<HostPowerInf::HostState>
getHostStateToQueryVersion() = 0;