[PATCH v7 12/16] power: sequencing: pcie-m2: support matching on remote "port" node
Manivannan Sadhasivam
mani at kernel.org
Mon Aug 10 09:22:58 PDT 2026
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 <wenst at chromium.org>
> ---
> 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 <manivannan.sadhasivam at oss.qualcomm.com>
- Mani
--
மணிவண்ணன் சதாசிவம்
More information about the linux-arm-kernel
mailing list