STRUCT DS1685_PRIV(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ NAME

okay bestie, gather round β€” struct ds1685_priv is literally the DS1685 private data structure. that's it, that's the whole vibe. it's the little private stash of info the driver keeps about itself πŸŽ€


✨ SYNOPSIS

here's the whole glow-up, copied exactly, no cap:

struct ds1685_priv {
    struct rtc_device *dev;
    void __iomem *regs;
    void __iomem *data;
    u32 regstep;
    int irq_num;
    bool bcd_mode;
    u8 (*read)(struct ds1685_priv *, int);
    void (*write)(struct ds1685_priv *, int, u8);
    void (*prepare_poweroff)(void);
    void (*wake_alarm)(void);
    void (*post_ram_clear)(void);
};

like… look at her. main character struct energy fr fr πŸ‘‘


🌸 Members

okay so the manual walks through these ones, and only these ones β€” i'm not out here making stuff up about the other fields, iykyk 😌

  • dev β€” a pointer to the rtc_device structure. literally just pointing at her rtc buddy 🫢
  • regs β€” the iomapped base address pointer of the RTC registers. the home address of all the register gossip πŸ’…
  • regstep β€” the padding/step size between registers. it's optional, so don't come for her if she's not around 🌸
  • prepare_poweroff β€” pointer to the platform pre-poweroff function. the "we're about to go night-night" hook πŸ’€
  • wake_alarm β€” pointer to the platform wake alarm function. the "rise and shine bestie" hook ⏰
  • post_ram_clear β€” pointer to the platform post ram-clear function. the "so the ram's been cleared, now what" hook 🧹
ngl, the struct in the synopsis also has data, irq_num, bcd_mode, read, and write chilling in there β€” they're in the struct, bestie, they're just not described in the Members list. facts only, no inventing πŸ”₯

πŸ¦‹ SEE ALSO

go read these next, they're giving required reading πŸ“š

  • Kernel file ./include/linux/rtc/ds1685.h struct
  • ds1685_rtc_platform_data(9)

and that's the page!! πŸŽ€ this one's from ./include/linux/rtc, dated October 2026, and yeah the doc itself is labeled struct ds1685_priv(9) β€” slay, go read the source, ily, bye πŸ’–βœ¨

πŸ“¦ where this page comes from