/* * The capability command is only supported at page 0. Probing the device while * the page register is set to 1 will falsely enable PEC support. Disable * capability probing accordingly, since the PLI1209BC does not have any * additional capabilities.
*/ staticstruct pmbus_platform_data pli1209bc_plat_data = {
.flags = PMBUS_NO_CAPABILITY,
};
staticint pli1209bc_read_word_data(struct i2c_client *client, int page, int phase, int reg)
{ int data;
switch (reg) { /* PMBUS_READ_POUT uses a direct format with R=0 */ case PMBUS_READ_POUT:
data = pmbus_read_word_data(client, page, phase, reg); if (data < 0) return data;
data = sign_extend32(data, 15) * 10; return clamp_val(data, -32768, 32767) & 0xffff; /* * PMBUS_READ_VOUT and PMBUS_READ_TEMPERATURE_1 return invalid data * when the BCM is turned off. Since it is not possible to return * ENODATA error, return zero instead.
*/ case PMBUS_READ_VOUT: case PMBUS_READ_TEMPERATURE_1:
data = pmbus_read_word_data(client, page, phase,
PMBUS_STATUS_WORD); if (data < 0) return data; if (data & PB_STATUS_POWER_GOOD_N) return 0; return pmbus_read_word_data(client, page, phase, reg); default: return -ENODATA;
}
}
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.