Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/checkpatch.yml
Original file line number Diff line number Diff line change
@@ -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)
32 changes: 27 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,30 @@
# License notice
<!-- SPDX-License-Identifier: GPL-2.0-only -->

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`
53 changes: 53 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!-- SPDX-License-Identifier: GPL-2.0-only -->

# 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:
- `<!-- SPDX-License-Identifier: ... -->`

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.
338 changes: 338 additions & 0 deletions LICENSES/LICENSE.gpl-2.0.txt

Large diffs are not rendered by default.

File renamed without changes.
27 changes: 18 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

Expand All @@ -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)
Expand All @@ -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)"
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- SPDX-License-Identifier: GPL-2.0-only -->

# Changes since v0.8 up to v0.9

*Quote of the day:*
Expand Down
2 changes: 2 additions & 0 deletions docs/3P-BUGS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->

## Third Party Bugs

While developing this driver we recognized some bugs in KDE and linux itself,
Expand Down
2 changes: 2 additions & 0 deletions docs/BT_DONGLES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->

## BT Dongles

Please report your Dongles and how they work [here](https://github.com/atar-axis/xpadneo/issues/93)
Expand Down
2 changes: 2 additions & 0 deletions docs/CONFIGURATION.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->

## Configuration

**Alternatively** to using the config-script, you can also do it by hand:
Expand Down
2 changes: 2 additions & 0 deletions docs/DEBUGGING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->

## Debugging

If you are asked to send debug info or want to fix bugs, follow the guide
Expand Down
2 changes: 2 additions & 0 deletions docs/FIRMWARE_FLASHING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->

# Firmware Update / Flashing Instructions

There are multiple ways to update the controller firmware which require different technical skills. The easiest method
Expand Down
2 changes: 2 additions & 0 deletions docs/PACKAGING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->

## Packaging

From v0.10 on, xpadneo provides a `Makefile` to help package maintainers
Expand Down
10 changes: 8 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->

[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/O4O43SURE)

If you want to support me or accelerate the development of a special feature, consider a small donation :heart:
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions docs/SDL.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->

## SDL Mapping

We fixed the following problem by pretending we are in Windows wireless mode
Expand Down
3 changes: 2 additions & 1 deletion docs/TESTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->

## Testing and Development

### Working with Pull Requests
Expand Down Expand Up @@ -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
```

2 changes: 2 additions & 0 deletions docs/TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->

## Troubleshooting

### Gamepad Does Not Connect Properly
Expand Down
2 changes: 2 additions & 0 deletions docs/descriptors/8bitso_sn30_windows.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->

# HID Descriptor for 8BitDo SN30 Pro+ (Windows mode)

Hex dump of the controller descriptor:
Expand Down
2 changes: 2 additions & 0 deletions docs/descriptors/gulikit_kingkong2_android.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->

# USB Descriptor for GuliKit KingKong 2 (Android mode)

Hex dump of the controller descriptor:
Expand Down
2 changes: 2 additions & 0 deletions docs/descriptors/xb1s_linux.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->

# USB Descriptor for Xbox One S Wireless (Linux mode)

Hex dump of the controller descriptor:
Expand Down
2 changes: 2 additions & 0 deletions docs/descriptors/xb1s_windows.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->

# USB Descriptor for Xbox One S Wireless (Windows mode)

Hex dump of the controller descriptor:
Expand Down
2 changes: 2 additions & 0 deletions docs/descriptors/xbe2_linux.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->

# USB Descriptor for Xbox Elite 2 Wireless (Linux mode)

Hex dump of the controller descriptor:
Expand Down
2 changes: 2 additions & 0 deletions docs/descriptors/xbe2_unknown.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->

# USB Descriptor for Xbox Elite 2 Wireless (Unknown mode)

Hex dump of the original, unmodified controller descriptor:
Expand Down
2 changes: 2 additions & 0 deletions docs/descriptors/xbxs.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->

# USB Descriptor for Xbox Series X|S Wireless

Hex dump of the controller descriptor:
Expand Down
2 changes: 2 additions & 0 deletions docs/heuristics/gamesir-nova.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->

# GameSir Nova OUIs

Gamesir Nova uses random MAC OUIs. We collect them here to implement a
Expand Down
Loading