diff options
author | Hans de Goede <hdegoede@redhat.com> | 2021-03-07 16:18:01 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-03-24 19:50:14 +0000 |
commit | bcda8cc4b868782c1a39d722d24f7d2598978389 (patch) | |
tree | a3522ae03f63495c1f97c9133360ee927d0a3658 /sound/soc/codecs/arizona.h | |
parent | f89c0a87b4066fbb0dc6f8039b211bd79a9ab663 (diff) |
ASoC: arizona-jack: Move jack-detect variables to struct arizona_priv
Move all the jack-detect variables from struct arizona_extcon_info to
struct arizona_priv.
This is part of a patch series converting the arizona extcon driver into
a helper library for letting the arizona codec-drivers directly report jack
state through the standard sound/soc/soc-jack.c functions.
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Tested-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210307151807.35201-8-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/arizona.h')
-rw-r--r-- | sound/soc/codecs/arizona.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/sound/soc/codecs/arizona.h b/sound/soc/codecs/arizona.h index b3abbe80f11d..fdd19dd9896d 100644 --- a/sound/soc/codecs/arizona.h +++ b/sound/soc/codecs/arizona.h @@ -91,6 +91,42 @@ struct arizona_priv { unsigned int dvfs_reqs; struct mutex dvfs_lock; bool dvfs_cached; + + /* Variables used by arizona-jack.c code */ + struct device *dev; + struct mutex lock; + struct delayed_work hpdet_work; + struct delayed_work micd_detect_work; + struct delayed_work micd_timeout_work; + struct regulator *micvdd; + struct input_dev *input; + struct extcon_dev *edev; + struct gpio_desc *micd_pol_gpio; + + u16 last_jackdet; + + int micd_mode; + const struct arizona_micd_config *micd_modes; + int micd_num_modes; + + const struct arizona_micd_range *micd_ranges; + int num_micd_ranges; + + bool micd_reva; + bool micd_clamp; + + bool hpdet_active; + bool hpdet_done; + bool hpdet_retried; + + bool mic; + bool detecting; + + int num_hpdet_res; + unsigned int hpdet_res[3]; + + int jack_flips; + int hpdet_ip_version; }; struct arizona_voice_trigger_info { |