include/linux/soc/apple/tunable.h

Source file repositories/reference/linux-study-clean/include/linux/soc/apple/tunable.h

File Facts

System
Linux kernel
Corpus path
include/linux/soc/apple/tunable.h
Extension
.h
Size
2009 bytes
Lines
63
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 apple_tunable {
	size_t sz;
	struct {
		u32 offset;
		u32 mask;
		u32 value;
	} values[] __counted_by(sz);
};

/**
 * Parse an array of hardware tunables from the device tree.
 *
 * @dev: Device node used for devm_kzalloc internally.
 * @np: Device node which contains the tunable array.
 * @name: Name of the device tree property which contains the tunables.
 * @res: Resource to which the tunables will be applied, used for bound checking
 *
 * @return: devres allocated struct on success or PTR_ERR on failure.
 */
struct apple_tunable *devm_apple_tunable_parse(struct device *dev,
					       struct device_node *np,
					       const char *name,
					       struct resource *res);

/**
 * Apply a previously loaded hardware tunable.
 *
 * @param regs: MMIO to which the tunable will be applied.
 * @param tunable: Pointer to the tunable.
 */
void apple_tunable_apply(void __iomem *regs, struct apple_tunable *tunable);

#endif

Annotation

Implementation Notes