-
-
Notifications
You must be signed in to change notification settings - Fork 42.4k
Add ability to poweroff ADNS5050 sensor #24223
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
Conversation
4b366bb to
65e1449
Compare
| } | ||
|
|
||
| void suspend_wakeup_init_user(void) { | ||
| adns5050_init(); |
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.
Is it necessary to reinit on wake?
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.
I think so:
From page 16 of https://media.digikey.com/pdf/Data%20Sheets/Avago%20PDFs/ADNS-5050.pdf
There are 2 ways to exit power down, either assert low NRESET pin or by writing 0x5a to Register 0x3a. A full reset will thus be executed.
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.
You missed the most important part of that paragraph:
Any register settings must then be reloaded.
So yeah, it sounds like a re-init would be appropriate in this case.
I would say pull out the register init into a separate function, but this sensor doesn't run i2c/spi/uart init, so should be fine, as is, I think.
65e1449 to
f352404
Compare
* Add ability to poweroff ADNS5050 sensor * ploopyco/trackball_nano: Poweroff ADNS5050 on suspend
* Add ability to poweroff ADNS5050 sensor * ploopyco/trackball_nano: Poweroff ADNS5050 on suspend
* Add ability to poweroff ADNS5050 sensor * ploopyco/trackball_nano: Poweroff ADNS5050 on suspend
* Add ability to poweroff ADNS5050 sensor * ploopyco/trackball_nano: Poweroff ADNS5050 on suspend
* Add ability to poweroff ADNS5050 sensor * ploopyco/trackball_nano: Poweroff ADNS5050 on suspend
* Add ability to poweroff ADNS5050 sensor * ploopyco/trackball_nano: Poweroff ADNS5050 on suspend
* Add ability to poweroff ADNS5050 sensor * ploopyco/trackball_nano: Poweroff ADNS5050 on suspend
* Add ability to poweroff ADNS5050 sensor * ploopyco/trackball_nano: Poweroff ADNS5050 on suspend
* Add ability to poweroff ADNS5050 sensor * ploopyco/trackball_nano: Poweroff ADNS5050 on suspend
* Add ability to poweroff ADNS5050 sensor * ploopyco/trackball_nano: Poweroff ADNS5050 on suspend
* Add ability to poweroff ADNS5050 sensor * ploopyco/trackball_nano: Poweroff ADNS5050 on suspend
* Add ability to poweroff ADNS5050 sensor * ploopyco/trackball_nano: Poweroff ADNS5050 on suspend
* Add ability to poweroff ADNS5050 sensor * ploopyco/trackball_nano: Poweroff ADNS5050 on suspend
* Add ability to poweroff ADNS5050 sensor * ploopyco/trackball_nano: Poweroff ADNS5050 on suspend
* Add ability to poweroff ADNS5050 sensor * ploopyco/trackball_nano: Poweroff ADNS5050 on suspend
* Add ability to poweroff ADNS5050 sensor * ploopyco/trackball_nano: Poweroff ADNS5050 on suspend
* Add ability to poweroff ADNS5050 sensor * ploopyco/trackball_nano: Poweroff ADNS5050 on suspend
* Add ability to poweroff ADNS5050 sensor * ploopyco/trackball_nano: Poweroff ADNS5050 on suspend
* Add ability to poweroff ADNS5050 sensor * ploopyco/trackball_nano: Poweroff ADNS5050 on suspend
* Add ability to poweroff ADNS5050 sensor * ploopyco/trackball_nano: Poweroff ADNS5050 on suspend
This adds the ability to poweroff the ADNS5050 sensor and set this to happen on
suspend_power_down_userfor the ploopy nano.As the LED on the trackball points up it can be a little annoying when the computer is suspended/off.
I'm on the fence as to whether this should be the default for the ploopy as it would stop the trackball from being used to wake the computer.
Types of Changes
Checklist