lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <cef4cd8d-5973-4bf2-a5be-30bad044817b@amd.com>
Date: Tue, 13 May 2025 16:16:17 -0400
From: "Nirujogi, Pratap" <pnirujog@....com>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>,
 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

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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ