Skip to content
Commit 16837f95 authored by Markus Schneider-Pargmann's avatar Markus Schneider-Pargmann Committed by Linus Walleij
Browse files

pinctrl: fsl: imx: Check for 0 config register



0 is used in all pinfunction definitions when a config register is not
available, for example imx25-pinfunc.h. If a configuration value is used
for such a pinfunction the driver will always write it to the
configuration register if it is not -1. For a 0 configuration register
the configuration value is written to offset 0x0. This can lead to a
crashing/hanging system without any warning message.

This patch checks for 0 config register and sets the internal value to
-1. If the configuration value is not NO_PADCTL this leads to an error
message that applying the configuration failed.

Signed-off-by: default avatarMarkus Pargmann <mpa@pengutronix.de>
Acked-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tested-by: default avatarStefan Agner <stefan@agner.ch>
Acked-by: default avatarStefan Agner <stefan@agner.ch>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 0fefcb68
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment