include/linux/mfd/rohm-bd718x7.h

Source file repositories/reference/linux-study-clean/include/linux/mfd/rohm-bd718x7.h

File Facts

System
Linux kernel
Corpus path
include/linux/mfd/rohm-bd718x7.h
Extension
.h
Size
9038 bytes
Lines
314
Domain
Core OS
Bucket
Core Kernel Interface
Inferred role
Core OS: implementation source
Status
source implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef __LINUX_MFD_BD718XX_H__
#define __LINUX_MFD_BD718XX_H__

#include <linux/mfd/rohm-generic.h>
#include <linux/regmap.h>

enum {
	BD718XX_BUCK1 = 0,
	BD718XX_BUCK2,
	BD718XX_BUCK3,
	BD718XX_BUCK4,
	BD718XX_BUCK5,
	BD718XX_BUCK6,
	BD718XX_BUCK7,
	BD718XX_BUCK8,
	BD718XX_LDO1,
	BD718XX_LDO2,
	BD718XX_LDO3,
	BD718XX_LDO4,
	BD718XX_LDO5,
	BD718XX_LDO6,
	BD718XX_LDO7,
	BD718XX_REGULATOR_AMOUNT,
};

/* Common voltage configurations */
#define BD718XX_DVS_BUCK_VOLTAGE_NUM		0x3D
#define BD718XX_4TH_NODVS_BUCK_VOLTAGE_NUM	0x3D

#define BD718XX_LDO1_VOLTAGE_NUM	0x08
#define BD718XX_LDO2_VOLTAGE_NUM	0x02
#define BD718XX_LDO3_VOLTAGE_NUM	0x10
#define BD718XX_LDO4_VOLTAGE_NUM	0x0A
#define BD718XX_LDO6_VOLTAGE_NUM	0x0A

/* BD71837 specific voltage configurations */
#define BD71837_BUCK5_VOLTAGE_NUM	0x10
#define BD71837_BUCK6_VOLTAGE_NUM	0x04
#define BD71837_BUCK7_VOLTAGE_NUM	0x08
#define BD71837_LDO5_VOLTAGE_NUM	0x10
#define BD71837_LDO7_VOLTAGE_NUM	0x10

/* BD71847 specific voltage configurations */
#define BD71847_BUCK3_VOLTAGE_NUM	0x18
#define BD71847_BUCK4_VOLTAGE_NUM	0x08
#define BD71847_LDO5_VOLTAGE_NUM	0x20

/* Registers specific to BD71837 */
enum {
	BD71837_REG_BUCK3_CTRL =	0x07,
	BD71837_REG_BUCK4_CTRL =	0x08,
	BD71837_REG_BUCK3_VOLT_RUN =	0x12,
	BD71837_REG_BUCK4_VOLT_RUN =	0x13,
	BD71837_REG_LDO7_VOLT =		0x1E,
};

/* Registers common for BD71837 and BD71847 */
enum {
	BD718XX_REG_REV =			0x00,
	BD718XX_REG_SWRESET =			0x01,
	BD718XX_REG_I2C_DEV =			0x02,
	BD718XX_REG_PWRCTRL0 =			0x03,
	BD718XX_REG_PWRCTRL1 =			0x04,
	BD718XX_REG_BUCK1_CTRL =		0x05,
	BD718XX_REG_BUCK2_CTRL =		0x06,
	BD718XX_REG_1ST_NODVS_BUCK_CTRL =	0x09,
	BD718XX_REG_2ND_NODVS_BUCK_CTRL =	0x0A,
	BD718XX_REG_3RD_NODVS_BUCK_CTRL =	0x0B,
	BD718XX_REG_4TH_NODVS_BUCK_CTRL =	0x0C,
	BD718XX_REG_BUCK1_VOLT_RUN =		0x0D,
	BD718XX_REG_BUCK1_VOLT_IDLE =		0x0E,
	BD718XX_REG_BUCK1_VOLT_SUSP =		0x0F,
	BD718XX_REG_BUCK2_VOLT_RUN =		0x10,
	BD718XX_REG_BUCK2_VOLT_IDLE =		0x11,
	BD718XX_REG_1ST_NODVS_BUCK_VOLT =	0x14,
	BD718XX_REG_2ND_NODVS_BUCK_VOLT =	0x15,
	BD718XX_REG_3RD_NODVS_BUCK_VOLT =	0x16,
	BD718XX_REG_4TH_NODVS_BUCK_VOLT =	0x17,
	BD718XX_REG_LDO1_VOLT =			0x18,
	BD718XX_REG_LDO2_VOLT =			0x19,
	BD718XX_REG_LDO3_VOLT =			0x1A,
	BD718XX_REG_LDO4_VOLT =			0x1B,
	BD718XX_REG_LDO5_VOLT =			0x1C,
	BD718XX_REG_LDO6_VOLT =			0x1D,
	BD718XX_REG_TRANS_COND0 =		0x1F,
	BD718XX_REG_TRANS_COND1 =		0x20,
	BD718XX_REG_VRFAULTEN =			0x21,
	BD718XX_REG_MVRFLTMASK0 =		0x22,
	BD718XX_REG_MVRFLTMASK1 =		0x23,
	BD718XX_REG_MVRFLTMASK2 =		0x24,

Annotation

Implementation Notes