This driver has .can_sleep flag set.
So the pisosr_gpio_get() can be called from contexts that can sleep.
Thus use the cansleep() variant in pisosr_gpio_refresh().
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
mutex_lock(&gpio->lock);
if (gpio->load_gpio) {
- gpiod_set_value(gpio->load_gpio, 1);
+ gpiod_set_value_cansleep(gpio->load_gpio, 1);
udelay(1); /* registers load time (~10ns) */
- gpiod_set_value(gpio->load_gpio, 0);
+ gpiod_set_value_cansleep(gpio->load_gpio, 0);
udelay(1); /* registers recovery time (~5ns) */
}