mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
pinctrl-sx150x: Remove magic numbers from sx150x_reset
Tested-by: Neil Armstrong <[email protected]> Acked-by: Neil Armstrong <[email protected]> Signed-off-by: Andrey Smirnov <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
parent
fd931f2373
commit
f9038d603a
1 changed files with 4 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue