STRUCT EC_RTC_WRITE_REQUEST(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

โœจ struct ec_rtc_write_request(9) โœจ

okay so bestie, welcome to the Kernel API Manual page for struct ec_rtc_write_request โ€” like, yes it lives in section 9, and yes it's a struct, we love that for us ๐Ÿ’…


๐ŸŽ€ NAME ๐ŸŽ€

struct ec_rtc_write_request โ€” it's literally the format of the RTC that gets sent to the EC. that's the whole vibe. no cap. ๐ŸŒธ


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

here's the whole thing, character for character, because we do not paraphrase struct definitions in this house ๐Ÿ‘‘

struct ec_rtc_write_request {
    u8 command;
    u8 reserved;
    u8 param;
    u8 century;
    u8 year;
    u8 month;
    u8 day;
    u8 hour;
    u8 minute;
    u8 second;
    u8 weekday;
 };

๐Ÿ’– Members ๐Ÿ’–

okay so let's meet the cast, one field at a time, main character energy only:

  • command โ€” always EC_COMMAND_CMOS. no notes. it's giving consistency โœจ
  • reserved โ€” an unused byte. it's just sitting there, being decorative, literally the wallflower of the struct ๐Ÿซถ
  • param โ€” always EC_CMOS_TOD_WRITE. iconic, unchanging, periodt.
  • century โ€” the century value, which is full year / 100. math but make it cute ๐Ÿงฎ
  • year โ€” the year value, aka full year % 100. the mod girlie of the group ๐Ÿ˜ญ
  • month โ€” month value, range 1..12 ๐Ÿ“
  • day โ€” day value, range 1..31 ๐ŸŒธ
  • hour โ€” hour value, range 0..23 โญ
  • minute โ€” minute value, range 0..59 ๐ŸŽ€
  • second โ€” second value, range 0..59 ๐Ÿฆ‹
  • weekday โ€” day of the week, and heads up bestie, it's 0=Saturday ๐Ÿ‘€ like, not Sunday. Saturday. iykyk ๐Ÿ’€

๐ŸŒˆ Description ๐ŸŒˆ

so the one thing you have to remember: all values are presented in BCD. that's it, that's the tea. lowkey important, don't forget it ๐Ÿ’œ


๐Ÿ”ฅ SEE ALSO ๐Ÿ”ฅ

go poke around these, bestie:

  • Kernel file ./drivers/rtc/rtc-wilco-ec.c
  • struct ec_rtc_read_response(9) โ€” yes there's a read one too, we stan a matching set ๐Ÿ‘‘

and that's the page!! ๐Ÿงš this lil treat comes to you from ./drivers/rtc, dated October 2026, under the Kernel API Manual umbrella โ€” struct ec_rtc_write_request(9) out, mwah, slay, bye bestie ๐Ÿ’–โœจ

๐Ÿ“ฆ where this page comes from