Commit 0c8bf42e authored by Geert Uytterhoeven's avatar Geert Uytterhoeven
Browse files

Merge branch 'pwrctrl' of...

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.
parents c607aad8 66db1d3c
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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);