diff options
author | Alexander Aring <alex.aring@gmail.com> | 2014-07-02 18:20:54 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-08 00:29:25 -0400 |
commit | 7a4ef918541db1509226cca3b6fba2fd20f5f9bc (patch) | |
tree | 46e44759e941550accc81459f055f7f4f41eef3f /drivers/net/ieee802154 | |
parent | 984e0c682c5aebdf65bab95906ec0538e9d6ee7d (diff) |
at86rf230: add sleep cycle timing
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.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c index dbf85b85a708..79ec843416f7 100644 --- a/drivers/net/ieee802154/at86rf230.c +++ b/drivers/net/ieee802154/at86rf230.c | |||
@@ -42,6 +42,7 @@ struct at86rf230_local; | |||
42 | * All timings are in us. | 42 | * All timings are in us. |
43 | */ | 43 | */ |
44 | struct at86rf2xx_chip_data { | 44 | struct at86rf2xx_chip_data { |
45 | u16 t_sleep_cycle; | ||
45 | u16 t_channel_switch; | 46 | u16 t_channel_switch; |
46 | u16 t_reset_to_off; | 47 | u16 t_reset_to_off; |
47 | u16 t_off_to_aack; | 48 | u16 t_off_to_aack; |
@@ -1250,6 +1251,7 @@ static struct ieee802154_ops at86rf230_ops = { | |||
1250 | }; | 1251 | }; |
1251 | 1252 | ||
1252 | static struct at86rf2xx_chip_data at86rf233_data = { | 1253 | static struct at86rf2xx_chip_data at86rf233_data = { |
1254 | .t_sleep_cycle = 330, | ||
1253 | .t_channel_switch = 11, | 1255 | .t_channel_switch = 11, |
1254 | .t_reset_to_off = 26, | 1256 | .t_reset_to_off = 26, |
1255 | .t_off_to_aack = 80, | 1257 | .t_off_to_aack = 80, |
@@ -1265,6 +1267,7 @@ static struct at86rf2xx_chip_data at86rf233_data = { | |||
1265 | }; | 1267 | }; |
1266 | 1268 | ||
1267 | static struct at86rf2xx_chip_data at86rf231_data = { | 1269 | static struct at86rf2xx_chip_data at86rf231_data = { |
1270 | .t_sleep_cycle = 330, | ||
1268 | .t_channel_switch = 24, | 1271 | .t_channel_switch = 24, |
1269 | .t_reset_to_off = 37, | 1272 | .t_reset_to_off = 37, |
1270 | .t_off_to_aack = 110, | 1273 | .t_off_to_aack = 110, |
@@ -1280,6 +1283,7 @@ static struct at86rf2xx_chip_data at86rf231_data = { | |||
1280 | }; | 1283 | }; |
1281 | 1284 | ||
1282 | static struct at86rf2xx_chip_data at86rf212_data = { | 1285 | static struct at86rf2xx_chip_data at86rf212_data = { |
1286 | .t_sleep_cycle = 330, | ||
1283 | .t_channel_switch = 11, | 1287 | .t_channel_switch = 11, |
1284 | .t_reset_to_off = 26, | 1288 | .t_reset_to_off = 26, |
1285 | .t_off_to_aack = 200, | 1289 | .t_off_to_aack = 200, |
@@ -1338,7 +1342,8 @@ static int at86rf230_hw_init(struct at86rf230_local *lp) | |||
1338 | if (rc) | 1342 | if (rc) |
1339 | return rc; | 1343 | return rc; |
1340 | /* Wait the next SLEEP cycle */ | 1344 | /* Wait the next SLEEP cycle */ |
1341 | msleep(100); | 1345 | usleep_range(lp->data->t_sleep_cycle, |
1346 | lp->data->t_sleep_cycle + 100); | ||
1342 | 1347 | ||
1343 | rc = at86rf230_read_subreg(lp, SR_DVDD_OK, &dvdd); | 1348 | rc = at86rf230_read_subreg(lp, SR_DVDD_OK, &dvdd); |
1344 | if (rc) | 1349 | if (rc) |