linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frank Praznik <frank.praznik@gmail.com>
To: linux-input@vger.kernel.org
Cc: jkosina@suse.cz, ao2@ao2.it, Frank Praznik <frank.praznik@gmail.com>
Subject: [PATCH v2 0/2] hid: sony: Clear and restore controller state on suspend and resume
Date: Wed, 11 Nov 2015 09:49:36 -0500	[thread overview]
Message-ID: <1447253378-13939-1-git-send-email-frank.praznik@gmail.com> (raw)

On systems with standby power for charging devices the LEDs and rumble on the
controller can continue to function even when the system is in standby since
the state is not cleared when the system goes to sleep.

The state on wakeup can also differ from the state when the system entered
standby as the LEDs can be cleared when the device is reset on wakeup.

The first patch refactors the output report functions to allow sending an
output report without going through the work queue.  This is necessary when
clearing the state of the controller before the system is goes into standby
since the work might not be executed before the system goes to sleep.

The second patch implements the suspend and resume callbacks which serializes
and clears the LEDs on suspend and restores them on resume.

Force-feedback is cleared on suspend but the state is not restored on resume
since it can potentially result in hardware damage if the device is unattended
when the system wakes.  A new event will be required to resume force-feedback.


             reply	other threads:[~2015-11-11 14:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-11 14:49 Frank Praznik [this message]
2015-11-11 14:49 ` [PATCH v2 1/2] hid: sony: Refactor the output report sending functions Frank Praznik
2015-11-11 14:49 ` [PATCH v2 2/2] hid: sony: Save and restore the controller state on suspend and resume Frank Praznik
2015-11-15 15:30 ` [PATCH v2 0/2] hid: sony: Clear and restore " Antonio Ospite
2015-11-17 13:57   ` Frank Praznik
2015-11-19 10:39     ` Antonio Ospite
2015-11-19 10:51       ` Antonio Ospite
2015-11-19 10:17 ` Jiri Kosina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1447253378-13939-1-git-send-email-frank.praznik@gmail.com \
    --to=frank.praznik@gmail.com \
    --cc=ao2@ao2.it \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).