STRUCT CROS_EC_DEV(9)
β¨ struct cros_ec_dev(9) β¨
okay so bestie, this is a page from the Kernel API Manual (yes, the β¨*Kernel API Manual*β¨, we love a formal queen) and it's all about struct cros_ec_dev β the ChromeOS EC device entry point. that's it, that's the vibe. it's the lil' doorway your kernel knocks on to talk to the Embedded Controller. π
π¦ SYNOPSIS π¦
here's the struct in all its glory, copy it exactly bestie, character for character, no freestyling:
struct cros_ec_dev {
struct device class_dev;
const struct attribute_group *group;
struct cros_ec_device *ec_dev;
struct device *dev;
struct cros_ec_debugfs *debug_info;
bool has_kb_wake_angle;
u16 cmd_offset;
struct ec_response_get_features features;
};
π Members π
okay so every field gets its moment, no one is getting skipped, we don't do that here π
class_devβ theDevicestructure used in sysfs. it's giving "this is how I show up in sysfs" main character energy β¨groupβ the sysfs attributes groups for this EC. your little collection of sysfs attrs, all bundled up πec_devβ thecros_ec_devicestructure to talk to the physical device. this is the actual line to the hardware, the realness π₯devβ pointer to the platform device. just a lil' pointer, keeping it lowkey πdebug_infoβ thecros_ec_debugfsstructure for debugging information. for when something's acting sus and you need the receipts πhas_kb_wake_angleβTrueif at least 2 accelerometer are connected to the EC. (yes, "accelerometer" is singular in the original and we are NOT correcting it, periodt π)cmd_offsetβ offset to apply for each command. every command gets this lil' shift applied, no cap πfeaturesβ features supported by the EC. it's theec_response_get_featuresmoment, iykyk β
π SEE ALSO π
go read these next bestie, the lore is deep π«Ά
- Kernel file
./include/linux/platform_data/cros_ec_proto.h - struct
cros_ec_command(9) struct cros_ec_device(9)struct cros_ec_platform(9)cros_ec_get_time_ns(9)
and that's the whole page, you ate it up π
little sign-off from the source: this page lives under./include/linux/platform_data, dated October 2026, and it's literally titledstruct cros_ec_dev(9). iconic. slay. bye 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