include/linux/mfd/twl.h
Source file repositories/reference/linux-study-clean/include/linux/mfd/twl.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/mfd/twl.h- Extension
.h- Size
- 22896 bytes
- Lines
- 787
- 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
linux/types.hlinux/input/matrix_keypad.h
Detected Declarations
struct twl4030_clock_init_datastruct twl4030_bci_platform_datastruct twl4030_gpio_platform_datastruct twl4030_madc_platform_datastruct twl4030_keypad_datastruct twl4030_usb_datastruct twl4030_insstruct twl4030_scriptstruct twl4030_resconfigstruct twl4030_power_datastruct twl4030_codec_datastruct twl4030_vibra_datastruct twl4030_audio_datastruct twl_regulator_driver_dataenum twl_module_idsenum twl4030_module_idsenum twl6030_module_idsenum twl4030_usb_modefunction twl_i2c_write_u8function twl_i2c_read_u8function twl_i2c_write_u16function twl_i2c_read_u16
Annotated Snippet
struct twl4030_clock_init_data {
bool ck32k_lowpwr_enable;
};
struct twl4030_bci_platform_data {
int *battery_tmp_tbl;
unsigned int tblsize;
int bb_uvolt; /* voltage to charge backup battery */
int bb_uamp; /* current for backup battery charging */
};
/* TWL4030_GPIO_MAX (18) GPIOs, with interrupts */
struct twl4030_gpio_platform_data {
/* package the two LED signals as output-only GPIOs? */
bool use_leds;
/* gpio-n should control VMMC(n+1) if BIT(n) in mmc_cd is set */
u8 mmc_cd;
/* if BIT(N) is set, or VMMC(n+1) is linked, debounce GPIO-N */
u32 debounce;
/* For gpio-N, bit (1 << N) in "pullups" is set if that pullup
* should be enabled. Else, if that bit is set in "pulldowns",
* that pulldown is enabled. Don't waste power by letting any
* digital inputs float...
*/
u32 pullups;
u32 pulldowns;
};
struct twl4030_madc_platform_data {
int irq_line;
};
/* Boards have unique mappings of {row, col} --> keycode.
* Column and row are 8 bits each, but range only from 0..7.
* a PERSISTENT_KEY is "always on" and never reported.
*/
#define PERSISTENT_KEY(r, c) KEY((r), (c), KEY_RESERVED)
struct twl4030_keypad_data {
const struct matrix_keymap_data *keymap_data;
unsigned rows;
unsigned cols;
bool rep;
};
enum twl4030_usb_mode {
T2_USB_MODE_ULPI = 1,
T2_USB_MODE_CEA2011_3PIN = 2,
};
struct twl4030_usb_data {
enum twl4030_usb_mode usb_mode;
unsigned long features;
int (*phy_init)(struct device *dev);
int (*phy_exit)(struct device *dev);
/* Power on/off the PHY */
int (*phy_power)(struct device *dev, int iD, int on);
/* enable/disable phy clocks */
int (*phy_set_clock)(struct device *dev, int on);
/* suspend/resume of phy */
int (*phy_suspend)(struct device *dev, int suspend);
};
struct twl4030_ins {
u16 pmb_message;
u8 delay;
};
struct twl4030_script {
struct twl4030_ins *script;
unsigned size;
u8 flags;
#define TWL4030_WRST_SCRIPT (1<<0)
#define TWL4030_WAKEUP12_SCRIPT (1<<1)
#define TWL4030_WAKEUP3_SCRIPT (1<<2)
#define TWL4030_SLEEP_SCRIPT (1<<3)
};
struct twl4030_resconfig {
u8 resource;
u8 devgroup; /* Processor group that Power resource belongs to */
u8 type; /* Power resource addressed, 6 / broadcast message */
u8 type2; /* Power resource addressed, 3 / broadcast message */
u8 remap_off; /* off state remapping */
u8 remap_sleep; /* sleep state remapping */
};
Annotation
- Immediate include surface: `linux/types.h`, `linux/input/matrix_keypad.h`.
- Detected declarations: `struct twl4030_clock_init_data`, `struct twl4030_bci_platform_data`, `struct twl4030_gpio_platform_data`, `struct twl4030_madc_platform_data`, `struct twl4030_keypad_data`, `struct twl4030_usb_data`, `struct twl4030_ins`, `struct twl4030_script`, `struct twl4030_resconfig`, `struct twl4030_power_data`.
- 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.