mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 11:03:43 +02:00
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.
This commit is contained in:
commit
0c8bf42e50
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user