0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef __CS42L42_H__
0013 #define __CS42L42_H__
0014
0015 #include <linux/mutex.h>
0016 #include <sound/jack.h>
0017 #include <sound/cs42l42.h>
0018
0019 static const char *const cs42l42_supply_names[CS42L42_NUM_SUPPLIES] = {
0020 "VA",
0021 "VP",
0022 "VCP",
0023 "VD_FILT",
0024 "VL",
0025 };
0026
0027 struct cs42l42_private {
0028 struct regmap *regmap;
0029 struct device *dev;
0030 struct regulator_bulk_data supplies[CS42L42_NUM_SUPPLIES];
0031 struct gpio_desc *reset_gpio;
0032 struct completion pdn_done;
0033 struct snd_soc_jack *jack;
0034 struct mutex irq_lock;
0035 int pll_config;
0036 int bclk;
0037 u32 sclk;
0038 u32 srate;
0039 u8 plug_state;
0040 u8 hs_type;
0041 u8 ts_inv;
0042 u8 ts_dbnc_rise;
0043 u8 ts_dbnc_fall;
0044 u8 btn_det_init_dbnce;
0045 u8 btn_det_event_dbnce;
0046 u8 bias_thresholds[CS42L42_NUM_BIASES];
0047 u8 hs_bias_ramp_rate;
0048 u8 hs_bias_ramp_time;
0049 u8 hs_bias_sense_en;
0050 u8 stream_use;
0051 bool hp_adc_up_pending;
0052 bool suspended;
0053 };
0054
0055 #endif