mbox series

[0/5] spmi: Add and use managed resource helpers

Message ID 20230824104101.4083400-1-fshao@chromium.org (mailing list archive)
Headers show
Series spmi: Add and use managed resource helpers | expand

Message

Fei Shao Aug. 24, 2023, 10:40 a.m. UTC
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

Comments

Stephen Boyd Oct. 24, 2023, 2:02 a.m. UTC | #1
Quoting Fei Shao (2023-08-24 03:40:07)
> 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 +++--------

Applied the series to spmi-next.