Hi,

On Fri, Jun 27, 2014 at 04:14:54PM +0530, Varka Bhadram wrote:
> On 06/27/2014 03:49 PM, Alexander Aring wrote:
> >Signed-off-by: Alexander Aring <alex.ar...@gmail.com>
> >---
> >  drivers/net/ieee802154/at86rf230.c | 6 +++++-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> >
> >diff --git a/drivers/net/ieee802154/at86rf230.c 
> >b/drivers/net/ieee802154/at86rf230.c
> >index efaa3c0..00fbba2 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;
> >@@ -1249,6 +1250,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,
> >@@ -1265,6 +1267,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,
> >@@ -1281,6 +1284,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 = 110,
> >@@ -1340,7 +1344,7 @@ static int at86rf230_hw_init(struct at86rf230_local 
> >*lp)
> >     if (rc)
> >             return rc;
> >     /* Wait the next SLEEP cycle */
> >-    msleep(100);
> >+    udelay(lp->data->t_sleep_cycle);
> 
> udelay_range() preffered over udelay() ?...

There is no udelay_range function, I think what you mean is
usleep_range. The usleep_range function would start the scheduler. This
waits for the current chips 330 us. This is a very small. The udelay
function can handle the 330 us delay, so why not?

There are some limit for udelay, that's why I use usleep_range in
RX_AACK_BUSY waiting, this could take time like 5 ms. With udelay my
kernel drops some warnings. :-)

- Alex

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Linux-zigbee-devel mailing list
Linux-zigbee-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel

Reply via email to