media: rp1: csi2: Track CSI-2 errors
Track the errors from the CSI-2 receiver: overflows and discards. These
are recorded in a table which can be read by the userspace via debugfs.
As tracking the errors may cause much more interrupt load, the tracking
needs to be enabled with a module parameter.
Note that the recording is not perfect: we only record the last
discarded DT for each discard type, instead of recording all of them.
This means that e.g. if the device is discarding two unmatched DTs, the
debugfs file only shows the last one recorded. Recording all of them
would need a more sophisticated recording system to avoid the need of a
very large table, or dynamic allocation.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>