HACK: samus: workaround for gpiochip label

The Samus EVT2 BIOS names the GPIO controller "PCH-LP" which does
not match the label in the kernel.  As a workaround for the factory
use an alias for the PCH-LP that will allow it to find GPIOs properly.

BUG=chrome-os-partner:33098
BRANCH=samus
TEST='crossystem wpsw_cur' returns 1 on samus with 6300.18 firmware

Change-Id: I0b2a109bf79c851d9894e938741622f5c4941da0
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/224573
Commit-Queue: Ricky Liang <jcliang@chromium.org>
Tested-by: Ricky Liang <jcliang@chromium.org>
diff --git a/host/arch/x86/lib/crossystem_arch.c b/host/arch/x86/lib/crossystem_arch.c
index 15a6433..bf6baa6 100644
--- a/host/arch/x86/lib/crossystem_arch.c
+++ b/host/arch/x86/lib/crossystem_arch.c
@@ -625,6 +625,7 @@
   const char *name;
   int (*ChipOffsetAndGpioNumber)(unsigned *gpio_num, unsigned *chip_offset,
                                  const char *name);
+  const char *label;
 };
 
 static const struct GpioChipset chipsets_supported[] = {
@@ -632,8 +633,12 @@
   { "CougarPoint", FindGpioChipOffset },
   { "PantherPoint", FindGpioChipOffset },
   { "LynxPoint", FindGpioChipOffset },
-  { "PCH-LP", FindGpioChipOffset },
-  { "INT3437:00", FindGpioChipOffsetByLabel },
+  /*
+   * FIXME(crosbug.com/p/33098): Remove this label hack once Samus
+   * firmware can be updated to pass the proper name in ACPI tables.
+   */
+  { "PCH-LP", FindGpioChipOffsetByLabel, "INT3437:00" },
+  { "INT3437:00", FindGpioChipOffsetByLabel, "INT3437:00" },
   { "BayTrail", BayTrailFindGpioChipOffset },
   { NULL },
 };
@@ -693,7 +698,7 @@
 
   /* Modify GPIO number by driver's offset */
   if (!chipset->ChipOffsetAndGpioNumber(&controller_num, &controller_offset,
-                                        chipset->name))
+                                        chipset->label))
     return -1;
   controller_offset += controller_num;