Add serial uart mux interface class

1. This change adds the multi-host serial uart mux interface class.

In a multi-host system when the host position is changed,
then the serial uart mux is configured to enable  the
respective host's serial console which is accessed via
OCP debug card.

2. Introduced two new methods in gpio.cpp
   setGpioState - set state for gpio fd based on polarity
   getGpiostate - get state for gpio fd based on polarity

3. Updated the readme file about details on the new gpio
configs

design : https://github.com/openbmc/docs/blob/master/designs/multihost-phosphor-buttons.md

Testing : This change is verified in yosemiteV2 platform.

Signed-off-by: Naveen Moses <naveen.mosess@hcl.com>
Change-Id: I861d70570650d7dfcab842a35bdcf63a9fdd3bd0
diff --git a/src/hostSelector_switch.cpp b/src/hostSelector_switch.cpp
index 66b79c8..efbccd2 100644
--- a/src/hostSelector_switch.cpp
+++ b/src/hostSelector_switch.cpp
@@ -61,7 +61,7 @@
                 IOError();
         }
         GpioState gpioState =
-            (buf == '0') ? (GpioState::low) : (GpioState::high);
+            (buf == '0') ? (GpioState::deassert) : (GpioState::assert);
         setHostSelectorValue(config.gpios[index].fd, gpioState);
         size_t hsPosMapped = getMappedHSConfig(hostSelectorPosition);
         if (hsPosMapped != INVALID_INDEX)
@@ -83,7 +83,7 @@
 
     auto clr_bit = [](size_t& val, size_t n) { val &= ~(0xff & (1 << n)); };
 
-    auto bit_op = (state == GpioState::low) ? set_bit : clr_bit;
+    auto bit_op = (state == GpioState::deassert) ? set_bit : clr_bit;
 
     bit_op(hostSelectorPosition, pos);
     return;
@@ -120,7 +120,8 @@
     }
 
     // read the gpio state for the io event received
-    GpioState gpioState = (buf == '0') ? (GpioState::low) : (GpioState::high);
+    GpioState gpioState =
+        (buf == '0') ? (GpioState::deassert) : (GpioState::assert);
 
     setHostSelectorValue(fd, gpioState);