Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1513323 > unrolled thread

[PATCH 14/14] pinctrl-sx150x: Remove magic numbers from sx150x_reset

Started byAndrey Smirnov <andrew.smirnov@gmail.com>
First post2016-11-01 17:00 +0100
Last post2016-11-01 17:00 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 14/14] pinctrl-sx150x: Remove magic numbers from sx150x_reset Andrey Smirnov <andrew.smirnov@gmail.com> - 2016-11-01 17:00 +0100

#1513323 — [PATCH 14/14] pinctrl-sx150x: Remove magic numbers from sx150x_reset

FromAndrey Smirnov <andrew.smirnov@gmail.com>
Date2016-11-01 17:00 +0100
Subject[PATCH 14/14] pinctrl-sx150x: Remove magic numbers from sx150x_reset
Message-ID<syJDH-29m-9@gated-at.bofh.it>
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/pinctrl/pinctrl-sx150x.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-sx150x.c b/drivers/pinctrl/pinctrl-sx150x.c
index 13afcb9..580a6de 100644
--- a/drivers/pinctrl/pinctrl-sx150x.c
+++ b/drivers/pinctrl/pinctrl-sx150x.c
@@ -48,6 +48,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 {
@@ -761,13 +763,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;
 }
 
-- 
2.5.5

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web