diff options
| author | André Draszik <andre.draszik@linaro.org> | 2025-03-27 15:54:28 +0300 |
|---|---|---|
| committer | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2025-04-22 10:50:06 +0300 |
| commit | a8dc26a0ec43fd416ca781a8030807e65f71cfc5 (patch) | |
| tree | 30cfe70a1583f1872c4c1d06faba9b8e361344c8 /include/linux | |
| parent | 636baba9489a634c956d6f02076af6bc1725c132 (diff) | |
| download | linux-a8dc26a0ec43fd416ca781a8030807e65f71cfc5.tar.xz | |
firmware: exynos-acpm: introduce devm_acpm_get_by_node()
To allow ACPM clients to simply be children of the ACPM node in DT,
they need to be able to get the ACPM handle based on that ACPM node
directly.
Add an API to allow them to do so, devm_acpm_get_by_node().
At the same time, the previous approach of acquiring the ACPM handle
via a DT phandle is now obsolete and we can remove
devm_acpm_get_by_phandle(), which was there to facilitate that. There
are no existing or anticipated upcoming users of that API, because all
clients should be children of the ACPM node going forward.
Note that no DTs have been merged that use the old approach, so doing
this API change in this driver now will not affect any existing DTs or
client drivers.
Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20250327-acpm-children-v1-2-0afe15ee2ff7@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/firmware/samsung/exynos-acpm-protocol.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/firmware/samsung/exynos-acpm-protocol.h b/include/linux/firmware/samsung/exynos-acpm-protocol.h index 76255b5d06b1..f628bf1862c2 100644 --- a/include/linux/firmware/samsung/exynos-acpm-protocol.h +++ b/include/linux/firmware/samsung/exynos-acpm-protocol.h @@ -11,6 +11,7 @@ #include <linux/types.h> struct acpm_handle; +struct device_node; struct acpm_pmic_ops { int (*read_reg)(const struct acpm_handle *handle, @@ -44,6 +45,7 @@ struct acpm_handle { struct device; -const struct acpm_handle *devm_acpm_get_by_phandle(struct device *dev, - const char *property); +const struct acpm_handle *devm_acpm_get_by_node(struct device *dev, + struct device_node *np); + #endif /* __EXYNOS_ACPM_PROTOCOL_H */ |
