ds1685_rtc_get_ssn(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– ds1685_rtc_get_ssn β€” the Kernel API Manual page, bestie edition πŸ’–

okay so this is a section 9 kernel API manual page, which literally means it's documenting a kernel function, not a command you type in your terminal. and the function is ds1685_rtc_get_ssn, and yes it's exactly as iconic as it sounds πŸŽ€

✨ NAME ✨

ds1685_rtc_get_ssn β€” retrieve the silicon serial number. that's it. that's the whole job. she fetches the ssn and she does it slayfully πŸ’…

🌸 SYNOPSIS 🌸

void ds1685_rtc_get_ssn (struct ds1685_priv *rtc , u8 *ssn );

no return value, she just does the thing. void queen behavior fr fr πŸ‘‘

πŸ¦‹ ARGUMENTS πŸ¦‹

  • rtc β€” pointer to the ds1685 rtc structure. like, the actual rtc object, hand her the pointer bestie 🫢
  • ssn β€” a u8 array that's gonna hold the bits of the silicon serial number. so bring a bucket, she's pouring bytes into it πŸ“

πŸ”₯ DESCRIPTION πŸ”₯

so the number starts at 0x40 and it's 8-bytes long, ending at 0x47. lowkey a little address range, highkey important ✨

here's the breakdown of those 8 bytes, and it's giving struct energy:

  • the first byte is the model number
  • the next six bytes are the serial number digits
  • the final byte is a CRC check byte

and together? together they form the silicon serial number. the whole squad πŸ˜­πŸ’–

⚠️ okay this part is the vibe check that actually matters: these values are stored in bank1. so ds1685_rtc_switch_to_bank1 must be called first before calling this function. if you don't, the data will be read out of the bank0 NVRAM instead, which is not what you want, ngl. and be sure to call ds1685_rtc_switch_to_bank0 when you're done β€” clean up after yourself, we love a responsible main character 🌈

πŸ‘‘ SEE ALSO πŸ‘‘

kernel file ./drivers/rtc/rtc-ds1685.c β€” plus the whole friend group right here, no cap:


and that's the page!! πŸ’œ this little beauty lives at ./drivers/rtc, dated October 2026, and she's catalogued as ds1685_rtc_get_ssn(9). go switch to bank1, read your bytes, switch back to bank0, and slay the day bestie πŸ§šβ­πŸ™ˆ

πŸ“¦ where this page comes from