STRUCT PMIC_ARB_VER_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 struct pmic_arb_ver_ops(9) 🌸

okay so this is the Kernel API Manual page for struct pmic_arb_ver_ops, and bestie, it is exactly what it sounds like: the little table of function pointers that lets this driver be like "oh you're on v1? bet. oh you're on v2? say less" πŸ’… version-dependent functionality, living its best polymorphic life.


✨ NAME ✨

struct pmic_arb_ver_ops β€” version dependent functionality.


πŸ¦‹ SYNOPSIS πŸ¦‹

struct pmic_arb_ver_ops {
    const char *ver_str;
    int (*get_core_resources)(struct platform_device *pdev, void __iomem
*core);
    int (*get_bus_resources)(struct platform_device *pdev, struct
device_node *node, struct spmi_pmic_arb_bus *bus);
    int (*init_apid)(struct spmi_pmic_arb_bus *bus, int index);
    int (*ppid_to_apid)(struct spmi_pmic_arb_bus *bus, u16 ppid);
    int (*offset)(struct spmi_pmic_arb_bus *bus, u8 sid, u16 addr, enum
pmic_arb_channel ch_type);
    u32 (*fmt_cmd)(u8 opc, u8 sid, u16 addr, u8 bc);
    int (*non_data_cmd)(struct spmi_controller *ctrl, u8 opc, u8 sid);
    void __iomem *(*owner_acc_status)(struct spmi_pmic_arb_bus *bus, u8
m, u16 n);
    void __iomem *(*acc_enable)(struct spmi_pmic_arb_bus *bus, u16 n);
    void __iomem *(*irq_status)(struct spmi_pmic_arb_bus *bus, u16 n);
    void __iomem *(*irq_clear)(struct spmi_pmic_arb_bus *bus, u16 n);
    u32 (*apid_map_offset)(u16 n);
    void __iomem *(*apid_owner)(struct spmi_pmic_arb_bus *bus, u16 n);
    int (*check_chnl_status)(struct spmi_controller *ctrl, u32 status,
u8 sid, u16 addr, u32 offset);
 };

like, look at all those function pointers 🫢 she's basically a vtable and she knows it.


πŸ‘‘ Members πŸ‘‘

okay, one by one, no skipping, we don't do that here:

  • ver_str β€” the version string. her name tag at the party πŸŽ€
  • get_core_resources β€” initializes the core, observer and channels
  • get_bus_resources β€” requests per-SPMI bus register resources
  • init_apid β€” finds the apid base and count
  • ppid_to_apid β€” finds the apid for a given ppid.
  • offset β€” on v1 it's the offset of per-ee channel. on v2 it's the offset of per-ee and per-ppid channel. glow-up fr πŸ’…
  • fmt_cmd β€” formats a GENI/SPMI command.
  • non_data_cmd β€” on v1 it issues an spmi non-data command. on v2, no HW support, so it returns -EOPNOTSUPP. 😭 not her getting ghosted by the hardware
  • owner_acc_status β€” on v1, address of PMIC_ARB_SPMI_PIC_OWNERm_ACC_STATUSn; on v2, address of SPMI_PIC_OWNERm_ACC_STATUSn.
  • acc_enable β€” on v1, address of PMIC_ARB_SPMI_PIC_ACC_ENABLEn; on v2, address of SPMI_PIC_ACC_ENABLEn.
  • irq_status β€” on v1, address of PMIC_ARB_SPMI_PIC_IRQ_STATUSn; on v2, address of SPMI_PIC_IRQ_STATUSn.
  • irq_clear β€” on v1, address of PMIC_ARB_SPMI_PIC_IRQ_CLEARn; on v2, address of SPMI_PIC_IRQ_CLEARn.
  • apid_map_offset β€” offset of PMIC_ARB_REG_CHNLn
  • apid_owner β€” on v2 and later, address of SPMI_PERIPHn_2OWNER_TABLE_REG
  • check_chnl_status β€” checks channel status and returns error code if any

🌈 SEE ALSO 🌈

Kernel file ./drivers/spmi/spmi-pmic-arb.c, struct spmi_pmic_arb_bus(9), struct spmi_pmic_arb(9), pmic_arb_read_data(9), pmic_arb_write_data(9) β€” go read those next, iykyk 🧚


heads up bestie: this page is literally just a struct + its member docs, so there's no extra lore hiding in here. what you see is what you get πŸ’–

and that's the whole page!! brought to you by the source in ./drivers/spmi πŸ’« dated October 2026 ⭐ slay, go forth and support all the versions πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from