]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: rt5514-spi: only enable wakeup when fully initialized
authorBrian Norris <briannorris@chromium.org>
Sat, 16 Dec 2017 04:07:23 +0000 (20:07 -0800)
committerMark Brown <broonie@kernel.org>
Tue, 19 Dec 2017 11:08:03 +0000 (11:08 +0000)
commit2282a7d38f3ac9c9e7ace4f1b41ab32fdf2f8de2
tree7a05788bd86e923bdf26a28dfa2ffe812769ca86
parent2a5bdcb4c2b3dd26336a4d42c0a8ac4e562e9c4b
ASoC: rt5514-spi: only enable wakeup when fully initialized

If an rt5514-spi device is probed but the platform hasn't linked it in,
we might never fully request the SPI IRQ, nor configure the rt5514 DSP,
but we still might try to enable the SPI IRQ (enable_irq_wake()). This
is bad, and among other things, can cause the interrupt to trigger every
time we try to suspend the system (e.g., because the interrupt trigger
setting was never set properly).

Instead of setting our wakeup capabilities in the SPI driver probe
routine, let's wait until we've actually requested the IRQ.

Fixes issues seen on the "kevin" Chromebook (Samsung Chromebook Plus).

Fixes: 3ba1429aa23d ("ASoC: rt5514: Voice wakeup support.")
Signed-off-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt5514-spi.c