Re: [PATCH v7 12/16] power: sequencing: pcie-m2: support matching on remote "port" node
Manivannan Sadhasivam <[email protected]> Mon, 10 Aug 2026 18:22:58 +0200
| Newsgroups | gmane.linux.acpi.devel,gmane.linux.power-management.general,gmane.linux.usb.general,gmane.linux.drivers.devicetree,gmane.linux.ports.arm.mediatek,gmane.linux.ports.arm.kernel,gmane.linux.kernel |
|---|---|
| Message-ID | <2qwnxzyxcnwepqpmjj2bc5jgo6dgytcuz7equqm6p4hruoy7hb@7lkl7dxksxgf> |
On Fri, Jul 24, 2026 at 04:43:21PM +0800, Chen-Yu Tsai wrote: > A USB hub can have multiple ports, and this driver needs to > differentiate which port is being matched to. The USB hub driver now > associates the "port" node with the usb_port device, so here we can > use the remote "port" node to check for a match. Then fall back to > the remote device node for the other connection types. > > Also rewrite the existing "remote == dev_of_node(dev)" with > device_match_of_node() for consistency. > > Signed-off-by: Chen-Yu Tsai <[email protected]> > --- > Changes since v4: > - Dropped blank line between __free() variable declaration and > subsequent use of the variable in conditional > > Changes since v3: > - Drop redundant device node validity check; device_match_of_node() > does it internally > > Changes since v2: > - Use device_match_of_node() > --- > drivers/power/sequencing/pwrseq-pcie-m2.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/drivers/power/sequencing/pwrseq-pcie-m2.c b/drivers/power/sequencing/pwrseq-pcie-m2.c > index 83fe6a1396bc..691cad0a6dd0 100644 > --- a/drivers/power/sequencing/pwrseq-pcie-m2.c > +++ b/drivers/power/sequencing/pwrseq-pcie-m2.c > @@ -175,9 +175,16 @@ static int pwrseq_pcie_m2_match(struct pwrseq_device *pwrseq, > * parent matches the OF node of 'dev'. > */ > for_each_endpoint_of_node(ctx->of_node, endpoint) { > + /* USB port devices are tied to the port nodes. */ I'd reword this comment to: /* Try the remote port node first */ With this change, Reviewed-by: Manivannan Sadhasivam <[email protected]> - Mani -- மணிவண்ணன் சதாசிவம்