Skip to content
  • Harald Geyer's avatar
    timekeeping: Provide new API to get the current time resolution · 6374f912
    Harald Geyer authored
    
    
    This patch series introduces a new function
    u32 ktime_get_resolution_ns(void)
    which allows to clean up some driver code.
    
    In particular the IIO subsystem has a function to provide timestamps for
    events but no means to get their resolution. So currently the dht11 driver
    tries to guess the resolution in a rather messy and convoluted way. We
    can do much better with the new code.
    
    This API is not designed to be exposed to user space.
    
    This has been tested on i386, sunxi and mxs.
    
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: default avatarHarald Geyer <harald@ccbib.org>
    [jstultz: Tweaked to make it build after upstream changes]
    Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
    6374f912