Re: [PATCH] [RFC PATCH] staging: media: atomisp: remove redundant ov2722_startup() helper

Greg Kroah-Hartman <[email protected]>
Newsgroups org.kernel.vger.linux-media,dev.linux.lists.linux-staging,org.kernel.vger.linux-kernel
Message-ID <2026080949-breath-pacific-db89@gregkh>
On Sun, Aug 09, 2026 at 11:31:05PM +0530, Mohit Mishra wrote:
> In atomisp-ov2722.c, ov2722_startup() was invoked inside
> ov2722_set_fmt() to program sensor hardware registers during format
> negotiation, accompanied by a "TODO: remove it" comment.
> 
> Standard V4L2 subdevice drivers do not program hardware registers during
> .set_fmt(), but defer hardware register configuration to stream start
> (.s_stream(1)).
> 
> This patch:
> 1. Removes the ov2722_startup() helper function and its TODO comment.
> 2. Refactors register initialization into a static
>    ov2722_startup_registers() helper.
> 3. Moves sensor software reset and resolution register array configuration
>    into ov2722_s_stream() when enable == 1.
> 4. Preserves the PMIC power-cycle retry loop on startup failure inside
>    ov2722_s_stream(1) to maintain hardware fault-tolerance for AtomISP
>    tablets.
> 5. Updates ov2722_set_fmt() to purely update internal software state.
> 
> BEHAVIORAL RISK & UNTESTED NOTICE:
> This is a functional timing change. Deferring hardware register writes to
> .s_stream(1) has not been tested on physical Intel AtomISP hardware.
> Submitted as RFC for review by AtomISP maintainers (Hans de Goede,
> Mauro Carvalho Chehab).

I would recommend doing changes like this ONLY if you have the hardware
to test it with.

And did you forget an Assisted-by: tag?

thanks,

greg k-h
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.