netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@gmail.com>
To: alex.bluesman.smirnov@gmail.com
Cc: dbaryshkov@gmail.com, linux-zigbee-devel@lists.sourceforge.net,
	netdev@vger.kernel.org, werner@almesberger.net,
	Alexander Aring <alex.aring@gmail.com>
Subject: [PATCH net-next 12/13] at86rf230: add sleep cycle timing
Date: Sat, 28 Jun 2014 20:33:50 +0200	[thread overview]
Message-ID: <1403980431-6201-13-git-send-email-alex.aring@gmail.com> (raw)
In-Reply-To: <1403980431-6201-1-git-send-email-alex.aring@gmail.com>

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
 drivers/net/ieee802154/at86rf230.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c
index 548b69d..a46ef43 100644
--- a/drivers/net/ieee802154/at86rf230.c
+++ b/drivers/net/ieee802154/at86rf230.c
@@ -44,6 +44,7 @@ struct at86rf230_local;
  * All timings are in us.
  */
 struct at86rf2xx_chip_data {
+	u16 t_sleep_cycle;
 	u16 t_channel_switch;
 	u16 t_reset_to_off;
 	u16 t_off_to_aack;
@@ -1252,6 +1253,7 @@ static struct ieee802154_ops at86rf230_ops = {
 };
 
 static struct at86rf2xx_chip_data at86rf233_data = {
+	.t_sleep_cycle = 330,
 	.t_channel_switch = 11,
 	.t_reset_to_off = 26,
 	.t_off_to_aack = 80,
@@ -1267,6 +1269,7 @@ static struct at86rf2xx_chip_data at86rf233_data = {
 };
 
 static struct at86rf2xx_chip_data at86rf231_data = {
+	.t_sleep_cycle = 330,
 	.t_channel_switch = 24,
 	.t_reset_to_off = 37,
 	.t_off_to_aack = 110,
@@ -1282,6 +1285,7 @@ static struct at86rf2xx_chip_data at86rf231_data = {
 };
 
 static struct at86rf2xx_chip_data at86rf212_data = {
+	.t_sleep_cycle = 330,
 	.t_channel_switch = 11,
 	.t_reset_to_off = 26,
 	.t_off_to_aack = 200,
@@ -1340,7 +1344,8 @@ static int at86rf230_hw_init(struct at86rf230_local *lp)
 	if (rc)
 		return rc;
 	/* Wait the next SLEEP cycle */
-	msleep(100);
+	usleep_range(lp->data->t_sleep_cycle,
+		     lp->data->t_sleep_cycle + 100);
 
 	rc = at86rf230_read_subreg(lp, SR_DVDD_OK, &dvdd);
 	if (rc)
-- 
2.0.1

  parent reply	other threads:[~2014-06-28 18:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-28 18:33 [PATCH net-next 00/13] at86rf230: rework driver implementation Alexander Aring
2014-06-28 18:33 ` [PATCH net-next 02/13] at86rf230: add regmap support Alexander Aring
2014-06-28 18:33 ` [PATCH net-next 05/13] at86rf230: add support for at86rf23x desense Alexander Aring
2014-06-28 18:33 ` [PATCH net-next 08/13] at86rf230: rework irq_pol setting Alexander Aring
2014-06-28 18:33 ` [PATCH net-next 09/13] at86rf230: rework state change and start/stop Alexander Aring
     [not found] ` <1403980431-6201-1-git-send-email-alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-06-28 18:33   ` [PATCH net-next 01/13] mac802154: at86rf230: add hw flags and merge ops Alexander Aring
2014-07-02  6:14     ` David Miller
2014-06-28 18:33   ` [PATCH net-next 03/13] at86rf230: rework detect device handling Alexander Aring
2014-06-28 18:33   ` [PATCH net-next 04/13] at86rf230: remove is212 and add driver data Alexander Aring
2014-06-28 18:33   ` [PATCH net-next 06/13] at86rf230: rework transmit and receive handling Alexander Aring
2014-06-28 18:33   ` [PATCH net-next 07/13] at86rf230: move RX_SAFE_MODE setting to hw_init Alexander Aring
2014-06-28 18:33   ` [PATCH net-next 10/13] at86rf230: rework reset to trx_off state change Alexander Aring
2014-06-28 18:33   ` [PATCH net-next 11/13] at86rf230: add timing for channel switch Alexander Aring
2014-06-28 18:33   ` [PATCH net-next 13/13] at86rf230: add new author Alexander Aring
2014-06-28 18:33 ` Alexander Aring [this message]
2014-07-01  7:14 ` [Linux-zigbee-devel] [PATCH net-next 00/13] at86rf230: rework driver implementation Thomas Stilwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1403980431-6201-13-git-send-email-alex.aring@gmail.com \
    --to=alex.aring@gmail.com \
    --cc=alex.bluesman.smirnov@gmail.com \
    --cc=dbaryshkov@gmail.com \
    --cc=linux-zigbee-devel@lists.sourceforge.net \
    --cc=netdev@vger.kernel.org \
    --cc=werner@almesberger.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).