Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * cs42l42.h -- CS42L42 ALSA SoC audio driver header
0004  *
0005  * Copyright 2016-2022 Cirrus Logic, Inc.
0006  *
0007  * Author: James Schulman <james.schulman@cirrus.com>
0008  * Author: Brian Austin <brian.austin@cirrus.com>
0009  * Author: Michael White <michael.white@cirrus.com>
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 /* __CS42L42_H__ */