drivers: rtc: add system calls
rtc_set_config() omitted since it registers a callback. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
2e60b24a80
commit
9ca42fb033
3 changed files with 41 additions and 6 deletions
|
@ -1 +1,2 @@
|
|||
obj-$(CONFIG_RTC_QMSI) += rtc_qmsi.o
|
||||
obj-$(CONFIG_USERSPACE) += rtc_handlers.o
|
||||
|
|
23
drivers/rtc/rtc_handlers.c
Normal file
23
drivers/rtc/rtc_handlers.c
Normal file
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* Copyright (c) 2017 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <syscall_handler.h>
|
||||
#include <rtc.h>
|
||||
|
||||
_SYSCALL_HANDLER1_SIMPLE(rtc_read, K_OBJ_DRIVER_RTC, struct device *);
|
||||
|
||||
_SYSCALL_HANDLER1_SIMPLE_VOID(rtc_enable, K_OBJ_DRIVER_RTC, struct device *);
|
||||
|
||||
_SYSCALL_HANDLER1_SIMPLE_VOID(rtc_disable, K_OBJ_DRIVER_RTC, struct device *);
|
||||
|
||||
_SYSCALL_HANDLER(rtc_set_alarm, dev, alarm_val)
|
||||
{
|
||||
_SYSCALL_OBJ(dev, K_OBJ_DRIVER_RTC);
|
||||
return _impl_rtc_set_alarm((struct device *)dev, alarm_val);
|
||||
}
|
||||
|
||||
_SYSCALL_HANDLER1_SIMPLE(rtc_get_pending_int, K_OBJ_DRIVER_RTC,
|
||||
struct device *);
|
Loading…
Add table
Add a link
Reference in a new issue