pinctrl: imx: Do not treat a PIN without MUX register as an error
authorAlexander Shiyan <shc_work@mail.ru>
Wed, 1 Jun 2016 19:21:53 +0000 (22:21 +0300)
committerSasha Levin <sasha.levin@oracle.com>
Tue, 12 Jul 2016 12:46:58 +0000 (08:46 -0400)
[ Upstream commit ba562d5e54fd3136bfea0457add3675850247774 ]

Some PINs do not have a MUX register, it is not an error.
It is necessary to allow the continuation of the PINs configuration,
otherwise the whole PIN-group will be configured incorrectly.

Cc: stable@vger.kernel.org
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/pinctrl/freescale/pinctrl-imx.c

index 6f806f93662add09c352389616e1bf6a7583e946..857f29ba406aeab2fbb1040abf1477b91ea057e7 100644 (file)
@@ -205,9 +205,9 @@ static int imx_pmx_set(struct pinctrl_dev *pctldev, unsigned selector,
                pin_reg = &info->pin_regs[pin_id];
 
                if (pin_reg->mux_reg == -1) {
-                       dev_err(ipctl->dev, "Pin(%s) does not support mux function\n",
+                       dev_dbg(ipctl->dev, "Pin(%s) does not support mux function\n",
                                info->pins[pin_id].name);
-                       return -EINVAL;
+                       continue;
                }
 
                if (info->flags & SHARE_MUX_CONF_REG) {