Skip to content

Commit 5f79e44

Browse files
committed
iio: adc: ad9361: use gpiod_set_value_cansleep() when resetting chip
The gpiod_set_value() invocation for the reset pin always happens in a context where sleeping is possible. Use gpiod_set_value_cansleep() to indicate this. This will make sure that GPIO drivers that will sleep can be used to driver the reset GPIO. Signed-off-by: Alexandru Ardelean <[email protected]>
1 parent be03583 commit 5f79e44

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/iio/adc/ad9361.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -934,9 +934,9 @@ static int ad9361_1rx1tx_channel_map(struct ad9361_rf_phy *phy, bool tx, int cha
934934
static int ad9361_reset(struct ad9361_rf_phy *phy)
935935
{
936936
if (phy->pdata->reset_gpio) {
937-
gpiod_set_value(phy->pdata->reset_gpio, 0);
937+
gpiod_set_value_cansleep(phy->pdata->reset_gpio, 0);
938938
mdelay(1);
939-
gpiod_set_value(phy->pdata->reset_gpio, 1);
939+
gpiod_set_value_cansleep(phy->pdata->reset_gpio, 1);
940940
mdelay(1);
941941
dev_dbg(&phy->spi->dev, "%s: by GPIO", __func__);
942942
return 0;

0 commit comments

Comments
 (0)