1 /*
2  * Copyright (c) 2019 Intel Corporation
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #include <zephyr/drivers/kscan.h>
8 #include <zephyr/syscall_handler.h>
9 
z_vrfy_kscan_config(const struct device * dev,kscan_callback_t callback_isr)10 static inline int z_vrfy_kscan_config(const struct device *dev,
11 				      kscan_callback_t callback_isr)
12 {
13 	Z_OOPS(Z_SYSCALL_DRIVER_KSCAN(dev, config));
14 	Z_OOPS(Z_SYSCALL_VERIFY_MSG(callback_isr == 0,
15 				    "callback cannot be set from user mode"));
16 	return z_impl_kscan_config((const struct device *)dev, callback_isr);
17 }
18 #include <syscalls/kscan_config_mrsh.c>
19 
z_vrfy_kscan_disable_callback(const struct device * dev)20 static inline int z_vrfy_kscan_disable_callback(const struct device *dev)
21 {
22 	Z_OOPS(Z_SYSCALL_DRIVER_KSCAN(dev, disable_callback));
23 
24 	return z_impl_kscan_disable_callback((const struct device *)dev);
25 }
26 #include <syscalls/kscan_disable_callback_mrsh.c>
27 
z_vrfy_kscan_enable_callback(const struct device * dev)28 static int z_vrfy_kscan_enable_callback(const struct device *dev)
29 {
30 	Z_OOPS(Z_SYSCALL_DRIVER_KSCAN(dev, enable_callback));
31 
32 	return z_impl_kscan_enable_callback((const struct device *)dev);
33 }
34 #include <syscalls/kscan_enable_callback_mrsh.c>
35