Home
last modified time | relevance | path

Searched refs:ec_word (Results 1 – 2 of 2) sorted by relevance

/linux-6.1.9/drivers/power/supply/
Dolpc_battery.c323 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()
[all …]
/linux-6.1.9/drivers/platform/olpc/
Dolpc-ec.c196 __be16 ec_word = cpu_to_be16(bits); in olpc_ec_mask_write() local
198 return olpc_ec_cmd(EC_WRITE_EXT_SCI_MASK, (void *)&ec_word, 2, NULL, 0); in olpc_ec_mask_write()
230 __be16 ec_word; in olpc_ec_sci_query() local
232 ret = olpc_ec_cmd(EC_EXT_SCI_QUERY, NULL, 0, (void *)&ec_word, 2); in olpc_ec_sci_query()
234 *sci_value = be16_to_cpu(ec_word); in olpc_ec_sci_query()