gpio: qpnp-gpio: Issue lookups based on device name

qpnp-gpio manages gpio_chip queries based on the slave
ID. This has a limitation in that it restricts the number of
gpio_chips per slave ID to one. However, some PMICs have both MPP
and GPIO on the same slave, and thus the slave ID is not a
meaningful unit to search for.

Instead, make use of the 'label' binding to give the
primary dev-container node a name. This name will serve as the
gpio_chip label, which can be used in lookups.

Change-Id: Ic20caeb4622d73449a983992275446c733ddd89a
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
diff --git a/include/linux/qpnp/pin.h b/include/linux/qpnp/pin.h
index aaa0ad8..16de80a 100644
--- a/include/linux/qpnp/pin.h
+++ b/include/linux/qpnp/pin.h
@@ -106,11 +106,11 @@
 
 /**
  * qpnp_pin_map - Obtain Linux GPIO number from device spec
- * @slave_id: slave_id of the spmi_device for the gpio in question.
+ * @name: Name assigned by the 'label' binding for the primary node.
  * @pmic_pin: PMIC pin number to lookup.
  *
  * This routine is used in legacy configurations that do not support
  * Device Tree. If you are using Device Tree, you should not use this.
- * For such cases, use of_get_gpio() instead.
+ * For such cases, use of_get_gpio() or friends instead.
  */
-int qpnp_pin_map(uint16_t slave_id, uint32_t pmic_pin);
+int qpnp_pin_map(const char *name, uint32_t pmic_pin);