include/linux/mfd/wm831x/pdata.h
Source file repositories/reference/linux-study-clean/include/linux/mfd/wm831x/pdata.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/mfd/wm831x/pdata.h- Extension
.h- Size
- 4361 bytes
- Lines
- 144
- 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.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct wm831xstruct regulator_init_datastruct wm831x_backlight_pdatastruct wm831x_backup_pdatastruct wm831x_battery_pdatastruct wm831x_buckv_pdatastruct wm831x_status_pdatastruct wm831x_touch_pdatastruct wm831x_watchdog_pdatastruct wm831x_pdataenum wm831x_status_srcenum wm831x_watchdog_action
Annotated Snippet
struct wm831x_backlight_pdata {
int isink; /** ISINK to use, 1 or 2 */
int max_uA; /** Maximum current to allow */
};
struct wm831x_backup_pdata {
int charger_enable;
int no_constant_voltage; /** Disable constant voltage charging */
int vlim; /** Voltage limit in millivolts */
int ilim; /** Current limit in microamps */
};
struct wm831x_battery_pdata {
int enable; /** Enable charging */
int fast_enable; /** Enable fast charging */
int off_mask; /** Mask OFF while charging */
int trickle_ilim; /** Trickle charge current limit, in mA */
int vsel; /** Target voltage, in mV */
int eoc_iterm; /** End of trickle charge current, in mA */
int fast_ilim; /** Fast charge current limit, in mA */
int timeout; /** Charge cycle timeout, in minutes */
};
/**
* Configuration for the WM831x DC-DC BuckWise convertors. This
* should be passed as driver_data in the regulator_init_data.
*
* Currently all the configuration is for the fast DVS switching
* support of the devices. This allows MFPs on the device to be
* configured as an input to switch between two output voltages,
* allowing voltage transitions without the expense of an access over
* I2C or SPI buses.
*/
struct wm831x_buckv_pdata {
int dvs_control_src; /** Hardware DVS source to use (1 or 2) */
int dvs_init_state; /** DVS state to expect on startup */
int dvs_state_gpio; /** CPU GPIO to use for monitoring status */
};
/* Sources for status LED configuration. Values are register values
* plus 1 to allow for a zero default for preserve.
*/
enum wm831x_status_src {
WM831X_STATUS_PRESERVE = 0, /* Keep the current hardware setting */
WM831X_STATUS_OTP = 1,
WM831X_STATUS_POWER = 2,
WM831X_STATUS_CHARGER = 3,
WM831X_STATUS_MANUAL = 4,
};
struct wm831x_status_pdata {
enum wm831x_status_src default_src;
const char *name;
const char *default_trigger;
};
struct wm831x_touch_pdata {
int fivewire; /** 1 for five wire mode, 0 for 4 wire */
int isel; /** Current for pen down (uA) */
int rpu; /** Pen down sensitivity resistor divider */
int pressure; /** Report pressure (boolean) */
unsigned int data_irq; /** Touch data ready IRQ */
int data_irqf; /** IRQ flags for data ready IRQ */
unsigned int pd_irq; /** Touch pendown detect IRQ */
int pd_irqf; /** IRQ flags for pen down IRQ */
};
enum wm831x_watchdog_action {
WM831X_WDOG_NONE = 0,
WM831X_WDOG_INTERRUPT = 1,
WM831X_WDOG_RESET = 2,
WM831X_WDOG_WAKE = 3,
};
struct wm831x_watchdog_pdata {
enum wm831x_watchdog_action primary, secondary;
unsigned int software:1;
};
#define WM831X_MAX_STATUS 2
#define WM831X_MAX_DCDC 4
#define WM831X_MAX_EPE 2
#define WM831X_MAX_LDO 11
#define WM831X_MAX_ISINK 2
#define WM831X_GPIO_CONFIGURE 0x10000
#define WM831X_GPIO_NUM 16
struct wm831x_pdata {
/** Used to distinguish multiple WM831x chips */
Annotation
- Detected declarations: `struct wm831x`, `struct regulator_init_data`, `struct wm831x_backlight_pdata`, `struct wm831x_backup_pdata`, `struct wm831x_battery_pdata`, `struct wm831x_buckv_pdata`, `struct wm831x_status_pdata`, `struct wm831x_touch_pdata`, `struct wm831x_watchdog_pdata`, `struct wm831x_pdata`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.