]> www.infradead.org Git - users/hch/misc.git/commit
net: phy: micrel: use devm_clk_get_optional_enabled for the rmii-ref clock
authorHeiko Stuebner <heiko.stuebner@cherry.de>
Fri, 1 Dec 2023 15:01:30 +0000 (16:01 +0100)
committerJakub Kicinski <kuba@kernel.org>
Mon, 4 Dec 2023 22:43:54 +0000 (14:43 -0800)
commit9853294627237b73a6b765162d9c0485b0697db5
tree44a3d733e7b2cedddee1dc0672f74923e98e85c3
parent8ad55b1e73c4e77656e2bea68fa2b484f33a6425
net: phy: micrel: use devm_clk_get_optional_enabled for the rmii-ref clock

While the external clock input will most likely be enabled, it's not
guaranteed and clk_get_rate in some suppliers will even just return
valid results when the clock is running.

So use devm_clk_get_optional_enabled to retrieve and enable the clock
in one go.

Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20231201150131.326766-2-heiko@sntech.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/micrel.c