/** * struct max77759 - core max77759 internal data structure * * @regmap_top: Regmap for accessing TOP registers * @maxq_lock: Lock for serializing access to MaxQ * @regmap_maxq: Regmap for accessing MaxQ registers * @cmd_done: Used to signal completion of a MaxQ command * @regmap_charger: Regmap for accessing charger registers * * The MAX77759 comprises several sub-blocks, namely TOP, MaxQ, Charger, * Fuel Gauge, and TCPCI.
*/ 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, conststruct max77759_maxq_command *cmd, struct max77759_maxq_response *rsp);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.