/** * mcp_reg_write - write a device register * @mcp: MCP interface structure * @reg: 4-bit register index * @val: 16-bit data value * * Write a device register. The MCP interface must be enabled * to prevent this function hanging.
*/ void mcp_reg_write(struct mcp *mcp, unsignedint reg, unsignedint val)
{ unsignedlong flags;
/** * mcp_reg_read - read a device register * @mcp: MCP interface structure * @reg: 4-bit register index * * Read a device register and return its value. The MCP interface * must be enabled to prevent this function hanging.
*/ unsignedint mcp_reg_read(struct mcp *mcp, unsignedint reg)
{ unsignedlong flags; unsignedint val;
spin_lock_irqsave(&mcp->lock, flags);
val = mcp->ops->reg_read(mcp, reg);
spin_unlock_irqrestore(&mcp->lock, flags);
return val;
}
EXPORT_SYMBOL(mcp_reg_read);
/** * mcp_enable - enable the MCP interface * @mcp: MCP interface to enable * * Enable the MCP interface. Each call to mcp_enable will need * a corresponding call to mcp_disable to disable the interface.
*/ void mcp_enable(struct mcp *mcp)
{ unsignedlong flags;
/** * mcp_disable - disable the MCP interface * @mcp: MCP interface to disable * * Disable the MCP interface. The MCP interface will only be * disabled once the number of calls to mcp_enable matches the * number of calls to mcp_disable.
*/ void mcp_disable(struct mcp *mcp)
{ unsignedlong flags;
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.