gpio: qpnp-gpio: Remove config param inv_int_pol

This configuration option should never have existed. It does not
exist in the qpnp-gpio block. It was mistakenly being used to
represent the 'output_value' parameter within the code. Fix such
occurrences so that the semantics are consistent.

Also move qpnp-gpio documentation to a more meaningful location.
It belongs in the gpio directory and not spmi.

Change-Id: I48b37aef02793934f60b9886347068cf37331c3f
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
diff --git a/drivers/gpio/qpnp-gpio.c b/drivers/gpio/qpnp-gpio.c
index 263ead3..90cc798 100644
--- a/drivers/gpio/qpnp-gpio.c
+++ b/drivers/gpio/qpnp-gpio.c
@@ -168,7 +168,7 @@
 	}
 
 	if (param->direction & QPNP_GPIO_DIR_OUT) {
-		q_spec->regs[Q_REG_I_OUTPUT_CTL2] = (param->inv_int_pol
+		q_spec->regs[Q_REG_I_OUTPUT_CTL2] = (param->output_value
 			    << Q_REG_OUT_INVERT_SHIFT) & Q_REG_OUT_INVERT_MASK;
 		q_spec->regs[Q_REG_I_OUTPUT_CTL2] |= (param->src_select
 			    << Q_REG_SRC_SEL_SHIFT) & Q_REG_SRC_SEL_MASK;
@@ -398,13 +398,11 @@
 	int rc;
 
 	dev_dbg(&spmi->dev, "%s: p[0]: 0x%x p[1]: 0x%x p[2]: 0x%x p[3]:"
-		" 0x%x p[4]: 0x%x p[5]: 0x%x p[6]: 0x%x p[7]: 0x%x"
-		" p[8]: 0x%x\n", __func__,
+		" 0x%x p[4]: 0x%x p[5]: 0x%x p[6]: 0x%x p[7]: 0x%x\n", __func__,
 		be32_to_cpup(&prop[0]), be32_to_cpup(&prop[1]),
 		be32_to_cpup(&prop[2]), be32_to_cpup(&prop[3]),
 		be32_to_cpup(&prop[4]), be32_to_cpup(&prop[5]),
-		be32_to_cpup(&prop[6]), be32_to_cpup(&prop[7]),
-		be32_to_cpup(&prop[8]));
+		be32_to_cpup(&prop[6]), be32_to_cpup(&prop[7]));
 
 	param.direction    =	be32_to_cpup(&prop[0]);
 	param.output_type  =	be32_to_cpup(&prop[1]);
@@ -413,8 +411,7 @@
 	param.vin_sel	   =	be32_to_cpup(&prop[4]);
 	param.out_strength =	be32_to_cpup(&prop[5]);
 	param.src_select   =	be32_to_cpup(&prop[6]);
-	param.inv_int_pol  =	be32_to_cpup(&prop[7]);
-	param.master_en    =	be32_to_cpup(&prop[8]);
+	param.master_en    =	be32_to_cpup(&prop[7]);
 
 	rc = qpnp_gpio_config(gpio, &param);
 	if (rc)
@@ -613,8 +610,8 @@
 		/* It's not an error to not config a default */
 		prop = of_get_property(spmi->dev_node[i].of_node,
 				"qcom,qpnp-gpio-cfg", &len);
-		/* 9 data values constitute one tuple */
-		if (prop && (len != (9 * sizeof(__be32)))) {
+		/* 8 data values constitute one tuple */
+		if (prop && (len != (8 * sizeof(__be32)))) {
 			dev_err(&spmi->dev, "%s: invalid format for"
 				" qcom,qpnp-gpio-cfg property\n",
 							__func__);