include/linux/mfd/wm8350/core.h
Source file repositories/reference/linux-study-clean/include/linux/mfd/wm8350/core.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/mfd/wm8350/core.h- Extension
.h- Size
- 25628 bytes
- Lines
- 693
- 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/completion.hlinux/errno.hlinux/interrupt.hlinux/mutex.hlinux/regmap.hlinux/types.hlinux/mfd/wm8350/audio.hlinux/mfd/wm8350/gpio.hlinux/mfd/wm8350/pmic.hlinux/mfd/wm8350/rtc.hlinux/mfd/wm8350/supply.hlinux/mfd/wm8350/wdt.h
Detected Declarations
struct devicestruct platform_devicestruct wm8350struct wm8350_hwmonstruct wm8350struct wm8350_platform_datafunction wm8350_register_irqfunction wm8350_free_irqfunction wm8350_mask_irqfunction wm8350_unmask_irq
Annotated Snippet
struct wm8350_hwmon {
struct platform_device *pdev;
struct device *classdev;
};
struct wm8350 {
struct device *dev;
/* device IO */
struct regmap *regmap;
bool unlocked;
struct mutex auxadc_mutex;
struct completion auxadc_done;
/* Interrupt handling */
struct mutex irq_lock;
int chip_irq;
int irq_base;
u16 irq_masks[WM8350_NUM_IRQ_REGS];
/* Client devices */
struct wm8350_codec codec;
struct wm8350_gpio gpio;
struct wm8350_hwmon hwmon;
struct wm8350_pmic pmic;
struct wm8350_power power;
struct wm8350_rtc rtc;
struct wm8350_wdt wdt;
};
/**
* Data to be supplied by the platform to initialise the WM8350.
*
* @init: Function called during driver initialisation. Should be
* used by the platform to configure GPIO functions and similar.
* @irq_high: Set if WM8350 IRQ is active high.
* @irq_base: Base IRQ for genirq (not currently used).
* @gpio_base: Base for gpiolib.
*/
struct wm8350_platform_data {
int (*init)(struct wm8350 *wm8350);
int irq_high;
int irq_base;
int gpio_base;
};
/*
* WM8350 device initialisation and exit.
*/
int wm8350_device_init(struct wm8350 *wm8350, int irq,
struct wm8350_platform_data *pdata);
/*
* WM8350 device IO
*/
int wm8350_clear_bits(struct wm8350 *wm8350, u16 reg, u16 mask);
int wm8350_set_bits(struct wm8350 *wm8350, u16 reg, u16 mask);
u16 wm8350_reg_read(struct wm8350 *wm8350, int reg);
int wm8350_reg_write(struct wm8350 *wm8350, int reg, u16 val);
int wm8350_reg_lock(struct wm8350 *wm8350);
int wm8350_reg_unlock(struct wm8350 *wm8350);
int wm8350_block_read(struct wm8350 *wm8350, int reg, int size, u16 *dest);
int wm8350_block_write(struct wm8350 *wm8350, int reg, int size, u16 *src);
/*
* WM8350 internal interrupts
*/
static inline int wm8350_register_irq(struct wm8350 *wm8350, int irq,
irq_handler_t handler,
unsigned long flags,
const char *name, void *data)
{
if (!wm8350->irq_base)
return -ENODEV;
return request_threaded_irq(irq + wm8350->irq_base, NULL,
handler, flags | IRQF_ONESHOT, name, data);
}
static inline void wm8350_free_irq(struct wm8350 *wm8350, int irq, void *data)
{
free_irq(irq + wm8350->irq_base, data);
}
static inline void wm8350_mask_irq(struct wm8350 *wm8350, int irq)
{
disable_irq(irq + wm8350->irq_base);
}
Annotation
- Immediate include surface: `linux/completion.h`, `linux/errno.h`, `linux/interrupt.h`, `linux/mutex.h`, `linux/regmap.h`, `linux/types.h`, `linux/mfd/wm8350/audio.h`, `linux/mfd/wm8350/gpio.h`.
- Detected declarations: `struct device`, `struct platform_device`, `struct wm8350`, `struct wm8350_hwmon`, `struct wm8350`, `struct wm8350_platform_data`, `function wm8350_register_irq`, `function wm8350_free_irq`, `function wm8350_mask_irq`, `function wm8350_unmask_irq`.
- 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.