cros_ec_keyb_info(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 β€” either EC_MKBP_INFO_SUPPORTED or EC_MKBP_INFO_CURRENT. pick one, bestie, no third option 😌
  • event_type β€” either EC_MKBP_EVENT_BUTTON or EC_MKBP_EVENT_SWITCH. and ngl? in some cases this could also be EC_MKBP_EVENT_KEY_MATRIX or EC_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 πŸ¦‹

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