diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2025-06-19 19:36:55 +0200 |
---|---|---|
committer | Geert Uytterhoeven <geert+renesas@glider.be> | 2025-06-19 19:36:55 +0200 |
commit | 0c8bf42e50ccc14039adf1dc580ccb31d5e3c6ab (patch) | |
tree | 21346e8abff22e395a5fa9b8b0e5e29a6b8dbfbe | |
parent | c607aad8b15eafb3c0f179482805803e97b2af18 (diff) | |
parent | 66db1d3cbdb0e89f8a3b5d06a8defb25d1c3f836 (diff) |
Merge branch 'pwrctrl' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci into renesas-dts-for-v6.17
Merge slot clock support for PCI slots, which is a depdendency for
replacing the ad-hoc description of the split PCIe clock on Sparrow Hawk
by a proper hardware description.
-rw-r--r-- | drivers/pci/pwrctrl/slot.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/pci/pwrctrl/slot.c b/drivers/pci/pwrctrl/slot.c index 18becc144913..6e138310b45b 100644 --- a/drivers/pci/pwrctrl/slot.c +++ b/drivers/pci/pwrctrl/slot.c @@ -4,6 +4,7 @@ * Author: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> */ +#include <linux/clk.h> #include <linux/device.h> #include <linux/mod_devicetable.h> #include <linux/module.h> @@ -30,6 +31,7 @@ static int pci_pwrctrl_slot_probe(struct platform_device *pdev) { struct pci_pwrctrl_slot_data *slot; struct device *dev = &pdev->dev; + struct clk *clk; int ret; slot = devm_kzalloc(dev, sizeof(*slot), GFP_KERNEL); @@ -55,6 +57,12 @@ static int pci_pwrctrl_slot_probe(struct platform_device *pdev) if (ret) goto err_regulator_disable; + clk = devm_clk_get_optional_enabled(dev, NULL); + if (IS_ERR(clk)) { + return dev_err_probe(dev, PTR_ERR(clk), + "Failed to enable slot clock\n"); + } + pci_pwrctrl_init(&slot->ctx, dev); ret = devm_pci_pwrctrl_device_set_ready(dev, &slot->ctx); |