Rename timer driver API functions to be consistent. ADD DOCS TO THE HEADER so implementations understand what the requirements are. Remove some unused functions that don't need declarations here. Also removes the per-platform #if's around the power control callback in favor of a weak-linked noop function in the driver initialization (adds a few bytes of code to default platforms -- we'll live, I think). Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
32 lines
624 B
C
32 lines
624 B
C
/*
|
|
* Copyright (c) 2015 Wind River Systems, Inc.
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/**
|
|
* @file
|
|
* @brief Initialize system clock driver
|
|
*
|
|
* Initializing the timer driver is done in this module to reduce code
|
|
* duplication.
|
|
*/
|
|
|
|
#include <kernel.h>
|
|
#include <init.h>
|
|
#include <drivers/system_timer.h>
|
|
|
|
SYS_DEVICE_DEFINE("sys_clock", z_clock_driver_init, z_clock_device_ctrl,
|
|
PRE_KERNEL_2, CONFIG_SYSTEM_CLOCK_INIT_PRIORITY);
|
|
|
|
int __weak z_clock_driver_init(struct device *device)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
int __weak z_clock_device_ctrl(struct device *device,
|
|
u32_t ctrl_command, void *context)
|
|
{
|
|
return 0;
|
|
}
|