Commit b30d31e4 authored by Andrey Smirnov's avatar Andrey Smirnov Committed by Linus Walleij

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: default avatarNeil Armstrong <narmstrong@baylibre.com>
Acked-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
Signed-off-by: default avatarAndrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 310cdfa0
......@@ -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;
......
Markdown is supported
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