cs35l41_hda.h (995B)
1/* SPDX-License-Identifier: GPL-2.0 2 * 3 * CS35L41 ALSA HDA audio driver 4 * 5 * Copyright 2021 Cirrus Logic, Inc. 6 * 7 * Author: Lucas Tanure <tanureal@opensource.cirrus.com> 8 */ 9 10#ifndef __CS35L41_HDA_H__ 11#define __CS35L41_HDA_H__ 12 13#include <linux/regulator/consumer.h> 14#include <linux/gpio/consumer.h> 15#include <linux/device.h> 16#include <sound/cs35l41.h> 17 18enum cs35l41_hda_spk_pos { 19 CS35l41_LEFT, 20 CS35l41_RIGHT, 21}; 22 23enum cs35l41_hda_gpio_function { 24 CS35L41_NOT_USED, 25 CS35l41_VSPK_SWITCH, 26 CS35L41_INTERRUPT, 27 CS35l41_SYNC, 28}; 29 30struct cs35l41_hda { 31 struct device *dev; 32 struct regmap *regmap; 33 struct gpio_desc *reset_gpio; 34 struct cs35l41_hw_cfg hw_cfg; 35 36 int irq; 37 int index; 38 int channel_index; 39 unsigned volatile long irq_errors; 40 const char *amp_name; 41 struct regmap_irq_chip_data *irq_data; 42}; 43 44int cs35l41_hda_probe(struct device *dev, const char *device_name, int id, int irq, 45 struct regmap *regmap); 46void cs35l41_hda_remove(struct device *dev); 47 48#endif /*__CS35L41_HDA_H__*/