[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190106083754.6004-4-afaerber@suse.de>
Date: Sun, 6 Jan 2019 09:37:46 +0100
From: Andreas Färber <afaerber@...e.de>
To: linux-lpwan@...ts.infradead.org
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
Andreas Färber <afaerber@...e.de>,
Ben Whitten <ben.whitten@...il.com>,
"David S. Miller" <davem@...emloft.net>
Subject: [PATCH lora-next 03/11] net: lora: sx130x: Revert drop of sx1301_soft_reset()
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@...il.com>
Signed-off-by: Andreas Färber <afaerber@...e.de>
---
drivers/net/lora/sx130x.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
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;
--
2.16.4
Powered by blists - more mailing lists