diff --git a/.github/workflows/checkpatch.yml b/.github/workflows/checkpatch.yml
new file mode 100644
index 00000000..2cd2aba6
--- /dev/null
+++ b/.github/workflows/checkpatch.yml
@@ -0,0 +1,18 @@
+name: Kernel Coding Style Check
+
+on: [pull_request, push]
+
+jobs:
+ check-style:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+
+ - name: Download checkpatch.pl
+ run: wget https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/scripts/checkpatch.pl
+
+ - name: Run checkpatch.pl
+ run: perl checkpatch.pl --ignore BAD_SIGN_OFF,FILE_PATH_CHANGES,FUNCTION_ARGUMENTS,FSF_MAILING_ADDRESS,LINUX_VERSION_CODE,SPLIT_STRING --no-tree <(git format-patch -U10 --stdout origin/master)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 1ca1d51a..841f8da5 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,8 +1,30 @@
-# License notice
+
-xpadneo aims to remain compatible with the Linux kernel licensing requirements.
+# Contributing and licensing
-By submitting a contribution, you agree that your code may be licensed under GPL-2.0-only in addition to the project's
-primary license.
+xpadneo uses file-level licensing via SPDX identifiers.
-If you do not agree with this, please do not submit a pull request.
+
+## License scope
+
+- Kernel driver code (files linked into the kernel module, especially `hid-xpadneo/src/**`) is licensed under
+ **GPL-2.0-only**.
+- Non-driver content (for example documentation, examples, tooling, and helper scripts) is generally licensed under
+ **GPL-3.0-or-later**, unless a file states otherwise.
+
+
+## Your contribution
+
+By submitting a contribution, you agree that your changes are licensed under the license specified by the SPDX header
+in each file you modify.
+
+If you add a new file, you must add an SPDX license identifier at the top of that file and choose the license
+appropriate for its scope.
+
+
+## Reference
+
+See `LICENSE.md` and the full license texts in:
+
+- `LICENSES/LICENSE.gpl-2.0.txt`
+- `LICENSES/LICENSE.gpl-3.0.txt`
diff --git a/LICENSE.md b/LICENSE.md
new file mode 100644
index 00000000..de56b972
--- /dev/null
+++ b/LICENSE.md
@@ -0,0 +1,53 @@
+
+
+# Licensing
+
+This repository contains components under different licenses.
+
+
+## Summary
+
+- Kernel driver code (linked into the kernel module), especially files under:
+ - `hid-xpadneo/src/**`
+ is licensed under **GPL-2.0-only**.
+
+- Non-driver content is generally GPL-3.0-or-later **unless file headers specify otherwise**. This includes:
+ - Documentation (`docs/**`)
+ - Examples (`examples/**`)
+ - Tooling and helper scripts (`tools/**`, `scripts/**`)
+
+
+## Canonical license texts
+
+The full license texts are provided in:
+
+- `LICENSES/LICENSE.gpl-2.0.txt`
+- `LICENSES/LICENSE.gpl-3.0.txt`
+
+
+## File-level license identifiers (SPDX)
+
+This project uses SPDX license identifiers in file headers.
+
+- For C / header files:
+ - `// SPDX-License-Identifier: GPL-2.0-only`
+ - or `// SPDX-License-Identifier: GPL-3.0-or-later`
+- For Markdown files:
+ - ``
+
+The SPDX identifier in each file is the authoritative license marker for that file.
+
+
+## Notes on scope
+
+The GPL-2.0-only scope is intentionally limited to code that is part of the kernel module.
+Documentation and other non-module assets are out of that scope and can remain GPL-3.0-or-later.
+
+
+## Contributor guidance
+
+By submitting contributions, you agree that your changes are licensed under the license indicated by the SPDX header
+of the file(s) you modify.
+
+If a new file is added, include an SPDX license identifier at the top of the file and choose the appropriate license
+for its scope.
diff --git a/LICENSES/LICENSE.gpl-2.0.txt b/LICENSES/LICENSE.gpl-2.0.txt
new file mode 100644
index 00000000..9efa6fbc
--- /dev/null
+++ b/LICENSES/LICENSE.gpl-2.0.txt
@@ -0,0 +1,338 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the 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 Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ , 1 April 1989
+ Moe Ghoul, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/LICENSE b/LICENSES/LICENSE.gpl-3.0.txt
similarity index 100%
rename from LICENSE
rename to LICENSES/LICENSE.gpl-3.0.txt
diff --git a/Makefile b/Makefile
index 7f6a4e14..1916307a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,6 @@
ETC_PREFIX ?= /etc
DOC_PREFIX ?= /usr/share/doc/xpadneo
+META_PREFIX ?= /usr/share/metainfo
MODPROBE_CONFS := xpadneo.conf
UDEV_RULES := 60-xpadneo.rules 70-xpadneo-disable-hidraw.rules
@@ -24,20 +25,24 @@ all: build
help:
@echo "Targets:"
- @echo "help This help"
- @echo "build Prepare the package for DKMS deployment"
- @echo "clangd-lsp Generate compile_commands.json for clangd (requires bear)"
- @echo "install Install the package, documentation and DKMS source code"
- @echo "uninstall Uninstall the package, documentation and DKMS source code"
+ @echo "help This help"
+ @echo "build Prepare the package for DKMS deployment"
+ @echo "clangd-lsp Generate compile_commands.json for clangd (requires bear)"
+ @echo "install Install the package, documentation and DKMS source code"
+ @echo "uninstall Uninstall the package, documentation and DKMS source code"
+ @echo "install-all Install everything including optional targets"
+ @echo
+ @echo "Optional targets:"
+ @echo "install-metainfo Install appstream metainfo"
@echo
@echo "Variables:"
- @echo "PREFIX Install files into this prefix"
- @echo "DOC_PREFIX Install doc files relative to the prefix (defaults to /usr/share/doc/xpadneo)"
- @echo "ETC_PREFIX Install etc files relative to the prefix (defaults to /etc)"
+ @echo "PREFIX Install files into this prefix"
+ @echo "DOC_PREFIX Install doc files relative to the prefix (defaults to /usr/share/doc/xpadneo)"
+ @echo "ETC_PREFIX Install etc files relative to the prefix (defaults to /etc)"
@echo
@echo "Using PREFIX requires handling dkms commands in your package script."
-.PHONY: build clangd-lsp install uninstall help
+.PHONY: build clangd-lsp install uninstall install-all install-metainfo help
.INTERMEDIATE: VERSION
@@ -48,6 +53,7 @@ build: VERSION
$(MAKE) VERSION="$(shell cat VERSION)" -C hid-xpadneo dkms.conf
clangd-lsp: compile_commands.json
+install-all: install install-metainfo
install: build
mkdir -p $(PREFIX)$(ETC_PREFIX)/modprobe.d $(PREFIX)$(ETC_PREFIX)/udev/rules.d $(PREFIX)$(DOC_PREFIX)
@@ -57,6 +63,9 @@ install: build
$(UDEVADM) control --reload
$(DKMS) add hid-xpadneo
+install-metainfo:
+ install -D -m 0644 -t $(PREFIX)$(META_PREFIX) xpadneo.metainfo.xml
+
uninstall: VERSION
$(DKMS) remove "hid-xpadneo/$(shell cat VERSION)" --all || echo "dkms: remove failed: ignored"
rm -Rf "$(PREFIX)/usr/src/hid-xpadneo-$(shell cat VERSION)"
diff --git a/NEWS.md b/NEWS.md
index 8491399e..61dba64b 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,3 +1,5 @@
+
+
# Changes since v0.8 up to v0.9
*Quote of the day:*
diff --git a/docs/3P-BUGS.md b/docs/3P-BUGS.md
index 1baf6a08..1ced329f 100644
--- a/docs/3P-BUGS.md
+++ b/docs/3P-BUGS.md
@@ -1,3 +1,5 @@
+
+
## Third Party Bugs
While developing this driver we recognized some bugs in KDE and linux itself,
diff --git a/docs/BT_DONGLES.md b/docs/BT_DONGLES.md
index cc13d2c0..f93a4c8a 100644
--- a/docs/BT_DONGLES.md
+++ b/docs/BT_DONGLES.md
@@ -1,3 +1,5 @@
+
+
## BT Dongles
Please report your Dongles and how they work [here](https://github.com/atar-axis/xpadneo/issues/93)
diff --git a/docs/CONFIGURATION.md b/docs/CONFIGURATION.md
index 3e51f1af..570407a8 100644
--- a/docs/CONFIGURATION.md
+++ b/docs/CONFIGURATION.md
@@ -1,3 +1,5 @@
+
+
## Configuration
**Alternatively** to using the config-script, you can also do it by hand:
diff --git a/docs/DEBUGGING.md b/docs/DEBUGGING.md
index 6740dbee..307fa8b0 100644
--- a/docs/DEBUGGING.md
+++ b/docs/DEBUGGING.md
@@ -1,3 +1,5 @@
+
+
## Debugging
If you are asked to send debug info or want to fix bugs, follow the guide
diff --git a/docs/FIRMWARE_FLASHING.md b/docs/FIRMWARE_FLASHING.md
index e615e74d..1c733690 100644
--- a/docs/FIRMWARE_FLASHING.md
+++ b/docs/FIRMWARE_FLASHING.md
@@ -1,3 +1,5 @@
+
+
# Firmware Update / Flashing Instructions
There are multiple ways to update the controller firmware which require different technical skills. The easiest method
diff --git a/docs/PACKAGING.md b/docs/PACKAGING.md
index 3efcc314..ed62a0df 100644
--- a/docs/PACKAGING.md
+++ b/docs/PACKAGING.md
@@ -1,3 +1,5 @@
+
+
## Packaging
From v0.10 on, xpadneo provides a `Makefile` to help package maintainers
diff --git a/docs/README.md b/docs/README.md
index df21faad..b199054a 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -1,3 +1,5 @@
+
+
[](https://ko-fi.com/O4O43SURE)
If you want to support me or accelerate the development of a special feature, consider a small donation :heart:
@@ -37,9 +39,13 @@ Quote from [@atar-axis (Florian Dollinger)](https://github.com/atar-axis), creat
These other projects may not support some of the advanced features of xpadneo.
-## Heads Up
+## Heads Up Package Maintainers
+
+Licensing of the project has changed, so please update your packaging if you maintain a package for this driver.
+Please refer to [LICENSE.md](../LICENSE.md) for details. If you have any questions, please ask.
-**Package maintainers:** Please see [Packaging](https://atar-axis.github.io/xpadneo/#packaging).
+The project introduced some packaging helpers and changed the installation process. Please see
+[Packaging](https://atar-axis.github.io/xpadneo/#packaging).
## Breaking Changes
diff --git a/docs/SDL.md b/docs/SDL.md
index f59244ad..82828d2b 100644
--- a/docs/SDL.md
+++ b/docs/SDL.md
@@ -1,3 +1,5 @@
+
+
## SDL Mapping
We fixed the following problem by pretending we are in Windows wireless mode
diff --git a/docs/TESTING.md b/docs/TESTING.md
index 35795042..2e38312a 100644
--- a/docs/TESTING.md
+++ b/docs/TESTING.md
@@ -1,3 +1,5 @@
+
+
## Testing and Development
### Working with Pull Requests
@@ -32,4 +34,3 @@ git remote update --prune
git reset --merge kakra/remote/branch/name # tries keeping your local modifications
git reset --hard kakra/remote/branch/name # discards your local modifications
```
-
diff --git a/docs/TROUBLESHOOTING.md b/docs/TROUBLESHOOTING.md
index c6219d65..e5ee4cb8 100644
--- a/docs/TROUBLESHOOTING.md
+++ b/docs/TROUBLESHOOTING.md
@@ -1,3 +1,5 @@
+
+
## Troubleshooting
### Gamepad Does Not Connect Properly
diff --git a/docs/descriptors/8bitso_sn30_windows.md b/docs/descriptors/8bitso_sn30_windows.md
index 77830999..696c5fd1 100644
--- a/docs/descriptors/8bitso_sn30_windows.md
+++ b/docs/descriptors/8bitso_sn30_windows.md
@@ -1,3 +1,5 @@
+
+
# HID Descriptor for 8BitDo SN30 Pro+ (Windows mode)
Hex dump of the controller descriptor:
diff --git a/docs/descriptors/gulikit_kingkong2_android.md b/docs/descriptors/gulikit_kingkong2_android.md
index 8a56720a..e6fb3021 100644
--- a/docs/descriptors/gulikit_kingkong2_android.md
+++ b/docs/descriptors/gulikit_kingkong2_android.md
@@ -1,3 +1,5 @@
+
+
# USB Descriptor for GuliKit KingKong 2 (Android mode)
Hex dump of the controller descriptor:
diff --git a/docs/descriptors/xb1s_linux.md b/docs/descriptors/xb1s_linux.md
index eda9d6e9..0f2660c3 100644
--- a/docs/descriptors/xb1s_linux.md
+++ b/docs/descriptors/xb1s_linux.md
@@ -1,3 +1,5 @@
+
+
# USB Descriptor for Xbox One S Wireless (Linux mode)
Hex dump of the controller descriptor:
diff --git a/docs/descriptors/xb1s_windows.md b/docs/descriptors/xb1s_windows.md
index a87810c8..7eccbebf 100644
--- a/docs/descriptors/xb1s_windows.md
+++ b/docs/descriptors/xb1s_windows.md
@@ -1,3 +1,5 @@
+
+
# USB Descriptor for Xbox One S Wireless (Windows mode)
Hex dump of the controller descriptor:
diff --git a/docs/descriptors/xbe2_linux.md b/docs/descriptors/xbe2_linux.md
index 742e2cfb..33d7fac2 100644
--- a/docs/descriptors/xbe2_linux.md
+++ b/docs/descriptors/xbe2_linux.md
@@ -1,3 +1,5 @@
+
+
# USB Descriptor for Xbox Elite 2 Wireless (Linux mode)
Hex dump of the controller descriptor:
diff --git a/docs/descriptors/xbe2_unknown.md b/docs/descriptors/xbe2_unknown.md
index 5d792958..cb100b9e 100644
--- a/docs/descriptors/xbe2_unknown.md
+++ b/docs/descriptors/xbe2_unknown.md
@@ -1,3 +1,5 @@
+
+
# USB Descriptor for Xbox Elite 2 Wireless (Unknown mode)
Hex dump of the original, unmodified controller descriptor:
diff --git a/docs/descriptors/xbxs.md b/docs/descriptors/xbxs.md
index 9eb766ac..e05cffa1 100644
--- a/docs/descriptors/xbxs.md
+++ b/docs/descriptors/xbxs.md
@@ -1,3 +1,5 @@
+
+
# USB Descriptor for Xbox Series X|S Wireless
Hex dump of the controller descriptor:
diff --git a/docs/heuristics/gamesir-nova.md b/docs/heuristics/gamesir-nova.md
index d8b17b9a..bb6f269b 100644
--- a/docs/heuristics/gamesir-nova.md
+++ b/docs/heuristics/gamesir-nova.md
@@ -1,3 +1,5 @@
+
+
# GameSir Nova OUIs
Gamesir Nova uses random MAC OUIs. We collect them here to implement a
diff --git a/docs/licensing/driver-relicense-tracking.md b/docs/licensing/driver-relicense-tracking.md
new file mode 100644
index 00000000..64852b8d
--- /dev/null
+++ b/docs/licensing/driver-relicense-tracking.md
@@ -0,0 +1,114 @@
+
+
+# Driver relicensing / rewrite tracking (kernel module scope)
+
+> Scope: Only code that is linked into the kernel module (hid-xpadneo/src/*).
+> Goal: End state is GPL-2.0-only for all kernel driver code.
+> Non-driver code (docs/examples/tools) may remain GPL-3.0-or-later.
+
+
+## Purpose of this PR
+
+This PR documents and prepares the ongoing effort to make the xpadneo kernel driver code compatible with the Linux
+kernel’s GPL-2.0-only licensing requirements.
+
+The goal is to eventually have all code that is linked into the kernel module (`hid-xpadneo/src/*`) licensed under
+GPL-2.0-only, while allowing non-driver code (documentation, examples, tooling) to remain under GPL-3.0-or-later.
+
+
+## What this PR does
+
+- It introduces a tracking table that categorizes existing driver contributions by author, scope, and complexity.
+- Based on that classification, we distinguish between:
+ - **non-trivial driver logic**, where explicit relicensing consent is preferred, and
+ - **trivial or low-effort changes**, which will be re-implemented during the ongoing refactoring instead of chasing
+ consent.
+- It begins the license transition by updating SPDX headers in selected driver source files from GPL-3.0-only to
+ GPL-2.0-only, and documents the current state and the intended migration path.
+
+## About contributor tagging
+
+Only contributors whose changes include non-trivial driver logic are explicitly tagged and asked for consent. This is
+intentional.
+
+Minor fixes (e.g. one-line bugfixes, formatting, small table entries, simple parameter gates) are planned to be
+re-implemented as part of the refactor, as doing so is typically simpler and less intrusive than retroactively
+collecting formal approvals.
+
+If you contributed driver code and believe your contribution has been misclassified here, please feel free to comment —
+corrections are welcome.
+
+
+## Scope clarification
+
+- This effort applies **only** to code that is linked into the kernel module.
+- Documentation, descriptors, examples, and tooling are explicitly out of scope for GPL-2.0-only and may remain under
+ GPL-3.0-or-later.
+
+
+## Next steps
+
+- Collect explicit consent from selected contributors where applicable.
+- Continue modularization and clean-room re-implementation of driver components.
+- Track replaced or removed legacy code in this table as the refactor progresses.
+
+This approach is intended to be transparent, fair to contributors, and aligned with kernel licensing expectations.
+
+
+## Request for confirmation
+
+If you’re okay with it, please confirm here that your driver contributions may be relicensed under GPL-2.0-only as part
+of the ongoing refactor.
+
+This request applies only to contributions that are linked into the kernel module itself.
+
+Simply post a reply with:
+
+> I’m fine with relicensing my driver contributions under GPL-2.0-only.
+
+If you prefer not to consent, a short reply stating that is perfectly fine and helps us plan the rewrite accordingly.
+
+
+## Tracking table
+
+| Contributor (git author) | Likely GitHub handle | Driver commits / areas | Size (adds/dels in driver) | Classification | Action | Status | Notes / rewrite plan |
+|---|---|---:|---:|---|---|---|---|
+| Kai Krakow | @kakra | maintainer / main driver | 3030 / 2749 | core | keep | n/a | main rewrite/refactor driver into GPL-2.0-only files |
+| atar-axis / Florian Dollinger | @atar-axis | core driver (historical) | 1782 / 556 + 268 / 45 | core | keep | ✅ (per your note) | unify identities in tracking; already OK to relicense own code |
+| Ben Schattinger | @lights0123 | Series X/S support; Share button quirks + HID bit fixups | 16 / 2 (driver) | non-trivial logic | keep | ✅ | Adds quirk flag, usage map for Share (KEY_RECORD), raw_event bit re-mapping, adds PID 0x0B13. |
+| Erik Hajnal | @ehats | XBE2 unknown mode: mapping/fixups, ignore keyboard, reportsize 55 | 42 / 11 (driver) | non-trivial logic | keep | ✅ | Adds many USAGE_IGN entries, ignores HID_UP_KEYBOARD, extends raw_event reportsize handling, tweaks PID handling. |
+| Dugan Chen | @duganchen | Elite Series 2 wireless: adds BT PID + comments + disabled (#if 0) hack | 21 / 2 (driver) | trivial-ish / data plumbing | keep | ✅ | Mostly PID table entry (0x0B05), comment expansion, and #if 0 stub. |
+| bouhaa | @bouhaa | disable_shift_mode module param gating BTN_XBOX shift behavior | 8 / 1 (driver) | small feature gate | reimplemented | ✅ | Adds module_param + condition `!param_disable_shift_mode` around existing branch. Re-implement cleanly in new modular file if needed. |
+| Adam Becker | @adam-becker | small bugfixes + cleanup + param gate + rename | 29 / 24 (driver) | trivial to small-moderate | reimplemented | ✅ | Battery mode case fix; early return cleanup; MODULE_PARM_DESC formatting; add `ff_connect_notify` param + gate welcome rumble; rename mapping function. All easy to re-implement during refactor without chasing consent. |
+| John Mather | @NextDesign1 | OUI quirk entry (single line) | 1 / 0 (driver) | trivial / factual data | keep | ✅ | none |
+| PiMaker | unknown | build/debug print fix (single line) | 1 / 1 (driver) | trivial | removed | ✅ | fold into refactor; wrong Github handle |
+| nassek | @nassek | missing variable name (single line) | 1 / 1 (driver) | trivial | removed | ✅ | fold into refactor; do not chase consent |
+| yjun | @yjun123 | missing report check (2-line change) | 2 / 2 (driver) | trivial | keep | ✅ | commit 93c76df |
+
+
+## Status legend
+
+- ✅ consent obtained (comment link recorded)
+- ❌ consent declined
+- ⏳ pending (handle lookup / ask / review)
+- 🔁 rewrite planned
+- 🧹 removed
+
+
+## Changes merged
+
+- ✅ Remaining changes tracked at merge time:
+
+Legacy changes from monolithic `hid-xpadneo.c` were reimplemented during module split/refactor; behavior retained where
+needed, code structure/signatures rewritten. Some original code had already been completely replaced before this
+refactor and was therefore not part of the relicensing work.
+
+- Adam Becker's changes have been re-implemented during the refactor, as they are mostly trivial fixes and small
+ features that could easily be re-implemented without chasing consent. Most other code has been completely replaced
+ since it has been originally committed.
+- bouhaa's `disable_shift_mode` parameter has been re-implemented during the refactor, as it is a small feature gate
+ that can be easily re-implemented without chasing consent.
+- PiMaker's build/debug print fix and nassek's missing variable name have long been replaced already and have not been
+ part of the refactor.
+
+*Thanks to all contributors for helping keep xpadneo maintainable long-term.*
diff --git a/docs/reports/xb1s_battery_event.md b/docs/reports/xb1s_battery_event.md
index 55b35f48..a9261723 100644
--- a/docs/reports/xb1s_battery_event.md
+++ b/docs/reports/xb1s_battery_event.md
@@ -1,3 +1,5 @@
+
+
# Report ID 0x04
Received from device
diff --git a/hid-xpadneo/src/xpadneo/compat.h b/hid-xpadneo/src/xpadneo/compat.h
index ba19451d..58a9d3db 100644
--- a/hid-xpadneo/src/xpadneo/compat.h
+++ b/hid-xpadneo/src/xpadneo/compat.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-3.0-only */
+/* SPDX-License-Identifier: GPL-2.0-only */
/*
* xpadneo kernel compatibility helpers
diff --git a/hid-xpadneo/src/xpadneo/consumer.c b/hid-xpadneo/src/xpadneo/consumer.c
index bea980d0..0fcfb4b3 100644
--- a/hid-xpadneo/src/xpadneo/consumer.c
+++ b/hid-xpadneo/src/xpadneo/consumer.c
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-3.0-only
+// SPDX-License-Identifier: GPL-2.0-only
/*
* xpadneo consumer control driver
diff --git a/hid-xpadneo/src/xpadneo/core.c b/hid-xpadneo/src/xpadneo/core.c
index 8db3660d..5f1e6293 100644
--- a/hid-xpadneo/src/xpadneo/core.c
+++ b/hid-xpadneo/src/xpadneo/core.c
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-3.0-only
+// SPDX-License-Identifier: GPL-2.0-only
/*
* xpadneo driver core
diff --git a/hid-xpadneo/src/xpadneo/device.c b/hid-xpadneo/src/xpadneo/device.c
index 95440861..60c62194 100644
--- a/hid-xpadneo/src/xpadneo/device.c
+++ b/hid-xpadneo/src/xpadneo/device.c
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-3.0-only
+// SPDX-License-Identifier: GPL-2.0-only
/*
* xpadneo core device helpers
diff --git a/hid-xpadneo/src/xpadneo/events.c b/hid-xpadneo/src/xpadneo/events.c
index fcf6cbff..8b62d8b7 100644
--- a/hid-xpadneo/src/xpadneo/events.c
+++ b/hid-xpadneo/src/xpadneo/events.c
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-3.0-only
+// SPDX-License-Identifier: GPL-2.0-only
/*
* xpadneo driver events and profiles handling
diff --git a/hid-xpadneo/src/xpadneo/helpers.h b/hid-xpadneo/src/xpadneo/helpers.h
index f9a2cbf6..61bc6810 100644
--- a/hid-xpadneo/src/xpadneo/helpers.h
+++ b/hid-xpadneo/src/xpadneo/helpers.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-3.0-only */
+/* SPDX-License-Identifier: GPL-2.0-only */
/*
* xpadneo helper functions and macros
diff --git a/hid-xpadneo/src/xpadneo/keyboard.c b/hid-xpadneo/src/xpadneo/keyboard.c
index 1c3fb46a..0fb35498 100644
--- a/hid-xpadneo/src/xpadneo/keyboard.c
+++ b/hid-xpadneo/src/xpadneo/keyboard.c
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-3.0-only
+// SPDX-License-Identifier: GPL-2.0-only
/*
* xpadneo keyboard driver
diff --git a/hid-xpadneo/src/xpadneo/mappings.c b/hid-xpadneo/src/xpadneo/mappings.c
index a9ecac29..187fc83d 100644
--- a/hid-xpadneo/src/xpadneo/mappings.c
+++ b/hid-xpadneo/src/xpadneo/mappings.c
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-3.0-only
+// SPDX-License-Identifier: GPL-2.0-only
/*
* xpadneo driver usage mappings
diff --git a/hid-xpadneo/src/xpadneo/mouse.c b/hid-xpadneo/src/xpadneo/mouse.c
index 1faa5214..f7b0eab4 100644
--- a/hid-xpadneo/src/xpadneo/mouse.c
+++ b/hid-xpadneo/src/xpadneo/mouse.c
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-3.0-only
+// SPDX-License-Identifier: GPL-2.0-only
/*
* xpadneo mouse driver
diff --git a/hid-xpadneo/src/xpadneo/power.c b/hid-xpadneo/src/xpadneo/power.c
index 1b454b66..12777aa4 100644
--- a/hid-xpadneo/src/xpadneo/power.c
+++ b/hid-xpadneo/src/xpadneo/power.c
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-3.0-only
+// SPDX-License-Identifier: GPL-2.0-only
/*
* xpadneo power driver
diff --git a/hid-xpadneo/src/xpadneo/quirks.c b/hid-xpadneo/src/xpadneo/quirks.c
index 1a053ac8..87b59ccf 100644
--- a/hid-xpadneo/src/xpadneo/quirks.c
+++ b/hid-xpadneo/src/xpadneo/quirks.c
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-3.0-only
+// SPDX-License-Identifier: GPL-2.0-only
/*
* xpadneo driver quirks handling
diff --git a/hid-xpadneo/src/xpadneo/rumble.c b/hid-xpadneo/src/xpadneo/rumble.c
index af802391..1c3100e9 100644
--- a/hid-xpadneo/src/xpadneo/rumble.c
+++ b/hid-xpadneo/src/xpadneo/rumble.c
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-3.0-only
+// SPDX-License-Identifier: GPL-2.0-only
/*
* xpadneo rumble driver
diff --git a/hid-xpadneo/src/xpadneo/synthetic.c b/hid-xpadneo/src/xpadneo/synthetic.c
index fb3db672..c2b6835d 100644
--- a/hid-xpadneo/src/xpadneo/synthetic.c
+++ b/hid-xpadneo/src/xpadneo/synthetic.c
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-3.0-only
+// SPDX-License-Identifier: GPL-2.0-only
/*
* xpadneo helpers for synthetic drivers
diff --git a/hid-xpadneo/src/xpadneo/xpadneo.h b/hid-xpadneo/src/xpadneo/xpadneo.h
index d5bdfdcb..96a048e0 100644
--- a/hid-xpadneo/src/xpadneo/xpadneo.h
+++ b/hid-xpadneo/src/xpadneo/xpadneo.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
/*
* Force feedback support for XBOX ONE S and X gamepads via Bluetooth
*
diff --git a/xpadneo.metainfo.xml b/xpadneo.metainfo.xml
new file mode 100644
index 00000000..618b1a22
--- /dev/null
+++ b/xpadneo.metainfo.xml
@@ -0,0 +1,29 @@
+
+
+ xpadneo
+ xpadneo
+ Advanced Linux Driver for Xbox One Wireless Gamepad
+
+
+ Wireless driver for Xbox One S, Xbox Elite Series 2, and Xbox Series X|S
+ controllers connected via Bluetooth. Supports force feedback, rumble
+ effects, trigger force feedback, battery level indication, and
+ working paddle buttons.
+