[PATCH 0/5] spmi: Add and use managed resource helpers
Fei Shao
fshao at chromium.org
Thu Aug 24 03:40:07 PDT 2023
Hi,
This series adds and converts to the devm_* helpers in the SPMI driver,
based on the suggestion in [1].
While at it, I have some patches fixing other minor issues as well, like
reordering the remove sequence in spmi-mtk-pmif and using proper error
return code etc.
This patch is based on next-20230824 and [2] which is not yet applied,
in order to avoid potential conflicts.
[1]: https://lore.kernel.org/all/20230821033532.GA21555@google.com/
[2]: https://lore.kernel.org/all/20230717173934.1.If004a6e055a189c7f2d0724fa814422c26789839@changeid/
Fei Shao (5):
spmi: Introduce device-managed functions
spmi: Use devm_spmi_controller_alloc()
spmi: mtk-pmif: Reorder driver remove sequence
spmi: hisi-spmi-controller: Use devm_spmi_controller_add()
spmi: Return meaningful errors in spmi_controller_alloc()
drivers/spmi/Makefile | 2 +-
drivers/spmi/devres.c | 61 ++++++++++++++++++++
drivers/spmi/hisi-spmi-controller.c | 32 +++--------
drivers/spmi/spmi-mtk-pmif.c | 28 ++++------
drivers/spmi/spmi-pmic-arb.c | 87 ++++++++++-------------------
drivers/spmi/spmi.c | 6 +-
include/linux/spmi.h | 3 +
7 files changed, 116 insertions(+), 103 deletions(-)
create mode 100644 drivers/spmi/devres.c
--
2.42.0.rc1.204.g551eb34607-goog
More information about the Linux-mediatek
mailing list