linux/include/linux/mfd/arizona/core.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Arizona MFD internals
 *
 * Copyright 2012 Wolfson Microelectronics plc
 *
 * Author: Mark Brown <[email protected]>
 */

#ifndef _WM_ARIZONA_CORE_H
#define _WM_ARIZONA_CORE_H

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

#define ARIZONA_MAX_CORE_SUPPLIES

enum {};

enum arizona_type {};

#define ARIZONA_IRQ_GP1
#define ARIZONA_IRQ_GP2
#define ARIZONA_IRQ_GP3
#define ARIZONA_IRQ_GP4
#define ARIZONA_IRQ_GP5_FALL
#define ARIZONA_IRQ_GP5_RISE
#define ARIZONA_IRQ_JD_FALL
#define ARIZONA_IRQ_JD_RISE
#define ARIZONA_IRQ_DSP1_RAM_RDY
#define ARIZONA_IRQ_DSP2_RAM_RDY
#define ARIZONA_IRQ_DSP3_RAM_RDY
#define ARIZONA_IRQ_DSP4_RAM_RDY
#define ARIZONA_IRQ_DSP_IRQ1
#define ARIZONA_IRQ_DSP_IRQ2
#define ARIZONA_IRQ_DSP_IRQ3
#define ARIZONA_IRQ_DSP_IRQ4
#define ARIZONA_IRQ_DSP_IRQ5
#define ARIZONA_IRQ_DSP_IRQ6
#define ARIZONA_IRQ_DSP_IRQ7
#define ARIZONA_IRQ_DSP_IRQ8
#define ARIZONA_IRQ_SPK_OVERHEAT_WARN
#define ARIZONA_IRQ_SPK_OVERHEAT
#define ARIZONA_IRQ_MICDET
#define ARIZONA_IRQ_HPDET
#define ARIZONA_IRQ_WSEQ_DONE
#define ARIZONA_IRQ_DRC2_SIG_DET
#define ARIZONA_IRQ_DRC1_SIG_DET
#define ARIZONA_IRQ_ASRC2_LOCK
#define ARIZONA_IRQ_ASRC1_LOCK
#define ARIZONA_IRQ_UNDERCLOCKED
#define ARIZONA_IRQ_OVERCLOCKED
#define ARIZONA_IRQ_FLL2_LOCK
#define ARIZONA_IRQ_FLL1_LOCK
#define ARIZONA_IRQ_CLKGEN_ERR
#define ARIZONA_IRQ_CLKGEN_ERR_ASYNC
#define ARIZONA_IRQ_ASRC_CFG_ERR
#define ARIZONA_IRQ_AIF3_ERR
#define ARIZONA_IRQ_AIF2_ERR
#define ARIZONA_IRQ_AIF1_ERR
#define ARIZONA_IRQ_CTRLIF_ERR
#define ARIZONA_IRQ_MIXER_DROPPED_SAMPLES
#define ARIZONA_IRQ_ASYNC_CLK_ENA_LOW
#define ARIZONA_IRQ_SYSCLK_ENA_LOW
#define ARIZONA_IRQ_ISRC1_CFG_ERR
#define ARIZONA_IRQ_ISRC2_CFG_ERR
#define ARIZONA_IRQ_BOOT_DONE
#define ARIZONA_IRQ_DCS_DAC_DONE
#define ARIZONA_IRQ_DCS_HP_DONE
#define ARIZONA_IRQ_FLL2_CLOCK_OK
#define ARIZONA_IRQ_FLL1_CLOCK_OK
#define ARIZONA_IRQ_MICD_CLAMP_RISE
#define ARIZONA_IRQ_MICD_CLAMP_FALL
#define ARIZONA_IRQ_HP3R_DONE
#define ARIZONA_IRQ_HP3L_DONE
#define ARIZONA_IRQ_HP2R_DONE
#define ARIZONA_IRQ_HP2L_DONE
#define ARIZONA_IRQ_HP1R_DONE
#define ARIZONA_IRQ_HP1L_DONE
#define ARIZONA_IRQ_ISRC3_CFG_ERR
#define ARIZONA_IRQ_DSP_SHARED_WR_COLL
#define ARIZONA_IRQ_SPK_SHUTDOWN
#define ARIZONA_IRQ_SPK1R_SHORT
#define ARIZONA_IRQ_SPK1L_SHORT
#define ARIZONA_IRQ_HP3R_SC_NEG
#define ARIZONA_IRQ_HP3R_SC_POS
#define ARIZONA_IRQ_HP3L_SC_NEG
#define ARIZONA_IRQ_HP3L_SC_POS
#define ARIZONA_IRQ_HP2R_SC_NEG
#define ARIZONA_IRQ_HP2R_SC_POS
#define ARIZONA_IRQ_HP2L_SC_NEG
#define ARIZONA_IRQ_HP2L_SC_POS
#define ARIZONA_IRQ_HP1R_SC_NEG
#define ARIZONA_IRQ_HP1R_SC_POS
#define ARIZONA_IRQ_HP1L_SC_NEG
#define ARIZONA_IRQ_HP1L_SC_POS

#define ARIZONA_NUM_IRQ

struct snd_soc_dapm_context;

struct arizona {};

static inline int arizona_call_notifiers(struct arizona *arizona,
					 unsigned long event,
					 void *data)
{}

int arizona_clk32k_enable(struct arizona *arizona);
int arizona_clk32k_disable(struct arizona *arizona);

int arizona_request_irq(struct arizona *arizona, int irq, char *name,
			irq_handler_t handler, void *data);
void arizona_free_irq(struct arizona *arizona, int irq, void *data);
int arizona_set_irq_wake(struct arizona *arizona, int irq, int on);

#ifdef CONFIG_MFD_WM5102
int wm5102_patch(struct arizona *arizona);
#else
static inline int wm5102_patch(struct arizona *arizona)
{
	return 0;
}
#endif

int wm5110_patch(struct arizona *arizona);
int cs47l24_patch(struct arizona *arizona);
int wm8997_patch(struct arizona *arizona);
int wm8998_patch(struct arizona *arizona);

#endif