How to control the focus of autofocus camera modules

I’d like to use DB410c to control the focus of the autofocus camera modules of this adapter:

I’m wondering if there is any existing API in Linaro Linux R.19.01 for DB410c I can use? If not, then could anyone kindly suggest how I can start this task?

Well, the API exists, you’re supposed to be able to use a V4L2 control (via e.g v4l-ctl tool). However the driver ov5645 itself does not implement any V4L2_CID_AUTO_FOCUS* or V4L2_CID_FOCUS* controls. That means you need to modify the driver yourself to add such support, mainly implementing the handler to change the related ov5645 registers.

Hi @Loic,
OK, I understand.
Thanks for your reply and explanations!