0

As the title: Since which version did Linux kernel start to support V4L2 subdev model?

I am trying to look for some similar camera driver to start with, for developing our OV9282 camera driver. Since different Linux kernels have different driver models, we need to know it in advance.

In addition, who can tell me what's the difference between soc-camera (such as kernel/drivers/media/i2c/soc-camera/*.c) and non-soc-camera drivers (such as kernel/drivers/media/i2c/*.c)

Robin Hsu
  • 4,164
  • 3
  • 20
  • 37

1 Answers1

1

Short answer

Using a few git log on random files, it looks like it was included un v3.6-rc1-292-g5bc3cb7.

More detailed answer

  1. First, find v4l2 related files: find -name v4l2\*
  2. Pick some of them, and find out when they were introduced, using git log.
  3. Finally, use git describe with the commit ID to get the tag you're looking for.
✔ ~/src/linux $ git --no-pager log --pretty=oneline --reverse ./include/media/v4l2-clk.h
ff5430de70e8137daccecfa1211509f95fcc8d25 [media] V4L2: add temporary clock helpers
cf326dfebe612bf56c83d8fca7a7c1d1584c061f [media] V4L2: add v4l2-clock helpers to register and unregister a fixed-rate clock
774cc4c289152bfb77806ccae722a9ae2d29dd02 [media] V4L2: add a v4l2-clk helper macro to produce an I2C device ID
a37462b919e1368ea3cf4bb0cbdb00ca8e76959c [media] V4L: remove clock name from v4l2_clk API
4f528afcfbcac540c8690b41307cac5c22088ff1 [media] V4L: add CCF support to the v4l2_clk API
ac2841f3b80170415b63ae5ca8ea417f65244604 [media] v4l2-clk: add new macro for v4l2_clk_name_of()
3d83078a081a2bac7639d09404d85085368c8b66 [media] v4l2-clk: add new definition: V4L2_CLK_NAME_SIZE
68d9c47b1679ec8d55a005d39fc7a958ece82095 media: Convert to using %pOF instead of full_name

✔  ~/src/linux $ git describe ff5430de70e8137daccecfa1211509f95fcc8d25
v3.10-rc6-391-gff5430d

Any improvement for that solution is welcome!

Footnote: I couldn't manage to use git only commands to extract the first commit, in reversed order, see this question.

Aif
  • 11,015
  • 1
  • 30
  • 44
  • Did you mean V4L2 appearing time is the same as V4L2 subdev? I was asking specifically subdev appearing time... – Robin Hsu Sep 07 '18 at 11:36
  • Enlightened by your idea, I will do a search on git using `git log -S v4l2_subdev`. Hopefully I can get the most aged commit having subdev. – Robin Hsu Sep 07 '18 at 11:42
  • Indeed I was not so specific. I just picked one random file. I suppose if you chose the one responsible for the subdev you'll have your answer though. – Aif Sep 07 '18 at 11:49