Input device must be allocated (but not necessarily registered) before
requesting IRQs, otherwise there is a chance that IRQ handler fires and
tries to reference not yet allocated input device.
Also it makes sense to store relative IRQ numbers in max8925_onkey_info
structure as they are needed in suspend/resume which we expect to be
called more often than probe and remove.
Acked-by: Haojian Zhuang <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Implement suspend and resume methods to set up devices as wakeup source.
Signed-off-by: Kevin Liu <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Commit 940ab88962 introduced a new macro to
save some platform_driver boilerplate code. Use it.
Signed-off-by: JJ Ding <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Remove original 3-second ONKEY event. Detect ONKEY changing event directly.
So both UP and DOWN event of ONKEY in max8925 are monitered.
Signed-off-by: Haojian Zhuang <[email protected]>
Cc: Dmitry Torokhov <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
When ONKEY is held for 3 seconds, KEY_POWER event is reported.
Signed-off-by: Haojian Zhuang <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>