spmi: add a helper to look up an SPMI device from a device node
authorCaleb Connolly <caleb.connolly@linaro.org>
Fri, 29 Apr 2022 22:08:56 +0000 (23:08 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 18 Jun 2022 12:48:19 +0000 (13:48 +0100)
commit9a2139c2912ea64e288749c21452930dc752d4fd
tree909b1e94cac85cdb1a7860d1cf080d04a44ba610
parentf2906aa863381afb0015a9eb7fefad885d4e5a56
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>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20220429220904.137297-2-caleb.connolly@linaro.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/spmi/spmi.c
include/linux/spmi.h