mfd: cros_ec: Move EC interrupt to cros_ec_keyb
authorAndrew Bresticker <abrestic@chromium.org>
Wed, 18 Jun 2014 18:14:07 +0000 (11:14 -0700)
committerLee Jones <lee.jones@linaro.org>
Wed, 9 Jul 2014 13:58:20 +0000 (14:58 +0100)
commitd1fd345e2087f0362c92bd3b0a1cea7fe636ac3a
tree38c93059a128db984ff4d95ee2c2f35f02275fa6
parent12ebc8a50bc54e3a6fe207861fc6793181f9c2dc
mfd: cros_ec: Move EC interrupt to cros_ec_keyb

If we receive EC interrupts after the cros_ec driver has probed, but
before the cros_ec_keyb driver has probed, the cros_ec IRQ handler
will not run the cros_ec_keyb notifier and the EC will leave the IRQ
line asserted.  The cros_ec IRQ handler then returns IRQ_HANDLED and
the resulting flood of interrupts causes the machine to hang.

Since the EC interrupt is currently only used for the keyboard, move
the setup and handling of the EC interrupt to the cros_ec_keyb driver.

Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/input/keyboard/cros_ec_keyb.c
drivers/mfd/cros_ec.c
include/linux/mfd/cros_ec.h