[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMRc=Mfh-5D4Fv+HGJLFMUcOGKPkq7Jsz64LZcTiYxP0b87goQ@mail.gmail.com>
Date: Wed, 12 Nov 2025 16:04:51 +0100
From: Bartosz Golaszewski <brgl@...ev.pl>
To: Manivannan Sadhasivam <manivannan.sadhasivam@....qualcomm.com>
Cc: Bjorn Helgaas <bhelgaas@...gle.com>, Manivannan Sadhasivam <mani@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, linux-kernel@...r.kernel.org,
linux-pci@...r.kernel.org, devicetree@...r.kernel.org,
linux-arm-msm@...r.kernel.org, Stephan Gerhold <stephan.gerhold@...aro.org>,
Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>, linux-pm@...r.kernel.org
Subject: Re: [PATCH v2 4/4] power: sequencing: Add the Power Sequencing driver
for the PCIe M.2 connectors
On Sat, Nov 8, 2025 at 4:24 AM Manivannan Sadhasivam
<manivannan.sadhasivam@....qualcomm.com> wrote:
>
> +
> +static int pwrseq_pcie_m2_match(struct pwrseq_device *pwrseq,
> + struct device *dev)
> +{
> + struct pwrseq_pcie_m2_ctx *ctx = pwrseq_device_get_drvdata(pwrseq);
> + struct device_node *remote, *endpoint;
> +
> + /*
> + * Traverse the 'remote-endpoint' nodes and check if the remote node's
> + * parent matches the OF node of 'dev'.
> + */
> + for_each_endpoint_of_node(ctx->of_node, endpoint) {
> + remote = of_graph_get_remote_port_parent(endpoint);
> + if (remote && (remote == dev_of_node(dev))) {
> + of_node_put(remote);
> + of_node_put(endpoint);
> + return PWRSEQ_MATCH_OK;
> + }
> + of_node_put(remote);
> + }
> +
> + return PWRSEQ_NO_MATCH;
> +}
Nit: I would simplify this function with __free(device_node) since
there'll be a v3 anyway. Other than that it looks good, so when the
bindings get acked I assume this can go into the pwrseq/for-next?
There don't seem to be any build-time dependencies between this and
the PCI part.
Bart
Powered by blists - more mailing lists