Commit f3016069 authored by Andrey Smirnov's avatar Andrey Smirnov Committed by Marcel Holtmann

at86rf230: Allow slow GPIO pins for "rstn"

Driver code never touches "rstn" signal in atomic context, so there's
no need to implicitly put such restriction on it by using gpio_set_value
to manipulate it. Replace gpio_set_value to gpio_set_value_cansleep to
fix that.

As a an example of where such restriction might be inconvenient,
consider a hardware design where "rstn" is connected to a pin of I2C/SPI
GPIO expander chip.

Cc: Chris Healy <cphealy@gmail.com>
Signed-off-by: default avatarAndrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: default avatarStefan Schmidt <stefan@osg.samsung.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 5eb35a6c
...@@ -1715,9 +1715,9 @@ static int at86rf230_probe(struct spi_device *spi) ...@@ -1715,9 +1715,9 @@ static int at86rf230_probe(struct spi_device *spi)
/* Reset */ /* Reset */
if (gpio_is_valid(rstn)) { if (gpio_is_valid(rstn)) {
udelay(1); udelay(1);
gpio_set_value(rstn, 0); gpio_set_value_cansleep(rstn, 0);
udelay(1); udelay(1);
gpio_set_value(rstn, 1); gpio_set_value_cansleep(rstn, 1);
usleep_range(120, 240); usleep_range(120, 240);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment