Skip to contentSkip to conversation

wifi: brcmfmac: of: use devm_clk_get_optional_enabled_with_rate()

PATCH In review Bartosz Golaszewski 2 participants 2 messages Oct 7, 2024 – Oct 17, 2024 Broadcom BRCM80211 IEEE802.11 wireless drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wifi: brcmfmac: of: use devm_clk_get_optional_enabled_with_rate()

From: Bartosz Golaszewski <[email protected]>

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

---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c +1 -2
index b90e23bb9366..ae98e371dbfd 100644
@@ -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;
Signature · 1 line
2.43.0
#1 lore raw
Quoted 5 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

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

Patch applied to wireless-next.git, thanks.

7cc7267a0163 wifi: brcmfmac: of: use devm_clk_get_optional_enabled_with_rate()

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches