Home
last modified time | relevance | path

Searched refs:spmi_controller (Results 1 – 6 of 6) sorted by relevance

/linux-6.12.1/drivers/spmi/
Dhisi-spmi-controller.c75 struct spmi_controller *controller;
111 static int spmi_read_cmd(struct spmi_controller *ctrl, in spmi_read_cmd()
114 struct spmi_controller_dev *spmi_controller = dev_get_drvdata(&ctrl->dev); in spmi_read_cmd() local
115 u32 chnl_ofst = SPMI_CHANNEL_OFFSET * spmi_controller->channel; in spmi_read_cmd()
150 spin_lock_irqsave(&spmi_controller->lock, flags); in spmi_read_cmd()
152 writel(cmd, spmi_controller->base + chnl_ofst + SPMI_APB_SPMI_CMD_BASE_ADDR); in spmi_read_cmd()
154 rc = spmi_controller_wait_for_done(&ctrl->dev, spmi_controller, in spmi_read_cmd()
155 spmi_controller->base, slave_id, slave_addr); in spmi_read_cmd()
160 data = readl(spmi_controller->base + chnl_ofst + in spmi_read_cmd()
175 spin_unlock_irqrestore(&spmi_controller->lock, flags); in spmi_read_cmd()
[all …]
Dspmi-devres.c11 spmi_controller_put(*(struct spmi_controller **)res); in devm_spmi_controller_release()
14 struct spmi_controller *devm_spmi_controller_alloc(struct device *parent, size_t size) in devm_spmi_controller_alloc()
16 struct spmi_controller **ptr, *ctrl; in devm_spmi_controller_alloc()
37 spmi_controller_remove(*(struct spmi_controller **)res); in devm_spmi_controller_remove()
40 int devm_spmi_controller_add(struct device *parent, struct spmi_controller *ctrl) in devm_spmi_controller_add()
42 struct spmi_controller **ptr; in devm_spmi_controller_add()
Dspmi.c36 struct spmi_controller *ctrl = to_spmi_controller(dev); in spmi_ctrl_release()
64 struct spmi_controller *ctrl = sdev->ctrl; in spmi_device_add()
94 spmi_cmd(struct spmi_controller *ctrl, u8 opcode, u8 sid) in spmi_cmd()
106 static inline int spmi_read_cmd(struct spmi_controller *ctrl, u8 opcode, in spmi_read_cmd()
120 static inline int spmi_write_cmd(struct spmi_controller *ctrl, u8 opcode, in spmi_write_cmd()
417 struct spmi_device *spmi_device_alloc(struct spmi_controller *ctrl) in spmi_device_alloc()
444 struct spmi_controller *spmi_controller_alloc(struct device *parent, in spmi_controller_alloc()
447 struct spmi_controller *ctrl; in spmi_controller_alloc()
480 static void of_spmi_register_devices(struct spmi_controller *ctrl) in of_spmi_register_devices()
539 int spmi_controller_add(struct spmi_controller *ctrl) in spmi_controller_add()
[all …]
Dspmi-mtk-pmif.c289 static int pmif_arb_cmd(struct spmi_controller *ctrl, u8 opc, u8 sid) in pmif_arb_cmd()
311 static int pmif_spmi_read_cmd(struct spmi_controller *ctrl, u8 opc, u8 sid, in pmif_spmi_read_cmd()
378 static int pmif_spmi_write_cmd(struct spmi_controller *ctrl, u8 opc, u8 sid, in pmif_spmi_write_cmd()
452 struct spmi_controller *ctrl; in mtk_spmi_probe()
521 struct spmi_controller *ctrl = platform_get_drvdata(pdev); in mtk_spmi_remove()
Dspmi-pmic-arb.c162 struct spmi_controller *spmic;
236 int (*non_data_cmd)(struct spmi_controller *ctrl, u8 opc, u8 sid);
290 static int pmic_arb_wait_for_done(struct spmi_controller *ctrl, in pmic_arb_wait_for_done()
342 pmic_arb_non_data_cmd_v1(struct spmi_controller *ctrl, u8 opc, u8 sid) in pmic_arb_non_data_cmd_v1()
368 pmic_arb_non_data_cmd_v2(struct spmi_controller *ctrl, u8 opc, u8 sid) in pmic_arb_non_data_cmd_v2()
374 static int pmic_arb_cmd(struct spmi_controller *ctrl, u8 opc, u8 sid) in pmic_arb_cmd()
421 static int pmic_arb_read_cmd_unlocked(struct spmi_controller *ctrl, u32 cmd, in pmic_arb_read_cmd_unlocked()
445 static int pmic_arb_read_cmd(struct spmi_controller *ctrl, u8 opc, u8 sid, in pmic_arb_read_cmd()
502 static int pmic_arb_write_cmd_unlocked(struct spmi_controller *ctrl, u32 cmd, in pmic_arb_write_cmd_unlocked()
523 static int pmic_arb_write_cmd(struct spmi_controller *ctrl, u8 opc, u8 sid, in pmic_arb_write_cmd()
[all …]
/linux-6.12.1/include/linux/
Dspmi.h41 struct spmi_controller *ctrl;
60 struct spmi_device *spmi_device_alloc(struct spmi_controller *ctrl);
80 struct spmi_controller { struct
83 int (*cmd)(struct spmi_controller *ctrl, u8 opcode, u8 sid); argument
84 int (*read_cmd)(struct spmi_controller *ctrl, u8 opcode, argument
86 int (*write_cmd)(struct spmi_controller *ctrl, u8 opcode, argument
90 static inline struct spmi_controller *to_spmi_controller(struct device *d) in to_spmi_controller()
92 return container_of(d, struct spmi_controller, dev); in to_spmi_controller()
96 void *spmi_controller_get_drvdata(const struct spmi_controller *ctrl) in spmi_controller_get_drvdata()
101 static inline void spmi_controller_set_drvdata(struct spmi_controller *ctrl, in spmi_controller_set_drvdata()
[all …]