STRUCT EC_RESPONSE_BATTERY_DYNAMIC_INFO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct ec_response_battery_dynamic_info(9) β€” Kernel API Manual πŸ’–

okay bestie, welcome to the <pink>Kernel API Manual</pink> ✨ β€” yes the title got truncated in the header to struct ec_r...dynamic_info(9) but we're talking about the full struct ec_response_battery_dynamic_info here, no cap. it's the battery dynamic info response, and it's lowkey one of the most relatable structs in the whole EC firmware universe because it's literally just the battery telling you how it's feeling rn πŸ₯ΊπŸ”‹


🌸 NAME 🌸

struct ec_response_battery_dynamic_info β€” the Battery dynamic info response. that's it, that's the vibe πŸ’…


✨ SYNOPSIS ✨

here's the whole thing, exactly as it lives in the source, no notes:

struct ec_response_battery_dynamic_info {
    int16_t actual_voltage;
    int16_t actual_current;
    int16_t remaining_capacity;
    int16_t full_capacity;
    int16_t flags;
    int16_t desired_voltage;
    int16_t desired_current;
 };

it's giving "seven int16_t fields and a dream" πŸŽ€ every single one is int16_t, so do NOT go cramming your huge numbers in there, bestie, i'm warning you 🫢


πŸ¦‹ Members πŸ¦‹

okay so let's meet the cast, one field at a time, like a little reality show lineup πŸ‘‘

  • actual_voltage β€” Battery voltage, measured in <cyan>mV</cyan>. this is the "what's actually happening right now" number, the main character of the voltage world πŸ’–
  • actual_current β€” Battery current in <cyan>mA</cyan> β€” and here's the important lil detail: negative = discharging 😭 so if you see a minus sign, the battery's giving, not receiving. the way that sign flips the whole meaning… iconic.
  • remaining_capacity β€” Remaining capacity, in <cyan>mAh</cyan>. your "how much juice is left" girlie πŸ§ƒ
  • full_capacity β€” Capacity in <cyan>mAh</cyan>, and yes, the original is very clear on this: it might change occasionally πŸ™ˆ so don't you dare hardcode it and act surprised later.
  • flags β€” Flags! see EC_BATT_FLAG_*. that's the whole description, go look at the constants, i believe in you 🫢✨
  • desired_voltage β€” Charging voltage desired by battery, in <cyan>mV</cyan>. this is the battery manifesting its voltage goals ⭐
  • desired_current β€” Charging current desired by battery, in <cyan>mA</cyan>. same energy, current edition πŸ”₯
ngl the pattern here is actual vs desired β€” what's happening vs what the battery wishes were happening. it's giving vision board vs reality check πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

bestie this list is LONG and i'm not skipping a single one of these, periodt. first up, the kernel file everything lives in:

Kernel file ./include/linux/platform_data/cros_ec_commands.h

and now, the full extended fam 🌈 β€” every single one, in order, no cuts:

  • struct ec_lpc_host_args(9)
  • struct ec_host_request(9)
  • struct ec_host_response(9)
  • struct ec_response_proto_version(9)
  • struct ec_params_hello(9)
  • struct ec_response_hello(9)
  • struct ec_response_get_version(9)
  • struct ec_params_read_test(9)
  • struct ec_response_read_test(9)
  • struct ec_response_get_chip_info(9)
  • struct ec_response_board_version(9)
  • struct ec_params_read_memmap(9)
  • struct ec_params_get_cmd_versions(9)
  • struct ec_params_get_cmd_versions_v1(9)
  • struct ec_response_get_cmd_versions(9)
  • struct ec_response_get_comms_status(9)
  • struct ec_response_get_protocol_info(9)
  • struct ec_response_flash_info(9)
  • struct ec_response_flash_info_1(9)
  • struct ec_params_flash_read(9)
  • struct ec_params_flash_write(9)
  • struct ec_params_flash_erase(9)
  • struct ec_params_flash_erase_v1(9)
  • struct ec_params_flash_protect(9)
  • struct ec_response_flash_protect(9)
  • struct ec_params_flash_region_info(9)
  • struct ec_params_flash_select(9)
  • struct ec_params_cec_write(9)
  • struct ec_params_cec_write_v1(9)
  • struct ec_params_cec_read(9)
  • struct ec_response_cec_read(9)
  • struct ec_params_cec_set(9)
  • struct ec_params_cec_get(9)
  • struct ec_response_cec_get(9)
  • struct ec_response_cec_port_count(9)
  • struct ec_params_battery_static_info(9)
  • struct ec_response_battery_static_info(9)
  • struct ec_params_battery_dynamic_info(9)
  • struct ec_params_charger_control(9)

like i said. the whole family reunion πŸŽ€ and yes, ec_params_battery_dynamic_info(9) is right there next to us, they're siblings, it's cute πŸ’œ


✨ that's the whole page, bestie ✨ this one shipped from <purple>./include/linux/platform_data</purple> back in <lavender>October 2026</lavender>, so if you're reading it later than that, congratulations on your excellent archival instincts 🧚 go forth and read your battery's dynamic info responsibly πŸ’…πŸ”‹πŸ«Ά

πŸ“¦ where this page comes from