licensing: try to get licensing right
Subsystems (4)
cover licensing: try to get licensing right
From: Bartosz Golaszewski <[email protected]>
This series tries to improve the licensing situation of libgpiod before we proceed with v2.0.
The first patch is rather uncotroversial: it makes the project compliant with the REUSE v3.0 specification.
Next two patches propose to change the licenses for certain files:
non-library source files are relicensed under GPL-2.0-or-later while C++ library code's license is upgraded to LGPL-3.0-or-later.
The only person other than myself who contributed significant code to the relicensed files is Kent Gibson (Cc'ed) so these patches will need his ack.
Bartosz Golaszewski (3):
licensing: make the project REUSE-compliant
licensing: relicense non-library code under GPL-2.0-or-later
licensing: relicense C++ library code under LGPL-3.0-or-later
.gitignore | 3 + COPYING | 511 +-------------------- Doxyfile.in | 9 +- LICENSES/CC-BY-SA-4.0.txt | 427 +++++++++++++++++ LICENSES/GPL-2.0-only.txt | 339 ++++++++++++++ LICENSES/GPL-2.0-or-later.txt | 1 + LICENSES/LGPL-2.1-or-later.txt | 502 ++++++++++++++++++++ LICENSES/LGPL-3.0-or-later.txt | 165 +++++++ LICENSES/Linux-syscall-note.txt | 25 + Makefile.am | 19 +- NEWS | 3 + README | 3 + TODO | 3 + autogen.sh | 11 +- bindings/Makefile.am | 9 +- bindings/cxx/Makefile.am | 9 +- bindings/cxx/chip.cpp | 8 +- bindings/cxx/examples/.gitignore | 3 + bindings/cxx/examples/Makefile.am | 9 +- bindings/cxx/examples/gpiodetectcxx.cpp | 8 +- bindings/cxx/examples/gpiofindcxx.cpp | 8 +- bindings/cxx/examples/gpiogetcxx.cpp | 8 +- bindings/cxx/examples/gpioinfocxx.cpp | 8 +- bindings/cxx/examples/gpiomoncxx.cpp | 8 +- bindings/cxx/examples/gpiosetcxx.cpp | 8 +- bindings/cxx/gpiod.hpp | 8 +- bindings/cxx/iter.cpp | 8 +- bindings/cxx/libgpiodcxx.pc.in | 3 + bindings/cxx/line.cpp | 10 +- bindings/cxx/line_bulk.cpp | 8 +- bindings/cxx/tests/.gitignore | 3 + bindings/cxx/tests/Makefile.am | 9 +- bindings/cxx/tests/gpio-mockup.cpp | 8 +- bindings/cxx/tests/gpio-mockup.hpp | 8 +- bindings/cxx/tests/gpiod-cxx-test-main.cpp | 8 +- bindings/cxx/tests/gpiod-cxx-test.cpp | 8 +- bindings/cxx/tests/tests-chip.cpp | 8 +- bindings/cxx/tests/tests-event.cpp | 8 +- bindings/cxx/tests/tests-iter.cpp | 8 +- bindings/cxx/tests/tests-line.cpp | 8 +- bindings/python/Makefile.am | 9 +- bindings/python/examples/Makefile.am | 9 +- bindings/python/examples/gpiodetect.py | 9 +- bindings/python/examples/gpiofind.py | 9 +- bindings/python/examples/gpioget.py | 9 +- bindings/python/examples/gpioinfo.py | 9 +- bindings/python/examples/gpiomon.py | 9 +- bindings/python/examples/gpioset.py | 9 +- bindings/python/gpiodmodule.c | 6 +- bindings/python/tests/Makefile.am | 9 +- bindings/python/tests/gpiod_py_test.py | 9 +- bindings/python/tests/gpiomockupmodule.c | 6 +- configure.ac | 9 +- include/Makefile.am | 9 +- include/gpiod.h | 6 +- lib/Makefile.am | 9 +- lib/core.c | 6 +- lib/helpers.c | 6 +- lib/libgpiod.pc.in | 4 + lib/misc.c | 6 +- lib/uapi/gpio.h | 22 +- man/.gitignore | 3 + man/Makefile.am | 9 +- man/template | 3 + tests/.gitignore | 3 + tests/Makefile.am | 9 +- tests/gpiod-test.c | 8 +- tests/gpiod-test.h | 8 +- tests/mockup/Makefile.am | 9 +- tests/mockup/gpio-mockup.c | 8 +- tests/mockup/gpio-mockup.h | 6 +- tests/tests-bulk.c | 8 +- tests/tests-chip.c | 8 +- tests/tests-event.c | 8 +- tests/tests-line.c | 8 +- tests/tests-misc.c | 8 +- tools/.gitignore | 3 + tools/Makefile.am | 9 +- tools/gpio-tools-test | 9 +- tools/gpio-tools-test.bats | 9 +- tools/gpiodetect.c | 8 +- tools/gpiofind.c | 8 +- tools/gpioget.c | 8 +- tools/gpioinfo.c | 8 +- tools/gpiomon.c | 8 +- tools/gpioset.c | 8 +- tools/tools-common.c | 8 +- tools/tools-common.h | 8 +- 88 files changed, 1663 insertions(+), 936 deletions(-) create mode 100644 LICENSES/CC-BY-SA-4.0.txt create mode 100644 LICENSES/GPL-2.0-only.txt create mode 120000 LICENSES/GPL-2.0-or-later.txt create mode 100644 LICENSES/LGPL-2.1-or-later.txt create mode 100644 LICENSES/LGPL-3.0-or-later.txt create mode 100644 LICENSES/Linux-syscall-note.txt
Signature · 1 line
2.29.1
PATCH 3/3 licensing: relicense C++ library code under LGPL-3.0-or-later
From: Bartosz Golaszewski <[email protected]>
Using LGPL-2.1 for C++ library code is an issue raised several times on the linux-gpio mailing list. Programs using C++ libraries often include significant portions of code generated behind the scenes from C++ headers (via templates, default implementations etc.).
Section 3 of LGPL-3.0 clarifies the use of code defined in or generated from C++ headers so this changset proposes to use LGPL-3.0 for all C++ library code in libgpiod.
--- LICENSES/LGPL-3.0-or-later.txt | 165 +++++++++++++++++++++++++++++ Makefile.am | 1 + bindings/cxx/chip.cpp | 2 +- bindings/cxx/gpiod.hpp | 2 +- bindings/cxx/iter.cpp | 2 +- bindings/cxx/line.cpp | 2 +- bindings/cxx/line_bulk.cpp | 2 +- bindings/cxx/tests/gpio-mockup.cpp | 2 +- bindings/cxx/tests/gpio-mockup.hpp | 2 +- 9 files changed, 173 insertions(+), 7 deletions(-) create mode 100644 LICENSES/LGPL-3.0-or-later.txt
LICENSES/LGPL-3.0-or-later.txt new file +165 -0
@@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library.
Makefile.am +1 -0
@@ -10,6 +10,7 @@ EXTRA_DIST = \ LICENSES/GPL-2.0-only.txt \ LICENSES/GPL-2.0-or-later.txt \ LICENSES/LGPL-2.1-or-later.txt \ + LICENSES/LGPL-3.0-or-later.txt \ LICENSES/Linux-syscall-note.txt if WITH_TOOLS
bindings/cxx/chip.cpp +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-License-Identifier: LGPL-3.0-or-later // SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <functional>
bindings/cxx/gpiod.hpp +1 -1
@@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* SPDX-License-Identifier: LGPL-3.0-or-later */ /* SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> */ #ifndef __LIBGPIOD_GPIOD_CXX_HPP__
bindings/cxx/iter.cpp +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-License-Identifier: LGPL-3.0-or-later // SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <gpiod.hpp>
bindings/cxx/line.cpp +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-License-Identifier: LGPL-3.0-or-later // SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <gpiod.hpp>
bindings/cxx/line_bulk.cpp +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-License-Identifier: LGPL-3.0-or-later // SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <gpiod.hpp>
bindings/cxx/tests/gpio-mockup.cpp +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-License-Identifier: LGPL-3.0-or-later // SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <system_error>
bindings/cxx/tests/gpio-mockup.hpp +1 -1
@@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* SPDX-License-Identifier: LGPL-3.0-or-later */ /* SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> */ #ifndef __GPIOD_CXX_TEST_HPP__
Signature · 1 line
2.29.1
PATCH 1/3 licensing: make the project REUSE-compliant
In reply to Bartosz GolaszewskiFrom: Bartosz Golaszewski <[email protected]>
In order to make the licensing situation of libgpiod clear and enable easy reusing of the code, let's make all the files in the repository compliant with the REUSE v3.0 specification.
In order to achieve that:
- put all used licenses into a separate LICENSES/ directory
- add SPDX license identifiers to all files that were missing them with regular text files being licensed under CC-BY-SA-4.0, while files containing code and configuration are licensed under GPL-2.0-or-later
- replace custom copyright texts with SPDX-FileCopyrightText
- update the gpio.h kernel uAPI header with the upstream version where the SDPX license identifier was fixed to use 'GPL-2.0-only' variant instead of the deprecated 'GPL-2.0'
--- .gitignore | 3 + COPYING | 511 +-------------------- Doxyfile.in | 9 +- LICENSES/CC-BY-SA-4.0.txt | 427 +++++++++++++++++ LICENSES/GPL-2.0-only.txt | 339 ++++++++++++++ LICENSES/GPL-2.0-or-later.txt | 1 + LICENSES/LGPL-2.1-or-later.txt | 502 ++++++++++++++++++++ LICENSES/Linux-syscall-note.txt | 25 + Makefile.am | 15 +- NEWS | 3 + README | 3 + TODO | 3 + autogen.sh | 9 +- bindings/Makefile.am | 7 +- bindings/cxx/Makefile.am | 7 +- bindings/cxx/chip.cpp | 6 +- bindings/cxx/examples/.gitignore | 3 + bindings/cxx/examples/Makefile.am | 7 +- bindings/cxx/examples/gpiodetectcxx.cpp | 6 +- bindings/cxx/examples/gpiofindcxx.cpp | 6 +- bindings/cxx/examples/gpiogetcxx.cpp | 6 +- bindings/cxx/examples/gpioinfocxx.cpp | 6 +- bindings/cxx/examples/gpiomoncxx.cpp | 6 +- bindings/cxx/examples/gpiosetcxx.cpp | 6 +- bindings/cxx/gpiod.hpp | 6 +- bindings/cxx/iter.cpp | 6 +- bindings/cxx/libgpiodcxx.pc.in | 3 + bindings/cxx/line.cpp | 8 +- bindings/cxx/line_bulk.cpp | 6 +- bindings/cxx/tests/.gitignore | 3 + bindings/cxx/tests/Makefile.am | 7 +- bindings/cxx/tests/gpio-mockup.cpp | 8 +- bindings/cxx/tests/gpio-mockup.hpp | 6 +- bindings/cxx/tests/gpiod-cxx-test-main.cpp | 8 +- bindings/cxx/tests/gpiod-cxx-test.cpp | 8 +- bindings/cxx/tests/tests-chip.cpp | 8 +- bindings/cxx/tests/tests-event.cpp | 8 +- bindings/cxx/tests/tests-iter.cpp | 8 +- bindings/cxx/tests/tests-line.cpp | 8 +- bindings/python/Makefile.am | 7 +- bindings/python/examples/Makefile.am | 7 +- bindings/python/examples/gpiodetect.py | 7 +- bindings/python/examples/gpiofind.py | 7 +- bindings/python/examples/gpioget.py | 7 +- bindings/python/examples/gpioinfo.py | 7 +- bindings/python/examples/gpiomon.py | 7 +- bindings/python/examples/gpioset.py | 7 +- bindings/python/gpiodmodule.c | 6 +- bindings/python/tests/Makefile.am | 7 +- bindings/python/tests/gpiod_py_test.py | 7 +- bindings/python/tests/gpiomockupmodule.c | 6 +- configure.ac | 7 +- include/Makefile.am | 7 +- include/gpiod.h | 6 +- lib/Makefile.am | 7 +- lib/core.c | 6 +- lib/helpers.c | 6 +- lib/libgpiod.pc.in | 4 + lib/misc.c | 6 +- lib/uapi/gpio.h | 22 +- man/.gitignore | 3 + man/Makefile.am | 7 +- man/template | 3 + tests/.gitignore | 3 + tests/Makefile.am | 7 +- tests/gpiod-test.c | 6 +- tests/gpiod-test.h | 6 +- tests/mockup/Makefile.am | 7 +- tests/mockup/gpio-mockup.c | 8 +- tests/mockup/gpio-mockup.h | 6 +- tests/tests-bulk.c | 6 +- tests/tests-chip.c | 6 +- tests/tests-event.c | 6 +- tests/tests-line.c | 6 +- tests/tests-misc.c | 6 +- tools/.gitignore | 3 + tools/Makefile.am | 7 +- tools/gpio-tools-test | 7 +- tools/gpio-tools-test.bats | 7 +- tools/gpiodetect.c | 6 +- tools/gpiofind.c | 6 +- tools/gpioget.c | 6 +- tools/gpioinfo.c | 6 +- tools/gpiomon.c | 6 +- tools/gpioset.c | 6 +- tools/tools-common.c | 8 +- tools/tools-common.h | 6 +- 87 files changed, 1445 insertions(+), 885 deletions(-) create mode 100644 LICENSES/CC-BY-SA-4.0.txt create mode 100644 LICENSES/GPL-2.0-only.txt create mode 120000 LICENSES/GPL-2.0-or-later.txt create mode 100644 LICENSES/LGPL-2.1-or-later.txt create mode 100644 LICENSES/Linux-syscall-note.txt
.gitignore +3 -0
@@ -1,3 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> + *.o *.lo *.la
COPYING +13 -498
521 lines not on this page · raw message
Doxyfile.in +2 -7
@@ -1,10 +1,5 @@ -# SPDX-License-Identifier: LGPL-2.1-or-later - -# -# This file is part of libgpiod. -# -# Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> -# +# SPDX-License-Identifier: GPL-2.0-or-later +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> # libgpiod doxygen configuration
LICENSES/CC-BY-SA-4.0.txt new file +427 -0
427 lines not on this page · raw message
LICENSES/GPL-2.0-only.txt new file +339 -0
339 lines not on this page · raw message
LICENSES/GPL-2.0-or-later.txt new file +1 -0
@@ -0,0 +1 @@ +GPL-2.0-only.txt
LICENSES/LGPL-2.1-or-later.txt new file +502 -0
502 lines not on this page · raw message
LICENSES/Linux-syscall-note.txt new file +25 -0
@@ -0,0 +1,25 @@ +SPDX-Exception-Identifier: Linux-syscall-note +SPDX-URL: https://spdx.org/licenses/Linux-syscall-note.html +SPDX-Licenses: GPL-2.0, GPL-2.0+, GPL-1.0+, LGPL-2.0, LGPL-2.0+, LGPL-2.1, LGPL-2.1+, GPL-2.0-only, GPL-2.0-or-later +Usage-Guide: + This exception is used together with one of the above SPDX-Licenses + to mark user space API (uapi) header files so they can be included + into non GPL compliant user space application code. + To use this exception add it with the keyword WITH to one of the + identifiers in the SPDX-Licenses tag: + SPDX-License-Identifier: <SPDX-License> WITH Linux-syscall-note +License-Text: + + NOTE! This copyright does *not* cover user programs that use kernel + services by normal system calls - this is merely considered normal use + of the kernel, and does *not* fall under the heading of "derived work". + Also note that the GPL below is copyrighted by the Free Software + Foundation, but the instance of code that it refers to (the Linux + kernel) is copyrighted by me and others who actually wrote it. + + Also note that the only valid version of the GPL as far as the kernel + is concerned is _this_ particular version of the license (ie v2, not + v2.2 or v3.x or whatever), unless explicitly otherwise stated. + + Linus Torvalds +
Makefile.am +8 -7
@@ -1,15 +1,16 @@ # SPDX-License-Identifier: LGPL-2.1-or-later - -# -# This file is part of libgpiod. -# -# Copyright (C) 2017-2019 Bartosz Golaszewski <[email protected]> -# +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> ACLOCAL_AMFLAGS = -I m4 AUTOMAKE_OPTIONS = foreign SUBDIRS = include lib +EXTRA_DIST = \ + LICENSES/CC-BY-SA-4.0.txt \ + LICENSES/GPL-2.0-only.txt \ + LICENSES/LGPL-2.1-or-later.txt \ + LICENSES/Linux-syscall-note.txt + if WITH_TOOLS SUBDIRS += tools man
@@ -35,6 +36,6 @@ doc: Doxyfile clean-local: rm -rf doc -EXTRA_DIST = Doxyfile +EXTRA_DIST += Doxyfile endif
NEWS +3 -0
@@ -1,3 +1,6 @@ +# SPDX-License-Identifier: CC-BY-SA-4.0 +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> + libgpiod v1.6 =============
README +3 -0
@@ -1,3 +1,6 @@ +# SPDX-License-Identifier: CC-BY-SA-4.0 +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> + libgpiod ========
TODO +3 -0
@@ -1,3 +1,6 @@ +# SPDX-License-Identifier: CC-BY-SA-4.0 +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> + TODO list for libgpiod ==========
autogen.sh +2 -7
@@ -1,12 +1,7 @@ #!/bin/sh # SPDX-License-Identifier: LGPL-2.1-or-later - -# -# This file is part of libgpiod. -# -# Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> -# 2017 Thierry Reding <[email protected]> -# +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> +# SPDX-FileCopyrightText: 2017 Thierry Reding <[email protected]> srcdir=`dirname $0` test -z "$srcdir" && srcdir=.
bindings/Makefile.am +1 -6
@@ -1,10 +1,5 @@ # SPDX-License-Identifier: LGPL-2.1-or-later - -# -# This file is part of libgpiod. -# -# Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> -# +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> SUBDIRS = .
bindings/cxx/Makefile.am +1 -6
@@ -1,10 +1,5 @@ # SPDX-License-Identifier: LGPL-2.1-or-later - -# -# This file is part of libgpiod. -# -# Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> -# +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> lib_LTLIBRARIES = libgpiodcxx.la libgpiodcxx_la_SOURCES = chip.cpp iter.cpp line.cpp line_bulk.cpp
bindings/cxx/chip.cpp +1 -5
@@ -1,9 +1,5 @@ // SPDX-License-Identifier: LGPL-2.1-or-later -/* - * This file is part of libgpiod. - * - * Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> - */ +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <functional> #include <gpiod.hpp>
bindings/cxx/examples/.gitignore +3 -0
@@ -1,3 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> + gpiodetectcxx gpiofindcxx gpiogetcxx
bindings/cxx/examples/Makefile.am +1 -6
@@ -1,10 +1,5 @@ # SPDX-License-Identifier: LGPL-2.1-or-later - -# -# This file is part of libgpiod. -# -# Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> -# +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> AM_CPPFLAGS = -I$(top_srcdir)/bindings/cxx/ -I$(top_srcdir)/include AM_CPPFLAGS += -Wall -Wextra -g -std=gnu++17
bindings/cxx/examples/gpiodetectcxx.cpp +1 -5
@@ -1,9 +1,5 @@ // SPDX-License-Identifier: LGPL-2.1-or-later -/* - * This file is part of libgpiod. - * - * Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> - */ +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> /* C++ reimplementation of the gpiodetect tool. */
bindings/cxx/examples/gpiofindcxx.cpp +1 -5
@@ -1,9 +1,5 @@ // SPDX-License-Identifier: LGPL-2.1-or-later -/* - * This file is part of libgpiod. - * - * Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> - */ +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> /* C++ reimplementation of the gpiofind tool. */
bindings/cxx/examples/gpiogetcxx.cpp +1 -5
@@ -1,9 +1,5 @@ // SPDX-License-Identifier: LGPL-2.1-or-later -/* - * This file is part of libgpiod. - * - * Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> - */ +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> /* Simplified C++ reimplementation of the gpioget tool. */
bindings/cxx/examples/gpioinfocxx.cpp +1 -5
@@ -1,9 +1,5 @@ // SPDX-License-Identifier: LGPL-2.1-or-later -/* - * This file is part of libgpiod. - * - * Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> - */ +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> /* Simplified C++ reimplementation of the gpioinfo tool. */
bindings/cxx/examples/gpiomoncxx.cpp +1 -5
@@ -1,9 +1,5 @@ // SPDX-License-Identifier: LGPL-2.1-or-later -/* - * This file is part of libgpiod. - * - * Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> - */ +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> /* Simplified C++ reimplementation of the gpiomon tool. */
bindings/cxx/examples/gpiosetcxx.cpp +1 -5
@@ -1,9 +1,5 @@ // SPDX-License-Identifier: LGPL-2.1-or-later -/* - * This file is part of libgpiod. - * - * Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> - */ +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> /* Simplified C++ reimplementation of the gpioset tool. */
bindings/cxx/gpiod.hpp +1 -5
@@ -1,9 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ -/* - * This file is part of libgpiod. - * - * Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> - */ +/* SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> */ #ifndef __LIBGPIOD_GPIOD_CXX_HPP__ #define __LIBGPIOD_GPIOD_CXX_HPP__
bindings/cxx/iter.cpp +1 -5
@@ -1,9 +1,5 @@ // SPDX-License-Identifier: LGPL-2.1-or-later -/* - * This file is part of libgpiod. - * - * Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> - */ +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <gpiod.hpp> #include <system_error>
bindings/cxx/libgpiodcxx.pc.in +3 -0
@@ -1,3 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> + prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@
bindings/cxx/line.cpp +2 -6
@@ -1,9 +1,5 @@ // SPDX-License-Identifier: LGPL-2.1-or-later -/* - * This file is part of libgpiod. - * - * Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> - */ +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <gpiod.hpp> #include <array>
@@ -337,7 +333,7 @@ void line::throw_if_null(void) const line::chip_guard::chip_guard(const line& line) : _m_chip(line._m_owner) { - + } } /* namespace gpiod */
bindings/cxx/line_bulk.cpp +1 -5
@@ -1,9 +1,5 @@ // SPDX-License-Identifier: LGPL-2.1-or-later -/* - * This file is part of libgpiod. - * - * Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> - */ +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <gpiod.hpp> #include <map>
bindings/cxx/tests/.gitignore +3 -0
@@ -1 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> + gpiod-cxx-test
bindings/cxx/tests/Makefile.am +1 -6
@@ -1,10 +1,5 @@ # SPDX-License-Identifier: LGPL-2.1-or-later - -# -# This file is part of libgpiod. -# -# Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> -# +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> AM_CPPFLAGS = -I$(top_srcdir)/bindings/cxx/ -I$(top_srcdir)/include AM_CPPFLAGS += -I$(top_srcdir)/tests/mockup/
bindings/cxx/tests/gpio-mockup.cpp +2 -6
@@ -1,9 +1,5 @@ -/* SPDX-License-Identifier: LGPL-2.1-or-later */ -/* - * This file is part of libgpiod. - * - * Copyright (C) 2019 Bartosz Golaszewski <[email protected]> - */ +// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <system_error>
bindings/cxx/tests/gpio-mockup.hpp +1 -5
@@ -1,9 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ -/* - * This file is part of libgpiod. - * - * Copyright (C) 2019 Bartosz Golaszewski <[email protected]> - */ +/* SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> */ #ifndef __GPIOD_CXX_TEST_HPP__ #define __GPIOD_CXX_TEST_HPP__
bindings/cxx/tests/gpiod-cxx-test-main.cpp +2 -6
@@ -1,9 +1,5 @@ -/* SPDX-License-Identifier: LGPL-2.1-or-later */ -/* - * This file is part of libgpiod. - * - * Copyright (C) 2019 Bartosz Golaszewski <[email protected]> - */ +// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #define CATCH_CONFIG_MAIN #include <catch2/catch.hpp>
bindings/cxx/tests/gpiod-cxx-test.cpp +2 -6
@@ -1,9 +1,5 @@ -/* SPDX-License-Identifier: LGPL-2.1-or-later */ -/* - * This file is part of libgpiod. - * - * Copyright (C) 2019 Bartosz Golaszewski <[email protected]> - */ +// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <linux/version.h> #include <sys/utsname.h>
bindings/cxx/tests/tests-chip.cpp +2 -6
@@ -1,9 +1,5 @@ -/* SPDX-License-Identifier: LGPL-2.1-or-later */ -/* - * This file is part of libgpiod. - * - * Copyright (C) 2019 Bartosz Golaszewski <[email protected]> - */ +// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <catch2/catch.hpp> #include <gpiod.hpp>
bindings/cxx/tests/tests-event.cpp +2 -6
@@ -1,9 +1,5 @@ -/* SPDX-License-Identifier: LGPL-2.1-or-later */ -/* - * This file is part of libgpiod. - * - * Copyright (C) 2019 Bartosz Golaszewski <[email protected]> - */ +// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <catch2/catch.hpp> #include <gpiod.hpp>
bindings/cxx/tests/tests-iter.cpp +2 -6
@@ -1,9 +1,5 @@ -/* SPDX-License-Identifier: LGPL-2.1-or-later */ -/* - * This file is part of libgpiod. - * - * Copyright (C) 2019 Bartosz Golaszewski <[email protected]> - */ +// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <catch2/catch.hpp> #include <gpiod.hpp>
bindings/cxx/tests/tests-line.cpp +2 -6
@@ -1,9 +1,5 @@ -/* SPDX-License-Identifier: LGPL-2.1-or-later */ -/* - * This file is part of libgpiod. - * - * Copyright (C) 2019 Bartosz Golaszewski <[email protected]> - */ +// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <catch2/catch.hpp> #include <gpiod.hpp>
bindings/python/Makefile.am +1 -6
@@ -1,10 +1,5 @@ # SPDX-License-Identifier: LGPL-2.1-or-later - -# -# This file is part of libgpiod. -# -# Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> -# +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> pyexec_LTLIBRARIES = gpiod.la
bindings/python/examples/Makefile.am +1 -6
@@ -1,10 +1,5 @@ # SPDX-License-Identifier: LGPL-2.1-or-later - -# -# This file is part of libgpiod. -# -# Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> -# +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> EXTRA_DIST = \ gpiodetect.py \
bindings/python/examples/gpiodetect.py +1 -6
@@ -1,11 +1,6 @@ #!/usr/bin/env python3 # SPDX-License-Identifier: LGPL-2.1-or-later - -# -# This file is part of libgpiod. -# -# Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> -# +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> '''Reimplementation of the gpiodetect tool in Python.'''
bindings/python/examples/gpiofind.py +1 -6
@@ -1,11 +1,6 @@ #!/usr/bin/env python3 # SPDX-License-Identifier: LGPL-2.1-or-later - -# -# This file is part of libgpiod. -# -# Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> -# +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> '''Reimplementation of the gpiofind tool in Python.'''
bindings/python/examples/gpioget.py +1 -6
@@ -1,11 +1,6 @@ #!/usr/bin/env python3 # SPDX-License-Identifier: LGPL-2.1-or-later - -# -# This file is part of libgpiod. -# -# Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> -# +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> '''Simplified reimplementation of the gpioget tool in Python.'''
bindings/python/examples/gpioinfo.py +1 -6
@@ -1,11 +1,6 @@ #!/usr/bin/env python3 # SPDX-License-Identifier: LGPL-2.1-or-later - -# -# This file is part of libgpiod. -# -# Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> -# +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> '''Simplified reimplementation of the gpioinfo tool in Python.'''
bindings/python/examples/gpiomon.py +1 -6
@@ -1,11 +1,6 @@ #!/usr/bin/env python3 # SPDX-License-Identifier: LGPL-2.1-or-later - -# -# This file is part of libgpiod. -# -# Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> -# +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> '''Simplified reimplementation of the gpiomon tool in Python.'''
bindings/python/examples/gpioset.py +1 -6
@@ -1,11 +1,6 @@ #!/usr/bin/env python3 # SPDX-License-Identifier: LGPL-2.1-or-later - -# -# This file is part of libgpiod. -# -# Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> -# +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> '''Simplified reimplementation of the gpioset tool in Python.'''
bindings/python/gpiodmodule.c +1 -5
@@ -1,9 +1,5 @@// SPDX-License-Identifier: LGPL-2.1-or-later -/* -* This file is part of libgpiod. -* -* Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> -*/ +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <Python.h> #include <gpiod.h>
bindings/python/tests/Makefile.am +1 -6
@@ -1,10 +1,5 @@ # SPDX-License-Identifier: LGPL-2.1-or-later - -# -# This file is part of libgpiod. -# -# Copyright (C) 2019 Bartosz Golaszewski <[email protected]> -# +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> dist_bin_SCRIPTS = gpiod_py_test.py
bindings/python/tests/gpiod_py_test.py +1 -6
@@ -1,11 +1,6 @@ #!/usr/bin/env python3 # SPDX-License-Identifier: LGPL-2.1-or-later - -# -# This file is part of libgpiod. -# -# Copyright (C) 2019 Bartosz Golaszewski <[email protected]> -# +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> import errno import gpiod
bindings/python/tests/gpiomockupmodule.c +1 -5
@@ -1,9 +1,5 @@// SPDX-License-Identifier: LGPL-2.1-or-later -/* -* This file is part of libgpiod. -* -* Copyright (C) 2019 Bartosz Golaszewski <[email protected]> -*/ +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <Python.h> #include <gpio-mockup.h>
configure.ac +1 -6
@@ -1,10 +1,5 @@ # SPDX-License-Identifier: LGPL-2.1-or-later - -# -# This file is part of libgpiod. -# -# Copyright (C) 2017-2019 Bartosz Golaszewski <[email protected]> -# +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> AC_PREREQ([2.69])
include/Makefile.am +1 -6
@@ -1,9 +1,4 @@ # SPDX-License-Identifier: LGPL-2.1-or-later - -# -# This file is part of libgpiod. -# -# Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> -# +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> include_HEADERS = gpiod.h
include/gpiod.h +1 -5
@@ -1,9 +1,5 @@/* SPDX-License-Identifier: LGPL-2.1-or-later */ -/* -* This file is part of libgpiod. -* -* Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> -*/ +/* SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> */ #ifndef __LIBGPIOD_GPIOD_H__#define __LIBGPIOD_GPIOD_H__
lib/Makefile.am +1 -6
@@ -1,10 +1,5 @@ # SPDX-License-Identifier: LGPL-2.1-or-later - -# -# This file is part of libgpiod. -# -# Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> -# +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> lib_LTLIBRARIES = libgpiod.la libgpiod_la_SOURCES = core.c helpers.c misc.c uapi/gpio.h
lib/core.c +1 -5
@@ -1,9 +1,5 @@// SPDX-License-Identifier: LGPL-2.1-or-later -/* -* This file is part of libgpiod. -* -* Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> -*/ +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> /* Low-level, core library code. */
lib/helpers.c +1 -5
@@ -1,9 +1,5 @@// SPDX-License-Identifier: LGPL-2.1-or-later -/* -* This file is part of libgpiod. -* -* Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> -*/ +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> /* * More specific variants of the core API and misc functions that don't need
lib/libgpiod.pc.in +4 -0
@@ -1,3 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> +# SPDX-FileCopyrightText: 2018 Clemens Gruber <[email protected]> + prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@
lib/misc.c +1 -5
@@ -1,9 +1,5 @@// SPDX-License-Identifier: LGPL-2.1-or-later -/* -* This file is part of libgpiod. -* -* Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> -*/ +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> /* Misc code that didn't fit anywhere else. */
lib/uapi/gpio.h +14 -8
@@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ /* * <linux/gpio.h> - userspace ABI for the GPIO character devices *
@@ -8,8 +8,8 @@* under the terms of the GNU General Public License version 2 as published by * the Free Software Foundation. */ -#ifndef _GPIO_H_ -#define _GPIO_H_ +#ifndef _UAPI_GPIO_H_ +#define _UAPI_GPIO_H_#include <linux/const.h> #include <linux/ioctl.h>
@@ -65,6 +65,7 @@ struct gpiochip_info {* @GPIO_V2_LINE_FLAG_BIAS_PULL_UP: line has pull-up bias enabled * @GPIO_V2_LINE_FLAG_BIAS_PULL_DOWN: line has pull-down bias enabled * @GPIO_V2_LINE_FLAG_BIAS_DISABLED: line has bias disabled +* @GPIO_V2_LINE_FLAG_EVENT_CLOCK_REALTIME: line events contain REALTIME timestamps */ enum gpio_v2_line_flag {GPIO_V2_LINE_FLAG_USED =_BITULL (0 ),
@@ -78,6 +79,7 @@ enum gpio_v2_line_flag {GPIO_V2_LINE_FLAG_BIAS_PULL_UP =_BITULL (8 ),GPIO_V2_LINE_FLAG_BIAS_PULL_DOWN =_BITULL (9 ),GPIO_V2_LINE_FLAG_BIAS_DISABLED =_BITULL (10 ), + GPIO_V2_LINE_FLAG_EVENT_CLOCK_REALTIME = _BITULL(11), };/**
@@ -210,7 +212,7 @@ struct gpio_v2_line_request {* @offset: the local offset on this GPIO chip, fill this in when * requesting the line information from the kernel * @num_attrs: the number of attributes in @attrs -* @flags: flags for the GPIO lines, with values from &enum +* @flags: flags for this GPIO line, with values from &enum * gpio_v2_line_flag, such as %GPIO_V2_LINE_FLAG_ACTIVE_LOW, * %GPIO_V2_LINE_FLAG_OUTPUT etc, added together. * @attrs: the configuration attributes associated with the line
@@ -270,9 +272,6 @@ enum gpio_v2_line_event_id {/** * struct gpio_v2_line_event - The actual event being pushed to userspace * @timestamp_ns: best estimate of time of event occurrence, in nanoseconds. -* The @timestamp_ns is read from %CLOCK_MONOTONIC and is intended to allow -* the accurate measurement of the time between events. It does not provide -* the wall-clock time. * @id: event identifier with value from &enum gpio_v2_line_event_id * @offset: the offset of the line that triggered the event * @seqno: the sequence number for this event in the sequence of events for
@@ -280,6 +279,13 @@ enum gpio_v2_line_event_id {* @line_seqno: the sequence number for this event in the sequence of * events on this particular line * @padding: reserved for future use +* +* By default the @timestamp_ns is read from %CLOCK_MONOTONIC and is +* intended to allow the accurate measurement of the time between events. +* It does not provide the wall-clock time. +* +* If the %GPIO_V2_LINE_FLAG_EVENT_CLOCK_REALTIME flag is set then the +* @timestamp_ns is read from %CLOCK_REALTIME. */ struct gpio_v2_line_event {__aligned_u64 timestamp_ns;
@@ -519,4 +525,4 @@ struct gpioevent_data {#define GPIOHANDLE_SET_CONFIG_IOCTL _IOWR(0xB4, 0x0A, struct gpiohandle_config)#define GPIO_GET_LINEINFO_WATCH_IOCTL _IOWR(0xB4, 0x0B, struct gpioline_info) -#endif /* _GPIO_H_ */ +#endif /* _UAPI_GPIO_H_ */
man/.gitignore +3 -0
@@ -1 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> + *.man
man/Makefile.am +1 -6
@@ -1,10 +1,5 @@ # SPDX-License-Identifier: LGPL-2.1-or-later - -# -# This file is part of libgpiod. -# -# Copyright (C) 2019 Bartosz Golaszewski <[email protected]> -# +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> if WITH_MANPAGES
man/template +3 -0
@@ -1,3 +1,6 @@ +# SPDX-License-Identifier: CC-BY-SA-4.0 +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> + [AUTHOR] Bartosz Golaszewski <[email protected]>
tests/.gitignore +3 -0
@@ -1 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> + gpiod-test
tests/Makefile.am +1 -6
@@ -1,10 +1,5 @@ # SPDX-License-Identifier: LGPL-2.1-or-later - -# -# This file is part of libgpiod. -# -# Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> -# +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> SUBDIRS = mockup
tests/gpiod-test.c +1 -5
@@ -1,9 +1,5 @@// SPDX-License-Identifier: LGPL-2.1-or-later -/* -* This file is part of libgpiod. -* -* Copyright (C) 2019 Bartosz Golaszewski <[email protected]> -*/ +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <errno.h> #include <glib/gstdio.h>
tests/gpiod-test.h +1 -5
@@ -1,9 +1,5 @@/* SPDX-License-Identifier: LGPL-2.1-or-later */ -/* -* This file is part of libgpiod. -* -* Copyright (C) 2019 Bartosz Golaszewski <[email protected]> -*/ +/* SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> */ /* * Testing framework for the core library.
tests/mockup/Makefile.am +1 -6
@@ -1,10 +1,5 @@ # SPDX-License-Identifier: LGPL-2.1-or-later - -# -# This file is part of libgpiod. -# -# Copyright (C) 2019 Bartosz Golaszewski <[email protected]> -# +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> lib_LTLIBRARIES = libgpiomockup.la
tests/mockup/gpio-mockup.c +2 -6
@@ -1,9 +1,5 @@ -/* SPDX-License-Identifier: LGPL-2.1-or-later */ -/* -* This file is part of libgpiod. -* -* Copyright (C) 2019 Bartosz Golaszewski <[email protected]> -*/ +// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <errno.h> #include <libkmod.h>
tests/mockup/gpio-mockup.h +1 -5
@@ -1,9 +1,5 @@/* SPDX-License-Identifier: LGPL-2.1-or-later */ -/* -* This file is part of libgpiod. -* -* Copyright (C) 2019 Bartosz Golaszewski <[email protected]> -*/ +/* SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> */ #ifndef __GPIO_MOCKUP_H__#define __GPIO_MOCKUP_H__
tests/tests-bulk.c +1 -5
@@ -1,9 +1,5 @@// SPDX-License-Identifier: LGPL-2.1-or-later -/* -* This file is part of libgpiod. -* -* Copyright (C) 2020 Bartosz Golaszewski <[email protected]> -*/ +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <errno.h>
tests/tests-chip.c +1 -5
@@ -1,9 +1,5 @@// SPDX-License-Identifier: LGPL-2.1-or-later -/* -* This file is part of libgpiod. -* -* Copyright (C) 2019 Bartosz Golaszewski <[email protected]> -*/ +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <errno.h>
tests/tests-event.c +1 -5
@@ -1,9 +1,5 @@// SPDX-License-Identifier: LGPL-2.1-or-later -/* -* This file is part of libgpiod. -* -* Copyright (C) 2019 Bartosz Golaszewski <[email protected]> -*/ +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <errno.h> #include <unistd.h>
tests/tests-line.c +1 -5
@@ -1,9 +1,5 @@// SPDX-License-Identifier: LGPL-2.1-or-later -/* -* This file is part of libgpiod. -* -* Copyright (C) 2019 Bartosz Golaszewski <[email protected]> -*/ +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <errno.h> #include <string.h>
tests/tests-misc.c +1 -5
@@ -1,9 +1,5 @@// SPDX-License-Identifier: LGPL-2.1-or-later -/* -* This file is part of libgpiod. -* -* Copyright (C) 2019 Bartosz Golaszewski <[email protected]> -*/ +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <string.h>
tools/.gitignore +3 -0
@@ -1,3 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> + gpiodetect gpioinfo gpioget
tools/Makefile.am +1 -6
@@ -1,10 +1,5 @@ # SPDX-License-Identifier: LGPL-2.1-or-later - -# -# This file is part of libgpiod. -# -# Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> -# +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> AM_CFLAGS = -I$(top_srcdir)/include/ -include $(top_builddir)/config.h AM_CFLAGS += -Wall -Wextra -g -std=gnu89
tools/gpio-tools-test +1 -6
@@ -1,11 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: LGPL-2.1-or-later - -# -# This file is part of libgpiod. -# -# Copyright (C) 2019 Bartosz Golaszewski <[email protected]> -# +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> MIN_KERNEL_VERSION="5.5.0" BATS_SCRIPT="gpio-tools-test.bats"
tools/gpio-tools-test.bats +1 -6
@@ -1,11 +1,6 @@ #!/usr/bin/env bats # SPDX-License-Identifier: LGPL-2.1-or-later - -# -# This file is part of libgpiod. -# -# Copyright (C) 2019 Bartosz Golaszewski <[email protected]> -# +# SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> # Simple test harness for the gpio-tools.
tools/gpiodetect.c +1 -5
@@ -1,9 +1,5 @@// SPDX-License-Identifier: LGPL-2.1-or-later -/* -* This file is part of libgpiod. -* -* Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> -*/ +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <dirent.h> #include <errno.h>
tools/gpiofind.c +1 -5
@@ -1,9 +1,5 @@// SPDX-License-Identifier: LGPL-2.1-or-later -/* -* This file is part of libgpiod. -* -* Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> -*/ +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <dirent.h> #include <errno.h>
tools/gpioget.c +1 -5
@@ -1,9 +1,5 @@// SPDX-License-Identifier: LGPL-2.1-or-later -/* -* This file is part of libgpiod. -* -* Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> -*/ +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <getopt.h> #include <gpiod.h>
tools/gpioinfo.c +1 -5
@@ -1,9 +1,5 @@// SPDX-License-Identifier: LGPL-2.1-or-later -/* -* This file is part of libgpiod. -* -* Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> -*/ +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <dirent.h> #include <errno.h>
tools/gpiomon.c +1 -5
@@ -1,9 +1,5 @@// SPDX-License-Identifier: LGPL-2.1-or-later -/* -* This file is part of libgpiod. -* -* Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> -*/ +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <errno.h> #include <getopt.h>
tools/gpioset.c +1 -5
@@ -1,9 +1,5 @@// SPDX-License-Identifier: LGPL-2.1-or-later -/* -* This file is part of libgpiod. -* -* Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> -*/ +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <errno.h> #include <gpiod.h>
tools/tools-common.c +2 -6
@@ -1,9 +1,5 @@ -/* SPDX-License-Identifier: LGPL-2.1-or-later */ -/* -* This file is part of libgpiod. -* -* Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> -*/ +// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> /* Common code for GPIO tools. */
tools/tools-common.h +1 -5
@@ -1,9 +1,5 @@/* SPDX-License-Identifier: LGPL-2.1-or-later */ -/* -* This file is part of libgpiod. -* -* Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]> -*/ +/* SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> */ #ifndef __GPIOD_TOOLS_COMMON_H__#define __GPIOD_TOOLS_COMMON_H__
Signature · 1 line
2.29.1
PATCH 2/3 licensing: relicense non-library code under GPL-2.0-or-later
In reply to Bartosz GolaszewskiFrom: Bartosz Golaszewski <[email protected]>
LGPL-2.1 is a license meant for shared libraries. Because I didn't know any better I used it for all files in the repository, including programs linking against libgpiod. The standard approach for many similar projects is to use LGPL for library code and GPL for programs (and also Makefiles and other files containing code or configuration).
Relicense all programs, tests, makefiles and autotools files under GPL-2.0 or later.
--- Makefile.am | 3 ++- autogen.sh | 2 +- bindings/Makefile.am | 2 +- bindings/cxx/Makefile.am | 2 +- bindings/cxx/examples/Makefile.am | 2 +- bindings/cxx/examples/gpiodetectcxx.cpp | 2 +- bindings/cxx/examples/gpiofindcxx.cpp | 2 +- bindings/cxx/examples/gpiogetcxx.cpp | 2 +- bindings/cxx/examples/gpioinfocxx.cpp | 2 +- bindings/cxx/examples/gpiomoncxx.cpp | 2 +- bindings/cxx/examples/gpiosetcxx.cpp | 2 +- bindings/cxx/tests/Makefile.am | 2 +- bindings/cxx/tests/gpiod-cxx-test-main.cpp | 2 +- bindings/cxx/tests/gpiod-cxx-test.cpp | 2 +- bindings/cxx/tests/tests-chip.cpp | 2 +- bindings/cxx/tests/tests-event.cpp | 2 +- bindings/cxx/tests/tests-iter.cpp | 2 +- bindings/cxx/tests/tests-line.cpp | 2 +- bindings/python/Makefile.am | 2 +- bindings/python/examples/Makefile.am | 2 +- bindings/python/examples/gpiodetect.py | 2 +- bindings/python/examples/gpiofind.py | 2 +- bindings/python/examples/gpioget.py | 2 +- bindings/python/examples/gpioinfo.py | 2 +- bindings/python/examples/gpiomon.py | 2 +- bindings/python/examples/gpioset.py | 2 +- bindings/python/tests/Makefile.am | 2 +- bindings/python/tests/gpiod_py_test.py | 2 +- configure.ac | 2 +- include/Makefile.am | 2 +- lib/Makefile.am | 2 +- man/Makefile.am | 2 +- tests/Makefile.am | 2 +- tests/gpiod-test.c | 2 +- tests/gpiod-test.h | 2 +- tests/mockup/Makefile.am | 2 +- tests/tests-bulk.c | 2 +- tests/tests-chip.c | 2 +- tests/tests-event.c | 2 +- tests/tests-line.c | 2 +- tests/tests-misc.c | 2 +- tools/Makefile.am | 2 +- tools/gpio-tools-test | 2 +- tools/gpio-tools-test.bats | 2 +- tools/gpiodetect.c | 2 +- tools/gpiofind.c | 2 +- tools/gpioget.c | 2 +- tools/gpioinfo.c | 2 +- tools/gpiomon.c | 2 +- tools/gpioset.c | 2 +- tools/tools-common.c | 2 +- tools/tools-common.h | 2 +- 52 files changed, 53 insertions(+), 52 deletions(-)
Makefile.am +2 -1
@@ -1,4 +1,4 @@ -# SPDX-License-Identifier: LGPL-2.1-or-later +# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> ACLOCAL_AMFLAGS = -I m4
@@ -8,6 +8,7 @@ SUBDIRS = include lib EXTRA_DIST = \ LICENSES/CC-BY-SA-4.0.txt \ LICENSES/GPL-2.0-only.txt \ + LICENSES/GPL-2.0-or-later.txt \ LICENSES/LGPL-2.1-or-later.txt \ LICENSES/Linux-syscall-note.txt
autogen.sh +1 -1
@@ -1,5 +1,5 @@ #!/bin/sh -# SPDX-License-Identifier: LGPL-2.1-or-later +# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> # SPDX-FileCopyrightText: 2017 Thierry Reding <[email protected]>
bindings/Makefile.am +1 -1
@@ -1,4 +1,4 @@ -# SPDX-License-Identifier: LGPL-2.1-or-later +# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> SUBDIRS = .
bindings/cxx/Makefile.am +1 -1
@@ -1,4 +1,4 @@ -# SPDX-License-Identifier: LGPL-2.1-or-later +# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> lib_LTLIBRARIES = libgpiodcxx.la
bindings/cxx/examples/Makefile.am +1 -1
@@ -1,4 +1,4 @@ -# SPDX-License-Identifier: LGPL-2.1-or-later +# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> AM_CPPFLAGS = -I$(top_srcdir)/bindings/cxx/ -I$(top_srcdir)/include
bindings/cxx/examples/gpiodetectcxx.cpp +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> /* C++ reimplementation of the gpiodetect tool. */
bindings/cxx/examples/gpiofindcxx.cpp +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> /* C++ reimplementation of the gpiofind tool. */
bindings/cxx/examples/gpiogetcxx.cpp +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> /* Simplified C++ reimplementation of the gpioget tool. */
bindings/cxx/examples/gpioinfocxx.cpp +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> /* Simplified C++ reimplementation of the gpioinfo tool. */
bindings/cxx/examples/gpiomoncxx.cpp +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> /* Simplified C++ reimplementation of the gpiomon tool. */
bindings/cxx/examples/gpiosetcxx.cpp +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> /* Simplified C++ reimplementation of the gpioset tool. */
bindings/cxx/tests/Makefile.am +1 -1
@@ -1,4 +1,4 @@ -# SPDX-License-Identifier: LGPL-2.1-or-later +# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> AM_CPPFLAGS = -I$(top_srcdir)/bindings/cxx/ -I$(top_srcdir)/include
bindings/cxx/tests/gpiod-cxx-test-main.cpp +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #define CATCH_CONFIG_MAIN
bindings/cxx/tests/gpiod-cxx-test.cpp +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <linux/version.h>
bindings/cxx/tests/tests-chip.cpp +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <catch2/catch.hpp>
bindings/cxx/tests/tests-event.cpp +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <catch2/catch.hpp>
bindings/cxx/tests/tests-iter.cpp +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <catch2/catch.hpp>
bindings/cxx/tests/tests-line.cpp +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <catch2/catch.hpp>
bindings/python/Makefile.am +1 -1
@@ -1,4 +1,4 @@ -# SPDX-License-Identifier: LGPL-2.1-or-later +# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> pyexec_LTLIBRARIES = gpiod.la
bindings/python/examples/Makefile.am +1 -1
@@ -1,4 +1,4 @@ -# SPDX-License-Identifier: LGPL-2.1-or-later +# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> EXTRA_DIST = \
bindings/python/examples/gpiodetect.py +1 -1
@@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# SPDX-License-Identifier: LGPL-2.1-or-later +# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> '''Reimplementation of the gpiodetect tool in Python.'''
bindings/python/examples/gpiofind.py +1 -1
@@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# SPDX-License-Identifier: LGPL-2.1-or-later +# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> '''Reimplementation of the gpiofind tool in Python.'''
bindings/python/examples/gpioget.py +1 -1
@@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# SPDX-License-Identifier: LGPL-2.1-or-later +# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> '''Simplified reimplementation of the gpioget tool in Python.'''
bindings/python/examples/gpioinfo.py +1 -1
@@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# SPDX-License-Identifier: LGPL-2.1-or-later +# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> '''Simplified reimplementation of the gpioinfo tool in Python.'''
bindings/python/examples/gpiomon.py +1 -1
@@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# SPDX-License-Identifier: LGPL-2.1-or-later +# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> '''Simplified reimplementation of the gpiomon tool in Python.'''
bindings/python/examples/gpioset.py +1 -1
@@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# SPDX-License-Identifier: LGPL-2.1-or-later +# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> '''Simplified reimplementation of the gpioset tool in Python.'''
bindings/python/tests/Makefile.am +1 -1
@@ -1,4 +1,4 @@ -# SPDX-License-Identifier: LGPL-2.1-or-later +# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> dist_bin_SCRIPTS = gpiod_py_test.py
bindings/python/tests/gpiod_py_test.py +1 -1
@@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# SPDX-License-Identifier: LGPL-2.1-or-later +# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> import errno
configure.ac +1 -1
@@ -1,4 +1,4 @@ -# SPDX-License-Identifier: LGPL-2.1-or-later +# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> AC_PREREQ([2.69])
include/Makefile.am +1 -1
@@ -1,4 +1,4 @@ -# SPDX-License-Identifier: LGPL-2.1-or-later +# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> include_HEADERS = gpiod.h
lib/Makefile.am +1 -1
@@ -1,4 +1,4 @@ -# SPDX-License-Identifier: LGPL-2.1-or-later +# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> lib_LTLIBRARIES = libgpiod.la
man/Makefile.am +1 -1
@@ -1,4 +1,4 @@ -# SPDX-License-Identifier: LGPL-2.1-or-later +# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> if WITH_MANPAGES
tests/Makefile.am +1 -1
@@ -1,4 +1,4 @@ -# SPDX-License-Identifier: LGPL-2.1-or-later +# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> SUBDIRS = mockup
tests/gpiod-test.c +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <errno.h>
tests/gpiod-test.h +1 -1
@@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ /* SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> */ /*
tests/mockup/Makefile.am +1 -1
@@ -1,4 +1,4 @@ -# SPDX-License-Identifier: LGPL-2.1-or-later +# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> lib_LTLIBRARIES = libgpiomockup.la
tests/tests-bulk.c +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <errno.h>
tests/tests-chip.c +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <errno.h>
tests/tests-event.c +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <errno.h>
tests/tests-line.c +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <errno.h>
tests/tests-misc.c +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <string.h>
tools/Makefile.am +1 -1
@@ -1,4 +1,4 @@ -# SPDX-License-Identifier: LGPL-2.1-or-later +# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> AM_CFLAGS = -I$(top_srcdir)/include/ -include $(top_builddir)/config.h
tools/gpio-tools-test +1 -1
@@ -1,5 +1,5 @@ #!/usr/bin/env bash -# SPDX-License-Identifier: LGPL-2.1-or-later +# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> MIN_KERNEL_VERSION="5.5.0"
tools/gpio-tools-test.bats +1 -1
@@ -1,5 +1,5 @@ #!/usr/bin/env bats -# SPDX-License-Identifier: LGPL-2.1-or-later +# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> # Simple test harness for the gpio-tools.
tools/gpiodetect.c +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <dirent.h>
tools/gpiofind.c +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <dirent.h>
tools/gpioget.c +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <getopt.h>
tools/gpioinfo.c +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <dirent.h>
tools/gpiomon.c +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <errno.h>
tools/gpioset.c +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> #include <errno.h>
tools/tools-common.c +1 -1
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: LGPL-2.1-or-later +// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> /* Common code for GPIO tools. */
tools/tools-common.h +1 -1
@@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ /* SPDX-FileCopyrightText: 2017-2021 Bartosz Golaszewski <[email protected]> */ #ifndef __GPIOD_TOOLS_COMMON_H__
Signature · 1 line
2.29.1
Quoted 8 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
This series tries to improve the licensing situation of libgpiod before we proceed with v2.0.
The first patch is rather uncotroversial: it makes the project compliant with the REUSE v3.0 specification.
Quoted 8 lines
Next two patches propose to change the licenses for certain files:
non-library source files are relicensed under GPL-2.0-or-later while C++ library code's license is upgraded to LGPL-3.0-or-later.The only person other than myself who contributed significant code to the relicensed files is Kent Gibson (Cc'ed) so these patches will need his ack.
That works for me.
for the series.
Cheers,
Kent.
Quoted 104 lines
Bartosz Golaszewski (3):
licensing: make the project REUSE-compliant
licensing: relicense non-library code under GPL-2.0-or-later
licensing: relicense C++ library code under LGPL-3.0-or-later.gitignore | 3 + COPYING | 511 +-------------------- Doxyfile.in | 9 +- LICENSES/CC-BY-SA-4.0.txt | 427 +++++++++++++++++ LICENSES/GPL-2.0-only.txt | 339 ++++++++++++++ LICENSES/GPL-2.0-or-later.txt | 1 + LICENSES/LGPL-2.1-or-later.txt | 502 ++++++++++++++++++++ LICENSES/LGPL-3.0-or-later.txt | 165 +++++++ LICENSES/Linux-syscall-note.txt | 25 + Makefile.am | 19 +- NEWS | 3 + README | 3 + TODO | 3 + autogen.sh | 11 +- bindings/Makefile.am | 9 +- bindings/cxx/Makefile.am | 9 +- bindings/cxx/chip.cpp | 8 +- bindings/cxx/examples/.gitignore | 3 + bindings/cxx/examples/Makefile.am | 9 +- bindings/cxx/examples/gpiodetectcxx.cpp | 8 +- bindings/cxx/examples/gpiofindcxx.cpp | 8 +- bindings/cxx/examples/gpiogetcxx.cpp | 8 +- bindings/cxx/examples/gpioinfocxx.cpp | 8 +- bindings/cxx/examples/gpiomoncxx.cpp | 8 +- bindings/cxx/examples/gpiosetcxx.cpp | 8 +- bindings/cxx/gpiod.hpp | 8 +- bindings/cxx/iter.cpp | 8 +- bindings/cxx/libgpiodcxx.pc.in | 3 + bindings/cxx/line.cpp | 10 +- bindings/cxx/line_bulk.cpp | 8 +- bindings/cxx/tests/.gitignore | 3 + bindings/cxx/tests/Makefile.am | 9 +- bindings/cxx/tests/gpio-mockup.cpp | 8 +- bindings/cxx/tests/gpio-mockup.hpp | 8 +- bindings/cxx/tests/gpiod-cxx-test-main.cpp | 8 +- bindings/cxx/tests/gpiod-cxx-test.cpp | 8 +- bindings/cxx/tests/tests-chip.cpp | 8 +- bindings/cxx/tests/tests-event.cpp | 8 +- bindings/cxx/tests/tests-iter.cpp | 8 +- bindings/cxx/tests/tests-line.cpp | 8 +- bindings/python/Makefile.am | 9 +- bindings/python/examples/Makefile.am | 9 +- bindings/python/examples/gpiodetect.py | 9 +- bindings/python/examples/gpiofind.py | 9 +- bindings/python/examples/gpioget.py | 9 +- bindings/python/examples/gpioinfo.py | 9 +- bindings/python/examples/gpiomon.py | 9 +- bindings/python/examples/gpioset.py | 9 +- bindings/python/gpiodmodule.c | 6 +- bindings/python/tests/Makefile.am | 9 +- bindings/python/tests/gpiod_py_test.py | 9 +- bindings/python/tests/gpiomockupmodule.c | 6 +- configure.ac | 9 +- include/Makefile.am | 9 +- include/gpiod.h | 6 +- lib/Makefile.am | 9 +- lib/core.c | 6 +- lib/helpers.c | 6 +- lib/libgpiod.pc.in | 4 + lib/misc.c | 6 +- lib/uapi/gpio.h | 22 +- man/.gitignore | 3 + man/Makefile.am | 9 +- man/template | 3 + tests/.gitignore | 3 + tests/Makefile.am | 9 +- tests/gpiod-test.c | 8 +- tests/gpiod-test.h | 8 +- tests/mockup/Makefile.am | 9 +- tests/mockup/gpio-mockup.c | 8 +- tests/mockup/gpio-mockup.h | 6 +- tests/tests-bulk.c | 8 +- tests/tests-chip.c | 8 +- tests/tests-event.c | 8 +- tests/tests-line.c | 8 +- tests/tests-misc.c | 8 +- tools/.gitignore | 3 + tools/Makefile.am | 9 +- tools/gpio-tools-test | 9 +- tools/gpio-tools-test.bats | 9 +- tools/gpiodetect.c | 8 +- tools/gpiofind.c | 8 +- tools/gpioget.c | 8 +- tools/gpioinfo.c | 8 +- tools/gpiomon.c | 8 +- tools/gpioset.c | 8 +- tools/tools-common.c | 8 +- tools/tools-common.h | 8 +- 88 files changed, 1663 insertions(+), 936 deletions(-) create mode 100644 LICENSES/CC-BY-SA-4.0.txt create mode 100644 LICENSES/GPL-2.0-only.txt create mode 120000 LICENSES/GPL-2.0-or-later.txt create mode 100644 LICENSES/LGPL-2.1-or-later.txt create mode 100644 LICENSES/LGPL-3.0-or-later.txt create mode 100644 LICENSES/Linux-syscall-note.txtSignature · 1 line
2.29.1
Quoted 12 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
This series tries to improve the licensing situation of libgpiod before we proceed with v2.0.
The first patch is rather uncotroversial: it makes the project compliant with the REUSE v3.0 specification.
Next two patches propose to change the licenses for certain files:
non-library source files are relicensed under GPL-2.0-or-later while C++ library code's license is upgraded to LGPL-3.0-or-later.
Quoted 8 lines
The only person other than myself who contributed significant code to the relicensed files is Kent Gibson (Cc'ed) so these patches will need his ack.
Bartosz Golaszewski (3):
licensing: make the project REUSE-compliant
licensing: relicense non-library code under GPL-2.0-or-later
licensing: relicense C++ library code under LGPL-3.0-or-later
LooksGoodToMe thanks for paying so much attention to detail here, licenses give me migraine.
Yours,
Linus Walleij