Re: [PATCH v2 4/7] thunderbolt: add platform NHI driver
From: westeri@xxxxxxxxxx
Date: Fri Nov 20 2026 - 03:26:50 EST
Hi,
On Fri, Nov 20, 2026 at 08:16:27AM +0000, Chunfeng Yun (云春峰) wrote:
> > > + device_set_wakeup_capable(nhi->dev, true);
> > > + device_enable_async_suspend(nhi->dev);
> > >
> > > these two line can be put at the end of probe.
> >
> > I meant device_enable_async_suspend() it's not stricly required and
> > we
> > don't do it elsewhere so I would leave it out now and then add it
> > everywhere later.
>
> I look at the PCI core code, seems it already enables async suspend for
> every PCI device during device enumeration by default.
>
> see: pci_pm_init() (drivers/pci/pci.c)
>
> Unlike the PCI bus, the platform bus does not automatically enable it
> for platform devices, but for usb devices, usually enable it because
> the standardized tree topology with well-defined dependencies.
>
> Due to we explicitly create dev-link with xHCI/PCIe controller devices,
> it is safe to enable it, then keep the same way as thunderbolt/pci.c
> does.
Okay works for me then.