lkml.org 
[lkml]   [2023]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectmtk-pmic-keys: Ignore power button if pressed before driver loads
Hi all,

The power button on my Bananapi BPI-R2 (MT7623NI SoC, mt6323-keys) is
shorted, so the device automatically boots when there's power. This
causes the device to reboot when KEYBOARD_MTK_PMIC is loaded because the
driver sees the power button being pressed.

I was wondering if it's possible to change the driver in a way that
doesn't break in this situation. Maybe don't do anything if the first
state of the the power button the driver sees is being pressed, and if
the state doesn't change.

To address an edge case, if the power button was being pressed before
the driver loads, look for if it's ever released. Only after then start
working as usual.

Looking forward to hearing your thoughts.
Arınç

\
 
 \ /
  Last update: 2023-03-27 00:01    [W:0.073 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site