linux/include/linux/mfd/wm8994/core.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * include/linux/mfd/wm8994/core.h -- Core interface for WM8994
 *
 * Copyright 2009 Wolfson Microelectronics PLC.
 *
 * Author: Mark Brown <[email protected]>
 */

#ifndef __MFD_WM8994_CORE_H__
#define __MFD_WM8994_CORE_H__

#include <linux/mutex.h>
#include <linux/interrupt.h>
#include <linux/regmap.h>

#include <linux/mfd/wm8994/pdata.h>

enum wm8994_type {};

struct regulator_dev;
struct regulator_bulk_data;
struct irq_domain;

#define WM8994_NUM_GPIO_REGS
#define WM8994_NUM_LDO_REGS
#define WM8994_NUM_IRQ_REGS

#define WM8994_IRQ_TEMP_SHUT
#define WM8994_IRQ_MIC1_DET
#define WM8994_IRQ_MIC1_SHRT
#define WM8994_IRQ_MIC2_DET
#define WM8994_IRQ_MIC2_SHRT
#define WM8994_IRQ_FLL1_LOCK
#define WM8994_IRQ_FLL2_LOCK
#define WM8994_IRQ_SRC1_LOCK
#define WM8994_IRQ_SRC2_LOCK
#define WM8994_IRQ_AIF1DRC1_SIG_DET
#define WM8994_IRQ_AIF1DRC2_SIG_DET
#define WM8994_IRQ_AIF2DRC_SIG_DET
#define WM8994_IRQ_FIFOS_ERR
#define WM8994_IRQ_WSEQ_DONE
#define WM8994_IRQ_DCS_DONE
#define WM8994_IRQ_TEMP_WARN

/* GPIOs in the chip are numbered from 1-11 */
#define WM8994_IRQ_GPIO(x)

struct wm8994 {};

/* Device I/O API */

static inline int wm8994_reg_read(struct wm8994 *wm8994, unsigned short reg)
{}

static inline int wm8994_reg_write(struct wm8994 *wm8994, unsigned short reg,
				   unsigned short val)
{}

static inline int wm8994_bulk_read(struct wm8994 *wm8994, unsigned short reg,
				   int count, u16 *buf)
{}

static inline int wm8994_bulk_write(struct wm8994 *wm8994, unsigned short reg,
				    int count, const u16 *buf)
{}

static inline int wm8994_set_bits(struct wm8994 *wm8994, unsigned short reg,
		    unsigned short mask, unsigned short val)
{}

/* Helper to save on boilerplate */
static inline int wm8994_request_irq(struct wm8994 *wm8994, int irq,
				     irq_handler_t handler, const char *name,
				     void *data)
{}
static inline void wm8994_free_irq(struct wm8994 *wm8994, int irq, void *data)
{}

int wm8994_irq_init(struct wm8994 *wm8994);
void wm8994_irq_exit(struct wm8994 *wm8994);

#endif