summaryrefslogtreecommitdiff
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2016-11-07 08:53:12 -0800
committerLinus Walleij <linus.walleij@linaro.org>2016-11-08 09:36:03 +0100
commit7d68a79acfd56eea1351fc56d9e454e07912a8ec (patch)
tree942ed7efeebb82dac4803e1a9cfd233de43bec2e /drivers/pinctrl
parent978ac0335d45a58ab6a1d6b6a21c281c83fdadf0 (diff)
pinctrl-sx150x: Replace magic number in sx150x_init_hw
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')
-rw-r--r--drivers/pinctrl/pinctrl-sx150x.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-sx150x.c b/drivers/pinctrl/pinctrl-sx150x.c
index 94667770051e..3ccd04840ab7 100644
--- a/drivers/pinctrl/pinctrl-sx150x.c
+++ b/drivers/pinctrl/pinctrl-sx150x.c
@@ -43,6 +43,9 @@ enum {
SX150X_456,
SX150X_789,
};
+enum {
+ SX150X_789_REG_MISC_AUTOCLEAR_OFF = 1 << 0,
+};
struct sx150x_123_pri {
u8 reg_pld_mode;
@@ -935,7 +938,7 @@ static int sx150x_init_hw(struct sx150x_pinctrl *pctl)
if (pctl->data->model == SX150X_789)
err = sx150x_i2c_write(pctl->client,
pctl->data->pri.x789.reg_misc,
- 0x01);
+ SX150X_789_REG_MISC_AUTOCLEAR_OFF);
else if (pctl->data->model == SX150X_456)
err = sx150x_i2c_write(pctl->client,
pctl->data->pri.x456.reg_advance,