linux/include/linux/mfd/max8997-private.h

/* SPDX-License-Identifier: GPL-2.0+ */
/*
 * max8997-private.h - Voltage regulator driver for the Maxim 8997
 *
 *  Copyright (C) 2010 Samsung Electrnoics
 *  MyungJoo Ham <[email protected]>
 */

#ifndef __LINUX_MFD_MAX8997_PRIV_H
#define __LINUX_MFD_MAX8997_PRIV_H

#include <linux/i2c.h>
#include <linux/export.h>
#include <linux/irqdomain.h>

#define MAX8997_REG_INVALID

enum max8997_pmic_reg {};

enum max8997_muic_reg {};

/* MAX8997-MUIC STATUS1 register */
#define STATUS1_ADC_SHIFT
#define STATUS1_ADCLOW_SHIFT
#define STATUS1_ADCERR_SHIFT
#define STATUS1_ADC_MASK
#define STATUS1_ADCLOW_MASK
#define STATUS1_ADCERR_MASK

/* MAX8997-MUIC STATUS2 register */
#define STATUS2_CHGTYP_SHIFT
#define STATUS2_CHGDETRUN_SHIFT
#define STATUS2_DCDTMR_SHIFT
#define STATUS2_DBCHG_SHIFT
#define STATUS2_VBVOLT_SHIFT
#define STATUS2_CHGTYP_MASK
#define STATUS2_CHGDETRUN_MASK
#define STATUS2_DCDTMR_MASK
#define STATUS2_DBCHG_MASK
#define STATUS2_VBVOLT_MASK

/* MAX8997-MUIC STATUS3 register */
#define STATUS3_OVP_SHIFT
#define STATUS3_OVP_MASK

/* MAX8997-MUIC CONTROL1 register */
#define COMN1SW_SHIFT
#define COMP2SW_SHIFT
#define COMN1SW_MASK
#define COMP2SW_MASK
#define COMP_SW_MASK

#define CONTROL1_SW_USB
#define CONTROL1_SW_AUDIO
#define CONTROL1_SW_UART
#define CONTROL1_SW_OPEN

#define CONTROL2_LOWPWR_SHIFT
#define CONTROL2_ADCEN_SHIFT
#define CONTROL2_CPEN_SHIFT
#define CONTROL2_SFOUTASRT_SHIFT
#define CONTROL2_SFOUTORD_SHIFT
#define CONTROL2_ACCDET_SHIFT
#define CONTROL2_USBCPINT_SHIFT
#define CONTROL2_RCPS_SHIFT
#define CONTROL2_LOWPWR_MASK
#define CONTROL2_ADCEN_MASK
#define CONTROL2_CPEN_MASK
#define CONTROL2_SFOUTASRT_MASK
#define CONTROL2_SFOUTORD_MASK
#define CONTROL2_ACCDET_MASK
#define CONTROL2_USBCPINT_MASK
#define CONTROL2_RCPS_MASK

#define CONTROL3_JIGSET_SHIFT
#define CONTROL3_BTLDSET_SHIFT
#define CONTROL3_ADCDBSET_SHIFT
#define CONTROL3_JIGSET_MASK
#define CONTROL3_BTLDSET_MASK
#define CONTROL3_ADCDBSET_MASK

enum max8997_haptic_reg {};

/* slave addr = 0x0c: using "2nd part" of rev4 datasheet */
enum max8997_rtc_reg {};

enum max8997_irq_source {};

enum max8997_irq {};

#define MAX8997_NUM_GPIO
struct max8997_dev {};

enum max8997_types {};

extern int max8997_irq_init(struct max8997_dev *max8997);
extern void max8997_irq_exit(struct max8997_dev *max8997);
extern int max8997_irq_resume(struct max8997_dev *max8997);

extern int max8997_read_reg(struct i2c_client *i2c, u8 reg, u8 *dest);
extern int max8997_bulk_read(struct i2c_client *i2c, u8 reg, int count,
				u8 *buf);
extern int max8997_write_reg(struct i2c_client *i2c, u8 reg, u8 value);
extern int max8997_bulk_write(struct i2c_client *i2c, u8 reg, int count,
				u8 *buf);
extern int max8997_update_reg(struct i2c_client *i2c, u8 reg, u8 val, u8 mask);

#define MAX8997_GPIO_INT_BOTH
#define MAX8997_GPIO_INT_RISE
#define MAX8997_GPIO_INT_FALL

#define MAX8997_GPIO_INT_MASK
#define MAX8997_GPIO_DATA_MASK
#endif /*  __LINUX_MFD_MAX8997_PRIV_H */