Re: [PATCH v6] pinctrl: stm32: Add check for clk_enable()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/23/24 3:06 AM, Mingwei Zheng wrote:

[...]

Shouldn't the clock be enabled before calling stm32_gpiolib_register_bank() ? I think the clk_bulk_prepare_enable(pctl->nbanks, pctl->clks); should be around here.

@@ -1646,15 +1628,18 @@ int stm32_pctl_probe(struct platform_device *pdev)
  		if (ret) {
  			fwnode_handle_put(child);
- for (i = 0; i < pctl->nbanks; i++)
-				clk_disable_unprepare(pctl->banks[i].clk);
-
  			return ret;
  		}
pctl->nbanks++;
  	}
+ ret = clk_bulk_prepare_enable(pctl->nbanks, pctl->clks);
+	if (ret) {
+		dev_err(dev, "failed to prepare_enable clk (%d)\n", ret);
+		return ret;
+	}
+
  	dev_info(dev, "Pinctrl STM32 initialized\n");
return 0;
Aside from that one question, this looks good, thanks !




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux