STRUCT AB8500(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct ab8500(9) β€” like, the ab8500 internal structure, bestie πŸ’–

okay so this is a page from the Kernel API Manual, and it's all about struct ab8500 β€” literally the ab8500 internal structure. it's giving "driver guts" and honestly i'm obsessed 🫢


✨ NAME ✨

struct ab8500 β€” ab8500 internal structure. that's it, that's the whole vibe πŸ’…


🌸 SYNOPSIS 🌸

struct ab8500 {
    struct device   *dev;
    struct mutex    lock;
    struct mutex    irq_lock;
    atomic_t transfer_ongoing;
    int irq;
    struct irq_domain  *domain;
    enum ab8500_version version;
    u8 chip_id;
    int (*write)(struct ab8500 *ab8500, u16 addr, u8 data);
    int (*write_masked)(struct ab8500 *ab8500, u16 addr, u8 mask, u8
data);
    int (*read)(struct ab8500 *ab8500, u16 addr);
    unsigned long   tx_buf[4];
    unsigned long   rx_buf[4];
    u8 *mask;
    u8 *oldmask;
    int mask_size;
    const int *irq_reg_offset;
    int it_latchhier_num;
 };

no cap, that's the whole struct. every field, not one skipped, because we do not leave members behind in this house πŸŽ€


πŸ¦‹ MEMBERS πŸ¦‹

okay bestie, field-by-field tour, let's GO πŸ”₯

  • dev β€” parent device. the main character, the one it answers to πŸ’œ
  • lock β€” read/write operations lock. guards the actual data moves πŸ”’
  • irq_lock β€” genirq bus lock. yes it's a second lock, she's got layers ✨
  • transfer_ongoing β€” 0 if no transfer ongoing. literally a "is anybody home" flag πŸ™ˆ
  • irq β€” irq line. the actual interrupt line, iconic 🌈
  • version β€” chip version id (e.g. ab8500 or ab9540). which chip era we're in ⭐
  • chip_id β€” chip revision id. tiny little revision number, but she matters πŸ“
  • write β€” register write. the functor that actually writes πŸ“
  • write_masked β€” masked register write. writing but selectively, picky queen πŸ’…
  • read β€” register read. yep, the read one 🌸
  • tx_buf β€” tx buf for SPI. transmit buffer for SPI πŸ’–
  • rx_buf β€” rx buf for SPI. receive buffer for SPI, the twin 🫢
  • mask β€” cache of IRQ regs for bus lock. cached IRQ regs, for the bus lock 🧚
  • oldmask β€” cache of previous IRQ regs for bus lock. the previous cached IRQ regs, also for the bus lock πŸ‘‘
  • mask_size β€” Actual number of valid entries in mask[], oldmask[] and irq_reg_offset. like, the real count of what's actually valid in there, no fake entries πŸ”₯
  • irq_reg_offset β€” Array of offsets into IRQ registers. an array, and it's full of offsets into the IRQ registers πŸ’€
  • it_latchhier_num β€” ok so this one's just chillin' in the struct with no description on the page. i'm not gonna invent lore for her, that would be lying and we don't do that πŸŽ€

πŸ‘‘ SEE ALSO πŸ‘‘

go look at these, iykyk:

  • Kernel file ./include/linux/mfd/abx500/ab8500.h
  • struct ab8500_platform_data(9)

fr fr: every field name and type above is copy-pasted exactly from the source, so don't come for me if your u8 count is off β€” it's not, it's just a lot πŸ’€

and that's the page!! πŸ’– stay slay, keep your locks balanced, and may your transfers never be "ongoing" forever βœ¨πŸŽ€πŸ¦‹

this lil gem comes from ./include/linux/mfd/abx500, dated October 2026, and she's filed as struct ab8500(9) β€” mwah, bye bestie πŸ’œπŸŒΈ

πŸ“¦ where this page comes from