linux/include/linux/mfd/da9150/core.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * DA9150 MFD Driver - Core Data
 *
 * Copyright (c) 2014 Dialog Semiconductor
 *
 * Author: Adam Thomson <[email protected]>
 */

#ifndef __DA9150_CORE_H
#define __DA9150_CORE_H

#include <linux/device.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/regmap.h>

/* I2C address paging */
#define DA9150_REG_PAGE_SHIFT
#define DA9150_REG_PAGE_MASK

/* IRQs */
#define DA9150_NUM_IRQ_REGS
#define DA9150_IRQ_VBUS
#define DA9150_IRQ_CHG
#define DA9150_IRQ_TCLASS
#define DA9150_IRQ_TJUNC
#define DA9150_IRQ_VFAULT
#define DA9150_IRQ_CONF
#define DA9150_IRQ_DAT
#define DA9150_IRQ_DTYPE
#define DA9150_IRQ_ID
#define DA9150_IRQ_ADP
#define DA9150_IRQ_SESS_END
#define DA9150_IRQ_SESS_VLD
#define DA9150_IRQ_FG
#define DA9150_IRQ_GP
#define DA9150_IRQ_TBAT
#define DA9150_IRQ_GPIOA
#define DA9150_IRQ_GPIOB
#define DA9150_IRQ_GPIOC
#define DA9150_IRQ_GPIOD
#define DA9150_IRQ_GPADC
#define DA9150_IRQ_WKUP

/* I2C sub-device address */
#define DA9150_QIF_I2C_ADDR_LSB

struct da9150_fg_pdata {};

struct da9150_pdata {};

struct da9150 {};

/* Device I/O - Query Interface for FG and standard register access */
void da9150_read_qif(struct da9150 *da9150, u8 addr, int count, u8 *buf);
void da9150_write_qif(struct da9150 *da9150, u8 addr, int count, const u8 *buf);

u8 da9150_reg_read(struct da9150 *da9150, u16 reg);
void da9150_reg_write(struct da9150 *da9150, u16 reg, u8 val);
void da9150_set_bits(struct da9150 *da9150, u16 reg, u8 mask, u8 val);

void da9150_bulk_read(struct da9150 *da9150, u16 reg, int count, u8 *buf);
void da9150_bulk_write(struct da9150 *da9150, u16 reg, int count, const u8 *buf);

#endif /* __DA9150_CORE_H */