5 * struct dm_spmi_ops - SPMI device I/O interface
7 * Should be implemented by UCLASS_SPMI device drivers. The standard
8 * device operations provides the I/O interface for it's childs.
10 * @read: read register 'reg' of slave 'usid' and peripheral 'pid'
11 * @write: write register 'reg' of slave 'usid' and peripheral 'pid'
13 * Each register is 8-bit, both read and write can return negative values
17 int (*read)(struct udevice *dev, int usid, int pid, int reg);
18 int (*write)(struct udevice *dev, int usid, int pid, int reg,
23 * spmi_reg_read() - read a register from specific slave/peripheral
25 * @dev: SPMI bus to read
28 * @reg: Register to read
29 * Return: value read on success or negative value of errno.
31 int spmi_reg_read(struct udevice *dev, int usid, int pid, int reg);
34 * spmi_reg_write() - write a register of specific slave/peripheral
36 * @dev: SPMI bus to write
39 * @reg: Register to write
40 * @value: Value to write
41 * Return: 0 on success or negative value of errno.
43 int spmi_reg_write(struct udevice *dev, int usid, int pid, int reg,