drivers/regulator/da9210-regulator.h

Source file repositories/reference/linux-study-clean/drivers/regulator/da9210-regulator.h

File Facts

System
Linux kernel
Corpus path
drivers/regulator/da9210-regulator.h
Extension
.h
Size
8312 bytes
Lines
274
Domain
Driver Families
Bucket
drivers/regulator
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct da9210_pdata {
	struct regulator_init_data da9210_constraints;
};

/* Page selection */
#define	DA9210_REG_PAGE_CON			0x00

/* System Control and Event Registers */
#define	DA9210_REG_STATUS_A			0x50
#define	DA9210_REG_STATUS_B			0x51
#define	DA9210_REG_EVENT_A			0x52
#define	DA9210_REG_EVENT_B			0x53
#define	DA9210_REG_MASK_A			0x54
#define	DA9210_REG_MASK_B			0x55
#define	DA9210_REG_CONTROL_A			0x56

/* GPIO Control Registers */
#define	DA9210_REG_GPIO_0_1			0x58
#define	DA9210_REG_GPIO_2_3			0x59
#define	DA9210_REG_GPIO_4_5			0x5A
#define	DA9210_REG_GPIO_6			0x5B

/* Regulator Registers */
#define	DA9210_REG_BUCK_CONT			0x5D
#define	DA9210_REG_BUCK_ILIM			0xD0
#define	DA9210_REG_BUCK_CONF1			0xD1
#define	DA9210_REG_BUCK_CONF2			0xD2
#define DA9210_REG_VBACK_AUTO			0xD4
#define DA9210_REG_VBACK_BASE			0xD5
#define DA9210_REG_VBACK_MAX_DVC_IF		0xD6
#define DA9210_REG_VBACK_DVC			0xD7
#define	DA9210_REG_VBUCK_A			0xD8
#define	DA9210_REG_VBUCK_B			0xD9

/* I2C Interface Settings */
#define DA9210_REG_INTERFACE			0x105

/* OTP */
#define	DA9210_REG_OPT_COUNT			0x140
#define	DA9210_REG_OPT_ADDR			0x141
#define	DA9210_REG_OPT_DATA			0x142

/* Customer Trim and Configuration */
#define	DA9210_REG_CONFIG_A			0x143
#define	DA9210_REG_CONFIG_B			0x144
#define	DA9210_REG_CONFIG_C			0x145
#define	DA9210_REG_CONFIG_D			0x146
#define	DA9210_REG_CONFIG_E			0x147


/*
 * Registers bits
 */
/* DA9210_REG_PAGE_CON (addr=0x00) */
#define	DA9210_PEG_PAGE_SHIFT			0
#define	DA9210_REG_PAGE_MASK			0x0F
/* On I2C registers 0x00 - 0xFF */
#define	DA9210_REG_PAGE0			0
/* On I2C registers 0x100 - 0x1FF */
#define	DA9210_REG_PAGE2			2
#define	DA9210_PAGE_WRITE_MODE			0x00
#define	DA9210_REPEAT_WRITE_MODE		0x40
#define	DA9210_PAGE_REVERT			0x80

/* DA9210_REG_STATUS_A (addr=0x50) */
#define	DA9210_GPI0				0x01
#define	DA9210_GPI1				0x02
#define	DA9210_GPI2				0x04
#define	DA9210_GPI3				0x08
#define	DA9210_GPI4				0x10
#define	DA9210_GPI5				0x20
#define	DA9210_GPI6				0x40

/* DA9210_REG_EVENT_A (addr=0x52) */
#define	DA9210_E_GPI0				0x01
#define	DA9210_E_GPI1				0x02
#define	DA9210_E_GPI2				0x04
#define	DA9210_E_GPI3				0x08
#define	DA9210_E_GPI4				0x10
#define	DA9210_E_GPI5				0x20
#define	DA9210_E_GPI6				0x40

/* DA9210_REG_EVENT_B (addr=0x53) */
#define	DA9210_E_OVCURR				0x01
#define	DA9210_E_NPWRGOOD			0x02
#define	DA9210_E_TEMP_WARN			0x04
#define	DA9210_E_TEMP_CRIT			0x08
#define	DA9210_E_VMAX				0x10

/* DA9210_REG_MASK_A (addr=0x54) */

Annotation

Implementation Notes