30.07.2020 03:55, Sowjanya Komatineni ÐÐÑÐÑ:
On 7/29/20 5:52 PM, Sowjanya Komatineni wrote:Yes, and tegra_csi_s_stream().
On 7/29/20 5:43 PM, Dmitry Osipenko wrote:
30.07.2020 03:27, Sowjanya Komatineni ÐÐÑÐÑ:You mean to change tegra_channel_set_stream() ?
...
I meant that failing s_stream might be unnecessary.Secondly, perhaps a failed calibration isn't a very critical error?Using dev_err to report calibration failure. Are you suggesting to use
Hence just printing a warning message should be enough.
dev_warn instead of dev_err?
The dev_warn should be more appropriate for a non-critical errors.
I meant to change all the code like this:Also please specify what ON/OFF code paths you are referring to whenCould you please make a patch that factors all ON/OFF code pathswhat do you mean by partial changes in patches?
into a
separate functions? It's a bit difficult to follow the combined code,
especially partial changes in the patches. Thanks in advance!
Can you please be more clear?
you
say to move into separate functions?
set(on) {
ÂÂÂÂ if (on) {
ÂÂÂÂÂÂÂ ...
ÂÂÂÂÂÂÂ return;
ÂÂÂÂ }
ÂÂÂÂ if (!on)
ÂÂÂÂÂÂ ...
ÂÂÂÂ return;
}
to somewhat like this:
set(on) {
ÂÂÂÂ if (on)
ÂÂÂÂÂÂ ret = enable();
ÂÂÂÂ else
ÂÂÂÂÂÂ ret = disable();
ÂÂÂÂ return ret;
}
changing tegra_channel_set_stream() to have like below will haveReadability should be more important than number of lines.
redundant calls as most of the code b/w enable and disable is same
except calling them in reverse order based on on/off and doing MIPI
calibration only during ON
if (on)
ÂÂÂ ret = enable()
else
ÂÂÂ ret = disable()
return ret;