From: "Nirujogi, Pratap" <pnirujog@amd.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
Pratap Nirujogi <pratap.nirujogi@amd.com>,
andi.shyti@kernel.org, mlimonci@amd.com, krzk@kernel.org
Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
benjamin.chan@amd.com, bin.du@amd.com,
gjorgji.rosikopulos@amd.com, king.li@amd.com, dantony@amd.com,
Venkata Narendra Kumar Gutta <vengutta@amd.com>
Subject: Re: [PATCH v2] i2c: amd-isp: Add ISP i2c-designware driver
Date: Tue, 13 May 2025 16:16:17 -0400 [thread overview]
Message-ID: <cef4cd8d-5973-4bf2-a5be-30bad044817b@amd.com> (raw)
In-Reply-To: <b0fd1c29-4f5b-41e0-a113-2b24527e5e73@wanadoo.fr>
On 5/13/2025 1:23 PM, Christophe JAILLET wrote:
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
>
>
> Le 13/05/2025 à 00:24, Nirujogi, Pratap a écrit :
>> Hi CJ,
>>
>> On 5/9/2025 3:11 AM, Christophe JAILLET wrote:
>>>
>>> Le 24/04/2025 à 20:49, Pratap Nirujogi a écrit :
>>>> The camera sensor is connected via ISP I2C bus in AMD SOC
>>>> architectures. Add new I2C designware driver to support
>>>> new camera sensors on AMD HW.
>
> ...
>
>>>> +static void amd_isp_dw_i2c_plat_remove(struct platform_device *pdev)
>>>> +{
>>>> + struct dw_i2c_dev *isp_i2c_dev = platform_get_drvdata(pdev);
>>>> +
>>>> + pm_runtime_get_sync(&pdev->dev);
>>>> +
>>>> + i2c_del_adapter(&isp_i2c_dev->adapter);
>>>
>>> Usually, this match a corresponding i2c_add_adapter().
>>>
>>> For my own understaning, in which function/calls path is it hidden?
>>> Is it needed here?
>>>
>>> CJ
>>>
>> i2c_add_adapter() in this case gets called in probe. Please refer the
>> below call sequence for details.
>>
>> amd_isp_dw_i2c_plat_probe()-> i2c_dw_probe()-> i2c_dw_probe_master()->
>> i2c_add_numbered_adapter()-> i2c_add_adapter()
>>
>> Thanks,
>> Pratap
>>
>
> Thanks for your feed-back.
>
> Maybe having a i2c_dw_remove() which undoes i2c_dw_probe() could help?
>
> or, if feasable, having i2c_del_adapter() be called by a
> devm_add_action_or_reset()? (note that i2c_dw_probe_master() already
> uses a devm_ function)
>
> CJ
>
Hi CJ, good suggestions, I agree either adding new i2c_dw_remove() or
adding devm_add_action_or_reset(i2c_del_adapter) in
i2c_dw_probe_master() would simplify the code and avoid the explicit
i2c_del_adapter() call in amd_isp_dw_i2c_plat_remove().
Thanks,
Pratap
prev parent reply other threads:[~2025-05-13 20:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-24 18:49 [PATCH v2] i2c: amd-isp: Add ISP i2c-designware driver Pratap Nirujogi
2025-04-24 18:58 ` Mario Limonciello
2025-04-28 7:30 ` Andi Shyti
2025-04-28 11:48 ` Nirujogi, Pratap
2025-05-09 7:11 ` Christophe JAILLET
2025-05-12 22:24 ` Nirujogi, Pratap
2025-05-13 17:23 ` Christophe JAILLET
2025-05-13 20:16 ` Nirujogi, Pratap [this message]
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=cef4cd8d-5973-4bf2-a5be-30bad044817b@amd.com \
--to=pnirujog@amd.com \
--cc=andi.shyti@kernel.org \
--cc=benjamin.chan@amd.com \
--cc=bin.du@amd.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=dantony@amd.com \
--cc=gjorgji.rosikopulos@amd.com \
--cc=king.li@amd.com \
--cc=krzk@kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mlimonci@amd.com \
--cc=pratap.nirujogi@amd.com \
--cc=vengutta@amd.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