include/linux/mfd/max77759.h

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

File Facts

System
Linux kernel
Corpus path
include/linux/mfd/max77759.h
Extension
.h
Size
11963 bytes
Lines
274
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 max77759 {
	struct regmap *regmap_top;

	/* This protects MaxQ commands - only one can be active */
	struct mutex maxq_lock;
	struct regmap *regmap_maxq;
	struct completion cmd_done;

	struct regmap *regmap_charger;
};

/**
 * struct max77759_maxq_command - structure containing the MaxQ command to
 * send
 *
 * @length: The number of bytes to send.
 * @cmd: The data to send.
 */
struct max77759_maxq_command {
	u8 length;
	u8 cmd[] __counted_by(length);
};

/**
 * struct max77759_maxq_response - structure containing the MaxQ response
 *
 * @length: The number of bytes to receive.
 * @rsp: The data received. Must have at least @length bytes space.
 */
struct max77759_maxq_response {
	u8 length;
	u8 rsp[] __counted_by(length);
};

/**
 * max77759_maxq_command() - issue a MaxQ command and wait for the response
 * and associated data
 *
 * @max77759: The core max77759 device handle.
 * @cmd: The command to be sent.
 * @rsp: Any response data associated with the command will be copied here;
 *     can be %NULL if the command has no response (other than ACK).
 *
 * Return: 0 on success, a negative error number otherwise.
 */
int max77759_maxq_command(struct max77759 *max77759,
			  const struct max77759_maxq_command *cmd,
			  struct max77759_maxq_response *rsp);

#endif /* __LINUX_MFD_MAX77759_H */

Annotation

Implementation Notes