media: i2c: Provide ov7251_check_hwcfg()
authorDaniel Scally <djrscally@gmail.com>
Tue, 15 Feb 2022 23:07:31 +0000 (23:07 +0000)
committerDom Cobley <popcornmix@gmail.com>
Mon, 21 Mar 2022 16:04:43 +0000 (16:04 +0000)
commit062f6f4464f06d947d46ca2eb50fb83cc1e5f863
tree4014a7948514b374ec6a9299c3be3f3339c6d712
parent628c3f23dd152afb04a7b43a85b903434a150bcd
media: i2c: Provide ov7251_check_hwcfg()

Move the endpoint checking from .probe() to a dedicated function,
and additionally check that the firmware provided link frequencies
are a match for those supported by the driver. Finally, return
-EPROBE_DEFER if the endpoint is not available, as it could be built
by the ipu3-cio2 driver if that probes later.

Signed-off-by: Daniel Scally <djrscally@gmail.com>
drivers/media/i2c/ov7251.c