[PATCH 05/10] PCI: exynos: Add structure to hold resource operations
Shradha Todi
shradha.t at samsung.com
Tue May 27 03:44:06 PDT 2025
> -----Original Message-----
> From: Krzysztof Kozlowski <krzk at kernel.org>
> Sent: 21 May 2025 15:13
> To: Shradha Todi <shradha.t at samsung.com>
> Cc: linux-pci at vger.kernel.org; devicetree at vger.kernel.org; linux-arm-kernel at lists.infradead.org; linux-samsung-soc at vger.kernel.or;
> linux-kernel at vger.kernel.org; linux-phy at lists.infradead.org; manivannan.sadhasivam at linaro.org; lpieralisi at kernel.org;
> kw at linux.com; robh at kernel.org; bhelgaas at google.com; jingoohan1 at gmail.com; krzk+dt at kernel.org; conor+dt at kernel.org;
> alim.akhtar at samsung.com; vkoul at kernel.org; kishon at kernel.org; arnd at arndb.de; m.szyprowski at samsung.com;
> jh80.chung at samsung.com; Pankaj Dubey <pankaj.dubey at samsung.com>
> Subject: Re: [PATCH 05/10] PCI: exynos: Add structure to hold resource operations
>
> On Mon, May 19, 2025 at 01:01:47AM GMT, Shradha Todi wrote:
> > +struct samsung_res_ops {
> > + int (*init_regulator)(struct exynos_pcie *ep);
> > + irqreturn_t (*pcie_irq_handler)(int irq, void *arg);
> > };
> >
> > static void exynos_pcie_writel(void __iomem *base, u32 val, u32 reg)
> > @@ -74,6 +81,36 @@ static u32 exynos_pcie_readl(void __iomem *base, u32 reg)
> > return readl(base + reg);
> > }
> >
> > +static int samsung_regulator_enable(struct exynos_pcie *ep) {
> > + struct device *dev = ep->pci.dev;
> > + int ret;
> > +
> > + if (ep->supplies_cnt == 0)
> > + return 0;
> > +
> > + ret = devm_regulator_bulk_get(dev, ep->supplies_cnt, ep->supplies);
>
> No. Getting resources on every enable is making this much less readable.
>
> NAK
>
Will make sure that we get the resources only once during probe.
> Best regards,
> Krzysztof
More information about the linux-arm-kernel
mailing list