aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ieee802154
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2014-03-15 04:29:05 -0400
committerDavid S. Miller <davem@davemloft.net>2014-03-17 16:10:26 -0400
commit56f023fbe8fff04a46b5486288eaa1dc8bfdd5b9 (patch)
tree8de20aaf7622d6019ddc63df13c44c02b6648a5f /drivers/net/ieee802154
parent7e8146189a6c2ba9445b8d848847f2520c6cb028 (diff)
at86rf230: change reset timings
While checkpatch another patch I got a: "WARNING: msleep < 20ms can sleep for up to 20ms" The datasheet of at86rf231 and at86rf212 says a minimum delay for reset pulse width and spi access latency after reset is 625 nanoseconds. This patch removes the 1 milliseconds sleep and replace it with a 1 microseconds udelay which should be also okay for the reset pulse width. To change the state from RESET -> TRX_OFF the at86rf230 device needs 120 microseconds, this is a worst case of all at86rf* chips. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ieee802154')
-rw-r--r--drivers/net/ieee802154/at86rf230.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c
index 030bf3995e7e..37442407d948 100644
--- a/drivers/net/ieee802154/at86rf230.c
+++ b/drivers/net/ieee802154/at86rf230.c
@@ -1080,11 +1080,11 @@ static int at86rf230_probe(struct spi_device *spi)
1080 } 1080 }
1081 1081
1082 /* Reset */ 1082 /* Reset */
1083 msleep(1); 1083 udelay(1);
1084 gpio_set_value(pdata->rstn, 0); 1084 gpio_set_value(pdata->rstn, 0);
1085 msleep(1); 1085 udelay(1);
1086 gpio_set_value(pdata->rstn, 1); 1086 gpio_set_value(pdata->rstn, 1);
1087 msleep(1); 1087 usleep_range(120, 240);
1088 1088
1089 rc = __at86rf230_detect_device(spi, &man_id, &part, &version); 1089 rc = __at86rf230_detect_device(spi, &man_id, &part, &version);
1090 if (rc < 0) 1090 if (rc < 0)