api/gpio: Controller may not support GPIO_INT at all
It's not an error if a driver does not implement callback related function. Let's return -ENOTSUP relevantly. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
064f5f0cef
commit
04d9d57a63
2 changed files with 20 additions and 7 deletions
|
@ -29,20 +29,17 @@ Z_SYSCALL_HANDLER(gpio_read, port, access_op, pin, value)
|
|||
|
||||
Z_SYSCALL_HANDLER(gpio_enable_callback, port, access_op, pin)
|
||||
{
|
||||
Z_OOPS(Z_SYSCALL_DRIVER_GPIO(port, enable_callback));
|
||||
return _impl_gpio_enable_callback((struct device *)port, access_op,
|
||||
pin);
|
||||
}
|
||||
|
||||
Z_SYSCALL_HANDLER(gpio_disable_callback, port, access_op, pin)
|
||||
{
|
||||
Z_OOPS(Z_SYSCALL_DRIVER_GPIO(port, disable_callback));
|
||||
return _impl_gpio_disable_callback((struct device *)port, access_op,
|
||||
pin);
|
||||
}
|
||||
|
||||
Z_SYSCALL_HANDLER(gpio_get_pending_int, port)
|
||||
{
|
||||
Z_OOPS(Z_SYSCALL_DRIVER_GPIO(port, get_pending_int));
|
||||
return _impl_gpio_get_pending_int((struct device *)port);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue