[PATCH] PCI: Add power sequencing driver for PCI slots

Tom Rini trini at konsulko.com
Wed Jan 7 01:14:51 CET 2026


On Wed, Jan 07, 2026 at 01:03:04AM +0100, Marek Vasut wrote:
> On 1/7/26 12:32 AM, Sean Anderson wrote:
> > On 1/6/26 18:14, Marek Vasut wrote:
> > > On 1/6/26 11:34 PM, Sean Anderson wrote:
> > > > Extend the PCI bridge driver to enable resources associated with PCI
> > > > slots like clocks, power rails, and resets. This is modeled off of the
> > > > PCI power control subsystem in Linux. The traditional compatible for PCI
> > > > slots in U-Boot is pci-bridge, but Linux uses the more-systematic
> > > > pciclass,0604 so add that as an option.
> > > 
> > > Oh, nice :)
> > > 
> > > > +static int __maybe_unused pci_bridge_probe(struct udevice *dev)
> > > > +{
> > > > +    struct clk clk;
> > > > +    struct gpio_desc perst;
> > > > +
> > > > +    if (!clk_get_by_index(dev, 0, &clk)) {
> > > > +        int ret = clk_enable(&clk);
> > > > +
> > > > +        if (ret)
> > > > +            return log_msg_ret("clk", ret);
> > > 
> > > Should we use dev_err() instead ?
> > 
> > I thought we weren't supposed to log by default in device drivers to reduce text size?
> Tom had a different take on it, lets wait for him. Me personally, I like the
> dev_* functions as they are compatible with Linux ones, which is nice and
> non-confusing.

I think consistency within a file is the first thing to worry about, and
so log_msg_ret(...) to match the rest of the file makes the most sense.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20260106/ebd03b96/attachment.sig>


More information about the U-Boot mailing list