STRUCT EC_PARAMS_CHARGER_CONTROL(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct ec_params_charger_control(9) β€” Charger control parameters ✨

okay so welcome to the Kernel API Manual, bestie 🫢 this one's a little struct that tells your Chromebook EC how to do charger things β€” how much current, what OTG voltage, and whether the base is allowed to charge. tiny struct, big main character energy πŸ‘‘


🌸 NAME 🌸

struct ec_params_charger_control β€” charger control parameters, literally the vibes you send to the EC to control charging πŸ”Œ


✨ SYNOPSIS ✨

struct ec_params_charger_control {
    int16_t max_current;
    uint16_t otg_voltage;
    uint8_t allow_charging;
 };
ngl the indentation on that closing brace is exactly how the original has it, so we're keeping it, no notes πŸ’€

πŸŽ€ Members πŸŽ€

  • max_current β€” the charger current, in mA. positive means "go off, let the base draw up to max_current and (possibly) charge the battery" πŸ”‹ negative means you're flipping it and requesting current from the base β€” that's OTG mode, iykyk.
  • otg_voltage β€” the voltage in mV to use when you're in OTG mode. but bestie, it's fully ignored if max_current is >= 0 β€” it only matters when you're pulling current the other way πŸ™ˆ
  • allow_charging β€” whether the base battery is allowed to charge. and like, it only makes sense if max_current > 0, otherwise it's just a number doing nothing 🧚

πŸ¦‹ SEE ALSO πŸ¦‹

the whole friend group 🫢 β€” kernel file ./include/linux/platform_data/cros_ec_commands.h, plus:

  • 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_response_battery_dynamic_info(9)

that's the whole page, you ate that πŸ’…βœ¨

this lil baddie lives over in ./include/linux/platform_data, and it was serving October 2026 energy when this page got written β€” mwah, see u next time bestie πŸŽ€πŸ’–

πŸ“¦ where this page comes from