STRUCT PMIC_ARB_VER_OPS(9)
πΈ 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 channelsget_bus_resourcesβ requests per-SPMI bus register resourcesinit_apidβ finds the apid base and countppid_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 hardwareowner_acc_statusβ on v1, address ofPMIC_ARB_SPMI_PIC_OWNERm_ACC_STATUSn; on v2, address ofSPMI_PIC_OWNERm_ACC_STATUSn.acc_enableβ on v1, address ofPMIC_ARB_SPMI_PIC_ACC_ENABLEn; on v2, address ofSPMI_PIC_ACC_ENABLEn.irq_statusβ on v1, address ofPMIC_ARB_SPMI_PIC_IRQ_STATUSn; on v2, address ofSPMI_PIC_IRQ_STATUSn.irq_clearβ on v1, address ofPMIC_ARB_SPMI_PIC_IRQ_CLEARn; on v2, address ofSPMI_PIC_IRQ_CLEARn.apid_map_offsetβ offset ofPMIC_ARB_REG_CHNLnapid_ownerβ on v2 and later, address ofSPMI_PERIPHn_2OWNER_TABLE_REGcheck_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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms