* [PATCH net 0/2] at86rf230: various fixes
@ 2014-04-14 16:06 Alexander Aring
2014-04-14 16:06 ` [PATCH net 1/2] at86rf230: remove check if AVDD settled Alexander Aring
[not found] ` <1397491606-7290-1-git-send-email-alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 2 replies; 3+ messages in thread
From: Alexander Aring @ 2014-04-14 16:06 UTC (permalink / raw)
To: alex.bluesman.smirnov-Re5JQEeQqe8AvxtiuMwx3w
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Hi,
I currently working on a big cleanup for the at86rf230 and I detect some bugs
in the current implementation. I will send patch stacks if net-next is open
again.
It's funny to find the forgotten shift and mask in the __at86rf230_read_subreg
function but it only makes trouble if csma is activated that's why it still works
before for me.
- Alex
Alexander Aring (2):
at86rf230: remove check if AVDD settled
at86rf230: fix __at86rf230_read_subreg function
drivers/net/ieee802154/at86rf230.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
--
1.9.2
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH net 1/2] at86rf230: remove check if AVDD settled
2014-04-14 16:06 [PATCH net 0/2] at86rf230: various fixes Alexander Aring
@ 2014-04-14 16:06 ` Alexander Aring
[not found] ` <1397491606-7290-1-git-send-email-alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
1 sibling, 0 replies; 3+ messages in thread
From: Alexander Aring @ 2014-04-14 16:06 UTC (permalink / raw)
To: alex.bluesman.smirnov
Cc: dbaryshkov, linux-zigbee-devel, netdev, phoebe.buckheister,
werner, Alexander Aring
The AVDD regulator is only settled TX_ON (PLL_ON) state. Since commit
7dcbd22a97eb0689e6c583ad630ae0e7341e34c1 ("ieee802154: ensure that first
RF212 state comes from TRX_OFF"). We are in TRX_OFF state at the
beginning.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
drivers/net/ieee802154/at86rf230.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c
index 430bb0d..e102eef 100644
--- a/drivers/net/ieee802154/at86rf230.c
+++ b/drivers/net/ieee802154/at86rf230.c
@@ -1025,14 +1025,6 @@ static int at86rf230_hw_init(struct at86rf230_local *lp)
return -EINVAL;
}
- rc = at86rf230_read_subreg(lp, SR_AVDD_OK, &status);
- if (rc)
- return rc;
- if (!status) {
- dev_err(&lp->spi->dev, "AVDD error\n");
- return -EINVAL;
- }
-
return 0;
}
--
1.9.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH net 2/2] at86rf230: fix __at86rf230_read_subreg function
[not found] ` <1397491606-7290-1-git-send-email-alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2014-04-14 16:06 ` Alexander Aring
0 siblings, 0 replies; 3+ messages in thread
From: Alexander Aring @ 2014-04-14 16:06 UTC (permalink / raw)
To: alex.bluesman.smirnov-Re5JQEeQqe8AvxtiuMwx3w
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
The __at86rf230_read_subreg function don't mask and shift register
contents which it should do. This patch adds the necessary masks and
shift operations in this function.
Since we have csma support this can make some trouble on state changes.
Signed-off-by: Alexander Aring <alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
drivers/net/ieee802154/at86rf230.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c
index e102eef..e36f194 100644
--- a/drivers/net/ieee802154/at86rf230.c
+++ b/drivers/net/ieee802154/at86rf230.c
@@ -365,7 +365,7 @@ __at86rf230_read_subreg(struct at86rf230_local *lp,
dev_vdbg(&lp->spi->dev, "buf[1] = %02x\n", buf[1]);
if (status == 0)
- *data = buf[1];
+ *data = (buf[1] & mask) >> shift;
return status;
}
--
1.9.2
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-04-14 16:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-14 16:06 [PATCH net 0/2] at86rf230: various fixes Alexander Aring
2014-04-14 16:06 ` [PATCH net 1/2] at86rf230: remove check if AVDD settled Alexander Aring
[not found] ` <1397491606-7290-1-git-send-email-alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-04-14 16:06 ` [PATCH net 2/2] at86rf230: fix __at86rf230_read_subreg function Alexander Aring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).