cros_ec_sens...er_push_data(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cros_ec_sens...er_push_data(9) β€” like, the Kernel API Manual, bestie ✨

okay so real talk, we're deep in the Kernel API Manual today and the star of the show is this icon cros_ec_sensorhub_register_push_data πŸŽ€ she's a function, she registers a callback to the hub, and honestly? main character energy. let's get into it 🫢


🌸 NAME 🌸

cros_ec_sensorhub_register_push_data β€” registers the callback to the hub. that's it, that's the vibe πŸ’–


✨ SYNOPSIS ✨

int cros_ec_sensorhub_register_push_data (struct cros_ec_sensorhub
*sensorhub , u8 sensor_num , struct iio_dev *indio_dev ,
cros_ec_sensorhub_push_data_cb_t cb );

like yes bestie we're returning an int, and we're taking four whole parameters. she's thorough πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • sensorhub β€” the Sensor Hub object itself. ur fave. the whole point πŸ’…
  • sensor_num β€” the sensor that the caller is interested in πŸ‘€ lowkey which one we're simping for.
  • indio_dev β€” the iio device to use when a sample arrives. she shows up when the data shows up ✨
  • cb β€” the callback to call when a sample arrives. this is the function we're literally trusting with the news πŸ“£

πŸ’€ DESCRIPTION πŸ’€

so the callback cb is gonna be used by cros_ec_sensorhub_ring to distribute events from the EC. that's the whole plot. no cap, that's it 🧚

like, cros_ec_sensorhub_ring handles the event distribution era and ur callback is the one catching them. team work makes the dream work, iykyk 🌈


πŸ”₯ RETURN πŸ”₯

  • 0 when callback is registered. slay, we love a clean success πŸŽ‰
  • EINVAL if the sensor number is invalid or the slot already used. 😭 yeah… that slot's taken bestie, no cap.

πŸ‘‘ SEE ALSO πŸ‘‘


ngl bestie, if sensor_num is invalid or that slot is already used, you're getting EINVAL back and there's no negotiating with her πŸ™ˆ check ur numbers before u ship, fr fr.

and that's the page! πŸ’œ brought to u straight from ./drivers/platform/chrome, dated October 2026 β€” future iconic, we love to see it βœ¨πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from