zephyr/drivers/timer
Andy Ross ab488277bc drivers/timer: Unify timeout setting APIs
The existing API had two almost identical functions: _set_time() and
_timer_idle_enter().  Both simply instruct the timer driver to set the
next timer interrupt expiration appropriately so that the call to
z_clock_announce() will be made at the requested number of ticks.  On
most/all hardware, these should be implementable identically.

Unfortunately because they are specified differently, existing drivers
have implemented them in parallel.

Specify a new, unified, z_clock_set_timeout().  Document it clearly
for implementors.  And provide a shim layer for legacy drivers that
will continue to use the old functions.

Note that this patch fixes an existing bug found by inspection: the
old call to _set_time() out of z_clock_announce() failed to test for
the "wait forever" case in the situation where clock_always_on is
true, meaning that a system that reached this point and then never set
another timeout would freeze its uptime clock incorrectly.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2018-10-16 15:03:10 -04:00
..
altera_avalon_timer_hal.c drivers/timer: Unify timeout setting APIs 2018-10-16 15:03:10 -04:00
arcv2_timer0.c drivers/timer: Unify timeout setting APIs 2018-10-16 15:03:10 -04:00
CMakeLists.txt board: posix: add native_posix board definition 2017-12-27 14:16:08 -05:00
cortex_m_systick.c drivers/timer: Unify timeout setting APIs 2018-10-16 15:03:10 -04:00
hpet.c drivers/timer: Unify timeout setting APIs 2018-10-16 15:03:10 -04:00
Kconfig drivers: timer nRF: simplify kconfig depend 2018-10-15 09:36:37 -04:00
legacy_api.h drivers/timer: Unify timeout setting APIs 2018-10-16 15:03:10 -04:00
loapic_timer.c drivers/timer: Unify timeout setting APIs 2018-10-16 15:03:10 -04:00
native_posix_timer.c drivers/timer: Unify timeout setting APIs 2018-10-16 15:03:10 -04:00
nrf_rtc_timer.c drivers/timer: Unify timeout setting APIs 2018-10-16 15:03:10 -04:00
pulpino_timer.c sys_clock: Fix up tick announce API 2018-10-16 15:03:10 -04:00
riscv_machine_timer.c drivers/timer: Unify timeout setting APIs 2018-10-16 15:03:10 -04:00
sys_clock_init.c drivers: timer: init earlier in boot sequence 2017-07-10 11:44:56 -07:00
xtensa_sys_timer.c drivers/timer: Unify timeout setting APIs 2018-10-16 15:03:10 -04:00