]> git.dujemihanovic.xyz Git - u-boot.git/commit
drivers: clk: Add a managed API to get clocks from the device-tree
authorJean-Jacques Hiblot <jjhiblot@ti.com>
Tue, 22 Oct 2019 12:00:04 +0000 (14:00 +0200)
committerLukasz Majewski <lukma@denx.de>
Tue, 22 Oct 2019 14:14:05 +0000 (16:14 +0200)
commit52720c536ffdbe0e6aece79840e2791d87204cf7
tree190272b13beda559e06c6ad8c274014b1a267854
parent8a1661f20e6cdda682820eba9ccc79bff5a3d7f8
drivers: clk: Add a managed API to get clocks from the device-tree

Add devm_clk_get(), devm_clk_get_optional() to get clocks from the
device-tree. The clocks is automatically released and the data structure
freed when the device is unbound.
Also add devm_clk_put() to release the clock and free the data structure
manually.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
drivers/clk/clk-uclass.c
drivers/mtd/nand/raw/brcmnand/brcmnand_compat.c
drivers/mtd/nand/raw/brcmnand/brcmnand_compat.h
include/clk.h