Lines Matching refs:ec_word
323 static u16 ecword_to_cpu(struct olpc_battery_data *data, u16 ec_word) in ecword_to_cpu() argument
326 return le16_to_cpu((__force __le16)ec_word); in ecword_to_cpu()
328 return be16_to_cpu((__force __be16)ec_word); in ecword_to_cpu()
340 u16 ec_word; in olpc_bat_get_property() local
399 ret = olpc_ec_cmd(EC_BAT_VOLTAGE, NULL, 0, (void *)&ec_word, 2); in olpc_bat_get_property()
403 val->intval = ecword_to_cpu(data, ec_word) * 9760L / 32; in olpc_bat_get_property()
407 ret = olpc_ec_cmd(EC_BAT_CURRENT, NULL, 0, (void *)&ec_word, 2); in olpc_bat_get_property()
411 val->intval = ecword_to_cpu(data, ec_word) * 15625L / 120; in olpc_bat_get_property()
438 ret = olpc_ec_cmd(EC_BAT_TEMP, NULL, 0, (void *)&ec_word, 2); in olpc_bat_get_property()
442 val->intval = ecword_to_cpu(data, ec_word) * 10 / 256; in olpc_bat_get_property()
445 ret = olpc_ec_cmd(EC_AMB_TEMP, NULL, 0, (void *)&ec_word, 2); in olpc_bat_get_property()
449 val->intval = (int)ecword_to_cpu(data, ec_word) * 10 / 256; in olpc_bat_get_property()
452 ret = olpc_ec_cmd(EC_BAT_ACR, NULL, 0, (void *)&ec_word, 2); in olpc_bat_get_property()
456 val->intval = ecword_to_cpu(data, ec_word) * 6250 / 15; in olpc_bat_get_property()