]> git.baikalelectronics.ru Git - kernel.git/commit
pinctrl: imx: detect uninitialized pins
authorStefan Agner <stefan@agner.ch>
Sat, 6 Sep 2014 16:25:04 +0000 (18:25 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 23 Sep 2014 09:45:47 +0000 (11:45 +0200)
commit8cc049c86f80b435b354b79b7816f8b64e6ca0fe
tree7497cb27472c195901735c1b5e6fa926331bd72e
parentafe15d82bf73d4715efb59cf5697bd0523265ee8
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>
drivers/pinctrl/freescale/pinctrl-imx.c
drivers/pinctrl/freescale/pinctrl-imx.h
drivers/pinctrl/freescale/pinctrl-vf610.c