1 /*
2  * Copyright (c) 2023 Google LLC
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #include <zephyr/drivers/usb/usb_bc12.h>
8 #include <zephyr/syscall_handler.h>
9 
z_vrfy_bc12_set_role(const struct device * dev,enum bc12_role role)10 static inline int z_vrfy_bc12_set_role(const struct device *dev, enum bc12_role role)
11 {
12 	Z_OOPS(Z_SYSCALL_DRIVER_BC12(dev, set_role));
13 
14 	return z_impl_bc12_set_role(dev, role);
15 }
16 
z_vrfy_bc12_set_result_cb(const struct device * dev,bc12_callback_t cb,void * user_data)17 static inline int z_vrfy_bc12_set_result_cb(const struct device *dev, bc12_callback_t cb,
18 					    void *user_data)
19 {
20 	Z_OOPS(Z_SYSCALL_DRIVER_BC12(dev, set_result_cb));
21 	Z_OOPS(Z_SYSCALL_VERIFY_MSG(cb == NULL, "callbacks may not be set from user mode"));
22 
23 	return z_impl_bc12_set_result_cb(dev, cb, user_data);
24 }
25