From: Krzysztof Kozlowski <krzk@kernel.org>
To: Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
Vinod Koul <vkoul@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>
Cc: Bryan O'Donoghue <bod@kernel.org>,
Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>,
linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org,
linux-media@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/2] phy: qcom-mipi-csi2: Add a CSI2 MIPI DPHY driver
Date: Mon, 16 Mar 2026 11:12:00 +0100 [thread overview]
Message-ID: <55db5547-96b0-4d3a-90bf-3d2b289abaa3@kernel.org> (raw)
In-Reply-To: <20260315-x1e-csi2-phy-v4-2-90c09203888d@linaro.org>
On 16/03/2026 00:52, Bryan O'Donoghue wrote:
> +
> + csi2phy = devm_kzalloc(dev, sizeof(*csi2phy), GFP_KERNEL);
> + if (!csi2phy)
> + return -ENOMEM;
> +
> + csi2phy->dev = dev;
> + csi2phy->soc_cfg = device_get_match_data(&pdev->dev);
> +
> + if (!csi2phy->soc_cfg)
> + return -EINVAL;
> +
> + num_clk = csi2phy->soc_cfg->num_clk;
> + csi2phy->clks = devm_kzalloc(dev, sizeof(*csi2phy->clks) * num_clk, GFP_KERNEL);
> + if (!csi2phy->clks)
> + return -ENOMEM;
> +
> + num_pds = csi2phy->soc_cfg->num_genpd_names;
> + if (!num_pds)
> + return -EINVAL;
> +
> + csi2phy->pds = devm_kzalloc(dev, sizeof(*csi2phy->pds) * num_pds, GFP_KERNEL);
> + if (!csi2phy->pds)
> + return -ENOMEM;
> +
> + for (i = 0; i < num_pds; i++) {
> + csi2phy->pds[i] = dev_pm_domain_attach_by_name(dev,
> + csi2phy->soc_cfg->genpd_names[i]);
> + if (IS_ERR(csi2phy->pds[i])) {
API is terrible, but it does return NULL. Look at other uses of it. Or
read review of sashiko of your patchset.
> + return dev_err_probe(dev, PTR_ERR(csi2phy->pds[i]),
> + "Failed to attach %s\n",
> + csi2phy->soc_cfg->genpd_names[i]);
> + }
Best regards,
Krzysztof
next prev parent reply other threads:[~2026-03-16 10:12 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-15 23:52 [PATCH v4 0/2] phy: qcom-mipi-csi2: Add a CSI2 MIPI DPHY driver Bryan O'Donoghue
2026-03-15 23:52 ` [PATCH v4 1/2] dt-bindings: phy: qcom: Add CSI2 C-PHY/DPHY schema Bryan O'Donoghue
2026-03-16 1:58 ` Vladimir Zapolskiy
2026-03-16 2:45 ` Dmitry Baryshkov
2026-03-16 10:49 ` Konrad Dybcio
2026-03-16 12:09 ` Bryan O'Donoghue
2026-03-16 7:42 ` Krzysztof Kozlowski
2026-03-16 21:31 ` Vijay Kumar Tumati
2026-03-17 5:26 ` Bryan O'Donoghue
2026-03-17 20:25 ` Vijay Kumar Tumati
2026-03-23 14:22 ` Konrad Dybcio
2026-03-23 14:29 ` Bryan O'Donoghue
2026-03-15 23:52 ` [PATCH v4 2/2] phy: qcom-mipi-csi2: Add a CSI2 MIPI DPHY driver Bryan O'Donoghue
2026-03-16 10:12 ` Krzysztof Kozlowski [this message]
2026-03-16 12:04 ` Bryan O'Donoghue
2026-03-18 10:15 ` Neil Armstrong
2026-03-18 13:17 ` Bryan O'Donoghue
2026-03-18 15:07 ` Neil Armstrong
2026-03-18 15:27 ` Dmitry Baryshkov
2026-03-19 13:08 ` Vladimir Zapolskiy
2026-03-19 13:17 ` Bryan O'Donoghue
2026-03-19 14:05 ` Neil Armstrong
2026-03-19 15:06 ` Bryan O'Donoghue
2026-03-19 14:56 ` Vladimir Zapolskiy
2026-03-19 15:18 ` Bryan O'Donoghue
2026-03-19 16:08 ` Neil Armstrong
2026-03-19 16:56 ` Bryan O'Donoghue
2026-03-19 17:39 ` Neil Armstrong
2026-03-27 10:19 ` Konrad Dybcio
2026-03-20 0:37 ` Vladimir Zapolskiy
2026-03-20 9:56 ` Bryan O'Donoghue
2026-03-18 15:47 ` Bryan O'Donoghue
2026-03-22 16:44 ` kernel test robot
2026-03-22 23:31 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55db5547-96b0-4d3a-90bf-3d2b289abaa3@kernel.org \
--to=krzk@kernel.org \
--cc=bod@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kishon@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=neil.armstrong@linaro.org \
--cc=robh@kernel.org \
--cc=vkoul@kernel.org \
--cc=vladimir.zapolskiy@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox