Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

/sys/class/chromeos

FieldValue
SubsystemChromeOS EC class (embedded controller devices under drivers/platform/chrome); implementation file not in cached tree
Config gatenot verifiable from the cached sources (cached tree has no Kconfig or driver files); live host does not expose the class
ABI documentationDocumentation/ABI/testing/sysfs-class-chromeos plus driver files sysfs-class-chromeos-driver-cros-ec-lightbar and sysfs-class-chromeos-driver-cros-ec-vbc
Since4.2 (flashinfo, reboot, version, lightbar/*: August 2015); kb_wake_angle 4.17; usbpdmuxinfo/ap_mode_entry February 2025 (no KernelVersion stated)
Live (5.10.134 host)class absent: not in live-sys/class-list.txt, no /sys/class/chromeos
Ledger IDSYSC-chromeos

What it represents

One directory per ChromeOS embedded controller (EC) device, named by the EC device name (for example cros_ec). The EC is a microcontroller that manages keyboard, battery charging, fans and similar platform hardware independently of the CPU. The class exposes EC identity, flash layout, reboot control and EC-feature knobs; two driver-specific sub-trees (lightbar, verified boot context) are documented in their own ABI files. The 2025 additions (usbpdmuxinfo, ap_mode_entry) show the class is still growing around Type-C/USB4 role negotiation between the AP and the EC.

Relationship to the device model

Each <ec-device-name> directory is a class view of an EC device registered by the ChromeOS EC drivers. The class holds no bus of its own; the files below are attributes attached to the EC device. The lightbar files appear only when the cros-ec-lightbar driver is bound, and vbc/vboot_context only when the cros-ec-vbc driver is present, so the per-device file set is driver-conditional.

Attributes

AttributeR/WUnit/formatConditional?Source
<ec>/flashinfoROEC flash informationalwaysABI sysfs-class-chromeos, 4.2
<ec>/kb_wake_angleRWdegrees 0-360; keyboard-wake lid anglealwaysABI, 4.17
<ec>/rebootWOcancel, ro, rw, cold, disable-jump, hibernate, at-shutdownalwaysABI, 4.2
<ec>/versionROEC software and hardware versionalwaysABI, 4.2
cros_ec/usbpdmuxinfoROper-Type-C-port flags: USB, DP, POLARITY, HPD_IRQ, HPD_LVL, SAFE, TBT, USB4cros_ecABI, February 2025
cros_ec/ap_mode_entryROwhether the EC waits for AP direction for Type-C altmodes/USB4cros_ecABI, February 2025
<ec>/lightbar/brightnessRW0-255 overall brightnesslightbar driverABI driver file, 4.2
<ec>/lightbar/interval_msecROms rate limit between lightbar accesseslightbar driverABI driver file, 4.2
<ec>/lightbar/led_rgbRWLED,RED,GREEN,BLU quadruples, 0-255; LED 4 = all segmentslightbar driverABI driver file, 4.2
<ec>/lightbar/programWOcustom lightbar sequence uploadlightbar driverABI driver file, 4.2
<ec>/lightbar/sequenceRWcurrent/selected built-in sequencelightbar driverABI driver file, 4.2
<ec>/lightbar/userspace_controlRWtake control away from kernel sequenceslightbar driverABI driver file, 4.2
<ec>/lightbar/versionROlightbar versionlightbar driverABI driver file, 4.2
<ec>/vbc/vboot_contextRWverified-boot context in EC NVRAMcros-ec-vbc driverABI driver file, 4.4

Safety and writes

Reads are safe but rate-limited: the ABI states the EC throttles all lightbar accesses to interval_msec milliseconds, and reads block until the interval lapses. reboot directs the EC itself to jump between RO/RW images, cold-reboot or hibernate it; a wrong write can disturb the machine’s power management. kb_wake_angle and vboot context change persisted platform behavior. Treat every write as root-only system administration on ChromeOS hardware.

References

  • Documentation/ABI/testing/sysfs-class-chromeos (cached copy; 6 What entries)
  • Documentation/ABI/testing/sysfs-class-chromeos-driver-cros-ec-lightbar, ...-driver-cros-ec-vbc (cached copies)
  • drivers/platform/chrome/ implementation: not in cached tree
  • Live check: /sys/class/chromeos absent (kernel 5.10.134, read-only enumeration)
  • Sibling pages: power_supply; coverage: ledger