Re: [PATCH v9 4/5] PCI/pwrctl: Add PCI power control core code
From: Bartosz Golaszewski
Date: Wed Jun 18 2025 - 03:57:08 EST
On Wed, Jun 18, 2025 at 1:35 AM Bjorn Helgaas <helgaas@xxxxxxxxxx> wrote:
>
> On Wed, Jun 12, 2024 at 10:20:17AM +0200, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
> >
> > Some PCI devices must be powered-on before they can be detected on the
> > bus. Introduce a simple framework reusing the existing PCI OF
> > infrastructure.
>
> > +/**
> > + * struct pci_pwrctl - PCI device power control context.
> > + * @dev: Address of the power controlling device.
> > + *
> > + * An object of this type must be allocated by the PCI power control device and
> > + * passed to the pwrctl subsystem to trigger a bus rescan and setup a device
> > + * link with the device once it's up.
> > + */
> > +struct pci_pwrctl {
> > + struct device *dev;
> > +
> > + /* Private: don't use. */
> > + struct notifier_block nb;
> > + struct device_link *link;
> > +};
>
> This is old and I should have noticed before, but we have partial
> kernel-doc for this struct:
>
> $ find include -name \*pci\* | xargs scripts/kernel-doc -none
> Warning: include/linux/pci-pwrctrl.h:45 struct member 'nb' not described in 'pci_pwrctrl'
> Warning: include/linux/pci-pwrctrl.h:45 struct member 'link' not described in 'pci_pwrctrl'
> Warning: include/linux/pci-pwrctrl.h:45 struct member 'work' not described in 'pci_pwrctrl'
>
I didn't want to document these as they're not part of the API.
Probably should have been "/* private: internal use only */". I will
check and send a patch.
Bart