GPIO abstraction for power and host control

In libopenbmc_intf/power_gpio.c there are GPIO abstractions for power
related GPIOs.
Host control related GPIOs need to do the same abstraction.

The changes include:
1. Add host control related GPIOs in gpio_configs and update
system_manager.py
2. Update control_host_obj.c to use the abstracted GPIOs
3. Update GPIO_CONFIGS for all machines and add host control related
GPIOs

power_gpio will be renamed to gpio_configs in next commit;

Resolves openbmc/openbmc#814

Change-Id: I7832065d495d7d64c5df2f5b177005b97e68900a
Signed-off-by: Lei YU <mine260309@gmail.com>
diff --git a/libopenbmc_intf/power_gpio.h b/libopenbmc_intf/power_gpio.h
index e3714d0..ab01fe5 100644
--- a/libopenbmc_intf/power_gpio.h
+++ b/libopenbmc_intf/power_gpio.h
@@ -15,8 +15,8 @@
  * limitations under the License.
  */
 
-#ifndef __POWER_GPIO_H__
-#define __POWER_GPIO_H__
+#ifndef __GPIO_CONFIGS_H__
+#define __GPIO_CONFIGS_H__
 
 #include <stddef.h>
 #include <glib.h>
@@ -44,9 +44,24 @@
 	gboolean *pci_reset_holds;
 } PowerGpio;
 
-/* Read system configuration for power GPIOs. */
-gboolean read_power_gpio(GDBusConnection *connection, PowerGpio *power_gpio);
+typedef struct HostctlGpio {
+	GPIO fsi_data;
+	GPIO fsi_clk;
+	GPIO fsi_enable;
+	GPIO cronus_sel;
+	size_t num_optionals;
+	GPIO* optionals;
+	gboolean* optional_pols;
+} HostctlGpio;
+
+typedef struct GpioConfigs {
+	PowerGpio power_gpio;
+	HostctlGpio hostctl_gpio;
+} GpioConfigs;
+
+/* Read system configuration for GPIOs. */
+gboolean read_gpios(GDBusConnection *connection, GpioConfigs *gpios);
 /* Frees internal buffers. Does not free parameter. Does not close GPIOs. */
-void free_power_gpio(PowerGpio *power_gpio);
+void free_gpios(GpioConfigs *gpios);
 
 #endif