提交 dc62b56a 编写于 作者: A Aaron Lu 提交者: Linus Walleij

gpio / ACPI: use *_cansleep version of gpiod_get/set APIs

The GPIO operation region handler should be called where sleep is
allowed, so we should use the *_cansleep version of gpiod_get/set APIs
or we will get a warning message complaining invalid context if the GPIO
chip has the cansleep flag set.
Signed-off-by: NAaron Lu <aaron.lu@intel.com>
Acked-by: NMika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: NAlexandre Courbot <acourbot@nvidia.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 7b42e3db
......@@ -449,9 +449,10 @@ acpi_gpio_adr_space_handler(u32 function, acpi_physical_address address,
mutex_unlock(&achip->conn_lock);
if (function == ACPI_WRITE)
gpiod_set_raw_value(desc, !!((1 << i) & *value));
gpiod_set_raw_value_cansleep(desc,
!!((1 << i) & *value));
else
*value |= (u64)gpiod_get_raw_value(desc) << i;
*value |= (u64)gpiod_get_raw_value_cansleep(desc) << i;
}
out:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册