summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinctrl-sx150x.c
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2016-11-07 08:53:23 -0800
committerLinus Walleij <linus.walleij@linaro.org>2016-11-08 09:48:49 +0100
commitf9038d603a64dd0f42a3773c96c72809382066de (patch)
tree5548c471dd9ab21d9eeeaab9509484db4eb13f39 /drivers/pinctrl/pinctrl-sx150x.c
parentfd931f2373662a7de8c255e7a86c1e79e8e0baa0 (diff)
downloadblackbird-obmc-linux-f9038d603a64dd0f42a3773c96c72809382066de.tar.gz
blackbird-obmc-linux-f9038d603a64dd0f42a3773c96c72809382066de.zip
pinctrl-sx150x: Remove magic numbers from sx150x_reset
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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/pinctrl/pinctrl-sx150x.c b/drivers/pinctrl/pinctrl-sx150x.c
index 56abe36071ed..dc1341fdc73d 100644
--- a/drivers/pinctrl/pinctrl-sx150x.c
+++ b/drivers/pinctrl/pinctrl-sx150x.c
@@ -49,6 +49,8 @@ enum {
SX150X_MAX_REGISTER = 0xad,
SX150X_IRQ_TYPE_EDGE_RISING = 0x1,
SX150X_IRQ_TYPE_EDGE_FALLING = 0x2,
+ SX150X_789_RESET_KEY1 = 0x12,
+ SX150X_789_RESET_KEY2 = 0x34,
};
struct sx150x_123_pri {
@@ -771,13 +773,13 @@ static int sx150x_reset(struct sx150x_pinctrl *pctl)
err = i2c_smbus_write_byte_data(pctl->client,
pctl->data->pri.x789.reg_reset,
- 0x12);
+ SX150X_789_RESET_KEY1);
if (err < 0)
return err;
err = i2c_smbus_write_byte_data(pctl->client,
pctl->data->pri.x789.reg_reset,
- 0x34);
+ SX150X_789_RESET_KEY2);
return err;
}
OpenPOWER on IntegriCloud