1 /* SPDX-License-Identifier: GPL-2.0
3 * CS35L41 ALSA HDA audio driver
5 * Copyright 2021 Cirrus Logic, Inc.
7 * Author: Lucas Tanure <tanureal@opensource.cirrus.com>
10 #ifndef __CS35L41_HDA_H__
11 #define __CS35L41_HDA_H__
13 #include <linux/regulator/consumer.h>
14 #include <linux/gpio/consumer.h>
15 #include <linux/device.h>
16 #include <sound/cs35l41.h>
18 enum cs35l41_hda_spk_pos {
23 enum cs35l41_hda_gpio_function {
30 struct cs35l41_hda_reg_sequence {
31 const struct reg_sequence *probe;
32 unsigned int num_probe;
33 const struct reg_sequence *open;
34 unsigned int num_open;
35 const struct reg_sequence *prepare;
36 unsigned int num_prepare;
37 const struct reg_sequence *cleanup;
38 unsigned int num_cleanup;
39 const struct reg_sequence *close;
40 unsigned int num_close;
43 struct cs35l41_hda_hw_config {
45 unsigned int gpio1_func;
46 unsigned int gpio2_func;
54 struct regmap *regmap;
55 struct gpio_desc *reset_gpio;
56 const struct cs35l41_hda_reg_sequence *reg_seq;
61 /* Don't put the AMP in reset of VSPK can not be turned off */
65 int cs35l41_hda_probe(struct device *dev, const char *device_name, int id, int irq,
66 struct regmap *regmap);
67 void cs35l41_hda_remove(struct device *dev);
69 #endif /*__CS35L41_HDA_H__*/