Re: [PATCH] media: i2c: imx415: Drop redundant runtime PM callbacks
From: Elgin Perumbilly
Date: Sat Mar 28 2026 - 02:11:55 EST
Hi Michael, Sakari,
Sorry for the late reply, and thanks for the feedback.
>Hi Elgin, Sakari,
>
>On 3/25/26 13:28, Sakari Ailus wrote:
>> Hi Michael,
>>
>> On Tue, Mar 24, 2026 at 08:42:31PM +0100, Michael Riesch wrote:
>>> Hi Elgin,
>>>
>>> Thanks for the patch but...
>>>
>>> On 3/24/26 13:45, Elgin Perumbilly wrote:
>>>> Replace runtime_suspend/resume wrappers by using power helpers
>>>> directly with DEFINE_RUNTIME_DEV_PM_OPS().
>>>
>>> ...why? What advantage does this refactoring bring?
>>
>> It looks like patch removes two redundant functions, doesn't it? :-)
>
>Well yes. 10 lines saved. Not sure whether this was the biggest issue
>with this driver -- surely it was not a big issue for me.
>
>Elgin, I was wondering whether this change is within a certain context
>or whether there is something I fail to recognize.
>
>Anyway, if you absolutely want this change: I feel it would be nicer if
>you left the imx415_runtime_{resume,suspend} and moved the bit of code
>from imx415_power_{on,off} to them. Reasons for that may be mostly
>aesthetical -- I claim better readability that way.
The intent of this change is to remove redundant runtime PM
wrappers and simplify the code, without altering behavior.
If you’re okay with this approach, we can proceed as is. If you
feel it’s not necessary at this point, that’s fine as well.
Best regards,
Elgin