sound/soc/codecs/mt6359-accdet.h
Source file repositories/reference/linux-study-clean/sound/soc/codecs/mt6359-accdet.h
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/codecs/mt6359-accdet.h- Extension
.h- Size
- 3040 bytes
- Lines
- 138
- Domain
- Driver Families
- Bucket
- sound/soc
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/ctype.hlinux/string.h
Detected Declarations
struct three_key_thresholdstruct four_key_thresholdstruct pwm_deb_settingsstruct dts_datastruct mt6359_accdetenum eint_moisture_statusfunction mt6359_accdet_enable_jack_detect
Annotated Snippet
struct three_key_threshold {
unsigned int mid;
unsigned int up;
unsigned int down;
};
struct four_key_threshold {
unsigned int mid;
unsigned int voice;
unsigned int up;
unsigned int down;
};
struct pwm_deb_settings {
unsigned int pwm_width;
unsigned int pwm_thresh;
unsigned int fall_delay;
unsigned int rise_delay;
unsigned int debounce0;
unsigned int debounce1;
unsigned int debounce3;
unsigned int debounce4;
unsigned int eint_pwm_width;
unsigned int eint_pwm_thresh;
unsigned int eint_debounce0;
unsigned int eint_debounce1;
unsigned int eint_debounce2;
unsigned int eint_debounce3;
unsigned int eint_inverter_debounce;
};
struct dts_data {
unsigned int mic_vol;
unsigned int mic_mode;
unsigned int plugout_deb;
unsigned int eint_pol;
struct pwm_deb_settings *pwm_deb;
struct three_key_threshold three_key;
struct four_key_threshold four_key;
unsigned int moisture_detect_enable;
unsigned int eint_detect_mode;
unsigned int eint_use_ext_res;
unsigned int eint_comp_vth;
unsigned int moisture_detect_mode;
unsigned int moisture_comp_vth;
unsigned int moisture_comp_vref2;
unsigned int moisture_use_ext_res;
};
struct mt6359_accdet {
struct snd_soc_jack *jack;
struct device *dev;
struct regmap *regmap;
struct dts_data *data;
unsigned int caps;
int accdet_irq;
int accdet_eint0;
int accdet_eint1;
struct mutex res_lock; /* lock protection */
bool jack_plugged;
unsigned int jack_type;
unsigned int btn_type;
unsigned int accdet_status;
unsigned int pre_accdet_status;
unsigned int cali_voltage;
unsigned int jd_sts;
struct work_struct accdet_work;
struct workqueue_struct *accdet_workqueue;
struct work_struct jd_work;
struct workqueue_struct *jd_workqueue;
};
#if IS_ENABLED(CONFIG_SND_SOC_MT6359_ACCDET)
int mt6359_accdet_enable_jack_detect(struct snd_soc_component *component,
struct snd_soc_jack *jack);
#else
static inline int
mt6359_accdet_enable_jack_detect(struct snd_soc_component *component,
struct snd_soc_jack *jack)
{
return -EOPNOTSUPP;
}
#endif
#endif
Annotation
- Immediate include surface: `linux/ctype.h`, `linux/string.h`.
- Detected declarations: `struct three_key_threshold`, `struct four_key_threshold`, `struct pwm_deb_settings`, `struct dts_data`, `struct mt6359_accdet`, `enum eint_moisture_status`, `function mt6359_accdet_enable_jack_detect`.
- Atlas domain: Driver Families / sound/soc.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.