Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iio: pressure: bmp280: Use gpiod_set_value_cansleep()

Replace `gpiod_set_value()` with `gpiod_set_value_cansleep()`, which is
required when the GPIO controller is connected via a slow bus such as
I2C. This is also safe to use in sleepable contexts like the driver
probe function.

Signed-off-by: Salah Triki <salah.triki@gmail.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Salah Triki and committed by
Jonathan Cameron
671b9b6d 62330674

+1 -1
+1 -1
drivers/iio/pressure/bmp280-core.c
··· 3212 3212 return dev_err_probe(dev, PTR_ERR(gpiod), "failed to get reset GPIO\n"); 3213 3213 3214 3214 /* Deassert the signal */ 3215 - gpiod_set_value(gpiod, 0); 3215 + gpiod_set_value_cansleep(gpiod, 0); 3216 3216 3217 3217 data->regmap = regmap; 3218 3218