Re: [PATCH] media: i2c: imx: Add note to prevent buggy code re-use
From: Krzysztof Kozlowski
Date: Mon Aug 18 2025 - 08:19:27 EST
On 17/08/2025 10:48, Krzysztof Kozlowski wrote:
> Multiple Sony IMX sensor drivers have mixed up logical and line level
> for XCLR signal. They call it a reset signal (it indeed behaves like
> that), but drivers assert the reset to operate which is clearly
> incorrect and relies on incorrect DTS.
>
> People in discussions copy existing poor code and claim they can repeat
> same mistake, so add a note to prevent that.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>
> ---
> drivers/media/i2c/imx219.c | 4 ++++
> drivers/media/i2c/imx274.c | 2 ++
> drivers/media/i2c/imx334.c | 4 ++++
> 3 files changed, 10 insertions(+)
>
> diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c
> index 3b4f68543342..9857929a3321 100644
> --- a/drivers/media/i2c/imx219.c
> +++ b/drivers/media/i2c/imx219.c
> @@ -1034,6 +1034,10 @@ static int imx219_power_on(struct device *dev)
> goto reg_off;
> }
>
> + /*
> + * Note: Misinterpreation of reset assertion - do not re-use this code.
Typo here: Misinterpretation
I will send a v2.
Best regards,
Krzysztof