~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/sound/soc/codecs/cs42l42.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-only */
  2 /*
  3  * cs42l42.h -- CS42L42 ALSA SoC audio driver header
  4  *
  5  * Copyright 2016-2022 Cirrus Logic, Inc.
  6  *
  7  * Author: James Schulman <james.schulman@cirrus.com>
  8  * Author: Brian Austin <brian.austin@cirrus.com>
  9  * Author: Michael White <michael.white@cirrus.com>
 10  */
 11 
 12 #ifndef __CS42L42_H__
 13 #define __CS42L42_H__
 14 
 15 #include <dt-bindings/sound/cs42l42.h>
 16 #include <linux/device.h>
 17 #include <linux/gpio/consumer.h>
 18 #include <linux/mutex.h>
 19 #include <linux/regmap.h>
 20 #include <linux/regulator/consumer.h>
 21 #include <linux/soundwire/sdw.h>
 22 #include <sound/jack.h>
 23 #include <sound/cs42l42.h>
 24 #include <sound/soc-component.h>
 25 #include <sound/soc-dai.h>
 26 
 27 struct  cs42l42_private {
 28         struct regmap *regmap;
 29         struct device *dev;
 30         struct regulator_bulk_data supplies[CS42L42_NUM_SUPPLIES];
 31         struct gpio_desc *reset_gpio;
 32         struct completion pdn_done;
 33         struct snd_soc_jack *jack;
 34         struct sdw_slave *sdw_peripheral;
 35         struct mutex irq_lock;
 36         int devid;
 37         int irq;
 38         int pll_config;
 39         u32 sclk;
 40         u32 sample_rate;
 41         u32 bclk_ratio;
 42         u8 plug_state;
 43         u8 hs_type;
 44         u8 ts_inv;
 45         u8 ts_dbnc_rise;
 46         u8 ts_dbnc_fall;
 47         u8 btn_det_init_dbnce;
 48         u8 btn_det_event_dbnce;
 49         u8 bias_thresholds[CS42L42_NUM_BIASES];
 50         u8 hs_bias_ramp_rate;
 51         u8 hs_bias_ramp_time;
 52         u8 hs_bias_sense_en;
 53         u8 stream_use;
 54         bool hp_adc_up_pending;
 55         bool suspended;
 56         bool sdw_waiting_first_unattach;
 57         bool init_done;
 58 };
 59 
 60 extern const struct regmap_range_cfg cs42l42_page_range;
 61 extern const struct regmap_config cs42l42_regmap;
 62 extern const struct snd_soc_component_driver cs42l42_soc_component;
 63 extern struct snd_soc_dai_driver cs42l42_dai;
 64 
 65 bool cs42l42_readable_register(struct device *dev, unsigned int reg);
 66 bool cs42l42_volatile_register(struct device *dev, unsigned int reg);
 67 
 68 int cs42l42_pll_config(struct snd_soc_component *component,
 69                        unsigned int clk, unsigned int sample_rate);
 70 void cs42l42_src_config(struct snd_soc_component *component, unsigned int sample_rate);
 71 int cs42l42_mute_stream(struct snd_soc_dai *dai, int mute, int stream);
 72 irqreturn_t cs42l42_irq_thread(int irq, void *data);
 73 int cs42l42_suspend(struct device *dev);
 74 int cs42l42_resume(struct device *dev);
 75 void cs42l42_resume_restore(struct device *dev);
 76 int cs42l42_common_probe(struct cs42l42_private *cs42l42,
 77                          const struct snd_soc_component_driver *component_drv,
 78                          struct snd_soc_dai_driver *dai);
 79 int cs42l42_init(struct cs42l42_private *cs42l42);
 80 void cs42l42_common_remove(struct cs42l42_private *cs42l42);
 81 
 82 #endif /* __CS42L42_H__ */
 83 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php