mbox series

[-next,00/11] gpio: Use devm_clk_get_*() helper function to simplify the drivers.

Message ID 20230818093018.1051434-1-lizetao1@huawei.com
Headers show
Series gpio: Use devm_clk_get_*() helper function to simplify the drivers. | expand

Message

Li Zetao Aug. 18, 2023, 9:30 a.m. UTC
Commit 7ef9651e9792 ("clk: Provide new devm_clk helpers for prepared
and enabled clocks") provides a a series of new helper function for
prepared and enabled clocks when a driver keeps a clock prepared
(or enabled) during the whole lifetime of the driver. So where drivers
get clocks and enable them immediately, it can be combined into a single
function devm_clk_get_*(). Moreover, the unprepare and disable function
has been registered to devm_clk_state, and before devm_clk_state is
released, the clocks will be unprepareed and disable, so it is unnecessary
to unprepare and disable clock explicitly when remove drivers or in the
error handling path.

Li Zetao (11):
  gpio: cadence: Use helper function devm_clk_get_enabled()
  gpio: davinci: Use helper function devm_clk_get_enabled()
  gpio: ftgpio010: Use helper function devm_clk_get_enabled()
  gpio: lpc18xx: Use helper function devm_clk_get_enabled()
  gpio: mb86s7x: Use helper function devm_clk_get_optional_enabled()
  gpio: mvebu: Use helper function devm_clk_get_enabled()
  gpio: mxc: Use helper function devm_clk_get_optional_enabled()
  gpio: omap: Use helper function devm_clk_get_prepared()
  gpio: stp-xway: Use helper function devm_clk_get_enabled()
  gpio: xilinx: Use helper function devm_clk_get_optional_enabled()
  gpio: zynq: Use helper function devm_clk_get_enabled()

 drivers/gpio/gpio-cadence.c   | 20 +++++---------------
 drivers/gpio/gpio-davinci.c   | 13 ++-----------
 drivers/gpio/gpio-ftgpio010.c | 29 +++++++----------------------
 drivers/gpio/gpio-lpc18xx.c   | 14 +++-----------
 drivers/gpio/gpio-mb86s7x.c   |  8 +-------
 drivers/gpio/gpio-mvebu.c     |  4 +---
 drivers/gpio/gpio-mxc.c       |  9 +--------
 drivers/gpio/gpio-omap.c      |  8 +-------
 drivers/gpio/gpio-stp-xway.c  | 10 ++--------
 drivers/gpio/gpio-xilinx.c    | 14 +++-----------
 drivers/gpio/gpio-zynq.c      | 13 +++----------
 11 files changed, 29 insertions(+), 113 deletions(-)