On Tue, Dec 5, 2017 at 10:20 AM, Felipe Balbi <felipe.balbi@xxxxxxxxxxxxxxx> wrote: > [Me]: >> I was thinking about it already when implementing it but it fell >> out of my mind. I'm putting in on my TODO. (CC to bartosz >> who might be interested, he's using these ABIs quite a bit.) > > fair enough. In that case, it'll probably be easier to implement > HW-based timestamping with something like below: Indeed. IIO has a per-device sysfs file for setting up the POSIX timestamping named current_timestamp_clock. This was added by Gregor Boire in commit bc2b7dab629a The supported timestamps are: realtime monotonic monotonic_raw realtime_coarse monotonic_coarse boottime tai I could really need some help here... :/ It feels like "monotonic" could very well be what you're looking for but I don't know the POSIX definition of these. Maybe we need to add one more for "device specific"? What I want to do is factor most of that commit out into lib/ and reuse for timestamping in GPIO so we can have coherent timestamps across GPIO and IIO. OK OK O need to get to it and stop talking... I guess it should be set per-gpiochip rather than per-gpio-desc though, but that makes most sense anyways. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html