summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/freescale/pinctrl-imx.h
diff options
context:
space:
mode:
authorStefan Agner <stefan@agner.ch>2014-09-06 16:25:04 (GMT)
committerLinus Walleij <linus.walleij@linaro.org>2014-09-23 09:45:47 (GMT)
commit3dac1918a4912cea9375e76cb3916b751cef22db (patch)
tree7497cb27472c195901735c1b5e6fa926331bd72e /drivers/pinctrl/freescale/pinctrl-imx.h
parent3ccc11f6b82c34646c8a4233278251d9e9e99390 (diff)
downloadlinux-3dac1918a4912cea9375e76cb3916b751cef22db.tar.xz
pinctrl: imx: detect uninitialized pins
The pinctrl driver initialized the register offsets for the pins with 0. On Vybrid an offset of 0 is a valid offset for the pinctrl mux register. So far, this was solved using the ZERO_OFFSET_VALID flag which allowed offsets of 0. However, this does not allow to verify whether a pins struct imx_pmx_func was initialized or not. Use signed offset values for register offsets and initialize those with -1 in order to detect uninitialized offset values reliable. Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/freescale/pinctrl-imx.h')
-rw-r--r--drivers/pinctrl/freescale/pinctrl-imx.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/pinctrl/freescale/pinctrl-imx.h b/drivers/pinctrl/freescale/pinctrl-imx.h
index db408b0..49e55d3 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx.h
+++ b/drivers/pinctrl/freescale/pinctrl-imx.h
@@ -67,8 +67,8 @@ struct imx_pmx_func {
* @conf_reg: config register offset
*/
struct imx_pin_reg {
- u16 mux_reg;
- u16 conf_reg;
+ s16 mux_reg;
+ s16 conf_reg;
};
struct imx_pinctrl_soc_info {
@@ -83,8 +83,7 @@ struct imx_pinctrl_soc_info {
unsigned int flags;
};
-#define ZERO_OFFSET_VALID 0x1
-#define SHARE_MUX_CONF_REG 0x2
+#define SHARE_MUX_CONF_REG 0x1
#define NO_MUX 0x0
#define NO_PAD 0x0