On Thursday, November 30, 2017, 10:26:55 AM CET Linus Walleij wrote: > --- a/drivers/gpio/gpiolib.c > +++ b/drivers/gpio/gpiolib.c > @@ -587,6 +587,9 @@ static int linehandle_create(struct gpio_device *gdev, void __user *ip) > * @events: KFIFO for the GPIO events > * @read_lock: mutex lock to protect reads from colliding with adding > * new events to the FIFO > + * @timestamp: cache for the timestamp storing it between hardirq > + * and IRQ thread, used to bring the timestamp close to the actual > + * event > */ > struct lineevent_state { > struct gpio_device *gdev; > @@ -597,6 +600,7 @@ struct lineevent_state { > wait_queue_head_t wait; > DECLARE_KFIFO(events, struct gpioevent_data, 16); > struct mutex read_lock; > + s64 timestamp; ^^^ u64? ktime_get_real_ns() returns u64 and struct gpioevent_data has __u64 for timestamp. Best regards, Alexander -- 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