Re: [RFC PATCH 2/3] PCI: rcar-host: add support for optional regulators

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

 



Hi Wolfram,

On Mon, May 8, 2023 at 12:47 PM Wolfram Sang
<wsa+renesas@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> The KingFisher board has regulators. They just need to be en-/disabled,
> so we can leave the handling to devm.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>

Thanks for your patch!

> --- a/drivers/pci/controller/pcie-rcar-host.c
> +++ b/drivers/pci/controller/pcie-rcar-host.c

> @@ -992,6 +993,14 @@ static int rcar_pcie_probe(struct platform_device *pdev)
>         pcie->dev = dev;
>         platform_set_drvdata(pdev, host);
>
> +       err = devm_regulator_get_enable_optional(dev, "vpcie3v3");
> +       if (err < 0 && err != -ENODEV)
> +               dev_err_probe(dev, err, "error enabling 3.3V regulator");
> +
> +       err = devm_regulator_get_enable_optional(dev, "vpcie1v5");
> +       if (err < 0 && err != -ENODEV)
> +               dev_err_probe(dev, err, "error enabling 1.5V regulator");

As per my comment on patch 1/3, I think you want to grab
"vpcie12v0-supply", too.
And perhaps factor out the voltage as a parameter in the error message,
to increase string sharing?

I don't know if PCIe specifies some ordering w.r.t. power supply
enablement.

> +
>         pm_runtime_enable(pcie->dev);
>         err = pm_runtime_get_sync(pcie->dev);
>         if (err < 0) {

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux