#include <linux/build_bug.h>
#include <linux/completion.h>
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/irq.h>
#include <linux/jiffies.h>
#include <linux/mfd/cs42l43.h>
#include <linux/mfd/cs42l43-regs.h>
#include <linux/mutex.h>
#include <linux/pm_runtime.h>
#include <linux/property.h>
#include <linux/regmap.h>
#include <linux/time.h>
#include <linux/workqueue.h>
#include <sound/control.h>
#include <sound/jack.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc-component.h>
#include <sound/soc-jack.h>
#include <sound/soc.h>
#include "cs42l43.h"
static const unsigned int cs42l43_accdet_us[] = …;
static const unsigned int cs42l43_accdet_db_ms[] = …;
static const unsigned int cs42l43_accdet_ramp_ms[] = …;
static const unsigned int cs42l43_accdet_bias_sense[] = …;
static int cs42l43_find_index(struct cs42l43_codec *priv, const char * const prop,
unsigned int defval, unsigned int *val,
const unsigned int *values, const int nvalues)
{ … }
int cs42l43_set_jack(struct snd_soc_component *component,
struct snd_soc_jack *jack, void *d)
{ … }
static void cs42l43_start_hs_bias(struct cs42l43_codec *priv, bool type_detect)
{ … }
static void cs42l43_stop_hs_bias(struct cs42l43_codec *priv)
{ … }
irqreturn_t cs42l43_bias_detect_clamp(int irq, void *data)
{ … }
#define CS42L43_JACK_PRESENT …
#define CS42L43_JACK_ABSENT …
#define CS42L43_JACK_OPTICAL …
#define CS42L43_JACK_HEADPHONE …
#define CS42L43_JACK_HEADSET …
#define CS42L43_JACK_LINEOUT …
#define CS42L43_JACK_LINEIN …
#define CS42L43_JACK_EXTENSION …
#define CS42L43_JACK_BUTTONS …
static inline bool cs42l43_jack_present(struct cs42l43_codec *priv)
{ … }
static void cs42l43_start_button_detect(struct cs42l43_codec *priv)
{ … }
static void cs42l43_stop_button_detect(struct cs42l43_codec *priv)
{ … }
#define CS42L43_BUTTON_COMB_MAX …
#define CS42L43_BUTTON_ROUT …
void cs42l43_button_press_work(struct work_struct *work)
{ … }
irqreturn_t cs42l43_button_press(int irq, void *data)
{ … }
void cs42l43_button_release_work(struct work_struct *work)
{ … }
irqreturn_t cs42l43_button_release(int irq, void *data)
{ … }
void cs42l43_bias_sense_timeout(struct work_struct *work)
{ … }
static void cs42l43_start_load_detect(struct cs42l43_codec *priv)
{ … }
static void cs42l43_stop_load_detect(struct cs42l43_codec *priv)
{ … }
static int cs42l43_run_load_detect(struct cs42l43_codec *priv, bool mic)
{ … }
static int cs42l43_run_type_detect(struct cs42l43_codec *priv)
{ … }
static void cs42l43_clear_jack(struct cs42l43_codec *priv)
{ … }
void cs42l43_tip_sense_work(struct work_struct *work)
{ … }
irqreturn_t cs42l43_tip_sense(int irq, void *data)
{ … }
enum cs42l43_raw_jack { … };
#define CS42L43_JACK_3_POLE_SWITCHES …
static const struct cs42l43_jack_override_mode { … } cs42l43_jack_override_modes[] = …;
static const char * const cs42l43_jack_text[] = …;
static_assert(…);
SOC_ENUM_SINGLE_VIRT_DECL(cs42l43_jack_enum, cs42l43_jack_text);
int cs42l43_jack_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
int cs42l43_jack_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }