diff mbox series

[lora-next,03/11] net: lora: sx130x: Revert drop of sx1301_soft_reset()

Message ID 20190106083754.6004-4-afaerber@suse.de
State New
Headers show
Series net: lora: sx130x: Fixes for enabling regcache | expand

Commit Message

Andreas Färber Jan. 6, 2019, 8:37 a.m. UTC
Ben's regmap field conversion patch silently dropped my sx1301_soft_reset() helper.
Soft reset is a special operation, so restore this function as sx130x_soft_reset().

To be squashed.

Cc: Ben Whitten <ben.whitten@gmail.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>

---
 drivers/net/lora/sx130x.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

-- 
2.16.4
diff mbox series

Patch

diff --git a/drivers/net/lora/sx130x.c b/drivers/net/lora/sx130x.c
index 21db0ddb101f..7a387d9a75a0 100644
--- a/drivers/net/lora/sx130x.c
+++ b/drivers/net/lora/sx130x.c
@@ -180,6 +180,11 @@  static int sx130x_field_write(struct sx130x_priv *priv,
 	return regmap_field_write(priv->regmap_fields[field_id], val);
 }
 
+static int sx130x_soft_reset(struct sx130x_priv *priv)
+{
+	return sx130x_field_write(priv, F_SOFT_RESET, 1);
+}
+
 static int sx130x_agc_ram_read(struct sx130x_priv *priv, u8 addr, unsigned int *val)
 {
 	int ret;
@@ -645,7 +650,7 @@  int sx130x_probe(struct device *dev)
 		return ret;
 	}
 
-	ret = sx130x_field_write(priv, F_SOFT_RESET, 1);
+	ret = sx130x_soft_reset(priv);
 	if (ret) {
 		dev_err(dev, "soft reset failed (%d)\n", ret);
 		return ret;