From: "Vadillo, Miguel" <miguel.vadillo@intel.com>
To: Mehdi Djait <mehdi.djait@linux.intel.com>
Cc: <linux-media@vger.kernel.org>, <wei.a.xu@intel.com>,
<atul.raut@intel.com>, <sakari.ailus@linux.intel.com>,
<antti.laakso@linux.intel.com>, <kieran.bingham@ideasonboard.com>
Subject: Re: [PATCH v3 1/3] media: i2c: cvs: Add driver of Intel Computer Vision Sensing Controller(CVS)
Date: Sat, 23 May 2026 16:37:41 -0700 [thread overview]
Message-ID: <173d3eec-de57-43eb-ba46-d08c8c1dc8b2@intel.com> (raw)
In-Reply-To: <ahAVpZUnNhI34BAv@mdjait-mobl>
Hi Mehdi,
On 5/22/26 1:39 AM, Mehdi Djait wrote:
> Hi Miguel,
>
> Thank you for the patch.
>
> On Thu, May 21, 2026 at 03:23:57PM -0700, Miguel Vadillo wrote:
>> Add driver for Intel Computer Vision Sensing (CVS) devices found on
>
> [..]
>
>> +fail_i2c:
>> + ret = cvs_csi_init(ctx, dev, i2c);
>> + if (ret) {
>> + dev_err_probe(dev, ret, "CSI init failed\n");
>> + goto err_put_ipu;
>> + }
>> +
>> + dev_set_drvdata(dev, ctx);
>> + pm_runtime_set_autosuspend_delay(dev, 1000);
>> + pm_runtime_use_autosuspend(dev);
>> + pm_runtime_enable(dev);
>> + pm_runtime_idle(dev);
>> +
>> + /*
>> + * Create a PM runtime device link with IPU as consumer and CVS as
>> + * supplier. When the IPU runtime-resumes to start streaming, the PM
>> + * framework automatically resumes CVS first, triggering
>> + * cvs_runtime_resume() which hands CSI-2 link ownership to the host.
>> + */
>> + ctx->ipu_link = device_link_add(&ipu->dev, dev,
>> + DL_FLAG_PM_RUNTIME |
>> + DL_FLAG_RPM_ACTIVE |
>> + DL_FLAG_STATELESS);
>> + put_device(&ipu->dev);
>> + if (!ctx->ipu_link) {
>> + dev_err(dev, "IPU device link failed\n");
>> + ret = -ENODEV;
>> + goto err_csi_remove;
>> + }
>> +
>> + if (has_acpi_companion(dev))
>> + acpi_dev_clear_dependencies(ACPI_COMPANION(dev));
>> +
>> + return 0;
>> +
>> +err_csi_remove:
>> + if (ctx->ipu_link)
>> + device_link_del(ctx->ipu_link);
>> + cvs_csi_remove(ctx);
>> + pm_runtime_dont_use_autosuspend(dev);
>> + pm_runtime_disable(dev);
>> + pm_runtime_set_suspended(dev);
>> + return ret;
>
> this return ret seems wrong here.
Are you referring to just the space before return?
@@ -1318,10 +1318,12 @@ static int cvs_core_probe(struct device *dev,
struct i2c_client *i2c)
pm_runtime_dont_use_autosuspend(dev);
pm_runtime_disable(dev);
pm_runtime_set_suspended(dev);
+
return ret;
err_put_ipu:
put_device(&ipu->dev);
+
return ret;
}
put_device(ipu) was already done after the ipu_link so no need to
waterfall all the way down. Please clarify if I am misunderstanding your
comment.
--
regards,
Miguel
>
>> +
>> +err_put_ipu:
>> + put_device(&ipu->dev);
>> + return ret;
>> +}
next prev parent reply other threads:[~2026-05-23 23:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-21 22:23 [PATCH v3 0/3] media: i2c: cvs: Add Intel CVS driver Miguel Vadillo
2026-05-21 22:23 ` [PATCH v3 1/3] media: i2c: cvs: Add driver of Intel Computer Vision Sensing Controller(CVS) Miguel Vadillo
2026-05-22 8:39 ` Mehdi Djait
2026-05-23 23:37 ` Vadillo, Miguel [this message]
2026-05-25 8:36 ` Mehdi Djait
2026-05-22 14:41 ` Mehdi Djait
2026-05-23 23:33 ` Vadillo, Miguel
2026-05-21 22:23 ` [PATCH v3 2/3] media: pci: intel: Add CVS support for IPU bridge driver Miguel Vadillo
2026-05-21 22:23 ` [PATCH v3 3/3] ACPI: scan: Honor _DEP for Intel CVS devices Miguel Vadillo
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=173d3eec-de57-43eb-ba46-d08c8c1dc8b2@intel.com \
--to=miguel.vadillo@intel.com \
--cc=antti.laakso@linux.intel.com \
--cc=atul.raut@intel.com \
--cc=kieran.bingham@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=mehdi.djait@linux.intel.com \
--cc=sakari.ailus@linux.intel.com \
--cc=wei.a.xu@intel.com \
/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