Lines Matching +full:slave +full:- +full:addr
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
11 /* Maximum slave identifier */
34 * struct spmi_device - Basic representation of an SPMI device
37 * @usid: This devices' Unique Slave IDentifier.
52 return dev_get_drvdata(&sdev->dev); in spmi_device_get_drvdata()
57 dev_set_drvdata(&sdev->dev, data); in spmi_device_set_drvdata()
65 put_device(&sdev->dev); in spmi_device_put()
73 * struct spmi_controller - interface to the SPMI master controller
75 * @nr: board-specific number identifier for this controller/bus
76 * @cmd: sends a non-data command sequence on the SPMI bus.
85 u8 sid, u16 addr, u8 *buf, size_t len);
87 u8 sid, u16 addr, const u8 *buf, size_t len);
98 return dev_get_drvdata(&ctrl->dev); in spmi_controller_get_drvdata()
104 dev_set_drvdata(&ctrl->dev, data); in spmi_controller_set_drvdata()
111 * spmi_controller_put() - decrement controller refcount
117 put_device(&ctrl->dev); in spmi_controller_put()
127 * struct spmi_driver - SPMI slave device driver
133 * If PM runtime support is desired for a slave, a device driver can call
135 * pm_runtime_get() in remove()). PM runtime support for a slave is
136 * implemented by issuing a SLEEP command to the slave on runtime_suspend(),
137 * transitioning the slave into the SLEEP state. On runtime_resume(), a WAKEUP
138 * command is sent to the slave to bring it back to ACTIVE.
157 * spmi_driver_unregister() - unregister an SPMI client driver
163 driver_unregister(&sdrv->driver); in spmi_driver_unregister()
173 int spmi_register_read(struct spmi_device *sdev, u8 addr, u8 *buf);
174 int spmi_ext_register_read(struct spmi_device *sdev, u8 addr, u8 *buf,
176 int spmi_ext_register_readl(struct spmi_device *sdev, u16 addr, u8 *buf,
178 int spmi_register_write(struct spmi_device *sdev, u8 addr, u8 data);
180 int spmi_ext_register_write(struct spmi_device *sdev, u8 addr,
182 int spmi_ext_register_writel(struct spmi_device *sdev, u16 addr,