-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backporting upstream battery patches #388
Conversation
With this patch, the following distros will not be supported: Distro Kernel EOL Debian 8 3.16 2020-07-01 RHEL 7.3- 3.7 2017-07-31 (Kernel changed to 3.17) SuSE Linux Enterprise 12 SP1 3.12 2019-11-13 Ubuntu 14.04.4 3.16 2019-03-06 This patch also removed those old kernels in .github/workflows/main.yml. Signed-off-by: Ping Cheng <[email protected]>
cd971d4
to
ddb89fe
Compare
Ensure we have an up-to-date version of the package index before trying to install packages. Otherwise we may try to install an outdated version of something that has been deleted from Ubuntu's servers. Signed-off-by: Jason Gerecke <[email protected]>
github: Run 'apt-get update' before 'apt-get install'
a15515c
to
c2477c7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please word-wrap the description for the "Add version checking" commit. It should be wrapped at around 72 characters.
Nevermind -- please see later comment about how this commit should be integrated into previous imports.
4.5/wacom.h
Outdated
@@ -166,7 +166,9 @@ struct wacom_remote { | |||
struct input_dev *input; | |||
bool registered; | |||
struct wacom_battery battery; | |||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not necessary if we're trying to get this patch out ASAP, but in the future consider doing a configure-time feature check rather than a direct comparison to the KERNEL_VERSION macro. See the block of checks starting at https://github.com/linuxwacom/input-wacom/blob/master/configure.ac#L195 for ideas (WACOM_POWERSUPPLY_41
, WACOM_DEVM_OR_RESET
, WACOM_USING_LL_DRIVER
, etc.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "Add version checking" commit should not be a standalone commit. Its changes should be directly integrated into each of the "imported" commits as appropriate. Standalone commits like this make it difficult to git bisect
input-wacom for problems because those imported commits will fail to compile on pre-4.19 kernels.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please word-wrap commit description of "Updating main.yml" commit. Descriptions should generally be wrapped so they have a width of around 72 characters (and no more than 80 characters). It might also be useful to include which feature flags triggered which new kernel tests.
e361dbe
to
a92efe5
Compare
85806a2
to
3c9c441
Compare
Currently the EKR battery remains even after we stop getting information from the device. This can lead to a stale battery persisting indefinitely in userspace. The remote sends a heartbeat every 10 seconds. Delete the battery if we miss two heartbeats (after 21 seconds). Restore the battery once we see a heartbeat again. Signed-off-by: Aaron Skomra <[email protected]> Signed-off-by: Aaron Armstrong Skomra <[email protected]> Reviewed-by: Jason Gerecke <[email protected]> Fixes: 9f1015d45f62 ("HID: wacom: EKR: attach the power_supply on first connection") CC: [email protected] Signed-off-by: Jiri Kosina <[email protected]> [[email protected]: Imported into input-wacom repository (9ac6678b95b0)] Signed-off-by: Joshua Dickens <[email protected]>
The 'connected' variable was poorly named, and this has led to some confusion. We can get the same information by checking if a serial number exists in the specified EKR slot. Signed-off-by: Aaron Skomra <[email protected]> Signed-off-by: Aaron Armstrong Skomra <[email protected]> Reviewed-by: Jason Gerecke <[email protected]> Signed-off-by: Jiri Kosina <[email protected]> [[email protected]: Imported into input-wacom repository (2834e38048f1)] Signed-off-by: Joshua Dickens <[email protected]>
3c9c441
to
6d417e0
Compare
Help differentiate the two remote related "serial" struct variables by renaming "wacom_remote_data" to "wacom_remote_work_data". Signed-off-by: Aaron Skomra <[email protected]> Signed-off-by: Aaron Armstrong Skomra <[email protected]> Reviewed-by: Jason Gerecke <[email protected]> Signed-off-by: Jiri Kosina <[email protected]> [[email protected]: Imported into input-wacom repository (55ab9b2c42f4)] Signed-off-by: Joshua Dickens <[email protected]>
Adding some versions to check compilation on for any version checks/flags we have setup in the code. 4.19 - For a check in 4.5/wacom_sys.c in wacom_map_usage for the compare_device_paths method. 4.2 - For a method in 3.17/wacom_sys.c hid_field_extract.
6d417e0
to
119814e
Compare
Thanks! LGTM |
Backporting Aaron's upstream battery patches with some kernel version checks to make sure anything below 4.19 is not running the new code and only using what was there before.