From: Alexander Aring Date: Sat, 15 Mar 2014 08:29:05 +0000 (+0100) Subject: at86rf230: change reset timings X-Git-Tag: v3.15-rc1~113^2~140^2~2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=56f023fbe8fff04a46b5486288eaa1dc8bfdd5b9;p=karo-tx-linux.git 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 Signed-off-by: David S. Miller --- 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) } /* Reset */ - msleep(1); + udelay(1); gpio_set_value(pdata->rstn, 0); - msleep(1); + udelay(1); gpio_set_value(pdata->rstn, 1); - msleep(1); + usleep_range(120, 240); rc = __at86rf230_detect_device(spi, &man_id, &part, &version); if (rc < 0)