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 08/11] net: lora: sx130x: Force regmap field write before reading status
Date
Ensure that the F_FORCE_HOST_RADIO_CTRL field gets written before we read
the AGC status register. Otherwise it returns status 01 instead of 87.

Cc: Ben Whitten <ben.whitten@gmail.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
drivers/net/lora/sx130x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/lora/sx130x.c b/drivers/net/lora/sx130x.c
index a0759e277574..0a79548a7480 100644
--- a/drivers/net/lora/sx130x.c
+++ b/drivers/net/lora/sx130x.c
@@ -343,7 +343,7 @@ static int sx130x_agc_calibrate(struct sx130x_priv *priv)
return ret;
}

- ret = sx130x_field_write(priv, F_FORCE_HOST_RADIO_CTRL, 0);
+ ret = sx130x_field_force_write(priv, F_FORCE_HOST_RADIO_CTRL, 0);
if (ret) {
dev_err(priv->dev, "force host control failed\n");
return ret;
--
2.16.4
\
 
 \ /
  Last update: 2019-01-06 09:39    [W:0.056 / U:1.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site