linux/include/linux/mfd/madera/core.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * MFD internals for Cirrus Logic Madera codecs
 *
 * Copyright (C) 2015-2018 Cirrus Logic
 */

#ifndef MADERA_CORE_H
#define MADERA_CORE_H

#include <linux/clk.h>
#include <linux/gpio/consumer.h>
#include <linux/interrupt.h>
#include <linux/mfd/madera/pdata.h>
#include <linux/mutex.h>
#include <linux/notifier.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>

enum madera_type {};

enum {};

#define MADERA_MAX_CORE_SUPPLIES
#define MADERA_MAX_GPIOS

#define CS47L15_NUM_GPIOS
#define CS47L35_NUM_GPIOS
#define CS47L85_NUM_GPIOS
#define CS47L90_NUM_GPIOS
#define CS47L92_NUM_GPIOS

#define MADERA_MAX_MICBIAS

#define MADERA_MAX_HP_OUTPUT

/* Notifier events */
#define MADERA_NOTIFY_VOICE_TRIGGER
#define MADERA_NOTIFY_HPDET
#define MADERA_NOTIFY_MICDET

/* GPIO Function Definitions */
#define MADERA_GP_FN_ALTERNATE
#define MADERA_GP_FN_GPIO
#define MADERA_GP_FN_DSP_GPIO
#define MADERA_GP_FN_IRQ1
#define MADERA_GP_FN_IRQ2
#define MADERA_GP_FN_FLL1_CLOCK
#define MADERA_GP_FN_FLL2_CLOCK
#define MADERA_GP_FN_FLL3_CLOCK
#define MADERA_GP_FN_FLLAO_CLOCK
#define MADERA_GP_FN_FLL1_LOCK
#define MADERA_GP_FN_FLL2_LOCK
#define MADERA_GP_FN_FLL3_LOCK
#define MADERA_GP_FN_FLLAO_LOCK
#define MADERA_GP_FN_OPCLK_OUT
#define MADERA_GP_FN_OPCLK_ASYNC_OUT
#define MADERA_GP_FN_PWM1
#define MADERA_GP_FN_PWM2
#define MADERA_GP_FN_SPDIF_OUT
#define MADERA_GP_FN_HEADPHONE_DET
#define MADERA_GP_FN_MIC_DET
#define MADERA_GP_FN_DRC1_SIGNAL_DETECT
#define MADERA_GP_FN_DRC2_SIGNAL_DETECT
#define MADERA_GP_FN_ASRC1_IN1_LOCK
#define MADERA_GP_FN_ASRC1_IN2_LOCK
#define MADERA_GP_FN_ASRC2_IN1_LOCK
#define MADERA_GP_FN_ASRC2_IN2_LOCK
#define MADERA_GP_FN_DSP_IRQ1
#define MADERA_GP_FN_DSP_IRQ2
#define MADERA_GP_FN_DSP_IRQ3
#define MADERA_GP_FN_DSP_IRQ4
#define MADERA_GP_FN_DSP_IRQ5
#define MADERA_GP_FN_DSP_IRQ6
#define MADERA_GP_FN_DSP_IRQ7
#define MADERA_GP_FN_DSP_IRQ8
#define MADERA_GP_FN_DSP_IRQ9
#define MADERA_GP_FN_DSP_IRQ10
#define MADERA_GP_FN_DSP_IRQ11
#define MADERA_GP_FN_DSP_IRQ12
#define MADERA_GP_FN_DSP_IRQ13
#define MADERA_GP_FN_DSP_IRQ14
#define MADERA_GP_FN_DSP_IRQ15
#define MADERA_GP_FN_DSP_IRQ16
#define MADERA_GP_FN_HPOUT1L_SC
#define MADERA_GP_FN_HPOUT1R_SC
#define MADERA_GP_FN_HPOUT2L_SC
#define MADERA_GP_FN_HPOUT2R_SC
#define MADERA_GP_FN_HPOUT3L_SC
#define MADERA_GP_FN_HPOUT4R_SC
#define MADERA_GP_FN_SPKOUTL_SC
#define MADERA_GP_FN_SPKOUTR_SC
#define MADERA_GP_FN_HPOUT1L_ENA
#define MADERA_GP_FN_HPOUT1R_ENA
#define MADERA_GP_FN_HPOUT2L_ENA
#define MADERA_GP_FN_HPOUT2R_ENA
#define MADERA_GP_FN_HPOUT3L_ENA
#define MADERA_GP_FN_HPOUT4R_ENA
#define MADERA_GP_FN_SPKOUTL_ENA
#define MADERA_GP_FN_SPKOUTR_ENA
#define MADERA_GP_FN_HPOUT1L_DIS
#define MADERA_GP_FN_HPOUT1R_DIS
#define MADERA_GP_FN_HPOUT2L_DIS
#define MADERA_GP_FN_HPOUT2R_DIS
#define MADERA_GP_FN_HPOUT3L_DIS
#define MADERA_GP_FN_HPOUT4R_DIS
#define MADERA_GP_FN_SPKOUTL_DIS
#define MADERA_GP_FN_SPKOUTR_DIS
#define MADERA_GP_FN_SPK_SHUTDOWN
#define MADERA_GP_FN_SPK_OVH_SHUTDOWN
#define MADERA_GP_FN_SPK_OVH_WARN
#define MADERA_GP_FN_TIMER1_STATUS
#define MADERA_GP_FN_TIMER2_STATUS
#define MADERA_GP_FN_TIMER3_STATUS
#define MADERA_GP_FN_TIMER4_STATUS
#define MADERA_GP_FN_TIMER5_STATUS
#define MADERA_GP_FN_TIMER6_STATUS
#define MADERA_GP_FN_TIMER7_STATUS
#define MADERA_GP_FN_TIMER8_STATUS
#define MADERA_GP_FN_EVENTLOG1_FIFO_STS
#define MADERA_GP_FN_EVENTLOG2_FIFO_STS
#define MADERA_GP_FN_EVENTLOG3_FIFO_STS
#define MADERA_GP_FN_EVENTLOG4_FIFO_STS
#define MADERA_GP_FN_EVENTLOG5_FIFO_STS
#define MADERA_GP_FN_EVENTLOG6_FIFO_STS
#define MADERA_GP_FN_EVENTLOG7_FIFO_STS
#define MADERA_GP_FN_EVENTLOG8_FIFO_STS

struct snd_soc_dapm_context;

/*
 * struct madera - internal data shared by the set of Madera drivers
 *
 * This should not be used by anything except child drivers of the Madera MFD
 *
 * @regmap:		pointer to the regmap instance for 16-bit registers
 * @regmap_32bit:	pointer to the regmap instance for 32-bit registers
 * @dev:		pointer to the MFD device
 * @type:		type of codec
 * @rev:		silicon revision
 * @type_name:		display name of this codec
 * @num_core_supplies:	number of core supply regulators
 * @core_supplies:	list of core supplies that are always required
 * @dcvdd:		pointer to DCVDD regulator
 * @internal_dcvdd:	true if DCVDD is supplied from the internal LDO1
 * @pdata:		our pdata
 * @irq_dev:		the irqchip child driver device
 * @irq_data:		pointer to irqchip data for the child irqchip driver
 * @irq:		host irq number from SPI or I2C configuration
 * @mclk:		Structure holding clock supplies
 * @out_clamp:		indicates output clamp state for each analogue output
 * @out_shorted:	indicates short circuit state for each analogue output
 * @hp_ena:		bitflags of enable state for the headphone outputs
 * @num_micbias:	number of MICBIAS outputs
 * @num_childbias:	number of child biases for each MICBIAS
 * @dapm:		pointer to codec driver DAPM context
 * @notifier:		notifier for signalling events to ASoC machine driver
 */
struct madera {};
#endif