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

Fix ChibiOS backlight not turning off on suspend #10114

Merged
merged 2 commits into from
Aug 26, 2020

Conversation

fauxpark
Copy link
Member

Description

This is present in the AVR suspend code, but missing here.

Types of Changes

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

Issues Fixed or Closed by This PR

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).

@fauxpark fauxpark requested a review from a team August 21, 2020 01:31
@tzarc tzarc changed the base branch from master to develop August 21, 2020 23:58
@tzarc
Copy link
Member

tzarc commented Aug 21, 2020

Will need to be rebased onto develop.
Cherry-picked it manually, works perfectly fine on actual hardware.

@fauxpark
Copy link
Member Author

This is a bugfix, I think it should go into master.

@tzarc tzarc changed the base branch from develop to master August 22, 2020 03:27
@tzarc tzarc requested a review from a team August 22, 2020 04:08
Copy link
Member

@noroadsleft noroadsleft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slight __attribute__ ((weak)) ✔️ because I don't have any ChibiOS boards with backlighting.

@noroadsleft noroadsleft requested a review from a team August 22, 2020 17:35
@drashna
Copy link
Member

drashna commented Aug 24, 2020

did we want to import the rest of the code too? Eg, this:

// Turn off LED indicators
uint8_t leds_off = 0;
# if defined(BACKLIGHT_CAPS_LOCK) && defined(BACKLIGHT_ENABLE)
if (is_backlight_enabled()) {
// Don't try to turn off Caps Lock indicator as it is backlight and backlight is already off
leds_off |= (1 << USB_LED_CAPS_LOCK);
}
# endif
led_set(leds_off);

Note, there doesn't seem to be any wake code (as it wouldn't actually be needed).

@fauxpark
Copy link
Member Author

@drashna done

@tzarc
Copy link
Member

tzarc commented Aug 26, 2020

LGTM, ship it.

@noroadsleft noroadsleft merged commit d949932 into qmk:master Aug 26, 2020
@noroadsleft
Copy link
Member

Thanks!

@fauxpark fauxpark deleted the chibios-backlight-suspend branch August 26, 2020 18:17
nicocesar pushed a commit to nicocesar/qmk_firmware that referenced this pull request Sep 6, 2020
* Fix ChibiOS backlight not turning off on suspend

* Add missing code for backlight as caps lock too
drashna pushed a commit to zsa/qmk_firmware that referenced this pull request Sep 30, 2020
* Fix ChibiOS backlight not turning off on suspend

* Add missing code for backlight as caps lock too
kjganz pushed a commit to kjganz/qmk_firmware that referenced this pull request Oct 28, 2020
* Fix ChibiOS backlight not turning off on suspend

* Add missing code for backlight as caps lock too
BorisTestov pushed a commit to BorisTestov/qmk_firmware that referenced this pull request May 23, 2024
* Fix ChibiOS backlight not turning off on suspend

* Add missing code for backlight as caps lock too
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.

4 participants