All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Stein <alexander.stein@systec-electronic.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org, Bartosz Golaszewski <brgl@bgdev.pl>,
	Felipe Balbi <felipe.balbi@linux.intel.com>
Subject: Re: [PATCH] gpio: Timestamp events in hardirq handler
Date: Thu, 30 Nov 2017 10:46:35 +0100	[thread overview]
Message-ID: <3058528.dbeyJzq7DI@ws-stein> (raw)
In-Reply-To: <20171130092655.25965-1-linus.walleij@linaro.org>

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


  parent reply	other threads:[~2017-11-30  9:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-30  9:26 [PATCH] gpio: Timestamp events in hardirq handler Linus Walleij
2017-11-30  9:32 ` Felipe Balbi
2017-11-30  9:48   ` Linus Walleij
2017-11-30  9:46 ` Alexander Stein [this message]
2017-11-30  9:49   ` Linus Walleij
2018-01-23 12:37     ` Felipe Balbi
2018-01-23 13:42       ` Linus Walleij
2018-01-23 13:53         ` Felipe Balbi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3058528.dbeyJzq7DI@ws-stein \
    --to=alexander.stein@systec-electronic.com \
    --cc=brgl@bgdev.pl \
    --cc=felipe.balbi@linux.intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.