Remove hub FSI scan which was part of OCC bind

Scanning hub FSI is now moved to a service file since it's
needed prior to power on and hence this change is not needed.

Change-Id: If2d0d8f5c7e1b405d6e858e0f2da8fc7b505cd86
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
diff --git a/configure.ac b/configure.ac
index b121f55..135dcda 100644
--- a/configure.ac
+++ b/configure.ac
@@ -113,10 +113,6 @@
 AC_DEFINE_UNQUOTED([DEV_PATH], ["$DEV_PATH"], [The device path])
 AC_DEFINE_UNQUOTED([I2C_OCC_DEVICE_NAME], ["$I2C_OCC_DEVICE_NAME"], [The device name of i2c occ hwmon])
 
-AC_ARG_VAR(FSI_SCAN_FILE, [The File to write for initiating FSI rescan])
-AS_IF([test "x$FSI_SCAN_FILE" == "x"], [FSI_SCAN_FILE="/sys/devices/platform/gpio-fsi/fsi0/slave@00:00/00:00:00:0a/fsi1/rescan"])
-AC_DEFINE_UNQUOTED([FSI_SCAN_FILE], ["$FSI_SCAN_FILE"], [The File to write for initiating FSI rescan])
-
 AC_ARG_VAR(OCC_DEV_PATH, [The OCC device path in /dev])
 AS_IF([test "x$OCC_DEV_PATH" == "x"], [OCC_DEV_PATH="/dev/occ"])
 AC_DEFINE_UNQUOTED([OCC_DEV_PATH], ["$OCC_DEV_PATH"], [The OCC device path in /dev])
diff --git a/occ_status.cpp b/occ_status.cpp
index 15ffbc8..6788c54 100644
--- a/occ_status.cpp
+++ b/occ_status.cpp
@@ -7,11 +7,6 @@
 namespace occ
 {
 
-bool Status::hubFsiScanDone = false;
-
-// To initiate a FSI rescan
-constexpr auto fsiReScan = "1";
-
 // Handles updates to occActive property
 bool Status::occActive(bool value)
 {
@@ -19,12 +14,6 @@
     {
         if (value)
         {
-            if (!hubFsiScanDone)
-            {
-                // Need to do hub scan before we bind
-                this->scanHubFSI();
-            }
-
             // Bind the device
             device.bind();
 
@@ -46,9 +35,6 @@
 
             // Do the unbind.
             device.unBind();
-
-            // Indicate the hub FSI scan needs to be done again
-            hubFsiScanDone = false;
         }
     }
     return Base::Status::occActive(value);
@@ -119,18 +105,5 @@
     return;
 }
 
-// Scans the secondary FSI hub to make sure /dev/occ files are populated
-// Write "1" to achieve that
-void Status::scanHubFSI()
-{
-    std::ofstream file(FSI_SCAN_FILE, std::ios::out);
-    file << fsiReScan;
-    file.close();
-
-    // Hub FSI scan has been done. No need to do this for all the OCCs
-    hubFsiScanDone = true;
-    return;
-}
-
 } // namespace occ
 } // namespace open_power
diff --git a/occ_status.hpp b/occ_status.hpp
index 23b2080..c097908 100644
--- a/occ_status.hpp
+++ b/occ_status.hpp
@@ -140,9 +140,6 @@
          **/
         sdbusplus::bus::match_t hostControlSignal;
 
-        /** @brief Indicates whether a hub FSI scan has been attempted or not */
-        static bool hubFsiScanDone;
-
         /** @brief Callback handler when device errors are detected */
         void deviceErrorHandler();
 
@@ -155,10 +152,6 @@
         /** @brief Sends a message to host control command handler to reset OCC
          */
         void resetOCC();
-
-        /** @brief Initiates hub FSI scan so that /dev/occ files are created
-         */
-        void scanHubFSI();
 };
 
 } // namespace occ