Message ID | 20190106083754.6004-9-afaerber@suse.de |
---|---|
State | New |
Headers | show |
Series | [lora-next,01/11] net: lora: sx125x: Abort on wrong version | expand |
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;
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(-) -- 2.16.4