[PATCH lora-next 03/11] net: lora: sx130x: Revert drop of sx1301_soft_reset()
From: Andreas FÃrber
Date: Sun Jan 06 2019 - 03:38:22 EST
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@xxxxxxxxx>
Signed-off-by: Andreas FÃrber <afaerber@xxxxxxx>
---
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