mbox series

[v2,0/3] gpiolib: cdev: allow edge event timestamps to be configured as REALTIME

Message ID 20201014231158.34117-1-warthog618@gmail.com
Headers show
Series gpiolib: cdev: allow edge event timestamps to be configured as REALTIME | expand

Message

Kent Gibson Oct. 14, 2020, 11:11 p.m. UTC
This patch set adds the option to select CLOCK_REALTIME as the source
clock for line events.

The first patch is the core of the change, while the remaining two update
the GPIO tools to make use of the new option.

Changes for v2:
 - change line_event_timestamp() return to u64 to avoid clipping to 32bits
   on 32bit platforms.
 - fix the line spacing after line_event_timestamp()

Kent Gibson (3):
  gpiolib: cdev: allow edge event timestamps to be configured as
    REALTIME
  tools: gpio: add support for reporting realtime event clock to lsgpio
  tools: gpio: add option to report wall-clock time to gpio-event-mon

 drivers/gpio/gpiolib-cdev.c | 21 ++++++++++++++++++---
 drivers/gpio/gpiolib.h      |  1 +
 include/uapi/linux/gpio.h   | 12 +++++++++---
 tools/gpio/gpio-event-mon.c |  6 +++++-
 tools/gpio/lsgpio.c         |  4 ++++
 5 files changed, 37 insertions(+), 7 deletions(-)

Comments

Linus Walleij Oct. 28, 2020, 4:01 p.m. UTC | #1
On Thu, Oct 15, 2020 at 1:12 AM Kent Gibson <warthog618@gmail.com> wrote:

> This patch set adds the option to select CLOCK_REALTIME as the source
> clock for line events.
>
> The first patch is the core of the change, while the remaining two update
> the GPIO tools to make use of the new option.
>
> Changes for v2:
>  - change line_event_timestamp() return to u64 to avoid clipping to 32bits
>    on 32bit platforms.
>  - fix the line spacing after line_event_timestamp()

Where are we standing with this patch set? Good to go so
I should just try to merge it?

Yours,
Linus Walleij
Kent Gibson Oct. 28, 2020, 11:22 p.m. UTC | #2
On Wed, Oct 28, 2020 at 05:01:49PM +0100, Linus Walleij wrote:
> On Thu, Oct 15, 2020 at 1:12 AM Kent Gibson <warthog618@gmail.com> wrote:
> 
> > This patch set adds the option to select CLOCK_REALTIME as the source
> > clock for line events.
> >
> > The first patch is the core of the change, while the remaining two update
> > the GPIO tools to make use of the new option.
> >
> > Changes for v2:
> >  - change line_event_timestamp() return to u64 to avoid clipping to 32bits
> >    on 32bit platforms.
> >  - fix the line spacing after line_event_timestamp()
> 
> Where are we standing with this patch set? Good to go so
> I should just try to merge it?
> 

I'm fine with it, especially now that I've tested it on 32bit platforms
as well as 64bit.

Bart was ok with v1, and I doubt the changes for v2 would negatively
impact that, though I did overlook adding his review tag.

Cheers,
Kent.

> Yours,
> Linus Walleij
Bartosz Golaszewski Oct. 30, 2020, 2:49 p.m. UTC | #3
On Thu, Oct 29, 2020 at 12:22 AM Kent Gibson <warthog618@gmail.com> wrote:
>

> On Wed, Oct 28, 2020 at 05:01:49PM +0100, Linus Walleij wrote:

> > On Thu, Oct 15, 2020 at 1:12 AM Kent Gibson <warthog618@gmail.com> wrote:

> >

> > > This patch set adds the option to select CLOCK_REALTIME as the source

> > > clock for line events.

> > >

> > > The first patch is the core of the change, while the remaining two update

> > > the GPIO tools to make use of the new option.

> > >

> > > Changes for v2:

> > >  - change line_event_timestamp() return to u64 to avoid clipping to 32bits

> > >    on 32bit platforms.

> > >  - fix the line spacing after line_event_timestamp()

> >

> > Where are we standing with this patch set? Good to go so

> > I should just try to merge it?

> >

>

> I'm fine with it, especially now that I've tested it on 32bit platforms

> as well as 64bit.

>

> Bart was ok with v1, and I doubt the changes for v2 would negatively

> impact that, though I did overlook adding his review tag.

>

> Cheers,

> Kent.

>

> > Yours,

> > Linus Walleij


I'll take it through my tree then.

Bartosz
Bartosz Golaszewski Oct. 30, 2020, 2:52 p.m. UTC | #4
On Fri, Oct 30, 2020 at 3:49 PM Bartosz Golaszewski
<bgolaszewski@baylibre.com> wrote:
>
> On Thu, Oct 29, 2020 at 12:22 AM Kent Gibson <warthog618@gmail.com> wrote:
> >
> > On Wed, Oct 28, 2020 at 05:01:49PM +0100, Linus Walleij wrote:
> > > On Thu, Oct 15, 2020 at 1:12 AM Kent Gibson <warthog618@gmail.com> wrote:
> > >
> > > > This patch set adds the option to select CLOCK_REALTIME as the source
> > > > clock for line events.
> > > >
> > > > The first patch is the core of the change, while the remaining two update
> > > > the GPIO tools to make use of the new option.
> > > >
> > > > Changes for v2:
> > > >  - change line_event_timestamp() return to u64 to avoid clipping to 32bits
> > > >    on 32bit platforms.
> > > >  - fix the line spacing after line_event_timestamp()
> > >
> > > Where are we standing with this patch set? Good to go so
> > > I should just try to merge it?
> > >
> >
> > I'm fine with it, especially now that I've tested it on 32bit platforms
> > as well as 64bit.
> >
> > Bart was ok with v1, and I doubt the changes for v2 would negatively
> > impact that, though I did overlook adding his review tag.
> >
> > Cheers,
> > Kent.
> >
> > > Yours,
> > > Linus Walleij
>
> I'll take it through my tree then.
>
> Bartosz

The series no longer applies on top of v5.10-rc1. Could you rebase and resend?

Bartosz
Kent Gibson Oct. 31, 2020, 12:01 a.m. UTC | #5
On Fri, Oct 30, 2020 at 03:52:24PM +0100, Bartosz Golaszewski wrote:
> On Fri, Oct 30, 2020 at 3:49 PM Bartosz Golaszewski
> <bgolaszewski@baylibre.com> wrote:
> >
> > On Thu, Oct 29, 2020 at 12:22 AM Kent Gibson <warthog618@gmail.com> wrote:
> > >
> > > On Wed, Oct 28, 2020 at 05:01:49PM +0100, Linus Walleij wrote:
> > > > On Thu, Oct 15, 2020 at 1:12 AM Kent Gibson <warthog618@gmail.com> wrote:
> > > >
> > > > > This patch set adds the option to select CLOCK_REALTIME as the source
> > > > > clock for line events.
> > > > >
> > > > > The first patch is the core of the change, while the remaining two update
> > > > > the GPIO tools to make use of the new option.
> > > > >
> > > > > Changes for v2:
> > > > >  - change line_event_timestamp() return to u64 to avoid clipping to 32bits
> > > > >    on 32bit platforms.
> > > > >  - fix the line spacing after line_event_timestamp()
> > > >
> > > > Where are we standing with this patch set? Good to go so
> > > > I should just try to merge it?
> > > >
> > >
> > > I'm fine with it, especially now that I've tested it on 32bit platforms
> > > as well as 64bit.
> > >
> > > Bart was ok with v1, and I doubt the changes for v2 would negatively
> > > impact that, though I did overlook adding his review tag.
> > >
> > > Cheers,
> > > Kent.
> > >
> > > > Yours,
> > > > Linus Walleij
> >
> > I'll take it through my tree then.
> >
> > Bartosz
> 
> The series no longer applies on top of v5.10-rc1. Could you rebase and resend?
> 

Nuts, it relies on my doc tidy-up series that Linus has pulled into
fixes, and so will likely go into v5.10-rc2??

Specifically it is based over/conflicts with:
2cc522d3931b gpio: uapi: kernel-doc formatting improvements

If I rebase it onto devel then you will get a conflict when those merge.
Is that what you want?

Cheers,
Kent.
Bartosz Golaszewski Nov. 2, 2020, 8:56 a.m. UTC | #6
On Sat, Oct 31, 2020 at 1:01 AM Kent Gibson <warthog618@gmail.com> wrote:
>
> On Fri, Oct 30, 2020 at 03:52:24PM +0100, Bartosz Golaszewski wrote:
> > On Fri, Oct 30, 2020 at 3:49 PM Bartosz Golaszewski
> > <bgolaszewski@baylibre.com> wrote:
> > >
> > > On Thu, Oct 29, 2020 at 12:22 AM Kent Gibson <warthog618@gmail.com> wrote:
> > > >
> > > > On Wed, Oct 28, 2020 at 05:01:49PM +0100, Linus Walleij wrote:
> > > > > On Thu, Oct 15, 2020 at 1:12 AM Kent Gibson <warthog618@gmail.com> wrote:
> > > > >
> > > > > > This patch set adds the option to select CLOCK_REALTIME as the source
> > > > > > clock for line events.
> > > > > >
> > > > > > The first patch is the core of the change, while the remaining two update
> > > > > > the GPIO tools to make use of the new option.
> > > > > >
> > > > > > Changes for v2:
> > > > > >  - change line_event_timestamp() return to u64 to avoid clipping to 32bits
> > > > > >    on 32bit platforms.
> > > > > >  - fix the line spacing after line_event_timestamp()
> > > > >
> > > > > Where are we standing with this patch set? Good to go so
> > > > > I should just try to merge it?
> > > > >
> > > >
> > > > I'm fine with it, especially now that I've tested it on 32bit platforms
> > > > as well as 64bit.
> > > >
> > > > Bart was ok with v1, and I doubt the changes for v2 would negatively
> > > > impact that, though I did overlook adding his review tag.
> > > >
> > > > Cheers,
> > > > Kent.
> > > >
> > > > > Yours,
> > > > > Linus Walleij
> > >
> > > I'll take it through my tree then.
> > >
> > > Bartosz
> >
> > The series no longer applies on top of v5.10-rc1. Could you rebase and resend?
> >
>
> Nuts, it relies on my doc tidy-up series that Linus has pulled into
> fixes, and so will likely go into v5.10-rc2??
>
> Specifically it is based over/conflicts with:
> 2cc522d3931b gpio: uapi: kernel-doc formatting improvements
>
> If I rebase it onto devel then you will get a conflict when those merge.
> Is that what you want?
>
> Cheers,
> Kent.

I'll let Linus take these through his tree then.

Bartosz
Linus Walleij Nov. 6, 2020, 1:49 p.m. UTC | #7
On Sat, Oct 31, 2020 at 1:01 AM Kent Gibson <warthog618@gmail.com> wrote:
> On Fri, Oct 30, 2020 at 03:52:24PM +0100, Bartosz Golaszewski wrote:


> > The series no longer applies on top of v5.10-rc1. Could you rebase and resend?

>

> Nuts, it relies on my doc tidy-up series that Linus has pulled into

> fixes, and so will likely go into v5.10-rc2??


If I have time to get the GPIO fixes into -rc2. Otherwise -rc3
and then I need to merge the resulting -rc into the devel branch
before applying.

I will get to it sooner or later, I think Bartosz might have some
more GPIO fixes that I need to pull first before sending any
fixes upstream.

Yours,
Linus Walleij
Bartosz Golaszewski Dec. 1, 2020, 6:20 p.m. UTC | #8
On Fri, Nov 6, 2020 at 2:49 PM Linus Walleij <linus.walleij@linaro.org> wrote:
>

> On Sat, Oct 31, 2020 at 1:01 AM Kent Gibson <warthog618@gmail.com> wrote:

> > On Fri, Oct 30, 2020 at 03:52:24PM +0100, Bartosz Golaszewski wrote:

>

> > > The series no longer applies on top of v5.10-rc1. Could you rebase and resend?

> >

> > Nuts, it relies on my doc tidy-up series that Linus has pulled into

> > fixes, and so will likely go into v5.10-rc2??

>

> If I have time to get the GPIO fixes into -rc2. Otherwise -rc3

> and then I need to merge the resulting -rc into the devel branch

> before applying.

>

> I will get to it sooner or later, I think Bartosz might have some

> more GPIO fixes that I need to pull first before sending any

> fixes upstream.

>

> Yours,

> Linus Walleij


Hi Linus,

Just a gentle ping on this, so it doesn't get forgotten before the
next merge window.

Bartosz
Linus Walleij Dec. 5, 2020, 10:23 p.m. UTC | #9
On Thu, Oct 15, 2020 at 1:12 AM Kent Gibson <warthog618@gmail.com> wrote:

> This patch set adds the option to select CLOCK_REALTIME as the source

> clock for line events.

>

> The first patch is the core of the change, while the remaining two update

> the GPIO tools to make use of the new option.

>

> Changes for v2:

>  - change line_event_timestamp() return to u64 to avoid clipping to 32bits

>    on 32bit platforms.

>  - fix the line spacing after line_event_timestamp()


I applied the v2 patch set for v5.11 now, it seems to work fine!

Yours,
Linus Walleij