diff mbox series

wifi: brcmfmac: of: use devm_clk_get_optional_enabled_with_rate()

Message ID 20241007131639.98358-1-brgl@bgdev.pl (mailing list archive)
State Accepted
Commit 7cc7267a01631f7379c751078115ac6614f9529e
Delegated to: Kalle Valo
Headers show
Series wifi: brcmfmac: of: use devm_clk_get_optional_enabled_with_rate() | expand

Commit Message

Bartosz Golaszewski Oct. 7, 2024, 1:16 p.m. UTC
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

Fold the separate clk_set_rate() call into the clock getter.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Kalle Valo Oct. 17, 2024, 4:50 p.m. UTC | #1
Bartosz Golaszewski <brgl@bgdev.pl> wrote:

> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> 
> Fold the separate clk_set_rate() call into the clock getter.
> 
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

Patch applied to wireless-next.git, thanks.

7cc7267a0163 wifi: brcmfmac: of: use devm_clk_get_optional_enabled_with_rate()
diff mbox series

Patch

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
index b90e23bb9366..ae98e371dbfd 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
@@ -116,12 +116,11 @@  int brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
 		of_node_put(root);
 	}
 
-	clk = devm_clk_get_optional_enabled(dev, "lpo");
+	clk = devm_clk_get_optional_enabled_with_rate(dev, "lpo", 32768);
 	if (IS_ERR(clk))
 		return PTR_ERR(clk);
 
 	brcmf_dbg(INFO, "%s LPO clock\n", clk ? "enable" : "no");
-	clk_set_rate(clk, 32768);
 
 	if (!np || !of_device_is_compatible(np, "brcm,bcm4329-fmac"))
 		return 0;