spmi: add a helper to look up an SPMI device from a device node
The helper function spmi_device_from_of() takes a device node and returns the SPMI device associated with it. This is like of_find_device_by_node but for SPMI devices. Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
This commit is contained in:
parent
60f70f81ba
commit
39331eb8a6
2 changed files with 20 additions and 0 deletions
|
|
@ -164,6 +164,9 @@ static inline void spmi_driver_unregister(struct spmi_driver *sdrv)
|
|||
module_driver(__spmi_driver, spmi_driver_register, \
|
||||
spmi_driver_unregister)
|
||||
|
||||
struct device_node;
|
||||
|
||||
struct spmi_device *spmi_device_from_of(struct device_node *np);
|
||||
int spmi_register_read(struct spmi_device *sdev, u8 addr, u8 *buf);
|
||||
int spmi_ext_register_read(struct spmi_device *sdev, u8 addr, u8 *buf,
|
||||
size_t len);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue