diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2016-11-07 17:53:15 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-11-08 09:38:20 +0100 |
commit | b30d31e40e2d650c0183d1b46f70cb41618d3592 (patch) | |
tree | b44241062ed0714f0ad6f6ce3c5c3f9195e0246e /drivers/pinctrl/pinctrl-sx150x.c | |
parent | pinctrl-sx150x: Move some code out of sx150x_init_hw (diff) | |
download | linux-b30d31e40e2d650c0183d1b46f70cb41618d3592.tar.xz linux-b30d31e40e2d650c0183d1b46f70cb41618d3592.zip |
pinctrl-sx150x: Improve sx150x_init_misc for SX1504/5/6
For Sx1504/5/6 only SX1506 has RegAdvanced, so put some code in place to
account for that.
Tested-by: Neil Armstrong <narmstrong@baylibre.com>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-sx150x.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-sx150x.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinctrl-sx150x.c b/drivers/pinctrl/pinctrl-sx150x.c index 27194e700d2f..d51ec73092c2 100644 --- a/drivers/pinctrl/pinctrl-sx150x.c +++ b/drivers/pinctrl/pinctrl-sx150x.c @@ -936,6 +936,13 @@ static int sx150x_init_misc(struct sx150x_pinctrl *pctl) case SX150X_456: reg = pctl->data->pri.x456.reg_advance; value = 0x00; + + /* + * Only SX1506 has RegAdvanced, SX1504/5 are expected + * to initialize this offset to zero + */ + if (!reg) + return 0; break; case SX150X_123: reg = pctl->data->pri.x123.reg_advance; |