/* * Technically the spec does allow a device to set itself to busy for * internal reasons, but since it doesn't provide any information on * how to handle timeouts in that case, for now the code will only * process a single wait/timeout on function busy and a single retry * of the transaction.
*/
ret = regmap_sdw_mbq_write_impl(slave, reg, val, mbq_size, deferrable); if (ret == -EAGAIN) {
ret = regmap_sdw_mbq_poll_busy(slave, reg, ctx); if (ret) return ret;
ret = regmap_sdw_mbq_write_impl(slave, reg, val, mbq_size, false);
}
return ret;
}
staticint regmap_sdw_mbq_read_impl(struct sdw_slave *slave, unsignedint reg, unsignedint *val, int mbq_size, bool deferrable)
{ int shift = BITS_PER_BYTE; int read;
read = sdw_read_no_pm(slave, reg); if (read < 0) { if (deferrable && read == -ENODATA) return -EAGAIN;
return read;
}
*val = read;
while (--mbq_size > 0) {
read = sdw_read_no_pm(slave, SDW_SDCA_MBQ_CTL(reg)); if (read < 0) return read;
/* * Technically the spec does allow a device to set itself to busy for * internal reasons, but since it doesn't provide any information on * how to handle timeouts in that case, for now the code will only * process a single wait/timeout on function busy and a single retry * of the transaction.
*/
ret = regmap_sdw_mbq_read_impl(slave, reg, val, mbq_size, deferrable); if (ret == -EAGAIN) {
ret = regmap_sdw_mbq_poll_busy(slave, reg, ctx); if (ret) return ret;
ret = regmap_sdw_mbq_read_impl(slave, reg, val, mbq_size, false);
}
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.