diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-11-22 12:02:09 +0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-12-03 11:34:09 +0400 |
commit | 78b76dbec8da6437e30519e6bbe4fb44d798addf (patch) | |
tree | adf8c7b4d0b37593645dd2c8faa9d856c13c9145 /sound/soc/codecs/wm8994.h | |
parent | f02b0de0f0925ea6dd1c5eee0a9e7748e38af4e6 (diff) | |
download | linux-78b76dbec8da6437e30519e6bbe4fb44d798addf.tar.xz |
ASoC: wm8994: Simplify button detection code
Currently the WM8994 driver allows the WM8958 microphone detection code to
be replaced in its entirety, providing a default implementation. This
doesn't actually reflect the needs of users well. They generally wish to
replace only the accessory identification parts of the algorithm (eg,
using an external GPIO to provide the equivalent of the JACKDET support in
the WM1811A).
In preparation for supporting these users better refactor the existing code
so that we have separate identification and button detection callbacks,
selecting between them rather than using the mic_detecting flag in the
existing callback. This also simplifies the code by introducing a more
explicit state machine for the detecting and button states.
In anticipation of future refactoring the callback is left in the signature
for wm8958_mic_detect(), it will be removed at a later stage.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm8994.h')
-rw-r--r-- | sound/soc/codecs/wm8994.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/sound/soc/codecs/wm8994.h b/sound/soc/codecs/wm8994.h index f618d16e1a12..f5546f242ab1 100644 --- a/sound/soc/codecs/wm8994.h +++ b/sound/soc/codecs/wm8994.h @@ -137,8 +137,6 @@ struct wm8994_priv { int jackdet_mode; struct delayed_work jackdet_bootstrap; - wm8958_micdet_cb jack_cb; - void *jack_cb_data; int micdet_irq; int revision; |