STRUCT RESPONSE_INFO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct response_info(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual, section 9 β€” yes, the big-league kernel section, we love to see it. this little cutie is called struct response_info and it is literally the vibe translator for EC responses πŸ¦‹


✨ NAME ✨

struct response_info β€” encapsulates EC response related information so it can be passed between cros_ec_uart_pkt_xfer() and the cros_ec_uart_rx_bytes() callback. it's giving middleware icon, honestly πŸ‘‘


✨ SYNOPSIS ✨

struct response_info {
    void *data;
    size_t max_size;
    size_t size;
    size_t exp_len;
    int status;
    wait_queue_head_t wait_queue;
 };

look at her. six members. no cap, she's perfect πŸŽ€


🌸 Members 🌸

  • data β€” copy the data you received from the EC into here, bestie. that's her whole job. drop it in πŸ’…
  • max_size β€” the max size allocated for the data buffer. if the received data exceeds this value, we log an error. so like… respect the limit fr fr πŸ™ˆ
  • size β€” actual size of data received from EC. this one is also used to accumulate the byte count when the response is received in dma chunks β€” yes she multitasks, main character energy ⭐
  • exp_len β€” expected bytes of response from EC, including the header. don't forget the header, iykyk 🧚
  • status β€” re-init to 0 before sending a cmd. updated to 1 when a response is successfully received, or to an error number on failure. she's a clean slate every time, we stan 🌈
  • wait_queue β€” wait queue for the EC response, where the cros_ec sends the request to EC and waits. lowkey the most dramatic member β€” she just sits there, waiting πŸ˜­πŸ’€

πŸ”₯ SEE ALSO πŸ”₯

  • Kernel file ./drivers/platform/chrome/cros_ec_uart.c and struct cros_ec_uart(9) β€” go read the source, bestie, it's good for you 🫢

quick vibe check: nothing here is deprecated or dangerous, she's just a struct doing her best ✨

and that's the whole page πŸ’œ brought to you by the source in ./drivers/platform/chrome, dated October 2026, and yes β€” struct response_info(9), periodt πŸŽ€πŸ‘‘

πŸ“¦ where this page comes from