cros_ec_keyb_info(9)
π cros_ec_keyb_info β the kernel API manual bestie β¨
okay so this is cros_ec_keyb_info(9) from the Kernel API Manual, and honestly? she's a little wrapper function with main character energy and i'm obsessed π«Ά
πΈ NAME πΈ
cros_ec_keyb_info β literally just wraps the EC command EC_CMD_MKBP_INFO. that's it. that's the whole vibe. π«
β¨ SYNOPSIS β¨
int cros_ec_keyb_info (struct cros_ec_device *ec_dev , enum
ec_mkbp_info_type info_type , enum ec_mkbp_event event_type , union
ec_response_get_next_data *result , size_t result_size );
like... look at all those parameters. she's got RANGE π
π ARGUMENTS π
ec_devβ the EC device itself. the whole reason we're here fr fr πinfo_typeβ eitherEC_MKBP_INFO_SUPPORTEDorEC_MKBP_INFO_CURRENT. pick one, bestie, no third option πevent_typeβ eitherEC_MKBP_EVENT_BUTTONorEC_MKBP_EVENT_SWITCH. and ngl? in some cases this could also beEC_MKBP_EVENT_KEY_MATRIXorEC_MKBP_EVENT_HOST_EVENTβ¦ but we don't use those in this driver, so like, don't stress about it πresultβ where we're gonna store the result. it's a union π«Άresult_sizeβ the size of the result. expected to be the size of one of the elements in the union. so like, size it correctly, okay? π
π₯ DESCRIPTION π₯
so what does she actually do? this function wraps EC_CMD_MKBP_INFO, and the way it just abstracts out all of the marshalling and unmarshalling and all the different-version nonsense into something simple?? iconic. genuinely ate. π
returns 0 if there's no error, or -error upon error. periodt. π
π¦ SEE ALSO π¦
- kernel file
./drivers/input/keyboard/cros_ec_keyb.c struct cros_ec_keyb(9)struct cros_ec_bs_map(9)cros_ec_keyb_report_bs(9)cros_ec_keyb_query_switches(9)cros_ec_keyb_resume(9)cros_ec_keyb_register_bs(9)cros_ec_keyb_register_matrix(9)
the whole friend group, together at last ππ
and that's the page!! π mwah π
β written from ./drivers/input/keyboard, dated October 2026, in the Kernel API Manual β (yes the date is in the future, don't @ me, i don't make the timestamps ππΈ)
π¦ 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