Home
last modified time | relevance | path

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

/kernel/linux/linux-5.10/drivers/staging/hikey9xx/
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 …]
/kernel/linux/linux-5.10/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 …]
/kernel/linux/linux-5.10/drivers/spmi/
Dspmi.c35 struct spmi_controller *ctrl = to_spmi_controller(dev); in spmi_ctrl_release()
62 struct spmi_controller *ctrl = sdev->ctrl; in spmi_device_add()
92 spmi_cmd(struct spmi_controller *ctrl, u8 opcode, u8 sid) in spmi_cmd()
104 static inline int spmi_read_cmd(struct spmi_controller *ctrl, u8 opcode, in spmi_read_cmd()
118 static inline int spmi_write_cmd(struct spmi_controller *ctrl, u8 opcode, in spmi_write_cmd()
386 struct spmi_device *spmi_device_alloc(struct spmi_controller *ctrl) in spmi_device_alloc()
413 struct spmi_controller *spmi_controller_alloc(struct device *parent, in spmi_controller_alloc()
416 struct spmi_controller *ctrl; in spmi_controller_alloc()
449 static void of_spmi_register_devices(struct spmi_controller *ctrl) in of_spmi_register_devices()
508 int spmi_controller_add(struct spmi_controller *ctrl) in spmi_controller_add()
[all …]
Dspmi-pmic-arb.c157 struct spmi_controller *spmic;
191 int (*non_data_cmd)(struct spmi_controller *ctrl, u8 opc, u8 sid);
242 static int pmic_arb_wait_for_done(struct spmi_controller *ctrl, in pmic_arb_wait_for_done()
292 pmic_arb_non_data_cmd_v1(struct spmi_controller *ctrl, u8 opc, u8 sid) in pmic_arb_non_data_cmd_v1()
317 pmic_arb_non_data_cmd_v2(struct spmi_controller *ctrl, u8 opc, u8 sid) in pmic_arb_non_data_cmd_v2()
323 static int pmic_arb_cmd(struct spmi_controller *ctrl, u8 opc, u8 sid) in pmic_arb_cmd()
336 static int pmic_arb_read_cmd(struct spmi_controller *ctrl, u8 opc, u8 sid, in pmic_arb_read_cmd()
389 static int pmic_arb_write_cmd(struct spmi_controller *ctrl, u8 opc, u8 sid, in pmic_arb_write_cmd()
1159 struct spmi_controller *ctrl; in spmi_pmic_arb_probe()
1330 struct spmi_controller *ctrl = platform_get_drvdata(pdev); in spmi_pmic_arb_remove()