STRUCT EC_PARAMS_CHARGER_CONTROL(9)
π 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 tomax_currentand (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 ifmax_currentis>= 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 ifmax_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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms