#ifndef __MFD_DA9052_DA9052_H
#define __MFD_DA9052_DA9052_H
#include <linux/interrupt.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <linux/completion.h>
#include <linux/list.h>
#include <linux/mfd/core.h>
#include <linux/mfd/da9052/reg.h>
#define DA9052_ADC_VDDOUT …
#define DA9052_ADC_ICH …
#define DA9052_ADC_TBAT …
#define DA9052_ADC_VBAT …
#define DA9052_ADC_IN4 …
#define DA9052_ADC_IN5 …
#define DA9052_ADC_IN6 …
#define DA9052_ADC_TSI …
#define DA9052_ADC_TJUNC …
#define DA9052_ADC_VBBAT …
#define DA9052_ADC_TSI_XP …
#define DA9052_ADC_TSI_XN …
#define DA9052_ADC_TSI_YP …
#define DA9052_ADC_TSI_YN …
#define DA9052_IRQ_DCIN …
#define DA9052_IRQ_VBUS …
#define DA9052_IRQ_DCINREM …
#define DA9052_IRQ_VBUSREM …
#define DA9052_IRQ_VDDLOW …
#define DA9052_IRQ_ALARM …
#define DA9052_IRQ_SEQRDY …
#define DA9052_IRQ_COMP1V2 …
#define DA9052_IRQ_NONKEY …
#define DA9052_IRQ_IDFLOAT …
#define DA9052_IRQ_IDGND …
#define DA9052_IRQ_CHGEND …
#define DA9052_IRQ_TBAT …
#define DA9052_IRQ_ADC_EOM …
#define DA9052_IRQ_PENDOWN …
#define DA9052_IRQ_TSIREADY …
#define DA9052_IRQ_GPI0 …
#define DA9052_IRQ_GPI1 …
#define DA9052_IRQ_GPI2 …
#define DA9052_IRQ_GPI3 …
#define DA9052_IRQ_GPI4 …
#define DA9052_IRQ_GPI5 …
#define DA9052_IRQ_GPI6 …
#define DA9052_IRQ_GPI7 …
#define DA9052_IRQ_GPI8 …
#define DA9052_IRQ_GPI9 …
#define DA9052_IRQ_GPI10 …
#define DA9052_IRQ_GPI11 …
#define DA9052_IRQ_GPI12 …
#define DA9052_IRQ_GPI13 …
#define DA9052_IRQ_GPI14 …
#define DA9052_IRQ_GPI15 …
enum da9052_chip_id { … };
struct da9052_pdata;
struct da9052 { … };
int da9052_adc_manual_read(struct da9052 *da9052, unsigned char channel);
int da9052_adc_read_temp(struct da9052 *da9052);
static inline int da9052_reg_read(struct da9052 *da9052, unsigned char reg)
{ … }
static inline int da9052_reg_write(struct da9052 *da9052, unsigned char reg,
unsigned char val)
{ … }
static inline int da9052_group_read(struct da9052 *da9052, unsigned char reg,
unsigned reg_cnt, unsigned char *val)
{ … }
static inline int da9052_group_write(struct da9052 *da9052, unsigned char reg,
unsigned reg_cnt, unsigned char *val)
{ … }
static inline int da9052_reg_update(struct da9052 *da9052, unsigned char reg,
unsigned char bit_mask,
unsigned char reg_val)
{ … }
int da9052_device_init(struct da9052 *da9052, u8 chip_id);
void da9052_device_exit(struct da9052 *da9052);
extern const struct regmap_config da9052_regmap_config;
int da9052_irq_init(struct da9052 *da9052);
int da9052_irq_exit(struct da9052 *da9052);
int da9052_request_irq(struct da9052 *da9052, int irq, char *name,
irq_handler_t handler, void *data);
void da9052_free_irq(struct da9052 *da9052, int irq, void *data);
int da9052_enable_irq(struct da9052 *da9052, int irq);
int da9052_disable_irq(struct da9052 *da9052, int irq);
int da9052_disable_irq_nosync(struct da9052 *da9052, int irq);
#endif