include/linux/mfd/da903x.h

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

File Facts

System
Linux kernel
Corpus path
include/linux/mfd/da903x.h
Extension
.h
Size
7218 bytes
Lines
249
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

struct da9034_touch_pdata {
	int	interval_ms;	/* sampling interval while pen down */
	int	x_inverted;
	int	y_inverted;
};

struct da9034_backlight_pdata {
	int	output_current;	/* output current of WLED, from 0-31 (in mA) */
};

/* DA9030 battery charger data */
struct power_supply_info;

struct da9030_battery_info {
	/* battery parameters */
	struct power_supply_info *battery_info;

	/* current and voltage to use for battery charging */
	unsigned int charge_milliamp;
	unsigned int charge_millivolt;

	/* voltage thresholds (in millivolts) */
	int vbat_low;
	int vbat_crit;
	int vbat_charge_start;
	int vbat_charge_stop;
	int vbat_charge_restart;

	/* battery nominal minimal and maximal voltages in millivolts */
	int vcharge_min;
	int vcharge_max;

	/* Temperature thresholds. These are DA9030 register values
	   "as is" and should be measured for each battery type */
	int tbat_low;
	int tbat_high;
	int tbat_restart;


	/* battery monitor interval (seconds) */
	unsigned int batmon_interval;

	/* platform callbacks for battery low and critical events */
	void (*battery_low)(void);
	void (*battery_critical)(void);
};

struct da903x_subdev_info {
	int		id;
	const char	*name;
	void		*platform_data;
};

struct da903x_platform_data {
	int num_subdevs;
	struct da903x_subdev_info *subdevs;
};

/* bit definitions for DA9030 events */
#define DA9030_EVENT_ONKEY		(1 << 0)
#define	DA9030_EVENT_PWREN		(1 << 1)
#define	DA9030_EVENT_EXTON		(1 << 2)
#define	DA9030_EVENT_CHDET		(1 << 3)
#define	DA9030_EVENT_TBAT		(1 << 4)
#define	DA9030_EVENT_VBATMON		(1 << 5)
#define	DA9030_EVENT_VBATMON_TXON	(1 << 6)
#define	DA9030_EVENT_CHIOVER		(1 << 7)
#define	DA9030_EVENT_TCTO		(1 << 8)
#define	DA9030_EVENT_CCTO		(1 << 9)
#define	DA9030_EVENT_ADC_READY		(1 << 10)
#define	DA9030_EVENT_VBUS_4P4		(1 << 11)
#define	DA9030_EVENT_VBUS_4P0		(1 << 12)
#define	DA9030_EVENT_SESS_VALID		(1 << 13)
#define	DA9030_EVENT_SRP_DETECT		(1 << 14)
#define	DA9030_EVENT_WATCHDOG		(1 << 15)
#define	DA9030_EVENT_LDO15		(1 << 16)
#define	DA9030_EVENT_LDO16		(1 << 17)
#define	DA9030_EVENT_LDO17		(1 << 18)
#define	DA9030_EVENT_LDO18		(1 << 19)
#define	DA9030_EVENT_LDO19		(1 << 20)
#define	DA9030_EVENT_BUCK2		(1 << 21)

/* bit definitions for DA9034 events */
#define DA9034_EVENT_ONKEY		(1 << 0)
#define DA9034_EVENT_EXTON		(1 << 2)
#define DA9034_EVENT_CHDET		(1 << 3)
#define DA9034_EVENT_TBAT		(1 << 4)
#define DA9034_EVENT_VBATMON		(1 << 5)
#define DA9034_EVENT_REV_IOVER		(1 << 6)
#define DA9034_EVENT_CH_IOVER		(1 << 7)

Annotation

Implementation Notes