staticunsignedlong twl6030_vsel_to_uv(const u8 vsel)
{ /* * In TWL6030 depending on the value of SMPS_OFFSET * efuse register the voltage range supported in * standard mode can be either between 0.6V - 1.3V or * 0.7V - 1.4V. In TWL6030 ES1.0 SMPS_OFFSET efuse * is programmed to all 0's where as starting from * TWL6030 ES1.1 the efuse is programmed to 1
*/ if (!is_offset_valid) {
twl_i2c_read_u8(TWL6030_MODULE_ID0, &smps_offset,
REG_SMPS_OFFSET);
is_offset_valid = true;
}
if (!vsel) return 0; /* * There is no specific formula for voltage to vsel * conversion above 1.3V. There are special hardcoded * values for voltages above 1.3V. Currently we are * hardcoding only for 1.35 V which is used for 1GH OPP for * OMAP4430.
*/ if (vsel == 0x3A) return 1350000;
static u8 twl6030_uv_to_vsel(unsignedlong uv)
{ /* * In TWL6030 depending on the value of SMPS_OFFSET * efuse register the voltage range supported in * standard mode can be either between 0.6V - 1.3V or * 0.7V - 1.4V. In TWL6030 ES1.0 SMPS_OFFSET efuse * is programmed to all 0's where as starting from * TWL6030 ES1.1 the efuse is programmed to 1
*/ if (!is_offset_valid) {
twl_i2c_read_u8(TWL6030_MODULE_ID0, &smps_offset,
REG_SMPS_OFFSET);
is_offset_valid = true;
}
if (!uv) return 0x00; /* * There is no specific formula for voltage to vsel * conversion above 1.3V. There are special hardcoded * values for voltages above 1.3V. Currently we are * hardcoding only for 1.35 V which is used for 1GH OPP for * OMAP4430.
*/ if (uv > twl6030_vsel_to_uv(0x39)) { if (uv == 1350000) return 0x3A;
pr_err("%s:OUT OF RANGE! non mapped vsel for %ld Vs max %ld\n",
__func__, uv, twl6030_vsel_to_uv(0x39)); return 0x3A;
}
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.