Commit 7d68a79a authored by Andrey Smirnov's avatar Andrey Smirnov Committed by Linus Walleij

pinctrl-sx150x: Replace magic number in sx150x_init_hw

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 978ac033
...@@ -43,6 +43,9 @@ enum { ...@@ -43,6 +43,9 @@ enum {
SX150X_456, SX150X_456,
SX150X_789, SX150X_789,
}; };
enum {
SX150X_789_REG_MISC_AUTOCLEAR_OFF = 1 << 0,
};
struct sx150x_123_pri { struct sx150x_123_pri {
u8 reg_pld_mode; u8 reg_pld_mode;
...@@ -935,7 +938,7 @@ static int sx150x_init_hw(struct sx150x_pinctrl *pctl) ...@@ -935,7 +938,7 @@ static int sx150x_init_hw(struct sx150x_pinctrl *pctl)
if (pctl->data->model == SX150X_789) if (pctl->data->model == SX150X_789)
err = sx150x_i2c_write(pctl->client, err = sx150x_i2c_write(pctl->client,
pctl->data->pri.x789.reg_misc, pctl->data->pri.x789.reg_misc,
0x01); SX150X_789_REG_MISC_AUTOCLEAR_OFF);
else if (pctl->data->model == SX150X_456) else if (pctl->data->model == SX150X_456)
err = sx150x_i2c_write(pctl->client, err = sx150x_i2c_write(pctl->client,
pctl->data->pri.x456.reg_advance, pctl->data->pri.x456.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