[PATCH -next v3 00/12] mtd: Use devm_clk_get_*() helper function to simplify the drivers.
Li Zetao
lizetao1 at huawei.com
Sun Aug 20 20:17:25 PDT 2023
Commit 7ef9651e9792 ("clk: Provide new devm_clk helpers for prepared
and enabled clocks") provides a 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 clocks explicitly when remove drivers or in the
error handling path.
Change log:
v3:
- Modify the syntax error in the commit message.
v2: https://lore.kernel.org/all/20230818074642.308166-1-lizetao1@huawei.com
- Modify the format of the reference commit, use "since" instead of
"after".
- Drop the helper functions mtk_nfc_enable_clk() and
mtk_nfc_disable_clk(), because both of them now have a single user.
- Add a new patch, replace devm_clk_get_optional() +
clk_prepare_enable() with devm_clk_get_optional_enabled().
v1: https://lore.kernel.org/all/20230817024509.3951629-1-lizetao1@huawei.com
Li Zetao (12):
mtd: spear_smi: Use helper function devm_clk_get_enabled()
mtd: rawnand: arasan: Use helper function devm_clk_get_enabled()
mtd: rawnand: fsmc: Use helper function devm_clk_get_enabled()
mtd: rawnand: intel: Use helper function devm_clk_get_enabled()
mtd: rawnand: lpc32xx_slc: Use helper function devm_clk_get_enabled()
mtd: rawnand: mpc5121: Use helper function devm_clk_get_enabled()
mtd: rawnand: mtk: Use helper function devm_clk_get_enabled()
mtd: rawnand: stm32_fmc2: Use helper function devm_clk_get_enabled()
mtd: rawnand: sunxi: Use helper function devm_clk_get_enabled()
mtd: rawnand: vf610_nfc: Use helper function devm_clk_get_enabled()
mtd: spi-nor: nxp-spifi: Use helper function devm_clk_get_enabled()
mtd: rawnand: orion: Use helper function
devm_clk_get_optional_enabled()
drivers/mtd/devices/spear_smi.c | 15 +----
drivers/mtd/nand/raw/arasan-nand-controller.c | 29 ++-------
drivers/mtd/nand/raw/fsmc_nand.c | 12 +---
drivers/mtd/nand/raw/intel-nand-controller.c | 15 +----
drivers/mtd/nand/raw/lpc32xx_slc.c | 12 +---
drivers/mtd/nand/raw/mpc5121_nfc.c | 11 +---
drivers/mtd/nand/raw/mtk_nand.c | 62 ++++++-------------
drivers/mtd/nand/raw/orion_nand.c | 22 ++-----
drivers/mtd/nand/raw/stm32_fmc2_nand.c | 17 ++---
drivers/mtd/nand/raw/sunxi_nand.c | 29 ++-------
drivers/mtd/nand/raw/vf610_nfc.c | 29 +++------
drivers/mtd/spi-nor/controllers/nxp-spifi.c | 33 ++--------
12 files changed, 67 insertions(+), 219 deletions(-)
--
2.34.1
More information about the linux-mtd
mailing list