Skip to contentSkip to conversation

treewide: implement v2 API

PATCH Kent Gibson 2 participants 2 messages Jun 2, 2022 1 message not in the archive GPIO

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 15 lines · Bartosz Golaszewski

This is the main changeset implementing the new libgpiod API for the core C library as well as C++ and Python bindings. It's actually the effect of squashing all the patches we've had in the next/libgpiod-v2.0 branch (and that have been developed and reviewed over the course of several months) so that the master branch can remain bisectable.

Big thanks to Kent Gibson for his reviews.

[Ben: fix format specifier for uint64_t]
[Viresh: Fix ioctl number for gpiod_line_request_reconfigure_lines()]
[Kent: splitting of chip_info out of chip, documentation tweaks and some renaming]
Quoted 7 lines

---
There were no reviews so far for the python bindings but I'm generally happy with them and think that the contents of next/libgpiod-2.0 branch are mature enough to get them into master and continue the work incrementally there. So this is the amalgamation of all the work done so far on libgpiod v2 that I'd like to apply soon.

My apologies for not getting back to you earlier wrt the python bindings.
When I try them I get:

$ python3
Python 3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
Quoted 1 line
Quoted 1 line
Quoted 1 line

import gpiod

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "exception.c", line 1, in <module>
NameError: __build_class__ not found

Quoted 1 line
Quoted 1 line
Quoted 1 line

I may be doing something dopey, but building v1.6.3 on the same platform (a clean Debian 11.3 install with a v5.18 kernel with gpiosim and gpio-mockup) works fine.
Haven't had a chance to look into it further...

Any ideas?

Cheers,
Kent.

#2 lore raw
Quoted 40 lines · Kent Gibson
Quoted 15 lines · Bartosz Golaszewski

This is the main changeset implementing the new libgpiod API for the core C library as well as C++ and Python bindings. It's actually the effect of squashing all the patches we've had in the next/libgpiod-v2.0 branch (and that have been developed and reviewed over the course of several months) so that the master branch can remain bisectable.

Big thanks to Kent Gibson for his reviews.

[Ben: fix format specifier for uint64_t]
[Viresh: Fix ioctl number for gpiod_line_request_reconfigure_lines()]
[Kent: splitting of chip_info out of chip, documentation tweaks and some renaming]
Quoted 7 lines

---
There were no reviews so far for the python bindings but I'm generally happy with them and think that the contents of next/libgpiod-2.0 branch are mature enough to get them into master and continue the work incrementally there. So this is the amalgamation of all the work done so far on libgpiod v2 that I'd like to apply soon.

My apologies for not getting back to you earlier wrt the python bindings.
When I try them I get:

$ python3
Python 3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
Quoted 1 line
Quoted 1 line
Quoted 1 line

import gpiod

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "exception.c", line 1, in <module>
NameError: __build_class__ not found

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 6 lines

I may be doing something dopey, but building v1.6.3 on the same platform (a clean Debian 11.3 install with a v5.18 kernel with gpiosim and gpio-mockup) works fine.
Haven't had a chance to look into it further...

Any ideas?

I ran Debian 11.3 with docker and can confirm this issue. I don't see it on Ubuntu 22.04. Interesting. I'll look into it.

Bart