[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b0fd1c29-4f5b-41e0-a113-2b24527e5e73@wanadoo.fr>
Date: Tue, 13 May 2025 19:23:56 +0200
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: "Nirujogi, Pratap" <pnirujog@....com>,
Pratap Nirujogi <pratap.nirujogi@....com>, andi.shyti@...nel.org,
mlimonci@....com, krzk@...nel.org
Cc: linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org,
benjamin.chan@....com, bin.du@....com, gjorgji.rosikopulos@....com,
king.li@....com, dantony@....com,
Venkata Narendra Kumar Gutta <vengutta@....com>
Subject: Re: [PATCH v2] i2c: amd-isp: Add ISP i2c-designware driver
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
Powered by blists - more mailing lists