On Mon, Mar 22, 2021 at 09:09:50PM -0700, Dipen Patel wrote:
>
>
> On 3/22/21 7:59 PM, Kent Gibson wrote:
> > On Mon, Mar 22, 2021 at 06:53:10PM -0700, Dipen Patel wrote:
> >>
> >>
> >> On 3/22/21 5:32 PM, Kent Gibson wrote:
> >>> On Mo
On Mon, Mar 22, 2021 at 06:53:10PM -0700, Dipen Patel wrote:
>
>
> On 3/22/21 5:32 PM, Kent Gibson wrote:
> > On Mon, Mar 22, 2021 at 01:21:46PM -0700, Dipen Patel wrote:
> >> Hi Linus and Kent,
> >>
[snip]
> > In response to all your comments above.
On Mon, Mar 22, 2021 at 01:21:46PM -0700, Dipen Patel wrote:
> Hi Linus and Kent,
>
> Thanks you so much for your valuable inputs and time, Please see below, my
> follow ups.
>
> On 3/21/21 11:00 PM, Kent Gibson wrote:
> > On Sat, Mar 20, 2021 at 12:56:36PM +0100, Linu
On Sat, Mar 20, 2021 at 12:56:36PM +0100, Linus Walleij wrote:
> Hi Dipen,
>
> thanks for your mail!
>
> I involved some other kernel people to get some discussion.
> I think Kent Gibson can be of great help because he is using
> GPIOs with high precision.
>
Actually
o-mockup-cdev
> --
Thanks for picking this one up - I missed it as I don't build the
selftests in the same environment that I edit them in, and overlooked
that there was a .gitignore in play.
Reviewed-by: Kent Gibson
Cheers,
Kent.
On Sat, Jan 30, 2021 at 09:37:55PM +0100, Bartosz Golaszewski wrote:
> On Fri, Jan 29, 2021 at 4:57 PM Andy Shevchenko
> wrote:
> >
> > On Fri, Jan 29, 2021 at 02:46:24PM +0100, Bartosz Golaszewski wrote:
> > > From: Bartosz Golaszewski
> > ...
> >
[snip]
> > Honestly, I don't like the idea of
().
Fixed: 65cff7047640 ("gpiolib: cdev: support setting debounce")
Signed-off-by: Kent Gibson
---
drivers/gpio/gpiolib-cdev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c
index 12b679ca552c..3551aaf5a361 100644
--- a/dr
o clarify and to be consistent with other
struct gpio_v2_line_info fields.
Fixes: 2cc522d3931b ("gpio: uapi: kernel-doc formatting improvements")
Signed-off-by: Kent Gibson
---
include/uapi/linux/gpio.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/uapi/linux/
Add a port to the GPIO uAPI v2 interface and make it the default.
Signed-off-by: Kent Gibson
Acked-by: Linus Walleij
Reviewed-by: Bartosz Golaszewski
---
.../testing/selftests/gpio/gpio-mockup-cdev.c | 75 +--
tools/testing/selftests/gpio/gpio-mockup.sh | 11 ++-
2 files
GPIO CDEV is now optional and required for the selftests so add it to
the config.
Signed-off-by: Kent Gibson
Acked-by: Linus Walleij
Reviewed-by: Bartosz Golaszewski
---
tools/testing/selftests/gpio/config | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/gpio/config
gpio-mockup-chardev helper has been obsoleted and removed, so also remove
the tools/gpio code that it, and nothing else, was using.
Signed-off-by: Kent Gibson
Acked-by: Linus Walleij
Reviewed-by: Bartosz Golaszewski
---
tools/gpio/gpio-utils.c | 89
GPIO Makefile has been greatly simplified so remove references to lines
which no longer exist.
Signed-off-by: Kent Gibson
Acked-by: Linus Walleij
Reviewed-by: Bartosz Golaszewski
---
tools/testing/selftests/kselftest_deps.sh | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git
Build restrictions related to the gpio-mockup-chardev helper are
no longer relevant so remove them.
Signed-off-by: Kent Gibson
Acked-by: Linus Walleij
Reviewed-by: Bartosz Golaszewski
---
tools/testing/selftests/Makefile | 9 -
1 file changed, 9 deletions(-)
diff --git a/tools
broken
since the device created in the multiple gpiochip case was split into
separate devices.
Fixes: 8a39f597bcfd ("gpio: mockup: rework device probing")
Signed-off-by: Kent Gibson
Acked-by: Linus Walleij
Reviewed-by: Bartosz Golaszewski
---
tools/testing/selftests/gpio/Makefile
GPIO selftests have changed to new gpio-mockup-cdev helper, so remove
old gpio-mockup-chardev helper.
Signed-off-by: Kent Gibson
Acked-by: Linus Walleij
Reviewed-by: Bartosz Golaszewski
---
.../selftests/gpio/gpio-mockup-chardev.c | 323 --
1 file changed, 323 deletions
ention or mitigation including the wait in
release_line, the retries in assert_mock, the assert_mock in set_mock,
and the sleep in set_line
Kent Gibson (7):
selftests: gpio: rework and simplify test implementation
selftests: gpio: remove obsolete gpio-mockup-chardev.c
selftests:
On Tue, Jan 19, 2021 at 12:02:13PM +0100, Bartosz Golaszewski wrote:
> On Tue, Jan 19, 2021 at 11:59 AM Kent Gibson wrote:
> >
> > On Tue, Jan 19, 2021 at 11:37:46AM +0100, Bartosz Golaszewski wrote:
> > > On Tue, Jan 19, 2021 at 1:35 AM Kent Gibson wrote:
> > &g
On Tue, Jan 19, 2021 at 11:37:46AM +0100, Bartosz Golaszewski wrote:
> On Tue, Jan 19, 2021 at 1:35 AM Kent Gibson wrote:
> >
> > On Mon, Jan 18, 2021 at 04:04:51PM +0100, Linus Walleij wrote:
> > > On Thu, Jan 7, 2021 at 3:58 AM Kent Gibson wrote:
> > >
On Mon, Jan 18, 2021 at 04:04:51PM +0100, Linus Walleij wrote:
> On Thu, Jan 7, 2021 at 3:58 AM Kent Gibson wrote:
>
> > selftests: gpio: rework and simplify test implementation
> > selftests: gpio: remove obsolete gpio-mockup-chardev.c
> > selftests: remove ob
On Thu, Jan 07, 2021 at 10:57:25AM +0800, Kent Gibson wrote:
> The GPIO mockup selftests are overly complicated with separate
> implementations of the tests for sysfs and cdev uAPI, and with the cdev
> implementation being dependent on tools/gpio and libmount.
>
> Rework the test
On Mon, Jan 18, 2021 at 08:21:09AM +1100, Stephen Rothwell wrote:
> Hi all,
>
> In commit
>
> ec6c3364b816 ("tools: gpio: fix %llu warning in gpio-watch.c")
>
> Fixes tag
>
> Fixes: commit 33f0c47b8fb4 ("tools: gpio: implement gpio-watch")
>
> has these problem(s):
>
> - leading word
ment gpio-watch")
Signed-off-by: Kent Gibson
---
tools/gpio/gpio-watch.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/gpio/gpio-watch.c b/tools/gpio/gpio-watch.c
index f229ec62301b..41e76d244192 100644
--- a/tools/gpio/gpio-watch.c
+++ b/tools/gpio/gpio-wa
ent.offset, event.line_seqno,
|~~
| |
| __u64 {aka long unsigned int}
Replace the %llu with PRIu64 and cast the argument to uint64_t.
Fixes: commit 03fd11b03362 ("tools/gpio/gpio-event-mon: fix warning")
Signed-off-by: Kent Gibson
Fix a couple of warnings that I ran across while testing selftest changes.
Sorry about the repetition in the checkin comments, but as the problem was
introduced to the two files separately it seemed more appropriate than
tying their history together.
Cheers,
Kent.
Kent Gibson (2):
tools: gpio
GPIO Makefile has been greatly simplified so remove references to lines
which no longer exist.
Signed-off-by: Kent Gibson
Acked-by: Linus Walleij
---
tools/testing/selftests/kselftest_deps.sh | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/tools/testing/selftests
Add a port to the GPIO uAPI v2 interface and make it the default.
Signed-off-by: Kent Gibson
Acked-by: Linus Walleij
---
.../testing/selftests/gpio/gpio-mockup-cdev.c | 75 +--
tools/testing/selftests/gpio/gpio-mockup.sh | 11 ++-
2 files changed, 76 insertions(+), 10
Build restrictions related to the gpio-mockup-chardev helper are
no longer relevant so remove them.
Signed-off-by: Kent Gibson
Acked-by: Linus Walleij
---
tools/testing/selftests/Makefile | 9 -
1 file changed, 9 deletions(-)
diff --git a/tools/testing/selftests/Makefile b/tools
broken
since the device created in the multiple gpiochip case was split into
separate devices.
Fixes: commit 8a39f597bcfd ("gpio: mockup: rework device probing")
Signed-off-by: Kent Gibson
Acked-by: Linus Walleij
---
tools/testing/selftests/gpio/Makefile | 26 +-
.../testing/self
GPIO selftests have changed to new gpio-mockup-cdev helper, so remove
old gpio-mockup-chardev helper.
Signed-off-by: Kent Gibson
Acked-by: Linus Walleij
---
.../selftests/gpio/gpio-mockup-chardev.c | 323 --
1 file changed, 323 deletions(-)
delete mode 100644 tools
gpio-mockup-chardev helper has been obsoleted and removed, so also remove
the tools/gpio code that it, and nothing else, was using.
Signed-off-by: Kent Gibson
Acked-by: Linus Walleij
---
tools/gpio/gpio-utils.c | 89 -
tools/gpio/gpio-utils.h | 6 ---
2
GPIO CDEV is now optional and required for the selftests so add it to
the config.
Signed-off-by: Kent Gibson
Acked-by: Linus Walleij
---
tools/testing/selftests/gpio/config | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/gpio/config
b/tools/testing/selftests/gpio
ock in set_mock,
and the sleep in set_line
Kent Gibson (7):
selftests: gpio: rework and simplify test implementation
selftests: gpio: remove obsolete gpio-mockup-chardev.c
selftests: remove obsolete build restriction for gpio
selftests: remove obsolete gpio references from kselftest_deps
On Mon, Jan 04, 2021 at 11:00:31PM +0800, Kent Gibson wrote:
> On Mon, Jan 04, 2021 at 03:52:49PM +0200, Andy Shevchenko wrote:
> > On Mon, Jan 4, 2021 at 3:51 AM Kent Gibson wrote:
> > > On Sun, Jan 03, 2021 at 05:10:10PM +0200, Andy Shevchenko wrote:
> >
> >
On Mon, Jan 04, 2021 at 03:52:49PM +0200, Andy Shevchenko wrote:
> On Mon, Jan 4, 2021 at 3:51 AM Kent Gibson wrote:
> > On Sun, Jan 03, 2021 at 05:10:10PM +0200, Andy Shevchenko wrote:
>
> ...
>
> > In this example it is the 508:
> >
> > # e.g. gpiochip0:
On Sun, Jan 03, 2021 at 05:10:10PM +0200, Andy Shevchenko wrote:
> On Sun, Jan 3, 2021 at 4:17 AM Kent Gibson wrote:
> > On Sun, Jan 03, 2021 at 12:20:26AM +0200, Andy Shevchenko wrote:
> > > On Sat, Jan 2, 2021 at 4:32 AM Kent Gibson wrote:
>
[snip]
>
> ...
>
On Sun, Jan 03, 2021 at 05:10:10PM +0200, Andy Shevchenko wrote:
> On Sun, Jan 3, 2021 at 4:17 AM Kent Gibson wrote:
> > On Sun, Jan 03, 2021 at 12:20:26AM +0200, Andy Shevchenko wrote:
> > > On Sat, Jan 2, 2021 at 4:32 AM Kent Gibson wrote:
>
> ...
>
> > &
On Sun, Jan 03, 2021 at 12:20:26AM +0200, Andy Shevchenko wrote:
> On Sat, Jan 2, 2021 at 4:32 AM Kent Gibson wrote:
> >
> > The GPIO mockup selftests are overly complicated with separate
> > implementations of the tests for sysfs and cdev uAPI, and with the cdev
>
On Sat, Jan 02, 2021 at 03:52:32PM +0200, Andy Shevchenko wrote:
> On Saturday, January 2, 2021, Kent Gibson wrote:
>
> > The GPIO mockup selftests are overly complicated with separate
> > implementations of the tests for sysfs and cdev uAPI, and with the cdev
> > implem
gets around to porting the tests to the latest GPIO uAPI.
And Patch 7 updates the config to set the CONFIG_GPIO_CDEV option that
was added in v5.10.
Cheers,
Kent.
Kent Gibson (7):
selftests: gpio: rework and simplify test implementation
selftests: gpio: remove obsolete gpio-mockup-chardev.c
GPIO CDEV is now optional and required for the selftests so add it to
the config.
Signed-off-by: Kent Gibson
---
tools/testing/selftests/gpio/config | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/gpio/config
b/tools/testing/selftests/gpio/config
index abaa6902b7b6
GPIO selftests have changed to new gpio-mockup-cdev helper, so remove
old gpio-mockup-chardev helper.
Signed-off-by: Kent Gibson
---
.../selftests/gpio/gpio-mockup-chardev.c | 323 --
1 file changed, 323 deletions(-)
delete mode 100644 tools/testing/selftests/gpio/gpio
Add a port to the GPIO uAPI v2 interface and make it the default.
Signed-off-by: Kent Gibson
---
.../testing/selftests/gpio/gpio-mockup-cdev.c | 75 +--
tools/testing/selftests/gpio/gpio-mockup.sh | 11 ++-
2 files changed, 76 insertions(+), 10 deletions(-)
diff --git a/tools
GPIO Makefile has been greatly simplified so remove references to lines
which no longer exist.
Signed-off-by: Kent Gibson
---
tools/testing/selftests/kselftest_deps.sh | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/tools/testing/selftests/kselftest_deps.sh
b/tools
Build restrictions related to the gpio-mockup-chardev helper are
no longer relevant so remove them.
Signed-off-by: Kent Gibson
---
tools/testing/selftests/Makefile | 9 -
1 file changed, 9 deletions(-)
diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
gpio-mockup-chardev helper has been obsoleted and removed, so also remove
the tools/gpio code that it, and nothing else, was using.
Signed-off-by: Kent Gibson
---
tools/gpio/gpio-utils.c | 89 -
tools/gpio/gpio-utils.h | 6 ---
2 files changed, 95
broken
since the device created in the multiple gpiochip case was split into
separate devices.
Fixes: commit 8a39f597bcfd ("gpio: mockup: rework device probing")
Signed-off-by: Kent Gibson
---
tools/testing/selftests/gpio/Makefile | 26 +-
.../testing/selftests/gpio/gpio-mockup-cd
o_get().
[1] https://lore.kernel.org/lkml/202012270910.vw3qc1er-...@intel.com/
Fixes: aad955842d1c ("gpiolib: cdev: support GPIO_V2_GET_LINEINFO_IOCTL and
GPIO_V2_GET_LINEINFO_WATCH_IOCTL")
Reported-by: kernel test robot
Signed-off-by: Kent Gibson
---
drivers/gpi
() and device_del() when
CONFIG_GPIO_CDEV is not selected.
Fixes: d143493c01b7 (gpiolib: make cdev a build option)
Reported-by: Nicolas Schichan
Signed-off-by: Kent Gibson
---
drivers/gpio/gpiolib-cdev.h | 15 ---
drivers/gpio/gpiolib.c | 18 +++---
2 files changed, 15
On Fri, Oct 30, 2020 at 03:52:24PM +0100, Bartosz Golaszewski wrote:
> On Fri, Oct 30, 2020 at 3:49 PM Bartosz Golaszewski
> wrote:
> >
> > On Thu, Oct 29, 2020 at 12:22 AM Kent Gibson wrote:
> > >
> > > On Wed, Oct 28, 2020 at 05:01:49PM +0100, Linus Walleij
Add GPIO_V2_LINE_FLAG_EDGE_BOTH macro and use it in edge_irq_thread() to
improve readability of edge handling cases.
Suggested-by: Andy Shevchenko
Signed-off-by: Kent Gibson
---
drivers/gpio/gpiolib-cdev.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpio
On Wed, Oct 28, 2020 at 05:01:49PM +0100, Linus Walleij wrote:
> On Thu, Oct 15, 2020 at 1:12 AM Kent Gibson 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 c
On Fri, Oct 16, 2020 at 05:24:14PM +0300, Andy Shevchenko wrote:
> On Wed, Oct 14, 2020 at 12:21 PM Kent Gibson wrote:
> >
> > The line.eflags field is shared so document this fact and highlight it
> > throughout using READ_ONCE() and WRITE_ONCE() accessors.
> >
On Fri, Oct 16, 2020 at 05:13:22PM +0300, Andy Shevchenko wrote:
> On Thu, Oct 15, 2020 at 6:53 AM Kent Gibson wrote:
> >
> > Using CLOCK_REALTIME as the source for event timestamps is crucial for
> > some specific applications, particularly those requiring timetamps
> &
On Wed, Oct 14, 2020 at 08:14:20PM +0300, Andy Shevchenko wrote:
> On Tue, Oct 13, 2020 at 7:34 PM Kent Gibson wrote:
> > On Tue, Oct 13, 2020 at 03:21:47PM +0200, Linus Walleij wrote:
> > > On Thu, Oct 8, 2020 at 5:46 PM Bartosz Golaszewski
> > > wrote:
>
> .
Add support for reporting if a line is configured to report realtime
timestamps in events.
Signed-off-by: Kent Gibson
---
tools/gpio/lsgpio.c | 4
1 file changed, 4 insertions(+)
diff --git a/tools/gpio/lsgpio.c b/tools/gpio/lsgpio.c
index 5a05a454d0c9..c61d061247e1 100644
--- a/tools
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
.
Suggested-by: Jack Winch
Signed-off-by: Kent Gibson
---
drivers/gpio/gpiolib-cdev.c | 21 ++---
drivers/gpio/gpiolib.h | 1 +
include/uapi/linux/gpio.h | 12 +---
3 files changed, 28 insertions(+), 6 deletions(-)
diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers
Add support for selecting the realtime clock for events.
Signed-off-by: Kent Gibson
---
tools/gpio/gpio-event-mon.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tools/gpio/gpio-event-mon.c b/tools/gpio/gpio-event-mon.c
index 90c3155f05b1..cacd66ad7926 100644
On Wed, Oct 14, 2020 at 02:27:38PM +0800, Kent Gibson wrote:
> Using CLOCK_REALTIME as the source for event timestamps is crucial for
> some specific applications, particularly those requiring timetamps
> relative to a PTP clock, so provide an option to switch the event
> timestamp
.
Suggested-by: Jack Winch
Signed-off-by: Kent Gibson
---
drivers/gpio/gpiolib-cdev.c | 21 ++---
drivers/gpio/gpiolib.h | 1 +
include/uapi/linux/gpio.h | 12 +---
3 files changed, 28 insertions(+), 6 deletions(-)
diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers
Add support for selecting the realtime clock for events.
Signed-off-by: Kent Gibson
---
tools/gpio/gpio-event-mon.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tools/gpio/gpio-event-mon.c b/tools/gpio/gpio-event-mon.c
index 90c3155f05b1..cacd66ad7926 100644
Add support for reporting if a line is configured to report realtime
timestamps in events.
Signed-off-by: Kent Gibson
---
tools/gpio/lsgpio.c | 4
1 file changed, 4 insertions(+)
diff --git a/tools/gpio/lsgpio.c b/tools/gpio/lsgpio.c
index 5a05a454d0c9..c61d061247e1 100644
--- a/tools
() is currently disabled when the eflags are
changed.
Signed-off-by: Kent Gibson
---
Changes for v2:
- fixed typo in commit comment.
drivers/gpio/gpiolib-cdev.c | 32 +---
1 file changed, 21 insertions(+), 11 deletions(-)
diff --git a/drivers/gpio/gpiolib-cdev.c b
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.
Kent Gibson (3):
gpiolib: cdev: allow edge event timestamps to be configured
() is currently disabled when the eflags are
changed.
Signed-off-by: Kent Gibson
---
drivers/gpio/gpiolib-cdev.c | 32 +---
1 file changed, 21 insertions(+), 11 deletions(-)
diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c
index 192721f829a3
On Tue, Oct 13, 2020 at 03:21:47PM +0200, Linus Walleij wrote:
> On Thu, Oct 8, 2020 at 5:46 PM Bartosz Golaszewski
> wrote:
> > On Mon, Oct 5, 2020 at 9:03 AM Kent Gibson wrote:
> > >
> > > I'm intending to add some GPIO chardev documentation to
> > > Doc
On Mon, Oct 05, 2020 at 02:01:22PM +0300, Andy Shevchenko wrote:
> On Mon, Oct 5, 2020 at 10:07 AM Kent Gibson wrote:
> >
> > Clarify that a char array containing a string is considered 'empty' if
> > the first character is the null terminator. The remaining characters
Add kernel-doc formatting to all references to structs, enums, fields
and constants, and move deprecation warnings into the Note section of
the deprecated struct.
Replace 'OR:ed' with 'added', as the former looks odd.
Signed-off-by: Kent Gibson
---
The replacement of 'OR:ed' should strictly
Clarify that a char array containing a string is considered 'empty' if
the first character is the null terminator. The remaining characters
are not relevant to this determination.
Signed-off-by: Kent Gibson
---
include/uapi/linux/gpio.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions
Remove leading whitespace in ABI v1 comment.
Signed-off-by: Kent Gibson
---
include/uapi/linux/gpio.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/uapi/linux/gpio.h b/include/uapi/linux/gpio.h
index 32dd18f238c3..ad3f56dd87ec 100644
--- a/include/uapi/linux/gpio.h
Make debounce_period_us field documentation consistent with other fields
in the union.
Signed-off-by: Kent Gibson
---
include/uapi/linux/gpio.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/uapi/linux/gpio.h b/include/uapi/linux/gpio.h
index b0d5e7a1c693
that I've made along the way.
Hopefully nothing controversial - mainly formatting improvements,
and a couple of minor wording changes.
Cheers,
Kent.
Kent Gibson (5):
gpio: uapi: fix kernel-doc warnings
gpio: uapi: comment consistency
gpio: uapi: kernel-doc formatting improvements
gpio: uapi
Fix kernel-doc warnings, specifically gpioline_info_changed.padding is
not documented and 'GPIO event types' describes defines, which are not
documented by kernel-doc.
Signed-off-by: Kent Gibson
---
include/uapi/linux/gpio.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
is one
less than the array. This is consistent with the previous behaviour.
Suggested-by: Andy Shevchenko
Signed-off-by: Kent Gibson
---
The change to kstrndup() was suggested by Andy as part of the review of
the uAPI v2. This patch is my initial interpretion of that suggestion,
applied
On Fri, Oct 02, 2020 at 07:49:50AM +0200, Mauro Carvalho Chehab wrote:
> There's now a new ReST file. Add it to the index.rst file.
>
> Fixes: ce7a2f77f976 ("docs: gpio: Add GPIO Aggregator documentation")
Shouldn't that be:
Fixes: fd1abe99e5fb ("Documentation: gpio: add documentation for
Add support for debouncing monitored lines to gpio-event-mon.
Signed-off-by: Kent Gibson
Reviewed-by: Andy Shevchenko
---
tools/gpio/gpio-event-mon.c | 20 +---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/tools/gpio/gpio-event-mon.c b/tools/gpio/gpio-event
Port the gpio-event-mon tool to the latest GPIO uAPI.
Signed-off-by: Kent Gibson
Reviewed-by: Andy Shevchenko
---
tools/gpio/gpio-event-mon.c | 91 +++--
1 file changed, 47 insertions(+), 44 deletions(-)
diff --git a/tools/gpio/gpio-event-mon.c b/tools/gpio
Extend gpio-event-mon to support monitoring multiple lines.
This would require multiple lineevent requests to implement using uAPI v1,
but can be performed with a single line request using uAPI v2.
Signed-off-by: Kent Gibson
Reviewed-by: Andy Shevchenko
---
tools/gpio/gpio-event-mon.c | 45
. Where software debounce AND edge detection is
required, the debouncer provides both.
Signed-off-by: Kent Gibson
---
Changes for v10:
- as per cover letter
Changes for v6:
- as per cover letter
Changes for v5:
- as per cover letter
Changes for v4:
- fix handling of mask in line_get_values
Port the lsgpio tool to the latest GPIO uAPI.
Signed-off-by: Kent Gibson
Reviewed-by: Andy Shevchenko
---
tools/gpio/lsgpio.c | 60 -
1 file changed, 38 insertions(+), 22 deletions(-)
diff --git a/tools/gpio/lsgpio.c b/tools/gpio/lsgpio.c
index
Port the gpio-hammer tool to the latest GPIO uAPI.
Signed-off-by: Kent Gibson
Reviewed-by: Andy Shevchenko
---
tools/gpio/gpio-hammer.c | 32 +---
tools/gpio/gpio-utils.c | 164 ---
tools/gpio/gpio-utils.h | 46 ++-
3 files changed, 197
Port the gpio-watch tool to the latest GPIO uAPI.
Signed-off-by: Kent Gibson
Reviewed-by: Andy Shevchenko
---
tools/gpio/gpio-watch.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/tools/gpio/gpio-watch.c b/tools/gpio/gpio-watch.c
index 5cea24fddfa7
Rename nlines to num_lines to be consistent with other usage for fields
describing the number of entries in an array.
Signed-off-by: Kent Gibson
Reviewed-by: Andy Shevchenko
---
tools/gpio/gpio-hammer.c | 26 +-
tools/gpio/gpio-utils.c | 20 ++--
tools
Update uAPI documentation to deprecate v1 structs and ioctls.
Signed-off-by: Kent Gibson
---
include/uapi/linux/gpio.h | 26 ++
1 file changed, 26 insertions(+)
diff --git a/include/uapi/linux/gpio.h b/include/uapi/linux/gpio.h
index 5904f49399de..07865c601099 100644
Add support for the GPIO_V2_LINE_SET_VALUES_IOCTL.
Signed-off-by: Kent Gibson
---
drivers/gpio/gpiolib-cdev.c | 61 +
1 file changed, 61 insertions(+)
diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c
index 608cdbd1d579..25536aae3e18
Add support for requesting lines using the GPIO_V2_GET_LINE_IOCTL, and
returning their current values using GPIO_V2_LINE_GET_VALUES_IOCTL.
The struct linereq implementation is based on the v1 struct linehandle
implementation.
Signed-off-by: Kent Gibson
---
The linereq_ioctl() is a simple
Add support for GPIO_V2_LINE_SET_CONFIG_IOCTL, the uAPI v2
line set config ioctl.
Signed-off-by: Kent Gibson
---
drivers/gpio/gpiolib-cdev.c | 88 +
1 file changed, 88 insertions(+)
diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c
index
info change struct to the read. The version supported
on that fd locks to that version on the first watch request, so subsequent
watches from that process must use the same uAPI version.
Signed-off-by: Kent Gibson
---
Changes for v10:
- as per cover letter
Changes for v5:
- as per cover letter
the final event in a burst will correspond to the current
state of the line.
Signed-off-by: Kent Gibson
---
The linereq_put_event() helper is only used once here, but is re-used in
subsequent patches, and so is pre-emptively split out.
edge_detector_stop() is extended in subsequent patches
Add a build option to allow the removal of the CDEV v1 ABI.
Suggested-by: Bartosz Golaszewski
Signed-off-by: Kent Gibson
Reviewed-by: Andy Shevchenko
---
This patch is before the v2 implementation, and is non-functional until
that patch, as some parts of that patch would be written slightly
work uAPI to allow requested lines with different configurations.
Kent Gibson (20):
gpiolib: cdev: gpio_desc_to_lineinfo() should set info offset
gpiolib: cdev: replace strncpy() with strscpy()
gpio: uapi: define GPIO_MAX_NAME_SIZE for array sizes
gpio: uapi: define uAPI v2
gpiolib: make cdev a
and extension of v1, so userspace
code, particularly libgpiod, should readily port to it.
Signed-off-by: Kent Gibson
Reviewed-by: Andy Shevchenko
---
Changes for v9:
- use time scale suffixes on timestamp (_ns) and debounce period (_us)
variables
- document all enum values
- comment wording
Replace constant array sizes with a macro constant to clarify the source
of array sizes, provide a place to document any constraints on the size,
and to simplify array sizing in userspace if constructing structs
from their composite fields.
Signed-off-by: Kent Gibson
Reviewed-by: Andy Shevchenko
-off-by: Kent Gibson
Reviewed-by: Andy Shevchenko
---
drivers/gpio/Kconfig| 17 +++--
drivers/gpio/Makefile | 2 +-
drivers/gpio/gpiolib-cdev.h | 15 +++
3 files changed, 31 insertions(+), 3 deletions(-)
diff --git a/drivers/gpio/Kconfig b/drivers/gpio
-off-by: Kent Gibson
Reviewed-by: Andy Shevchenko
---
The memset in gpio_desc_to_lineinfo(), in conjunction with the strscpy,
is necessary as strncpy zero pads the remainder of the destination.
It also guarantees that the info cannot leak kernel stack to userspace.
This is useful here, but is even
Set the value of the line info offset in gpio_desc_to_lineinfo(), rather
than relying on it being passed in the info. This makes the function
behave as you would expect from the name - it generates the line info
corresponding to a given GPIO desc.
Signed-off-by: Kent Gibson
Reviewed-by: Andy
On Sun, Sep 27, 2020 at 12:00:04PM +0300, Andy Shevchenko wrote:
> On Sat, Sep 26, 2020 at 12:16 PM Kent Gibson wrote:
> > On Fri, Sep 25, 2020 at 01:06:02PM +0300, Andy Shevchenko wrote:
>
> ...
>
> > Hmmm, there is more to it than I thought - gpiod_request_commi
On Fri, Sep 25, 2020 at 01:06:02PM +0300, Andy Shevchenko wrote:
> On Thu, Sep 24, 2020 at 11:09 AM Kent Gibson wrote:
> > On Wed, Sep 23, 2020 at 02:11:54PM +0300, Andy Shevchenko wrote:
> > > On Tue, Sep 22, 2020 at 5:35 AM Kent Gibson wrote:
>
...
> &g
On Fri, Sep 25, 2020 at 12:35:49PM +0300, Andy Shevchenko wrote:
> On Thu, Sep 24, 2020 at 6:07 AM Kent Gibson wrote:
> > On Wed, Sep 23, 2020 at 06:47:28PM +0300, Andy Shevchenko wrote:
> > > On Tue, Sep 22, 2020 at 5:35 AM Kent Gibson wrote:
>
> ...
>
> &
On Fri, Sep 25, 2020 at 12:57:59PM +0300, Andy Shevchenko wrote:
> On Thu, Sep 24, 2020 at 3:46 PM Kent Gibson wrote:
> > On Thu, Sep 24, 2020 at 03:32:48PM +0800, Kent Gibson wrote:
> > > On Wed, Sep 23, 2020 at 07:18:08PM +0300, Andy Shevchenko wrote:
> > > > O
1 - 100 of 398 matches
Mail list logo