Thread (16 messages) 16 messages, 5 authors, 2024-07-29

Re: [PATCH v4 4/5] wifi: brcmfmac: Add optional lpo clock enable support

From: Arend van Spriel <arend.vanspriel@broadcom.com>
Date: 2024-07-29 09:55:48
Also in: linux-devicetree, linux-rockchip, linux-wireless, lkml, netdev

On 7/29/2024 11:12 AM, Dragan Simic wrote:
Hello Ondrej,

On 2024-07-29 10:44, Ondřej Jirman wrote:
quoted
On Mon, Jul 29, 2024 at 09:12:20AM GMT, Dragan Simic wrote:
quoted
Hello Jacobe,

[...]
quoted
+    clk = devm_clk_get_optional_enabled(dev, "lpo");
+    if (IS_ERR(clk))
+    if (clk) {
These two lines looks really confusing.  Shouldn't it be just a single
"if (!IS_ERR(clk)) {" line instead?
It should be `!IS_ERR(clk) && clk` otherwise the debug message will be
incorrect.
Ah, I see now, thanks.  There's also IS_ERR_OR_NULL, so the condition
can actually be "!IS_ERR_OR_NULL(clk)".
++ best suggestion
quoted
quoted
quoted
+        brcmf_dbg(INFO, "enabling 32kHz clock\n");
+        clk_set_rate(clk, 32768);
+    }
+
     if (!np || !of_device_is_compatible(np, "brcm,bcm4329-fmac"))
         return;
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help