Android 14.0.0 release 0.52
cs40l26: haptics IC reset recovery

Detection:
1. Check effects_in_flight count for vibe_state hang issue. (Trigger
   reset at cs40l26_resume since cs40l26_suspend might have issue
   during the controller bus off or system powering off sequence.)
2. Check I2C errors at the end of functions cs40l26_set_gain_worker,
   cs40l26_vibe_start_worker, cs40l26_vibe_stop_worker,
   cs40l26_upload_effect, cs40l26_erase_effect and cs40l26_resume.

Reset sequence:
Toggle hardware reset pin, reload the current firmware, reset the
state flag and counter, and update vibe_state driver attribute.

Reset cooldown period:
Pause further reset recovery if reset is conducted for 10 times in 5
minutes. Resume reset recovery after 5 minutes.

Bug: 299023920
Bug: 281146462
Test: Vibe_state can be recovered.
Change-Id: I3aaf8191932cfd5ca0fd5f8eee88adb5ffd21527
Signed-off-by: Tai Kuo <taikuo@google.com>
(cherry picked from commit 5c931c62a0861c25ae4f79e4d4b91abc036f2895)
4 files changed
tree: 43e0a24d5763da1e46bb0605f28b1c321bef57c8
  1. audiometrics/
  2. cs35l41/
  3. cs35l45/
  4. cs40l25/
  5. cs40l26/
  6. Documentation/
  7. drv2624/