Skip to content

Commit f301606

Browse files
ndreysholtmann
authored andcommitted
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 <[email protected]> Signed-off-by: Andrey Smirnov <[email protected]> Signed-off-by: Stefan Schmidt <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
1 parent 5eb35a6 commit f301606

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ieee802154/at86rf230.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1715,9 +1715,9 @@ static int at86rf230_probe(struct spi_device *spi)
17151715
/* Reset */
17161716
if (gpio_is_valid(rstn)) {
17171717
udelay(1);
1718-
gpio_set_value(rstn, 0);
1718+
gpio_set_value_cansleep(rstn, 0);
17191719
udelay(1);
1720-
gpio_set_value(rstn, 1);
1720+
gpio_set_value_cansleep(rstn, 1);
17211721
usleep_range(120, 240);
17221722
}
17231723

0 commit comments

Comments
 (0)