Re: [PATCH v1] PCI: dw-rockchip: Simplify regulator setup with devm_regulator_get_enable_optional()

Manivannan Sadhasivam
2025-10-19T06:26:06Z

On Sat, Oct 18, 2025 at 11:21:49AM +0530, Anand Moon wrote:
> Hi All,
>
> On Fri, 5 Sept 2025 at 16:57, Anand Moon <linux.amoon@gmail.com> wrote:
> >
> > Replace manual get/enable logic with devm_regulator_get_enable_optional()
> > to reduce boilerplate and improve error handling. This devm helper ensures
> > the regulator is enabled during probe and automatically disabled on driver
> > removal. Dropping the vpcie3v3 struct member eliminates redundant state
> > tracking, resulting in cleaner and more maintainable code.
> >
> > Signed-off-by: Anand Moon <linux.amoon@gmail.com>
> > ---
> > drivers/pci/controller/dwc/pcie-dw-rockchip.c | 23 +++++--------------
> > 1 file changed, 6 insertions(+), 17 deletions(-)
> >
> If we compile the kernel with phy and regulator as modules,
> I observe this message.
>
> [ 25.473960][ T55] platform 3c0800000.pcie: deferred probe
> pending: platform: supplier regulator-vcc3v3-pcie not ready
> [ 25.474071][ T55] platform fe0a0000.hdmi: deferred probe pending:
> platform: wait for supplier /i2c@fdd40000/pmic@20/regulators/LDO_REG9
> [ 25.474124][ T55] platform regulator-vcc5v0-usb-otg: deferred
> probe pending: reg-fixed-voltage: can't get GPIO
> [ 25.474171][ T55] platform fdc20000.syscon:io-domains: deferred
> probe pending: platform: wait for supplier
> /i2c@fdd40000/pmic@20/regulators/SWITCH_REG1
> [ 25.474218][ T55] platform cpufreq-dt: deferred probe pending:
> (reason unknown)
> [ 25.474264][ T55] platform regulator-vcc3v3-pcie: deferred probe
> pending: reg-fixed-voltage: can't get GPIO
> [ 25.474343][ T55] rockchip-pm-domain
> fdd90000.power-management:power-controller: Timed out. Forcing
> sync_state()
> [ 37.744968][ T2415] psi: inconsistent task state!
> task=2280:(udev-worker) cpu=1 psi_flags=4 clear=0 set=4
> [ 37.849725][ T50] fan53555-regulator 3-001c: FAN53555 Option[12]
> Rev[15] Detected!
> [ 37.990008][ T2216] SCSI subsystem initialized
>

This is a deferred probe log and not related to this patch or the PCIe
controller driver. The controller drivers should still be functional once the
dependent GPIO driver is probed.

- Mani

--
மணிவண்ணன் சதாசிவம்