Skip to content
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

Remove the #10088 hotfix for Teensy 3.1-like Input:Club keyboards #12870

Merged
merged 3 commits into from
Aug 3, 2021

Conversation

firetech
Copy link
Contributor

@firetech firetech commented May 11, 2021

Description

On at least my Ergodox Infinity, the #10088 hotfix causes the issue it intended to solve. That is, waking the keyboard from suspend after the keyboard has caused the host to wake works fine without the #10088 hotfix, but with it, the keyboard gets stuck sleeping.

This PR removes the #10088 hotfix for Ergodox Infinity, K-Type and Whitefox (all using the same MK20DX256 MCU).

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

It seems to _cause_ the issue it intended to solve there.
@github-actions github-actions bot added the core label May 11, 2021
@tzarc
Copy link
Member

tzarc commented May 11, 2021

I can't approve this PR in its current form. ChibiOS is supposed to abstract this stuff away, and only in cases where ChibiOS doesn't support pieces of functionality (such as bootloaders etc.) do we delve into processor-specific handling of issues.

I'd much rather see a proper fix.

@firetech
Copy link
Contributor Author

firetech commented May 11, 2021

I'd much rather see a proper fix.

Fair enough.

Since I don't own any keyboard that experiences the original issue, I can't really help with a proper fix. Should I change this PR to just revert the original "fix" altogether? Or add a specific define to skip the USB driver restart?

@drashna
Copy link
Member

drashna commented May 11, 2021

Just curious if you've tried #define USB_SUSPEND_WAKEUP_DELAY 200, as that would effect this.

@firetech
Copy link
Contributor Author

Just curious if you've tried #define USB_SUSPEND_WAKEUP_DELAY 200, as that would effect this.

Yep. It had no effect.

@stale
Copy link

stale bot commented Jun 26, 2021

Thank you for your contribution!
This pull request has been automatically marked as stale because it has not had activity in the last 45 days. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, or re-open when it's ready.
For maintainers: Please label with awaiting review, breaking_change, in progress, or on hold to prevent the issue from being re-flagged.

@firetech
Copy link
Contributor Author

I think something should be done to fix this issue. Maybe not exactly this patch in its current state, but I'd be happy to revise it to something more acceptable.

@drashna
Copy link
Member

drashna commented Jul 3, 2021

I think something should be done to fix this issue. Maybe not exactly this patch in its current state, but I'd be happy to revise it to something more acceptable.

How about making the function weak?

That way, could throw a revised version in the boards.c in /platforms/chibios/ or wherever.

@drashna drashna requested a review from a team July 3, 2021 07:29
@stale stale bot removed the awaiting changes label Jul 3, 2021
Now only affects Ergodox Infinity, Whitefox and K-type, though.

Switches over Ergodox Infinity to the `IC_TEENSY_3_1` board, since that
was a nice place to implement the `restart_usb_driver` override.
However, I would guess this issue is present for other K20x/Teensy 3.1
boards as well...
@firetech
Copy link
Contributor Author

firetech commented Jul 3, 2021

I implemented @drashna's suggestion instead. As a side effect, the fix now only affects Input:Club boards (specifically K-Type, Whitefox and Ergodox Infinity).

Since I found there was an existing IC_TEENSY_3_1 (where IC is for Input:Club) board in platforms/chibios, only used by K-Type and Whitefox, I switched over Ergodox Infinity to that and implemented the empty restart_usb_driver override there. No idea why Ergodox Infinity wasn't using that board, but it seems to work fine after switching to it. A comment in K-Type's rules.mk suggests that the only difference between PJRC_TEENSY_3_1 and IC_TEENSY_3_1 is a hack related to the watchdog, and given these boards common pedigree, that might be of use on the Ergodox Infinity as well?

@firetech firetech changed the title Remove the #10088 hotfix for K20x MCU:s Remove the #10088 hotfix for Teensy 3.1-like Input:Club keyboards Jul 3, 2021
@drashna drashna requested a review from a team July 3, 2021 14:46
@tzarc tzarc merged commit 1409b36 into qmk:develop Aug 3, 2021
@firetech firetech deleted the fix_wakeup_k20x branch August 3, 2021 21:39
stdvar pushed a commit to SonixQMK/ChibiOS-Contrib that referenced this pull request Oct 11, 2021
stdvar pushed a commit to SonixQMK/qmk_firmware that referenced this pull request Oct 11, 2021
dexter93 pushed a commit to SonixQMK/qmk_firmware that referenced this pull request Oct 12, 2021
@sigprof sigprof mentioned this pull request Oct 30, 2021
14 tasks
HorrorTroll pushed a commit to HorrorTroll/qmk_firmware that referenced this pull request Nov 4, 2021
dexter93 pushed a commit to SonixQMK/ChibiOS-Contrib that referenced this pull request Nov 21, 2021
nhongooi pushed a commit to nhongooi/qmk_firmware that referenced this pull request Dec 5, 2021
…mk#12870)

* Remove the qmk#10088 hotfix for K20x MCU:s.

It seems to _cause_ the issue it intended to solve there.

* Cleaner way of removing qmk#10088 hotfix.

Now only affects Ergodox Infinity, Whitefox and K-type, though.

Switches over Ergodox Infinity to the `IC_TEENSY_3_1` board, since that
was a nice place to implement the `restart_usb_driver` override.
However, I would guess this issue is present for other K20x/Teensy 3.1
boards as well...

* Fix comment regarding `IC_TEENSY_3_1` for all keyboards using it.
dexter93 pushed a commit to dexter93/ChibiOS-Contrib that referenced this pull request Jan 4, 2022
dexter93 pushed a commit to SonixQMK/ChibiOS-Contrib that referenced this pull request Feb 12, 2022
BorisTestov pushed a commit to BorisTestov/qmk_firmware that referenced this pull request May 23, 2024
…mk#12870)

* Remove the qmk#10088 hotfix for K20x MCU:s.

It seems to _cause_ the issue it intended to solve there.

* Cleaner way of removing qmk#10088 hotfix.

Now only affects Ergodox Infinity, Whitefox and K-type, though.

Switches over Ergodox Infinity to the `IC_TEENSY_3_1` board, since that
was a nice place to implement the `restart_usb_driver` override.
However, I would guess this issue is present for other K20x/Teensy 3.1
boards as well...

* Fix comment regarding `IC_TEENSY_3_1` for all keyboards using it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants