lkml.org 
[lkml]   [2019]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH lora-next 03/11] net: lora: sx130x: Revert drop of sx1301_soft_reset()
Date
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(-)

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
\
 
 \ /
  Last update: 2019-01-06 09:39    [W:3.178 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site