media: vimc: add ancillary lens
authorYunke Cao <yunkec@google.com>
Tue, 28 Jun 2022 00:53:52 +0000 (01:53 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 15 Jul 2022 13:40:09 +0000 (14:40 +0100)
commitd534b9520a128d20d81d6dcf95441e806bdeb20f
tree19320bbdc445f9033cec0fd154276cb9daccfeb0
parent46347e3ec61660562d4a4a933713e2c2b74598e2
media: vimc: add ancillary lens

Add lens to vimc driver and link them with sensors using ancillary links.
Provides an example of ancillary link usage.The lens supports
FOCUS_ABSOLUTE control.

Test example: With default vimc topology
> media-ctl -p
Media controller API version 5.18.0
...
- entity 28: Lens A (0 pad, 0 link)
             type V4L2 subdev subtype Lens flags 0
             device node name /dev/v4l-subdev6
- entity 29: Lens B (0 pad, 0 link)
             type V4L2 subdev subtype Lens flags 0
             device node name /dev/v4l-subdev7
> v4l2-ctl -d /dev/v4l-subdev7 -C focus_absolute
focus_absolute: 0

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Yunke Cao <yunkec@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/test-drivers/vimc/Makefile
drivers/media/test-drivers/vimc/vimc-common.h
drivers/media/test-drivers/vimc/vimc-core.c
drivers/media/test-drivers/vimc/vimc-lens.c [new file with mode: 0644]