History

Merge tag 'media/v5.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media updates from Mauro Carvalho Chehab: - a major reorg at platform Kconfig/Makefile files, organizing them per vendor. The other media Kconfig/Makefile files also sorted - New sensor drivers: hi847, isl7998x, ov08d10 - New Amphion vpu decoder stateful driver - New Atmel microchip csi2dc driver - tegra-vde driver promoted from staging - atomisp: some fixes for it to work on BYT - imx7-mipi-csis driver promoted from staging and renamed - camss driver got initial support for VFE hardware version Titan 480 - mtk-vcodec has gained support for MT8192 - lots of driver changes, fixes and improvements * tag 'media/v5.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (417 commits) media: nxp: Restrict VIDEO_IMX_MIPI_CSIS to ARCH_MXC or COMPILE_TEST media: amphion: cleanup media device if register it fail media: amphion: fix some issues to improve robust media: amphion: fix some error related with undefined reference to __divdi3 media: amphion: fix an issue that using pm_runtime_get_sync incorrectly media: vidtv: use vfree() for memory allocated with vzalloc() media: m5mols/m5mols.h: document new reset field media: pixfmt-yuv-planar.rst: fix PIX_FMT labels media: platform: Remove unnecessary print function dev_err() media: amphion: Add missing of_node_put() in vpu_core_parse_dt() media: mtk-vcodec: Add missing of_node_put() in mtk_vdec_hw_prob_done() media: platform: amphion: Fix build error without MAILBOX media: spi: Kconfig: Place SPI drivers on a single menu media: i2c: Kconfig: move camera drivers to the top media: atomisp: fix bad usage at error handling logic media: platform: rename mediatek/mtk-jpeg/ to mediatek/jpeg/ media: media/*/Kconfig: sort entries media: Kconfig: cleanup VIDEO_DEV dependencies media: platform/*/Kconfig: make manufacturer menus more uniform media: platform: Create vendor/{Makefile,Kconfig} files ...

Linus Torvalds committed 4 years ago

Commit 182966e2 parents 9c4b86e ba2c670883 files · +34799 −8952Browse files

Unified · Split

883 files
  1. Documentation/admin-guide/media/fimc.rst +1 −1
  2. Documentation/admin-guide/media/i2c-cardlist.rst +1 −1
  3. Documentation/admin-guide/media/imx7.rst +1 −1
  4. Documentation/admin-guide/media/omap3isp.rst +1 −1
  5. Documentation/admin-guide/media/omap4_camera.rst +1 −1
  6. Documentation/admin-guide/media/vimc.rst +13 −0
  7. Documentation/devicetree/bindings/display/mediatek/mediatek,disp.txt +0 −9
  8. Documentation/devicetree/bindings/media/amphion,vpu.yaml +180 −0
  9. Documentation/devicetree/bindings/media/i2c/hynix,hi846.yaml +5 −1
  10. Documentation/devicetree/bindings/media/i2c/isil,isl79987.yaml +113 −0
  11. Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml +170 −105
  12. Documentation/devicetree/bindings/media/mediatek,vcodec-decoder.yaml +169 −0
  13. Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml +179 −0
  14. Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml +265 −0
  15. Documentation/devicetree/bindings/media/mediatek-jpeg-decoder.txt +0 −38
  16. Documentation/devicetree/bindings/media/mediatek-jpeg-decoder.yaml +80 −0
  17. Documentation/devicetree/bindings/media/mediatek-jpeg-encoder.txt +0 −35
  18. Documentation/devicetree/bindings/media/mediatek-jpeg-encoder.yaml +72 −0
  19. Documentation/devicetree/bindings/media/mediatek-mdp.txt +0 −8
  20. Documentation/devicetree/bindings/media/mediatek-vcodec.txt +0 −131
  21. Documentation/devicetree/bindings/media/microchip,csi2dc.yaml +197 −0
  22. Documentation/devicetree/bindings/media/nxp,imx-mipi-csi2.yaml +1 −1
  23. Documentation/devicetree/bindings/media/nxp,imx7-csi.yaml +1 −0
  24. Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml +29 −39
  25. Documentation/devicetree/bindings/media/qcom,msm8916-camss.yaml +0 −10
  26. Documentation/devicetree/bindings/media/qcom,msm8996-camss.yaml +0 −20
  27. Documentation/devicetree/bindings/media/qcom,sdm660-camss.yaml +0 −20
  28. Documentation/devicetree/bindings/media/qcom,sdm845-camss.yaml +10 −21
  29. Documentation/devicetree/bindings/media/qcom,sm8250-camss.yaml +463 −0
  30. Documentation/devicetree/bindings/media/renesas,csi2.yaml +4 −1
  31. Documentation/driver-api/media/drivers/davinci-vpbe-devel.rst +10 −10
  32. Documentation/driver-api/media/drivers/fimc-devel.rst +7 −7
  33. Documentation/driver-api/media/v4l2-event.rst +1 −1
  34. Documentation/userspace-api/media/lirc.h.rst.exceptions +3 −1
  35. Documentation/userspace-api/media/rc/lirc-dev-intro.rst +9 −2
  36. Documentation/userspace-api/media/rc/lirc-get-features.rst +0 −18
  37. Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst +12 −1
  38. Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst +8 −8
  39. Documentation/userspace-api/media/v4l/pixfmt-reserved.rst +4 −11
  40. Documentation/userspace-api/media/v4l/pixfmt-rgb.rst +1 −1
  41. Documentation/userspace-api/media/v4l/pixfmt-yuv-luma.rst +2 −2
  42. Documentation/userspace-api/media/v4l/pixfmt-yuv-planar.rst +37 −8
  43. Documentation/userspace-api/media/v4l/v4l2grab.c.rst +1 −1
  44. Documentation/userspace-api/media/v4l/vidioc-qbuf.rst +1 −1
  45. MAINTAINERS +88 −47
  46. drivers/gpu/drm/mediatek/mtk_disp_ovl.c +7 −1
  47. drivers/gpu/drm/mediatek/mtk_disp_rdma.c +8 −1
  48. drivers/gpu/drm/mediatek/mtk_drm_crtc.c +8 −7
  49. drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c +2 −34
  50. drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h +0 −1
  51. drivers/gpu/drm/mediatek/mtk_drm_drv.c +1 −4
  52. drivers/gpu/ipu-v3/ipu-csi.c +3 −3
  53. drivers/input/rmi4/Kconfig +1 −1
  54. drivers/input/touchscreen/Kconfig +2 −2
  55. drivers/iommu/mtk_iommu.c +34 −0
  56. drivers/iommu/mtk_iommu_v1.c +41 −1
  57. drivers/media/Kconfig +8 −3
  58. drivers/media/Makefile +2 −2
  59. drivers/media/cec/platform/Makefile +8 −8
  60. drivers/media/cec/platform/cros-ec/cros-ec-cec.c +2 −0
  61. drivers/media/cec/platform/seco/seco-cec.c +28 −29
  62. drivers/media/common/Kconfig +8 −8
  63. drivers/media/common/Makefile +5 −2
  64. drivers/media/common/saa7146/Kconfig +1 −1
  65. drivers/media/common/videobuf2/Makefile +5 −3
  66. drivers/media/common/videobuf2/videobuf2-dma-contig.c +6 −6
  67. drivers/media/dvb-core/Kconfig +1 −1
  68. drivers/media/dvb-frontends/Kconfig +331 −332
  69. drivers/media/dvb-frontends/Makefile +98 −95
  70. drivers/media/dvb-frontends/dib3000mc.c +1 −1
  71. drivers/media/dvb-frontends/dib7000p.c +2 −2
  72. drivers/media/dvb-frontends/si21xx.c +1 −1
  73. drivers/media/dvb-frontends/stv0299.c +5 −4
  74. drivers/media/dvb-frontends/tda8083.c +1 −1
  75. drivers/media/firewire/Makefile +1 −1
  76. drivers/media/i2c/Kconfig +1072 −1019
  77. drivers/media/i2c/Makefile +98 −94
  78. drivers/media/i2c/adv7180.c +5 −5
  79. drivers/media/i2c/adv7183.c +25 −26
  80. drivers/media/i2c/adv748x/adv748x-csi2.c +1 −17
  81. drivers/media/i2c/adv7511-v4l2.c +1 −2
  82. drivers/media/i2c/adv7604.c +1 −1
  83. drivers/media/i2c/adv7842.c +1 −1
  84. drivers/media/i2c/ccs/Kconfig +1 −1
  85. drivers/media/i2c/ccs/ccs-core.c +0 −1
  86. drivers/media/i2c/cx25840/Kconfig +1 −1
  87. drivers/media/i2c/dw9714.c +41 −1
  88. drivers/media/i2c/et8ek8/Kconfig +1 −1
  89. drivers/media/i2c/hi847.c +3012 −0
  90. drivers/media/i2c/imx274.c +0 −2
  91. drivers/media/i2c/isl7998x.c +1628 −0
  92. drivers/media/i2c/m5mols/Kconfig +1 −1
  93. drivers/media/i2c/m5mols/m5mols.h +3 −0
  94. drivers/media/i2c/m5mols/m5mols_capture.c +0 −1
  95. drivers/media/i2c/m5mols/m5mols_core.c +10 −19
  96. drivers/media/i2c/max2175.c +1 −1
  97. drivers/media/i2c/max9286.c +95 −30
  98. drivers/media/i2c/ml86v7667.c +3 −2
  99. drivers/media/i2c/mt9m001.c +5 −3
  100. drivers/media/i2c/mt9m111.c +8 −7
  101. drivers/media/i2c/noon010pc30.c +35 −40
  102. drivers/media/i2c/og01a1b.c +1128 −0
  103. drivers/media/i2c/ov08d10.c +1528 −0
  104. drivers/media/i2c/ov2740.c +1 −7
  105. drivers/media/i2c/ov5640.c +7 −7
  106. drivers/media/i2c/ov5648.c +11 −5
  107. drivers/media/i2c/ov5675.c +29 −3
  108. drivers/media/i2c/ov5693.c +4 −5
  109. drivers/media/i2c/ov6650.c +111 −95
  110. drivers/media/i2c/ov8865.c +6 −6
  111. drivers/media/i2c/ov9640.c +5 −3
  112. drivers/media/i2c/saa7115.c +1 −1
  113. drivers/media/i2c/tc358743.c +5 −21
  114. drivers/media/i2c/tvp5150.c +4 −2
  115. drivers/media/mc/mc-entity.c +24 −31
  116. drivers/media/mmc/Kconfig +1 −0
  117. drivers/media/pci/Kconfig +19 −12
  118. drivers/media/pci/Makefile +14 −8
  119. drivers/media/pci/bt8xx/Kconfig +1 −1
  120. drivers/media/pci/bt8xx/bttv-driver.c +2 −2
  121. drivers/media/pci/cobalt/Kconfig +1 −1
  122. drivers/media/pci/cx18/Kconfig +1 −1
  123. drivers/media/pci/cx18/cx18-driver.c +2 −2
  124. drivers/media/pci/cx18/cx18-dvb.c +1 −1
  125. drivers/media/pci/cx18/cx18-gpio.c +1 −1
  126. drivers/media/pci/cx18/cx18-queue.h +3 −3
  127. drivers/media/pci/cx23885/cx23885-cards.c +1 −1
  128. drivers/media/pci/cx23885/cx23885-dvb.c +1 −1
  129. drivers/media/pci/cx23885/cx23885-input.c +1 −1
  130. drivers/media/pci/cx23885/cx23885-video.c +1 −1
  131. drivers/media/pci/cx88/cx88-mpeg.c +3 −0
  132. drivers/media/pci/cx88/cx88.h +1 −1
  133. drivers/media/pci/dt3155/Kconfig +1 −1
  134. drivers/media/pci/intel/ipu3/Kconfig +1 −1
  135. drivers/media/pci/ivtv/Kconfig +1 −1
  136. drivers/media/pci/ivtv/ivtv-driver.c +1 −1
  137. drivers/media/pci/ivtv/ivtv-driver.h +0 −1
  138. drivers/media/pci/ivtv/ivtv-gpio.c +1 −1
  139. drivers/media/pci/ivtv/ivtv-ioctl.c +5 −5
  140. drivers/media/pci/ivtv/ivtv-queue.h +14 −11
  141. drivers/media/pci/ivtv/ivtv-streams.c +4 −7
  142. drivers/media/pci/ivtv/ivtv-udma.h +4 −4
  143. drivers/media/pci/meye/Kconfig +1 −1
  144. drivers/media/pci/saa7134/saa7134-alsa.c +2 −2
  145. drivers/media/pci/saa7134/saa7134-cards.c +1 −1
  146. drivers/media/pci/saa7134/saa7134-dvb.c +1 −1
  147. drivers/media/pci/saa7134/saa7134-video.c +3 −8
  148. drivers/media/pci/saa7146/Kconfig +3 −3
  149. drivers/media/pci/saa7164/saa7164-cmd.c +0 −1
  150. drivers/media/pci/sta2x11/Kconfig +1 −1
  151. drivers/media/pci/tw5864/Kconfig +1 −1
  152. drivers/media/pci/tw68/Kconfig +1 −1
  153. drivers/media/pci/tw686x/Kconfig +1 −1
  154. drivers/media/platform/Kconfig +52 −644
  155. drivers/media/platform/Makefile +27 −83
  156. drivers/media/platform/allegro-dvt/Kconfig +19 −0
  157. drivers/media/platform/amlogic/Kconfig +5 −0
  158. drivers/media/platform/amlogic/Makefile +2 −0
  159. drivers/media/platform/amlogic/meson-ge2d/Kconfig +14 −0
  160. drivers/media/platform/amlogic/meson-ge2d/Makefile +0 −0
  161. drivers/media/platform/amlogic/meson-ge2d/ge2d-regs.h +0 −0
  162. drivers/media/platform/amlogic/meson-ge2d/ge2d.c +12 −12
  163. drivers/media/platform/amphion/Kconfig +22 −0
  164. drivers/media/platform/amphion/Makefile +20 −0
  165. drivers/media/platform/amphion/vdec.c +1656 −0
  166. drivers/media/platform/amphion/venc.c +1358 −0
  167. drivers/media/platform/amphion/vpu.h +362 −0
  168. drivers/media/platform/amphion/vpu_cmds.c +433 −0
  169. drivers/media/platform/amphion/vpu_cmds.h +25 −0
  170. drivers/media/platform/amphion/vpu_codec.h +68 −0
  171. drivers/media/platform/amphion/vpu_color.c +183 −0
  172. drivers/media/platform/amphion/vpu_core.c +879 −0
  173. drivers/media/platform/amphion/vpu_core.h +15 −0
  174. drivers/media/platform/amphion/vpu_dbg.c +494 −0
  175. drivers/media/platform/amphion/vpu_defs.h +187 −0
  176. drivers/media/platform/amphion/vpu_drv.c +261 −0
  177. drivers/media/platform/amphion/vpu_helpers.c +414 −0
  178. drivers/media/platform/amphion/vpu_helpers.h +71 −0
  179. drivers/media/platform/amphion/vpu_imx8q.c +271 −0
  180. drivers/media/platform/amphion/vpu_imx8q.h +115 −0
  181. drivers/media/platform/amphion/vpu_malone.c +1644 −0
  182. drivers/media/platform/amphion/vpu_malone.h +44 −0
  183. drivers/media/platform/amphion/vpu_mbox.c +118 −0
  184. drivers/media/platform/amphion/vpu_mbox.h +16 −0
  185. drivers/media/platform/amphion/vpu_msgs.c +385 −0
  186. drivers/media/platform/amphion/vpu_msgs.h +14 −0
  187. drivers/media/platform/amphion/vpu_rpc.c +259 −0
  188. drivers/media/platform/amphion/vpu_rpc.h +461 −0
  189. drivers/media/platform/amphion/vpu_v4l2.c +713 −0
  190. drivers/media/platform/amphion/vpu_v4l2.h +55 −0
  191. drivers/media/platform/amphion/vpu_windsor.c +1173 −0
  192. drivers/media/platform/amphion/vpu_windsor.h +37 −0
  193. drivers/media/platform/aspeed/Kconfig +13 −0
  194. drivers/media/platform/aspeed/Makefile +2 −0
  195. drivers/media/platform/aspeed/aspeed-video.c +236 −65
  196. drivers/media/platform/atmel/Kconfig +25 −3
  197. drivers/media/platform/atmel/Makefile +3 −1
  198. drivers/media/platform/atmel/atmel-isc-base.c +50 −347
  199. drivers/media/platform/atmel/atmel-isc-clk.c +311 −0
  200. drivers/media/platform/atmel/atmel-isc.h +11 −0
  201. drivers/media/platform/atmel/atmel-sama5d2-isc.c +24 −0
  202. drivers/media/platform/atmel/atmel-sama7g5-isc.c +25 −7
  203. drivers/media/platform/atmel/microchip-csi2dc.c +792 −0
  204. drivers/media/platform/cadence/Kconfig +3 −13
  205. drivers/media/platform/chips-media/Kconfig +20 −0
  206. drivers/media/platform/chips-media/Makefile +0 −0
  207. drivers/media/platform/chips-media/coda-bit.c +0 −0
  208. drivers/media/platform/chips-media/coda-common.c +1 −0
  209. drivers/media/platform/chips-media/coda-gdi.c +0 −0
  210. drivers/media/platform/chips-media/coda-h264.c +0 −0
  211. drivers/media/platform/chips-media/coda-jpeg.c +0 −0
  212. drivers/media/platform/chips-media/coda-mpeg2.c +0 −0
  213. drivers/media/platform/chips-media/coda-mpeg4.c +0 −0
  214. drivers/media/platform/chips-media/coda.h +0 −0
  215. drivers/media/platform/chips-media/coda_regs.h +1 −1
  216. drivers/media/platform/chips-media/imx-vdoa.c +4 −5
  217. drivers/media/platform/chips-media/imx-vdoa.h +0 −0
  218. drivers/media/platform/chips-media/trace.h +1 −1
  219. drivers/media/platform/intel/Kconfig +14 −0
  220. drivers/media/platform/intel/Makefile +2 −0
  221. drivers/media/platform/intel/pxa_camera.c +11 −10
  222. drivers/media/platform/marvell/Kconfig +7 −2
  223. drivers/media/platform/marvell/Makefile +0 −0
  224. drivers/media/platform/marvell/cafe-driver.c +0 −0
  225. drivers/media/platform/marvell/mcam-core.c +0 −0
  226. drivers/media/platform/marvell/mcam-core.h +0 −0
  227. drivers/media/platform/marvell/mmp-driver.c +3 −5
  228. drivers/media/platform/mediatek/Kconfig +8 −0
  229. drivers/media/platform/mediatek/Makefile +5 −0
  230. drivers/media/platform/mediatek/jpeg/Kconfig +16 −0
  231. drivers/media/platform/mediatek/jpeg/Makefile +0 −0
  232. drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c +3 −44
  233. drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.h +0 −2
  234. drivers/media/platform/mediatek/jpeg/mtk_jpeg_dec_hw.c +0 −0
  235. drivers/media/platform/mediatek/jpeg/mtk_jpeg_dec_hw.h +0 −0
  236. drivers/media/platform/mediatek/jpeg/mtk_jpeg_dec_parse.c +0 −0
  237. drivers/media/platform/mediatek/jpeg/mtk_jpeg_dec_parse.h +0 −0
  238. drivers/media/platform/mediatek/jpeg/mtk_jpeg_dec_reg.h +0 −0
  239. drivers/media/platform/mediatek/jpeg/mtk_jpeg_enc_hw.c +0 −0
  240. drivers/media/platform/mediatek/jpeg/mtk_jpeg_enc_hw.h +0 −0
  241. drivers/media/platform/mediatek/mdp/Kconfig +17 −0
  242. drivers/media/platform/mediatek/mdp/Makefile +1 −1
  243. drivers/media/platform/mediatek/mdp/mtk_mdp_comp.c +0 −40
  244. drivers/media/platform/mediatek/mdp/mtk_mdp_comp.h +0 −2
  245. drivers/media/platform/mediatek/mdp/mtk_mdp_core.c +0 −3
  246. drivers/media/platform/mediatek/mdp/mtk_mdp_core.h +0 −0
  247. drivers/media/platform/mediatek/mdp/mtk_mdp_ipi.h +0 −0
  248. drivers/media/platform/mediatek/mdp/mtk_mdp_m2m.c +0 −0
  249. drivers/media/platform/mediatek/mdp/mtk_mdp_m2m.h +0 −0
  250. drivers/media/platform/mediatek/mdp/mtk_mdp_regs.c +0 −0
  251. drivers/media/platform/mediatek/mdp/mtk_mdp_regs.h +0 −0
  252. drivers/media/platform/mediatek/mdp/mtk_mdp_vpu.c +0 −0
  253. drivers/media/platform/mediatek/mdp/mtk_mdp_vpu.h +0 −0
  254. drivers/media/platform/mediatek/vcodec/Kconfig +36 −0
  255. drivers/media/platform/mediatek/vcodec/Makefile +5 −1
  256. drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c +2 −2
  257. drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.h +1 −0
  258. drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c +141 −58
  259. drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c +200 −0
  260. drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.h +56 −0
  261. drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_pm.c +169 −0
  262. drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_pm.h +19 −0
  263. drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateful.c +2 −0
  264. drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateless.c +21 −0
  265. drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +69 −8
  266. drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c +0 −1
  267. drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.h +0 −0
  268. drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c +7 −15
  269. drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_pm.c +7 −48
  270. drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_pm.h +1 −2
  271. drivers/media/platform/mediatek/vcodec/mtk_vcodec_fw.c +0 −0
  272. drivers/media/platform/mediatek/vcodec/mtk_vcodec_fw.h +1 −1
  273. drivers/media/platform/mediatek/vcodec/mtk_vcodec_fw_priv.h +0 −0
  274. drivers/media/platform/mediatek/vcodec/mtk_vcodec_fw_scp.c +0 −0
  275. drivers/media/platform/mediatek/vcodec/mtk_vcodec_fw_vpu.c +2 −0
  276. drivers/media/platform/mediatek/vcodec/mtk_vcodec_intr.c +43 −0
  277. drivers/media/platform/mediatek/vcodec/mtk_vcodec_intr.h +3 −2
  278. drivers/media/platform/mediatek/vcodec/mtk_vcodec_util.c +48 −11
  279. drivers/media/platform/mediatek/vcodec/mtk_vcodec_util.h +5 −3
  280. drivers/media/platform/mediatek/vcodec/vdec/vdec_h264_if.c +1 −1
  281. drivers/media/platform/mediatek/vcodec/vdec/vdec_h264_req_if.c +1 −1
  282. drivers/media/platform/mediatek/vcodec/vdec/vdec_vp8_if.c +1 −1
  283. drivers/media/platform/mediatek/vcodec/vdec/vdec_vp9_if.c +1 −1
  284. drivers/media/platform/mediatek/vcodec/vdec_drv_base.h +0 −0
  285. drivers/media/platform/mediatek/vcodec/vdec_drv_if.c +11 −10
  286. drivers/media/platform/mediatek/vcodec/vdec_drv_if.h +0 −0
  287. drivers/media/platform/mediatek/vcodec/vdec_ipi_msg.h +12 −4
  288. drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c +290 −0
  289. drivers/media/platform/mediatek/vcodec/vdec_msg_queue.h +153 −0
  290. drivers/media/platform/mediatek/vcodec/vdec_vpu_if.c +41 −5
  291. drivers/media/platform/mediatek/vcodec/vdec_vpu_if.h +22 −0
  292. drivers/media/platform/mediatek/vcodec/venc/venc_h264_if.c +1 −1
  293. drivers/media/platform/mediatek/vcodec/venc/venc_vp8_if.c +1 −1
  294. drivers/media/platform/mediatek/vcodec/venc_drv_base.h +0 −0
  295. drivers/media/platform/mediatek/vcodec/venc_drv_if.c +0 −0
  296. drivers/media/platform/mediatek/vcodec/venc_drv_if.h +0 −0
  297. drivers/media/platform/mediatek/vcodec/venc_ipi_msg.h +0 −0
  298. drivers/media/platform/mediatek/vcodec/venc_vpu_if.c +0 −0
  299. drivers/media/platform/mediatek/vcodec/venc_vpu_if.h +0 −0
  300. drivers/media/platform/mediatek/vpu/Kconfig +15 −0
  301. drivers/media/platform/mediatek/vpu/Makefile +0 −0
  302. drivers/media/platform/mediatek/vpu/mtk_vpu.c +3 −7
  303. drivers/media/platform/mediatek/vpu/mtk_vpu.h +0 −0
  304. drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c +0 −145
  305. drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.h +0 −20
  306. drivers/media/platform/mtk-vcodec/mtk_vcodec_intr.c +0 −45
  307. drivers/media/platform/nvidia/Kconfig +5 −0
  308. drivers/media/platform/nvidia/Makefile +3 −0
  309. drivers/media/platform/nvidia/tegra-vde/Kconfig +17 −0
  310. drivers/media/platform/nvidia/tegra-vde/Makefile +3 −0
  311. drivers/media/platform/nvidia/tegra-vde/dmabuf-cache.c +1 −1
  312. drivers/media/platform/nvidia/tegra-vde/h264.c +946 −0
  313. drivers/media/platform/nvidia/tegra-vde/iommu.c +1 −1
  314. drivers/media/platform/nvidia/tegra-vde/trace.h +1 −1
  315. drivers/media/platform/nvidia/tegra-vde/v4l2.c +1018 −0
  316. drivers/media/platform/nvidia/tegra-vde/vde.c +551 −0
  317. drivers/media/platform/nvidia/tegra-vde/vde.h +242 −0
  318. drivers/media/platform/nxp/Kconfig +55 −0
  319. drivers/media/platform/nxp/Makefile +8 −0
  320. drivers/media/platform/nxp/fsl-viu.c +1 −1
  321. drivers/media/platform/nxp/imx-jpeg/Kconfig +2 −1
  322. drivers/media/platform/nxp/imx-jpeg/Makefile +0 −0
  323. drivers/media/platform/nxp/imx-jpeg/mxc-jpeg-hw.c +0 −0
  324. drivers/media/platform/nxp/imx-jpeg/mxc-jpeg-hw.h +0 −0
  325. drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c +52 −11
  326. drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.h +1 −0
  327. drivers/media/platform/nxp/imx-mipi-csis.c +105 −18
  328. drivers/media/platform/nxp/imx-pxp.c +0 −0
  329. drivers/media/platform/nxp/imx-pxp.h +0 −0
  330. drivers/media/platform/nxp/mx2_emmaprp.c +0 −0
  331. drivers/media/platform/qcom/Kconfig +6 −0
  332. drivers/media/platform/qcom/Makefile +3 −0
  333. drivers/media/platform/qcom/camss/Kconfig +9 −0
  334. drivers/media/platform/qcom/camss/Makefile +2 −1
  335. drivers/media/platform/qcom/camss/camss-csid-gen2.c +20 −14
  336. drivers/media/platform/qcom/camss/camss-csid.c +67 −24
  337. drivers/media/platform/qcom/camss/camss-csid.h +3 −2
  338. drivers/media/platform/qcom/camss/camss-csiphy-2ph-1-0.c +17 −2
  339. drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c +157 −42
  340. drivers/media/platform/qcom/camss/camss-csiphy.c +12 −30
  341. drivers/media/platform/qcom/camss/camss-csiphy.h +7 −0
  342. drivers/media/platform/qcom/camss/camss-ispif.c +4 −8
  343. drivers/media/platform/qcom/camss/camss-vfe-170.c +1 −11
  344. drivers/media/platform/qcom/camss/camss-vfe-480.c +564 −0
  345. drivers/media/platform/qcom/camss/camss-vfe.c +15 −14
  346. drivers/media/platform/qcom/camss/camss-vfe.h +4 −0
  347. drivers/media/platform/qcom/camss/camss-video.c +4 −1
  348. drivers/media/platform/qcom/camss/camss.c +322 −46
  349. drivers/media/platform/qcom/camss/camss.h +19 −1
  350. drivers/media/platform/qcom/venus/Kconfig +14 −0
  351. drivers/media/platform/qcom/venus/core.h +4 −0
  352. drivers/media/platform/qcom/venus/helpers.c +1 −1
  353. drivers/media/platform/qcom/venus/hfi_cmds.c +2 −0
  354. drivers/media/platform/qcom/venus/venc.c +2 −2
  355. drivers/media/platform/qcom/venus/venc_ctrls.c +3 −3
  356. drivers/media/platform/renesas/Kconfig +121 −0
  357. drivers/media/platform/renesas/Makefile +15 −0
  358. drivers/media/platform/renesas/rcar-fcp.c +0 −0
  359. drivers/media/platform/renesas/rcar-isp.c +26 −6
  360. drivers/media/platform/renesas/rcar-vin/Kconfig +4 −2
  361. drivers/media/platform/renesas/rcar-vin/Makefile +0 −0
  362. drivers/media/platform/renesas/rcar-vin/rcar-core.c +113 −276
  363. drivers/media/platform/renesas/rcar-vin/rcar-csi2.c +105 −27
  364. drivers/media/platform/renesas/rcar-vin/rcar-dma.c +1 −1
  365. drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c +0 −0
  366. drivers/media/platform/renesas/rcar-vin/rcar-vin.h +5 −15
  367. drivers/media/platform/renesas/rcar_drif.c +0 −0
  368. drivers/media/platform/renesas/rcar_fdp1.c +0 −0
  369. drivers/media/platform/renesas/rcar_jpu.c +1 −1
  370. drivers/media/platform/renesas/renesas-ceu.c +0 −0
  371. drivers/media/platform/renesas/sh_vou.c +0 −0
  372. drivers/media/platform/renesas/vsp1/Makefile +0 −0
  373. drivers/media/platform/renesas/vsp1/vsp1.h +0 −0
  374. drivers/media/platform/renesas/vsp1/vsp1_brx.c +0 −0
  375. drivers/media/platform/renesas/vsp1/vsp1_brx.h +0 −0
  376. drivers/media/platform/renesas/vsp1/vsp1_clu.c +0 −0
  377. drivers/media/platform/renesas/vsp1/vsp1_clu.h +0 −0
  378. drivers/media/platform/renesas/vsp1/vsp1_dl.c +0 −0
  379. drivers/media/platform/renesas/vsp1/vsp1_dl.h +0 −0
  380. drivers/media/platform/renesas/vsp1/vsp1_drm.c +0 −0
  381. drivers/media/platform/renesas/vsp1/vsp1_drm.h +0 −0
  382. drivers/media/platform/renesas/vsp1/vsp1_drv.c +33 −14
  383. drivers/media/platform/renesas/vsp1/vsp1_entity.c +0 −0
  384. drivers/media/platform/renesas/vsp1/vsp1_entity.h +0 −0
  385. drivers/media/platform/renesas/vsp1/vsp1_hgo.c +0 −0
  386. drivers/media/platform/renesas/vsp1/vsp1_hgo.h +0 −0
  387. drivers/media/platform/renesas/vsp1/vsp1_hgt.c +0 −0
  388. drivers/media/platform/renesas/vsp1/vsp1_hgt.h +0 −0
  389. drivers/media/platform/renesas/vsp1/vsp1_histo.c +0 −0
  390. drivers/media/platform/renesas/vsp1/vsp1_histo.h +0 −0
  391. drivers/media/platform/renesas/vsp1/vsp1_hsit.c +0 −0
  392. drivers/media/platform/renesas/vsp1/vsp1_hsit.h +0 −0
  393. drivers/media/platform/renesas/vsp1/vsp1_lif.c +0 −0
  394. drivers/media/platform/renesas/vsp1/vsp1_lif.h +0 −0
  395. drivers/media/platform/renesas/vsp1/vsp1_lut.c +0 −0
  396. drivers/media/platform/renesas/vsp1/vsp1_lut.h +0 −0
  397. drivers/media/platform/renesas/vsp1/vsp1_pipe.c +0 −0
  398. drivers/media/platform/renesas/vsp1/vsp1_pipe.h +0 −0
  399. drivers/media/platform/renesas/vsp1/vsp1_regs.h +0 −0
  400. drivers/media/platform/renesas/vsp1/vsp1_rpf.c +0 −0
  401. drivers/media/platform/renesas/vsp1/vsp1_rwpf.c +0 −0
  402. drivers/media/platform/renesas/vsp1/vsp1_rwpf.h +0 −0
  403. drivers/media/platform/renesas/vsp1/vsp1_sru.c +0 −0
  404. drivers/media/platform/renesas/vsp1/vsp1_sru.h +0 −0
  405. drivers/media/platform/renesas/vsp1/vsp1_uds.c +0 −0
  406. drivers/media/platform/renesas/vsp1/vsp1_uds.h +0 −0
  407. drivers/media/platform/renesas/vsp1/vsp1_uif.c +0 −0
  408. drivers/media/platform/renesas/vsp1/vsp1_uif.h +0 −0
  409. drivers/media/platform/renesas/vsp1/vsp1_video.c +0 −0
  410. drivers/media/platform/renesas/vsp1/vsp1_video.h +0 −0
  411. drivers/media/platform/renesas/vsp1/vsp1_wpf.c +0 −0
  412. drivers/media/platform/rockchip/Kconfig +6 −0
  413. drivers/media/platform/rockchip/Makefile +3 −0
  414. drivers/media/platform/rockchip/rga/Kconfig +14 −0
  415. drivers/media/platform/rockchip/rkisp1/Kconfig +19 −0
  416. drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c +21 −7
  417. drivers/media/platform/samsung/Kconfig +10 −0
  418. drivers/media/platform/samsung/Makefile +7 −0
  419. drivers/media/platform/samsung/exynos-gsc/Kconfig +10 −0
  420. drivers/media/platform/samsung/exynos-gsc/Makefile +0 −0
  421. drivers/media/platform/samsung/exynos-gsc/gsc-core.c +6 −8
  422. drivers/media/platform/samsung/exynos-gsc/gsc-core.h +0 −0
  423. drivers/media/platform/samsung/exynos-gsc/gsc-m2m.c +0 −0
  424. drivers/media/platform/samsung/exynos-gsc/gsc-regs.c +0 −0
  425. drivers/media/platform/samsung/exynos-gsc/gsc-regs.h +0 −0
  426. drivers/media/platform/samsung/exynos4-is/Kconfig +2 −1
  427. drivers/media/platform/samsung/exynos4-is/Makefile +0 −0
  428. drivers/media/platform/samsung/exynos4-is/common.c +4 −1
  429. drivers/media/platform/samsung/exynos4-is/common.h +0 −0
  430. drivers/media/platform/samsung/exynos4-is/fimc-capture.c +0 −0
  431. drivers/media/platform/samsung/exynos4-is/fimc-core.c +5 −6
  432. drivers/media/platform/samsung/exynos4-is/fimc-core.h +0 −0
  433. drivers/media/platform/samsung/exynos4-is/fimc-is-command.h +0 −0
  434. drivers/media/platform/samsung/exynos4-is/fimc-is-errno.c +0 −0
  435. drivers/media/platform/samsung/exynos4-is/fimc-is-errno.h +0 −0
  436. drivers/media/platform/samsung/exynos4-is/fimc-is-i2c.c +0 −0
  437. drivers/media/platform/samsung/exynos4-is/fimc-is-i2c.h +0 −0
  438. drivers/media/platform/samsung/exynos4-is/fimc-is-param.c +0 −0
  439. drivers/media/platform/samsung/exynos4-is/fimc-is-param.h +0 −0
  440. drivers/media/platform/samsung/exynos4-is/fimc-is-regs.c +0 −0
  441. drivers/media/platform/samsung/exynos4-is/fimc-is-regs.h +0 −0
  442. drivers/media/platform/samsung/exynos4-is/fimc-is-sensor.c +0 −0
  443. drivers/media/platform/samsung/exynos4-is/fimc-is-sensor.h +0 −0
  444. drivers/media/platform/samsung/exynos4-is/fimc-is.c +0 −0
  445. drivers/media/platform/samsung/exynos4-is/fimc-is.h +0 −0
  446. drivers/media/platform/samsung/exynos4-is/fimc-isp-video.c +0 −0
  447. drivers/media/platform/samsung/exynos4-is/fimc-isp-video.h +0 −0
  448. drivers/media/platform/samsung/exynos4-is/fimc-isp.c +1 −1
  449. drivers/media/platform/samsung/exynos4-is/fimc-isp.h +0 −0
  450. drivers/media/platform/samsung/exynos4-is/fimc-lite-reg.c +0 −0
  451. drivers/media/platform/samsung/exynos4-is/fimc-lite-reg.h +0 −0
  452. drivers/media/platform/samsung/exynos4-is/fimc-lite.c +8 −9
  453. drivers/media/platform/samsung/exynos4-is/fimc-lite.h +0 −0
  454. drivers/media/platform/samsung/exynos4-is/fimc-m2m.c +0 −0
  455. drivers/media/platform/samsung/exynos4-is/fimc-reg.c +0 −0
  456. drivers/media/platform/samsung/exynos4-is/fimc-reg.h +0 −0
  457. drivers/media/platform/samsung/exynos4-is/media-dev.c +0 −0
  458. drivers/media/platform/samsung/exynos4-is/media-dev.h +0 −0
  459. drivers/media/platform/samsung/exynos4-is/mipi-csis.c +0 −0
  460. drivers/media/platform/samsung/exynos4-is/mipi-csis.h +0 −0
  461. drivers/media/platform/samsung/s3c-camif/Kconfig +15 −0
  462. drivers/media/platform/samsung/s3c-camif/Makefile +0 −0
  463. drivers/media/platform/samsung/s3c-camif/camif-capture.c +0 −0
  464. drivers/media/platform/samsung/s3c-camif/camif-core.c +0 −0
  465. drivers/media/platform/samsung/s3c-camif/camif-core.h +0 −0
  466. drivers/media/platform/samsung/s3c-camif/camif-regs.c +0 −0
  467. drivers/media/platform/samsung/s3c-camif/camif-regs.h +0 −0
  468. drivers/media/platform/samsung/s5p-g2d/Kconfig +11 −0
  469. drivers/media/platform/samsung/s5p-g2d/Makefile +0 −0
  470. drivers/media/platform/samsung/s5p-g2d/g2d-hw.c +0 −0
  471. drivers/media/platform/samsung/s5p-g2d/g2d-regs.h +0 −0
  472. drivers/media/platform/samsung/s5p-g2d/g2d.c +3 −7
  473. drivers/media/platform/samsung/s5p-g2d/g2d.h +0 −0
  474. drivers/media/platform/samsung/s5p-jpeg/Kconfig +12 −0
  475. drivers/media/platform/samsung/s5p-jpeg/Makefile +0 −0
  476. drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c +1 −1
  477. drivers/media/platform/samsung/s5p-jpeg/jpeg-core.h +1 −1
  478. drivers/media/platform/samsung/s5p-jpeg/jpeg-hw-exynos3250.c +0 −0
  479. drivers/media/platform/samsung/s5p-jpeg/jpeg-hw-exynos3250.h +1 −1
  480. drivers/media/platform/samsung/s5p-jpeg/jpeg-hw-exynos4.c +0 −0
  481. drivers/media/platform/samsung/s5p-jpeg/jpeg-hw-exynos4.h +0 −0
  482. drivers/media/platform/samsung/s5p-jpeg/jpeg-hw-s5p.c +1 −1
  483. drivers/media/platform/samsung/s5p-jpeg/jpeg-hw-s5p.h +1 −1
  484. drivers/media/platform/samsung/s5p-jpeg/jpeg-regs.h +1 −1
  485. drivers/media/platform/samsung/s5p-mfc/Kconfig +9 −0
  486. drivers/media/platform/samsung/s5p-mfc/Makefile +0 −0
  487. drivers/media/platform/samsung/s5p-mfc/regs-mfc-v10.h +0 −0
  488. drivers/media/platform/samsung/s5p-mfc/regs-mfc-v6.h +0 −0
  489. drivers/media/platform/samsung/s5p-mfc/regs-mfc-v7.h +0 −0
  490. drivers/media/platform/samsung/s5p-mfc/regs-mfc-v8.h +0 −0
  491. drivers/media/platform/samsung/s5p-mfc/regs-mfc.h +0 −0
  492. drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c +4 −7
  493. drivers/media/platform/samsung/s5p-mfc/s5p_mfc_cmd.c +1 −1
  494. drivers/media/platform/samsung/s5p-mfc/s5p_mfc_cmd.h +1 −1
  495. drivers/media/platform/samsung/s5p-mfc/s5p_mfc_cmd_v5.c +1 −1
  496. drivers/media/platform/samsung/s5p-mfc/s5p_mfc_cmd_v5.h +1 −1
  497. drivers/media/platform/samsung/s5p-mfc/s5p_mfc_cmd_v6.c +1 −1
  498. drivers/media/platform/samsung/s5p-mfc/s5p_mfc_cmd_v6.h +1 −1
  499. drivers/media/platform/samsung/s5p-mfc/s5p_mfc_common.h +1 −0
  500. drivers/media/platform/samsung/s5p-mfc/s5p_mfc_ctrl.c +1 −1
  501. drivers/media/platform/samsung/s5p-mfc/s5p_mfc_ctrl.h +1 −1
  502. drivers/media/platform/samsung/s5p-mfc/s5p_mfc_debug.h +1 −1
  503. drivers/media/platform/samsung/s5p-mfc/s5p_mfc_dec.c +19 −1
  504. drivers/media/platform/samsung/s5p-mfc/s5p_mfc_dec.h +1 −1
  505. drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c +1 −1
  506. drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.h +1 −1
  507. drivers/media/platform/samsung/s5p-mfc/s5p_mfc_intr.c +0 −0
  508. drivers/media/platform/samsung/s5p-mfc/s5p_mfc_intr.h +0 −0
  509. drivers/media/platform/samsung/s5p-mfc/s5p_mfc_iommu.h +0 −0
  510. drivers/media/platform/samsung/s5p-mfc/s5p_mfc_opr.c +1 −1
  511. drivers/media/platform/samsung/s5p-mfc/s5p_mfc_opr.h +1 −1
  512. drivers/media/platform/samsung/s5p-mfc/s5p_mfc_opr_v5.c +0 −0
  513. drivers/media/platform/samsung/s5p-mfc/s5p_mfc_opr_v5.h +0 −0
  514. drivers/media/platform/samsung/s5p-mfc/s5p_mfc_opr_v6.c +1 −1
  515. drivers/media/platform/samsung/s5p-mfc/s5p_mfc_opr_v6.h +1 −1
  516. drivers/media/platform/samsung/s5p-mfc/s5p_mfc_pm.c +1 −1
  517. drivers/media/platform/samsung/s5p-mfc/s5p_mfc_pm.h +1 −1
  518. drivers/media/platform/st/Kconfig +6 −0
  519. drivers/media/platform/st/Makefile +7 −0
  520. drivers/media/platform/st/sti/Kconfig +5 −0
  521. drivers/media/platform/st/sti/Makefile +6 −0
  522. drivers/media/platform/st/sti/bdisp/Kconfig +10 −0
  523. drivers/media/platform/st/sti/bdisp/Makefile +0 −0
  524. drivers/media/platform/st/sti/bdisp/bdisp-debug.c +0 −0
  525. drivers/media/platform/st/sti/bdisp/bdisp-filter.h +0 −0
  526. drivers/media/platform/st/sti/bdisp/bdisp-hw.c +0 −0
  527. drivers/media/platform/st/sti/bdisp/bdisp-reg.h +0 −0
  528. drivers/media/platform/st/sti/bdisp/bdisp-v4l2.c +3 −7
  529. drivers/media/platform/st/sti/bdisp/bdisp.h +0 −0
  530. drivers/media/platform/st/sti/c8sectpfe/Kconfig +1 −0
  531. drivers/media/platform/st/sti/c8sectpfe/Makefile +0 −0
  532. drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-common.c +0 −0
  533. drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-common.h +0 −0
  534. drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c +0 −0
  535. drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.h +0 −0
  536. drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-debugfs.c +0 −0
  537. drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-debugfs.h +0 −0
  538. drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-dvb.c +0 −0
  539. drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-dvb.h +0 −0
  540. drivers/media/platform/st/sti/delta/Kconfig +36 −0
  541. drivers/media/platform/st/sti/delta/Makefile +0 −0
  542. drivers/media/platform/st/sti/delta/delta-cfg.h +0 −0
  543. drivers/media/platform/st/sti/delta/delta-debug.c +0 −0
  544. drivers/media/platform/st/sti/delta/delta-debug.h +0 −0
  545. drivers/media/platform/st/sti/delta/delta-ipc.c +0 −0
  546. drivers/media/platform/st/sti/delta/delta-ipc.h +0 −0
  547. drivers/media/platform/st/sti/delta/delta-mem.c +0 −0
  548. drivers/media/platform/st/sti/delta/delta-mem.h +0 −0
  549. drivers/media/platform/st/sti/delta/delta-mjpeg-dec.c +0 −0
  550. drivers/media/platform/st/sti/delta/delta-mjpeg-fw.h +0 −0
  551. drivers/media/platform/st/sti/delta/delta-mjpeg-hdr.c +0 −0
  552. drivers/media/platform/st/sti/delta/delta-mjpeg.h +0 −0
  553. drivers/media/platform/st/sti/delta/delta-v4l2.c +0 −0
  554. drivers/media/platform/st/sti/delta/delta.h +0 −0
  555. drivers/media/platform/st/sti/hva/Kconfig +26 −0
  556. drivers/media/platform/st/sti/hva/Makefile +0 −0
  557. drivers/media/platform/st/sti/hva/hva-debugfs.c +0 −0
  558. drivers/media/platform/st/sti/hva/hva-h264.c +0 −0
  559. drivers/media/platform/st/sti/hva/hva-hw.c +0 −0
  560. drivers/media/platform/st/sti/hva/hva-hw.h +0 −0
  561. drivers/media/platform/st/sti/hva/hva-mem.c +0 −0
  562. drivers/media/platform/st/sti/hva/hva-mem.h +0 −0
  563. drivers/media/platform/st/sti/hva/hva-v4l2.c +0 −0
  564. drivers/media/platform/st/sti/hva/hva.h +0 −0
  565. drivers/media/platform/st/stm32/Kconfig +31 −0
  566. drivers/media/platform/st/stm32/Makefile +0 −0
  567. drivers/media/platform/st/stm32/dma2d/dma2d-hw.c +0 −0
  568. drivers/media/platform/st/stm32/dma2d/dma2d-regs.h +0 −0
  569. drivers/media/platform/st/stm32/dma2d/dma2d.c +3 −6
  570. drivers/media/platform/st/stm32/dma2d/dma2d.h +0 −0
  571. drivers/media/platform/st/stm32/stm32-dcmi.c +40 −13
  572. drivers/media/platform/sunxi/Kconfig +4 −0
  573. drivers/media/platform/sunxi/sun4i-csi/Kconfig +2 −1
  574. drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.h +1 −1
  575. drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c +1 −1
  576. drivers/media/platform/sunxi/sun6i-csi/Kconfig +2 −1
  577. drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c +5 −1
  578. drivers/media/platform/sunxi/sun8i-di/Kconfig +14 −0
  579. drivers/media/platform/sunxi/sun8i-rotate/Kconfig +14 −0
  580. drivers/media/platform/ti/Kconfig +69 −0
  581. drivers/media/platform/ti/Makefile +7 −0
  582. drivers/media/platform/ti/am437x/Kconfig +2 −1
  583. drivers/media/platform/ti/am437x/Makefile +0 −0
  584. drivers/media/platform/ti/am437x/am437x-vpfe.c +0 −0
  585. drivers/media/platform/ti/am437x/am437x-vpfe.h +0 −0
  586. drivers/media/platform/ti/am437x/am437x-vpfe_regs.h +0 −0
  587. drivers/media/platform/ti/cal/Makefile +3 −0
  588. drivers/media/platform/ti/cal/cal-camerarx.c +3 −3
  589. drivers/media/platform/ti/cal/cal-video.c +3 −0
  590. drivers/media/platform/ti/cal/cal.c +0 −0
  591. drivers/media/platform/ti/cal/cal.h +0 −0
  592. drivers/media/platform/ti/cal/cal_regs.h +0 −0
  593. drivers/media/platform/ti/davinci/Kconfig +12 −6
  594. drivers/media/platform/ti/davinci/Makefile +0 −0
  595. drivers/media/platform/ti/davinci/ccdc_hw_device.h +0 −0
  596. drivers/media/platform/ti/davinci/dm355_ccdc.c +0 −0
  597. drivers/media/platform/ti/davinci/dm355_ccdc_regs.h +0 −0
  598. drivers/media/platform/ti/davinci/dm644x_ccdc.c +0 −0
  599. drivers/media/platform/ti/davinci/dm644x_ccdc_regs.h +0 −0
  600. drivers/media/platform/ti/davinci/isif.c +0 −0
  601. drivers/media/platform/ti/davinci/isif_regs.h +0 −0
  602. drivers/media/platform/ti/davinci/vpbe.c +0 −0
  603. drivers/media/platform/ti/davinci/vpbe_display.c +0 −0
  604. drivers/media/platform/ti/davinci/vpbe_osd.c +0 −0
  605. drivers/media/platform/ti/davinci/vpbe_osd_regs.h +0 −0
  606. drivers/media/platform/ti/davinci/vpbe_venc.c +0 −0
  607. drivers/media/platform/ti/davinci/vpbe_venc_regs.h +0 −0
  608. drivers/media/platform/ti/davinci/vpfe_capture.c +0 −0
  609. drivers/media/platform/ti/davinci/vpif.c +89 −34
  610. drivers/media/platform/ti/davinci/vpif.h +0 −0
  611. drivers/media/platform/ti/davinci/vpif_capture.c +16 −11
  612. drivers/media/platform/ti/davinci/vpif_capture.h +0 −0
  613. drivers/media/platform/ti/davinci/vpif_display.c +15 −9
  614. drivers/media/platform/ti/davinci/vpif_display.h +0 −0
  615. drivers/media/platform/ti/davinci/vpss.c +0 −0
  616. drivers/media/platform/ti/omap/Kconfig +2 −1
  617. drivers/media/platform/ti/omap/Makefile +0 −0
  618. drivers/media/platform/ti/omap/omap_vout.c +0 −0
  619. drivers/media/platform/ti/omap/omap_vout_vrfb.c +0 −0
  620. drivers/media/platform/ti/omap/omap_vout_vrfb.h +0 −0
  621. drivers/media/platform/ti/omap/omap_voutdef.h +0 −0
  622. drivers/media/platform/ti/omap/omap_voutlib.c +0 −0
  623. drivers/media/platform/ti/omap/omap_voutlib.h +0 −0
  624. drivers/media/platform/ti/omap3isp/Kconfig +21 −0
  625. drivers/media/platform/ti/omap3isp/Makefile +0 −0
  626. drivers/media/platform/ti/omap3isp/cfa_coef_table.h +0 −0
  627. drivers/media/platform/ti/omap3isp/gamma_table.h +0 −0
  628. drivers/media/platform/ti/omap3isp/isp.c +0 −0
  629. drivers/media/platform/ti/omap3isp/isp.h +0 −0
  630. drivers/media/platform/ti/omap3isp/ispccdc.c +0 −0
  631. drivers/media/platform/ti/omap3isp/ispccdc.h +0 −0
  632. drivers/media/platform/ti/omap3isp/ispccp2.c +0 −0
  633. drivers/media/platform/ti/omap3isp/ispccp2.h +0 −0
  634. drivers/media/platform/ti/omap3isp/ispcsi2.c +0 −0
  635. drivers/media/platform/ti/omap3isp/ispcsi2.h +0 −0
  636. drivers/media/platform/ti/omap3isp/ispcsiphy.c +0 −0
  637. drivers/media/platform/ti/omap3isp/ispcsiphy.h +0 −0
  638. drivers/media/platform/ti/omap3isp/isph3a.h +0 −0
  639. drivers/media/platform/ti/omap3isp/isph3a_aewb.c +0 −0
  640. drivers/media/platform/ti/omap3isp/isph3a_af.c +0 −0
  641. drivers/media/platform/ti/omap3isp/isphist.c +0 −0
  642. drivers/media/platform/ti/omap3isp/isphist.h +0 −0
  643. drivers/media/platform/ti/omap3isp/isppreview.c +0 −0
  644. drivers/media/platform/ti/omap3isp/isppreview.h +0 −0
  645. drivers/media/platform/ti/omap3isp/ispreg.h +0 −0
  646. drivers/media/platform/ti/omap3isp/ispresizer.c +0 −0
  647. drivers/media/platform/ti/omap3isp/ispresizer.h +0 −0
  648. drivers/media/platform/ti/omap3isp/ispstat.c +0 −0
  649. drivers/media/platform/ti/omap3isp/ispstat.h +0 −0
  650. drivers/media/platform/ti/omap3isp/ispvideo.c +0 −0
  651. drivers/media/platform/ti/omap3isp/ispvideo.h +0 −0
  652. drivers/media/platform/ti/omap3isp/luma_enhance_table.h +0 −0
  653. drivers/media/platform/ti/omap3isp/noise_filter_table.h +0 −0
  654. drivers/media/platform/ti/omap3isp/omap3isp.h +0 −0
  655. drivers/media/platform/ti/vpe/Makefile +0 −4
  656. drivers/media/platform/ti/vpe/csc.c +0 −0
  657. drivers/media/platform/ti/vpe/csc.h +0 −0
  658. drivers/media/platform/ti/vpe/sc.c +0 −0
  659. drivers/media/platform/ti/vpe/sc.h +0 −0
  660. drivers/media/platform/ti/vpe/sc_coeff.h +0 −0
  661. drivers/media/platform/ti/vpe/vpdma.c +0 −0
  662. drivers/media/platform/ti/vpe/vpdma.h +0 −0
  663. drivers/media/platform/ti/vpe/vpdma_priv.h +0 −0
  664. drivers/media/platform/ti/vpe/vpe.c +0 −0
  665. drivers/media/platform/ti/vpe/vpe_regs.h +0 −0
  666. drivers/media/platform/via/Kconfig +14 −0
  667. drivers/media/platform/via/Makefile +2 −0
  668. drivers/media/platform/via/via-camera.c +0 −0
  669. drivers/media/platform/via/via-camera.h +0 −0
  670. drivers/media/platform/xilinx/Kconfig +5 −5
  671. drivers/media/platform/xilinx/xilinx-csi2rxss.c +45 −61
  672. drivers/media/radio/Kconfig +168 −180
  673. drivers/media/radio/Makefile +23 −20
  674. drivers/media/radio/radio-sf16fmi.c +1 −1
  675. drivers/media/radio/si470x/Kconfig +1 −1
  676. drivers/media/radio/wl128x/Kconfig +1 −1
  677. drivers/media/radio/wl128x/fmdrv_common.c +2 −1
  678. drivers/media/rc/Kconfig +189 −187
  679. drivers/media/rc/Makefile +26 −21
  680. drivers/media/rc/fintek-cir.c +1 −1
  681. drivers/media/rc/gpio-ir-tx.c +21 −7
  682. drivers/media/rc/igorplugusb.c +1 −1
  683. drivers/media/rc/iguanair.c +1 −1
  684. drivers/media/rc/ir-hix5hd2.c +1 −1
  685. drivers/media/rc/ir-imon-decoder.c +1 −1
  686. drivers/media/rc/ir-jvc-decoder.c +1 −1
  687. drivers/media/rc/ir-mce_kbd-decoder.c +1 −1
  688. drivers/media/rc/ir-nec-decoder.c +1 −1
  689. drivers/media/rc/ir-rc5-decoder.c +1 −1
  690. drivers/media/rc/ir-rc6-decoder.c +1 −1
  691. drivers/media/rc/ir-rcmm-decoder.c +1 −1
  692. drivers/media/rc/ir-sanyo-decoder.c +2 −2
  693. drivers/media/rc/ir-sharp-decoder.c +1 −1
  694. drivers/media/rc/ir-sony-decoder.c +1 −1
  695. drivers/media/rc/ir-xmp-decoder.c +1 −1
  696. drivers/media/rc/ir_toy.c +1 −1
  697. drivers/media/rc/ite-cir.c +1 −1
  698. drivers/media/rc/keymaps/Makefile +19 −15
  699. drivers/media/rc/lirc_dev.c +14 −22
  700. drivers/media/rc/meson-ir-tx.c +1 −1
  701. drivers/media/rc/mtk-cir.c +20 −19
  702. drivers/media/rc/nuvoton-cir.c +1 −1
  703. drivers/media/rc/rc-core-priv.h +1 −1
  704. drivers/media/rc/rc-ir-raw.c +0 −2
  705. drivers/media/rc/rc-loopback.c +5 −1
  706. drivers/media/rc/st_rc.c +1 −1
  707. drivers/media/rc/sunxi-cir.c +1 −1
  708. drivers/media/rc/winbond-cir.c +1 −1
  709. drivers/media/spi/Kconfig +9 −17
  710. drivers/media/spi/Makefile +5 −2
  711. drivers/media/test-drivers/Kconfig +3 −5
  712. drivers/media/test-drivers/Makefile +9 −5
  713. drivers/media/test-drivers/vicodec/Kconfig +1 −1
  714. drivers/media/test-drivers/vidtv/Kconfig +0 −1
  715. drivers/media/test-drivers/vidtv/vidtv_s302m.c +13 −4
  716. drivers/media/test-drivers/vimc/Kconfig +2 −1
  717. drivers/media/test-drivers/vimc/vimc-capture.c +7 −2
  718. drivers/media/test-drivers/vimc/vimc-common.h +7 −0
  719. drivers/media/test-drivers/vimc/vimc-core.c +10 −0
  720. drivers/media/test-drivers/vivid/Kconfig +1 −1
  721. drivers/media/test-drivers/vivid/vivid-core.h +4 −1
  722. drivers/media/test-drivers/vivid/vivid-ctrls.c +14 −18
  723. drivers/media/test-drivers/vivid/vivid-kthread-cap.c +7 −3
  724. drivers/media/test-drivers/vivid/vivid-kthread-out.c +7 −5
  725. drivers/media/test-drivers/vivid/vivid-kthread-touch.c +9 −1
  726. drivers/media/test-drivers/vivid/vivid-sdr-cap.c +10 −5
  727. drivers/media/test-drivers/vivid/vivid-touch-cap.c +1 −1
  728. drivers/media/tuners/Kconfig +121 −120
  729. drivers/media/tuners/Makefile +33 −33
  730. drivers/media/tuners/e4000.c +3 −3
  731. drivers/media/tuners/fc2580.c +3 −3
  732. drivers/media/tuners/tuner-types.c +1 −1
  733. drivers/media/tuners/xc2028-types.h +3 −3
  734. drivers/media/tuners/xc2028.c +3 −3
  735. drivers/media/tuners/xc2028.h +1 −1
  736. drivers/media/tuners/xc4000.c +1 −1
  737. drivers/media/usb/Kconfig +22 −11
  738. drivers/media/usb/Makefile +25 −15
  739. drivers/media/usb/airspy/Kconfig +1 −1
  740. drivers/media/usb/au0828/Kconfig +3 −3
  741. drivers/media/usb/cpia2/Kconfig +1 −1
  742. drivers/media/usb/dvb-usb-v2/Kconfig +19 −15
  743. drivers/media/usb/dvb-usb/Kconfig +186 −182
  744. drivers/media/usb/dvb-usb/cxusb.c +1 −1
  745. drivers/media/usb/dvb-usb/dib0700_devices.c +1 −1
  746. drivers/media/usb/em28xx/em28xx-cards.c +5 −8
  747. drivers/media/usb/em28xx/em28xx-i2c.c +1 −1
  748. drivers/media/usb/em28xx/em28xx.h +1 −1
  749. drivers/media/usb/go7007/s2250-board.c +4 −6
  750. drivers/media/usb/go7007/snd-go7007.c +1 −1
  751. drivers/media/usb/gspca/Kconfig +60 −61
  752. drivers/media/usb/gspca/Makefile +44 −44
  753. drivers/media/usb/gspca/gl860/Kconfig +1 −1
  754. drivers/media/usb/gspca/jl2005bcd.c +3 −1
  755. drivers/media/usb/gspca/m5602/Kconfig +1 −1
  756. drivers/media/usb/gspca/pac7302.c +0 −1
  757. drivers/media/usb/hackrf/Kconfig +1 −1
  758. drivers/media/usb/hdpvr/Kconfig +1 −1
  759. drivers/media/usb/hdpvr/hdpvr-video.c +3 −1
  760. drivers/media/usb/msi2500/Kconfig +1 −1
  761. drivers/media/usb/pvrusb2/Kconfig +1 −1
  762. drivers/media/usb/pwc/Kconfig +1 −1
  763. drivers/media/usb/pwc/pwc-uncompress.c +1 −1
  764. drivers/media/usb/s2255/Kconfig +1 −1
  765. drivers/media/usb/stk1160/stk1160-core.c +1 −1
  766. drivers/media/usb/stk1160/stk1160-v4l.c +10 −6
  767. drivers/media/usb/stk1160/stk1160-video.c +76 −66
  768. drivers/media/usb/stk1160/stk1160.h +17 −6
  769. drivers/media/usb/stkwebcam/Kconfig +1 −1
  770. drivers/media/usb/stkwebcam/stk-webcam.c +7 −0
  771. drivers/media/usb/tm6000/tm6000-cards.c +1 −1
  772. drivers/media/usb/tm6000/tm6000-dvb.c +1 −1
  773. drivers/media/usb/tm6000/tm6000-i2c.c +1 −1
  774. drivers/media/usb/usbtv/Kconfig +1 −1
  775. drivers/media/usb/uvc/Kconfig +1 −1
  776. drivers/media/usb/uvc/uvc_driver.c +9 −0
  777. drivers/media/usb/zr364xx/Kconfig +1 −1
  778. drivers/media/v4l2-core/Kconfig +2 −10
  779. drivers/media/v4l2-core/Makefile +18 −16
  780. drivers/media/v4l2-core/tuner-core.c +1 −1
  781. drivers/media/v4l2-core/v4l2-ctrls-core.c +19 −1
  782. drivers/media/v4l2-core/v4l2-dev.c +34 −34
  783. drivers/media/v4l2-core/v4l2-fwnode.c +16 −30
  784. drivers/media/v4l2-core/v4l2-ioctl.c +9 −5
  785. drivers/media/v4l2-core/v4l2-mem2mem.c +41 −12
  786. drivers/media/v4l2-core/v4l2-subdev.c +0 −8
  787. drivers/memory/mtk-smi.c +0 −14
  788. drivers/staging/media/Kconfig +0 −2
  789. drivers/staging/media/Makefile +0 −1
  790. drivers/staging/media/atomisp/Kconfig +1 −1
  791. drivers/staging/media/atomisp/i2c/Kconfig +7 −7
  792. drivers/staging/media/atomisp/pci/atomisp_acc.c +19 −9
  793. drivers/staging/media/atomisp/pci/atomisp_compat_css20.c +2 −2
  794. drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c +107 −41
  795. drivers/staging/media/atomisp/pci/atomisp_v4l2.c +11 −10
  796. drivers/staging/media/atomisp/pci/hmm/hmm.c +4 −3
  797. drivers/staging/media/atomisp/pci/ia_css_acc_types.h +3 −2
  798. drivers/staging/media/atomisp/pci/ia_css_env.h +5 −4
  799. drivers/staging/media/atomisp/pci/ia_css_event_public.h +17 −16
  800. drivers/staging/media/atomisp/pci/ia_css_irq.h +39 −38
  801. drivers/staging/media/atomisp/pci/isp/kernels/macc/macc1_5/ia_css_macc1_5.host.c +1 −1
  802. drivers/staging/media/atomisp/pci/runtime/debug/interface/ia_css_debug.h +16 −15
  803. drivers/staging/media/atomisp/pci/sh_css_firmware.c +4 −0
  804. drivers/staging/media/hantro/Kconfig +1 −1
  805. drivers/staging/media/hantro/TODO +0 −7
  806. drivers/staging/media/hantro/hantro.h +0 −1
  807. drivers/staging/media/hantro/hantro_drv.c +39 −13
  808. drivers/staging/media/hantro/hantro_g2_hevc_dec.c +7 −20
  809. drivers/staging/media/hantro/hantro_h1_jpeg_enc.c +25 −16
  810. drivers/staging/media/hantro/hantro_h1_regs.h +1 −1
  811. drivers/staging/media/hantro/hantro_hw.h +2 −11
  812. drivers/staging/media/hantro/hantro_jpeg.c +46 −40
  813. drivers/staging/media/hantro/hantro_jpeg.h +1 −1
  814. drivers/staging/media/hantro/hantro_v4l2.c +77 −0
  815. drivers/staging/media/hantro/imx8m_vpu_hw.c +49 −13
  816. drivers/staging/media/hantro/rockchip_vpu2_hw_jpeg_enc.c +26 −18
  817. drivers/staging/media/hantro/rockchip_vpu_hw.c +0 −6
  818. drivers/staging/media/hantro/sunxi_vpu_hw.c +2 −2
  819. drivers/staging/media/imx/Kconfig +1 −1
  820. drivers/staging/media/imx/Makefile +0 −1
  821. drivers/staging/media/imx/TODO +25 −0
  822. drivers/staging/media/imx/imx-media-csi.c +4 −3
  823. drivers/staging/media/imx/imx6-mipi-csi2.c +3 −22
  824. drivers/staging/media/imx/imx7-media-csi.c +58 −6
  825. drivers/staging/media/imx/imx8mq-mipi-csi2.c +47 −34
  826. drivers/staging/media/ipu3/Kconfig +1 −1
  827. drivers/staging/media/max96712/Kconfig +1 −1
  828. drivers/staging/media/max96712/max96712.c +1 −1
  829. drivers/staging/media/meson/vdec/Kconfig +1 −1
  830. drivers/staging/media/meson/vdec/esparser.c +6 −1
  831. drivers/staging/media/meson/vdec/vdec_helpers.c +6 −2
  832. drivers/staging/media/meson/vdec/vdec_helpers.h +2 −2
  833. drivers/staging/media/meson/vdec/vdec_platform.c +12 −0
  834. drivers/staging/media/omap4iss/Kconfig +1 −1
  835. drivers/staging/media/rkvdec/Kconfig +1 −1
  836. drivers/staging/media/sunxi/cedrus/Kconfig +1 −1
  837. drivers/staging/media/sunxi/cedrus/cedrus.c +2 −0
  838. drivers/staging/media/sunxi/cedrus/cedrus.h +3 −0
  839. drivers/staging/media/sunxi/cedrus/cedrus_dec.c +4 −0
  840. drivers/staging/media/sunxi/cedrus/cedrus_h264.c +1 −1
  841. drivers/staging/media/sunxi/cedrus/cedrus_h265.c +2 −2
  842. drivers/staging/media/sunxi/cedrus/cedrus_hw.c +25 −0
  843. drivers/staging/media/sunxi/cedrus/cedrus_hw.h +2 −0
  844. drivers/staging/media/tegra-vde/Kconfig +0 −10
  845. drivers/staging/media/tegra-vde/Makefile +0 −3
  846. drivers/staging/media/tegra-vde/TODO +0 −4
  847. drivers/staging/media/tegra-vde/uapi.h +0 −73
  848. drivers/staging/media/tegra-vde/vde.c +0 −1358
  849. drivers/staging/media/tegra-vde/vde.h +0 −125
  850. drivers/staging/media/tegra-video/Kconfig +1 −1
  851. drivers/staging/media/zoran/Kconfig +19 −21
  852. drivers/staging/media/zoran/Makefile +4 −4
  853. drivers/staging/media/zoran/videocodec.c +6 −62
  854. drivers/staging/media/zoran/videocodec.h +3 −1
  855. drivers/staging/media/zoran/zoran.h +3 −15
  856. drivers/staging/media/zoran/zoran_card.c +253 −145
  857. drivers/staging/media/zoran/zoran_device.c +10 −5
  858. drivers/staging/media/zoran/zoran_device.h +0 −2
  859. drivers/staging/media/zoran/zoran_driver.c +26 −30
  860. drivers/staging/media/zoran/zr36016.c +8 −17
  861. drivers/staging/media/zoran/zr36016.h +2 −0
  862. drivers/staging/media/zoran/zr36050.c +6 −18
  863. drivers/staging/media/zoran/zr36050.h +2 −0
  864. drivers/staging/media/zoran/zr36060.c +6 −17
  865. drivers/staging/media/zoran/zr36060.h +2 −0
  866. drivers/staging/most/video/Kconfig +1 −1
  867. drivers/staging/vc04_services/bcm2835-camera/Kconfig +1 −1
  868. drivers/usb/gadget/Kconfig +1 −1
  869. drivers/usb/gadget/legacy/Kconfig +1 −1
  870. include/media/hevc-ctrls.h +2 −4
  871. include/media/i2c/m5mols.h +0 −4
  872. include/media/i2c/noon010pc30.h +0 −4
  873. include/media/media-entity.h +19 −6
  874. include/media/mipi-csi2.h +45 −0
  875. include/media/rc-core.h +4 −8
  876. include/media/v4l2-fwnode.h +6 −55
  877. include/media/v4l2-mediabus.h +72 −32
  878. include/media/v4l2-subdev.h +0 −13
  879. include/soc/mediatek/smi.h +0 −20
  880. include/uapi/linux/lirc.h +7 −9
  881. include/uapi/linux/v4l2-controls.h +8 −0
  882. include/uapi/linux/videodev2.h +2 −0
  883. sound/pci/Kconfig +2 −2
Documentation/admin-guide/media/fimc.rst+1−1
@@ -14,7 +14,7 @@ data from LCD controller (FIMD) through the SoC internal writeback data · 13 unmodified lines
1414 path. There are multiple FIMC instances in the SoCs (up to 4), having
1515 slightly different capabilities, like pixel alignment constraints, rotator
1616 availability, LCD writeback support, etc. The driver is located at
17−drivers/media/platform/exynos4-is directory.
17+drivers/media/platform/samsung/exynos4-is directory.
1818
1919 Supported SoCs
2020 --------------
Documentation/admin-guide/media/i2c-cardlist.rst+1−1
@@ -284,7 +284,7 @@ tda9887 TDA 9885/6/7 analog IF demodulator · 283 unmodified lines
284284 tea5761 TEA 5761 radio tuner
285285 tea5767 TEA 5767 radio tuner
286286 tua9001 Infineon TUA9001 silicon tuner
287−tuner-xc2028 XCeive xc2028/xc3028 tuners
287+xc2028 XCeive xc2028/xc3028 tuners
288288 xc4000 Xceive XC4000 silicon tuner
289289 xc5000 Xceive XC5000 silicon tuner
290290 ============ ==================================================
Documentation/admin-guide/media/imx7.rst+1−1
@@ -33,7 +33,7 @@ reference manual [#f1]_. · 32 unmodified lines
3333 Entities
3434 --------
3535
36−imx7-mipi-csi2
36+imx-mipi-csi2
3737 --------------
3838
3939 This is the MIPI CSI-2 receiver entity. It has one sink pad to receive the pixel
Documentation/admin-guide/media/omap3isp.rst+1−1
@@ -17,7 +17,7 @@ Introduction · 16 unmodified lines
1717 ------------
1818
1919 This file documents the Texas Instruments OMAP 3 Image Signal Processor (ISP)
20−driver located under drivers/media/platform/omap3isp. The original driver was
20+driver located under drivers/media/platform/ti/omap3isp. The original driver was
2121 written by Texas Instruments but since that it has been rewritten (twice) at
2222 Nokia.
2323
Documentation/admin-guide/media/omap4_camera.rst+1−1
@@ -25,7 +25,7 @@ As of Revision AB, the ISS is described in detail in section 8. · 24 unmodified lines
2525 This driver is supporting **only** the CSI2-A/B interfaces for now.
2626
2727 It makes use of the Media Controller framework [#f2]_, and inherited most of the
28−code from OMAP3 ISP driver (found under drivers/media/platform/omap3isp/\*),
28+code from OMAP3 ISP driver (found under drivers/media/platform/ti/omap3isp/\*),
2929 except that it doesn't need an IOMMU now for ISS buffers memory mapping.
3030
3131 Supports usage of MMAP buffers only (for now).
Documentation/admin-guide/media/vimc.rst+13−0
@@ -76,3 +76,16 @@ vimc-capture: · 75 unmodified lines
7676
7777 * 1 Pad sink
7878 * 1 Pad source
79+
80+Module options
81+--------------
82+
83+Vimc has a module parameter to configure the driver.
84+
85+* ``allocator=<unsigned int>``
86+
87+ memory allocator selection, default is 0. It specifies the way buffers
88+ will be allocated.
89+
90+ - 0: vmalloc
91+ - 1: dma-contig
Documentation/devicetree/bindings/display/mediatek/mediatek,disp.txt+0−9
@@ -61,8 +61,6 @@ Required properties (DMA function blocks): · 60 unmodified lines
6161 "mediatek,<chip>-disp-rdma"
6262 "mediatek,<chip>-disp-wdma"
6363 the supported chips are mt2701, mt8167 and mt8173.
64−- larb: Should contain a phandle pointing to the local arbiter device as defined
65− in Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.yaml
6664 - iommus: Should point to the respective IOMMU block with master port as
6765 argument, see Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
6866 for details.
@@ -91,7 +89,6 @@ ovl0: ovl@1400c000 { · 22 unmodified lines
9189 power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
9290 clocks = <&mmsys CLK_MM_DISP_OVL0>;
9391 iommus = <&iommu M4U_PORT_DISP_OVL0>;
94− mediatek,larb = <&larb0>;
9592 };
9693
9794 ovl1: ovl@1400d000 {
@@ -101,7 +98,6 @@ ovl1: ovl@1400d000 { · 3 unmodified lines
10198 power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
10299 clocks = <&mmsys CLK_MM_DISP_OVL1>;
103100 iommus = <&iommu M4U_PORT_DISP_OVL1>;
104− mediatek,larb = <&larb4>;
105101 };
106102
107103 rdma0: rdma@1400e000 {
@@ -111,7 +107,6 @@ rdma0: rdma@1400e000 { · 3 unmodified lines
111107 power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
112108 clocks = <&mmsys CLK_MM_DISP_RDMA0>;
113109 iommus = <&iommu M4U_PORT_DISP_RDMA0>;
114− mediatek,larb = <&larb0>;
115110 mediatek,rdma-fifosize = <8192>;
116111 };
117112
@@ -122,7 +117,6 @@ rdma1: rdma@1400f000 { · 4 unmodified lines
122117 power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
123118 clocks = <&mmsys CLK_MM_DISP_RDMA1>;
124119 iommus = <&iommu M4U_PORT_DISP_RDMA1>;
125− mediatek,larb = <&larb4>;
126120 };
127121
128122 rdma2: rdma@14010000 {
@@ -132,7 +126,6 @@ rdma2: rdma@14010000 { · 3 unmodified lines
132126 power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
133127 clocks = <&mmsys CLK_MM_DISP_RDMA2>;
134128 iommus = <&iommu M4U_PORT_DISP_RDMA2>;
135− mediatek,larb = <&larb4>;
136129 };
137130
138131 wdma0: wdma@14011000 {
@@ -142,7 +135,6 @@ wdma0: wdma@14011000 { · 3 unmodified lines
142135 power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
143136 clocks = <&mmsys CLK_MM_DISP_WDMA0>;
144137 iommus = <&iommu M4U_PORT_DISP_WDMA0>;
145− mediatek,larb = <&larb0>;
146138 };
147139
148140 wdma1: wdma@14012000 {
@@ -152,7 +144,6 @@ wdma1: wdma@14012000 { · 3 unmodified lines
152144 power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
153145 clocks = <&mmsys CLK_MM_DISP_WDMA1>;
154146 iommus = <&iommu M4U_PORT_DISP_WDMA1>;
155− mediatek,larb = <&larb4>;
156147 };
157148
158149 color0: color@14013000 {
Documentation/devicetree/bindings/media/amphion,vpu.yaml+180−0
@@ -0,0 +1,180 @@
1+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
3+%YAML 1.2
4+---
5+$id: http://devicetree.org/schemas/media/amphion,vpu.yaml#
6+$schema: http://devicetree.org/meta-schemas/core.yaml#
7+
8+title: Amphion VPU codec IP
9+
10+maintainers:
11+ - Ming Qian <ming.qian@nxp.com>
12+ - Shijie Qin <shijie.qin@nxp.com>
13+
14+description: |-
15+ The Amphion MXC video encoder(Windsor) and decoder(Malone) accelerators present
16+ on NXP i.MX8Q SoCs.
17+
18+properties:
19+ $nodename:
20+ pattern: "^vpu@[0-9a-f]+$"
21+
22+ compatible:
23+ items:
24+ - enum:
25+ - nxp,imx8qm-vpu
26+ - nxp,imx8qxp-vpu
27+
28+ reg:
29+ maxItems: 1
30+
31+ power-domains:
32+ maxItems: 1
33+
34+ "#address-cells":
35+ const: 1
36+
37+ "#size-cells":
38+ const: 1
39+
40+ ranges: true
41+
42+patternProperties:
43+ "^mailbox@[0-9a-f]+$":
44+ description:
45+ Each vpu encoder or decoder correspond a MU, which used for communication
46+ between driver and firmware. Implement via mailbox on driver.
47+ $ref: ../mailbox/fsl,mu.yaml#
48+
49+
50+ "^vpu_core@[0-9a-f]+$":
51+ description:
52+ Each core correspond a decoder or encoder, need to configure them
53+ separately. NXP i.MX8QM SoC has one decoder and two encoder, i.MX8QXP SoC
54+ has one decoder and one encoder.
55+ type: object
56+
57+ properties:
58+ compatible:
59+ items:
60+ - enum:
61+ - nxp,imx8q-vpu-decoder
62+ - nxp,imx8q-vpu-encoder
63+
64+ reg:
65+ maxItems: 1
66+
67+ power-domains:
68+ maxItems: 1
69+
70+ mbox-names:
71+ items:
72+ - const: tx0
73+ - const: tx1
74+ - const: rx
75+
76+ mboxes:
77+ description:
78+ List of phandle of 2 MU channels for tx, 1 MU channel for rx.
79+ maxItems: 3
80+
81+ memory-region:
82+ description:
83+ Phandle to the reserved memory nodes to be associated with the
84+ remoteproc device. The reserved memory nodes should be carveout nodes,
85+ and should be defined as per the bindings in
86+ Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
87+ items:
88+ - description: region reserved for firmware image sections.
89+ - description: region used for RPC shared memory between firmware and
90+ driver.
91+
92+ required:
93+ - compatible
94+ - reg
95+ - power-domains
96+ - mbox-names
97+ - mboxes
98+ - memory-region
99+
100+ additionalProperties: false
101+
102+required:
103+ - compatible
104+ - reg
105+ - power-domains
106+
107+additionalProperties: false
108+
109+examples:
110+ # Device node example for i.MX8QM platform:
111+ - |
112+ #include <dt-bindings/firmware/imx/rsrc.h>
113+
114+ vpu: vpu@2c000000 {
115+ compatible = "nxp,imx8qm-vpu";
116+ ranges = <0x2c000000 0x2c000000 0x2000000>;
117+ reg = <0x2c000000 0x1000000>;
118+ #address-cells = <1>;
119+ #size-cells = <1>;
120+ power-domains = <&pd IMX_SC_R_VPU>;
121+
122+ mu_m0: mailbox@2d000000 {
123+ compatible = "fsl,imx6sx-mu";
124+ reg = <0x2d000000 0x20000>;
125+ interrupts = <0 472 4>;
126+ #mbox-cells = <2>;
127+ power-domains = <&pd IMX_SC_R_VPU_MU_0>;
128+ };
129+
130+ mu1_m0: mailbox@2d020000 {
131+ compatible = "fsl,imx6sx-mu";
132+ reg = <0x2d020000 0x20000>;
133+ interrupts = <0 473 4>;
134+ #mbox-cells = <2>;
135+ power-domains = <&pd IMX_SC_R_VPU_MU_1>;
136+ };
137+
138+ mu2_m0: mailbox@2d040000 {
139+ compatible = "fsl,imx6sx-mu";
140+ reg = <0x2d040000 0x20000>;
141+ interrupts = <0 474 4>;
142+ #mbox-cells = <2>;
143+ power-domains = <&pd IMX_SC_R_VPU_MU_2>;
144+ };
145+
146+ vpu_core0: vpu_core@2d080000 {
147+ compatible = "nxp,imx8q-vpu-decoder";
148+ reg = <0x2d080000 0x10000>;
149+ power-domains = <&pd IMX_SC_R_VPU_DEC_0>;
150+ mbox-names = "tx0", "tx1", "rx";
151+ mboxes = <&mu_m0 0 0>,
152+ <&mu_m0 0 1>,
153+ <&mu_m0 1 0>;
154+ memory-region = <&decoder_boot>, <&decoder_rpc>;
155+ };
156+
157+ vpu_core1: vpu_core@2d090000 {
158+ compatible = "nxp,imx8q-vpu-encoder";
159+ reg = <0x2d090000 0x10000>;
160+ power-domains = <&pd IMX_SC_R_VPU_ENC_0>;
161+ mbox-names = "tx0", "tx1", "rx";
162+ mboxes = <&mu1_m0 0 0>,
163+ <&mu1_m0 0 1>,
164+ <&mu1_m0 1 0>;
165+ memory-region = <&encoder1_boot>, <&encoder1_rpc>;
166+ };
167+
168+ vpu_core2: vpu_core@2d0a0000 {
169+ reg = <0x2d0a0000 0x10000>;
170+ compatible = "nxp,imx8q-vpu-encoder";
171+ power-domains = <&pd IMX_SC_R_VPU_ENC_1>;
172+ mbox-names = "tx0", "tx1", "rx";
173+ mboxes = <&mu2_m0 0 0>,
174+ <&mu2_m0 0 1>,
175+ <&mu2_m0 1 0>;
176+ memory-region = <&encoder2_boot>, <&encoder2_rpc>;
177+ };
178+ };
179+
180+...
Documentation/devicetree/bindings/media/i2c/hynix,hi846.yaml+5−1
@@ -49,7 +49,8 @@ properties: · 48 unmodified lines
4949 description: Definition of the regulator used for the VDDD power supply.
5050
5151 port:
52− $ref: /schemas/graph.yaml#/properties/port
52+ $ref: /schemas/graph.yaml#/$defs/port-base
53+ unevaluatedProperties: false
5354
5455 properties:
5556 endpoint:
@@ -68,8 +69,11 @@ properties: · 12 unmodified lines
6869 - const: 1
6970 - const: 2
7071
72+ link-frequencies: true
73+
7174 required:
7275 - data-lanes
76+ - link-frequencies
7377
7478 required:
7579 - compatible
Documentation/devicetree/bindings/media/i2c/isil,isl79987.yaml+113−0
@@ -0,0 +1,113 @@
1+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+%YAML 1.2
3+---
4+$id: http://devicetree.org/schemas/media/i2c/isil,isl79987.yaml#
5+$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+title: Intersil ISL79987 Analog to MIPI CSI-2 decoder
8+
9+maintainers:
10+ - Michael Tretter <m.tretter@pengutronix.de>
11+ - Marek Vasut <marex@denx.de>
12+
13+description:
14+ The Intersil ISL79987 is an analog to MIPI CSI-2 decoder which is capable of
15+ receiving up to four analog stream and multiplexing them into up to four MIPI
16+ CSI-2 virtual channels, using one MIPI clock lane and 1/2 data lanes.
17+
18+properties:
19+ compatible:
20+ enum:
21+ - isil,isl79987
22+
23+ reg:
24+ maxItems: 1
25+
26+ reset-gpios:
27+ maxItems: 1
28+ description:
29+ A GPIO spec for the RSTB pin (active high)
30+
31+ powerdown-gpios:
32+ maxItems: 1
33+ description:
34+ A GPIO spec for the Power Down pin (active high)
35+
36+ ports:
37+ $ref: /schemas/graph.yaml#/properties/ports
38+ properties:
39+ port@0:
40+ $ref: /schemas/graph.yaml#/$defs/port-base
41+ unevaluatedProperties: false
42+ description: Output port
43+
44+ properties:
45+ endpoint:
46+ $ref: /schemas/media/video-interfaces.yaml#
47+ unevaluatedProperties: false
48+
49+ properties:
50+ data-lanes:
51+ minItems: 1
52+ maxItems: 2
53+
54+ required:
55+ - data-lanes
56+
57+ patternProperties:
58+ "^port@[1-4]$":
59+ $ref: /schemas/graph.yaml#/properties/port
60+ description: Input ports
61+
62+ required:
63+ - port@0
64+
65+additionalProperties: false
66+
67+required:
68+ - compatible
69+ - reg
70+ - ports
71+
72+examples:
73+ - |
74+ #include <dt-bindings/gpio/gpio.h>
75+
76+ i2c {
77+ #address-cells = <1>;
78+ #size-cells = <0>;
79+
80+ isl7998x_mipi@44 {
81+ compatible = "isil,isl79987";
82+ reg = <0x44>;
83+ powerdown-gpios = <&gpio3 27 GPIO_ACTIVE_HIGH>;
84+ reset-gpios = <&gpio3 28 GPIO_ACTIVE_HIGH>;
85+
86+ ports {
87+ #address-cells = <1>;
88+ #size-cells = <0>;
89+
90+ port@0 {
91+ reg = <0>;
92+ isl79987_out: endpoint {
93+ remote-endpoint = <&mipi_csi2_in>;
94+ data-lanes = <1 2>;
95+ };
96+ };
97+
98+ port@1 {
99+ reg = <1>;
100+ endpoint {
101+ remote-endpoint = <&camera_0>;
102+ };
103+ };
104+
105+ port@2 {
106+ reg = <2>;
107+ endpoint {
108+ remote-endpoint = <&camera_1>;
109+ };
110+ };
111+ };
112+ };
113+ };
Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml+170−105
@@ -70,6 +70,28 @@ properties: · 69 unmodified lines
7070 a remote serializer whose high-threshold noise immunity is not enabled
7171 is 100000 micro volts
7272
73+ maxim,gpio-poc:
74+ $ref: '/schemas/types.yaml#/definitions/uint32-array'
75+ minItems: 2
76+ maxItems: 2
77+ description: |
78+ Index of the MAX9286 gpio output line (0 or 1) that controls Power over
79+ Coax to the cameras and its associated polarity flag.
80+
81+ The property accepts an array of two unsigned integers, the first being
82+ the gpio line index (0 or 1) and the second being the gpio line polarity
83+ flag (GPIO_ACTIVE_HIGH or GPIO_ACTIVE_LOW) as defined in
84+ <include/dt-bindings/gpio/gpio.h>.
85+
86+ When the remote cameras power is controlled by one of the MAX9286 gpio
87+ lines, this property has to be used to specify which line among the two
88+ available ones controls the remote camera power enablement.
89+
90+ When this property is used it is not possible to register a gpio
91+ controller as the gpio lines are controlled directly by the MAX9286 and
92+ not available for consumers, nor the 'poc-supply' property should be
93+ specified.
94+
7395 ports:
7496 $ref: /schemas/graph.yaml#/properties/ports
7597
@@ -165,7 +187,16 @@ required: · 89 unmodified lines
165187 - reg
166188 - ports
167189 - i2c-mux
168− - gpio-controller
190+
191+# If 'maxim,gpio-poc' is present, then 'poc-supply' and 'gpio-controller'
192+# are not allowed.
193+if:
194+ required:
195+ - maxim,gpio-poc
196+then:
197+ properties:
198+ poc-supply: false
199+ gpio-controller: false
169200
170201 additionalProperties: false
171202
@@ -174,140 +205,174 @@ examples: · 2 unmodified lines
174205 #include <dt-bindings/gpio/gpio.h>
175206
176207 i2c@e66d8000 {
177− #address-cells = <1>;
178− #size-cells = <0>;
208+ #address-cells = <1>;
209+ #size-cells = <0>;
179210
180− reg = <0 0xe66d8000>;
211+ reg = <0 0xe66d8000>;
181212
182− gmsl-deserializer@2c {
183− compatible = "maxim,max9286";
184− reg = <0x2c>;
185− poc-supply = <&camera_poc_12v>;
186− enable-gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
213+ gmsl-deserializer@2c {
214+ compatible = "maxim,max9286";
215+ reg = <0x2c>;
216+ poc-supply = <&camera_poc_12v>;
217+ enable-gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
187218
188− gpio-controller;
189− #gpio-cells = <2>;
219+ gpio-controller;
220+ #gpio-cells = <2>;
190221
191− maxim,reverse-channel-microvolt = <170000>;
222+ maxim,reverse-channel-microvolt = <170000>;
192223
193− ports {
194− #address-cells = <1>;
195− #size-cells = <0>;
224+ ports {
225+ #address-cells = <1>;
226+ #size-cells = <0>;
196227
197− port@0 {
198− reg = <0>;
228+ port@0 {
229+ reg = <0>;
199230
200− max9286_in0: endpoint {
201− remote-endpoint = <&rdacm20_out0>;
202− };
203− };
231+ max9286_in0: endpoint {
232+ remote-endpoint = <&rdacm20_out0>;
233+ };
234+ };
204235
205− port@1 {
206− reg = <1>;
236+ port@1 {
237+ reg = <1>;
207238
208− max9286_in1: endpoint {
209− remote-endpoint = <&rdacm20_out1>;
210− };
211− };
239+ max9286_in1: endpoint {
240+ remote-endpoint = <&rdacm20_out1>;
241+ };
242+ };
212243
213− port@2 {
214− reg = <2>;
244+ port@2 {
245+ reg = <2>;
215246
216− max9286_in2: endpoint {
217− remote-endpoint = <&rdacm20_out2>;
218− };
219− };
247+ max9286_in2: endpoint {
248+ remote-endpoint = <&rdacm20_out2>;
249+ };
250+ };
220251
221− port@3 {
222− reg = <3>;
252+ port@3 {
253+ reg = <3>;
223254
224− max9286_in3: endpoint {
225− remote-endpoint = <&rdacm20_out3>;
226− };
227− };
255+ max9286_in3: endpoint {
256+ remote-endpoint = <&rdacm20_out3>;
257+ };
258+ };
228259
229− port@4 {
230− reg = <4>;
260+ port@4 {
261+ reg = <4>;
231262
232− max9286_out: endpoint {
233− data-lanes = <1 2 3 4>;
234− remote-endpoint = <&csi40_in>;
263+ max9286_out: endpoint {
264+ data-lanes = <1 2 3 4>;
265+ remote-endpoint = <&csi40_in>;
266+ };
267+ };
235268 };
236− };
237− };
238269
239− i2c-mux {
240− #address-cells = <1>;
241− #size-cells = <0>;
270+ i2c-mux {
271+ #address-cells = <1>;
272+ #size-cells = <0>;
242273
243− i2c@0 {
244− #address-cells = <1>;
245− #size-cells = <0>;
246− reg = <0>;
274+ i2c@0 {
275+ #address-cells = <1>;
276+ #size-cells = <0>;
277+ reg = <0>;
247278
248− camera@51 {
249− compatible = "imi,rdacm20";
250− reg = <0x51>, <0x61>;
279+ camera@51 {
280+ compatible = "imi,rdacm20";
281+ reg = <0x51>, <0x61>;
251282
252− port {
253− rdacm20_out0: endpoint {
254− remote-endpoint = <&max9286_in0>;
255− };
256− };
283+ port {
284+ rdacm20_out0: endpoint {
285+ remote-endpoint = <&max9286_in0>;
286+ };
287+ };
257288
258− };
259− };
289+ };
290+ };
260291
261− i2c@1 {
262− #address-cells = <1>;
263− #size-cells = <0>;
264− reg = <1>;
292+ i2c@1 {
293+ #address-cells = <1>;
294+ #size-cells = <0>;
295+ reg = <1>;
296+
297+ camera@52 {
298+ compatible = "imi,rdacm20";
299+ reg = <0x52>, <0x62>;
300+
301+ port {
302+ rdacm20_out1: endpoint {
303+ remote-endpoint = <&max9286_in1>;
304+ };
305+ };
306+ };
307+ };
265308
266− camera@52 {
267− compatible = "imi,rdacm20";
268− reg = <0x52>, <0x62>;
309+ i2c@2 {
310+ #address-cells = <1>;
311+ #size-cells = <0>;
312+ reg = <2>;
313+
314+ camera@53 {
315+ compatible = "imi,rdacm20";
316+ reg = <0x53>, <0x63>;
317+
318+ port {
319+ rdacm20_out2: endpoint {
320+ remote-endpoint = <&max9286_in2>;
321+ };
322+ };
323+ };
324+ };
269325
270− port {
271− rdacm20_out1: endpoint {
272− remote-endpoint = <&max9286_in1>;
326+ i2c@3 {
327+ #address-cells = <1>;
328+ #size-cells = <0>;
329+ reg = <3>;
330+
331+ camera@54 {
332+ compatible = "imi,rdacm20";
333+ reg = <0x54>, <0x64>;
334+
335+ port {
336+ rdacm20_out3: endpoint {
337+ remote-endpoint = <&max9286_in3>;
338+ };
339+ };
340+ };
273341 };
274− };
275342 };
276− };
277−
278− i2c@2 {
279− #address-cells = <1>;
280− #size-cells = <0>;
281− reg = <2>;
282−
283− camera@53 {
284− compatible = "imi,rdacm20";
285− reg = <0x53>, <0x63>;
343+ };
286344
287− port {
288− rdacm20_out2: endpoint {
289− remote-endpoint = <&max9286_in2>;
345+ /*
346+ * Example of a deserializer that controls the camera Power over Coax
347+ * through one of its gpio lines.
348+ */
349+ gmsl-deserializer@6c {
350+ compatible = "maxim,max9286";
351+ reg = <0x6c>;
352+ enable-gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
353+
354+ /*
355+ * The remote camera power is controlled by MAX9286 GPIO line #0.
356+ * No 'poc-supply' nor 'gpio-controller' are specified.
357+ */
358+ maxim,gpio-poc = <0 GPIO_ACTIVE_LOW>;
359+
360+ /*
361+ * Do not describe connections as they're the same as in the previous
362+ * example.
363+ */
364+ ports {
365+ #address-cells = <1>;
366+ #size-cells = <0>;
367+
368+ port@4 {
369+ reg = <4>;
290370 };
291− };
292371 };
293− };
294372
295− i2c@3 {
296− #address-cells = <1>;
297− #size-cells = <0>;
298− reg = <3>;
299−
300− camera@54 {
301− compatible = "imi,rdacm20";
302− reg = <0x54>, <0x64>;
303−
304− port {
305− rdacm20_out3: endpoint {
306− remote-endpoint = <&max9286_in3>;
307− };
308− };
373+ i2c-mux {
374+ #address-cells = <1>;
375+ #size-cells = <0>;
309376 };
310− };
311377 };
312− };
313378 };
Documentation/devicetree/bindings/media/mediatek,vcodec-decoder.yaml+169−0
@@ -0,0 +1,169 @@
1+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
3+%YAML 1.2
4+---
5+$id: http://devicetree.org/schemas/media/mediatek,vcodec-decoder.yaml#
6+$schema: http://devicetree.org/meta-schemas/core.yaml#
7+
8+title: Mediatek Video Decode Accelerator
9+
10+maintainers:
11+ - Yunfei Dong <yunfei.dong@mediatek.com>
12+
13+description: |+
14+ Mediatek Video Decode is the video decode hardware present in Mediatek
15+ SoCs which supports high resolution decoding functionalities.
16+
17+properties:
18+ compatible:
19+ enum:
20+ - mediatek,mt8173-vcodec-dec
21+ - mediatek,mt8183-vcodec-dec
22+
23+ reg:
24+ maxItems: 12
25+
26+ interrupts:
27+ maxItems: 1
28+
29+ clocks:
30+ maxItems: 8
31+
32+ clock-names:
33+ items:
34+ - const: vcodecpll
35+ - const: univpll_d2
36+ - const: clk_cci400_sel
37+ - const: vdec_sel
38+ - const: vdecpll
39+ - const: vencpll
40+ - const: venc_lt_sel
41+ - const: vdec_bus_clk_src
42+
43+ assigned-clocks: true
44+
45+ assigned-clock-parents: true
46+
47+ assigned-clock-rates: true
48+
49+ power-domains:
50+ maxItems: 1
51+
52+ iommus:
53+ minItems: 1
54+ maxItems: 32
55+ description: |
56+ List of the hardware port in respective IOMMU block for current Socs.
57+ Refer to bindings/iommu/mediatek,iommu.yaml.
58+
59+ dma-ranges:
60+ maxItems: 1
61+ description: |
62+ Describes the physical address space of IOMMU maps to memory.
63+
64+ mediatek,vpu:
65+ $ref: /schemas/types.yaml#/definitions/phandle
66+ maxItems: 1
67+ description:
68+ Describes point to vpu.
69+
70+ mediatek,scp:
71+ $ref: /schemas/types.yaml#/definitions/phandle
72+ maxItems: 1
73+ description:
74+ Describes point to scp.
75+
76+required:
77+ - compatible
78+ - reg
79+ - interrupts
80+ - clocks
81+ - clock-names
82+ - iommus
83+ - assigned-clocks
84+ - assigned-clock-parents
85+
86+allOf:
87+ - if:
88+ properties:
89+ compatible:
90+ contains:
91+ enum:
92+ - mediatek,mt8183-vcodec-dec
93+
94+ then:
95+ required:
96+ - mediatek,scp
97+
98+ - if:
99+ properties:
100+ compatible:
101+ contains:
102+ enum:
103+ - mediatek,mt8173-vcodec-dec
104+
105+ then:
106+ required:
107+ - mediatek,vpu
108+
109+additionalProperties: false
110+
111+examples:
112+ - |
113+ #include <dt-bindings/interrupt-controller/arm-gic.h>
114+ #include <dt-bindings/clock/mt8173-clk.h>
115+ #include <dt-bindings/memory/mt8173-larb-port.h>
116+ #include <dt-bindings/interrupt-controller/irq.h>
117+ #include <dt-bindings/power/mt8173-power.h>
118+
119+ vcodec_dec: vcodec@16000000 {
120+ compatible = "mediatek,mt8173-vcodec-dec";
121+ reg = <0x16000000 0x100>, /*VDEC_SYS*/
122+ <0x16020000 0x1000>, /*VDEC_MISC*/
123+ <0x16021000 0x800>, /*VDEC_LD*/
124+ <0x16021800 0x800>, /*VDEC_TOP*/
125+ <0x16022000 0x1000>, /*VDEC_CM*/
126+ <0x16023000 0x1000>, /*VDEC_AD*/
127+ <0x16024000 0x1000>, /*VDEC_AV*/
128+ <0x16025000 0x1000>, /*VDEC_PP*/
129+ <0x16026800 0x800>, /*VP8_VD*/
130+ <0x16027000 0x800>, /*VP6_VD*/
131+ <0x16027800 0x800>, /*VP8_VL*/
132+ <0x16028400 0x400>; /*VP9_VD*/
133+ interrupts = <GIC_SPI 204 IRQ_TYPE_LEVEL_LOW>;
134+ iommus = <&iommu M4U_PORT_HW_VDEC_MC_EXT>,
135+ <&iommu M4U_PORT_HW_VDEC_PP_EXT>,
136+ <&iommu M4U_PORT_HW_VDEC_AVC_MV_EXT>,
137+ <&iommu M4U_PORT_HW_VDEC_PRED_RD_EXT>,
138+ <&iommu M4U_PORT_HW_VDEC_PRED_WR_EXT>,
139+ <&iommu M4U_PORT_HW_VDEC_UFO_EXT>,
140+ <&iommu M4U_PORT_HW_VDEC_VLD_EXT>,
141+ <&iommu M4U_PORT_HW_VDEC_VLD2_EXT>;
142+ mediatek,vpu = <&vpu>;
143+ power-domains = <&scpsys MT8173_POWER_DOMAIN_VDEC>;
144+ clocks = <&apmixedsys CLK_APMIXED_VCODECPLL>,
145+ <&topckgen CLK_TOP_UNIVPLL_D2>,
146+ <&topckgen CLK_TOP_CCI400_SEL>,
147+ <&topckgen CLK_TOP_VDEC_SEL>,
148+ <&topckgen CLK_TOP_VCODECPLL>,
149+ <&apmixedsys CLK_APMIXED_VENCPLL>,
150+ <&topckgen CLK_TOP_VENC_LT_SEL>,
151+ <&topckgen CLK_TOP_VCODECPLL_370P5>;
152+ clock-names = "vcodecpll",
153+ "univpll_d2",
154+ "clk_cci400_sel",
155+ "vdec_sel",
156+ "vdecpll",
157+ "vencpll",
158+ "venc_lt_sel",
159+ "vdec_bus_clk_src";
160+ assigned-clocks = <&topckgen CLK_TOP_VENC_LT_SEL>,
161+ <&topckgen CLK_TOP_CCI400_SEL>,
162+ <&topckgen CLK_TOP_VDEC_SEL>,
163+ <&apmixedsys CLK_APMIXED_VCODECPLL>,
164+ <&apmixedsys CLK_APMIXED_VENCPLL>;
165+ assigned-clock-parents = <&topckgen CLK_TOP_VCODECPLL_370P5>,
166+ <&topckgen CLK_TOP_UNIVPLL_D2>,
167+ <&topckgen CLK_TOP_VCODECPLL>;
168+ assigned-clock-rates = <0>, <0>, <0>, <1482000000>, <800000000>;
169+ };
Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml+179−0
@@ -0,0 +1,179 @@
1+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
3+%YAML 1.2
4+---
5+$id: http://devicetree.org/schemas/media/mediatek,vcodec-encoder.yaml#
6+$schema: http://devicetree.org/meta-schemas/core.yaml#
7+
8+title: Mediatek Video Encode Accelerator
9+
10+maintainers:
11+ - Yunfei Dong <yunfei.dong@mediatek.com>
12+
13+description: |+
14+ Mediatek Video Encode is the video encode hardware present in Mediatek
15+ SoCs which supports high resolution encoding functionalities.
16+
17+properties:
18+ compatible:
19+ enum:
20+ - mediatek,mt8173-vcodec-enc-vp8
21+ - mediatek,mt8173-vcodec-enc
22+ - mediatek,mt8183-vcodec-enc
23+ - mediatek,mt8192-vcodec-enc
24+ - mediatek,mt8195-vcodec-enc
25+
26+ reg:
27+ maxItems: 1
28+
29+ interrupts:
30+ maxItems: 1
31+
32+ clocks:
33+ minItems: 1
34+ maxItems: 5
35+
36+ clock-names:
37+ minItems: 1
38+ maxItems: 5
39+
40+ assigned-clocks: true
41+
42+ assigned-clock-parents: true
43+
44+ iommus:
45+ minItems: 1
46+ maxItems: 32
47+ description: |
48+ List of the hardware port in respective IOMMU block for current Socs.
49+ Refer to bindings/iommu/mediatek,iommu.yaml.
50+
51+ dma-ranges:
52+ maxItems: 1
53+ description: |
54+ Describes the physical address space of IOMMU maps to memory.
55+
56+ mediatek,vpu:
57+ $ref: /schemas/types.yaml#/definitions/phandle
58+ maxItems: 1
59+ description:
60+ Describes point to vpu.
61+
62+ mediatek,scp:
63+ $ref: /schemas/types.yaml#/definitions/phandle
64+ maxItems: 1
65+ description:
66+ Describes point to scp.
67+
68+required:
69+ - compatible
70+ - reg
71+ - interrupts
72+ - clocks
73+ - clock-names
74+ - iommus
75+ - assigned-clocks
76+ - assigned-clock-parents
77+
78+allOf:
79+ - if:
80+ properties:
81+ compatible:
82+ contains:
83+ enum:
84+ - mediatek,mt8183-vcodec-enc
85+ - mediatek,mt8192-vcodec-enc
86+
87+ then:
88+ required:
89+ - mediatek,scp
90+
91+ - if:
92+ properties:
93+ compatible:
94+ contains:
95+ enum:
96+ - mediatek,mt8173-vcodec-enc-vp8
97+ - mediatek,mt8173-vcodec-enc
98+
99+ then:
100+ required:
101+ - mediatek,vpu
102+
103+ - if:
104+ properties:
105+ compatible:
106+ enum:
107+ - mediatek,mt8173-vcodec-enc
108+ - mediatek,mt8192-vcodec-enc
109+ - mediatek,mt8173-vcodec-enc
110+
111+ then:
112+ properties:
113+ clock:
114+ items:
115+ minItems: 1
116+ maxItems: 1
117+ clock-names:
118+ items:
119+ - const: venc_sel
120+ else: # for vp8 hw decoder
121+ properties:
122+ clock:
123+ items:
124+ minItems: 1
125+ maxItems: 1
126+ clock-names:
127+ items:
128+ - const: venc_lt_sel
129+
130+additionalProperties: false
131+
132+examples:
133+ - |
134+ #include <dt-bindings/interrupt-controller/arm-gic.h>
135+ #include <dt-bindings/clock/mt8173-clk.h>
136+ #include <dt-bindings/memory/mt8173-larb-port.h>
137+ #include <dt-bindings/interrupt-controller/irq.h>
138+
139+ vcodec_enc_avc: vcodec@18002000 {
140+ compatible = "mediatek,mt8173-vcodec-enc";
141+ reg = <0x18002000 0x1000>;
142+ interrupts = <GIC_SPI 198 IRQ_TYPE_LEVEL_LOW>;
143+ iommus = <&iommu M4U_PORT_VENC_RCPU>,
144+ <&iommu M4U_PORT_VENC_REC>,
145+ <&iommu M4U_PORT_VENC_BSDMA>,
146+ <&iommu M4U_PORT_VENC_SV_COMV>,
147+ <&iommu M4U_PORT_VENC_RD_COMV>,
148+ <&iommu M4U_PORT_VENC_CUR_LUMA>,
149+ <&iommu M4U_PORT_VENC_CUR_CHROMA>,
150+ <&iommu M4U_PORT_VENC_REF_LUMA>,
151+ <&iommu M4U_PORT_VENC_REF_CHROMA>,
152+ <&iommu M4U_PORT_VENC_NBM_RDMA>,
153+ <&iommu M4U_PORT_VENC_NBM_WDMA>;
154+ mediatek,vpu = <&vpu>;
155+ clocks = <&topckgen CLK_TOP_VENC_SEL>;
156+ clock-names = "venc_sel";
157+ assigned-clocks = <&topckgen CLK_TOP_VENC_SEL>;
158+ assigned-clock-parents = <&topckgen CLK_TOP_VCODECPLL>;
159+ };
160+
161+ vcodec_enc_vp8: vcodec@19002000 {
162+ compatible = "mediatek,mt8173-vcodec-enc-vp8";
163+ reg = <0x19002000 0x1000>; /* VENC_LT_SYS */
164+ interrupts = <GIC_SPI 202 IRQ_TYPE_LEVEL_LOW>;
165+ iommus = <&iommu M4U_PORT_VENC_RCPU_SET2>,
166+ <&iommu M4U_PORT_VENC_REC_FRM_SET2>,
167+ <&iommu M4U_PORT_VENC_BSDMA_SET2>,
168+ <&iommu M4U_PORT_VENC_SV_COMA_SET2>,
169+ <&iommu M4U_PORT_VENC_RD_COMA_SET2>,
170+ <&iommu M4U_PORT_VENC_CUR_LUMA_SET2>,
171+ <&iommu M4U_PORT_VENC_CUR_CHROMA_SET2>,
172+ <&iommu M4U_PORT_VENC_REF_LUMA_SET2>,
173+ <&iommu M4U_PORT_VENC_REC_CHROMA_SET2>;
174+ mediatek,vpu = <&vpu>;
175+ clocks = <&topckgen CLK_TOP_VENC_LT_SEL>;
176+ clock-names = "venc_lt_sel";
177+ assigned-clocks = <&topckgen CLK_TOP_VENC_LT_SEL>;
178+ assigned-clock-parents = <&topckgen CLK_TOP_VCODECPLL_370P5>;
179+ };
Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml+265−0
@@ -0,0 +1,265 @@
1+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
3+%YAML 1.2
4+---
5+$id: "http://devicetree.org/schemas/media/mediatek,vcodec-subdev-decoder.yaml#"
6+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
7+
8+title: Mediatek Video Decode Accelerator With Multi Hardware
9+
10+maintainers:
11+ - Yunfei Dong <yunfei.dong@mediatek.com>
12+
13+description: |
14+ Mediatek Video Decode is the video decode hardware present in Mediatek
15+ SoCs which supports high resolution decoding functionalities. Required
16+ parent and child device node.
17+
18+ About the Decoder Hardware Block Diagram, please check below:
19+
20+ +---------------------------------+------------------------------------+
21+ | | |
22+ | input -> lat HW -> lat buffer --|--> lat buffer -> core HW -> output |
23+ | || | || |
24+ +------------||-------------------+---------------------||-------------+
25+ lat workqueue | core workqueue <parent>
26+ -------------||-----------------------------------------||------------------
27+ || || <child>
28+ \/ <----------------HW index-------------->\/
29+ +------------------------------------------------------+
30+ | enable/disable |
31+ | clk power irq iommu |
32+ | (lat/lat soc/core0/core1) |
33+ +------------------------------------------------------+
34+
35+ As above, there are parent and child devices, child mean each hardware. The child device
36+ controls the information of each hardware independent which include clk/power/irq.
37+
38+ There are two workqueues in parent device: lat workqueue and core workqueue. They are used
39+ to lat and core hardware deocder. Lat workqueue need to get input bitstream and lat buffer,
40+ then enable lat to decode, writing the result to lat buffer, dislabe hardware when lat decode
41+ done. Core workqueue need to get lat buffer and output buffer, then enable core to decode,
42+ writing the result to output buffer, disable hardware when core decode done. These two
43+ hardwares will decode each frame cyclically.
44+
45+ For the smi common may not the same for each hardware, can't combine all hardware in one node,
46+ or leading to iommu fault when access dram data.
47+
48+properties:
49+ compatible:
50+ const: mediatek,mt8192-vcodec-dec
51+
52+ reg:
53+ maxItems: 1
54+
55+ iommus:
56+ minItems: 1
57+ maxItems: 32
58+ description: |
59+ List of the hardware port in respective IOMMU block for current Socs.
60+ Refer to bindings/iommu/mediatek,iommu.yaml.
61+
62+ mediatek,scp:
63+ $ref: /schemas/types.yaml#/definitions/phandle
64+ maxItems: 1
65+ description: |
66+ The node of system control processor (SCP), using
67+ the remoteproc & rpmsg framework.
68+
69+ dma-ranges:
70+ maxItems: 1
71+ description: |
72+ Describes the physical address space of IOMMU maps to memory.
73+
74+ "#address-cells":
75+ const: 1
76+
77+ "#size-cells":
78+ const: 1
79+
80+ ranges: true
81+
82+# Required child node:
83+patternProperties:
84+ '^vcodec-lat@[0-9a-f]+$':
85+ type: object
86+
87+ properties:
88+ compatible:
89+ const: mediatek,mtk-vcodec-lat
90+
91+ reg:
92+ maxItems: 1
93+
94+ interrupts:
95+ maxItems: 1
96+
97+ iommus:
98+ minItems: 1
99+ maxItems: 32
100+ description: |
101+ List of the hardware port in respective IOMMU block for current Socs.
102+ Refer to bindings/iommu/mediatek,iommu.yaml.
103+
104+ clocks:
105+ maxItems: 5
106+
107+ clock-names:
108+ items:
109+ - const: sel
110+ - const: soc-vdec
111+ - const: soc-lat
112+ - const: vdec
113+ - const: top
114+
115+ assigned-clocks:
116+ maxItems: 1
117+
118+ assigned-clock-parents:
119+ maxItems: 1
120+
121+ power-domains:
122+ maxItems: 1
123+
124+ required:
125+ - compatible
126+ - reg
127+ - interrupts
128+ - iommus
129+ - clocks
130+ - clock-names
131+ - assigned-clocks
132+ - assigned-clock-parents
133+ - power-domains
134+
135+ additionalProperties: false
136+
137+ '^vcodec-core@[0-9a-f]+$':
138+ type: object
139+
140+ properties:
141+ compatible:
142+ const: mediatek,mtk-vcodec-core
143+
144+ reg:
145+ maxItems: 1
146+
147+ interrupts:
148+ maxItems: 1
149+
150+ iommus:
151+ minItems: 1
152+ maxItems: 32
153+ description: |
154+ List of the hardware port in respective IOMMU block for current Socs.
155+ Refer to bindings/iommu/mediatek,iommu.yaml.
156+
157+ clocks:
158+ maxItems: 5
159+
160+ clock-names:
161+ items:
162+ - const: sel
163+ - const: soc-vdec
164+ - const: soc-lat
165+ - const: vdec
166+ - const: top
167+
168+ assigned-clocks:
169+ maxItems: 1
170+
171+ assigned-clock-parents:
172+ maxItems: 1
173+
174+ power-domains:
175+ maxItems: 1
176+
177+ required:
178+ - compatible
179+ - reg
180+ - interrupts
181+ - iommus
182+ - clocks
183+ - clock-names
184+ - assigned-clocks
185+ - assigned-clock-parents
186+ - power-domains
187+
188+ additionalProperties: false
189+
190+required:
191+ - compatible
192+ - reg
193+ - iommus
194+ - mediatek,scp
195+ - dma-ranges
196+ - ranges
197+
198+additionalProperties: false
199+
200+examples:
201+ - |
202+ #include <dt-bindings/interrupt-controller/arm-gic.h>
203+ #include <dt-bindings/memory/mt8192-larb-port.h>
204+ #include <dt-bindings/interrupt-controller/irq.h>
205+ #include <dt-bindings/clock/mt8192-clk.h>
206+ #include <dt-bindings/power/mt8192-power.h>
207+
208+ video-codec@16000000 {
209+ compatible = "mediatek,mt8192-vcodec-dec";
210+ mediatek,scp = <&scp>;
211+ iommus = <&iommu0 M4U_PORT_L4_VDEC_MC_EXT>;
212+ dma-ranges = <0x1 0x0 0x0 0x40000000 0x0 0xfff00000>;
213+ #address-cells = <1>;
214+ #size-cells = <1>;
215+ ranges = <0 0x16000000 0x40000>;
216+ reg = <0x16000000 0x1000>; /* VDEC_SYS */
217+ vcodec-lat@10000 {
218+ compatible = "mediatek,mtk-vcodec-lat";
219+ reg = <0x10000 0x800>;
220+ interrupts = <GIC_SPI 426 IRQ_TYPE_LEVEL_HIGH 0>;
221+ iommus = <&iommu0 M4U_PORT_L5_VDEC_LAT0_VLD_EXT>,
222+ <&iommu0 M4U_PORT_L5_VDEC_LAT0_VLD2_EXT>,
223+ <&iommu0 M4U_PORT_L5_VDEC_LAT0_AVC_MV_EXT>,
224+ <&iommu0 M4U_PORT_L5_VDEC_LAT0_PRED_RD_EXT>,
225+ <&iommu0 M4U_PORT_L5_VDEC_LAT0_TILE_EXT>,
226+ <&iommu0 M4U_PORT_L5_VDEC_LAT0_WDMA_EXT>,
227+ <&iommu0 M4U_PORT_L5_VDEC_LAT0_RG_CTRL_DMA_EXT>,
228+ <&iommu0 M4U_PORT_L5_VDEC_UFO_ENC_EXT>;
229+ clocks = <&topckgen CLK_TOP_VDEC_SEL>,
230+ <&vdecsys_soc CLK_VDEC_SOC_VDEC>,
231+ <&vdecsys_soc CLK_VDEC_SOC_LAT>,
232+ <&vdecsys_soc CLK_VDEC_SOC_LARB1>,
233+ <&topckgen CLK_TOP_MAINPLL_D4>;
234+ clock-names = "sel", "soc-vdec", "soc-lat", "vdec", "top";
235+ assigned-clocks = <&topckgen CLK_TOP_VDEC_SEL>;
236+ assigned-clock-parents = <&topckgen CLK_TOP_MAINPLL_D4>;
237+ power-domains = <&spm MT8192_POWER_DOMAIN_VDEC>;
238+ };
239+
240+ vcodec-core@25000 {
241+ compatible = "mediatek,mtk-vcodec-core";
242+ reg = <0x25000 0x1000>;
243+ interrupts = <GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH 0>;
244+ iommus = <&iommu0 M4U_PORT_L4_VDEC_MC_EXT>,
245+ <&iommu0 M4U_PORT_L4_VDEC_UFO_EXT>,
246+ <&iommu0 M4U_PORT_L4_VDEC_PP_EXT>,
247+ <&iommu0 M4U_PORT_L4_VDEC_PRED_RD_EXT>,
248+ <&iommu0 M4U_PORT_L4_VDEC_PRED_WR_EXT>,
249+ <&iommu0 M4U_PORT_L4_VDEC_PPWRAP_EXT>,
250+ <&iommu0 M4U_PORT_L4_VDEC_TILE_EXT>,
251+ <&iommu0 M4U_PORT_L4_VDEC_VLD_EXT>,
252+ <&iommu0 M4U_PORT_L4_VDEC_VLD2_EXT>,
253+ <&iommu0 M4U_PORT_L4_VDEC_AVC_MV_EXT>,
254+ <&iommu0 M4U_PORT_L4_VDEC_RG_CTRL_DMA_EXT>;
255+ clocks = <&topckgen CLK_TOP_VDEC_SEL>,
256+ <&vdecsys CLK_VDEC_VDEC>,
257+ <&vdecsys CLK_VDEC_LAT>,
258+ <&vdecsys CLK_VDEC_LARB1>,
259+ <&topckgen CLK_TOP_MAINPLL_D4>;
260+ clock-names = "sel", "soc-vdec", "soc-lat", "vdec", "top";
261+ assigned-clocks = <&topckgen CLK_TOP_VDEC_SEL>;
262+ assigned-clock-parents = <&topckgen CLK_TOP_MAINPLL_D4>;
263+ power-domains = <&spm MT8192_POWER_DOMAIN_VDEC2>;
264+ };
265+ };
Documentation/devicetree/bindings/media/mediatek-jpeg-decoder.txt+0−38
@@ -1,38 +0,0 @@
1−* Mediatek JPEG Decoder
2−
3−Mediatek JPEG Decoder is the JPEG decode hardware present in Mediatek SoCs
4−
5−Required properties:
6−- compatible : must be one of the following string:
7− "mediatek,mt8173-jpgdec"
8− "mediatek,mt7623-jpgdec", "mediatek,mt2701-jpgdec"
9− "mediatek,mt2701-jpgdec"
10−- reg : physical base address of the jpeg decoder registers and length of
11− memory mapped region.
12−- interrupts : interrupt number to the interrupt controller.
13−- clocks: device clocks, see
14− Documentation/devicetree/bindings/clock/clock-bindings.txt for details.
15−- clock-names: must contain "jpgdec-smi" and "jpgdec".
16−- power-domains: a phandle to the power domain, see
17− Documentation/devicetree/bindings/power/power_domain.txt for details.
18−- mediatek,larb: must contain the local arbiters in the current Socs, see
19− Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.yaml
20− for details.
21−- iommus: should point to the respective IOMMU block with master port as
22− argument, see Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
23− for details.
24−
25−Example:
26− jpegdec: jpegdec@15004000 {
27− compatible = "mediatek,mt2701-jpgdec";
28− reg = <0 0x15004000 0 0x1000>;
29− interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_LOW>;
30− clocks = <&imgsys CLK_IMG_JPGDEC_SMI>,
31− <&imgsys CLK_IMG_JPGDEC>;
32− clock-names = "jpgdec-smi",
33− "jpgdec";
34− power-domains = <&scpsys MT2701_POWER_DOMAIN_ISP>;
35− mediatek,larb = <&larb2>;
36− iommus = <&iommu MT2701_M4U_PORT_JPGDEC_WDMA>,
37− <&iommu MT2701_M4U_PORT_JPGDEC_BSDMA>;
38− };
Documentation/devicetree/bindings/media/mediatek-jpeg-decoder.yaml+80−0
@@ -0,0 +1,80 @@
1+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+%YAML 1.2
3+---
4+$id: http://devicetree.org/schemas/media/mediatek-jpeg-decoder.yaml#
5+$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+title: MediaTek JPEG Decoder Device Tree Bindings
8+
9+maintainers:
10+ - Xia Jiang <xia.jiang@mediatek.com>
11+
12+description: |-
13+ Mediatek JPEG Decoder is the JPEG decode hardware present in Mediatek SoCs
14+
15+properties:
16+ compatible:
17+ oneOf:
18+ - items:
19+ - enum:
20+ - mediatek,mt8173-jpgdec
21+ - mediatek,mt2701-jpgdec
22+ - items:
23+ - enum:
24+ - mediatek,mt7623-jpgdec
25+ - const: mediatek,mt2701-jpgdec
26+
27+ reg:
28+ maxItems: 1
29+
30+ interrupts:
31+ maxItems: 1
32+
33+ clocks:
34+ maxItems: 2
35+ minItems: 2
36+
37+ clock-names:
38+ items:
39+ - const: jpgdec-smi
40+ - const: jpgdec
41+
42+ power-domains:
43+ maxItems: 1
44+
45+ iommus:
46+ maxItems: 2
47+ description: |
48+ Points to the respective IOMMU block with master port as argument, see
49+ Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml for details.
50+ Ports are according to the HW.
51+
52+required:
53+ - compatible
54+ - reg
55+ - interrupts
56+ - clocks
57+ - clock-names
58+ - power-domains
59+ - iommus
60+
61+additionalProperties: false
62+
63+examples:
64+ - |
65+ #include <dt-bindings/clock/mt2701-clk.h>
66+ #include <dt-bindings/interrupt-controller/arm-gic.h>
67+ #include <dt-bindings/memory/mt2701-larb-port.h>
68+ #include <dt-bindings/power/mt2701-power.h>
69+ jpegdec: jpegdec@15004000 {
70+ compatible = "mediatek,mt2701-jpgdec";
71+ reg = <0x15004000 0x1000>;
72+ interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_LOW>;
73+ clocks = <&imgsys CLK_IMG_JPGDEC_SMI>,
74+ <&imgsys CLK_IMG_JPGDEC>;
75+ clock-names = "jpgdec-smi",
76+ "jpgdec";
77+ power-domains = <&scpsys MT2701_POWER_DOMAIN_ISP>;
78+ iommus = <&iommu MT2701_M4U_PORT_JPGDEC_WDMA>,
79+ <&iommu MT2701_M4U_PORT_JPGDEC_BSDMA>;
80+ };
Documentation/devicetree/bindings/media/mediatek-jpeg-encoder.txt+0−35
@@ -1,35 +0,0 @@
1−* MediaTek JPEG Encoder
2−
3−MediaTek JPEG Encoder is the JPEG encode hardware present in MediaTek SoCs
4−
5−Required properties:
6−- compatible : "mediatek,mt2701-jpgenc"
7− followed by "mediatek,mtk-jpgenc"
8−- reg : physical base address of the JPEG encoder registers and length of
9− memory mapped region.
10−- interrupts : interrupt number to the interrupt controller.
11−- clocks: device clocks, see
12− Documentation/devicetree/bindings/clock/clock-bindings.txt for details.
13−- clock-names: must contain "jpgenc". It is the clock of JPEG encoder.
14−- power-domains: a phandle to the power domain, see
15− Documentation/devicetree/bindings/power/power_domain.txt for details.
16−- mediatek,larb: must contain the local arbiters in the current SoCs, see
17− Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.yaml
18− for details.
19−- iommus: should point to the respective IOMMU block with master port as
20− argument, see Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
21− for details.
22−
23−Example:
24− jpegenc: jpegenc@1500a000 {
25− compatible = "mediatek,mt2701-jpgenc",
26− "mediatek,mtk-jpgenc";
27− reg = <0 0x1500a000 0 0x1000>;
28− interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_LOW>;
29− clocks = <&imgsys CLK_IMG_VENC>;
30− clock-names = "jpgenc";
31− power-domains = <&scpsys MT2701_POWER_DOMAIN_ISP>;
32− mediatek,larb = <&larb2>;
33− iommus = <&iommu MT2701_M4U_PORT_JPGENC_RDMA>,
34− <&iommu MT2701_M4U_PORT_JPGENC_BSDMA>;
35− };
Documentation/devicetree/bindings/media/mediatek-jpeg-encoder.yaml+72−0
@@ -0,0 +1,72 @@
1+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+%YAML 1.2
3+---
4+$id: http://devicetree.org/schemas/media/mediatek-jpeg-encoder.yaml#
5+$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+title: MediaTek JPEG Encoder Device Tree Bindings
8+
9+maintainers:
10+ - Xia Jiang <xia.jiang@mediatek.com>
11+
12+description: |-
13+ MediaTek JPEG Encoder is the JPEG encode hardware present in MediaTek SoCs
14+
15+properties:
16+ compatible:
17+ items:
18+ - enum:
19+ - mediatek,mt2701-jpgenc
20+ - mediatek,mt8183-jpgenc
21+ - const: mediatek,mtk-jpgenc
22+ reg:
23+ maxItems: 1
24+
25+ interrupts:
26+ maxItems: 1
27+
28+ clocks:
29+ maxItems: 1
30+
31+ clock-names:
32+ items:
33+ - const: jpgenc
34+
35+ power-domains:
36+ maxItems: 1
37+
38+ iommus:
39+ maxItems: 2
40+ description: |
41+ Points to the respective IOMMU block with master port as argument, see
42+ Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml for details.
43+ Ports are according to the HW.
44+
45+required:
46+ - compatible
47+ - reg
48+ - interrupts
49+ - clocks
50+ - clock-names
51+ - power-domains
52+ - iommus
53+
54+additionalProperties: false
55+
56+examples:
57+ - |
58+ #include <dt-bindings/clock/mt2701-clk.h>
59+ #include <dt-bindings/interrupt-controller/arm-gic.h>
60+ #include <dt-bindings/memory/mt2701-larb-port.h>
61+ #include <dt-bindings/power/mt2701-power.h>
62+ jpegenc: jpegenc@1500a000 {
63+ compatible = "mediatek,mt2701-jpgenc",
64+ "mediatek,mtk-jpgenc";
65+ reg = <0x1500a000 0x1000>;
66+ interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_LOW>;
67+ clocks = <&imgsys CLK_IMG_VENC>;
68+ clock-names = "jpgenc";
69+ power-domains = <&scpsys MT2701_POWER_DOMAIN_ISP>;
70+ iommus = <&iommu MT2701_M4U_PORT_JPGENC_RDMA>,
71+ <&iommu MT2701_M4U_PORT_JPGENC_BSDMA>;
72+ };
Documentation/devicetree/bindings/media/mediatek-mdp.txt+0−8
@@ -27,9 +27,6 @@ Required properties (DMA function blocks, child node): · 26 unmodified lines
2727 - iommus: should point to the respective IOMMU block with master port as
2828 argument, see Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
2929 for details.
30−- mediatek,larb: must contain the local arbiters in the current Socs, see
31− Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.yaml
32− for details.
3330
3431 Example:
3532 mdp_rdma0: rdma@14001000 {
@@ -40,7 +37,6 @@ Example: · 4 unmodified lines
4037 <&mmsys CLK_MM_MUTEX_32K>;
4138 power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
4239 iommus = <&iommu M4U_PORT_MDP_RDMA0>;
43− mediatek,larb = <&larb0>;
4440 mediatek,vpu = <&vpu>;
4541 };
4642
@@ -51,7 +47,6 @@ Example: · 4 unmodified lines
5147 <&mmsys CLK_MM_MUTEX_32K>;
5248 power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
5349 iommus = <&iommu M4U_PORT_MDP_RDMA1>;
54− mediatek,larb = <&larb4>;
5550 };
5651
5752 mdp_rsz0: rsz@14003000 {
@@ -81,7 +76,6 @@ Example: · 23 unmodified lines
8176 clocks = <&mmsys CLK_MM_MDP_WDMA>;
8277 power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
8378 iommus = <&iommu M4U_PORT_MDP_WDMA>;
84− mediatek,larb = <&larb0>;
8579 };
8680
8781 mdp_wrot0: wrot@14007000 {
@@ -90,7 +84,6 @@ Example: · 2 unmodified lines
9084 clocks = <&mmsys CLK_MM_MDP_WROT0>;
9185 power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
9286 iommus = <&iommu M4U_PORT_MDP_WROT0>;
93− mediatek,larb = <&larb0>;
9487 };
9588
9689 mdp_wrot1: wrot@14008000 {
@@ -99,5 +92,4 @@ Example: · 2 unmodified lines
9992 clocks = <&mmsys CLK_MM_MDP_WROT1>;
10093 power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
10194 iommus = <&iommu M4U_PORT_MDP_WROT1>;
102− mediatek,larb = <&larb4>;
10395 };
Documentation/devicetree/bindings/media/mediatek-vcodec.txt+0−131
@@ -1,131 +0,0 @@
1−Mediatek Video Codec
2−
3−Mediatek Video Codec is the video codec hw present in Mediatek SoCs which
4−supports high resolution encoding and decoding functionalities.
5−
6−Required properties:
7−- compatible : must be one of the following string:
8− "mediatek,mt8173-vcodec-enc-vp8" for mt8173 vp8 encoder.
9− "mediatek,mt8173-vcodec-enc" for mt8173 avc encoder.
10− "mediatek,mt8183-vcodec-enc" for MT8183 encoder.
11− "mediatek,mt8173-vcodec-dec" for MT8173 decoder.
12− "mediatek,mt8192-vcodec-enc" for MT8192 encoder.
13− "mediatek,mt8183-vcodec-dec" for MT8183 decoder.
14− "mediatek,mt8195-vcodec-enc" for MT8195 encoder.
15−- reg : Physical base address of the video codec registers and length of
16− memory mapped region.
17−- interrupts : interrupt number to the cpu.
18−- mediatek,larb : must contain the local arbiters in the current Socs.
19−- clocks : list of clock specifiers, corresponding to entries in
20− the clock-names property.
21−- clock-names: avc encoder must contain "venc_sel", vp8 encoder must
22− contain "venc_lt_sel", decoder must contain "vcodecpll", "univpll_d2",
23− "clk_cci400_sel", "vdec_sel", "vdecpll", "vencpll", "venc_lt_sel",
24− "vdec_bus_clk_src".
25−- iommus : should point to the respective IOMMU block with master port as
26− argument, see Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
27− for details.
28−- dma-ranges : describes the dma address range space that the codec hw access.
29−One of the two following nodes:
30−- mediatek,vpu : the node of the video processor unit, if using VPU.
31−- mediatek,scp : the node of the SCP unit, if using SCP.
32−
33−
34−Example:
35−
36−vcodec_dec: vcodec@16000000 {
37− compatible = "mediatek,mt8173-vcodec-dec";
38− reg = <0 0x16000000 0 0x100>, /*VDEC_SYS*/
39− <0 0x16020000 0 0x1000>, /*VDEC_MISC*/
40− <0 0x16021000 0 0x800>, /*VDEC_LD*/
41− <0 0x16021800 0 0x800>, /*VDEC_TOP*/
42− <0 0x16022000 0 0x1000>, /*VDEC_CM*/
43− <0 0x16023000 0 0x1000>, /*VDEC_AD*/
44− <0 0x16024000 0 0x1000>, /*VDEC_AV*/
45− <0 0x16025000 0 0x1000>, /*VDEC_PP*/
46− <0 0x16026800 0 0x800>, /*VP8_VD*/
47− <0 0x16027000 0 0x800>, /*VP6_VD*/
48− <0 0x16027800 0 0x800>, /*VP8_VL*/
49− <0 0x16028400 0 0x400>; /*VP9_VD*/
50− interrupts = <GIC_SPI 204 IRQ_TYPE_LEVEL_LOW>;
51− mediatek,larb = <&larb1>;
52− iommus = <&iommu M4U_PORT_HW_VDEC_MC_EXT>,
53− <&iommu M4U_PORT_HW_VDEC_PP_EXT>,
54− <&iommu M4U_PORT_HW_VDEC_AVC_MV_EXT>,
55− <&iommu M4U_PORT_HW_VDEC_PRED_RD_EXT>,
56− <&iommu M4U_PORT_HW_VDEC_PRED_WR_EXT>,
57− <&iommu M4U_PORT_HW_VDEC_UFO_EXT>,
58− <&iommu M4U_PORT_HW_VDEC_VLD_EXT>,
59− <&iommu M4U_PORT_HW_VDEC_VLD2_EXT>;
60− mediatek,vpu = <&vpu>;
61− power-domains = <&scpsys MT8173_POWER_DOMAIN_VDEC>;
62− clocks = <&apmixedsys CLK_APMIXED_VCODECPLL>,
63− <&topckgen CLK_TOP_UNIVPLL_D2>,
64− <&topckgen CLK_TOP_CCI400_SEL>,
65− <&topckgen CLK_TOP_VDEC_SEL>,
66− <&topckgen CLK_TOP_VCODECPLL>,
67− <&apmixedsys CLK_APMIXED_VENCPLL>,
68− <&topckgen CLK_TOP_VENC_LT_SEL>,
69− <&topckgen CLK_TOP_VCODECPLL_370P5>;
70− clock-names = "vcodecpll",
71− "univpll_d2",
72− "clk_cci400_sel",
73− "vdec_sel",
74− "vdecpll",
75− "vencpll",
76− "venc_lt_sel",
77− "vdec_bus_clk_src";
78− assigned-clocks = <&topckgen CLK_TOP_VENC_LT_SEL>,
79− <&topckgen CLK_TOP_CCI400_SEL>,
80− <&topckgen CLK_TOP_VDEC_SEL>,
81− <&apmixedsys CLK_APMIXED_VCODECPLL>,
82− <&apmixedsys CLK_APMIXED_VENCPLL>;
83− assigned-clock-parents = <&topckgen CLK_TOP_VCODECPLL_370P5>,
84− <&topckgen CLK_TOP_UNIVPLL_D2>,
85− <&topckgen CLK_TOP_VCODECPLL>;
86− assigned-clock-rates = <0>, <0>, <0>, <1482000000>, <800000000>;
87− };
88−
89−vcodec_enc_avc: vcodec@18002000 {
90− compatible = "mediatek,mt8173-vcodec-enc";
91− reg = <0 0x18002000 0 0x1000>;
92− interrupts = <GIC_SPI 198 IRQ_TYPE_LEVEL_LOW>;
93− iommus = <&iommu M4U_PORT_VENC_RCPU>,
94− <&iommu M4U_PORT_VENC_REC>,
95− <&iommu M4U_PORT_VENC_BSDMA>,
96− <&iommu M4U_PORT_VENC_SV_COMV>,
97− <&iommu M4U_PORT_VENC_RD_COMV>,
98− <&iommu M4U_PORT_VENC_CUR_LUMA>,
99− <&iommu M4U_PORT_VENC_CUR_CHROMA>,
100− <&iommu M4U_PORT_VENC_REF_LUMA>,
101− <&iommu M4U_PORT_VENC_REF_CHROMA>,
102− <&iommu M4U_PORT_VENC_NBM_RDMA>,
103− <&iommu M4U_PORT_VENC_NBM_WDMA>;
104− mediatek,larb = <&larb3>;
105− mediatek,vpu = <&vpu>;
106− clocks = <&topckgen CLK_TOP_VENC_SEL>;
107− clock-names = "venc_sel";
108− assigned-clocks = <&topckgen CLK_TOP_VENC_SEL>;
109− assigned-clock-parents = <&topckgen CLK_TOP_VCODECPLL>;
110− };
111−
112−vcodec_enc_vp8: vcodec@19002000 {
113− compatible = "mediatek,mt8173-vcodec-enc-vp8";
114− reg = <0 0x19002000 0 0x1000>; /* VENC_LT_SYS */
115− interrupts = <GIC_SPI 202 IRQ_TYPE_LEVEL_LOW>;
116− iommus = <&iommu M4U_PORT_VENC_RCPU_SET2>,
117− <&iommu M4U_PORT_VENC_REC_FRM_SET2>,
118− <&iommu M4U_PORT_VENC_BSDMA_SET2>,
119− <&iommu M4U_PORT_VENC_SV_COMA_SET2>,
120− <&iommu M4U_PORT_VENC_RD_COMA_SET2>,
121− <&iommu M4U_PORT_VENC_CUR_LUMA_SET2>,
122− <&iommu M4U_PORT_VENC_CUR_CHROMA_SET2>,
123− <&iommu M4U_PORT_VENC_REF_LUMA_SET2>,
124− <&iommu M4U_PORT_VENC_REC_CHROMA_SET2>;
125− mediatek,larb = <&larb5>;
126− mediatek,vpu = <&vpu>;
127− clocks = <&topckgen CLK_TOP_VENC_LT_SEL>;
128− clock-names = "venc_lt_sel";
129− assigned-clocks = <&topckgen CLK_TOP_VENC_LT_SEL>;
130− assigned-clock-parents = <&topckgen CLK_TOP_VCODECPLL_370P5>;
131− };
Documentation/devicetree/bindings/media/microchip,csi2dc.yaml+197−0
@@ -0,0 +1,197 @@
1+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+%YAML 1.2
3+---
4+$id: http://devicetree.org/schemas/media/microchip,csi2dc.yaml#
5+$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+title: Microchip CSI2 Demux Controller (CSI2DC)
8+
9+maintainers:
10+ - Eugen Hristev <eugen.hristev@microchip.com>
11+
12+description:
13+ CSI2DC - Camera Serial Interface 2 Demux Controller
14+
15+ CSI2DC is a hardware block that receives incoming data from either from an
16+ IDI interface or from a parallel bus interface.
17+ It filters IDI packets based on their data type and virtual channel
18+ identifier, then converts the byte stream to a pixel stream into a cross
19+ clock domain towards a parallel interface that can be read by a sensor
20+ controller.
21+ IDI interface is Synopsys proprietary.
22+ CSI2DC can act a simple bypass bridge if the incoming data is coming from
23+ a parallel interface.
24+
25+ CSI2DC provides two pipes, one video pipe and one data pipe. Video pipe
26+ is connected at the output to a sensor controller and the data pipe is
27+ accessible as a DMA slave port to a DMA controller.
28+
29+ CSI2DC supports a single 'port' node as a sink port with either Synopsys
30+ 32-bit IDI interface or a parallel interface.
31+
32+ CSI2DC supports one 'port' node as source port with parallel interface.
33+ This is called video pipe.
34+ This port has an 'endpoint' that can be connected to a sink port of another
35+ controller (next in pipeline).
36+
37+ CSI2DC also supports direct access to the data through AHB, via DMA channel,
38+ called data pipe.
39+ For data pipe to be available, a dma controller and a dma channel must be
40+ referenced.
41+
42+properties:
43+ compatible:
44+ const: microchip,sama7g5-csi2dc
45+
46+ reg:
47+ maxItems: 1
48+
49+ clocks:
50+ minItems: 2
51+ maxItems: 2
52+
53+ clock-names:
54+ description:
55+ CSI2DC must have two clocks to function correctly. One clock is the
56+ peripheral clock for the inside functionality of the hardware block.
57+ This is named 'pclk'. The second clock must be the cross domain clock,
58+ in which CSI2DC will perform clock crossing. This clock must be fed
59+ by the next controller in pipeline, which usually is a sensor controller.
60+ Normally this clock should be given by this sensor controller who
61+ is also a clock source. This clock is named 'scck', sensor controller clock.
62+ items:
63+ - const: pclk
64+ - const: scck
65+
66+ dmas:
67+ maxItems: 1
68+
69+ dma-names:
70+ const: rx
71+
72+ ports:
73+ $ref: /schemas/graph.yaml#/properties/ports
74+
75+ properties:
76+ port@0:
77+ $ref: /schemas/graph.yaml#/$defs/port-base
78+ description:
79+ Input port node, single endpoint describing the input port.
80+
81+ properties:
82+ endpoint:
83+ $ref: video-interfaces.yaml#
84+ unevaluatedProperties: false
85+ description: Endpoint connected to input device
86+
87+ properties:
88+ bus-type:
89+ enum: [4, 5, 6]
90+ default: 4
91+
92+ bus-width:
93+ enum: [8, 9, 10, 11, 12, 13, 14]
94+ default: 14
95+
96+ clock-noncontinuous:
97+ type: boolean
98+ description:
99+ Presence of this boolean property decides whether clock is
100+ continuous or noncontinuous.
101+
102+ remote-endpoint: true
103+
104+ port@1:
105+ $ref: /schemas/graph.yaml#/$defs/port-base
106+ description:
107+ Output port node, single endpoint describing the output port.
108+
109+ properties:
110+ endpoint:
111+ unevaluatedProperties: false
112+ $ref: video-interfaces.yaml#
113+ description: Endpoint connected to output device
114+
115+ properties:
116+ bus-type:
117+ enum: [5, 6]
118+ default: 5
119+
120+ bus-width:
121+ enum: [8, 9, 10, 11, 12, 13, 14]
122+ default: 14
123+
124+ remote-endpoint: true
125+
126+ required:
127+ - port@0
128+ - port@1
129+
130+additionalProperties: false
131+
132+required:
133+ - compatible
134+ - reg
135+ - clocks
136+ - clock-names
137+ - ports
138+
139+examples:
140+ # Example for connecting to a parallel sensor controller block (video pipe)
141+ # and the input is received from Synopsys IDI interface
142+ - |
143+ csi2dc@e1404000 {
144+ compatible = "microchip,sama7g5-csi2dc";
145+ reg = <0xe1404000 0x500>;
146+ clocks = <&pclk>, <&scck>;
147+ clock-names = "pclk", "scck";
148+
149+ ports {
150+ #address-cells = <1>;
151+ #size-cells = <0>;
152+ port@0 {
153+ reg = <0>; /* must be 0, first child port */
154+ csi2dc_in: endpoint { /* input from IDI interface */
155+ bus-type = <4>; /* MIPI CSI2 D-PHY */
156+ remote-endpoint = <&csi2host_out>;
157+ };
158+ };
159+
160+ port@1 {
161+ reg = <1>; /* must be 1, second child port */
162+ csi2dc_out: endpoint {
163+ remote-endpoint = <&xisc_in>; /* output to sensor controller */
164+ };
165+ };
166+ };
167+ };
168+
169+ # Example for connecting to a DMA master as an AHB slave
170+ # and the input is received from Synopsys IDI interface
171+ - |
172+ #include <dt-bindings/dma/at91.h>
173+ csi2dc@e1404000 {
174+ compatible = "microchip,sama7g5-csi2dc";
175+ reg = <0xe1404000 0x500>;
176+ clocks = <&pclk>, <&scck>;
177+ clock-names = "pclk", "scck";
178+ dmas = <&dma0 AT91_XDMAC_DT_PERID(34)>;
179+ dma-names = "rx";
180+
181+ ports {
182+ #address-cells = <1>;
183+ #size-cells = <0>;
184+ port@0 {
185+ reg = <0>; /* must be 0, first child port */
186+ csi2dc_input: endpoint { /* input from IDI interface */
187+ remote-endpoint = <&csi2host_out>;
188+ };
189+ };
190+
191+ port@1 {
192+ reg = <1>;
193+ };
194+ };
195+ };
196+
197+...
Documentation/devicetree/bindings/media/nxp,imx-mipi-csi2.yamlrenamed from Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.yaml+1−1
@@ -1,7 +1,7 @@
11 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
22 %YAML 1.2
33 ---
4−$id: http://devicetree.org/schemas/media/nxp,imx7-mipi-csi2.yaml#
4+$id: http://devicetree.org/schemas/media/nxp,imx-mipi-csi2.yaml#
55 $schema: http://devicetree.org/meta-schemas/core.yaml#
66
77 title: NXP i.MX7 and i.MX8 MIPI CSI-2 receiver
Documentation/devicetree/bindings/media/nxp,imx7-csi.yaml+1−0
@@ -17,6 +17,7 @@ properties: · 16 unmodified lines
1717 compatible:
1818 oneOf:
1919 - enum:
20+ - fsl,imx8mq-csi
2021 - fsl,imx7-csi
2122 - fsl,imx6ul-csi
2223 - items:
Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml+29−39
@@ -5,7 +5,7 @@ · 4 unmodified lines
55 $id: "http://devicetree.org/schemas/media/nxp,imx8mq-vpu.yaml#"
66 $schema: "http://devicetree.org/meta-schemas/core.yaml#"
77
8−title: Hantro G1/G2 VPU codecs implemented on i.MX8MQ SoCs
8+title: Hantro G1/G2 VPU codecs implemented on i.MX8M SoCs
99
1010 maintainers:
1111 - Philipp Zabel <p.zabel@pengutronix.de>
@@ -15,33 +15,21 @@ description: · 3 unmodified lines
1515
1616 properties:
1717 compatible:
18− const: nxp,imx8mq-vpu
18+ oneOf:
19+ - const: nxp,imx8mq-vpu
20+ deprecated: true
21+ - const: nxp,imx8mq-vpu-g1
22+ - const: nxp,imx8mq-vpu-g2
23+ - const: nxp,imx8mm-vpu-g1
1924
2025 reg:
21− maxItems: 3
22−
23− reg-names:
24− items:
25− - const: g1
26− - const: g2
27− - const: ctrl
26+ maxItems: 1
2827
2928 interrupts:
30− maxItems: 2
31−
32− interrupt-names:
33− items:
34− - const: g1
35− - const: g2
29+ maxItems: 1
3630
3731 clocks:
38− maxItems: 3
39−
40− clock-names:
41− items:
42− - const: g1
43− - const: g2
44− - const: bus
32+ maxItems: 1
4533
4634 power-domains:
4735 maxItems: 1
@@ -49,31 +37,33 @@ properties: · 1 unmodified line
4937 required:
5038 - compatible
5139 - reg
52− - reg-names
5340 - interrupts
54− - interrupt-names
5541 - clocks
56− - clock-names
5742
5843 additionalProperties: false
5944
6045 examples:
6146 - |
6247 #include <dt-bindings/clock/imx8mq-clock.h>
48+ #include <dt-bindings/power/imx8mq-power.h>
49+ #include <dt-bindings/interrupt-controller/arm-gic.h>
50+
51+ vpu_g1: video-codec@38300000 {
52+ compatible = "nxp,imx8mq-vpu-g1";
53+ reg = <0x38300000 0x10000>;
54+ interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
55+ clocks = <&clk IMX8MQ_CLK_VPU_G1_ROOT>;
56+ power-domains = <&vpu_blk_ctrl IMX8MQ_VPUBLK_PD_G1>;
57+ };
58+ - |
59+ #include <dt-bindings/clock/imx8mq-clock.h>
60+ #include <dt-bindings/power/imx8mq-power.h>
6361 #include <dt-bindings/interrupt-controller/arm-gic.h>
6462
65− vpu: video-codec@38300000 {
66− compatible = "nxp,imx8mq-vpu";
67− reg = <0x38300000 0x10000>,
68− <0x38310000 0x10000>,
69− <0x38320000 0x10000>;
70− reg-names = "g1", "g2", "ctrl";
71− interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
72− <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
73− interrupt-names = "g1", "g2";
74− clocks = <&clk IMX8MQ_CLK_VPU_G1_ROOT>,
75− <&clk IMX8MQ_CLK_VPU_G2_ROOT>,
76− <&clk IMX8MQ_CLK_VPU_DEC_ROOT>;
77− clock-names = "g1", "g2", "bus";
78− power-domains = <&pgc_vpu>;
63+ vpu_g2: video-codec@38300000 {
64+ compatible = "nxp,imx8mq-vpu-g2";
65+ reg = <0x38310000 0x10000>;
66+ interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
67+ clocks = <&clk IMX8MQ_CLK_VPU_G2_ROOT>;
68+ power-domains = <&vpu_blk_ctrl IMX8MQ_VPUBLK_PD_G2>;
7969 };
Documentation/devicetree/bindings/media/qcom,msm8916-camss.yaml+0−10
@@ -83,10 +83,6 @@ properties: · 82 unmodified lines
8383 unevaluatedProperties: false
8484
8585 properties:
86− clock-lanes:
87− items:
88− - const: 1
89−
9086 data-lanes:
9187 description:
9288 An array of physical data lanes indexes.
@@ -99,7 +95,6 @@ properties: · 6 unmodified lines
9995 maxItems: 4
10096
10197 required:
102− - clock-lanes
10398 - data-lanes
10499
105100 port@1:
@@ -114,16 +109,11 @@ properties: · 8 unmodified lines
114109 unevaluatedProperties: false
115110
116111 properties:
117− clock-lanes:
118− items:
119− - const: 1
120−
121112 data-lanes:
122113 minItems: 1
123114 maxItems: 4
124115
125116 required:
126− - clock-lanes
127117 - data-lanes
128118
129119 reg:
Documentation/devicetree/bindings/media/qcom,msm8996-camss.yaml+0−20
@@ -105,10 +105,6 @@ properties: · 104 unmodified lines
105105 unevaluatedProperties: false
106106
107107 properties:
108− clock-lanes:
109− items:
110− - const: 7
111−
112108 data-lanes:
113109 description:
114110 An array of physical data lanes indexes.
@@ -121,7 +117,6 @@ properties: · 6 unmodified lines
121117 maxItems: 4
122118
123119 required:
124− - clock-lanes
125120 - data-lanes
126121
127122 port@1:
@@ -136,16 +131,11 @@ properties: · 8 unmodified lines
136131 unevaluatedProperties: false
137132
138133 properties:
139− clock-lanes:
140− items:
141− - const: 7
142−
143134 data-lanes:
144135 minItems: 1
145136 maxItems: 4
146137
147138 required:
148− - clock-lanes
149139 - data-lanes
150140
151141 port@2:
@@ -160,16 +150,11 @@ properties: · 8 unmodified lines
160150 unevaluatedProperties: false
161151
162152 properties:
163− clock-lanes:
164− items:
165− - const: 7
166−
167153 data-lanes:
168154 minItems: 1
169155 maxItems: 4
170156
171157 required:
172− - clock-lanes
173158 - data-lanes
174159
175160 port@3:
@@ -184,16 +169,11 @@ properties: · 8 unmodified lines
184169 unevaluatedProperties: false
185170
186171 properties:
187− clock-lanes:
188− items:
189− - const: 7
190−
191172 data-lanes:
192173 minItems: 1
193174 maxItems: 4
194175
195176 required:
196− - clock-lanes
197177 - data-lanes
198178
199179 reg:
Documentation/devicetree/bindings/media/qcom,sdm660-camss.yaml+0−20
@@ -111,16 +111,11 @@ properties: · 110 unmodified lines
111111 unevaluatedProperties: false
112112
113113 properties:
114− clock-lanes:
115− items:
116− - const: 7
117−
118114 data-lanes:
119115 minItems: 1
120116 maxItems: 4
121117
122118 required:
123− - clock-lanes
124119 - data-lanes
125120
126121 port@1:
@@ -135,16 +130,11 @@ properties: · 8 unmodified lines
135130 unevaluatedProperties: false
136131
137132 properties:
138− clock-lanes:
139− items:
140− - const: 7
141−
142133 data-lanes:
143134 minItems: 1
144135 maxItems: 4
145136
146137 required:
147− - clock-lanes
148138 - data-lanes
149139
150140 port@2:
@@ -159,16 +149,11 @@ properties: · 8 unmodified lines
159149 unevaluatedProperties: false
160150
161151 properties:
162− clock-lanes:
163− items:
164− - const: 7
165−
166152 data-lanes:
167153 minItems: 1
168154 maxItems: 4
169155
170156 required:
171− - clock-lanes
172157 - data-lanes
173158
174159 port@3:
@@ -183,16 +168,11 @@ properties: · 8 unmodified lines
183168 unevaluatedProperties: false
184169
185170 properties:
186− clock-lanes:
187− items:
188− - const: 7
189−
190171 data-lanes:
191172 minItems: 1
192173 maxItems: 4
193174
194175 required:
195− - clock-lanes
196176 - data-lanes
197177
198178 reg:
Documentation/devicetree/bindings/media/qcom,sdm845-camss.yaml+10−21
@@ -105,15 +105,11 @@ properties: · 104 unmodified lines
105105 unevaluatedProperties: false
106106
107107 properties:
108− clock-lanes:
109− maxItems: 1
110−
111108 data-lanes:
112109 minItems: 1
113110 maxItems: 4
114111
115112 required:
116− - clock-lanes
117113 - data-lanes
118114
119115 port@1:
@@ -128,16 +124,11 @@ properties: · 8 unmodified lines
128124 unevaluatedProperties: false
129125
130126 properties:
131− clock-lanes:
132− items:
133− - const: 7
134−
135127 data-lanes:
136128 minItems: 1
137129 maxItems: 4
138130
139131 required:
140− - clock-lanes
141132 - data-lanes
142133
143134 port@2:
@@ -152,15 +143,11 @@ properties: · 8 unmodified lines
152143 unevaluatedProperties: false
153144
154145 properties:
155− clock-lanes:
156− maxItems: 1
157−
158146 data-lanes:
159147 minItems: 1
160148 maxItems: 4
161149
162150 required:
163− - clock-lanes
164151 - data-lanes
165152
166153 port@3:
@@ -175,15 +162,11 @@ properties: · 8 unmodified lines
175162 unevaluatedProperties: false
176163
177164 properties:
178− clock-lanes:
179− maxItems: 1
180−
181165 data-lanes:
182166 minItems: 1
183167 maxItems: 4
184168
185169 required:
186− - clock-lanes
187170 - data-lanes
188171
189172 reg:
@@ -203,9 +186,13 @@ properties: · 13 unmodified lines
203186 - const: vfe1
204187 - const: vfe_lite
205188
206− vdda-supply:
189+ vdda-phy-supply:
190+ description:
191+ Phandle to a regulator supply to PHY core block.
192+
193+ vdda-pll-supply:
207194 description:
208− Definition of the regulator used as analog power supply.
195+ Phandle to 1.8V regulator supply to PHY refclk pll block.
209196
210197 required:
211198 - clock-names
@@ -217,7 +204,8 @@ required: · 5 unmodified lines
217204 - power-domains
218205 - reg
219206 - reg-names
220− - vdda-supply
207+ - vdda-phy-supply
208+ - vdda-pll-supply
221209
222210 additionalProperties: false
223211
@@ -361,7 +349,8 @@ examples: · 137 unmodified lines
361349 "vfe1",
362350 "vfe_lite";
363351
364− vdda-supply = <&reg_2v8>;
352+ vdda-phy-supply = <&vreg_l1a_0p875>;
353+ vdda-pll-supply = <&vreg_l26a_1p2>;
365354
366355 ports {
367356 #address-cells = <1>;
Documentation/devicetree/bindings/media/qcom,sm8250-camss.yaml+463−0
@@ -0,0 +1,463 @@
1+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
3+%YAML 1.2
4+---
5+$id: "http://devicetree.org/schemas/media/qcom,sm8250-camss.yaml#"
6+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
7+
8+title: Qualcomm CAMSS ISP
9+
10+maintainers:
11+ - Robert Foss <robert.foss@linaro.org>
12+
13+description: |
14+ The CAMSS IP is a CSI decoder and ISP present on Qualcomm platforms.
15+
16+properties:
17+ compatible:
18+ const: qcom,sm8250-camss
19+
20+ clocks:
21+ minItems: 37
22+ maxItems: 37
23+
24+ clock-names:
25+ items:
26+ - const: cam_ahb_clk
27+ - const: cam_hf_axi
28+ - const: cam_sf_axi
29+ - const: camnoc_axi
30+ - const: camnoc_axi_src
31+ - const: core_ahb
32+ - const: cpas_ahb
33+ - const: csiphy0
34+ - const: csiphy0_timer
35+ - const: csiphy1
36+ - const: csiphy1_timer
37+ - const: csiphy2
38+ - const: csiphy2_timer
39+ - const: csiphy3
40+ - const: csiphy3_timer
41+ - const: csiphy4
42+ - const: csiphy4_timer
43+ - const: csiphy5
44+ - const: csiphy5_timer
45+ - const: slow_ahb_src
46+ - const: vfe0_ahb
47+ - const: vfe0_axi
48+ - const: vfe0
49+ - const: vfe0_cphy_rx
50+ - const: vfe0_csid
51+ - const: vfe0_areg
52+ - const: vfe1_ahb
53+ - const: vfe1_axi
54+ - const: vfe1
55+ - const: vfe1_cphy_rx
56+ - const: vfe1_csid
57+ - const: vfe1_areg
58+ - const: vfe_lite_ahb
59+ - const: vfe_lite_axi
60+ - const: vfe_lite
61+ - const: vfe_lite_cphy_rx
62+ - const: vfe_lite_csid
63+
64+ interrupts:
65+ minItems: 14
66+ maxItems: 14
67+
68+ interrupt-names:
69+ items:
70+ - const: csiphy0
71+ - const: csiphy1
72+ - const: csiphy2
73+ - const: csiphy3
74+ - const: csiphy4
75+ - const: csiphy5
76+ - const: csid0
77+ - const: csid1
78+ - const: csid2
79+ - const: csid3
80+ - const: vfe0
81+ - const: vfe1
82+ - const: vfe_lite0
83+ - const: vfe_lite1
84+
85+ iommus:
86+ minItems: 8
87+ maxItems: 8
88+
89+ interconnects:
90+ minItems: 4
91+ maxItems: 4
92+
93+ interconnect-names:
94+ items:
95+ - const: cam_ahb
96+ - const: cam_hf_0_mnoc
97+ - const: cam_sf_0_mnoc
98+ - const: cam_sf_icp_mnoc
99+
100+ power-domains:
101+ items:
102+ - description: IFE0 GDSC - Image Front End, Global Distributed Switch Controller.
103+ - description: IFE1 GDSC - Image Front End, Global Distributed Switch Controller.
104+ - description: Titan GDSC - Titan ISP Block, Global Distributed Switch Controller.
105+
106+ ports:
107+ $ref: /schemas/graph.yaml#/properties/ports
108+
109+ description:
110+ CSI input ports.
111+
112+ properties:
113+ port@0:
114+ $ref: /schemas/graph.yaml#/$defs/port-base
115+ unevaluatedProperties: false
116+ description:
117+ Input port for receiving CSI data.
118+
119+ properties:
120+ endpoint:
121+ $ref: video-interfaces.yaml#
122+ unevaluatedProperties: false
123+
124+ properties:
125+ clock-lanes:
126+ maxItems: 1
127+
128+ data-lanes:
129+ minItems: 1
130+ maxItems: 4
131+
132+ required:
133+ - clock-lanes
134+ - data-lanes
135+
136+ port@1:
137+ $ref: /schemas/graph.yaml#/$defs/port-base
138+ unevaluatedProperties: false
139+ description:
140+ Input port for receiving CSI data.
141+
142+ properties:
143+ endpoint:
144+ $ref: video-interfaces.yaml#
145+ unevaluatedProperties: false
146+
147+ properties:
148+ clock-lanes:
149+ maxItems: 1
150+
151+ data-lanes:
152+ minItems: 1
153+ maxItems: 4
154+
155+ required:
156+ - clock-lanes
157+ - data-lanes
158+
159+ port@2:
160+ $ref: /schemas/graph.yaml#/$defs/port-base
161+ unevaluatedProperties: false
162+ description:
163+ Input port for receiving CSI data.
164+
165+ properties:
166+ endpoint:
167+ $ref: video-interfaces.yaml#
168+ unevaluatedProperties: false
169+
170+ properties:
171+ clock-lanes:
172+ maxItems: 1
173+
174+ data-lanes:
175+ minItems: 1
176+ maxItems: 4
177+
178+ required:
179+ - clock-lanes
180+ - data-lanes
181+
182+ port@3:
183+ $ref: /schemas/graph.yaml#/$defs/port-base
184+ unevaluatedProperties: false
185+ description:
186+ Input port for receiving CSI data.
187+
188+ properties:
189+ endpoint:
190+ $ref: video-interfaces.yaml#
191+ unevaluatedProperties: false
192+
193+ properties:
194+ clock-lanes:
195+ maxItems: 1
196+
197+ data-lanes:
198+ minItems: 1
199+ maxItems: 4
200+
201+ required:
202+ - clock-lanes
203+ - data-lanes
204+
205+ port@4:
206+ $ref: /schemas/graph.yaml#/$defs/port-base
207+ unevaluatedProperties: false
208+ description:
209+ Input port for receiving CSI data.
210+
211+ properties:
212+ endpoint:
213+ $ref: video-interfaces.yaml#
214+ unevaluatedProperties: false
215+
216+ properties:
217+ clock-lanes:
218+ maxItems: 1
219+
220+ data-lanes:
221+ minItems: 1
222+ maxItems: 4
223+
224+ required:
225+ - clock-lanes
226+ - data-lanes
227+
228+ port@5:
229+ $ref: /schemas/graph.yaml#/$defs/port-base
230+ unevaluatedProperties: false
231+ description:
232+ Input port for receiving CSI data.
233+
234+ properties:
235+ endpoint:
236+ $ref: video-interfaces.yaml#
237+ unevaluatedProperties: false
238+
239+ properties:
240+ clock-lanes:
241+ maxItems: 1
242+
243+ data-lanes:
244+ minItems: 1
245+ maxItems: 4
246+
247+ required:
248+ - clock-lanes
249+ - data-lanes
250+
251+ reg:
252+ minItems: 10
253+ maxItems: 10
254+
255+ reg-names:
256+ items:
257+ - const: csiphy0
258+ - const: csiphy1
259+ - const: csiphy2
260+ - const: csiphy3
261+ - const: csiphy4
262+ - const: csiphy5
263+ - const: vfe0
264+ - const: vfe1
265+ - const: vfe_lite0
266+ - const: vfe_lite1
267+
268+ vdda-phy-supply:
269+ description:
270+ Phandle to a regulator supply to PHY core block.
271+
272+ vdda-pll-supply:
273+ description:
274+ Phandle to 1.8V regulator supply to PHY refclk pll block.
275+
276+required:
277+ - clock-names
278+ - clocks
279+ - compatible
280+ - interconnects
281+ - interconnect-names
282+ - interrupts
283+ - interrupt-names
284+ - iommus
285+ - power-domains
286+ - reg
287+ - reg-names
288+ - vdda-phy-supply
289+ - vdda-pll-supply
290+
291+additionalProperties: false
292+
293+examples:
294+ - |
295+ #include <dt-bindings/interrupt-controller/arm-gic.h>
296+ #include <dt-bindings/clock/qcom,camcc-sm8250.h>
297+ #include <dt-bindings/interconnect/qcom,sm8250.h>
298+ #include <dt-bindings/clock/qcom,gcc-sm8250.h>
299+ #include <dt-bindings/power/qcom-rpmpd.h>
300+
301+ soc {
302+ #address-cells = <2>;
303+ #size-cells = <2>;
304+
305+ camss: camss@ac6a000 {
306+ compatible = "qcom,sm8250-camss";
307+
308+ reg = <0 0xac6a000 0 0x2000>,
309+ <0 0xac6c000 0 0x2000>,
310+ <0 0xac6e000 0 0x1000>,
311+ <0 0xac70000 0 0x1000>,
312+ <0 0xac72000 0 0x1000>,
313+ <0 0xac74000 0 0x1000>,
314+ <0 0xacb4000 0 0xd000>,
315+ <0 0xacc3000 0 0xd000>,
316+ <0 0xacd9000 0 0x2200>,
317+ <0 0xacdb200 0 0x2200>;
318+ reg-names = "csiphy0",
319+ "csiphy1",
320+ "csiphy2",
321+ "csiphy3",
322+ "csiphy4",
323+ "csiphy5",
324+ "vfe0",
325+ "vfe1",
326+ "vfe_lite0",
327+ "vfe_lite1";
328+
329+ vdda-phy-supply = <&vreg_l5a_0p88>;
330+ vdda-pll-supply = <&vreg_l9a_1p2>;
331+
332+ interrupts = <GIC_SPI 477 IRQ_TYPE_LEVEL_HIGH>,
333+ <GIC_SPI 478 IRQ_TYPE_LEVEL_HIGH>,
334+ <GIC_SPI 479 IRQ_TYPE_LEVEL_HIGH>,
335+ <GIC_SPI 448 IRQ_TYPE_LEVEL_HIGH>,
336+ <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>,
337+ <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>,
338+ <GIC_SPI 464 IRQ_TYPE_LEVEL_HIGH>,
339+ <GIC_SPI 466 IRQ_TYPE_LEVEL_HIGH>,
340+ <GIC_SPI 468 IRQ_TYPE_LEVEL_HIGH>,
341+ <GIC_SPI 359 IRQ_TYPE_LEVEL_HIGH>,
342+ <GIC_SPI 465 IRQ_TYPE_LEVEL_HIGH>,
343+ <GIC_SPI 467 IRQ_TYPE_LEVEL_HIGH>,
344+ <GIC_SPI 469 IRQ_TYPE_LEVEL_HIGH>,
345+ <GIC_SPI 360 IRQ_TYPE_LEVEL_HIGH>;
346+ interrupt-names = "csiphy0",
347+ "csiphy1",
348+ "csiphy2",
349+ "csiphy3",
350+ "csiphy4",
351+ "csiphy5",
352+ "csid0",
353+ "csid1",
354+ "csid2",
355+ "csid3",
356+ "vfe0",
357+ "vfe1",
358+ "vfe_lite0",
359+ "vfe_lite1";
360+
361+ power-domains = <&camcc IFE_0_GDSC>,
362+ <&camcc IFE_1_GDSC>,
363+ <&camcc TITAN_TOP_GDSC>;
364+
365+ clocks = <&gcc GCC_CAMERA_AHB_CLK>,
366+ <&gcc GCC_CAMERA_HF_AXI_CLK>,
367+ <&gcc GCC_CAMERA_SF_AXI_CLK>,
368+ <&camcc CAM_CC_CAMNOC_AXI_CLK>,
369+ <&camcc CAM_CC_CAMNOC_AXI_CLK_SRC>,
370+ <&camcc CAM_CC_CORE_AHB_CLK>,
371+ <&camcc CAM_CC_CPAS_AHB_CLK>,
372+ <&camcc CAM_CC_CSIPHY0_CLK>,
373+ <&camcc CAM_CC_CSI0PHYTIMER_CLK>,
374+ <&camcc CAM_CC_CSIPHY1_CLK>,
375+ <&camcc CAM_CC_CSI1PHYTIMER_CLK>,
376+ <&camcc CAM_CC_CSIPHY2_CLK>,
377+ <&camcc CAM_CC_CSI2PHYTIMER_CLK>,
378+ <&camcc CAM_CC_CSIPHY3_CLK>,
379+ <&camcc CAM_CC_CSI3PHYTIMER_CLK>,
380+ <&camcc CAM_CC_CSIPHY4_CLK>,
381+ <&camcc CAM_CC_CSI4PHYTIMER_CLK>,
382+ <&camcc CAM_CC_CSIPHY5_CLK>,
383+ <&camcc CAM_CC_CSI5PHYTIMER_CLK>,
384+ <&camcc CAM_CC_SLOW_AHB_CLK_SRC>,
385+ <&camcc CAM_CC_IFE_0_AHB_CLK>,
386+ <&camcc CAM_CC_IFE_0_AXI_CLK>,
387+ <&camcc CAM_CC_IFE_0_CLK>,
388+ <&camcc CAM_CC_IFE_0_CPHY_RX_CLK>,
389+ <&camcc CAM_CC_IFE_0_CSID_CLK>,
390+ <&camcc CAM_CC_IFE_0_AREG_CLK>,
391+ <&camcc CAM_CC_IFE_1_AHB_CLK>,
392+ <&camcc CAM_CC_IFE_1_AXI_CLK>,
393+ <&camcc CAM_CC_IFE_1_CLK>,
394+ <&camcc CAM_CC_IFE_1_CPHY_RX_CLK>,
395+ <&camcc CAM_CC_IFE_1_CSID_CLK>,
396+ <&camcc CAM_CC_IFE_1_AREG_CLK>,
397+ <&camcc CAM_CC_IFE_LITE_AHB_CLK>,
398+ <&camcc CAM_CC_IFE_LITE_AXI_CLK>,
399+ <&camcc CAM_CC_IFE_LITE_CLK>,
400+ <&camcc CAM_CC_IFE_LITE_CPHY_RX_CLK>,
401+ <&camcc CAM_CC_IFE_LITE_CSID_CLK>;
402+ clock-names = "cam_ahb_clk",
403+ "cam_hf_axi",
404+ "cam_sf_axi",
405+ "camnoc_axi",
406+ "camnoc_axi_src",
407+ "core_ahb",
408+ "cpas_ahb",
409+ "csiphy0",
410+ "csiphy0_timer",
411+ "csiphy1",
412+ "csiphy1_timer",
413+ "csiphy2",
414+ "csiphy2_timer",
415+ "csiphy3",
416+ "csiphy3_timer",
417+ "csiphy4",
418+ "csiphy4_timer",
419+ "csiphy5",
420+ "csiphy5_timer",
421+ "slow_ahb_src",
422+ "vfe0_ahb",
423+ "vfe0_axi",
424+ "vfe0",
425+ "vfe0_cphy_rx",
426+ "vfe0_csid",
427+ "vfe0_areg",
428+ "vfe1_ahb",
429+ "vfe1_axi",
430+ "vfe1",
431+ "vfe1_cphy_rx",
432+ "vfe1_csid",
433+ "vfe1_areg",
434+ "vfe_lite_ahb",
435+ "vfe_lite_axi",
436+ "vfe_lite",
437+ "vfe_lite_cphy_rx",
438+ "vfe_lite_csid";
439+
440+ iommus = <&apps_smmu 0x800 0x400>,
441+ <&apps_smmu 0x801 0x400>,
442+ <&apps_smmu 0x840 0x400>,
443+ <&apps_smmu 0x841 0x400>,
444+ <&apps_smmu 0xC00 0x400>,
445+ <&apps_smmu 0xC01 0x400>,
446+ <&apps_smmu 0xC40 0x400>,
447+ <&apps_smmu 0xC41 0x400>;
448+
449+ interconnects = <&gem_noc MASTER_AMPSS_M0 &config_noc SLAVE_CAMERA_CFG>,
450+ <&mmss_noc MASTER_CAMNOC_HF &mc_virt SLAVE_EBI_CH0>,
451+ <&mmss_noc MASTER_CAMNOC_SF &mc_virt SLAVE_EBI_CH0>,
452+ <&mmss_noc MASTER_CAMNOC_ICP &mc_virt SLAVE_EBI_CH0>;
453+ interconnect-names = "cam_ahb",
454+ "cam_hf_0_mnoc",
455+ "cam_sf_0_mnoc",
456+ "cam_sf_icp_mnoc";
457+
458+ ports {
459+ #address-cells = <1>;
460+ #size-cells = <0>;
461+ };
462+ };
463+ };
Documentation/devicetree/bindings/media/renesas,csi2.yaml+4−1
@@ -67,7 +67,10 @@ properties: · 66 unmodified lines
6767 maxItems: 1
6868
6969 data-lanes:
70− maxItems: 1
70+ minItems: 1
71+ maxItems: 4
72+ items:
73+ maximum: 4
7174
7275 required:
7376 - clock-lanes
Documentation/driver-api/media/drivers/davinci-vpbe-devel.rst+10−10
@@ -7,22 +7,22 @@ File partitioning · 6 unmodified lines
77 -----------------
88
99 V4L2 display device driver
10− drivers/media/platform/davinci/vpbe_display.c
11− drivers/media/platform/davinci/vpbe_display.h
10+ drivers/media/platform/ti/davinci/vpbe_display.c
11+ drivers/media/platform/ti/davinci/vpbe_display.h
1212
1313 VPBE display controller
14− drivers/media/platform/davinci/vpbe.c
15− drivers/media/platform/davinci/vpbe.h
14+ drivers/media/platform/ti/davinci/vpbe.c
15+ drivers/media/platform/ti/davinci/vpbe.h
1616
1717 VPBE venc sub device driver
18− drivers/media/platform/davinci/vpbe_venc.c
19− drivers/media/platform/davinci/vpbe_venc.h
20− drivers/media/platform/davinci/vpbe_venc_regs.h
18+ drivers/media/platform/ti/davinci/vpbe_venc.c
19+ drivers/media/platform/ti/davinci/vpbe_venc.h
20+ drivers/media/platform/ti/davinci/vpbe_venc_regs.h
2121
2222 VPBE osd driver
23− drivers/media/platform/davinci/vpbe_osd.c
24− drivers/media/platform/davinci/vpbe_osd.h
25− drivers/media/platform/davinci/vpbe_osd_regs.h
23+ drivers/media/platform/ti/davinci/vpbe_osd.c
24+ drivers/media/platform/ti/davinci/vpbe_osd.h
25+ drivers/media/platform/ti/davinci/vpbe_osd_regs.h
2626
2727 To be done
2828 ----------
Documentation/driver-api/media/drivers/fimc-devel.rst+7−7
@@ -12,22 +12,22 @@ Files partitioning · 11 unmodified lines
1212
1313 - media device driver
1414
15− drivers/media/platform/exynos4-is/media-dev.[ch]
15+ drivers/media/platform/samsung/exynos4-is/media-dev.[ch]
1616
1717 - camera capture video device driver
1818
19− drivers/media/platform/exynos4-is/fimc-capture.c
19+ drivers/media/platform/samsung/exynos4-is/fimc-capture.c
2020
2121 - MIPI-CSI2 receiver subdev
2222
23− drivers/media/platform/exynos4-is/mipi-csis.[ch]
23+ drivers/media/platform/samsung/exynos4-is/mipi-csis.[ch]
2424
2525 - video post-processor (mem-to-mem)
2626
27− drivers/media/platform/exynos4-is/fimc-core.c
27+ drivers/media/platform/samsung/exynos4-is/fimc-core.c
2828
2929 - common files
3030
31− drivers/media/platform/exynos4-is/fimc-core.h
32− drivers/media/platform/exynos4-is/fimc-reg.h
33− drivers/media/platform/exynos4-is/regs-fimc.h
31+ drivers/media/platform/samsung/exynos4-is/fimc-core.h
32+ drivers/media/platform/samsung/exynos4-is/fimc-reg.h
33+ drivers/media/platform/samsung/exynos4-is/regs-fimc.h
Documentation/driver-api/media/v4l2-event.rst+1−1
@@ -167,7 +167,7 @@ The first event type in the class is reserved for future use, so the first · 166 unmodified lines
167167 available event type is 'class base + 1'.
168168
169169 An example on how the V4L2 events may be used can be found in the OMAP
170−3 ISP driver (``drivers/media/platform/omap3isp``).
170+3 ISP driver (``drivers/media/platform/ti/omap3isp``).
171171
172172 A subdev can directly send an event to the :c:type:`v4l2_device` notify
173173 function with ``V4L2_DEVICE_NOTIFY_EVENT``. This allows the bridge to map
Documentation/userspace-api/media/lirc.h.rst.exceptions+3−1
@@ -11,12 +11,14 @@ ignore define LIRC_SPACE · 10 unmodified lines
1111 ignore define LIRC_PULSE
1212 ignore define LIRC_FREQUENCY
1313 ignore define LIRC_TIMEOUT
14+ignore define LIRC_OVERFLOW
1415 ignore define LIRC_VALUE
1516 ignore define LIRC_MODE2
1617 ignore define LIRC_IS_SPACE
1718 ignore define LIRC_IS_PULSE
1819 ignore define LIRC_IS_FREQUENCY
1920 ignore define LIRC_IS_TIMEOUT
21+ignore define LIRC_IS_OVERFLOW
2022
2123 ignore define LIRC_MODE2SEND
2224 ignore define LIRC_SEND2MODE
@@ -28,7 +30,6 @@ ignore define LIRC_CAN_REC · 5 unmodified lines
2830
2931 ignore define LIRC_CAN_SEND_MASK
3032 ignore define LIRC_CAN_REC_MASK
31−ignore define LIRC_CAN_SET_REC_DUTY_CYCLE
3233
3334 # Obsolete ioctls
3435
@@ -75,6 +76,7 @@ ignore define PULSE_MASK · 40 unmodified lines
7576 ignore define LIRC_MODE2_SPACE
7677 ignore define LIRC_MODE2_PULSE
7778 ignore define LIRC_MODE2_TIMEOUT
79+ignore define LIRC_MODE2_OVERFLOW
7880
7981 ignore define LIRC_VALUE_MASK
8082 ignore define LIRC_MODE2_MASK
Documentation/userspace-api/media/rc/lirc-dev-intro.rst+9−2
@@ -103,11 +103,11 @@ on the following table. · 102 unmodified lines
103103
104104 ``LIRC_MODE2_PULSE``
105105
106− Signifies the presence of IR in microseconds.
106+ Signifies the presence of IR in microseconds, also known as *flash*.
107107
108108 ``LIRC_MODE2_SPACE``
109109
110− Signifies absence of IR in microseconds.
110+ Signifies absence of IR in microseconds, also known as *gap*.
111111
112112 ``LIRC_MODE2_FREQUENCY``
113113
@@ -121,6 +121,13 @@ on the following table. · 7 unmodified lines
121121 to no IR being detected, this packet will be sent, with the number
122122 of microseconds with no IR.
123123
124+ ``LIRC_MODE2_OVERFLOW``
125+
126+ Signifies that the IR receiver encounter an overflow, and some IR
127+ is missing. The IR data after this should be correct again. The
128+ actual value is not important, but this is set to 0xffffff by the
129+ kernel for compatibility with lircd.
130+
124131 .. _lirc-mode-pulse:
125132
126133 ``LIRC_MODE_PULSE``
Documentation/userspace-api/media/rc/lirc-get-features.rst+0−18
@@ -102,12 +102,6 @@ LIRC features · 101 unmodified lines
102102 The driver supports setting the receive carrier frequency using
103103 :ref:`ioctl LIRC_SET_REC_CARRIER <LIRC_SET_REC_CARRIER>`.
104104
105−.. _LIRC-CAN-SET-REC-DUTY-CYCLE-RANGE:
106−
107−``LIRC_CAN_SET_REC_DUTY_CYCLE_RANGE``
108−
109− Unused. Kept just to avoid breaking uAPI.
110−
111105 .. _LIRC-CAN-SET-REC-CARRIER-RANGE:
112106
113107 ``LIRC_CAN_SET_REC_CARRIER_RANGE``
@@ -129,12 +123,6 @@ LIRC features · 15 unmodified lines
129123 The driver supports
130124 :ref:`ioctl LIRC_SET_REC_TIMEOUT <LIRC_SET_REC_TIMEOUT>`.
131125
132−.. _LIRC-CAN-SET-REC-FILTER:
133−
134−``LIRC_CAN_SET_REC_FILTER``
135−
136− Unused. Kept just to avoid breaking uAPI.
137−
138126 .. _LIRC-CAN-MEASURE-CARRIER:
139127
140128 ``LIRC_CAN_MEASURE_CARRIER``
@@ -149,12 +137,6 @@ LIRC features · 8 unmodified lines
149137 The driver supports learning mode using
150138 :ref:`ioctl LIRC_SET_WIDEBAND_RECEIVER <LIRC_SET_WIDEBAND_RECEIVER>`.
151139
152−.. _LIRC-CAN-NOTIFY-DECODE:
153−
154−``LIRC_CAN_NOTIFY_DECODE``
155−
156− Unused. Kept just to avoid breaking uAPI.
157−
158140 .. _LIRC-CAN-SEND-RAW:
159141
160142 ``LIRC_CAN_SEND_RAW``
Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst+12−1
@@ -616,6 +616,12 @@ Stateless Codec Control ID · 615 unmodified lines
616616 * - ``V4L2_H264_DECODE_PARAM_FLAG_BOTTOM_FIELD``
617617 - 0x00000004
618618 -
619+ * - ``V4L2_H264_DECODE_PARAM_FLAG_PFRAME``
620+ - 0x00000008
621+ -
622+ * - ``V4L2_H264_DECODE_PARAM_FLAG_BFRAME``
623+ - 0x00000010
624+ -
619625
620626 .. raw:: latex
621627
@@ -1692,7 +1698,12 @@ See section '7.3.1 Tx mode semantics' of the :ref:`vp9` specification for more d · 1070 unmodified lines
16921698 * - __u8
16931699 - ``reference_mode``
16941700 - Specifies the type of inter prediction to be used. See
1695− :ref:`Reference Mode<vp9_reference_mode>` for more details.
1701+ :ref:`Reference Mode<vp9_reference_mode>` for more details. Note that
1702+ this is derived as part of the compressed header parsing process and
1703+ for this reason should have been part of
1704+ :c:type: `v4l2_ctrl_vp9_compressed_hdr` optional control. It is safe to
1705+ set this value to zero if the driver does not require compressed
1706+ headers.
16961707 * - __u8
16971708 - ``reserved[7]``
16981709 - Applications and drivers must set this to zero.
Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst+8−8
@@ -3166,11 +3166,11 @@ enum v4l2_mpeg_video_hevc_size_of_length_field - · 3165 unmodified lines
31663166 :c:func:`v4l2_timeval_to_ns()` function to convert the struct
31673167 :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
31683168 * - __u8
3169− - ``rps``
3170− - The reference set for the reference frame
3171− (V4L2_HEVC_DPB_ENTRY_RPS_ST_CURR_BEFORE,
3172− V4L2_HEVC_DPB_ENTRY_RPS_ST_CURR_AFTER or
3173− V4L2_HEVC_DPB_ENTRY_RPS_LT_CURR)
3169+ - ``flags``
3170+ - Long term flag for the reference frame
3171+ (V4L2_HEVC_DPB_ENTRY_LONG_TERM_REFERENCE). The flag is set as
3172+ described in the ITU HEVC specification chapter "8.3.2 Decoding
3173+ process for reference picture set".
31743174 * - __u8
31753175 - ``field_pic``
31763176 - Whether the reference is a field picture or a frame.
@@ -3383,15 +3383,15 @@ enum v4l2_mpeg_video_hevc_size_of_length_field - · 206 unmodified lines
33833383 * - __u8
33843384 - ``poc_st_curr_before[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
33853385 - PocStCurrBefore as described in section 8.3.2 "Decoding process for reference
3386− picture set.
3386+ picture set": provides the index of the short term before references in DPB array.
33873387 * - __u8
33883388 - ``poc_st_curr_after[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
33893389 - PocStCurrAfter as described in section 8.3.2 "Decoding process for reference
3390− picture set.
3390+ picture set": provides the index of the short term after references in DPB array.
33913391 * - __u8
33923392 - ``poc_lt_curr[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
33933393 - PocLtCurr as described in section 8.3.2 "Decoding process for reference
3394− picture set.
3394+ picture set": provides the index of the long term references in DPB array.
33953395 * - __u64
33963396 - ``flags``
33973397 - See :ref:`Decode Parameters Flags <hevc_decode_params_flags>`
Documentation/userspace-api/media/v4l/pixfmt-reserved.rst+4−11
@@ -233,19 +233,12 @@ please make a proposal on the linux-media mailing list. · 232 unmodified lines
233233
234234 - ``V4L2_PIX_FMT_MT21C``
235235 - 'MT21'
236− - Compressed two-planar YVU420 format used by Mediatek MT8173.
237− The compression is lossless.
238− It is an opaque intermediate format and the MDP hardware must be
236+ - Compressed two-planar YVU420 format used by Mediatek MT8173, MT8192,
237+ MT8195 and more. The compression is lossless. This format have
238+ similitude with ``V4L2_PIX_FMT_MM21`` in term of alignment and tiling.
239+ It remains an opaque intermediate format and the MDP hardware must be
239240 used to convert ``V4L2_PIX_FMT_MT21C`` to ``V4L2_PIX_FMT_NV12M``,
240241 ``V4L2_PIX_FMT_YUV420M`` or ``V4L2_PIX_FMT_YVU420``.
241− * .. _V4L2-PIX-FMT-MM21:
242−
243− - ``V4L2_PIX_FMT_MM21``
244− - 'MM21'
245− - Non-compressed, tiled two-planar format used by Mediatek MT8183.
246− This is an opaque intermediate format and the MDP3 hardware can be
247− used to convert it to other formats.
248−
249242 .. raw:: latex
250243
251244 \normalsize
Documentation/userspace-api/media/v4l/pixfmt-rgb.rst+1−1
@@ -672,8 +672,8 @@ nomenclature that instead use the order of components as seen in a 24- or · 671 unmodified lines
672672 - ``V4L2_PIX_FMT_BGR24``
673673 - 'BGR3'
674674
675− - G\ :sub:`7-0`
676675 - B\ :sub:`7-0`
676+ - G\ :sub:`7-0`
677677 - R\ :sub:`7-0`
678678 -
679679 * .. _V4L2-PIX-FMT-RGB24:
Documentation/userspace-api/media/v4l/pixfmt-yuv-luma.rst+2−2
@@ -75,8 +75,8 @@ are often referred to as greyscale formats. · 74 unmodified lines
7575 - ``V4L2_PIX_FMT_Y10P``
7676 - 'Y10P'
7777
78− - Y'\ :sub:`0`\ [7:0]
79− - Y'\ :sub:`1`\ [9:8]
78+ - Y'\ :sub:`0`\ [9:2]
79+ - Y'\ :sub:`1`\ [9:2]
8080 - Y'\ :sub:`2`\ [9:2]
8181 - Y'\ :sub:`3`\ [9:2]
8282 - Y'\ :sub:`3`\ [1:0] Y'\ :sub:`2`\ [1:0] Y'\ :sub:`1`\ [1:0] Y'\ :sub:`0`\ [1:0]
Documentation/userspace-api/media/v4l/pixfmt-yuv-planar.rst+37−8
@@ -76,7 +76,7 @@ All components are stored with the same number of bits per component. · 75 unmodified lines
7676 - 'NV21'
7777 - 8
7878 - 4:2:0
79− - Cr, Cr
79+ - Cr, Cb
8080 - Yes
8181 - Linear
8282 * - V4L2_PIX_FMT_NV12M
@@ -90,7 +90,7 @@ All components are stored with the same number of bits per component. · 7 unmodified lines
9090 - 'NM21'
9191 - 8
9292 - 4:2:0
93− - Cr, Cr
93+ - Cr, Cb
9494 - No
9595 - Linear
9696 * - V4L2_PIX_FMT_NV12MT
@@ -120,7 +120,7 @@ All components are stored with the same number of bits per component. · 23 unmodified lines
120120 - 'NV61'
121121 - 8
122122 - 4:2:2
123− - Cr, Cr
123+ - Cr, Cb
124124 - Yes
125125 - Linear
126126 * - V4L2_PIX_FMT_NV16M
@@ -134,7 +134,7 @@ All components are stored with the same number of bits per component. · 7 unmodified lines
134134 - 'NM61'
135135 - 8
136136 - 4:2:2
137− - Cr, Cr
137+ - Cr, Cb
138138 - No
139139 - Linear
140140 * - V4L2_PIX_FMT_NV24
@@ -148,7 +148,7 @@ All components are stored with the same number of bits per component. · 7 unmodified lines
148148 - 'NV42'
149149 - 8
150150 - 4:4:4
151− - Cr, Cr
151+ - Cr, Cb
152152 - Yes
153153 - Linear
154154
@@ -257,6 +257,9 @@ of the luma plane. · 102 unmodified lines
257257 .. _V4L2-PIX-FMT-NV12-4L4:
258258 .. _V4L2-PIX-FMT-NV12-16L16:
259259 .. _V4L2-PIX-FMT-NV12-32L32:
260+.. _V4L2-PIX-FMT-NV12M-8L128:
261+.. _V4L2-PIX-FMT-NV12M-10BE-8L128:
262+.. _V4L2-PIX-FMT-MM21:
260263
261264 Tiled NV12
262265 ----------
@@ -281,21 +284,47 @@ If the vertical resolution is an odd number of tiles, the last row of · 18 unmodified lines
281284 tiles is stored in linear order. The layouts of the luma and chroma
282285 planes are identical.
283286
284−``V4L2_PIX_FMT_NV12_4L4`` stores pixel in 4x4 tiles, and stores
287+``V4L2_PIX_FMT_NV12_4L4`` stores pixels in 4x4 tiles, and stores
285288 tiles linearly in memory. The line stride and image height must be
286289 aligned to a multiple of 4. The layouts of the luma and chroma planes are
287290 identical.
288291
289−``V4L2_PIX_FMT_NV12_16L16`` stores pixel in 16x16 tiles, and stores
292+``V4L2_PIX_FMT_NV12_16L16`` stores pixels in 16x16 tiles, and stores
290293 tiles linearly in memory. The line stride and image height must be
291294 aligned to a multiple of 16. The layouts of the luma and chroma planes are
292295 identical.
293296
294−``V4L2_PIX_FMT_NV12_32L32`` stores pixel in 32x32 tiles, and stores
297+``V4L2_PIX_FMT_NV12_32L32`` stores pixels in 32x32 tiles, and stores
295298 tiles linearly in memory. The line stride and image height must be
296299 aligned to a multiple of 32. The layouts of the luma and chroma planes are
297300 identical.
298301
302+``V4L2_PIX_FMT_NV12M_8L128`` is similar to ``V4L2_PIX_FMT_NV12M`` but stores
303+pixels in 2D 8x128 tiles, and stores tiles linearly in memory.
304+The image height must be aligned to a multiple of 128.
305+The layouts of the luma and chroma planes are identical.
306+
307+``V4L2_PIX_FMT_NV12M_10BE_8L128`` is similar to ``V4L2_PIX_FMT_NV12M`` but stores
308+10 bits pixels in 2D 8x128 tiles, and stores tiles linearly in memory.
309+the data is arranged in big endian order.
310+The image height must be aligned to a multiple of 128.
311+The layouts of the luma and chroma planes are identical.
312+Note the tile size is 8bytes multiplied by 128 bytes,
313+it means that the low bits and high bits of one pixel may be in different tiles.
314+The 10 bit pixels are packed, so 5 bytes contain 4 10-bit pixels layout like
315+this (for luma):
316+byte 0: Y0(bits 9-2)
317+byte 1: Y0(bits 1-0) Y1(bits 9-4)
318+byte 2: Y1(bits 3-0) Y2(bits 9-6)
319+byte 3: Y2(bits 5-0) Y3(bits 9-8)
320+byte 4: Y3(bits 7-0)
321+
322+``V4L2_PIX_FMT_MM21`` store luma pixel in 16x32 tiles, and chroma pixels
323+in 16x16 tiles. The line stride must be aligned to a multiple of 16 and the
324+image height must be aligned to a multiple of 32. The number of luma and chroma
325+tiles are identical, even though the tile size differ. The image is formed of
326+two non-contiguous planes.
327+
299328 .. _nv12mt:
300329
301330 .. kernel-figure:: nv12mt.svg
Documentation/userspace-api/media/v4l/v4l2grab.c.rst+1−1
@@ -134,7 +134,7 @@ file: media/v4l/v4l2grab.c · 133 unmodified lines
134134 tv.tv_usec = 0;
135135
136136 r = select(fd + 1, &fds, NULL, NULL, &tv);
137− } while ((r == -1 && (errno = EINTR)));
137+ } while ((r == -1 && (errno == EINTR)));
138138 if (r == -1) {
139139 perror("select");
140140 return errno;
Documentation/userspace-api/media/v4l/vidioc-qbuf.rst+1−1
@@ -125,7 +125,7 @@ Applications call the ``VIDIOC_DQBUF`` ioctl to dequeue a filled · 124 unmodified lines
125125 queue. They just set the ``type``, ``memory`` and ``reserved`` fields of
126126 a struct :c:type:`v4l2_buffer` as above, when
127127 ``VIDIOC_DQBUF`` is called with a pointer to this structure the driver
128−fills the remaining fields or returns an error code. The driver may also
128+fills all remaining fields or returns an error code. The driver may also
129129 set ``V4L2_BUF_FLAG_ERROR`` in the ``flags`` field. It indicates a
130130 non-critical (recoverable) streaming error. In such case the application
131131 may continue as normal, but should be aware that data in the dequeued
MAINTAINERS+88−47
@@ -1032,6 +1032,15 @@ S: Maintained · 1031 unmodified lines
10321032 F: Documentation/hid/amd-sfh*
10331033 F: drivers/hid/amd-sfh-hid/
10341034
1035+AMPHION VPU CODEC V4L2 DRIVER
1036+M: Ming Qian <ming.qian@nxp.com>
1037+M: Shijie Qin <shijie.qin@nxp.com>
1038+M: Zhou Peng <eagle.zhou@nxp.com>
1039+L: linux-media@vger.kernel.org
1040+S: Maintained
1041+F: Documentation/devicetree/bindings/media/amphion,vpu.yaml
1042+F: drivers/media/platform/amphion/
1043+
10351044 AMS AS73211 DRIVER
10361045 M: Christian Eggers <ceggers@arri.de>
10371046 L: linux-iio@vger.kernel.org
@@ -2615,7 +2624,7 @@ M: Łukasz Stelmach <l.stelmach@samsung.com> · 1577 unmodified lines
26152624 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
26162625 L: linux-media@vger.kernel.org
26172626 S: Maintained
2618−F: drivers/media/platform/s5p-g2d/
2627+F: drivers/media/platform/samsung/s5p-g2d/
26192628
26202629 ARM/SAMSUNG S5P SERIES HDMI CEC SUBSYSTEM SUPPORT
26212630 M: Marek Szyprowski <m.szyprowski@samsung.com>
@@ -2632,7 +2641,7 @@ M: Sylwester Nawrocki <s.nawrocki@samsung.com> · 10 unmodified lines
26322641 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
26332642 L: linux-media@vger.kernel.org
26342643 S: Maintained
2635−F: drivers/media/platform/s5p-jpeg/
2644+F: drivers/media/platform/samsung/s5p-jpeg/
26362645
26372646 ARM/SAMSUNG S5P SERIES Multi Format Codec (MFC) SUPPORT
26382647 M: Marek Szyprowski <m.szyprowski@samsung.com>
@@ -2640,7 +2649,7 @@ M: Andrzej Hajda <andrzej.hajda@intel.com> · 1 unmodified line
26402649 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
26412650 L: linux-media@vger.kernel.org
26422651 S: Maintained
2643−F: drivers/media/platform/s5p-mfc/
2652+F: drivers/media/platform/samsung/s5p-mfc/
26442653
26452654 ARM/SHMOBILE ARM ARCHITECTURE
26462655 M: Geert Uytterhoeven <geert+renesas@glider.be>
@@ -2709,7 +2718,7 @@ F: drivers/clocksource/clksrc_st_lpc.c · 62 unmodified lines
27092718 F: drivers/cpufreq/sti-cpufreq.c
27102719 F: drivers/dma/st_fdma*
27112720 F: drivers/i2c/busses/i2c-st.c
2712−F: drivers/media/platform/sti/c8sectpfe/
2721+F: drivers/media/platform/st/sti/c8sectpfe/
27132722 F: drivers/media/rc/st_rc.c
27142723 F: drivers/mmc/host/sdhci-st.c
27152724 F: drivers/phy/st/phy-miphy28lp.c
@@ -3025,7 +3034,7 @@ L: linux-media@vger.kernel.org · 309 unmodified lines
30253034 L: openbmc@lists.ozlabs.org (moderated for non-subscribers)
30263035 S: Maintained
30273036 F: Documentation/devicetree/bindings/media/aspeed-video.txt
3028−F: drivers/media/platform/aspeed-video.c
3037+F: drivers/media/platform/aspeed/
30293038
30303039 ASUS NOTEBOOKS AND EEEPC ACPI/WMI EXTRAS DRIVERS
30313040 M: Corentin Chary <corentin.chary@gmail.com>
@@ -3387,7 +3396,7 @@ L: linux-media@vger.kernel.org · 355 unmodified lines
33873396 S: Supported
33883397 W: https://linuxtv.org
33893398 T: git git://linuxtv.org/media_tree.git
3390−F: drivers/media/platform/sti/bdisp
3399+F: drivers/media/platform/st/sti/bdisp
33913400
33923401 BECKHOFF CX5020 ETHERCAT MASTER DRIVER
33933402 M: Dariusz Marcinkiewicz <reksio@newterm.pl>
@@ -4252,7 +4261,7 @@ L: linux-media@vger.kernel.org · 858 unmodified lines
42524261 S: Orphan
42534262 T: git git://linuxtv.org/media_tree.git
42544263 F: Documentation/admin-guide/media/cafe_ccic*
4255−F: drivers/media/platform/marvell-ccic/
4264+F: drivers/media/platform/marvell/
42564265
42574266 CAIF NETWORK LAYER
42584267 L: netdev@vger.kernel.org
@@ -4776,7 +4785,7 @@ M: Philipp Zabel <p.zabel@pengutronix.de> · 517 unmodified lines
47764785 L: linux-media@vger.kernel.org
47774786 S: Maintained
47784787 F: Documentation/devicetree/bindings/media/coda.yaml
4779−F: drivers/media/platform/coda/
4788+F: drivers/media/platform/chips-media/
47804789
47814790 CODE OF CONDUCT
47824791 M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
@@ -5490,7 +5499,7 @@ L: linux-media@vger.kernel.org · 707 unmodified lines
54905499 S: Supported
54915500 W: https://linuxtv.org
54925501 T: git git://linuxtv.org/media_tree.git
5493−F: drivers/media/platform/sti/delta
5502+F: drivers/media/platform/st/sti/delta
54945503
54955504 DELTA AHE-50DC FAN CONTROL MODULE DRIVER
54965505 M: Zev Weiss <zev@bewilderbeest.net>
@@ -8886,7 +8895,7 @@ L: linux-media@vger.kernel.org · 3389 unmodified lines
88868895 S: Supported
88878896 W: https://linuxtv.org
88888897 T: git git://linuxtv.org/media_tree.git
8889−F: drivers/media/platform/sti/hva
8898+F: drivers/media/platform/st/sti/hva
88908899
88918900 HWPOISON MEMORY FAILURE HANDLING
88928901 M: Naoya Horiguchi <naoya.horiguchi@nec.com>
@@ -8921,6 +8930,12 @@ L: linux-media@vger.kernel.org · 28 unmodified lines
89218930 S: Maintained
89228931 F: drivers/media/i2c/hi846.c
89238932
8933+HYNIX HI847 SENSOR DRIVER
8934+M: Shawn Tu <shawnx.tu@intel.com>
8935+L: linux-media@vger.kernel.org
8936+S: Maintained
8937+F: drivers/media/i2c/hi847.c
8938+
89248939 Hyper-V/Azure CORE AND DRIVERS
89258940 M: "K. Y. Srinivasan" <kys@microsoft.com>
89268941 M: Haiyang Zhang <haiyangz@microsoft.com>
@@ -10035,6 +10050,14 @@ L: linux-iio@vger.kernel.org · 1108 unmodified lines
1003510050 F: Documentation/devicetree/bindings/counter/interrupt-counter.yaml
1003610051 F: drivers/counter/interrupt-cnt.c
1003710052
10053+INTERSIL ISL7998X VIDEO DECODER DRIVER
10054+M: Michael Tretter <m.tretter@pengutronix.de>
10055+R: Pengutronix Kernel Team <kernel@pengutronix.de>
10056+L: linux-media@vger.kernel.org
10057+S: Maintained
10058+F: Documentation/devicetree/bindings/media/i2c/isil,isl79987.yaml
10059+F: drivers/media/i2c/isl7998x.c
10060+
1003810061 INVENSENSE ICM-426xx IMU DRIVER
1003910062 M: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
1004010063 L: linux-iio@vger.kernel.org
@@ -10334,7 +10357,7 @@ M: Mikhail Ulyanov <mikhail.ulyanov@cogentembedded.com> · 293 unmodified lines
1033410357 L: linux-media@vger.kernel.org
1033510358 L: linux-renesas-soc@vger.kernel.org
1033610359 S: Maintained
10337−F: drivers/media/platform/rcar_jpu.c
10360+F: drivers/media/platform/renesas/rcar_jpu.c
1033810361
1033910362 JSM Neo PCI based serial card
1034010363 L: linux-serial@vger.kernel.org
@@ -11878,7 +11901,7 @@ M: Philipp Zabel <p.zabel@pengutronix.de> · 1537 unmodified lines
1187811901 L: linux-media@vger.kernel.org
1187911902 S: Maintained
1188011903 T: git git://linuxtv.org/media_tree.git
11881−F: drivers/media/platform/imx-pxp.[ch]
11904+F: drivers/media/platform/nxp/imx-pxp.[ch]
1188211905
1188311906 MEDIA DRIVERS FOR ASCOT2E
1188411907 M: Sergey Kozlov <serjk@netup.ru>
@@ -11943,10 +11966,10 @@ L: linux-media@vger.kernel.org · 58 unmodified lines
1194311966 S: Maintained
1194411967 T: git git://linuxtv.org/media_tree.git
1194511968 F: Documentation/admin-guide/media/imx7.rst
11969+F: Documentation/devicetree/bindings/media/nxp,imx-mipi-csi2.yaml
1194611970 F: Documentation/devicetree/bindings/media/nxp,imx7-csi.yaml
11947−F: Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.yaml
11971+F: drivers/media/platform/imx/imx-mipi-csis.c
1194811972 F: drivers/staging/media/imx/imx7-media-csi.c
11949−F: drivers/staging/media/imx/imx7-mipi-csis.c
1195011973
1195111974 MEDIA DRIVERS FOR HELENE
1195211975 M: Abylay Ospan <aospan@netup.ru>
@@ -12001,7 +12024,7 @@ L: linux-tegra@vger.kernel.org · 48 unmodified lines
1200112024 S: Maintained
1200212025 T: git git://linuxtv.org/media_tree.git
1200312026 F: Documentation/devicetree/bindings/media/nvidia,tegra-vde.txt
12004−F: drivers/staging/media/tegra-vde/
12027+F: drivers/media/platform/nvidia/tegra-vde/
1200512028
1200612029 MEDIA DRIVERS FOR RENESAS - CEU
1200712030 M: Jacopo Mondi <jacopo@jmondi.org>
@@ -12010,7 +12033,7 @@ L: linux-renesas-soc@vger.kernel.org · 2 unmodified lines
1201012033 S: Supported
1201112034 T: git git://linuxtv.org/media_tree.git
1201212035 F: Documentation/devicetree/bindings/media/renesas,ceu.yaml
12013−F: drivers/media/platform/renesas-ceu.c
12036+F: drivers/media/platform/renesas/renesas-ceu.c
1201412037 F: include/media/drv-intf/renesas-ceu.h
1201512038
1201612039 MEDIA DRIVERS FOR RENESAS - DRIF
@@ -12020,7 +12043,7 @@ L: linux-renesas-soc@vger.kernel.org · 3 unmodified lines
1202012043 S: Supported
1202112044 T: git git://linuxtv.org/media_tree.git
1202212045 F: Documentation/devicetree/bindings/media/renesas,drif.yaml
12023−F: drivers/media/platform/rcar_drif.c
12046+F: drivers/media/platform/renesas/rcar_drif.c
1202412047
1202512048 MEDIA DRIVERS FOR RENESAS - FCP
1202612049 M: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
@@ -12029,7 +12052,7 @@ L: linux-renesas-soc@vger.kernel.org · 2 unmodified lines
1202912052 S: Supported
1203012053 T: git git://linuxtv.org/media_tree.git
1203112054 F: Documentation/devicetree/bindings/media/renesas,fcp.yaml
12032−F: drivers/media/platform/rcar-fcp.c
12055+F: drivers/media/platform/renesas/rcar-fcp.c
1203312056 F: include/media/rcar-fcp.h
1203412057
1203512058 MEDIA DRIVERS FOR RENESAS - FDP1
@@ -12039,7 +12062,7 @@ L: linux-renesas-soc@vger.kernel.org · 3 unmodified lines
1203912062 S: Supported
1204012063 T: git git://linuxtv.org/media_tree.git
1204112064 F: Documentation/devicetree/bindings/media/renesas,fdp1.yaml
12042−F: drivers/media/platform/rcar_fdp1.c
12065+F: drivers/media/platform/renesas/rcar_fdp1.c
1204312066
1204412067 MEDIA DRIVERS FOR RENESAS - VIN
1204512068 M: Niklas Söderlund <niklas.soderlund@ragnatech.se>
@@ -12050,8 +12073,8 @@ T: git git://linuxtv.org/media_tree.git · 4 unmodified lines
1205012073 F: Documentation/devicetree/bindings/media/renesas,csi2.yaml
1205112074 F: Documentation/devicetree/bindings/media/renesas,isp.yaml
1205212075 F: Documentation/devicetree/bindings/media/renesas,vin.yaml
12053−F: drivers/media/platform/rcar-isp.c
12054−F: drivers/media/platform/rcar-vin/
12076+F: drivers/media/platform/renesas/rcar-isp.c
12077+F: drivers/media/platform/renesas/rcar-vin/
1205512078
1205612079 MEDIA DRIVERS FOR RENESAS - VSP1
1205712080 M: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
@@ -12061,7 +12084,7 @@ L: linux-renesas-soc@vger.kernel.org · 3 unmodified lines
1206112084 S: Supported
1206212085 T: git git://linuxtv.org/media_tree.git
1206312086 F: Documentation/devicetree/bindings/media/renesas,vsp1.yaml
12064−F: drivers/media/platform/vsp1/
12087+F: drivers/media/platform/renesas/vsp1/
1206512088
1206612089 MEDIA DRIVERS FOR ST STV0910 DEMODULATOR ICs
1206712090 L: linux-media@vger.kernel.org
@@ -12083,7 +12106,7 @@ L: linux-media@vger.kernel.org · 15 unmodified lines
1208312106 S: Supported
1208412107 T: git git://linuxtv.org/media_tree.git
1208512108 F: Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml
12086−F: drivers/media/platform/stm32/stm32-dcmi.c
12109+F: drivers/media/platform/st/stm32/stm32-dcmi.c
1208712110
1208812111 MEDIA INPUT INFRASTRUCTURE (V4L/DVB)
1208912112 M: Mauro Carvalho Chehab <mchehab@kernel.org>
@@ -12167,7 +12190,7 @@ M: Rick Chang <rick.chang@mediatek.com> · 77 unmodified lines
1216712190 M: Bin Liu <bin.liu@mediatek.com>
1216812191 S: Supported
1216912192 F: Documentation/devicetree/bindings/media/mediatek-jpeg-decoder.txt
12170−F: drivers/media/platform/mtk-jpeg/
12193+F: drivers/media/platform/mediatek/jpeg/
1217112194
1217212195 MEDIATEK MDP DRIVER
1217312196 M: Minghsiu Tsai <minghsiu.tsai@mediatek.com>
@@ -12175,8 +12198,8 @@ M: Houlong Wei <houlong.wei@mediatek.com> · 1 unmodified line
1217512198 M: Andrew-CT Chen <andrew-ct.chen@mediatek.com>
1217612199 S: Supported
1217712200 F: Documentation/devicetree/bindings/media/mediatek-mdp.txt
12178−F: drivers/media/platform/mtk-mdp/
12179−F: drivers/media/platform/mtk-vpu/
12201+F: drivers/media/platform/mediatek/mdp/
12202+F: drivers/media/platform/mediatek/vpu/
1218012203
1218112204 MEDIATEK MEDIA DRIVER
1218212205 M: Tiffany Lin <tiffany.lin@mediatek.com>
@@ -12184,8 +12207,8 @@ M: Andrew-CT Chen <andrew-ct.chen@mediatek.com> · 1 unmodified line
1218412207 S: Supported
1218512208 F: Documentation/devicetree/bindings/media/mediatek-vcodec.txt
1218612209 F: Documentation/devicetree/bindings/media/mediatek-vpu.txt
12187−F: drivers/media/platform/mtk-vcodec/
12188−F: drivers/media/platform/mtk-vpu/
12210+F: drivers/media/platform/mediatek/vcodec/
12211+F: drivers/media/platform/mediatek/vpu/
1218912212
1219012213 MEDIATEK MMC/SD/SDIO DRIVER
1219112214 M: Chaotian Jing <chaotian.jing@mediatek.com>
@@ -12560,7 +12583,7 @@ L: linux-amlogic@lists.infradead.org · 368 unmodified lines
1256012583 S: Supported
1256112584 T: git git://linuxtv.org/media_tree.git
1256212585 F: Documentation/devicetree/bindings/media/amlogic,axg-ge2d.yaml
12563−F: drivers/media/platform/meson/ge2d/
12586+F: drivers/media/platform/amlogic/meson-ge2d/
1256412587
1256512588 MESON NAND CONTROLLER DRIVER FOR AMLOGIC SOCS
1256612589 M: Liang Yang <liang.yang@amlogic.com>
@@ -12642,6 +12665,13 @@ L: alsa-devel@alsa-project.org (moderated for non-subscribers) · 75 unmodified lines
1264212665 S: Supported
1264312666 F: sound/soc/atmel
1264412667
12668+MICROCHIP CSI2DC DRIVER
12669+M: Eugen Hristev <eugen.hristev@microchip.com>
12670+L: linux-media@vger.kernel.org
12671+S: Supported
12672+F: Documentation/devicetree/bindings/media/microchip,csi2dc.yaml
12673+F: drivers/media/platform/atmel/microchip-csi2dc.c
12674+
1264512675 MICROCHIP ECC DRIVER
1264612676 M: Tudor Ambarus <tudor.ambarus@microchip.com>
1264712677 L: linux-crypto@vger.kernel.org
@@ -12667,11 +12697,8 @@ L: linux-media@vger.kernel.org · 19 unmodified lines
1266712697 S: Supported
1266812698 F: Documentation/devicetree/bindings/media/atmel,isc.yaml
1266912699 F: Documentation/devicetree/bindings/media/microchip,xisc.yaml
12670−F: drivers/media/platform/atmel/atmel-isc-base.c
12671−F: drivers/media/platform/atmel/atmel-isc-regs.h
12672−F: drivers/media/platform/atmel/atmel-isc.h
12673−F: drivers/media/platform/atmel/atmel-sama5d2-isc.c
12674−F: drivers/media/platform/atmel/atmel-sama7g5-isc.c
12700+F: drivers/media/platform/atmel/atmel-isc*
12701+F: drivers/media/platform/atmel/atmel-sama*-isc*
1267512702 F: include/linux/atmel-isc-media.h
1267612703
1267712704 MICROCHIP ISI DRIVER
@@ -14130,7 +14157,7 @@ M: Laurent Pinchart <laurent.pinchart@ideasonboard.com> · 1452 unmodified lines
1413014157 L: linux-media@vger.kernel.org
1413114158 S: Maintained
1413214159 F: Documentation/devicetree/bindings/media/ti,omap3isp.txt
14133−F: drivers/media/platform/omap3isp/
14160+F: drivers/media/platform/ti/omap3isp/
1413414161 F: drivers/staging/media/omap4iss/
1413514162
1413614163 OMAP MMC SUPPORT
@@ -14238,6 +14265,12 @@ M: Harald Welte <laforge@gnumonks.org> · 101 unmodified lines
1423814265 S: Maintained
1423914266 F: drivers/char/pcmcia/cm4040_cs.*
1424014267
14268+OMNIVISION OG01A1B SENSOR DRIVER
14269+M: Shawn Tu <shawnx.tu@intel.com>
14270+L: linux-media@vger.kernel.org
14271+S: Maintained
14272+F: drivers/media/i2c/og01a1b.c
14273+
1424114274 OMNIVISION OV02A10 SENSOR DRIVER
1424214275 M: Dongchun Zhu <dongchun.zhu@mediatek.com>
1424314276 L: linux-media@vger.kernel.org
@@ -14246,6 +14279,13 @@ T: git git://linuxtv.org/media_tree.git · 2 unmodified lines
1424614279 F: Documentation/devicetree/bindings/media/i2c/ovti,ov02a10.yaml
1424714280 F: drivers/media/i2c/ov02a10.c
1424814281
14282+OMNIVISION OV08D10 SENSOR DRIVER
14283+M: Jimmy Su <jimmy.su@intel.com>
14284+L: linux-media@vger.kernel.org
14285+S: Maintained
14286+T: git git://linuxtv.org/media_tree.git
14287+F: drivers/media/i2c/ov08d10.c
14288+
1424914289 OMNIVISION OV13858 SENSOR DRIVER
1425014290 M: Sakari Ailus <sakari.ailus@linux.intel.com>
1425114291 L: linux-media@vger.kernel.org
@@ -16680,8 +16720,7 @@ F: Documentation/devicetree/bindings/sound/rockchip,i2s-tdm.yaml · 2428 unmodified lines
1668016720 F: sound/soc/rockchip/rockchip_i2s_tdm.*
1668116721
1668216722 ROCKCHIP ISP V1 DRIVER
16683−M: Helen Koike <helen.koike@collabora.com>
16684−M: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
16723+M: Dafna Hirschfeld <dafna@fastmail.com>
1668516724 L: linux-media@vger.kernel.org
1668616725 L: linux-rockchip@lists.infradead.org
1668716726 S: Maintained
@@ -17100,7 +17139,7 @@ M: Sylwester Nawrocki <sylvester.nawrocki@gmail.com> · 412 unmodified lines
1710017139 L: linux-media@vger.kernel.org
1710117140 L: linux-samsung-soc@vger.kernel.org
1710217141 S: Maintained
17103−F: drivers/media/platform/s3c-camif/
17142+F: drivers/media/platform/samsung/s3c-camif/
1710417143 F: include/media/drv-intf/s3c_camif.h
1710517144
1710617145 SAMSUNG S3FWRN5 NFC DRIVER
@@ -17140,7 +17179,7 @@ M: Sylwester Nawrocki <s.nawrocki@samsung.com> · 33 unmodified lines
1714017179 L: linux-media@vger.kernel.org
1714117180 S: Supported
1714217181 Q: https://patchwork.linuxtv.org/project/linux-media/list/
17143−F: drivers/media/platform/exynos4-is/
17182+F: drivers/media/platform/samsung/exynos4-is/
1714417183
1714517184 SAMSUNG SOC CLOCK DRIVERS
1714617185 M: Sylwester Nawrocki <s.nawrocki@samsung.com>
@@ -17575,7 +17614,7 @@ F: include/media/i2c/rj54n1cb0c.h · 428 unmodified lines
1757517614 SH_VOU V4L2 OUTPUT DRIVER
1757617615 L: linux-media@vger.kernel.org
1757717616 S: Orphan
17578−F: drivers/media/platform/sh_vou.c
17617+F: drivers/media/platform/renesas/sh_vou.c
1757917618 F: include/media/drv-intf/sh_vou.h
1758017619
1758117620 SI2157 MEDIA DRIVER
@@ -18347,7 +18386,8 @@ F: Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml · 765 unmodified lines
1834718386 F: drivers/iio/imu/st_lsm6dsx/
1834818387
1834918388 ST MIPID02 CSI-2 TO PARALLEL BRIDGE DRIVER
18350−M: Mickael Guene <mickael.guene@st.com>
18389+M: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
18390+M: Sylvain Petinot <sylvain.petinot@foss.st.com>
1835118391 L: linux-media@vger.kernel.org
1835218392 S: Maintained
1835318393 T: git git://linuxtv.org/media_tree.git
@@ -19324,7 +19364,7 @@ S: Maintained · 970 unmodified lines
1932419364 W: https://linuxtv.org
1932519365 Q: http://patchwork.linuxtv.org/project/linux-media/list/
1932619366 T: git git://linuxtv.org/mhadli/v4l-dvb-davinci_devices.git
19327−F: drivers/media/platform/am437x/
19367+F: drivers/media/platform/ti/am437x/
1932819368
1932919369 TI BANDGAP AND THERMAL DRIVER
1933019370 M: Eduardo Valentin <edubezval@gmail.com>
@@ -19383,7 +19423,7 @@ S: Maintained · 52 unmodified lines
1938319423 W: https://linuxtv.org
1938419424 Q: http://patchwork.linuxtv.org/project/linux-media/list/
1938519425 T: git git://linuxtv.org/mhadli/v4l-dvb-davinci_devices.git
19386−F: drivers/media/platform/davinci/
19426+F: drivers/media/platform/ti/davinci/
1938719427 F: include/media/davinci/
1938819428
1938919429 TI ENHANCED QUADRATURE ENCODER PULSE (eQEP) DRIVER
@@ -19469,7 +19509,8 @@ W: http://linuxtv.org/ · 79 unmodified lines
1946919509 Q: http://patchwork.linuxtv.org/project/linux-media/list/
1947019510 F: Documentation/devicetree/bindings/media/ti,cal.yaml
1947119511 F: Documentation/devicetree/bindings/media/ti,vpe.yaml
19472−F: drivers/media/platform/ti-vpe/
19512+F: drivers/media/platform/ti/cal/
19513+F: drivers/media/platform/ti/vpe/
1947319514
1947419515 TI WILINK WIRELESS DRIVERS
1947519516 L: linux-wireless@vger.kernel.org
@@ -20442,8 +20483,8 @@ F: drivers/media/common/videobuf2/* · 966 unmodified lines
2044220483 F: include/media/videobuf2-*
2044320484
2044420485 VIMC VIRTUAL MEDIA CONTROLLER DRIVER
20445−M: Helen Koike <helen.koike@collabora.com>
20446−R: Shuah Khan <skhan@linuxfoundation.org>
20486+M: Shuah Khan <skhan@linuxfoundation.org>
20487+R: Kieran Bingham <kieran.bingham@ideasonboard.com>
2044720488 L: linux-media@vger.kernel.org
2044820489 S: Maintained
2044920490 W: https://linuxtv.org
@@ -21132,7 +21173,7 @@ L: linux-media@vger.kernel.org · 682 unmodified lines
2113221173 S: Maintained
2113321174 W: https://linuxtv.org
2113421175 T: git git://linuxtv.org/media_tree.git
21135−F: drivers/media/tuners/tuner-xc2028.*
21176+F: drivers/media/tuners/xc2028.*
2113621177
2113721178 XDP (eXpress Data Path)
2113821179 M: Alexei Starovoitov <ast@kernel.org>
drivers/gpu/drm/mediatek/mtk_disp_ovl.c+7−1
@@ -11,6 +11,7 @@ · 10 unmodified lines
1111 #include <linux/of_device.h>
1212 #include <linux/of_irq.h>
1313 #include <linux/platform_device.h>
14+#include <linux/pm_runtime.h>
1415 #include <linux/soc/mediatek/mtk-cmdq.h>
1516
1617 #include "mtk_disp_drv.h"
@@ -414,9 +415,13 @@ static int mtk_disp_ovl_probe(struct platform_device *pdev) · 397 unmodified lines
414415 return ret;
415416 }
416417
418+ pm_runtime_enable(dev);
419+
417420 ret = component_add(dev, &mtk_disp_ovl_component_ops);
418− if (ret)
421+ if (ret) {
422+ pm_runtime_disable(dev);
419423 dev_err(dev, "Failed to add component: %d\n", ret);
424+ }
420425
421426 return ret;
422427 }
@@ -424,6 +429,7 @@ static int mtk_disp_ovl_probe(struct platform_device *pdev) · 1 unmodified line
424429 static int mtk_disp_ovl_remove(struct platform_device *pdev)
425430 {
426431 component_del(&pdev->dev, &mtk_disp_ovl_component_ops);
432+ pm_runtime_disable(&pdev->dev);
427433
428434 return 0;
429435 }
drivers/gpu/drm/mediatek/mtk_disp_rdma.c+8−1
@@ -9,6 +9,7 @@ · 8 unmodified lines
99 #include <linux/of_device.h>
1010 #include <linux/of_irq.h>
1111 #include <linux/platform_device.h>
12+#include <linux/pm_runtime.h>
1213 #include <linux/soc/mediatek/mtk-cmdq.h>
1314
1415 #include "mtk_disp_drv.h"
@@ -327,9 +328,13 @@ static int mtk_disp_rdma_probe(struct platform_device *pdev) · 312 unmodified lines
327328
328329 platform_set_drvdata(pdev, priv);
329330
331+ pm_runtime_enable(dev);
332+
330333 ret = component_add(dev, &mtk_disp_rdma_component_ops);
331− if (ret)
334+ if (ret) {
335+ pm_runtime_disable(dev);
332336 dev_err(dev, "Failed to add component: %d\n", ret);
337+ }
333338
334339 return ret;
335340 }
@@ -338,6 +343,8 @@ static int mtk_disp_rdma_remove(struct platform_device *pdev) · 2 unmodified lines
338343 {
339344 component_del(&pdev->dev, &mtk_disp_rdma_component_ops);
340345
346+ pm_runtime_disable(&pdev->dev);
347+
341348 return 0;
342349 }
343350
drivers/gpu/drm/mediatek/mtk_drm_crtc.c+8−7
@@ -12,7 +12,6 @@ · 11 unmodified lines
1212 #include <linux/soc/mediatek/mtk-mutex.h>
1313
1414 #include <asm/barrier.h>
15−#include <soc/mediatek/smi.h>
1615
1716 #include <drm/drm_atomic.h>
1817 #include <drm/drm_atomic_helper.h>
@@ -661,15 +660,15 @@ static void mtk_drm_crtc_atomic_enable(struct drm_crtc *crtc, · 642 unmodified lines
661660
662661 DRM_DEBUG_DRIVER("%s %d\n", __func__, crtc->base.id);
663662
664− ret = mtk_smi_larb_get(comp->larb_dev);
665− if (ret) {
666− DRM_ERROR("Failed to get larb: %d\n", ret);
663+ ret = pm_runtime_resume_and_get(comp->dev);
664+ if (ret < 0) {
665+ DRM_DEV_ERROR(comp->dev, "Failed to enable power domain: %d\n", ret);
667666 return;
668667 }
669668
670669 ret = mtk_crtc_ddp_hw_init(mtk_crtc);
671670 if (ret) {
672− mtk_smi_larb_put(comp->larb_dev);
671+ pm_runtime_put(comp->dev);
673672 return;
674673 }
675674
@@ -682,7 +681,7 @@ static void mtk_drm_crtc_atomic_disable(struct drm_crtc *crtc, · 6 unmodified lines
682681 {
683682 struct mtk_drm_crtc *mtk_crtc = to_mtk_crtc(crtc);
684683 struct mtk_ddp_comp *comp = mtk_crtc->ddp_comp[0];
685− int i;
684+ int i, ret;
686685
687686 DRM_DEBUG_DRIVER("%s %d\n", __func__, crtc->base.id);
688687 if (!mtk_crtc->enabled)
@@ -705,7 +704,9 @@ static void mtk_drm_crtc_atomic_disable(struct drm_crtc *crtc, · 16 unmodified lines
705704
706705 drm_crtc_vblank_off(crtc);
707706 mtk_crtc_ddp_hw_fini(mtk_crtc);
708− mtk_smi_larb_put(comp->larb_dev);
707+ ret = pm_runtime_put(comp->dev);
708+ if (ret < 0)
709+ DRM_DEV_ERROR(comp->dev, "Failed to disable power domain: %d\n", ret);
709710
710711 mtk_crtc->enabled = false;
711712 }
drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c+2−34
@@ -447,37 +447,15 @@ unsigned int mtk_drm_find_possible_crtc_by_comp(struct drm_device *drm, · 446 unmodified lines
447447 return ret;
448448 }
449449
450−static int mtk_ddp_get_larb_dev(struct device_node *node, struct mtk_ddp_comp *comp,
451− struct device *dev)
452−{
453− struct device_node *larb_node;
454− struct platform_device *larb_pdev;
455−
456− larb_node = of_parse_phandle(node, "mediatek,larb", 0);
457− if (!larb_node) {
458− dev_err(dev, "Missing mediadek,larb phandle in %pOF node\n", node);
459− return -EINVAL;
460− }
461−
462− larb_pdev = of_find_device_by_node(larb_node);
463− if (!larb_pdev) {
464− dev_warn(dev, "Waiting for larb device %pOF\n", larb_node);
465− of_node_put(larb_node);
466− return -EPROBE_DEFER;
467− }
468− of_node_put(larb_node);
469− comp->larb_dev = &larb_pdev->dev;
470−
471− return 0;
472−}
473−
474450 int mtk_ddp_comp_init(struct device_node *node, struct mtk_ddp_comp *comp,
475451 enum mtk_ddp_comp_id comp_id)
476452 {
477453 struct platform_device *comp_pdev;
478454 enum mtk_ddp_comp_type type;
479455 struct mtk_ddp_comp_dev *priv;
456+#if IS_REACHABLE(CONFIG_MTK_CMDQ)
480457 int ret;
458+#endif
481459
482460 if (comp_id < 0 || comp_id >= DDP_COMPONENT_ID_MAX)
483461 return -EINVAL;
@@ -493,16 +471,6 @@ int mtk_ddp_comp_init(struct device_node *node, struct mtk_ddp_comp *comp, · 9 unmodified lines
493471 }
494472 comp->dev = &comp_pdev->dev;
495473
496− /* Only DMA capable components need the LARB property */
497− if (type == MTK_DISP_OVL ||
498− type == MTK_DISP_OVL_2L ||
499− type == MTK_DISP_RDMA ||
500− type == MTK_DISP_WDMA) {
501− ret = mtk_ddp_get_larb_dev(node, comp, comp->dev);
502− if (ret)
503− return ret;
504− }
505−
506474 if (type == MTK_DISP_AAL ||
507475 type == MTK_DISP_BLS ||
508476 type == MTK_DISP_CCORR ||
drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h+0−1
@@ -71,7 +71,6 @@ struct mtk_ddp_comp_funcs { · 70 unmodified lines
7171 struct mtk_ddp_comp {
7272 struct device *dev;
7373 int irq;
74− struct device *larb_dev;
7574 enum mtk_ddp_comp_id id;
7675 const struct mtk_ddp_comp_funcs *funcs;
7776 };
drivers/gpu/drm/mediatek/mtk_drm_drv.c+1−4
@@ -645,11 +645,8 @@ err_pm: · 644 unmodified lines
645645 pm_runtime_disable(dev);
646646 err_node:
647647 of_node_put(private->mutex_node);
648− for (i = 0; i < DDP_COMPONENT_ID_MAX; i++) {
648+ for (i = 0; i < DDP_COMPONENT_ID_MAX; i++)
649649 of_node_put(private->comp_node[i]);
650− if (private->ddp_comp[i].larb_dev)
651− put_device(private->ddp_comp[i].larb_dev);
652− }
653650 return ret;
654651 }
655652
drivers/gpu/ipu-v3/ipu-csi.c+3−3
@@ -357,11 +357,11 @@ static int fill_csi_bus_cfg(struct ipu_csi_bus_config *csicfg, · 356 unmodified lines
357357 switch (mbus_cfg->type) {
358358 case V4L2_MBUS_PARALLEL:
359359 csicfg->ext_vsync = 1;
360− csicfg->vsync_pol = (mbus_cfg->flags &
360+ csicfg->vsync_pol = (mbus_cfg->bus.parallel.flags &
361361 V4L2_MBUS_VSYNC_ACTIVE_LOW) ? 1 : 0;
362− csicfg->hsync_pol = (mbus_cfg->flags &
362+ csicfg->hsync_pol = (mbus_cfg->bus.parallel.flags &
363363 V4L2_MBUS_HSYNC_ACTIVE_LOW) ? 1 : 0;
364− csicfg->pixclk_pol = (mbus_cfg->flags &
364+ csicfg->pixclk_pol = (mbus_cfg->bus.parallel.flags &
365365 V4L2_MBUS_PCLK_SAMPLE_FALLING) ? 1 : 0;
366366 csicfg->clk_mode = IPU_CSI_CLK_MODE_GATED_CLK;
367367 break;
drivers/input/rmi4/Kconfig+1−1
@@ -110,7 +110,7 @@ config RMI4_F3A · 109 unmodified lines
110110
111111 config RMI4_F54
112112 bool "RMI4 Function 54 (Analog diagnostics)"
113− depends on VIDEO_V4L2=y || (RMI4_CORE=m && VIDEO_V4L2=m)
113+ depends on VIDEO_DEV=y || (RMI4_CORE=m && VIDEO_DEV=m)
114114 select VIDEOBUF2_VMALLOC
115115 select RMI4_F55
116116 help
drivers/input/touchscreen/Kconfig+2−2
@@ -131,7 +131,7 @@ config TOUCHSCREEN_ATMEL_MXT · 130 unmodified lines
131131 config TOUCHSCREEN_ATMEL_MXT_T37
132132 bool "Support T37 Diagnostic Data"
133133 depends on TOUCHSCREEN_ATMEL_MXT
134− depends on VIDEO_V4L2=y || (TOUCHSCREEN_ATMEL_MXT=m && VIDEO_V4L2=m)
134+ depends on VIDEO_DEV=y || (TOUCHSCREEN_ATMEL_MXT=m && VIDEO_DEV=m)
135135 select VIDEOBUF2_VMALLOC
136136 help
137137 Say Y here if you want support to output data from the T37
@@ -1252,7 +1252,7 @@ config TOUCHSCREEN_SUN4I · 1114 unmodified lines
12521252 config TOUCHSCREEN_SUR40
12531253 tristate "Samsung SUR40 (Surface 2.0/PixelSense) touchscreen"
12541254 depends on USB && MEDIA_USB_SUPPORT && HAS_DMA
1255− depends on VIDEO_V4L2
1255+ depends on VIDEO_DEV
12561256 select VIDEOBUF2_DMA_SG
12571257 help
12581258 Say Y here if you want support for the Samsung SUR40 touchscreen
drivers/iommu/mtk_iommu.c+34−0
@@ -562,22 +562,52 @@ static struct iommu_device *mtk_iommu_probe_device(struct device *dev) · 561 unmodified lines
562562 {
563563 struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev);
564564 struct mtk_iommu_data *data;
565+ struct device_link *link;
566+ struct device *larbdev;
567+ unsigned int larbid, larbidx, i;
565568
566569 if (!fwspec || fwspec->ops != &mtk_iommu_ops)
567570 return ERR_PTR(-ENODEV); /* Not a iommu client device */
568571
569572 data = dev_iommu_priv_get(dev);
570573
574+ /*
575+ * Link the consumer device with the smi-larb device(supplier).
576+ * The device that connects with each a larb is a independent HW.
577+ * All the ports in each a device should be in the same larbs.
578+ */
579+ larbid = MTK_M4U_TO_LARB(fwspec->ids[0]);
580+ for (i = 1; i < fwspec->num_ids; i++) {
581+ larbidx = MTK_M4U_TO_LARB(fwspec->ids[i]);
582+ if (larbid != larbidx) {
583+ dev_err(dev, "Can only use one larb. Fail@larb%d-%d.\n",
584+ larbid, larbidx);
585+ return ERR_PTR(-EINVAL);
586+ }
587+ }
588+ larbdev = data->larb_imu[larbid].dev;
589+ link = device_link_add(dev, larbdev,
590+ DL_FLAG_PM_RUNTIME | DL_FLAG_STATELESS);
591+ if (!link)
592+ dev_err(dev, "Unable to link %s\n", dev_name(larbdev));
571593 return &data->iommu;
572594 }
573595
574596 static void mtk_iommu_release_device(struct device *dev)
575597 {
576598 struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev);
599+ struct mtk_iommu_data *data;
600+ struct device *larbdev;
601+ unsigned int larbid;
577602
578603 if (!fwspec || fwspec->ops != &mtk_iommu_ops)
579604 return;
580605
606+ data = dev_iommu_priv_get(dev);
607+ larbid = MTK_M4U_TO_LARB(fwspec->ids[0]);
608+ larbdev = data->larb_imu[larbid].dev;
609+ device_link_remove(dev, larbdev);
610+
581611 iommu_fwspec_free(dev);
582612 }
583613
@@ -847,6 +877,10 @@ static int mtk_iommu_probe(struct platform_device *pdev) · 263 unmodified lines
847877
848878 plarbdev = of_find_device_by_node(larbnode);
849879 if (!plarbdev) {
880+ of_node_put(larbnode);
881+ return -ENODEV;
882+ }
883+ if (!plarbdev->dev.driver) {
850884 of_node_put(larbnode);
851885 return -EPROBE_DEFER;
852886 }
drivers/iommu/mtk_iommu_v1.c+41−1
@@ -423,7 +423,18 @@ static struct iommu_device *mtk_iommu_probe_device(struct device *dev) · 422 unmodified lines
423423 struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev);
424424 struct of_phandle_args iommu_spec;
425425 struct mtk_iommu_data *data;
426− int err, idx = 0;
426+ int err, idx = 0, larbid, larbidx;
427+ struct device_link *link;
428+ struct device *larbdev;
429+
430+ /*
431+ * In the deferred case, free the existed fwspec.
432+ * Always initialize the fwspec internally.
433+ */
434+ if (fwspec) {
435+ iommu_fwspec_free(dev);
436+ fwspec = dev_iommu_fwspec_get(dev);
437+ }
427438
428439 while (!of_parse_phandle_with_args(dev->of_node, "iommus",
429440 "#iommu-cells",
@@ -444,6 +455,23 @@ static struct iommu_device *mtk_iommu_probe_device(struct device *dev) · 14 unmodified lines
444455
445456 data = dev_iommu_priv_get(dev);
446457
458+ /* Link the consumer device with the smi-larb device(supplier) */
459+ larbid = mt2701_m4u_to_larb(fwspec->ids[0]);
460+ for (idx = 1; idx < fwspec->num_ids; idx++) {
461+ larbidx = mt2701_m4u_to_larb(fwspec->ids[idx]);
462+ if (larbid != larbidx) {
463+ dev_err(dev, "Can only use one larb. Fail@larb%d-%d.\n",
464+ larbid, larbidx);
465+ return ERR_PTR(-EINVAL);
466+ }
467+ }
468+
469+ larbdev = data->larb_imu[larbid].dev;
470+ link = device_link_add(dev, larbdev,
471+ DL_FLAG_PM_RUNTIME | DL_FLAG_STATELESS);
472+ if (!link)
473+ dev_err(dev, "Unable to link %s\n", dev_name(larbdev));
474+
447475 return &data->iommu;
448476 }
449477
@@ -464,10 +492,18 @@ static void mtk_iommu_probe_finalize(struct device *dev) · 14 unmodified lines
464492 static void mtk_iommu_release_device(struct device *dev)
465493 {
466494 struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev);
495+ struct mtk_iommu_data *data;
496+ struct device *larbdev;
497+ unsigned int larbid;
467498
468499 if (!fwspec || fwspec->ops != &mtk_iommu_ops)
469500 return;
470501
502+ data = dev_iommu_priv_get(dev);
503+ larbid = mt2701_m4u_to_larb(fwspec->ids[0]);
504+ larbdev = data->larb_imu[larbid].dev;
505+ device_link_remove(dev, larbdev);
506+
471507 iommu_fwspec_free(dev);
472508 }
473509
@@ -594,6 +630,10 @@ static int mtk_iommu_probe(struct platform_device *pdev) · 120 unmodified lines
594630
595631 plarbdev = of_find_device_by_node(larbnode);
596632 if (!plarbdev) {
633+ of_node_put(larbnode);
634+ return -ENODEV;
635+ }
636+ if (!plarbdev->dev.driver) {
597637 of_node_put(larbnode);
598638 return -EPROBE_DEFER;
599639 }
drivers/media/Kconfig+8−3
@@ -160,6 +160,9 @@ menu "Media core support" · 159 unmodified lines
160160 config VIDEO_DEV
161161 tristate "Video4Linux core"
162162 default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT || MEDIA_PLATFORM_SUPPORT || MEDIA_TEST_SUPPORT
163+ depends on (I2C || I2C=n)
164+ select RATIONAL
165+ select VIDEOBUF2_V4L2 if VIDEOBUF2_CORE
163166 help
164167 Enables the V4L2 API, used by cameras, analog TV, video grabbers,
165168 radio devices and by some input devices.
@@ -216,13 +219,12 @@ menu "Media drivers" · 50 unmodified lines
216219 comment "Drivers filtered as selected at 'Filter media drivers'"
217220 depends on MEDIA_SUPPORT_FILTER
218221
222+comment "Media drivers"
223+
219224 source "drivers/media/usb/Kconfig"
220225 source "drivers/media/pci/Kconfig"
221226 source "drivers/media/radio/Kconfig"
222227
223−# Common driver options
224−source "drivers/media/common/Kconfig"
225−
226228 if MEDIA_PLATFORM_SUPPORT
227229 source "drivers/media/platform/Kconfig"
228230 source "drivers/media/mmc/Kconfig"
@@ -234,6 +236,9 @@ endif · 5 unmodified lines
234236
235237 source "drivers/media/firewire/Kconfig"
236238
239+# Common driver options
240+source "drivers/media/common/Kconfig"
241+
237242 endmenu
238243
239244 #
drivers/media/Makefile+2−2
@@ -8,7 +8,7 @@ · 7 unmodified lines
88 # when compiled as builtin drivers
99 #
1010 obj-y += i2c/ tuners/
11−obj-$(CONFIG_DVB_CORE) += dvb-frontends/
11+obj-$(CONFIG_DVB_CORE) += dvb-frontends/
1212
1313 #
1414 # Now, let's link-in the media controller core
@@ -18,7 +18,7 @@ ifeq ($(CONFIG_MEDIA_CONTROLLER),y) · 3 unmodified lines
1818 endif
1919
2020 obj-$(CONFIG_VIDEO_DEV) += v4l2-core/
21−obj-$(CONFIG_DVB_CORE) += dvb-core/
21+obj-$(CONFIG_DVB_CORE) += dvb-core/
2222
2323 # There are both core and drivers at RC subtree - merge before drivers
2424 obj-y += rc/
drivers/media/cec/platform/Makefile+8−8
@@ -4,12 +4,12 @@ · 3 unmodified lines
44 #
55
66 # Please keep it in alphabetic order
7−obj-$(CONFIG_CEC_CROS_EC) += cros-ec/
8−obj-$(CONFIG_CEC_GPIO) += cec-gpio/
9−obj-$(CONFIG_CEC_MESON_AO) += meson/
10−obj-$(CONFIG_CEC_SAMSUNG_S5P) += s5p/
11−obj-$(CONFIG_CEC_SECO) += seco/
12−obj-$(CONFIG_CEC_STI) += sti/
13−obj-$(CONFIG_CEC_STM32) += stm32/
14−obj-$(CONFIG_CEC_TEGRA) += tegra/
7+obj-$(CONFIG_CEC_CROS_EC) += cros-ec/
8+obj-$(CONFIG_CEC_GPIO) += cec-gpio/
9+obj-$(CONFIG_CEC_MESON_AO) += meson/
10+obj-$(CONFIG_CEC_SAMSUNG_S5P) += s5p/
11+obj-$(CONFIG_CEC_SECO) += seco/
12+obj-$(CONFIG_CEC_STI) += sti/
13+obj-$(CONFIG_CEC_STM32) += stm32/
14+obj-$(CONFIG_CEC_TEGRA) += tegra/
1515
drivers/media/cec/platform/cros-ec/cros-ec-cec.c+2−0
@@ -215,6 +215,8 @@ struct cec_dmi_match { · 214 unmodified lines
215215 static const struct cec_dmi_match cec_dmi_match_table[] = {
216216 /* Google Fizz */
217217 { "Google", "Fizz", "0000:00:02.0", "Port B" },
218+ /* Google Brask */
219+ { "Google", "Brask", "0000:00:02.0", "Port B" },
218220 };
219221
220222 static struct device *cros_ec_cec_find_hdmi_dev(struct device *dev,
drivers/media/cec/platform/seco/seco-cec.c+28−29
@@ -12,7 +12,6 @@ · 11 unmodified lines
1212 #include <linux/delay.h>
1313 #include <linux/dmi.h>
1414 #include <linux/gpio/consumer.h>
15−#include <linux/gpio.h>
1615 #include <linux/interrupt.h>
1716 #include <linux/pci.h>
1817 #include <linux/platform_device.h>
@@ -129,7 +128,7 @@ static int secocec_adap_enable(struct cec_adapter *adap, bool enable) · 110 unmodified lines
129128 if (status)
130129 goto err;
131130
132− dev_dbg(dev, "Device enabled");
131+ dev_dbg(dev, "Device enabled\n");
133132 } else {
134133 /* Clear the status register */
135134 status = smb_rd16(SECOCEC_STATUS_REG_1, &val);
@@ -141,7 +140,7 @@ static int secocec_adap_enable(struct cec_adapter *adap, bool enable) · 5 unmodified lines
141140 ~SECOCEC_ENABLE_REG_1_CEC &
142141 ~SECOCEC_ENABLE_REG_1_IR);
143142
144− dev_dbg(dev, "Device disabled");
143+ dev_dbg(dev, "Device disabled\n");
145144 }
146145
147146 return 0;
@@ -264,12 +263,12 @@ static void secocec_rx_done(struct cec_adapter *adap, u16 status_val) · 116 unmodified lines
264263
265264 if (status_val & SECOCEC_STATUS_RX_OVERFLOW_MASK) {
266265 /* NOTE: Untested, it also might not be necessary */
267− dev_warn(dev, "Received more than 16 bytes. Discarding");
266+ dev_warn(dev, "Received more than 16 bytes. Discarding\n");
268267 flag_overflow = true;
269268 }
270269
271270 if (status_val & SECOCEC_STATUS_RX_ERROR_MASK) {
272− dev_warn(dev, "Message received with errors. Discarding");
271+ dev_warn(dev, "Message received with errors. Discarding\n");
273272 status = -EIO;
274273 goto rxerr;
275274 }
@@ -390,12 +389,12 @@ static int secocec_ir_probe(void *priv) · 114 unmodified lines
390389 if (status != 0)
391390 goto err;
392391
393− dev_dbg(dev, "IR enabled");
392+ dev_dbg(dev, "IR enabled\n");
394393
395394 status = devm_rc_register_device(dev, cec->ir);
396395
397396 if (status) {
398− dev_err(dev, "Failed to prepare input device");
397+ dev_err(dev, "Failed to prepare input device\n");
399398 cec->ir = NULL;
400399 goto err;
401400 }
@@ -408,7 +407,7 @@ err: · 6 unmodified lines
408407 smb_wr16(SECOCEC_ENABLE_REG_1,
409408 val & ~SECOCEC_ENABLE_REG_1_IR);
410409
411− dev_dbg(dev, "IR disabled");
410+ dev_dbg(dev, "IR disabled\n");
412411 return status;
413412 }
414413
@@ -431,13 +430,13 @@ static int secocec_ir_rx(struct secocec_data *priv) · 16 unmodified lines
431430
432431 rc_keydown(cec->ir, RC_PROTO_RC5, RC_SCANCODE_RC5(addr, key), toggle);
433432
434− dev_dbg(dev, "IR key pressed: 0x%02x addr 0x%02x toggle 0x%02x", key,
433+ dev_dbg(dev, "IR key pressed: 0x%02x addr 0x%02x toggle 0x%02x\n", key,
435434 addr, toggle);
436435
437436 return 0;
438437
439438 err:
440− dev_err(dev, "IR Receive message failed (%d)", status);
439+ dev_err(dev, "IR Receive message failed (%d)\n", status);
441440 return -EIO;
442441 }
443442 #else
@@ -497,7 +496,7 @@ static irqreturn_t secocec_irq_handler(int irq, void *priv) · 53 unmodified lines
497496 return IRQ_HANDLED;
498497
499498 err:
500− dev_err_once(dev, "IRQ: R/W SMBus operation failed (%d)", status);
499+ dev_err_once(dev, "IRQ: R/W SMBus operation failed %d\n", status);
501500
502501 /* Reset status register */
503502 val = SECOCEC_STATUS_REG_1_CEC | SECOCEC_STATUS_REG_1_IR;
@@ -551,18 +550,18 @@ static int secocec_acpi_probe(struct secocec_data *sdev) · 47 unmodified lines
551550 struct gpio_desc *gpio;
552551 int irq = 0;
553552
554− gpio = devm_gpiod_get(dev, NULL, GPIOF_IN);
553+ gpio = devm_gpiod_get(dev, NULL, GPIOD_IN);
555554 if (IS_ERR(gpio)) {
556− dev_err(dev, "Cannot request interrupt gpio");
555+ dev_err(dev, "Cannot request interrupt gpio\n");
557556 return PTR_ERR(gpio);
558557 }
559558
560559 irq = gpiod_to_irq(gpio);
561560 if (irq < 0) {
562− dev_err(dev, "Cannot find valid irq");
561+ dev_err(dev, "Cannot find valid irq\n");
563562 return -ENODEV;
564563 }
565− dev_dbg(dev, "irq-gpio is bound to IRQ %d", irq);
564+ dev_dbg(dev, "irq-gpio is bound to IRQ %d\n", irq);
566565
567566 sdev->irq = irq;
568567
@@ -590,7 +589,7 @@ static int secocec_probe(struct platform_device *pdev) · 21 unmodified lines
590589
591590 /* Request SMBus regions */
592591 if (!request_muxed_region(BRA_SMB_BASE_ADDR, 7, "CEC00001")) {
593− dev_err(dev, "Request memory region failed");
592+ dev_err(dev, "Request memory region failed\n");
594593 return -ENXIO;
595594 }
596595
@@ -598,14 +597,14 @@ static int secocec_probe(struct platform_device *pdev) · 1 unmodified line
598597 secocec->dev = dev;
599598
600599 if (!has_acpi_companion(dev)) {
601− dev_dbg(dev, "Cannot find any ACPI companion");
600+ dev_dbg(dev, "Cannot find any ACPI companion\n");
602601 ret = -ENODEV;
603602 goto err;
604603 }
605604
606605 ret = secocec_acpi_probe(secocec);
607606 if (ret) {
608− dev_err(dev, "Cannot assign gpio to IRQ");
607+ dev_err(dev, "Cannot assign gpio to IRQ\n");
609608 ret = -ENODEV;
610609 goto err;
611610 }
@@ -613,11 +612,11 @@ static int secocec_probe(struct platform_device *pdev) · 1 unmodified line
613612 /* Firmware version check */
614613 ret = smb_rd16(SECOCEC_VERSION, &val);
615614 if (ret) {
616− dev_err(dev, "Cannot check fw version");
615+ dev_err(dev, "Cannot check fw version\n");
617616 goto err;
618617 }
619618 if (val < SECOCEC_LATEST_FW) {
620− dev_err(dev, "CEC Firmware not supported (v.%04x). Use ver > v.%04x",
619+ dev_err(dev, "CEC Firmware not supported (v.%04x). Use ver > v.%04x\n",
621620 val, SECOCEC_LATEST_FW);
622621 ret = -EINVAL;
623622 goto err;
@@ -631,7 +630,7 @@ static int secocec_probe(struct platform_device *pdev) · 7 unmodified lines
631630 dev_name(&pdev->dev), secocec);
632631
633632 if (ret) {
634− dev_err(dev, "Cannot request IRQ %d", secocec->irq);
633+ dev_err(dev, "Cannot request IRQ %d\n", secocec->irq);
635634 ret = -EIO;
636635 goto err;
637636 }
@@ -666,7 +665,7 @@ static int secocec_probe(struct platform_device *pdev) · 28 unmodified lines
666665
667666 platform_set_drvdata(pdev, secocec);
668667
669− dev_dbg(dev, "Device registered");
668+ dev_dbg(dev, "Device registered\n");
670669
671670 return ret;
672671
@@ -691,14 +690,14 @@ static int secocec_remove(struct platform_device *pdev) · 18 unmodified lines
691690
692691 smb_wr16(SECOCEC_ENABLE_REG_1, val & ~SECOCEC_ENABLE_REG_1_IR);
693692
694− dev_dbg(&pdev->dev, "IR disabled");
693+ dev_dbg(&pdev->dev, "IR disabled\n");
695694 }
696695 cec_notifier_cec_adap_unregister(secocec->notifier, secocec->cec_adap);
697696 cec_unregister_adapter(secocec->cec_adap);
698697
699698 release_region(BRA_SMB_BASE_ADDR, 7);
700699
701− dev_dbg(&pdev->dev, "CEC device removed");
700+ dev_dbg(&pdev->dev, "CEC device removed\n");
702701
703702 return 0;
704703 }
@@ -709,7 +708,7 @@ static int secocec_suspend(struct device *dev) · 4 unmodified lines
709708 int status;
710709 u16 val;
711710
712− dev_dbg(dev, "Device going to suspend, disabling");
711+ dev_dbg(dev, "Device going to suspend, disabling\n");
713712
714713 /* Clear the status register */
715714 status = smb_rd16(SECOCEC_STATUS_REG_1, &val);
@@ -733,7 +732,7 @@ static int secocec_suspend(struct device *dev) · 17 unmodified lines
733732 return 0;
734733
735734 err:
736− dev_err(dev, "Suspend failed (err: %d)", status);
735+ dev_err(dev, "Suspend failed: %d\n", status);
737736 return status;
738737 }
739738
@@ -742,7 +741,7 @@ static int secocec_resume(struct device *dev) · 2 unmodified lines
742741 int status;
743742 u16 val;
744743
745− dev_dbg(dev, "Resuming device from suspend");
744+ dev_dbg(dev, "Resuming device from suspend\n");
746745
747746 /* Clear the status register */
748747 status = smb_rd16(SECOCEC_STATUS_REG_1, &val);
@@ -762,12 +761,12 @@ static int secocec_resume(struct device *dev) · 13 unmodified lines
762761 if (status)
763762 goto err;
764763
765− dev_dbg(dev, "Device resumed from suspend");
764+ dev_dbg(dev, "Device resumed from suspend\n");
766765
767766 return 0;
768767
769768 err:
770− dev_err(dev, "Resume failed (err: %d)", status);
769+ dev_err(dev, "Resume failed: %d\n", status);
771770 return status;
772771 }
773772
drivers/media/common/Kconfig+8−8
@@ -6,23 +6,23 @@ config MEDIA_COMMON_OPTIONS · 5 unmodified lines
66 comment "common driver options"
77 depends on MEDIA_COMMON_OPTIONS
88
9−config VIDEO_CX2341X
10− tristate
11−
12−config VIDEO_TVEEPROM
9+config CYPRESS_FIRMWARE
1310 tristate
14− depends on I2C
11+ depends on USB
1512
1613 config TTPCI_EEPROM
1714 tristate
1815 depends on I2C
1916
20−config CYPRESS_FIRMWARE
17+config VIDEO_CX2341X
2118 tristate
22− depends on USB
2319
24−source "drivers/media/common/videobuf2/Kconfig"
20+config VIDEO_TVEEPROM
21+ tristate
22+ depends on I2C
23+
2524 source "drivers/media/common/b2c2/Kconfig"
2625 source "drivers/media/common/saa7146/Kconfig"
2726 source "drivers/media/common/siano/Kconfig"
2827 source "drivers/media/common/v4l2-tpg/Kconfig"
28+source "drivers/media/common/videobuf2/Kconfig"
drivers/media/common/Makefile+5−2
@@ -1,6 +1,9 @@
11 # SPDX-License-Identifier: GPL-2.0-only
22 obj-y += b2c2/ saa7146/ siano/ v4l2-tpg/ videobuf2/
3−obj-$(CONFIG_VIDEO_CX2341X) += cx2341x.o
4−obj-$(CONFIG_VIDEO_TVEEPROM) += tveeprom.o
3+
4+# Please keep it alphabetically sorted by Kconfig name
5+# (e. g. LC_ALL=C sort Makefile)
56 obj-$(CONFIG_CYPRESS_FIRMWARE) += cypress_firmware.o
67 obj-$(CONFIG_TTPCI_EEPROM) += ttpci-eeprom.o
8+obj-$(CONFIG_VIDEO_CX2341X) += cx2341x.o
9+obj-$(CONFIG_VIDEO_TVEEPROM) += tveeprom.o
drivers/media/common/saa7146/Kconfig+1−1
@@ -5,6 +5,6 @@ config VIDEO_SAA7146 · 4 unmodified lines
55
66 config VIDEO_SAA7146_VV
77 tristate
8− depends on VIDEO_V4L2
8+ depends on VIDEO_DEV
99 select VIDEOBUF_DMA_SG
1010 select VIDEO_SAA7146
drivers/media/common/videobuf2/Makefile+5−3
@@ -6,10 +6,12 @@ ifeq ($(CONFIG_TRACEPOINTS),y) · 5 unmodified lines
66 videobuf2-common-objs += vb2-trace.o
77 endif
88
9+# Please keep it alphabetically sorted by Kconfig name
10+# (e. g. LC_ALL=C sort Makefile)
911 obj-$(CONFIG_VIDEOBUF2_CORE) += videobuf2-common.o
10−obj-$(CONFIG_VIDEOBUF2_V4L2) += videobuf2-v4l2.o
11−obj-$(CONFIG_VIDEOBUF2_MEMOPS) += videobuf2-memops.o
12−obj-$(CONFIG_VIDEOBUF2_VMALLOC) += videobuf2-vmalloc.o
1312 obj-$(CONFIG_VIDEOBUF2_DMA_CONTIG) += videobuf2-dma-contig.o
1413 obj-$(CONFIG_VIDEOBUF2_DMA_SG) += videobuf2-dma-sg.o
1514 obj-$(CONFIG_VIDEOBUF2_DVB) += videobuf2-dvb.o
15+obj-$(CONFIG_VIDEOBUF2_MEMOPS) += videobuf2-memops.o
16+obj-$(CONFIG_VIDEOBUF2_V4L2) += videobuf2-v4l2.o
17+obj-$(CONFIG_VIDEOBUF2_VMALLOC) += videobuf2-vmalloc.o
drivers/media/common/videobuf2/videobuf2-dma-contig.c+6−6
@@ -132,12 +132,12 @@ static void vb2_dc_prepare(void *buf_priv) · 131 unmodified lines
132132 if (!buf->non_coherent_mem)
133133 return;
134134
135− /* For both USERPTR and non-coherent MMAP */
136− dma_sync_sgtable_for_device(buf->dev, sgt, buf->dma_dir);
137−
138135 /* Non-coherent MMAP only */
139136 if (buf->vaddr)
140137 flush_kernel_vmap_range(buf->vaddr, buf->size);
138+
139+ /* For both USERPTR and non-coherent MMAP */
140+ dma_sync_sgtable_for_device(buf->dev, sgt, buf->dma_dir);
141141 }
142142
143143 static void vb2_dc_finish(void *buf_priv)
@@ -152,12 +152,12 @@ static void vb2_dc_finish(void *buf_priv) · 8 unmodified lines
152152 if (!buf->non_coherent_mem)
153153 return;
154154
155− /* For both USERPTR and non-coherent MMAP */
156− dma_sync_sgtable_for_cpu(buf->dev, sgt, buf->dma_dir);
157−
158155 /* Non-coherent MMAP only */
159156 if (buf->vaddr)
160157 invalidate_kernel_vmap_range(buf->vaddr, buf->size);
158+
159+ /* For both USERPTR and non-coherent MMAP */
160+ dma_sync_sgtable_for_cpu(buf->dev, sgt, buf->dma_dir);
161161 }
162162
163163 /*********************************************/
drivers/media/dvb-core/Kconfig+1−1
@@ -6,7 +6,7 @@ · 5 unmodified lines
66 config DVB_MMAP
77 bool "Enable DVB memory-mapped API (EXPERIMENTAL)"
88 depends on DVB_CORE
9− depends on VIDEO_V4L2=y || VIDEO_V4L2=DVB_CORE
9+ depends on VIDEO_DEV=y || VIDEO_DEV=DVB_CORE
1010 select VIDEOBUF2_VMALLOC
1111 help
1212 This option enables DVB experimental memory-mapped API, which
drivers/media/dvb-frontends/Kconfig+331−332
@@ -11,6 +11,23 @@ menu "Customise DVB Frontends" · 10 unmodified lines
1111 comment "Multistandard (satellite) frontends"
1212 depends on DVB_CORE
1313
14+config DVB_M88DS3103
15+ tristate "Montage Technology M88DS3103"
16+ depends on DVB_CORE && I2C && I2C_MUX
17+ select REGMAP_I2C
18+ default m if !MEDIA_SUBDRV_AUTOSELECT
19+ help
20+ Say Y when you want to support this frontend.
21+
22+config DVB_MXL5XX
23+ tristate "MaxLinear MxL5xx based tuner-demodulators"
24+ depends on DVB_CORE && I2C
25+ default m if !MEDIA_SUBDRV_AUTOSELECT
26+ help
27+ MaxLinear MxL5xx family of DVB-S/S2 tuners/demodulators.
28+
29+ Say Y when you want to support these frontends.
30+
1431 config DVB_STB0899
1532 tristate "STB0899 based"
1633 depends on DVB_CORE && I2C
@@ -60,23 +77,6 @@ config DVB_STV6111 · 43 unmodified lines
6077
6178 Say Y when you want to support these frontends.
6279
63−config DVB_MXL5XX
64− tristate "MaxLinear MxL5xx based tuner-demodulators"
65− depends on DVB_CORE && I2C
66− default m if !MEDIA_SUBDRV_AUTOSELECT
67− help
68− MaxLinear MxL5xx family of DVB-S/S2 tuners/demodulators.
69−
70− Say Y when you want to support these frontends.
71−
72−config DVB_M88DS3103
73− tristate "Montage Technology M88DS3103"
74− depends on DVB_CORE && I2C && I2C_MUX
75− select REGMAP_I2C
76− default m if !MEDIA_SUBDRV_AUTOSELECT
77− help
78− Say Y when you want to support this frontend.
79−
8080 comment "Multistandard (cable + terrestrial) frontends"
8181 depends on DVB_CORE
8282
@@ -89,40 +89,40 @@ config DVB_DRXK · 6 unmodified lines
8989
9090 Say Y when you want to support this frontend.
9191
92−config DVB_TDA18271C2DD
93− tristate "NXP TDA18271C2 silicon tuner"
92+config DVB_MN88472
93+ tristate "Panasonic MN88472"
9494 depends on DVB_CORE && I2C
95+ select REGMAP_I2C
9596 default m if !MEDIA_SUBDRV_AUTOSELECT
9697 help
97− NXP TDA18271 silicon tuner.
98−
99− Say Y when you want to support this tuner.
98+ Say Y when you want to support this frontend.
10099
101−config DVB_SI2165
102− tristate "Silicon Labs si2165 based"
100+config DVB_MN88473
101+ tristate "Panasonic MN88473"
103102 depends on DVB_CORE && I2C
104103 select REGMAP_I2C
105104 default m if !MEDIA_SUBDRV_AUTOSELECT
106105 help
107− A DVB-C/T demodulator.
108−
109106 Say Y when you want to support this frontend.
110107
111−config DVB_MN88472
112− tristate "Panasonic MN88472"
108+config DVB_SI2165
109+ tristate "Silicon Labs si2165 based"
113110 depends on DVB_CORE && I2C
114111 select REGMAP_I2C
115112 default m if !MEDIA_SUBDRV_AUTOSELECT
116113 help
114+ A DVB-C/T demodulator.
115+
117116 Say Y when you want to support this frontend.
118117
119−config DVB_MN88473
120− tristate "Panasonic MN88473"
118+config DVB_TDA18271C2DD
119+ tristate "NXP TDA18271C2 silicon tuner"
121120 depends on DVB_CORE && I2C
122− select REGMAP_I2C
123121 default m if !MEDIA_SUBDRV_AUTOSELECT
124122 help
125− Say Y when you want to support this frontend.
123+ NXP TDA18271 silicon tuner.
124+
125+ Say Y when you want to support this tuner.
126126
127127 comment "DVB-S (satellite) frontends"
128128 depends on DVB_CORE
@@ -134,6 +134,27 @@ config DVB_CX24110 · 5 unmodified lines
134134 help
135135 A DVB-S tuner module. Say Y when you want to support this frontend.
136136
137+config DVB_CX24116
138+ tristate "Conexant CX24116 based"
139+ depends on DVB_CORE && I2C
140+ default m if !MEDIA_SUBDRV_AUTOSELECT
141+ help
142+ A DVB-S/S2 tuner module. Say Y when you want to support this frontend.
143+
144+config DVB_CX24117
145+ tristate "Conexant CX24117 based"
146+ depends on DVB_CORE && I2C
147+ default m if !MEDIA_SUBDRV_AUTOSELECT
148+ help
149+ A Dual DVB-S/S2 tuner module. Say Y when you want to support this frontend.
150+
151+config DVB_CX24120
152+ tristate "Conexant CX24120 based"
153+ depends on DVB_CORE && I2C
154+ default m if !MEDIA_SUBDRV_AUTOSELECT
155+ help
156+ A DVB-S/S2 tuner module. Say Y when you want to support this frontend.
157+
137158 config DVB_CX24123
138159 tristate "Conexant CX24123 based"
139160 depends on DVB_CORE && I2C
@@ -141,22 +162,23 @@ config DVB_CX24123 · 1 unmodified line
141162 help
142163 A DVB-S tuner module. Say Y when you want to support this frontend.
143164
144−config DVB_MT312
145− tristate "Zarlink VP310/MT312/ZL10313 based"
165+config DVB_DS3000
166+ tristate "Montage Tehnology DS3000 based"
146167 depends on DVB_CORE && I2C
147168 default m if !MEDIA_SUBDRV_AUTOSELECT
148169 help
149− A DVB-S tuner module. Say Y when you want to support this frontend.
170+ A DVB-S/S2 tuner module. Say Y when you want to support this frontend.
150171
151−config DVB_ZL10036
152− tristate "Zarlink ZL10036 silicon tuner"
172+config DVB_MB86A16
173+ tristate "Fujitsu MB86A16 based"
153174 depends on DVB_CORE && I2C
154175 default m if !MEDIA_SUBDRV_AUTOSELECT
155176 help
156− A DVB-S tuner module. Say Y when you want to support this frontend.
177+ A DVB-S/DSS Direct Conversion reveiver.
178+ Say Y when you want to support this frontend.
157179
158−config DVB_ZL10039
159− tristate "Zarlink ZL10039 silicon tuner"
180+config DVB_MT312
181+ tristate "Zarlink VP310/MT312/ZL10313 based"
160182 depends on DVB_CORE && I2C
161183 default m if !MEDIA_SUBDRV_AUTOSELECT
162184 help
@@ -169,8 +191,8 @@ config DVB_S5H1420 · 6 unmodified lines
169191 help
170192 A DVB-S tuner module. Say Y when you want to support this frontend.
171193
172−config DVB_STV0288
173− tristate "ST STV0288 based"
194+config DVB_SI21XX
195+ tristate "Silicon Labs SI21XX based"
174196 depends on DVB_CORE && I2C
175197 default m if !MEDIA_SUBDRV_AUTOSELECT
176198 help
@@ -183,19 +205,19 @@ config DVB_STB6000 · 6 unmodified lines
183205 help
184206 A DVB-S silicon tuner module. Say Y when you want to support this tuner.
185207
186−config DVB_STV0299
187− tristate "ST STV0299 based"
208+config DVB_STV0288
209+ tristate "ST STV0288 based"
188210 depends on DVB_CORE && I2C
189211 default m if !MEDIA_SUBDRV_AUTOSELECT
190212 help
191213 A DVB-S tuner module. Say Y when you want to support this frontend.
192214
193−config DVB_STV6110
194− tristate "ST STV6110 silicon tuner"
215+config DVB_STV0299
216+ tristate "ST STV0299 based"
195217 depends on DVB_CORE && I2C
196218 default m if !MEDIA_SUBDRV_AUTOSELECT
197219 help
198− A DVB-S silicon tuner module. Say Y when you want to support this tuner.
220+ A DVB-S tuner module. Say Y when you want to support this frontend.
199221
200222 config DVB_STV0900
201223 tristate "ST STV0900 based"
@@ -204,49 +226,42 @@ config DVB_STV0900 · 2 unmodified lines
204226 help
205227 A DVB-S/S2 demodulator. Say Y when you want to support this frontend.
206228
207−config DVB_TDA8083
208− tristate "Philips TDA8083 based"
209− depends on DVB_CORE && I2C
210− default m if !MEDIA_SUBDRV_AUTOSELECT
211− help
212− A DVB-S tuner module. Say Y when you want to support this frontend.
213−
214−config DVB_TDA10086
215− tristate "Philips TDA10086 based"
229+config DVB_STV6110
230+ tristate "ST STV6110 silicon tuner"
216231 depends on DVB_CORE && I2C
217232 default m if !MEDIA_SUBDRV_AUTOSELECT
218233 help
219− A DVB-S tuner module. Say Y when you want to support this frontend.
234+ A DVB-S silicon tuner module. Say Y when you want to support this tuner.
220235
221−config DVB_TDA8261
222− tristate "Philips TDA8261 based"
236+config DVB_TDA10071
237+ tristate "NXP TDA10071"
223238 depends on DVB_CORE && I2C
239+ select REGMAP_I2C
224240 default m if !MEDIA_SUBDRV_AUTOSELECT
225241 help
226− A DVB-S tuner module. Say Y when you want to support this frontend.
242+ Say Y when you want to support this frontend.
227243
228−config DVB_VES1X93
229− tristate "VLSI VES1893 or VES1993 based"
244+config DVB_TDA10086
245+ tristate "Philips TDA10086 based"
230246 depends on DVB_CORE && I2C
231247 default m if !MEDIA_SUBDRV_AUTOSELECT
232248 help
233249 A DVB-S tuner module. Say Y when you want to support this frontend.
234250
235−config DVB_TUNER_ITD1000
236− tristate "Integrant ITD1000 Zero IF tuner for DVB-S/DSS"
251+config DVB_TDA8083
252+ tristate "Philips TDA8083 based"
237253 depends on DVB_CORE && I2C
238254 default m if !MEDIA_SUBDRV_AUTOSELECT
239255 help
240256 A DVB-S tuner module. Say Y when you want to support this frontend.
241257
242−config DVB_TUNER_CX24113
243− tristate "Conexant CX24113/CX24128 tuner for DVB-S/DSS"
258+config DVB_TDA8261
259+ tristate "Philips TDA8261 based"
244260 depends on DVB_CORE && I2C
245261 default m if !MEDIA_SUBDRV_AUTOSELECT
246262 help
247263 A DVB-S tuner module. Say Y when you want to support this frontend.
248264
249−
250265 config DVB_TDA826X
251266 tristate "Philips TDA826X silicon tuner"
252267 depends on DVB_CORE && I2C
@@ -254,86 +269,71 @@ config DVB_TDA826X · 1 unmodified line
254269 help
255270 A DVB-S silicon tuner module. Say Y when you want to support this tuner.
256271
257−config DVB_TUA6100
258− tristate "Infineon TUA6100 PLL"
259− depends on DVB_CORE && I2C
260− default m if !MEDIA_SUBDRV_AUTOSELECT
261− help
262− A DVB-S PLL chip.
263−
264−config DVB_CX24116
265− tristate "Conexant CX24116 based"
266− depends on DVB_CORE && I2C
267− default m if !MEDIA_SUBDRV_AUTOSELECT
268− help
269− A DVB-S/S2 tuner module. Say Y when you want to support this frontend.
270−
271−config DVB_CX24117
272− tristate "Conexant CX24117 based"
272+config DVB_TS2020
273+ tristate "Montage Tehnology TS2020 based tuners"
273274 depends on DVB_CORE && I2C
275+ select REGMAP_I2C
274276 default m if !MEDIA_SUBDRV_AUTOSELECT
275277 help
276− A Dual DVB-S/S2 tuner module. Say Y when you want to support this frontend.
278+ A DVB-S/S2 silicon tuner. Say Y when you want to support this tuner.
277279
278−config DVB_CX24120
279− tristate "Conexant CX24120 based"
280+config DVB_TUA6100
281+ tristate "Infineon TUA6100 PLL"
280282 depends on DVB_CORE && I2C
281283 default m if !MEDIA_SUBDRV_AUTOSELECT
282284 help
283− A DVB-S/S2 tuner module. Say Y when you want to support this frontend.
285+ A DVB-S PLL chip.
284286
285−config DVB_SI21XX
286− tristate "Silicon Labs SI21XX based"
287+config DVB_TUNER_CX24113
288+ tristate "Conexant CX24113/CX24128 tuner for DVB-S/DSS"
287289 depends on DVB_CORE && I2C
288290 default m if !MEDIA_SUBDRV_AUTOSELECT
289291 help
290292 A DVB-S tuner module. Say Y when you want to support this frontend.
291293
292−config DVB_TS2020
293− tristate "Montage Tehnology TS2020 based tuners"
294+config DVB_TUNER_ITD1000
295+ tristate "Integrant ITD1000 Zero IF tuner for DVB-S/DSS"
294296 depends on DVB_CORE && I2C
295− select REGMAP_I2C
296297 default m if !MEDIA_SUBDRV_AUTOSELECT
297298 help
298− A DVB-S/S2 silicon tuner. Say Y when you want to support this tuner.
299+ A DVB-S tuner module. Say Y when you want to support this frontend.
299300
300−config DVB_DS3000
301− tristate "Montage Tehnology DS3000 based"
301+config DVB_VES1X93
302+ tristate "VLSI VES1893 or VES1993 based"
302303 depends on DVB_CORE && I2C
303304 default m if !MEDIA_SUBDRV_AUTOSELECT
304305 help
305− A DVB-S/S2 tuner module. Say Y when you want to support this frontend.
306+ A DVB-S tuner module. Say Y when you want to support this frontend.
306307
307−config DVB_MB86A16
308− tristate "Fujitsu MB86A16 based"
308+config DVB_ZL10036
309+ tristate "Zarlink ZL10036 silicon tuner"
309310 depends on DVB_CORE && I2C
310311 default m if !MEDIA_SUBDRV_AUTOSELECT
311312 help
312− A DVB-S/DSS Direct Conversion reveiver.
313− Say Y when you want to support this frontend.
313+ A DVB-S tuner module. Say Y when you want to support this frontend.
314314
315−config DVB_TDA10071
316− tristate "NXP TDA10071"
315+config DVB_ZL10039
316+ tristate "Zarlink ZL10039 silicon tuner"
317317 depends on DVB_CORE && I2C
318− select REGMAP_I2C
319318 default m if !MEDIA_SUBDRV_AUTOSELECT
320319 help
321− Say Y when you want to support this frontend.
320+ A DVB-S tuner module. Say Y when you want to support this frontend.
322321
323322 comment "DVB-T (terrestrial) frontends"
324323 depends on DVB_CORE
325324
326−config DVB_SP887X
327− tristate "Spase sp887x based"
328− depends on DVB_CORE && I2C
325+config DVB_AF9013
326+ tristate "Afatech AF9013 demodulator"
327+ depends on DVB_CORE && I2C && I2C_MUX
328+ select REGMAP
329329 default m if !MEDIA_SUBDRV_AUTOSELECT
330330 help
331− A DVB-T tuner module. Say Y when you want to support this frontend.
331+ Say Y when you want to support this frontend.
332332
333− This driver needs external firmware. Please use the command
334− "<kerneldir>/scripts/get_dvb_firmware sp887x" to
335− download/extract it, and then copy it to /usr/lib/hotplug/firmware
336− or /lib/firmware (depending on configuration of firmware hotplug).
333+config DVB_AS102_FE
334+ tristate
335+ depends on DVB_CORE
336+ default DVB_AS102
337337
338338 config DVB_CX22700
339339 tristate "Conexant CX22700 based"
@@ -349,80 +349,36 @@ config DVB_CX22702 · 9 unmodified lines
349349 help
350350 A DVB-T tuner module. Say Y when you want to support this frontend.
351351
352−config DVB_S5H1432
353− tristate "Samsung s5h1432 demodulator (OFDM)"
352+config DVB_CXD2820R
353+ tristate "Sony CXD2820R"
354354 depends on DVB_CORE && I2C
355+ select REGMAP_I2C
355356 default m if !MEDIA_SUBDRV_AUTOSELECT
356357 help
357− A DVB-T tuner module. Say Y when you want to support this frontend.
358+ Say Y when you want to support this frontend.
358359
359−config DVB_DRXD
360− tristate "Micronas DRXD driver"
360+config DVB_CXD2841ER
361+ tristate "Sony CXD2841ER"
361362 depends on DVB_CORE && I2C
362363 default m if !MEDIA_SUBDRV_AUTOSELECT
363364 help
364− A DVB-T tuner module. Say Y when you want to support this frontend.
365−
366− Note: this driver was based on vendor driver reference code (released
367− under the GPL) as opposed to the existing drx397xd driver, which
368− was written via reverse engineering.
365+ Say Y when you want to support this frontend.
369366
370−config DVB_L64781
371− tristate "LSI L64781"
367+config DVB_DIB3000MB
368+ tristate "DiBcom 3000M-B"
372369 depends on DVB_CORE && I2C
373370 default m if !MEDIA_SUBDRV_AUTOSELECT
374371 help
375− A DVB-T tuner module. Say Y when you want to support this frontend.
372+ A DVB-T tuner module. Designed for mobile usage. Say Y when you want
373+ to support this frontend.
376374
377−config DVB_TDA1004X
378− tristate "Philips TDA10045H/TDA10046H based"
375+config DVB_DIB3000MC
376+ tristate "DiBcom 3000P/M-C"
379377 depends on DVB_CORE && I2C
380378 default m if !MEDIA_SUBDRV_AUTOSELECT
381379 help
382− A DVB-T tuner module. Say Y when you want to support this frontend.
383−
384− This driver needs external firmware. Please use the commands
385− "<kerneldir>/scripts/get_dvb_firmware tda10045",
386− "<kerneldir>/scripts/get_dvb_firmware tda10046" to
387− download/extract them, and then copy them to /usr/lib/hotplug/firmware
388− or /lib/firmware (depending on configuration of firmware hotplug).
389−
390−config DVB_NXT6000
391− tristate "NxtWave Communications NXT6000 based"
392− depends on DVB_CORE && I2C
393− default m if !MEDIA_SUBDRV_AUTOSELECT
394− help
395− A DVB-T tuner module. Say Y when you want to support this frontend.
396−
397−config DVB_MT352
398− tristate "Zarlink MT352 based"
399− depends on DVB_CORE && I2C
400− default m if !MEDIA_SUBDRV_AUTOSELECT
401− help
402− A DVB-T tuner module. Say Y when you want to support this frontend.
403−
404−config DVB_ZL10353
405− tristate "Zarlink ZL10353 based"
406− depends on DVB_CORE && I2C
407− default m if !MEDIA_SUBDRV_AUTOSELECT
408− help
409− A DVB-T tuner module. Say Y when you want to support this frontend.
410−
411−config DVB_DIB3000MB
412− tristate "DiBcom 3000M-B"
413− depends on DVB_CORE && I2C
414− default m if !MEDIA_SUBDRV_AUTOSELECT
415− help
416− A DVB-T tuner module. Designed for mobile usage. Say Y when you want
417− to support this frontend.
418−
419−config DVB_DIB3000MC
420− tristate "DiBcom 3000P/M-C"
421− depends on DVB_CORE && I2C
422− default m if !MEDIA_SUBDRV_AUTOSELECT
423− help
424− A DVB-T tuner module. Designed for mobile usage. Say Y when you want
425− to support this frontend.
380+ A DVB-T tuner module. Designed for mobile usage. Say Y when you want
381+ to support this frontend.
426382
427383 config DVB_DIB7000M
428384 tristate "DiBcom 7000MA/MB/PA/PB/MC"
@@ -448,20 +404,16 @@ config DVB_DIB9000 · 19 unmodified lines
448404 A DVB-T tuner module. Designed for mobile usage. Say Y when you want
449405 to support this frontend.
450406
451−config DVB_TDA10048
452− tristate "Philips TDA10048HN based"
407+config DVB_DRXD
408+ tristate "Micronas DRXD driver"
453409 depends on DVB_CORE && I2C
454410 default m if !MEDIA_SUBDRV_AUTOSELECT
455411 help
456412 A DVB-T tuner module. Say Y when you want to support this frontend.
457413
458−config DVB_AF9013
459− tristate "Afatech AF9013 demodulator"
460− depends on DVB_CORE && I2C && I2C_MUX
461− select REGMAP
462− default m if !MEDIA_SUBDRV_AUTOSELECT
463− help
464− Say Y when you want to support this frontend.
414+ Note: this driver was based on vendor driver reference code (released
415+ under the GPL) as opposed to the existing drx397xd driver, which
416+ was written via reverse engineering.
465417
466418 config DVB_EC100
467419 tristate "E3C EC100"
@@ -470,27 +422,31 @@ config DVB_EC100 · 2 unmodified lines
470422 help
471423 Say Y when you want to support this frontend.
472424
473−config DVB_STV0367
474− tristate "ST STV0367 based"
425+config DVB_GP8PSK_FE
426+ tristate
427+ depends on DVB_CORE
428+ default DVB_USB_GP8PSK
429+
430+config DVB_L64781
431+ tristate "LSI L64781"
475432 depends on DVB_CORE && I2C
476433 default m if !MEDIA_SUBDRV_AUTOSELECT
477434 help
478− A DVB-T/C tuner module. Say Y when you want to support this frontend.
435+ A DVB-T tuner module. Say Y when you want to support this frontend.
479436
480−config DVB_CXD2820R
481− tristate "Sony CXD2820R"
437+config DVB_MT352
438+ tristate "Zarlink MT352 based"
482439 depends on DVB_CORE && I2C
483− select REGMAP_I2C
484440 default m if !MEDIA_SUBDRV_AUTOSELECT
485441 help
486− Say Y when you want to support this frontend.
442+ A DVB-T tuner module. Say Y when you want to support this frontend.
487443
488−config DVB_CXD2841ER
489− tristate "Sony CXD2841ER"
444+config DVB_NXT6000
445+ tristate "NxtWave Communications NXT6000 based"
490446 depends on DVB_CORE && I2C
491447 default m if !MEDIA_SUBDRV_AUTOSELECT
492448 help
493− Say Y when you want to support this frontend.
449+ A DVB-T tuner module. Say Y when you want to support this frontend.
494450
495451 config DVB_RTL2830
496452 tristate "Realtek RTL2830 DVB-T"
@@ -510,13 +466,20 @@ config DVB_RTL2832 · 13 unmodified lines
510466
511467 config DVB_RTL2832_SDR
512468 tristate "Realtek RTL2832 SDR"
513− depends on DVB_CORE && I2C && I2C_MUX && VIDEO_V4L2 && MEDIA_SDR_SUPPORT && USB
469+ depends on DVB_CORE && I2C && I2C_MUX && VIDEO_DEV && MEDIA_SDR_SUPPORT && USB
514470 select DVB_RTL2832
515471 select VIDEOBUF2_VMALLOC
516472 default m if !MEDIA_SUBDRV_AUTOSELECT
517473 help
518474 Say Y when you want to support this SDR module.
519475
476+config DVB_S5H1432
477+ tristate "Samsung s5h1432 demodulator (OFDM)"
478+ depends on DVB_CORE && I2C
479+ default m if !MEDIA_SUBDRV_AUTOSELECT
480+ help
481+ A DVB-T tuner module. Say Y when you want to support this frontend.
482+
520483 config DVB_SI2168
521484 tristate "Silicon Labs Si2168"
522485 depends on DVB_CORE && I2C && I2C_MUX
@@ -524,10 +487,44 @@ config DVB_SI2168 · 1 unmodified line
524487 help
525488 Say Y when you want to support this frontend.
526489
527−config DVB_AS102_FE
528− tristate
529− depends on DVB_CORE
530− default DVB_AS102
490+config DVB_SP887X
491+ tristate "Spase sp887x based"
492+ depends on DVB_CORE && I2C
493+ default m if !MEDIA_SUBDRV_AUTOSELECT
494+ help
495+ A DVB-T tuner module. Say Y when you want to support this frontend.
496+
497+ This driver needs external firmware. Please use the command
498+ "<kerneldir>/scripts/get_dvb_firmware sp887x" to
499+ download/extract it, and then copy it to /usr/lib/hotplug/firmware
500+ or /lib/firmware (depending on configuration of firmware hotplug).
501+
502+config DVB_STV0367
503+ tristate "ST STV0367 based"
504+ depends on DVB_CORE && I2C
505+ default m if !MEDIA_SUBDRV_AUTOSELECT
506+ help
507+ A DVB-T/C tuner module. Say Y when you want to support this frontend.
508+
509+config DVB_TDA10048
510+ tristate "Philips TDA10048HN based"
511+ depends on DVB_CORE && I2C
512+ default m if !MEDIA_SUBDRV_AUTOSELECT
513+ help
514+ A DVB-T tuner module. Say Y when you want to support this frontend.
515+
516+config DVB_TDA1004X
517+ tristate "Philips TDA10045H/TDA10046H based"
518+ depends on DVB_CORE && I2C
519+ default m if !MEDIA_SUBDRV_AUTOSELECT
520+ help
521+ A DVB-T tuner module. Say Y when you want to support this frontend.
522+
523+ This driver needs external firmware. Please use the commands
524+ "<kerneldir>/scripts/get_dvb_firmware tda10045",
525+ "<kerneldir>/scripts/get_dvb_firmware tda10046" to
526+ download/extract them, and then copy them to /usr/lib/hotplug/firmware
527+ or /lib/firmware (depending on configuration of firmware hotplug).
531528
532529 config DVB_ZD1301_DEMOD
533530 tristate "ZyDAS ZD1301"
@@ -536,18 +533,20 @@ config DVB_ZD1301_DEMOD · 2 unmodified lines
536533 help
537534 Say Y when you want to support this frontend.
538535
539−config DVB_GP8PSK_FE
540− tristate
541− depends on DVB_CORE
542− default DVB_USB_GP8PSK
536+config DVB_ZL10353
537+ tristate "Zarlink ZL10353 based"
538+ depends on DVB_CORE && I2C
539+ default m if !MEDIA_SUBDRV_AUTOSELECT
540+ help
541+ A DVB-T tuner module. Say Y when you want to support this frontend.
543542
544543 source "drivers/media/dvb-frontends/cxd2880/Kconfig"
545544
546545 comment "DVB-C (cable) frontends"
547546 depends on DVB_CORE
548547
549−config DVB_VES1820
550− tristate "VLSI VES1820 based"
548+config DVB_STV0297
549+ tristate "ST STV0297 based"
551550 depends on DVB_CORE && I2C
552551 default m if !MEDIA_SUBDRV_AUTOSELECT
553552 help
@@ -567,8 +566,8 @@ config DVB_TDA10023 · 13 unmodified lines
567566 help
568567 A DVB-C tuner module. Say Y when you want to support this frontend.
569568
570−config DVB_STV0297
571− tristate "ST STV0297 based"
569+config DVB_VES1820
570+ tristate "VLSI VES1820 based"
572571 depends on DVB_CORE && I2C
573572 default m if !MEDIA_SUBDRV_AUTOSELECT
574573 help
@@ -577,46 +576,27 @@ config DVB_STV0297 · 2 unmodified lines
577576 comment "ATSC (North American/Korean Terrestrial/Cable DTV) frontends"
578577 depends on DVB_CORE
579578
580−config DVB_NXT200X
581− tristate "NxtWave Communications NXT2002/NXT2004 based"
579+config DVB_AU8522
582580 depends on DVB_CORE && I2C
583− default m if !MEDIA_SUBDRV_AUTOSELECT
584− help
585− An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want
586− to support this frontend.
587−
588− This driver needs external firmware. Please use the commands
589− "<kerneldir>/scripts/get_dvb_firmware nxt2002" and
590− "<kerneldir>/scripts/get_dvb_firmware nxt2004" to
591− download/extract them, and then copy them to /usr/lib/hotplug/firmware
592− or /lib/firmware (depending on configuration of firmware hotplug).
581+ tristate
593582
594−config DVB_OR51211
595− tristate "Oren OR51211 based"
583+config DVB_AU8522_DTV
584+ tristate "Auvitek AU8522 based DTV demod"
596585 depends on DVB_CORE && I2C
586+ select DVB_AU8522
597587 default m if !MEDIA_SUBDRV_AUTOSELECT
598588 help
599− An ATSC 8VSB tuner module. Say Y when you want to support this frontend.
600−
601− This driver needs external firmware. Please use the command
602− "<kerneldir>/scripts/get_dvb_firmware or51211" to
603− download it, and then copy it to /usr/lib/hotplug/firmware
604− or /lib/firmware (depending on configuration of firmware hotplug).
589+ An ATSC 8VSB, QAM64/256 & NTSC demodulator module. Say Y when
590+ you want to enable DTV demodulation support for this frontend.
605591
606−config DVB_OR51132
607− tristate "Oren OR51132 based"
608− depends on DVB_CORE && I2C
592+config DVB_AU8522_V4L
593+ tristate "Auvitek AU8522 based ATV demod"
594+ depends on VIDEO_DEV && DVB_CORE && I2C
595+ select DVB_AU8522
609596 default m if !MEDIA_SUBDRV_AUTOSELECT
610597 help
611− An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want
612− to support this frontend.
613−
614− This driver needs external firmware. Please use the commands
615− "<kerneldir>/scripts/get_dvb_firmware or51132_vsb" and/or
616− "<kerneldir>/scripts/get_dvb_firmware or51132_qam" to
617− download firmwares for 8VSB and QAM64/256, respectively. Copy them to
618− /usr/lib/hotplug/firmware or /lib/firmware (depending on
619− configuration of firmware hotplug).
598+ An ATSC 8VSB, QAM64/256 & NTSC demodulator module. Say Y when
599+ you want to enable ATV demodulation support for this frontend.
620600
621601 config DVB_BCM3510
622602 tristate "Broadcom BCM3510"
@@ -626,12 +606,12 @@ config DVB_BCM3510 · 3 unmodified lines
626606 An ATSC 8VSB/16VSB and QAM64/256 tuner module. Say Y when you want to
627607 support this frontend.
628608
629−config DVB_LGDT330X
630− tristate "LG Electronics LGDT3302/LGDT3303 based"
609+config DVB_LG2160
610+ tristate "LG Electronics LG216x based"
631611 depends on DVB_CORE && I2C
632612 default m if !MEDIA_SUBDRV_AUTOSELECT
633613 help
634− An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want
614+ An ATSC/MH demodulator module. Say Y when you want
635615 to support this frontend.
636616
637617 config DVB_LGDT3305
@@ -650,72 +630,83 @@ config DVB_LGDT3306A · 12 unmodified lines
650630 An ATSC 8VSB and QAM-B 64/256 demodulator module. Say Y when you want
651631 to support this frontend.
652632
653−config DVB_LG2160
654− tristate "LG Electronics LG216x based"
633+config DVB_LGDT330X
634+ tristate "LG Electronics LGDT3302/LGDT3303 based"
655635 depends on DVB_CORE && I2C
656636 default m if !MEDIA_SUBDRV_AUTOSELECT
657637 help
658− An ATSC/MH demodulator module. Say Y when you want
638+ An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want
659639 to support this frontend.
660640
661−config DVB_S5H1409
662− tristate "Samsung S5H1409 based"
641+config DVB_MXL692
642+ tristate "MaxLinear MXL692 based"
643+ depends on DVB_CORE && I2C
644+ default m if !MEDIA_SUBDRV_AUTOSELECT
645+ help
646+ MaxLinear MxL692 is a combo tuner-demodulator that
647+ supports ATSC 8VSB and QAM modes. Say Y when you want to
648+ support this frontend.
649+
650+config DVB_NXT200X
651+ tristate "NxtWave Communications NXT2002/NXT2004 based"
663652 depends on DVB_CORE && I2C
664653 default m if !MEDIA_SUBDRV_AUTOSELECT
665654 help
666655 An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want
667656 to support this frontend.
668657
669−config DVB_AU8522
670− depends on DVB_CORE && I2C
671− tristate
658+ This driver needs external firmware. Please use the commands
659+ "<kerneldir>/scripts/get_dvb_firmware nxt2002" and
660+ "<kerneldir>/scripts/get_dvb_firmware nxt2004" to
661+ download/extract them, and then copy them to /usr/lib/hotplug/firmware
662+ or /lib/firmware (depending on configuration of firmware hotplug).
672663
673−config DVB_AU8522_DTV
674− tristate "Auvitek AU8522 based DTV demod"
664+config DVB_OR51132
665+ tristate "Oren OR51132 based"
675666 depends on DVB_CORE && I2C
676− select DVB_AU8522
677667 default m if !MEDIA_SUBDRV_AUTOSELECT
678668 help
679− An ATSC 8VSB, QAM64/256 & NTSC demodulator module. Say Y when
680− you want to enable DTV demodulation support for this frontend.
669+ An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want
670+ to support this frontend.
681671
682−config DVB_AU8522_V4L
683− tristate "Auvitek AU8522 based ATV demod"
684− depends on VIDEO_V4L2 && DVB_CORE && I2C
685− select DVB_AU8522
672+ This driver needs external firmware. Please use the commands
673+ "<kerneldir>/scripts/get_dvb_firmware or51132_vsb" and/or
674+ "<kerneldir>/scripts/get_dvb_firmware or51132_qam" to
675+ download firmwares for 8VSB and QAM64/256, respectively. Copy them to
676+ /usr/lib/hotplug/firmware or /lib/firmware (depending on
677+ configuration of firmware hotplug).
678+
679+config DVB_OR51211
680+ tristate "Oren OR51211 based"
681+ depends on DVB_CORE && I2C
686682 default m if !MEDIA_SUBDRV_AUTOSELECT
687683 help
688− An ATSC 8VSB, QAM64/256 & NTSC demodulator module. Say Y when
689− you want to enable ATV demodulation support for this frontend.
684+ An ATSC 8VSB tuner module. Say Y when you want to support this frontend.
690685
691−config DVB_S5H1411
692− tristate "Samsung S5H1411 based"
686+ This driver needs external firmware. Please use the command
687+ "<kerneldir>/scripts/get_dvb_firmware or51211" to
688+ download it, and then copy it to /usr/lib/hotplug/firmware
689+ or /lib/firmware (depending on configuration of firmware hotplug).
690+
691+config DVB_S5H1409
692+ tristate "Samsung S5H1409 based"
693693 depends on DVB_CORE && I2C
694694 default m if !MEDIA_SUBDRV_AUTOSELECT
695695 help
696696 An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want
697697 to support this frontend.
698698
699−config DVB_MXL692
700− tristate "MaxLinear MXL692 based"
699+config DVB_S5H1411
700+ tristate "Samsung S5H1411 based"
701701 depends on DVB_CORE && I2C
702702 default m if !MEDIA_SUBDRV_AUTOSELECT
703703 help
704− MaxLinear MxL692 is a combo tuner-demodulator that
705− supports ATSC 8VSB and QAM modes. Say Y when you want to
706− support this frontend.
704+ An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want
705+ to support this frontend.
707706
708707 comment "ISDB-T (terrestrial) frontends"
709708 depends on DVB_CORE
710709
711−config DVB_S921
712− tristate "Sharp S921 frontend"
713− depends on DVB_CORE && I2C
714− default m if !MEDIA_SUBDRV_AUTOSELECT
715− help
716− AN ISDB-T DQPSK, QPSK, 16QAM and 64QAM 1seg tuner module.
717− Say Y when you want to support this frontend.
718−
719710 config DVB_DIB8000
720711 tristate "DiBcom 8000MB/MC"
721712 depends on DVB_CORE && I2C
@@ -732,17 +723,17 @@ config DVB_MB86A20S · 10 unmodified lines
732723 A driver for Fujitsu mb86a20s ISDB-T/ISDB-Tsb demodulator.
733724 Say Y when you want to support this frontend.
734725
735−comment "ISDB-S (satellite) & ISDB-T (terrestrial) frontends"
736− depends on DVB_CORE
737−
738−config DVB_TC90522
739− tristate "Toshiba TC90522"
726+config DVB_S921
727+ tristate "Sharp S921 frontend"
740728 depends on DVB_CORE && I2C
741729 default m if !MEDIA_SUBDRV_AUTOSELECT
742730 help
743− Toshiba TC90522 2xISDB-S 8PSK + 2xISDB-T OFDM demodulator.
731+ AN ISDB-T DQPSK, QPSK, 16QAM and 64QAM 1seg tuner module.
744732 Say Y when you want to support this frontend.
745733
734+comment "ISDB-S (satellite) & ISDB-T (terrestrial) frontends"
735+ depends on DVB_CORE
736+
746737 config DVB_MN88443X
747738 tristate "Socionext MN88443x"
748739 depends on DVB_CORE && I2C
@@ -753,6 +744,14 @@ config DVB_MN88443X · 4 unmodified lines
753744 ISDB-S + ISDB-T demodulator.
754745 Say Y when you want to support this frontend.
755746
747+config DVB_TC90522
748+ tristate "Toshiba TC90522"
749+ depends on DVB_CORE && I2C
750+ default m if !MEDIA_SUBDRV_AUTOSELECT
751+ help
752+ Toshiba TC90522 2xISDB-S 8PSK + 2xISDB-T OFDM demodulator.
753+ Say Y when you want to support this frontend.
754+
756755 comment "Digital terrestrial only tuners/PLL"
757756 depends on DVB_CORE
758757
@@ -785,42 +784,44 @@ config DVB_TUNER_DIB0090 · 26 unmodified lines
785784 comment "SEC control devices for DVB-S"
786785 depends on DVB_CORE
787786
788−source "drivers/media/dvb-frontends/drx39xyj/Kconfig"
787+config DVB_A8293
788+ tristate "Allegro A8293"
789+ depends on DVB_CORE && I2C
790+ default m if !MEDIA_SUBDRV_AUTOSELECT
789791
790−config DVB_LNBH25
791− tristate "LNBH25 SEC controller"
792+config DVB_AF9033
793+ tristate "Afatech AF9033 DVB-T demodulator"
794+ depends on DVB_CORE && I2C
795+ select REGMAP_I2C
796+ default m if !MEDIA_SUBDRV_AUTOSELECT
797+
798+config DVB_ASCOT2E
799+ tristate "Sony Ascot2E tuner"
792800 depends on DVB_CORE && I2C
793801 default m if !MEDIA_SUBDRV_AUTOSELECT
794802 help
795− An SEC control chip.
796− Say Y when you want to support this chip.
803+ Say Y when you want to support this frontend.
797804
798−config DVB_LNBH29
799− tristate "LNBH29 SEC controller"
805+config DVB_ATBM8830
806+ tristate "AltoBeam ATBM8830/8831 DMB-TH demodulator"
800807 depends on DVB_CORE && I2C
801808 default m if !MEDIA_SUBDRV_AUTOSELECT
802809 help
803− LNB power supply and control voltage
804− regulator chip with step-up converter
805− and I2C interface for STMicroelectronics LNBH29.
806− Say Y when you want to support this chip.
810+ A DMB-TH tuner module. Say Y when you want to support this frontend.
807811
808−config DVB_LNBP21
809− tristate "LNBP21/LNBH24 SEC controllers"
812+config DVB_HELENE
813+ tristate "Sony HELENE Sat/Ter tuner (CXD2858ER)"
810814 depends on DVB_CORE && I2C
811815 default m if !MEDIA_SUBDRV_AUTOSELECT
812816 help
813− An SEC control chips.
817+ Say Y when you want to support this frontend.
814818
815−config DVB_LNBP22
816− tristate "LNBP22 SEC controllers"
819+config DVB_HORUS3A
820+ tristate "Sony Horus3A tuner"
817821 depends on DVB_CORE && I2C
818822 default m if !MEDIA_SUBDRV_AUTOSELECT
819823 help
820− LNB power supply and control voltage
821− regulator chip with step-up converter
822− and I2C interface.
823− Say Y when you want to support this chip.
824+ Say Y when you want to support this frontend.
824825
825826 config DVB_ISL6405
826827 tristate "ISL6405 SEC controller"
@@ -843,10 +844,12 @@ config DVB_ISL6423 · 16 unmodified lines
843844 help
844845 A SEC controller chip from Intersil
845846
846−config DVB_A8293
847− tristate "Allegro A8293"
847+config DVB_IX2505V
848+ tristate "Sharp IX2505V silicon tuner"
848849 depends on DVB_CORE && I2C
849850 default m if !MEDIA_SUBDRV_AUTOSELECT
851+ help
852+ A DVB-S tuner module. Say Y when you want to support this frontend.
850853
851854 config DVB_LGS8GL5
852855 tristate "Silicon Legend LGS-8GL5 demodulator (OFDM)"
@@ -863,30 +866,40 @@ config DVB_LGS8GXX · 10 unmodified lines
863866 help
864867 A DMB-TH tuner module. Say Y when you want to support this frontend.
865868
866−config DVB_ATBM8830
867− tristate "AltoBeam ATBM8830/8831 DMB-TH demodulator"
869+config DVB_LNBH25
870+ tristate "LNBH25 SEC controller"
868871 depends on DVB_CORE && I2C
869872 default m if !MEDIA_SUBDRV_AUTOSELECT
870873 help
871− A DMB-TH tuner module. Say Y when you want to support this frontend.
874+ An SEC control chip.
875+ Say Y when you want to support this chip.
872876
873−config DVB_TDA665x
874− tristate "TDA665x tuner"
877+config DVB_LNBH29
878+ tristate "LNBH29 SEC controller"
875879 depends on DVB_CORE && I2C
876880 default m if !MEDIA_SUBDRV_AUTOSELECT
877881 help
878− Support for tuner modules based on Philips TDA6650/TDA6651 chips.
882+ LNB power supply and control voltage
883+ regulator chip with step-up converter
884+ and I2C interface for STMicroelectronics LNBH29.
879885 Say Y when you want to support this chip.
880886
881− Currently supported tuners:
882− * Panasonic ENV57H12D5 (ET-50DT)
887+config DVB_LNBP21
888+ tristate "LNBP21/LNBH24 SEC controllers"
889+ depends on DVB_CORE && I2C
890+ default m if !MEDIA_SUBDRV_AUTOSELECT
891+ help
892+ An SEC control chips.
883893
884−config DVB_IX2505V
885− tristate "Sharp IX2505V silicon tuner"
894+config DVB_LNBP22
895+ tristate "LNBP22 SEC controllers"
886896 depends on DVB_CORE && I2C
887897 default m if !MEDIA_SUBDRV_AUTOSELECT
888898 help
889− A DVB-S tuner module. Say Y when you want to support this frontend.
899+ LNB power supply and control voltage
900+ regulator chip with step-up converter
901+ and I2C interface.
902+ Say Y when you want to support this chip.
890903
891904 config DVB_M88RS2000
892905 tristate "M88RS2000 DVB-S demodulator and tuner"
@@ -896,32 +909,18 @@ config DVB_M88RS2000 · 3 unmodified lines
896909 A DVB-S tuner module.
897910 Say Y when you want to support this frontend.
898911
899−config DVB_AF9033
900− tristate "Afatech AF9033 DVB-T demodulator"
901− depends on DVB_CORE && I2C
902− select REGMAP_I2C
903− default m if !MEDIA_SUBDRV_AUTOSELECT
904−
905−config DVB_HORUS3A
906− tristate "Sony Horus3A tuner"
912+config DVB_TDA665x
913+ tristate "TDA665x tuner"
907914 depends on DVB_CORE && I2C
908915 default m if !MEDIA_SUBDRV_AUTOSELECT
909916 help
910− Say Y when you want to support this frontend.
917+ Support for tuner modules based on Philips TDA6650/TDA6651 chips.
918+ Say Y when you want to support this chip.
911919
912−config DVB_ASCOT2E
913− tristate "Sony Ascot2E tuner"
914− depends on DVB_CORE && I2C
915− default m if !MEDIA_SUBDRV_AUTOSELECT
916− help
917− Say Y when you want to support this frontend.
920+ Currently supported tuners:
921+ * Panasonic ENV57H12D5 (ET-50DT)
918922
919−config DVB_HELENE
920− tristate "Sony HELENE Sat/Ter tuner (CXD2858ER)"
921− depends on DVB_CORE && I2C
922− default m if !MEDIA_SUBDRV_AUTOSELECT
923− help
924− Say Y when you want to support this frontend.
923+source "drivers/media/dvb-frontends/drx39xyj/Kconfig"
925924
926925 comment "Common Interface (EN50221) controller drivers"
927926 depends on DVB_CORE
drivers/media/dvb-frontends/Makefile+98−95
@@ -10,126 +10,129 @@ ifdef CONFIG_DVB_RTL2832_SDR · 9 unmodified lines
1010 ccflags-y += -I$(srctree)/drivers/media/usb/dvb-usb-v2
1111 endif
1212
13−stb0899-objs := stb0899_drv.o stb0899_algo.o
14−stv0900-objs := stv0900_core.o stv0900_sw.o
15−drxd-objs := drxd_firm.o drxd_hard.o
1613 cxd2820r-objs := cxd2820r_core.o cxd2820r_c.o cxd2820r_t.o cxd2820r_t2.o
14+drxd-objs := drxd_firm.o drxd_hard.o
1715 drxk-objs := drxk_hard.o
16+stb0899-objs := stb0899_drv.o stb0899_algo.o
17+stv0900-objs := stv0900_core.o stv0900_sw.o
1818
19−obj-$(CONFIG_DVB_PLL) += dvb-pll.o
20−obj-$(CONFIG_DVB_STV0299) += stv0299.o
21−obj-$(CONFIG_DVB_STB0899) += stb0899.o
22−obj-$(CONFIG_DVB_STB6100) += stb6100.o
19+# Please keep it alphabetically sorted by Kconfig name
20+# (e. g. LC_ALL=C sort Makefile)
21+
22+obj-$(CONFIG_DVB_A8293) += a8293.o
23+obj-$(CONFIG_DVB_AF9013) += af9013.o
24+obj-$(CONFIG_DVB_AF9033) += af9033.o
25+obj-$(CONFIG_DVB_AS102_FE) += as102_fe.o
26+obj-$(CONFIG_DVB_ASCOT2E) += ascot2e.o
27+obj-$(CONFIG_DVB_ATBM8830) += atbm8830.o
28+obj-$(CONFIG_DVB_AU8522) += au8522_common.o
29+obj-$(CONFIG_DVB_AU8522_DTV) += au8522_dig.o
30+obj-$(CONFIG_DVB_AU8522_V4L) += au8522_decoder.o
31+obj-$(CONFIG_DVB_BCM3510) += bcm3510.o
2332 obj-$(CONFIG_DVB_CX22700) += cx22700.o
24−obj-$(CONFIG_DVB_S5H1432) += s5h1432.o
33+obj-$(CONFIG_DVB_CX22702) += cx22702.o
2534 obj-$(CONFIG_DVB_CX24110) += cx24110.o
26−obj-$(CONFIG_DVB_TDA8083) += tda8083.o
27−obj-$(CONFIG_DVB_L64781) += l64781.o
35+obj-$(CONFIG_DVB_CX24116) += cx24116.o
36+obj-$(CONFIG_DVB_CX24117) += cx24117.o
37+obj-$(CONFIG_DVB_CX24120) += cx24120.o
38+obj-$(CONFIG_DVB_CX24123) += cx24123.o
39+obj-$(CONFIG_DVB_CXD2099) += cxd2099.o
40+obj-$(CONFIG_DVB_CXD2820R) += cxd2820r.o
41+obj-$(CONFIG_DVB_CXD2841ER) += cxd2841er.o
42+obj-$(CONFIG_DVB_CXD2880) += cxd2880/
2843 obj-$(CONFIG_DVB_DIB3000MB) += dib3000mb.o
2944 obj-$(CONFIG_DVB_DIB3000MC) += dib3000mc.o dibx000_common.o
3045 obj-$(CONFIG_DVB_DIB7000M) += dib7000m.o dibx000_common.o
3146 obj-$(CONFIG_DVB_DIB7000P) += dib7000p.o dibx000_common.o
3247 obj-$(CONFIG_DVB_DIB8000) += dib8000.o dibx000_common.o
3348 obj-$(CONFIG_DVB_DIB9000) += dib9000.o dibx000_common.o
34−obj-$(CONFIG_DVB_MT312) += mt312.o
35−obj-$(CONFIG_DVB_VES1820) += ves1820.o
36−obj-$(CONFIG_DVB_VES1X93) += ves1x93.o
37−obj-$(CONFIG_DVB_TDA1004X) += tda1004x.o
38−obj-$(CONFIG_DVB_SP887X) += sp887x.o
39−obj-$(CONFIG_DVB_NXT6000) += nxt6000.o
40−obj-$(CONFIG_DVB_MT352) += mt352.o
41−obj-$(CONFIG_DVB_ZL10036) += zl10036.o
42−obj-$(CONFIG_DVB_ZL10039) += zl10039.o
43−obj-$(CONFIG_DVB_ZL10353) += zl10353.o
44−obj-$(CONFIG_DVB_CX22702) += cx22702.o
49+obj-$(CONFIG_DVB_DRX39XYJ) += drx39xyj/
4550 obj-$(CONFIG_DVB_DRXD) += drxd.o
46−obj-$(CONFIG_DVB_TDA10021) += tda10021.o
47−obj-$(CONFIG_DVB_TDA10023) += tda10023.o
48−obj-$(CONFIG_DVB_STV0297) += stv0297.o
49−obj-$(CONFIG_DVB_NXT200X) += nxt200x.o
50−obj-$(CONFIG_DVB_OR51211) += or51211.o
51−obj-$(CONFIG_DVB_OR51132) += or51132.o
52−obj-$(CONFIG_DVB_BCM3510) += bcm3510.o
53−obj-$(CONFIG_DVB_S5H1420) += s5h1420.o
54−obj-$(CONFIG_DVB_LGDT330X) += lgdt330x.o
51+obj-$(CONFIG_DVB_DRXK) += drxk.o
52+obj-$(CONFIG_DVB_DS3000) += ds3000.o
53+obj-$(CONFIG_DVB_DUMMY_FE) += dvb_dummy_fe.o
54+obj-$(CONFIG_DVB_EC100) += ec100.o
55+obj-$(CONFIG_DVB_GP8PSK_FE) += gp8psk-fe.o
56+obj-$(CONFIG_DVB_HELENE) += helene.o
57+obj-$(CONFIG_DVB_HORUS3A) += horus3a.o
58+obj-$(CONFIG_DVB_ISL6405) += isl6405.o
59+obj-$(CONFIG_DVB_ISL6421) += isl6421.o
60+obj-$(CONFIG_DVB_ISL6423) += isl6423.o
61+obj-$(CONFIG_DVB_IX2505V) += ix2505v.o
62+obj-$(CONFIG_DVB_L64781) += l64781.o
63+obj-$(CONFIG_DVB_LG2160) += lg2160.o
5564 obj-$(CONFIG_DVB_LGDT3305) += lgdt3305.o
5665 obj-$(CONFIG_DVB_LGDT3306A) += lgdt3306a.o
57−obj-$(CONFIG_DVB_MXL692) += mxl692.o
58−obj-$(CONFIG_DVB_LG2160) += lg2160.o
59−obj-$(CONFIG_DVB_CX24123) += cx24123.o
66+obj-$(CONFIG_DVB_LGDT330X) += lgdt330x.o
67+obj-$(CONFIG_DVB_LGS8GL5) += lgs8gl5.o
68+obj-$(CONFIG_DVB_LGS8GXX) += lgs8gxx.o
6069 obj-$(CONFIG_DVB_LNBH25) += lnbh25.o
6170 obj-$(CONFIG_DVB_LNBH29) += lnbh29.o
6271 obj-$(CONFIG_DVB_LNBP21) += lnbp21.o
6372 obj-$(CONFIG_DVB_LNBP22) += lnbp22.o
64−obj-$(CONFIG_DVB_ISL6405) += isl6405.o
65−obj-$(CONFIG_DVB_ISL6421) += isl6421.o
66−obj-$(CONFIG_DVB_TDA10086) += tda10086.o
67−obj-$(CONFIG_DVB_TDA826X) += tda826x.o
68−obj-$(CONFIG_DVB_TDA8261) += tda8261.o
69−obj-$(CONFIG_DVB_TUNER_DIB0070) += dib0070.o
70−obj-$(CONFIG_DVB_TUNER_DIB0090) += dib0090.o
71−obj-$(CONFIG_DVB_TUA6100) += tua6100.o
73+obj-$(CONFIG_DVB_M88DS3103) += m88ds3103.o
74+obj-$(CONFIG_DVB_M88RS2000) += m88rs2000.o
75+obj-$(CONFIG_DVB_MB86A16) += mb86a16.o
76+obj-$(CONFIG_DVB_MB86A20S) += mb86a20s.o
77+obj-$(CONFIG_DVB_MN88443X) += mn88443x.o
78+obj-$(CONFIG_DVB_MN88472) += mn88472.o
79+obj-$(CONFIG_DVB_MN88473) += mn88473.o
80+obj-$(CONFIG_DVB_MT312) += mt312.o
81+obj-$(CONFIG_DVB_MT352) += mt352.o
82+obj-$(CONFIG_DVB_MXL5XX) += mxl5xx.o
83+obj-$(CONFIG_DVB_MXL692) += mxl692.o
84+obj-$(CONFIG_DVB_NXT200X) += nxt200x.o
85+obj-$(CONFIG_DVB_NXT6000) += nxt6000.o
86+obj-$(CONFIG_DVB_OR51132) += or51132.o
87+obj-$(CONFIG_DVB_OR51211) += or51211.o
88+obj-$(CONFIG_DVB_PLL) += dvb-pll.o
89+obj-$(CONFIG_DVB_RTL2830) += rtl2830.o
90+obj-$(CONFIG_DVB_RTL2832) += rtl2832.o
91+obj-$(CONFIG_DVB_RTL2832_SDR) += rtl2832_sdr.o
7292 obj-$(CONFIG_DVB_S5H1409) += s5h1409.o
73−obj-$(CONFIG_DVB_TUNER_ITD1000) += itd1000.o
74−obj-$(CONFIG_DVB_AU8522) += au8522_common.o
75−obj-$(CONFIG_DVB_AU8522_DTV) += au8522_dig.o
76−obj-$(CONFIG_DVB_AU8522_V4L) += au8522_decoder.o
77−obj-$(CONFIG_DVB_TDA10048) += tda10048.o
78−obj-$(CONFIG_DVB_TUNER_CX24113) += cx24113.o
7993 obj-$(CONFIG_DVB_S5H1411) += s5h1411.o
80−obj-$(CONFIG_DVB_LGS8GL5) += lgs8gl5.o
81−obj-$(CONFIG_DVB_TDA665x) += tda665x.o
82−obj-$(CONFIG_DVB_LGS8GXX) += lgs8gxx.o
83−obj-$(CONFIG_DVB_ATBM8830) += atbm8830.o
84−obj-$(CONFIG_DVB_DUMMY_FE) += dvb_dummy_fe.o
85−obj-$(CONFIG_DVB_AF9013) += af9013.o
86−obj-$(CONFIG_DVB_CX24116) += cx24116.o
87−obj-$(CONFIG_DVB_CX24117) += cx24117.o
88−obj-$(CONFIG_DVB_CX24120) += cx24120.o
89−obj-$(CONFIG_DVB_SI21XX) += si21xx.o
94+obj-$(CONFIG_DVB_S5H1420) += s5h1420.o
95+obj-$(CONFIG_DVB_S5H1432) += s5h1432.o
96+obj-$(CONFIG_DVB_S921) += s921.o
97+obj-$(CONFIG_DVB_SI2165) += si2165.o
9098 obj-$(CONFIG_DVB_SI2168) += si2168.o
91−obj-$(CONFIG_DVB_STV0288) += stv0288.o
99+obj-$(CONFIG_DVB_SI21XX) += si21xx.o
100+obj-$(CONFIG_DVB_SP2) += sp2.o
101+obj-$(CONFIG_DVB_SP887X) += sp887x.o
102+obj-$(CONFIG_DVB_STB0899) += stb0899.o
92103 obj-$(CONFIG_DVB_STB6000) += stb6000.o
93−obj-$(CONFIG_DVB_S921) += s921.o
94−obj-$(CONFIG_DVB_STV6110) += stv6110.o
104+obj-$(CONFIG_DVB_STB6100) += stb6100.o
105+obj-$(CONFIG_DVB_STV0288) += stv0288.o
106+obj-$(CONFIG_DVB_STV0297) += stv0297.o
107+obj-$(CONFIG_DVB_STV0299) += stv0299.o
108+obj-$(CONFIG_DVB_STV0367) += stv0367.o
95109 obj-$(CONFIG_DVB_STV0900) += stv0900.o
96110 obj-$(CONFIG_DVB_STV090x) += stv090x.o
97−obj-$(CONFIG_DVB_STV6110x) += stv6110x.o
98−obj-$(CONFIG_DVB_M88DS3103) += m88ds3103.o
99−obj-$(CONFIG_DVB_MN88472) += mn88472.o
100−obj-$(CONFIG_DVB_MN88473) += mn88473.o
101−obj-$(CONFIG_DVB_ISL6423) += isl6423.o
102−obj-$(CONFIG_DVB_EC100) += ec100.o
103−obj-$(CONFIG_DVB_DS3000) += ds3000.o
104−obj-$(CONFIG_DVB_TS2020) += ts2020.o
105−obj-$(CONFIG_DVB_MB86A16) += mb86a16.o
106−obj-$(CONFIG_DVB_DRX39XYJ) += drx39xyj/
107−obj-$(CONFIG_DVB_MB86A20S) += mb86a20s.o
108−obj-$(CONFIG_DVB_IX2505V) += ix2505v.o
109−obj-$(CONFIG_DVB_STV0367) += stv0367.o
110−obj-$(CONFIG_DVB_CXD2820R) += cxd2820r.o
111−obj-$(CONFIG_DVB_CXD2841ER) += cxd2841er.o
112−obj-$(CONFIG_DVB_DRXK) += drxk.o
113−obj-$(CONFIG_DVB_TDA18271C2DD) += tda18271c2dd.o
114111 obj-$(CONFIG_DVB_STV0910) += stv0910.o
112+obj-$(CONFIG_DVB_STV6110) += stv6110.o
113+obj-$(CONFIG_DVB_STV6110x) += stv6110x.o
115114 obj-$(CONFIG_DVB_STV6111) += stv6111.o
116−obj-$(CONFIG_DVB_MXL5XX) += mxl5xx.o
117−obj-$(CONFIG_DVB_SI2165) += si2165.o
118−obj-$(CONFIG_DVB_A8293) += a8293.o
119−obj-$(CONFIG_DVB_SP2) += sp2.o
120−obj-$(CONFIG_DVB_TDA10071) += tda10071.o
121−obj-$(CONFIG_DVB_RTL2830) += rtl2830.o
122−obj-$(CONFIG_DVB_RTL2832) += rtl2832.o
123−obj-$(CONFIG_DVB_RTL2832_SDR) += rtl2832_sdr.o
124−obj-$(CONFIG_DVB_M88RS2000) += m88rs2000.o
125−obj-$(CONFIG_DVB_AF9033) += af9033.o
126−obj-$(CONFIG_DVB_AS102_FE) += as102_fe.o
127−obj-$(CONFIG_DVB_GP8PSK_FE) += gp8psk-fe.o
128115 obj-$(CONFIG_DVB_TC90522) += tc90522.o
129−obj-$(CONFIG_DVB_MN88443X) += mn88443x.o
130−obj-$(CONFIG_DVB_HORUS3A) += horus3a.o
131−obj-$(CONFIG_DVB_ASCOT2E) += ascot2e.o
132−obj-$(CONFIG_DVB_HELENE) += helene.o
116+obj-$(CONFIG_DVB_TDA10021) += tda10021.o
117+obj-$(CONFIG_DVB_TDA10023) += tda10023.o
118+obj-$(CONFIG_DVB_TDA10048) += tda10048.o
119+obj-$(CONFIG_DVB_TDA1004X) += tda1004x.o
120+obj-$(CONFIG_DVB_TDA10071) += tda10071.o
121+obj-$(CONFIG_DVB_TDA10086) += tda10086.o
122+obj-$(CONFIG_DVB_TDA18271C2DD) += tda18271c2dd.o
123+obj-$(CONFIG_DVB_TDA665x) += tda665x.o
124+obj-$(CONFIG_DVB_TDA8083) += tda8083.o
125+obj-$(CONFIG_DVB_TDA8261) += tda8261.o
126+obj-$(CONFIG_DVB_TDA826X) += tda826x.o
127+obj-$(CONFIG_DVB_TS2020) += ts2020.o
128+obj-$(CONFIG_DVB_TUA6100) += tua6100.o
129+obj-$(CONFIG_DVB_TUNER_CX24113) += cx24113.o
130+obj-$(CONFIG_DVB_TUNER_DIB0070) += dib0070.o
131+obj-$(CONFIG_DVB_TUNER_DIB0090) += dib0090.o
132+obj-$(CONFIG_DVB_TUNER_ITD1000) += itd1000.o
133+obj-$(CONFIG_DVB_VES1820) += ves1820.o
134+obj-$(CONFIG_DVB_VES1X93) += ves1x93.o
133135 obj-$(CONFIG_DVB_ZD1301_DEMOD) += zd1301_demod.o
134−obj-$(CONFIG_DVB_CXD2099) += cxd2099.o
135−obj-$(CONFIG_DVB_CXD2880) += cxd2880/
136+obj-$(CONFIG_DVB_ZL10036) += zl10036.o
137+obj-$(CONFIG_DVB_ZL10039) += zl10039.o
138+obj-$(CONFIG_DVB_ZL10353) += zl10353.o
drivers/media/dvb-frontends/dib3000mc.c+1−1
@@ -859,7 +859,7 @@ int dib3000mc_i2c_enumeration(struct i2c_adapter *i2c, int no_of_demods, u8 defa · 858 unmodified lines
859859 int k;
860860 u8 new_addr;
861861
862− static u8 DIB3000MC_I2C_ADDRESS[] = {20,22,24,26};
862+ static const u8 DIB3000MC_I2C_ADDRESS[] = { 20, 22, 24, 26 };
863863
864864 dmcst = kzalloc(sizeof(struct dib3000mc_state), GFP_KERNEL);
865865 if (dmcst == NULL)
drivers/media/dvb-frontends/dib7000p.c+2−2
@@ -1188,8 +1188,8 @@ static int dib7000p_autosearch_is_irq(struct dvb_frontend *demod) · 1187 unmodified lines
11881188
11891189 static void dib7000p_spur_protect(struct dib7000p_state *state, u32 rf_khz, u32 bw)
11901190 {
1191− static s16 notch[] = { 16143, 14402, 12238, 9713, 6902, 3888, 759, -2392 };
1192− static u8 sine[] = { 0, 2, 3, 5, 6, 8, 9, 11, 13, 14, 16, 17, 19, 20, 22,
1191+ static const s16 notch[] = { 16143, 14402, 12238, 9713, 6902, 3888, 759, -2392 };
1192+ static const u8 sine[] = { 0, 2, 3, 5, 6, 8, 9, 11, 13, 14, 16, 17, 19, 20, 22,
11931193 24, 25, 27, 28, 30, 31, 33, 34, 36, 38, 39, 41, 42, 44, 45, 47, 48, 50, 51,
11941194 53, 55, 56, 58, 59, 61, 62, 64, 65, 67, 68, 70, 71, 73, 74, 76, 77, 79, 80,
11951195 82, 83, 85, 86, 88, 89, 91, 92, 94, 95, 97, 98, 99, 101, 102, 104, 105,
drivers/media/dvb-frontends/si21xx.c+1−1
@@ -336,7 +336,7 @@ static int si21xx_wait_diseqc_idle(struct si21xx_state *state, int timeout) · 335 unmodified lines
336336 dprintk("%s\n", __func__);
337337
338338 while ((si21_readreg(state, LNB_CTRL_REG_1) & 0x8) == 8) {
339− if (jiffies - start > timeout) {
339+ if (time_is_before_jiffies(start + timeout)) {
340340 dprintk("%s: timeout!!\n", __func__);
341341 return -ETIMEDOUT;
342342 }
drivers/media/dvb-frontends/stv0299.c+5−4
@@ -161,8 +161,9 @@ static int stv0299_set_FEC(struct stv0299_state *state, enum fe_code_rate fec) · 160 unmodified lines
161161
162162 static enum fe_code_rate stv0299_get_fec(struct stv0299_state *state)
163163 {
164− static enum fe_code_rate fec_tab[] = { FEC_2_3, FEC_3_4, FEC_5_6,
165− FEC_7_8, FEC_1_2 };
164+ static const enum fe_code_rate fec_tab[] = {
165+ FEC_2_3, FEC_3_4, FEC_5_6, FEC_7_8, FEC_1_2
166+ };
166167 u8 index;
167168
168169 dprintk ("%s\n", __func__);
@@ -183,7 +184,7 @@ static int stv0299_wait_diseqc_fifo (struct stv0299_state* state, int timeout) · 14 unmodified lines
183184 dprintk ("%s\n", __func__);
184185
185186 while (stv0299_readreg(state, 0x0a) & 1) {
186− if (jiffies - start > timeout) {
187+ if (time_is_before_jiffies(start + timeout)) {
187188 dprintk ("%s: timeout!!\n", __func__);
188189 return -ETIMEDOUT;
189190 }
@@ -200,7 +201,7 @@ static int stv0299_wait_diseqc_idle (struct stv0299_state* state, int timeout) · 10 unmodified lines
200201 dprintk ("%s\n", __func__);
201202
202203 while ((stv0299_readreg(state, 0x0a) & 3) != 2 ) {
203− if (jiffies - start > timeout) {
204+ if (time_is_before_jiffies(start + timeout)) {
204205 dprintk ("%s: timeout!!\n", __func__);
205206 return -ETIMEDOUT;
206207 }
drivers/media/dvb-frontends/tda8083.c+1−1
@@ -162,7 +162,7 @@ static void tda8083_wait_diseqc_fifo (struct tda8083_state* state, int timeout) · 161 unmodified lines
162162 {
163163 unsigned long start = jiffies;
164164
165− while (jiffies - start < timeout &&
165+ while (time_is_after_jiffies(start + timeout) &&
166166 !(tda8083_readreg(state, 0x02) & 0x80))
167167 {
168168 msleep(50);
drivers/media/firewire/Makefile+1−1
@@ -2,4 +2,4 @@ · 1 unmodified line
22 obj-$(CONFIG_DVB_FIREDTV) += firedtv.o
33
44 firedtv-y += firedtv-avc.o firedtv-ci.o firedtv-dvb.o firedtv-fe.o firedtv-fw.o
5−firedtv-$(CONFIG_DVB_FIREDTV_INPUT) += firedtv-rc.o
5+firedtv-$(CONFIG_DVB_FIREDTV_INPUT) += firedtv-rc.o
drivers/media/i2c/Kconfig+1072−1019
@@ -3,7 +3,7 @@ · 2 unmodified lines
33 # Multimedia Video device configuration
44 #
55
6−if VIDEO_V4L2
6+if VIDEO_DEV
77
88 comment "IR I2C driver auto-selected by 'Autoselect ancillary drivers'"
99 depends on MEDIA_SUBDRV_AUTOSELECT && I2C && RC_CORE
@@ -22,1507 +22,1560 @@ config VIDEO_IR_I2C · 12 unmodified lines
2222 In doubt, say Y.
2323
2424 #
25−# V4L2 I2C drivers that aren't related with Camera support
25+# V4L2 I2C drivers that are related with Camera support
2626 #
2727
28−comment "audio, video and radio I2C drivers auto-selected by 'Autoselect ancillary drivers'"
29− depends on MEDIA_HIDE_ANCILLARY_SUBDRV
30−#
31−# Encoder / Decoder module configuration
32−#
28+menu "Camera sensor devices"
29+ visible if MEDIA_CAMERA_SUPPORT
3330
34−menu "Audio decoders, processors and mixers"
35− visible if !MEDIA_HIDE_ANCILLARY_SUBDRV
31+config VIDEO_APTINA_PLL
32+ tristate
3633
37−config VIDEO_TVAUDIO
38− tristate "Simple audio decoder chips"
39− depends on VIDEO_V4L2 && I2C
34+config VIDEO_CCS_PLL
35+ tristate
36+
37+config VIDEO_HI556
38+ tristate "Hynix Hi-556 sensor support"
39+ depends on I2C && VIDEO_DEV
40+ select MEDIA_CONTROLLER
41+ select VIDEO_V4L2_SUBDEV_API
42+ select V4L2_FWNODE
4043 help
41− Support for several audio decoder chips found on some bt8xx boards:
42− Philips: tda9840, tda9873h, tda9874h/a, tda9850, tda985x, tea6300,
43− tea6320, tea6420, tda8425, ta8874z.
44− Microchip: pic16c54 based design on ProVideo PV951 board.
44+ This is a Video4Linux2 sensor driver for the Hynix
45+ Hi-556 camera.
4546
4647 To compile this driver as a module, choose M here: the
47− module will be called tvaudio.
48+ module will be called hi556.
4849
49−config VIDEO_TDA7432
50− tristate "Philips TDA7432 audio processor"
51− depends on VIDEO_V4L2 && I2C
50+config VIDEO_HI846
51+ tristate "Hynix Hi-846 sensor support"
52+ depends on I2C && VIDEO_DEV
53+ select MEDIA_CONTROLLER
54+ select VIDEO_V4L2_SUBDEV_API
55+ select V4L2_FWNODE
5256 help
53− Support for tda7432 audio decoder chip found on some bt8xx boards.
57+ This is a Video4Linux2 sensor driver for the Hynix
58+ Hi-846 camera.
5459
5560 To compile this driver as a module, choose M here: the
56− module will be called tda7432.
61+ module will be called hi846.
5762
58−config VIDEO_TDA9840
59− tristate "Philips TDA9840 audio processor"
60− depends on I2C
63+config VIDEO_HI847
64+ tristate "Hynix Hi-847 sensor support"
65+ depends on I2C && VIDEO_DEV
66+ select MEDIA_CONTROLLER
67+ select VIDEO_V4L2_SUBDEV_API
68+ select V4L2_FWNODE
69+ help
70+ This is a Video4Linux2 sensor driver for the Hynix
71+ Hi-847 camera.
72+
73+ To compile this driver as a module, choose M here: the
74+ module will be called hi847.
75+
76+config VIDEO_IMX208
77+ tristate "Sony IMX208 sensor support"
78+ depends on I2C && VIDEO_DEV && VIDEO_V4L2_SUBDEV_API
79+ depends on MEDIA_CAMERA_SUPPORT
6180 help
62− Support for tda9840 audio decoder chip found on some Zoran boards.
81+ This is a Video4Linux2 sensor driver for the Sony
82+ IMX208 camera.
6383
6484 To compile this driver as a module, choose M here: the
65− module will be called tda9840.
85+ module will be called imx208.
6686
67−config VIDEO_TDA1997X
68− tristate "NXP TDA1997x HDMI receiver"
69− depends on VIDEO_V4L2 && I2C
70− depends on SND_SOC
71− select HDMI
72− select SND_PCM
87+config VIDEO_IMX214
88+ tristate "Sony IMX214 sensor support"
89+ depends on GPIOLIB && I2C && VIDEO_DEV
7390 select V4L2_FWNODE
7491 select MEDIA_CONTROLLER
7592 select VIDEO_V4L2_SUBDEV_API
93+ select REGMAP_I2C
7694 help
77− V4L2 subdevice driver for the NXP TDA1997x HDMI receivers.
95+ This is a Video4Linux2 sensor driver for the Sony
96+ IMX214 camera.
7897
7998 To compile this driver as a module, choose M here: the
80− module will be called tda1997x.
99+ module will be called imx214.
81100
82−config VIDEO_TEA6415C
83− tristate "Philips TEA6415C audio processor"
84− depends on I2C
101+config VIDEO_IMX219
102+ tristate "Sony IMX219 sensor support"
103+ depends on I2C && VIDEO_DEV
104+ select MEDIA_CONTROLLER
105+ select VIDEO_V4L2_SUBDEV_API
106+ select V4L2_FWNODE
85107 help
86− Support for tea6415c audio decoder chip found on some bt8xx boards.
108+ This is a Video4Linux2 sensor driver for the Sony
109+ IMX219 camera.
87110
88111 To compile this driver as a module, choose M here: the
89− module will be called tea6415c.
112+ module will be called imx219.
90113
91−config VIDEO_TEA6420
92− tristate "Philips TEA6420 audio processor"
93− depends on I2C
114+config VIDEO_IMX258
115+ tristate "Sony IMX258 sensor support"
116+ depends on I2C && VIDEO_DEV
117+ select MEDIA_CONTROLLER
118+ select VIDEO_V4L2_SUBDEV_API
94119 help
95− Support for tea6420 audio decoder chip found on some bt8xx boards.
120+ This is a Video4Linux2 sensor driver for the Sony
121+ IMX258 camera.
96122
97123 To compile this driver as a module, choose M here: the
98− module will be called tea6420.
124+ module will be called imx258.
99125
100−config VIDEO_MSP3400
101− tristate "Micronas MSP34xx audio decoders"
102− depends on VIDEO_V4L2 && I2C
126+config VIDEO_IMX274
127+ tristate "Sony IMX274 sensor support"
128+ depends on I2C && VIDEO_DEV
129+ select MEDIA_CONTROLLER
130+ select VIDEO_V4L2_SUBDEV_API
131+ select REGMAP_I2C
103132 help
104− Support for the Micronas MSP34xx series of audio decoders.
105−
106− To compile this driver as a module, choose M here: the
107− module will be called msp3400.
133+ This is a V4L2 sensor driver for the Sony IMX274
134+ CMOS image sensor.
108135
109−config VIDEO_CS3308
110− tristate "Cirrus Logic CS3308 audio ADC"
111− depends on VIDEO_V4L2 && I2C
136+config VIDEO_IMX290
137+ tristate "Sony IMX290 sensor support"
138+ depends on I2C && VIDEO_DEV
139+ select MEDIA_CONTROLLER
140+ select VIDEO_V4L2_SUBDEV_API
141+ select REGMAP_I2C
142+ select V4L2_FWNODE
112143 help
113− Support for the Cirrus Logic CS3308 High Performance 8-Channel
114− Analog Volume Control
144+ This is a Video4Linux2 sensor driver for the Sony
145+ IMX290 camera sensor.
115146
116147 To compile this driver as a module, choose M here: the
117− module will be called cs3308.
148+ module will be called imx290.
118149
119−config VIDEO_CS5345
120− tristate "Cirrus Logic CS5345 audio ADC"
121− depends on VIDEO_V4L2 && I2C
150+config VIDEO_IMX319
151+ tristate "Sony IMX319 sensor support"
152+ depends on I2C && VIDEO_DEV
153+ select MEDIA_CONTROLLER
154+ select VIDEO_V4L2_SUBDEV_API
122155 help
123− Support for the Cirrus Logic CS5345 24-bit, 192 kHz
124− stereo A/D converter.
156+ This is a Video4Linux2 sensor driver for the Sony
157+ IMX319 camera.
125158
126159 To compile this driver as a module, choose M here: the
127− module will be called cs5345.
160+ module will be called imx319.
128161
129−config VIDEO_CS53L32A
130− tristate "Cirrus Logic CS53L32A audio ADC"
131− depends on VIDEO_V4L2 && I2C
162+config VIDEO_IMX334
163+ tristate "Sony IMX334 sensor support"
164+ depends on OF_GPIO
165+ depends on I2C && VIDEO_DEV
166+ select VIDEO_V4L2_SUBDEV_API
167+ select MEDIA_CONTROLLER
168+ select V4L2_FWNODE
132169 help
133− Support for the Cirrus Logic CS53L32A low voltage
134− stereo A/D converter.
170+ This is a Video4Linux2 sensor driver for the Sony
171+ IMX334 camera.
135172
136173 To compile this driver as a module, choose M here: the
137− module will be called cs53l32a.
174+ module will be called imx334.
138175
139−config VIDEO_TLV320AIC23B
140− tristate "Texas Instruments TLV320AIC23B audio codec"
141− depends on VIDEO_V4L2 && I2C
176+config VIDEO_IMX335
177+ tristate "Sony IMX335 sensor support"
178+ depends on OF_GPIO
179+ depends on I2C && VIDEO_DEV
180+ select VIDEO_V4L2_SUBDEV_API
181+ select MEDIA_CONTROLLER
182+ select V4L2_FWNODE
142183 help
143− Support for the Texas Instruments TLV320AIC23B audio codec.
184+ This is a Video4Linux2 sensor driver for the Sony
185+ IMX335 camera.
144186
145187 To compile this driver as a module, choose M here: the
146− module will be called tlv320aic23b.
188+ module will be called imx335.
147189
148−config VIDEO_UDA1342
149− tristate "Philips UDA1342 audio codec"
150− depends on VIDEO_V4L2 && I2C
190+config VIDEO_IMX355
191+ tristate "Sony IMX355 sensor support"
192+ depends on I2C && VIDEO_DEV
193+ select MEDIA_CONTROLLER
194+ select VIDEO_V4L2_SUBDEV_API
151195 help
152− Support for the Philips UDA1342 audio codec.
196+ This is a Video4Linux2 sensor driver for the Sony
197+ IMX355 camera.
153198
154199 To compile this driver as a module, choose M here: the
155− module will be called uda1342.
200+ module will be called imx355.
156201
157−config VIDEO_WM8775
158− tristate "Wolfson Microelectronics WM8775 audio ADC with input mixer"
159− depends on VIDEO_V4L2 && I2C
202+config VIDEO_IMX412
203+ tristate "Sony IMX412 sensor support"
204+ depends on OF_GPIO
205+ depends on I2C && VIDEO_DEV
206+ select VIDEO_V4L2_SUBDEV_API
207+ select MEDIA_CONTROLLER
208+ select V4L2_FWNODE
160209 help
161− Support for the Wolfson Microelectronics WM8775 high
162− performance stereo A/D Converter with a 4 channel input mixer.
210+ This is a Video4Linux2 sensor driver for the Sony
211+ IMX412 camera.
163212
164213 To compile this driver as a module, choose M here: the
165− module will be called wm8775.
166−
167−config VIDEO_WM8739
168− tristate "Wolfson Microelectronics WM8739 stereo audio ADC"
169− depends on VIDEO_V4L2 && I2C
170− help
171− Support for the Wolfson Microelectronics WM8739
172− stereo A/D Converter.
214+ module will be called imx412.
173215
174− To compile this driver as a module, choose M here: the
175− module will be called wm8739.
216+config VIDEO_MAX9271_LIB
217+ tristate
176218
177−config VIDEO_VP27SMPX
178− tristate "Panasonic VP27's internal MPX"
179− depends on VIDEO_V4L2 && I2C
219+config VIDEO_MT9M001
220+ tristate "mt9m001 support"
221+ depends on I2C && VIDEO_DEV
222+ select MEDIA_CONTROLLER
223+ select VIDEO_V4L2_SUBDEV_API
180224 help
181− Support for the internal MPX of the Panasonic VP27s tuner.
182−
183− To compile this driver as a module, choose M here: the
184− module will be called vp27smpx.
225+ This driver supports MT9M001 cameras from Micron, monochrome
226+ and colour models.
185227
186−config VIDEO_SONY_BTF_MPX
187− tristate "Sony BTF's internal MPX"
188− depends on VIDEO_V4L2 && I2C
228+config VIDEO_MT9M032
229+ tristate "MT9M032 camera sensor support"
230+ depends on I2C && VIDEO_DEV
231+ select MEDIA_CONTROLLER
232+ select VIDEO_V4L2_SUBDEV_API
233+ select VIDEO_APTINA_PLL
189234 help
190− Support for the internal MPX of the Sony BTF-PG472Z tuner.
235+ This driver supports MT9M032 camera sensors from Aptina, monochrome
236+ models only.
191237
192− To compile this driver as a module, choose M here: the
193− module will be called sony-btf-mpx.
194−endmenu
238+config VIDEO_MT9M111
239+ tristate "mt9m111, mt9m112 and mt9m131 support"
240+ depends on I2C && VIDEO_DEV
241+ select V4L2_FWNODE
242+ help
243+ This driver supports MT9M111, MT9M112 and MT9M131 cameras from
244+ Micron/Aptina
195245
196−menu "RDS decoders"
197− visible if !MEDIA_HIDE_ANCILLARY_SUBDRV
246+config VIDEO_MT9P031
247+ tristate "Aptina MT9P031 support"
248+ depends on I2C && VIDEO_DEV
249+ select MEDIA_CONTROLLER
250+ select VIDEO_V4L2_SUBDEV_API
251+ select VIDEO_APTINA_PLL
252+ select V4L2_FWNODE
253+ help
254+ This is a Video4Linux2 sensor driver for the Aptina
255+ (Micron) mt9p031 5 Mpixel camera.
198256
199−config VIDEO_SAA6588
200− tristate "SAA6588 Radio Chip RDS decoder support"
201− depends on VIDEO_V4L2 && I2C
257+config VIDEO_MT9T001
258+ tristate "Aptina MT9T001 support"
259+ depends on I2C && VIDEO_DEV
260+ select MEDIA_CONTROLLER
261+ select VIDEO_V4L2_SUBDEV_API
262+ help
263+ This is a Video4Linux2 sensor driver for the Aptina
264+ (Micron) mt0t001 3 Mpixel camera.
202265
266+config VIDEO_MT9T112
267+ tristate "Aptina MT9T111/MT9T112 support"
268+ depends on I2C && VIDEO_DEV
203269 help
204− Support for this Radio Data System (RDS) decoder. This allows
205− seeing radio station identification transmitted using this
206− standard.
270+ This is a Video4Linux2 sensor driver for the Aptina
271+ (Micron) MT9T111 and MT9T112 3 Mpixel camera.
207272
208273 To compile this driver as a module, choose M here: the
209− module will be called saa6588.
210−endmenu
274+ module will be called mt9t112.
211275
212−menu "Video decoders"
213− visible if !MEDIA_HIDE_ANCILLARY_SUBDRV
276+config VIDEO_MT9V011
277+ tristate "Micron mt9v011 sensor support"
278+ depends on I2C && VIDEO_DEV
279+ help
280+ This is a Video4Linux2 sensor driver for the Micron
281+ mt0v011 1.3 Mpixel camera. It currently only works with the
282+ em28xx driver.
214283
215−config VIDEO_ADV7180
216− tristate "Analog Devices ADV7180 decoder"
217− depends on GPIOLIB && VIDEO_V4L2 && I2C
284+config VIDEO_MT9V032
285+ tristate "Micron MT9V032 sensor support"
286+ depends on I2C && VIDEO_DEV
218287 select MEDIA_CONTROLLER
219288 select VIDEO_V4L2_SUBDEV_API
220− select V4L2_ASYNC
289+ select REGMAP_I2C
290+ select V4L2_FWNODE
221291 help
222− Support for the Analog Devices ADV7180 video decoder.
223−
224− To compile this driver as a module, choose M here: the
225− module will be called adv7180.
292+ This is a Video4Linux2 sensor driver for the Micron
293+ MT9V032 752x480 CMOS sensor.
226294
227−config VIDEO_ADV7183
228− tristate "Analog Devices ADV7183 decoder"
229− depends on VIDEO_V4L2 && I2C
295+config VIDEO_MT9V111
296+ tristate "Aptina MT9V111 sensor support"
297+ depends on I2C && VIDEO_DEV
230298 help
231− V4l2 subdevice driver for the Analog Devices
232− ADV7183 video decoder.
299+ This is a Video4Linux2 sensor driver for the Aptina/Micron
300+ MT9V111 sensor.
233301
234302 To compile this driver as a module, choose M here: the
235− module will be called adv7183.
303+ module will be called mt9v111.
236304
237−config VIDEO_ADV748X
238− tristate "Analog Devices ADV748x decoder"
239− depends on VIDEO_V4L2 && I2C
240− depends on OF
305+config VIDEO_NOON010PC30
306+ tristate "Siliconfile NOON010PC30 sensor support"
307+ depends on I2C && VIDEO_DEV
308+ select MEDIA_CONTROLLER
309+ select VIDEO_V4L2_SUBDEV_API
310+ help
311+ This driver supports NOON010PC30 CIF camera from Siliconfile
312+
313+config VIDEO_OG01A1B
314+ tristate "OmniVision OG01A1B sensor support"
315+ depends on I2C && VIDEO_DEV
241316 select MEDIA_CONTROLLER
242317 select VIDEO_V4L2_SUBDEV_API
243− select REGMAP_I2C
244318 select V4L2_FWNODE
245319 help
246− V4L2 subdevice driver for the Analog Devices
247− ADV7481 and ADV7482 HDMI/Analog video decoders.
320+ This is a Video4Linux2 sensor driver for the OmniVision
321+ OG01A1B camera.
248322
249323 To compile this driver as a module, choose M here: the
250− module will be called adv748x.
324+ module will be called og01a1b.
251325
252−config VIDEO_ADV7604
253− tristate "Analog Devices ADV7604 decoder"
254− depends on VIDEO_V4L2 && I2C
255− depends on GPIOLIB || COMPILE_TEST
326+config VIDEO_OV02A10
327+ tristate "OmniVision OV02A10 sensor support"
328+ depends on VIDEO_DEV && I2C
256329 select MEDIA_CONTROLLER
257330 select VIDEO_V4L2_SUBDEV_API
258− select REGMAP_I2C
259− select HDMI
260331 select V4L2_FWNODE
261332 help
262− Support for the Analog Devices ADV7604 video decoder.
263−
264− This is a Analog Devices Component/Graphics Digitizer
265− with 4:1 Multiplexed HDMI Receiver.
333+ This is a Video4Linux2 sensor driver for the OmniVision
334+ OV02A10 camera.
266335
267336 To compile this driver as a module, choose M here: the
268− module will be called adv7604.
337+ module will be called ov02a10.
269338
270−config VIDEO_ADV7604_CEC
271− bool "Enable Analog Devices ADV7604 CEC support"
272− depends on VIDEO_ADV7604
273− select CEC_CORE
274− help
275− When selected the adv7604 will support the optional
276− HDMI CEC feature.
339+config VIDEO_OV08D10
340+ tristate "OmniVision OV08D10 sensor support"
341+ depends on I2C && VIDEO_DEV
342+ select MEDIA_CONTROLLER
343+ select VIDEO_V4L2_SUBDEV_API
344+ select V4L2_FWNODE
345+ help
346+ This is a Video4Linux2 sensor driver for the OmniVision
347+ OV08D10 camera sensor.
277348
278−config VIDEO_ADV7842
279− tristate "Analog Devices ADV7842 decoder"
280− depends on VIDEO_V4L2 && I2C
349+ To compile this driver as a module, choose M here: the
350+ module will be called ov08d10.
351+
352+config VIDEO_OV13858
353+ tristate "OmniVision OV13858 sensor support"
354+ depends on I2C && VIDEO_DEV
281355 select MEDIA_CONTROLLER
282356 select VIDEO_V4L2_SUBDEV_API
283− select HDMI
357+ select V4L2_FWNODE
284358 help
285− Support for the Analog Devices ADV7842 video decoder.
286−
287− This is a Analog Devices Component/Graphics/SD Digitizer
288− with 2:1 Multiplexed HDMI Receiver.
289−
290− To compile this driver as a module, choose M here: the
291− module will be called adv7842.
359+ This is a Video4Linux2 sensor driver for the OmniVision
360+ OV13858 camera.
292361
293−config VIDEO_ADV7842_CEC
294− bool "Enable Analog Devices ADV7842 CEC support"
295− depends on VIDEO_ADV7842
296− select CEC_CORE
362+config VIDEO_OV13B10
363+ tristate "OmniVision OV13B10 sensor support"
364+ depends on I2C && VIDEO_DEV
365+ select MEDIA_CONTROLLER
366+ select VIDEO_V4L2_SUBDEV_API
367+ select V4L2_FWNODE
297368 help
298− When selected the adv7842 will support the optional
299− HDMI CEC feature.
369+ This is a Video4Linux2 sensor driver for the OmniVision
370+ OV13B10 camera.
300371
301−config VIDEO_BT819
302− tristate "BT819A VideoStream decoder"
303− depends on VIDEO_V4L2 && I2C
372+config VIDEO_OV2640
373+ tristate "OmniVision OV2640 sensor support"
374+ depends on VIDEO_DEV && I2C
304375 help
305− Support for BT819A video decoder.
376+ This is a Video4Linux2 sensor driver for the OmniVision
377+ OV2640 camera.
306378
307379 To compile this driver as a module, choose M here: the
308− module will be called bt819.
380+ module will be called ov2640.
309381
310−config VIDEO_BT856
311− tristate "BT856 VideoStream decoder"
312− depends on VIDEO_V4L2 && I2C
382+config VIDEO_OV2659
383+ tristate "OmniVision OV2659 sensor support"
384+ depends on VIDEO_DEV && I2C && GPIOLIB
385+ select V4L2_FWNODE
313386 help
314− Support for BT856 video decoder.
387+ This is a Video4Linux2 sensor driver for the OmniVision
388+ OV2659 camera.
315389
316390 To compile this driver as a module, choose M here: the
317− module will be called bt856.
391+ module will be called ov2659.
318392
319−config VIDEO_BT866
320− tristate "BT866 VideoStream decoder"
321− depends on VIDEO_V4L2 && I2C
393+config VIDEO_OV2680
394+ tristate "OmniVision OV2680 sensor support"
395+ depends on VIDEO_DEV && I2C
396+ select MEDIA_CONTROLLER
397+ select V4L2_FWNODE
322398 help
323− Support for BT866 video decoder.
399+ This is a Video4Linux2 sensor driver for the OmniVision
400+ OV2680 camera.
324401
325402 To compile this driver as a module, choose M here: the
326− module will be called bt866.
403+ module will be called ov2680.
327404
328−config VIDEO_KS0127
329− tristate "KS0127 video decoder"
330− depends on VIDEO_V4L2 && I2C
405+config VIDEO_OV2685
406+ tristate "OmniVision OV2685 sensor support"
407+ depends on VIDEO_DEV && I2C
408+ select MEDIA_CONTROLLER
409+ select V4L2_FWNODE
331410 help
332− Support for KS0127 video decoder.
333−
334− This chip is used on AverMedia AVS6EYES Zoran-based MJPEG
335− cards.
411+ This is a Video4Linux2 sensor driver for the OmniVision
412+ OV2685 camera.
336413
337414 To compile this driver as a module, choose M here: the
338− module will be called ks0127.
415+ module will be called ov2685.
339416
340−config VIDEO_ML86V7667
341− tristate "OKI ML86V7667 video decoder"
342− depends on VIDEO_V4L2 && I2C
417+config VIDEO_OV2740
418+ tristate "OmniVision OV2740 sensor support"
419+ depends on VIDEO_DEV && I2C
420+ depends on ACPI || COMPILE_TEST
421+ select MEDIA_CONTROLLER
422+ select VIDEO_V4L2_SUBDEV_API
423+ select V4L2_FWNODE
424+ select REGMAP_I2C
343425 help
344− Support for the OKI Semiconductor ML86V7667 video decoder.
426+ This is a Video4Linux2 sensor driver for the OmniVision
427+ OV2740 camera.
345428
346429 To compile this driver as a module, choose M here: the
347− module will be called ml86v7667.
430+ module will be called ov2740.
348431
349−config VIDEO_SAA7110
350− tristate "Philips SAA7110 video decoder"
351− depends on VIDEO_V4L2 && I2C
432+config VIDEO_OV5640
433+ tristate "OmniVision OV5640 sensor support"
434+ depends on OF
435+ depends on GPIOLIB && VIDEO_DEV && I2C
436+ select MEDIA_CONTROLLER
437+ select VIDEO_V4L2_SUBDEV_API
438+ select V4L2_FWNODE
352439 help
353− Support for the Philips SAA7110 video decoders.
354−
355− To compile this driver as a module, choose M here: the
356− module will be called saa7110.
440+ This is a Video4Linux2 sensor driver for the Omnivision
441+ OV5640 camera sensor with a MIPI CSI-2 interface.
357442
358−config VIDEO_SAA711X
359− tristate "Philips SAA7111/3/4/5 video decoders"
360− depends on VIDEO_V4L2 && I2C
443+config VIDEO_OV5645
444+ tristate "OmniVision OV5645 sensor support"
445+ depends on OF
446+ depends on I2C && VIDEO_DEV
447+ select MEDIA_CONTROLLER
448+ select VIDEO_V4L2_SUBDEV_API
449+ select V4L2_FWNODE
361450 help
362− Support for the Philips SAA7111/3/4/5 video decoders.
451+ This is a Video4Linux2 sensor driver for the OmniVision
452+ OV5645 camera.
363453
364454 To compile this driver as a module, choose M here: the
365− module will be called saa7115.
455+ module will be called ov5645.
366456
367−config VIDEO_TC358743
368− tristate "Toshiba TC358743 decoder"
369− depends on VIDEO_V4L2 && I2C
457+config VIDEO_OV5647
458+ tristate "OmniVision OV5647 sensor support"
459+ depends on I2C && VIDEO_DEV
370460 select MEDIA_CONTROLLER
371461 select VIDEO_V4L2_SUBDEV_API
372− select HDMI
373462 select V4L2_FWNODE
374463 help
375− Support for the Toshiba TC358743 HDMI to MIPI CSI-2 bridge.
464+ This is a Video4Linux2 sensor driver for the OmniVision
465+ OV5647 camera.
376466
377467 To compile this driver as a module, choose M here: the
378− module will be called tc358743.
379−
380−config VIDEO_TC358743_CEC
381− bool "Enable Toshiba TC358743 CEC support"
382− depends on VIDEO_TC358743
383− select CEC_CORE
384− help
385− When selected the tc358743 will support the optional
386− HDMI CEC feature.
468+ module will be called ov5647.
387469
388−config VIDEO_TVP514X
389− tristate "Texas Instruments TVP514x video decoder"
390− depends on VIDEO_V4L2 && I2C
470+config VIDEO_OV5648
471+ tristate "OmniVision OV5648 sensor support"
472+ depends on I2C && PM && VIDEO_DEV
473+ select MEDIA_CONTROLLER
474+ select VIDEO_V4L2_SUBDEV_API
391475 select V4L2_FWNODE
392476 help
393− This is a Video4Linux2 sensor driver for the TI TVP5146/47
394− decoder. It is currently working with the TI OMAP3 camera
395− controller.
477+ This is a Video4Linux2 sensor driver for the OmniVision
478+ OV5648 camera.
396479
397480 To compile this driver as a module, choose M here: the
398− module will be called tvp514x.
481+ module will be called ov5648.
399482
400−config VIDEO_TVP5150
401− tristate "Texas Instruments TVP5150 video decoder"
402− depends on VIDEO_V4L2 && I2C
483+config VIDEO_OV5670
484+ tristate "OmniVision OV5670 sensor support"
485+ depends on I2C && VIDEO_DEV
486+ select MEDIA_CONTROLLER
487+ select VIDEO_V4L2_SUBDEV_API
403488 select V4L2_FWNODE
404− select REGMAP_I2C
405489 help
406− Support for the Texas Instruments TVP5150 video decoder.
490+ This is a Video4Linux2 sensor driver for the OmniVision
491+ OV5670 camera.
407492
408493 To compile this driver as a module, choose M here: the
409− module will be called tvp5150.
494+ module will be called ov5670.
410495
411−config VIDEO_TVP7002
412− tristate "Texas Instruments TVP7002 video decoder"
413− depends on VIDEO_V4L2 && I2C
496+config VIDEO_OV5675
497+ tristate "OmniVision OV5675 sensor support"
498+ depends on I2C && VIDEO_DEV
499+ select MEDIA_CONTROLLER
500+ select VIDEO_V4L2_SUBDEV_API
414501 select V4L2_FWNODE
415502 help
416− Support for the Texas Instruments TVP7002 video decoder.
503+ This is a Video4Linux2 sensor driver for the OmniVision
504+ OV5675 camera.
417505
418506 To compile this driver as a module, choose M here: the
419− module will be called tvp7002.
507+ module will be called ov5675.
420508
421−config VIDEO_TW2804
422− tristate "Techwell TW2804 multiple video decoder"
423− depends on VIDEO_V4L2 && I2C
509+config VIDEO_OV5693
510+ tristate "OmniVision OV5693 sensor support"
511+ depends on I2C && VIDEO_DEV
512+ select V4L2_FWNODE
424513 help
425− Support for the Techwell tw2804 multiple video decoder.
514+ This is a Video4Linux2 sensor driver for the OmniVision
515+ OV5693 camera.
426516
427517 To compile this driver as a module, choose M here: the
428− module will be called tw2804.
518+ module will be called ov5693.
429519
430−config VIDEO_TW9903
431− tristate "Techwell TW9903 video decoder"
432− depends on VIDEO_V4L2 && I2C
520+config VIDEO_OV5695
521+ tristate "OmniVision OV5695 sensor support"
522+ depends on I2C && VIDEO_DEV
523+ select V4L2_FWNODE
433524 help
434− Support for the Techwell tw9903 multi-standard video decoder
435− with high quality down scaler.
525+ This is a Video4Linux2 sensor driver for the OmniVision
526+ OV5695 camera.
436527
437528 To compile this driver as a module, choose M here: the
438− module will be called tw9903.
529+ module will be called ov5695.
439530
440−config VIDEO_TW9906
441− tristate "Techwell TW9906 video decoder"
442− depends on VIDEO_V4L2 && I2C
531+config VIDEO_OV6650
532+ tristate "OmniVision OV6650 sensor support"
533+ depends on I2C && VIDEO_DEV
443534 help
444− Support for the Techwell tw9906 enhanced multi-standard comb filter
445− video decoder with YCbCr input support.
535+ This is a Video4Linux2 sensor driver for the OmniVision
536+ OV6650 camera.
446537
447538 To compile this driver as a module, choose M here: the
448− module will be called tw9906.
539+ module will be called ov6650.
449540
450−config VIDEO_TW9910
451− tristate "Techwell TW9910 video decoder"
452− depends on VIDEO_V4L2 && I2C
453− select V4L2_ASYNC
541+config VIDEO_OV7251
542+ tristate "OmniVision OV7251 sensor support"
543+ depends on I2C && VIDEO_DEV
544+ select MEDIA_CONTROLLER
545+ select VIDEO_V4L2_SUBDEV_API
546+ select V4L2_FWNODE
454547 help
455− Support for Techwell TW9910 NTSC/PAL/SECAM video decoder.
548+ This is a Video4Linux2 sensor driver for the OmniVision
549+ OV7251 camera.
456550
457551 To compile this driver as a module, choose M here: the
458− module will be called tw9910.
552+ module will be called ov7251.
459553
460−config VIDEO_VPX3220
461− tristate "vpx3220a, vpx3216b & vpx3214c video decoders"
462− depends on VIDEO_V4L2 && I2C
554+config VIDEO_OV7640
555+ tristate "OmniVision OV7640 sensor support"
556+ depends on I2C && VIDEO_DEV
463557 help
464− Support for VPX322x video decoders.
558+ This is a Video4Linux2 sensor driver for the OmniVision
559+ OV7640 camera.
465560
466561 To compile this driver as a module, choose M here: the
467− module will be called vpx3220.
562+ module will be called ov7640.
468563
469−config VIDEO_MAX9286
470− tristate "Maxim MAX9286 GMSL deserializer support"
471− depends on I2C && I2C_MUX
472− depends on VIDEO_V4L2
473− depends on OF_GPIO
564+config VIDEO_OV7670
565+ tristate "OmniVision OV7670 sensor support"
566+ depends on I2C && VIDEO_DEV
474567 select V4L2_FWNODE
475− select VIDEO_V4L2_SUBDEV_API
476− select MEDIA_CONTROLLER
477568 help
478− This driver supports the Maxim MAX9286 GMSL deserializer.
479−
480− To compile this driver as a module, choose M here: the
481− module will be called max9286.
482−
483−comment "Video and audio decoders"
569+ This is a Video4Linux2 sensor driver for the OmniVision
570+ OV7670 VGA camera. It currently only works with the M88ALP01
571+ controller.
484572
485−config VIDEO_SAA717X
486− tristate "Philips SAA7171/3/4 audio/video decoders"
487− depends on VIDEO_V4L2 && I2C
573+config VIDEO_OV772X
574+ tristate "OmniVision OV772x sensor support"
575+ depends on I2C && VIDEO_DEV
576+ select REGMAP_SCCB
577+ select V4L2_FWNODE
488578 help
489− Support for the Philips SAA7171/3/4 audio/video decoders.
579+ This is a Video4Linux2 sensor driver for the OmniVision
580+ OV772x camera.
490581
491582 To compile this driver as a module, choose M here: the
492− module will be called saa717x.
493−
494−source "drivers/media/i2c/cx25840/Kconfig"
495−
496−endmenu
583+ module will be called ov772x.
497584
498−menu "Video encoders"
499− visible if !MEDIA_HIDE_ANCILLARY_SUBDRV
585+config VIDEO_OV7740
586+ tristate "OmniVision OV7740 sensor support"
587+ depends on I2C && VIDEO_DEV
588+ select REGMAP_SCCB
589+ help
590+ This is a Video4Linux2 sensor driver for the OmniVision
591+ OV7740 VGA camera sensor.
500592
501−config VIDEO_SAA7127
502− tristate "Philips SAA7127/9 digital video encoders"
503− depends on VIDEO_V4L2 && I2C
593+config VIDEO_OV8856
594+ tristate "OmniVision OV8856 sensor support"
595+ depends on I2C && VIDEO_DEV
596+ select MEDIA_CONTROLLER
597+ select VIDEO_V4L2_SUBDEV_API
598+ select V4L2_FWNODE
504599 help
505− Support for the Philips SAA7127/9 digital video encoders.
600+ This is a Video4Linux2 sensor driver for the OmniVision
601+ OV8856 camera sensor.
506602
507603 To compile this driver as a module, choose M here: the
508− module will be called saa7127.
604+ module will be called ov8856.
509605
510−config VIDEO_SAA7185
511− tristate "Philips SAA7185 video encoder"
512− depends on VIDEO_V4L2 && I2C
606+config VIDEO_OV8865
607+ tristate "OmniVision OV8865 sensor support"
608+ depends on I2C && PM && VIDEO_DEV
609+ select MEDIA_CONTROLLER
610+ select VIDEO_V4L2_SUBDEV_API
611+ select V4L2_FWNODE
513612 help
514− Support for the Philips SAA7185 video encoder.
613+ This is a Video4Linux2 sensor driver for OmniVision
614+ OV8865 camera sensor.
515615
516616 To compile this driver as a module, choose M here: the
517− module will be called saa7185.
617+ module will be called ov8865.
518618
519−config VIDEO_ADV7170
520− tristate "Analog Devices ADV7170 video encoder"
521− depends on VIDEO_V4L2 && I2C
619+config VIDEO_OV9282
620+ tristate "OmniVision OV9282 sensor support"
621+ depends on OF_GPIO
622+ depends on I2C && VIDEO_DEV
623+ select VIDEO_V4L2_SUBDEV_API
624+ select MEDIA_CONTROLLER
625+ select V4L2_FWNODE
522626 help
523− Support for the Analog Devices ADV7170 video encoder driver
627+ This is a Video4Linux2 sensor driver for the OmniVision
628+ OV9282 camera sensor.
524629
525630 To compile this driver as a module, choose M here: the
526− module will be called adv7170.
631+ module will be called ov9282.
527632
528−config VIDEO_ADV7175
529− tristate "Analog Devices ADV7175 video encoder"
530− depends on VIDEO_V4L2 && I2C
633+config VIDEO_OV9640
634+ tristate "OmniVision OV9640 sensor support"
635+ depends on I2C && VIDEO_DEV
531636 help
532− Support for the Analog Devices ADV7175 video encoder driver
637+ This is a Video4Linux2 sensor driver for the OmniVision
638+ OV9640 camera sensor.
533639
534− To compile this driver as a module, choose M here: the
535− module will be called adv7175.
640+config VIDEO_OV9650
641+ tristate "OmniVision OV9650/OV9652 sensor support"
642+ depends on I2C && VIDEO_DEV
643+ select MEDIA_CONTROLLER
644+ select VIDEO_V4L2_SUBDEV_API
645+ select REGMAP_SCCB
646+ help
647+ This is a V4L2 sensor driver for the Omnivision
648+ OV9650 and OV9652 camera sensors.
536649
537−config VIDEO_ADV7343
538− tristate "ADV7343 video encoder"
539− depends on I2C
540− select V4L2_ASYNC
650+config VIDEO_OV9734
651+ tristate "OmniVision OV9734 sensor support"
652+ depends on VIDEO_DEV && I2C
653+ depends on ACPI || COMPILE_TEST
654+ select MEDIA_CONTROLLER
655+ select VIDEO_V4L2_SUBDEV_API
656+ select V4L2_FWNODE
541657 help
542− Support for Analog Devices I2C bus based ADV7343 encoder.
658+ This is a Video4Linux2 sensor driver for the OmniVision
659+ OV9734 camera.
543660
544661 To compile this driver as a module, choose M here: the
545− module will be called adv7343.
662+ module's name is ov9734.
546663
547−config VIDEO_ADV7393
548− tristate "ADV7393 video encoder"
664+config VIDEO_RDACM20
665+ tristate "IMI RDACM20 camera support"
549666 depends on I2C
667+ select V4L2_FWNODE
668+ select VIDEO_V4L2_SUBDEV_API
669+ select MEDIA_CONTROLLER
670+ select VIDEO_MAX9271_LIB
550671 help
551− Support for Analog Devices I2C bus based ADV7393 encoder.
672+ This driver supports the IMI RDACM20 GMSL camera, used in
673+ ADAS systems.
552674
553− To compile this driver as a module, choose M here: the
554− module will be called adv7393.
675+ This camera should be used in conjunction with a GMSL
676+ deserialiser such as the MAX9286.
555677
556−config VIDEO_ADV7511
557− tristate "Analog Devices ADV7511 encoder"
558− depends on VIDEO_V4L2 && I2C
559− depends on DRM_I2C_ADV7511=n || COMPILE_TEST
560− select MEDIA_CONTROLLER
678+config VIDEO_RDACM21
679+ tristate "IMI RDACM21 camera support"
680+ depends on I2C
681+ select V4L2_FWNODE
561682 select VIDEO_V4L2_SUBDEV_API
562− select HDMI
683+ select MEDIA_CONTROLLER
684+ select VIDEO_MAX9271_LIB
563685 help
564− Support for the Analog Devices ADV7511 video encoder.
686+ This driver supports the IMI RDACM21 GMSL camera, used in
687+ ADAS systems.
565688
566− This is a Analog Devices HDMI transmitter.
689+ This camera should be used in conjunction with a GMSL
690+ deserialiser such as the MAX9286.
691+
692+config VIDEO_RJ54N1
693+ tristate "Sharp RJ54N1CB0C sensor support"
694+ depends on I2C && VIDEO_DEV
695+ help
696+ This is a V4L2 sensor driver for Sharp RJ54N1CB0C CMOS image
697+ sensor.
567698
568699 To compile this driver as a module, choose M here: the
569− module will be called adv7511.
700+ module will be called rj54n1.
570701
571−config VIDEO_ADV7511_CEC
572− bool "Enable Analog Devices ADV7511 CEC support"
573− depends on VIDEO_ADV7511
574− select CEC_CORE
702+config VIDEO_S5C73M3
703+ tristate "Samsung S5C73M3 sensor support"
704+ depends on I2C && SPI && VIDEO_DEV
705+ select MEDIA_CONTROLLER
706+ select VIDEO_V4L2_SUBDEV_API
707+ select V4L2_FWNODE
575708 help
576− When selected the adv7511 will support the optional
577− HDMI CEC feature.
709+ This is a V4L2 sensor driver for Samsung S5C73M3
710+ 8 Mpixel camera.
578711
579−config VIDEO_AD9389B
580− tristate "Analog Devices AD9389B encoder"
581− depends on VIDEO_V4L2 && I2C
712+config VIDEO_S5K4ECGX
713+ tristate "Samsung S5K4ECGX sensor support"
714+ depends on I2C && VIDEO_DEV
582715 select MEDIA_CONTROLLER
583716 select VIDEO_V4L2_SUBDEV_API
717+ select CRC32
718+ help
719+ This is a V4L2 sensor driver for Samsung S5K4ECGX 5M
720+ camera sensor with an embedded SoC image signal processor.
584721
722+config VIDEO_S5K5BAF
723+ tristate "Samsung S5K5BAF sensor support"
724+ depends on I2C && VIDEO_DEV
725+ select MEDIA_CONTROLLER
726+ select VIDEO_V4L2_SUBDEV_API
727+ select V4L2_FWNODE
585728 help
586− Support for the Analog Devices AD9389B video encoder.
729+ This is a V4L2 sensor driver for Samsung S5K5BAF 2M
730+ camera sensor with an embedded SoC image signal processor.
587731
588− This is a Analog Devices HDMI transmitter.
732+config VIDEO_S5K6A3
733+ tristate "Samsung S5K6A3 sensor support"
734+ depends on I2C && VIDEO_DEV
735+ select MEDIA_CONTROLLER
736+ select VIDEO_V4L2_SUBDEV_API
737+ help
738+ This is a V4L2 sensor driver for Samsung S5K6A3 raw
739+ camera sensor.
589740
590− To compile this driver as a module, choose M here: the
591− module will be called ad9389b.
741+config VIDEO_S5K6AA
742+ tristate "Samsung S5K6AAFX sensor support"
743+ depends on I2C && VIDEO_DEV
744+ select MEDIA_CONTROLLER
745+ select VIDEO_V4L2_SUBDEV_API
746+ help
747+ This is a V4L2 sensor driver for Samsung S5K6AA(FX) 1.3M
748+ camera sensor with an embedded SoC image signal processor.
592749
593−config VIDEO_AK881X
594− tristate "AK8813/AK8814 video encoders"
595− depends on I2C
750+config VIDEO_SR030PC30
751+ tristate "Siliconfile SR030PC30 sensor support"
752+ depends on I2C && VIDEO_DEV
596753 help
597− Video output driver for AKM AK8813 and AK8814 TV encoders
754+ This driver supports SR030PC30 VGA camera from Siliconfile
598755
599−config VIDEO_THS8200
600− tristate "Texas Instruments THS8200 video encoder"
601− depends on VIDEO_V4L2 && I2C
602− select V4L2_ASYNC
756+config VIDEO_VS6624
757+ tristate "ST VS6624 sensor support"
758+ depends on VIDEO_DEV && I2C
603759 help
604− Support for the Texas Instruments THS8200 video encoder.
760+ This is a Video4Linux2 sensor driver for the ST VS6624
761+ camera.
605762
606763 To compile this driver as a module, choose M here: the
607− module will be called ths8200.
764+ module will be called vs6624.
765+
766+source "drivers/media/i2c/ccs/Kconfig"
767+source "drivers/media/i2c/et8ek8/Kconfig"
768+source "drivers/media/i2c/m5mols/Kconfig"
769+
608770 endmenu
609771
610−menu "Video improvement chips"
611− visible if !MEDIA_HIDE_ANCILLARY_SUBDRV
772+menu "Lens drivers"
773+ visible if MEDIA_CAMERA_SUPPORT
612774
613−config VIDEO_UPD64031A
614− tristate "NEC Electronics uPD64031A Ghost Reduction"
615− depends on VIDEO_V4L2 && I2C
775+config VIDEO_AD5820
776+ tristate "AD5820 lens voice coil support"
777+ depends on GPIOLIB && I2C && VIDEO_DEV
778+ select MEDIA_CONTROLLER
616779 select V4L2_ASYNC
617780 help
618− Support for the NEC Electronics uPD64031A Ghost Reduction
619− video chip. It is most often found in NTSC TV cards made for
620− Japan and is used to reduce the 'ghosting' effect that can
621− be present in analog TV broadcasts.
622−
623− To compile this driver as a module, choose M here: the
624− module will be called upd64031a.
781+ This is a driver for the AD5820 camera lens voice coil.
782+ It is used for example in Nokia N900 (RX-51).
625783
626−config VIDEO_UPD64083
627− tristate "NEC Electronics uPD64083 3-Dimensional Y/C separation"
628− depends on VIDEO_V4L2 && I2C
784+config VIDEO_AK7375
785+ tristate "AK7375 lens voice coil support"
786+ depends on I2C && VIDEO_DEV
787+ select MEDIA_CONTROLLER
788+ select VIDEO_V4L2_SUBDEV_API
789+ select V4L2_ASYNC
629790 help
630− Support for the NEC Electronics uPD64083 3-Dimensional Y/C
631− separation video chip. It is used to improve the quality of
632− the colors of a composite signal.
633−
634− To compile this driver as a module, choose M here: the
635− module will be called upd64083.
636−endmenu
791+ This is a driver for the AK7375 camera lens voice coil.
792+ AK7375 is a 12 bit DAC with 120mA output current sink
793+ capability. This is designed for linear control of
794+ voice coil motors, controlled via I2C serial interface.
637795
638−menu "Audio/Video compression chips"
639− visible if !MEDIA_HIDE_ANCILLARY_SUBDRV
796+config VIDEO_DW9714
797+ tristate "DW9714 lens voice coil support"
798+ depends on I2C && VIDEO_DEV
799+ select MEDIA_CONTROLLER
800+ select VIDEO_V4L2_SUBDEV_API
801+ select V4L2_ASYNC
802+ help
803+ This is a driver for the DW9714 camera lens voice coil.
804+ DW9714 is a 10 bit DAC with 120mA output current sink
805+ capability. This is designed for linear control of
806+ voice coil motors, controlled via I2C serial interface.
640807
641−config VIDEO_SAA6752HS
642− tristate "Philips SAA6752HS MPEG-2 Audio/Video Encoder"
643− depends on VIDEO_V4L2 && I2C
644− select CRC32
808+config VIDEO_DW9768
809+ tristate "DW9768 lens voice coil support"
810+ depends on I2C && VIDEO_DEV
811+ select MEDIA_CONTROLLER
812+ select VIDEO_V4L2_SUBDEV_API
813+ select V4L2_FWNODE
645814 help
646− Support for the Philips SAA6752HS MPEG-2 video and MPEG-audio/AC-3
647− audio encoder with multiplexer.
815+ This is a driver for the DW9768 camera lens voice coil.
816+ DW9768 is a 10 bit DAC with 100mA output current sink
817+ capability. This is designed for linear control of
818+ voice coil motors, controlled via I2C serial interface.
648819
649− To compile this driver as a module, choose M here: the
650− module will be called saa6752hs.
820+config VIDEO_DW9807_VCM
821+ tristate "DW9807 lens voice coil support"
822+ depends on I2C && VIDEO_DEV
823+ select MEDIA_CONTROLLER
824+ select VIDEO_V4L2_SUBDEV_API
825+ select V4L2_ASYNC
826+ help
827+ This is a driver for the DW9807 camera lens voice coil.
828+ DW9807 is a 10 bit DAC with 100mA output current sink
829+ capability. This is designed for linear control of
830+ voice coil motors, controlled via I2C serial interface.
651831
652832 endmenu
653833
654−menu "SDR tuner chips"
655− visible if !MEDIA_HIDE_ANCILLARY_SUBDRV
834+menu "Flash devices"
835+ visible if MEDIA_CAMERA_SUPPORT
656836
657−config SDR_MAX2175
658− tristate "Maxim 2175 RF to Bits tuner"
659− depends on VIDEO_V4L2 && MEDIA_SDR_SUPPORT && I2C
660− select REGMAP_I2C
837+config VIDEO_ADP1653
838+ tristate "ADP1653 flash support"
839+ depends on I2C && VIDEO_DEV
840+ select MEDIA_CONTROLLER
661841 select V4L2_ASYNC
662842 help
663− Support for Maxim 2175 tuner. It is an advanced analog/digital
664− radio receiver with RF-to-Bits front-end designed for SDR solutions.
843+ This is a driver for the ADP1653 flash controller. It is used for
844+ example in Nokia N900.
665845
666− To compile this driver as a module, choose M here; the
667− module will be called max2175.
846+config VIDEO_LM3560
847+ tristate "LM3560 dual flash driver support"
848+ depends on I2C && VIDEO_DEV
849+ select MEDIA_CONTROLLER
850+ select REGMAP_I2C
851+ select V4L2_ASYNC
852+ help
853+ This is a driver for the lm3560 dual flash controllers. It controls
854+ flash, torch LEDs.
668855
856+config VIDEO_LM3646
857+ tristate "LM3646 dual flash driver support"
858+ depends on I2C && VIDEO_DEV
859+ select MEDIA_CONTROLLER
860+ select REGMAP_I2C
861+ select V4L2_ASYNC
862+ help
863+ This is a driver for the lm3646 dual flash controllers. It controls
864+ flash, torch LEDs.
669865
670866 endmenu
671867
672−menu "Miscellaneous helper chips"
868+#
869+# V4L2 I2C drivers that aren't related with Camera support
870+#
871+
872+comment "audio, video and radio I2C drivers auto-selected by 'Autoselect ancillary drivers'"
873+ depends on MEDIA_HIDE_ANCILLARY_SUBDRV
874+#
875+# Encoder / Decoder module configuration
876+#
877+
878+menu "Audio decoders, processors and mixers"
673879 visible if !MEDIA_HIDE_ANCILLARY_SUBDRV
674880
675−config VIDEO_THS7303
676− tristate "THS7303/53 Video Amplifier"
677− depends on VIDEO_V4L2 && I2C
678− select V4L2_ASYNC
881+config VIDEO_CS3308
882+ tristate "Cirrus Logic CS3308 audio ADC"
883+ depends on VIDEO_DEV && I2C
679884 help
680− Support for TI THS7303/53 video amplifier
885+ Support for the Cirrus Logic CS3308 High Performance 8-Channel
886+ Analog Volume Control
681887
682888 To compile this driver as a module, choose M here: the
683− module will be called ths7303.
889+ module will be called cs3308.
684890
685−config VIDEO_M52790
686− tristate "Mitsubishi M52790 A/V switch"
687− depends on VIDEO_V4L2 && I2C
891+config VIDEO_CS5345
892+ tristate "Cirrus Logic CS5345 audio ADC"
893+ depends on VIDEO_DEV && I2C
688894 help
689− Support for the Mitsubishi M52790 A/V switch.
895+ Support for the Cirrus Logic CS5345 24-bit, 192 kHz
896+ stereo A/D converter.
690897
691− To compile this driver as a module, choose M here: the
692− module will be called m52790.
898+ To compile this driver as a module, choose M here: the
899+ module will be called cs5345.
693900
694−config VIDEO_I2C
695− tristate "I2C transport video support"
696− depends on VIDEO_V4L2 && I2C
697− select VIDEOBUF2_VMALLOC
698− imply HWMON
901+config VIDEO_CS53L32A
902+ tristate "Cirrus Logic CS53L32A audio ADC"
903+ depends on VIDEO_DEV && I2C
699904 help
700− Enable the I2C transport video support which supports the
701− following:
702− * Panasonic AMG88xx Grid-Eye Sensors
703− * Melexis MLX90640 Thermal Cameras
905+ Support for the Cirrus Logic CS53L32A low voltage
906+ stereo A/D converter.
704907
705908 To compile this driver as a module, choose M here: the
706− module will be called video-i2c
909+ module will be called cs53l32a.
707910
708−config VIDEO_ST_MIPID02
709− tristate "STMicroelectronics MIPID02 CSI-2 to PARALLEL bridge"
710− depends on I2C && VIDEO_V4L2
711− select MEDIA_CONTROLLER
712− select VIDEO_V4L2_SUBDEV_API
713− select V4L2_FWNODE
911+config VIDEO_MSP3400
912+ tristate "Micronas MSP34xx audio decoders"
913+ depends on VIDEO_DEV && I2C
714914 help
715− Support for STMicroelectronics MIPID02 CSI-2 to PARALLEL bridge.
716− It is used to allow usage of CSI-2 sensor with PARALLEL port
717− controller.
915+ Support for the Micronas MSP34xx series of audio decoders.
718916
719917 To compile this driver as a module, choose M here: the
720− module will be called st-mipid02.
721−endmenu
722−
723−#
724−# V4L2 I2C drivers that are related with Camera support
725−#
726−
727−menu "Camera sensor devices"
728− visible if MEDIA_CAMERA_SUPPORT
918+ module will be called msp3400.
729919
730−config VIDEO_APTINA_PLL
731− tristate
920+config VIDEO_SONY_BTF_MPX
921+ tristate "Sony BTF's internal MPX"
922+ depends on VIDEO_DEV && I2C
923+ help
924+ Support for the internal MPX of the Sony BTF-PG472Z tuner.
732925
733−config VIDEO_CCS_PLL
734− tristate
926+ To compile this driver as a module, choose M here: the
927+ module will be called sony-btf-mpx.
735928
736−config VIDEO_HI556
737− tristate "Hynix Hi-556 sensor support"
738− depends on I2C && VIDEO_V4L2
929+config VIDEO_TDA1997X
930+ tristate "NXP TDA1997x HDMI receiver"
931+ depends on VIDEO_DEV && I2C
932+ depends on SND_SOC
933+ select HDMI
934+ select SND_PCM
935+ select V4L2_FWNODE
739936 select MEDIA_CONTROLLER
740937 select VIDEO_V4L2_SUBDEV_API
741− select V4L2_FWNODE
742938 help
743− This is a Video4Linux2 sensor driver for the Hynix
744− Hi-556 camera.
939+ V4L2 subdevice driver for the NXP TDA1997x HDMI receivers.
745940
746941 To compile this driver as a module, choose M here: the
747− module will be called hi556.
942+ module will be called tda1997x.
748943
749−config VIDEO_HI846
750− tristate "Hynix Hi-846 sensor support"
751− depends on I2C && VIDEO_V4L2
752− select MEDIA_CONTROLLER
753− select VIDEO_V4L2_SUBDEV_API
754− select V4L2_FWNODE
944+config VIDEO_TDA7432
945+ tristate "Philips TDA7432 audio processor"
946+ depends on VIDEO_DEV && I2C
755947 help
756− This is a Video4Linux2 sensor driver for the Hynix
757− Hi-846 camera.
948+ Support for tda7432 audio decoder chip found on some bt8xx boards.
758949
759950 To compile this driver as a module, choose M here: the
760− module will be called hi846.
951+ module will be called tda7432.
761952
762−config VIDEO_IMX208
763− tristate "Sony IMX208 sensor support"
764− depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
765− depends on MEDIA_CAMERA_SUPPORT
953+config VIDEO_TDA9840
954+ tristate "Philips TDA9840 audio processor"
955+ depends on I2C
766956 help
767− This is a Video4Linux2 sensor driver for the Sony
768− IMX208 camera.
957+ Support for tda9840 audio decoder chip found on some Zoran boards.
769958
770959 To compile this driver as a module, choose M here: the
771− module will be called imx208.
960+ module will be called tda9840.
772961
773−config VIDEO_IMX214
774− tristate "Sony IMX214 sensor support"
775− depends on GPIOLIB && I2C && VIDEO_V4L2
776− select V4L2_FWNODE
777− select MEDIA_CONTROLLER
778− select VIDEO_V4L2_SUBDEV_API
779− select REGMAP_I2C
962+config VIDEO_TEA6415C
963+ tristate "Philips TEA6415C audio processor"
964+ depends on I2C
780965 help
781− This is a Video4Linux2 sensor driver for the Sony
782− IMX214 camera.
966+ Support for tea6415c audio decoder chip found on some bt8xx boards.
783967
784968 To compile this driver as a module, choose M here: the
785− module will be called imx214.
969+ module will be called tea6415c.
786970
787−config VIDEO_IMX219
788− tristate "Sony IMX219 sensor support"
789− depends on I2C && VIDEO_V4L2
790− select MEDIA_CONTROLLER
791− select VIDEO_V4L2_SUBDEV_API
792− select V4L2_FWNODE
971+config VIDEO_TEA6420
972+ tristate "Philips TEA6420 audio processor"
973+ depends on I2C
793974 help
794− This is a Video4Linux2 sensor driver for the Sony
795− IMX219 camera.
975+ Support for tea6420 audio decoder chip found on some bt8xx boards.
796976
797977 To compile this driver as a module, choose M here: the
798− module will be called imx219.
978+ module will be called tea6420.
799979
800−config VIDEO_IMX258
801− tristate "Sony IMX258 sensor support"
802− depends on I2C && VIDEO_V4L2
803− select MEDIA_CONTROLLER
804− select VIDEO_V4L2_SUBDEV_API
980+config VIDEO_TLV320AIC23B
981+ tristate "Texas Instruments TLV320AIC23B audio codec"
982+ depends on VIDEO_DEV && I2C
805983 help
806− This is a Video4Linux2 sensor driver for the Sony
807− IMX258 camera.
984+ Support for the Texas Instruments TLV320AIC23B audio codec.
808985
809986 To compile this driver as a module, choose M here: the
810− module will be called imx258.
987+ module will be called tlv320aic23b.
811988
812−config VIDEO_IMX274
813− tristate "Sony IMX274 sensor support"
814− depends on I2C && VIDEO_V4L2
815− select MEDIA_CONTROLLER
816− select VIDEO_V4L2_SUBDEV_API
817− select REGMAP_I2C
818− help
819− This is a V4L2 sensor driver for the Sony IMX274
820− CMOS image sensor.
821−
822−config VIDEO_IMX290
823− tristate "Sony IMX290 sensor support"
824− depends on I2C && VIDEO_V4L2
825− select MEDIA_CONTROLLER
826− select VIDEO_V4L2_SUBDEV_API
827− select REGMAP_I2C
828− select V4L2_FWNODE
989+config VIDEO_TVAUDIO
990+ tristate "Simple audio decoder chips"
991+ depends on VIDEO_DEV && I2C
829992 help
830− This is a Video4Linux2 sensor driver for the Sony
831− IMX290 camera sensor.
993+ Support for several audio decoder chips found on some bt8xx boards:
994+ Philips: tda9840, tda9873h, tda9874h/a, tda9850, tda985x, tea6300,
995+ tea6320, tea6420, tda8425, ta8874z.
996+ Microchip: pic16c54 based design on ProVideo PV951 board.
832997
833998 To compile this driver as a module, choose M here: the
834− module will be called imx290.
999+ module will be called tvaudio.
8351000
836−config VIDEO_IMX319
837− tristate "Sony IMX319 sensor support"
838− depends on I2C && VIDEO_V4L2
839− select MEDIA_CONTROLLER
840− select VIDEO_V4L2_SUBDEV_API
1001+config VIDEO_UDA1342
1002+ tristate "Philips UDA1342 audio codec"
1003+ depends on VIDEO_DEV && I2C
8411004 help
842− This is a Video4Linux2 sensor driver for the Sony
843− IMX319 camera.
1005+ Support for the Philips UDA1342 audio codec.
8441006
8451007 To compile this driver as a module, choose M here: the
846− module will be called imx319.
1008+ module will be called uda1342.
8471009
848−config VIDEO_IMX334
849− tristate "Sony IMX334 sensor support"
850− depends on OF_GPIO
851− depends on I2C && VIDEO_V4L2
852− select VIDEO_V4L2_SUBDEV_API
853− select MEDIA_CONTROLLER
854− select V4L2_FWNODE
1010+config VIDEO_VP27SMPX
1011+ tristate "Panasonic VP27's internal MPX"
1012+ depends on VIDEO_DEV && I2C
8551013 help
856− This is a Video4Linux2 sensor driver for the Sony
857− IMX334 camera.
1014+ Support for the internal MPX of the Panasonic VP27s tuner.
8581015
8591016 To compile this driver as a module, choose M here: the
860− module will be called imx334.
1017+ module will be called vp27smpx.
8611018
862−config VIDEO_IMX335
863− tristate "Sony IMX335 sensor support"
864− depends on OF_GPIO
865− depends on I2C && VIDEO_V4L2
866− select VIDEO_V4L2_SUBDEV_API
867− select MEDIA_CONTROLLER
868− select V4L2_FWNODE
1019+config VIDEO_WM8739
1020+ tristate "Wolfson Microelectronics WM8739 stereo audio ADC"
1021+ depends on VIDEO_DEV && I2C
8691022 help
870− This is a Video4Linux2 sensor driver for the Sony
871− IMX335 camera.
1023+ Support for the Wolfson Microelectronics WM8739
1024+ stereo A/D Converter.
8721025
8731026 To compile this driver as a module, choose M here: the
874− module will be called imx335.
1027+ module will be called wm8739.
8751028
876−config VIDEO_IMX355
877− tristate "Sony IMX355 sensor support"
878− depends on I2C && VIDEO_V4L2
879− select MEDIA_CONTROLLER
880− select VIDEO_V4L2_SUBDEV_API
1029+config VIDEO_WM8775
1030+ tristate "Wolfson Microelectronics WM8775 audio ADC with input mixer"
1031+ depends on VIDEO_DEV && I2C
8811032 help
882− This is a Video4Linux2 sensor driver for the Sony
883− IMX355 camera.
1033+ Support for the Wolfson Microelectronics WM8775 high
1034+ performance stereo A/D Converter with a 4 channel input mixer.
8841035
8851036 To compile this driver as a module, choose M here: the
886− module will be called imx355.
887−
888−config VIDEO_IMX412
889− tristate "Sony IMX412 sensor support"
890− depends on OF_GPIO
891− depends on I2C && VIDEO_V4L2
892− select VIDEO_V4L2_SUBDEV_API
893− select MEDIA_CONTROLLER
894− select V4L2_FWNODE
895− help
896− This is a Video4Linux2 sensor driver for the Sony
897− IMX412 camera.
1037+ module will be called wm8775.
8981038
899− To compile this driver as a module, choose M here: the
900− module will be called imx412.
1039+endmenu
9011040
902−config VIDEO_OV02A10
903− tristate "OmniVision OV02A10 sensor support"
904− depends on VIDEO_V4L2 && I2C
905− select MEDIA_CONTROLLER
906− select VIDEO_V4L2_SUBDEV_API
907− select V4L2_FWNODE
908− help
909− This is a Video4Linux2 sensor driver for the OmniVision
910− OV02A10 camera.
1041+menu "RDS decoders"
1042+ visible if !MEDIA_HIDE_ANCILLARY_SUBDRV
9111043
912− To compile this driver as a module, choose M here: the
913− module will be called ov02a10.
1044+config VIDEO_SAA6588
1045+ tristate "SAA6588 Radio Chip RDS decoder support"
1046+ depends on VIDEO_DEV && I2C
9141047
915−config VIDEO_OV2640
916− tristate "OmniVision OV2640 sensor support"
917− depends on VIDEO_V4L2 && I2C
9181048 help
919− This is a Video4Linux2 sensor driver for the OmniVision
920− OV2640 camera.
1049+ Support for this Radio Data System (RDS) decoder. This allows
1050+ seeing radio station identification transmitted using this
1051+ standard.
9211052
9221053 To compile this driver as a module, choose M here: the
923− module will be called ov2640.
1054+ module will be called saa6588.
9241055
925−config VIDEO_OV2659
926− tristate "OmniVision OV2659 sensor support"
927− depends on VIDEO_V4L2 && I2C && GPIOLIB
928− select V4L2_FWNODE
929− help
930− This is a Video4Linux2 sensor driver for the OmniVision
931− OV2659 camera.
1056+endmenu
9321057
933− To compile this driver as a module, choose M here: the
934− module will be called ov2659.
1058+menu "Video decoders"
1059+ visible if !MEDIA_HIDE_ANCILLARY_SUBDRV
9351060
936−config VIDEO_OV2680
937− tristate "OmniVision OV2680 sensor support"
938− depends on VIDEO_V4L2 && I2C
1061+config VIDEO_ADV7180
1062+ tristate "Analog Devices ADV7180 decoder"
1063+ depends on GPIOLIB && VIDEO_DEV && I2C
9391064 select MEDIA_CONTROLLER
940− select V4L2_FWNODE
1065+ select VIDEO_V4L2_SUBDEV_API
1066+ select V4L2_ASYNC
9411067 help
942− This is a Video4Linux2 sensor driver for the OmniVision
943− OV2680 camera.
1068+ Support for the Analog Devices ADV7180 video decoder.
9441069
9451070 To compile this driver as a module, choose M here: the
946− module will be called ov2680.
1071+ module will be called adv7180.
9471072
948−config VIDEO_OV2685
949− tristate "OmniVision OV2685 sensor support"
950− depends on VIDEO_V4L2 && I2C
951− select MEDIA_CONTROLLER
952− select V4L2_FWNODE
1073+config VIDEO_ADV7183
1074+ tristate "Analog Devices ADV7183 decoder"
1075+ depends on VIDEO_DEV && I2C
9531076 help
954− This is a Video4Linux2 sensor driver for the OmniVision
955− OV2685 camera.
1077+ V4l2 subdevice driver for the Analog Devices
1078+ ADV7183 video decoder.
9561079
9571080 To compile this driver as a module, choose M here: the
958− module will be called ov2685.
1081+ module will be called adv7183.
9591082
960−config VIDEO_OV2740
961− tristate "OmniVision OV2740 sensor support"
962− depends on VIDEO_V4L2 && I2C
963− depends on ACPI || COMPILE_TEST
1083+config VIDEO_ADV748X
1084+ tristate "Analog Devices ADV748x decoder"
1085+ depends on VIDEO_DEV && I2C
1086+ depends on OF
9641087 select MEDIA_CONTROLLER
9651088 select VIDEO_V4L2_SUBDEV_API
966− select V4L2_FWNODE
9671089 select REGMAP_I2C
1090+ select V4L2_FWNODE
9681091 help
969− This is a Video4Linux2 sensor driver for the OmniVision
970− OV2740 camera.
1092+ V4L2 subdevice driver for the Analog Devices
1093+ ADV7481 and ADV7482 HDMI/Analog video decoders.
9711094
9721095 To compile this driver as a module, choose M here: the
973− module will be called ov2740.
1096+ module will be called adv748x.
9741097
975−config VIDEO_OV5640
976− tristate "OmniVision OV5640 sensor support"
977− depends on OF
978− depends on GPIOLIB && VIDEO_V4L2 && I2C
1098+config VIDEO_ADV7604
1099+ tristate "Analog Devices ADV7604 decoder"
1100+ depends on VIDEO_DEV && I2C
1101+ depends on GPIOLIB || COMPILE_TEST
9791102 select MEDIA_CONTROLLER
9801103 select VIDEO_V4L2_SUBDEV_API
1104+ select REGMAP_I2C
1105+ select HDMI
9811106 select V4L2_FWNODE
9821107 help
983− This is a Video4Linux2 sensor driver for the Omnivision
984− OV5640 camera sensor with a MIPI CSI-2 interface.
1108+ Support for the Analog Devices ADV7604 video decoder.
9851109
986−config VIDEO_OV5645
987− tristate "OmniVision OV5645 sensor support"
988− depends on OF
989− depends on I2C && VIDEO_V4L2
990− select MEDIA_CONTROLLER
991− select VIDEO_V4L2_SUBDEV_API
992− select V4L2_FWNODE
993− help
994− This is a Video4Linux2 sensor driver for the OmniVision
995− OV5645 camera.
1110+ This is a Analog Devices Component/Graphics Digitizer
1111+ with 4:1 Multiplexed HDMI Receiver.
9961112
9971113 To compile this driver as a module, choose M here: the
998− module will be called ov5645.
1114+ module will be called adv7604.
9991115
1000−config VIDEO_OV5647
1001− tristate "OmniVision OV5647 sensor support"
1002− depends on I2C && VIDEO_V4L2
1116+config VIDEO_ADV7604_CEC
1117+ bool "Enable Analog Devices ADV7604 CEC support"
1118+ depends on VIDEO_ADV7604
1119+ select CEC_CORE
1120+ help
1121+ When selected the adv7604 will support the optional
1122+ HDMI CEC feature.
1123+
1124+config VIDEO_ADV7842
1125+ tristate "Analog Devices ADV7842 decoder"
1126+ depends on VIDEO_DEV && I2C
10031127 select MEDIA_CONTROLLER
10041128 select VIDEO_V4L2_SUBDEV_API
1005− select V4L2_FWNODE
1129+ select HDMI
10061130 help
1007− This is a Video4Linux2 sensor driver for the OmniVision
1008− OV5647 camera.
1131+ Support for the Analog Devices ADV7842 video decoder.
1132+
1133+ This is a Analog Devices Component/Graphics/SD Digitizer
1134+ with 2:1 Multiplexed HDMI Receiver.
10091135
10101136 To compile this driver as a module, choose M here: the
1011− module will be called ov5647.
1137+ module will be called adv7842.
10121138
1013−config VIDEO_OV5648
1014− tristate "OmniVision OV5648 sensor support"
1015− depends on I2C && PM && VIDEO_V4L2
1016− select MEDIA_CONTROLLER
1017− select VIDEO_V4L2_SUBDEV_API
1018− select V4L2_FWNODE
1139+config VIDEO_ADV7842_CEC
1140+ bool "Enable Analog Devices ADV7842 CEC support"
1141+ depends on VIDEO_ADV7842
1142+ select CEC_CORE
10191143 help
1020− This is a Video4Linux2 sensor driver for the OmniVision
1021− OV5648 camera.
1144+ When selected the adv7842 will support the optional
1145+ HDMI CEC feature.
1146+
1147+config VIDEO_BT819
1148+ tristate "BT819A VideoStream decoder"
1149+ depends on VIDEO_DEV && I2C
1150+ help
1151+ Support for BT819A video decoder.
10221152
10231153 To compile this driver as a module, choose M here: the
1024− module will be called ov5648.
1154+ module will be called bt819.
10251155
1026−config VIDEO_OV6650
1027− tristate "OmniVision OV6650 sensor support"
1028− depends on I2C && VIDEO_V4L2
1156+config VIDEO_BT856
1157+ tristate "BT856 VideoStream decoder"
1158+ depends on VIDEO_DEV && I2C
10291159 help
1030− This is a Video4Linux2 sensor driver for the OmniVision
1031− OV6650 camera.
1160+ Support for BT856 video decoder.
10321161
10331162 To compile this driver as a module, choose M here: the
1034− module will be called ov6650.
1163+ module will be called bt856.
10351164
1036−config VIDEO_OV5670
1037− tristate "OmniVision OV5670 sensor support"
1038− depends on I2C && VIDEO_V4L2
1039− select MEDIA_CONTROLLER
1040− select VIDEO_V4L2_SUBDEV_API
1041− select V4L2_FWNODE
1165+config VIDEO_BT866
1166+ tristate "BT866 VideoStream decoder"
1167+ depends on VIDEO_DEV && I2C
10421168 help
1043− This is a Video4Linux2 sensor driver for the OmniVision
1044− OV5670 camera.
1169+ Support for BT866 video decoder.
10451170
10461171 To compile this driver as a module, choose M here: the
1047− module will be called ov5670.
1172+ module will be called bt866.
10481173
1049−config VIDEO_OV5675
1050− tristate "OmniVision OV5675 sensor support"
1051− depends on I2C && VIDEO_V4L2
1174+config VIDEO_ISL7998X
1175+ tristate "Intersil ISL7998x video decoder"
1176+ depends on VIDEO_DEV && I2C
1177+ depends on OF_GPIO
10521178 select MEDIA_CONTROLLER
10531179 select VIDEO_V4L2_SUBDEV_API
1054− select V4L2_FWNODE
10551180 help
1056− This is a Video4Linux2 sensor driver for the OmniVision
1057− OV5675 camera.
1181+ Support for Intersil ISL7998x analog to MIPI-CSI2 or
1182+ BT.656 decoder.
10581183
1059− To compile this driver as a module, choose M here: the
1060− module will be called ov5675.
1184+config VIDEO_KS0127
1185+ tristate "KS0127 video decoder"
1186+ depends on VIDEO_DEV && I2C
1187+ help
1188+ Support for KS0127 video decoder.
10611189
1062−config VIDEO_OV5693
1063− tristate "OmniVision OV5693 sensor support"
1064− depends on I2C && VIDEO_V4L2
1065− select V4L2_FWNODE
1066− help
1067− This is a Video4Linux2 sensor driver for the OmniVision
1068− OV5693 camera.
1190+ This chip is used on AverMedia AVS6EYES Zoran-based MJPEG
1191+ cards.
10691192
10701193 To compile this driver as a module, choose M here: the
1071− module will be called ov5693.
1194+ module will be called ks0127.
10721195
1073−config VIDEO_OV5695
1074− tristate "OmniVision OV5695 sensor support"
1075− depends on I2C && VIDEO_V4L2
1196+config VIDEO_MAX9286
1197+ tristate "Maxim MAX9286 GMSL deserializer support"
1198+ depends on I2C && I2C_MUX
1199+ depends on VIDEO_DEV
1200+ depends on OF_GPIO
10761201 select V4L2_FWNODE
1202+ select VIDEO_V4L2_SUBDEV_API
1203+ select MEDIA_CONTROLLER
10771204 help
1078− This is a Video4Linux2 sensor driver for the OmniVision
1079− OV5695 camera.
1205+ This driver supports the Maxim MAX9286 GMSL deserializer.
10801206
10811207 To compile this driver as a module, choose M here: the
1082− module will be called ov5695.
1208+ module will be called max9286.
10831209
1084−config VIDEO_OV7251
1085− tristate "OmniVision OV7251 sensor support"
1086− depends on I2C && VIDEO_V4L2
1087− select MEDIA_CONTROLLER
1088− select VIDEO_V4L2_SUBDEV_API
1089− select V4L2_FWNODE
1210+config VIDEO_ML86V7667
1211+ tristate "OKI ML86V7667 video decoder"
1212+ depends on VIDEO_DEV && I2C
10901213 help
1091− This is a Video4Linux2 sensor driver for the OmniVision
1092− OV7251 camera.
1214+ Support for the OKI Semiconductor ML86V7667 video decoder.
10931215
10941216 To compile this driver as a module, choose M here: the
1095− module will be called ov7251.
1217+ module will be called ml86v7667.
10961218
1097−config VIDEO_OV772X
1098− tristate "OmniVision OV772x sensor support"
1099− depends on I2C && VIDEO_V4L2
1100− select REGMAP_SCCB
1101− select V4L2_FWNODE
1219+config VIDEO_SAA7110
1220+ tristate "Philips SAA7110 video decoder"
1221+ depends on VIDEO_DEV && I2C
11021222 help
1103− This is a Video4Linux2 sensor driver for the OmniVision
1104− OV772x camera.
1223+ Support for the Philips SAA7110 video decoders.
11051224
11061225 To compile this driver as a module, choose M here: the
1107− module will be called ov772x.
1226+ module will be called saa7110.
11081227
1109−config VIDEO_OV7640
1110− tristate "OmniVision OV7640 sensor support"
1111− depends on I2C && VIDEO_V4L2
1228+config VIDEO_SAA711X
1229+ tristate "Philips SAA7111/3/4/5 video decoders"
1230+ depends on VIDEO_DEV && I2C
11121231 help
1113− This is a Video4Linux2 sensor driver for the OmniVision
1114− OV7640 camera.
1232+ Support for the Philips SAA7111/3/4/5 video decoders.
11151233
11161234 To compile this driver as a module, choose M here: the
1117− module will be called ov7640.
1235+ module will be called saa7115.
11181236
1119−config VIDEO_OV7670
1120− tristate "OmniVision OV7670 sensor support"
1121− depends on I2C && VIDEO_V4L2
1237+config VIDEO_TC358743
1238+ tristate "Toshiba TC358743 decoder"
1239+ depends on VIDEO_DEV && I2C
1240+ select MEDIA_CONTROLLER
1241+ select VIDEO_V4L2_SUBDEV_API
1242+ select HDMI
11221243 select V4L2_FWNODE
11231244 help
1124− This is a Video4Linux2 sensor driver for the OmniVision
1125− OV7670 VGA camera. It currently only works with the M88ALP01
1126− controller.
1245+ Support for the Toshiba TC358743 HDMI to MIPI CSI-2 bridge.
11271246
1128−config VIDEO_OV7740
1129− tristate "OmniVision OV7740 sensor support"
1130− depends on I2C && VIDEO_V4L2
1131− select REGMAP_SCCB
1247+ To compile this driver as a module, choose M here: the
1248+ module will be called tc358743.
1249+
1250+config VIDEO_TC358743_CEC
1251+ bool "Enable Toshiba TC358743 CEC support"
1252+ depends on VIDEO_TC358743
1253+ select CEC_CORE
11321254 help
1133− This is a Video4Linux2 sensor driver for the OmniVision
1134− OV7740 VGA camera sensor.
1255+ When selected the tc358743 will support the optional
1256+ HDMI CEC feature.
11351257
1136−config VIDEO_OV8856
1137− tristate "OmniVision OV8856 sensor support"
1138− depends on I2C && VIDEO_V4L2
1139− select MEDIA_CONTROLLER
1140− select VIDEO_V4L2_SUBDEV_API
1258+config VIDEO_TVP514X
1259+ tristate "Texas Instruments TVP514x video decoder"
1260+ depends on VIDEO_DEV && I2C
11411261 select V4L2_FWNODE
11421262 help
1143− This is a Video4Linux2 sensor driver for the OmniVision
1144− OV8856 camera sensor.
1263+ This is a Video4Linux2 sensor driver for the TI TVP5146/47
1264+ decoder. It is currently working with the TI OMAP3 camera
1265+ controller.
11451266
11461267 To compile this driver as a module, choose M here: the
1147− module will be called ov8856.
1268+ module will be called tvp514x.
11481269
1149−config VIDEO_OV8865
1150− tristate "OmniVision OV8865 sensor support"
1151− depends on I2C && PM && VIDEO_V4L2
1152− select MEDIA_CONTROLLER
1153− select VIDEO_V4L2_SUBDEV_API
1270+config VIDEO_TVP5150
1271+ tristate "Texas Instruments TVP5150 video decoder"
1272+ depends on VIDEO_DEV && I2C
11541273 select V4L2_FWNODE
1274+ select REGMAP_I2C
11551275 help
1156− This is a Video4Linux2 sensor driver for OmniVision
1157− OV8865 camera sensor.
1276+ Support for the Texas Instruments TVP5150 video decoder.
11581277
11591278 To compile this driver as a module, choose M here: the
1160− module will be called ov8865.
1279+ module will be called tvp5150.
11611280
1162−config VIDEO_OV9282
1163− tristate "OmniVision OV9282 sensor support"
1164− depends on OF_GPIO
1165− depends on I2C && VIDEO_V4L2
1166− select VIDEO_V4L2_SUBDEV_API
1167− select MEDIA_CONTROLLER
1281+config VIDEO_TVP7002
1282+ tristate "Texas Instruments TVP7002 video decoder"
1283+ depends on VIDEO_DEV && I2C
11681284 select V4L2_FWNODE
11691285 help
1170− This is a Video4Linux2 sensor driver for the OmniVision
1171− OV9282 camera sensor.
1286+ Support for the Texas Instruments TVP7002 video decoder.
11721287
11731288 To compile this driver as a module, choose M here: the
1174− module will be called ov9282.
1289+ module will be called tvp7002.
11751290
1176−config VIDEO_OV9640
1177− tristate "OmniVision OV9640 sensor support"
1178− depends on I2C && VIDEO_V4L2
1291+config VIDEO_TW2804
1292+ tristate "Techwell TW2804 multiple video decoder"
1293+ depends on VIDEO_DEV && I2C
11791294 help
1180− This is a Video4Linux2 sensor driver for the OmniVision
1181− OV9640 camera sensor.
1295+ Support for the Techwell tw2804 multiple video decoder.
11821296
1183−config VIDEO_OV9650
1184− tristate "OmniVision OV9650/OV9652 sensor support"
1185− depends on I2C && VIDEO_V4L2
1186− select MEDIA_CONTROLLER
1187− select VIDEO_V4L2_SUBDEV_API
1188− select REGMAP_SCCB
1189− help
1190− This is a V4L2 sensor driver for the Omnivision
1191− OV9650 and OV9652 camera sensors.
1297+ To compile this driver as a module, choose M here: the
1298+ module will be called tw2804.
11921299
1193−config VIDEO_OV9734
1194− tristate "OmniVision OV9734 sensor support"
1195− depends on VIDEO_V4L2 && I2C
1196− depends on ACPI || COMPILE_TEST
1197− select MEDIA_CONTROLLER
1198− select VIDEO_V4L2_SUBDEV_API
1199− select V4L2_FWNODE
1300+config VIDEO_TW9903
1301+ tristate "Techwell TW9903 video decoder"
1302+ depends on VIDEO_DEV && I2C
12001303 help
1201− This is a Video4Linux2 sensor driver for the OmniVision
1202− OV9734 camera.
1304+ Support for the Techwell tw9903 multi-standard video decoder
1305+ with high quality down scaler.
12031306
12041307 To compile this driver as a module, choose M here: the
1205− module's name is ov9734.
1308+ module will be called tw9903.
12061309
1207−config VIDEO_OV13858
1208− tristate "OmniVision OV13858 sensor support"
1209− depends on I2C && VIDEO_V4L2
1210− select MEDIA_CONTROLLER
1211− select VIDEO_V4L2_SUBDEV_API
1212− select V4L2_FWNODE
1310+config VIDEO_TW9906
1311+ tristate "Techwell TW9906 video decoder"
1312+ depends on VIDEO_DEV && I2C
12131313 help
1214− This is a Video4Linux2 sensor driver for the OmniVision
1215− OV13858 camera.
1314+ Support for the Techwell tw9906 enhanced multi-standard comb filter
1315+ video decoder with YCbCr input support.
12161316
1217−config VIDEO_OV13B10
1218− tristate "OmniVision OV13B10 sensor support"
1219− depends on I2C && VIDEO_V4L2
1220− select MEDIA_CONTROLLER
1221− select VIDEO_V4L2_SUBDEV_API
1222− select V4L2_FWNODE
1223− help
1224− This is a Video4Linux2 sensor driver for the OmniVision
1225− OV13B10 camera.
1317+ To compile this driver as a module, choose M here: the
1318+ module will be called tw9906.
12261319
1227−config VIDEO_VS6624
1228− tristate "ST VS6624 sensor support"
1229− depends on VIDEO_V4L2 && I2C
1320+config VIDEO_TW9910
1321+ tristate "Techwell TW9910 video decoder"
1322+ depends on VIDEO_DEV && I2C
1323+ select V4L2_ASYNC
12301324 help
1231− This is a Video4Linux2 sensor driver for the ST VS6624
1232− camera.
1325+ Support for Techwell TW9910 NTSC/PAL/SECAM video decoder.
12331326
12341327 To compile this driver as a module, choose M here: the
1235− module will be called vs6624.
1328+ module will be called tw9910.
12361329
1237−config VIDEO_MT9M001
1238− tristate "mt9m001 support"
1239− depends on I2C && VIDEO_V4L2
1240− select MEDIA_CONTROLLER
1241− select VIDEO_V4L2_SUBDEV_API
1330+config VIDEO_VPX3220
1331+ tristate "vpx3220a, vpx3216b & vpx3214c video decoders"
1332+ depends on VIDEO_DEV && I2C
12421333 help
1243− This driver supports MT9M001 cameras from Micron, monochrome
1244− and colour models.
1334+ Support for VPX322x video decoders.
12451335
1246−config VIDEO_MT9M032
1247− tristate "MT9M032 camera sensor support"
1248− depends on I2C && VIDEO_V4L2
1249− select MEDIA_CONTROLLER
1250− select VIDEO_V4L2_SUBDEV_API
1251− select VIDEO_APTINA_PLL
1252− help
1253− This driver supports MT9M032 camera sensors from Aptina, monochrome
1254− models only.
1336+ To compile this driver as a module, choose M here: the
1337+ module will be called vpx3220.
12551338
1256−config VIDEO_MT9M111
1257− tristate "mt9m111, mt9m112 and mt9m131 support"
1258− depends on I2C && VIDEO_V4L2
1259− select V4L2_FWNODE
1260− help
1261− This driver supports MT9M111, MT9M112 and MT9M131 cameras from
1262− Micron/Aptina
1339+comment "Video and audio decoders"
12631340
1264−config VIDEO_MT9P031
1265− tristate "Aptina MT9P031 support"
1266− depends on I2C && VIDEO_V4L2
1267− select MEDIA_CONTROLLER
1268− select VIDEO_V4L2_SUBDEV_API
1269− select VIDEO_APTINA_PLL
1270− select V4L2_FWNODE
1341+config VIDEO_SAA717X
1342+ tristate "Philips SAA7171/3/4 audio/video decoders"
1343+ depends on VIDEO_DEV && I2C
12711344 help
1272− This is a Video4Linux2 sensor driver for the Aptina
1273− (Micron) mt9p031 5 Mpixel camera.
1345+ Support for the Philips SAA7171/3/4 audio/video decoders.
12741346
1275−config VIDEO_MT9T001
1276− tristate "Aptina MT9T001 support"
1277− depends on I2C && VIDEO_V4L2
1347+ To compile this driver as a module, choose M here: the
1348+ module will be called saa717x.
1349+
1350+source "drivers/media/i2c/cx25840/Kconfig"
1351+
1352+endmenu
1353+
1354+menu "Video encoders"
1355+ visible if !MEDIA_HIDE_ANCILLARY_SUBDRV
1356+
1357+config VIDEO_AD9389B
1358+ tristate "Analog Devices AD9389B encoder"
1359+ depends on VIDEO_DEV && I2C
12781360 select MEDIA_CONTROLLER
12791361 select VIDEO_V4L2_SUBDEV_API
1362+
12801363 help
1281− This is a Video4Linux2 sensor driver for the Aptina
1282− (Micron) mt0t001 3 Mpixel camera.
1364+ Support for the Analog Devices AD9389B video encoder.
12831365
1284−config VIDEO_MT9T112
1285− tristate "Aptina MT9T111/MT9T112 support"
1286− depends on I2C && VIDEO_V4L2
1366+ This is a Analog Devices HDMI transmitter.
1367+
1368+ To compile this driver as a module, choose M here: the
1369+ module will be called ad9389b.
1370+
1371+config VIDEO_ADV7170
1372+ tristate "Analog Devices ADV7170 video encoder"
1373+ depends on VIDEO_DEV && I2C
12871374 help
1288− This is a Video4Linux2 sensor driver for the Aptina
1289− (Micron) MT9T111 and MT9T112 3 Mpixel camera.
1375+ Support for the Analog Devices ADV7170 video encoder driver
12901376
12911377 To compile this driver as a module, choose M here: the
1292− module will be called mt9t112.
1378+ module will be called adv7170.
12931379
1294−config VIDEO_MT9V011
1295− tristate "Micron mt9v011 sensor support"
1296− depends on I2C && VIDEO_V4L2
1380+config VIDEO_ADV7175
1381+ tristate "Analog Devices ADV7175 video encoder"
1382+ depends on VIDEO_DEV && I2C
12971383 help
1298− This is a Video4Linux2 sensor driver for the Micron
1299− mt0v011 1.3 Mpixel camera. It currently only works with the
1300− em28xx driver.
1384+ Support for the Analog Devices ADV7175 video encoder driver
13011385
1302−config VIDEO_MT9V032
1303− tristate "Micron MT9V032 sensor support"
1304− depends on I2C && VIDEO_V4L2
1305− select MEDIA_CONTROLLER
1306− select VIDEO_V4L2_SUBDEV_API
1307− select REGMAP_I2C
1308− select V4L2_FWNODE
1309− help
1310− This is a Video4Linux2 sensor driver for the Micron
1311− MT9V032 752x480 CMOS sensor.
1386+ To compile this driver as a module, choose M here: the
1387+ module will be called adv7175.
13121388
1313−config VIDEO_MT9V111
1314− tristate "Aptina MT9V111 sensor support"
1315− depends on I2C && VIDEO_V4L2
1389+config VIDEO_ADV7343
1390+ tristate "ADV7343 video encoder"
1391+ depends on I2C
1392+ select V4L2_ASYNC
13161393 help
1317− This is a Video4Linux2 sensor driver for the Aptina/Micron
1318− MT9V111 sensor.
1394+ Support for Analog Devices I2C bus based ADV7343 encoder.
13191395
13201396 To compile this driver as a module, choose M here: the
1321− module will be called mt9v111.
1397+ module will be called adv7343.
13221398
1323−config VIDEO_SR030PC30
1324− tristate "Siliconfile SR030PC30 sensor support"
1325− depends on I2C && VIDEO_V4L2
1399+config VIDEO_ADV7393
1400+ tristate "ADV7393 video encoder"
1401+ depends on I2C
13261402 help
1327− This driver supports SR030PC30 VGA camera from Siliconfile
1403+ Support for Analog Devices I2C bus based ADV7393 encoder.
13281404
1329−config VIDEO_NOON010PC30
1330− tristate "Siliconfile NOON010PC30 sensor support"
1331− depends on I2C && VIDEO_V4L2
1405+ To compile this driver as a module, choose M here: the
1406+ module will be called adv7393.
1407+
1408+config VIDEO_ADV7511
1409+ tristate "Analog Devices ADV7511 encoder"
1410+ depends on VIDEO_DEV && I2C
1411+ depends on DRM_I2C_ADV7511=n || COMPILE_TEST
13321412 select MEDIA_CONTROLLER
13331413 select VIDEO_V4L2_SUBDEV_API
1414+ select HDMI
13341415 help
1335− This driver supports NOON010PC30 CIF camera from Siliconfile
1416+ Support for the Analog Devices ADV7511 video encoder.
13361417
1337−source "drivers/media/i2c/m5mols/Kconfig"
1418+ This is a Analog Devices HDMI transmitter.
13381419
1339−config VIDEO_MAX9271_LIB
1340− tristate
1420+ To compile this driver as a module, choose M here: the
1421+ module will be called adv7511.
13411422
1342−config VIDEO_RDACM20
1343− tristate "IMI RDACM20 camera support"
1344− depends on I2C
1345− select V4L2_FWNODE
1346− select VIDEO_V4L2_SUBDEV_API
1347− select MEDIA_CONTROLLER
1348− select VIDEO_MAX9271_LIB
1423+config VIDEO_ADV7511_CEC
1424+ bool "Enable Analog Devices ADV7511 CEC support"
1425+ depends on VIDEO_ADV7511
1426+ select CEC_CORE
13491427 help
1350− This driver supports the IMI RDACM20 GMSL camera, used in
1351− ADAS systems.
1352−
1353− This camera should be used in conjunction with a GMSL
1354− deserialiser such as the MAX9286.
1428+ When selected the adv7511 will support the optional
1429+ HDMI CEC feature.
13551430
1356−config VIDEO_RDACM21
1357− tristate "IMI RDACM21 camera support"
1431+config VIDEO_AK881X
1432+ tristate "AK8813/AK8814 video encoders"
13581433 depends on I2C
1359− select V4L2_FWNODE
1360− select VIDEO_V4L2_SUBDEV_API
1361− select MEDIA_CONTROLLER
1362− select VIDEO_MAX9271_LIB
13631434 help
1364− This driver supports the IMI RDACM21 GMSL camera, used in
1365− ADAS systems.
1366−
1367− This camera should be used in conjunction with a GMSL
1368− deserialiser such as the MAX9286.
1435+ Video output driver for AKM AK8813 and AK8814 TV encoders
13691436
1370−config VIDEO_RJ54N1
1371− tristate "Sharp RJ54N1CB0C sensor support"
1372− depends on I2C && VIDEO_V4L2
1437+config VIDEO_SAA7127
1438+ tristate "Philips SAA7127/9 digital video encoders"
1439+ depends on VIDEO_DEV && I2C
13731440 help
1374− This is a V4L2 sensor driver for Sharp RJ54N1CB0C CMOS image
1375− sensor.
1441+ Support for the Philips SAA7127/9 digital video encoders.
13761442
13771443 To compile this driver as a module, choose M here: the
1378− module will be called rj54n1.
1444+ module will be called saa7127.
13791445
1380−config VIDEO_S5K6AA
1381− tristate "Samsung S5K6AAFX sensor support"
1382− depends on I2C && VIDEO_V4L2
1383− select MEDIA_CONTROLLER
1384− select VIDEO_V4L2_SUBDEV_API
1446+config VIDEO_SAA7185
1447+ tristate "Philips SAA7185 video encoder"
1448+ depends on VIDEO_DEV && I2C
13851449 help
1386− This is a V4L2 sensor driver for Samsung S5K6AA(FX) 1.3M
1387− camera sensor with an embedded SoC image signal processor.
1450+ Support for the Philips SAA7185 video encoder.
13881451
1389−config VIDEO_S5K6A3
1390− tristate "Samsung S5K6A3 sensor support"
1391− depends on I2C && VIDEO_V4L2
1392− select MEDIA_CONTROLLER
1393− select VIDEO_V4L2_SUBDEV_API
1394− help
1395− This is a V4L2 sensor driver for Samsung S5K6A3 raw
1396− camera sensor.
1452+ To compile this driver as a module, choose M here: the
1453+ module will be called saa7185.
13971454
1398−config VIDEO_S5K4ECGX
1399− tristate "Samsung S5K4ECGX sensor support"
1400− depends on I2C && VIDEO_V4L2
1401− select MEDIA_CONTROLLER
1402− select VIDEO_V4L2_SUBDEV_API
1403− select CRC32
1455+config VIDEO_THS8200
1456+ tristate "Texas Instruments THS8200 video encoder"
1457+ depends on VIDEO_DEV && I2C
1458+ select V4L2_ASYNC
14041459 help
1405− This is a V4L2 sensor driver for Samsung S5K4ECGX 5M
1406− camera sensor with an embedded SoC image signal processor.
1460+ Support for the Texas Instruments THS8200 video encoder.
14071461
1408−config VIDEO_S5K5BAF
1409− tristate "Samsung S5K5BAF sensor support"
1410− depends on I2C && VIDEO_V4L2
1411− select MEDIA_CONTROLLER
1412− select VIDEO_V4L2_SUBDEV_API
1413− select V4L2_FWNODE
1462+ To compile this driver as a module, choose M here: the
1463+ module will be called ths8200.
1464+
1465+endmenu
1466+
1467+menu "Video improvement chips"
1468+ visible if !MEDIA_HIDE_ANCILLARY_SUBDRV
1469+
1470+config VIDEO_UPD64031A
1471+ tristate "NEC Electronics uPD64031A Ghost Reduction"
1472+ depends on VIDEO_DEV && I2C
1473+ select V4L2_ASYNC
14141474 help
1415− This is a V4L2 sensor driver for Samsung S5K5BAF 2M
1416− camera sensor with an embedded SoC image signal processor.
1475+ Support for the NEC Electronics uPD64031A Ghost Reduction
1476+ video chip. It is most often found in NTSC TV cards made for
1477+ Japan and is used to reduce the 'ghosting' effect that can
1478+ be present in analog TV broadcasts.
14171479
1418−source "drivers/media/i2c/ccs/Kconfig"
1419−source "drivers/media/i2c/et8ek8/Kconfig"
1480+ To compile this driver as a module, choose M here: the
1481+ module will be called upd64031a.
14201482
1421−config VIDEO_S5C73M3
1422− tristate "Samsung S5C73M3 sensor support"
1423− depends on I2C && SPI && VIDEO_V4L2
1424− select MEDIA_CONTROLLER
1425− select VIDEO_V4L2_SUBDEV_API
1426− select V4L2_FWNODE
1483+config VIDEO_UPD64083
1484+ tristate "NEC Electronics uPD64083 3-Dimensional Y/C separation"
1485+ depends on VIDEO_DEV && I2C
14271486 help
1428− This is a V4L2 sensor driver for Samsung S5C73M3
1429− 8 Mpixel camera.
1487+ Support for the NEC Electronics uPD64083 3-Dimensional Y/C
1488+ separation video chip. It is used to improve the quality of
1489+ the colors of a composite signal.
1490+
1491+ To compile this driver as a module, choose M here: the
1492+ module will be called upd64083.
14301493
14311494 endmenu
14321495
1433−menu "Lens drivers"
1434− visible if MEDIA_CAMERA_SUPPORT
1496+menu "Audio/Video compression chips"
1497+ visible if !MEDIA_HIDE_ANCILLARY_SUBDRV
14351498
1436−config VIDEO_AD5820
1437− tristate "AD5820 lens voice coil support"
1438− depends on GPIOLIB && I2C && VIDEO_V4L2
1439− select MEDIA_CONTROLLER
1440− select V4L2_ASYNC
1499+config VIDEO_SAA6752HS
1500+ tristate "Philips SAA6752HS MPEG-2 Audio/Video Encoder"
1501+ depends on VIDEO_DEV && I2C
1502+ select CRC32
14411503 help
1442− This is a driver for the AD5820 camera lens voice coil.
1443− It is used for example in Nokia N900 (RX-51).
1504+ Support for the Philips SAA6752HS MPEG-2 video and MPEG-audio/AC-3
1505+ audio encoder with multiplexer.
14441506
1445−config VIDEO_AK7375
1446− tristate "AK7375 lens voice coil support"
1447− depends on I2C && VIDEO_V4L2
1448− select MEDIA_CONTROLLER
1449− select VIDEO_V4L2_SUBDEV_API
1450− select V4L2_ASYNC
1451− help
1452− This is a driver for the AK7375 camera lens voice coil.
1453− AK7375 is a 12 bit DAC with 120mA output current sink
1454− capability. This is designed for linear control of
1455− voice coil motors, controlled via I2C serial interface.
1507+ To compile this driver as a module, choose M here: the
1508+ module will be called saa6752hs.
14561509
1457−config VIDEO_DW9714
1458− tristate "DW9714 lens voice coil support"
1459− depends on I2C && VIDEO_V4L2
1460− select MEDIA_CONTROLLER
1461− select VIDEO_V4L2_SUBDEV_API
1462− select V4L2_ASYNC
1463− help
1464− This is a driver for the DW9714 camera lens voice coil.
1465− DW9714 is a 10 bit DAC with 120mA output current sink
1466− capability. This is designed for linear control of
1467− voice coil motors, controlled via I2C serial interface.
1510+endmenu
14681511
1469−config VIDEO_DW9768
1470− tristate "DW9768 lens voice coil support"
1471− depends on I2C && VIDEO_V4L2
1472− select MEDIA_CONTROLLER
1473− select VIDEO_V4L2_SUBDEV_API
1474− select V4L2_FWNODE
1475− help
1476− This is a driver for the DW9768 camera lens voice coil.
1477− DW9768 is a 10 bit DAC with 100mA output current sink
1478− capability. This is designed for linear control of
1479− voice coil motors, controlled via I2C serial interface.
1512+menu "SDR tuner chips"
1513+ visible if !MEDIA_HIDE_ANCILLARY_SUBDRV
14801514
1481−config VIDEO_DW9807_VCM
1482− tristate "DW9807 lens voice coil support"
1483− depends on I2C && VIDEO_V4L2
1484− select MEDIA_CONTROLLER
1485− select VIDEO_V4L2_SUBDEV_API
1515+config SDR_MAX2175
1516+ tristate "Maxim 2175 RF to Bits tuner"
1517+ depends on VIDEO_DEV && MEDIA_SDR_SUPPORT && I2C
1518+ select REGMAP_I2C
14861519 select V4L2_ASYNC
14871520 help
1488− This is a driver for the DW9807 camera lens voice coil.
1489− DW9807 is a 10 bit DAC with 100mA output current sink
1490− capability. This is designed for linear control of
1491− voice coil motors, controlled via I2C serial interface.
1521+ Support for Maxim 2175 tuner. It is an advanced analog/digital
1522+ radio receiver with RF-to-Bits front-end designed for SDR solutions.
1523+
1524+ To compile this driver as a module, choose M here; the
1525+ module will be called max2175.
14921526
14931527 endmenu
14941528
1495−menu "Flash devices"
1496− visible if MEDIA_CAMERA_SUPPORT
1529+menu "Miscellaneous helper chips"
1530+ visible if !MEDIA_HIDE_ANCILLARY_SUBDRV
14971531
1498−config VIDEO_ADP1653
1499− tristate "ADP1653 flash support"
1500− depends on I2C && VIDEO_V4L2
1501− select MEDIA_CONTROLLER
1502− select V4L2_ASYNC
1532+config VIDEO_I2C
1533+ tristate "I2C transport video support"
1534+ depends on VIDEO_DEV && I2C
1535+ select VIDEOBUF2_VMALLOC
1536+ imply HWMON
15031537 help
1504− This is a driver for the ADP1653 flash controller. It is used for
1505− example in Nokia N900.
1538+ Enable the I2C transport video support which supports the
1539+ following:
1540+ * Panasonic AMG88xx Grid-Eye Sensors
1541+ * Melexis MLX90640 Thermal Cameras
15061542
1507−config VIDEO_LM3560
1508− tristate "LM3560 dual flash driver support"
1509− depends on I2C && VIDEO_V4L2
1510− select MEDIA_CONTROLLER
1511− select REGMAP_I2C
1512− select V4L2_ASYNC
1543+ To compile this driver as a module, choose M here: the
1544+ module will be called video-i2c
1545+
1546+config VIDEO_M52790
1547+ tristate "Mitsubishi M52790 A/V switch"
1548+ depends on VIDEO_DEV && I2C
15131549 help
1514− This is a driver for the lm3560 dual flash controllers. It controls
1515− flash, torch LEDs.
1550+ Support for the Mitsubishi M52790 A/V switch.
15161551
1517−config VIDEO_LM3646
1518− tristate "LM3646 dual flash driver support"
1519− depends on I2C && VIDEO_V4L2
1552+ To compile this driver as a module, choose M here: the
1553+ module will be called m52790.
1554+
1555+config VIDEO_ST_MIPID02
1556+ tristate "STMicroelectronics MIPID02 CSI-2 to PARALLEL bridge"
1557+ depends on I2C && VIDEO_DEV
15201558 select MEDIA_CONTROLLER
1521− select REGMAP_I2C
1559+ select VIDEO_V4L2_SUBDEV_API
1560+ select V4L2_FWNODE
1561+ help
1562+ Support for STMicroelectronics MIPID02 CSI-2 to PARALLEL bridge.
1563+ It is used to allow usage of CSI-2 sensor with PARALLEL port
1564+ controller.
1565+
1566+ To compile this driver as a module, choose M here: the
1567+ module will be called st-mipid02.
1568+
1569+config VIDEO_THS7303
1570+ tristate "THS7303/53 Video Amplifier"
1571+ depends on VIDEO_DEV && I2C
15221572 select V4L2_ASYNC
15231573 help
1524− This is a driver for the lm3646 dual flash controllers. It controls
1525− flash, torch LEDs.
1574+ Support for TI THS7303/53 video amplifier
1575+
1576+ To compile this driver as a module, choose M here: the
1577+ module will be called ths7303.
1578+
15261579 endmenu
15271580
1528−endif # VIDEO_V4L2
1581+endif # VIDEO_DEV
drivers/media/i2c/Makefile+98−94
@@ -1,31 +1,11 @@
11 # SPDX-License-Identifier: GPL-2.0
2−msp3400-objs := msp3400-driver.o msp3400-kthreads.o
3−obj-$(CONFIG_VIDEO_MSP3400) += msp3400.o
42
5−obj-$(CONFIG_VIDEO_CCS) += ccs/
6−obj-$(CONFIG_VIDEO_ET8EK8) += et8ek8/
7−obj-$(CONFIG_VIDEO_CX25840) += cx25840/
8−obj-$(CONFIG_VIDEO_M5MOLS) += m5mols/
3+msp3400-objs := msp3400-driver.o msp3400-kthreads.o
94
10−obj-$(CONFIG_VIDEO_APTINA_PLL) += aptina-pll.o
11−obj-$(CONFIG_VIDEO_TVAUDIO) += tvaudio.o
12−obj-$(CONFIG_VIDEO_TDA7432) += tda7432.o
13−obj-$(CONFIG_VIDEO_SAA6588) += saa6588.o
14−obj-$(CONFIG_VIDEO_TDA9840) += tda9840.o
15−obj-$(CONFIG_VIDEO_TDA1997X) += tda1997x.o
16−obj-$(CONFIG_VIDEO_TEA6415C) += tea6415c.o
17−obj-$(CONFIG_VIDEO_TEA6420) += tea6420.o
18−obj-$(CONFIG_VIDEO_SAA7110) += saa7110.o
19−obj-$(CONFIG_VIDEO_SAA711X) += saa7115.o
20−obj-$(CONFIG_VIDEO_SAA717X) += saa717x.o
21−obj-$(CONFIG_VIDEO_SAA7127) += saa7127.o
22−obj-$(CONFIG_VIDEO_SAA7185) += saa7185.o
23−obj-$(CONFIG_VIDEO_SAA6752HS) += saa6752hs.o
24−obj-$(CONFIG_VIDEO_AD5820) += ad5820.o
25−obj-$(CONFIG_VIDEO_AK7375) += ak7375.o
26−obj-$(CONFIG_VIDEO_DW9714) += dw9714.o
27−obj-$(CONFIG_VIDEO_DW9768) += dw9768.o
28−obj-$(CONFIG_VIDEO_DW9807_VCM) += dw9807-vcm.o
5+obj-$(CONFIG_SDR_MAX2175) += max2175.o
6+obj-$(CONFIG_VIDEO_AD5820) += ad5820.o
7+obj-$(CONFIG_VIDEO_AD9389B) += ad9389b.o
8+obj-$(CONFIG_VIDEO_ADP1653) += adp1653.o
299 obj-$(CONFIG_VIDEO_ADV7170) += adv7170.o
3010 obj-$(CONFIG_VIDEO_ADV7175) += adv7175.o
3111 obj-$(CONFIG_VIDEO_ADV7180) += adv7180.o
@@ -33,39 +13,68 @@ obj-$(CONFIG_VIDEO_ADV7183) += adv7183.o · 1 unmodified line
3313 obj-$(CONFIG_VIDEO_ADV7343) += adv7343.o
3414 obj-$(CONFIG_VIDEO_ADV7393) += adv7393.o
3515 obj-$(CONFIG_VIDEO_ADV748X) += adv748x/
16+obj-$(CONFIG_VIDEO_ADV7511) += adv7511-v4l2.o
3617 obj-$(CONFIG_VIDEO_ADV7604) += adv7604.o
3718 obj-$(CONFIG_VIDEO_ADV7842) += adv7842.o
38−obj-$(CONFIG_VIDEO_AD9389B) += ad9389b.o
39−obj-$(CONFIG_VIDEO_ADV7511) += adv7511-v4l2.o
40−obj-$(CONFIG_VIDEO_VPX3220) += vpx3220.o
41−obj-$(CONFIG_VIDEO_VS6624) += vs6624.o
19+obj-$(CONFIG_VIDEO_AK7375) += ak7375.o
20+obj-$(CONFIG_VIDEO_AK881X) += ak881x.o
21+obj-$(CONFIG_VIDEO_APTINA_PLL) += aptina-pll.o
4222 obj-$(CONFIG_VIDEO_BT819) += bt819.o
4323 obj-$(CONFIG_VIDEO_BT856) += bt856.o
4424 obj-$(CONFIG_VIDEO_BT866) += bt866.o
45−obj-$(CONFIG_VIDEO_KS0127) += ks0127.o
46−obj-$(CONFIG_VIDEO_THS7303) += ths7303.o
47−obj-$(CONFIG_VIDEO_THS8200) += ths8200.o
48−obj-$(CONFIG_VIDEO_TVP5150) += tvp5150.o
49−obj-$(CONFIG_VIDEO_TVP514X) += tvp514x.o
50−obj-$(CONFIG_VIDEO_TVP7002) += tvp7002.o
51−obj-$(CONFIG_VIDEO_TW2804) += tw2804.o
52−obj-$(CONFIG_VIDEO_TW9903) += tw9903.o
53−obj-$(CONFIG_VIDEO_TW9906) += tw9906.o
54−obj-$(CONFIG_VIDEO_TW9910) += tw9910.o
25+obj-$(CONFIG_VIDEO_CCS) += ccs/
26+obj-$(CONFIG_VIDEO_CCS_PLL) += ccs-pll.o
5527 obj-$(CONFIG_VIDEO_CS3308) += cs3308.o
5628 obj-$(CONFIG_VIDEO_CS5345) += cs5345.o
5729 obj-$(CONFIG_VIDEO_CS53L32A) += cs53l32a.o
30+obj-$(CONFIG_VIDEO_CX25840) += cx25840/
31+obj-$(CONFIG_VIDEO_DW9714) += dw9714.o
32+obj-$(CONFIG_VIDEO_DW9768) += dw9768.o
33+obj-$(CONFIG_VIDEO_DW9807_VCM) += dw9807-vcm.o
34+obj-$(CONFIG_VIDEO_ET8EK8) += et8ek8/
35+obj-$(CONFIG_VIDEO_HI556) += hi556.o
36+obj-$(CONFIG_VIDEO_HI846) += hi846.o
37+obj-$(CONFIG_VIDEO_HI847) += hi847.o
38+obj-$(CONFIG_VIDEO_I2C) += video-i2c.o
39+obj-$(CONFIG_VIDEO_IMX208) += imx208.o
40+obj-$(CONFIG_VIDEO_IMX214) += imx214.o
41+obj-$(CONFIG_VIDEO_IMX219) += imx219.o
42+obj-$(CONFIG_VIDEO_IMX258) += imx258.o
43+obj-$(CONFIG_VIDEO_IMX274) += imx274.o
44+obj-$(CONFIG_VIDEO_IMX290) += imx290.o
45+obj-$(CONFIG_VIDEO_IMX319) += imx319.o
46+obj-$(CONFIG_VIDEO_IMX334) += imx334.o
47+obj-$(CONFIG_VIDEO_IMX335) += imx335.o
48+obj-$(CONFIG_VIDEO_IMX355) += imx355.o
49+obj-$(CONFIG_VIDEO_IMX412) += imx412.o
50+obj-$(CONFIG_VIDEO_IR_I2C) += ir-kbd-i2c.o
51+obj-$(CONFIG_VIDEO_ISL7998X) += isl7998x.o
52+obj-$(CONFIG_VIDEO_KS0127) += ks0127.o
53+obj-$(CONFIG_VIDEO_LM3560) += lm3560.o
54+obj-$(CONFIG_VIDEO_LM3646) += lm3646.o
5855 obj-$(CONFIG_VIDEO_M52790) += m52790.o
59−obj-$(CONFIG_VIDEO_TLV320AIC23B) += tlv320aic23b.o
60−obj-$(CONFIG_VIDEO_UDA1342) += uda1342.o
61−obj-$(CONFIG_VIDEO_WM8775) += wm8775.o
62−obj-$(CONFIG_VIDEO_WM8739) += wm8739.o
63−obj-$(CONFIG_VIDEO_VP27SMPX) += vp27smpx.o
64−obj-$(CONFIG_VIDEO_SONY_BTF_MPX) += sony-btf-mpx.o
65−obj-$(CONFIG_VIDEO_UPD64031A) += upd64031a.o
66−obj-$(CONFIG_VIDEO_UPD64083) += upd64083.o
56+obj-$(CONFIG_VIDEO_M5MOLS) += m5mols/
57+obj-$(CONFIG_VIDEO_MAX9271_LIB) += max9271.o
58+obj-$(CONFIG_VIDEO_MAX9286) += max9286.o
59+obj-$(CONFIG_VIDEO_ML86V7667) += ml86v7667.o
60+obj-$(CONFIG_VIDEO_MSP3400) += msp3400.o
61+obj-$(CONFIG_VIDEO_MT9M001) += mt9m001.o
62+obj-$(CONFIG_VIDEO_MT9M032) += mt9m032.o
63+obj-$(CONFIG_VIDEO_MT9M111) += mt9m111.o
64+obj-$(CONFIG_VIDEO_MT9P031) += mt9p031.o
65+obj-$(CONFIG_VIDEO_MT9T001) += mt9t001.o
66+obj-$(CONFIG_VIDEO_MT9T112) += mt9t112.o
67+obj-$(CONFIG_VIDEO_MT9V011) += mt9v011.o
68+obj-$(CONFIG_VIDEO_MT9V032) += mt9v032.o
69+obj-$(CONFIG_VIDEO_MT9V111) += mt9v111.o
70+obj-$(CONFIG_VIDEO_NOON010PC30) += noon010pc30.o
71+obj-$(CONFIG_VIDEO_OG01A1B) += og01a1b.o
6772 obj-$(CONFIG_VIDEO_OV02A10) += ov02a10.o
73+obj-$(CONFIG_VIDEO_OV08D10) += ov08d10.o
74+obj-$(CONFIG_VIDEO_OV13858) += ov13858.o
75+obj-$(CONFIG_VIDEO_OV13B10) += ov13b10.o
6876 obj-$(CONFIG_VIDEO_OV2640) += ov2640.o
77+obj-$(CONFIG_VIDEO_OV2659) += ov2659.o
6978 obj-$(CONFIG_VIDEO_OV2680) += ov2680.o
7079 obj-$(CONFIG_VIDEO_OV2685) += ov2685.o
7180 obj-$(CONFIG_VIDEO_OV2740) += ov2740.o
@@ -89,51 +98,46 @@ obj-$(CONFIG_VIDEO_OV9282) += ov9282.o · 17 unmodified lines
8998 obj-$(CONFIG_VIDEO_OV9640) += ov9640.o
9099 obj-$(CONFIG_VIDEO_OV9650) += ov9650.o
91100 obj-$(CONFIG_VIDEO_OV9734) += ov9734.o
92−obj-$(CONFIG_VIDEO_OV13858) += ov13858.o
93−obj-$(CONFIG_VIDEO_OV13B10) += ov13b10.o
94−obj-$(CONFIG_VIDEO_MT9M001) += mt9m001.o
95−obj-$(CONFIG_VIDEO_MT9M032) += mt9m032.o
96−obj-$(CONFIG_VIDEO_MT9M111) += mt9m111.o
97−obj-$(CONFIG_VIDEO_MT9P031) += mt9p031.o
98−obj-$(CONFIG_VIDEO_MT9T001) += mt9t001.o
99−obj-$(CONFIG_VIDEO_MT9T112) += mt9t112.o
100−obj-$(CONFIG_VIDEO_MT9V011) += mt9v011.o
101−obj-$(CONFIG_VIDEO_MT9V032) += mt9v032.o
102−obj-$(CONFIG_VIDEO_MT9V111) += mt9v111.o
103−obj-$(CONFIG_VIDEO_SR030PC30) += sr030pc30.o
104−obj-$(CONFIG_VIDEO_NOON010PC30) += noon010pc30.o
105−obj-$(CONFIG_VIDEO_RJ54N1) += rj54n1cb0c.o
106−obj-$(CONFIG_VIDEO_S5K6AA) += s5k6aa.o
107−obj-$(CONFIG_VIDEO_S5K6A3) += s5k6a3.o
108−obj-$(CONFIG_VIDEO_S5K4ECGX) += s5k4ecgx.o
109−obj-$(CONFIG_VIDEO_S5K5BAF) += s5k5baf.o
110−obj-$(CONFIG_VIDEO_S5C73M3) += s5c73m3/
111−obj-$(CONFIG_VIDEO_ADP1653) += adp1653.o
112−obj-$(CONFIG_VIDEO_LM3560) += lm3560.o
113−obj-$(CONFIG_VIDEO_LM3646) += lm3646.o
114−obj-$(CONFIG_VIDEO_CCS_PLL) += ccs-pll.o
115−obj-$(CONFIG_VIDEO_AK881X) += ak881x.o
116−obj-$(CONFIG_VIDEO_IR_I2C) += ir-kbd-i2c.o
117−obj-$(CONFIG_VIDEO_I2C) += video-i2c.o
118−obj-$(CONFIG_VIDEO_ML86V7667) += ml86v7667.o
119−obj-$(CONFIG_VIDEO_OV2659) += ov2659.o
120−obj-$(CONFIG_VIDEO_TC358743) += tc358743.o
121−obj-$(CONFIG_VIDEO_HI556) += hi556.o
122−obj-$(CONFIG_VIDEO_HI846) += hi846.o
123−obj-$(CONFIG_VIDEO_IMX208) += imx208.o
124−obj-$(CONFIG_VIDEO_IMX214) += imx214.o
125−obj-$(CONFIG_VIDEO_IMX219) += imx219.o
126−obj-$(CONFIG_VIDEO_IMX258) += imx258.o
127−obj-$(CONFIG_VIDEO_IMX274) += imx274.o
128−obj-$(CONFIG_VIDEO_IMX290) += imx290.o
129−obj-$(CONFIG_VIDEO_IMX319) += imx319.o
130−obj-$(CONFIG_VIDEO_IMX334) += imx334.o
131−obj-$(CONFIG_VIDEO_IMX335) += imx335.o
132−obj-$(CONFIG_VIDEO_IMX355) += imx355.o
133−obj-$(CONFIG_VIDEO_IMX412) += imx412.o
134−obj-$(CONFIG_VIDEO_MAX9286) += max9286.o
135−obj-$(CONFIG_VIDEO_MAX9271_LIB) += max9271.o
136−obj-$(CONFIG_VIDEO_RDACM20) += rdacm20.o
137−obj-$(CONFIG_VIDEO_RDACM21) += rdacm21.o
101+obj-$(CONFIG_VIDEO_RDACM20) += rdacm20.o
102+obj-$(CONFIG_VIDEO_RDACM21) += rdacm21.o
103+obj-$(CONFIG_VIDEO_RJ54N1) += rj54n1cb0c.o
104+obj-$(CONFIG_VIDEO_S5C73M3) += s5c73m3/
105+obj-$(CONFIG_VIDEO_S5K4ECGX) += s5k4ecgx.o
106+obj-$(CONFIG_VIDEO_S5K5BAF) += s5k5baf.o
107+obj-$(CONFIG_VIDEO_S5K6A3) += s5k6a3.o
108+obj-$(CONFIG_VIDEO_S5K6AA) += s5k6aa.o
109+obj-$(CONFIG_VIDEO_SAA6588) += saa6588.o
110+obj-$(CONFIG_VIDEO_SAA6752HS) += saa6752hs.o
111+obj-$(CONFIG_VIDEO_SAA7110) += saa7110.o
112+obj-$(CONFIG_VIDEO_SAA711X) += saa7115.o
113+obj-$(CONFIG_VIDEO_SAA7127) += saa7127.o
114+obj-$(CONFIG_VIDEO_SAA717X) += saa717x.o
115+obj-$(CONFIG_VIDEO_SAA7185) += saa7185.o
116+obj-$(CONFIG_VIDEO_SONY_BTF_MPX) += sony-btf-mpx.o
117+obj-$(CONFIG_VIDEO_SR030PC30) += sr030pc30.o
138118 obj-$(CONFIG_VIDEO_ST_MIPID02) += st-mipid02.o
139−obj-$(CONFIG_SDR_MAX2175) += max2175.o
119+obj-$(CONFIG_VIDEO_TC358743) += tc358743.o
120+obj-$(CONFIG_VIDEO_TDA1997X) += tda1997x.o
121+obj-$(CONFIG_VIDEO_TDA7432) += tda7432.o
122+obj-$(CONFIG_VIDEO_TDA9840) += tda9840.o
123+obj-$(CONFIG_VIDEO_TEA6415C) += tea6415c.o
124+obj-$(CONFIG_VIDEO_TEA6420) += tea6420.o
125+obj-$(CONFIG_VIDEO_THS7303) += ths7303.o
126+obj-$(CONFIG_VIDEO_THS8200) += ths8200.o
127+obj-$(CONFIG_VIDEO_TLV320AIC23B) += tlv320aic23b.o
128+obj-$(CONFIG_VIDEO_TVAUDIO) += tvaudio.o
129+obj-$(CONFIG_VIDEO_TVP514X) += tvp514x.o
130+obj-$(CONFIG_VIDEO_TVP5150) += tvp5150.o
131+obj-$(CONFIG_VIDEO_TVP7002) += tvp7002.o
132+obj-$(CONFIG_VIDEO_TW2804) += tw2804.o
133+obj-$(CONFIG_VIDEO_TW9903) += tw9903.o
134+obj-$(CONFIG_VIDEO_TW9906) += tw9906.o
135+obj-$(CONFIG_VIDEO_TW9910) += tw9910.o
136+obj-$(CONFIG_VIDEO_UDA1342) += uda1342.o
137+obj-$(CONFIG_VIDEO_UPD64031A) += upd64031a.o
138+obj-$(CONFIG_VIDEO_UPD64083) += upd64083.o
139+obj-$(CONFIG_VIDEO_VP27SMPX) += vp27smpx.o
140+obj-$(CONFIG_VIDEO_VPX3220) += vpx3220.o
141+obj-$(CONFIG_VIDEO_VS6624) += vs6624.o
142+obj-$(CONFIG_VIDEO_WM8739) += wm8739.o
143+obj-$(CONFIG_VIDEO_WM8775) += wm8775.o
drivers/media/i2c/adv7180.c+5−5
@@ -784,16 +784,16 @@ static int adv7180_get_mbus_config(struct v4l2_subdev *sd, · 783 unmodified lines
784784
785785 if (state->chip_info->flags & ADV7180_FLAG_MIPI_CSI2) {
786786 cfg->type = V4L2_MBUS_CSI2_DPHY;
787− cfg->flags = V4L2_MBUS_CSI2_1_LANE |
788− V4L2_MBUS_CSI2_CHANNEL_0 |
789− V4L2_MBUS_CSI2_CONTINUOUS_CLOCK;
787+ cfg->bus.mipi_csi2.num_data_lanes = 1;
788+ cfg->bus.mipi_csi2.flags = 0;
790789 } else {
791790 /*
792791 * The ADV7180 sensor supports BT.601/656 output modes.
793792 * The BT.656 is default and not yet configurable by s/w.
794793 */
795− cfg->flags = V4L2_MBUS_MASTER | V4L2_MBUS_PCLK_SAMPLE_RISING |
796− V4L2_MBUS_DATA_ACTIVE_HIGH;
794+ cfg->bus.parallel.flags = V4L2_MBUS_MASTER |
795+ V4L2_MBUS_PCLK_SAMPLE_RISING |
796+ V4L2_MBUS_DATA_ACTIVE_HIGH;
797797 cfg->type = V4L2_MBUS_BT656;
798798 }
799799
drivers/media/i2c/adv7183.c+25−26
@@ -7,7 +7,7 @@ · 6 unmodified lines
77
88 #include <linux/delay.h>
99 #include <linux/errno.h>
10−#include <linux/gpio.h>
10+#include <linux/gpio/consumer.h>
1111 #include <linux/i2c.h>
1212 #include <linux/init.h>
1313 #include <linux/module.h>
@@ -28,8 +28,8 @@ struct adv7183 { · 14 unmodified lines
2828 v4l2_std_id std; /* Current set standard */
2929 u32 input;
3030 u32 output;
31− unsigned reset_pin;
32− unsigned oe_pin;
31+ struct gpio_desc *reset_pin;
32+ struct gpio_desc *oe_pin;
3333 struct v4l2_mbus_framefmt fmt;
3434 };
3535
@@ -465,9 +465,9 @@ static int adv7183_s_stream(struct v4l2_subdev *sd, int enable) · 429 unmodified lines
465465 struct adv7183 *decoder = to_adv7183(sd);
466466
467467 if (enable)
468− gpio_set_value(decoder->oe_pin, 0);
468+ gpiod_set_value(decoder->oe_pin, 1);
469469 else
470− gpio_set_value(decoder->oe_pin, 1);
470+ gpiod_set_value(decoder->oe_pin, 0);
471471 udelay(1);
472472 return 0;
473473 }
@@ -531,7 +531,6 @@ static int adv7183_probe(struct i2c_client *client, · 57 unmodified lines
531531 struct v4l2_subdev_format fmt = {
532532 .which = V4L2_SUBDEV_FORMAT_ACTIVE,
533533 };
534− const unsigned *pin_array;
535534
536535 /* Check if the adapter supports the needed features */
537536 if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA))
@@ -540,29 +539,28 @@ static int adv7183_probe(struct i2c_client *client, · 2 unmodified lines
540539 v4l_info(client, "chip found @ 0x%02x (%s)\n",
541540 client->addr << 1, client->adapter->name);
542541
543− pin_array = client->dev.platform_data;
544− if (pin_array == NULL)
545− return -EINVAL;
546−
547542 decoder = devm_kzalloc(&client->dev, sizeof(*decoder), GFP_KERNEL);
548543 if (decoder == NULL)
549544 return -ENOMEM;
550545
551− decoder->reset_pin = pin_array[0];
552− decoder->oe_pin = pin_array[1];
553−
554− if (devm_gpio_request_one(&client->dev, decoder->reset_pin,
555− GPIOF_OUT_INIT_LOW, "ADV7183 Reset")) {
556− v4l_err(client, "failed to request GPIO %d\n", decoder->reset_pin);
557− return -EBUSY;
558− }
559−
560− if (devm_gpio_request_one(&client->dev, decoder->oe_pin,
561− GPIOF_OUT_INIT_HIGH,
562− "ADV7183 Output Enable")) {
563− v4l_err(client, "failed to request GPIO %d\n", decoder->oe_pin);
564− return -EBUSY;
565− }
546+ /*
547+ * Requesting high will assert reset, the line should be
548+ * flagged as active low in descriptor table or machine description.
549+ */
550+ decoder->reset_pin = devm_gpiod_get(&client->dev, "reset",
551+ GPIOD_OUT_HIGH);
552+ if (IS_ERR(decoder->reset_pin))
553+ return PTR_ERR(decoder->reset_pin);
554+ gpiod_set_consumer_name(decoder->reset_pin, "ADV7183 Reset");
555+ /*
556+ * Requesting low will start with output disabled, the line should be
557+ * flagged as active low in descriptor table or machine description.
558+ */
559+ decoder->oe_pin = devm_gpiod_get(&client->dev, "oe",
560+ GPIOD_OUT_LOW);
561+ if (IS_ERR(decoder->oe_pin))
562+ return PTR_ERR(decoder->oe_pin);
563+ gpiod_set_consumer_name(decoder->reset_pin, "ADV7183 Output Enable");
566564
567565 sd = &decoder->sd;
568566 v4l2_i2c_subdev_init(sd, client, &adv7183_ops);
@@ -594,7 +592,8 @@ static int adv7183_probe(struct i2c_client *client, · 25 unmodified lines
594592 /* reset chip */
595593 /* reset pulse width at least 5ms */
596594 mdelay(10);
597− gpio_set_value(decoder->reset_pin, 1);
595+ /* De-assert reset line (descriptor tagged active low) */
596+ gpiod_set_value(decoder->reset_pin, 0);
598597 /* wait 5ms before any further i2c writes are performed */
599598 mdelay(5);
600599
drivers/media/i2c/adv748x/adv748x-csi2.c+1−17
@@ -222,23 +222,7 @@ static int adv748x_csi2_get_mbus_config(struct v4l2_subdev *sd, unsigned int pad · 221 unmodified lines
222222 return -EINVAL;
223223
224224 config->type = V4L2_MBUS_CSI2_DPHY;
225− switch (tx->active_lanes) {
226− case 1:
227− config->flags = V4L2_MBUS_CSI2_1_LANE;
228− break;
229−
230− case 2:
231− config->flags = V4L2_MBUS_CSI2_2_LANE;
232− break;
233−
234− case 3:
235− config->flags = V4L2_MBUS_CSI2_3_LANE;
236− break;
237−
238− case 4:
239− config->flags = V4L2_MBUS_CSI2_4_LANE;
240− break;
241− }
225+ config->bus.mipi_csi2.num_data_lanes = tx->active_lanes;
242226
243227 return 0;
244228 }
drivers/media/i2c/adv7511-v4l2.c+1−2
@@ -17,7 +17,6 @@ · 16 unmodified lines
1717 #include <linux/i2c.h>
1818 #include <linux/delay.h>
1919 #include <linux/videodev2.h>
20−#include <linux/gpio.h>
2120 #include <linux/workqueue.h>
2221 #include <linux/hdmi.h>
2322 #include <linux/v4l2-dv-timings.h>
@@ -522,7 +521,7 @@ static void log_infoframe(struct v4l2_subdev *sd, const struct adv7511_cfg_read_ · 498 unmodified lines
522521 buffer[3] = 0;
523522 buffer[3] = hdmi_infoframe_checksum(buffer, len + 4);
524523
525− if (hdmi_infoframe_unpack(&frame, buffer, sizeof(buffer)) < 0) {
524+ if (hdmi_infoframe_unpack(&frame, buffer, len + 4) < 0) {
526525 v4l2_err(sd, "%s: unpack of %s infoframe failed\n", __func__, cri->desc);
527526 return;
528527 }
drivers/media/i2c/adv7604.c+1−1
@@ -2484,7 +2484,7 @@ static int adv76xx_read_infoframe(struct v4l2_subdev *sd, int index, · 2483 unmodified lines
24842484 buffer[i + 3] = infoframe_read(sd,
24852485 adv76xx_cri[index].payload_addr + i);
24862486
2487− if (hdmi_infoframe_unpack(frame, buffer, sizeof(buffer)) < 0) {
2487+ if (hdmi_infoframe_unpack(frame, buffer, len + 3) < 0) {
24882488 v4l2_err(sd, "%s: unpack of %s infoframe failed\n", __func__,
24892489 adv76xx_cri[index].desc);
24902490 return -ENOENT;
drivers/media/i2c/adv7842.c+1−1
@@ -2583,7 +2583,7 @@ static void log_infoframe(struct v4l2_subdev *sd, const struct adv7842_cfg_read_ · 2582 unmodified lines
25832583 for (i = 0; i < len; i++)
25842584 buffer[i + 3] = infoframe_read(sd, cri->payload_addr + i);
25852585
2586− if (hdmi_infoframe_unpack(&frame, buffer, sizeof(buffer)) < 0) {
2586+ if (hdmi_infoframe_unpack(&frame, buffer, len + 3) < 0) {
25872587 v4l2_err(sd, "%s: unpack of %s infoframe failed\n", __func__, cri->desc);
25882588 return;
25892589 }
drivers/media/i2c/ccs/Kconfig+1−1
@@ -1,7 +1,7 @@
11 # SPDX-License-Identifier: GPL-2.0-only
22 config VIDEO_CCS
33 tristate "MIPI CCS/SMIA++/SMIA sensor support"
4− depends on I2C && VIDEO_V4L2 && HAVE_CLK
4+ depends on I2C && VIDEO_DEV && HAVE_CLK
55 select MEDIA_CONTROLLER
66 select VIDEO_V4L2_SUBDEV_API
77 select VIDEO_CCS_PLL
drivers/media/i2c/ccs/ccs-core.c+0−1
@@ -17,7 +17,6 @@ · 16 unmodified lines
1717 #include <linux/delay.h>
1818 #include <linux/device.h>
1919 #include <linux/firmware.h>
20−#include <linux/gpio.h>
2120 #include <linux/gpio/consumer.h>
2221 #include <linux/module.h>
2322 #include <linux/pm_runtime.h>
drivers/media/i2c/cx25840/Kconfig+1−1
@@ -1,7 +1,7 @@
11 # SPDX-License-Identifier: GPL-2.0-only
22 config VIDEO_CX25840
33 tristate "Conexant CX2584x audio/video decoders"
4− depends on VIDEO_V4L2 && I2C
4+ depends on VIDEO_DEV && I2C
55 help
66 Support for the Conexant CX2584x audio/video decoders.
77
drivers/media/i2c/dw9714.c+41−1
@@ -5,6 +5,7 @@ · 4 unmodified lines
55 #include <linux/i2c.h>
66 #include <linux/module.h>
77 #include <linux/pm_runtime.h>
8+#include <linux/regulator/consumer.h>
89 #include <media/v4l2-ctrls.h>
910 #include <media/v4l2-device.h>
1011 #include <media/v4l2-event.h>
@@ -36,6 +37,7 @@ struct dw9714_device { · 25 unmodified lines
3637 struct v4l2_ctrl_handler ctrls_vcm;
3738 struct v4l2_subdev sd;
3839 u16 current_val;
40+ struct regulator *vcc;
3941 };
4042
4143 static inline struct dw9714_device *to_dw9714_vcm(struct v4l2_ctrl *ctrl)
@@ -145,6 +147,16 @@ static int dw9714_probe(struct i2c_client *client) · 103 unmodified lines
145147 if (dw9714_dev == NULL)
146148 return -ENOMEM;
147149
150+ dw9714_dev->vcc = devm_regulator_get(&client->dev, "vcc");
151+ if (IS_ERR(dw9714_dev->vcc))
152+ return PTR_ERR(dw9714_dev->vcc);
153+
154+ rval = regulator_enable(dw9714_dev->vcc);
155+ if (rval < 0) {
156+ dev_err(&client->dev, "failed to enable vcc: %d\n", rval);
157+ return rval;
158+ }
159+
148160 v4l2_i2c_subdev_init(&dw9714_dev->sd, client, &dw9714_ops);
149161 dw9714_dev->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
150162 V4L2_SUBDEV_FL_HAS_EVENTS;
@@ -181,8 +193,18 @@ static int dw9714_remove(struct i2c_client *client) · 30 unmodified lines
181193 {
182194 struct v4l2_subdev *sd = i2c_get_clientdata(client);
183195 struct dw9714_device *dw9714_dev = sd_to_dw9714_vcm(sd);
196+ int ret;
184197
185198 pm_runtime_disable(&client->dev);
199+ if (!pm_runtime_status_suspended(&client->dev)) {
200+ ret = regulator_disable(dw9714_dev->vcc);
201+ if (ret) {
202+ dev_err(&client->dev,
203+ "Failed to disable vcc: %d\n", ret);
204+ return ret;
205+ }
206+ }
207+ pm_runtime_set_suspended(&client->dev);
186208 dw9714_subdev_cleanup(dw9714_dev);
187209
188210 return 0;
@@ -200,6 +222,9 @@ static int __maybe_unused dw9714_vcm_suspend(struct device *dev) · 11 unmodified lines
200222 struct dw9714_device *dw9714_dev = sd_to_dw9714_vcm(sd);
201223 int ret, val;
202224
225+ if (pm_runtime_suspended(&client->dev))
226+ return 0;
227+
203228 for (val = dw9714_dev->current_val & ~(DW9714_CTRL_STEPS - 1);
204229 val >= 0; val -= DW9714_CTRL_STEPS) {
205230 ret = dw9714_i2c_write(client,
@@ -208,7 +233,12 @@ static int __maybe_unused dw9714_vcm_suspend(struct device *dev) · 2 unmodified lines
208233 dev_err_once(dev, "%s I2C failure: %d", __func__, ret);
209234 usleep_range(DW9714_CTRL_DELAY_US, DW9714_CTRL_DELAY_US + 10);
210235 }
211− return 0;
236+
237+ ret = regulator_disable(dw9714_dev->vcc);
238+ if (ret)
239+ dev_err(dev, "Failed to disable vcc: %d\n", ret);
240+
241+ return ret;
212242 }
213243
214244 /*
@@ -224,6 +254,16 @@ static int __maybe_unused dw9714_vcm_resume(struct device *dev) · 9 unmodified lines
224254 struct dw9714_device *dw9714_dev = sd_to_dw9714_vcm(sd);
225255 int ret, val;
226256
257+ if (pm_runtime_suspended(&client->dev))
258+ return 0;
259+
260+ ret = regulator_enable(dw9714_dev->vcc);
261+ if (ret) {
262+ dev_err(dev, "Failed to enable vcc: %d\n", ret);
263+ return ret;
264+ }
265+ usleep_range(1000, 2000);
266+
227267 for (val = dw9714_dev->current_val % DW9714_CTRL_STEPS;
228268 val < dw9714_dev->current_val + DW9714_CTRL_STEPS - 1;
229269 val += DW9714_CTRL_STEPS) {
drivers/media/i2c/et8ek8/Kconfig+1−1
@@ -1,7 +1,7 @@
11 # SPDX-License-Identifier: GPL-2.0-only
22 config VIDEO_ET8EK8
33 tristate "ET8EK8 camera sensor support"
4− depends on I2C && VIDEO_V4L2
4+ depends on I2C && VIDEO_DEV
55 select MEDIA_CONTROLLER
66 select VIDEO_V4L2_SUBDEV_API
77 select V4L2_FWNODE
drivers/media/i2c/hi847.c+3012−0
@@ -0,0 +1,3012 @@
1+// SPDX-License-Identifier: GPL-2.0
2+// Copyright (c) 2022 Intel Corporation.
3+
4+#include <asm/unaligned.h>
5+#include <linux/acpi.h>
6+#include <linux/delay.h>
7+#include <linux/i2c.h>
8+#include <linux/module.h>
9+#include <linux/pm_runtime.h>
10+#include <media/v4l2-ctrls.h>
11+#include <media/v4l2-device.h>
12+#include <media/v4l2-fwnode.h>
13+
14+#define HI847_REG_VALUE_08BIT 1
15+#define HI847_REG_VALUE_16BIT 2
16+#define HI847_REG_VALUE_24BIT 3
17+
18+#define HI847_LINK_FREQ_400MHZ 400000000ULL
19+#define HI847_LINK_FREQ_200MHZ 200000000ULL
20+#define HI847_SCLK 72000000ULL
21+#define HI847_MCLK 19200000
22+#define HI847_DATA_LANES 4
23+#define HI847_RGB_DEPTH 10
24+
25+#define HI847_REG_CHIP_ID 0x0716
26+#define HI847_CHIP_ID 0x0847
27+
28+#define HI847_REG_MODE_SELECT 0x0B00
29+#define HI847_MODE_STANDBY 0x0000
30+#define HI847_MODE_STREAMING 0x0100
31+
32+#define HI847_REG_MODE_TG 0x027E
33+#define HI847_REG_MODE_TG_ENABLE 0x0100
34+#define HI847_REG_MODE_TG_DISABLE 0x0000
35+
36+/* vertical-timings from sensor */
37+#define HI847_REG_FLL 0x020E
38+#define HI847_FLL_30FPS 0x0B51
39+#define HI847_FLL_30FPS_MIN 0x0B51
40+#define HI847_FLL_60FPS 0x05A9
41+#define HI847_FLL_60FPS_MIN 0x05A9
42+#define HI847_FLL_MAX 0x7fff
43+
44+/* horizontal-timings from sensor */
45+#define HI847_REG_LLP 0x0206
46+
47+/* Exposure controls from sensor */
48+#define HI847_REG_EXPOSURE 0x020A
49+#define HI847_EXPOSURE_MIN 4
50+#define HI847_EXPOSURE_MAX_MARGIN 4
51+#define HI847_EXPOSURE_STEP 1
52+
53+/* Analog gain controls from sensor */
54+#define HI847_REG_ANALOG_GAIN 0x0212
55+#define HI847_ANAL_GAIN_MIN 0
56+#define HI847_ANAL_GAIN_MAX 240
57+#define HI847_ANAL_GAIN_STEP 1
58+
59+/* Digital gain controls from sensor */
60+#define HI847_REG_MWB_GR_GAIN 0x0214
61+#define HI847_REG_MWB_GB_GAIN 0x0216
62+#define HI847_REG_MWB_R_GAIN 0x0218
63+#define HI847_REG_MWB_B_GAIN 0x021A
64+#define HI847_DGTL_GAIN_MIN 1
65+#define HI847_DGTL_GAIN_MAX 8191
66+#define HI847_DGTL_GAIN_STEP 1
67+#define HI847_DGTL_GAIN_DEFAULT 512
68+
69+/* Test Pattern Control */
70+#define HI847_REG_ISP 0X0B04
71+#define HI847_REG_ISP_TPG_EN 0x0001
72+#define HI847_REG_TEST_PATTERN 0x0C0A
73+
74+/* Flip Mirror Controls from sensor */
75+#define HI847_REG_MIRROR_FLIP 0x0202
76+
77+#define HI847_REG_FORMAT_X 0x0F04
78+#define HI847_REG_FORMAT_Y 0x0F06
79+
80+enum {
81+ HI847_LINK_FREQ_400MHZ_INDEX,
82+ HI847_LINK_FREQ_200MHZ_INDEX,
83+};
84+
85+struct hi847_reg {
86+ u16 address;
87+ u16 val;
88+};
89+
90+struct hi847_reg_list {
91+ u32 num_of_regs;
92+ const struct hi847_reg *regs;
93+};
94+
95+struct hi847_link_freq_config {
96+ const struct hi847_reg_list reg_list;
97+};
98+
99+struct hi847_mode {
100+ /* Frame width in pixels */
101+ u32 width;
102+
103+ /* Frame height in pixels */
104+ u32 height;
105+
106+ /* Horizontal timining size */
107+ u32 llp;
108+
109+ /* Default vertical timining size */
110+ u32 fll_def;
111+
112+ /* Min vertical timining size */
113+ u32 fll_min;
114+
115+ /* Link frequency needed for this resolution */
116+ u32 link_freq_index;
117+
118+ /* Sensor register settings for this resolution */
119+ const struct hi847_reg_list reg_list;
120+};
121+
122+#define to_hi847(_sd) container_of(_sd, struct hi847, sd)
123+
124+//SENSOR_INITIALIZATION
125+static const struct hi847_reg mipi_data_rate_lane_4[] = {
126+ {0x0790, 0x0100},
127+ {0x2000, 0x0000},
128+ {0x2002, 0x0058},
129+ {0x2006, 0x40B2},
130+ {0x2008, 0xB05C},
131+ {0x200A, 0x8446},
132+ {0x200C, 0x40B2},
133+ {0x200E, 0xB082},
134+ {0x2010, 0x8450},
135+ {0x2012, 0x40B2},
136+ {0x2014, 0xB0AE},
137+ {0x2016, 0x84C6},
138+ {0x2018, 0x40B2},
139+ {0x201A, 0xB11A},
140+ {0x201C, 0x84BC},
141+ {0x201E, 0x40B2},
142+ {0x2020, 0xB34A},
143+ {0x2022, 0x84B4},
144+ {0x2024, 0x40B2},
145+ {0x2026, 0xB386},
146+ {0x2028, 0x84B0},
147+ {0x202A, 0x40B2},
148+ {0x202C, 0xB3B4},
149+ {0x202E, 0x84B8},
150+ {0x2030, 0x40B2},
151+ {0x2032, 0xB0F4},
152+ {0x2034, 0x8470},
153+ {0x2036, 0x40B2},
154+ {0x2038, 0xB3EA},
155+ {0x203A, 0x847C},
156+ {0x203C, 0x40B2},
157+ {0x203E, 0xB658},
158+ {0x2040, 0x8478},
159+ {0x2042, 0x40B2},
160+ {0x2044, 0xB67E},
161+ {0x2046, 0x847E},
162+ {0x2048, 0x40B2},
163+ {0x204A, 0xB78E},
164+ {0x204C, 0x843A},
165+ {0x204E, 0x40B2},
166+ {0x2050, 0xB980},
167+ {0x2052, 0x845C},
168+ {0x2054, 0x40B2},
169+ {0x2056, 0xB9B0},
170+ {0x2058, 0x845E},
171+ {0x205A, 0x4130},
172+ {0x205C, 0x1292},
173+ {0x205E, 0xD016},
174+ {0x2060, 0xB3D2},
175+ {0x2062, 0x0B00},
176+ {0x2064, 0x2002},
177+ {0x2066, 0xD2E2},
178+ {0x2068, 0x0381},
179+ {0x206A, 0x93C2},
180+ {0x206C, 0x0263},
181+ {0x206E, 0x2001},
182+ {0x2070, 0x4130},
183+ {0x2072, 0x422D},
184+ {0x2074, 0x403E},
185+ {0x2076, 0x888E},
186+ {0x2078, 0x403F},
187+ {0x207A, 0x192A},
188+ {0x207C, 0x1292},
189+ {0x207E, 0x843E},
190+ {0x2080, 0x3FF7},
191+ {0x2082, 0x422D},
192+ {0x2084, 0x403E},
193+ {0x2086, 0x192A},
194+ {0x2088, 0x403F},
195+ {0x208A, 0x888E},
196+ {0x208C, 0x1292},
197+ {0x208E, 0x843E},
198+ {0x2090, 0xB3D2},
199+ {0x2092, 0x0267},
200+ {0x2094, 0x2403},
201+ {0x2096, 0xD0F2},
202+ {0x2098, 0x0040},
203+ {0x209A, 0x0381},
204+ {0x209C, 0x90F2},
205+ {0x209E, 0x0010},
206+ {0x20A0, 0x0260},
207+ {0x20A2, 0x2002},
208+ {0x20A4, 0x1292},
209+ {0x20A6, 0x84BC},
210+ {0x20A8, 0x1292},
211+ {0x20AA, 0xD020},
212+ {0x20AC, 0x4130},
213+ {0x20AE, 0x1292},
214+ {0x20B0, 0x8470},
215+ {0x20B2, 0x1292},
216+ {0x20B4, 0x8452},
217+ {0x20B6, 0x0900},
218+ {0x20B8, 0x7118},
219+ {0x20BA, 0x1292},
220+ {0x20BC, 0x848E},
221+ {0x20BE, 0x0900},
222+ {0x20C0, 0x7112},
223+ {0x20C2, 0x0800},
224+ {0x20C4, 0x7A20},
225+ {0x20C6, 0x4292},
226+ {0x20C8, 0x87DE},
227+ {0x20CA, 0x7334},
228+ {0x20CC, 0x0F00},
229+ {0x20CE, 0x7304},
230+ {0x20D0, 0x421F},
231+ {0x20D2, 0x8718},
232+ {0x20D4, 0x1292},
233+ {0x20D6, 0x846E},
234+ {0x20D8, 0x1292},
235+ {0x20DA, 0x8488},
236+ {0x20DC, 0x0B00},
237+ {0x20DE, 0x7114},
238+ {0x20E0, 0x0002},
239+ {0x20E2, 0x1292},
240+ {0x20E4, 0x848C},
241+ {0x20E6, 0x1292},
242+ {0x20E8, 0x8454},
243+ {0x20EA, 0x43C2},
244+ {0x20EC, 0x86EE},
245+ {0x20EE, 0x1292},
246+ {0x20F0, 0x8444},
247+ {0x20F2, 0x4130},
248+ {0x20F4, 0x4392},
249+ {0x20F6, 0x7360},
250+ {0x20F8, 0xB3D2},
251+ {0x20FA, 0x0B00},
252+ {0x20FC, 0x2402},
253+ {0x20FE, 0xC2E2},
254+ {0x2100, 0x0381},
255+ {0x2102, 0x0900},
256+ {0x2104, 0x732C},
257+ {0x2106, 0x4382},
258+ {0x2108, 0x7360},
259+ {0x210A, 0x422D},
260+ {0x210C, 0x403E},
261+ {0x210E, 0x87F0},
262+ {0x2110, 0x403F},
263+ {0x2112, 0x87E8},
264+ {0x2114, 0x1292},
265+ {0x2116, 0x843E},
266+ {0x2118, 0x4130},
267+ {0x211A, 0x120B},
268+ {0x211C, 0x120A},
269+ {0x211E, 0x4392},
270+ {0x2120, 0x87FA},
271+ {0x2122, 0x4392},
272+ {0x2124, 0x760E},
273+ {0x2126, 0x0900},
274+ {0x2128, 0x760C},
275+ {0x212A, 0x421B},
276+ {0x212C, 0x760A},
277+ {0x212E, 0x903B},
278+ {0x2130, 0x0201},
279+ {0x2132, 0x2408},
280+ {0x2134, 0x903B},
281+ {0x2136, 0x0102},
282+ {0x2138, 0x2405},
283+ {0x213A, 0x4292},
284+ {0x213C, 0x030A},
285+ {0x213E, 0x87F8},
286+ {0x2140, 0x1292},
287+ {0x2142, 0x849A},
288+ {0x2144, 0x903B},
289+ {0x2146, 0x0020},
290+ {0x2148, 0x2010},
291+ {0x214A, 0x403B},
292+ {0x214C, 0x8498},
293+ {0x214E, 0x422F},
294+ {0x2150, 0x12AB},
295+ {0x2152, 0x403F},
296+ {0x2154, 0x0028},
297+ {0x2156, 0x12AB},
298+ {0x2158, 0x403B},
299+ {0x215A, 0x84C4},
300+ {0x215C, 0x407F},
301+ {0x215E, 0xFFAA},
302+ {0x2160, 0x12AB},
303+ {0x2162, 0x407F},
304+ {0x2164, 0x0055},
305+ {0x2166, 0x12AB},
306+ {0x2168, 0x3FDC},
307+ {0x216A, 0x903B},
308+ {0x216C, 0x0021},
309+ {0x216E, 0x2890},
310+ {0x2170, 0x903B},
311+ {0x2172, 0x0100},
312+ {0x2174, 0x200D},
313+ {0x2176, 0x403F},
314+ {0x2178, 0x0028},
315+ {0x217A, 0x1292},
316+ {0x217C, 0x8498},
317+ {0x217E, 0x425F},
318+ {0x2180, 0x0306},
319+ {0x2182, 0x1292},
320+ {0x2184, 0x84C4},
321+ {0x2186, 0x4FC2},
322+ {0x2188, 0x0318},
323+ {0x218A, 0x0261},
324+ {0x218C, 0x0000},
325+ {0x218E, 0x3FC9},
326+ {0x2190, 0x903B},
327+ {0x2192, 0x0101},
328+ {0x2194, 0x2858},
329+ {0x2196, 0x903B},
330+ {0x2198, 0x0200},
331+ {0x219A, 0x2450},
332+ {0x219C, 0x903B},
333+ {0x219E, 0x0201},
334+ {0x21A0, 0x2C47},
335+ {0x21A2, 0x903B},
336+ {0x21A4, 0x0102},
337+ {0x21A6, 0x2041},
338+ {0x21A8, 0x93E2},
339+ {0x21AA, 0x0262},
340+ {0x21AC, 0x240A},
341+ {0x21AE, 0x425F},
342+ {0x21B0, 0x0306},
343+ {0x21B2, 0x1292},
344+ {0x21B4, 0x84C4},
345+ {0x21B6, 0x4F4E},
346+ {0x21B8, 0x4EC2},
347+ {0x21BA, 0x0318},
348+ {0x21BC, 0x0260},
349+ {0x21BE, 0x0000},
350+ {0x21C0, 0x3FB0},
351+ {0x21C2, 0x403A},
352+ {0x21C4, 0x8030},
353+ {0x21C6, 0x4382},
354+ {0x21C8, 0x0326},
355+ {0x21CA, 0x4382},
356+ {0x21CC, 0x0328},
357+ {0x21CE, 0x421B},
358+ {0x21D0, 0x030C},
359+ {0x21D2, 0x930B},
360+ {0x21D4, 0x2420},
361+ {0x21D6, 0x4A5F},
362+ {0x21D8, 0x0001},
363+ {0x21DA, 0x1292},
364+ {0x21DC, 0x84C4},
365+ {0x21DE, 0x4F4E},
366+ {0x21E0, 0x4A5F},
367+ {0x21E2, 0x0001},
368+ {0x21E4, 0x9F0E},
369+ {0x21E6, 0x2402},
370+ {0x21E8, 0x5392},
371+ {0x21EA, 0x0326},
372+ {0x21EC, 0x4ECA},
373+ {0x21EE, 0x0001},
374+ {0x21F0, 0x533B},
375+ {0x21F2, 0x2411},
376+ {0x21F4, 0x4A6F},
377+ {0x21F6, 0x1292},
378+ {0x21F8, 0x84C4},
379+ {0x21FA, 0x4F4E},
380+ {0x21FC, 0x4A6F},
381+ {0x21FE, 0x9F0E},
382+ {0x2200, 0x2402},
383+ {0x2202, 0x5392},
384+ {0x2204, 0x0326},
385+ {0x2206, 0x4ECA},
386+ {0x2208, 0x0000},
387+ {0x220A, 0x533B},
388+ {0x220C, 0x532A},
389+ {0x220E, 0x0260},
390+ {0x2210, 0x0000},
391+ {0x2212, 0x930B},
392+ {0x2214, 0x23E0},
393+ {0x2216, 0x40B2},
394+ {0x2218, 0xAA55},
395+ {0x221A, 0x0328},
396+ {0x221C, 0xB0F2},
397+ {0x221E, 0x0040},
398+ {0x2220, 0x0381},
399+ {0x2222, 0x277F},
400+ {0x2224, 0xD3D2},
401+ {0x2226, 0x0267},
402+ {0x2228, 0x3F7C},
403+ {0x222A, 0x0261},
404+ {0x222C, 0x0000},
405+ {0x222E, 0x3F79},
406+ {0x2230, 0x903B},
407+ {0x2232, 0x0201},
408+ {0x2234, 0x23FA},
409+ {0x2236, 0x1292},
410+ {0x2238, 0x84C0},
411+ {0x223A, 0x3F73},
412+ {0x223C, 0x1292},
413+ {0x223E, 0x84C0},
414+ {0x2240, 0x0261},
415+ {0x2242, 0x0000},
416+ {0x2244, 0x3F6E},
417+ {0x2246, 0x903B},
418+ {0x2248, 0x0040},
419+ {0x224A, 0x2018},
420+ {0x224C, 0x422F},
421+ {0x224E, 0x1292},
422+ {0x2250, 0x8498},
423+ {0x2252, 0x12B0},
424+ {0x2254, 0xF0EA},
425+ {0x2256, 0x907F},
426+ {0x2258, 0xFFAA},
427+ {0x225A, 0x240D},
428+ {0x225C, 0x5392},
429+ {0x225E, 0x0312},
430+ {0x2260, 0x12B0},
431+ {0x2262, 0xF0EA},
432+ {0x2264, 0x907F},
433+ {0x2266, 0x0055},
434+ {0x2268, 0x2403},
435+ {0x226A, 0x5392},
436+ {0x226C, 0x0312},
437+ {0x226E, 0x3F59},
438+ {0x2270, 0x5392},
439+ {0x2272, 0x0310},
440+ {0x2274, 0x3F56},
441+ {0x2276, 0x5392},
442+ {0x2278, 0x0310},
443+ {0x227A, 0x3FF2},
444+ {0x227C, 0x903B},
445+ {0x227E, 0x0080},
446+ {0x2280, 0x23D4},
447+ {0x2282, 0x4382},
448+ {0x2284, 0x0312},
449+ {0x2286, 0x4382},
450+ {0x2288, 0x0310},
451+ {0x228A, 0x0261},
452+ {0x228C, 0x0000},
453+ {0x228E, 0x3F49},
454+ {0x2290, 0x932B},
455+ {0x2292, 0x2005},
456+ {0x2294, 0x403F},
457+ {0x2296, 0x0028},
458+ {0x2298, 0x1292},
459+ {0x229A, 0x8498},
460+ {0x229C, 0x3F42},
461+ {0x229E, 0x903B},
462+ {0x22A0, 0x0003},
463+ {0x22A2, 0x284B},
464+ {0x22A4, 0x923B},
465+ {0x22A6, 0x2015},
466+ {0x22A8, 0x403F},
467+ {0x22AA, 0x0023},
468+ {0x22AC, 0x1292},
469+ {0x22AE, 0x8498},
470+ {0x22B0, 0x421B},
471+ {0x22B2, 0x87F8},
472+ {0x22B4, 0x421F},
473+ {0x22B6, 0x030C},
474+ {0x22B8, 0x9F0B},
475+ {0x22BA, 0x2F33},
476+ {0x22BC, 0x1292},
477+ {0x22BE, 0x84BA},
478+ {0x22C0, 0x930F},
479+ {0x22C2, 0x2004},
480+ {0x22C4, 0x5392},
481+ {0x22C6, 0x0312},
482+ {0x22C8, 0x531B},
483+ {0x22CA, 0x3FF4},
484+ {0x22CC, 0x5392},
485+ {0x22CE, 0x0310},
486+ {0x22D0, 0x3FFB},
487+ {0x22D2, 0x903B},
488+ {0x22D4, 0x0009},
489+ {0x22D6, 0x2818},
490+ {0x22D8, 0x903B},
491+ {0x22DA, 0x0010},
492+ {0x22DC, 0x23A6},
493+ {0x22DE, 0x403F},
494+ {0x22E0, 0x0027},
495+ {0x22E2, 0x1292},
496+ {0x22E4, 0x8498},
497+ {0x22E6, 0x421B},
498+ {0x22E8, 0x87F8},
499+ {0x22EA, 0x421F},
500+ {0x22EC, 0x030C},
501+ {0x22EE, 0x9F0B},
502+ {0x22F0, 0x2F18},
503+ {0x22F2, 0x1292},
504+ {0x22F4, 0x84BA},
505+ {0x22F6, 0x930F},
506+ {0x22F8, 0x2004},
507+ {0x22FA, 0x5392},
508+ {0x22FC, 0x0312},
509+ {0x22FE, 0x531B},
510+ {0x2300, 0x3FF4},
511+ {0x2302, 0x5392},
512+ {0x2304, 0x0310},
513+ {0x2306, 0x3FFB},
514+ {0x2308, 0x922B},
515+ {0x230A, 0x238F},
516+ {0x230C, 0x421B},
517+ {0x230E, 0x87F8},
518+ {0x2310, 0x421F},
519+ {0x2312, 0x030C},
520+ {0x2314, 0x9F0B},
521+ {0x2316, 0x2C0B},
522+ {0x2318, 0x1292},
523+ {0x231A, 0x84C2},
524+ {0x231C, 0x934F},
525+ {0x231E, 0x240A},
526+ {0x2320, 0x5392},
527+ {0x2322, 0x0312},
528+ {0x2324, 0x531B},
529+ {0x2326, 0x421F},
530+ {0x2328, 0x030C},
531+ {0x232A, 0x9F0B},
532+ {0x232C, 0x2BF5},
533+ {0x232E, 0x0261},
534+ {0x2330, 0x0000},
535+ {0x2332, 0x3EF7},
536+ {0x2334, 0x5392},
537+ {0x2336, 0x0310},
538+ {0x2338, 0x3FF5},
539+ {0x233A, 0x930B},
540+ {0x233C, 0x277F},
541+ {0x233E, 0x931B},
542+ {0x2340, 0x277A},
543+ {0x2342, 0x3F73},
544+ {0x2344, 0x413A},
545+ {0x2346, 0x413B},
546+ {0x2348, 0x4130},
547+ {0x234A, 0x4F0C},
548+ {0x234C, 0x403F},
549+ {0x234E, 0x0267},
550+ {0x2350, 0xF0FF},
551+ {0x2352, 0xFFDF},
552+ {0x2354, 0x0000},
553+ {0x2356, 0xF0FF},
554+ {0x2358, 0xFFEF},
555+ {0x235A, 0x0000},
556+ {0x235C, 0x421D},
557+ {0x235E, 0x84B0},
558+ {0x2360, 0x403E},
559+ {0x2362, 0x06F9},
560+ {0x2364, 0x4C0F},
561+ {0x2366, 0x1292},
562+ {0x2368, 0x84AC},
563+ {0x236A, 0x4F4E},
564+ {0x236C, 0xB31E},
565+ {0x236E, 0x2403},
566+ {0x2370, 0xD0F2},
567+ {0x2372, 0x0020},
568+ {0x2374, 0x0267},
569+ {0x2376, 0xB32E},
570+ {0x2378, 0x2403},
571+ {0x237A, 0xD0F2},
572+ {0x237C, 0x0010},
573+ {0x237E, 0x0267},
574+ {0x2380, 0xC3E2},
575+ {0x2382, 0x0267},
576+ {0x2384, 0x4130},
577+ {0x2386, 0x120B},
578+ {0x2388, 0x120A},
579+ {0x238A, 0x403A},
580+ {0x238C, 0x1140},
581+ {0x238E, 0x1292},
582+ {0x2390, 0xD080},
583+ {0x2392, 0x430B},
584+ {0x2394, 0x4A0F},
585+ {0x2396, 0x532A},
586+ {0x2398, 0x1292},
587+ {0x239A, 0x84A4},
588+ {0x239C, 0x4F0E},
589+ {0x239E, 0x430F},
590+ {0x23A0, 0x5E82},
591+ {0x23A2, 0x87FC},
592+ {0x23A4, 0x6F82},
593+ {0x23A6, 0x87FE},
594+ {0x23A8, 0x531B},
595+ {0x23AA, 0x923B},
596+ {0x23AC, 0x2BF3},
597+ {0x23AE, 0x413A},
598+ {0x23B0, 0x413B},
599+ {0x23B2, 0x4130},
600+ {0x23B4, 0xF0F2},
601+ {0x23B6, 0x007F},
602+ {0x23B8, 0x0267},
603+ {0x23BA, 0x421D},
604+ {0x23BC, 0x84B6},
605+ {0x23BE, 0x403E},
606+ {0x23C0, 0x01F9},
607+ {0x23C2, 0x1292},
608+ {0x23C4, 0x84AC},
609+ {0x23C6, 0x4F4E},
610+ {0x23C8, 0xF35F},
611+ {0x23CA, 0x2403},
612+ {0x23CC, 0xD0F2},
613+ {0x23CE, 0xFF80},
614+ {0x23D0, 0x0267},
615+ {0x23D2, 0xB36E},
616+ {0x23D4, 0x2404},
617+ {0x23D6, 0xD0F2},
618+ {0x23D8, 0x0040},
619+ {0x23DA, 0x0267},
620+ {0x23DC, 0x3C03},
621+ {0x23DE, 0xF0F2},
622+ {0x23E0, 0xFFBF},
623+ {0x23E2, 0x0267},
624+ {0x23E4, 0xC2E2},
625+ {0x23E6, 0x0267},
626+ {0x23E8, 0x4130},
627+ {0x23EA, 0x120B},
628+ {0x23EC, 0x120A},
629+ {0x23EE, 0x8231},
630+ {0x23F0, 0x430B},
631+ {0x23F2, 0x93C2},
632+ {0x23F4, 0x0C0A},
633+ {0x23F6, 0x2404},
634+ {0x23F8, 0xB3D2},
635+ {0x23FA, 0x0B05},
636+ {0x23FC, 0x2401},
637+ {0x23FE, 0x431B},
638+ {0x2400, 0x422D},
639+ {0x2402, 0x403E},
640+ {0x2404, 0x192A},
641+ {0x2406, 0x403F},
642+ {0x2408, 0x888E},
643+ {0x240A, 0x1292},
644+ {0x240C, 0x843E},
645+ {0x240E, 0x930B},
646+ {0x2410, 0x20F4},
647+ {0x2412, 0x93E2},
648+ {0x2414, 0x0241},
649+ {0x2416, 0x24EB},
650+ {0x2418, 0x403A},
651+ {0x241A, 0x0292},
652+ {0x241C, 0x4AA2},
653+ {0x241E, 0x0A00},
654+ {0x2420, 0xB2E2},
655+ {0x2422, 0x0361},
656+ {0x2424, 0x2405},
657+ {0x2426, 0x4A2F},
658+ {0x2428, 0x1292},
659+ {0x242A, 0x8474},
660+ {0x242C, 0x4F82},
661+ {0x242E, 0x0A1C},
662+ {0x2430, 0x93C2},
663+ {0x2432, 0x0360},
664+ {0x2434, 0x34CD},
665+ {0x2436, 0x430C},
666+ {0x2438, 0x4C0F},
667+ {0x243A, 0x5F0F},
668+ {0x243C, 0x4F0D},
669+ {0x243E, 0x510D},
670+ {0x2440, 0x4F0E},
671+ {0x2442, 0x5A0E},
672+ {0x2444, 0x4E1E},
673+ {0x2446, 0x0002},
674+ {0x2448, 0x4F1F},
675+ {0x244A, 0x192A},
676+ {0x244C, 0x1202},
677+ {0x244E, 0xC232},
678+ {0x2450, 0x4303},
679+ {0x2452, 0x4E82},
680+ {0x2454, 0x0130},
681+ {0x2456, 0x4F82},
682+ {0x2458, 0x0138},
683+ {0x245A, 0x421E},
684+ {0x245C, 0x013A},
685+ {0x245E, 0x421F},
686+ {0x2460, 0x013C},
687+ {0x2462, 0x4132},
688+ {0x2464, 0x108E},
689+ {0x2466, 0x108F},
690+ {0x2468, 0xEF4E},
691+ {0x246A, 0xEF0E},
692+ {0x246C, 0xF37F},
693+ {0x246E, 0xC312},
694+ {0x2470, 0x100F},
695+ {0x2472, 0x100E},
696+ {0x2474, 0x4E8D},
697+ {0x2476, 0x0000},
698+ {0x2478, 0x531C},
699+ {0x247A, 0x922C},
700+ {0x247C, 0x2BDD},
701+ {0x247E, 0xB3D2},
702+ {0x2480, 0x1921},
703+ {0x2482, 0x2403},
704+ {0x2484, 0x410F},
705+ {0x2486, 0x1292},
706+ {0x2488, 0x847E},
707+ {0x248A, 0x403B},
708+ {0x248C, 0x843E},
709+ {0x248E, 0x422D},
710+ {0x2490, 0x410E},
711+ {0x2492, 0x403F},
712+ {0x2494, 0x1908},
713+ {0x2496, 0x12AB},
714+ {0x2498, 0x403D},
715+ {0x249A, 0x0005},
716+ {0x249C, 0x403E},
717+ {0x249E, 0x0292},
718+ {0x24A0, 0x403F},
719+ {0x24A2, 0x86E4},
720+ {0x24A4, 0x12AB},
721+ {0x24A6, 0x421F},
722+ {0x24A8, 0x060E},
723+ {0x24AA, 0x9F82},
724+ {0x24AC, 0x8720},
725+ {0x24AE, 0x288D},
726+ {0x24B0, 0x9382},
727+ {0x24B2, 0x060E},
728+ {0x24B4, 0x248A},
729+ {0x24B6, 0x90BA},
730+ {0x24B8, 0x0010},
731+ {0x24BA, 0x0000},
732+ {0x24BC, 0x2C0B},
733+ {0x24BE, 0x93C2},
734+ {0x24C0, 0x86EE},
735+ {0x24C2, 0x2008},
736+ {0x24C4, 0x403F},
737+ {0x24C6, 0x06A7},
738+ {0x24C8, 0xD0FF},
739+ {0x24CA, 0x0007},
740+ {0x24CC, 0x0000},
741+ {0x24CE, 0xF0FF},
742+ {0x24D0, 0xFFF8},
743+ {0x24D2, 0x0000},
744+ {0x24D4, 0x4392},
745+ {0x24D6, 0x8720},
746+ {0x24D8, 0x403F},
747+ {0x24DA, 0x06A7},
748+ {0x24DC, 0xD2EF},
749+ {0x24DE, 0x0000},
750+ {0x24E0, 0xC2EF},
751+ {0x24E2, 0x0000},
752+ {0x24E4, 0x93C2},
753+ {0x24E6, 0x87D3},
754+ {0x24E8, 0x2068},
755+ {0x24EA, 0xB0F2},
756+ {0x24EC, 0x0040},
757+ {0x24EE, 0x0B05},
758+ {0x24F0, 0x2461},
759+ {0x24F2, 0xD3D2},
760+ {0x24F4, 0x0410},
761+ {0x24F6, 0xB3E2},
762+ {0x24F8, 0x0381},
763+ {0x24FA, 0x2089},
764+ {0x24FC, 0x90B2},
765+ {0x24FE, 0x0030},
766+ {0x2500, 0x0A00},
767+ {0x2502, 0x2C52},
768+ {0x2504, 0x93C2},
769+ {0x2506, 0x86EE},
770+ {0x2508, 0x204F},
771+ {0x250A, 0x430E},
772+ {0x250C, 0x430C},
773+ {0x250E, 0x4C0F},
774+ {0x2510, 0x5F0F},
775+ {0x2512, 0x5F0F},
776+ {0x2514, 0x5F0F},
777+ {0x2516, 0x4F1F},
778+ {0x2518, 0x8668},
779+ {0x251A, 0xF03F},
780+ {0x251C, 0x07FF},
781+ {0x251E, 0x903F},
782+ {0x2520, 0x0400},
783+ {0x2522, 0x343E},
784+ {0x2524, 0x5F0E},
785+ {0x2526, 0x531C},
786+ {0x2528, 0x923C},
787+ {0x252A, 0x2BF1},
788+ {0x252C, 0x4E0F},
789+ {0x252E, 0x930E},
790+ {0x2530, 0x3834},
791+ {0x2532, 0x110F},
792+ {0x2534, 0x110F},
793+ {0x2536, 0x110F},
794+ {0x2538, 0x9382},
795+ {0x253A, 0x86EE},
796+ {0x253C, 0x2023},
797+ {0x253E, 0x5F82},
798+ {0x2540, 0x87D6},
799+ {0x2542, 0x403B},
800+ {0x2544, 0x87D6},
801+ {0x2546, 0x4B2F},
802+ {0x2548, 0x12B0},
803+ {0x254A, 0xB624},
804+ {0x254C, 0x4F8B},
805+ {0x254E, 0x0000},
806+ {0x2550, 0x430C},
807+ {0x2552, 0x4C0D},
808+ {0x2554, 0x5D0D},
809+ {0x2556, 0x5D0D},
810+ {0x2558, 0x5D0D},
811+ {0x255A, 0x403A},
812+ {0x255C, 0x87D8},
813+ {0x255E, 0x421B},
814+ {0x2560, 0x87D6},
815+ {0x2562, 0x4B0F},
816+ {0x2564, 0x8A2F},
817+ {0x2566, 0x4F0E},
818+ {0x2568, 0x4E0F},
819+ {0x256A, 0x5F0F},
820+ {0x256C, 0x7F0F},
821+ {0x256E, 0xE33F},
822+ {0x2570, 0x8E8D},
823+ {0x2572, 0x8668},
824+ {0x2574, 0x7F8D},
825+ {0x2576, 0x866A},
826+ {0x2578, 0x531C},
827+ {0x257A, 0x923C},
828+ {0x257C, 0x2BEA},
829+ {0x257E, 0x4B8A},
830+ {0x2580, 0x0000},
831+ {0x2582, 0x3C45},
832+ {0x2584, 0x9382},
833+ {0x2586, 0x86F0},
834+ {0x2588, 0x2005},
835+ {0x258A, 0x4382},
836+ {0x258C, 0x87D6},
837+ {0x258E, 0x4382},
838+ {0x2590, 0x87D8},
839+ {0x2592, 0x3FD7},
840+ {0x2594, 0x4F82},
841+ {0x2596, 0x87D6},
842+ {0x2598, 0x3FD4},
843+ {0x259A, 0x503F},
844+ {0x259C, 0x0007},
845+ {0x259E, 0x3FC9},
846+ {0x25A0, 0x5F0E},
847+ {0x25A2, 0x503E},
848+ {0x25A4, 0xF800},
849+ {0x25A6, 0x3FBF},
850+ {0x25A8, 0x430F},
851+ {0x25AA, 0x12B0},
852+ {0x25AC, 0xB624},
853+ {0x25AE, 0x4382},
854+ {0x25B0, 0x87D6},
855+ {0x25B2, 0x3C2D},
856+ {0x25B4, 0xC3D2},
857+ {0x25B6, 0x0410},
858+ {0x25B8, 0x3F9E},
859+ {0x25BA, 0x430D},
860+ {0x25BC, 0x403E},
861+ {0x25BE, 0x0050},
862+ {0x25C0, 0x403F},
863+ {0x25C2, 0x85C8},
864+ {0x25C4, 0x1292},
865+ {0x25C6, 0x844E},
866+ {0x25C8, 0x3F90},
867+ {0x25CA, 0x5392},
868+ {0x25CC, 0x8720},
869+ {0x25CE, 0x3F84},
870+ {0x25D0, 0x403B},
871+ {0x25D2, 0x843E},
872+ {0x25D4, 0x4A0F},
873+ {0x25D6, 0x532F},
874+ {0x25D8, 0x422D},
875+ {0x25DA, 0x4F0E},
876+ {0x25DC, 0x403F},
877+ {0x25DE, 0x0E08},
878+ {0x25E0, 0x12AB},
879+ {0x25E2, 0x422D},
880+ {0x25E4, 0x403E},
881+ {0x25E6, 0x192A},
882+ {0x25E8, 0x410F},
883+ {0x25EA, 0x12AB},
884+ {0x25EC, 0x3F48},
885+ {0x25EE, 0x93C2},
886+ {0x25F0, 0x86EE},
887+ {0x25F2, 0x2312},
888+ {0x25F4, 0x403A},
889+ {0x25F6, 0x86E4},
890+ {0x25F8, 0x3F11},
891+ {0x25FA, 0x403D},
892+ {0x25FC, 0x0200},
893+ {0x25FE, 0x422E},
894+ {0x2600, 0x403F},
895+ {0x2602, 0x192A},
896+ {0x2604, 0x1292},
897+ {0x2606, 0x844E},
898+ {0x2608, 0xC3D2},
899+ {0x260A, 0x1921},
900+ {0x260C, 0x3F02},
901+ {0x260E, 0x422D},
902+ {0x2610, 0x403E},
903+ {0x2612, 0x888E},
904+ {0x2614, 0x403F},
905+ {0x2616, 0x192A},
906+ {0x2618, 0x1292},
907+ {0x261A, 0x843E},
908+ {0x261C, 0x5231},
909+ {0x261E, 0x413A},
910+ {0x2620, 0x413B},
911+ {0x2622, 0x4130},
912+ {0x2624, 0x4382},
913+ {0x2626, 0x052C},
914+ {0x2628, 0x4F0D},
915+ {0x262A, 0x930D},
916+ {0x262C, 0x3402},
917+ {0x262E, 0xE33D},
918+ {0x2630, 0x531D},
919+ {0x2632, 0xF03D},
920+ {0x2634, 0x07F0},
921+ {0x2636, 0x4D0E},
922+ {0x2638, 0xC312},
923+ {0x263A, 0x100E},
924+ {0x263C, 0x110E},
925+ {0x263E, 0x110E},
926+ {0x2640, 0x110E},
927+ {0x2642, 0x930F},
928+ {0x2644, 0x3803},
929+ {0x2646, 0x4EC2},
930+ {0x2648, 0x052C},
931+ {0x264A, 0x3C04},
932+ {0x264C, 0x4EC2},
933+ {0x264E, 0x052D},
934+ {0x2650, 0xE33D},
935+ {0x2652, 0x531D},
936+ {0x2654, 0x4D0F},
937+ {0x2656, 0x4130},
938+ {0x2658, 0x1292},
939+ {0x265A, 0xD048},
940+ {0x265C, 0x93C2},
941+ {0x265E, 0x86EE},
942+ {0x2660, 0x200D},
943+ {0x2662, 0xB0F2},
944+ {0x2664, 0x0020},
945+ {0x2666, 0x0381},
946+ {0x2668, 0x2407},
947+ {0x266A, 0x9292},
948+ {0x266C, 0x8722},
949+ {0x266E, 0x0384},
950+ {0x2670, 0x2C03},
951+ {0x2672, 0xD3D2},
952+ {0x2674, 0x0649},
953+ {0x2676, 0x4130},
954+ {0x2678, 0xC3D2},
955+ {0x267A, 0x0649},
956+ {0x267C, 0x4130},
957+ {0x267E, 0x120B},
958+ {0x2680, 0x120A},
959+ {0x2682, 0x1209},
960+ {0x2684, 0x1208},
961+ {0x2686, 0x1207},
962+ {0x2688, 0x1206},
963+ {0x268A, 0x1205},
964+ {0x268C, 0x1204},
965+ {0x268E, 0x8231},
966+ {0x2690, 0x4F81},
967+ {0x2692, 0x0000},
968+ {0x2694, 0x4381},
969+ {0x2696, 0x0002},
970+ {0x2698, 0x4304},
971+ {0x269A, 0x411C},
972+ {0x269C, 0x0002},
973+ {0x269E, 0x5C0C},
974+ {0x26A0, 0x4C0F},
975+ {0x26A2, 0x5F0F},
976+ {0x26A4, 0x5F0F},
977+ {0x26A6, 0x5F0F},
978+ {0x26A8, 0x5F0F},
979+ {0x26AA, 0x5F0F},
980+ {0x26AC, 0x503F},
981+ {0x26AE, 0x1980},
982+ {0x26B0, 0x440D},
983+ {0x26B2, 0x5D0D},
984+ {0x26B4, 0x4D0E},
985+ {0x26B6, 0x5F0E},
986+ {0x26B8, 0x4E2E},
987+ {0x26BA, 0x4D05},
988+ {0x26BC, 0x5505},
989+ {0x26BE, 0x5F05},
990+ {0x26C0, 0x4516},
991+ {0x26C2, 0x0008},
992+ {0x26C4, 0x4517},
993+ {0x26C6, 0x000A},
994+ {0x26C8, 0x460A},
995+ {0x26CA, 0x470B},
996+ {0x26CC, 0xF30A},
997+ {0x26CE, 0xF32B},
998+ {0x26D0, 0x4A81},
999+ {0x26D2, 0x0004},
1000+ {0x26D4, 0x4B81},
1001+ {0x26D6, 0x0006},
1002+ {0x26D8, 0xB03E},
1003+ {0x26DA, 0x2000},
1004+ {0x26DC, 0x2404},
1005+ {0x26DE, 0xF03E},
1006+ {0x26E0, 0x1FFF},
1007+ {0x26E2, 0xE33E},
1008+ {0x26E4, 0x531E},
1009+ {0x26E6, 0xF317},
1010+ {0x26E8, 0x503E},
1011+ {0x26EA, 0x2000},
1012+ {0x26EC, 0x4E0F},
1013+ {0x26EE, 0x5F0F},
1014+ {0x26F0, 0x7F0F},
1015+ {0x26F2, 0xE33F},
1016+ {0x26F4, 0x512C},
1017+ {0x26F6, 0x4C28},
1018+ {0x26F8, 0x4309},
1019+ {0x26FA, 0x4E0A},
1020+ {0x26FC, 0x4F0B},
1021+ {0x26FE, 0x480C},
1022+ {0x2700, 0x490D},
1023+ {0x2702, 0x1202},
1024+ {0x2704, 0xC232},
1025+ {0x2706, 0x12B0},
1026+ {0x2708, 0xFFC0},
1027+ {0x270A, 0x4132},
1028+ {0x270C, 0x108E},
1029+ {0x270E, 0x108F},
1030+ {0x2710, 0xEF4E},
1031+ {0x2712, 0xEF0E},
1032+ {0x2714, 0xF37F},
1033+ {0x2716, 0xC312},
1034+ {0x2718, 0x100F},
1035+ {0x271A, 0x100E},
1036+ {0x271C, 0x4E85},
1037+ {0x271E, 0x0018},
1038+ {0x2720, 0x4F85},
1039+ {0x2722, 0x001A},
1040+ {0x2724, 0x480A},
1041+ {0x2726, 0x490B},
1042+ {0x2728, 0x460C},
1043+ {0x272A, 0x470D},
1044+ {0x272C, 0x1202},
1045+ {0x272E, 0xC232},
1046+ {0x2730, 0x12B0},
1047+ {0x2732, 0xFFC0},
1048+ {0x2734, 0x4132},
1049+ {0x2736, 0x4E0C},
1050+ {0x2738, 0x4F0D},
1051+ {0x273A, 0x108C},
1052+ {0x273C, 0x108D},
1053+ {0x273E, 0xED4C},
1054+ {0x2740, 0xED0C},
1055+ {0x2742, 0xF37D},
1056+ {0x2744, 0xC312},
1057+ {0x2746, 0x100D},
1058+ {0x2748, 0x100C},
1059+ {0x274A, 0x411E},
1060+ {0x274C, 0x0004},
1061+ {0x274E, 0x411F},
1062+ {0x2750, 0x0006},
1063+ {0x2752, 0x5E0E},
1064+ {0x2754, 0x6F0F},
1065+ {0x2756, 0x5E0E},
1066+ {0x2758, 0x6F0F},
1067+ {0x275A, 0x5E0E},
1068+ {0x275C, 0x6F0F},
1069+ {0x275E, 0xDE0C},
1070+ {0x2760, 0xDF0D},
1071+ {0x2762, 0x4C85},
1072+ {0x2764, 0x002C},
1073+ {0x2766, 0x4D85},
1074+ {0x2768, 0x002E},
1075+ {0x276A, 0x5314},
1076+ {0x276C, 0x9224},
1077+ {0x276E, 0x2B95},
1078+ {0x2770, 0x5391},
1079+ {0x2772, 0x0002},
1080+ {0x2774, 0x92A1},
1081+ {0x2776, 0x0002},
1082+ {0x2778, 0x2B8F},
1083+ {0x277A, 0x5231},
1084+ {0x277C, 0x4134},
1085+ {0x277E, 0x4135},
1086+ {0x2780, 0x4136},
1087+ {0x2782, 0x4137},
1088+ {0x2784, 0x4138},
1089+ {0x2786, 0x4139},
1090+ {0x2788, 0x413A},
1091+ {0x278A, 0x413B},
1092+ {0x278C, 0x4130},
1093+ {0x278E, 0x120B},
1094+ {0x2790, 0x120A},
1095+ {0x2792, 0x1209},
1096+ {0x2794, 0x8031},
1097+ {0x2796, 0x000C},
1098+ {0x2798, 0x425F},
1099+ {0x279A, 0x0205},
1100+ {0x279C, 0xC312},
1101+ {0x279E, 0x104F},
1102+ {0x27A0, 0x114F},
1103+ {0x27A2, 0x114F},
1104+ {0x27A4, 0x114F},
1105+ {0x27A6, 0x114F},
1106+ {0x27A8, 0x114F},
1107+ {0x27AA, 0xF37F},
1108+ {0x27AC, 0x4F0B},
1109+ {0x27AE, 0xF31B},
1110+ {0x27B0, 0x5B0B},
1111+ {0x27B2, 0x5B0B},
1112+ {0x27B4, 0x5B0B},
1113+ {0x27B6, 0x503B},
1114+ {0x27B8, 0xD194},
1115+ {0x27BA, 0x4219},
1116+ {0x27BC, 0x0508},
1117+ {0x27BE, 0xF039},
1118+ {0x27C0, 0x2000},
1119+ {0x27C2, 0x4F0A},
1120+ {0x27C4, 0xC312},
1121+ {0x27C6, 0x100A},
1122+ {0x27C8, 0xE31A},
1123+ {0x27CA, 0x421F},
1124+ {0x27CC, 0x87DE},
1125+ {0x27CE, 0x503F},
1126+ {0x27D0, 0xFF60},
1127+ {0x27D2, 0x903F},
1128+ {0x27D4, 0x00C8},
1129+ {0x27D6, 0x2C02},
1130+ {0x27D8, 0x403F},
1131+ {0x27DA, 0x00C8},
1132+ {0x27DC, 0x4F82},
1133+ {0x27DE, 0x7322},
1134+ {0x27E0, 0xB3D2},
1135+ {0x27E2, 0x0381},
1136+ {0x27E4, 0x2009},
1137+ {0x27E6, 0x421F},
1138+ {0x27E8, 0x86F0},
1139+ {0x27EA, 0xD21F},
1140+ {0x27EC, 0x86EE},
1141+ {0x27EE, 0x930F},
1142+ {0x27F0, 0x24B9},
1143+ {0x27F2, 0x40F2},
1144+ {0x27F4, 0xFF80},
1145+ {0x27F6, 0x0619},
1146+ {0x27F8, 0x1292},
1147+ {0x27FA, 0xD00A},
1148+ {0x27FC, 0xB3D2},
1149+ {0x27FE, 0x0385},
1150+ {0x2800, 0x2405},
1151+ {0x2802, 0x421F},
1152+ {0x2804, 0x880A},
1153+ {0x2806, 0x4F92},
1154+ {0x2808, 0x0002},
1155+ {0x280A, 0x8714},
1156+ {0x280C, 0x430D},
1157+ {0x280E, 0x93C2},
1158+ {0x2810, 0x87D0},
1159+ {0x2812, 0x2003},
1160+ {0x2814, 0xB2F2},
1161+ {0x2816, 0x0360},
1162+ {0x2818, 0x2001},
1163+ {0x281A, 0x431D},
1164+ {0x281C, 0x425F},
1165+ {0x281E, 0x87D3},
1166+ {0x2820, 0xD25F},
1167+ {0x2822, 0x87D2},
1168+ {0x2824, 0xF37F},
1169+ {0x2826, 0x5F0F},
1170+ {0x2828, 0x425E},
1171+ {0x282A, 0x87CD},
1172+ {0x282C, 0xDE0F},
1173+ {0x282E, 0x5F0F},
1174+ {0x2830, 0x5B0F},
1175+ {0x2832, 0x4FA2},
1176+ {0x2834, 0x0402},
1177+ {0x2836, 0x930D},
1178+ {0x2838, 0x2007},
1179+ {0x283A, 0x930A},
1180+ {0x283C, 0x248E},
1181+ {0x283E, 0x4F5F},
1182+ {0x2840, 0x0001},
1183+ {0x2842, 0xF37F},
1184+ {0x2844, 0x4FC2},
1185+ {0x2846, 0x0403},
1186+ {0x2848, 0x93C2},
1187+ {0x284A, 0x87CD},
1188+ {0x284C, 0x2483},
1189+ {0x284E, 0xC2F2},
1190+ {0x2850, 0x0400},
1191+ {0x2852, 0xB2E2},
1192+ {0x2854, 0x0265},
1193+ {0x2856, 0x2407},
1194+ {0x2858, 0x421F},
1195+ {0x285A, 0x0508},
1196+ {0x285C, 0xF03F},
1197+ {0x285E, 0xFFDF},
1198+ {0x2860, 0xD90F},
1199+ {0x2862, 0x4F82},
1200+ {0x2864, 0x0508},
1201+ {0x2866, 0xB3D2},
1202+ {0x2868, 0x0383},
1203+ {0x286A, 0x2484},
1204+ {0x286C, 0x403F},
1205+ {0x286E, 0x0508},
1206+ {0x2870, 0x4FB1},
1207+ {0x2872, 0x0000},
1208+ {0x2874, 0x4FB1},
1209+ {0x2876, 0x0002},
1210+ {0x2878, 0x4FB1},
1211+ {0x287A, 0x0004},
1212+ {0x287C, 0x403F},
1213+ {0x287E, 0x0500},
1214+ {0x2880, 0x4FB1},
1215+ {0x2882, 0x0006},
1216+ {0x2884, 0x4FB1},
1217+ {0x2886, 0x0008},
1218+ {0x2888, 0x4FB1},
1219+ {0x288A, 0x000A},
1220+ {0x288C, 0xB3E2},
1221+ {0x288E, 0x0383},
1222+ {0x2890, 0x2412},
1223+ {0x2892, 0xC2E1},
1224+ {0x2894, 0x0002},
1225+ {0x2896, 0xB2E2},
1226+ {0x2898, 0x0383},
1227+ {0x289A, 0x434F},
1228+ {0x289C, 0x634F},
1229+ {0x289E, 0xF37F},
1230+ {0x28A0, 0x4F4E},
1231+ {0x28A2, 0x114E},
1232+ {0x28A4, 0x434E},
1233+ {0x28A6, 0x104E},
1234+ {0x28A8, 0x415F},
1235+ {0x28AA, 0x0007},
1236+ {0x28AC, 0xF07F},
1237+ {0x28AE, 0x007F},
1238+ {0x28B0, 0xDE4F},
1239+ {0x28B2, 0x4FC1},
1240+ {0x28B4, 0x0007},
1241+ {0x28B6, 0xB2F2},
1242+ {0x28B8, 0x0383},
1243+ {0x28BA, 0x2415},
1244+ {0x28BC, 0xF0F1},
1245+ {0x28BE, 0xFFBF},
1246+ {0x28C0, 0x0000},
1247+ {0x28C2, 0xB0F2},
1248+ {0x28C4, 0x0010},
1249+ {0x28C6, 0x0383},
1250+ {0x28C8, 0x434E},
1251+ {0x28CA, 0x634E},
1252+ {0x28CC, 0x5E4E},
1253+ {0x28CE, 0x5E4E},
1254+ {0x28D0, 0x5E4E},
1255+ {0x28D2, 0x5E4E},
1256+ {0x28D4, 0x5E4E},
1257+ {0x28D6, 0x5E4E},
1258+ {0x28D8, 0x415F},
1259+ {0x28DA, 0x0006},
1260+ {0x28DC, 0xF07F},
1261+ {0x28DE, 0xFFBF},
1262+ {0x28E0, 0xDE4F},
1263+ {0x28E2, 0x4FC1},
1264+ {0x28E4, 0x0006},
1265+ {0x28E6, 0xB0F2},
1266+ {0x28E8, 0x0020},
1267+ {0x28EA, 0x0383},
1268+ {0x28EC, 0x2410},
1269+ {0x28EE, 0xF0F1},
1270+ {0x28F0, 0xFFDF},
1271+ {0x28F2, 0x0002},
1272+ {0x28F4, 0xB0F2},
1273+ {0x28F6, 0x0040},
1274+ {0x28F8, 0x0383},
1275+ {0x28FA, 0x434E},
1276+ {0x28FC, 0x634E},
1277+ {0x28FE, 0x5E4E},
1278+ {0x2900, 0x5E4E},
1279+ {0x2902, 0x415F},
1280+ {0x2904, 0x0008},
1281+ {0x2906, 0xC26F},
1282+ {0x2908, 0xDE4F},
1283+ {0x290A, 0x4FC1},
1284+ {0x290C, 0x0008},
1285+ {0x290E, 0x93C2},
1286+ {0x2910, 0x0383},
1287+ {0x2912, 0x3412},
1288+ {0x2914, 0xF0F1},
1289+ {0x2916, 0xFFDF},
1290+ {0x2918, 0x0000},
1291+ {0x291A, 0x425E},
1292+ {0x291C, 0x0382},
1293+ {0x291E, 0xF35E},
1294+ {0x2920, 0x5E4E},
1295+ {0x2922, 0x5E4E},
1296+ {0x2924, 0x5E4E},
1297+ {0x2926, 0x5E4E},
1298+ {0x2928, 0x5E4E},
1299+ {0x292A, 0x415F},
1300+ {0x292C, 0x0006},
1301+ {0x292E, 0xF07F},
1302+ {0x2930, 0xFFDF},
1303+ {0x2932, 0xDE4F},
1304+ {0x2934, 0x4FC1},
1305+ {0x2936, 0x0006},
1306+ {0x2938, 0x410F},
1307+ {0x293A, 0x4FB2},
1308+ {0x293C, 0x0508},
1309+ {0x293E, 0x4FB2},
1310+ {0x2940, 0x050A},
1311+ {0x2942, 0x4FB2},
1312+ {0x2944, 0x050C},
1313+ {0x2946, 0x4FB2},
1314+ {0x2948, 0x0500},
1315+ {0x294A, 0x4FB2},
1316+ {0x294C, 0x0502},
1317+ {0x294E, 0x4FB2},
1318+ {0x2950, 0x0504},
1319+ {0x2952, 0x3C10},
1320+ {0x2954, 0xD2F2},
1321+ {0x2956, 0x0400},
1322+ {0x2958, 0x3F7C},
1323+ {0x295A, 0x4F6F},
1324+ {0x295C, 0xF37F},
1325+ {0x295E, 0x4FC2},
1326+ {0x2960, 0x0402},
1327+ {0x2962, 0x3F72},
1328+ {0x2964, 0x90F2},
1329+ {0x2966, 0x0011},
1330+ {0x2968, 0x0619},
1331+ {0x296A, 0x2B46},
1332+ {0x296C, 0x50F2},
1333+ {0x296E, 0xFFF0},
1334+ {0x2970, 0x0619},
1335+ {0x2972, 0x3F42},
1336+ {0x2974, 0x5031},
1337+ {0x2976, 0x000C},
1338+ {0x2978, 0x4139},
1339+ {0x297A, 0x413A},
1340+ {0x297C, 0x413B},
1341+ {0x297E, 0x4130},
1342+ {0x2980, 0x0900},
1343+ {0x2982, 0x7312},
1344+ {0x2984, 0x421F},
1345+ {0x2986, 0x0A08},
1346+ {0x2988, 0xF03F},
1347+ {0x298A, 0xF7FF},
1348+ {0x298C, 0x4F82},
1349+ {0x298E, 0x0A88},
1350+ {0x2990, 0x0900},
1351+ {0x2992, 0x7312},
1352+ {0x2994, 0x421F},
1353+ {0x2996, 0x0A0E},
1354+ {0x2998, 0xF03F},
1355+ {0x299A, 0x7FFF},
1356+ {0x299C, 0x4F82},
1357+ {0x299E, 0x0A8E},
1358+ {0x29A0, 0x0900},
1359+ {0x29A2, 0x7312},
1360+ {0x29A4, 0x421F},
1361+ {0x29A6, 0x0A1E},
1362+ {0x29A8, 0xC31F},
1363+ {0x29AA, 0x4F82},
1364+ {0x29AC, 0x0A9E},
1365+ {0x29AE, 0x4130},
1366+ {0x29B0, 0x4292},
1367+ {0x29B2, 0x0A08},
1368+ {0x29B4, 0x0A88},
1369+ {0x29B6, 0x0900},
1370+ {0x29B8, 0x7312},
1371+ {0x29BA, 0x4292},
1372+ {0x29BC, 0x0A0E},
1373+ {0x29BE, 0x0A8E},
1374+ {0x29C0, 0x0900},
1375+ {0x29C2, 0x7312},
1376+ {0x29C4, 0x4292},
1377+ {0x29C6, 0x0A1E},
1378+ {0x29C8, 0x0A9E},
1379+ {0x29CA, 0x4130},
1380+ {0x29CC, 0x7400},
1381+ {0x29CE, 0x8058},
1382+ {0x29D0, 0x1807},
1383+ {0x29D2, 0x00E0},
1384+ {0x29D4, 0x7002},
1385+ {0x29D6, 0x17C7},
1386+ {0x29D8, 0x0045},
1387+ {0x29DA, 0x0006},
1388+ {0x29DC, 0x17CC},
1389+ {0x29DE, 0x0015},
1390+ {0x29E0, 0x1512},
1391+ {0x29E2, 0x216F},
1392+ {0x29E4, 0x005B},
1393+ {0x29E6, 0x005D},
1394+ {0x29E8, 0x00DE},
1395+ {0x29EA, 0x00DD},
1396+ {0x29EC, 0x5023},
1397+ {0x29EE, 0x00DE},
1398+ {0x29F0, 0x005B},
1399+ {0x29F2, 0x0410},
1400+ {0x29F4, 0x0091},
1401+ {0x29F6, 0x0015},
1402+ {0x29F8, 0x0040},
1403+ {0x29FA, 0x7023},
1404+ {0x29FC, 0x1653},
1405+ {0x29FE, 0x0156},
1406+ {0x2A00, 0x0001},
1407+ {0x2A02, 0x2081},
1408+ {0x2A04, 0x7020},
1409+ {0x2A06, 0x2F99},
1410+ {0x2A08, 0x005C},
1411+ {0x2A0A, 0x0000},
1412+ {0x2A0C, 0x5040},
1413+ {0x2A0E, 0x0045},
1414+ {0x2A10, 0x213A},
1415+ {0x2A12, 0x0303},
1416+ {0x2A14, 0x0148},
1417+ {0x2A16, 0x0049},
1418+ {0x2A18, 0x0045},
1419+ {0x2A1A, 0x0046},
1420+ {0x2A1C, 0x05DD},
1421+ {0x2A1E, 0x00DE},
1422+ {0x2A20, 0x00DD},
1423+ {0x2A22, 0x00DC},
1424+ {0x2A24, 0x00DE},
1425+ {0x2A26, 0x04D6},
1426+ {0x2A28, 0x2014},
1427+ {0x2A2A, 0x2081},
1428+ {0x2A2C, 0x7087},
1429+ {0x2A2E, 0x2F99},
1430+ {0x2A30, 0x005C},
1431+ {0x2A32, 0x0002},
1432+ {0x2A34, 0x5060},
1433+ {0x2A36, 0x31C0},
1434+ {0x2A38, 0x2122},
1435+ {0x2A3A, 0x7800},
1436+ {0x2A3C, 0xC08C},
1437+ {0x2A3E, 0x0001},
1438+ {0x2A40, 0x9038},
1439+ {0x2A42, 0x59F7},
1440+ {0x2A44, 0x907A},
1441+ {0x2A46, 0x03D8},
1442+ {0x2A48, 0x8D90},
1443+ {0x2A4A, 0x01C0},
1444+ {0x2A4C, 0x7400},
1445+ {0x2A4E, 0x8058},
1446+ {0x2A50, 0x1807},
1447+ {0x2A52, 0x00E0},
1448+ {0x2A54, 0x7002},
1449+ {0x2A56, 0x17C7},
1450+ {0x2A58, 0x0045},
1451+ {0x2A5A, 0x0006},
1452+ {0x2A5C, 0x17CC},
1453+ {0x2A5E, 0x0015},
1454+ {0x2A60, 0x1512},
1455+ {0x2A62, 0x216F},
1456+ {0x2A64, 0x005B},
1457+ {0x2A66, 0x005D},
1458+ {0x2A68, 0x00DE},
1459+ {0x2A6A, 0x00DD},
1460+ {0x2A6C, 0x5023},
1461+ {0x2A6E, 0x00DE},
1462+ {0x2A70, 0x005B},
1463+ {0x2A72, 0x0410},
1464+ {0x2A74, 0x0091},
1465+ {0x2A76, 0x0015},
1466+ {0x2A78, 0x0040},
1467+ {0x2A7A, 0x7023},
1468+ {0x2A7C, 0x1653},
1469+ {0x2A7E, 0x0156},
1470+ {0x2A80, 0x0001},
1471+ {0x2A82, 0x2081},
1472+ {0x2A84, 0x7020},
1473+ {0x2A86, 0x2F99},
1474+ {0x2A88, 0x005C},
1475+ {0x2A8A, 0x0000},
1476+ {0x2A8C, 0x5040},
1477+ {0x2A8E, 0x0045},
1478+ {0x2A90, 0x213A},
1479+ {0x2A92, 0x0303},
1480+ {0x2A94, 0x0148},
1481+ {0x2A96, 0x0049},
1482+ {0x2A98, 0x0045},
1483+ {0x2A9A, 0x0046},
1484+ {0x2A9C, 0x05DD},
1485+ {0x2A9E, 0x00DE},
1486+ {0x2AA0, 0x00DD},
1487+ {0x2AA2, 0x00DC},
1488+ {0x2AA4, 0x00DE},
1489+ {0x2AA6, 0x0296},
1490+ {0x2AA8, 0x2014},
1491+ {0x2AAA, 0x2081},
1492+ {0x2AAC, 0x7087},
1493+ {0x2AAE, 0x2F99},
1494+ {0x2AB0, 0x005C},
1495+ {0x2AB2, 0x0002},
1496+ {0x2AB4, 0x5060},
1497+ {0x2AB6, 0x31C0},
1498+ {0x2AB8, 0x2122},
1499+ {0x2ABA, 0x7800},
1500+ {0x2ABC, 0xC08C},
1501+ {0x2ABE, 0x0001},
1502+ {0x2AC0, 0x9038},
1503+ {0x2AC2, 0x59F7},
1504+ {0x2AC4, 0x907A},
1505+ {0x2AC6, 0x03D8},
1506+ {0x2AC8, 0x8D90},
1507+ {0x2ACA, 0x01C0},
1508+ {0x2ACC, 0x7400},
1509+ {0x2ACE, 0x2002},
1510+ {0x2AD0, 0x70DF},
1511+ {0x2AD2, 0x2F21},
1512+ {0x2AD4, 0x04C1},
1513+ {0x2AD6, 0x0D80},
1514+ {0x2AD8, 0x7800},
1515+ {0x2ADA, 0x0041},
1516+ {0x2ADC, 0x7400},
1517+ {0x2ADE, 0x2004},
1518+ {0x2AE0, 0x70DF},
1519+ {0x2AE2, 0x2F21},
1520+ {0x2AE4, 0x04C2},
1521+ {0x2AE6, 0x0D80},
1522+ {0x2AE8, 0x7800},
1523+ {0x2AEA, 0x7400},
1524+ {0x2AEC, 0x2008},
1525+ {0x2AEE, 0x70DF},
1526+ {0x2AF0, 0x2F21},
1527+ {0x2AF2, 0x04C3},
1528+ {0x2AF4, 0x0D80},
1529+ {0x2AF6, 0x7800},
1530+ {0x2AF8, 0x7400},
1531+ {0x2AFA, 0x0004},
1532+ {0x2AFC, 0x70DF},
1533+ {0x2AFE, 0x2F22},
1534+ {0x2B00, 0x7008},
1535+ {0x2B02, 0x2F1F},
1536+ {0x2B04, 0x7021},
1537+ {0x2B06, 0x2F01},
1538+ {0x2B08, 0x7800},
1539+ {0x2B0A, 0x7400},
1540+ {0x2B0C, 0x0002},
1541+ {0x2B0E, 0x70DF},
1542+ {0x2B10, 0x3F5F},
1543+ {0x2B12, 0x703A},
1544+ {0x2B14, 0x2F01},
1545+ {0x2B16, 0x7800},
1546+ {0x2B18, 0x7400},
1547+ {0x2B1A, 0x2010},
1548+ {0x2B1C, 0x70DF},
1549+ {0x2B1E, 0x3F40},
1550+ {0x2B20, 0x700A},
1551+ {0x2B22, 0x0FC0},
1552+ {0x2B24, 0x7800},
1553+ {0x2B26, 0x7400},
1554+ {0x2B28, 0x2004},
1555+ {0x2B2A, 0x70DF},
1556+ {0x2B2C, 0x2F21},
1557+ {0x2B2E, 0x04C2},
1558+ {0x2B30, 0x0D80},
1559+ {0x2B32, 0x7800},
1560+ {0x2B34, 0x0041},
1561+ {0x2B36, 0x7400},
1562+ {0x2B38, 0x2002},
1563+ {0x2B3A, 0x70DF},
1564+ {0x2B3C, 0x2F22},
1565+ {0x2B3E, 0x04C1},
1566+ {0x2B40, 0x0D80},
1567+ {0x2B42, 0x7800},
1568+ {0x2B44, 0x7400},
1569+ {0x2B46, 0x0001},
1570+ {0x2B48, 0x70DF},
1571+ {0x2B4A, 0x3F5F},
1572+ {0x2B4C, 0x703A},
1573+ {0x2B4E, 0x2F01},
1574+ {0x2B50, 0x7800},
1575+ {0x2B52, 0x7400},
1576+ {0x2B54, 0x200A},
1577+ {0x2B56, 0x70DF},
1578+ {0x2B58, 0x3F40},
1579+ {0x2B5A, 0x700A},
1580+ {0x2B5C, 0x0FC0},
1581+ {0x2B5E, 0x7800},
1582+ {0x2B60, 0x7400},
1583+ {0x2B62, 0x2015},
1584+ {0x2B64, 0x70DF},
1585+ {0x2B66, 0x3F5F},
1586+ {0x2B68, 0x703A},
1587+ {0x2B6A, 0x2F01},
1588+ {0x2B6C, 0x7800},
1589+ {0x2B6E, 0x7400},
1590+ {0x2B70, 0x7800},
1591+ {0x2B72, 0x007F},
1592+ {0x2B74, 0x0000},
1593+ {0x2B76, 0xB9CC},
1594+ {0x2B78, 0x0000},
1595+ {0x2B7A, 0xB9CC},
1596+ {0x2B7C, 0xBA3C},
1597+ {0x2B7E, 0x0002},
1598+ {0x2B80, 0x0000},
1599+ {0x2B82, 0xBA4C},
1600+ {0x2B84, 0x0000},
1601+ {0x2B86, 0xBA4C},
1602+ {0x2B88, 0xBABC},
1603+ {0x2B8A, 0x0002},
1604+ {0x2B8C, 0x0063},
1605+ {0x2B8E, 0xBB26},
1606+ {0x2B90, 0x0063},
1607+ {0x2B92, 0xBB36},
1608+ {0x2B94, 0x0063},
1609+ {0x2B96, 0xBAEA},
1610+ {0x2B98, 0x0063},
1611+ {0x2B9A, 0xBAF8},
1612+ {0x2B9C, 0xBADA},
1613+ {0x2B9E, 0x0004},
1614+ {0x2BA0, 0x0063},
1615+ {0x2BA2, 0xBAEA},
1616+ {0x2BA4, 0x0063},
1617+ {0x2BA6, 0xBB18},
1618+ {0x2BA8, 0x0063},
1619+ {0x2BAA, 0xBB26},
1620+ {0x2BAC, 0x0063},
1621+ {0x2BAE, 0xBB44},
1622+ {0x2BB0, 0xBADA},
1623+ {0x2BB2, 0x0004},
1624+ {0x2BB4, 0x0063},
1625+ {0x2BB6, 0xBACC},
1626+ {0x2BB8, 0x0063},
1627+ {0x2BBA, 0xBADC},
1628+ {0x2BBC, 0x0063},
1629+ {0x2BBE, 0xBAEA},
1630+ {0x2BC0, 0x0063},
1631+ {0x2BC2, 0xBAF8},
1632+ {0x2BC4, 0xBADA},
1633+ {0x2BC6, 0x0004},
1634+ {0x2BC8, 0x0063},
1635+ {0x2BCA, 0xBAEA},
1636+ {0x2BCC, 0x0063},
1637+ {0x2BCE, 0xBB18},
1638+ {0x2BD0, 0x0063},
1639+ {0x2BD2, 0xBACC},
1640+ {0x2BD4, 0x0063},
1641+ {0x2BD6, 0xBB0A},
1642+ {0x2BD8, 0xBADA},
1643+ {0x2BDA, 0x0004},
1644+ {0x2BDC, 0x0063},
1645+ {0x2BDE, 0xBACC},
1646+ {0x2BE0, 0x0063},
1647+ {0x2BE2, 0xBADC},
1648+ {0x2BE4, 0x0063},
1649+ {0x2BE6, 0xBAEA},
1650+ {0x2BE8, 0x0063},
1651+ {0x2BEA, 0xBB18},
1652+ {0x2BEC, 0xBADA},
1653+ {0x2BEE, 0x0004},
1654+ {0x2BF0, 0xFFFF},
1655+ {0x2BF2, 0xBB6E},
1656+ {0x2BF4, 0x0000},
1657+ {0x2BF6, 0x0000},
1658+ {0x2BF8, 0x0000},
1659+ {0x2BFA, 0x0000},
1660+ {0x2BFC, 0x0000},
1661+ {0x2BFE, 0x0000},
1662+ {0x2C00, 0xBB72},
1663+ {0x2C02, 0x0001},
1664+ {0x2C04, 0x0063},
1665+ {0x2C06, 0xBB52},
1666+ {0x2C08, 0x0063},
1667+ {0x2C0A, 0xBB60},
1668+ {0x2C0C, 0x0000},
1669+ {0x2C0E, 0x0000},
1670+ {0x2C10, 0x0000},
1671+ {0x2C12, 0x0000},
1672+ {0x2C14, 0xBADA},
1673+ {0x2C16, 0x0002},
1674+ {0x2C18, 0x0066},
1675+ {0x2C1A, 0x0067},
1676+ {0x2C1C, 0x00AF},
1677+ {0x2C1E, 0x01CF},
1678+ {0x2C20, 0x0087},
1679+ {0x2C22, 0x0083},
1680+ {0x2C24, 0x011B},
1681+ {0x2C26, 0x035A},
1682+ {0x2C28, 0x00FA},
1683+ {0x2C2A, 0x00F2},
1684+ {0x2C2C, 0x00A6},
1685+ {0x2C2E, 0x00A4},
1686+ {0x2C30, 0xFFFF},
1687+ {0x2C32, 0x002C},
1688+ {0x2C34, 0x0058},
1689+ {0x2C36, 0x0000},
1690+ {0x2C38, 0x0000},
1691+ {0x2C3A, 0xBC18},
1692+ {0x2C3C, 0xBB74},
1693+ {0x2C3E, 0xBB80},
1694+ {0x2C40, 0xBC32},
1695+ {0x2C42, 0xBB8C},
1696+ {0x2C44, 0xBBA0},
1697+ {0x2C46, 0xBB8C},
1698+ {0x2C48, 0xBBA0},
1699+ {0x2C4A, 0xBC04},
1700+ {0x2C4C, 0xBC04},
1701+ {0x2C4E, 0xBBF0},
1702+ {0x2C50, 0xBBF0},
1703+ {0x2C52, 0xBBB4},
1704+ {0x2C54, 0xBBC8},
1705+ {0x2C56, 0xBBB4},
1706+ {0x2C58, 0xBBC8},
1707+ {0x2C5A, 0xBC04},
1708+ {0x2C5C, 0xBC04},
1709+ {0x2C5E, 0xBBF0},
1710+ {0x2C60, 0xBBF0},
1711+ {0x2C62, 0xBB8C},
1712+ {0x2C64, 0xBBA0},
1713+ {0x2C66, 0xBB8C},
1714+ {0x2C68, 0xBBA0},
1715+ {0x2C6A, 0xBC04},
1716+ {0x2C6C, 0xBC04},
1717+ {0x2C6E, 0xBBF0},
1718+ {0x2C70, 0xBBF0},
1719+ {0x2C72, 0xBBB4},
1720+ {0x2C74, 0xBBC8},
1721+ {0x2C76, 0xBBB4},
1722+ {0x2C78, 0xBBC8},
1723+ {0x2C7A, 0xBC04},
1724+ {0x2C7C, 0xBC04},
1725+ {0x2C7E, 0xBBF0},
1726+ {0x2C80, 0xBBF0},
1727+ {0x3800, 0x880E},
1728+ {0x3802, 0xBC62},
1729+ {0x3804, 0xBC40},
1730+ {0x3806, 0xD13E},
1731+ {0x3808, 0xBC42},
1732+ {0x380A, 0xBC3C},
1733+ {0x380C, 0x0000},
1734+ {0x380E, 0x0040},
1735+ {0x3810, 0x0040},
1736+ {0x3812, 0x0040},
1737+ {0x3814, 0x0043},
1738+ {0x3816, 0x0046},
1739+ {0x3818, 0x004B},
1740+ {0x381A, 0x004D},
1741+ {0x381C, 0x0051},
1742+ {0x381E, 0x0055},
1743+ {0x3820, 0x005A},
1744+ {0x3822, 0x005E},
1745+ {0x3824, 0x0062},
1746+ {0x3826, 0x0067},
1747+ {0x3828, 0x006C},
1748+ {0x382A, 0x0070},
1749+ {0x382C, 0x0078},
1750+ {0x382E, 0x0086},
1751+ {0x3830, 0x0090},
1752+ {0x3832, 0x0096},
1753+ {0x3834, 0x009D},
1754+ {0x3836, 0x00A5},
1755+ {0x3838, 0x00AD},
1756+ {0x383A, 0x00B4},
1757+ {0x383C, 0x00B9},
1758+ {0x383E, 0x00BE},
1759+ {0x3840, 0x00C3},
1760+ {0x3842, 0x00C8},
1761+ {0x3844, 0x00CD},
1762+ {0x3846, 0x00D2},
1763+ {0x3848, 0x00D7},
1764+ {0x384A, 0x00DC},
1765+ {0x384C, 0x00DC},
1766+ {0x384E, 0x0000},
1767+ {0x3850, 0x0000},
1768+ {0x3852, 0x0000},
1769+ {0x3854, 0x0000},
1770+ {0x3856, 0x0000},
1771+ {0x3858, 0x0000},
1772+ {0x385A, 0x0000},
1773+ {0x385C, 0x0000},
1774+ {0x385E, 0x0000},
1775+ {0x3860, 0x0000},
1776+ {0x3862, 0x0000},
1777+ {0x3864, 0x0000},
1778+ {0x3866, 0x0000},
1779+ {0x3868, 0x0000},
1780+ {0x386A, 0x0000},
1781+ {0x386C, 0x0000},
1782+ {0x386E, 0x0000},
1783+ {0x3870, 0x0000},
1784+ {0x3872, 0x0000},
1785+ {0x3874, 0x0000},
1786+ {0x3876, 0x0000},
1787+ {0x3878, 0x0000},
1788+ {0x387A, 0x0000},
1789+ {0x387C, 0x0000},
1790+ {0x387E, 0x0000},
1791+ {0x3880, 0x0000},
1792+ {0x3882, 0x0000},
1793+ {0x3884, 0x0000},
1794+ {0x3886, 0x0000},
1795+ {0x3888, 0x0000},
1796+ {0x388A, 0x0000},
1797+ {0x388C, 0x0000},
1798+ {0x026A, 0xFFFF},
1799+ {0x026C, 0x00FF},
1800+ {0x026E, 0x0000},
1801+ {0x0360, 0x1E8E},
1802+ {0x040E, 0x01EB},
1803+ {0x0600, 0x1130},
1804+ {0x0602, 0x3112},
1805+ {0x0604, 0x8048},
1806+ {0x0606, 0x00E9},
1807+ {0x067A, 0x0404},
1808+ {0x067C, 0x0404},
1809+ {0x06A8, 0x0240},
1810+ {0x06AA, 0x00CA},
1811+ {0x06AC, 0x0041},
1812+ {0x06B4, 0x3FFF},
1813+ {0x06DE, 0x0404},
1814+ {0x06E0, 0x0404},
1815+ {0x06E2, 0xFF00},
1816+ {0x06E4, 0x8333},
1817+ {0x06E6, 0x8333},
1818+ {0x06E8, 0x8333},
1819+ {0x06EA, 0x8333},
1820+ {0x052A, 0x0000},
1821+ {0x052C, 0x0000},
1822+ {0x0F06, 0x0002},
1823+ {0x0A04, 0xB4C5},
1824+ {0x0A06, 0xC400},
1825+ {0x0A08, 0x988A},
1826+ {0x0A0A, 0xA387},
1827+ {0x0A0E, 0xEEC0},
1828+ {0x0A12, 0x0000},
1829+ {0x0A18, 0x0010},
1830+ {0x0A1C, 0x0040},
1831+ {0x0A20, 0x0015},
1832+ {0x0C00, 0x0021},
1833+ {0x0C16, 0x0002},
1834+ {0x0708, 0x6FC0},
1835+ {0x070C, 0x0000},
1836+ {0x120C, 0x1428},
1837+ {0x121A, 0x0000},
1838+ {0x121C, 0x1896},
1839+ {0x121E, 0x0032},
1840+ {0x1220, 0x0000},
1841+ {0x1222, 0x96FF},
1842+ {0x1244, 0x0000},
1843+ {0x105C, 0x0F0B},
1844+ {0x1958, 0x0000},
1845+ {0x195A, 0x004C},
1846+ {0x195C, 0x0097},
1847+ {0x195E, 0x0221},
1848+ {0x1960, 0x03FE},
1849+ {0x1980, 0x00E0},
1850+ {0x1982, 0x0010},
1851+ {0x1984, 0x2018},
1852+ {0x1986, 0x0008},
1853+ {0x1988, 0x0000},
1854+ {0x198A, 0x0000},
1855+ {0x198C, 0x0880},
1856+ {0x198E, 0x0000},
1857+ {0x1990, 0x1A00},
1858+ {0x1992, 0x0000},
1859+ {0x1994, 0x2800},
1860+ {0x1996, 0x0002},
1861+ {0x1962, 0x0000},
1862+ {0x1964, 0x004C},
1863+ {0x1966, 0x0097},
1864+ {0x1968, 0x0221},
1865+ {0x196A, 0x03FE},
1866+ {0x19C0, 0x00E0},
1867+ {0x19C2, 0x0010},
1868+ {0x19C4, 0x2018},
1869+ {0x19C6, 0x0008},
1870+ {0x19C8, 0x0000},
1871+ {0x19CA, 0x0000},
1872+ {0x19CC, 0x0880},
1873+ {0x19CE, 0x0000},
1874+ {0x19D0, 0x1A00},
1875+ {0x19D2, 0x0000},
1876+ {0x19D4, 0x2800},
1877+ {0x19D6, 0x0002},
1878+ {0x196C, 0x0000},
1879+ {0x196E, 0x004C},
1880+ {0x1970, 0x0097},
1881+ {0x1972, 0x0221},
1882+ {0x1974, 0x03FE},
1883+ {0x1A00, 0x00E0},
1884+ {0x1A02, 0x0010},
1885+ {0x1A04, 0x2018},
1886+ {0x1A06, 0x0008},
1887+ {0x1A08, 0x0000},
1888+ {0x1A0A, 0x0000},
1889+ {0x1A0C, 0x0880},
1890+ {0x1A0E, 0x0000},
1891+ {0x1A10, 0x1A00},
1892+ {0x1A12, 0x0000},
1893+ {0x1A14, 0x2800},
1894+ {0x1A16, 0x0002},
1895+ {0x1976, 0x0000},
1896+ {0x1978, 0x004C},
1897+ {0x197A, 0x0097},
1898+ {0x197C, 0x0221},
1899+ {0x197E, 0x03FE},
1900+ {0x1A40, 0x00E0},
1901+ {0x1A42, 0x0010},
1902+ {0x1A44, 0x2018},
1903+ {0x1A46, 0x0008},
1904+ {0x1A48, 0x0000},
1905+ {0x1A4A, 0x0000},
1906+ {0x1A4C, 0x0880},
1907+ {0x1A4E, 0x0000},
1908+ {0x1A50, 0x1A00},
1909+ {0x1A52, 0x0000},
1910+ {0x1A54, 0x2800},
1911+ {0x1A56, 0x0002},
1912+ {0x192A, 0x0201},
1913+ {0x0384, 0x0001},
1914+ {0x027E, 0x0100},
1915+};
1916+
1917+static const struct hi847_reg mode_3264x2448_regs[] = {
1918+ {0x0B00, 0x0000},
1919+ {0x0204, 0x0000},
1920+ {0x0206, 0x033C},
1921+ {0x020A, 0x0B4D},
1922+ {0x020E, 0x0B51},
1923+ {0x0214, 0x0200},
1924+ {0x0216, 0x0200},
1925+ {0x0218, 0x0200},
1926+ {0x021A, 0x0200},
1927+ {0x0224, 0x002E},
1928+ {0x022A, 0x0017},
1929+ {0x022C, 0x0E1F},
1930+ {0x022E, 0x09C1},
1931+ {0x0234, 0x1111},
1932+ {0x0236, 0x1111},
1933+ {0x0238, 0x1111},
1934+ {0x023A, 0x1111},
1935+ {0x0250, 0x0000},
1936+ {0x0252, 0x0006},
1937+ {0x0254, 0x0000},
1938+ {0x0256, 0x0000},
1939+ {0x0258, 0x0000},
1940+ {0x025A, 0x0000},
1941+ {0x025C, 0x0000},
1942+ {0x025E, 0x0202},
1943+ {0x0268, 0x00CD},
1944+ {0x0440, 0x0002},
1945+ {0x0F00, 0x0000},
1946+ {0x0F04, 0x0008},
1947+ {0x0F06, 0x0002},
1948+ {0x0B02, 0x0100},
1949+ {0x0B04, 0x00DC},
1950+ {0x0B12, 0x0CC0},
1951+ {0x0B14, 0x0990},
1952+ {0x0B20, 0x0100},
1953+ {0x1100, 0x1100},
1954+ {0x1102, 0x0008},
1955+ {0x1108, 0x0202},
1956+ {0x1118, 0x0000},
1957+ {0x0A10, 0xB040},
1958+ {0x0C14, 0x0008},
1959+ {0x0C18, 0x0CC0},
1960+ {0x0C1A, 0x0990},
1961+ {0x0730, 0x0001},
1962+ {0x0732, 0x0000},
1963+ {0x0734, 0x0300},
1964+ {0x0736, 0x004B},
1965+ {0x0738, 0x0001},
1966+ {0x073C, 0x0900},
1967+ {0x0740, 0x0000},
1968+ {0x0742, 0x0000},
1969+ {0x0744, 0x0300},
1970+ {0x0746, 0x007D},
1971+ {0x0748, 0x0002},
1972+ {0x074A, 0x0900},
1973+ {0x074C, 0x0000},
1974+ {0x074E, 0x0100},
1975+ {0x0750, 0x0000},
1976+ {0x1200, 0x0946},
1977+ {0x1202, 0x1A00},
1978+ {0x120E, 0x6027},
1979+ {0x1210, 0x8027},
1980+ {0x1246, 0x0105},
1981+ {0x1000, 0x0300},
1982+ {0x1002, 0xC311},
1983+ {0x1004, 0x2BB0},
1984+ {0x1010, 0x087B},
1985+ {0x1012, 0x0040},
1986+ {0x1014, 0x0020},
1987+ {0x1016, 0x0020},
1988+ {0x101A, 0x0020},
1989+ {0x1020, 0xC107},
1990+ {0x1022, 0x081E},
1991+ {0x1024, 0x0509},
1992+ {0x1026, 0x0B0A},
1993+ {0x1028, 0x1409},
1994+ {0x102A, 0x0B05},
1995+ {0x102C, 0x1400},
1996+ {0x1038, 0x0000},
1997+ {0x103E, 0x0001},
1998+ {0x1040, 0x0000},
1999+ {0x1042, 0x0008},
2000+ {0x1044, 0x0120},
2001+ {0x1046, 0x01B0},
2002+ {0x1048, 0x0090},
2003+ {0x1066, 0x089C},
2004+ {0x1600, 0x0000},
2005+ {0x1608, 0x0028},
2006+ {0x160A, 0x0C80},
2007+ {0x160C, 0x001A},
2008+ {0x160E, 0x0960},
2009+ {0x0252, 0x0009},
2010+ {0x0202, 0x0000},
2011+};
2012+
2013+static const struct hi847_reg mode_1632x1224_regs[] = {
2014+ {0x0B00, 0x0000},
2015+ {0x0204, 0x0200},
2016+ {0x0206, 0x033C},
2017+ {0x020A, 0x05A5},
2018+ {0x020E, 0x05A9},
2019+ {0x0214, 0x0200},
2020+ {0x0216, 0x0200},
2021+ {0x0218, 0x0200},
2022+ {0x021A, 0x0200},
2023+ {0x0224, 0x002C},
2024+ {0x022A, 0x0015},
2025+ {0x022C, 0x0E2D},
2026+ {0x022E, 0x09C1},
2027+ {0x0234, 0x3311},
2028+ {0x0236, 0x3311},
2029+ {0x0238, 0x3311},
2030+ {0x023A, 0x2222},
2031+ {0x0250, 0x0000},
2032+ {0x0252, 0x0006},
2033+ {0x0254, 0x0000},
2034+ {0x0256, 0x0000},
2035+ {0x0258, 0x0000},
2036+ {0x025A, 0x0000},
2037+ {0x025C, 0x0000},
2038+ {0x025E, 0x0202},
2039+ {0x0268, 0x00CD},
2040+ {0x0440, 0x0002},
2041+ {0x0F00, 0x0400},
2042+ {0x0F04, 0x0004},
2043+ {0x0F06, 0x0002},
2044+ {0x0B02, 0x0100},
2045+ {0x0B04, 0x00FC},
2046+ {0x0B12, 0x0660},
2047+ {0x0B14, 0x04C8},
2048+ {0x0B20, 0x0200},
2049+ {0x1100, 0x1100},
2050+ {0x1102, 0x0008},
2051+ {0x1108, 0x0402},
2052+ {0x1118, 0x0000},
2053+ {0x0A10, 0xB060},
2054+ {0x0C14, 0x0008},
2055+ {0x0C18, 0x0CC0},
2056+ {0x0C1A, 0x04C8},
2057+ {0x0730, 0x0001},
2058+ {0x0732, 0x0000},
2059+ {0x0734, 0x0300},
2060+ {0x0736, 0x004B},
2061+ {0x0738, 0x0001},
2062+ {0x073C, 0x0900},
2063+ {0x0740, 0x0000},
2064+ {0x0742, 0x0000},
2065+ {0x0744, 0x0300},
2066+ {0x0746, 0x007D},
2067+ {0x0748, 0x0002},
2068+ {0x074A, 0x0900},
2069+ {0x074C, 0x0100},
2070+ {0x074E, 0x0100},
2071+ {0x0750, 0x0000},
2072+ {0x1200, 0x0946},
2073+ {0x1202, 0x1A00},
2074+ {0x120E, 0x6027},
2075+ {0x1210, 0x8027},
2076+ {0x1246, 0x0105},
2077+ {0x1000, 0x0300},
2078+ {0x1002, 0xC311},
2079+ {0x1004, 0x2BB0},
2080+ {0x1010, 0x042B},
2081+ {0x1012, 0x0012},
2082+ {0x1014, 0x0020},
2083+ {0x1016, 0x0020},
2084+ {0x101A, 0x0020},
2085+ {0x1020, 0xC103},
2086+ {0x1022, 0x040F},
2087+ {0x1024, 0x0304},
2088+ {0x1026, 0x0607},
2089+ {0x1028, 0x0D06},
2090+ {0x102A, 0x0605},
2091+ {0x102C, 0x0C00},
2092+ {0x1038, 0x0000},
2093+ {0x103E, 0x0101},
2094+ {0x1040, 0x0000},
2095+ {0x1042, 0x0008},
2096+ {0x1044, 0x0120},
2097+ {0x1046, 0x01B0},
2098+ {0x1048, 0x0090},
2099+ {0x1066, 0x043B},
2100+ {0x1600, 0x0400},
2101+ {0x1608, 0x0028},
2102+ {0x160A, 0x0C80},
2103+ {0x160C, 0x001A},
2104+ {0x160E, 0x0960},
2105+ {0x0252, 0x0009},
2106+ {0x0202, 0x0000},
2107+};
2108+
2109+static const char * const hi847_test_pattern_menu[] = {
2110+ "No Pattern",
2111+ "Solid Colour",
2112+ "100% Colour Bars",
2113+ "Fade To Grey Colour Bars",
2114+ "PN9",
2115+ "Horizontal Gradient Pattern",
2116+ "Vertical Gradient Pattern",
2117+ "Check Board",
2118+ "Slant Pattern",
2119+};
2120+
2121+static const s64 link_freq_menu_items[] = {
2122+ HI847_LINK_FREQ_400MHZ,
2123+ HI847_LINK_FREQ_200MHZ,
2124+};
2125+
2126+static const struct hi847_link_freq_config link_freq_configs[] = {
2127+ [HI847_LINK_FREQ_400MHZ_INDEX] = {
2128+ .reg_list = {
2129+ .num_of_regs = ARRAY_SIZE(mipi_data_rate_lane_4),
2130+ .regs = mipi_data_rate_lane_4,
2131+ }
2132+ },
2133+ [HI847_LINK_FREQ_200MHZ_INDEX] = {
2134+ .reg_list = {
2135+ .num_of_regs = ARRAY_SIZE(mipi_data_rate_lane_4),
2136+ .regs = mipi_data_rate_lane_4,
2137+ }
2138+ }
2139+};
2140+
2141+static const struct hi847_mode supported_modes[] = {
2142+ {
2143+ .width = 3264,
2144+ .height = 2448,
2145+ .fll_def = HI847_FLL_30FPS,
2146+ .fll_min = HI847_FLL_30FPS_MIN,
2147+ .llp = 0x033C,
2148+ .reg_list = {
2149+ .num_of_regs = ARRAY_SIZE(mode_3264x2448_regs),
2150+ .regs = mode_3264x2448_regs,
2151+ },
2152+ .link_freq_index = HI847_LINK_FREQ_400MHZ_INDEX,
2153+ },
2154+ {
2155+ .width = 1632,
2156+ .height = 1224,
2157+ .fll_def = HI847_FLL_60FPS,
2158+ .fll_min = HI847_FLL_60FPS_MIN,
2159+ .llp = 0x033C,
2160+ .reg_list = {
2161+ .num_of_regs = ARRAY_SIZE(mode_1632x1224_regs),
2162+ .regs = mode_1632x1224_regs,
2163+ },
2164+ .link_freq_index = HI847_LINK_FREQ_200MHZ_INDEX,
2165+ }
2166+};
2167+
2168+struct hi847 {
2169+ struct v4l2_subdev sd;
2170+ struct media_pad pad;
2171+ struct v4l2_ctrl_handler ctrl_handler;
2172+
2173+ /* V4L2 Controls */
2174+ struct v4l2_ctrl *link_freq;
2175+ struct v4l2_ctrl *pixel_rate;
2176+ struct v4l2_ctrl *vblank;
2177+ struct v4l2_ctrl *hblank;
2178+ struct v4l2_ctrl *exposure;
2179+ struct v4l2_ctrl *vflip;
2180+ struct v4l2_ctrl *hflip;
2181+
2182+ /* Current mode */
2183+ const struct hi847_mode *cur_mode;
2184+
2185+ /* To serialize asynchronus callbacks */
2186+ struct mutex mutex;
2187+
2188+ /* Streaming on/off */
2189+ bool streaming;
2190+};
2191+
2192+static u64 to_pixel_rate(u32 f_index)
2193+{
2194+ u64 pixel_rate = link_freq_menu_items[f_index] * 2 * HI847_DATA_LANES;
2195+
2196+ do_div(pixel_rate, HI847_RGB_DEPTH);
2197+
2198+ return pixel_rate;
2199+}
2200+
2201+static int hi847_read_reg(struct hi847 *hi847, u16 reg, u16 len, u32 *val)
2202+{
2203+ struct i2c_client *client = v4l2_get_subdevdata(&hi847->sd);
2204+ struct i2c_msg msgs[2];
2205+ u8 addr_buf[2];
2206+ u8 data_buf[4] = {0};
2207+ int ret;
2208+
2209+ if (len > 4)
2210+ return -EINVAL;
2211+
2212+ put_unaligned_be16(reg, addr_buf);
2213+ msgs[0].addr = client->addr;
2214+ msgs[0].flags = 0;
2215+ msgs[0].len = sizeof(addr_buf);
2216+ msgs[0].buf = addr_buf;
2217+ msgs[1].addr = client->addr;
2218+ msgs[1].flags = I2C_M_RD;
2219+ msgs[1].len = len;
2220+ msgs[1].buf = &data_buf[4 - len];
2221+
2222+ ret = i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs));
2223+ if (ret != ARRAY_SIZE(msgs))
2224+ return -EIO;
2225+
2226+ *val = get_unaligned_be32(data_buf);
2227+
2228+ return 0;
2229+}
2230+
2231+static int hi847_write_reg(struct hi847 *hi847, u16 reg, u16 len, u32 val)
2232+{
2233+ struct i2c_client *client = v4l2_get_subdevdata(&hi847->sd);
2234+ u8 buf[6];
2235+
2236+ if (len > 4)
2237+ return -EINVAL;
2238+
2239+ put_unaligned_be16(reg, buf);
2240+ put_unaligned_be32(val << 8 * (4 - len), buf + 2);
2241+ if (i2c_master_send(client, buf, len + 2) != len + 2)
2242+ return -EIO;
2243+
2244+ return 0;
2245+}
2246+
2247+static int hi847_write_reg_list(struct hi847 *hi847,
2248+ const struct hi847_reg_list *r_list)
2249+{
2250+ struct i2c_client *client = v4l2_get_subdevdata(&hi847->sd);
2251+ unsigned int i;
2252+ int ret;
2253+
2254+ for (i = 0; i < r_list->num_of_regs; i++) {
2255+ ret = hi847_write_reg(hi847, r_list->regs[i].address,
2256+ HI847_REG_VALUE_16BIT,
2257+ r_list->regs[i].val);
2258+ if (ret) {
2259+ dev_err_ratelimited(&client->dev,
2260+ "failed to write reg 0x%4.4x. error = %d",
2261+ r_list->regs[i].address, ret);
2262+ return ret;
2263+ }
2264+ }
2265+
2266+ return 0;
2267+}
2268+
2269+static int hi847_update_digital_gain(struct hi847 *hi847, u32 d_gain)
2270+{
2271+ int ret;
2272+
2273+ ret = hi847_write_reg(hi847, HI847_REG_MWB_GR_GAIN,
2274+ HI847_REG_VALUE_16BIT, d_gain);
2275+ if (ret)
2276+ return ret;
2277+
2278+ ret = hi847_write_reg(hi847, HI847_REG_MWB_GB_GAIN,
2279+ HI847_REG_VALUE_16BIT, d_gain);
2280+ if (ret)
2281+ return ret;
2282+
2283+ ret = hi847_write_reg(hi847, HI847_REG_MWB_R_GAIN,
2284+ HI847_REG_VALUE_16BIT, d_gain);
2285+ if (ret)
2286+ return ret;
2287+
2288+ return hi847_write_reg(hi847, HI847_REG_MWB_B_GAIN,
2289+ HI847_REG_VALUE_16BIT, d_gain);
2290+}
2291+
2292+static int hi847_test_pattern(struct hi847 *hi847, u32 pattern)
2293+{
2294+ int ret;
2295+ u32 val;
2296+
2297+ if (pattern) {
2298+ ret = hi847_read_reg(hi847, HI847_REG_ISP,
2299+ HI847_REG_VALUE_16BIT, &val);
2300+ if (ret)
2301+ return ret;
2302+
2303+ ret = hi847_write_reg(hi847, HI847_REG_ISP,
2304+ HI847_REG_VALUE_16BIT,
2305+ val | HI847_REG_ISP_TPG_EN);
2306+ if (ret)
2307+ return ret;
2308+ }
2309+
2310+ ret = hi847_read_reg(hi847, HI847_REG_TEST_PATTERN,
2311+ HI847_REG_VALUE_16BIT, &val);
2312+ if (ret)
2313+ return ret;
2314+
2315+ return hi847_write_reg(hi847, HI847_REG_TEST_PATTERN,
2316+ HI847_REG_VALUE_16BIT, val | pattern << 8);
2317+}
2318+
2319+static int hi847_grbg_shift(struct hi847 *hi847)
2320+{
2321+ int ret;
2322+ int hflip, vflip;
2323+
2324+ /* regs shift for full size */
2325+ static const u32 FORMAT_X_SHIFT_1[2][2] = {
2326+ { 0x0008, 0x0007, },
2327+ { 0x0008, 0x0007, },
2328+ };
2329+
2330+ static const u32 FORMAT_Y_SHIFT_1[2][2] = {
2331+ { 0x0002, 0x0002, },
2332+ { 0x0001, 0x0001, },
2333+ };
2334+
2335+ /* regs shift for binning size */
2336+ static const u32 FORMAT_X_SHIFT_2[2][2] = {
2337+ { 0x0004, 0x0003, },
2338+ { 0x0004, 0x0003, },
2339+ };
2340+
2341+ static const u32 FORMAT_Y_SHIFT_2[2][2] = {
2342+ { 0x0002, 0x0002, },
2343+ { 0x0001, 0x0001, },
2344+ };
2345+
2346+ hflip = hi847->hflip->val;
2347+ vflip = hi847->vflip->val;
2348+
2349+ if (hi847->cur_mode->width == 3264) {
2350+ ret = hi847_write_reg(hi847, HI847_REG_FORMAT_X,
2351+ HI847_REG_VALUE_16BIT,
2352+ FORMAT_X_SHIFT_1[vflip][hflip]);
2353+ if (ret)
2354+ return ret;
2355+
2356+ return hi847_write_reg(hi847, HI847_REG_FORMAT_Y,
2357+ HI847_REG_VALUE_16BIT,
2358+ FORMAT_Y_SHIFT_1[vflip][hflip]);
2359+ } else {
2360+ ret = hi847_write_reg(hi847, HI847_REG_FORMAT_X,
2361+ HI847_REG_VALUE_16BIT,
2362+ FORMAT_X_SHIFT_2[vflip][hflip]);
2363+ if (ret)
2364+ return ret;
2365+
2366+ return hi847_write_reg(hi847, HI847_REG_FORMAT_Y,
2367+ HI847_REG_VALUE_16BIT,
2368+ FORMAT_Y_SHIFT_2[vflip][hflip]);
2369+ }
2370+}
2371+
2372+static int hi847_set_ctrl_hflip(struct hi847 *hi847, u32 ctrl_val)
2373+{
2374+ int ret;
2375+ u32 val;
2376+
2377+ ret = hi847_read_reg(hi847, HI847_REG_MIRROR_FLIP,
2378+ HI847_REG_VALUE_16BIT, &val);
2379+ if (ret)
2380+ return ret;
2381+
2382+ ret = hi847_grbg_shift(hi847);
2383+ if (ret)
2384+ return ret;
2385+
2386+ return hi847_write_reg(hi847, HI847_REG_MIRROR_FLIP,
2387+ HI847_REG_VALUE_16BIT,
2388+ ctrl_val ? val | BIT(8) : val & ~BIT(8));
2389+}
2390+
2391+static int hi847_set_ctrl_vflip(struct hi847 *hi847, u8 ctrl_val)
2392+{
2393+ int ret;
2394+ u32 val;
2395+
2396+ ret = hi847_read_reg(hi847, HI847_REG_MIRROR_FLIP,
2397+ HI847_REG_VALUE_16BIT, &val);
2398+ if (ret)
2399+ return ret;
2400+
2401+ ret = hi847_grbg_shift(hi847);
2402+ if (ret)
2403+ return ret;
2404+
2405+ return hi847_write_reg(hi847, HI847_REG_MIRROR_FLIP,
2406+ HI847_REG_VALUE_16BIT,
2407+ ctrl_val ? val | BIT(9) : val & ~BIT(9));
2408+}
2409+
2410+static int hi847_set_ctrl(struct v4l2_ctrl *ctrl)
2411+{
2412+ struct hi847 *hi847 = container_of(ctrl->handler,
2413+ struct hi847, ctrl_handler);
2414+ struct i2c_client *client = v4l2_get_subdevdata(&hi847->sd);
2415+ s64 exposure_max;
2416+ int ret = 0;
2417+
2418+ /* Propagate change of current control to all related controls */
2419+ if (ctrl->id == V4L2_CID_VBLANK) {
2420+ /* Update max exposure while meeting expected vblanking */
2421+ exposure_max = hi847->cur_mode->height + ctrl->val -
2422+ HI847_EXPOSURE_MAX_MARGIN;
2423+ __v4l2_ctrl_modify_range(hi847->exposure,
2424+ hi847->exposure->minimum,
2425+ exposure_max, hi847->exposure->step,
2426+ exposure_max);
2427+ }
2428+
2429+ /* V4L2 controls values will be applied only when power is already up */
2430+ if (!pm_runtime_get_if_in_use(&client->dev))
2431+ return 0;
2432+
2433+ switch (ctrl->id) {
2434+ case V4L2_CID_ANALOGUE_GAIN:
2435+ ret = hi847_write_reg(hi847, HI847_REG_ANALOG_GAIN,
2436+ HI847_REG_VALUE_16BIT, ctrl->val);
2437+ break;
2438+
2439+ case V4L2_CID_DIGITAL_GAIN:
2440+ ret = hi847_update_digital_gain(hi847, ctrl->val);
2441+ break;
2442+
2443+ case V4L2_CID_EXPOSURE:
2444+ ret = hi847_write_reg(hi847, HI847_REG_EXPOSURE,
2445+ HI847_REG_VALUE_16BIT, ctrl->val);
2446+ break;
2447+
2448+ case V4L2_CID_VBLANK:
2449+ /* Update FLL that meets expected vertical blanking */
2450+ ret = hi847_write_reg(hi847, HI847_REG_FLL,
2451+ HI847_REG_VALUE_16BIT,
2452+ hi847->cur_mode->height + ctrl->val);
2453+ break;
2454+
2455+ case V4L2_CID_TEST_PATTERN:
2456+ ret = hi847_test_pattern(hi847, ctrl->val);
2457+ break;
2458+
2459+ case V4L2_CID_HFLIP:
2460+ hi847_set_ctrl_hflip(hi847, ctrl->val);
2461+ break;
2462+
2463+ case V4L2_CID_VFLIP:
2464+ hi847_set_ctrl_vflip(hi847, ctrl->val);
2465+ break;
2466+
2467+ default:
2468+ ret = -EINVAL;
2469+ break;
2470+ }
2471+
2472+ pm_runtime_put(&client->dev);
2473+
2474+ return ret;
2475+}
2476+
2477+static const struct v4l2_ctrl_ops hi847_ctrl_ops = {
2478+ .s_ctrl = hi847_set_ctrl,
2479+};
2480+
2481+static int hi847_init_controls(struct hi847 *hi847)
2482+{
2483+ struct v4l2_ctrl_handler *ctrl_hdlr;
2484+ s64 exposure_max, h_blank;
2485+ int ret;
2486+
2487+ ctrl_hdlr = &hi847->ctrl_handler;
2488+ ret = v4l2_ctrl_handler_init(ctrl_hdlr, 8);
2489+ if (ret)
2490+ return ret;
2491+
2492+ ctrl_hdlr->lock = &hi847->mutex;
2493+ hi847->link_freq = v4l2_ctrl_new_int_menu(ctrl_hdlr, &hi847_ctrl_ops,
2494+ V4L2_CID_LINK_FREQ,
2495+ ARRAY_SIZE(link_freq_menu_items) - 1,
2496+ 0, link_freq_menu_items);
2497+ if (hi847->link_freq)
2498+ hi847->link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY;
2499+
2500+ hi847->pixel_rate = v4l2_ctrl_new_std
2501+ (ctrl_hdlr, &hi847_ctrl_ops,
2502+ V4L2_CID_PIXEL_RATE, 0,
2503+ to_pixel_rate(HI847_LINK_FREQ_400MHZ_INDEX),
2504+ 1,
2505+ to_pixel_rate(HI847_LINK_FREQ_400MHZ_INDEX));
2506+ hi847->vblank = v4l2_ctrl_new_std(ctrl_hdlr, &hi847_ctrl_ops,
2507+ V4L2_CID_VBLANK,
2508+ hi847->cur_mode->fll_min -
2509+ hi847->cur_mode->height,
2510+ HI847_FLL_MAX -
2511+ hi847->cur_mode->height, 1,
2512+ hi847->cur_mode->fll_def -
2513+ hi847->cur_mode->height);
2514+
2515+ h_blank = hi847->cur_mode->llp - hi847->cur_mode->width;
2516+
2517+ hi847->hblank = v4l2_ctrl_new_std(ctrl_hdlr, &hi847_ctrl_ops,
2518+ V4L2_CID_HBLANK, h_blank, h_blank, 1,
2519+ h_blank);
2520+ if (hi847->hblank)
2521+ hi847->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY;
2522+
2523+ v4l2_ctrl_new_std(ctrl_hdlr, &hi847_ctrl_ops, V4L2_CID_ANALOGUE_GAIN,
2524+ HI847_ANAL_GAIN_MIN, HI847_ANAL_GAIN_MAX,
2525+ HI847_ANAL_GAIN_STEP, HI847_ANAL_GAIN_MIN);
2526+ v4l2_ctrl_new_std(ctrl_hdlr, &hi847_ctrl_ops, V4L2_CID_DIGITAL_GAIN,
2527+ HI847_DGTL_GAIN_MIN, HI847_DGTL_GAIN_MAX,
2528+ HI847_DGTL_GAIN_STEP, HI847_DGTL_GAIN_DEFAULT);
2529+ exposure_max = hi847->cur_mode->fll_def - HI847_EXPOSURE_MAX_MARGIN;
2530+ hi847->exposure = v4l2_ctrl_new_std(ctrl_hdlr, &hi847_ctrl_ops,
2531+ V4L2_CID_EXPOSURE,
2532+ HI847_EXPOSURE_MIN, exposure_max,
2533+ HI847_EXPOSURE_STEP,
2534+ exposure_max);
2535+ v4l2_ctrl_new_std_menu_items(ctrl_hdlr, &hi847_ctrl_ops,
2536+ V4L2_CID_TEST_PATTERN,
2537+ ARRAY_SIZE(hi847_test_pattern_menu) - 1,
2538+ 0, 0, hi847_test_pattern_menu);
2539+ hi847->hflip = v4l2_ctrl_new_std(ctrl_hdlr, &hi847_ctrl_ops,
2540+ V4L2_CID_HFLIP, 0, 1, 1, 0);
2541+ hi847->vflip = v4l2_ctrl_new_std(ctrl_hdlr, &hi847_ctrl_ops,
2542+ V4L2_CID_VFLIP, 0, 1, 1, 0);
2543+
2544+ if (ctrl_hdlr->error)
2545+ return ctrl_hdlr->error;
2546+
2547+ hi847->sd.ctrl_handler = ctrl_hdlr;
2548+
2549+ return 0;
2550+}
2551+
2552+static void hi847_assign_pad_format(const struct hi847_mode *mode,
2553+ struct v4l2_mbus_framefmt *fmt)
2554+{
2555+ fmt->width = mode->width;
2556+ fmt->height = mode->height;
2557+ fmt->code = MEDIA_BUS_FMT_SGRBG10_1X10;
2558+ fmt->field = V4L2_FIELD_NONE;
2559+}
2560+
2561+static int hi847_start_streaming(struct hi847 *hi847)
2562+{
2563+ struct i2c_client *client = v4l2_get_subdevdata(&hi847->sd);
2564+ const struct hi847_reg_list *reg_list;
2565+ int link_freq_index, ret;
2566+
2567+ link_freq_index = hi847->cur_mode->link_freq_index;
2568+ reg_list = &link_freq_configs[link_freq_index].reg_list;
2569+ ret = hi847_write_reg_list(hi847, reg_list);
2570+ if (ret) {
2571+ dev_err(&client->dev, "failed to set plls");
2572+ return ret;
2573+ }
2574+
2575+ reg_list = &hi847->cur_mode->reg_list;
2576+ ret = hi847_write_reg_list(hi847, reg_list);
2577+ if (ret) {
2578+ dev_err(&client->dev, "failed to set mode");
2579+ return ret;
2580+ }
2581+
2582+ ret = __v4l2_ctrl_handler_setup(hi847->sd.ctrl_handler);
2583+ if (ret)
2584+ return ret;
2585+
2586+ ret = hi847_write_reg(hi847, HI847_REG_MODE_TG,
2587+ HI847_REG_VALUE_16BIT, HI847_REG_MODE_TG_ENABLE);
2588+
2589+ ret = hi847_write_reg(hi847, HI847_REG_MODE_SELECT,
2590+ HI847_REG_VALUE_16BIT, HI847_MODE_STREAMING);
2591+
2592+ if (ret) {
2593+ dev_err(&client->dev, "failed to set stream");
2594+ return ret;
2595+ }
2596+
2597+ return 0;
2598+}
2599+
2600+static void hi847_stop_streaming(struct hi847 *hi847)
2601+{
2602+ struct i2c_client *client = v4l2_get_subdevdata(&hi847->sd);
2603+
2604+ if (hi847_write_reg(hi847, HI847_REG_MODE_TG,
2605+ HI847_REG_VALUE_16BIT, HI847_REG_MODE_TG_DISABLE))
2606+ dev_err(&client->dev, "failed to set stream 0x%x",
2607+ HI847_REG_MODE_TG);
2608+
2609+ if (hi847_write_reg(hi847, HI847_REG_MODE_SELECT,
2610+ HI847_REG_VALUE_16BIT, HI847_MODE_STANDBY))
2611+ dev_err(&client->dev, "failed to set stream 0x%x",
2612+ HI847_REG_MODE_SELECT);
2613+}
2614+
2615+static int hi847_set_stream(struct v4l2_subdev *sd, int enable)
2616+{
2617+ struct hi847 *hi847 = to_hi847(sd);
2618+ struct i2c_client *client = v4l2_get_subdevdata(sd);
2619+ int ret = 0;
2620+
2621+ if (hi847->streaming == enable)
2622+ return 0;
2623+
2624+ mutex_lock(&hi847->mutex);
2625+ if (enable) {
2626+ ret = pm_runtime_get_sync(&client->dev);
2627+ if (ret < 0) {
2628+ pm_runtime_put_noidle(&client->dev);
2629+ mutex_unlock(&hi847->mutex);
2630+ return ret;
2631+ }
2632+
2633+ ret = hi847_start_streaming(hi847);
2634+ if (ret) {
2635+ enable = 0;
2636+ hi847_stop_streaming(hi847);
2637+ pm_runtime_put(&client->dev);
2638+ }
2639+ } else {
2640+ hi847_stop_streaming(hi847);
2641+ pm_runtime_put(&client->dev);
2642+ }
2643+
2644+ hi847->streaming = enable;
2645+ mutex_unlock(&hi847->mutex);
2646+
2647+ return ret;
2648+}
2649+
2650+static int __maybe_unused hi847_suspend(struct device *dev)
2651+{
2652+ struct i2c_client *client = to_i2c_client(dev);
2653+ struct v4l2_subdev *sd = i2c_get_clientdata(client);
2654+ struct hi847 *hi847 = to_hi847(sd);
2655+
2656+ mutex_lock(&hi847->mutex);
2657+ if (hi847->streaming)
2658+ hi847_stop_streaming(hi847);
2659+
2660+ mutex_unlock(&hi847->mutex);
2661+
2662+ return 0;
2663+}
2664+
2665+static int __maybe_unused hi847_resume(struct device *dev)
2666+{
2667+ struct i2c_client *client = to_i2c_client(dev);
2668+ struct v4l2_subdev *sd = i2c_get_clientdata(client);
2669+ struct hi847 *hi847 = to_hi847(sd);
2670+ int ret;
2671+
2672+ mutex_lock(&hi847->mutex);
2673+ if (hi847->streaming) {
2674+ ret = hi847_start_streaming(hi847);
2675+ if (ret)
2676+ goto error;
2677+ }
2678+
2679+ mutex_unlock(&hi847->mutex);
2680+
2681+ return 0;
2682+
2683+error:
2684+ hi847_stop_streaming(hi847);
2685+ hi847->streaming = 0;
2686+ mutex_unlock(&hi847->mutex);
2687+ return ret;
2688+}
2689+
2690+static int hi847_set_format(struct v4l2_subdev *sd,
2691+ struct v4l2_subdev_state *sd_state,
2692+ struct v4l2_subdev_format *fmt)
2693+{
2694+ struct hi847 *hi847 = to_hi847(sd);
2695+ const struct hi847_mode *mode;
2696+ s32 vblank_def, h_blank;
2697+
2698+ mode = v4l2_find_nearest_size(supported_modes,
2699+ ARRAY_SIZE(supported_modes), width,
2700+ height, fmt->format.width,
2701+ fmt->format.height);
2702+
2703+ mutex_lock(&hi847->mutex);
2704+ hi847_assign_pad_format(mode, &fmt->format);
2705+ if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) {
2706+ *v4l2_subdev_get_try_format(sd, sd_state, fmt->pad) =
2707+ fmt->format;
2708+ } else {
2709+ hi847->cur_mode = mode;
2710+ __v4l2_ctrl_s_ctrl(hi847->link_freq, mode->link_freq_index);
2711+ __v4l2_ctrl_s_ctrl_int64(hi847->pixel_rate,
2712+ to_pixel_rate(mode->link_freq_index));
2713+
2714+ /* Update limits and set FPS to default */
2715+ vblank_def = mode->fll_def - mode->height;
2716+ __v4l2_ctrl_modify_range(hi847->vblank,
2717+ mode->fll_min - mode->height,
2718+ HI847_FLL_MAX - mode->height, 1,
2719+ vblank_def);
2720+ __v4l2_ctrl_s_ctrl(hi847->vblank, vblank_def);
2721+
2722+ h_blank = hi847->cur_mode->llp - hi847->cur_mode->width;
2723+
2724+ __v4l2_ctrl_modify_range(hi847->hblank, h_blank, h_blank, 1,
2725+ h_blank);
2726+ }
2727+
2728+ mutex_unlock(&hi847->mutex);
2729+
2730+ return 0;
2731+}
2732+
2733+static int hi847_get_format(struct v4l2_subdev *sd,
2734+ struct v4l2_subdev_state *sd_state,
2735+ struct v4l2_subdev_format *fmt)
2736+{
2737+ struct hi847 *hi847 = to_hi847(sd);
2738+
2739+ mutex_lock(&hi847->mutex);
2740+ if (fmt->which == V4L2_SUBDEV_FORMAT_TRY)
2741+ fmt->format = *v4l2_subdev_get_try_format(&hi847->sd,
2742+ sd_state,
2743+ fmt->pad);
2744+ else
2745+ hi847_assign_pad_format(hi847->cur_mode, &fmt->format);
2746+
2747+ mutex_unlock(&hi847->mutex);
2748+
2749+ return 0;
2750+}
2751+
2752+static int hi847_enum_mbus_code(struct v4l2_subdev *sd,
2753+ struct v4l2_subdev_state *sd_state,
2754+ struct v4l2_subdev_mbus_code_enum *code)
2755+{
2756+ if (code->index > 0)
2757+ return -EINVAL;
2758+
2759+ code->code = MEDIA_BUS_FMT_SGRBG10_1X10;
2760+
2761+ return 0;
2762+}
2763+
2764+static int hi847_enum_frame_size(struct v4l2_subdev *sd,
2765+ struct v4l2_subdev_state *sd_state,
2766+ struct v4l2_subdev_frame_size_enum *fse)
2767+{
2768+ if (fse->index >= ARRAY_SIZE(supported_modes))
2769+ return -EINVAL;
2770+
2771+ if (fse->code != MEDIA_BUS_FMT_SGRBG10_1X10)
2772+ return -EINVAL;
2773+
2774+ fse->min_width = supported_modes[fse->index].width;
2775+ fse->max_width = fse->min_width;
2776+ fse->min_height = supported_modes[fse->index].height;
2777+ fse->max_height = fse->min_height;
2778+
2779+ return 0;
2780+}
2781+
2782+static int hi847_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
2783+{
2784+ struct hi847 *hi847 = to_hi847(sd);
2785+
2786+ mutex_lock(&hi847->mutex);
2787+ hi847_assign_pad_format(&supported_modes[0],
2788+ v4l2_subdev_get_try_format(sd, fh->state, 0));
2789+ mutex_unlock(&hi847->mutex);
2790+
2791+ return 0;
2792+}
2793+
2794+static const struct v4l2_subdev_video_ops hi847_video_ops = {
2795+ .s_stream = hi847_set_stream,
2796+};
2797+
2798+static const struct v4l2_subdev_pad_ops hi847_pad_ops = {
2799+ .set_fmt = hi847_set_format,
2800+ .get_fmt = hi847_get_format,
2801+ .enum_mbus_code = hi847_enum_mbus_code,
2802+ .enum_frame_size = hi847_enum_frame_size,
2803+};
2804+
2805+static const struct v4l2_subdev_ops hi847_subdev_ops = {
2806+ .video = &hi847_video_ops,
2807+ .pad = &hi847_pad_ops,
2808+};
2809+
2810+static const struct media_entity_operations hi847_subdev_entity_ops = {
2811+ .link_validate = v4l2_subdev_link_validate,
2812+};
2813+
2814+static const struct v4l2_subdev_internal_ops hi847_internal_ops = {
2815+ .open = hi847_open,
2816+};
2817+
2818+static int hi847_identify_module(struct hi847 *hi847)
2819+{
2820+ struct i2c_client *client = v4l2_get_subdevdata(&hi847->sd);
2821+ int ret;
2822+ u32 val;
2823+
2824+ ret = hi847_read_reg(hi847, HI847_REG_CHIP_ID,
2825+ HI847_REG_VALUE_16BIT, &val);
2826+ if (ret)
2827+ return ret;
2828+
2829+ if (val != HI847_CHIP_ID) {
2830+ dev_err(&client->dev, "chip id mismatch: %x!=%x",
2831+ HI847_CHIP_ID, val);
2832+ return -ENXIO;
2833+ }
2834+
2835+ return 0;
2836+}
2837+
2838+static int hi847_check_hwcfg(struct device *dev)
2839+{
2840+ struct fwnode_handle *ep;
2841+ struct fwnode_handle *fwnode = dev_fwnode(dev);
2842+ struct v4l2_fwnode_endpoint bus_cfg = {
2843+ .bus_type = V4L2_MBUS_CSI2_DPHY
2844+ };
2845+ u32 mclk;
2846+ int ret;
2847+ unsigned int i, j;
2848+
2849+ if (!fwnode)
2850+ return -ENXIO;
2851+
2852+ ret = fwnode_property_read_u32(fwnode, "clock-frequency", &mclk);
2853+ if (ret) {
2854+ dev_err(dev, "can't get clock frequency");
2855+ return ret;
2856+ }
2857+
2858+ if (mclk != HI847_MCLK) {
2859+ dev_err(dev, "external clock %d is not supported", mclk);
2860+ return -EINVAL;
2861+ }
2862+
2863+ ep = fwnode_graph_get_next_endpoint(fwnode, NULL);
2864+ if (!ep)
2865+ return -ENXIO;
2866+
2867+ ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
2868+ fwnode_handle_put(ep);
2869+ if (ret)
2870+ return ret;
2871+
2872+ if (bus_cfg.bus.mipi_csi2.num_data_lanes != HI847_DATA_LANES) {
2873+ dev_err(dev, "number of CSI2 data lanes %d is not supported",
2874+ bus_cfg.bus.mipi_csi2.num_data_lanes);
2875+ ret = -EINVAL;
2876+ goto check_hwcfg_error;
2877+ }
2878+
2879+ if (!bus_cfg.nr_of_link_frequencies) {
2880+ dev_err(dev, "no link frequencies defined");
2881+ ret = -EINVAL;
2882+ goto check_hwcfg_error;
2883+ }
2884+
2885+ for (i = 0; i < ARRAY_SIZE(link_freq_menu_items); i++) {
2886+ for (j = 0; j < bus_cfg.nr_of_link_frequencies; j++) {
2887+ if (link_freq_menu_items[i] ==
2888+ bus_cfg.link_frequencies[j])
2889+ break;
2890+ }
2891+
2892+ if (j == bus_cfg.nr_of_link_frequencies) {
2893+ dev_err(dev, "no link frequency %lld supported",
2894+ link_freq_menu_items[i]);
2895+ ret = -EINVAL;
2896+ goto check_hwcfg_error;
2897+ }
2898+ }
2899+
2900+check_hwcfg_error:
2901+ v4l2_fwnode_endpoint_free(&bus_cfg);
2902+
2903+ return ret;
2904+}
2905+
2906+static int hi847_remove(struct i2c_client *client)
2907+{
2908+ struct v4l2_subdev *sd = i2c_get_clientdata(client);
2909+ struct hi847 *hi847 = to_hi847(sd);
2910+
2911+ v4l2_async_unregister_subdev(sd);
2912+ media_entity_cleanup(&sd->entity);
2913+ v4l2_ctrl_handler_free(sd->ctrl_handler);
2914+ pm_runtime_disable(&client->dev);
2915+ mutex_destroy(&hi847->mutex);
2916+
2917+ return 0;
2918+}
2919+
2920+static int hi847_probe(struct i2c_client *client)
2921+{
2922+ struct hi847 *hi847;
2923+ int ret;
2924+
2925+ hi847 = devm_kzalloc(&client->dev, sizeof(*hi847), GFP_KERNEL);
2926+ if (!hi847)
2927+ return -ENOMEM;
2928+
2929+ ret = hi847_check_hwcfg(&client->dev);
2930+ if (ret) {
2931+ dev_err(&client->dev, "failed to get HW configuration: %d",
2932+ ret);
2933+ return ret;
2934+ }
2935+
2936+ v4l2_i2c_subdev_init(&hi847->sd, client, &hi847_subdev_ops);
2937+ ret = hi847_identify_module(hi847);
2938+ if (ret) {
2939+ dev_err(&client->dev, "failed to find sensor: %d", ret);
2940+ return ret;
2941+ }
2942+
2943+ mutex_init(&hi847->mutex);
2944+ hi847->cur_mode = &supported_modes[0];
2945+ ret = hi847_init_controls(hi847);
2946+ if (ret) {
2947+ dev_err(&client->dev, "failed to init controls: %d", ret);
2948+ goto probe_error_v4l2_ctrl_handler_free;
2949+ }
2950+
2951+ hi847->sd.internal_ops = &hi847_internal_ops;
2952+ hi847->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
2953+ hi847->sd.entity.ops = &hi847_subdev_entity_ops;
2954+ hi847->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
2955+ hi847->pad.flags = MEDIA_PAD_FL_SOURCE;
2956+ ret = media_entity_pads_init(&hi847->sd.entity, 1, &hi847->pad);
2957+ if (ret) {
2958+ dev_err(&client->dev, "failed to init entity pads: %d", ret);
2959+ goto probe_error_v4l2_ctrl_handler_free;
2960+ }
2961+
2962+ ret = v4l2_async_register_subdev_sensor(&hi847->sd);
2963+ if (ret < 0) {
2964+ dev_err(&client->dev, "failed to register V4L2 subdev: %d",
2965+ ret);
2966+ goto probe_error_media_entity_cleanup;
2967+ }
2968+
2969+ pm_runtime_set_active(&client->dev);
2970+ pm_runtime_enable(&client->dev);
2971+ pm_runtime_idle(&client->dev);
2972+
2973+ return 0;
2974+
2975+probe_error_media_entity_cleanup:
2976+ media_entity_cleanup(&hi847->sd.entity);
2977+
2978+probe_error_v4l2_ctrl_handler_free:
2979+ v4l2_ctrl_handler_free(hi847->sd.ctrl_handler);
2980+ mutex_destroy(&hi847->mutex);
2981+
2982+ return ret;
2983+}
2984+
2985+static const struct dev_pm_ops hi847_pm_ops = {
2986+ SET_SYSTEM_SLEEP_PM_OPS(hi847_suspend, hi847_resume)
2987+};
2988+
2989+#ifdef CONFIG_ACPI
2990+static const struct acpi_device_id hi847_acpi_ids[] = {
2991+ {"HYV0847"},
2992+ {}
2993+};
2994+
2995+MODULE_DEVICE_TABLE(acpi, hi847_acpi_ids);
2996+#endif
2997+
2998+static struct i2c_driver hi847_i2c_driver = {
2999+ .driver = {
3000+ .name = "hi847",
3001+ .pm = &hi847_pm_ops,
3002+ .acpi_match_table = ACPI_PTR(hi847_acpi_ids),
3003+ },
3004+ .probe_new = hi847_probe,
3005+ .remove = hi847_remove,
3006+};
3007+
3008+module_i2c_driver(hi847_i2c_driver);
3009+
3010+MODULE_AUTHOR("Shawn Tu <shawnx.tu@intel.com>");
3011+MODULE_DESCRIPTION("Hynix HI847 sensor driver");
3012+MODULE_LICENSE("GPL v2");
drivers/media/i2c/imx274.c+0−2
@@ -11,13 +11,11 @@ · 10 unmodified lines
1111
1212 #include <linux/clk.h>
1313 #include <linux/delay.h>
14−#include <linux/gpio.h>
1514 #include <linux/gpio/consumer.h>
1615 #include <linux/i2c.h>
1716 #include <linux/init.h>
1817 #include <linux/kernel.h>
1918 #include <linux/module.h>
20−#include <linux/of_gpio.h>
2119 #include <linux/pm_runtime.h>
2220 #include <linux/regmap.h>
2321 #include <linux/regulator/consumer.h>
drivers/media/i2c/isl7998x.c+1628−0
@@ -0,0 +1,1628 @@
1+// SPDX-License-Identifier: GPL-2.0
2+/*
3+ * Intersil ISL7998x analog to MIPI CSI-2 or BT.656 decoder driver.
4+ *
5+ * Copyright (C) 2018-2019 Marek Vasut <marex@denx.de>
6+ * Copyright (C) 2021 Michael Tretter <kernel@pengutronix.de>
7+ */
8+
9+#include <linux/bitfield.h>
10+#include <linux/delay.h>
11+#include <linux/gpio.h>
12+#include <linux/i2c.h>
13+#include <linux/module.h>
14+#include <linux/of_graph.h>
15+#include <linux/pm_runtime.h>
16+#include <linux/regmap.h>
17+#include <linux/slab.h>
18+#include <linux/v4l2-mediabus.h>
19+#include <linux/videodev2.h>
20+
21+#include <media/v4l2-async.h>
22+#include <media/v4l2-common.h>
23+#include <media/v4l2-ctrls.h>
24+#include <media/v4l2-device.h>
25+#include <media/v4l2-fwnode.h>
26+#include <media/v4l2-ioctl.h>
27+
28+/*
29+ * This control allows to activate and deactivate the test pattern on
30+ * selected output channels.
31+ * This value is ISL7998x specific.
32+ */
33+#define V4L2_CID_TEST_PATTERN_CHANNELS (V4L2_CID_USER_ISL7998X_BASE + 0)
34+
35+/*
36+ * This control allows to specify the color of the test pattern.
37+ * This value is ISL7998x specific.
38+ */
39+#define V4L2_CID_TEST_PATTERN_COLOR (V4L2_CID_USER_ISL7998X_BASE + 1)
40+
41+/*
42+ * This control allows to specify the bar pattern in the test pattern.
43+ * This value is ISL7998x specific.
44+ */
45+#define V4L2_CID_TEST_PATTERN_BARS (V4L2_CID_USER_ISL7998X_BASE + 2)
46+
47+#define ISL7998X_INPUTS 4
48+
49+#define ISL7998X_REG(page, reg) (((page) << 8) | (reg))
50+
51+#define ISL7998X_REG_PN_SIZE 256
52+#define ISL7998X_REG_PN_BASE(n) ((n) * ISL7998X_REG_PN_SIZE)
53+
54+#define ISL7998X_REG_PX_DEC_PAGE(page) ISL7998X_REG((page), 0xff)
55+#define ISL7998X_REG_PX_DEC_PAGE_MASK 0xf
56+#define ISL7998X_REG_P0_PRODUCT_ID_CODE ISL7998X_REG(0, 0x00)
57+#define ISL7998X_REG_P0_PRODUCT_REV_CODE ISL7998X_REG(0, 0x01)
58+#define ISL7998X_REG_P0_SW_RESET_CTL ISL7998X_REG(0, 0x02)
59+#define ISL7998X_REG_P0_IO_BUFFER_CTL ISL7998X_REG(0, 0x03)
60+#define ISL7998X_REG_P0_IO_BUFFER_CTL_1_1 ISL7998X_REG(0, 0x04)
61+#define ISL7998X_REG_P0_IO_PAD_PULL_EN_CTL ISL7998X_REG(0, 0x05)
62+#define ISL7998X_REG_P0_IO_BUFFER_CTL_1_2 ISL7998X_REG(0, 0x06)
63+#define ISL7998X_REG_P0_VIDEO_IN_CHAN_CTL ISL7998X_REG(0, 0x07)
64+#define ISL7998X_REG_P0_CLK_CTL_1 ISL7998X_REG(0, 0x08)
65+#define ISL7998X_REG_P0_CLK_CTL_2 ISL7998X_REG(0, 0x09)
66+#define ISL7998X_REG_P0_CLK_CTL_3 ISL7998X_REG(0, 0x0a)
67+#define ISL7998X_REG_P0_CLK_CTL_4 ISL7998X_REG(0, 0x0b)
68+#define ISL7998X_REG_P0_MPP1_SYNC_CTL ISL7998X_REG(0, 0x0c)
69+#define ISL7998X_REG_P0_MPP2_SYNC_CTL ISL7998X_REG(0, 0x0d)
70+#define ISL7998X_REG_P0_IRQ_SYNC_CTL ISL7998X_REG(0, 0x0e)
71+#define ISL7998X_REG_P0_INTERRUPT_STATUS ISL7998X_REG(0, 0x10)
72+#define ISL7998X_REG_P0_CHAN_1_IRQ ISL7998X_REG(0, 0x11)
73+#define ISL7998X_REG_P0_CHAN_2_IRQ ISL7998X_REG(0, 0x12)
74+#define ISL7998X_REG_P0_CHAN_3_IRQ ISL7998X_REG(0, 0x13)
75+#define ISL7998X_REG_P0_CHAN_4_IRQ ISL7998X_REG(0, 0x14)
76+#define ISL7998X_REG_P0_SHORT_DIAG_IRQ ISL7998X_REG(0, 0x15)
77+#define ISL7998X_REG_P0_CHAN_1_IRQ_EN ISL7998X_REG(0, 0x16)
78+#define ISL7998X_REG_P0_CHAN_2_IRQ_EN ISL7998X_REG(0, 0x17)
79+#define ISL7998X_REG_P0_CHAN_3_IRQ_EN ISL7998X_REG(0, 0x18)
80+#define ISL7998X_REG_P0_CHAN_4_IRQ_EN ISL7998X_REG(0, 0x19)
81+#define ISL7998X_REG_P0_SHORT_DIAG_IRQ_EN ISL7998X_REG(0, 0x1a)
82+#define ISL7998X_REG_P0_CHAN_1_STATUS ISL7998X_REG(0, 0x1b)
83+#define ISL7998X_REG_P0_CHAN_2_STATUS ISL7998X_REG(0, 0x1c)
84+#define ISL7998X_REG_P0_CHAN_3_STATUS ISL7998X_REG(0, 0x1d)
85+#define ISL7998X_REG_P0_CHAN_4_STATUS ISL7998X_REG(0, 0x1e)
86+#define ISL7998X_REG_P0_SHORT_DIAG_STATUS ISL7998X_REG(0, 0x1f)
87+#define ISL7998X_REG_P0_CLOCK_DELAY ISL7998X_REG(0, 0x20)
88+
89+#define ISL7998X_REG_PX_DEC_INPUT_FMT(pg) ISL7998X_REG((pg), 0x02)
90+#define ISL7998X_REG_PX_DEC_STATUS_1(pg) ISL7998X_REG((pg), 0x03)
91+#define ISL7998X_REG_PX_DEC_STATUS_1_VDLOSS BIT(7)
92+#define ISL7998X_REG_PX_DEC_STATUS_1_HLOCK BIT(6)
93+#define ISL7998X_REG_PX_DEC_STATUS_1_VLOCK BIT(3)
94+#define ISL7998X_REG_PX_DEC_HS_DELAY_CTL(pg) ISL7998X_REG((pg), 0x04)
95+#define ISL7998X_REG_PX_DEC_ANCTL(pg) ISL7998X_REG((pg), 0x06)
96+#define ISL7998X_REG_PX_DEC_CROP_HI(pg) ISL7998X_REG((pg), 0x07)
97+#define ISL7998X_REG_PX_DEC_VDELAY_LO(pg) ISL7998X_REG((pg), 0x08)
98+#define ISL7998X_REG_PX_DEC_VACTIVE_LO(pg) ISL7998X_REG((pg), 0x09)
99+#define ISL7998X_REG_PX_DEC_HDELAY_LO(pg) ISL7998X_REG((pg), 0x0a)
100+#define ISL7998X_REG_PX_DEC_HACTIVE_LO(pg) ISL7998X_REG((pg), 0x0b)
101+#define ISL7998X_REG_PX_DEC_CNTRL1(pg) ISL7998X_REG((pg), 0x0c)
102+#define ISL7998X_REG_PX_DEC_CSC_CTL(pg) ISL7998X_REG((pg), 0x0d)
103+#define ISL7998X_REG_PX_DEC_BRIGHT(pg) ISL7998X_REG((pg), 0x10)
104+#define ISL7998X_REG_PX_DEC_CONTRAST(pg) ISL7998X_REG((pg), 0x11)
105+#define ISL7998X_REG_PX_DEC_SHARPNESS(pg) ISL7998X_REG((pg), 0x12)
106+#define ISL7998X_REG_PX_DEC_SAT_U(pg) ISL7998X_REG((pg), 0x13)
107+#define ISL7998X_REG_PX_DEC_SAT_V(pg) ISL7998X_REG((pg), 0x14)
108+#define ISL7998X_REG_PX_DEC_HUE(pg) ISL7998X_REG((pg), 0x15)
109+#define ISL7998X_REG_PX_DEC_VERT_PEAK(pg) ISL7998X_REG((pg), 0x17)
110+#define ISL7998X_REG_PX_DEC_CORING(pg) ISL7998X_REG((pg), 0x18)
111+#define ISL7998X_REG_PX_DEC_SDT(pg) ISL7998X_REG((pg), 0x1c)
112+#define ISL7998X_REG_PX_DEC_SDT_DET BIT(7)
113+#define ISL7998X_REG_PX_DEC_SDT_NOW GENMASK(6, 4)
114+#define ISL7998X_REG_PX_DEC_SDT_STANDARD GENMASK(2, 0)
115+#define ISL7998X_REG_PX_DEC_SDT_STANDARD_NTSC_M 0
116+#define ISL7998X_REG_PX_DEC_SDT_STANDARD_PAL 1
117+#define ISL7998X_REG_PX_DEC_SDT_STANDARD_SECAM 2
118+#define ISL7998X_REG_PX_DEC_SDT_STANDARD_NTSC_443 3
119+#define ISL7998X_REG_PX_DEC_SDT_STANDARD_PAL_M 4
120+#define ISL7998X_REG_PX_DEC_SDT_STANDARD_PAL_CN 5
121+#define ISL7998X_REG_PX_DEC_SDT_STANDARD_PAL_60 6
122+#define ISL7998X_REG_PX_DEC_SDT_STANDARD_UNKNOWN 7
123+#define ISL7998X_REG_PX_DEC_SDTR(pg) ISL7998X_REG((pg), 0x1d)
124+#define ISL7998X_REG_PX_DEC_SDTR_ATSTART BIT(7)
125+#define ISL7998X_REG_PX_DEC_CLMPG(pg) ISL7998X_REG((pg), 0x20)
126+#define ISL7998X_REG_PX_DEC_IAGC(pg) ISL7998X_REG((pg), 0x21)
127+#define ISL7998X_REG_PX_DEC_AGCGAIN(pg) ISL7998X_REG((pg), 0x22)
128+#define ISL7998X_REG_PX_DEC_PEAKWT(pg) ISL7998X_REG((pg), 0x23)
129+#define ISL7998X_REG_PX_DEC_CLMPL(pg) ISL7998X_REG((pg), 0x24)
130+#define ISL7998X_REG_PX_DEC_SYNCT(pg) ISL7998X_REG((pg), 0x25)
131+#define ISL7998X_REG_PX_DEC_MISSCNT(pg) ISL7998X_REG((pg), 0x26)
132+#define ISL7998X_REG_PX_DEC_PCLAMP(pg) ISL7998X_REG((pg), 0x27)
133+#define ISL7998X_REG_PX_DEC_VERT_CTL_1(pg) ISL7998X_REG((pg), 0x28)
134+#define ISL7998X_REG_PX_DEC_VERT_CTL_2(pg) ISL7998X_REG((pg), 0x29)
135+#define ISL7998X_REG_PX_DEC_CLR_KILL_LVL(pg) ISL7998X_REG((pg), 0x2a)
136+#define ISL7998X_REG_PX_DEC_COMB_FILTER_CTL(pg) ISL7998X_REG((pg), 0x2b)
137+#define ISL7998X_REG_PX_DEC_LUMA_DELAY(pg) ISL7998X_REG((pg), 0x2c)
138+#define ISL7998X_REG_PX_DEC_MISC1(pg) ISL7998X_REG((pg), 0x2d)
139+#define ISL7998X_REG_PX_DEC_MISC2(pg) ISL7998X_REG((pg), 0x2e)
140+#define ISL7998X_REG_PX_DEC_MISC3(pg) ISL7998X_REG((pg), 0x2f)
141+#define ISL7998X_REG_PX_DEC_MVSN(pg) ISL7998X_REG((pg), 0x30)
142+#define ISL7998X_REG_PX_DEC_CSTATUS2(pg) ISL7998X_REG((pg), 0x31)
143+#define ISL7998X_REG_PX_DEC_HFREF(pg) ISL7998X_REG((pg), 0x32)
144+#define ISL7998X_REG_PX_DEC_CLMD(pg) ISL7998X_REG((pg), 0x33)
145+#define ISL7998X_REG_PX_DEC_ID_DET_CTL(pg) ISL7998X_REG((pg), 0x34)
146+#define ISL7998X_REG_PX_DEC_CLCNTL(pg) ISL7998X_REG((pg), 0x35)
147+#define ISL7998X_REG_PX_DEC_DIFF_CLMP_CTL_1(pg) ISL7998X_REG((pg), 0x36)
148+#define ISL7998X_REG_PX_DEC_DIFF_CLMP_CTL_2(pg) ISL7998X_REG((pg), 0x37)
149+#define ISL7998X_REG_PX_DEC_DIFF_CLMP_CTL_3(pg) ISL7998X_REG((pg), 0x38)
150+#define ISL7998X_REG_PX_DEC_DIFF_CLMP_CTL_4(pg) ISL7998X_REG((pg), 0x39)
151+#define ISL7998X_REG_PX_DEC_SHORT_DET_CTL(pg) ISL7998X_REG((pg), 0x3a)
152+#define ISL7998X_REG_PX_DEC_SHORT_DET_CTL_1(pg) ISL7998X_REG((pg), 0x3b)
153+#define ISL7998X_REG_PX_DEC_AFE_TST_MUX_CTL(pg) ISL7998X_REG((pg), 0x3c)
154+#define ISL7998X_REG_PX_DEC_DATA_CONV(pg) ISL7998X_REG((pg), 0x3d)
155+#define ISL7998X_REG_PX_DEC_INTERNAL_TEST(pg) ISL7998X_REG((pg), 0x3f)
156+#define ISL7998X_REG_PX_DEC_H_DELAY_CTL(pg) ISL7998X_REG((pg), 0x43)
157+#define ISL7998X_REG_PX_DEC_H_DELAY_II_HI(pg) ISL7998X_REG((pg), 0x44)
158+#define ISL7998X_REG_PX_DEC_H_DELAY_II_LOW(pg) ISL7998X_REG((pg), 0x45)
159+
160+#define ISL7998X_REG_PX_ACA_CTL_1(pg) ISL7998X_REG((pg), 0x80)
161+#define ISL7998X_REG_PX_ACA_GAIN_CTL(pg) ISL7998X_REG((pg), 0x81)
162+#define ISL7998X_REG_PX_ACA_Y_AVG_HI_LIMIT(pg) ISL7998X_REG((pg), 0x82)
163+#define ISL7998X_REG_PX_ACA_Y_AVG_LO_LIMIT(pg) ISL7998X_REG((pg), 0x83)
164+#define ISL7998X_REG_PX_ACA_Y_DET_THRESHOLD(pg) ISL7998X_REG((pg), 0x84)
165+#define ISL7998X_REG_PX_ACA_BLACK_LVL(pg) ISL7998X_REG((pg), 0x85)
166+#define ISL7998X_REG_PX_ACA_CENTER_LVL(pg) ISL7998X_REG((pg), 0x86)
167+#define ISL7998X_REG_PX_ACA_WHITE_LVL(pg) ISL7998X_REG((pg), 0x87)
168+#define ISL7998X_REG_PX_ACA_MEAN_OFF_LIMIT(pg) ISL7998X_REG((pg), 0x88)
169+#define ISL7998X_REG_PX_ACA_MEAN_OFF_UPGAIN(pg) ISL7998X_REG((pg), 0x89)
170+#define ISL7998X_REG_PX_ACA_MEAN_OFF_SLOPE(pg) ISL7998X_REG((pg), 0x8a)
171+#define ISL7998X_REG_PX_ACA_MEAN_OFF_DNGAIN(pg) ISL7998X_REG((pg), 0x8b)
172+#define ISL7998X_REG_PX_ACA_DELTA_CO_THRES(pg) ISL7998X_REG((pg), 0x8c)
173+#define ISL7998X_REG_PX_ACA_DELTA_SLOPE(pg) ISL7998X_REG((pg), 0x8d)
174+#define ISL7998X_REG_PX_ACA_LO_HI_AVG_THRES(pg) ISL7998X_REG((pg), 0x8e)
175+#define ISL7998X_REG_PX_ACA_LO_MAX_LVL_CTL(pg) ISL7998X_REG((pg), 0x8f)
176+#define ISL7998X_REG_PX_ACA_HI_MAX_LVL_CTL(pg) ISL7998X_REG((pg), 0x90)
177+#define ISL7998X_REG_PX_ACA_LO_UPGAIN_CTL(pg) ISL7998X_REG((pg), 0x91)
178+#define ISL7998X_REG_PX_ACA_LO_DNGAIN_CTL(pg) ISL7998X_REG((pg), 0x92)
179+#define ISL7998X_REG_PX_ACA_HI_UPGAIN_CTL(pg) ISL7998X_REG((pg), 0x93)
180+#define ISL7998X_REG_PX_ACA_HI_DNGAIN_CTL(pg) ISL7998X_REG((pg), 0x94)
181+#define ISL7998X_REG_PX_ACA_LOPASS_FLT_COEF(pg) ISL7998X_REG((pg), 0x95)
182+#define ISL7998X_REG_PX_ACA_PDF_INDEX(pg) ISL7998X_REG((pg), 0x96)
183+#define ISL7998X_REG_PX_ACA_HIST_WIN_H_STT(pg) ISL7998X_REG((pg), 0x97)
184+#define ISL7998X_REG_PX_ACA_HIST_WIN_H_SZ1(pg) ISL7998X_REG((pg), 0x98)
185+#define ISL7998X_REG_PX_ACA_HIST_WIN_H_SZ2(pg) ISL7998X_REG((pg), 0x99)
186+#define ISL7998X_REG_PX_ACA_HIST_WIN_V_STT(pg) ISL7998X_REG((pg), 0x9a)
187+#define ISL7998X_REG_PX_ACA_HIST_WIN_V_SZ1(pg) ISL7998X_REG((pg), 0x9b)
188+#define ISL7998X_REG_PX_ACA_HIST_WIN_V_SZ2(pg) ISL7998X_REG((pg), 0x9c)
189+#define ISL7998X_REG_PX_ACA_Y_AVG(pg) ISL7998X_REG((pg), 0xa0)
190+#define ISL7998X_REG_PX_ACA_Y_AVG_LIM(pg) ISL7998X_REG((pg), 0xa1)
191+#define ISL7998X_REG_PX_ACA_LO_AVG(pg) ISL7998X_REG((pg), 0xa2)
192+#define ISL7998X_REG_PX_ACA_HI_AVG(pg) ISL7998X_REG((pg), 0xa3)
193+#define ISL7998X_REG_PX_ACA_Y_MAX(pg) ISL7998X_REG((pg), 0xa4)
194+#define ISL7998X_REG_PX_ACA_Y_MIN(pg) ISL7998X_REG((pg), 0xa5)
195+#define ISL7998X_REG_PX_ACA_MOFFSET(pg) ISL7998X_REG((pg), 0xa6)
196+#define ISL7998X_REG_PX_ACA_LO_GAIN(pg) ISL7998X_REG((pg), 0xa7)
197+#define ISL7998X_REG_PX_ACA_HI_GAIN(pg) ISL7998X_REG((pg), 0xa8)
198+#define ISL7998X_REG_PX_ACA_LL_SLOPE(pg) ISL7998X_REG((pg), 0xa9)
199+#define ISL7998X_REG_PX_ACA_LH_SLOPE(pg) ISL7998X_REG((pg), 0xaa)
200+#define ISL7998X_REG_PX_ACA_HL_SLOPE(pg) ISL7998X_REG((pg), 0xab)
201+#define ISL7998X_REG_PX_ACA_HH_SLOPE(pg) ISL7998X_REG((pg), 0xac)
202+#define ISL7998X_REG_PX_ACA_X_LOW(pg) ISL7998X_REG((pg), 0xad)
203+#define ISL7998X_REG_PX_ACA_X_MEAN(pg) ISL7998X_REG((pg), 0xae)
204+#define ISL7998X_REG_PX_ACA_X_HIGH(pg) ISL7998X_REG((pg), 0xaf)
205+#define ISL7998X_REG_PX_ACA_Y_LOW(pg) ISL7998X_REG((pg), 0xb0)
206+#define ISL7998X_REG_PX_ACA_Y_MEAN(pg) ISL7998X_REG((pg), 0xb1)
207+#define ISL7998X_REG_PX_ACA_Y_HIGH(pg) ISL7998X_REG((pg), 0xb2)
208+#define ISL7998X_REG_PX_ACA_CTL_2(pg) ISL7998X_REG((pg), 0xb3)
209+#define ISL7998X_REG_PX_ACA_CTL_3(pg) ISL7998X_REG((pg), 0xb4)
210+#define ISL7998X_REG_PX_ACA_CTL_4(pg) ISL7998X_REG((pg), 0xb5)
211+#define ISL7998X_REG_PX_ACA_FLEX_WIN_HIST(pg) ISL7998X_REG((pg), 0xc0)
212+#define ISL7998X_REG_PX_ACA_FLEX_WIN_X_TL_H(pg) ISL7998X_REG((pg), 0xc1)
213+#define ISL7998X_REG_PX_ACA_FLEX_WIN_X_TL_L(pg) ISL7998X_REG((pg), 0xc2)
214+#define ISL7998X_REG_PX_ACA_FLEX_WIN_Y_TL_H(pg) ISL7998X_REG((pg), 0xc3)
215+#define ISL7998X_REG_PX_ACA_FLEX_WIN_Y_TL_L(pg) ISL7998X_REG((pg), 0xc4)
216+#define ISL7998X_REG_PX_ACA_FLEX_WIN_X_TR_H(pg) ISL7998X_REG((pg), 0xc5)
217+#define ISL7998X_REG_PX_ACA_FLEX_WIN_X_TR_L(pg) ISL7998X_REG((pg), 0xc6)
218+#define ISL7998X_REG_PX_ACA_FLEX_WIN_Y_TR_H(pg) ISL7998X_REG((pg), 0xc7)
219+#define ISL7998X_REG_PX_ACA_FLEX_WIN_Y_TR_L(pg) ISL7998X_REG((pg), 0xc8)
220+#define ISL7998X_REG_PX_ACA_FLEX_WIN_X_BL_H(pg) ISL7998X_REG((pg), 0xc9)
221+#define ISL7998X_REG_PX_ACA_FLEX_WIN_X_BL_L(pg) ISL7998X_REG((pg), 0xca)
222+#define ISL7998X_REG_PX_ACA_FLEX_WIN_Y_BL_H(pg) ISL7998X_REG((pg), 0xcb)
223+#define ISL7998X_REG_PX_ACA_FLEX_WIN_Y_BL_L(pg) ISL7998X_REG((pg), 0xcc)
224+#define ISL7998X_REG_PX_ACA_FLEX_WIN_X_BR_H(pg) ISL7998X_REG((pg), 0xcd)
225+#define ISL7998X_REG_PX_ACA_FLEX_WIN_X_BR_L(pg) ISL7998X_REG((pg), 0xce)
226+#define ISL7998X_REG_PX_ACA_FLEX_WIN_Y_BR_H(pg) ISL7998X_REG((pg), 0xcf)
227+#define ISL7998X_REG_PX_ACA_FLEX_WIN_Y_BR_L(pg) ISL7998X_REG((pg), 0xd0)
228+#define ISL7998X_REG_PX_ACA_FLEX_WIN_X_LM_H(pg) ISL7998X_REG((pg), 0xd1)
229+#define ISL7998X_REG_PX_ACA_FLEX_WIN_X_LM_L(pg) ISL7998X_REG((pg), 0xd2)
230+#define ISL7998X_REG_PX_ACA_FLEX_WIN_Y_LM_H(pg) ISL7998X_REG((pg), 0xd3)
231+#define ISL7998X_REG_PX_ACA_FLEX_WIN_Y_LM_L(pg) ISL7998X_REG((pg), 0xd4)
232+#define ISL7998X_REG_PX_ACA_FLEX_WIN_X_TM_H(pg) ISL7998X_REG((pg), 0xd5)
233+#define ISL7998X_REG_PX_ACA_FLEX_WIN_X_TM_L(pg) ISL7998X_REG((pg), 0xd6)
234+#define ISL7998X_REG_PX_ACA_FLEX_WIN_Y_TM_H(pg) ISL7998X_REG((pg), 0xd7)
235+#define ISL7998X_REG_PX_ACA_FLEX_WIN_Y_TM_L(pg) ISL7998X_REG((pg), 0xd8)
236+#define ISL7998X_REG_PX_ACA_FLEX_WIN_X_BM_H(pg) ISL7998X_REG((pg), 0xd9)
237+#define ISL7998X_REG_PX_ACA_FLEX_WIN_X_BM_L(pg) ISL7998X_REG((pg), 0xda)
238+#define ISL7998X_REG_PX_ACA_FLEX_WIN_Y_BM_H(pg) ISL7998X_REG((pg), 0xdb)
239+#define ISL7998X_REG_PX_ACA_FLEX_WIN_Y_BM_L(pg) ISL7998X_REG((pg), 0xdc)
240+#define ISL7998X_REG_PX_ACA_FLEX_WIN_X_RM_H(pg) ISL7998X_REG((pg), 0xdd)
241+#define ISL7998X_REG_PX_ACA_FLEX_WIN_X_RM_L(pg) ISL7998X_REG((pg), 0xde)
242+#define ISL7998X_REG_PX_ACA_FLEX_WIN_Y_RM_H(pg) ISL7998X_REG((pg), 0xdf)
243+#define ISL7998X_REG_PX_ACA_FLEX_WIN_Y_RM_L(pg) ISL7998X_REG((pg), 0xe0)
244+#define ISL7998X_REG_PX_ACA_HIST_DATA_LO(pg) ISL7998X_REG((pg), 0xe1)
245+#define ISL7998X_REG_PX_ACA_HIST_DATA_MID(pg) ISL7998X_REG((pg), 0xe2)
246+#define ISL7998X_REG_PX_ACA_HIST_DATA_HI(pg) ISL7998X_REG((pg), 0xe3)
247+#define ISL7998X_REG_PX_ACA_FLEX_WIN_Y_CLR(pg) ISL7998X_REG((pg), 0xe4)
248+#define ISL7998X_REG_PX_ACA_FLEX_WIN_CB_CLR(pg) ISL7998X_REG((pg), 0xe5)
249+#define ISL7998X_REG_PX_ACA_FLEX_WIN_CR_CLR(pg) ISL7998X_REG((pg), 0xe6)
250+#define ISL7998X_REG_PX_ACA_XFER_HIST_HOST(pg) ISL7998X_REG((pg), 0xe7)
251+
252+#define ISL7998X_REG_P5_LI_ENGINE_CTL ISL7998X_REG(5, 0x00)
253+#define ISL7998X_REG_P5_LI_ENGINE_LINE_CTL ISL7998X_REG(5, 0x01)
254+#define ISL7998X_REG_P5_LI_ENGINE_PIC_WIDTH ISL7998X_REG(5, 0x02)
255+#define ISL7998X_REG_P5_LI_ENGINE_SYNC_CTL ISL7998X_REG(5, 0x03)
256+#define ISL7998X_REG_P5_LI_ENGINE_VC_ASSIGNMENT ISL7998X_REG(5, 0x04)
257+#define ISL7998X_REG_P5_LI_ENGINE_TYPE_CTL ISL7998X_REG(5, 0x05)
258+#define ISL7998X_REG_P5_LI_ENGINE_FIFO_CTL ISL7998X_REG(5, 0x06)
259+#define ISL7998X_REG_P5_MIPI_READ_START_CTL ISL7998X_REG(5, 0x07)
260+#define ISL7998X_REG_P5_PSEUDO_FRM_FIELD_CTL ISL7998X_REG(5, 0x08)
261+#define ISL7998X_REG_P5_ONE_FIELD_MODE_CTL ISL7998X_REG(5, 0x09)
262+#define ISL7998X_REG_P5_MIPI_INT_HW_TST_CTR ISL7998X_REG(5, 0x0a)
263+#define ISL7998X_REG_P5_TP_GEN_BAR_PATTERN ISL7998X_REG(5, 0x0b)
264+#define ISL7998X_REG_P5_MIPI_PCNT_PSFRM ISL7998X_REG(5, 0x0c)
265+#define ISL7998X_REG_P5_LI_ENGINE_TP_GEN_CTL ISL7998X_REG(5, 0x0d)
266+#define ISL7998X_REG_P5_MIPI_VBLANK_PSFRM ISL7998X_REG(5, 0x0e)
267+#define ISL7998X_REG_P5_LI_ENGINE_CTL_2 ISL7998X_REG(5, 0x0f)
268+#define ISL7998X_REG_P5_MIPI_WCNT_1 ISL7998X_REG(5, 0x10)
269+#define ISL7998X_REG_P5_MIPI_WCNT_2 ISL7998X_REG(5, 0x11)
270+#define ISL7998X_REG_P5_MIPI_DPHY_TIMING_CTL_1 ISL7998X_REG(5, 0x12)
271+#define ISL7998X_REG_P5_MIPI_DPHY_TIMING_CTL_2 ISL7998X_REG(5, 0x13)
272+#define ISL7998X_REG_P5_MIPI_DPHY_TIMING_CTL_3 ISL7998X_REG(5, 0x14)
273+#define ISL7998X_REG_P5_MIPI_DPHY_TIMING_CTL_4 ISL7998X_REG(5, 0x15)
274+#define ISL7998X_REG_P5_MIPI_DPHY_TIMING_CTL_5 ISL7998X_REG(5, 0x16)
275+#define ISL7998X_REG_P5_MIPI_DPHY_TIMING_CTL_6 ISL7998X_REG(5, 0x17)
276+#define ISL7998X_REG_P5_MIPI_DPHY_PARAMS_1 ISL7998X_REG(5, 0x18)
277+#define ISL7998X_REG_P5_MIPI_DPHY_SOT_PERIOD ISL7998X_REG(5, 0x19)
278+#define ISL7998X_REG_P5_MIPI_DPHY_EOT_PERIOD ISL7998X_REG(5, 0x1a)
279+#define ISL7998X_REG_P5_MIPI_DPHY_PARAMS_2 ISL7998X_REG(5, 0x1b)
280+#define ISL7998X_REG_P5_MIPI_DPHY_TIMING_CTL_7 ISL7998X_REG(5, 0x1c)
281+#define ISL7998X_REG_P5_MIPI_DPHY_TIMING_CTL_8 ISL7998X_REG(5, 0x1d)
282+#define ISL7998X_REG_P5_MIPI_DPHY_TIMING_CTL_9 ISL7998X_REG(5, 0x1e)
283+#define ISL7998X_REG_P5_MIPI_DPHY_TIMING_CTL_10 ISL7998X_REG(5, 0x1f)
284+#define ISL7998X_REG_P5_TP_GEN_MIPI ISL7998X_REG(5, 0x20)
285+#define ISL7998X_REG_P5_ESC_MODE_TIME_CTL ISL7998X_REG(5, 0x21)
286+#define ISL7998X_REG_P5_AUTO_TEST_ERR_DET ISL7998X_REG(5, 0x22)
287+#define ISL7998X_REG_P5_MIPI_TIMING ISL7998X_REG(5, 0x23)
288+#define ISL7998X_REG_P5_PIC_HEIGHT_HIGH ISL7998X_REG(5, 0x24)
289+#define ISL7998X_REG_P5_PIC_HEIGHT_LOW ISL7998X_REG(5, 0x25)
290+#define ISL7998X_REG_P5_MIPI_SP_HS_TRL_CTL ISL7998X_REG(5, 0x26)
291+#define ISL7998X_REG_P5_FIFO_THRSH_CNT_1 ISL7998X_REG(5, 0x28)
292+#define ISL7998X_REG_P5_FIFO_THRSH_CNT_2 ISL7998X_REG(5, 0x29)
293+#define ISL7998X_REG_P5_TP_GEN_RND_SYNC_CTL_1 ISL7998X_REG(5, 0x2a)
294+#define ISL7998X_REG_P5_TP_GEN_RND_SYNC_CTL_2 ISL7998X_REG(5, 0x2b)
295+#define ISL7998X_REG_P5_PSF_FIELD_END_CTL_1 ISL7998X_REG(5, 0x2c)
296+#define ISL7998X_REG_P5_PSF_FIELD_END_CTL_2 ISL7998X_REG(5, 0x2d)
297+#define ISL7998X_REG_P5_PSF_FIELD_END_CTL_3 ISL7998X_REG(5, 0x2e)
298+#define ISL7998X_REG_P5_PSF_FIELD_END_CTL_4 ISL7998X_REG(5, 0x2f)
299+#define ISL7998X_REG_P5_MIPI_ANA_DATA_CTL_1 ISL7998X_REG(5, 0x30)
300+#define ISL7998X_REG_P5_MIPI_ANA_DATA_CTL_2 ISL7998X_REG(5, 0x31)
301+#define ISL7998X_REG_P5_MIPI_ANA_CLK_CTL ISL7998X_REG(5, 0x32)
302+#define ISL7998X_REG_P5_PLL_ANA_STATUS ISL7998X_REG(5, 0x33)
303+#define ISL7998X_REG_P5_PLL_ANA_MISC_CTL ISL7998X_REG(5, 0x34)
304+#define ISL7998X_REG_P5_MIPI_ANA ISL7998X_REG(5, 0x35)
305+#define ISL7998X_REG_P5_PLL_ANA ISL7998X_REG(5, 0x36)
306+#define ISL7998X_REG_P5_TOTAL_PF_LINE_CNT_1 ISL7998X_REG(5, 0x38)
307+#define ISL7998X_REG_P5_TOTAL_PF_LINE_CNT_2 ISL7998X_REG(5, 0x39)
308+#define ISL7998X_REG_P5_H_LINE_CNT_1 ISL7998X_REG(5, 0x3a)
309+#define ISL7998X_REG_P5_H_LINE_CNT_2 ISL7998X_REG(5, 0x3b)
310+#define ISL7998X_REG_P5_HIST_LINE_CNT_1 ISL7998X_REG(5, 0x3c)
311+#define ISL7998X_REG_P5_HIST_LINE_CNT_2 ISL7998X_REG(5, 0x3d)
312+
313+static const struct reg_sequence isl7998x_init_seq_1[] = {
314+ { ISL7998X_REG_P0_SHORT_DIAG_IRQ_EN, 0xff },
315+ { ISL7998X_REG_PX_DEC_SDT(0x1), 0x00 },
316+ { ISL7998X_REG_PX_DEC_SHORT_DET_CTL_1(0x1), 0x03 },
317+ { ISL7998X_REG_PX_DEC_SDT(0x2), 0x00 },
318+ { ISL7998X_REG_PX_DEC_SHORT_DET_CTL_1(0x2), 0x03 },
319+ { ISL7998X_REG_PX_DEC_SDT(0x3), 0x00 },
320+ { ISL7998X_REG_PX_DEC_SHORT_DET_CTL_1(0x3), 0x03 },
321+ { ISL7998X_REG_PX_DEC_SDT(0x4), 0x00 },
322+ { ISL7998X_REG_PX_DEC_SHORT_DET_CTL_1(0x4), 0x03 },
323+ { ISL7998X_REG_P5_LI_ENGINE_CTL, 0x00 },
324+ { ISL7998X_REG_P0_SW_RESET_CTL, 0x1f, 10 },
325+ { ISL7998X_REG_P0_IO_BUFFER_CTL, 0x00 },
326+ { ISL7998X_REG_P0_MPP2_SYNC_CTL, 0xc9 },
327+ { ISL7998X_REG_P0_IRQ_SYNC_CTL, 0xc9 },
328+ { ISL7998X_REG_P0_CHAN_1_IRQ, 0x03 },
329+ { ISL7998X_REG_P0_CHAN_2_IRQ, 0x00 },
330+ { ISL7998X_REG_P0_CHAN_3_IRQ, 0x00 },
331+ { ISL7998X_REG_P0_CHAN_4_IRQ, 0x00 },
332+ { ISL7998X_REG_P5_LI_ENGINE_CTL, 0x02 },
333+ { ISL7998X_REG_P5_LI_ENGINE_LINE_CTL, 0x85 },
334+ { ISL7998X_REG_P5_LI_ENGINE_PIC_WIDTH, 0xa0 },
335+ { ISL7998X_REG_P5_LI_ENGINE_SYNC_CTL, 0x18 },
336+ { ISL7998X_REG_P5_LI_ENGINE_TYPE_CTL, 0x40 },
337+ { ISL7998X_REG_P5_LI_ENGINE_FIFO_CTL, 0x40 },
338+ { ISL7998X_REG_P5_MIPI_WCNT_1, 0x05 },
339+ { ISL7998X_REG_P5_MIPI_WCNT_2, 0xa0 },
340+ { ISL7998X_REG_P5_TP_GEN_MIPI, 0x00 },
341+ { ISL7998X_REG_P5_ESC_MODE_TIME_CTL, 0x0c },
342+ { ISL7998X_REG_P5_MIPI_SP_HS_TRL_CTL, 0x00 },
343+ { ISL7998X_REG_P5_TP_GEN_RND_SYNC_CTL_1, 0x00 },
344+ { ISL7998X_REG_P5_TP_GEN_RND_SYNC_CTL_2, 0x19 },
345+ { ISL7998X_REG_P5_PSF_FIELD_END_CTL_1, 0x18 },
346+ { ISL7998X_REG_P5_PSF_FIELD_END_CTL_2, 0xf1 },
347+ { ISL7998X_REG_P5_PSF_FIELD_END_CTL_3, 0x00 },
348+ { ISL7998X_REG_P5_PSF_FIELD_END_CTL_4, 0xf1 },
349+ { ISL7998X_REG_P5_MIPI_ANA_DATA_CTL_1, 0x00 },
350+ { ISL7998X_REG_P5_MIPI_ANA_DATA_CTL_2, 0x00 },
351+ { ISL7998X_REG_P5_MIPI_ANA_CLK_CTL, 0x00 },
352+ { ISL7998X_REG_P5_PLL_ANA_STATUS, 0xc0 },
353+ { ISL7998X_REG_P5_PLL_ANA_MISC_CTL, 0x18 },
354+ { ISL7998X_REG_P5_PLL_ANA, 0x00 },
355+ { ISL7998X_REG_P0_SW_RESET_CTL, 0x10, 10 },
356+ /* Page 0xf means write to all of pages 1,2,3,4 */
357+ { ISL7998X_REG_PX_DEC_VDELAY_LO(0xf), 0x14 },
358+ { ISL7998X_REG_PX_DEC_MISC3(0xf), 0xe6 },
359+ { ISL7998X_REG_PX_DEC_CLMD(0xf), 0x85 },
360+ { ISL7998X_REG_PX_DEC_H_DELAY_II_LOW(0xf), 0x11 },
361+ { ISL7998X_REG_PX_ACA_XFER_HIST_HOST(0xf), 0x00 },
362+ { ISL7998X_REG_P0_CLK_CTL_1, 0x1f },
363+ { ISL7998X_REG_P0_CLK_CTL_2, 0x43 },
364+ { ISL7998X_REG_P0_CLK_CTL_3, 0x4f },
365+};
366+
367+static const struct reg_sequence isl7998x_init_seq_2[] = {
368+ { ISL7998X_REG_P5_LI_ENGINE_SYNC_CTL, 0x10 },
369+ { ISL7998X_REG_P5_LI_ENGINE_VC_ASSIGNMENT, 0xe4 },
370+ { ISL7998X_REG_P5_LI_ENGINE_TYPE_CTL, 0x00 },
371+ { ISL7998X_REG_P5_LI_ENGINE_FIFO_CTL, 0x60 },
372+ { ISL7998X_REG_P5_MIPI_READ_START_CTL, 0x2b },
373+ { ISL7998X_REG_P5_PSEUDO_FRM_FIELD_CTL, 0x02 },
374+ { ISL7998X_REG_P5_ONE_FIELD_MODE_CTL, 0x00 },
375+ { ISL7998X_REG_P5_MIPI_INT_HW_TST_CTR, 0x62 },
376+ { ISL7998X_REG_P5_TP_GEN_BAR_PATTERN, 0x02 },
377+ { ISL7998X_REG_P5_MIPI_PCNT_PSFRM, 0x36 },
378+ { ISL7998X_REG_P5_LI_ENGINE_TP_GEN_CTL, 0x00 },
379+ { ISL7998X_REG_P5_MIPI_VBLANK_PSFRM, 0x6c },
380+ { ISL7998X_REG_P5_LI_ENGINE_CTL_2, 0x00 },
381+ { ISL7998X_REG_P5_MIPI_WCNT_1, 0x05 },
382+ { ISL7998X_REG_P5_MIPI_WCNT_2, 0xa0 },
383+ { ISL7998X_REG_P5_MIPI_DPHY_TIMING_CTL_1, 0x77 },
384+ { ISL7998X_REG_P5_MIPI_DPHY_TIMING_CTL_2, 0x17 },
385+ { ISL7998X_REG_P5_MIPI_DPHY_TIMING_CTL_3, 0x08 },
386+ { ISL7998X_REG_P5_MIPI_DPHY_TIMING_CTL_4, 0x38 },
387+ { ISL7998X_REG_P5_MIPI_DPHY_TIMING_CTL_5, 0x14 },
388+ { ISL7998X_REG_P5_MIPI_DPHY_TIMING_CTL_6, 0xf6 },
389+ { ISL7998X_REG_P5_MIPI_DPHY_PARAMS_1, 0x00 },
390+ { ISL7998X_REG_P5_MIPI_DPHY_SOT_PERIOD, 0x17 },
391+ { ISL7998X_REG_P5_MIPI_DPHY_EOT_PERIOD, 0x0a },
392+ { ISL7998X_REG_P5_MIPI_DPHY_PARAMS_2, 0x71 },
393+ { ISL7998X_REG_P5_MIPI_DPHY_TIMING_CTL_7, 0x7a },
394+ { ISL7998X_REG_P5_MIPI_DPHY_TIMING_CTL_8, 0x0f },
395+ { ISL7998X_REG_P5_MIPI_DPHY_TIMING_CTL_9, 0x8c },
396+ { ISL7998X_REG_P5_MIPI_SP_HS_TRL_CTL, 0x08 },
397+ { ISL7998X_REG_P5_FIFO_THRSH_CNT_1, 0x01 },
398+ { ISL7998X_REG_P5_FIFO_THRSH_CNT_2, 0x0e },
399+ { ISL7998X_REG_P5_TP_GEN_RND_SYNC_CTL_1, 0x00 },
400+ { ISL7998X_REG_P5_TP_GEN_RND_SYNC_CTL_2, 0x00 },
401+ { ISL7998X_REG_P5_TOTAL_PF_LINE_CNT_1, 0x03 },
402+ { ISL7998X_REG_P5_TOTAL_PF_LINE_CNT_2, 0xc0 },
403+ { ISL7998X_REG_P5_H_LINE_CNT_1, 0x06 },
404+ { ISL7998X_REG_P5_H_LINE_CNT_2, 0xb3 },
405+ { ISL7998X_REG_P5_HIST_LINE_CNT_1, 0x00 },
406+ { ISL7998X_REG_P5_HIST_LINE_CNT_2, 0xf1 },
407+ { ISL7998X_REG_P5_LI_ENGINE_FIFO_CTL, 0x00 },
408+ { ISL7998X_REG_P5_MIPI_ANA, 0x00 },
409+ /*
410+ * Wait a bit after reset so that the chip can capture a frame
411+ * and update internal line counters.
412+ */
413+ { ISL7998X_REG_P0_SW_RESET_CTL, 0x00, 50 },
414+};
415+
416+enum isl7998x_pads {
417+ ISL7998X_PAD_OUT,
418+ ISL7998X_PAD_VIN1,
419+ ISL7998X_PAD_VIN2,
420+ ISL7998X_PAD_VIN3,
421+ ISL7998X_PAD_VIN4,
422+ ISL7998X_NUM_PADS
423+};
424+
425+struct isl7998x_datafmt {
426+ u32 code;
427+ enum v4l2_colorspace colorspace;
428+};
429+
430+static const struct isl7998x_datafmt isl7998x_colour_fmts[] = {
431+ { MEDIA_BUS_FMT_UYVY8_2X8, V4L2_COLORSPACE_SRGB },
432+};
433+
434+/* Menu items for LINK_FREQ V4L2 control */
435+static const s64 link_freq_menu_items[] = {
436+ /* 1 channel, 1 lane or 2 channels, 2 lanes */
437+ 108000000,
438+ /* 2 channels, 1 lane or 4 channels, 2 lanes */
439+ 216000000,
440+ /* 4 channels, 1 lane */
441+ 432000000,
442+};
443+
444+/* Menu items for TEST_PATTERN V4L2 control */
445+static const char * const isl7998x_test_pattern_menu[] = {
446+ "Disabled",
447+ "Enabled",
448+};
449+
450+static const char * const isl7998x_test_pattern_bars[] = {
451+ "bbbbwb", "bbbwwb", "bbwbwb", "bbwwwb",
452+};
453+
454+static const char * const isl7998x_test_pattern_colors[] = {
455+ "Yellow", "Blue", "Green", "Pink",
456+};
457+
458+struct isl7998x_mode {
459+ unsigned int width;
460+ unsigned int height;
461+ enum v4l2_field field;
462+};
463+
464+static const struct isl7998x_mode supported_modes[] = {
465+ {
466+ .width = 720,
467+ .height = 576,
468+ .field = V4L2_FIELD_SEQ_TB,
469+ },
470+ {
471+ .width = 720,
472+ .height = 480,
473+ .field = V4L2_FIELD_SEQ_BT,
474+ },
475+};
476+
477+static const struct isl7998x_video_std {
478+ const v4l2_std_id norm;
479+ unsigned int id;
480+ const struct isl7998x_mode *mode;
481+} isl7998x_std_res[] = {
482+ { V4L2_STD_NTSC_443,
483+ ISL7998X_REG_PX_DEC_SDT_STANDARD_NTSC_443,
484+ &supported_modes[1] },
485+ { V4L2_STD_PAL_M,
486+ ISL7998X_REG_PX_DEC_SDT_STANDARD_PAL_M,
487+ &supported_modes[1] },
488+ { V4L2_STD_PAL_Nc,
489+ ISL7998X_REG_PX_DEC_SDT_STANDARD_PAL_CN,
490+ &supported_modes[0] },
491+ { V4L2_STD_PAL_N,
492+ ISL7998X_REG_PX_DEC_SDT_STANDARD_PAL,
493+ &supported_modes[0] },
494+ { V4L2_STD_PAL_60,
495+ ISL7998X_REG_PX_DEC_SDT_STANDARD_PAL_60,
496+ &supported_modes[1] },
497+ { V4L2_STD_NTSC,
498+ ISL7998X_REG_PX_DEC_SDT_STANDARD_NTSC_M,
499+ &supported_modes[1] },
500+ { V4L2_STD_PAL,
501+ ISL7998X_REG_PX_DEC_SDT_STANDARD_PAL,
502+ &supported_modes[0] },
503+ { V4L2_STD_SECAM,
504+ ISL7998X_REG_PX_DEC_SDT_STANDARD_SECAM,
505+ &supported_modes[0] },
506+ { V4L2_STD_UNKNOWN,
507+ ISL7998X_REG_PX_DEC_SDT_STANDARD_UNKNOWN,
508+ &supported_modes[1] },
509+};
510+
511+struct isl7998x {
512+ struct v4l2_subdev subdev;
513+ struct regmap *regmap;
514+ struct gpio_desc *pd_gpio;
515+ struct gpio_desc *rstb_gpio;
516+ unsigned int nr_mipi_lanes;
517+ u32 nr_inputs;
518+
519+ const struct isl7998x_datafmt *fmt;
520+ v4l2_std_id norm;
521+ struct media_pad pads[ISL7998X_NUM_PADS];
522+
523+ int enabled;
524+
525+ /* protect fmt, norm, enabled */
526+ struct mutex lock;
527+
528+ struct v4l2_ctrl_handler ctrl_handler;
529+ /* protect ctrl_handler */
530+ struct mutex ctrl_mutex;
531+
532+ /* V4L2 Controls */
533+ struct v4l2_ctrl *link_freq;
534+ u8 test_pattern;
535+ u8 test_pattern_bars;
536+ u8 test_pattern_chans;
537+ u8 test_pattern_color;
538+};
539+
540+static struct isl7998x *sd_to_isl7998x(struct v4l2_subdev *sd)
541+{
542+ return container_of(sd, struct isl7998x, subdev);
543+}
544+
545+static struct isl7998x *i2c_to_isl7998x(const struct i2c_client *client)
546+{
547+ return sd_to_isl7998x(i2c_get_clientdata(client));
548+}
549+
550+static unsigned int isl7998x_norm_to_val(v4l2_std_id norm)
551+{
552+ unsigned int i;
553+
554+ for (i = 0; i < ARRAY_SIZE(isl7998x_std_res); i++)
555+ if (isl7998x_std_res[i].norm & norm)
556+ break;
557+ if (i == ARRAY_SIZE(isl7998x_std_res))
558+ return ISL7998X_REG_PX_DEC_SDT_STANDARD_UNKNOWN;
559+
560+ return isl7998x_std_res[i].id;
561+}
562+
563+static const struct isl7998x_mode *isl7998x_norm_to_mode(v4l2_std_id norm)
564+{
565+ unsigned int i;
566+
567+ for (i = 0; i < ARRAY_SIZE(isl7998x_std_res); i++)
568+ if (isl7998x_std_res[i].norm & norm)
569+ break;
570+ /* Use NTSC default resolution during standard detection */
571+ if (i == ARRAY_SIZE(isl7998x_std_res))
572+ return &supported_modes[1];
573+
574+ return isl7998x_std_res[i].mode;
575+}
576+
577+static int isl7998x_get_nr_inputs(struct device_node *of_node)
578+{
579+ struct device_node *port;
580+ unsigned int inputs = 0;
581+ unsigned int i;
582+
583+ if (of_graph_get_endpoint_count(of_node) > ISL7998X_NUM_PADS)
584+ return -EINVAL;
585+
586+ /*
587+ * The driver does not provide means to remap the input ports. It
588+ * always configures input ports to start from VID1. Ensure that the
589+ * device tree is correct.
590+ */
591+ for (i = ISL7998X_PAD_VIN1; i <= ISL7998X_PAD_VIN4; i++) {
592+ port = of_graph_get_port_by_id(of_node, i);
593+ if (!port)
594+ continue;
595+
596+ inputs |= BIT(i);
597+ of_node_put(port);
598+ }
599+
600+ switch (inputs) {
601+ case BIT(ISL7998X_PAD_VIN1):
602+ return 1;
603+ case BIT(ISL7998X_PAD_VIN1) | BIT(ISL7998X_PAD_VIN2):
604+ return 2;
605+ case BIT(ISL7998X_PAD_VIN1) | BIT(ISL7998X_PAD_VIN2) |
606+ BIT(ISL7998X_PAD_VIN3) | BIT(ISL7998X_PAD_VIN4):
607+ return 4;
608+ default:
609+ return -EINVAL;
610+ }
611+}
612+
613+static int isl7998x_wait_power_on(struct isl7998x *isl7998x)
614+{
615+ struct device *dev = isl7998x->subdev.dev;
616+ u32 chip_id;
617+ int ret;
618+ int err;
619+
620+ ret = read_poll_timeout(regmap_read, err, !err, 2000, 20000, false,
621+ isl7998x->regmap,
622+ ISL7998X_REG_P0_PRODUCT_ID_CODE, &chip_id);
623+ if (ret) {
624+ dev_err(dev, "timeout while waiting for ISL7998X\n");
625+ return ret;
626+ }
627+
628+ dev_dbg(dev, "Found ISL799%x\n", chip_id);
629+
630+ return ret;
631+}
632+
633+static int isl7998x_set_standard(struct isl7998x *isl7998x, v4l2_std_id norm)
634+{
635+ const struct isl7998x_mode *mode = isl7998x_norm_to_mode(norm);
636+ unsigned int val = isl7998x_norm_to_val(norm);
637+ unsigned int width = mode->width;
638+ unsigned int i;
639+ int ret;
640+
641+ for (i = 0; i < ISL7998X_INPUTS; i++) {
642+ ret = regmap_write_bits(isl7998x->regmap,
643+ ISL7998X_REG_PX_DEC_SDT(i + 1),
644+ ISL7998X_REG_PX_DEC_SDT_STANDARD,
645+ val);
646+ if (ret)
647+ return ret;
648+ }
649+
650+ ret = regmap_write(isl7998x->regmap,
651+ ISL7998X_REG_P5_LI_ENGINE_LINE_CTL,
652+ 0x20 | ((width >> 7) & 0x1f));
653+ if (ret)
654+ return ret;
655+
656+ ret = regmap_write(isl7998x->regmap,
657+ ISL7998X_REG_P5_LI_ENGINE_PIC_WIDTH,
658+ (width << 1) & 0xff);
659+ if (ret)
660+ return ret;
661+
662+ return 0;
663+}
664+
665+static int isl7998x_init(struct isl7998x *isl7998x)
666+{
667+ const unsigned int lanes = isl7998x->nr_mipi_lanes;
668+ const u32 isl7998x_video_in_chan_map[] = { 0x00, 0x11, 0x02, 0x02 };
669+ const struct reg_sequence isl7998x_init_seq_custom[] = {
670+ { ISL7998X_REG_P0_VIDEO_IN_CHAN_CTL,
671+ isl7998x_video_in_chan_map[isl7998x->nr_inputs - 1] },
672+ { ISL7998X_REG_P0_CLK_CTL_4,
673+ (lanes == 1) ? 0x40 : 0x41 },
674+ { ISL7998X_REG_P5_LI_ENGINE_CTL,
675+ (lanes == 1) ? 0x01 : 0x02 },
676+ };
677+ struct device *dev = isl7998x->subdev.dev;
678+ struct regmap *regmap = isl7998x->regmap;
679+ int ret;
680+
681+ dev_dbg(dev, "configuring %d lanes for %d inputs (norm %s)\n",
682+ isl7998x->nr_mipi_lanes, isl7998x->nr_inputs,
683+ v4l2_norm_to_name(isl7998x->norm));
684+
685+ ret = regmap_register_patch(regmap, isl7998x_init_seq_1,
686+ ARRAY_SIZE(isl7998x_init_seq_1));
687+ if (ret)
688+ return ret;
689+
690+ mutex_lock(&isl7998x->lock);
691+ ret = isl7998x_set_standard(isl7998x, isl7998x->norm);
692+ mutex_unlock(&isl7998x->lock);
693+ if (ret)
694+ return ret;
695+
696+ ret = regmap_register_patch(regmap, isl7998x_init_seq_custom,
697+ ARRAY_SIZE(isl7998x_init_seq_custom));
698+ if (ret)
699+ return ret;
700+
701+ return regmap_register_patch(regmap, isl7998x_init_seq_2,
702+ ARRAY_SIZE(isl7998x_init_seq_2));
703+}
704+
705+static int isl7998x_set_test_pattern(struct isl7998x *isl7998x)
706+{
707+ const struct reg_sequence isl7998x_init_seq_tpg_off[] = {
708+ { ISL7998X_REG_P5_LI_ENGINE_TP_GEN_CTL, 0 },
709+ { ISL7998X_REG_P5_LI_ENGINE_CTL_2, 0 }
710+ };
711+ const struct reg_sequence isl7998x_init_seq_tpg_on[] = {
712+ { ISL7998X_REG_P5_TP_GEN_BAR_PATTERN,
713+ isl7998x->test_pattern_bars << 6 },
714+ { ISL7998X_REG_P5_LI_ENGINE_CTL_2,
715+ isl7998x->norm & V4L2_STD_PAL ? BIT(2) : 0 },
716+ { ISL7998X_REG_P5_LI_ENGINE_TP_GEN_CTL,
717+ (isl7998x->test_pattern_chans << 4) |
718+ (isl7998x->test_pattern_color << 2) }
719+ };
720+ struct device *dev = isl7998x->subdev.dev;
721+ struct regmap *regmap = isl7998x->regmap;
722+ int ret;
723+
724+ if (pm_runtime_get_if_in_use(dev) <= 0)
725+ return 0;
726+
727+ if (isl7998x->test_pattern != 0) {
728+ dev_dbg(dev, "enabling test pattern: channels 0x%x, %s, %s\n",
729+ isl7998x->test_pattern_chans,
730+ isl7998x_test_pattern_bars[isl7998x->test_pattern_bars],
731+ isl7998x_test_pattern_colors[isl7998x->test_pattern_color]);
732+ ret = regmap_register_patch(regmap, isl7998x_init_seq_tpg_on,
733+ ARRAY_SIZE(isl7998x_init_seq_tpg_on));
734+ } else {
735+ ret = regmap_register_patch(regmap, isl7998x_init_seq_tpg_off,
736+ ARRAY_SIZE(isl7998x_init_seq_tpg_off));
737+ }
738+
739+ pm_runtime_put(dev);
740+
741+ return ret;
742+}
743+
744+#ifdef CONFIG_VIDEO_ADV_DEBUG
745+static int isl7998x_g_register(struct v4l2_subdev *sd,
746+ struct v4l2_dbg_register *reg)
747+{
748+ struct isl7998x *isl7998x = sd_to_isl7998x(sd);
749+ int ret;
750+ u32 val;
751+
752+ ret = regmap_read(isl7998x->regmap, reg->reg, &val);
753+ if (ret)
754+ return ret;
755+
756+ reg->size = 1;
757+ reg->val = val;
758+
759+ return 0;
760+}
761+
762+static int isl7998x_s_register(struct v4l2_subdev *sd,
763+ const struct v4l2_dbg_register *reg)
764+{
765+ struct isl7998x *isl7998x = sd_to_isl7998x(sd);
766+
767+ return regmap_write(isl7998x->regmap, reg->reg, reg->val);
768+}
769+#endif
770+
771+static int isl7998x_g_std(struct v4l2_subdev *sd, v4l2_std_id *norm)
772+{
773+ struct isl7998x *isl7998x = sd_to_isl7998x(sd);
774+
775+ mutex_lock(&isl7998x->lock);
776+ *norm = isl7998x->norm;
777+ mutex_unlock(&isl7998x->lock);
778+
779+ return 0;
780+}
781+
782+static int isl7998x_s_std(struct v4l2_subdev *sd, v4l2_std_id norm)
783+{
784+ struct isl7998x *isl7998x = sd_to_isl7998x(sd);
785+ struct i2c_client *client = v4l2_get_subdevdata(sd);
786+ struct device *dev = &client->dev;
787+ int ret = 0;
788+
789+ mutex_lock(&isl7998x->lock);
790+ if (isl7998x->enabled) {
791+ ret = -EBUSY;
792+ mutex_unlock(&isl7998x->lock);
793+ return ret;
794+ }
795+ isl7998x->norm = norm;
796+ mutex_unlock(&isl7998x->lock);
797+
798+ if (pm_runtime_get_if_in_use(dev) <= 0)
799+ return ret;
800+
801+ ret = isl7998x_set_standard(isl7998x, norm);
802+
803+ pm_runtime_put(dev);
804+
805+ return ret;
806+}
807+
808+static int isl7998x_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
809+{
810+ struct isl7998x *isl7998x = sd_to_isl7998x(sd);
811+ struct i2c_client *client = v4l2_get_subdevdata(sd);
812+ struct device *dev = &client->dev;
813+ unsigned int std_id[ISL7998X_INPUTS];
814+ unsigned int i;
815+ int ret;
816+ u32 reg;
817+
818+ ret = pm_runtime_resume_and_get(dev);
819+ if (ret)
820+ return ret;
821+
822+ dev_dbg(dev, "starting video standard detection\n");
823+
824+ mutex_lock(&isl7998x->lock);
825+ if (isl7998x->enabled) {
826+ ret = -EBUSY;
827+ goto out_unlock;
828+ }
829+
830+ ret = isl7998x_set_standard(isl7998x, V4L2_STD_UNKNOWN);
831+ if (ret)
832+ goto out_unlock;
833+
834+ for (i = 0; i < ISL7998X_INPUTS; i++) {
835+ ret = regmap_write(isl7998x->regmap,
836+ ISL7998X_REG_PX_DEC_SDTR(i + 1),
837+ ISL7998X_REG_PX_DEC_SDTR_ATSTART);
838+ if (ret)
839+ goto out_reset_std;
840+ }
841+
842+ for (i = 0; i < ISL7998X_INPUTS; i++) {
843+ ret = regmap_read_poll_timeout(isl7998x->regmap,
844+ ISL7998X_REG_PX_DEC_SDT(i + 1),
845+ reg,
846+ !(reg & ISL7998X_REG_PX_DEC_SDT_DET),
847+ 2000, 500 * USEC_PER_MSEC);
848+ if (ret)
849+ goto out_reset_std;
850+ std_id[i] = FIELD_GET(ISL7998X_REG_PX_DEC_SDT_NOW, reg);
851+ }
852+
853+ /*
854+ * According to Renesas FAE, all input cameras must have the
855+ * same standard on this chip.
856+ */
857+ for (i = 0; i < isl7998x->nr_inputs; i++) {
858+ dev_dbg(dev, "input %d: detected %s\n",
859+ i, v4l2_norm_to_name(isl7998x_std_res[std_id[i]].norm));
860+ if (std_id[0] != std_id[i])
861+ dev_warn(dev,
862+ "incompatible standards: %s on input %d (expected %s)\n",
863+ v4l2_norm_to_name(isl7998x_std_res[std_id[i]].norm), i,
864+ v4l2_norm_to_name(isl7998x_std_res[std_id[0]].norm));
865+ }
866+
867+ *std = isl7998x_std_res[std_id[0]].norm;
868+
869+out_reset_std:
870+ isl7998x_set_standard(isl7998x, isl7998x->norm);
871+out_unlock:
872+ mutex_unlock(&isl7998x->lock);
873+ pm_runtime_put(dev);
874+
875+ return ret;
876+}
877+
878+static int isl7998x_g_tvnorms(struct v4l2_subdev *sd, v4l2_std_id *std)
879+{
880+ *std = V4L2_STD_ALL;
881+
882+ return 0;
883+}
884+
885+static int isl7998x_g_input_status(struct v4l2_subdev *sd, u32 *status)
886+{
887+ struct isl7998x *isl7998x = sd_to_isl7998x(sd);
888+ struct i2c_client *client = v4l2_get_subdevdata(sd);
889+ struct device *dev = &client->dev;
890+ unsigned int i;
891+ int ret = 0;
892+ u32 reg;
893+
894+ if (!pm_runtime_active(dev)) {
895+ *status |= V4L2_IN_ST_NO_POWER;
896+ return 0;
897+ }
898+
899+ for (i = 0; i < isl7998x->nr_inputs; i++) {
900+ ret = regmap_read(isl7998x->regmap,
901+ ISL7998X_REG_PX_DEC_STATUS_1(i + 1), &reg);
902+ if (!ret) {
903+ if (reg & ISL7998X_REG_PX_DEC_STATUS_1_VDLOSS)
904+ *status |= V4L2_IN_ST_NO_SIGNAL;
905+ if (!(reg & ISL7998X_REG_PX_DEC_STATUS_1_HLOCK))
906+ *status |= V4L2_IN_ST_NO_H_LOCK;
907+ if (!(reg & ISL7998X_REG_PX_DEC_STATUS_1_VLOCK))
908+ *status |= V4L2_IN_ST_NO_V_LOCK;
909+ }
910+ }
911+
912+ return ret;
913+}
914+
915+static int isl7998x_s_stream(struct v4l2_subdev *sd, int enable)
916+{
917+ struct isl7998x *isl7998x = sd_to_isl7998x(sd);
918+ struct i2c_client *client = v4l2_get_subdevdata(sd);
919+ struct device *dev = &client->dev;
920+ int ret = 0;
921+ u32 reg;
922+
923+ dev_dbg(dev, "stream %s\n", enable ? "ON" : "OFF");
924+
925+ mutex_lock(&isl7998x->lock);
926+ if (isl7998x->enabled == enable)
927+ goto out;
928+ isl7998x->enabled = enable;
929+
930+ if (enable) {
931+ ret = isl7998x_set_test_pattern(isl7998x);
932+ if (ret)
933+ goto out;
934+ }
935+
936+ regmap_read(isl7998x->regmap,
937+ ISL7998X_REG_P5_LI_ENGINE_CTL, &reg);
938+ if (enable)
939+ reg &= ~BIT(7);
940+ else
941+ reg |= BIT(7);
942+ ret = regmap_write(isl7998x->regmap,
943+ ISL7998X_REG_P5_LI_ENGINE_CTL, reg);
944+
945+out:
946+ mutex_unlock(&isl7998x->lock);
947+
948+ return ret;
949+}
950+
951+static int isl7998x_pre_streamon(struct v4l2_subdev *sd, u32 flags)
952+{
953+ struct i2c_client *client = v4l2_get_subdevdata(sd);
954+ struct device *dev = &client->dev;
955+
956+ return pm_runtime_resume_and_get(dev);
957+}
958+
959+static int isl7998x_post_streamoff(struct v4l2_subdev *sd)
960+{
961+ struct i2c_client *client = v4l2_get_subdevdata(sd);
962+ struct device *dev = &client->dev;
963+
964+ pm_runtime_put(dev);
965+
966+ return 0;
967+}
968+
969+static int isl7998x_enum_mbus_code(struct v4l2_subdev *sd,
970+ struct v4l2_subdev_state *sd_state,
971+ struct v4l2_subdev_mbus_code_enum *code)
972+{
973+ if (code->index >= ARRAY_SIZE(isl7998x_colour_fmts))
974+ return -EINVAL;
975+
976+ code->code = isl7998x_colour_fmts[code->index].code;
977+
978+ return 0;
979+}
980+
981+static int isl7998x_enum_frame_size(struct v4l2_subdev *sd,
982+ struct v4l2_subdev_state *sd_state,
983+ struct v4l2_subdev_frame_size_enum *fse)
984+{
985+ if (fse->index >= ARRAY_SIZE(supported_modes))
986+ return -EINVAL;
987+
988+ if (fse->code != isl7998x_colour_fmts[0].code)
989+ return -EINVAL;
990+
991+ fse->min_width = supported_modes[fse->index].width;
992+ fse->max_width = fse->min_width;
993+ fse->min_height = supported_modes[fse->index].height;
994+ fse->max_height = fse->min_height;
995+
996+ return 0;
997+}
998+
999+static int isl7998x_get_fmt(struct v4l2_subdev *sd,
1000+ struct v4l2_subdev_state *sd_state,
1001+ struct v4l2_subdev_format *format)
1002+{
1003+ struct isl7998x *isl7998x = sd_to_isl7998x(sd);
1004+ struct v4l2_mbus_framefmt *mf = &format->format;
1005+ const struct isl7998x_mode *mode;
1006+
1007+ mutex_lock(&isl7998x->lock);
1008+
1009+ if (format->which == V4L2_SUBDEV_FORMAT_TRY) {
1010+ format->format = *v4l2_subdev_get_try_format(sd, sd_state,
1011+ format->pad);
1012+ goto out;
1013+ }
1014+
1015+ mode = isl7998x_norm_to_mode(isl7998x->norm);
1016+
1017+ mf->width = mode->width;
1018+ mf->height = mode->height;
1019+ mf->code = isl7998x->fmt->code;
1020+ mf->field = mode->field;
1021+ mf->colorspace = 0;
1022+
1023+out:
1024+ mutex_unlock(&isl7998x->lock);
1025+
1026+ return 0;
1027+}
1028+
1029+static int isl7998x_set_fmt(struct v4l2_subdev *sd,
1030+ struct v4l2_subdev_state *sd_state,
1031+ struct v4l2_subdev_format *format)
1032+{
1033+ struct isl7998x *isl7998x = sd_to_isl7998x(sd);
1034+ struct v4l2_mbus_framefmt *mf = &format->format;
1035+ const struct isl7998x_mode *mode;
1036+
1037+ mutex_lock(&isl7998x->lock);
1038+
1039+ mode = isl7998x_norm_to_mode(isl7998x->norm);
1040+
1041+ mf->width = mode->width;
1042+ mf->height = mode->height;
1043+ mf->code = isl7998x->fmt->code;
1044+ mf->field = mode->field;
1045+
1046+ if (format->which == V4L2_SUBDEV_FORMAT_TRY)
1047+ *v4l2_subdev_get_try_format(sd, sd_state, format->pad) = format->format;
1048+
1049+ mutex_unlock(&isl7998x->lock);
1050+
1051+ return 0;
1052+}
1053+
1054+static int isl7998x_set_ctrl(struct v4l2_ctrl *ctrl)
1055+{
1056+ struct isl7998x *isl7998x = container_of(ctrl->handler,
1057+ struct isl7998x, ctrl_handler);
1058+ int ret = 0;
1059+
1060+ switch (ctrl->id) {
1061+ case V4L2_CID_TEST_PATTERN_BARS:
1062+ mutex_lock(&isl7998x->lock);
1063+ isl7998x->test_pattern_bars = ctrl->val & 0x3;
1064+ ret = isl7998x_set_test_pattern(isl7998x);
1065+ mutex_unlock(&isl7998x->lock);
1066+ break;
1067+ case V4L2_CID_TEST_PATTERN_CHANNELS:
1068+ mutex_lock(&isl7998x->lock);
1069+ isl7998x->test_pattern_chans = ctrl->val & 0xf;
1070+ ret = isl7998x_set_test_pattern(isl7998x);
1071+ mutex_unlock(&isl7998x->lock);
1072+ break;
1073+ case V4L2_CID_TEST_PATTERN_COLOR:
1074+ mutex_lock(&isl7998x->lock);
1075+ isl7998x->test_pattern_color = ctrl->val & 0x3;
1076+ ret = isl7998x_set_test_pattern(isl7998x);
1077+ mutex_unlock(&isl7998x->lock);
1078+ break;
1079+ case V4L2_CID_TEST_PATTERN:
1080+ mutex_lock(&isl7998x->lock);
1081+ isl7998x->test_pattern = ctrl->val;
1082+ ret = isl7998x_set_test_pattern(isl7998x);
1083+ mutex_unlock(&isl7998x->lock);
1084+ break;
1085+ }
1086+
1087+ return ret;
1088+}
1089+
1090+static const struct v4l2_subdev_core_ops isl7998x_subdev_core_ops = {
1091+#ifdef CONFIG_VIDEO_ADV_DEBUG
1092+ .g_register = isl7998x_g_register,
1093+ .s_register = isl7998x_s_register,
1094+#endif
1095+};
1096+
1097+static const struct v4l2_subdev_video_ops isl7998x_subdev_video_ops = {
1098+ .g_std = isl7998x_g_std,
1099+ .s_std = isl7998x_s_std,
1100+ .querystd = isl7998x_querystd,
1101+ .g_tvnorms = isl7998x_g_tvnorms,
1102+ .g_input_status = isl7998x_g_input_status,
1103+ .s_stream = isl7998x_s_stream,
1104+ .pre_streamon = isl7998x_pre_streamon,
1105+ .post_streamoff = isl7998x_post_streamoff,
1106+};
1107+
1108+static const struct v4l2_subdev_pad_ops isl7998x_subdev_pad_ops = {
1109+ .enum_mbus_code = isl7998x_enum_mbus_code,
1110+ .enum_frame_size = isl7998x_enum_frame_size,
1111+ .get_fmt = isl7998x_get_fmt,
1112+ .set_fmt = isl7998x_set_fmt,
1113+};
1114+
1115+static const struct v4l2_subdev_ops isl7998x_subdev_ops = {
1116+ .core = &isl7998x_subdev_core_ops,
1117+ .video = &isl7998x_subdev_video_ops,
1118+ .pad = &isl7998x_subdev_pad_ops,
1119+};
1120+
1121+static const struct media_entity_operations isl7998x_entity_ops = {
1122+ .link_validate = v4l2_subdev_link_validate,
1123+};
1124+
1125+static const struct v4l2_ctrl_ops isl7998x_ctrl_ops = {
1126+ .s_ctrl = isl7998x_set_ctrl,
1127+};
1128+
1129+static const struct v4l2_ctrl_config isl7998x_ctrls[] = {
1130+ {
1131+ .ops = &isl7998x_ctrl_ops,
1132+ .id = V4L2_CID_TEST_PATTERN_BARS,
1133+ .type = V4L2_CTRL_TYPE_MENU,
1134+ .name = "Test Pattern Bars",
1135+ .max = ARRAY_SIZE(isl7998x_test_pattern_bars) - 1,
1136+ .def = 0,
1137+ .qmenu = isl7998x_test_pattern_bars,
1138+ }, {
1139+ .ops = &isl7998x_ctrl_ops,
1140+ .id = V4L2_CID_TEST_PATTERN_CHANNELS,
1141+ .type = V4L2_CTRL_TYPE_INTEGER,
1142+ .name = "Test Pattern Channels",
1143+ .min = 0,
1144+ .max = 0xf,
1145+ .step = 1,
1146+ .def = 0xf,
1147+ .flags = 0,
1148+ }, {
1149+ .ops = &isl7998x_ctrl_ops,
1150+ .id = V4L2_CID_TEST_PATTERN_COLOR,
1151+ .type = V4L2_CTRL_TYPE_MENU,
1152+ .name = "Test Pattern Color",
1153+ .max = ARRAY_SIZE(isl7998x_test_pattern_colors) - 1,
1154+ .def = 0,
1155+ .qmenu = isl7998x_test_pattern_colors,
1156+ },
1157+};
1158+
1159+#define ISL7998X_REG_DECODER_ACA_READABLE_RANGE(page) \
1160+ /* Decoder range */ \
1161+ regmap_reg_range(ISL7998X_REG_PX_DEC_INPUT_FMT(page), \
1162+ ISL7998X_REG_PX_DEC_HS_DELAY_CTL(page)), \
1163+ regmap_reg_range(ISL7998X_REG_PX_DEC_ANCTL(page), \
1164+ ISL7998X_REG_PX_DEC_CSC_CTL(page)), \
1165+ regmap_reg_range(ISL7998X_REG_PX_DEC_BRIGHT(page), \
1166+ ISL7998X_REG_PX_DEC_HUE(page)), \
1167+ regmap_reg_range(ISL7998X_REG_PX_DEC_VERT_PEAK(page), \
1168+ ISL7998X_REG_PX_DEC_CORING(page)), \
1169+ regmap_reg_range(ISL7998X_REG_PX_DEC_SDT(page), \
1170+ ISL7998X_REG_PX_DEC_SDTR(page)), \
1171+ regmap_reg_range(ISL7998X_REG_PX_DEC_CLMPG(page), \
1172+ ISL7998X_REG_PX_DEC_DATA_CONV(page)), \
1173+ regmap_reg_range(ISL7998X_REG_PX_DEC_INTERNAL_TEST(page), \
1174+ ISL7998X_REG_PX_DEC_INTERNAL_TEST(page)), \
1175+ regmap_reg_range(ISL7998X_REG_PX_DEC_H_DELAY_CTL(page), \
1176+ ISL7998X_REG_PX_DEC_H_DELAY_II_LOW(page)), \
1177+ /* ACA range */ \
1178+ regmap_reg_range(ISL7998X_REG_PX_ACA_CTL_1(page), \
1179+ ISL7998X_REG_PX_ACA_HIST_WIN_V_SZ2(page)), \
1180+ regmap_reg_range(ISL7998X_REG_PX_ACA_Y_AVG(page), \
1181+ ISL7998X_REG_PX_ACA_CTL_4(page)), \
1182+ regmap_reg_range(ISL7998X_REG_PX_ACA_FLEX_WIN_HIST(page), \
1183+ ISL7998X_REG_PX_ACA_XFER_HIST_HOST(page)), \
1184+ regmap_reg_range(ISL7998X_REG_PX_DEC_PAGE(page), \
1185+ ISL7998X_REG_PX_DEC_PAGE(page))
1186+
1187+#define ISL7998X_REG_DECODER_ACA_WRITEABLE_RANGE(page) \
1188+ /* Decoder range */ \
1189+ regmap_reg_range(ISL7998X_REG_PX_DEC_INPUT_FMT(page), \
1190+ ISL7998X_REG_PX_DEC_INPUT_FMT(page)), \
1191+ regmap_reg_range(ISL7998X_REG_PX_DEC_HS_DELAY_CTL(page), \
1192+ ISL7998X_REG_PX_DEC_HS_DELAY_CTL(page)), \
1193+ regmap_reg_range(ISL7998X_REG_PX_DEC_ANCTL(page), \
1194+ ISL7998X_REG_PX_DEC_CSC_CTL(page)), \
1195+ regmap_reg_range(ISL7998X_REG_PX_DEC_BRIGHT(page), \
1196+ ISL7998X_REG_PX_DEC_HUE(page)), \
1197+ regmap_reg_range(ISL7998X_REG_PX_DEC_VERT_PEAK(page), \
1198+ ISL7998X_REG_PX_DEC_CORING(page)), \
1199+ regmap_reg_range(ISL7998X_REG_PX_DEC_SDT(page), \
1200+ ISL7998X_REG_PX_DEC_SDTR(page)), \
1201+ regmap_reg_range(ISL7998X_REG_PX_DEC_CLMPG(page), \
1202+ ISL7998X_REG_PX_DEC_MISC3(page)), \
1203+ regmap_reg_range(ISL7998X_REG_PX_DEC_CLMD(page), \
1204+ ISL7998X_REG_PX_DEC_DATA_CONV(page)), \
1205+ regmap_reg_range(ISL7998X_REG_PX_DEC_INTERNAL_TEST(page), \
1206+ ISL7998X_REG_PX_DEC_INTERNAL_TEST(page)), \
1207+ regmap_reg_range(ISL7998X_REG_PX_DEC_H_DELAY_CTL(page), \
1208+ ISL7998X_REG_PX_DEC_H_DELAY_II_LOW(page)), \
1209+ /* ACA range */ \
1210+ regmap_reg_range(ISL7998X_REG_PX_ACA_CTL_1(page), \
1211+ ISL7998X_REG_PX_ACA_HIST_WIN_V_SZ2(page)), \
1212+ regmap_reg_range(ISL7998X_REG_PX_ACA_CTL_2(page), \
1213+ ISL7998X_REG_PX_ACA_CTL_4(page)), \
1214+ regmap_reg_range(ISL7998X_REG_PX_ACA_FLEX_WIN_HIST(page), \
1215+ ISL7998X_REG_PX_ACA_HIST_DATA_LO(page)), \
1216+ regmap_reg_range(ISL7998X_REG_PX_ACA_XFER_HIST_HOST(page), \
1217+ ISL7998X_REG_PX_ACA_XFER_HIST_HOST(page)), \
1218+ regmap_reg_range(ISL7998X_REG_PX_DEC_PAGE(page), \
1219+ ISL7998X_REG_PX_DEC_PAGE(page))
1220+
1221+#define ISL7998X_REG_DECODER_ACA_VOLATILE_RANGE(page) \
1222+ /* Decoder range */ \
1223+ regmap_reg_range(ISL7998X_REG_PX_DEC_STATUS_1(page), \
1224+ ISL7998X_REG_PX_DEC_STATUS_1(page)), \
1225+ regmap_reg_range(ISL7998X_REG_PX_DEC_SDT(page), \
1226+ ISL7998X_REG_PX_DEC_SDT(page)), \
1227+ regmap_reg_range(ISL7998X_REG_PX_DEC_MVSN(page), \
1228+ ISL7998X_REG_PX_DEC_HFREF(page)), \
1229+ /* ACA range */ \
1230+ regmap_reg_range(ISL7998X_REG_PX_ACA_Y_AVG(page), \
1231+ ISL7998X_REG_PX_ACA_Y_HIGH(page)), \
1232+ regmap_reg_range(ISL7998X_REG_PX_ACA_HIST_DATA_LO(page), \
1233+ ISL7998X_REG_PX_ACA_FLEX_WIN_CR_CLR(page))
1234+
1235+static const struct regmap_range isl7998x_readable_ranges[] = {
1236+ regmap_reg_range(ISL7998X_REG_P0_PRODUCT_ID_CODE,
1237+ ISL7998X_REG_P0_IRQ_SYNC_CTL),
1238+ regmap_reg_range(ISL7998X_REG_P0_INTERRUPT_STATUS,
1239+ ISL7998X_REG_P0_CLOCK_DELAY),
1240+ regmap_reg_range(ISL7998X_REG_PX_DEC_PAGE(0),
1241+ ISL7998X_REG_PX_DEC_PAGE(0)),
1242+
1243+ ISL7998X_REG_DECODER_ACA_READABLE_RANGE(1),
1244+ ISL7998X_REG_DECODER_ACA_READABLE_RANGE(2),
1245+ ISL7998X_REG_DECODER_ACA_READABLE_RANGE(3),
1246+ ISL7998X_REG_DECODER_ACA_READABLE_RANGE(4),
1247+
1248+ regmap_reg_range(ISL7998X_REG_P5_LI_ENGINE_CTL,
1249+ ISL7998X_REG_P5_MIPI_SP_HS_TRL_CTL),
1250+ regmap_reg_range(ISL7998X_REG_P5_FIFO_THRSH_CNT_1,
1251+ ISL7998X_REG_P5_PLL_ANA),
1252+ regmap_reg_range(ISL7998X_REG_P5_TOTAL_PF_LINE_CNT_1,
1253+ ISL7998X_REG_P5_HIST_LINE_CNT_2),
1254+ regmap_reg_range(ISL7998X_REG_PX_DEC_PAGE(5),
1255+ ISL7998X_REG_PX_DEC_PAGE(5)),
1256+};
1257+
1258+static const struct regmap_range isl7998x_writeable_ranges[] = {
1259+ regmap_reg_range(ISL7998X_REG_P0_SW_RESET_CTL,
1260+ ISL7998X_REG_P0_IRQ_SYNC_CTL),
1261+ regmap_reg_range(ISL7998X_REG_P0_CHAN_1_IRQ,
1262+ ISL7998X_REG_P0_SHORT_DIAG_IRQ_EN),
1263+ regmap_reg_range(ISL7998X_REG_P0_CLOCK_DELAY,
1264+ ISL7998X_REG_P0_CLOCK_DELAY),
1265+ regmap_reg_range(ISL7998X_REG_PX_DEC_PAGE(0),
1266+ ISL7998X_REG_PX_DEC_PAGE(0)),
1267+
1268+ ISL7998X_REG_DECODER_ACA_WRITEABLE_RANGE(1),
1269+ ISL7998X_REG_DECODER_ACA_WRITEABLE_RANGE(2),
1270+ ISL7998X_REG_DECODER_ACA_WRITEABLE_RANGE(3),
1271+ ISL7998X_REG_DECODER_ACA_WRITEABLE_RANGE(4),
1272+
1273+ regmap_reg_range(ISL7998X_REG_P5_LI_ENGINE_CTL,
1274+ ISL7998X_REG_P5_ESC_MODE_TIME_CTL),
1275+ regmap_reg_range(ISL7998X_REG_P5_MIPI_SP_HS_TRL_CTL,
1276+ ISL7998X_REG_P5_PLL_ANA),
1277+ regmap_reg_range(ISL7998X_REG_P5_TOTAL_PF_LINE_CNT_1,
1278+ ISL7998X_REG_P5_HIST_LINE_CNT_2),
1279+ regmap_reg_range(ISL7998X_REG_PX_DEC_PAGE(5),
1280+ ISL7998X_REG_PX_DEC_PAGE(5)),
1281+
1282+ ISL7998X_REG_DECODER_ACA_WRITEABLE_RANGE(0xf),
1283+};
1284+
1285+static const struct regmap_range isl7998x_volatile_ranges[] = {
1286+ /* Product id code register is used to check availability */
1287+ regmap_reg_range(ISL7998X_REG_P0_PRODUCT_ID_CODE,
1288+ ISL7998X_REG_P0_PRODUCT_ID_CODE),
1289+ regmap_reg_range(ISL7998X_REG_P0_MPP1_SYNC_CTL,
1290+ ISL7998X_REG_P0_IRQ_SYNC_CTL),
1291+ regmap_reg_range(ISL7998X_REG_P0_INTERRUPT_STATUS,
1292+ ISL7998X_REG_P0_INTERRUPT_STATUS),
1293+ regmap_reg_range(ISL7998X_REG_P0_CHAN_1_STATUS,
1294+ ISL7998X_REG_P0_SHORT_DIAG_STATUS),
1295+
1296+ ISL7998X_REG_DECODER_ACA_VOLATILE_RANGE(1),
1297+ ISL7998X_REG_DECODER_ACA_VOLATILE_RANGE(2),
1298+ ISL7998X_REG_DECODER_ACA_VOLATILE_RANGE(3),
1299+ ISL7998X_REG_DECODER_ACA_VOLATILE_RANGE(4),
1300+
1301+ regmap_reg_range(ISL7998X_REG_P5_AUTO_TEST_ERR_DET,
1302+ ISL7998X_REG_P5_PIC_HEIGHT_LOW),
1303+};
1304+
1305+static const struct regmap_access_table isl7998x_readable_table = {
1306+ .yes_ranges = isl7998x_readable_ranges,
1307+ .n_yes_ranges = ARRAY_SIZE(isl7998x_readable_ranges),
1308+};
1309+
1310+static const struct regmap_access_table isl7998x_writeable_table = {
1311+ .yes_ranges = isl7998x_writeable_ranges,
1312+ .n_yes_ranges = ARRAY_SIZE(isl7998x_writeable_ranges),
1313+};
1314+
1315+static const struct regmap_access_table isl7998x_volatile_table = {
1316+ .yes_ranges = isl7998x_volatile_ranges,
1317+ .n_yes_ranges = ARRAY_SIZE(isl7998x_volatile_ranges),
1318+};
1319+
1320+static const struct regmap_range_cfg isl7998x_ranges[] = {
1321+ {
1322+ .range_min = ISL7998X_REG_PN_BASE(0),
1323+ .range_max = ISL7998X_REG_PX_ACA_XFER_HIST_HOST(0xf),
1324+ .selector_reg = ISL7998X_REG_PX_DEC_PAGE(0),
1325+ .selector_mask = ISL7998X_REG_PX_DEC_PAGE_MASK,
1326+ .window_start = 0,
1327+ .window_len = 256,
1328+ }
1329+};
1330+
1331+static const struct regmap_config isl7998x_regmap = {
1332+ .reg_bits = 8,
1333+ .val_bits = 8,
1334+ .max_register = ISL7998X_REG_PX_ACA_XFER_HIST_HOST(0xf),
1335+ .ranges = isl7998x_ranges,
1336+ .num_ranges = ARRAY_SIZE(isl7998x_ranges),
1337+ .rd_table = &isl7998x_readable_table,
1338+ .wr_table = &isl7998x_writeable_table,
1339+ .volatile_table = &isl7998x_volatile_table,
1340+ .cache_type = REGCACHE_RBTREE,
1341+};
1342+
1343+static int isl7998x_mc_init(struct isl7998x *isl7998x)
1344+{
1345+ unsigned int i;
1346+
1347+ isl7998x->subdev.entity.ops = &isl7998x_entity_ops;
1348+ isl7998x->subdev.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
1349+
1350+ isl7998x->pads[ISL7998X_PAD_OUT].flags = MEDIA_PAD_FL_SOURCE;
1351+ for (i = ISL7998X_PAD_VIN1; i < ISL7998X_NUM_PADS; i++)
1352+ isl7998x->pads[i].flags = MEDIA_PAD_FL_SINK;
1353+
1354+ return media_entity_pads_init(&isl7998x->subdev.entity,
1355+ ISL7998X_NUM_PADS,
1356+ isl7998x->pads);
1357+}
1358+
1359+static int get_link_freq_menu_index(unsigned int lanes,
1360+ unsigned int inputs)
1361+{
1362+ int ret = -EINVAL;
1363+
1364+ switch (lanes) {
1365+ case 1:
1366+ if (inputs == 1)
1367+ ret = 0;
1368+ if (inputs == 2)
1369+ ret = 1;
1370+ if (inputs == 4)
1371+ ret = 2;
1372+ break;
1373+ case 2:
1374+ if (inputs == 2)
1375+ ret = 0;
1376+ if (inputs == 4)
1377+ ret = 1;
1378+ break;
1379+ default:
1380+ break;
1381+ }
1382+
1383+ return ret;
1384+}
1385+
1386+static void isl7998x_remove_controls(struct isl7998x *isl7998x)
1387+{
1388+ v4l2_ctrl_handler_free(&isl7998x->ctrl_handler);
1389+ mutex_destroy(&isl7998x->ctrl_mutex);
1390+}
1391+
1392+static int isl7998x_init_controls(struct isl7998x *isl7998x)
1393+{
1394+ struct v4l2_subdev *sd = &isl7998x->subdev;
1395+ int link_freq_index;
1396+ unsigned int i;
1397+ int ret;
1398+
1399+ ret = v4l2_ctrl_handler_init(&isl7998x->ctrl_handler,
1400+ 2 + ARRAY_SIZE(isl7998x_ctrls));
1401+ if (ret)
1402+ return ret;
1403+
1404+ mutex_init(&isl7998x->ctrl_mutex);
1405+ isl7998x->ctrl_handler.lock = &isl7998x->ctrl_mutex;
1406+ link_freq_index = get_link_freq_menu_index(isl7998x->nr_mipi_lanes,
1407+ isl7998x->nr_inputs);
1408+ if (link_freq_index < 0 ||
1409+ link_freq_index >= ARRAY_SIZE(link_freq_menu_items)) {
1410+ dev_err(sd->dev,
1411+ "failed to find MIPI link freq: %d lanes, %d inputs\n",
1412+ isl7998x->nr_mipi_lanes, isl7998x->nr_inputs);
1413+ ret = -EINVAL;
1414+ goto err;
1415+ }
1416+
1417+ isl7998x->link_freq = v4l2_ctrl_new_int_menu(&isl7998x->ctrl_handler,
1418+ &isl7998x_ctrl_ops,
1419+ V4L2_CID_LINK_FREQ,
1420+ ARRAY_SIZE(link_freq_menu_items) - 1,
1421+ link_freq_index,
1422+ link_freq_menu_items);
1423+ if (isl7998x->link_freq)
1424+ isl7998x->link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY;
1425+
1426+ for (i = 0; i < ARRAY_SIZE(isl7998x_ctrls); i++)
1427+ v4l2_ctrl_new_custom(&isl7998x->ctrl_handler,
1428+ &isl7998x_ctrls[i], NULL);
1429+
1430+ v4l2_ctrl_new_std_menu_items(&isl7998x->ctrl_handler,
1431+ &isl7998x_ctrl_ops,
1432+ V4L2_CID_TEST_PATTERN,
1433+ ARRAY_SIZE(isl7998x_test_pattern_menu) - 1,
1434+ 0, 0, isl7998x_test_pattern_menu);
1435+
1436+ ret = isl7998x->ctrl_handler.error;
1437+ if (ret)
1438+ goto err;
1439+
1440+ isl7998x->subdev.ctrl_handler = &isl7998x->ctrl_handler;
1441+ v4l2_ctrl_handler_setup(&isl7998x->ctrl_handler);
1442+
1443+ return 0;
1444+
1445+err:
1446+ isl7998x_remove_controls(isl7998x);
1447+
1448+ return ret;
1449+}
1450+
1451+static int isl7998x_probe(struct i2c_client *client)
1452+{
1453+ struct device *dev = &client->dev;
1454+ struct v4l2_fwnode_endpoint endpoint = {
1455+ .bus_type = V4L2_MBUS_CSI2_DPHY,
1456+ };
1457+ struct fwnode_handle *ep;
1458+ struct isl7998x *isl7998x;
1459+ struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent);
1460+ int nr_inputs;
1461+ int ret;
1462+
1463+ ret = i2c_check_functionality(adapter, I2C_FUNC_SMBUS_WORD_DATA);
1464+ if (!ret) {
1465+ dev_warn(&adapter->dev,
1466+ "I2C-Adapter doesn't support I2C_FUNC_SMBUS_WORD\n");
1467+ return -EIO;
1468+ }
1469+
1470+ isl7998x = devm_kzalloc(dev, sizeof(*isl7998x), GFP_KERNEL);
1471+ if (!isl7998x)
1472+ return -ENOMEM;
1473+
1474+ isl7998x->pd_gpio = devm_gpiod_get_optional(dev, "powerdown",
1475+ GPIOD_OUT_HIGH);
1476+ if (IS_ERR(isl7998x->pd_gpio))
1477+ return dev_err_probe(dev, PTR_ERR(isl7998x->pd_gpio),
1478+ "Failed to retrieve/request PD GPIO\n");
1479+
1480+ isl7998x->rstb_gpio = devm_gpiod_get_optional(dev, "reset",
1481+ GPIOD_OUT_HIGH);
1482+ if (IS_ERR(isl7998x->rstb_gpio))
1483+ return dev_err_probe(dev, PTR_ERR(isl7998x->rstb_gpio),
1484+ "Failed to retrieve/request RSTB GPIO\n");
1485+
1486+ isl7998x->regmap = devm_regmap_init_i2c(client, &isl7998x_regmap);
1487+ if (IS_ERR(isl7998x->regmap))
1488+ return dev_err_probe(dev, PTR_ERR(isl7998x->regmap),
1489+ "Failed to allocate register map\n");
1490+
1491+ ep = fwnode_graph_get_endpoint_by_id(dev_fwnode(dev),
1492+ ISL7998X_PAD_OUT, 0, 0);
1493+ if (!ep)
1494+ return dev_err_probe(dev, -EINVAL, "Missing endpoint node\n");
1495+
1496+ ret = v4l2_fwnode_endpoint_parse(ep, &endpoint);
1497+ fwnode_handle_put(ep);
1498+ if (ret)
1499+ return dev_err_probe(dev, ret, "Failed to parse endpoint\n");
1500+
1501+ if (endpoint.bus.mipi_csi2.num_data_lanes == 0 ||
1502+ endpoint.bus.mipi_csi2.num_data_lanes > 2)
1503+ return dev_err_probe(dev, -EINVAL,
1504+ "Invalid number of MIPI lanes\n");
1505+
1506+ isl7998x->nr_mipi_lanes = endpoint.bus.mipi_csi2.num_data_lanes;
1507+
1508+ nr_inputs = isl7998x_get_nr_inputs(dev->of_node);
1509+ if (nr_inputs < 0)
1510+ return dev_err_probe(dev, nr_inputs,
1511+ "Invalid number of input ports\n");
1512+ isl7998x->nr_inputs = nr_inputs;
1513+
1514+ v4l2_i2c_subdev_init(&isl7998x->subdev, client, &isl7998x_subdev_ops);
1515+ isl7998x->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
1516+
1517+ ret = isl7998x_mc_init(isl7998x);
1518+ if (ret < 0)
1519+ return ret;
1520+
1521+ isl7998x->fmt = &isl7998x_colour_fmts[0];
1522+ isl7998x->norm = V4L2_STD_NTSC;
1523+ isl7998x->enabled = 0;
1524+
1525+ mutex_init(&isl7998x->lock);
1526+
1527+ ret = isl7998x_init_controls(isl7998x);
1528+ if (ret)
1529+ goto err_entity_cleanup;
1530+
1531+ ret = v4l2_async_register_subdev(&isl7998x->subdev);
1532+ if (ret < 0)
1533+ goto err_controls_cleanup;
1534+
1535+ pm_runtime_enable(dev);
1536+
1537+ return 0;
1538+
1539+err_controls_cleanup:
1540+ isl7998x_remove_controls(isl7998x);
1541+err_entity_cleanup:
1542+ media_entity_cleanup(&isl7998x->subdev.entity);
1543+
1544+ return ret;
1545+}
1546+
1547+static int isl7998x_remove(struct i2c_client *client)
1548+{
1549+ struct isl7998x *isl7998x = i2c_to_isl7998x(client);
1550+
1551+ pm_runtime_disable(&client->dev);
1552+ v4l2_async_unregister_subdev(&isl7998x->subdev);
1553+ isl7998x_remove_controls(isl7998x);
1554+ media_entity_cleanup(&isl7998x->subdev.entity);
1555+
1556+ return 0;
1557+}
1558+
1559+static const struct of_device_id isl7998x_of_match[] = {
1560+ { .compatible = "isil,isl79987", },
1561+ { /* sentinel */ },
1562+};
1563+MODULE_DEVICE_TABLE(of, isl7998x_of_match);
1564+
1565+static const struct i2c_device_id isl7998x_id[] = {
1566+ { "isl79987", 0 },
1567+ { /* sentinel */ },
1568+};
1569+MODULE_DEVICE_TABLE(i2c, isl7998x_id);
1570+
1571+static int __maybe_unused isl7998x_runtime_resume(struct device *dev)
1572+{
1573+ struct v4l2_subdev *sd = dev_get_drvdata(dev);
1574+ struct isl7998x *isl7998x = sd_to_isl7998x(sd);
1575+ int ret;
1576+
1577+ gpiod_set_value(isl7998x->rstb_gpio, 1);
1578+ gpiod_set_value(isl7998x->pd_gpio, 0);
1579+ gpiod_set_value(isl7998x->rstb_gpio, 0);
1580+
1581+ ret = isl7998x_wait_power_on(isl7998x);
1582+ if (ret)
1583+ goto err;
1584+
1585+ ret = isl7998x_init(isl7998x);
1586+ if (ret)
1587+ goto err;
1588+
1589+ return 0;
1590+
1591+err:
1592+ gpiod_set_value(isl7998x->pd_gpio, 1);
1593+
1594+ return ret;
1595+}
1596+
1597+static int __maybe_unused isl7998x_runtime_suspend(struct device *dev)
1598+{
1599+ struct v4l2_subdev *sd = dev_get_drvdata(dev);
1600+ struct isl7998x *isl7998x = sd_to_isl7998x(sd);
1601+
1602+ gpiod_set_value(isl7998x->pd_gpio, 1);
1603+
1604+ return 0;
1605+}
1606+
1607+static const struct dev_pm_ops isl7998x_pm_ops = {
1608+ SET_RUNTIME_PM_OPS(isl7998x_runtime_suspend,
1609+ isl7998x_runtime_resume,
1610+ NULL)
1611+};
1612+
1613+static struct i2c_driver isl7998x_i2c_driver = {
1614+ .driver = {
1615+ .name = "isl7998x",
1616+ .of_match_table = of_match_ptr(isl7998x_of_match),
1617+ .pm = &isl7998x_pm_ops,
1618+ },
1619+ .probe_new = isl7998x_probe,
1620+ .remove = isl7998x_remove,
1621+ .id_table = isl7998x_id,
1622+};
1623+
1624+module_i2c_driver(isl7998x_i2c_driver);
1625+
1626+MODULE_DESCRIPTION("Intersil ISL7998x Analog to MIPI CSI-2/BT656 decoder");
1627+MODULE_AUTHOR("Marek Vasut <marex@denx.de>");
1628+MODULE_LICENSE("GPL v2");
drivers/media/i2c/m5mols/Kconfig+1−1
@@ -1,7 +1,7 @@
11 # SPDX-License-Identifier: GPL-2.0-only
22 config VIDEO_M5MOLS
33 tristate "Fujitsu M-5MOLS 8MP sensor support"
4− depends on I2C && VIDEO_V4L2
4+ depends on I2C && VIDEO_DEV
55 select MEDIA_CONTROLLER
66 select VIDEO_V4L2_SUBDEV_API
77 help
drivers/media/i2c/m5mols/m5mols.h+3−0
@@ -13,6 +13,7 @@ · 12 unmodified lines
1313 #define M5MOLS_H
1414
1515 #include <linux/sizes.h>
16+#include <linux/gpio/consumer.h>
1617 #include <media/v4l2-subdev.h>
1718 #include "m5mols_reg.h"
1819
@@ -181,6 +182,7 @@ struct m5mols_version { · 162 unmodified lines
181182 * @stabilization: image stabilization control
182183 * @jpeg_quality: JPEG compression quality control
183184 * @set_power: optional power callback to the board code
185+ * @reset: GPIO driving the reset pin of M-5MOLS
184186 * @lock: mutex protecting the structure fields below
185187 * @ffmt: current fmt according to resolution type
186188 * @res_type: current resolution type
@@ -224,6 +226,7 @@ struct m5mols_info { · 37 unmodified lines
224226 struct v4l2_ctrl *jpeg_quality;
225227
226228 int (*set_power)(struct device *dev, int on);
229+ struct gpio_desc *reset;
227230
228231 struct mutex lock;
229232
drivers/media/i2c/m5mols/m5mols_capture.c+0−1
@@ -15,7 +15,6 @@ · 14 unmodified lines
1515 #include <linux/irq.h>
1616 #include <linux/interrupt.h>
1717 #include <linux/delay.h>
18−#include <linux/gpio.h>
1918 #include <linux/regulator/consumer.h>
2019 #include <linux/videodev2.h>
2120 #include <media/v4l2-ctrls.h>
drivers/media/i2c/m5mols/m5mols_core.c+10−19
@@ -14,7 +14,7 @@ · 13 unmodified lines
1414 #include <linux/irq.h>
1515 #include <linux/interrupt.h>
1616 #include <linux/delay.h>
17−#include <linux/gpio.h>
17+#include <linux/gpio/consumer.h>
1818 #include <linux/regulator/consumer.h>
1919 #include <linux/videodev2.h>
2020 #include <linux/module.h>
@@ -752,7 +752,6 @@ static int m5mols_sensor_power(struct m5mols_info *info, bool enable) · 731 unmodified lines
752752 {
753753 struct v4l2_subdev *sd = &info->sd;
754754 struct i2c_client *client = v4l2_get_subdevdata(sd);
755− const struct m5mols_platform_data *pdata = info->pdata;
756755 int ret;
757756
758757 if (info->power == enable)
@@ -772,7 +771,7 @@ static int m5mols_sensor_power(struct m5mols_info *info, bool enable) · 13 unmodified lines
772771 return ret;
773772 }
774773
775− gpio_set_value(pdata->gpio_reset, !pdata->reset_polarity);
774+ gpiod_set_value(info->reset, 0);
776775 info->power = 1;
777776
778777 return ret;
@@ -785,7 +784,7 @@ static int m5mols_sensor_power(struct m5mols_info *info, bool enable) · 6 unmodified lines
785784 if (info->set_power)
786785 info->set_power(&client->dev, 0);
787786
788− gpio_set_value(pdata->gpio_reset, pdata->reset_polarity);
787+ gpiod_set_value(info->reset, 1);
789788
790789 info->isp_ready = 0;
791790 info->power = 0;
@@ -944,7 +943,6 @@ static int m5mols_probe(struct i2c_client *client, · 152 unmodified lines
944943 const struct i2c_device_id *id)
945944 {
946945 const struct m5mols_platform_data *pdata = client->dev.platform_data;
947− unsigned long gpio_flags;
948946 struct m5mols_info *info;
949947 struct v4l2_subdev *sd;
950948 int ret;
@@ -954,11 +952,6 @@ static int m5mols_probe(struct i2c_client *client, · 3 unmodified lines
954952 return -EINVAL;
955953 }
956954
957− if (!gpio_is_valid(pdata->gpio_reset)) {
958− dev_err(&client->dev, "No valid RESET GPIO specified\n");
959− return -EINVAL;
960− }
961−
962955 if (!client->irq) {
963956 dev_err(&client->dev, "Interrupt not assigned\n");
964957 return -EINVAL;
@@ -968,18 +961,16 @@ static int m5mols_probe(struct i2c_client *client, · 3 unmodified lines
968961 if (!info)
969962 return -ENOMEM;
970963
964+ /* This asserts reset, descriptor shall have polarity specified */
965+ info->reset = devm_gpiod_get(&client->dev, "reset", GPIOD_OUT_HIGH);
966+ if (IS_ERR(info->reset))
967+ return PTR_ERR(info->reset);
968+ /* Notice: the "N" in M5MOLS_NRST implies active low */
969+ gpiod_set_consumer_name(info->reset, "M5MOLS_NRST");
970+
971971 info->pdata = pdata;
972972 info->set_power = pdata->set_power;
973973
974− gpio_flags = pdata->reset_polarity
975− ? GPIOF_OUT_INIT_HIGH : GPIOF_OUT_INIT_LOW;
976− ret = devm_gpio_request_one(&client->dev, pdata->gpio_reset, gpio_flags,
977− "M5MOLS_NRST");
978− if (ret) {
979− dev_err(&client->dev, "Failed to request gpio: %d\n", ret);
980− return ret;
981− }
982−
983974 ret = devm_regulator_bulk_get(&client->dev, ARRAY_SIZE(supplies),
984975 supplies);
985976 if (ret) {
drivers/media/i2c/max2175.c+1−1
@@ -257,7 +257,7 @@ static const struct regmap_config max2175_regmap_config = { · 256 unmodified lines
257257 .reg_defaults = max2175_reg_defaults,
258258 .num_reg_defaults = ARRAY_SIZE(max2175_reg_defaults),
259259 .volatile_table = &max2175_volatile_regs,
260− .cache_type = REGCACHE_FLAT,
260+ .cache_type = REGCACHE_RBTREE,
261261 };
262262
263263 struct max2175 {
drivers/media/i2c/max9286.c+95−30
@@ -15,6 +15,7 @@ · 14 unmodified lines
1515 #include <linux/fwnode.h>
1616 #include <linux/gpio/consumer.h>
1717 #include <linux/gpio/driver.h>
18+#include <linux/gpio/machine.h>
1819 #include <linux/i2c.h>
1920 #include <linux/i2c-mux.h>
2021 #include <linux/module.h>
@@ -168,6 +169,8 @@ struct max9286_priv { · 147 unmodified lines
168169 u32 init_rev_chan_mv;
169170 u32 rev_chan_mv;
170171
172+ u32 gpio_poc[2];
173+
171174 struct v4l2_ctrl_handler ctrls;
172175 struct v4l2_ctrl *pixelrate;
173176
@@ -846,6 +849,10 @@ static const struct v4l2_subdev_internal_ops max9286_subdev_internal_ops = { · 672 unmodified lines
846849 .open = max9286_open,
847850 };
848851
852+static const struct media_entity_operations max9286_media_ops = {
853+ .link_validate = v4l2_subdev_link_validate
854+};
855+
849856 static int max9286_s_ctrl(struct v4l2_ctrl *ctrl)
850857 {
851858 switch (ctrl->id) {
@@ -895,6 +902,7 @@ static int max9286_v4l2_register(struct max9286_priv *priv) · 43 unmodified lines
895902 goto err_async;
896903
897904 priv->sd.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
905+ priv->sd.entity.ops = &max9286_media_ops;
898906
899907 priv->pads[MAX9286_SRC_PAD].flags = MEDIA_PAD_FL_SOURCE;
900908 for (i = 0; i < MAX9286_SRC_PAD; i++)
@@ -1025,20 +1033,27 @@ static int max9286_setup(struct max9286_priv *priv) · 124 unmodified lines
10251033 return 0;
10261034 }
10271035
1028−static void max9286_gpio_set(struct gpio_chip *chip,
1029− unsigned int offset, int value)
1036+static int max9286_gpio_set(struct max9286_priv *priv, unsigned int offset,
1037+ int value)
10301038 {
1031− struct max9286_priv *priv = gpiochip_get_data(chip);
1032−
10331039 if (value)
10341040 priv->gpio_state |= BIT(offset);
10351041 else
10361042 priv->gpio_state &= ~BIT(offset);
10371043
1038− max9286_write(priv, 0x0f, MAX9286_0X0F_RESERVED | priv->gpio_state);
1044+ return max9286_write(priv, 0x0f,
1045+ MAX9286_0X0F_RESERVED | priv->gpio_state);
1046+}
1047+
1048+static void max9286_gpiochip_set(struct gpio_chip *chip,
1049+ unsigned int offset, int value)
1050+{
1051+ struct max9286_priv *priv = gpiochip_get_data(chip);
1052+
1053+ max9286_gpio_set(priv, offset, value);
10391054 }
10401055
1041−static int max9286_gpio_get(struct gpio_chip *chip, unsigned int offset)
1056+static int max9286_gpiochip_get(struct gpio_chip *chip, unsigned int offset)
10421057 {
10431058 struct max9286_priv *priv = gpiochip_get_data(chip);
10441059
@@ -1057,13 +1072,10 @@ static int max9286_register_gpio(struct max9286_priv *priv) · 12 unmodified lines
10571072 gpio->owner = THIS_MODULE;
10581073 gpio->ngpio = 2;
10591074 gpio->base = -1;
1060− gpio->set = max9286_gpio_set;
1061− gpio->get = max9286_gpio_get;
1075+ gpio->set = max9286_gpiochip_set;
1076+ gpio->get = max9286_gpiochip_get;
10621077 gpio->can_sleep = true;
10631078
1064− /* GPIO values default to high */
1065− priv->gpio_state = BIT(0) | BIT(1);
1066−
10671079 ret = devm_gpiochip_add_data(dev, gpio, priv);
10681080 if (ret)
10691081 dev_err(dev, "Unable to create gpio_chip\n");
@@ -1071,6 +1083,70 @@ static int max9286_register_gpio(struct max9286_priv *priv) · 1 unmodified line
10711083 return ret;
10721084 }
10731085
1086+static int max9286_parse_gpios(struct max9286_priv *priv)
1087+{
1088+ struct device *dev = &priv->client->dev;
1089+ int ret;
1090+
1091+ /* GPIO values default to high */
1092+ priv->gpio_state = BIT(0) | BIT(1);
1093+
1094+ /*
1095+ * Parse the "gpio-poc" vendor property. If the property is not
1096+ * specified the camera power is controlled by a regulator.
1097+ */
1098+ ret = of_property_read_u32_array(dev->of_node, "maxim,gpio-poc",
1099+ priv->gpio_poc, 2);
1100+ if (ret == -EINVAL) {
1101+ /*
1102+ * If gpio lines are not used for the camera power, register
1103+ * a gpio controller for consumers.
1104+ */
1105+ ret = max9286_register_gpio(priv);
1106+ if (ret)
1107+ return ret;
1108+
1109+ priv->regulator = devm_regulator_get(dev, "poc");
1110+ if (IS_ERR(priv->regulator)) {
1111+ return dev_err_probe(dev, PTR_ERR(priv->regulator),
1112+ "Unable to get PoC regulator (%ld)\n",
1113+ PTR_ERR(priv->regulator));
1114+ }
1115+
1116+ return 0;
1117+ }
1118+
1119+ /* If the property is specified make sure it is well formed. */
1120+ if (ret || priv->gpio_poc[0] > 1 ||
1121+ (priv->gpio_poc[1] != GPIO_ACTIVE_HIGH &&
1122+ priv->gpio_poc[1] != GPIO_ACTIVE_LOW)) {
1123+ dev_err(dev, "Invalid 'gpio-poc' property\n");
1124+ return -EINVAL;
1125+ }
1126+
1127+ return 0;
1128+}
1129+
1130+static int max9286_poc_enable(struct max9286_priv *priv, bool enable)
1131+{
1132+ int ret;
1133+
1134+ /* If the regulator is not available, use gpio to control power. */
1135+ if (!priv->regulator)
1136+ ret = max9286_gpio_set(priv, priv->gpio_poc[0],
1137+ enable ^ priv->gpio_poc[1]);
1138+ else if (enable)
1139+ ret = regulator_enable(priv->regulator);
1140+ else
1141+ ret = regulator_disable(priv->regulator);
1142+
1143+ if (ret < 0)
1144+ dev_err(&priv->client->dev, "Unable to turn power %s\n",
1145+ enable ? "on" : "off");
1146+
1147+ return ret;
1148+}
1149+
10741150 static int max9286_init(struct device *dev)
10751151 {
10761152 struct max9286_priv *priv;
@@ -1080,17 +1156,14 @@ static int max9286_init(struct device *dev) · 3 unmodified lines
10801156 client = to_i2c_client(dev);
10811157 priv = i2c_get_clientdata(client);
10821158
1083− /* Enable the bus power. */
1084− ret = regulator_enable(priv->regulator);
1085− if (ret < 0) {
1086− dev_err(&client->dev, "Unable to turn PoC on\n");
1159+ ret = max9286_poc_enable(priv, true);
1160+ if (ret)
10871161 return ret;
1088− }
10891162
10901163 ret = max9286_setup(priv);
10911164 if (ret) {
10921165 dev_err(dev, "Unable to setup max9286\n");
1093− goto err_regulator;
1166+ goto err_poc_disable;
10941167 }
10951168
10961169 /*
@@ -1100,7 +1173,7 @@ static int max9286_init(struct device *dev) · 3 unmodified lines
11001173 ret = max9286_v4l2_register(priv);
11011174 if (ret) {
11021175 dev_err(dev, "Failed to register with V4L2\n");
1103− goto err_regulator;
1176+ goto err_poc_disable;
11041177 }
11051178
11061179 ret = max9286_i2c_mux_init(priv);
@@ -1116,8 +1189,8 @@ static int max9286_init(struct device *dev) · 9 unmodified lines
11161189
11171190 err_v4l2_register:
11181191 max9286_v4l2_unregister(priv);
1119−err_regulator:
1120− regulator_disable(priv->regulator);
1192+err_poc_disable:
1193+ max9286_poc_enable(priv, false);
11211194
11221195 return ret;
11231196 }
@@ -1288,18 +1361,10 @@ static int max9286_probe(struct i2c_client *client) · 164 unmodified lines
12881361 */
12891362 max9286_configure_i2c(priv, false);
12901363
1291− ret = max9286_register_gpio(priv);
1364+ ret = max9286_parse_gpios(priv);
12921365 if (ret)
12931366 goto err_powerdown;
12941367
1295− priv->regulator = devm_regulator_get(&client->dev, "poc");
1296− if (IS_ERR(priv->regulator)) {
1297− ret = PTR_ERR(priv->regulator);
1298− dev_err_probe(&client->dev, ret,
1299− "Unable to get PoC regulator\n");
1300− goto err_powerdown;
1301− }
1302−
13031368 ret = max9286_parse_dt(priv);
13041369 if (ret)
13051370 goto err_powerdown;
@@ -1326,7 +1391,7 @@ static int max9286_remove(struct i2c_client *client) · 20 unmodified lines
13261391
13271392 max9286_v4l2_unregister(priv);
13281393
1329− regulator_disable(priv->regulator);
1394+ max9286_poc_enable(priv, false);
13301395
13311396 gpiod_set_value_cansleep(priv->gpiod_pwdn, 0);
13321397
drivers/media/i2c/ml86v7667.c+3−2
@@ -223,9 +223,10 @@ static int ml86v7667_get_mbus_config(struct v4l2_subdev *sd, · 222 unmodified lines
223223 unsigned int pad,
224224 struct v4l2_mbus_config *cfg)
225225 {
226− cfg->flags = V4L2_MBUS_MASTER | V4L2_MBUS_PCLK_SAMPLE_RISING |
227− V4L2_MBUS_DATA_ACTIVE_HIGH;
228226 cfg->type = V4L2_MBUS_BT656;
227+ cfg->bus.parallel.flags = V4L2_MBUS_MASTER |
228+ V4L2_MBUS_PCLK_SAMPLE_RISING |
229+ V4L2_MBUS_DATA_ACTIVE_HIGH;
229230
230231 return 0;
231232 }
drivers/media/i2c/mt9m001.c+5−3
@@ -695,10 +695,12 @@ static int mt9m001_get_mbus_config(struct v4l2_subdev *sd, · 694 unmodified lines
695695 struct v4l2_mbus_config *cfg)
696696 {
697697 /* MT9M001 has all capture_format parameters fixed */
698− cfg->flags = V4L2_MBUS_PCLK_SAMPLE_FALLING |
699− V4L2_MBUS_HSYNC_ACTIVE_HIGH | V4L2_MBUS_VSYNC_ACTIVE_HIGH |
700− V4L2_MBUS_DATA_ACTIVE_HIGH | V4L2_MBUS_MASTER;
701698 cfg->type = V4L2_MBUS_PARALLEL;
699+ cfg->bus.parallel.flags = V4L2_MBUS_PCLK_SAMPLE_FALLING |
700+ V4L2_MBUS_HSYNC_ACTIVE_HIGH |
701+ V4L2_MBUS_VSYNC_ACTIVE_HIGH |
702+ V4L2_MBUS_DATA_ACTIVE_HIGH |
703+ V4L2_MBUS_MASTER;
702704
703705 return 0;
704706 }
drivers/media/i2c/mt9m111.c+8−7
@@ -9,7 +9,6 @@ · 8 unmodified lines
99 #include <linux/slab.h>
1010 #include <linux/i2c.h>
1111 #include <linux/log2.h>
12−#include <linux/gpio.h>
1312 #include <linux/delay.h>
1413 #include <linux/regulator/consumer.h>
1514 #include <linux/v4l2-mediabus.h>
@@ -1143,14 +1142,16 @@ static int mt9m111_get_mbus_config(struct v4l2_subdev *sd, · 1127 unmodified lines
11431142 {
11441143 struct mt9m111 *mt9m111 = container_of(sd, struct mt9m111, subdev);
11451144
1146− cfg->flags = V4L2_MBUS_MASTER |
1147− V4L2_MBUS_HSYNC_ACTIVE_HIGH | V4L2_MBUS_VSYNC_ACTIVE_HIGH |
1148− V4L2_MBUS_DATA_ACTIVE_HIGH;
1145+ cfg->type = V4L2_MBUS_PARALLEL;
11491146
1150− cfg->flags |= mt9m111->pclk_sample ? V4L2_MBUS_PCLK_SAMPLE_RISING :
1151− V4L2_MBUS_PCLK_SAMPLE_FALLING;
1147+ cfg->bus.parallel.flags = V4L2_MBUS_MASTER |
1148+ V4L2_MBUS_HSYNC_ACTIVE_HIGH |
1149+ V4L2_MBUS_VSYNC_ACTIVE_HIGH |
1150+ V4L2_MBUS_DATA_ACTIVE_HIGH;
11521151
1153− cfg->type = V4L2_MBUS_PARALLEL;
1152+ cfg->bus.parallel.flags |= mt9m111->pclk_sample ?
1153+ V4L2_MBUS_PCLK_SAMPLE_RISING :
1154+ V4L2_MBUS_PCLK_SAMPLE_FALLING;
11541155
11551156 return 0;
11561157 }
drivers/media/i2c/noon010pc30.c+35−40
@@ -10,7 +10,7 @@ · 9 unmodified lines
1010 */
1111
1212 #include <linux/delay.h>
13−#include <linux/gpio.h>
13+#include <linux/gpio/consumer.h>
1414 #include <linux/i2c.h>
1515 #include <linux/slab.h>
1616 #include <linux/regulator/consumer.h>
@@ -130,8 +130,8 @@ struct noon010_info { · 113 unmodified lines
130130 struct media_pad pad;
131131 struct v4l2_ctrl_handler hdl;
132132 struct regulator_bulk_data supply[NOON010_NUM_SUPPLIES];
133− u32 gpio_nreset;
134− u32 gpio_nstby;
133+ struct gpio_desc *reset;
134+ struct gpio_desc *stby;
135135
136136 /* Protects the struct members below */
137137 struct mutex lock;
@@ -393,29 +393,33 @@ static int power_enable(struct noon010_info *info) · 255 unmodified lines
393393 return 0;
394394 }
395395
396− if (gpio_is_valid(info->gpio_nstby))
397− gpio_set_value(info->gpio_nstby, 0);
396+ /* Assert standby: line should be flagged active low in descriptor */
397+ if (info->stby)
398+ gpiod_set_value(info->stby, 1);
398399
399− if (gpio_is_valid(info->gpio_nreset))
400− gpio_set_value(info->gpio_nreset, 0);
400+ /* Assert reset: line should be flagged active low in descriptor */
401+ if (info->reset)
402+ gpiod_set_value(info->reset, 1);
401403
402404 ret = regulator_bulk_enable(NOON010_NUM_SUPPLIES, info->supply);
403405 if (ret)
404406 return ret;
405407
406− if (gpio_is_valid(info->gpio_nreset)) {
408+ /* De-assert reset and standby */
409+ if (info->reset) {
407410 msleep(50);
408− gpio_set_value(info->gpio_nreset, 1);
411+ gpiod_set_value(info->reset, 0);
409412 }
410− if (gpio_is_valid(info->gpio_nstby)) {
413+ if (info->stby) {
411414 udelay(1000);
412− gpio_set_value(info->gpio_nstby, 1);
415+ gpiod_set_value(info->stby, 0);
413416 }
414− if (gpio_is_valid(info->gpio_nreset)) {
417+ /* Cycle reset: assert and deassert */
418+ if (info->reset) {
415419 udelay(1000);
416− gpio_set_value(info->gpio_nreset, 0);
420+ gpiod_set_value(info->reset, 1);
417421 msleep(100);
418− gpio_set_value(info->gpio_nreset, 1);
422+ gpiod_set_value(info->reset, 0);
419423 msleep(20);
420424 }
421425 info->power = 1;
@@ -438,11 +442,12 @@ static int power_disable(struct noon010_info *info) · 16 unmodified lines
438442 if (ret)
439443 return ret;
440444
441− if (gpio_is_valid(info->gpio_nstby))
442− gpio_set_value(info->gpio_nstby, 0);
445+ /* Assert standby and reset */
446+ if (info->stby)
447+ gpiod_set_value(info->stby, 1);
443448
444− if (gpio_is_valid(info->gpio_nreset))
445− gpio_set_value(info->gpio_nreset, 0);
449+ if (info->reset)
450+ gpiod_set_value(info->reset, 1);
446451
447452 info->power = 0;
448453
@@ -741,34 +746,24 @@ static int noon010_probe(struct i2c_client *client, · 292 unmodified lines
741746 goto np_err;
742747
743748 info->i2c_reg_page = -1;
744− info->gpio_nreset = -EINVAL;
745− info->gpio_nstby = -EINVAL;
746749 info->curr_fmt = &noon010_formats[0];
747750 info->curr_win = &noon010_sizes[0];
748751
749− if (gpio_is_valid(pdata->gpio_nreset)) {
750− ret = devm_gpio_request_one(&client->dev, pdata->gpio_nreset,
751− GPIOF_OUT_INIT_LOW,
752− "NOON010PC30 NRST");
753− if (ret) {
754− dev_err(&client->dev, "GPIO request error: %d\n", ret);
755− goto np_err;
756− }
757− info->gpio_nreset = pdata->gpio_nreset;
758− gpio_export(info->gpio_nreset, 0);
752+ /* Request reset asserted so we get put into reset */
753+ info->reset = devm_gpiod_get(&client->dev, "reset", GPIOD_OUT_HIGH);
754+ if (IS_ERR(info->reset)) {
755+ ret = PTR_ERR(info->reset);
756+ goto np_err;
759757 }
758+ gpiod_set_consumer_name(info->reset, "NOON010PC30 NRST");
760759
761− if (gpio_is_valid(pdata->gpio_nstby)) {
762− ret = devm_gpio_request_one(&client->dev, pdata->gpio_nstby,
763− GPIOF_OUT_INIT_LOW,
764− "NOON010PC30 NSTBY");
765− if (ret) {
766− dev_err(&client->dev, "GPIO request error: %d\n", ret);
767− goto np_err;
768− }
769− info->gpio_nstby = pdata->gpio_nstby;
770− gpio_export(info->gpio_nstby, 0);
760+ /* Request standby asserted so we get put into standby */
761+ info->stby = devm_gpiod_get(&client->dev, "standby", GPIOD_OUT_HIGH);
762+ if (IS_ERR(info->stby)) {
763+ ret = PTR_ERR(info->stby);
764+ goto np_err;
771765 }
766+ gpiod_set_consumer_name(info->reset, "NOON010PC30 STBY");
772767
773768 for (i = 0; i < NOON010_NUM_SUPPLIES; i++)
774769 info->supply[i].supply = noon010_supply_name[i];
drivers/media/i2c/og01a1b.c+1128−0
@@ -0,0 +1,1128 @@
1+// SPDX-License-Identifier: GPL-2.0
2+// Copyright (c) 2022 Intel Corporation.
3+
4+#include <asm/unaligned.h>
5+#include <linux/acpi.h>
6+#include <linux/delay.h>
7+#include <linux/i2c.h>
8+#include <linux/module.h>
9+#include <linux/pm_runtime.h>
10+#include <media/v4l2-ctrls.h>
11+#include <media/v4l2-device.h>
12+#include <media/v4l2-fwnode.h>
13+
14+#define OG01A1B_REG_VALUE_08BIT 1
15+#define OG01A1B_REG_VALUE_16BIT 2
16+#define OG01A1B_REG_VALUE_24BIT 3
17+
18+#define OG01A1B_LINK_FREQ_500MHZ 500000000ULL
19+#define OG01A1B_SCLK 120000000LL
20+#define OG01A1B_MCLK 19200000
21+#define OG01A1B_DATA_LANES 2
22+#define OG01A1B_RGB_DEPTH 10
23+
24+#define OG01A1B_REG_CHIP_ID 0x300a
25+#define OG01A1B_CHIP_ID 0x470141
26+
27+#define OG01A1B_REG_MODE_SELECT 0x0100
28+#define OG01A1B_MODE_STANDBY 0x00
29+#define OG01A1B_MODE_STREAMING 0x01
30+
31+/* vertical-timings from sensor */
32+#define OG01A1B_REG_VTS 0x380e
33+#define OG01A1B_VTS_120FPS 0x0498
34+#define OG01A1B_VTS_120FPS_MIN 0x0498
35+#define OG01A1B_VTS_MAX 0x7fff
36+
37+/* horizontal-timings from sensor */
38+#define OG01A1B_REG_HTS 0x380c
39+
40+/* Exposure controls from sensor */
41+#define OG01A1B_REG_EXPOSURE 0x3501
42+#define OG01A1B_EXPOSURE_MIN 1
43+#define OG01A1B_EXPOSURE_MAX_MARGIN 14
44+#define OG01A1B_EXPOSURE_STEP 1
45+
46+/* Analog gain controls from sensor */
47+#define OG01A1B_REG_ANALOG_GAIN 0x3508
48+#define OG01A1B_ANAL_GAIN_MIN 16
49+#define OG01A1B_ANAL_GAIN_MAX 248 /* Max = 15.5x */
50+#define OG01A1B_ANAL_GAIN_STEP 1
51+
52+/* Digital gain controls from sensor */
53+#define OG01A1B_REG_DIG_GAIN 0x350a
54+#define OG01A1B_DGTL_GAIN_MIN 1024
55+#define OG01A1B_DGTL_GAIN_MAX 16384 /* Max = 16x */
56+#define OG01A1B_DGTL_GAIN_STEP 1
57+#define OG01A1B_DGTL_GAIN_DEFAULT 1024
58+
59+/* Group Access */
60+#define OG01A1B_REG_GROUP_ACCESS 0x3208
61+#define OG01A1B_GROUP_HOLD_START 0x0
62+#define OG01A1B_GROUP_HOLD_END 0x10
63+#define OG01A1B_GROUP_HOLD_LAUNCH 0xa0
64+
65+/* Test Pattern Control */
66+#define OG01A1B_REG_TEST_PATTERN 0x5100
67+#define OG01A1B_TEST_PATTERN_ENABLE BIT(7)
68+#define OG01A1B_TEST_PATTERN_BAR_SHIFT 2
69+
70+#define to_og01a1b(_sd) container_of(_sd, struct og01a1b, sd)
71+
72+enum {
73+ OG01A1B_LINK_FREQ_1000MBPS,
74+};
75+
76+struct og01a1b_reg {
77+ u16 address;
78+ u8 val;
79+};
80+
81+struct og01a1b_reg_list {
82+ u32 num_of_regs;
83+ const struct og01a1b_reg *regs;
84+};
85+
86+struct og01a1b_link_freq_config {
87+ const struct og01a1b_reg_list reg_list;
88+};
89+
90+struct og01a1b_mode {
91+ /* Frame width in pixels */
92+ u32 width;
93+
94+ /* Frame height in pixels */
95+ u32 height;
96+
97+ /* Horizontal timining size */
98+ u32 hts;
99+
100+ /* Default vertical timining size */
101+ u32 vts_def;
102+
103+ /* Min vertical timining size */
104+ u32 vts_min;
105+
106+ /* Link frequency needed for this resolution */
107+ u32 link_freq_index;
108+
109+ /* Sensor register settings for this resolution */
110+ const struct og01a1b_reg_list reg_list;
111+};
112+
113+static const struct og01a1b_reg mipi_data_rate_1000mbps[] = {
114+ {0x0103, 0x01},
115+ {0x0303, 0x02},
116+ {0x0304, 0x00},
117+ {0x0305, 0xd2},
118+ {0x0323, 0x02},
119+ {0x0324, 0x01},
120+ {0x0325, 0x77},
121+};
122+
123+static const struct og01a1b_reg mode_1280x1024_regs[] = {
124+ {0x0300, 0x0a},
125+ {0x0301, 0x29},
126+ {0x0302, 0x31},
127+ {0x0303, 0x02},
128+ {0x0304, 0x00},
129+ {0x0305, 0xd2},
130+ {0x0306, 0x00},
131+ {0x0307, 0x01},
132+ {0x0308, 0x02},
133+ {0x0309, 0x00},
134+ {0x0310, 0x00},
135+ {0x0311, 0x00},
136+ {0x0312, 0x07},
137+ {0x0313, 0x00},
138+ {0x0314, 0x00},
139+ {0x0315, 0x00},
140+ {0x0320, 0x02},
141+ {0x0321, 0x01},
142+ {0x0322, 0x01},
143+ {0x0323, 0x02},
144+ {0x0324, 0x01},
145+ {0x0325, 0x77},
146+ {0x0326, 0xce},
147+ {0x0327, 0x04},
148+ {0x0329, 0x02},
149+ {0x032a, 0x04},
150+ {0x032b, 0x04},
151+ {0x032c, 0x02},
152+ {0x032d, 0x01},
153+ {0x032e, 0x00},
154+ {0x300d, 0x02},
155+ {0x300e, 0x04},
156+ {0x3021, 0x08},
157+ {0x301e, 0x03},
158+ {0x3103, 0x00},
159+ {0x3106, 0x08},
160+ {0x3107, 0x40},
161+ {0x3216, 0x01},
162+ {0x3217, 0x00},
163+ {0x3218, 0xc0},
164+ {0x3219, 0x55},
165+ {0x3500, 0x00},
166+ {0x3501, 0x04},
167+ {0x3502, 0x8a},
168+ {0x3506, 0x01},
169+ {0x3507, 0x72},
170+ {0x3508, 0x01},
171+ {0x3509, 0x00},
172+ {0x350a, 0x01},
173+ {0x350b, 0x00},
174+ {0x350c, 0x00},
175+ {0x3541, 0x00},
176+ {0x3542, 0x40},
177+ {0x3605, 0xe0},
178+ {0x3606, 0x41},
179+ {0x3614, 0x20},
180+ {0x3620, 0x0b},
181+ {0x3630, 0x07},
182+ {0x3636, 0xa0},
183+ {0x3637, 0xf9},
184+ {0x3638, 0x09},
185+ {0x3639, 0x38},
186+ {0x363f, 0x09},
187+ {0x3640, 0x17},
188+ {0x3662, 0x04},
189+ {0x3665, 0x80},
190+ {0x3670, 0x68},
191+ {0x3674, 0x00},
192+ {0x3677, 0x3f},
193+ {0x3679, 0x00},
194+ {0x369f, 0x19},
195+ {0x36a0, 0x03},
196+ {0x36a2, 0x19},
197+ {0x36a3, 0x03},
198+ {0x370d, 0x66},
199+ {0x370f, 0x00},
200+ {0x3710, 0x03},
201+ {0x3715, 0x03},
202+ {0x3716, 0x03},
203+ {0x3717, 0x06},
204+ {0x3733, 0x00},
205+ {0x3778, 0x00},
206+ {0x37a8, 0x0f},
207+ {0x37a9, 0x01},
208+ {0x37aa, 0x07},
209+ {0x37bd, 0x1c},
210+ {0x37c1, 0x2f},
211+ {0x37c3, 0x09},
212+ {0x37c8, 0x1d},
213+ {0x37ca, 0x30},
214+ {0x37df, 0x00},
215+ {0x3800, 0x00},
216+ {0x3801, 0x00},
217+ {0x3802, 0x00},
218+ {0x3803, 0x00},
219+ {0x3804, 0x05},
220+ {0x3805, 0x0f},
221+ {0x3806, 0x04},
222+ {0x3807, 0x0f},
223+ {0x3808, 0x05},
224+ {0x3809, 0x00},
225+ {0x380a, 0x04},
226+ {0x380b, 0x00},
227+ {0x380c, 0x03},
228+ {0x380d, 0x50},
229+ {0x380e, 0x04},
230+ {0x380f, 0x98},
231+ {0x3810, 0x00},
232+ {0x3811, 0x08},
233+ {0x3812, 0x00},
234+ {0x3813, 0x08},
235+ {0x3814, 0x11},
236+ {0x3815, 0x11},
237+ {0x3820, 0x40},
238+ {0x3821, 0x04},
239+ {0x3826, 0x00},
240+ {0x3827, 0x00},
241+ {0x382a, 0x08},
242+ {0x382b, 0x52},
243+ {0x382d, 0xba},
244+ {0x383d, 0x14},
245+ {0x384a, 0xa2},
246+ {0x3866, 0x0e},
247+ {0x3867, 0x07},
248+ {0x3884, 0x00},
249+ {0x3885, 0x08},
250+ {0x3893, 0x68},
251+ {0x3894, 0x2a},
252+ {0x3898, 0x00},
253+ {0x3899, 0x31},
254+ {0x389a, 0x04},
255+ {0x389b, 0x00},
256+ {0x389c, 0x0b},
257+ {0x389d, 0xad},
258+ {0x389f, 0x08},
259+ {0x38a0, 0x00},
260+ {0x38a1, 0x00},
261+ {0x38a8, 0x70},
262+ {0x38ac, 0xea},
263+ {0x38b2, 0x00},
264+ {0x38b3, 0x08},
265+ {0x38bc, 0x20},
266+ {0x38c4, 0x0c},
267+ {0x38c5, 0x3a},
268+ {0x38c7, 0x3a},
269+ {0x38e1, 0xc0},
270+ {0x38ec, 0x3c},
271+ {0x38f0, 0x09},
272+ {0x38f1, 0x6f},
273+ {0x38fe, 0x3c},
274+ {0x391e, 0x00},
275+ {0x391f, 0x00},
276+ {0x3920, 0xa5},
277+ {0x3921, 0x00},
278+ {0x3922, 0x00},
279+ {0x3923, 0x00},
280+ {0x3924, 0x05},
281+ {0x3925, 0x00},
282+ {0x3926, 0x00},
283+ {0x3927, 0x00},
284+ {0x3928, 0x1a},
285+ {0x3929, 0x01},
286+ {0x392a, 0xb4},
287+ {0x392b, 0x00},
288+ {0x392c, 0x10},
289+ {0x392f, 0x40},
290+ {0x4000, 0xcf},
291+ {0x4003, 0x40},
292+ {0x4008, 0x00},
293+ {0x4009, 0x07},
294+ {0x400a, 0x02},
295+ {0x400b, 0x54},
296+ {0x400c, 0x00},
297+ {0x400d, 0x07},
298+ {0x4010, 0xc0},
299+ {0x4012, 0x02},
300+ {0x4014, 0x04},
301+ {0x4015, 0x04},
302+ {0x4017, 0x02},
303+ {0x4042, 0x01},
304+ {0x4306, 0x04},
305+ {0x4307, 0x12},
306+ {0x4509, 0x00},
307+ {0x450b, 0x83},
308+ {0x4604, 0x68},
309+ {0x4608, 0x0a},
310+ {0x4700, 0x06},
311+ {0x4800, 0x64},
312+ {0x481b, 0x3c},
313+ {0x4825, 0x32},
314+ {0x4833, 0x18},
315+ {0x4837, 0x0f},
316+ {0x4850, 0x40},
317+ {0x4860, 0x00},
318+ {0x4861, 0xec},
319+ {0x4864, 0x00},
320+ {0x4883, 0x00},
321+ {0x4888, 0x90},
322+ {0x4889, 0x05},
323+ {0x488b, 0x04},
324+ {0x4f00, 0x04},
325+ {0x4f10, 0x04},
326+ {0x4f21, 0x01},
327+ {0x4f22, 0x40},
328+ {0x4f23, 0x44},
329+ {0x4f24, 0x51},
330+ {0x4f25, 0x41},
331+ {0x5000, 0x1f},
332+ {0x500a, 0x00},
333+ {0x5100, 0x00},
334+ {0x5111, 0x20},
335+ {0x3020, 0x20},
336+ {0x3613, 0x03},
337+ {0x38c9, 0x02},
338+ {0x5304, 0x01},
339+ {0x3620, 0x08},
340+ {0x3639, 0x58},
341+ {0x363a, 0x10},
342+ {0x3674, 0x04},
343+ {0x3780, 0xff},
344+ {0x3781, 0xff},
345+ {0x3782, 0x00},
346+ {0x3783, 0x01},
347+ {0x3798, 0xa3},
348+ {0x37aa, 0x10},
349+ {0x38a8, 0xf0},
350+ {0x38c4, 0x09},
351+ {0x38c5, 0xb0},
352+ {0x38df, 0x80},
353+ {0x38ff, 0x05},
354+ {0x4010, 0xf1},
355+ {0x4011, 0x70},
356+ {0x3667, 0x80},
357+ {0x4d00, 0x4a},
358+ {0x4d01, 0x18},
359+ {0x4d02, 0xbb},
360+ {0x4d03, 0xde},
361+ {0x4d04, 0x93},
362+ {0x4d05, 0xff},
363+ {0x4d09, 0x0a},
364+ {0x37aa, 0x16},
365+ {0x3606, 0x42},
366+ {0x3605, 0x00},
367+ {0x36a2, 0x17},
368+ {0x300d, 0x0a},
369+ {0x4d00, 0x4d},
370+ {0x4d01, 0x95},
371+ {0x3d8C, 0x70},
372+ {0x3d8d, 0xE9},
373+ {0x5300, 0x00},
374+ {0x5301, 0x10},
375+ {0x5302, 0x00},
376+ {0x5303, 0xE3},
377+ {0x3d88, 0x00},
378+ {0x3d89, 0x10},
379+ {0x3d8a, 0x00},
380+ {0x3d8b, 0xE3},
381+ {0x4f22, 0x00},
382+};
383+
384+static const char * const og01a1b_test_pattern_menu[] = {
385+ "Disabled",
386+ "Standard Color Bar",
387+ "Top-Bottom Darker Color Bar",
388+ "Right-Left Darker Color Bar",
389+ "Bottom-Top Darker Color Bar"
390+};
391+
392+static const s64 link_freq_menu_items[] = {
393+ OG01A1B_LINK_FREQ_500MHZ,
394+};
395+
396+static const struct og01a1b_link_freq_config link_freq_configs[] = {
397+ [OG01A1B_LINK_FREQ_1000MBPS] = {
398+ .reg_list = {
399+ .num_of_regs = ARRAY_SIZE(mipi_data_rate_1000mbps),
400+ .regs = mipi_data_rate_1000mbps,
401+ }
402+ }
403+};
404+
405+static const struct og01a1b_mode supported_modes[] = {
406+ {
407+ .width = 1280,
408+ .height = 1024,
409+ .hts = 848,
410+ .vts_def = OG01A1B_VTS_120FPS,
411+ .vts_min = OG01A1B_VTS_120FPS_MIN,
412+ .reg_list = {
413+ .num_of_regs = ARRAY_SIZE(mode_1280x1024_regs),
414+ .regs = mode_1280x1024_regs,
415+ },
416+ .link_freq_index = OG01A1B_LINK_FREQ_1000MBPS,
417+ },
418+};
419+
420+struct og01a1b {
421+ struct v4l2_subdev sd;
422+ struct media_pad pad;
423+ struct v4l2_ctrl_handler ctrl_handler;
424+
425+ /* V4L2 Controls */
426+ struct v4l2_ctrl *link_freq;
427+ struct v4l2_ctrl *pixel_rate;
428+ struct v4l2_ctrl *vblank;
429+ struct v4l2_ctrl *hblank;
430+ struct v4l2_ctrl *exposure;
431+
432+ /* Current mode */
433+ const struct og01a1b_mode *cur_mode;
434+
435+ /* To serialize asynchronus callbacks */
436+ struct mutex mutex;
437+
438+ /* Streaming on/off */
439+ bool streaming;
440+};
441+
442+static u64 to_pixel_rate(u32 f_index)
443+{
444+ u64 pixel_rate = link_freq_menu_items[f_index] * 2 * OG01A1B_DATA_LANES;
445+
446+ do_div(pixel_rate, OG01A1B_RGB_DEPTH);
447+
448+ return pixel_rate;
449+}
450+
451+static u64 to_pixels_per_line(u32 hts, u32 f_index)
452+{
453+ u64 ppl = hts * to_pixel_rate(f_index);
454+
455+ do_div(ppl, OG01A1B_SCLK);
456+
457+ return ppl;
458+}
459+
460+static int og01a1b_read_reg(struct og01a1b *og01a1b, u16 reg, u16 len, u32 *val)
461+{
462+ struct i2c_client *client = v4l2_get_subdevdata(&og01a1b->sd);
463+ struct i2c_msg msgs[2];
464+ u8 addr_buf[2];
465+ u8 data_buf[4] = {0};
466+ int ret;
467+
468+ if (len > 4)
469+ return -EINVAL;
470+
471+ put_unaligned_be16(reg, addr_buf);
472+ msgs[0].addr = client->addr;
473+ msgs[0].flags = 0;
474+ msgs[0].len = sizeof(addr_buf);
475+ msgs[0].buf = addr_buf;
476+ msgs[1].addr = client->addr;
477+ msgs[1].flags = I2C_M_RD;
478+ msgs[1].len = len;
479+ msgs[1].buf = &data_buf[4 - len];
480+
481+ ret = i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs));
482+ if (ret != ARRAY_SIZE(msgs))
483+ return -EIO;
484+
485+ *val = get_unaligned_be32(data_buf);
486+
487+ return 0;
488+}
489+
490+static int og01a1b_write_reg(struct og01a1b *og01a1b, u16 reg, u16 len, u32 val)
491+{
492+ struct i2c_client *client = v4l2_get_subdevdata(&og01a1b->sd);
493+ u8 buf[6];
494+
495+ if (len > 4)
496+ return -EINVAL;
497+
498+ put_unaligned_be16(reg, buf);
499+ put_unaligned_be32(val << 8 * (4 - len), buf + 2);
500+ if (i2c_master_send(client, buf, len + 2) != len + 2)
501+ return -EIO;
502+
503+ return 0;
504+}
505+
506+static int og01a1b_write_reg_list(struct og01a1b *og01a1b,
507+ const struct og01a1b_reg_list *r_list)
508+{
509+ struct i2c_client *client = v4l2_get_subdevdata(&og01a1b->sd);
510+ unsigned int i;
511+ int ret;
512+
513+ for (i = 0; i < r_list->num_of_regs; i++) {
514+ ret = og01a1b_write_reg(og01a1b, r_list->regs[i].address, 1,
515+ r_list->regs[i].val);
516+ if (ret) {
517+ dev_err_ratelimited(&client->dev,
518+ "failed to write reg 0x%4.4x. error = %d",
519+ r_list->regs[i].address, ret);
520+ return ret;
521+ }
522+ }
523+
524+ return 0;
525+}
526+
527+static int og01a1b_test_pattern(struct og01a1b *og01a1b, u32 pattern)
528+{
529+ if (pattern)
530+ pattern = (pattern - 1) << OG01A1B_TEST_PATTERN_BAR_SHIFT |
531+ OG01A1B_TEST_PATTERN_ENABLE;
532+
533+ return og01a1b_write_reg(og01a1b, OG01A1B_REG_TEST_PATTERN,
534+ OG01A1B_REG_VALUE_08BIT, pattern);
535+}
536+
537+static int og01a1b_set_ctrl(struct v4l2_ctrl *ctrl)
538+{
539+ struct og01a1b *og01a1b = container_of(ctrl->handler,
540+ struct og01a1b, ctrl_handler);
541+ struct i2c_client *client = v4l2_get_subdevdata(&og01a1b->sd);
542+ s64 exposure_max;
543+ int ret = 0;
544+
545+ /* Propagate change of current control to all related controls */
546+ if (ctrl->id == V4L2_CID_VBLANK) {
547+ /* Update max exposure while meeting expected vblanking */
548+ exposure_max = og01a1b->cur_mode->height + ctrl->val -
549+ OG01A1B_EXPOSURE_MAX_MARGIN;
550+ __v4l2_ctrl_modify_range(og01a1b->exposure,
551+ og01a1b->exposure->minimum,
552+ exposure_max, og01a1b->exposure->step,
553+ exposure_max);
554+ }
555+
556+ /* V4L2 controls values will be applied only when power is already up */
557+ if (!pm_runtime_get_if_in_use(&client->dev))
558+ return 0;
559+
560+ switch (ctrl->id) {
561+ case V4L2_CID_ANALOGUE_GAIN:
562+ ret = og01a1b_write_reg(og01a1b, OG01A1B_REG_ANALOG_GAIN,
563+ OG01A1B_REG_VALUE_16BIT,
564+ ctrl->val << 4);
565+ break;
566+
567+ case V4L2_CID_DIGITAL_GAIN:
568+ ret = og01a1b_write_reg(og01a1b, OG01A1B_REG_DIG_GAIN,
569+ OG01A1B_REG_VALUE_24BIT,
570+ ctrl->val << 6);
571+ break;
572+
573+ case V4L2_CID_EXPOSURE:
574+ ret = og01a1b_write_reg(og01a1b, OG01A1B_REG_EXPOSURE,
575+ OG01A1B_REG_VALUE_16BIT, ctrl->val);
576+ break;
577+
578+ case V4L2_CID_VBLANK:
579+ ret = og01a1b_write_reg(og01a1b, OG01A1B_REG_VTS,
580+ OG01A1B_REG_VALUE_16BIT,
581+ og01a1b->cur_mode->height + ctrl->val);
582+ break;
583+
584+ case V4L2_CID_TEST_PATTERN:
585+ ret = og01a1b_test_pattern(og01a1b, ctrl->val);
586+ break;
587+
588+ default:
589+ ret = -EINVAL;
590+ break;
591+ }
592+
593+ pm_runtime_put(&client->dev);
594+
595+ return ret;
596+}
597+
598+static const struct v4l2_ctrl_ops og01a1b_ctrl_ops = {
599+ .s_ctrl = og01a1b_set_ctrl,
600+};
601+
602+static int og01a1b_init_controls(struct og01a1b *og01a1b)
603+{
604+ struct v4l2_ctrl_handler *ctrl_hdlr;
605+ s64 exposure_max, h_blank;
606+ int ret;
607+
608+ ctrl_hdlr = &og01a1b->ctrl_handler;
609+ ret = v4l2_ctrl_handler_init(ctrl_hdlr, 8);
610+ if (ret)
611+ return ret;
612+
613+ ctrl_hdlr->lock = &og01a1b->mutex;
614+ og01a1b->link_freq = v4l2_ctrl_new_int_menu(ctrl_hdlr,
615+ &og01a1b_ctrl_ops,
616+ V4L2_CID_LINK_FREQ,
617+ ARRAY_SIZE
618+ (link_freq_menu_items) - 1,
619+ 0, link_freq_menu_items);
620+ if (og01a1b->link_freq)
621+ og01a1b->link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY;
622+
623+ og01a1b->pixel_rate = v4l2_ctrl_new_std(ctrl_hdlr, &og01a1b_ctrl_ops,
624+ V4L2_CID_PIXEL_RATE, 0,
625+ to_pixel_rate
626+ (OG01A1B_LINK_FREQ_1000MBPS),
627+ 1,
628+ to_pixel_rate
629+ (OG01A1B_LINK_FREQ_1000MBPS));
630+ og01a1b->vblank = v4l2_ctrl_new_std(ctrl_hdlr, &og01a1b_ctrl_ops,
631+ V4L2_CID_VBLANK,
632+ og01a1b->cur_mode->vts_min -
633+ og01a1b->cur_mode->height,
634+ OG01A1B_VTS_MAX -
635+ og01a1b->cur_mode->height, 1,
636+ og01a1b->cur_mode->vts_def -
637+ og01a1b->cur_mode->height);
638+ h_blank = to_pixels_per_line(og01a1b->cur_mode->hts,
639+ og01a1b->cur_mode->link_freq_index) -
640+ og01a1b->cur_mode->width;
641+ og01a1b->hblank = v4l2_ctrl_new_std(ctrl_hdlr, &og01a1b_ctrl_ops,
642+ V4L2_CID_HBLANK, h_blank, h_blank,
643+ 1, h_blank);
644+ if (og01a1b->hblank)
645+ og01a1b->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY;
646+
647+ v4l2_ctrl_new_std(ctrl_hdlr, &og01a1b_ctrl_ops, V4L2_CID_ANALOGUE_GAIN,
648+ OG01A1B_ANAL_GAIN_MIN, OG01A1B_ANAL_GAIN_MAX,
649+ OG01A1B_ANAL_GAIN_STEP, OG01A1B_ANAL_GAIN_MIN);
650+ v4l2_ctrl_new_std(ctrl_hdlr, &og01a1b_ctrl_ops, V4L2_CID_DIGITAL_GAIN,
651+ OG01A1B_DGTL_GAIN_MIN, OG01A1B_DGTL_GAIN_MAX,
652+ OG01A1B_DGTL_GAIN_STEP, OG01A1B_DGTL_GAIN_DEFAULT);
653+ exposure_max = (og01a1b->cur_mode->vts_def -
654+ OG01A1B_EXPOSURE_MAX_MARGIN);
655+ og01a1b->exposure = v4l2_ctrl_new_std(ctrl_hdlr, &og01a1b_ctrl_ops,
656+ V4L2_CID_EXPOSURE,
657+ OG01A1B_EXPOSURE_MIN,
658+ exposure_max,
659+ OG01A1B_EXPOSURE_STEP,
660+ exposure_max);
661+ v4l2_ctrl_new_std_menu_items(ctrl_hdlr, &og01a1b_ctrl_ops,
662+ V4L2_CID_TEST_PATTERN,
663+ ARRAY_SIZE(og01a1b_test_pattern_menu) - 1,
664+ 0, 0, og01a1b_test_pattern_menu);
665+
666+ if (ctrl_hdlr->error)
667+ return ctrl_hdlr->error;
668+
669+ og01a1b->sd.ctrl_handler = ctrl_hdlr;
670+
671+ return 0;
672+}
673+
674+static void og01a1b_update_pad_format(const struct og01a1b_mode *mode,
675+ struct v4l2_mbus_framefmt *fmt)
676+{
677+ fmt->width = mode->width;
678+ fmt->height = mode->height;
679+ fmt->code = MEDIA_BUS_FMT_SGRBG10_1X10;
680+ fmt->field = V4L2_FIELD_NONE;
681+}
682+
683+static int og01a1b_start_streaming(struct og01a1b *og01a1b)
684+{
685+ struct i2c_client *client = v4l2_get_subdevdata(&og01a1b->sd);
686+ const struct og01a1b_reg_list *reg_list;
687+ int link_freq_index, ret;
688+
689+ link_freq_index = og01a1b->cur_mode->link_freq_index;
690+ reg_list = &link_freq_configs[link_freq_index].reg_list;
691+
692+ ret = og01a1b_write_reg_list(og01a1b, reg_list);
693+ if (ret) {
694+ dev_err(&client->dev, "failed to set plls");
695+ return ret;
696+ }
697+
698+ reg_list = &og01a1b->cur_mode->reg_list;
699+ ret = og01a1b_write_reg_list(og01a1b, reg_list);
700+ if (ret) {
701+ dev_err(&client->dev, "failed to set mode");
702+ return ret;
703+ }
704+
705+ ret = __v4l2_ctrl_handler_setup(og01a1b->sd.ctrl_handler);
706+ if (ret)
707+ return ret;
708+
709+ ret = og01a1b_write_reg(og01a1b, OG01A1B_REG_MODE_SELECT,
710+ OG01A1B_REG_VALUE_08BIT,
711+ OG01A1B_MODE_STREAMING);
712+ if (ret) {
713+ dev_err(&client->dev, "failed to set stream");
714+ return ret;
715+ }
716+
717+ return 0;
718+}
719+
720+static void og01a1b_stop_streaming(struct og01a1b *og01a1b)
721+{
722+ struct i2c_client *client = v4l2_get_subdevdata(&og01a1b->sd);
723+
724+ if (og01a1b_write_reg(og01a1b, OG01A1B_REG_MODE_SELECT,
725+ OG01A1B_REG_VALUE_08BIT, OG01A1B_MODE_STANDBY))
726+ dev_err(&client->dev, "failed to set stream");
727+}
728+
729+static int og01a1b_set_stream(struct v4l2_subdev *sd, int enable)
730+{
731+ struct og01a1b *og01a1b = to_og01a1b(sd);
732+ struct i2c_client *client = v4l2_get_subdevdata(sd);
733+ int ret = 0;
734+
735+ if (og01a1b->streaming == enable)
736+ return 0;
737+
738+ mutex_lock(&og01a1b->mutex);
739+ if (enable) {
740+ ret = pm_runtime_get_sync(&client->dev);
741+ if (ret < 0) {
742+ pm_runtime_put_noidle(&client->dev);
743+ mutex_unlock(&og01a1b->mutex);
744+ return ret;
745+ }
746+
747+ ret = og01a1b_start_streaming(og01a1b);
748+ if (ret) {
749+ enable = 0;
750+ og01a1b_stop_streaming(og01a1b);
751+ pm_runtime_put(&client->dev);
752+ }
753+ } else {
754+ og01a1b_stop_streaming(og01a1b);
755+ pm_runtime_put(&client->dev);
756+ }
757+
758+ og01a1b->streaming = enable;
759+ mutex_unlock(&og01a1b->mutex);
760+
761+ return ret;
762+}
763+
764+static int __maybe_unused og01a1b_suspend(struct device *dev)
765+{
766+ struct i2c_client *client = to_i2c_client(dev);
767+ struct v4l2_subdev *sd = i2c_get_clientdata(client);
768+ struct og01a1b *og01a1b = to_og01a1b(sd);
769+
770+ mutex_lock(&og01a1b->mutex);
771+ if (og01a1b->streaming)
772+ og01a1b_stop_streaming(og01a1b);
773+
774+ mutex_unlock(&og01a1b->mutex);
775+
776+ return 0;
777+}
778+
779+static int __maybe_unused og01a1b_resume(struct device *dev)
780+{
781+ struct i2c_client *client = to_i2c_client(dev);
782+ struct v4l2_subdev *sd = i2c_get_clientdata(client);
783+ struct og01a1b *og01a1b = to_og01a1b(sd);
784+ int ret;
785+
786+ mutex_lock(&og01a1b->mutex);
787+ if (og01a1b->streaming) {
788+ ret = og01a1b_start_streaming(og01a1b);
789+ if (ret) {
790+ og01a1b->streaming = false;
791+ og01a1b_stop_streaming(og01a1b);
792+ mutex_unlock(&og01a1b->mutex);
793+ return ret;
794+ }
795+ }
796+
797+ mutex_unlock(&og01a1b->mutex);
798+
799+ return 0;
800+}
801+
802+static int og01a1b_set_format(struct v4l2_subdev *sd,
803+ struct v4l2_subdev_state *sd_state,
804+ struct v4l2_subdev_format *fmt)
805+{
806+ struct og01a1b *og01a1b = to_og01a1b(sd);
807+ const struct og01a1b_mode *mode;
808+ s32 vblank_def, h_blank;
809+
810+ mode = v4l2_find_nearest_size(supported_modes,
811+ ARRAY_SIZE(supported_modes), width,
812+ height, fmt->format.width,
813+ fmt->format.height);
814+
815+ mutex_lock(&og01a1b->mutex);
816+ og01a1b_update_pad_format(mode, &fmt->format);
817+ if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) {
818+ *v4l2_subdev_get_try_format(sd, sd_state,
819+ fmt->pad) = fmt->format;
820+ } else {
821+ og01a1b->cur_mode = mode;
822+ __v4l2_ctrl_s_ctrl(og01a1b->link_freq, mode->link_freq_index);
823+ __v4l2_ctrl_s_ctrl_int64(og01a1b->pixel_rate,
824+ to_pixel_rate(mode->link_freq_index));
825+
826+ /* Update limits and set FPS to default */
827+ vblank_def = mode->vts_def - mode->height;
828+ __v4l2_ctrl_modify_range(og01a1b->vblank,
829+ mode->vts_min - mode->height,
830+ OG01A1B_VTS_MAX - mode->height, 1,
831+ vblank_def);
832+ __v4l2_ctrl_s_ctrl(og01a1b->vblank, vblank_def);
833+ h_blank = to_pixels_per_line(mode->hts, mode->link_freq_index) -
834+ mode->width;
835+ __v4l2_ctrl_modify_range(og01a1b->hblank, h_blank, h_blank, 1,
836+ h_blank);
837+ }
838+
839+ mutex_unlock(&og01a1b->mutex);
840+
841+ return 0;
842+}
843+
844+static int og01a1b_get_format(struct v4l2_subdev *sd,
845+ struct v4l2_subdev_state *sd_state,
846+ struct v4l2_subdev_format *fmt)
847+{
848+ struct og01a1b *og01a1b = to_og01a1b(sd);
849+
850+ mutex_lock(&og01a1b->mutex);
851+ if (fmt->which == V4L2_SUBDEV_FORMAT_TRY)
852+ fmt->format = *v4l2_subdev_get_try_format(&og01a1b->sd,
853+ sd_state,
854+ fmt->pad);
855+ else
856+ og01a1b_update_pad_format(og01a1b->cur_mode, &fmt->format);
857+
858+ mutex_unlock(&og01a1b->mutex);
859+
860+ return 0;
861+}
862+
863+static int og01a1b_enum_mbus_code(struct v4l2_subdev *sd,
864+ struct v4l2_subdev_state *sd_state,
865+ struct v4l2_subdev_mbus_code_enum *code)
866+{
867+ if (code->index > 0)
868+ return -EINVAL;
869+
870+ code->code = MEDIA_BUS_FMT_SGRBG10_1X10;
871+
872+ return 0;
873+}
874+
875+static int og01a1b_enum_frame_size(struct v4l2_subdev *sd,
876+ struct v4l2_subdev_state *sd_state,
877+ struct v4l2_subdev_frame_size_enum *fse)
878+{
879+ if (fse->index >= ARRAY_SIZE(supported_modes))
880+ return -EINVAL;
881+
882+ if (fse->code != MEDIA_BUS_FMT_SGRBG10_1X10)
883+ return -EINVAL;
884+
885+ fse->min_width = supported_modes[fse->index].width;
886+ fse->max_width = fse->min_width;
887+ fse->min_height = supported_modes[fse->index].height;
888+ fse->max_height = fse->min_height;
889+
890+ return 0;
891+}
892+
893+static int og01a1b_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
894+{
895+ struct og01a1b *og01a1b = to_og01a1b(sd);
896+
897+ mutex_lock(&og01a1b->mutex);
898+ og01a1b_update_pad_format(&supported_modes[0],
899+ v4l2_subdev_get_try_format(sd, fh->state, 0));
900+ mutex_unlock(&og01a1b->mutex);
901+
902+ return 0;
903+}
904+
905+static const struct v4l2_subdev_video_ops og01a1b_video_ops = {
906+ .s_stream = og01a1b_set_stream,
907+};
908+
909+static const struct v4l2_subdev_pad_ops og01a1b_pad_ops = {
910+ .set_fmt = og01a1b_set_format,
911+ .get_fmt = og01a1b_get_format,
912+ .enum_mbus_code = og01a1b_enum_mbus_code,
913+ .enum_frame_size = og01a1b_enum_frame_size,
914+};
915+
916+static const struct v4l2_subdev_ops og01a1b_subdev_ops = {
917+ .video = &og01a1b_video_ops,
918+ .pad = &og01a1b_pad_ops,
919+};
920+
921+static const struct media_entity_operations og01a1b_subdev_entity_ops = {
922+ .link_validate = v4l2_subdev_link_validate,
923+};
924+
925+static const struct v4l2_subdev_internal_ops og01a1b_internal_ops = {
926+ .open = og01a1b_open,
927+};
928+
929+static int og01a1b_identify_module(struct og01a1b *og01a1b)
930+{
931+ struct i2c_client *client = v4l2_get_subdevdata(&og01a1b->sd);
932+ int ret;
933+ u32 val;
934+
935+ ret = og01a1b_read_reg(og01a1b, OG01A1B_REG_CHIP_ID,
936+ OG01A1B_REG_VALUE_24BIT, &val);
937+ if (ret)
938+ return ret;
939+
940+ if (val != OG01A1B_CHIP_ID) {
941+ dev_err(&client->dev, "chip id mismatch: %x!=%x",
942+ OG01A1B_CHIP_ID, val);
943+ return -ENXIO;
944+ }
945+
946+ return 0;
947+}
948+
949+static int og01a1b_check_hwcfg(struct device *dev)
950+{
951+ struct fwnode_handle *ep;
952+ struct fwnode_handle *fwnode = dev_fwnode(dev);
953+ struct v4l2_fwnode_endpoint bus_cfg = {
954+ .bus_type = V4L2_MBUS_CSI2_DPHY
955+ };
956+ u32 mclk;
957+ int ret;
958+ unsigned int i, j;
959+
960+ if (!fwnode)
961+ return -ENXIO;
962+
963+ ret = fwnode_property_read_u32(fwnode, "clock-frequency", &mclk);
964+
965+ if (ret) {
966+ dev_err(dev, "can't get clock frequency");
967+ return ret;
968+ }
969+
970+ if (mclk != OG01A1B_MCLK) {
971+ dev_err(dev, "external clock %d is not supported", mclk);
972+ return -EINVAL;
973+ }
974+
975+ ep = fwnode_graph_get_next_endpoint(fwnode, NULL);
976+ if (!ep)
977+ return -ENXIO;
978+
979+ ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
980+ fwnode_handle_put(ep);
981+ if (ret)
982+ return ret;
983+
984+ if (bus_cfg.bus.mipi_csi2.num_data_lanes != OG01A1B_DATA_LANES) {
985+ dev_err(dev, "number of CSI2 data lanes %d is not supported",
986+ bus_cfg.bus.mipi_csi2.num_data_lanes);
987+ ret = -EINVAL;
988+ goto check_hwcfg_error;
989+ }
990+
991+ if (!bus_cfg.nr_of_link_frequencies) {
992+ dev_err(dev, "no link frequencies defined");
993+ ret = -EINVAL;
994+ goto check_hwcfg_error;
995+ }
996+
997+ for (i = 0; i < ARRAY_SIZE(link_freq_menu_items); i++) {
998+ for (j = 0; j < bus_cfg.nr_of_link_frequencies; j++) {
999+ if (link_freq_menu_items[i] ==
1000+ bus_cfg.link_frequencies[j])
1001+ break;
1002+ }
1003+
1004+ if (j == bus_cfg.nr_of_link_frequencies) {
1005+ dev_err(dev, "no link frequency %lld supported",
1006+ link_freq_menu_items[i]);
1007+ ret = -EINVAL;
1008+ goto check_hwcfg_error;
1009+ }
1010+ }
1011+
1012+check_hwcfg_error:
1013+ v4l2_fwnode_endpoint_free(&bus_cfg);
1014+
1015+ return ret;
1016+}
1017+
1018+static int og01a1b_remove(struct i2c_client *client)
1019+{
1020+ struct v4l2_subdev *sd = i2c_get_clientdata(client);
1021+ struct og01a1b *og01a1b = to_og01a1b(sd);
1022+
1023+ v4l2_async_unregister_subdev(sd);
1024+ media_entity_cleanup(&sd->entity);
1025+ v4l2_ctrl_handler_free(sd->ctrl_handler);
1026+ pm_runtime_disable(&client->dev);
1027+ mutex_destroy(&og01a1b->mutex);
1028+
1029+ return 0;
1030+}
1031+
1032+static int og01a1b_probe(struct i2c_client *client)
1033+{
1034+ struct og01a1b *og01a1b;
1035+ int ret;
1036+
1037+ ret = og01a1b_check_hwcfg(&client->dev);
1038+ if (ret) {
1039+ dev_err(&client->dev, "failed to check HW configuration: %d",
1040+ ret);
1041+ return ret;
1042+ }
1043+
1044+ og01a1b = devm_kzalloc(&client->dev, sizeof(*og01a1b), GFP_KERNEL);
1045+ if (!og01a1b)
1046+ return -ENOMEM;
1047+
1048+ v4l2_i2c_subdev_init(&og01a1b->sd, client, &og01a1b_subdev_ops);
1049+ ret = og01a1b_identify_module(og01a1b);
1050+ if (ret) {
1051+ dev_err(&client->dev, "failed to find sensor: %d", ret);
1052+ return ret;
1053+ }
1054+
1055+ mutex_init(&og01a1b->mutex);
1056+ og01a1b->cur_mode = &supported_modes[0];
1057+ ret = og01a1b_init_controls(og01a1b);
1058+ if (ret) {
1059+ dev_err(&client->dev, "failed to init controls: %d", ret);
1060+ goto probe_error_v4l2_ctrl_handler_free;
1061+ }
1062+
1063+ og01a1b->sd.internal_ops = &og01a1b_internal_ops;
1064+ og01a1b->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
1065+ og01a1b->sd.entity.ops = &og01a1b_subdev_entity_ops;
1066+ og01a1b->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
1067+ og01a1b->pad.flags = MEDIA_PAD_FL_SOURCE;
1068+ ret = media_entity_pads_init(&og01a1b->sd.entity, 1, &og01a1b->pad);
1069+ if (ret) {
1070+ dev_err(&client->dev, "failed to init entity pads: %d", ret);
1071+ goto probe_error_v4l2_ctrl_handler_free;
1072+ }
1073+
1074+ ret = v4l2_async_register_subdev_sensor(&og01a1b->sd);
1075+ if (ret < 0) {
1076+ dev_err(&client->dev, "failed to register V4L2 subdev: %d",
1077+ ret);
1078+ goto probe_error_media_entity_cleanup;
1079+ }
1080+
1081+ /*
1082+ * Device is already turned on by i2c-core with ACPI domain PM.
1083+ * Enable runtime PM and turn off the device.
1084+ */
1085+ pm_runtime_set_active(&client->dev);
1086+ pm_runtime_enable(&client->dev);
1087+ pm_runtime_idle(&client->dev);
1088+
1089+ return 0;
1090+
1091+probe_error_media_entity_cleanup:
1092+ media_entity_cleanup(&og01a1b->sd.entity);
1093+
1094+probe_error_v4l2_ctrl_handler_free:
1095+ v4l2_ctrl_handler_free(og01a1b->sd.ctrl_handler);
1096+ mutex_destroy(&og01a1b->mutex);
1097+
1098+ return ret;
1099+}
1100+
1101+static const struct dev_pm_ops og01a1b_pm_ops = {
1102+ SET_SYSTEM_SLEEP_PM_OPS(og01a1b_suspend, og01a1b_resume)
1103+};
1104+
1105+#ifdef CONFIG_ACPI
1106+static const struct acpi_device_id og01a1b_acpi_ids[] = {
1107+ {"OVTI01AC"},
1108+ {}
1109+};
1110+
1111+MODULE_DEVICE_TABLE(acpi, og01a1b_acpi_ids);
1112+#endif
1113+
1114+static struct i2c_driver og01a1b_i2c_driver = {
1115+ .driver = {
1116+ .name = "og01a1b",
1117+ .pm = &og01a1b_pm_ops,
1118+ .acpi_match_table = ACPI_PTR(og01a1b_acpi_ids),
1119+ },
1120+ .probe_new = og01a1b_probe,
1121+ .remove = og01a1b_remove,
1122+};
1123+
1124+module_i2c_driver(og01a1b_i2c_driver);
1125+
1126+MODULE_AUTHOR("Shawn Tu <shawnx.tu@intel.com>");
1127+MODULE_DESCRIPTION("OmniVision OG01A1B sensor driver");
1128+MODULE_LICENSE("GPL v2");
drivers/media/i2c/ov08d10.c+1528−0
@@ -0,0 +1,1528 @@
1+// SPDX-License-Identifier: GPL-2.0
2+// Copyright (c) 2022 Intel Corporation.
3+
4+#include <linux/acpi.h>
5+#include <linux/clk.h>
6+#include <linux/delay.h>
7+#include <linux/i2c.h>
8+#include <linux/module.h>
9+#include <linux/pm_runtime.h>
10+#include <linux/regulator/consumer.h>
11+#include <media/v4l2-ctrls.h>
12+#include <media/v4l2-device.h>
13+#include <media/v4l2-fwnode.h>
14+
15+#define OV08D10_SCLK 144000000ULL
16+#define OV08D10_XVCLK_19_2 19200000
17+#define OV08D10_ROWCLK 36000
18+#define OV08D10_DATA_LANES 2
19+#define OV08D10_RGB_DEPTH 10
20+
21+#define OV08D10_REG_PAGE 0xfd
22+#define OV08D10_REG_GLOBAL_EFFECTIVE 0x01
23+#define OV08D10_REG_CHIP_ID_0 0x00
24+#define OV08D10_REG_CHIP_ID_1 0x01
25+#define OV08D10_ID_MASK GENMASK(15, 0)
26+#define OV08D10_CHIP_ID 0x5608
27+
28+#define OV08D10_REG_MODE_SELECT 0xa0
29+#define OV08D10_MODE_STANDBY 0x00
30+#define OV08D10_MODE_STREAMING 0x01
31+
32+/* vertical-timings from sensor */
33+#define OV08D10_REG_VTS_H 0x05
34+#define OV08D10_REG_VTS_L 0x06
35+#define OV08D10_VTS_MAX 0x7fff
36+
37+/* Exposure controls from sensor */
38+#define OV08D10_REG_EXPOSURE_H 0x02
39+#define OV08D10_REG_EXPOSURE_M 0x03
40+#define OV08D10_REG_EXPOSURE_L 0x04
41+#define OV08D10_EXPOSURE_MIN 6
42+#define OV08D10_EXPOSURE_MAX_MARGIN 6
43+#define OV08D10_EXPOSURE_STEP 1
44+
45+/* Analog gain controls from sensor */
46+#define OV08D10_REG_ANALOG_GAIN 0x24
47+#define OV08D10_ANAL_GAIN_MIN 128
48+#define OV08D10_ANAL_GAIN_MAX 2047
49+#define OV08D10_ANAL_GAIN_STEP 1
50+
51+/* Digital gain controls from sensor */
52+#define OV08D10_REG_MWB_DGAIN_C 0x21
53+#define OV08D10_REG_MWB_DGAIN_F 0x22
54+#define OV08D10_DGTL_GAIN_MIN 0
55+#define OV08D10_DGTL_GAIN_MAX 4095
56+#define OV08D10_DGTL_GAIN_STEP 1
57+#define OV08D10_DGTL_GAIN_DEFAULT 1024
58+
59+/* Test Pattern Control */
60+#define OV08D10_REG_TEST_PATTERN 0x12
61+#define OV08D10_TEST_PATTERN_ENABLE 0x01
62+#define OV08D10_TEST_PATTERN_DISABLE 0x00
63+
64+/* Flip Mirror Controls from sensor */
65+#define OV08D10_REG_FLIP_OPT 0x32
66+#define OV08D10_REG_FLIP_MASK 0x3
67+
68+#define to_ov08d10(_sd) container_of(_sd, struct ov08d10, sd)
69+
70+struct ov08d10_reg {
71+ u8 address;
72+ u8 val;
73+};
74+
75+struct ov08d10_reg_list {
76+ u32 num_of_regs;
77+ const struct ov08d10_reg *regs;
78+};
79+
80+struct ov08d10_link_freq_config {
81+ const struct ov08d10_reg_list reg_list;
82+};
83+
84+struct ov08d10_mode {
85+ /* Frame width in pixels */
86+ u32 width;
87+
88+ /* Frame height in pixels */
89+ u32 height;
90+
91+ /* Horizontal timining size */
92+ u32 hts;
93+
94+ /* Default vertical timining size */
95+ u32 vts_def;
96+
97+ /* Min vertical timining size */
98+ u32 vts_min;
99+
100+ /* Link frequency needed for this resolution */
101+ u32 link_freq_index;
102+
103+ /* Sensor register settings for this resolution */
104+ const struct ov08d10_reg_list reg_list;
105+
106+ /* Number of data lanes */
107+ u8 data_lanes;
108+};
109+
110+/* 3280x2460, 3264x2448 need 720Mbps/lane, 2 lanes */
111+static const struct ov08d10_reg mipi_data_rate_720mbps[] = {
112+ {0xfd, 0x00},
113+ {0x11, 0x2a},
114+ {0x14, 0x43},
115+ {0x1a, 0x04},
116+ {0x1b, 0xe1},
117+ {0x1e, 0x13},
118+ {0xb7, 0x02}
119+};
120+
121+/* 1632x1224 needs 360Mbps/lane, 2 lanes */
122+static const struct ov08d10_reg mipi_data_rate_360mbps[] = {
123+ {0xfd, 0x00},
124+ {0x1a, 0x04},
125+ {0x1b, 0xe1},
126+ {0x1d, 0x00},
127+ {0x1c, 0x19},
128+ {0x11, 0x2a},
129+ {0x14, 0x54},
130+ {0x1e, 0x13},
131+ {0xb7, 0x02}
132+};
133+
134+static const struct ov08d10_reg lane_2_mode_3280x2460[] = {
135+ /* 3280x2460 resolution */
136+ {0xfd, 0x01},
137+ {0x12, 0x00},
138+ {0x03, 0x12},
139+ {0x04, 0x58},
140+ {0x07, 0x05},
141+ {0x21, 0x02},
142+ {0x24, 0x30},
143+ {0x33, 0x03},
144+ {0x01, 0x03},
145+ {0x19, 0x10},
146+ {0x42, 0x55},
147+ {0x43, 0x00},
148+ {0x47, 0x07},
149+ {0x48, 0x08},
150+ {0xb2, 0x7f},
151+ {0xb3, 0x7b},
152+ {0xbd, 0x08},
153+ {0xd2, 0x57},
154+ {0xd3, 0x10},
155+ {0xd4, 0x08},
156+ {0xd5, 0x08},
157+ {0xd6, 0x06},
158+ {0xb1, 0x00},
159+ {0xb4, 0x00},
160+ {0xb7, 0x0a},
161+ {0xbc, 0x44},
162+ {0xbf, 0x48},
163+ {0xc1, 0x10},
164+ {0xc3, 0x24},
165+ {0xc8, 0x03},
166+ {0xc9, 0xf8},
167+ {0xe1, 0x33},
168+ {0xe2, 0xbb},
169+ {0x51, 0x0c},
170+ {0x52, 0x0a},
171+ {0x57, 0x8c},
172+ {0x59, 0x09},
173+ {0x5a, 0x08},
174+ {0x5e, 0x10},
175+ {0x60, 0x02},
176+ {0x6d, 0x5c},
177+ {0x76, 0x16},
178+ {0x7c, 0x11},
179+ {0x90, 0x28},
180+ {0x91, 0x16},
181+ {0x92, 0x1c},
182+ {0x93, 0x24},
183+ {0x95, 0x48},
184+ {0x9c, 0x06},
185+ {0xca, 0x0c},
186+ {0xce, 0x0d},
187+ {0xfd, 0x01},
188+ {0xc0, 0x00},
189+ {0xdd, 0x18},
190+ {0xde, 0x19},
191+ {0xdf, 0x32},
192+ {0xe0, 0x70},
193+ {0xfd, 0x01},
194+ {0xc2, 0x05},
195+ {0xd7, 0x88},
196+ {0xd8, 0x77},
197+ {0xd9, 0x00},
198+ {0xfd, 0x07},
199+ {0x00, 0xf8},
200+ {0x01, 0x2b},
201+ {0x05, 0x40},
202+ {0x08, 0x06},
203+ {0x09, 0x11},
204+ {0x28, 0x6f},
205+ {0x2a, 0x20},
206+ {0x2b, 0x05},
207+ {0x5e, 0x10},
208+ {0x52, 0x00},
209+ {0x53, 0x7c},
210+ {0x54, 0x00},
211+ {0x55, 0x7c},
212+ {0x56, 0x00},
213+ {0x57, 0x7c},
214+ {0x58, 0x00},
215+ {0x59, 0x7c},
216+ {0xfd, 0x02},
217+ {0x9a, 0x30},
218+ {0xa8, 0x02},
219+ {0xfd, 0x02},
220+ {0xa1, 0x01},
221+ {0xa2, 0x09},
222+ {0xa3, 0x9c},
223+ {0xa5, 0x00},
224+ {0xa6, 0x0c},
225+ {0xa7, 0xd0},
226+ {0xfd, 0x00},
227+ {0x24, 0x01},
228+ {0xc0, 0x16},
229+ {0xc1, 0x08},
230+ {0xc2, 0x30},
231+ {0x8e, 0x0c},
232+ {0x8f, 0xd0},
233+ {0x90, 0x09},
234+ {0x91, 0x9c},
235+ {0xfd, 0x05},
236+ {0x04, 0x40},
237+ {0x07, 0x00},
238+ {0x0d, 0x01},
239+ {0x0f, 0x01},
240+ {0x10, 0x00},
241+ {0x11, 0x00},
242+ {0x12, 0x0c},
243+ {0x13, 0xcf},
244+ {0x14, 0x00},
245+ {0x15, 0x00},
246+ {0xfd, 0x00},
247+ {0x20, 0x0f},
248+ {0xe7, 0x03},
249+ {0xe7, 0x00}
250+};
251+
252+static const struct ov08d10_reg lane_2_mode_3264x2448[] = {
253+ /* 3264x2448 resolution */
254+ {0xfd, 0x01},
255+ {0x12, 0x00},
256+ {0x03, 0x12},
257+ {0x04, 0x58},
258+ {0x07, 0x05},
259+ {0x21, 0x02},
260+ {0x24, 0x30},
261+ {0x33, 0x03},
262+ {0x01, 0x03},
263+ {0x19, 0x10},
264+ {0x42, 0x55},
265+ {0x43, 0x00},
266+ {0x47, 0x07},
267+ {0x48, 0x08},
268+ {0xb2, 0x7f},
269+ {0xb3, 0x7b},
270+ {0xbd, 0x08},
271+ {0xd2, 0x57},
272+ {0xd3, 0x10},
273+ {0xd4, 0x08},
274+ {0xd5, 0x08},
275+ {0xd6, 0x06},
276+ {0xb1, 0x00},
277+ {0xb4, 0x00},
278+ {0xb7, 0x0a},
279+ {0xbc, 0x44},
280+ {0xbf, 0x48},
281+ {0xc1, 0x10},
282+ {0xc3, 0x24},
283+ {0xc8, 0x03},
284+ {0xc9, 0xf8},
285+ {0xe1, 0x33},
286+ {0xe2, 0xbb},
287+ {0x51, 0x0c},
288+ {0x52, 0x0a},
289+ {0x57, 0x8c},
290+ {0x59, 0x09},
291+ {0x5a, 0x08},
292+ {0x5e, 0x10},
293+ {0x60, 0x02},
294+ {0x6d, 0x5c},
295+ {0x76, 0x16},
296+ {0x7c, 0x11},
297+ {0x90, 0x28},
298+ {0x91, 0x16},
299+ {0x92, 0x1c},
300+ {0x93, 0x24},
301+ {0x95, 0x48},
302+ {0x9c, 0x06},
303+ {0xca, 0x0c},
304+ {0xce, 0x0d},
305+ {0xfd, 0x01},
306+ {0xc0, 0x00},
307+ {0xdd, 0x18},
308+ {0xde, 0x19},
309+ {0xdf, 0x32},
310+ {0xe0, 0x70},
311+ {0xfd, 0x01},
312+ {0xc2, 0x05},
313+ {0xd7, 0x88},
314+ {0xd8, 0x77},
315+ {0xd9, 0x00},
316+ {0xfd, 0x07},
317+ {0x00, 0xf8},
318+ {0x01, 0x2b},
319+ {0x05, 0x40},
320+ {0x08, 0x06},
321+ {0x09, 0x11},
322+ {0x28, 0x6f},
323+ {0x2a, 0x20},
324+ {0x2b, 0x05},
325+ {0x5e, 0x10},
326+ {0x52, 0x00},
327+ {0x53, 0x7c},
328+ {0x54, 0x00},
329+ {0x55, 0x7c},
330+ {0x56, 0x00},
331+ {0x57, 0x7c},
332+ {0x58, 0x00},
333+ {0x59, 0x7c},
334+ {0xfd, 0x02},
335+ {0x9a, 0x30},
336+ {0xa8, 0x02},
337+ {0xfd, 0x02},
338+ {0xa1, 0x09},
339+ {0xa2, 0x09},
340+ {0xa3, 0x90},
341+ {0xa5, 0x08},
342+ {0xa6, 0x0c},
343+ {0xa7, 0xc0},
344+ {0xfd, 0x00},
345+ {0x24, 0x01},
346+ {0xc0, 0x16},
347+ {0xc1, 0x08},
348+ {0xc2, 0x30},
349+ {0x8e, 0x0c},
350+ {0x8f, 0xc0},
351+ {0x90, 0x09},
352+ {0x91, 0x90},
353+ {0xfd, 0x05},
354+ {0x04, 0x40},
355+ {0x07, 0x00},
356+ {0x0d, 0x01},
357+ {0x0f, 0x01},
358+ {0x10, 0x00},
359+ {0x11, 0x00},
360+ {0x12, 0x0c},
361+ {0x13, 0xcf},
362+ {0x14, 0x00},
363+ {0x15, 0x00},
364+ {0xfd, 0x00},
365+ {0x20, 0x0f},
366+ {0xe7, 0x03},
367+ {0xe7, 0x00}
368+};
369+
370+static const struct ov08d10_reg lane_2_mode_1632x1224[] = {
371+ /* 1640x1232 resolution */
372+ {0xfd, 0x01},
373+ {0x1a, 0x0a},
374+ {0x1b, 0x08},
375+ {0x2a, 0x01},
376+ {0x2b, 0x9a},
377+ {0xfd, 0x01},
378+ {0x12, 0x00},
379+ {0x03, 0x05},
380+ {0x04, 0xe2},
381+ {0x07, 0x05},
382+ {0x21, 0x02},
383+ {0x24, 0x30},
384+ {0x33, 0x03},
385+ {0x31, 0x06},
386+ {0x33, 0x03},
387+ {0x01, 0x03},
388+ {0x19, 0x10},
389+ {0x42, 0x55},
390+ {0x43, 0x00},
391+ {0x47, 0x07},
392+ {0x48, 0x08},
393+ {0xb2, 0x7f},
394+ {0xb3, 0x7b},
395+ {0xbd, 0x08},
396+ {0xd2, 0x57},
397+ {0xd3, 0x10},
398+ {0xd4, 0x08},
399+ {0xd5, 0x08},
400+ {0xd6, 0x06},
401+ {0xb1, 0x00},
402+ {0xb4, 0x00},
403+ {0xb7, 0x0a},
404+ {0xbc, 0x44},
405+ {0xbf, 0x48},
406+ {0xc1, 0x10},
407+ {0xc3, 0x24},
408+ {0xc8, 0x03},
409+ {0xc9, 0xf8},
410+ {0xe1, 0x33},
411+ {0xe2, 0xbb},
412+ {0x51, 0x0c},
413+ {0x52, 0x0a},
414+ {0x57, 0x8c},
415+ {0x59, 0x09},
416+ {0x5a, 0x08},
417+ {0x5e, 0x10},
418+ {0x60, 0x02},
419+ {0x6d, 0x5c},
420+ {0x76, 0x16},
421+ {0x7c, 0x1a},
422+ {0x90, 0x28},
423+ {0x91, 0x16},
424+ {0x92, 0x1c},
425+ {0x93, 0x24},
426+ {0x95, 0x48},
427+ {0x9c, 0x06},
428+ {0xca, 0x0c},
429+ {0xce, 0x0d},
430+ {0xfd, 0x01},
431+ {0xc0, 0x00},
432+ {0xdd, 0x18},
433+ {0xde, 0x19},
434+ {0xdf, 0x32},
435+ {0xe0, 0x70},
436+ {0xfd, 0x01},
437+ {0xc2, 0x05},
438+ {0xd7, 0x88},
439+ {0xd8, 0x77},
440+ {0xd9, 0x00},
441+ {0xfd, 0x07},
442+ {0x00, 0xf8},
443+ {0x01, 0x2b},
444+ {0x05, 0x40},
445+ {0x08, 0x03},
446+ {0x09, 0x08},
447+ {0x28, 0x6f},
448+ {0x2a, 0x20},
449+ {0x2b, 0x05},
450+ {0x2c, 0x01},
451+ {0x50, 0x02},
452+ {0x51, 0x03},
453+ {0x5e, 0x00},
454+ {0x52, 0x00},
455+ {0x53, 0x7c},
456+ {0x54, 0x00},
457+ {0x55, 0x7c},
458+ {0x56, 0x00},
459+ {0x57, 0x7c},
460+ {0x58, 0x00},
461+ {0x59, 0x7c},
462+ {0xfd, 0x02},
463+ {0x9a, 0x30},
464+ {0xa8, 0x02},
465+ {0xfd, 0x02},
466+ {0xa9, 0x04},
467+ {0xaa, 0xd0},
468+ {0xab, 0x06},
469+ {0xac, 0x68},
470+ {0xa1, 0x09},
471+ {0xa2, 0x04},
472+ {0xa3, 0xc8},
473+ {0xa5, 0x04},
474+ {0xa6, 0x06},
475+ {0xa7, 0x60},
476+ {0xfd, 0x05},
477+ {0x06, 0x80},
478+ {0x18, 0x06},
479+ {0x19, 0x68},
480+ {0xfd, 0x00},
481+ {0x24, 0x01},
482+ {0xc0, 0x16},
483+ {0xc1, 0x08},
484+ {0xc2, 0x30},
485+ {0x8e, 0x06},
486+ {0x8f, 0x60},
487+ {0x90, 0x04},
488+ {0x91, 0xc8},
489+ {0x93, 0x0e},
490+ {0x94, 0x77},
491+ {0x95, 0x77},
492+ {0x96, 0x10},
493+ {0x98, 0x88},
494+ {0x9c, 0x1a},
495+ {0xfd, 0x05},
496+ {0x04, 0x40},
497+ {0x07, 0x99},
498+ {0x0d, 0x03},
499+ {0x0f, 0x03},
500+ {0x10, 0x00},
501+ {0x11, 0x00},
502+ {0x12, 0x0c},
503+ {0x13, 0xcf},
504+ {0x14, 0x00},
505+ {0x15, 0x00},
506+ {0xfd, 0x00},
507+ {0x20, 0x0f},
508+ {0xe7, 0x03},
509+ {0xe7, 0x00},
510+};
511+
512+static const char * const ov08d10_test_pattern_menu[] = {
513+ "Disabled",
514+ "Standard Color Bar",
515+};
516+
517+struct ov08d10 {
518+ struct v4l2_subdev sd;
519+ struct media_pad pad;
520+ struct v4l2_ctrl_handler ctrl_handler;
521+
522+ struct clk *xvclk;
523+
524+ /* V4L2 Controls */
525+ struct v4l2_ctrl *link_freq;
526+ struct v4l2_ctrl *pixel_rate;
527+ struct v4l2_ctrl *vblank;
528+ struct v4l2_ctrl *hblank;
529+ struct v4l2_ctrl *vflip;
530+ struct v4l2_ctrl *hflip;
531+ struct v4l2_ctrl *exposure;
532+
533+ /* Current mode */
534+ const struct ov08d10_mode *cur_mode;
535+
536+ /* To serialize asynchronus callbacks */
537+ struct mutex mutex;
538+
539+ /* Streaming on/off */
540+ bool streaming;
541+
542+ /* lanes index */
543+ u8 nlanes;
544+
545+ const struct ov08d10_lane_cfg *priv_lane;
546+ u8 modes_size;
547+};
548+
549+struct ov08d10_lane_cfg {
550+ const s64 link_freq_menu[2];
551+ const struct ov08d10_link_freq_config link_freq_configs[2];
552+ const struct ov08d10_mode sp_modes[3];
553+};
554+
555+static const struct ov08d10_lane_cfg lane_cfg_2 = {
556+ {
557+ 720000000,
558+ 360000000,
559+ },
560+ {{
561+ .reg_list = {
562+ .num_of_regs =
563+ ARRAY_SIZE(mipi_data_rate_720mbps),
564+ .regs = mipi_data_rate_720mbps,
565+ }
566+ },
567+ {
568+ .reg_list = {
569+ .num_of_regs =
570+ ARRAY_SIZE(mipi_data_rate_360mbps),
571+ .regs = mipi_data_rate_360mbps,
572+ }
573+ }},
574+ {{
575+ .width = 3280,
576+ .height = 2460,
577+ .hts = 1840,
578+ .vts_def = 2504,
579+ .vts_min = 2504,
580+ .reg_list = {
581+ .num_of_regs = ARRAY_SIZE(lane_2_mode_3280x2460),
582+ .regs = lane_2_mode_3280x2460,
583+ },
584+ .link_freq_index = 0,
585+ .data_lanes = 2,
586+ },
587+ {
588+ .width = 3264,
589+ .height = 2448,
590+ .hts = 1840,
591+ .vts_def = 2504,
592+ .vts_min = 2504,
593+ .reg_list = {
594+ .num_of_regs = ARRAY_SIZE(lane_2_mode_3264x2448),
595+ .regs = lane_2_mode_3264x2448,
596+ },
597+ .link_freq_index = 0,
598+ .data_lanes = 2,
599+ },
600+ {
601+ .width = 1632,
602+ .height = 1224,
603+ .hts = 1912,
604+ .vts_def = 3736,
605+ .vts_min = 3736,
606+ .reg_list = {
607+ .num_of_regs = ARRAY_SIZE(lane_2_mode_1632x1224),
608+ .regs = lane_2_mode_1632x1224,
609+ },
610+ .link_freq_index = 1,
611+ .data_lanes = 2,
612+ }}
613+};
614+
615+static u32 ov08d10_get_format_code(struct ov08d10 *ov08d10)
616+{
617+ static const u32 codes[2][2] = {
618+ { MEDIA_BUS_FMT_SGRBG10_1X10, MEDIA_BUS_FMT_SRGGB10_1X10},
619+ { MEDIA_BUS_FMT_SBGGR10_1X10, MEDIA_BUS_FMT_SGBRG10_1X10},
620+ };
621+
622+ return codes[ov08d10->vflip->val][ov08d10->hflip->val];
623+}
624+
625+static unsigned int ov08d10_modes_num(const struct ov08d10 *ov08d10)
626+{
627+ unsigned int i, count = 0;
628+
629+ for (i = 0; i < ARRAY_SIZE(ov08d10->priv_lane->sp_modes); i++) {
630+ if (ov08d10->priv_lane->sp_modes[i].width == 0)
631+ break;
632+ count++;
633+ }
634+
635+ return count;
636+}
637+
638+static u64 to_rate(const s64 *link_freq_menu,
639+ u32 f_index, u8 nlanes)
640+{
641+ u64 pixel_rate = link_freq_menu[f_index] * 2 * nlanes;
642+
643+ do_div(pixel_rate, OV08D10_RGB_DEPTH);
644+
645+ return pixel_rate;
646+}
647+
648+static u64 to_pixels_per_line(const s64 *link_freq_menu, u32 hts,
649+ u32 f_index, u8 nlanes)
650+{
651+ u64 ppl = hts * to_rate(link_freq_menu, f_index, nlanes);
652+
653+ do_div(ppl, OV08D10_SCLK);
654+
655+ return ppl;
656+}
657+
658+static int ov08d10_write_reg_list(struct ov08d10 *ov08d10,
659+ const struct ov08d10_reg_list *r_list)
660+{
661+ struct i2c_client *client = v4l2_get_subdevdata(&ov08d10->sd);
662+ unsigned int i;
663+ int ret;
664+
665+ for (i = 0; i < r_list->num_of_regs; i++) {
666+ ret = i2c_smbus_write_byte_data(client, r_list->regs[i].address,
667+ r_list->regs[i].val);
668+ if (ret) {
669+ dev_err_ratelimited(&client->dev,
670+ "failed to write reg 0x%2.2x. error = %d",
671+ r_list->regs[i].address, ret);
672+ return ret;
673+ }
674+ }
675+
676+ return 0;
677+}
678+
679+static int ov08d10_update_analog_gain(struct ov08d10 *ov08d10, u32 a_gain)
680+{
681+ struct i2c_client *client = v4l2_get_subdevdata(&ov08d10->sd);
682+ u8 val;
683+ int ret;
684+
685+ val = ((a_gain >> 3) & 0xFF);
686+ /* CIS control registers */
687+ ret = i2c_smbus_write_byte_data(client, OV08D10_REG_PAGE, 0x01);
688+ if (ret < 0)
689+ return ret;
690+
691+ /* update AGAIN */
692+ ret = i2c_smbus_write_byte_data(client, OV08D10_REG_ANALOG_GAIN, val);
693+ if (ret < 0)
694+ return ret;
695+
696+ return i2c_smbus_write_byte_data(client,
697+ OV08D10_REG_GLOBAL_EFFECTIVE, 0x01);
698+}
699+
700+static int ov08d10_update_digital_gain(struct ov08d10 *ov08d10, u32 d_gain)
701+{
702+ struct i2c_client *client = v4l2_get_subdevdata(&ov08d10->sd);
703+ u8 val;
704+ int ret;
705+
706+ d_gain = (d_gain >> 1);
707+ /* CIS control registers */
708+ ret = i2c_smbus_write_byte_data(client, OV08D10_REG_PAGE, 0x01);
709+ if (ret < 0)
710+ return ret;
711+
712+ val = ((d_gain >> 8) & 0x3F);
713+ /* update DGAIN */
714+ ret = i2c_smbus_write_byte_data(client, OV08D10_REG_MWB_DGAIN_C, val);
715+ if (ret < 0)
716+ return ret;
717+
718+ val = d_gain & 0xFF;
719+ ret = i2c_smbus_write_byte_data(client, OV08D10_REG_MWB_DGAIN_F, val);
720+ if (ret < 0)
721+ return ret;
722+
723+ return i2c_smbus_write_byte_data(client,
724+ OV08D10_REG_GLOBAL_EFFECTIVE, 0x01);
725+}
726+
727+static int ov08d10_set_exposure(struct ov08d10 *ov08d10, u32 exposure)
728+{
729+ struct i2c_client *client = v4l2_get_subdevdata(&ov08d10->sd);
730+ u8 val;
731+ u8 hts_h, hts_l;
732+ u32 hts, cur_vts, exp_cal;
733+ int ret;
734+
735+ cur_vts = ov08d10->cur_mode->vts_def;
736+ ret = i2c_smbus_write_byte_data(client, OV08D10_REG_PAGE, 0x01);
737+ if (ret < 0)
738+ return ret;
739+
740+ hts_h = i2c_smbus_read_byte_data(client, 0x37);
741+ hts_l = i2c_smbus_read_byte_data(client, 0x38);
742+ hts = ((hts_h << 8) | (hts_l));
743+ exp_cal = 66 * OV08D10_ROWCLK / hts;
744+ exposure = exposure * exp_cal / (cur_vts - OV08D10_EXPOSURE_MAX_MARGIN);
745+ /* CIS control registers */
746+ ret = i2c_smbus_write_byte_data(client, OV08D10_REG_PAGE, 0x01);
747+ if (ret < 0)
748+ return ret;
749+
750+ /* update exposure */
751+ val = ((exposure >> 16) & 0xFF);
752+ ret = i2c_smbus_write_byte_data(client, OV08D10_REG_EXPOSURE_H, val);
753+ if (ret < 0)
754+ return ret;
755+
756+ val = ((exposure >> 8) & 0xFF);
757+ ret = i2c_smbus_write_byte_data(client, OV08D10_REG_EXPOSURE_M, val);
758+ if (ret < 0)
759+ return ret;
760+
761+ val = exposure & 0xFF;
762+ ret = i2c_smbus_write_byte_data(client, OV08D10_REG_EXPOSURE_L, val);
763+ if (ret < 0)
764+ return ret;
765+
766+ return i2c_smbus_write_byte_data(client,
767+ OV08D10_REG_GLOBAL_EFFECTIVE, 0x01);
768+}
769+
770+static int ov08d10_set_vblank(struct ov08d10 *ov08d10, u32 vblank)
771+{
772+ struct i2c_client *client = v4l2_get_subdevdata(&ov08d10->sd);
773+ u8 val;
774+ int ret;
775+
776+ /* CIS control registers */
777+ ret = i2c_smbus_write_byte_data(client, OV08D10_REG_PAGE, 0x01);
778+ if (ret < 0)
779+ return ret;
780+
781+ val = ((vblank >> 8) & 0xFF);
782+ /* update vblank */
783+ ret = i2c_smbus_write_byte_data(client, OV08D10_REG_VTS_H, val);
784+ if (ret < 0)
785+ return ret;
786+
787+ val = vblank & 0xFF;
788+ ret = i2c_smbus_write_byte_data(client, OV08D10_REG_VTS_L, val);
789+ if (ret < 0)
790+ return ret;
791+
792+ return i2c_smbus_write_byte_data(client,
793+ OV08D10_REG_GLOBAL_EFFECTIVE, 0x01);
794+}
795+
796+static int ov08d10_test_pattern(struct ov08d10 *ov08d10, u32 pattern)
797+{
798+ struct i2c_client *client = v4l2_get_subdevdata(&ov08d10->sd);
799+ u8 val;
800+ int ret;
801+
802+ if (pattern)
803+ val = OV08D10_TEST_PATTERN_ENABLE;
804+ else
805+ val = OV08D10_TEST_PATTERN_DISABLE;
806+
807+ /* CIS control registers */
808+ ret = i2c_smbus_write_byte_data(client, OV08D10_REG_PAGE, 0x01);
809+ if (ret < 0)
810+ return ret;
811+
812+ ret = i2c_smbus_write_byte_data(client,
813+ OV08D10_REG_TEST_PATTERN, val);
814+ if (ret < 0)
815+ return ret;
816+
817+ return i2c_smbus_write_byte_data(client,
818+ OV08D10_REG_GLOBAL_EFFECTIVE, 0x01);
819+}
820+
821+static int ov08d10_set_ctrl_flip(struct ov08d10 *ov08d10, u32 ctrl_val)
822+{
823+ struct i2c_client *client = v4l2_get_subdevdata(&ov08d10->sd);
824+ u8 val;
825+ int ret;
826+
827+ /* System control registers */
828+ ret = i2c_smbus_write_byte_data(client, OV08D10_REG_PAGE, 0x01);
829+ if (ret < 0)
830+ return ret;
831+
832+ ret = i2c_smbus_read_byte_data(client, OV08D10_REG_FLIP_OPT);
833+ if (ret < 0)
834+ return ret;
835+
836+ val = ret | (ctrl_val & OV08D10_REG_FLIP_MASK);
837+
838+ ret = i2c_smbus_write_byte_data(client, OV08D10_REG_PAGE, 0x01);
839+ if (ret < 0)
840+ return ret;
841+
842+ ret = i2c_smbus_write_byte_data(client, OV08D10_REG_FLIP_OPT, val);
843+
844+ if (ret < 0)
845+ return ret;
846+
847+ return i2c_smbus_write_byte_data(client,
848+ OV08D10_REG_GLOBAL_EFFECTIVE, 0x01);
849+}
850+
851+static int ov08d10_set_ctrl(struct v4l2_ctrl *ctrl)
852+{
853+ struct ov08d10 *ov08d10 = container_of(ctrl->handler,
854+ struct ov08d10, ctrl_handler);
855+ struct i2c_client *client = v4l2_get_subdevdata(&ov08d10->sd);
856+ s64 exposure_max;
857+ int ret;
858+
859+ /* Propagate change of current control to all related controls */
860+ if (ctrl->id == V4L2_CID_VBLANK) {
861+ /* Update max exposure while meeting expected vblanking */
862+ exposure_max = ov08d10->cur_mode->height + ctrl->val -
863+ OV08D10_EXPOSURE_MAX_MARGIN;
864+ __v4l2_ctrl_modify_range(ov08d10->exposure,
865+ ov08d10->exposure->minimum,
866+ exposure_max, ov08d10->exposure->step,
867+ exposure_max);
868+ }
869+
870+ /* V4L2 controls values will be applied only when power is already up */
871+ if (!pm_runtime_get_if_in_use(&client->dev))
872+ return 0;
873+
874+ switch (ctrl->id) {
875+ case V4L2_CID_ANALOGUE_GAIN:
876+ ret = ov08d10_update_analog_gain(ov08d10, ctrl->val);
877+ break;
878+
879+ case V4L2_CID_DIGITAL_GAIN:
880+ ret = ov08d10_update_digital_gain(ov08d10, ctrl->val);
881+ break;
882+
883+ case V4L2_CID_EXPOSURE:
884+ ret = ov08d10_set_exposure(ov08d10, ctrl->val);
885+ break;
886+
887+ case V4L2_CID_VBLANK:
888+ ret = ov08d10_set_vblank(ov08d10, ctrl->val);
889+ break;
890+
891+ case V4L2_CID_TEST_PATTERN:
892+ ret = ov08d10_test_pattern(ov08d10, ctrl->val);
893+ break;
894+
895+ case V4L2_CID_HFLIP:
896+ case V4L2_CID_VFLIP:
897+ ret = ov08d10_set_ctrl_flip(ov08d10,
898+ ov08d10->hflip->val |
899+ ov08d10->vflip->val << 1);
900+ break;
901+
902+ default:
903+ ret = -EINVAL;
904+ break;
905+ }
906+
907+ pm_runtime_put(&client->dev);
908+
909+ return ret;
910+}
911+
912+static const struct v4l2_ctrl_ops ov08d10_ctrl_ops = {
913+ .s_ctrl = ov08d10_set_ctrl,
914+};
915+
916+static int ov08d10_init_controls(struct ov08d10 *ov08d10)
917+{
918+ struct v4l2_ctrl_handler *ctrl_hdlr;
919+ u8 link_freq_size;
920+ s64 exposure_max;
921+ s64 vblank_def;
922+ s64 vblank_min;
923+ s64 h_blank;
924+ s64 pixel_rate_max;
925+ const struct ov08d10_mode *mode;
926+ int ret;
927+
928+ ctrl_hdlr = &ov08d10->ctrl_handler;
929+ ret = v4l2_ctrl_handler_init(ctrl_hdlr, 8);
930+ if (ret)
931+ return ret;
932+
933+ ctrl_hdlr->lock = &ov08d10->mutex;
934+ link_freq_size = ARRAY_SIZE(ov08d10->priv_lane->link_freq_menu);
935+ ov08d10->link_freq =
936+ v4l2_ctrl_new_int_menu(ctrl_hdlr, &ov08d10_ctrl_ops,
937+ V4L2_CID_LINK_FREQ,
938+ link_freq_size - 1,
939+ 0,
940+ ov08d10->priv_lane->link_freq_menu);
941+ if (ov08d10->link_freq)
942+ ov08d10->link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY;
943+
944+ pixel_rate_max = to_rate(ov08d10->priv_lane->link_freq_menu, 0,
945+ ov08d10->cur_mode->data_lanes);
946+ ov08d10->pixel_rate =
947+ v4l2_ctrl_new_std(ctrl_hdlr, &ov08d10_ctrl_ops,
948+ V4L2_CID_PIXEL_RATE, 0, pixel_rate_max, 1,
949+ pixel_rate_max);
950+
951+ mode = ov08d10->cur_mode;
952+ vblank_def = mode->vts_def - mode->height;
953+ vblank_min = mode->vts_min - mode->height;
954+ ov08d10->vblank =
955+ v4l2_ctrl_new_std(ctrl_hdlr, &ov08d10_ctrl_ops,
956+ V4L2_CID_VBLANK, vblank_min,
957+ OV08D10_VTS_MAX - mode->height, 1,
958+ vblank_def);
959+
960+ h_blank = to_pixels_per_line(ov08d10->priv_lane->link_freq_menu,
961+ mode->hts, mode->link_freq_index,
962+ mode->data_lanes) -
963+ mode->width;
964+ ov08d10->hblank = v4l2_ctrl_new_std(ctrl_hdlr, &ov08d10_ctrl_ops,
965+ V4L2_CID_HBLANK, h_blank, h_blank,
966+ 1, h_blank);
967+ if (ov08d10->hblank)
968+ ov08d10->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY;
969+
970+ v4l2_ctrl_new_std(ctrl_hdlr, &ov08d10_ctrl_ops, V4L2_CID_ANALOGUE_GAIN,
971+ OV08D10_ANAL_GAIN_MIN, OV08D10_ANAL_GAIN_MAX,
972+ OV08D10_ANAL_GAIN_STEP, OV08D10_ANAL_GAIN_MIN);
973+
974+ v4l2_ctrl_new_std(ctrl_hdlr, &ov08d10_ctrl_ops, V4L2_CID_DIGITAL_GAIN,
975+ OV08D10_DGTL_GAIN_MIN, OV08D10_DGTL_GAIN_MAX,
976+ OV08D10_DGTL_GAIN_STEP, OV08D10_DGTL_GAIN_DEFAULT);
977+
978+ exposure_max = mode->vts_def - OV08D10_EXPOSURE_MAX_MARGIN;
979+ ov08d10->exposure = v4l2_ctrl_new_std(ctrl_hdlr, &ov08d10_ctrl_ops,
980+ V4L2_CID_EXPOSURE,
981+ OV08D10_EXPOSURE_MIN,
982+ exposure_max,
983+ OV08D10_EXPOSURE_STEP,
984+ exposure_max);
985+
986+ v4l2_ctrl_new_std_menu_items(ctrl_hdlr, &ov08d10_ctrl_ops,
987+ V4L2_CID_TEST_PATTERN,
988+ ARRAY_SIZE(ov08d10_test_pattern_menu) - 1,
989+ 0, 0, ov08d10_test_pattern_menu);
990+
991+ ov08d10->hflip = v4l2_ctrl_new_std(ctrl_hdlr, &ov08d10_ctrl_ops,
992+ V4L2_CID_HFLIP, 0, 1, 1, 0);
993+ ov08d10->vflip = v4l2_ctrl_new_std(ctrl_hdlr, &ov08d10_ctrl_ops,
994+ V4L2_CID_VFLIP, 0, 1, 1, 0);
995+ if (ctrl_hdlr->error)
996+ return ctrl_hdlr->error;
997+
998+ ov08d10->sd.ctrl_handler = ctrl_hdlr;
999+
1000+ return 0;
1001+}
1002+
1003+static void ov08d10_update_pad_format(struct ov08d10 *ov08d10,
1004+ const struct ov08d10_mode *mode,
1005+ struct v4l2_mbus_framefmt *fmt)
1006+{
1007+ fmt->width = mode->width;
1008+ fmt->height = mode->height;
1009+ fmt->code = ov08d10_get_format_code(ov08d10);
1010+ fmt->field = V4L2_FIELD_NONE;
1011+}
1012+
1013+static int ov08d10_start_streaming(struct ov08d10 *ov08d10)
1014+{
1015+ struct i2c_client *client = v4l2_get_subdevdata(&ov08d10->sd);
1016+ const struct ov08d10_reg_list *reg_list;
1017+ int link_freq_index, ret;
1018+
1019+ link_freq_index = ov08d10->cur_mode->link_freq_index;
1020+ reg_list =
1021+ &ov08d10->priv_lane->link_freq_configs[link_freq_index].reg_list;
1022+
1023+ /* soft reset */
1024+ ret = i2c_smbus_write_byte_data(client, OV08D10_REG_PAGE, 0x00);
1025+ if (ret < 0) {
1026+ dev_err(&client->dev, "failed to reset sensor");
1027+ return ret;
1028+ }
1029+ ret = i2c_smbus_write_byte_data(client, 0x20, 0x0e);
1030+ if (ret < 0) {
1031+ dev_err(&client->dev, "failed to reset sensor");
1032+ return ret;
1033+ }
1034+ usleep_range(3000, 4000);
1035+ ret = i2c_smbus_write_byte_data(client, 0x20, 0x0b);
1036+ if (ret < 0) {
1037+ dev_err(&client->dev, "failed to reset sensor");
1038+ return ret;
1039+ }
1040+
1041+ /* update sensor setting */
1042+ ret = ov08d10_write_reg_list(ov08d10, reg_list);
1043+ if (ret) {
1044+ dev_err(&client->dev, "failed to set plls");
1045+ return ret;
1046+ }
1047+
1048+ reg_list = &ov08d10->cur_mode->reg_list;
1049+ ret = ov08d10_write_reg_list(ov08d10, reg_list);
1050+ if (ret) {
1051+ dev_err(&client->dev, "failed to set mode");
1052+ return ret;
1053+ }
1054+
1055+ ret = __v4l2_ctrl_handler_setup(ov08d10->sd.ctrl_handler);
1056+ if (ret)
1057+ return ret;
1058+
1059+ ret = i2c_smbus_write_byte_data(client, OV08D10_REG_PAGE, 0x00);
1060+ if (ret < 0)
1061+ return ret;
1062+
1063+ ret = i2c_smbus_write_byte_data(client, OV08D10_REG_MODE_SELECT,
1064+ OV08D10_MODE_STREAMING);
1065+ if (ret < 0)
1066+ return ret;
1067+
1068+ return i2c_smbus_write_byte_data(client, OV08D10_REG_PAGE, 0x01);
1069+}
1070+
1071+static void ov08d10_stop_streaming(struct ov08d10 *ov08d10)
1072+{
1073+ struct i2c_client *client = v4l2_get_subdevdata(&ov08d10->sd);
1074+ int ret;
1075+
1076+ ret = i2c_smbus_write_byte_data(client, OV08D10_REG_PAGE, 0x00);
1077+ if (ret < 0) {
1078+ dev_err(&client->dev, "failed to stop streaming");
1079+ return;
1080+ }
1081+ ret = i2c_smbus_write_byte_data(client, OV08D10_REG_MODE_SELECT,
1082+ OV08D10_MODE_STANDBY);
1083+ if (ret < 0) {
1084+ dev_err(&client->dev, "failed to stop streaming");
1085+ return;
1086+ }
1087+
1088+ ret = i2c_smbus_write_byte_data(client, OV08D10_REG_PAGE, 0x01);
1089+ if (ret < 0) {
1090+ dev_err(&client->dev, "failed to stop streaming");
1091+ return;
1092+ }
1093+}
1094+
1095+static int ov08d10_set_stream(struct v4l2_subdev *sd, int enable)
1096+{
1097+ struct ov08d10 *ov08d10 = to_ov08d10(sd);
1098+ struct i2c_client *client = v4l2_get_subdevdata(sd);
1099+ int ret = 0;
1100+
1101+ if (ov08d10->streaming == enable)
1102+ return 0;
1103+
1104+ mutex_lock(&ov08d10->mutex);
1105+ if (enable) {
1106+ ret = pm_runtime_resume_and_get(&client->dev);
1107+ if (ret < 0) {
1108+ mutex_unlock(&ov08d10->mutex);
1109+ return ret;
1110+ }
1111+
1112+ ret = ov08d10_start_streaming(ov08d10);
1113+ if (ret) {
1114+ enable = 0;
1115+ ov08d10_stop_streaming(ov08d10);
1116+ pm_runtime_put(&client->dev);
1117+ }
1118+ } else {
1119+ ov08d10_stop_streaming(ov08d10);
1120+ pm_runtime_put(&client->dev);
1121+ }
1122+
1123+ ov08d10->streaming = enable;
1124+
1125+ /* vflip and hflip cannot change during streaming */
1126+ __v4l2_ctrl_grab(ov08d10->vflip, enable);
1127+ __v4l2_ctrl_grab(ov08d10->hflip, enable);
1128+
1129+ mutex_unlock(&ov08d10->mutex);
1130+
1131+ return ret;
1132+}
1133+
1134+static int __maybe_unused ov08d10_suspend(struct device *dev)
1135+{
1136+ struct i2c_client *client = to_i2c_client(dev);
1137+ struct v4l2_subdev *sd = i2c_get_clientdata(client);
1138+ struct ov08d10 *ov08d10 = to_ov08d10(sd);
1139+
1140+ mutex_lock(&ov08d10->mutex);
1141+ if (ov08d10->streaming)
1142+ ov08d10_stop_streaming(ov08d10);
1143+
1144+ mutex_unlock(&ov08d10->mutex);
1145+
1146+ return 0;
1147+}
1148+
1149+static int __maybe_unused ov08d10_resume(struct device *dev)
1150+{
1151+ struct i2c_client *client = to_i2c_client(dev);
1152+ struct v4l2_subdev *sd = i2c_get_clientdata(client);
1153+ struct ov08d10 *ov08d10 = to_ov08d10(sd);
1154+ int ret;
1155+
1156+ mutex_lock(&ov08d10->mutex);
1157+
1158+ if (ov08d10->streaming) {
1159+ ret = ov08d10_start_streaming(ov08d10);
1160+ if (ret) {
1161+ ov08d10->streaming = false;
1162+ ov08d10_stop_streaming(ov08d10);
1163+ mutex_unlock(&ov08d10->mutex);
1164+ return ret;
1165+ }
1166+ }
1167+
1168+ mutex_unlock(&ov08d10->mutex);
1169+
1170+ return 0;
1171+}
1172+
1173+static int ov08d10_set_format(struct v4l2_subdev *sd,
1174+ struct v4l2_subdev_state *sd_state,
1175+ struct v4l2_subdev_format *fmt)
1176+{
1177+ struct ov08d10 *ov08d10 = to_ov08d10(sd);
1178+ const struct ov08d10_mode *mode;
1179+ s32 vblank_def, h_blank;
1180+ s64 pixel_rate;
1181+
1182+ mode = v4l2_find_nearest_size(ov08d10->priv_lane->sp_modes,
1183+ ov08d10->modes_size,
1184+ width, height, fmt->format.width,
1185+ fmt->format.height);
1186+
1187+ mutex_lock(&ov08d10->mutex);
1188+ ov08d10_update_pad_format(ov08d10, mode, &fmt->format);
1189+ if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) {
1190+ *v4l2_subdev_get_try_format(sd, sd_state, fmt->pad) =
1191+ fmt->format;
1192+ } else {
1193+ ov08d10->cur_mode = mode;
1194+ __v4l2_ctrl_s_ctrl(ov08d10->link_freq, mode->link_freq_index);
1195+ pixel_rate = to_rate(ov08d10->priv_lane->link_freq_menu,
1196+ mode->link_freq_index,
1197+ ov08d10->cur_mode->data_lanes);
1198+ __v4l2_ctrl_s_ctrl_int64(ov08d10->pixel_rate, pixel_rate);
1199+
1200+ /* Update limits and set FPS to default */
1201+ vblank_def = mode->vts_def - mode->height;
1202+ __v4l2_ctrl_modify_range(ov08d10->vblank,
1203+ mode->vts_min - mode->height,
1204+ OV08D10_VTS_MAX - mode->height, 1,
1205+ vblank_def);
1206+ __v4l2_ctrl_s_ctrl(ov08d10->vblank, vblank_def);
1207+ h_blank = to_pixels_per_line(ov08d10->priv_lane->link_freq_menu,
1208+ mode->hts,
1209+ mode->link_freq_index,
1210+ ov08d10->cur_mode->data_lanes)
1211+ - mode->width;
1212+ __v4l2_ctrl_modify_range(ov08d10->hblank, h_blank, h_blank, 1,
1213+ h_blank);
1214+ }
1215+
1216+ mutex_unlock(&ov08d10->mutex);
1217+
1218+ return 0;
1219+}
1220+
1221+static int ov08d10_get_format(struct v4l2_subdev *sd,
1222+ struct v4l2_subdev_state *sd_state,
1223+ struct v4l2_subdev_format *fmt)
1224+{
1225+ struct ov08d10 *ov08d10 = to_ov08d10(sd);
1226+
1227+ mutex_lock(&ov08d10->mutex);
1228+ if (fmt->which == V4L2_SUBDEV_FORMAT_TRY)
1229+ fmt->format = *v4l2_subdev_get_try_format(&ov08d10->sd,
1230+ sd_state,
1231+ fmt->pad);
1232+ else
1233+ ov08d10_update_pad_format(ov08d10, ov08d10->cur_mode,
1234+ &fmt->format);
1235+
1236+ mutex_unlock(&ov08d10->mutex);
1237+
1238+ return 0;
1239+}
1240+
1241+static int ov08d10_enum_mbus_code(struct v4l2_subdev *sd,
1242+ struct v4l2_subdev_state *sd_state,
1243+ struct v4l2_subdev_mbus_code_enum *code)
1244+{
1245+ struct ov08d10 *ov08d10 = to_ov08d10(sd);
1246+
1247+ if (code->index > 0)
1248+ return -EINVAL;
1249+
1250+ mutex_lock(&ov08d10->mutex);
1251+ code->code = ov08d10_get_format_code(ov08d10);
1252+ mutex_unlock(&ov08d10->mutex);
1253+
1254+ return 0;
1255+}
1256+
1257+static int ov08d10_enum_frame_size(struct v4l2_subdev *sd,
1258+ struct v4l2_subdev_state *sd_state,
1259+ struct v4l2_subdev_frame_size_enum *fse)
1260+{
1261+ struct ov08d10 *ov08d10 = to_ov08d10(sd);
1262+
1263+ if (fse->index >= ov08d10->modes_size)
1264+ return -EINVAL;
1265+
1266+ mutex_lock(&ov08d10->mutex);
1267+ if (fse->code != ov08d10_get_format_code(ov08d10)) {
1268+ mutex_unlock(&ov08d10->mutex);
1269+ return -EINVAL;
1270+ }
1271+ mutex_unlock(&ov08d10->mutex);
1272+
1273+ fse->min_width = ov08d10->priv_lane->sp_modes[fse->index].width;
1274+ fse->max_width = fse->min_width;
1275+ fse->min_height = ov08d10->priv_lane->sp_modes[fse->index].height;
1276+ fse->max_height = fse->min_height;
1277+
1278+ return 0;
1279+}
1280+
1281+static int ov08d10_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
1282+{
1283+ struct ov08d10 *ov08d10 = to_ov08d10(sd);
1284+
1285+ mutex_lock(&ov08d10->mutex);
1286+ ov08d10_update_pad_format(ov08d10, &ov08d10->priv_lane->sp_modes[0],
1287+ v4l2_subdev_get_try_format(sd, fh->state, 0));
1288+ mutex_unlock(&ov08d10->mutex);
1289+
1290+ return 0;
1291+}
1292+
1293+static const struct v4l2_subdev_video_ops ov08d10_video_ops = {
1294+ .s_stream = ov08d10_set_stream,
1295+};
1296+
1297+static const struct v4l2_subdev_pad_ops ov08d10_pad_ops = {
1298+ .set_fmt = ov08d10_set_format,
1299+ .get_fmt = ov08d10_get_format,
1300+ .enum_mbus_code = ov08d10_enum_mbus_code,
1301+ .enum_frame_size = ov08d10_enum_frame_size,
1302+};
1303+
1304+static const struct v4l2_subdev_ops ov08d10_subdev_ops = {
1305+ .video = &ov08d10_video_ops,
1306+ .pad = &ov08d10_pad_ops,
1307+};
1308+
1309+static const struct v4l2_subdev_internal_ops ov08d10_internal_ops = {
1310+ .open = ov08d10_open,
1311+};
1312+
1313+static int ov08d10_identify_module(struct ov08d10 *ov08d10)
1314+{
1315+ struct i2c_client *client = v4l2_get_subdevdata(&ov08d10->sd);
1316+ u32 val;
1317+ u16 chip_id;
1318+ int ret;
1319+
1320+ /* System control registers */
1321+ ret = i2c_smbus_write_byte_data(client, OV08D10_REG_PAGE, 0x00);
1322+ if (ret < 0)
1323+ return ret;
1324+
1325+ /* Validate the chip ID */
1326+ ret = i2c_smbus_read_byte_data(client, OV08D10_REG_CHIP_ID_0);
1327+ if (ret < 0)
1328+ return ret;
1329+
1330+ val = ret << 8;
1331+
1332+ ret = i2c_smbus_read_byte_data(client, OV08D10_REG_CHIP_ID_1);
1333+ if (ret < 0)
1334+ return ret;
1335+
1336+ chip_id = val | ret;
1337+
1338+ if ((chip_id & OV08D10_ID_MASK) != OV08D10_CHIP_ID) {
1339+ dev_err(&client->dev, "unexpected sensor id(0x%04x)\n",
1340+ chip_id);
1341+ return -EINVAL;
1342+ }
1343+
1344+ return 0;
1345+}
1346+
1347+static int ov08d10_get_hwcfg(struct ov08d10 *ov08d10, struct device *dev)
1348+{
1349+ struct fwnode_handle *ep;
1350+ struct fwnode_handle *fwnode = dev_fwnode(dev);
1351+ struct v4l2_fwnode_endpoint bus_cfg = {
1352+ .bus_type = V4L2_MBUS_CSI2_DPHY
1353+ };
1354+ u32 xvclk_rate;
1355+ unsigned int i, j;
1356+ int ret;
1357+
1358+ if (!fwnode)
1359+ return -ENXIO;
1360+
1361+ ret = fwnode_property_read_u32(fwnode, "clock-frequency", &xvclk_rate);
1362+ if (ret)
1363+ return ret;
1364+
1365+ if (xvclk_rate != OV08D10_XVCLK_19_2)
1366+ dev_warn(dev, "external clock rate %u is unsupported",
1367+ xvclk_rate);
1368+
1369+ ep = fwnode_graph_get_next_endpoint(fwnode, NULL);
1370+ if (!ep)
1371+ return -ENXIO;
1372+
1373+ ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
1374+ fwnode_handle_put(ep);
1375+ if (ret)
1376+ return ret;
1377+
1378+ /* Get number of data lanes */
1379+ if (bus_cfg.bus.mipi_csi2.num_data_lanes != 2) {
1380+ dev_err(dev, "number of CSI2 data lanes %d is not supported",
1381+ bus_cfg.bus.mipi_csi2.num_data_lanes);
1382+ ret = -EINVAL;
1383+ goto check_hwcfg_error;
1384+ }
1385+
1386+ dev_dbg(dev, "Using %u data lanes\n", ov08d10->cur_mode->data_lanes);
1387+
1388+ ov08d10->priv_lane = &lane_cfg_2;
1389+ ov08d10->modes_size = ov08d10_modes_num(ov08d10);
1390+
1391+ if (!bus_cfg.nr_of_link_frequencies) {
1392+ dev_err(dev, "no link frequencies defined");
1393+ ret = -EINVAL;
1394+ goto check_hwcfg_error;
1395+ }
1396+
1397+ for (i = 0; i < ARRAY_SIZE(ov08d10->priv_lane->link_freq_menu); i++) {
1398+ for (j = 0; j < bus_cfg.nr_of_link_frequencies; j++) {
1399+ if (ov08d10->priv_lane->link_freq_menu[i] ==
1400+ bus_cfg.link_frequencies[j])
1401+ break;
1402+ }
1403+
1404+ if (j == bus_cfg.nr_of_link_frequencies) {
1405+ dev_err(dev, "no link frequency %lld supported",
1406+ ov08d10->priv_lane->link_freq_menu[i]);
1407+ ret = -EINVAL;
1408+ goto check_hwcfg_error;
1409+ }
1410+ }
1411+
1412+check_hwcfg_error:
1413+ v4l2_fwnode_endpoint_free(&bus_cfg);
1414+
1415+ return ret;
1416+}
1417+
1418+static int ov08d10_remove(struct i2c_client *client)
1419+{
1420+ struct v4l2_subdev *sd = i2c_get_clientdata(client);
1421+ struct ov08d10 *ov08d10 = to_ov08d10(sd);
1422+
1423+ v4l2_async_unregister_subdev(sd);
1424+ media_entity_cleanup(&sd->entity);
1425+ v4l2_ctrl_handler_free(sd->ctrl_handler);
1426+ pm_runtime_disable(&client->dev);
1427+ mutex_destroy(&ov08d10->mutex);
1428+
1429+ return 0;
1430+}
1431+
1432+static int ov08d10_probe(struct i2c_client *client)
1433+{
1434+ struct ov08d10 *ov08d10;
1435+ int ret;
1436+
1437+ ov08d10 = devm_kzalloc(&client->dev, sizeof(*ov08d10), GFP_KERNEL);
1438+ if (!ov08d10)
1439+ return -ENOMEM;
1440+
1441+ ret = ov08d10_get_hwcfg(ov08d10, &client->dev);
1442+ if (ret) {
1443+ dev_err(&client->dev, "failed to get HW configuration: %d",
1444+ ret);
1445+ return ret;
1446+ }
1447+
1448+ v4l2_i2c_subdev_init(&ov08d10->sd, client, &ov08d10_subdev_ops);
1449+
1450+ ret = ov08d10_identify_module(ov08d10);
1451+ if (ret) {
1452+ dev_err(&client->dev, "failed to find sensor: %d", ret);
1453+ return ret;
1454+ }
1455+
1456+ mutex_init(&ov08d10->mutex);
1457+ ov08d10->cur_mode = &ov08d10->priv_lane->sp_modes[0];
1458+ ret = ov08d10_init_controls(ov08d10);
1459+ if (ret) {
1460+ dev_err(&client->dev, "failed to init controls: %d", ret);
1461+ goto probe_error_v4l2_ctrl_handler_free;
1462+ }
1463+
1464+ ov08d10->sd.internal_ops = &ov08d10_internal_ops;
1465+ ov08d10->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
1466+ ov08d10->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
1467+ ov08d10->pad.flags = MEDIA_PAD_FL_SOURCE;
1468+ ret = media_entity_pads_init(&ov08d10->sd.entity, 1, &ov08d10->pad);
1469+ if (ret) {
1470+ dev_err(&client->dev, "failed to init entity pads: %d", ret);
1471+ goto probe_error_v4l2_ctrl_handler_free;
1472+ }
1473+
1474+ ret = v4l2_async_register_subdev_sensor(&ov08d10->sd);
1475+ if (ret < 0) {
1476+ dev_err(&client->dev, "failed to register V4L2 subdev: %d",
1477+ ret);
1478+ goto probe_error_media_entity_cleanup;
1479+ }
1480+
1481+ /*
1482+ * Device is already turned on by i2c-core with ACPI domain PM.
1483+ * Enable runtime PM and turn off the device.
1484+ */
1485+ pm_runtime_set_active(&client->dev);
1486+ pm_runtime_enable(&client->dev);
1487+ pm_runtime_idle(&client->dev);
1488+
1489+ return 0;
1490+
1491+probe_error_media_entity_cleanup:
1492+ media_entity_cleanup(&ov08d10->sd.entity);
1493+
1494+probe_error_v4l2_ctrl_handler_free:
1495+ v4l2_ctrl_handler_free(ov08d10->sd.ctrl_handler);
1496+ mutex_destroy(&ov08d10->mutex);
1497+
1498+ return ret;
1499+}
1500+
1501+static const struct dev_pm_ops ov08d10_pm_ops = {
1502+ SET_SYSTEM_SLEEP_PM_OPS(ov08d10_suspend, ov08d10_resume)
1503+};
1504+
1505+#ifdef CONFIG_ACPI
1506+static const struct acpi_device_id ov08d10_acpi_ids[] = {
1507+ { "OVTI08D1" },
1508+ { /* sentinel */ }
1509+};
1510+
1511+MODULE_DEVICE_TABLE(acpi, ov08d10_acpi_ids);
1512+#endif
1513+
1514+static struct i2c_driver ov08d10_i2c_driver = {
1515+ .driver = {
1516+ .name = "ov08d10",
1517+ .pm = &ov08d10_pm_ops,
1518+ .acpi_match_table = ACPI_PTR(ov08d10_acpi_ids),
1519+ },
1520+ .probe_new = ov08d10_probe,
1521+ .remove = ov08d10_remove,
1522+};
1523+
1524+module_i2c_driver(ov08d10_i2c_driver);
1525+
1526+MODULE_AUTHOR("Su, Jimmy <jimmy.su@intel.com>");
1527+MODULE_DESCRIPTION("OmniVision ov08d10 sensor driver");
1528+MODULE_LICENSE("GPL v2");
drivers/media/i2c/ov2740.c+1−7
@@ -1162,6 +1162,7 @@ static int ov2740_probe(struct i2c_client *client) · 1161 unmodified lines
11621162 if (!ov2740)
11631163 return -ENOMEM;
11641164
1165+ v4l2_i2c_subdev_init(&ov2740->sd, client, &ov2740_subdev_ops);
11651166 full_power = acpi_dev_state_d0(&client->dev);
11661167 if (full_power) {
11671168 ret = ov2740_identify_module(ov2740);
@@ -1171,13 +1172,6 @@ static int ov2740_probe(struct i2c_client *client) · 3 unmodified lines
11711172 }
11721173 }
11731174
1174− v4l2_i2c_subdev_init(&ov2740->sd, client, &ov2740_subdev_ops);
1175− ret = ov2740_identify_module(ov2740);
1176− if (ret) {
1177− dev_err(&client->dev, "failed to find sensor: %d", ret);
1178− return ret;
1179− }
1180−
11811175 mutex_init(&ov2740->mutex);
11821176 ov2740->cur_mode = &supported_modes[0];
11831177 ret = ov2740_init_controls(ov2740);
drivers/media/i2c/ov5640.c+7−7
@@ -2293,7 +2293,6 @@ static int ov5640_set_fmt(struct v4l2_subdev *sd, · 2292 unmodified lines
22932293 struct ov5640_dev *sensor = to_ov5640_dev(sd);
22942294 const struct ov5640_mode_info *new_mode;
22952295 struct v4l2_mbus_framefmt *mbus_fmt = &format->format;
2296− struct v4l2_mbus_framefmt *fmt;
22972296 int ret;
22982297
22992298 if (format->pad != 0)
@@ -2311,12 +2310,10 @@ static int ov5640_set_fmt(struct v4l2_subdev *sd, · 11 unmodified lines
23112310 if (ret)
23122311 goto out;
23132312
2314− if (format->which == V4L2_SUBDEV_FORMAT_TRY)
2315− fmt = v4l2_subdev_get_try_format(sd, sd_state, 0);
2316− else
2317− fmt = &sensor->fmt;
2318−
2319− *fmt = *mbus_fmt;
2313+ if (format->which == V4L2_SUBDEV_FORMAT_TRY) {
2314+ *v4l2_subdev_get_try_format(sd, sd_state, 0) = *mbus_fmt;
2315+ goto out;
2316+ }
23202317
23212318 if (new_mode != sensor->current_mode) {
23222319 sensor->current_mode = new_mode;
@@ -2325,6 +2322,9 @@ static int ov5640_set_fmt(struct v4l2_subdev *sd, · 2 unmodified lines
23252322 if (mbus_fmt->code != sensor->fmt.code)
23262323 sensor->pending_fmt_change = true;
23272324
2325+ /* update format even if code is unchanged, resolution might change */
2326+ sensor->fmt = *mbus_fmt;
2327+
23282328 __v4l2_ctrl_s_ctrl_int64(sensor->ctrls.pixel_rate,
23292329 ov5640_calc_pixel_rate(sensor));
23302330 out:
drivers/media/i2c/ov5648.c+11−5
@@ -639,7 +639,7 @@ struct ov5648_ctrls { · 638 unmodified lines
639639 struct v4l2_ctrl *pixel_rate;
640640
641641 struct v4l2_ctrl_handler handler;
642−} __packed;
642+};
643643
644644 struct ov5648_sensor {
645645 struct device *dev;
@@ -1112,7 +1112,7 @@ static int ov5648_pad_configure(struct ov5648_sensor *sensor) · 466 unmodified lines
11121112
11131113 static int ov5648_mipi_configure(struct ov5648_sensor *sensor)
11141114 {
1115− struct v4l2_fwnode_bus_mipi_csi2 *bus_mipi_csi2 =
1115+ struct v4l2_mbus_config_mipi_csi2 *bus_mipi_csi2 =
11161116 &sensor->endpoint.bus.mipi_csi2;
11171117 unsigned int lanes_count = bus_mipi_csi2->num_data_lanes;
11181118 int ret;
@@ -1692,7 +1692,7 @@ static int ov5648_state_mipi_configure(struct ov5648_sensor *sensor, · 573 unmodified lines
16921692 u32 mbus_code)
16931693 {
16941694 struct ov5648_ctrls *ctrls = &sensor->ctrls;
1695− struct v4l2_fwnode_bus_mipi_csi2 *bus_mipi_csi2 =
1695+ struct v4l2_mbus_config_mipi_csi2 *bus_mipi_csi2 =
16961696 &sensor->endpoint.bus.mipi_csi2;
16971697 unsigned long mipi_clk_rate;
16981698 unsigned int bits_per_sample;
@@ -1778,8 +1778,14 @@ static int ov5648_state_configure(struct ov5648_sensor *sensor, · 79 unmodified lines
17781778
17791779 static int ov5648_state_init(struct ov5648_sensor *sensor)
17801780 {
1781− return ov5648_state_configure(sensor, &ov5648_modes[0],
1782− ov5648_mbus_codes[0]);
1781+ int ret;
1782+
1783+ mutex_lock(&sensor->mutex);
1784+ ret = ov5648_state_configure(sensor, &ov5648_modes[0],
1785+ ov5648_mbus_codes[0]);
1786+ mutex_unlock(&sensor->mutex);
1787+
1788+ return ret;
17831789 }
17841790
17851791 /* Sensor Base */
drivers/media/i2c/ov5675.c+29−3
@@ -50,14 +50,21 @@ · 49 unmodified lines
5050 #define OV5675_ANAL_GAIN_STEP 1
5151
5252 /* Digital gain controls from sensor */
53+#define OV5675_REG_DIGITAL_GAIN 0x350a
5354 #define OV5675_REG_MWB_R_GAIN 0x5019
5455 #define OV5675_REG_MWB_G_GAIN 0x501b
5556 #define OV5675_REG_MWB_B_GAIN 0x501d
56−#define OV5675_DGTL_GAIN_MIN 0
57+#define OV5675_DGTL_GAIN_MIN 1024
5758 #define OV5675_DGTL_GAIN_MAX 4095
5859 #define OV5675_DGTL_GAIN_STEP 1
5960 #define OV5675_DGTL_GAIN_DEFAULT 1024
6061
62+/* Group Access */
63+#define OV5675_REG_GROUP_ACCESS 0x3208
64+#define OV5675_GROUP_HOLD_START 0x0
65+#define OV5675_GROUP_HOLD_END 0x10
66+#define OV5675_GROUP_HOLD_LAUNCH 0xa0
67+
6168 /* Test Pattern Control */
6269 #define OV5675_REG_TEST_PATTERN 0x4503
6370 #define OV5675_TEST_PATTERN_ENABLE BIT(7)
@@ -587,6 +594,12 @@ static int ov5675_update_digital_gain(struct ov5675 *ov5675, u32 d_gain) · 523 unmodified lines
587594 {
588595 int ret;
589596
597+ ret = ov5675_write_reg(ov5675, OV5675_REG_GROUP_ACCESS,
598+ OV5675_REG_VALUE_08BIT,
599+ OV5675_GROUP_HOLD_START);
600+ if (ret)
601+ return ret;
602+
590603 ret = ov5675_write_reg(ov5675, OV5675_REG_MWB_R_GAIN,
591604 OV5675_REG_VALUE_16BIT, d_gain);
592605 if (ret)
@@ -597,8 +610,21 @@ static int ov5675_update_digital_gain(struct ov5675 *ov5675, u32 d_gain) · 4 unmodified lines
597610 if (ret)
598611 return ret;
599612
600− return ov5675_write_reg(ov5675, OV5675_REG_MWB_B_GAIN,
601− OV5675_REG_VALUE_16BIT, d_gain);
613+ ret = ov5675_write_reg(ov5675, OV5675_REG_MWB_B_GAIN,
614+ OV5675_REG_VALUE_16BIT, d_gain);
615+ if (ret)
616+ return ret;
617+
618+ ret = ov5675_write_reg(ov5675, OV5675_REG_GROUP_ACCESS,
619+ OV5675_REG_VALUE_08BIT,
620+ OV5675_GROUP_HOLD_END);
621+ if (ret)
622+ return ret;
623+
624+ ret = ov5675_write_reg(ov5675, OV5675_REG_GROUP_ACCESS,
625+ OV5675_REG_VALUE_08BIT,
626+ OV5675_GROUP_HOLD_LAUNCH);
627+ return ret;
602628 }
603629
604630 static int ov5675_test_pattern(struct ov5675 *ov5675, u32 pattern)
drivers/media/i2c/ov5693.c+4−5
@@ -950,7 +950,6 @@ static int ov5693_set_fmt(struct v4l2_subdev *sd, · 949 unmodified lines
950950 unsigned int width, height;
951951 unsigned int hblank;
952952 int exposure_max;
953− int ret = 0;
954953
955954 crop = __ov5693_get_pad_crop(ov5693, state, format->pad, format->which);
956955
@@ -982,13 +981,13 @@ static int ov5693_set_fmt(struct v4l2_subdev *sd, · 25 unmodified lines
982981 format->format = *fmt;
983982
984983 if (format->which == V4L2_SUBDEV_FORMAT_TRY)
985− return ret;
984+ return 0;
986985
987986 mutex_lock(&ov5693->lock);
988987
989− ov5693->mode.binning_x = hratio > 1 ? true : false;
988+ ov5693->mode.binning_x = hratio > 1;
990989 ov5693->mode.inc_x_odd = hratio > 1 ? 3 : 1;
991− ov5693->mode.binning_y = vratio > 1 ? true : false;
990+ ov5693->mode.binning_y = vratio > 1;
992991 ov5693->mode.inc_y_odd = vratio > 1 ? 3 : 1;
993992
994993 ov5693->mode.vts = __ov5693_calc_vts(fmt->height);
@@ -1012,7 +1011,7 @@ static int ov5693_set_fmt(struct v4l2_subdev *sd, · 17 unmodified lines
10121011 exposure_max));
10131012
10141013 mutex_unlock(&ov5693->lock);
1015− return ret;
1014+ return 0;
10161015 }
10171016
10181017 static int ov5693_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/ov6650.c+111−95
@@ -472,9 +472,16 @@ static int ov6650_get_selection(struct v4l2_subdev *sd, · 471 unmodified lines
472472 {
473473 struct i2c_client *client = v4l2_get_subdevdata(sd);
474474 struct ov6650 *priv = to_ov6650(client);
475+ struct v4l2_rect *rect;
475476
476− if (sel->which != V4L2_SUBDEV_FORMAT_ACTIVE)
477− return -EINVAL;
477+ if (sel->which == V4L2_SUBDEV_FORMAT_TRY) {
478+ /* pre-select try crop rectangle */
479+ rect = &sd_state->pads->try_crop;
480+
481+ } else {
482+ /* pre-select active crop rectangle */
483+ rect = &priv->rect;
484+ }
478485
479486 switch (sel->target) {
480487 case V4L2_SEL_TGT_CROP_BOUNDS:
@@ -483,14 +490,33 @@ static int ov6650_get_selection(struct v4l2_subdev *sd, · 2 unmodified lines
483490 sel->r.width = W_CIF;
484491 sel->r.height = H_CIF;
485492 return 0;
493+
486494 case V4L2_SEL_TGT_CROP:
487− sel->r = priv->rect;
495+ /* use selected crop rectangle */
496+ sel->r = *rect;
488497 return 0;
498+
489499 default:
490500 return -EINVAL;
491501 }
492502 }
493503
504+static bool is_unscaled_ok(int width, int height, struct v4l2_rect *rect)
505+{
506+ return width > rect->width >> 1 || height > rect->height >> 1;
507+}
508+
509+static void ov6650_bind_align_crop_rectangle(struct v4l2_rect *rect)
510+{
511+ v4l_bound_align_image(&rect->width, 2, W_CIF, 1,
512+ &rect->height, 2, H_CIF, 1, 0);
513+ v4l_bound_align_image(&rect->left, DEF_HSTRT << 1,
514+ (DEF_HSTRT << 1) + W_CIF - (__s32)rect->width, 1,
515+ &rect->top, DEF_VSTRT << 1,
516+ (DEF_VSTRT << 1) + H_CIF - (__s32)rect->height,
517+ 1, 0);
518+}
519+
494520 static int ov6650_set_selection(struct v4l2_subdev *sd,
495521 struct v4l2_subdev_state *sd_state,
496522 struct v4l2_subdev_selection *sel)
@@ -499,18 +525,30 @@ static int ov6650_set_selection(struct v4l2_subdev *sd, · 2 unmodified lines
499525 struct ov6650 *priv = to_ov6650(client);
500526 int ret;
501527
502− if (sel->which != V4L2_SUBDEV_FORMAT_ACTIVE ||
503− sel->target != V4L2_SEL_TGT_CROP)
528+ if (sel->target != V4L2_SEL_TGT_CROP)
504529 return -EINVAL;
505530
506− v4l_bound_align_image(&sel->r.width, 2, W_CIF, 1,
507− &sel->r.height, 2, H_CIF, 1, 0);
508− v4l_bound_align_image(&sel->r.left, DEF_HSTRT << 1,
509− (DEF_HSTRT << 1) + W_CIF - (__s32)sel->r.width, 1,
510− &sel->r.top, DEF_VSTRT << 1,
511− (DEF_VSTRT << 1) + H_CIF - (__s32)sel->r.height,
512− 1, 0);
531+ ov6650_bind_align_crop_rectangle(&sel->r);
532+
533+ if (sel->which == V4L2_SUBDEV_FORMAT_TRY) {
534+ struct v4l2_rect *crop = &sd_state->pads->try_crop;
535+ struct v4l2_mbus_framefmt *mf = &sd_state->pads->try_fmt;
536+ /* detect current pad config scaling factor */
537+ bool half_scale = !is_unscaled_ok(mf->width, mf->height, crop);
513538
539+ /* store new crop rectangle */
540+ *crop = sel->r;
541+
542+ /* adjust frame size */
543+ mf->width = crop->width >> half_scale;
544+ mf->height = crop->height >> half_scale;
545+
546+ return 0;
547+ }
548+
549+ /* V4L2_SUBDEV_FORMAT_ACTIVE */
550+
551+ /* apply new crop rectangle */
514552 ret = ov6650_reg_write(client, REG_HSTRT, sel->r.left >> 1);
515553 if (!ret) {
516554 priv->rect.width += priv->rect.left - sel->r.left;
@@ -562,30 +600,13 @@ static int ov6650_get_fmt(struct v4l2_subdev *sd, · 45 unmodified lines
562600 return 0;
563601 }
564602
565−static bool is_unscaled_ok(int width, int height, struct v4l2_rect *rect)
566−{
567− return width > rect->width >> 1 || height > rect->height >> 1;
568−}
569−
570603 #define to_clkrc(div) ((div) - 1)
571604
572605 /* set the format we will capture in */
573−static int ov6650_s_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf)
606+static int ov6650_s_fmt(struct v4l2_subdev *sd, u32 code, bool half_scale)
574607 {
575608 struct i2c_client *client = v4l2_get_subdevdata(sd);
576609 struct ov6650 *priv = to_ov6650(client);
577− bool half_scale = !is_unscaled_ok(mf->width, mf->height, &priv->rect);
578− struct v4l2_subdev_selection sel = {
579− .which = V4L2_SUBDEV_FORMAT_ACTIVE,
580− .target = V4L2_SEL_TGT_CROP,
581− .r.left = priv->rect.left + (priv->rect.width >> 1) -
582− (mf->width >> (1 - half_scale)),
583− .r.top = priv->rect.top + (priv->rect.height >> 1) -
584− (mf->height >> (1 - half_scale)),
585− .r.width = mf->width << half_scale,
586− .r.height = mf->height << half_scale,
587− };
588− u32 code = mf->code;
589610 u8 coma_set = 0, coma_mask = 0, coml_set, coml_mask;
590611 int ret;
591612
@@ -653,9 +674,7 @@ static int ov6650_s_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf) · 61 unmodified lines
653674 coma_mask |= COMA_QCIF;
654675 }
655676
656− ret = ov6650_set_selection(sd, NULL, &sel);
657− if (!ret)
658− ret = ov6650_reg_rmw(client, REG_COMA, coma_set, coma_mask);
677+ ret = ov6650_reg_rmw(client, REG_COMA, coma_set, coma_mask);
659678 if (!ret) {
660679 priv->half_scale = half_scale;
661680
@@ -674,14 +693,12 @@ static int ov6650_set_fmt(struct v4l2_subdev *sd, · 12 unmodified lines
674693 struct v4l2_mbus_framefmt *mf = &format->format;
675694 struct i2c_client *client = v4l2_get_subdevdata(sd);
676695 struct ov6650 *priv = to_ov6650(client);
696+ struct v4l2_rect *crop;
697+ bool half_scale;
677698
678699 if (format->pad)
679700 return -EINVAL;
680701
681− if (is_unscaled_ok(mf->width, mf->height, &priv->rect))
682− v4l_bound_align_image(&mf->width, 2, W_CIF, 1,
683− &mf->height, 2, H_CIF, 1, 0);
684−
685702 switch (mf->code) {
686703 case MEDIA_BUS_FMT_Y10_1X10:
687704 mf->code = MEDIA_BUS_FMT_Y8_1X8;
@@ -699,10 +716,17 @@ static int ov6650_set_fmt(struct v4l2_subdev *sd, · 11 unmodified lines
699716 break;
700717 }
701718
719+ if (format->which == V4L2_SUBDEV_FORMAT_TRY)
720+ crop = &sd_state->pads->try_crop;
721+ else
722+ crop = &priv->rect;
723+
724+ half_scale = !is_unscaled_ok(mf->width, mf->height, crop);
725+
702726 if (format->which == V4L2_SUBDEV_FORMAT_TRY) {
703− /* store media bus format code and frame size in pad config */
704− sd_state->pads->try_fmt.width = mf->width;
705− sd_state->pads->try_fmt.height = mf->height;
727+ /* store new mbus frame format code and size in pad config */
728+ sd_state->pads->try_fmt.width = crop->width >> half_scale;
729+ sd_state->pads->try_fmt.height = crop->height >> half_scale;
706730 sd_state->pads->try_fmt.code = mf->code;
707731
708732 /* return default mbus frame format updated with pad config */
@@ -712,9 +736,11 @@ static int ov6650_set_fmt(struct v4l2_subdev *sd, · 3 unmodified lines
712736 mf->code = sd_state->pads->try_fmt.code;
713737
714738 } else {
715− /* apply new media bus format code and frame size */
716− int ret = ov6650_s_fmt(sd, mf);
739+ int ret = 0;
717740
741+ /* apply new media bus frame format and scaling if changed */
742+ if (mf->code != priv->code || half_scale != priv->half_scale)
743+ ret = ov6650_s_fmt(sd, mf->code, half_scale);
718744 if (ret)
719745 return ret;
720746
@@ -738,6 +764,33 @@ static int ov6650_enum_mbus_code(struct v4l2_subdev *sd, · 17 unmodified lines
738764 return 0;
739765 }
740766
767+static int ov6650_enum_frame_interval(struct v4l2_subdev *sd,
768+ struct v4l2_subdev_state *sd_state,
769+ struct v4l2_subdev_frame_interval_enum *fie)
770+{
771+ int i;
772+
773+ /* enumerate supported frame intervals not exceeding 1 second */
774+ if (fie->index > CLKRC_DIV_MASK ||
775+ GET_CLKRC_DIV(fie->index) > FRAME_RATE_MAX)
776+ return -EINVAL;
777+
778+ for (i = 0; i < ARRAY_SIZE(ov6650_codes); i++)
779+ if (fie->code == ov6650_codes[i])
780+ break;
781+ if (i == ARRAY_SIZE(ov6650_codes))
782+ return -EINVAL;
783+
784+ if (!fie->width || fie->width > W_CIF ||
785+ !fie->height || fie->height > H_CIF)
786+ return -EINVAL;
787+
788+ fie->interval.numerator = GET_CLKRC_DIV(fie->index);
789+ fie->interval.denominator = FRAME_RATE_MAX;
790+
791+ return 0;
792+}
793+
741794 static int ov6650_g_frame_interval(struct v4l2_subdev *sd,
742795 struct v4l2_subdev_frame_interval *ival)
743796 {
@@ -890,9 +943,8 @@ static int ov6650_video_probe(struct v4l2_subdev *sd) · 146 unmodified lines
890943 if (!ret)
891944 ret = ov6650_prog_dflt(client, xclk->clkrc);
892945 if (!ret) {
893− struct v4l2_mbus_framefmt mf = ov6650_def_fmt;
894−
895− ret = ov6650_s_fmt(sd, &mf);
946+ /* driver default frame format, no scaling */
947+ ret = ov6650_s_fmt(sd, ov6650_def_fmt.code, false);
896948 }
897949 if (!ret)
898950 ret = v4l2_ctrl_handler_setup(&priv->hdl);
@@ -932,54 +984,18 @@ static int ov6650_get_mbus_config(struct v4l2_subdev *sd, · 33 unmodified lines
932984 if (ret)
933985 return ret;
934986
935− cfg->flags = V4L2_MBUS_MASTER | V4L2_MBUS_DATA_ACTIVE_HIGH
936− | ((comj & COMJ_VSYNC_HIGH) ? V4L2_MBUS_VSYNC_ACTIVE_HIGH
937− : V4L2_MBUS_VSYNC_ACTIVE_LOW)
938− | ((comf & COMF_HREF_LOW) ? V4L2_MBUS_HSYNC_ACTIVE_LOW
939− : V4L2_MBUS_HSYNC_ACTIVE_HIGH)
940− | ((comj & COMJ_PCLK_RISING) ? V4L2_MBUS_PCLK_SAMPLE_RISING
941− : V4L2_MBUS_PCLK_SAMPLE_FALLING);
942987 cfg->type = V4L2_MBUS_PARALLEL;
943988
989+ cfg->bus.parallel.flags = V4L2_MBUS_MASTER | V4L2_MBUS_DATA_ACTIVE_HIGH
990+ | ((comj & COMJ_VSYNC_HIGH) ? V4L2_MBUS_VSYNC_ACTIVE_HIGH
991+ : V4L2_MBUS_VSYNC_ACTIVE_LOW)
992+ | ((comf & COMF_HREF_LOW) ? V4L2_MBUS_HSYNC_ACTIVE_LOW
993+ : V4L2_MBUS_HSYNC_ACTIVE_HIGH)
994+ | ((comj & COMJ_PCLK_RISING) ? V4L2_MBUS_PCLK_SAMPLE_RISING
995+ : V4L2_MBUS_PCLK_SAMPLE_FALLING);
944996 return 0;
945997 }
946998
947−/* Alter bus settings on camera side */
948−static int ov6650_set_mbus_config(struct v4l2_subdev *sd,
949− unsigned int pad,
950− struct v4l2_mbus_config *cfg)
951−{
952− struct i2c_client *client = v4l2_get_subdevdata(sd);
953− int ret = 0;
954−
955− if (cfg->flags & V4L2_MBUS_PCLK_SAMPLE_RISING)
956− ret = ov6650_reg_rmw(client, REG_COMJ, COMJ_PCLK_RISING, 0);
957− else if (cfg->flags & V4L2_MBUS_PCLK_SAMPLE_FALLING)
958− ret = ov6650_reg_rmw(client, REG_COMJ, 0, COMJ_PCLK_RISING);
959− if (ret)
960− return ret;
961−
962− if (cfg->flags & V4L2_MBUS_HSYNC_ACTIVE_LOW)
963− ret = ov6650_reg_rmw(client, REG_COMF, COMF_HREF_LOW, 0);
964− else if (cfg->flags & V4L2_MBUS_HSYNC_ACTIVE_HIGH)
965− ret = ov6650_reg_rmw(client, REG_COMF, 0, COMF_HREF_LOW);
966− if (ret)
967− return ret;
968−
969− if (cfg->flags & V4L2_MBUS_VSYNC_ACTIVE_HIGH)
970− ret = ov6650_reg_rmw(client, REG_COMJ, COMJ_VSYNC_HIGH, 0);
971− else if (cfg->flags & V4L2_MBUS_VSYNC_ACTIVE_LOW)
972− ret = ov6650_reg_rmw(client, REG_COMJ, 0, COMJ_VSYNC_HIGH);
973− if (ret)
974− return ret;
975−
976− /*
977− * Update the configuration to report what is actually applied to
978− * the hardware.
979− */
980− return ov6650_get_mbus_config(sd, pad, cfg);
981−}
982−
983999 static const struct v4l2_subdev_video_ops ov6650_video_ops = {
9841000 .s_stream = ov6650_s_stream,
9851001 .g_frame_interval = ov6650_g_frame_interval,
@@ -987,13 +1003,13 @@ static const struct v4l2_subdev_video_ops ov6650_video_ops = { · 1 unmodified line
9871003 };
9881004
9891005 static const struct v4l2_subdev_pad_ops ov6650_pad_ops = {
990− .enum_mbus_code = ov6650_enum_mbus_code,
991− .get_selection = ov6650_get_selection,
992− .set_selection = ov6650_set_selection,
993− .get_fmt = ov6650_get_fmt,
994− .set_fmt = ov6650_set_fmt,
995− .get_mbus_config = ov6650_get_mbus_config,
996− .set_mbus_config = ov6650_set_mbus_config,
1006+ .enum_mbus_code = ov6650_enum_mbus_code,
1007+ .enum_frame_interval = ov6650_enum_frame_interval,
1008+ .get_selection = ov6650_get_selection,
1009+ .set_selection = ov6650_set_selection,
1010+ .get_fmt = ov6650_get_fmt,
1011+ .set_fmt = ov6650_set_fmt,
1012+ .get_mbus_config = ov6650_get_mbus_config,
9971013 };
9981014
9991015 static const struct v4l2_subdev_ops ov6650_subdev_ops = {
drivers/media/i2c/ov8865.c+6−6
@@ -457,8 +457,8 @@ · 456 unmodified lines
457457
458458 #define OV8865_NATIVE_WIDTH 3296
459459 #define OV8865_NATIVE_HEIGHT 2528
460−#define OV8865_ACTIVE_START_TOP 32
461−#define OV8865_ACTIVE_START_LEFT 80
460+#define OV8865_ACTIVE_START_LEFT 16
461+#define OV8865_ACTIVE_START_TOP 40
462462 #define OV8865_ACTIVE_WIDTH 3264
463463 #define OV8865_ACTIVE_HEIGHT 2448
464464
@@ -1471,7 +1471,7 @@ static int ov8865_charge_pump_configure(struct ov8865_sensor *sensor) · 1006 unmodified lines
14711471
14721472 static int ov8865_mipi_configure(struct ov8865_sensor *sensor)
14731473 {
1474− struct v4l2_fwnode_bus_mipi_csi2 *bus_mipi_csi2 =
1474+ struct v4l2_mbus_config_mipi_csi2 *bus_mipi_csi2 =
14751475 &sensor->endpoint.bus.mipi_csi2;
14761476 unsigned int lanes_count = bus_mipi_csi2->num_data_lanes;
14771477 int ret;
@@ -2241,7 +2241,7 @@ static int ov8865_state_mipi_configure(struct ov8865_sensor *sensor, · 763 unmodified lines
22412241 u32 mbus_code)
22422242 {
22432243 struct ov8865_ctrls *ctrls = &sensor->ctrls;
2244− struct v4l2_fwnode_bus_mipi_csi2 *bus_mipi_csi2 =
2244+ struct v4l2_mbus_config_mipi_csi2 *bus_mipi_csi2 =
22452245 &sensor->endpoint.bus.mipi_csi2;
22462246 unsigned long mipi_clk_rate;
22472247 unsigned int bits_per_sample;
@@ -2838,8 +2838,8 @@ static int ov8865_get_selection(struct v4l2_subdev *subdev, · 590 unmodified lines
28382838 switch (sel->target) {
28392839 case V4L2_SEL_TGT_CROP:
28402840 mutex_lock(&sensor->mutex);
2841− __ov8865_get_pad_crop(sensor, state, sel->pad,
2842− sel->which, &sel->r);
2841+ __ov8865_get_pad_crop(sensor, state, sel->pad,
2842+ sel->which, &sel->r);
28432843 mutex_unlock(&sensor->mutex);
28442844 break;
28452845 case V4L2_SEL_TGT_NATIVE_SIZE:
drivers/media/i2c/ov9640.c+5−3
@@ -652,10 +652,12 @@ static int ov9640_get_mbus_config(struct v4l2_subdev *sd, · 651 unmodified lines
652652 unsigned int pad,
653653 struct v4l2_mbus_config *cfg)
654654 {
655− cfg->flags = V4L2_MBUS_PCLK_SAMPLE_RISING | V4L2_MBUS_MASTER |
656− V4L2_MBUS_VSYNC_ACTIVE_HIGH | V4L2_MBUS_HSYNC_ACTIVE_HIGH |
657− V4L2_MBUS_DATA_ACTIVE_HIGH;
658655 cfg->type = V4L2_MBUS_PARALLEL;
656+ cfg->bus.parallel.flags = V4L2_MBUS_PCLK_SAMPLE_RISING |
657+ V4L2_MBUS_MASTER |
658+ V4L2_MBUS_VSYNC_ACTIVE_HIGH |
659+ V4L2_MBUS_HSYNC_ACTIVE_HIGH |
660+ V4L2_MBUS_DATA_ACTIVE_HIGH;
659661
660662 return 0;
661663 }
drivers/media/i2c/saa7115.c+1−1
@@ -1129,7 +1129,7 @@ static void saa711x_set_lcr(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_forma · 1128 unmodified lines
11291129
11301130 static int saa711x_g_sliced_fmt(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *sliced)
11311131 {
1132− static u16 lcr2vbi[] = {
1132+ static const u16 lcr2vbi[] = {
11331133 0, V4L2_SLICED_TELETEXT_B, 0, /* 1 */
11341134 0, V4L2_SLICED_CAPTION_525, /* 4 */
11351135 V4L2_SLICED_WSS_625, 0, /* 5 */
drivers/media/i2c/tc358743.c+5−21
@@ -69,7 +69,7 @@ static const struct v4l2_dv_timings_cap tc358743_timings_cap = { · 68 unmodified lines
6969
7070 struct tc358743_state {
7171 struct tc358743_platform_data pdata;
72− struct v4l2_fwnode_bus_mipi_csi2 bus;
72+ struct v4l2_mbus_config_mipi_csi2 bus;
7373 struct v4l2_subdev sd;
7474 struct media_pad pad;
7575 struct v4l2_ctrl_handler hdl;
@@ -717,7 +717,7 @@ static void tc358743_set_csi(struct v4l2_subdev *sd) · 641 unmodified lines
717717 ((lanes > 3) ? MASK_D3M_HSTXVREGEN : 0x0));
718718
719719 i2c_wr32(sd, TXOPTIONCNTRL, (state->bus.flags &
720− V4L2_MBUS_CSI2_CONTINUOUS_CLOCK) ? MASK_CONTCLKMODE : 0);
720+ V4L2_MBUS_CSI2_NONCONTINUOUS_CLOCK) ? 0 : MASK_CONTCLKMODE);
721721 i2c_wr32(sd, STARTCNTRL, MASK_START);
722722 i2c_wr32(sd, CSI_START, MASK_STRT);
723723
@@ -1613,24 +1613,8 @@ static int tc358743_get_mbus_config(struct v4l2_subdev *sd, · 889 unmodified lines
16131613 cfg->type = V4L2_MBUS_CSI2_DPHY;
16141614
16151615 /* Support for non-continuous CSI-2 clock is missing in the driver */
1616− cfg->flags = V4L2_MBUS_CSI2_CONTINUOUS_CLOCK;
1617−
1618− switch (state->csi_lanes_in_use) {
1619− case 1:
1620− cfg->flags |= V4L2_MBUS_CSI2_1_LANE;
1621− break;
1622− case 2:
1623− cfg->flags |= V4L2_MBUS_CSI2_2_LANE;
1624− break;
1625− case 3:
1626− cfg->flags |= V4L2_MBUS_CSI2_3_LANE;
1627− break;
1628− case 4:
1629− cfg->flags |= V4L2_MBUS_CSI2_4_LANE;
1630− break;
1631− default:
1632− return -EINVAL;
1633− }
1616+ cfg->bus.mipi_csi2.flags = 0;
1617+ cfg->bus.mipi_csi2.num_data_lanes = state->csi_lanes_in_use;
16341618
16351619 return 0;
16361620 }
@@ -2055,7 +2039,7 @@ static int tc358743_probe(struct i2c_client *client) · 418 unmodified lines
20552039 /* platform data */
20562040 if (pdata) {
20572041 state->pdata = *pdata;
2058− state->bus.flags = V4L2_MBUS_CSI2_CONTINUOUS_CLOCK;
2042+ state->bus.flags = 0;
20592043 } else {
20602044 err = tc358743_probe_of(state);
20612045 if (err == -ENODEV)
drivers/media/i2c/tvp5150.c+4−2
@@ -1198,8 +1198,10 @@ static int tvp5150_get_mbus_config(struct v4l2_subdev *sd, · 1197 unmodified lines
11981198 struct tvp5150 *decoder = to_tvp5150(sd);
11991199
12001200 cfg->type = decoder->mbus_type;
1201− cfg->flags = V4L2_MBUS_MASTER | V4L2_MBUS_PCLK_SAMPLE_RISING
1202− | V4L2_MBUS_FIELD_EVEN_LOW | V4L2_MBUS_DATA_ACTIVE_HIGH;
1201+ cfg->bus.parallel.flags = V4L2_MBUS_MASTER
1202+ | V4L2_MBUS_PCLK_SAMPLE_RISING
1203+ | V4L2_MBUS_FIELD_EVEN_LOW
1204+ | V4L2_MBUS_DATA_ACTIVE_HIGH;
12031205
12041206 return 0;
12051207 }
drivers/media/mc/mc-entity.c+24−31
@@ -396,20 +396,21 @@ __must_check int __media_pipeline_start(struct media_entity *entity, · 395 unmodified lines
396396 struct media_link *link;
397397 int ret;
398398
399− if (!pipe->streaming_count++) {
400− ret = media_graph_walk_init(&pipe->graph, mdev);
401− if (ret)
402− goto error_graph_walk_start;
399+ if (pipe->streaming_count) {
400+ pipe->streaming_count++;
401+ return 0;
403402 }
404403
404+ ret = media_graph_walk_init(&pipe->graph, mdev);
405+ if (ret)
406+ return ret;
407+
405408 media_graph_walk_start(&pipe->graph, entity);
406409
407410 while ((entity = media_graph_walk_next(graph))) {
408411 DECLARE_BITMAP(active, MEDIA_ENTITY_MAX_PADS);
409412 DECLARE_BITMAP(has_no_links, MEDIA_ENTITY_MAX_PADS);
410413
411− entity->stream_count++;
412−
413414 if (entity->pipe && entity->pipe != pipe) {
414415 pr_err("Pipe active for %s. Can't start for %s\n",
415416 entity->name,
@@ -418,12 +419,12 @@ __must_check int __media_pipeline_start(struct media_entity *entity, · 2 unmodified lines
418419 goto error;
419420 }
420421
421− entity->pipe = pipe;
422−
423422 /* Already streaming --- no need to check. */
424− if (entity->stream_count > 1)
423+ if (entity->pipe)
425424 continue;
426425
426+ entity->pipe = pipe;
427+
427428 if (!entity->ops || !entity->ops->link_validate)
428429 continue;
429430
@@ -479,6 +480,8 @@ __must_check int __media_pipeline_start(struct media_entity *entity, · 49 unmodified lines
479480 }
480481 }
481482
483+ pipe->streaming_count++;
484+
482485 return 0;
483486
484487 error:
@@ -489,24 +492,17 @@ error: · 4 unmodified lines
489492 media_graph_walk_start(graph, entity_err);
490493
491494 while ((entity_err = media_graph_walk_next(graph))) {
492− /* Sanity check for negative stream_count */
493− if (!WARN_ON_ONCE(entity_err->stream_count <= 0)) {
494− entity_err->stream_count--;
495− if (entity_err->stream_count == 0)
496− entity_err->pipe = NULL;
497− }
495+ entity_err->pipe = NULL;
498496
499497 /*
500− * We haven't increased stream_count further than this
501− * so we quit here.
498+ * We haven't started entities further than this so we quit
499+ * here.
502500 */
503501 if (entity_err == entity)
504502 break;
505503 }
506504
507−error_graph_walk_start:
508− if (!--pipe->streaming_count)
509− media_graph_walk_cleanup(graph);
505+ media_graph_walk_cleanup(graph);
510506
511507 return ret;
512508 }
@@ -537,19 +533,15 @@ void __media_pipeline_stop(struct media_entity *entity) · 24 unmodified lines
537533 if (WARN_ON(!pipe))
538534 return;
539535
536+ if (--pipe->streaming_count)
537+ return;
538+
540539 media_graph_walk_start(graph, entity);
541540
542− while ((entity = media_graph_walk_next(graph))) {
543− /* Sanity check for negative stream_count */
544− if (!WARN_ON_ONCE(entity->stream_count <= 0)) {
545− entity->stream_count--;
546− if (entity->stream_count == 0)
547− entity->pipe = NULL;
548− }
549− }
541+ while ((entity = media_graph_walk_next(graph)))
542+ entity->pipe = NULL;
550543
551− if (!--pipe->streaming_count)
552− media_graph_walk_cleanup(graph);
544+ media_graph_walk_cleanup(graph);
553545
554546 }
555547 EXPORT_SYMBOL_GPL(__media_pipeline_stop);
@@ -834,7 +826,8 @@ int __media_entity_setup_link(struct media_link *link, u32 flags) · 278 unmodified lines
834826 sink = link->sink->entity;
835827
836828 if (!(link->flags & MEDIA_LNK_FL_DYNAMIC) &&
837− (source->stream_count || sink->stream_count))
829+ (media_entity_is_streaming(source) ||
830+ media_entity_is_streaming(sink)))
838831 return -EBUSY;
839832
840833 mdev = source->graph_obj.mdev;
drivers/media/mmc/Kconfig+1−0
@@ -1,2 +1,3 @@
11 # SPDX-License-Identifier: GPL-2.0-only
2+
23 source "drivers/media/mmc/siano/Kconfig"
drivers/media/pci/Kconfig+19−12
@@ -12,61 +12,68 @@ if MEDIA_PCI_SUPPORT · 11 unmodified lines
1212
1313 if MEDIA_CAMERA_SUPPORT
1414 comment "Media capture support"
15+
1516 source "drivers/media/pci/meye/Kconfig"
1617 source "drivers/media/pci/solo6x10/Kconfig"
1718 source "drivers/media/pci/sta2x11/Kconfig"
1819 source "drivers/media/pci/tw5864/Kconfig"
1920 source "drivers/media/pci/tw68/Kconfig"
2021 source "drivers/media/pci/tw686x/Kconfig"
22+
2123 endif
2224
2325 if MEDIA_ANALOG_TV_SUPPORT
2426 comment "Media capture/analog TV support"
27+
28+source "drivers/media/pci/dt3155/Kconfig"
2529 source "drivers/media/pci/ivtv/Kconfig"
2630 source "drivers/media/pci/saa7146/Kconfig"
27−source "drivers/media/pci/dt3155/Kconfig"
31+
2832 endif
2933
3034 if MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT
3135 comment "Media capture/analog/hybrid TV support"
36+
37+source "drivers/media/pci/bt8xx/Kconfig"
38+source "drivers/media/pci/cobalt/Kconfig"
3239 source "drivers/media/pci/cx18/Kconfig"
3340 source "drivers/media/pci/cx23885/Kconfig"
3441 source "drivers/media/pci/cx25821/Kconfig"
3542 source "drivers/media/pci/cx88/Kconfig"
36−source "drivers/media/pci/bt8xx/Kconfig"
3743 source "drivers/media/pci/saa7134/Kconfig"
3844 source "drivers/media/pci/saa7164/Kconfig"
39−source "drivers/media/pci/cobalt/Kconfig"
4045
4146 endif
4247
4348 if MEDIA_DIGITAL_TV_SUPPORT
4449 comment "Media digital TV PCI Adapters"
45−source "drivers/media/pci/ttpci/Kconfig"
50+
4651 source "drivers/media/pci/b2c2/Kconfig"
47−source "drivers/media/pci/pluto2/Kconfig"
52+source "drivers/media/pci/ddbridge/Kconfig"
4853 source "drivers/media/pci/dm1105/Kconfig"
49−source "drivers/media/pci/pt1/Kconfig"
50−source "drivers/media/pci/pt3/Kconfig"
5154 source "drivers/media/pci/mantis/Kconfig"
55+source "drivers/media/pci/netup_unidvb/Kconfig"
5256 source "drivers/media/pci/ngene/Kconfig"
53−source "drivers/media/pci/ddbridge/Kconfig"
57+source "drivers/media/pci/pluto2/Kconfig"
58+source "drivers/media/pci/pt1/Kconfig"
59+source "drivers/media/pci/pt3/Kconfig"
5460 source "drivers/media/pci/smipcie/Kconfig"
55−source "drivers/media/pci/netup_unidvb/Kconfig"
56−endif
61+source "drivers/media/pci/ttpci/Kconfig"
5762
58−source "drivers/media/pci/intel/ipu3/Kconfig"
63+endif
5964
6065 config VIDEO_PCI_SKELETON
6166 tristate "Skeleton PCI V4L2 driver"
6267 depends on SAMPLES
6368 depends on MEDIA_TEST_SUPPORT
64− depends on PCI && VIDEO_V4L2
69+ depends on PCI && VIDEO_DEV
6570 select VIDEOBUF2_MEMOPS
6671 select VIDEOBUF2_DMA_CONTIG
6772 help
6873 Enable build of the skeleton PCI driver, used as a reference
6974 when developing new drivers.
7075
76+source "drivers/media/pci/intel/ipu3/Kconfig"
77+
7178 endif #MEDIA_PCI_SUPPORT
7279 endif #PCI
drivers/media/pci/Makefile+14−8
@@ -3,6 +3,8 @@ · 2 unmodified lines
33 # Makefile for the kernel multimedia device drivers.
44 #
55
6+# Please keep it alphabetically sorted by directory
7+# (e. g. LC_ALL=C sort Makefile)
68 obj-y += ttpci/ \
79 b2c2/ \
810 pluto2/ \
@@ -17,19 +19,23 @@ obj-y += ttpci/ \ · 8 unmodified lines
1719 netup_unidvb/ \
1820 intel/
1921
20−obj-$(CONFIG_VIDEO_IVTV) += ivtv/
22+# Please keep it alphabetically sorted by Kconfig name
23+# (e. g. LC_ALL=C sort Makefile)
24+
25+obj-$(CONFIG_STA2X11_VIP) += sta2x11/
26+
27+obj-$(CONFIG_VIDEO_BT848) += bt8xx/
28+obj-$(CONFIG_VIDEO_COBALT) += cobalt/
2129 obj-$(CONFIG_VIDEO_CX18) += cx18/
2230 obj-$(CONFIG_VIDEO_CX23885) += cx23885/
2331 obj-$(CONFIG_VIDEO_CX25821) += cx25821/
2432 obj-$(CONFIG_VIDEO_CX88) += cx88/
25−obj-$(CONFIG_VIDEO_BT848) += bt8xx/
26−obj-$(CONFIG_VIDEO_SAA7134) += saa7134/
27−obj-$(CONFIG_VIDEO_SAA7164) += saa7164/
28−obj-$(CONFIG_VIDEO_TW68) += tw68/
29−obj-$(CONFIG_VIDEO_TW686X) += tw686x/
3033 obj-$(CONFIG_VIDEO_DT3155) += dt3155/
34+obj-$(CONFIG_VIDEO_IVTV) += ivtv/
3135 obj-$(CONFIG_VIDEO_MEYE) += meye/
32−obj-$(CONFIG_STA2X11_VIP) += sta2x11/
36+obj-$(CONFIG_VIDEO_SAA7134) += saa7134/
37+obj-$(CONFIG_VIDEO_SAA7164) += saa7164/
3338 obj-$(CONFIG_VIDEO_SOLO6X10) += solo6x10/
34−obj-$(CONFIG_VIDEO_COBALT) += cobalt/
3539 obj-$(CONFIG_VIDEO_TW5864) += tw5864/
40+obj-$(CONFIG_VIDEO_TW686X) += tw686x/
41+obj-$(CONFIG_VIDEO_TW68) += tw68/
drivers/media/pci/bt8xx/Kconfig+1−1
@@ -1,7 +1,7 @@
11 # SPDX-License-Identifier: GPL-2.0-only
22 config VIDEO_BT848
33 tristate "BT848 Video For Linux"
4− depends on VIDEO_DEV && PCI && I2C && VIDEO_V4L2
4+ depends on PCI && I2C && VIDEO_DEV
55 select I2C_ALGOBIT
66 select VIDEOBUF_DMA_SG
77 depends on RC_CORE
drivers/media/pci/bt8xx/bttv-driver.c+2−2
@@ -3890,7 +3890,7 @@ static int bttv_register_video(struct bttv *btv) · 3889 unmodified lines
38903890
38913891 /* video */
38923892 vdev_init(btv, &btv->video_dev, &bttv_video_template, "video");
3893− btv->video_dev.device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_TUNER |
3893+ btv->video_dev.device_caps = V4L2_CAP_VIDEO_CAPTURE |
38943894 V4L2_CAP_READWRITE | V4L2_CAP_STREAMING;
38953895 if (btv->tuner_type != TUNER_ABSENT)
38963896 btv->video_dev.device_caps |= V4L2_CAP_TUNER;
@@ -3911,7 +3911,7 @@ static int bttv_register_video(struct bttv *btv) · 14 unmodified lines
39113911 /* vbi */
39123912 vdev_init(btv, &btv->vbi_dev, &bttv_video_template, "vbi");
39133913 btv->vbi_dev.device_caps = V4L2_CAP_VBI_CAPTURE | V4L2_CAP_READWRITE |
3914− V4L2_CAP_STREAMING | V4L2_CAP_TUNER;
3914+ V4L2_CAP_STREAMING;
39153915 if (btv->tuner_type != TUNER_ABSENT)
39163916 btv->vbi_dev.device_caps |= V4L2_CAP_TUNER;
39173917
drivers/media/pci/cobalt/Kconfig+1−1
@@ -1,7 +1,7 @@
11 # SPDX-License-Identifier: GPL-2.0-only
22 config VIDEO_COBALT
33 tristate "Cisco Cobalt support"
4− depends on VIDEO_V4L2 && I2C
4+ depends on VIDEO_DEV && I2C
55 depends on PCI_MSI && MTD_COMPLEX_MAPPINGS
66 depends on (GPIOLIB && DRM_I2C_ADV7511=n) || COMPILE_TEST
77 depends on SND
drivers/media/pci/cx18/Kconfig+1−1
@@ -1,7 +1,7 @@
11 # SPDX-License-Identifier: GPL-2.0-only
22 config VIDEO_CX18
33 tristate "Conexant cx23418 MPEG encoder support"
4− depends on VIDEO_V4L2 && DVB_CORE && PCI && I2C
4+ depends on VIDEO_DEV && DVB_CORE && PCI && I2C
55 select I2C_ALGOBIT
66 select VIDEOBUF_VMALLOC
77 depends on RC_CORE
drivers/media/pci/cx18/cx18-driver.c+2−2
@@ -23,7 +23,7 @@ · 22 unmodified lines
2323 #include "cx18-mailbox.h"
2424 #include "cx18-ioctl.h"
2525 #include "cx18-controls.h"
26−#include "tuner-xc2028.h"
26+#include "xc2028.h"
2727 #include <linux/dma-mapping.h>
2828 #include <media/tveeprom.h>
2929
@@ -899,7 +899,7 @@ static int cx18_probe(struct pci_dev *pci_dev, · 869 unmodified lines
899899 return -ENOMEM;
900900 }
901901
902− cx = kzalloc(sizeof(*cx), GFP_ATOMIC);
902+ cx = kzalloc(sizeof(*cx), GFP_KERNEL);
903903 if (!cx)
904904 return -ENOMEM;
905905
drivers/media/pci/cx18/cx18-dvb.c+1−1
@@ -22,7 +22,7 @@ · 21 unmodified lines
2222 #include <linux/firmware.h>
2323 #include "mt352.h"
2424 #include "mt352_priv.h"
25−#include "tuner-xc2028.h"
25+#include "xc2028.h"
2626
2727 DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
2828
drivers/media/pci/cx18/cx18-gpio.c+1−1
@@ -12,7 +12,7 @@ · 11 unmodified lines
1212 #include "cx18-io.h"
1313 #include "cx18-cards.h"
1414 #include "cx18-gpio.h"
15−#include "tuner-xc2028.h"
15+#include "xc2028.h"
1616
1717 /********************* GPIO stuffs *********************/
1818
drivers/media/pci/cx18/cx18-queue.h+3−3
@@ -15,15 +15,15 @@ · 14 unmodified lines
1515 static inline void cx18_buf_sync_for_cpu(struct cx18_stream *s,
1616 struct cx18_buffer *buf)
1717 {
18− pci_dma_sync_single_for_cpu(s->cx->pci_dev, buf->dma_handle,
18+ dma_sync_single_for_cpu(&s->cx->pci_dev->dev, buf->dma_handle,
1919 s->buf_size, s->dma);
2020 }
2121
2222 static inline void cx18_buf_sync_for_device(struct cx18_stream *s,
2323 struct cx18_buffer *buf)
2424 {
25− pci_dma_sync_single_for_device(s->cx->pci_dev, buf->dma_handle,
26− s->buf_size, s->dma);
25+ dma_sync_single_for_device(&s->cx->pci_dev->dev, buf->dma_handle,
26+ s->buf_size, s->dma);
2727 }
2828
2929 void _cx18_mdl_sync_for_device(struct cx18_stream *s, struct cx18_mdl *mdl);
drivers/media/pci/cx23885/cx23885-cards.c+1−1
@@ -15,7 +15,7 @@ · 14 unmodified lines
1515 #include <linux/firmware.h>
1616 #include <misc/altera.h>
1717
18−#include "tuner-xc2028.h"
18+#include "xc2028.h"
1919 #include "netup-eeprom.h"
2020 #include "netup-init.h"
2121 #include "altera-ci.h"
drivers/media/pci/cx23885/cx23885-dvb.c+1−1
@@ -28,7 +28,7 @@ · 27 unmodified lines
2828 #include "xc5000.h"
2929 #include "max2165.h"
3030 #include "tda10048.h"
31−#include "tuner-xc2028.h"
31+#include "xc2028.h"
3232 #include "tuner-simple.h"
3333 #include "dib7000p.h"
3434 #include "dib0070.h"
drivers/media/pci/cx23885/cx23885-input.c+1−1
@@ -55,7 +55,7 @@ static void cx23885_input_process_measurements(struct cx23885_dev *dev, · 54 unmodified lines
5555 } while (num != 0);
5656
5757 if (overrun)
58− ir_raw_event_reset(kernel_ir->rc);
58+ ir_raw_event_overflow(kernel_ir->rc);
5959 else if (handle)
6060 ir_raw_event_handle(kernel_ir->rc);
6161 }
drivers/media/pci/cx23885/cx23885-video.c+1−1
@@ -24,7 +24,7 @@ · 23 unmodified lines
2424 #include <media/v4l2-ioctl.h>
2525 #include <media/v4l2-event.h>
2626 #include "cx23885-ioctl.h"
27−#include "tuner-xc2028.h"
27+#include "xc2028.h"
2828
2929 #include <media/drv-intf/cx25840.h>
3030
drivers/media/pci/cx88/cx88-mpeg.c+3−0
@@ -162,6 +162,9 @@ int cx8802_start_dma(struct cx8802_dev *dev, · 161 unmodified lines
162162 cx_write(MO_TS_GPCNTRL, GP_COUNT_CONTROL_RESET);
163163 q->count = 0;
164164
165+ /* clear interrupt status register */
166+ cx_write(MO_TS_INTSTAT, 0x1f1111);
167+
165168 /* enable irqs */
166169 dprintk(1, "setting the interrupt mask\n");
167170 cx_set(MO_PCI_INTMSK, core->pci_irqmask | PCI_INT_TSINT);
drivers/media/pci/cx88/cx88.h+1−1
@@ -28,7 +28,7 @@ · 27 unmodified lines
2828 #include <media/i2c/wm8775.h>
2929
3030 #include "cx88-reg.h"
31−#include "tuner-xc2028.h"
31+#include "xc2028.h"
3232
3333 #include <linux/mutex.h>
3434
drivers/media/pci/dt3155/Kconfig+1−1
@@ -1,7 +1,7 @@
11 # SPDX-License-Identifier: GPL-2.0-only
22 config VIDEO_DT3155
33 tristate "DT3155 frame grabber"
4− depends on PCI && VIDEO_DEV && VIDEO_V4L2
4+ depends on PCI && VIDEO_DEV
55 select VIDEOBUF2_DMA_CONTIG
66 help
77 Enables dt3155 device driver for the DataTranslation DT3155 frame grabber.
drivers/media/pci/intel/ipu3/Kconfig+1−1
@@ -1,7 +1,7 @@
11 # SPDX-License-Identifier: GPL-2.0-only
22 config VIDEO_IPU3_CIO2
33 tristate "Intel ipu3-cio2 driver"
4− depends on VIDEO_V4L2 && PCI
4+ depends on VIDEO_DEV && PCI
55 depends on ACPI || COMPILE_TEST
66 depends on X86
77 select MEDIA_CONTROLLER
drivers/media/pci/ivtv/Kconfig+1−1
@@ -1,7 +1,7 @@
11 # SPDX-License-Identifier: GPL-2.0-only
22 config VIDEO_IVTV
33 tristate "Conexant cx23416/cx23415 MPEG encoder/decoder support"
4− depends on VIDEO_V4L2 && PCI && I2C
4+ depends on VIDEO_DEV && PCI && I2C
55 select I2C_ALGOBIT
66 depends on RC_CORE
77 select VIDEO_TUNER
drivers/media/pci/ivtv/ivtv-driver.c+1−1
@@ -57,7 +57,7 @@ · 56 unmodified lines
5757 #include <linux/dma-mapping.h>
5858 #include <media/tveeprom.h>
5959 #include <media/i2c/saa7115.h>
60−#include "tuner-xc2028.h"
60+#include "xc2028.h"
6161 #include <uapi/linux/sched/types.h>
6262
6363 /* If you have already X v4l cards, then set this to X. This way
drivers/media/pci/ivtv/ivtv-driver.h+0−1
@@ -330,7 +330,6 @@ struct ivtv_stream { · 329 unmodified lines
330330 struct ivtv *itv; /* for ease of use */
331331 const char *name; /* name of the stream */
332332 int type; /* stream type */
333− u32 caps; /* V4L2 capabilities */
334333
335334 struct v4l2_fh *fh; /* pointer to the streaming filehandle */
336335 spinlock_t qlock; /* locks access to the queues */
drivers/media/pci/ivtv/ivtv-gpio.c+1−1
@@ -10,7 +10,7 @@ · 9 unmodified lines
1010 #include "ivtv-driver.h"
1111 #include "ivtv-cards.h"
1212 #include "ivtv-gpio.h"
13−#include "tuner-xc2028.h"
13+#include "xc2028.h"
1414 #include <media/tuner.h>
1515 #include <media/v4l2-ctrls.h>
1616
drivers/media/pci/ivtv/ivtv-ioctl.c+5−5
@@ -438,7 +438,7 @@ static int ivtv_g_fmt_vid_out_overlay(struct file *file, void *fh, struct v4l2_f · 437 unmodified lines
438438 struct ivtv_stream *s = &itv->streams[fh2id(fh)->type];
439439 struct v4l2_window *winfmt = &fmt->fmt.win;
440440
441− if (!(s->caps & V4L2_CAP_VIDEO_OUTPUT_OVERLAY))
441+ if (!(s->vdev.device_caps & V4L2_CAP_VIDEO_OUTPUT_OVERLAY))
442442 return -EINVAL;
443443 if (!itv->osd_video_pbase)
444444 return -EINVAL;
@@ -549,7 +549,7 @@ static int ivtv_try_fmt_vid_out_overlay(struct file *file, void *fh, struct v4l2 · 104 unmodified lines
549549 u32 chromakey = fmt->fmt.win.chromakey;
550550 u8 global_alpha = fmt->fmt.win.global_alpha;
551551
552− if (!(s->caps & V4L2_CAP_VIDEO_OUTPUT_OVERLAY))
552+ if (!(s->vdev.device_caps & V4L2_CAP_VIDEO_OUTPUT_OVERLAY))
553553 return -EINVAL;
554554 if (!itv->osd_video_pbase)
555555 return -EINVAL;
@@ -1383,7 +1383,7 @@ static int ivtv_g_fbuf(struct file *file, void *fh, struct v4l2_framebuffer *fb) · 827 unmodified lines
13831383 0,
13841384 };
13851385
1386− if (!(s->caps & V4L2_CAP_VIDEO_OUTPUT_OVERLAY))
1386+ if (!(s->vdev.device_caps & V4L2_CAP_VIDEO_OUTPUT_OVERLAY))
13871387 return -ENOTTY;
13881388 if (!itv->osd_video_pbase)
13891389 return -ENOTTY;
@@ -1450,7 +1450,7 @@ static int ivtv_s_fbuf(struct file *file, void *fh, const struct v4l2_framebuffe · 60 unmodified lines
14501450 struct ivtv_stream *s = &itv->streams[fh2id(fh)->type];
14511451 struct yuv_playback_info *yi = &itv->yuv_info;
14521452
1453− if (!(s->caps & V4L2_CAP_VIDEO_OUTPUT_OVERLAY))
1453+ if (!(s->vdev.device_caps & V4L2_CAP_VIDEO_OUTPUT_OVERLAY))
14541454 return -ENOTTY;
14551455 if (!itv->osd_video_pbase)
14561456 return -ENOTTY;
@@ -1470,7 +1470,7 @@ static int ivtv_overlay(struct file *file, void *fh, unsigned int on) · 13 unmodified lines
14701470 struct ivtv *itv = id->itv;
14711471 struct ivtv_stream *s = &itv->streams[fh2id(fh)->type];
14721472
1473− if (!(s->caps & V4L2_CAP_VIDEO_OUTPUT_OVERLAY))
1473+ if (!(s->vdev.device_caps & V4L2_CAP_VIDEO_OUTPUT_OVERLAY))
14741474 return -ENOTTY;
14751475 if (!itv->osd_video_pbase)
14761476 return -ENOTTY;
drivers/media/pci/ivtv/ivtv-queue.h+14−11
@@ -17,20 +17,20 @@ · 16 unmodified lines
1717
1818 static inline int ivtv_might_use_pio(struct ivtv_stream *s)
1919 {
20− return s->dma == PCI_DMA_NONE || (SLICED_VBI_PIO && s->type == IVTV_ENC_STREAM_TYPE_VBI);
20+ return s->dma == DMA_NONE || (SLICED_VBI_PIO && s->type == IVTV_ENC_STREAM_TYPE_VBI);
2121 }
2222
2323 static inline int ivtv_use_pio(struct ivtv_stream *s)
2424 {
2525 struct ivtv *itv = s->itv;
2626
27− return s->dma == PCI_DMA_NONE ||
27+ return s->dma == DMA_NONE ||
2828 (SLICED_VBI_PIO && s->type == IVTV_ENC_STREAM_TYPE_VBI && itv->vbi.sliced_in->service_set);
2929 }
3030
3131 static inline int ivtv_might_use_dma(struct ivtv_stream *s)
3232 {
33− return s->dma != PCI_DMA_NONE;
33+ return s->dma != DMA_NONE;
3434 }
3535
3636 static inline int ivtv_use_dma(struct ivtv_stream *s)
@@ -41,15 +41,16 @@ static inline int ivtv_use_dma(struct ivtv_stream *s) · 4 unmodified lines
4141 static inline void ivtv_buf_sync_for_cpu(struct ivtv_stream *s, struct ivtv_buffer *buf)
4242 {
4343 if (ivtv_use_dma(s))
44− pci_dma_sync_single_for_cpu(s->itv->pdev, buf->dma_handle,
45− s->buf_size + 256, s->dma);
44+ dma_sync_single_for_cpu(&s->itv->pdev->dev, buf->dma_handle,
45+ s->buf_size + 256, s->dma);
4646 }
4747
4848 static inline void ivtv_buf_sync_for_device(struct ivtv_stream *s, struct ivtv_buffer *buf)
4949 {
5050 if (ivtv_use_dma(s))
51− pci_dma_sync_single_for_device(s->itv->pdev, buf->dma_handle,
52− s->buf_size + 256, s->dma);
51+ dma_sync_single_for_device(&s->itv->pdev->dev,
52+ buf->dma_handle, s->buf_size + 256,
53+ s->dma);
5354 }
5455
5556 int ivtv_buf_copy_from_user(struct ivtv_stream *s, struct ivtv_buffer *buf, const char __user *src, int copybytes);
@@ -70,15 +71,17 @@ void ivtv_stream_free(struct ivtv_stream *s); · 14 unmodified lines
7071 static inline void ivtv_stream_sync_for_cpu(struct ivtv_stream *s)
7172 {
7273 if (ivtv_use_dma(s))
73− pci_dma_sync_single_for_cpu(s->itv->pdev, s->sg_handle,
74− sizeof(struct ivtv_sg_element), PCI_DMA_TODEVICE);
74+ dma_sync_single_for_cpu(&s->itv->pdev->dev, s->sg_handle,
75+ sizeof(struct ivtv_sg_element),
76+ DMA_TO_DEVICE);
7577 }
7678
7779 static inline void ivtv_stream_sync_for_device(struct ivtv_stream *s)
7880 {
7981 if (ivtv_use_dma(s))
80− pci_dma_sync_single_for_device(s->itv->pdev, s->sg_handle,
81− sizeof(struct ivtv_sg_element), PCI_DMA_TODEVICE);
82+ dma_sync_single_for_device(&s->itv->pdev->dev, s->sg_handle,
83+ sizeof(struct ivtv_sg_element),
84+ DMA_TO_DEVICE);
8285 }
8386
8487 #endif
drivers/media/pci/ivtv/ivtv-streams.c+4−7
@@ -176,7 +176,7 @@ static void ivtv_stream_init(struct ivtv *itv, int type) · 175 unmodified lines
176176 s->itv = itv;
177177 s->type = type;
178178 s->name = ivtv_stream_info[type].name;
179− s->caps = ivtv_stream_info[type].v4l2_caps;
179+ s->vdev.device_caps = ivtv_stream_info[type].v4l2_caps;
180180
181181 if (ivtv_stream_info[type].pio)
182182 s->dma = DMA_NONE;
@@ -299,12 +299,9 @@ static int ivtv_reg_dev(struct ivtv *itv, int type) · 116 unmodified lines
299299 if (s_mpg->vdev.v4l2_dev)
300300 num = s_mpg->vdev.num + ivtv_stream_info[type].num_offset;
301301 }
302− s->vdev.device_caps = s->caps;
303− if (itv->osd_video_pbase) {
304− itv->streams[IVTV_DEC_STREAM_TYPE_YUV].vdev.device_caps |=
305− V4L2_CAP_VIDEO_OUTPUT_OVERLAY;
306− itv->streams[IVTV_DEC_STREAM_TYPE_MPG].vdev.device_caps |=
307− V4L2_CAP_VIDEO_OUTPUT_OVERLAY;
302+ if (itv->osd_video_pbase && (type == IVTV_DEC_STREAM_TYPE_YUV ||
303+ type == IVTV_DEC_STREAM_TYPE_MPG)) {
304+ s->vdev.device_caps |= V4L2_CAP_VIDEO_OUTPUT_OVERLAY;
308305 itv->v4l2_cap |= V4L2_CAP_VIDEO_OUTPUT_OVERLAY;
309306 }
310307 video_set_drvdata(&s->vdev, s);
drivers/media/pci/ivtv/ivtv-udma.h+4−4
@@ -23,14 +23,14 @@ void ivtv_udma_start(struct ivtv *itv); · 22 unmodified lines
2323
2424 static inline void ivtv_udma_sync_for_device(struct ivtv *itv)
2525 {
26− pci_dma_sync_single_for_device(itv->pdev, itv->udma.SG_handle,
27− sizeof(itv->udma.SGarray), PCI_DMA_TODEVICE);
26+ dma_sync_single_for_device(&itv->pdev->dev, itv->udma.SG_handle,
27+ sizeof(itv->udma.SGarray), DMA_TO_DEVICE);
2828 }
2929
3030 static inline void ivtv_udma_sync_for_cpu(struct ivtv *itv)
3131 {
32− pci_dma_sync_single_for_cpu(itv->pdev, itv->udma.SG_handle,
33− sizeof(itv->udma.SGarray), PCI_DMA_TODEVICE);
32+ dma_sync_single_for_cpu(&itv->pdev->dev, itv->udma.SG_handle,
33+ sizeof(itv->udma.SGarray), DMA_TO_DEVICE);
3434 }
3535
3636 #endif
drivers/media/pci/meye/Kconfig+1−1
@@ -1,7 +1,7 @@
11 # SPDX-License-Identifier: GPL-2.0-only
22 config VIDEO_MEYE
33 tristate "Sony Vaio Picturebook Motion Eye Video For Linux"
4− depends on PCI && VIDEO_V4L2
4+ depends on PCI && VIDEO_DEV
55 depends on SONY_LAPTOP
66 depends on X86 || COMPILE_TEST
77 help
drivers/media/pci/saa7134/saa7134-alsa.c+2−2
@@ -1214,7 +1214,7 @@ static int alsa_device_exit(struct saa7134_dev *dev) · 1213 unmodified lines
12141214
12151215 static int saa7134_alsa_init(void)
12161216 {
1217− struct saa7134_dev *dev = NULL;
1217+ struct saa7134_dev *dev;
12181218
12191219 saa7134_dmasound_init = alsa_device_init;
12201220 saa7134_dmasound_exit = alsa_device_exit;
@@ -1229,7 +1229,7 @@ static int saa7134_alsa_init(void) · 8 unmodified lines
12291229 alsa_device_init(dev);
12301230 }
12311231
1232− if (dev == NULL)
1232+ if (list_empty(&saa7134_devlist))
12331233 pr_info("saa7134 ALSA: no saa7134 cards found\n");
12341234
12351235 return 0;
drivers/media/pci/saa7134/saa7134-cards.c+1−1
@@ -15,7 +15,7 @@ · 14 unmodified lines
1515 #include <linux/i2c.h>
1616 #include <linux/i2c-algo-bit.h>
1717
18−#include "tuner-xc2028.h"
18+#include "xc2028.h"
1919 #include <media/v4l2-common.h>
2020 #include <media/tveeprom.h>
2121 #include "tea5767.h"
drivers/media/pci/saa7134/saa7134-dvb.c+1−1
@@ -26,7 +26,7 @@ · 25 unmodified lines
2626 #include "mt352_priv.h" /* FIXME */
2727 #include "tda1004x.h"
2828 #include "nxt200x.h"
29−#include "tuner-xc2028.h"
29+#include "xc2028.h"
3030 #include "xc5000.h"
3131
3232 #include "tda10086.h"
drivers/media/pci/saa7134/saa7134-video.c+3−8
@@ -823,7 +823,7 @@ static int buffer_activate(struct saa7134_dev *dev, · 822 unmodified lines
823823 {
824824 struct saa7134_dmaqueue *dmaq = buf->vb2.vb2_buf.vb2_queue->drv_priv;
825825 unsigned long base,control,bpl;
826− unsigned long bpl_uv,lines_uv,base2,base3,tmp; /* planar */
826+ unsigned long bpl_uv, lines_uv, base2, base3; /* planar */
827827
828828 video_dbg("buffer_activate buf=%p\n", buf);
829829 buf->top_seen = 0;
@@ -868,11 +868,8 @@ static int buffer_activate(struct saa7134_dev *dev, · 38 unmodified lines
868868 lines_uv = dev->height >> dev->fmt->vshift;
869869 base2 = base + bpl * dev->height;
870870 base3 = base2 + bpl_uv * lines_uv;
871− if (dev->fmt->uvswap) {
872− tmp = base2;
873− base2 = base3;
874− base3 = tmp;
875− }
871+ if (dev->fmt->uvswap)
872+ swap(base2, base3);
876873 video_dbg("uv: bpl=%ld lines=%ld base2/3=%ld/%ld\n",
877874 bpl_uv,lines_uv,base2,base3);
878875 if (V4L2_FIELD_HAS_BOTH(dev->field)) {
@@ -1538,8 +1535,6 @@ int saa7134_s_std(struct file *file, void *priv, v4l2_std_id id) · 659 unmodified lines
15381535 return -EINVAL;
15391536 }
15401537
1541− id = tvnorms[i].id;
1542−
15431538 if (!is_empress(file) && fh == dev->overlay_owner) {
15441539 spin_lock_irqsave(&dev->slock, flags);
15451540 stop_preview(dev);
drivers/media/pci/saa7146/Kconfig+3−3
@@ -1,7 +1,7 @@
11 # SPDX-License-Identifier: GPL-2.0-only
22 config VIDEO_HEXIUM_GEMINI
33 tristate "Hexium Gemini frame grabber"
4− depends on PCI && VIDEO_V4L2 && I2C
4+ depends on PCI && VIDEO_DEV && I2C
55 select VIDEO_SAA7146_VV
66 help
77 This is a video4linux driver for the Hexium Gemini frame
@@ -13,7 +13,7 @@ config VIDEO_HEXIUM_GEMINI · 5 unmodified lines
1313
1414 config VIDEO_HEXIUM_ORION
1515 tristate "Hexium HV-PCI6 and Orion frame grabber"
16− depends on PCI && VIDEO_V4L2 && I2C
16+ depends on PCI && VIDEO_DEV && I2C
1717 select VIDEO_SAA7146_VV
1818 help
1919 This is a video4linux driver for the Hexium HV-PCI6 and
@@ -24,7 +24,7 @@ config VIDEO_HEXIUM_ORION · 4 unmodified lines
2424
2525 config VIDEO_MXB
2626 tristate "Siemens-Nixdorf 'Multimedia eXtension Board'"
27− depends on PCI && VIDEO_V4L2 && I2C
27+ depends on PCI && VIDEO_DEV && I2C
2828 select VIDEO_SAA7146_VV
2929 select VIDEO_TUNER
3030 select VIDEO_SAA711X if MEDIA_SUBDRV_AUTOSELECT
drivers/media/pci/saa7164/saa7164-cmd.c+0−1
@@ -187,7 +187,6 @@ static int saa7164_cmd_set(struct saa7164_dev *dev, struct tmComResInfo *msg, · 186 unmodified lines
187187 mutex_lock(&dev->cmds[msg->id].lock);
188188
189189 size = msg->size;
190− idx = 0;
191190 cmds = size / bus->m_wMaxReqSize;
192191 if (size % bus->m_wMaxReqSize == 0)
193192 cmds -= 1;
drivers/media/pci/sta2x11/Kconfig+1−1
@@ -1,7 +1,7 @@
11 # SPDX-License-Identifier: GPL-2.0-only
22 config STA2X11_VIP
33 tristate "STA2X11 VIP Video For Linux"
4− depends on PCI && VIDEO_V4L2 && VIRT_TO_BUS && I2C
4+ depends on PCI && VIDEO_DEV && VIRT_TO_BUS && I2C
55 depends on STA2X11 || COMPILE_TEST
66 select GPIOLIB if MEDIA_SUBDRV_AUTOSELECT
77 select VIDEO_ADV7180 if MEDIA_SUBDRV_AUTOSELECT
drivers/media/pci/tw5864/Kconfig+1−1
@@ -1,7 +1,7 @@
11 # SPDX-License-Identifier: GPL-2.0-only
22 config VIDEO_TW5864
33 tristate "Techwell TW5864 video/audio grabber and encoder"
4− depends on VIDEO_DEV && PCI && VIDEO_V4L2
4+ depends on VIDEO_DEV && PCI
55 select VIDEOBUF2_DMA_CONTIG
66 help
77 Support for boards based on Techwell TW5864 chip which provides
drivers/media/pci/tw68/Kconfig+1−1
@@ -1,7 +1,7 @@
11 # SPDX-License-Identifier: GPL-2.0-only
22 config VIDEO_TW68
33 tristate "Techwell tw68x Video For Linux"
4− depends on VIDEO_DEV && PCI && VIDEO_V4L2
4+ depends on VIDEO_DEV && PCI
55 select VIDEOBUF2_DMA_SG
66 help
77 Support for Techwell tw68xx based frame grabber boards.
drivers/media/pci/tw686x/Kconfig+1−1
@@ -1,7 +1,7 @@
11 # SPDX-License-Identifier: GPL-2.0-only
22 config VIDEO_TW686X
33 tristate "Intersil/Techwell TW686x video capture cards"
4− depends on PCI && VIDEO_DEV && VIDEO_V4L2 && SND
4+ depends on PCI && VIDEO_DEV && SND
55 select VIDEOBUF2_VMALLOC
66 select VIDEOBUF2_DMA_CONTIG
77 select VIDEOBUF2_DMA_SG
drivers/media/platform/Kconfig+52−644
@@ -3,677 +3,85 @@ · 2 unmodified lines
33 # Platform drivers
44 # Most drivers here are currently for webcam support
55
6−menuconfig V4L_PLATFORM_DRIVERS
7− bool "V4L platform devices"
8− help
9− Say Y here to enable support for platform-specific V4L drivers.
10−
11−if V4L_PLATFORM_DRIVERS
12−
13−source "drivers/media/platform/marvell-ccic/Kconfig"
14−
15−config VIDEO_VIA_CAMERA
16− tristate "VIAFB camera controller support"
17− depends on FB_VIA && VIDEO_V4L2
18− select VIDEOBUF2_DMA_SG
19− select VIDEO_OV7670
20− help
21− Driver support for the integrated camera controller in VIA
22− Chrome9 chipsets. Currently only tested on OLPC xo-1.5 systems
23− with ov7670 sensors.
24−
25−#
26−# Platform multimedia device configuration
27−#
28−source "drivers/media/platform/cadence/Kconfig"
29−
30−source "drivers/media/platform/davinci/Kconfig"
31−
32−source "drivers/media/platform/omap/Kconfig"
33−
34−config VIDEO_ASPEED
35− tristate "Aspeed AST2400 and AST2500 Video Engine driver"
36− depends on VIDEO_V4L2
37− select VIDEOBUF2_DMA_CONTIG
38− help
39− Support for the Aspeed Video Engine (VE) embedded in the Aspeed
40− AST2400 and AST2500 SOCs. The VE can capture and compress video data
41− from digital or analog sources.
42−
43−config VIDEO_SH_VOU
44− tristate "SuperH VOU video output driver"
45− depends on VIDEO_DEV && I2C
46− depends on ARCH_SHMOBILE || COMPILE_TEST
47− select VIDEOBUF2_DMA_CONTIG
48− help
49− Support for the Video Output Unit (VOU) on SuperH SoCs.
50−
51−config VIDEO_VIU
52− tristate "Freescale VIU Video Driver"
53− depends on VIDEO_V4L2 && (PPC_MPC512x || COMPILE_TEST) && I2C
54− select VIDEOBUF_DMA_CONTIG
55− default y
56− help
57− Support for Freescale VIU video driver. This device captures
58− video data, or overlays video on DIU frame buffer.
59−
60− Say Y here if you want to enable VIU device on MPC5121e Rev2+.
61− In doubt, say N.
62−
63−config VIDEO_MUX
64− tristate "Video Multiplexer"
65− select MULTIPLEXER
66− depends on VIDEO_V4L2 && OF
67− select MEDIA_CONTROLLER
68− select VIDEO_V4L2_SUBDEV_API
69− select REGMAP
70− select V4L2_FWNODE
71− help
72− This driver provides support for N:1 video bus multiplexers.
73−
74−config VIDEO_OMAP3
75− tristate "OMAP 3 Camera support"
76− depends on VIDEO_V4L2 && I2C
77− depends on (ARCH_OMAP3 && OMAP_IOMMU) || COMPILE_TEST
78− depends on COMMON_CLK && OF
79− select ARM_DMA_USE_IOMMU if OMAP_IOMMU
80− select MEDIA_CONTROLLER
81− select VIDEO_V4L2_SUBDEV_API
82− select VIDEOBUF2_DMA_CONTIG
83− select MFD_SYSCON
84− select V4L2_FWNODE
85− help
86− Driver for an OMAP 3 camera controller.
87−
88−config VIDEO_OMAP3_DEBUG
89− bool "OMAP 3 Camera debug messages"
90− depends on VIDEO_OMAP3
91− help
92− Enable debug messages on OMAP 3 camera controller driver.
93−
94−config VIDEO_PXA27x
95− tristate "PXA27x Quick Capture Interface driver"
96− depends on VIDEO_DEV && VIDEO_V4L2
97− depends on PXA27x || COMPILE_TEST
98− select VIDEOBUF2_DMA_SG
99− select SG_SPLIT
100− select V4L2_FWNODE
101− help
102− This is a v4l2 driver for the PXA27x Quick Capture Interface
103−
104−config VIDEO_QCOM_CAMSS
105− tristate "Qualcomm V4L2 Camera Subsystem driver"
106− depends on VIDEO_V4L2
107− depends on (ARCH_QCOM && IOMMU_DMA) || COMPILE_TEST
108− select MEDIA_CONTROLLER
109− select VIDEO_V4L2_SUBDEV_API
110− select VIDEOBUF2_DMA_SG
111− select V4L2_FWNODE
112−
113−config VIDEO_S3C_CAMIF
114− tristate "Samsung S3C24XX/S3C64XX SoC Camera Interface driver"
115− depends on VIDEO_V4L2 && I2C && PM
116− depends on ARCH_S3C64XX || PLAT_S3C24XX || COMPILE_TEST
117− select MEDIA_CONTROLLER
118− select VIDEO_V4L2_SUBDEV_API
119− select VIDEOBUF2_DMA_CONTIG
120− help
121− This is a v4l2 driver for s3c24xx and s3c64xx SoC series camera
122− host interface (CAMIF).
123−
124− To compile this driver as a module, choose M here: the module
125− will be called s3c-camif.
126−
127−config VIDEO_STM32_DCMI
128− tristate "STM32 Digital Camera Memory Interface (DCMI) support"
129− depends on VIDEO_V4L2 && OF
130− depends on ARCH_STM32 || COMPILE_TEST
131− select VIDEOBUF2_DMA_CONTIG
132− select MEDIA_CONTROLLER
133− select V4L2_FWNODE
134− help
135− This module makes the STM32 Digital Camera Memory Interface (DCMI)
136− available as a v4l2 device.
137−
138− To compile this driver as a module, choose M here: the module
139− will be called stm32-dcmi.
140−
141−config VIDEO_RENESAS_CEU
142− tristate "Renesas Capture Engine Unit (CEU) driver"
143− depends on VIDEO_DEV && VIDEO_V4L2
144− depends on ARCH_SHMOBILE || ARCH_R7S72100 || COMPILE_TEST
145− select VIDEOBUF2_DMA_CONTIG
146− select V4L2_FWNODE
6+menuconfig MEDIA_PLATFORM_DRIVERS
7+ bool "Media platform devices"
8+ default "y"
1479 help
148− This is a v4l2 driver for the Renesas CEU Interface
10+ Say Y here to enable support for platform-specific media drivers.
14911
150−config VIDEO_ROCKCHIP_ISP1
151− tristate "Rockchip Image Signal Processing v1 Unit driver"
152− depends on VIDEO_V4L2 && OF
153− depends on ARCH_ROCKCHIP || COMPILE_TEST
154− select MEDIA_CONTROLLER
155− select VIDEO_V4L2_SUBDEV_API
156− select VIDEOBUF2_DMA_CONTIG
157− select VIDEOBUF2_VMALLOC
158− select V4L2_FWNODE
159− select GENERIC_PHY_MIPI_DPHY
160− default n
161− help
162− Enable this to support the Image Signal Processing (ISP) module
163− present in RK3399 SoCs.
164−
165− To compile this driver as a module, choose M here: the module
166− will be called rockchip-isp1.
167−
168−source "drivers/media/platform/exynos4-is/Kconfig"
169−source "drivers/media/platform/am437x/Kconfig"
170−source "drivers/media/platform/xilinx/Kconfig"
171−source "drivers/media/platform/rcar-vin/Kconfig"
172−source "drivers/media/platform/atmel/Kconfig"
173−source "drivers/media/platform/sunxi/Kconfig"
12+if MEDIA_PLATFORM_DRIVERS
17413
175−config VIDEO_TI_CAL
176− tristate "TI CAL (Camera Adaptation Layer) driver"
177− depends on VIDEO_DEV && VIDEO_V4L2
178− select MEDIA_CONTROLLER
179− select VIDEO_V4L2_SUBDEV_API
180− depends on SOC_DRA7XX || ARCH_K3 || COMPILE_TEST
181− select VIDEOBUF2_DMA_CONTIG
182− select V4L2_FWNODE
14+config V4L_PLATFORM_DRIVERS
15+ bool "V4L platform devices"
18316 help
184− Support for the TI CAL (Camera Adaptation Layer) block
185− found on DRA72X SoC.
186− In TI Technical Reference Manual this module is referred as
187− Camera Interface Subsystem (CAMSS).
188−
189−if VIDEO_TI_CAL
17+ Say Y here to enable support for platform-specific V4L drivers.
19018
191−config VIDEO_TI_CAL_MC
192− bool "Media Controller centric mode by default"
193− default n
19+config SDR_PLATFORM_DRIVERS
20+ bool "SDR platform devices"
21+ depends on MEDIA_SDR_SUPPORT
19422 help
195− Enables Media Controller centric mode by default.
196−
197− If set, CAL driver will start in Media Controller mode by
198− default. Note that this behavior can be overridden via
199− module parameter 'mc_api'.
200−
201−endif # VIDEO_TI_CAL
23+ Say Y here to enable support for platform-specific SDR Drivers.
20224
203−config VIDEO_RCAR_ISP
204− tristate "R-Car Image Signal Processor (ISP)"
205− depends on VIDEO_V4L2 && OF
206− depends on ARCH_RENESAS || COMPILE_TEST
207− select MEDIA_CONTROLLER
208− select VIDEO_V4L2_SUBDEV_API
209− select RESET_CONTROLLER
210− select V4L2_FWNODE
25+config DVB_PLATFORM_DRIVERS
26+ bool "DVB platform devices"
27+ depends on MEDIA_DIGITAL_TV_SUPPORT
21128 help
212− Support for Renesas R-Car Image Signal Processor (ISP).
213− Enable this to support the Renesas R-Car Image Signal
214− Processor (ISP).
215−
216− To compile this driver as a module, choose M here: the
217− module will be called rcar-isp.
218−
219−endif # V4L_PLATFORM_DRIVERS
29+ Say Y here to enable support for platform-specific Digital TV drivers.
22030
221−menuconfig V4L_MEM2MEM_DRIVERS
31+config V4L_MEM2MEM_DRIVERS
22232 bool "Memory-to-memory multimedia devices"
223− depends on VIDEO_V4L2
33+ depends on VIDEO_DEV
22434 help
22535 Say Y here to enable selecting drivers for V4L devices that
22636 use system memory for both source and destination buffers, as opposed
22737 to capture and output drivers, which use memory buffers for just
22838 one of those.
22939
230−if V4L_MEM2MEM_DRIVERS
231−
232−config VIDEO_ALLEGRO_DVT
233− tristate "Allegro DVT Video IP Core"
234− depends on VIDEO_DEV && VIDEO_V4L2
235− depends on ARCH_ZYNQMP || COMPILE_TEST
236− select V4L2_MEM2MEM_DEV
237− select VIDEOBUF2_DMA_CONTIG
238− select REGMAP_MMIO
239− help
240− Support for the encoder video IP core by Allegro DVT. This core is
241− found for example on the Xilinx ZynqMP SoC in the EV family and is
242− called VCU in the reference manual.
243−
244− To compile this driver as a module, choose M here: the module
245− will be called allegro.
246−
247−config VIDEO_CODA
248− tristate "Chips&Media Coda multi-standard codec IP"
249− depends on VIDEO_DEV && VIDEO_V4L2 && OF && (ARCH_MXC || COMPILE_TEST)
250− select SRAM
251− select VIDEOBUF2_DMA_CONTIG
252− select VIDEOBUF2_VMALLOC
253− select V4L2_JPEG_HELPER
254− select V4L2_MEM2MEM_DEV
255− select GENERIC_ALLOCATOR
256− help
257− Coda is a range of video codec IPs that supports
258− H.264, MPEG-4, and other video formats.
259−
260−config VIDEO_IMX_VDOA
261− def_tristate VIDEO_CODA if SOC_IMX6Q || COMPILE_TEST
262−
263−config VIDEO_IMX_PXP
264− tristate "i.MX Pixel Pipeline (PXP)"
265− depends on VIDEO_DEV && VIDEO_V4L2 && (ARCH_MXC || COMPILE_TEST)
266− select VIDEOBUF2_DMA_CONTIG
267− select V4L2_MEM2MEM_DEV
268− help
269− The i.MX Pixel Pipeline is a memory-to-memory engine for scaling,
270− color space conversion, and rotation.
271−
272−source "drivers/media/platform/imx-jpeg/Kconfig"
273−
274−config VIDEO_MEDIATEK_JPEG
275− tristate "Mediatek JPEG Codec driver"
276− depends on MTK_IOMMU_V1 || MTK_IOMMU || COMPILE_TEST
277− depends on VIDEO_DEV && VIDEO_V4L2
278− depends on ARCH_MEDIATEK || COMPILE_TEST
279− depends on MTK_SMI || (COMPILE_TEST && MTK_SMI=n)
280− select VIDEOBUF2_DMA_CONTIG
281− select V4L2_MEM2MEM_DEV
282− help
283− Mediatek jpeg codec driver provides HW capability to decode
284− JPEG format
285−
286− To compile this driver as a module, choose M here: the
287− module will be called mtk-jpeg
288−
289−config VIDEO_MEDIATEK_VPU
290− tristate "Mediatek Video Processor Unit"
291− depends on VIDEO_DEV && VIDEO_V4L2
292− depends on ARCH_MEDIATEK || COMPILE_TEST
293− help
294− This driver provides downloading VPU firmware and
295− communicating with VPU. This driver for hw video
296− codec embedded in Mediatek's MT8173 SOCs. It is able
297− to handle video decoding/encoding in a range of formats.
298−
299− To compile this driver as a module, choose M here: the
300− module will be called mtk-vpu.
301−
302−config VIDEO_MEDIATEK_MDP
303− tristate "Mediatek MDP driver"
304− depends on MTK_IOMMU || COMPILE_TEST
305− depends on VIDEO_DEV && VIDEO_V4L2
306− depends on ARCH_MEDIATEK || COMPILE_TEST
307− depends on MTK_SMI || (COMPILE_TEST && MTK_SMI=n)
308− select VIDEOBUF2_DMA_CONTIG
309− select V4L2_MEM2MEM_DEV
310− select VIDEO_MEDIATEK_VPU
311− help
312− It is a v4l2 driver and present in Mediatek MT8173 SoCs.
313− The driver supports for scaling and color space conversion.
314−
315− To compile this driver as a module, choose M here: the
316− module will be called mtk-mdp.
317−
318−config VIDEO_MEDIATEK_VCODEC
319− tristate "Mediatek Video Codec driver"
320− depends on MTK_IOMMU || COMPILE_TEST
321− depends on VIDEO_DEV && VIDEO_V4L2
322− depends on ARCH_MEDIATEK || COMPILE_TEST
323− depends on VIDEO_MEDIATEK_VPU || MTK_SCP
324− # The two following lines ensure we have the same state ("m" or "y") as
325− # our dependencies, to avoid missing symbols during link.
326− depends on VIDEO_MEDIATEK_VPU || !VIDEO_MEDIATEK_VPU
327− depends on MTK_SCP || !MTK_SCP
328− depends on MTK_SMI || (COMPILE_TEST && MTK_SMI=n)
329− select VIDEOBUF2_DMA_CONTIG
330− select V4L2_MEM2MEM_DEV
331− select VIDEO_MEDIATEK_VCODEC_VPU if VIDEO_MEDIATEK_VPU
332− select VIDEO_MEDIATEK_VCODEC_SCP if MTK_SCP
333− select V4L2_H264
334− select MEDIA_CONTROLLER
335− select MEDIA_CONTROLLER_REQUEST_API
336− help
337− Mediatek video codec driver provides HW capability to
338− encode and decode in a range of video formats on MT8173
339− and MT8183.
340−
341− Note that support for MT8173 requires VIDEO_MEDIATEK_VPU to
342− also be selected. Support for MT8183 depends on MTK_SCP.
343−
344− To compile this driver as modules, choose M here: the
345− modules will be called mtk-vcodec-dec and mtk-vcodec-enc.
346−
347−config VIDEO_MEDIATEK_VCODEC_VPU
348− bool
349−
350−config VIDEO_MEDIATEK_VCODEC_SCP
351− bool
40+# Ancillary drivers
35241
35342 config VIDEO_MEM2MEM_DEINTERLACE
35443 tristate "Deinterlace support"
355− depends on VIDEO_DEV && VIDEO_V4L2
44+ depends on V4L_MEM2MEM_DRIVERS
45+ depends on VIDEO_DEV
35646 depends on HAS_DMA
35747 select VIDEOBUF2_DMA_CONTIG
35848 select V4L2_MEM2MEM_DEV
35949 help
36050 Generic deinterlacing V4L2 driver.
36151
362−config VIDEO_MESON_GE2D
363− tristate "Amlogic 2D Graphic Acceleration Unit"
364− depends on VIDEO_DEV && VIDEO_V4L2
365− depends on ARCH_MESON || COMPILE_TEST
366− select VIDEOBUF2_DMA_CONTIG
367− select V4L2_MEM2MEM_DEV
368− help
369− This is a v4l2 driver for Amlogic GE2D 2D graphics accelerator.
370− GE2D is a standalone 2D graphic acceleration unit, with color converter,
371− image scaling, BitBLT & alpha blending operations.
372−
373− To compile this driver as a module choose m here.
374−
375−config VIDEO_SAMSUNG_S5P_G2D
376− tristate "Samsung S5P and EXYNOS4 G2D 2d graphics accelerator driver"
377− depends on VIDEO_DEV && VIDEO_V4L2
378− depends on ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST
379− select VIDEOBUF2_DMA_CONTIG
380− select V4L2_MEM2MEM_DEV
381− help
382− This is a v4l2 driver for Samsung S5P and EXYNOS4 G2D
383− 2d graphics accelerator.
384−
385−config VIDEO_SAMSUNG_S5P_JPEG
386− tristate "Samsung S5P/Exynos3250/Exynos4 JPEG codec driver"
387− depends on VIDEO_DEV && VIDEO_V4L2
388− depends on ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST
389− select VIDEOBUF2_DMA_CONTIG
390− select V4L2_MEM2MEM_DEV
391− help
392− This is a v4l2 driver for Samsung S5P, EXYNOS3250
393− and EXYNOS4 JPEG codec
394−
395−config VIDEO_SAMSUNG_S5P_MFC
396− tristate "Samsung S5P MFC Video Codec"
397− depends on VIDEO_DEV && VIDEO_V4L2
398− depends on ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST
399− select VIDEOBUF2_DMA_CONTIG
400− help
401− MFC 5.1 and 6.x driver for V4L2
402−
403−config VIDEO_MX2_EMMAPRP
404− tristate "MX2 eMMa-PrP support"
405− depends on VIDEO_DEV && VIDEO_V4L2
406− depends on SOC_IMX27 || COMPILE_TEST
407− select VIDEOBUF2_DMA_CONTIG
408− select V4L2_MEM2MEM_DEV
409− help
410− MX2X chips have a PrP that can be used to process buffers from
411− memory to memory. Operations include resizing and format
412− conversion.
413−
414−config VIDEO_SAMSUNG_EXYNOS_GSC
415− tristate "Samsung Exynos G-Scaler driver"
416− depends on VIDEO_DEV && VIDEO_V4L2
417− depends on ARCH_EXYNOS || COMPILE_TEST
418− select VIDEOBUF2_DMA_CONTIG
419− select V4L2_MEM2MEM_DEV
420− help
421− This is a v4l2 driver for Samsung EXYNOS5 SoC G-Scaler.
422−
423−config VIDEO_STI_BDISP
424− tristate "STMicroelectronics BDISP 2D blitter driver"
425− depends on VIDEO_DEV && VIDEO_V4L2
426− depends on ARCH_STI || COMPILE_TEST
427− select VIDEOBUF2_DMA_CONTIG
428− select V4L2_MEM2MEM_DEV
429− help
430− This v4l2 mem2mem driver is a 2D blitter for STMicroelectronics SoC.
431−
432−config VIDEO_STI_HVA
433− tristate "STMicroelectronics HVA multi-format video encoder V4L2 driver"
434− depends on VIDEO_DEV && VIDEO_V4L2
435− depends on ARCH_STI || COMPILE_TEST
436− select VIDEOBUF2_DMA_CONTIG
437− select V4L2_MEM2MEM_DEV
438− help
439− This V4L2 driver enables HVA (Hardware Video Accelerator) multi-format
440− video encoder of STMicroelectronics SoC, allowing hardware encoding of
441− raw uncompressed formats in various compressed video bitstreams format.
442−
443− To compile this driver as a module, choose M here:
444− the module will be called st-hva.
445−
446−config VIDEO_STI_HVA_DEBUGFS
447− bool "Export STMicroelectronics HVA internals in debugfs"
448− depends on VIDEO_STI_HVA
449− depends on DEBUG_FS
450− help
451− Select this to see information about the internal state and the last
452− operation of STMicroelectronics HVA multi-format video encoder in
453− debugfs.
454−
455− Choose N unless you know you need this.
456−
457−config VIDEO_STI_DELTA
458− tristate "STMicroelectronics DELTA multi-format video decoder V4L2 driver"
459− depends on VIDEO_DEV && VIDEO_V4L2
460− depends on ARCH_STI || COMPILE_TEST
461− help
462− This V4L2 driver enables DELTA multi-format video decoder
463− of STMicroelectronics STiH4xx SoC series allowing hardware
464− decoding of various compressed video bitstream format in
465− raw uncompressed format.
466−
467− Use this option to see the decoders available for such
468− hardware.
469−
470− Please notice that the driver will only be built if
471− at least one of the DELTA decoder below is selected.
472−
473−if VIDEO_STI_DELTA
474−
475−config VIDEO_STI_DELTA_MJPEG
476− bool "STMicroelectronics DELTA MJPEG support"
477− default y
478− help
479− Enables DELTA MJPEG hardware support.
480−
481− To compile this driver as a module, choose M here:
482− the module will be called st-delta.
483−
484−config VIDEO_STI_DELTA_DRIVER
485− tristate
486− depends on VIDEO_STI_DELTA
487− depends on VIDEO_STI_DELTA_MJPEG
488− default VIDEO_STI_DELTA_MJPEG
489− select VIDEOBUF2_DMA_CONTIG
490− select V4L2_MEM2MEM_DEV
491− select RPMSG
492−
493−endif # VIDEO_STI_DELTA
494−
495−config VIDEO_STM32_DMA2D
496− tristate "STM32 Chrom-Art Accelerator (DMA2D)"
497− depends on VIDEO_DEV && VIDEO_V4L2
498− depends on ARCH_STM32 || COMPILE_TEST
499− select VIDEOBUF2_DMA_CONTIG
500− select V4L2_MEM2MEM_DEV
501− help
502− Enables DMA2D hardware support on stm32.
503−
504− The STM32 DMA2D is a memory-to-memory engine for pixel conversion
505− and specialized DMA dedicated to image manipulation.
506−
507−config VIDEO_RENESAS_FDP1
508− tristate "Renesas Fine Display Processor"
509− depends on VIDEO_DEV && VIDEO_V4L2
510− depends on ARCH_RENESAS || COMPILE_TEST
511− depends on (!ARM64 && !VIDEO_RENESAS_FCP) || VIDEO_RENESAS_FCP
512− select VIDEOBUF2_DMA_CONTIG
513− select V4L2_MEM2MEM_DEV
514− help
515− This is a V4L2 driver for the Renesas Fine Display Processor
516− providing colour space conversion, and de-interlacing features.
517−
518− To compile this driver as a module, choose M here: the module
519− will be called rcar_fdp1.
520−
521−config VIDEO_RENESAS_JPU
522− tristate "Renesas JPEG Processing Unit"
523− depends on VIDEO_DEV && VIDEO_V4L2
524− depends on ARCH_RENESAS || COMPILE_TEST
525− select VIDEOBUF2_DMA_CONTIG
526− select V4L2_MEM2MEM_DEV
527− help
528− This is a V4L2 driver for the Renesas JPEG Processing Unit.
529−
530− To compile this driver as a module, choose M here: the module
531− will be called rcar_jpu.
532−
533−config VIDEO_RENESAS_FCP
534− tristate "Renesas Frame Compression Processor"
535− depends on ARCH_RENESAS || COMPILE_TEST
536− depends on OF
537− help
538− This is a driver for the Renesas Frame Compression Processor (FCP).
539− The FCP is a companion module of video processing modules in the
540− Renesas R-Car Gen3 and RZ/G2 SoCs. It handles memory access for
541− the codec, VSP and FDP modules.
542−
543− To compile this driver as a module, choose M here: the module
544− will be called rcar-fcp.
545−
546−config VIDEO_RENESAS_VSP1
547− tristate "Renesas VSP1 Video Processing Engine"
548− depends on VIDEO_V4L2
549− depends on ARCH_RENESAS || COMPILE_TEST
550− depends on (!ARM64 && !VIDEO_RENESAS_FCP) || VIDEO_RENESAS_FCP
52+config VIDEO_MUX
53+ tristate "Video Multiplexer"
54+ depends on V4L_PLATFORM_DRIVERS
55+ select MULTIPLEXER
56+ depends on VIDEO_DEV && OF
55157 select MEDIA_CONTROLLER
55258 select VIDEO_V4L2_SUBDEV_API
553− select VIDEOBUF2_DMA_CONTIG
554− select VIDEOBUF2_VMALLOC
555− help
556− This is a V4L2 driver for the Renesas VSP1 video processing engine.
557−
558− To compile this driver as a module, choose M here: the module
559− will be called vsp1.
560−
561−config VIDEO_ROCKCHIP_RGA
562− tristate "Rockchip Raster 2d Graphic Acceleration Unit"
563− depends on VIDEO_DEV && VIDEO_V4L2
564− depends on ARCH_ROCKCHIP || COMPILE_TEST
565− select VIDEOBUF2_DMA_SG
566− select V4L2_MEM2MEM_DEV
567− help
568− This is a v4l2 driver for Rockchip SOC RGA 2d graphics accelerator.
569− Rockchip RGA is a separate 2D raster graphic acceleration unit.
570− It accelerates 2D graphics operations, such as point/line drawing,
571− image scaling, rotation, BitBLT, alpha blending and image blur/sharpness.
572−
573− To compile this driver as a module choose m here.
574−
575−config VIDEO_TI_VPE
576− tristate "TI VPE (Video Processing Engine) driver"
577− depends on VIDEO_DEV && VIDEO_V4L2
578− depends on SOC_DRA7XX || COMPILE_TEST
579− select VIDEOBUF2_DMA_CONTIG
580− select V4L2_MEM2MEM_DEV
581− select VIDEO_TI_VPDMA
582− select VIDEO_TI_SC
583− select VIDEO_TI_CSC
584− help
585− Support for the TI VPE(Video Processing Engine) block
586− found on DRA7XX SoC.
587−
588−config VIDEO_TI_VPE_DEBUG
589− bool "VPE debug messages"
590− depends on VIDEO_TI_VPE
591− help
592− Enable debug messages on VPE driver.
593−
594−config VIDEO_QCOM_VENUS
595− tristate "Qualcomm Venus V4L2 encoder/decoder driver"
596− depends on VIDEO_DEV && VIDEO_V4L2 && QCOM_SMEM
597− depends on (ARCH_QCOM && IOMMU_DMA) || COMPILE_TEST
598− select QCOM_MDT_LOADER if ARCH_QCOM
599− select QCOM_SCM
600− select VIDEOBUF2_DMA_CONTIG
601− select V4L2_MEM2MEM_DEV
602− help
603− This is a V4L2 driver for Qualcomm Venus video accelerator
604− hardware. It accelerates encoding and decoding operations
605− on various Qualcomm SoCs.
606− To compile this driver as a module choose m here.
607−
608−config VIDEO_SUN8I_DEINTERLACE
609− tristate "Allwinner Deinterlace driver"
610− depends on VIDEO_DEV && VIDEO_V4L2
611− depends on ARCH_SUNXI || COMPILE_TEST
612− depends on COMMON_CLK && OF
613− depends on PM
614− select VIDEOBUF2_DMA_CONTIG
615− select V4L2_MEM2MEM_DEV
616− help
617− Support for the Allwinner deinterlace unit with scaling
618− capability found on some SoCs, like H3.
619− To compile this driver as a module choose m here.
620−
621−config VIDEO_SUN8I_ROTATE
622− tristate "Allwinner DE2 rotation driver"
623− depends on VIDEO_DEV && VIDEO_V4L2
624− depends on ARCH_SUNXI || COMPILE_TEST
625− depends on COMMON_CLK && OF
626− depends on PM
627− select VIDEOBUF2_DMA_CONTIG
628− select V4L2_MEM2MEM_DEV
629− help
630− Support for the Allwinner DE2 rotation unit.
631− To compile this driver as a module choose m here.
632−
633−endif # V4L_MEM2MEM_DRIVERS
634−
635−# TI VIDEO PORT Helper Modules
636−# These will be selected by VPE and VIP
637−config VIDEO_TI_VPDMA
638− tristate
639−
640−config VIDEO_TI_SC
641− tristate
642−
643−config VIDEO_TI_CSC
644− tristate
645−
646−menuconfig DVB_PLATFORM_DRIVERS
647− bool "DVB platform devices"
648− depends on MEDIA_DIGITAL_TV_SUPPORT
649− help
650− Say Y here to enable support for platform-specific Digital TV drivers.
651−
652−if DVB_PLATFORM_DRIVERS
653−source "drivers/media/platform/sti/c8sectpfe/Kconfig"
654−endif #DVB_PLATFORM_DRIVERS
655−
656−menuconfig SDR_PLATFORM_DRIVERS
657− bool "SDR platform devices"
658− depends on MEDIA_SDR_SUPPORT
659− help
660− Say Y here to enable support for platform-specific SDR Drivers.
661−
662−if SDR_PLATFORM_DRIVERS
663−
664−config VIDEO_RCAR_DRIF
665− tristate "Renesas Digital Radio Interface (DRIF)"
666− depends on VIDEO_V4L2
667− depends on ARCH_RENESAS || COMPILE_TEST
668− select VIDEOBUF2_VMALLOC
669− select V4L2_ASYNC
59+ select REGMAP
60+ select V4L2_FWNODE
67061 help
671− Say Y if you want to enable R-Car Gen3 DRIF support. DRIF is Digital
672− Radio Interface that interfaces with an RF front end chip. It is a
673− receiver of digital data which uses DMA to transfer received data to
674− a configured location for an application to use.
62+ This driver provides support for N:1 video bus multiplexers.
67563
676− To compile this driver as a module, choose M here; the module
677− will be called rcar_drif.
64+# Platform drivers - Please keep it alphabetically sorted
65+source "drivers/media/platform/allegro-dvt/Kconfig"
66+source "drivers/media/platform/amlogic/Kconfig"
67+source "drivers/media/platform/amphion/Kconfig"
68+source "drivers/media/platform/aspeed/Kconfig"
69+source "drivers/media/platform/atmel/Kconfig"
70+source "drivers/media/platform/cadence/Kconfig"
71+source "drivers/media/platform/chips-media/Kconfig"
72+source "drivers/media/platform/intel/Kconfig"
73+source "drivers/media/platform/marvell/Kconfig"
74+source "drivers/media/platform/mediatek/Kconfig"
75+source "drivers/media/platform/nvidia/Kconfig"
76+source "drivers/media/platform/nxp/Kconfig"
77+source "drivers/media/platform/qcom/Kconfig"
78+source "drivers/media/platform/renesas/Kconfig"
79+source "drivers/media/platform/rockchip/Kconfig"
80+source "drivers/media/platform/samsung/Kconfig"
81+source "drivers/media/platform/st/Kconfig"
82+source "drivers/media/platform/sunxi/Kconfig"
83+source "drivers/media/platform/ti/Kconfig"
84+source "drivers/media/platform/via/Kconfig"
85+source "drivers/media/platform/xilinx/Kconfig"
67886
679−endif # SDR_PLATFORM_DRIVERS
87+endif # MEDIA_PLATFORM_DRIVERS
drivers/media/platform/Makefile+27−83
@@ -3,88 +3,32 @@ · 2 unmodified lines
33 # Makefile for the video capture/playback device drivers.
44 #
55
6−obj-$(CONFIG_VIDEO_ALLEGRO_DVT) += allegro-dvt/
7−obj-$(CONFIG_VIDEO_ASPEED) += aspeed-video.o
8−obj-$(CONFIG_VIDEO_CADENCE) += cadence/
9−obj-$(CONFIG_VIDEO_VIA_CAMERA) += via-camera.o
10−obj-$(CONFIG_VIDEO_CAFE_CCIC) += marvell-ccic/
11−obj-$(CONFIG_VIDEO_MMP_CAMERA) += marvell-ccic/
12−
13−obj-$(CONFIG_VIDEO_OMAP3) += omap3isp/
14−obj-$(CONFIG_VIDEO_PXA27x) += pxa_camera.o
15−
16−obj-$(CONFIG_VIDEO_VIU) += fsl-viu.o
17−
18−obj-y += ti-vpe/
19−
20−obj-$(CONFIG_VIDEO_MX2_EMMAPRP) += mx2_emmaprp.o
21−obj-$(CONFIG_VIDEO_CODA) += coda/
22−
23−obj-$(CONFIG_VIDEO_IMX_PXP) += imx-pxp.o
24−obj-$(CONFIG_VIDEO_IMX8_JPEG) += imx-jpeg/
25−
6+# Place here, alphabetically sorted by directory
7+# (e. g. LC_ALL=C sort Makefile)
8+obj-y += allegro-dvt/
9+obj-y += amlogic/
10+obj-y += amphion/
11+obj-y += aspeed/
12+obj-y += atmel/
13+obj-y += cadence/
14+obj-y += chips-media/
15+obj-y += intel/
16+obj-y += marvell/
17+obj-y += mediatek/
18+obj-y += nvidia/
19+obj-y += nxp/
20+obj-y += qcom/
21+obj-y += renesas/
22+obj-y += rockchip/
23+obj-y += samsung/
24+obj-y += st/
25+obj-y += sunxi/
26+obj-y += ti/
27+obj-y += via/
28+obj-y += xilinx/
29+
30+# Please place here only ancillary drivers that aren't SoC-specific
31+# Please keep it alphabetically sorted by Kconfig name
32+# (e. g. LC_ALL=C sort Makefile)
2633 obj-$(CONFIG_VIDEO_MEM2MEM_DEINTERLACE) += m2m-deinterlace.o
27−
2834 obj-$(CONFIG_VIDEO_MUX) += video-mux.o
29−
30−obj-$(CONFIG_VIDEO_S3C_CAMIF) += s3c-camif/
31−obj-$(CONFIG_VIDEO_SAMSUNG_EXYNOS4_IS) += exynos4-is/
32−obj-$(CONFIG_VIDEO_SAMSUNG_S5P_JPEG) += s5p-jpeg/
33−obj-$(CONFIG_VIDEO_SAMSUNG_S5P_MFC) += s5p-mfc/
34−
35−obj-$(CONFIG_VIDEO_SAMSUNG_S5P_G2D) += s5p-g2d/
36−obj-$(CONFIG_VIDEO_SAMSUNG_EXYNOS_GSC) += exynos-gsc/
37−
38−obj-$(CONFIG_VIDEO_STI_BDISP) += sti/bdisp/
39−obj-$(CONFIG_VIDEO_STI_HVA) += sti/hva/
40−obj-$(CONFIG_DVB_C8SECTPFE) += sti/c8sectpfe/
41−
42−obj-$(CONFIG_VIDEO_STI_DELTA) += sti/delta/
43−
44−obj-y += stm32/
45−
46−obj-y += davinci/
47−
48−obj-$(CONFIG_VIDEO_SH_VOU) += sh_vou.o
49−
50−obj-$(CONFIG_VIDEO_RCAR_DRIF) += rcar_drif.o
51−obj-$(CONFIG_VIDEO_RENESAS_CEU) += renesas-ceu.o
52−obj-$(CONFIG_VIDEO_RENESAS_FCP) += rcar-fcp.o
53−obj-$(CONFIG_VIDEO_RENESAS_FDP1) += rcar_fdp1.o
54−obj-$(CONFIG_VIDEO_RENESAS_JPU) += rcar_jpu.o
55−obj-$(CONFIG_VIDEO_RENESAS_VSP1) += vsp1/
56−
57−obj-$(CONFIG_VIDEO_ROCKCHIP_ISP1) += rockchip/rkisp1/
58−obj-$(CONFIG_VIDEO_ROCKCHIP_RGA) += rockchip/rga/
59−
60−obj-y += omap/
61−
62−obj-$(CONFIG_VIDEO_AM437X_VPFE) += am437x/
63−
64−obj-$(CONFIG_VIDEO_XILINX) += xilinx/
65−
66−obj-$(CONFIG_VIDEO_RCAR_ISP) += rcar-isp.o
67−obj-$(CONFIG_VIDEO_RCAR_VIN) += rcar-vin/
68−
69−obj-$(CONFIG_VIDEO_ATMEL_ISC) += atmel/
70−obj-$(CONFIG_VIDEO_ATMEL_ISI) += atmel/
71−obj-$(CONFIG_VIDEO_ATMEL_XISC) += atmel/
72−
73−obj-$(CONFIG_VIDEO_STM32_DCMI) += stm32/
74−obj-$(CONFIG_VIDEO_STM32_DMA2D) += stm32/
75−
76−obj-$(CONFIG_VIDEO_MEDIATEK_VPU) += mtk-vpu/
77−
78−obj-$(CONFIG_VIDEO_MEDIATEK_VCODEC) += mtk-vcodec/
79−
80−obj-$(CONFIG_VIDEO_MEDIATEK_MDP) += mtk-mdp/
81−
82−obj-$(CONFIG_VIDEO_MEDIATEK_JPEG) += mtk-jpeg/
83−
84−obj-$(CONFIG_VIDEO_QCOM_CAMSS) += qcom/camss/
85−
86−obj-$(CONFIG_VIDEO_QCOM_VENUS) += qcom/venus/
87−
88−obj-y += sunxi/
89−
90−obj-$(CONFIG_VIDEO_MESON_GE2D) += meson/ge2d/
drivers/media/platform/allegro-dvt/Kconfig+19−0
@@ -0,0 +1,19 @@
1+# SPDX-License-Identifier: GPL-2.0-only
2+
3+comment "Allegro DVT media platform drivers"
4+
5+config VIDEO_ALLEGRO_DVT
6+ tristate "Allegro DVT Video IP Core"
7+ depends on V4L_MEM2MEM_DRIVERS
8+ depends on VIDEO_DEV
9+ depends on ARCH_ZYNQMP || COMPILE_TEST
10+ select V4L2_MEM2MEM_DEV
11+ select VIDEOBUF2_DMA_CONTIG
12+ select REGMAP_MMIO
13+ help
14+ Support for the encoder video IP core by Allegro DVT. This core is
15+ found for example on the Xilinx ZynqMP SoC in the EV family and is
16+ called VCU in the reference manual.
17+
18+ To compile this driver as a module, choose M here: the module
19+ will be called allegro.
drivers/media/platform/amlogic/Kconfig+5−0
@@ -0,0 +1,5 @@
1+# SPDX-License-Identifier: GPL-2.0-only
2+
3+comment "Amlogic media platform drivers"
4+
5+source "drivers/media/platform/amlogic/meson-ge2d/Kconfig"
drivers/media/platform/amlogic/Makefile+2−0
@@ -0,0 +1,2 @@
1+# SPDX-License-Identifier: GPL-2.0-only
2+obj-y += meson-ge2d/
drivers/media/platform/amlogic/meson-ge2d/Kconfig+14−0
@@ -0,0 +1,14 @@
1+config VIDEO_MESON_GE2D
2+ tristate "Amlogic 2D Graphic Acceleration Unit"
3+ depends on V4L_MEM2MEM_DRIVERS
4+ depends on VIDEO_DEV
5+ depends on ARCH_MESON || COMPILE_TEST
6+ select VIDEOBUF2_DMA_CONTIG
7+ select V4L2_MEM2MEM_DEV
8+ help
9+ This is a v4l2 driver for Amlogic GE2D 2D graphics accelerator.
10+ GE2D is a standalone 2D graphic acceleration unit, with color converter,
11+ image scaling, BitBLT & alpha blending operations.
12+
13+ To compile this driver as a module choose m here.
14+
drivers/media/platform/amlogic/meson-ge2d/Makefilerenamed from drivers/media/platform/meson/ge2d/Makefile+0−0

File renamed without changes.

drivers/media/platform/amlogic/meson-ge2d/ge2d-regs.hrenamed from drivers/media/platform/meson/ge2d/ge2d-regs.h+0−0

File renamed without changes.

drivers/media/platform/amlogic/meson-ge2d/ge2d.crenamed from drivers/media/platform/meson/ge2d/ge2d.c+12−12
@@ -215,35 +215,35 @@ static void ge2d_hw_start(struct meson_ge2d *ge2d) · 214 unmodified lines
215215
216216 regmap_write(ge2d->map, GE2D_SRC1_CLIPY_START_END,
217217 FIELD_PREP(GE2D_START, ctx->in.crop.top) |
218− FIELD_PREP(GE2D_END, ctx->in.crop.top + ctx->in.crop.height));
218+ FIELD_PREP(GE2D_END, ctx->in.crop.top + ctx->in.crop.height - 1));
219219 regmap_write(ge2d->map, GE2D_SRC1_CLIPX_START_END,
220220 FIELD_PREP(GE2D_START, ctx->in.crop.left) |
221− FIELD_PREP(GE2D_END, ctx->in.crop.left + ctx->in.crop.width));
221+ FIELD_PREP(GE2D_END, ctx->in.crop.left + ctx->in.crop.width - 1));
222222 regmap_write(ge2d->map, GE2D_SRC2_CLIPY_START_END,
223223 FIELD_PREP(GE2D_START, ctx->out.crop.top) |
224− FIELD_PREP(GE2D_END, ctx->out.crop.top + ctx->out.crop.height));
224+ FIELD_PREP(GE2D_END, ctx->out.crop.top + ctx->out.crop.height - 1));
225225 regmap_write(ge2d->map, GE2D_SRC2_CLIPX_START_END,
226226 FIELD_PREP(GE2D_START, ctx->out.crop.left) |
227− FIELD_PREP(GE2D_END, ctx->out.crop.left + ctx->out.crop.width));
227+ FIELD_PREP(GE2D_END, ctx->out.crop.left + ctx->out.crop.width - 1));
228228 regmap_write(ge2d->map, GE2D_DST_CLIPY_START_END,
229229 FIELD_PREP(GE2D_START, ctx->out.crop.top) |
230− FIELD_PREP(GE2D_END, ctx->out.crop.top + ctx->out.crop.height));
230+ FIELD_PREP(GE2D_END, ctx->out.crop.top + ctx->out.crop.height - 1));
231231 regmap_write(ge2d->map, GE2D_DST_CLIPX_START_END,
232232 FIELD_PREP(GE2D_START, ctx->out.crop.left) |
233− FIELD_PREP(GE2D_END, ctx->out.crop.left + ctx->out.crop.width));
233+ FIELD_PREP(GE2D_END, ctx->out.crop.left + ctx->out.crop.width - 1));
234234
235235 regmap_write(ge2d->map, GE2D_SRC1_Y_START_END,
236− FIELD_PREP(GE2D_END, ctx->in.pix_fmt.height));
236+ FIELD_PREP(GE2D_END, ctx->in.pix_fmt.height - 1));
237237 regmap_write(ge2d->map, GE2D_SRC1_X_START_END,
238− FIELD_PREP(GE2D_END, ctx->in.pix_fmt.width));
238+ FIELD_PREP(GE2D_END, ctx->in.pix_fmt.width - 1));
239239 regmap_write(ge2d->map, GE2D_SRC2_Y_START_END,
240− FIELD_PREP(GE2D_END, ctx->out.pix_fmt.height));
240+ FIELD_PREP(GE2D_END, ctx->out.pix_fmt.height - 1));
241241 regmap_write(ge2d->map, GE2D_SRC2_X_START_END,
242− FIELD_PREP(GE2D_END, ctx->out.pix_fmt.width));
242+ FIELD_PREP(GE2D_END, ctx->out.pix_fmt.width - 1));
243243 regmap_write(ge2d->map, GE2D_DST_Y_START_END,
244− FIELD_PREP(GE2D_END, ctx->out.pix_fmt.height));
244+ FIELD_PREP(GE2D_END, ctx->out.pix_fmt.height - 1));
245245 regmap_write(ge2d->map, GE2D_DST_X_START_END,
246− FIELD_PREP(GE2D_END, ctx->out.pix_fmt.width));
246+ FIELD_PREP(GE2D_END, ctx->out.pix_fmt.width - 1));
247247
248248 /* Color, no blend, use source color */
249249 reg = GE2D_ALU_DO_COLOR_OPERATION_LOGIC(LOGIC_OPERATION_COPY,
drivers/media/platform/amphion/Kconfig+22−0
@@ -0,0 +1,22 @@
1+# SPDX-License-Identifier: GPL-2.0-only
2+
3+comment "Amphion drivers"
4+
5+config VIDEO_AMPHION_VPU
6+ tristate "Amphion VPU (Video Processing Unit) Codec IP"
7+ depends on V4L_MEM2MEM_DRIVERS
8+ depends on ARCH_MXC || COMPILE_TEST
9+ depends on MEDIA_SUPPORT
10+ depends on VIDEO_DEV && MAILBOX
11+ select MEDIA_CONTROLLER
12+ select V4L2_MEM2MEM_DEV
13+ select VIDEOBUF2_DMA_CONTIG
14+ select VIDEOBUF2_VMALLOC
15+ help
16+ Amphion VPU Codec IP contains two parts: Windsor and Malone.
17+ Windsor is encoder that supports H.264, and Malone is decoder
18+ that supports H.264, HEVC, and other video formats.
19+ This is a V4L2 driver for NXP MXC 8Q video accelerator hardware.
20+ It accelerates encoding and decoding operations on
21+ various NXP SoCs.
22+ To compile this driver as a module choose m here.
drivers/media/platform/amphion/Makefile+20−0
@@ -0,0 +1,20 @@
1+# SPDX-License-Identifier: GPL-2.0
2+# Makefile for NXP VPU driver
3+
4+amphion-vpu-objs += vpu_drv.o \
5+ vpu_core.o \
6+ vpu_mbox.o \
7+ vpu_v4l2.o \
8+ vpu_helpers.o \
9+ vpu_cmds.o \
10+ vpu_msgs.o \
11+ vpu_rpc.o \
12+ vpu_imx8q.o \
13+ vpu_windsor.o \
14+ vpu_malone.o \
15+ vpu_color.o \
16+ vdec.o \
17+ venc.o \
18+ vpu_dbg.o
19+
20+obj-$(CONFIG_VIDEO_AMPHION_VPU) += amphion-vpu.o
drivers/media/platform/amphion/vdec.c+1656−0
@@ -0,0 +1,1656 @@
1+// SPDX-License-Identifier: GPL-2.0
2+/*
3+ * Copyright 2020-2021 NXP
4+ */
5+
6+#include <linux/init.h>
7+#include <linux/interconnect.h>
8+#include <linux/ioctl.h>
9+#include <linux/list.h>
10+#include <linux/kernel.h>
11+#include <linux/module.h>
12+#include <linux/vmalloc.h>
13+#include <linux/videodev2.h>
14+#include <media/v4l2-device.h>
15+#include <media/v4l2-event.h>
16+#include <media/v4l2-mem2mem.h>
17+#include <media/v4l2-ioctl.h>
18+#include <media/videobuf2-v4l2.h>
19+#include <media/videobuf2-dma-contig.h>
20+#include <media/videobuf2-vmalloc.h>
21+#include "vpu.h"
22+#include "vpu_defs.h"
23+#include "vpu_core.h"
24+#include "vpu_helpers.h"
25+#include "vpu_v4l2.h"
26+#include "vpu_cmds.h"
27+#include "vpu_rpc.h"
28+
29+#define VDEC_FRAME_DEPTH 256
30+#define VDEC_MIN_BUFFER_CAP 8
31+
32+struct vdec_fs_info {
33+ char name[8];
34+ u32 type;
35+ u32 max_count;
36+ u32 req_count;
37+ u32 count;
38+ u32 index;
39+ u32 size;
40+ struct vpu_buffer buffer[32];
41+ u32 tag;
42+};
43+
44+struct vdec_t {
45+ u32 seq_hdr_found;
46+ struct vpu_buffer udata;
47+ struct vpu_decode_params params;
48+ struct vpu_dec_codec_info codec_info;
49+ enum vpu_codec_state state;
50+
51+ struct vpu_vb2_buffer *slots[VB2_MAX_FRAME];
52+ u32 req_frame_count;
53+ struct vdec_fs_info mbi;
54+ struct vdec_fs_info dcp;
55+ u32 seq_tag;
56+
57+ bool reset_codec;
58+ bool fixed_fmt;
59+ u32 decoded_frame_count;
60+ u32 display_frame_count;
61+ u32 sequence;
62+ u32 eos_received;
63+ bool is_source_changed;
64+ u32 source_change;
65+ u32 drain;
66+ u32 ts_pre_count;
67+ u32 frame_depth;
68+};
69+
70+static const struct vpu_format vdec_formats[] = {
71+ {
72+ .pixfmt = V4L2_PIX_FMT_NV12M_8L128,
73+ .num_planes = 2,
74+ .type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,
75+ },
76+ {
77+ .pixfmt = V4L2_PIX_FMT_NV12M_10BE_8L128,
78+ .num_planes = 2,
79+ .type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,
80+ },
81+ {
82+ .pixfmt = V4L2_PIX_FMT_H264,
83+ .num_planes = 1,
84+ .type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
85+ .flags = V4L2_FMT_FLAG_DYN_RESOLUTION
86+ },
87+ {
88+ .pixfmt = V4L2_PIX_FMT_H264_MVC,
89+ .num_planes = 1,
90+ .type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
91+ .flags = V4L2_FMT_FLAG_DYN_RESOLUTION
92+ },
93+ {
94+ .pixfmt = V4L2_PIX_FMT_HEVC,
95+ .num_planes = 1,
96+ .type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
97+ .flags = V4L2_FMT_FLAG_DYN_RESOLUTION
98+ },
99+ {
100+ .pixfmt = V4L2_PIX_FMT_VC1_ANNEX_G,
101+ .num_planes = 1,
102+ .type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
103+ .flags = V4L2_FMT_FLAG_DYN_RESOLUTION
104+ },
105+ {
106+ .pixfmt = V4L2_PIX_FMT_VC1_ANNEX_L,
107+ .num_planes = 1,
108+ .type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
109+ .flags = V4L2_FMT_FLAG_DYN_RESOLUTION
110+ },
111+ {
112+ .pixfmt = V4L2_PIX_FMT_MPEG2,
113+ .num_planes = 1,
114+ .type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
115+ .flags = V4L2_FMT_FLAG_DYN_RESOLUTION
116+ },
117+ {
118+ .pixfmt = V4L2_PIX_FMT_MPEG4,
119+ .num_planes = 1,
120+ .type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
121+ .flags = V4L2_FMT_FLAG_DYN_RESOLUTION
122+ },
123+ {
124+ .pixfmt = V4L2_PIX_FMT_XVID,
125+ .num_planes = 1,
126+ .type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
127+ .flags = V4L2_FMT_FLAG_DYN_RESOLUTION
128+ },
129+ {
130+ .pixfmt = V4L2_PIX_FMT_VP8,
131+ .num_planes = 1,
132+ .type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
133+ .flags = V4L2_FMT_FLAG_DYN_RESOLUTION
134+ },
135+ {
136+ .pixfmt = V4L2_PIX_FMT_H263,
137+ .num_planes = 1,
138+ .type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
139+ .flags = V4L2_FMT_FLAG_DYN_RESOLUTION
140+ },
141+ {0, 0, 0, 0},
142+};
143+
144+static const struct v4l2_ctrl_ops vdec_ctrl_ops = {
145+ .g_volatile_ctrl = vpu_helper_g_volatile_ctrl,
146+};
147+
148+static int vdec_ctrl_init(struct vpu_inst *inst)
149+{
150+ struct v4l2_ctrl *ctrl;
151+ int ret;
152+
153+ ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 20);
154+ if (ret)
155+ return ret;
156+
157+ ctrl = v4l2_ctrl_new_std(&inst->ctrl_handler, &vdec_ctrl_ops,
158+ V4L2_CID_MIN_BUFFERS_FOR_CAPTURE, 1, 32, 1, 2);
159+ if (ctrl)
160+ ctrl->flags |= V4L2_CTRL_FLAG_VOLATILE;
161+
162+ ctrl = v4l2_ctrl_new_std(&inst->ctrl_handler, &vdec_ctrl_ops,
163+ V4L2_CID_MIN_BUFFERS_FOR_OUTPUT, 1, 32, 1, 2);
164+ if (ctrl)
165+ ctrl->flags |= V4L2_CTRL_FLAG_VOLATILE;
166+
167+ ret = v4l2_ctrl_handler_setup(&inst->ctrl_handler);
168+ if (ret) {
169+ dev_err(inst->dev, "[%d] setup ctrls fail, ret = %d\n", inst->id, ret);
170+ v4l2_ctrl_handler_free(&inst->ctrl_handler);
171+ return ret;
172+ }
173+
174+ return 0;
175+}
176+
177+static void vdec_set_last_buffer_dequeued(struct vpu_inst *inst)
178+{
179+ struct vdec_t *vdec = inst->priv;
180+
181+ if (vdec->eos_received) {
182+ if (!vpu_set_last_buffer_dequeued(inst))
183+ vdec->eos_received--;
184+ }
185+}
186+
187+static void vdec_handle_resolution_change(struct vpu_inst *inst)
188+{
189+ struct vdec_t *vdec = inst->priv;
190+ struct vb2_queue *q;
191+
192+ if (!inst->fh.m2m_ctx)
193+ return;
194+
195+ if (inst->state != VPU_CODEC_STATE_DYAMIC_RESOLUTION_CHANGE)
196+ return;
197+ if (!vdec->source_change)
198+ return;
199+
200+ q = v4l2_m2m_get_dst_vq(inst->fh.m2m_ctx);
201+ if (!list_empty(&q->done_list))
202+ return;
203+
204+ vdec->source_change--;
205+ vpu_notify_source_change(inst);
206+}
207+
208+static int vdec_update_state(struct vpu_inst *inst, enum vpu_codec_state state, u32 force)
209+{
210+ struct vdec_t *vdec = inst->priv;
211+ enum vpu_codec_state pre_state = inst->state;
212+
213+ if (state == VPU_CODEC_STATE_SEEK) {
214+ if (inst->state == VPU_CODEC_STATE_DYAMIC_RESOLUTION_CHANGE)
215+ vdec->state = inst->state;
216+ else
217+ vdec->state = VPU_CODEC_STATE_ACTIVE;
218+ }
219+ if (inst->state != VPU_CODEC_STATE_SEEK || force)
220+ inst->state = state;
221+ else if (state == VPU_CODEC_STATE_DYAMIC_RESOLUTION_CHANGE)
222+ vdec->state = VPU_CODEC_STATE_DYAMIC_RESOLUTION_CHANGE;
223+
224+ if (inst->state != pre_state)
225+ vpu_trace(inst->dev, "[%d] %d -> %d\n", inst->id, pre_state, inst->state);
226+
227+ if (inst->state == VPU_CODEC_STATE_DYAMIC_RESOLUTION_CHANGE)
228+ vdec_handle_resolution_change(inst);
229+
230+ return 0;
231+}
232+
233+static int vdec_querycap(struct file *file, void *fh, struct v4l2_capability *cap)
234+{
235+ strscpy(cap->driver, "amphion-vpu", sizeof(cap->driver));
236+ strscpy(cap->card, "amphion vpu decoder", sizeof(cap->card));
237+ strscpy(cap->bus_info, "platform: amphion-vpu", sizeof(cap->bus_info));
238+
239+ return 0;
240+}
241+
242+static int vdec_enum_fmt(struct file *file, void *fh, struct v4l2_fmtdesc *f)
243+{
244+ struct vpu_inst *inst = to_inst(file);
245+ struct vdec_t *vdec = inst->priv;
246+ const struct vpu_format *fmt;
247+ int ret = -EINVAL;
248+
249+ vpu_inst_lock(inst);
250+ if (!V4L2_TYPE_IS_OUTPUT(f->type) && vdec->fixed_fmt) {
251+ if (f->index == 0) {
252+ f->pixelformat = inst->cap_format.pixfmt;
253+ f->flags = inst->cap_format.flags;
254+ ret = 0;
255+ }
256+ } else {
257+ fmt = vpu_helper_enum_format(inst, f->type, f->index);
258+ memset(f->reserved, 0, sizeof(f->reserved));
259+ if (!fmt)
260+ goto exit;
261+
262+ f->pixelformat = fmt->pixfmt;
263+ f->flags = fmt->flags;
264+ ret = 0;
265+ }
266+
267+exit:
268+ vpu_inst_unlock(inst);
269+ return ret;
270+}
271+
272+static int vdec_g_fmt(struct file *file, void *fh, struct v4l2_format *f)
273+{
274+ struct vpu_inst *inst = to_inst(file);
275+ struct vdec_t *vdec = inst->priv;
276+ struct v4l2_pix_format_mplane *pixmp = &f->fmt.pix_mp;
277+ struct vpu_format *cur_fmt;
278+ int i;
279+
280+ cur_fmt = vpu_get_format(inst, f->type);
281+
282+ pixmp->pixelformat = cur_fmt->pixfmt;
283+ pixmp->num_planes = cur_fmt->num_planes;
284+ pixmp->width = cur_fmt->width;
285+ pixmp->height = cur_fmt->height;
286+ pixmp->field = cur_fmt->field;
287+ pixmp->flags = cur_fmt->flags;
288+ for (i = 0; i < pixmp->num_planes; i++) {
289+ pixmp->plane_fmt[i].bytesperline = cur_fmt->bytesperline[i];
290+ pixmp->plane_fmt[i].sizeimage = cur_fmt->sizeimage[i];
291+ }
292+
293+ f->fmt.pix_mp.colorspace = vdec->codec_info.color_primaries;
294+ f->fmt.pix_mp.xfer_func = vdec->codec_info.transfer_chars;
295+ f->fmt.pix_mp.ycbcr_enc = vdec->codec_info.matrix_coeffs;
296+ f->fmt.pix_mp.quantization = vdec->codec_info.full_range;
297+
298+ return 0;
299+}
300+
301+static int vdec_try_fmt(struct file *file, void *fh, struct v4l2_format *f)
302+{
303+ struct vpu_inst *inst = to_inst(file);
304+ struct vdec_t *vdec = inst->priv;
305+
306+ vpu_try_fmt_common(inst, f);
307+
308+ vpu_inst_lock(inst);
309+ if (vdec->fixed_fmt) {
310+ f->fmt.pix_mp.colorspace = vdec->codec_info.color_primaries;
311+ f->fmt.pix_mp.xfer_func = vdec->codec_info.transfer_chars;
312+ f->fmt.pix_mp.ycbcr_enc = vdec->codec_info.matrix_coeffs;
313+ f->fmt.pix_mp.quantization = vdec->codec_info.full_range;
314+ } else {
315+ f->fmt.pix_mp.colorspace = V4L2_COLORSPACE_DEFAULT;
316+ f->fmt.pix_mp.xfer_func = V4L2_XFER_FUNC_DEFAULT;
317+ f->fmt.pix_mp.ycbcr_enc = V4L2_YCBCR_ENC_DEFAULT;
318+ f->fmt.pix_mp.quantization = V4L2_QUANTIZATION_DEFAULT;
319+ }
320+ vpu_inst_unlock(inst);
321+
322+ return 0;
323+}
324+
325+static int vdec_s_fmt_common(struct vpu_inst *inst, struct v4l2_format *f)
326+{
327+ struct v4l2_pix_format_mplane *pixmp = &f->fmt.pix_mp;
328+ const struct vpu_format *fmt;
329+ struct vpu_format *cur_fmt;
330+ struct vb2_queue *q;
331+ struct vdec_t *vdec = inst->priv;
332+ int i;
333+
334+ if (!inst->fh.m2m_ctx)
335+ return -EINVAL;
336+
337+ q = v4l2_m2m_get_vq(inst->fh.m2m_ctx, f->type);
338+ if (!q)
339+ return -EINVAL;
340+ if (vb2_is_busy(q))
341+ return -EBUSY;
342+
343+ fmt = vpu_try_fmt_common(inst, f);
344+ if (!fmt)
345+ return -EINVAL;
346+
347+ cur_fmt = vpu_get_format(inst, f->type);
348+ if (V4L2_TYPE_IS_OUTPUT(f->type) && inst->state != VPU_CODEC_STATE_DEINIT) {
349+ if (cur_fmt->pixfmt != fmt->pixfmt) {
350+ vdec->reset_codec = true;
351+ vdec->fixed_fmt = false;
352+ }
353+ }
354+ cur_fmt->pixfmt = fmt->pixfmt;
355+ if (V4L2_TYPE_IS_OUTPUT(f->type) || !vdec->fixed_fmt) {
356+ cur_fmt->num_planes = fmt->num_planes;
357+ cur_fmt->flags = fmt->flags;
358+ cur_fmt->width = pixmp->width;
359+ cur_fmt->height = pixmp->height;
360+ for (i = 0; i < fmt->num_planes; i++) {
361+ cur_fmt->sizeimage[i] = pixmp->plane_fmt[i].sizeimage;
362+ cur_fmt->bytesperline[i] = pixmp->plane_fmt[i].bytesperline;
363+ }
364+ if (pixmp->field != V4L2_FIELD_ANY)
365+ cur_fmt->field = pixmp->field;
366+ } else {
367+ pixmp->num_planes = cur_fmt->num_planes;
368+ pixmp->width = cur_fmt->width;
369+ pixmp->height = cur_fmt->height;
370+ for (i = 0; i < pixmp->num_planes; i++) {
371+ pixmp->plane_fmt[i].bytesperline = cur_fmt->bytesperline[i];
372+ pixmp->plane_fmt[i].sizeimage = cur_fmt->sizeimage[i];
373+ }
374+ pixmp->field = cur_fmt->field;
375+ }
376+
377+ if (!vdec->fixed_fmt) {
378+ if (V4L2_TYPE_IS_OUTPUT(f->type)) {
379+ vdec->params.codec_format = cur_fmt->pixfmt;
380+ vdec->codec_info.color_primaries = f->fmt.pix_mp.colorspace;
381+ vdec->codec_info.transfer_chars = f->fmt.pix_mp.xfer_func;
382+ vdec->codec_info.matrix_coeffs = f->fmt.pix_mp.ycbcr_enc;
383+ vdec->codec_info.full_range = f->fmt.pix_mp.quantization;
384+ } else {
385+ vdec->params.output_format = cur_fmt->pixfmt;
386+ inst->crop.left = 0;
387+ inst->crop.top = 0;
388+ inst->crop.width = cur_fmt->width;
389+ inst->crop.height = cur_fmt->height;
390+ }
391+ }
392+
393+ vpu_trace(inst->dev, "[%d] %c%c%c%c %dx%d\n", inst->id,
394+ f->fmt.pix_mp.pixelformat,
395+ f->fmt.pix_mp.pixelformat >> 8,
396+ f->fmt.pix_mp.pixelformat >> 16,
397+ f->fmt.pix_mp.pixelformat >> 24,
398+ f->fmt.pix_mp.width,
399+ f->fmt.pix_mp.height);
400+
401+ return 0;
402+}
403+
404+static int vdec_s_fmt(struct file *file, void *fh, struct v4l2_format *f)
405+{
406+ struct vpu_inst *inst = to_inst(file);
407+ struct v4l2_pix_format_mplane *pixmp = &f->fmt.pix_mp;
408+ struct vdec_t *vdec = inst->priv;
409+ int ret = 0;
410+
411+ vpu_inst_lock(inst);
412+ ret = vdec_s_fmt_common(inst, f);
413+ if (ret)
414+ goto exit;
415+
416+ if (V4L2_TYPE_IS_OUTPUT(f->type) && !vdec->fixed_fmt) {
417+ struct v4l2_format fc;
418+
419+ memset(&fc, 0, sizeof(fc));
420+ fc.type = inst->cap_format.type;
421+ fc.fmt.pix_mp.pixelformat = inst->cap_format.pixfmt;
422+ fc.fmt.pix_mp.width = pixmp->width;
423+ fc.fmt.pix_mp.height = pixmp->height;
424+ vdec_s_fmt_common(inst, &fc);
425+ }
426+
427+ f->fmt.pix_mp.colorspace = vdec->codec_info.color_primaries;
428+ f->fmt.pix_mp.xfer_func = vdec->codec_info.transfer_chars;
429+ f->fmt.pix_mp.ycbcr_enc = vdec->codec_info.matrix_coeffs;
430+ f->fmt.pix_mp.quantization = vdec->codec_info.full_range;
431+
432+exit:
433+ vpu_inst_unlock(inst);
434+ return ret;
435+}
436+
437+static int vdec_g_selection(struct file *file, void *fh, struct v4l2_selection *s)
438+{
439+ struct vpu_inst *inst = to_inst(file);
440+
441+ if (s->type != V4L2_BUF_TYPE_VIDEO_CAPTURE && s->type != V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE)
442+ return -EINVAL;
443+
444+ switch (s->target) {
445+ case V4L2_SEL_TGT_COMPOSE:
446+ case V4L2_SEL_TGT_COMPOSE_DEFAULT:
447+ case V4L2_SEL_TGT_COMPOSE_PADDED:
448+ s->r = inst->crop;
449+ break;
450+ case V4L2_SEL_TGT_COMPOSE_BOUNDS:
451+ s->r.left = 0;
452+ s->r.top = 0;
453+ s->r.width = inst->cap_format.width;
454+ s->r.height = inst->cap_format.height;
455+ break;
456+ default:
457+ return -EINVAL;
458+ }
459+
460+ return 0;
461+}
462+
463+static int vdec_drain(struct vpu_inst *inst)
464+{
465+ struct vdec_t *vdec = inst->priv;
466+
467+ if (!inst->fh.m2m_ctx)
468+ return 0;
469+
470+ if (!vdec->drain)
471+ return 0;
472+
473+ if (v4l2_m2m_num_src_bufs_ready(inst->fh.m2m_ctx))
474+ return 0;
475+
476+ if (!vdec->params.frame_count) {
477+ vpu_set_last_buffer_dequeued(inst);
478+ return 0;
479+ }
480+
481+ vpu_iface_add_scode(inst, SCODE_PADDING_EOS);
482+ vdec->params.end_flag = 1;
483+ vpu_iface_set_decode_params(inst, &vdec->params, 1);
484+ vdec->drain = 0;
485+ vpu_trace(inst->dev, "[%d] frame_count = %d\n", inst->id, vdec->params.frame_count);
486+
487+ return 0;
488+}
489+
490+static int vdec_cmd_start(struct vpu_inst *inst)
491+{
492+ switch (inst->state) {
493+ case VPU_CODEC_STATE_STARTED:
494+ case VPU_CODEC_STATE_DRAIN:
495+ case VPU_CODEC_STATE_DYAMIC_RESOLUTION_CHANGE:
496+ vdec_update_state(inst, VPU_CODEC_STATE_ACTIVE, 0);
497+ break;
498+ default:
499+ break;
500+ }
501+ vpu_process_capture_buffer(inst);
502+ return 0;
503+}
504+
505+static int vdec_cmd_stop(struct vpu_inst *inst)
506+{
507+ struct vdec_t *vdec = inst->priv;
508+
509+ vpu_trace(inst->dev, "[%d]\n", inst->id);
510+
511+ if (inst->state == VPU_CODEC_STATE_DEINIT) {
512+ vpu_set_last_buffer_dequeued(inst);
513+ } else {
514+ vdec->drain = 1;
515+ vdec_drain(inst);
516+ }
517+
518+ return 0;
519+}
520+
521+static int vdec_decoder_cmd(struct file *file, void *fh, struct v4l2_decoder_cmd *cmd)
522+{
523+ struct vpu_inst *inst = to_inst(file);
524+ int ret;
525+
526+ ret = v4l2_m2m_ioctl_try_decoder_cmd(file, fh, cmd);
527+ if (ret)
528+ return ret;
529+
530+ vpu_inst_lock(inst);
531+ switch (cmd->cmd) {
532+ case V4L2_DEC_CMD_START:
533+ vdec_cmd_start(inst);
534+ break;
535+ case V4L2_DEC_CMD_STOP:
536+ vdec_cmd_stop(inst);
537+ break;
538+ default:
539+ break;
540+ }
541+ vpu_inst_unlock(inst);
542+
543+ return 0;
544+}
545+
546+static int vdec_subscribe_event(struct v4l2_fh *fh, const struct v4l2_event_subscription *sub)
547+{
548+ switch (sub->type) {
549+ case V4L2_EVENT_EOS:
550+ return v4l2_event_subscribe(fh, sub, 0, NULL);
551+ case V4L2_EVENT_SOURCE_CHANGE:
552+ return v4l2_src_change_event_subscribe(fh, sub);
553+ case V4L2_EVENT_CTRL:
554+ return v4l2_ctrl_subscribe_event(fh, sub);
555+ default:
556+ return -EINVAL;
557+ }
558+
559+ return 0;
560+}
561+
562+static const struct v4l2_ioctl_ops vdec_ioctl_ops = {
563+ .vidioc_querycap = vdec_querycap,
564+ .vidioc_enum_fmt_vid_cap = vdec_enum_fmt,
565+ .vidioc_enum_fmt_vid_out = vdec_enum_fmt,
566+ .vidioc_g_fmt_vid_cap_mplane = vdec_g_fmt,
567+ .vidioc_g_fmt_vid_out_mplane = vdec_g_fmt,
568+ .vidioc_try_fmt_vid_cap_mplane = vdec_try_fmt,
569+ .vidioc_try_fmt_vid_out_mplane = vdec_try_fmt,
570+ .vidioc_s_fmt_vid_cap_mplane = vdec_s_fmt,
571+ .vidioc_s_fmt_vid_out_mplane = vdec_s_fmt,
572+ .vidioc_g_selection = vdec_g_selection,
573+ .vidioc_try_decoder_cmd = v4l2_m2m_ioctl_try_decoder_cmd,
574+ .vidioc_decoder_cmd = vdec_decoder_cmd,
575+ .vidioc_subscribe_event = vdec_subscribe_event,
576+ .vidioc_unsubscribe_event = v4l2_event_unsubscribe,
577+ .vidioc_reqbufs = v4l2_m2m_ioctl_reqbufs,
578+ .vidioc_create_bufs = v4l2_m2m_ioctl_create_bufs,
579+ .vidioc_prepare_buf = v4l2_m2m_ioctl_prepare_buf,
580+ .vidioc_querybuf = v4l2_m2m_ioctl_querybuf,
581+ .vidioc_qbuf = v4l2_m2m_ioctl_qbuf,
582+ .vidioc_expbuf = v4l2_m2m_ioctl_expbuf,
583+ .vidioc_dqbuf = v4l2_m2m_ioctl_dqbuf,
584+ .vidioc_streamon = v4l2_m2m_ioctl_streamon,
585+ .vidioc_streamoff = v4l2_m2m_ioctl_streamoff,
586+};
587+
588+static bool vdec_check_ready(struct vpu_inst *inst, unsigned int type)
589+{
590+ struct vdec_t *vdec = inst->priv;
591+
592+ if (V4L2_TYPE_IS_OUTPUT(type)) {
593+ if (vdec->ts_pre_count >= vdec->frame_depth)
594+ return false;
595+ return true;
596+ }
597+
598+ if (vdec->req_frame_count)
599+ return true;
600+
601+ return false;
602+}
603+
604+static int vdec_frame_decoded(struct vpu_inst *inst, void *arg)
605+{
606+ struct vdec_t *vdec = inst->priv;
607+ struct vpu_dec_pic_info *info = arg;
608+ struct vpu_vb2_buffer *vpu_buf;
609+ struct vb2_v4l2_buffer *vbuf;
610+ int ret = 0;
611+
612+ if (!info || info->id >= ARRAY_SIZE(vdec->slots))
613+ return -EINVAL;
614+
615+ vpu_inst_lock(inst);
616+ vpu_buf = vdec->slots[info->id];
617+ if (!vpu_buf) {
618+ dev_err(inst->dev, "[%d] decoded invalid frame[%d]\n", inst->id, info->id);
619+ ret = -EINVAL;
620+ goto exit;
621+ }
622+ vbuf = &vpu_buf->m2m_buf.vb;
623+ if (vpu_get_buffer_state(vbuf) == VPU_BUF_STATE_DECODED)
624+ dev_info(inst->dev, "[%d] buf[%d] has been decoded\n", inst->id, info->id);
625+ vpu_set_buffer_state(vbuf, VPU_BUF_STATE_DECODED);
626+ vdec->decoded_frame_count++;
627+ if (vdec->ts_pre_count >= info->consumed_count)
628+ vdec->ts_pre_count -= info->consumed_count;
629+ else
630+ vdec->ts_pre_count = 0;
631+exit:
632+ vpu_inst_unlock(inst);
633+
634+ return ret;
635+}
636+
637+static struct vpu_vb2_buffer *vdec_find_buffer(struct vpu_inst *inst, u32 luma)
638+{
639+ struct vdec_t *vdec = inst->priv;
640+ int i;
641+
642+ for (i = 0; i < ARRAY_SIZE(vdec->slots); i++) {
643+ if (!vdec->slots[i])
644+ continue;
645+ if (luma == vdec->slots[i]->luma)
646+ return vdec->slots[i];
647+ }
648+
649+ return NULL;
650+}
651+
652+static void vdec_buf_done(struct vpu_inst *inst, struct vpu_frame_info *frame)
653+{
654+ struct vdec_t *vdec = inst->priv;
655+ struct vpu_vb2_buffer *vpu_buf;
656+ struct vb2_v4l2_buffer *vbuf;
657+ u32 sequence;
658+
659+ if (!frame)
660+ return;
661+
662+ vpu_inst_lock(inst);
663+ sequence = vdec->sequence++;
664+ vpu_buf = vdec_find_buffer(inst, frame->luma);
665+ vpu_inst_unlock(inst);
666+ if (!vpu_buf) {
667+ dev_err(inst->dev, "[%d] can't find buffer, id = %d, addr = 0x%x\n",
668+ inst->id, frame->id, frame->luma);
669+ return;
670+ }
671+ if (frame->skipped) {
672+ dev_dbg(inst->dev, "[%d] frame skip\n", inst->id);
673+ return;
674+ }
675+
676+ vbuf = &vpu_buf->m2m_buf.vb;
677+ if (vbuf->vb2_buf.index != frame->id)
678+ dev_err(inst->dev, "[%d] buffer id(%d, %d) dismatch\n",
679+ inst->id, vbuf->vb2_buf.index, frame->id);
680+
681+ if (vpu_get_buffer_state(vbuf) != VPU_BUF_STATE_DECODED)
682+ dev_err(inst->dev, "[%d] buffer(%d) ready without decoded\n", inst->id, frame->id);
683+ vpu_set_buffer_state(vbuf, VPU_BUF_STATE_READY);
684+ vb2_set_plane_payload(&vbuf->vb2_buf, 0, inst->cap_format.sizeimage[0]);
685+ vb2_set_plane_payload(&vbuf->vb2_buf, 1, inst->cap_format.sizeimage[1]);
686+ vbuf->vb2_buf.timestamp = frame->timestamp;
687+ vbuf->field = inst->cap_format.field;
688+ vbuf->sequence = sequence;
689+ dev_dbg(inst->dev, "[%d][OUTPUT TS]%32lld\n", inst->id, frame->timestamp);
690+
691+ v4l2_m2m_buf_done(vbuf, VB2_BUF_STATE_DONE);
692+ vpu_inst_lock(inst);
693+ vdec->display_frame_count++;
694+ vpu_inst_unlock(inst);
695+ dev_dbg(inst->dev, "[%d] decoded : %d, display : %d, sequence : %d\n",
696+ inst->id, vdec->decoded_frame_count, vdec->display_frame_count, vdec->sequence);
697+}
698+
699+static void vdec_stop_done(struct vpu_inst *inst)
700+{
701+ struct vdec_t *vdec = inst->priv;
702+
703+ vpu_inst_lock(inst);
704+ vdec_update_state(inst, VPU_CODEC_STATE_DEINIT, 0);
705+ vdec->seq_hdr_found = 0;
706+ vdec->req_frame_count = 0;
707+ vdec->reset_codec = false;
708+ vdec->fixed_fmt = false;
709+ vdec->params.end_flag = 0;
710+ vdec->drain = 0;
711+ vdec->ts_pre_count = 0;
712+ vdec->params.frame_count = 0;
713+ vdec->decoded_frame_count = 0;
714+ vdec->display_frame_count = 0;
715+ vdec->sequence = 0;
716+ vdec->eos_received = 0;
717+ vdec->is_source_changed = false;
718+ vdec->source_change = 0;
719+ vpu_inst_unlock(inst);
720+}
721+
722+static bool vdec_check_source_change(struct vpu_inst *inst)
723+{
724+ struct vdec_t *vdec = inst->priv;
725+ const struct vpu_format *fmt;
726+ int i;
727+
728+ if (!inst->fh.m2m_ctx)
729+ return false;
730+
731+ if (!vb2_is_streaming(v4l2_m2m_get_dst_vq(inst->fh.m2m_ctx)))
732+ return true;
733+ fmt = vpu_helper_find_format(inst, inst->cap_format.type, vdec->codec_info.pixfmt);
734+ if (inst->cap_format.pixfmt != vdec->codec_info.pixfmt)
735+ return true;
736+ if (inst->cap_format.width != vdec->codec_info.decoded_width)
737+ return true;
738+ if (inst->cap_format.height != vdec->codec_info.decoded_height)
739+ return true;
740+ if (vpu_get_num_buffers(inst, inst->cap_format.type) < inst->min_buffer_cap)
741+ return true;
742+ if (inst->crop.left != vdec->codec_info.offset_x)
743+ return true;
744+ if (inst->crop.top != vdec->codec_info.offset_y)
745+ return true;
746+ if (inst->crop.width != vdec->codec_info.width)
747+ return true;
748+ if (inst->crop.height != vdec->codec_info.height)
749+ return true;
750+ if (fmt && inst->cap_format.num_planes != fmt->num_planes)
751+ return true;
752+ for (i = 0; i < inst->cap_format.num_planes; i++) {
753+ if (inst->cap_format.bytesperline[i] != vdec->codec_info.bytesperline[i])
754+ return true;
755+ if (inst->cap_format.sizeimage[i] != vdec->codec_info.sizeimage[i])
756+ return true;
757+ }
758+
759+ return false;
760+}
761+
762+static void vdec_init_fmt(struct vpu_inst *inst)
763+{
764+ struct vdec_t *vdec = inst->priv;
765+ const struct vpu_format *fmt;
766+ int i;
767+
768+ fmt = vpu_helper_find_format(inst, inst->cap_format.type, vdec->codec_info.pixfmt);
769+ inst->out_format.width = vdec->codec_info.width;
770+ inst->out_format.height = vdec->codec_info.height;
771+ inst->cap_format.width = vdec->codec_info.decoded_width;
772+ inst->cap_format.height = vdec->codec_info.decoded_height;
773+ inst->cap_format.pixfmt = vdec->codec_info.pixfmt;
774+ if (fmt) {
775+ inst->cap_format.num_planes = fmt->num_planes;
776+ inst->cap_format.flags = fmt->flags;
777+ }
778+ for (i = 0; i < inst->cap_format.num_planes; i++) {
779+ inst->cap_format.bytesperline[i] = vdec->codec_info.bytesperline[i];
780+ inst->cap_format.sizeimage[i] = vdec->codec_info.sizeimage[i];
781+ }
782+ if (vdec->codec_info.progressive)
783+ inst->cap_format.field = V4L2_FIELD_NONE;
784+ else

872 more lines aren’t shown here.

drivers/media/platform/amphion/venc.c+1358−0

This diff is large: its 1359 lines aren’t shown here.

drivers/media/platform/amphion/vpu.h+362−0

This diff is large: its 363 lines aren’t shown here.

drivers/media/platform/amphion/vpu_cmds.c+433−0

This diff is large: its 434 lines aren’t shown here.

drivers/media/platform/amphion/vpu_cmds.h+25−0

This diff is large: its 26 lines aren’t shown here.

drivers/media/platform/amphion/vpu_codec.h+68−0

This diff is large: its 69 lines aren’t shown here.

drivers/media/platform/amphion/vpu_color.c+183−0

This diff is large: its 184 lines aren’t shown here.

drivers/media/platform/amphion/vpu_core.c+879−0

This diff is large: its 880 lines aren’t shown here.

drivers/media/platform/amphion/vpu_core.h+15−0

This diff is large: its 16 lines aren’t shown here.

drivers/media/platform/amphion/vpu_dbg.c+494−0

This diff is large: its 495 lines aren’t shown here.

drivers/media/platform/amphion/vpu_defs.h+187−0

This diff is large: its 188 lines aren’t shown here.

drivers/media/platform/amphion/vpu_drv.c+261−0

This diff is large: its 262 lines aren’t shown here.

drivers/media/platform/amphion/vpu_helpers.c+414−0

This diff is large: its 415 lines aren’t shown here.

drivers/media/platform/amphion/vpu_helpers.h+71−0

This diff is large: its 72 lines aren’t shown here.

drivers/media/platform/amphion/vpu_imx8q.c+271−0

This diff is large: its 272 lines aren’t shown here.

drivers/media/platform/amphion/vpu_imx8q.h+115−0

This diff is large: its 116 lines aren’t shown here.

drivers/media/platform/amphion/vpu_malone.c+1644−0

This diff is large: its 1645 lines aren’t shown here.

drivers/media/platform/amphion/vpu_malone.h+44−0

This diff is large: its 45 lines aren’t shown here.

drivers/media/platform/amphion/vpu_mbox.c+118−0

This diff is large: its 119 lines aren’t shown here.

drivers/media/platform/amphion/vpu_mbox.h+16−0

This diff is large: its 17 lines aren’t shown here.

drivers/media/platform/amphion/vpu_msgs.c+385−0

This diff is large: its 386 lines aren’t shown here.

drivers/media/platform/amphion/vpu_msgs.h+14−0

This diff is large: its 15 lines aren’t shown here.

drivers/media/platform/amphion/vpu_rpc.c+259−0

This diff is large: its 260 lines aren’t shown here.

drivers/media/platform/amphion/vpu_rpc.h+461−0

This diff is large: its 462 lines aren’t shown here.

drivers/media/platform/amphion/vpu_v4l2.c+713−0

This diff is large: its 714 lines aren’t shown here.

drivers/media/platform/amphion/vpu_v4l2.h+55−0

This diff is large: its 56 lines aren’t shown here.

drivers/media/platform/amphion/vpu_windsor.c+1173−0

This diff is large: its 1174 lines aren’t shown here.

drivers/media/platform/amphion/vpu_windsor.h+37−0

This diff is large: its 38 lines aren’t shown here.

drivers/media/platform/aspeed/Kconfig+13−0

This diff is large: its 14 lines aren’t shown here.

drivers/media/platform/aspeed/Makefile+2−0

This diff is large: its 3 lines aren’t shown here.

drivers/media/platform/aspeed/aspeed-video.crenamed from drivers/media/platform/aspeed-video.c+236−65

This diff is large: its 618 lines aren’t shown here.

drivers/media/platform/atmel/Kconfig+25−3

This diff is large: its 52 lines aren’t shown here.

drivers/media/platform/atmel/Makefile+3−1

This diff is large: its 12 lines aren’t shown here.

drivers/media/platform/atmel/atmel-isc-base.c+50−347

This diff is large: its 574 lines aren’t shown here.

drivers/media/platform/atmel/atmel-isc-clk.c+311−0

This diff is large: its 312 lines aren’t shown here.

drivers/media/platform/atmel/atmel-isc.h+11−0

This diff is large: its 32 lines aren’t shown here.

drivers/media/platform/atmel/atmel-sama5d2-isc.c+24−0

This diff is large: its 31 lines aren’t shown here.

drivers/media/platform/atmel/atmel-sama7g5-isc.c+25−7

This diff is large: its 67 lines aren’t shown here.

drivers/media/platform/atmel/microchip-csi2dc.c+792−0

This diff is large: its 793 lines aren’t shown here.

drivers/media/platform/cadence/Kconfig+3−13

This diff is large: its 36 lines aren’t shown here.

drivers/media/platform/chips-media/Kconfig+20−0

This diff is large: its 21 lines aren’t shown here.

drivers/media/platform/chips-media/Makefilerenamed from drivers/media/platform/coda/Makefile+0−0

File renamed without changes.

drivers/media/platform/chips-media/coda-bit.crenamed from drivers/media/platform/coda/coda-bit.c+0−0

File renamed without changes.

drivers/media/platform/chips-media/coda-common.crenamed from drivers/media/platform/coda/coda-common.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/media/platform/chips-media/coda-gdi.crenamed from drivers/media/platform/coda/coda-gdi.c+0−0

File renamed without changes.

drivers/media/platform/chips-media/coda-h264.crenamed from drivers/media/platform/coda/coda-h264.c+0−0

File renamed without changes.

drivers/media/platform/chips-media/coda-jpeg.crenamed from drivers/media/platform/coda/coda-jpeg.c+0−0

File renamed without changes.

drivers/media/platform/chips-media/coda-mpeg2.crenamed from drivers/media/platform/coda/coda-mpeg2.c+0−0

File renamed without changes.

drivers/media/platform/chips-media/coda-mpeg4.crenamed from drivers/media/platform/coda/coda-mpeg4.c+0−0

File renamed without changes.

drivers/media/platform/chips-media/coda.hrenamed from drivers/media/platform/coda/coda.h+0−0

File renamed without changes.

drivers/media/platform/chips-media/coda_regs.hrenamed from drivers/media/platform/coda/coda_regs.h+1−1

This diff is large: its 8 lines aren’t shown here.

drivers/media/platform/chips-media/imx-vdoa.crenamed from drivers/media/platform/coda/imx-vdoa.c+4−5

This diff is large: its 23 lines aren’t shown here.

drivers/media/platform/chips-media/imx-vdoa.hrenamed from drivers/media/platform/coda/imx-vdoa.h+0−0

File renamed without changes.

drivers/media/platform/chips-media/trace.hrenamed from drivers/media/platform/coda/trace.h+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/platform/intel/Kconfig+14−0

This diff is large: its 15 lines aren’t shown here.

drivers/media/platform/intel/Makefile+2−0

This diff is large: its 3 lines aren’t shown here.

drivers/media/platform/intel/pxa_camera.crenamed from drivers/media/platform/pxa_camera.c+11−10

This diff is large: its 51 lines aren’t shown here.

drivers/media/platform/marvell/Kconfigrenamed from drivers/media/platform/marvell-ccic/Kconfig+7−2

This diff is large: its 23 lines aren’t shown here.

drivers/media/platform/marvell/Makefilerenamed from drivers/media/platform/marvell-ccic/Makefile+0−0

File renamed without changes.

drivers/media/platform/marvell/cafe-driver.crenamed from drivers/media/platform/marvell-ccic/cafe-driver.c+0−0

File renamed without changes.

drivers/media/platform/marvell/mcam-core.crenamed from drivers/media/platform/marvell-ccic/mcam-core.c+0−0

File renamed without changes.

drivers/media/platform/marvell/mcam-core.hrenamed from drivers/media/platform/marvell-ccic/mcam-core.h+0−0

File renamed without changes.

drivers/media/platform/marvell/mmp-driver.crenamed from drivers/media/platform/marvell-ccic/mmp-driver.c+3−5

This diff is large: its 16 lines aren’t shown here.

drivers/media/platform/mediatek/Kconfig+8−0

This diff is large: its 9 lines aren’t shown here.

drivers/media/platform/mediatek/Makefile+5−0

This diff is large: its 6 lines aren’t shown here.

drivers/media/platform/mediatek/jpeg/Kconfig+16−0

This diff is large: its 17 lines aren’t shown here.

drivers/media/platform/mediatek/jpeg/Makefilerenamed from drivers/media/platform/mtk-jpeg/Makefile+0−0

File renamed without changes.

drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.crenamed from drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c+3−44

This diff is large: its 110 lines aren’t shown here.

drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.hrenamed from drivers/media/platform/mtk-jpeg/mtk_jpeg_core.h+0−2

This diff is large: its 16 lines aren’t shown here.

drivers/media/platform/mediatek/jpeg/mtk_jpeg_dec_hw.crenamed from drivers/media/platform/mtk-jpeg/mtk_jpeg_dec_hw.c+0−0

File renamed without changes.

drivers/media/platform/mediatek/jpeg/mtk_jpeg_dec_hw.hrenamed from drivers/media/platform/mtk-jpeg/mtk_jpeg_dec_hw.h+0−0

File renamed without changes.

drivers/media/platform/mediatek/jpeg/mtk_jpeg_dec_parse.crenamed from drivers/media/platform/mtk-jpeg/mtk_jpeg_dec_parse.c+0−0

File renamed without changes.

drivers/media/platform/mediatek/jpeg/mtk_jpeg_dec_parse.hrenamed from drivers/media/platform/mtk-jpeg/mtk_jpeg_dec_parse.h+0−0

File renamed without changes.

drivers/media/platform/mediatek/jpeg/mtk_jpeg_dec_reg.hrenamed from drivers/media/platform/mtk-jpeg/mtk_jpeg_dec_reg.h+0−0

File renamed without changes.

drivers/media/platform/mediatek/jpeg/mtk_jpeg_enc_hw.crenamed from drivers/media/platform/mtk-jpeg/mtk_jpeg_enc_hw.c+0−0

File renamed without changes.

drivers/media/platform/mediatek/jpeg/mtk_jpeg_enc_hw.hrenamed from drivers/media/platform/mtk-jpeg/mtk_jpeg_enc_hw.h+0−0

File renamed without changes.

drivers/media/platform/mediatek/mdp/Kconfig+17−0

This diff is large: its 18 lines aren’t shown here.

drivers/media/platform/mediatek/mdp/Makefilerenamed from drivers/media/platform/mtk-mdp/Makefile+1−1

This diff is large: its 6 lines aren’t shown here.

drivers/media/platform/mediatek/mdp/mtk_mdp_comp.crenamed from drivers/media/platform/mtk-mdp/mtk_mdp_comp.c+0−40

This diff is large: its 74 lines aren’t shown here.

drivers/media/platform/mediatek/mdp/mtk_mdp_comp.hrenamed from drivers/media/platform/mtk-mdp/mtk_mdp_comp.h+0−2

This diff is large: its 15 lines aren’t shown here.

drivers/media/platform/mediatek/mdp/mtk_mdp_core.crenamed from drivers/media/platform/mtk-mdp/mtk_mdp_core.c+0−3

This diff is large: its 19 lines aren’t shown here.

drivers/media/platform/mediatek/mdp/mtk_mdp_core.hrenamed from drivers/media/platform/mtk-mdp/mtk_mdp_core.h+0−0

File renamed without changes.

drivers/media/platform/mediatek/mdp/mtk_mdp_ipi.hrenamed from drivers/media/platform/mtk-mdp/mtk_mdp_ipi.h+0−0

File renamed without changes.

drivers/media/platform/mediatek/mdp/mtk_mdp_m2m.crenamed from drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c+0−0

File renamed without changes.

drivers/media/platform/mediatek/mdp/mtk_mdp_m2m.hrenamed from drivers/media/platform/mtk-mdp/mtk_mdp_m2m.h+0−0

File renamed without changes.

drivers/media/platform/mediatek/mdp/mtk_mdp_regs.crenamed from drivers/media/platform/mtk-mdp/mtk_mdp_regs.c+0−0

File renamed without changes.

drivers/media/platform/mediatek/mdp/mtk_mdp_regs.hrenamed from drivers/media/platform/mtk-mdp/mtk_mdp_regs.h+0−0

File renamed without changes.

drivers/media/platform/mediatek/mdp/mtk_mdp_vpu.crenamed from drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c+0−0

File renamed without changes.

drivers/media/platform/mediatek/mdp/mtk_mdp_vpu.hrenamed from drivers/media/platform/mtk-mdp/mtk_mdp_vpu.h+0−0

File renamed without changes.

drivers/media/platform/mediatek/vcodec/Kconfig+36−0

This diff is large: its 37 lines aren’t shown here.

drivers/media/platform/mediatek/vcodec/Makefilerenamed from drivers/media/platform/mtk-vcodec/Makefile+5−1

This diff is large: its 25 lines aren’t shown here.

drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.crenamed from drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c+2−2

This diff is large: its 15 lines aren’t shown here.

drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.hrenamed from drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.crenamed from drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c+141−58

This diff is large: its 352 lines aren’t shown here.

drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c+200−0

This diff is large: its 201 lines aren’t shown here.

drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.h+56−0

This diff is large: its 57 lines aren’t shown here.

drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_pm.c+169−0

This diff is large: its 170 lines aren’t shown here.

drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_pm.h+19−0

This diff is large: its 20 lines aren’t shown here.

drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateful.crenamed from drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateful.c+2−0

This diff is large: its 7 lines aren’t shown here.

drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateless.crenamed from drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c+21−0

This diff is large: its 26 lines aren’t shown here.

drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.hrenamed from drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h+69−8

This diff is large: its 177 lines aren’t shown here.

drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.crenamed from drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c+0−1

This diff is large: its 8 lines aren’t shown here.

drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.hrenamed from drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.h+0−0

File renamed without changes.

drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.crenamed from drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c+7−15

This diff is large: its 81 lines aren’t shown here.

drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_pm.crenamed from drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_pm.c+7−48

This diff is large: its 119 lines aren’t shown here.

drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_pm.hrenamed from drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_pm.h+1−2

This diff is large: its 10 lines aren’t shown here.

drivers/media/platform/mediatek/vcodec/mtk_vcodec_fw.crenamed from drivers/media/platform/mtk-vcodec/mtk_vcodec_fw.c+0−0

File renamed without changes.

drivers/media/platform/mediatek/vcodec/mtk_vcodec_fw.hrenamed from drivers/media/platform/mtk-vcodec/mtk_vcodec_fw.h+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/platform/mediatek/vcodec/mtk_vcodec_fw_priv.hrenamed from drivers/media/platform/mtk-vcodec/mtk_vcodec_fw_priv.h+0−0

File renamed without changes.

drivers/media/platform/mediatek/vcodec/mtk_vcodec_fw_scp.crenamed from drivers/media/platform/mtk-vcodec/mtk_vcodec_fw_scp.c+0−0

File renamed without changes.

drivers/media/platform/mediatek/vcodec/mtk_vcodec_fw_vpu.crenamed from drivers/media/platform/mtk-vcodec/mtk_vcodec_fw_vpu.c+2−0

This diff is large: its 9 lines aren’t shown here.

drivers/media/platform/mediatek/vcodec/mtk_vcodec_intr.c+43−0

This diff is large: its 44 lines aren’t shown here.

drivers/media/platform/mediatek/vcodec/mtk_vcodec_intr.hrenamed from drivers/media/platform/mtk-vcodec/mtk_vcodec_intr.h+3−2

This diff is large: its 11 lines aren’t shown here.

drivers/media/platform/mediatek/vcodec/mtk_vcodec_util.crenamed from drivers/media/platform/mtk-vcodec/mtk_vcodec_util.c+48−11

This diff is large: its 82 lines aren’t shown here.

drivers/media/platform/mediatek/vcodec/mtk_vcodec_util.hrenamed from drivers/media/platform/mtk-vcodec/mtk_vcodec_util.h+5−3

This diff is large: its 14 lines aren’t shown here.

drivers/media/platform/mediatek/vcodec/vdec/vdec_h264_if.crenamed from drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/platform/mediatek/vcodec/vdec/vdec_h264_req_if.crenamed from drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_if.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/platform/mediatek/vcodec/vdec/vdec_vp8_if.crenamed from drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/platform/mediatek/vcodec/vdec/vdec_vp9_if.crenamed from drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/platform/mediatek/vcodec/vdec_drv_base.hrenamed from drivers/media/platform/mtk-vcodec/vdec_drv_base.h+0−0

File renamed without changes.

drivers/media/platform/mediatek/vcodec/vdec_drv_if.crenamed from drivers/media/platform/mtk-vcodec/vdec_drv_if.c+11−10

This diff is large: its 57 lines aren’t shown here.

drivers/media/platform/mediatek/vcodec/vdec_drv_if.hrenamed from drivers/media/platform/mtk-vcodec/vdec_drv_if.h+0−0

File renamed without changes.

drivers/media/platform/mediatek/vcodec/vdec_ipi_msg.hrenamed from drivers/media/platform/mtk-vcodec/vdec_ipi_msg.h+12−4

This diff is large: its 68 lines aren’t shown here.

drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c+290−0

This diff is large: its 291 lines aren’t shown here.

drivers/media/platform/mediatek/vcodec/vdec_msg_queue.h+153−0

This diff is large: its 154 lines aren’t shown here.

drivers/media/platform/mediatek/vcodec/vdec_vpu_if.crenamed from drivers/media/platform/mtk-vcodec/vdec_vpu_if.c+41−5

This diff is large: its 107 lines aren’t shown here.

drivers/media/platform/mediatek/vcodec/vdec_vpu_if.hrenamed from drivers/media/platform/mtk-vcodec/vdec_vpu_if.h+22−0

This diff is large: its 51 lines aren’t shown here.

drivers/media/platform/mediatek/vcodec/venc/venc_h264_if.crenamed from drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/platform/mediatek/vcodec/venc/venc_vp8_if.crenamed from drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/platform/mediatek/vcodec/venc_drv_base.hrenamed from drivers/media/platform/mtk-vcodec/venc_drv_base.h+0−0

File renamed without changes.

drivers/media/platform/mediatek/vcodec/venc_drv_if.crenamed from drivers/media/platform/mtk-vcodec/venc_drv_if.c+0−0

File renamed without changes.

drivers/media/platform/mediatek/vcodec/venc_drv_if.hrenamed from drivers/media/platform/mtk-vcodec/venc_drv_if.h+0−0

File renamed without changes.

drivers/media/platform/mediatek/vcodec/venc_ipi_msg.hrenamed from drivers/media/platform/mtk-vcodec/venc_ipi_msg.h+0−0

File renamed without changes.

drivers/media/platform/mediatek/vcodec/venc_vpu_if.crenamed from drivers/media/platform/mtk-vcodec/venc_vpu_if.c+0−0

File renamed without changes.

drivers/media/platform/mediatek/vcodec/venc_vpu_if.hrenamed from drivers/media/platform/mtk-vcodec/venc_vpu_if.h+0−0

File renamed without changes.

drivers/media/platform/mediatek/vpu/Kconfig+15−0

This diff is large: its 16 lines aren’t shown here.

drivers/media/platform/mediatek/vpu/Makefilerenamed from drivers/media/platform/mtk-vpu/Makefile+0−0

File renamed without changes.

drivers/media/platform/mediatek/vpu/mtk_vpu.crenamed from drivers/media/platform/mtk-vpu/mtk_vpu.c+3−7

This diff is large: its 25 lines aren’t shown here.

drivers/media/platform/mediatek/vpu/mtk_vpu.hrenamed from drivers/media/platform/mtk-vpu/mtk_vpu.h+0−0

File renamed without changes.

drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c+0−145

This diff is large: its 146 lines aren’t shown here.

drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.h+0−20

This diff is large: its 21 lines aren’t shown here.

drivers/media/platform/mtk-vcodec/mtk_vcodec_intr.c+0−45

This diff is large: its 46 lines aren’t shown here.

drivers/media/platform/nvidia/Kconfig+5−0

This diff is large: its 6 lines aren’t shown here.

drivers/media/platform/nvidia/Makefile+3−0

This diff is large: its 4 lines aren’t shown here.

drivers/media/platform/nvidia/tegra-vde/Kconfig+17−0

This diff is large: its 18 lines aren’t shown here.

drivers/media/platform/nvidia/tegra-vde/Makefile+3−0

This diff is large: its 4 lines aren’t shown here.

drivers/media/platform/nvidia/tegra-vde/dmabuf-cache.crenamed from drivers/staging/media/tegra-vde/dmabuf-cache.c+1−1

This diff is large: its 11 lines aren’t shown here.

drivers/media/platform/nvidia/tegra-vde/h264.c+946−0

This diff is large: its 947 lines aren’t shown here.

drivers/media/platform/nvidia/tegra-vde/iommu.crenamed from drivers/staging/media/tegra-vde/iommu.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/platform/nvidia/tegra-vde/trace.hrenamed from drivers/staging/media/tegra-vde/trace.h+1−1

This diff is large: its 8 lines aren’t shown here.

drivers/media/platform/nvidia/tegra-vde/v4l2.c+1018−0

This diff is large: its 1019 lines aren’t shown here.

drivers/media/platform/nvidia/tegra-vde/vde.c+551−0

This diff is large: its 552 lines aren’t shown here.

drivers/media/platform/nvidia/tegra-vde/vde.h+242−0

This diff is large: its 243 lines aren’t shown here.

drivers/media/platform/nxp/Kconfig+55−0

This diff is large: its 56 lines aren’t shown here.

drivers/media/platform/nxp/Makefile+8−0

This diff is large: its 9 lines aren’t shown here.

drivers/media/platform/nxp/fsl-viu.crenamed from drivers/media/platform/fsl-viu.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/platform/nxp/imx-jpeg/Kconfigrenamed from drivers/media/platform/imx-jpeg/Kconfig+2−1

This diff is large: its 11 lines aren’t shown here.

drivers/media/platform/nxp/imx-jpeg/Makefilerenamed from drivers/media/platform/imx-jpeg/Makefile+0−0

File renamed without changes.

drivers/media/platform/nxp/imx-jpeg/mxc-jpeg-hw.crenamed from drivers/media/platform/imx-jpeg/mxc-jpeg-hw.c+0−0

File renamed without changes.

drivers/media/platform/nxp/imx-jpeg/mxc-jpeg-hw.hrenamed from drivers/media/platform/imx-jpeg/mxc-jpeg-hw.h+0−0

File renamed without changes.

drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.crenamed from drivers/media/platform/imx-jpeg/mxc-jpeg.c+52−11

This diff is large: its 181 lines aren’t shown here.

drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.hrenamed from drivers/media/platform/imx-jpeg/mxc-jpeg.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/media/platform/nxp/imx-mipi-csis.crenamed from drivers/staging/media/imx/imx7-mipi-csis.c+105−18

This diff is large: its 363 lines aren’t shown here.

drivers/media/platform/nxp/imx-pxp.crenamed from drivers/media/platform/imx-pxp.c+0−0

File renamed without changes.

drivers/media/platform/nxp/imx-pxp.hrenamed from drivers/media/platform/imx-pxp.h+0−0

File renamed without changes.

drivers/media/platform/nxp/mx2_emmaprp.crenamed from drivers/media/platform/mx2_emmaprp.c+0−0

File renamed without changes.

drivers/media/platform/qcom/Kconfig+6−0

This diff is large: its 7 lines aren’t shown here.

drivers/media/platform/qcom/Makefile+3−0

This diff is large: its 4 lines aren’t shown here.

drivers/media/platform/qcom/camss/Kconfig+9−0

This diff is large: its 10 lines aren’t shown here.

drivers/media/platform/qcom/camss/Makefile+2−1

This diff is large: its 17 lines aren’t shown here.

drivers/media/platform/qcom/camss/camss-csid-gen2.crenamed from drivers/media/platform/qcom/camss/camss-csid-170.c+20−14

This diff is large: its 92 lines aren’t shown here.

drivers/media/platform/qcom/camss/camss-csid.c+67−24

This diff is large: its 174 lines aren’t shown here.

drivers/media/platform/qcom/camss/camss-csid.h+3−2

This diff is large: its 19 lines aren’t shown here.

drivers/media/platform/qcom/camss/camss-csiphy-2ph-1-0.c+17−2

This diff is large: its 54 lines aren’t shown here.

drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c+157−42

This diff is large: its 271 lines aren’t shown here.

drivers/media/platform/qcom/camss/camss-csiphy.c+12−30

This diff is large: its 92 lines aren’t shown here.

drivers/media/platform/qcom/camss/camss-csiphy.h+7−0

This diff is large: its 14 lines aren’t shown here.

drivers/media/platform/qcom/camss/camss-ispif.c+4−8

This diff is large: its 27 lines aren’t shown here.

drivers/media/platform/qcom/camss/camss-vfe-170.c+1−11

This diff is large: its 19 lines aren’t shown here.

drivers/media/platform/qcom/camss/camss-vfe-480.c+564−0

This diff is large: its 565 lines aren’t shown here.

drivers/media/platform/qcom/camss/camss-vfe.c+15−14

This diff is large: its 90 lines aren’t shown here.

drivers/media/platform/qcom/camss/camss-vfe.h+4−0

This diff is large: its 10 lines aren’t shown here.

drivers/media/platform/qcom/camss/camss-video.c+4−1

This diff is large: its 19 lines aren’t shown here.

drivers/media/platform/qcom/camss/camss.c+322−46

This diff is large: its 695 lines aren’t shown here.

drivers/media/platform/qcom/camss/camss.h+19−1

This diff is large: its 48 lines aren’t shown here.

drivers/media/platform/qcom/venus/Kconfig+14−0

This diff is large: its 15 lines aren’t shown here.

drivers/media/platform/qcom/venus/core.h+4−0

This diff is large: its 25 lines aren’t shown here.

drivers/media/platform/qcom/venus/helpers.c+1−1

This diff is large: its 16 lines aren’t shown here.

drivers/media/platform/qcom/venus/hfi_cmds.c+2−0

This diff is large: its 9 lines aren’t shown here.

drivers/media/platform/qcom/venus/venc.c+2−2

This diff is large: its 11 lines aren’t shown here.

drivers/media/platform/qcom/venus/venc_ctrls.c+3−3

This diff is large: its 20 lines aren’t shown here.

drivers/media/platform/renesas/Kconfig+121−0

This diff is large: its 122 lines aren’t shown here.

drivers/media/platform/renesas/Makefile+15−0

This diff is large: its 16 lines aren’t shown here.

drivers/media/platform/renesas/rcar-fcp.crenamed from drivers/media/platform/rcar-fcp.c+0−0

File renamed without changes.

drivers/media/platform/renesas/rcar-isp.crenamed from drivers/media/platform/rcar-isp.c+26−6

This diff is large: its 46 lines aren’t shown here.

drivers/media/platform/renesas/rcar-vin/Kconfigrenamed from drivers/media/platform/rcar-vin/Kconfig+4−2

This diff is large: its 20 lines aren’t shown here.

drivers/media/platform/renesas/rcar-vin/Makefilerenamed from drivers/media/platform/rcar-vin/Makefile+0−0

File renamed without changes.

drivers/media/platform/renesas/rcar-vin/rcar-core.crenamed from drivers/media/platform/rcar-vin/rcar-core.c+113−276

This diff is large: its 512 lines aren’t shown here.

drivers/media/platform/renesas/rcar-vin/rcar-csi2.crenamed from drivers/media/platform/rcar-vin/rcar-csi2.c+105−27

This diff is large: its 201 lines aren’t shown here.

drivers/media/platform/renesas/rcar-vin/rcar-dma.crenamed from drivers/media/platform/rcar-vin/rcar-dma.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/platform/renesas/rcar-vin/rcar-v4l2.crenamed from drivers/media/platform/rcar-vin/rcar-v4l2.c+0−0

File renamed without changes.

drivers/media/platform/renesas/rcar-vin/rcar-vin.hrenamed from drivers/media/platform/rcar-vin/rcar-vin.h+5−15

This diff is large: its 45 lines aren’t shown here.

drivers/media/platform/renesas/rcar_drif.crenamed from drivers/media/platform/rcar_drif.c+0−0

File renamed without changes.

drivers/media/platform/renesas/rcar_fdp1.crenamed from drivers/media/platform/rcar_fdp1.c+0−0

File renamed without changes.

drivers/media/platform/renesas/rcar_jpu.crenamed from drivers/media/platform/rcar_jpu.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/platform/renesas/renesas-ceu.crenamed from drivers/media/platform/renesas-ceu.c+0−0

File renamed without changes.

drivers/media/platform/renesas/sh_vou.crenamed from drivers/media/platform/sh_vou.c+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/Makefilerenamed from drivers/media/platform/vsp1/Makefile+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1.hrenamed from drivers/media/platform/vsp1/vsp1.h+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_brx.crenamed from drivers/media/platform/vsp1/vsp1_brx.c+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_brx.hrenamed from drivers/media/platform/vsp1/vsp1_brx.h+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_clu.crenamed from drivers/media/platform/vsp1/vsp1_clu.c+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_clu.hrenamed from drivers/media/platform/vsp1/vsp1_clu.h+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_dl.crenamed from drivers/media/platform/vsp1/vsp1_dl.c+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_dl.hrenamed from drivers/media/platform/vsp1/vsp1_dl.h+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_drm.crenamed from drivers/media/platform/vsp1/vsp1_drm.c+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_drm.hrenamed from drivers/media/platform/vsp1/vsp1_drm.h+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_drv.crenamed from drivers/media/platform/vsp1/vsp1_drv.c+33−14

This diff is large: its 90 lines aren’t shown here.

drivers/media/platform/renesas/vsp1/vsp1_entity.crenamed from drivers/media/platform/vsp1/vsp1_entity.c+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_entity.hrenamed from drivers/media/platform/vsp1/vsp1_entity.h+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_hgo.crenamed from drivers/media/platform/vsp1/vsp1_hgo.c+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_hgo.hrenamed from drivers/media/platform/vsp1/vsp1_hgo.h+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_hgt.crenamed from drivers/media/platform/vsp1/vsp1_hgt.c+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_hgt.hrenamed from drivers/media/platform/vsp1/vsp1_hgt.h+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_histo.crenamed from drivers/media/platform/vsp1/vsp1_histo.c+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_histo.hrenamed from drivers/media/platform/vsp1/vsp1_histo.h+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_hsit.crenamed from drivers/media/platform/vsp1/vsp1_hsit.c+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_hsit.hrenamed from drivers/media/platform/vsp1/vsp1_hsit.h+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_lif.crenamed from drivers/media/platform/vsp1/vsp1_lif.c+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_lif.hrenamed from drivers/media/platform/vsp1/vsp1_lif.h+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_lut.crenamed from drivers/media/platform/vsp1/vsp1_lut.c+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_lut.hrenamed from drivers/media/platform/vsp1/vsp1_lut.h+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_pipe.crenamed from drivers/media/platform/vsp1/vsp1_pipe.c+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_pipe.hrenamed from drivers/media/platform/vsp1/vsp1_pipe.h+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_regs.hrenamed from drivers/media/platform/vsp1/vsp1_regs.h+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_rpf.crenamed from drivers/media/platform/vsp1/vsp1_rpf.c+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_rwpf.crenamed from drivers/media/platform/vsp1/vsp1_rwpf.c+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_rwpf.hrenamed from drivers/media/platform/vsp1/vsp1_rwpf.h+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_sru.crenamed from drivers/media/platform/vsp1/vsp1_sru.c+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_sru.hrenamed from drivers/media/platform/vsp1/vsp1_sru.h+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_uds.crenamed from drivers/media/platform/vsp1/vsp1_uds.c+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_uds.hrenamed from drivers/media/platform/vsp1/vsp1_uds.h+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_uif.crenamed from drivers/media/platform/vsp1/vsp1_uif.c+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_uif.hrenamed from drivers/media/platform/vsp1/vsp1_uif.h+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_video.crenamed from drivers/media/platform/vsp1/vsp1_video.c+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_video.hrenamed from drivers/media/platform/vsp1/vsp1_video.h+0−0

File renamed without changes.

drivers/media/platform/renesas/vsp1/vsp1_wpf.crenamed from drivers/media/platform/vsp1/vsp1_wpf.c+0−0

File renamed without changes.

drivers/media/platform/rockchip/Kconfig+6−0

This diff is large: its 7 lines aren’t shown here.

drivers/media/platform/rockchip/Makefile+3−0

This diff is large: its 4 lines aren’t shown here.

drivers/media/platform/rockchip/rga/Kconfig+14−0

This diff is large: its 15 lines aren’t shown here.

drivers/media/platform/rockchip/rkisp1/Kconfig+19−0

This diff is large: its 20 lines aren’t shown here.

drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c+21−7

This diff is large: its 42 lines aren’t shown here.

drivers/media/platform/samsung/Kconfig+10−0

This diff is large: its 11 lines aren’t shown here.

drivers/media/platform/samsung/Makefile+7−0

This diff is large: its 8 lines aren’t shown here.

drivers/media/platform/samsung/exynos-gsc/Kconfig+10−0

This diff is large: its 11 lines aren’t shown here.

drivers/media/platform/samsung/exynos-gsc/Makefilerenamed from drivers/media/platform/exynos-gsc/Makefile+0−0

File renamed without changes.

drivers/media/platform/samsung/exynos-gsc/gsc-core.crenamed from drivers/media/platform/exynos-gsc/gsc-core.c+6−8

This diff is large: its 37 lines aren’t shown here.

drivers/media/platform/samsung/exynos-gsc/gsc-core.hrenamed from drivers/media/platform/exynos-gsc/gsc-core.h+0−0

File renamed without changes.

drivers/media/platform/samsung/exynos-gsc/gsc-m2m.crenamed from drivers/media/platform/exynos-gsc/gsc-m2m.c+0−0

File renamed without changes.

drivers/media/platform/samsung/exynos-gsc/gsc-regs.crenamed from drivers/media/platform/exynos-gsc/gsc-regs.c+0−0

File renamed without changes.

drivers/media/platform/samsung/exynos-gsc/gsc-regs.hrenamed from drivers/media/platform/exynos-gsc/gsc-regs.h+0−0

File renamed without changes.

drivers/media/platform/samsung/exynos4-is/Kconfigrenamed from drivers/media/platform/exynos4-is/Kconfig+2−1

This diff is large: its 10 lines aren’t shown here.

drivers/media/platform/samsung/exynos4-is/Makefilerenamed from drivers/media/platform/exynos4-is/Makefile+0−0

File renamed without changes.

drivers/media/platform/samsung/exynos4-is/common.crenamed from drivers/media/platform/exynos4-is/common.c+4−1

This diff is large: its 12 lines aren’t shown here.

drivers/media/platform/samsung/exynos4-is/common.hrenamed from drivers/media/platform/exynos4-is/common.h+0−0

File renamed without changes.

drivers/media/platform/samsung/exynos4-is/fimc-capture.crenamed from drivers/media/platform/exynos4-is/fimc-capture.c+0−0

File renamed without changes.

drivers/media/platform/samsung/exynos4-is/fimc-core.crenamed from drivers/media/platform/exynos4-is/fimc-core.c+5−6

This diff is large: its 32 lines aren’t shown here.

drivers/media/platform/samsung/exynos4-is/fimc-core.hrenamed from drivers/media/platform/exynos4-is/fimc-core.h+0−0

File renamed without changes.

drivers/media/platform/samsung/exynos4-is/fimc-is-command.hrenamed from drivers/media/platform/exynos4-is/fimc-is-command.h+0−0

File renamed without changes.

drivers/media/platform/samsung/exynos4-is/fimc-is-errno.crenamed from drivers/media/platform/exynos4-is/fimc-is-errno.c+0−0

File renamed without changes.

drivers/media/platform/samsung/exynos4-is/fimc-is-errno.hrenamed from drivers/media/platform/exynos4-is/fimc-is-errno.h+0−0

File renamed without changes.

drivers/media/platform/samsung/exynos4-is/fimc-is-i2c.crenamed from drivers/media/platform/exynos4-is/fimc-is-i2c.c+0−0

File renamed without changes.

drivers/media/platform/samsung/exynos4-is/fimc-is-i2c.hrenamed from drivers/media/platform/exynos4-is/fimc-is-i2c.h+0−0

File renamed without changes.

drivers/media/platform/samsung/exynos4-is/fimc-is-param.crenamed from drivers/media/platform/exynos4-is/fimc-is-param.c+0−0

File renamed without changes.

drivers/media/platform/samsung/exynos4-is/fimc-is-param.hrenamed from drivers/media/platform/exynos4-is/fimc-is-param.h+0−0

File renamed without changes.

drivers/media/platform/samsung/exynos4-is/fimc-is-regs.crenamed from drivers/media/platform/exynos4-is/fimc-is-regs.c+0−0

File renamed without changes.

drivers/media/platform/samsung/exynos4-is/fimc-is-regs.hrenamed from drivers/media/platform/exynos4-is/fimc-is-regs.h+0−0

File renamed without changes.

drivers/media/platform/samsung/exynos4-is/fimc-is-sensor.crenamed from drivers/media/platform/exynos4-is/fimc-is-sensor.c+0−0

File renamed without changes.

drivers/media/platform/samsung/exynos4-is/fimc-is-sensor.hrenamed from drivers/media/platform/exynos4-is/fimc-is-sensor.h+0−0

File renamed without changes.

drivers/media/platform/samsung/exynos4-is/fimc-is.crenamed from drivers/media/platform/exynos4-is/fimc-is.c+0−0

File renamed without changes.

drivers/media/platform/samsung/exynos4-is/fimc-is.hrenamed from drivers/media/platform/exynos4-is/fimc-is.h+0−0

File renamed without changes.

drivers/media/platform/samsung/exynos4-is/fimc-isp-video.crenamed from drivers/media/platform/exynos4-is/fimc-isp-video.c+0−0

File renamed without changes.

drivers/media/platform/samsung/exynos4-is/fimc-isp-video.hrenamed from drivers/media/platform/exynos4-is/fimc-isp-video.h+0−0

File renamed without changes.

drivers/media/platform/samsung/exynos4-is/fimc-isp.crenamed from drivers/media/platform/exynos4-is/fimc-isp.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/platform/samsung/exynos4-is/fimc-isp.hrenamed from drivers/media/platform/exynos4-is/fimc-isp.h+0−0

File renamed without changes.

drivers/media/platform/samsung/exynos4-is/fimc-lite-reg.crenamed from drivers/media/platform/exynos4-is/fimc-lite-reg.c+0−0

File renamed without changes.

drivers/media/platform/samsung/exynos4-is/fimc-lite-reg.hrenamed from drivers/media/platform/exynos4-is/fimc-lite-reg.h+0−0

File renamed without changes.

drivers/media/platform/samsung/exynos4-is/fimc-lite.crenamed from drivers/media/platform/exynos4-is/fimc-lite.c+8−9

This diff is large: its 50 lines aren’t shown here.

drivers/media/platform/samsung/exynos4-is/fimc-lite.hrenamed from drivers/media/platform/exynos4-is/fimc-lite.h+0−0

File renamed without changes.

drivers/media/platform/samsung/exynos4-is/fimc-m2m.crenamed from drivers/media/platform/exynos4-is/fimc-m2m.c+0−0

File renamed without changes.

drivers/media/platform/samsung/exynos4-is/fimc-reg.crenamed from drivers/media/platform/exynos4-is/fimc-reg.c+0−0

File renamed without changes.

drivers/media/platform/samsung/exynos4-is/fimc-reg.hrenamed from drivers/media/platform/exynos4-is/fimc-reg.h+0−0

File renamed without changes.

drivers/media/platform/samsung/exynos4-is/media-dev.crenamed from drivers/media/platform/exynos4-is/media-dev.c+0−0

File renamed without changes.

drivers/media/platform/samsung/exynos4-is/media-dev.hrenamed from drivers/media/platform/exynos4-is/media-dev.h+0−0

File renamed without changes.

drivers/media/platform/samsung/exynos4-is/mipi-csis.crenamed from drivers/media/platform/exynos4-is/mipi-csis.c+0−0

File renamed without changes.

drivers/media/platform/samsung/exynos4-is/mipi-csis.hrenamed from drivers/media/platform/exynos4-is/mipi-csis.h+0−0

File renamed without changes.

drivers/media/platform/samsung/s3c-camif/Kconfig+15−0

This diff is large: its 16 lines aren’t shown here.

drivers/media/platform/samsung/s3c-camif/Makefilerenamed from drivers/media/platform/s3c-camif/Makefile+0−0

File renamed without changes.

drivers/media/platform/samsung/s3c-camif/camif-capture.crenamed from drivers/media/platform/s3c-camif/camif-capture.c+0−0

File renamed without changes.

drivers/media/platform/samsung/s3c-camif/camif-core.crenamed from drivers/media/platform/s3c-camif/camif-core.c+0−0

File renamed without changes.

drivers/media/platform/samsung/s3c-camif/camif-core.hrenamed from drivers/media/platform/s3c-camif/camif-core.h+0−0

File renamed without changes.

drivers/media/platform/samsung/s3c-camif/camif-regs.crenamed from drivers/media/platform/s3c-camif/camif-regs.c+0−0

File renamed without changes.

drivers/media/platform/samsung/s3c-camif/camif-regs.hrenamed from drivers/media/platform/s3c-camif/camif-regs.h+0−0

File renamed without changes.

drivers/media/platform/samsung/s5p-g2d/Kconfig+11−0

This diff is large: its 12 lines aren’t shown here.

drivers/media/platform/samsung/s5p-g2d/Makefilerenamed from drivers/media/platform/s5p-g2d/Makefile+0−0

File renamed without changes.

drivers/media/platform/samsung/s5p-g2d/g2d-hw.crenamed from drivers/media/platform/s5p-g2d/g2d-hw.c+0−0

File renamed without changes.

drivers/media/platform/samsung/s5p-g2d/g2d-regs.hrenamed from drivers/media/platform/s5p-g2d/g2d-regs.h+0−0

File renamed without changes.

drivers/media/platform/samsung/s5p-g2d/g2d.crenamed from drivers/media/platform/s5p-g2d/g2d.c+3−7

This diff is large: its 26 lines aren’t shown here.

drivers/media/platform/samsung/s5p-g2d/g2d.hrenamed from drivers/media/platform/s5p-g2d/g2d.h+0−0

File renamed without changes.

drivers/media/platform/samsung/s5p-jpeg/Kconfig+12−0

This diff is large: its 13 lines aren’t shown here.

drivers/media/platform/samsung/s5p-jpeg/Makefilerenamed from drivers/media/platform/s5p-jpeg/Makefile+0−0

File renamed without changes.

drivers/media/platform/samsung/s5p-jpeg/jpeg-core.crenamed from drivers/media/platform/s5p-jpeg/jpeg-core.c+1−1

This diff is large: its 7 lines aren’t shown here.

drivers/media/platform/samsung/s5p-jpeg/jpeg-core.hrenamed from drivers/media/platform/s5p-jpeg/jpeg-core.h+1−1

This diff is large: its 7 lines aren’t shown here.

drivers/media/platform/samsung/s5p-jpeg/jpeg-hw-exynos3250.crenamed from drivers/media/platform/s5p-jpeg/jpeg-hw-exynos3250.c+0−0

File renamed without changes.

drivers/media/platform/samsung/s5p-jpeg/jpeg-hw-exynos3250.hrenamed from drivers/media/platform/s5p-jpeg/jpeg-hw-exynos3250.h+1−1

This diff is large: its 7 lines aren’t shown here.

drivers/media/platform/samsung/s5p-jpeg/jpeg-hw-exynos4.crenamed from drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c+0−0

File renamed without changes.

drivers/media/platform/samsung/s5p-jpeg/jpeg-hw-exynos4.hrenamed from drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.h+0−0

File renamed without changes.

drivers/media/platform/samsung/s5p-jpeg/jpeg-hw-s5p.crenamed from drivers/media/platform/s5p-jpeg/jpeg-hw-s5p.c+1−1

This diff is large: its 7 lines aren’t shown here.

drivers/media/platform/samsung/s5p-jpeg/jpeg-hw-s5p.hrenamed from drivers/media/platform/s5p-jpeg/jpeg-hw-s5p.h+1−1

This diff is large: its 7 lines aren’t shown here.

drivers/media/platform/samsung/s5p-jpeg/jpeg-regs.hrenamed from drivers/media/platform/s5p-jpeg/jpeg-regs.h+1−1

This diff is large: its 7 lines aren’t shown here.

drivers/media/platform/samsung/s5p-mfc/Kconfig+9−0

This diff is large: its 10 lines aren’t shown here.

drivers/media/platform/samsung/s5p-mfc/Makefilerenamed from drivers/media/platform/s5p-mfc/Makefile+0−0

File renamed without changes.

drivers/media/platform/samsung/s5p-mfc/regs-mfc-v10.hrenamed from drivers/media/platform/s5p-mfc/regs-mfc-v10.h+0−0

File renamed without changes.

drivers/media/platform/samsung/s5p-mfc/regs-mfc-v6.hrenamed from drivers/media/platform/s5p-mfc/regs-mfc-v6.h+0−0

File renamed without changes.

drivers/media/platform/samsung/s5p-mfc/regs-mfc-v7.hrenamed from drivers/media/platform/s5p-mfc/regs-mfc-v7.h+0−0

File renamed without changes.

drivers/media/platform/samsung/s5p-mfc/regs-mfc-v8.hrenamed from drivers/media/platform/s5p-mfc/regs-mfc-v8.h+0−0

File renamed without changes.

drivers/media/platform/samsung/s5p-mfc/regs-mfc.hrenamed from drivers/media/platform/s5p-mfc/regs-mfc.h+0−0

File renamed without changes.

drivers/media/platform/samsung/s5p-mfc/s5p_mfc.crenamed from drivers/media/platform/s5p-mfc/s5p_mfc.c+4−7

This diff is large: its 25 lines aren’t shown here.

drivers/media/platform/samsung/s5p-mfc/s5p_mfc_cmd.crenamed from drivers/media/platform/s5p-mfc/s5p_mfc_cmd.c+1−1

This diff is large: its 8 lines aren’t shown here.

drivers/media/platform/samsung/s5p-mfc/s5p_mfc_cmd.hrenamed from drivers/media/platform/s5p-mfc/s5p_mfc_cmd.h+1−1

This diff is large: its 8 lines aren’t shown here.

drivers/media/platform/samsung/s5p-mfc/s5p_mfc_cmd_v5.crenamed from drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v5.c+1−1

This diff is large: its 8 lines aren’t shown here.

drivers/media/platform/samsung/s5p-mfc/s5p_mfc_cmd_v5.hrenamed from drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v5.h+1−1

This diff is large: its 8 lines aren’t shown here.

drivers/media/platform/samsung/s5p-mfc/s5p_mfc_cmd_v6.crenamed from drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v6.c+1−1

This diff is large: its 8 lines aren’t shown here.

drivers/media/platform/samsung/s5p-mfc/s5p_mfc_cmd_v6.hrenamed from drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v6.h+1−1

This diff is large: its 8 lines aren’t shown here.

drivers/media/platform/samsung/s5p-mfc/s5p_mfc_common.hrenamed from drivers/media/platform/s5p-mfc/s5p_mfc_common.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/media/platform/samsung/s5p-mfc/s5p_mfc_ctrl.crenamed from drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c+1−1

This diff is large: its 8 lines aren’t shown here.

drivers/media/platform/samsung/s5p-mfc/s5p_mfc_ctrl.hrenamed from drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.h+1−1

This diff is large: its 8 lines aren’t shown here.

drivers/media/platform/samsung/s5p-mfc/s5p_mfc_debug.hrenamed from drivers/media/platform/s5p-mfc/s5p_mfc_debug.h+1−1

This diff is large: its 8 lines aren’t shown here.

drivers/media/platform/samsung/s5p-mfc/s5p_mfc_dec.crenamed from drivers/media/platform/s5p-mfc/s5p_mfc_dec.c+19−1

This diff is large: its 110 lines aren’t shown here.

drivers/media/platform/samsung/s5p-mfc/s5p_mfc_dec.hrenamed from drivers/media/platform/s5p-mfc/s5p_mfc_dec.h+1−1

This diff is large: its 8 lines aren’t shown here.

drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.crenamed from drivers/media/platform/s5p-mfc/s5p_mfc_enc.c+1−1

This diff is large: its 8 lines aren’t shown here.

drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.hrenamed from drivers/media/platform/s5p-mfc/s5p_mfc_enc.h+1−1

This diff is large: its 8 lines aren’t shown here.

drivers/media/platform/samsung/s5p-mfc/s5p_mfc_intr.crenamed from drivers/media/platform/s5p-mfc/s5p_mfc_intr.c+0−0

File renamed without changes.

drivers/media/platform/samsung/s5p-mfc/s5p_mfc_intr.hrenamed from drivers/media/platform/s5p-mfc/s5p_mfc_intr.h+0−0

File renamed without changes.

drivers/media/platform/samsung/s5p-mfc/s5p_mfc_iommu.hrenamed from drivers/media/platform/s5p-mfc/s5p_mfc_iommu.h+0−0

File renamed without changes.

drivers/media/platform/samsung/s5p-mfc/s5p_mfc_opr.crenamed from drivers/media/platform/s5p-mfc/s5p_mfc_opr.c+1−1

This diff is large: its 8 lines aren’t shown here.

drivers/media/platform/samsung/s5p-mfc/s5p_mfc_opr.hrenamed from drivers/media/platform/s5p-mfc/s5p_mfc_opr.h+1−1

This diff is large: its 8 lines aren’t shown here.

drivers/media/platform/samsung/s5p-mfc/s5p_mfc_opr_v5.crenamed from drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c+0−0

File renamed without changes.

drivers/media/platform/samsung/s5p-mfc/s5p_mfc_opr_v5.hrenamed from drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.h+0−0

File renamed without changes.

drivers/media/platform/samsung/s5p-mfc/s5p_mfc_opr_v6.crenamed from drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c+1−1

This diff is large: its 8 lines aren’t shown here.

drivers/media/platform/samsung/s5p-mfc/s5p_mfc_opr_v6.hrenamed from drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.h+1−1

This diff is large: its 8 lines aren’t shown here.

drivers/media/platform/samsung/s5p-mfc/s5p_mfc_pm.crenamed from drivers/media/platform/s5p-mfc/s5p_mfc_pm.c+1−1

This diff is large: its 8 lines aren’t shown here.

drivers/media/platform/samsung/s5p-mfc/s5p_mfc_pm.hrenamed from drivers/media/platform/s5p-mfc/s5p_mfc_pm.h+1−1

This diff is large: its 8 lines aren’t shown here.

drivers/media/platform/st/Kconfig+6−0

This diff is large: its 7 lines aren’t shown here.

drivers/media/platform/st/Makefile+7−0

This diff is large: its 8 lines aren’t shown here.

drivers/media/platform/st/sti/Kconfig+5−0

This diff is large: its 6 lines aren’t shown here.

drivers/media/platform/st/sti/Makefile+6−0

This diff is large: its 7 lines aren’t shown here.

drivers/media/platform/st/sti/bdisp/Kconfig+10−0

This diff is large: its 11 lines aren’t shown here.

drivers/media/platform/st/sti/bdisp/Makefilerenamed from drivers/media/platform/sti/bdisp/Makefile+0−0

File renamed without changes.

drivers/media/platform/st/sti/bdisp/bdisp-debug.crenamed from drivers/media/platform/sti/bdisp/bdisp-debug.c+0−0

File renamed without changes.

drivers/media/platform/st/sti/bdisp/bdisp-filter.hrenamed from drivers/media/platform/sti/bdisp/bdisp-filter.h+0−0

File renamed without changes.

drivers/media/platform/st/sti/bdisp/bdisp-hw.crenamed from drivers/media/platform/sti/bdisp/bdisp-hw.c+0−0

File renamed without changes.

drivers/media/platform/st/sti/bdisp/bdisp-reg.hrenamed from drivers/media/platform/sti/bdisp/bdisp-reg.h+0−0

File renamed without changes.

drivers/media/platform/st/sti/bdisp/bdisp-v4l2.crenamed from drivers/media/platform/sti/bdisp/bdisp-v4l2.c+3−7

This diff is large: its 26 lines aren’t shown here.

drivers/media/platform/st/sti/bdisp/bdisp.hrenamed from drivers/media/platform/sti/bdisp/bdisp.h+0−0

File renamed without changes.

drivers/media/platform/st/sti/c8sectpfe/Kconfigrenamed from drivers/media/platform/sti/c8sectpfe/Kconfig+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/media/platform/st/sti/c8sectpfe/Makefilerenamed from drivers/media/platform/sti/c8sectpfe/Makefile+0−0

File renamed without changes.

drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-common.crenamed from drivers/media/platform/sti/c8sectpfe/c8sectpfe-common.c+0−0

File renamed without changes.

drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-common.hrenamed from drivers/media/platform/sti/c8sectpfe/c8sectpfe-common.h+0−0

File renamed without changes.

drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.crenamed from drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c+0−0

File renamed without changes.

drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.hrenamed from drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.h+0−0

File renamed without changes.

drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-debugfs.crenamed from drivers/media/platform/sti/c8sectpfe/c8sectpfe-debugfs.c+0−0

File renamed without changes.

drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-debugfs.hrenamed from drivers/media/platform/sti/c8sectpfe/c8sectpfe-debugfs.h+0−0

File renamed without changes.

drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-dvb.crenamed from drivers/media/platform/sti/c8sectpfe/c8sectpfe-dvb.c+0−0

File renamed without changes.

drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-dvb.hrenamed from drivers/media/platform/sti/c8sectpfe/c8sectpfe-dvb.h+0−0

File renamed without changes.

drivers/media/platform/st/sti/delta/Kconfig+36−0

This diff is large: its 37 lines aren’t shown here.

drivers/media/platform/st/sti/delta/Makefilerenamed from drivers/media/platform/sti/delta/Makefile+0−0

File renamed without changes.

drivers/media/platform/st/sti/delta/delta-cfg.hrenamed from drivers/media/platform/sti/delta/delta-cfg.h+0−0

File renamed without changes.

drivers/media/platform/st/sti/delta/delta-debug.crenamed from drivers/media/platform/sti/delta/delta-debug.c+0−0

File renamed without changes.

drivers/media/platform/st/sti/delta/delta-debug.hrenamed from drivers/media/platform/sti/delta/delta-debug.h+0−0

File renamed without changes.

drivers/media/platform/st/sti/delta/delta-ipc.crenamed from drivers/media/platform/sti/delta/delta-ipc.c+0−0

File renamed without changes.

drivers/media/platform/st/sti/delta/delta-ipc.hrenamed from drivers/media/platform/sti/delta/delta-ipc.h+0−0

File renamed without changes.

drivers/media/platform/st/sti/delta/delta-mem.crenamed from drivers/media/platform/sti/delta/delta-mem.c+0−0

File renamed without changes.

drivers/media/platform/st/sti/delta/delta-mem.hrenamed from drivers/media/platform/sti/delta/delta-mem.h+0−0

File renamed without changes.

drivers/media/platform/st/sti/delta/delta-mjpeg-dec.crenamed from drivers/media/platform/sti/delta/delta-mjpeg-dec.c+0−0

File renamed without changes.

drivers/media/platform/st/sti/delta/delta-mjpeg-fw.hrenamed from drivers/media/platform/sti/delta/delta-mjpeg-fw.h+0−0

File renamed without changes.

drivers/media/platform/st/sti/delta/delta-mjpeg-hdr.crenamed from drivers/media/platform/sti/delta/delta-mjpeg-hdr.c+0−0

File renamed without changes.

drivers/media/platform/st/sti/delta/delta-mjpeg.hrenamed from drivers/media/platform/sti/delta/delta-mjpeg.h+0−0

File renamed without changes.

drivers/media/platform/st/sti/delta/delta-v4l2.crenamed from drivers/media/platform/sti/delta/delta-v4l2.c+0−0

File renamed without changes.

drivers/media/platform/st/sti/delta/delta.hrenamed from drivers/media/platform/sti/delta/delta.h+0−0

File renamed without changes.

drivers/media/platform/st/sti/hva/Kconfig+26−0

This diff is large: its 27 lines aren’t shown here.

drivers/media/platform/st/sti/hva/Makefilerenamed from drivers/media/platform/sti/hva/Makefile+0−0

File renamed without changes.

drivers/media/platform/st/sti/hva/hva-debugfs.crenamed from drivers/media/platform/sti/hva/hva-debugfs.c+0−0

File renamed without changes.

drivers/media/platform/st/sti/hva/hva-h264.crenamed from drivers/media/platform/sti/hva/hva-h264.c+0−0

File renamed without changes.

drivers/media/platform/st/sti/hva/hva-hw.crenamed from drivers/media/platform/sti/hva/hva-hw.c+0−0

File renamed without changes.

drivers/media/platform/st/sti/hva/hva-hw.hrenamed from drivers/media/platform/sti/hva/hva-hw.h+0−0

File renamed without changes.

drivers/media/platform/st/sti/hva/hva-mem.crenamed from drivers/media/platform/sti/hva/hva-mem.c+0−0

File renamed without changes.

drivers/media/platform/st/sti/hva/hva-mem.hrenamed from drivers/media/platform/sti/hva/hva-mem.h+0−0

File renamed without changes.

drivers/media/platform/st/sti/hva/hva-v4l2.crenamed from drivers/media/platform/sti/hva/hva-v4l2.c+0−0

File renamed without changes.

drivers/media/platform/st/sti/hva/hva.hrenamed from drivers/media/platform/sti/hva/hva.h+0−0

File renamed without changes.

drivers/media/platform/st/stm32/Kconfig+31−0

This diff is large: its 32 lines aren’t shown here.

drivers/media/platform/st/stm32/Makefilerenamed from drivers/media/platform/stm32/Makefile+0−0

File renamed without changes.

drivers/media/platform/st/stm32/dma2d/dma2d-hw.crenamed from drivers/media/platform/stm32/dma2d/dma2d-hw.c+0−0

File renamed without changes.

drivers/media/platform/st/stm32/dma2d/dma2d-regs.hrenamed from drivers/media/platform/stm32/dma2d/dma2d-regs.h+0−0

File renamed without changes.

drivers/media/platform/st/stm32/dma2d/dma2d.crenamed from drivers/media/platform/stm32/dma2d/dma2d.c+3−6

This diff is large: its 18 lines aren’t shown here.

drivers/media/platform/st/stm32/dma2d/dma2d.hrenamed from drivers/media/platform/stm32/dma2d/dma2d.h+0−0

File renamed without changes.

drivers/media/platform/st/stm32/stm32-dcmi.crenamed from drivers/media/platform/stm32/stm32-dcmi.c+40−13

This diff is large: its 113 lines aren’t shown here.

drivers/media/platform/sunxi/Kconfig+4−0

This diff is large: its 9 lines aren’t shown here.

drivers/media/platform/sunxi/sun4i-csi/Kconfig+2−1

This diff is large: its 10 lines aren’t shown here.

drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.h+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/platform/sunxi/sun6i-csi/Kconfig+2−1

This diff is large: its 10 lines aren’t shown here.

drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c+5−1

This diff is large: its 13 lines aren’t shown here.

drivers/media/platform/sunxi/sun8i-di/Kconfig+14−0

This diff is large: its 15 lines aren’t shown here.

drivers/media/platform/sunxi/sun8i-rotate/Kconfig+14−0

This diff is large: its 15 lines aren’t shown here.

drivers/media/platform/ti/Kconfig+69−0

This diff is large: its 70 lines aren’t shown here.

drivers/media/platform/ti/Makefile+7−0

This diff is large: its 8 lines aren’t shown here.

drivers/media/platform/ti/am437x/Kconfigrenamed from drivers/media/platform/am437x/Kconfig+2−1

This diff is large: its 10 lines aren’t shown here.

drivers/media/platform/ti/am437x/Makefilerenamed from drivers/media/platform/am437x/Makefile+0−0

File renamed without changes.

drivers/media/platform/ti/am437x/am437x-vpfe.crenamed from drivers/media/platform/am437x/am437x-vpfe.c+0−0

File renamed without changes.

drivers/media/platform/ti/am437x/am437x-vpfe.hrenamed from drivers/media/platform/am437x/am437x-vpfe.h+0−0

File renamed without changes.

drivers/media/platform/ti/am437x/am437x-vpfe_regs.hrenamed from drivers/media/platform/am437x/am437x-vpfe_regs.h+0−0

File renamed without changes.

drivers/media/platform/ti/cal/Makefile+3−0

This diff is large: its 4 lines aren’t shown here.

drivers/media/platform/ti/cal/cal-camerarx.crenamed from drivers/media/platform/ti-vpe/cal-camerarx.c+3−3

This diff is large: its 27 lines aren’t shown here.

drivers/media/platform/ti/cal/cal-video.crenamed from drivers/media/platform/ti-vpe/cal-video.c+3−0

This diff is large: its 10 lines aren’t shown here.

drivers/media/platform/ti/cal/cal.crenamed from drivers/media/platform/ti-vpe/cal.c+0−0

File renamed without changes.

drivers/media/platform/ti/cal/cal.hrenamed from drivers/media/platform/ti-vpe/cal.h+0−0

File renamed without changes.

drivers/media/platform/ti/cal/cal_regs.hrenamed from drivers/media/platform/ti-vpe/cal_regs.h+0−0

File renamed without changes.

drivers/media/platform/ti/davinci/Kconfigrenamed from drivers/media/platform/davinci/Kconfig+12−6

This diff is large: its 60 lines aren’t shown here.

drivers/media/platform/ti/davinci/Makefilerenamed from drivers/media/platform/davinci/Makefile+0−0

File renamed without changes.

drivers/media/platform/ti/davinci/ccdc_hw_device.hrenamed from drivers/media/platform/davinci/ccdc_hw_device.h+0−0

File renamed without changes.

drivers/media/platform/ti/davinci/dm355_ccdc.crenamed from drivers/media/platform/davinci/dm355_ccdc.c+0−0

File renamed without changes.

drivers/media/platform/ti/davinci/dm355_ccdc_regs.hrenamed from drivers/media/platform/davinci/dm355_ccdc_regs.h+0−0

File renamed without changes.

drivers/media/platform/ti/davinci/dm644x_ccdc.crenamed from drivers/media/platform/davinci/dm644x_ccdc.c+0−0

File renamed without changes.

drivers/media/platform/ti/davinci/dm644x_ccdc_regs.hrenamed from drivers/media/platform/davinci/dm644x_ccdc_regs.h+0−0

File renamed without changes.

drivers/media/platform/ti/davinci/isif.crenamed from drivers/media/platform/davinci/isif.c+0−0

File renamed without changes.

drivers/media/platform/ti/davinci/isif_regs.hrenamed from drivers/media/platform/davinci/isif_regs.h+0−0

File renamed without changes.

drivers/media/platform/ti/davinci/vpbe.crenamed from drivers/media/platform/davinci/vpbe.c+0−0

File renamed without changes.

drivers/media/platform/ti/davinci/vpbe_display.crenamed from drivers/media/platform/davinci/vpbe_display.c+0−0

File renamed without changes.

drivers/media/platform/ti/davinci/vpbe_osd.crenamed from drivers/media/platform/davinci/vpbe_osd.c+0−0

File renamed without changes.

drivers/media/platform/ti/davinci/vpbe_osd_regs.hrenamed from drivers/media/platform/davinci/vpbe_osd_regs.h+0−0

File renamed without changes.

drivers/media/platform/ti/davinci/vpbe_venc.crenamed from drivers/media/platform/davinci/vpbe_venc.c+0−0

File renamed without changes.

drivers/media/platform/ti/davinci/vpbe_venc_regs.hrenamed from drivers/media/platform/davinci/vpbe_venc_regs.h+0−0

File renamed without changes.

drivers/media/platform/ti/davinci/vpfe_capture.crenamed from drivers/media/platform/davinci/vpfe_capture.c+0−0

File renamed without changes.

drivers/media/platform/ti/davinci/vpif.crenamed from drivers/media/platform/davinci/vpif.c+89−34

This diff is large: its 177 lines aren’t shown here.

drivers/media/platform/ti/davinci/vpif.hrenamed from drivers/media/platform/davinci/vpif.h+0−0

File renamed without changes.

drivers/media/platform/ti/davinci/vpif_capture.crenamed from drivers/media/platform/davinci/vpif_capture.c+16−11

This diff is large: its 42 lines aren’t shown here.

drivers/media/platform/ti/davinci/vpif_capture.hrenamed from drivers/media/platform/davinci/vpif_capture.h+0−0

File renamed without changes.

drivers/media/platform/ti/davinci/vpif_display.crenamed from drivers/media/platform/davinci/vpif_display.c+15−9

This diff is large: its 42 lines aren’t shown here.

drivers/media/platform/ti/davinci/vpif_display.hrenamed from drivers/media/platform/davinci/vpif_display.h+0−0

File renamed without changes.

drivers/media/platform/ti/davinci/vpss.crenamed from drivers/media/platform/davinci/vpss.c+0−0

File renamed without changes.

drivers/media/platform/ti/omap/Kconfigrenamed from drivers/media/platform/omap/Kconfig+2−1

This diff is large: its 13 lines aren’t shown here.

drivers/media/platform/ti/omap/Makefilerenamed from drivers/media/platform/omap/Makefile+0−0

File renamed without changes.

drivers/media/platform/ti/omap/omap_vout.crenamed from drivers/media/platform/omap/omap_vout.c+0−0

File renamed without changes.

drivers/media/platform/ti/omap/omap_vout_vrfb.crenamed from drivers/media/platform/omap/omap_vout_vrfb.c+0−0

File renamed without changes.

drivers/media/platform/ti/omap/omap_vout_vrfb.hrenamed from drivers/media/platform/omap/omap_vout_vrfb.h+0−0

File renamed without changes.

drivers/media/platform/ti/omap/omap_voutdef.hrenamed from drivers/media/platform/omap/omap_voutdef.h+0−0

File renamed without changes.

drivers/media/platform/ti/omap/omap_voutlib.crenamed from drivers/media/platform/omap/omap_voutlib.c+0−0

File renamed without changes.

drivers/media/platform/ti/omap/omap_voutlib.hrenamed from drivers/media/platform/omap/omap_voutlib.h+0−0

File renamed without changes.

drivers/media/platform/ti/omap3isp/Kconfig+21−0

This diff is large: its 22 lines aren’t shown here.

drivers/media/platform/ti/omap3isp/Makefilerenamed from drivers/media/platform/omap3isp/Makefile+0−0

File renamed without changes.

drivers/media/platform/ti/omap3isp/cfa_coef_table.hrenamed from drivers/media/platform/omap3isp/cfa_coef_table.h+0−0

File renamed without changes.

drivers/media/platform/ti/omap3isp/gamma_table.hrenamed from drivers/media/platform/omap3isp/gamma_table.h+0−0

File renamed without changes.

drivers/media/platform/ti/omap3isp/isp.crenamed from drivers/media/platform/omap3isp/isp.c+0−0

File renamed without changes.

drivers/media/platform/ti/omap3isp/isp.hrenamed from drivers/media/platform/omap3isp/isp.h+0−0

File renamed without changes.

drivers/media/platform/ti/omap3isp/ispccdc.crenamed from drivers/media/platform/omap3isp/ispccdc.c+0−0

File renamed without changes.

drivers/media/platform/ti/omap3isp/ispccdc.hrenamed from drivers/media/platform/omap3isp/ispccdc.h+0−0

File renamed without changes.

drivers/media/platform/ti/omap3isp/ispccp2.crenamed from drivers/media/platform/omap3isp/ispccp2.c+0−0

File renamed without changes.

drivers/media/platform/ti/omap3isp/ispccp2.hrenamed from drivers/media/platform/omap3isp/ispccp2.h+0−0

File renamed without changes.

drivers/media/platform/ti/omap3isp/ispcsi2.crenamed from drivers/media/platform/omap3isp/ispcsi2.c+0−0

File renamed without changes.

drivers/media/platform/ti/omap3isp/ispcsi2.hrenamed from drivers/media/platform/omap3isp/ispcsi2.h+0−0

File renamed without changes.

drivers/media/platform/ti/omap3isp/ispcsiphy.crenamed from drivers/media/platform/omap3isp/ispcsiphy.c+0−0

File renamed without changes.

drivers/media/platform/ti/omap3isp/ispcsiphy.hrenamed from drivers/media/platform/omap3isp/ispcsiphy.h+0−0

File renamed without changes.

drivers/media/platform/ti/omap3isp/isph3a.hrenamed from drivers/media/platform/omap3isp/isph3a.h+0−0

File renamed without changes.

drivers/media/platform/ti/omap3isp/isph3a_aewb.crenamed from drivers/media/platform/omap3isp/isph3a_aewb.c+0−0

File renamed without changes.

drivers/media/platform/ti/omap3isp/isph3a_af.crenamed from drivers/media/platform/omap3isp/isph3a_af.c+0−0

File renamed without changes.

drivers/media/platform/ti/omap3isp/isphist.crenamed from drivers/media/platform/omap3isp/isphist.c+0−0

File renamed without changes.

drivers/media/platform/ti/omap3isp/isphist.hrenamed from drivers/media/platform/omap3isp/isphist.h+0−0

File renamed without changes.

drivers/media/platform/ti/omap3isp/isppreview.crenamed from drivers/media/platform/omap3isp/isppreview.c+0−0

File renamed without changes.

drivers/media/platform/ti/omap3isp/isppreview.hrenamed from drivers/media/platform/omap3isp/isppreview.h+0−0

File renamed without changes.

drivers/media/platform/ti/omap3isp/ispreg.hrenamed from drivers/media/platform/omap3isp/ispreg.h+0−0

File renamed without changes.

drivers/media/platform/ti/omap3isp/ispresizer.crenamed from drivers/media/platform/omap3isp/ispresizer.c+0−0

File renamed without changes.

drivers/media/platform/ti/omap3isp/ispresizer.hrenamed from drivers/media/platform/omap3isp/ispresizer.h+0−0

File renamed without changes.

drivers/media/platform/ti/omap3isp/ispstat.crenamed from drivers/media/platform/omap3isp/ispstat.c+0−0

File renamed without changes.

drivers/media/platform/ti/omap3isp/ispstat.hrenamed from drivers/media/platform/omap3isp/ispstat.h+0−0

File renamed without changes.

drivers/media/platform/ti/omap3isp/ispvideo.crenamed from drivers/media/platform/omap3isp/ispvideo.c+0−0

File renamed without changes.

drivers/media/platform/ti/omap3isp/ispvideo.hrenamed from drivers/media/platform/omap3isp/ispvideo.h+0−0

File renamed without changes.

drivers/media/platform/ti/omap3isp/luma_enhance_table.hrenamed from drivers/media/platform/omap3isp/luma_enhance_table.h+0−0

File renamed without changes.

drivers/media/platform/ti/omap3isp/noise_filter_table.hrenamed from drivers/media/platform/omap3isp/noise_filter_table.h+0−0

File renamed without changes.

drivers/media/platform/ti/omap3isp/omap3isp.hrenamed from drivers/media/platform/omap3isp/omap3isp.h+0−0

File renamed without changes.

drivers/media/platform/ti/vpe/Makefilerenamed from drivers/media/platform/ti-vpe/Makefile+0−4

This diff is large: its 8 lines aren’t shown here.

drivers/media/platform/ti/vpe/csc.crenamed from drivers/media/platform/ti-vpe/csc.c+0−0

File renamed without changes.

drivers/media/platform/ti/vpe/csc.hrenamed from drivers/media/platform/ti-vpe/csc.h+0−0

File renamed without changes.

drivers/media/platform/ti/vpe/sc.crenamed from drivers/media/platform/ti-vpe/sc.c+0−0

File renamed without changes.

drivers/media/platform/ti/vpe/sc.hrenamed from drivers/media/platform/ti-vpe/sc.h+0−0

File renamed without changes.

drivers/media/platform/ti/vpe/sc_coeff.hrenamed from drivers/media/platform/ti-vpe/sc_coeff.h+0−0

File renamed without changes.

drivers/media/platform/ti/vpe/vpdma.crenamed from drivers/media/platform/ti-vpe/vpdma.c+0−0

File renamed without changes.

drivers/media/platform/ti/vpe/vpdma.hrenamed from drivers/media/platform/ti-vpe/vpdma.h+0−0

File renamed without changes.

drivers/media/platform/ti/vpe/vpdma_priv.hrenamed from drivers/media/platform/ti-vpe/vpdma_priv.h+0−0

File renamed without changes.

drivers/media/platform/ti/vpe/vpe.crenamed from drivers/media/platform/ti-vpe/vpe.c+0−0

File renamed without changes.

drivers/media/platform/ti/vpe/vpe_regs.hrenamed from drivers/media/platform/ti-vpe/vpe_regs.h+0−0

File renamed without changes.

drivers/media/platform/via/Kconfig+14−0

This diff is large: its 15 lines aren’t shown here.

drivers/media/platform/via/Makefile+2−0

This diff is large: its 3 lines aren’t shown here.

drivers/media/platform/via/via-camera.crenamed from drivers/media/platform/via-camera.c+0−0

File renamed without changes.

drivers/media/platform/via/via-camera.hrenamed from drivers/media/platform/via-camera.h+0−0

File renamed without changes.

drivers/media/platform/xilinx/Kconfig+5−5

This diff is large: its 30 lines aren’t shown here.

drivers/media/platform/xilinx/xilinx-csi2rxss.c+45−61

This diff is large: its 149 lines aren’t shown here.

drivers/media/radio/Kconfig+168−180

This diff is large: its 516 lines aren’t shown here.

drivers/media/radio/Makefile+23−20

This diff is large: its 60 lines aren’t shown here.

drivers/media/radio/radio-sf16fmi.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/radio/si470x/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/radio/wl128x/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/radio/wl128x/fmdrv_common.c+2−1

This diff is large: its 17 lines aren’t shown here.

drivers/media/rc/Kconfig+189−187

This diff is large: its 517 lines aren’t shown here.

drivers/media/rc/Makefile+26−21

This diff is large: its 78 lines aren’t shown here.

drivers/media/rc/fintek-cir.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/rc/gpio-ir-tx.c+21−7

This diff is large: its 53 lines aren’t shown here.

drivers/media/rc/igorplugusb.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/rc/iguanair.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/rc/ir-hix5hd2.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/rc/ir-imon-decoder.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/rc/ir-jvc-decoder.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/rc/ir-mce_kbd-decoder.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/rc/ir-nec-decoder.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/rc/ir-rc5-decoder.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/rc/ir-rc6-decoder.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/rc/ir-rcmm-decoder.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/rc/ir-sanyo-decoder.c+2−2

This diff is large: its 11 lines aren’t shown here.

drivers/media/rc/ir-sharp-decoder.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/rc/ir-sony-decoder.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/rc/ir-xmp-decoder.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/rc/ir_toy.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/rc/ite-cir.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/rc/keymaps/Makefile+19−15

This diff is large: its 121 lines aren’t shown here.

drivers/media/rc/lirc_dev.c+14−22

This diff is large: its 65 lines aren’t shown here.

drivers/media/rc/meson-ir-tx.c+1−1

This diff is large: its 7 lines aren’t shown here.

drivers/media/rc/mtk-cir.c+20−19

This diff is large: its 86 lines aren’t shown here.

drivers/media/rc/nuvoton-cir.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/rc/rc-core-priv.h+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/rc/rc-ir-raw.c+0−2

This diff is large: its 9 lines aren’t shown here.

drivers/media/rc/rc-loopback.c+5−1

This diff is large: its 13 lines aren’t shown here.

drivers/media/rc/st_rc.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/rc/sunxi-cir.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/rc/winbond-cir.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/spi/Kconfig+9−17

This diff is large: its 42 lines aren’t shown here.

drivers/media/spi/Makefile+5−2

This diff is large: its 11 lines aren’t shown here.

drivers/media/test-drivers/Kconfig+3−5

This diff is large: its 24 lines aren’t shown here.

drivers/media/test-drivers/Makefile+9−5

This diff is large: its 18 lines aren’t shown here.

drivers/media/test-drivers/vicodec/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/test-drivers/vidtv/Kconfig+0−1

This diff is large: its 6 lines aren’t shown here.

drivers/media/test-drivers/vidtv/vidtv_s302m.c+13−4

This diff is large: its 38 lines aren’t shown here.

drivers/media/test-drivers/vimc/Kconfig+2−1

This diff is large: its 15 lines aren’t shown here.

drivers/media/test-drivers/vimc/vimc-capture.c+7−2

This diff is large: its 29 lines aren’t shown here.

drivers/media/test-drivers/vimc/vimc-common.h+7−0

This diff is large: its 14 lines aren’t shown here.

drivers/media/test-drivers/vimc/vimc-core.c+10−0

This diff is large: its 31 lines aren’t shown here.

drivers/media/test-drivers/vivid/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/test-drivers/vivid/vivid-core.h+4−1

This diff is large: its 27 lines aren’t shown here.

drivers/media/test-drivers/vivid/vivid-ctrls.c+14−18

This diff is large: its 57 lines aren’t shown here.

drivers/media/test-drivers/vivid/vivid-kthread-cap.c+7−3

This diff is large: its 38 lines aren’t shown here.

drivers/media/test-drivers/vivid/vivid-kthread-out.c+7−5

This diff is large: its 35 lines aren’t shown here.

drivers/media/test-drivers/vivid/vivid-kthread-touch.c+9−1

This diff is large: its 45 lines aren’t shown here.

drivers/media/test-drivers/vivid/vivid-sdr-cap.c+10−5

This diff is large: its 59 lines aren’t shown here.

drivers/media/test-drivers/vivid/vivid-touch-cap.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/tuners/Kconfig+121−120

This diff is large: its 381 lines aren’t shown here.

drivers/media/tuners/Makefile+33−33

This diff is large: its 80 lines aren’t shown here.

drivers/media/tuners/e4000.c+3−3

This diff is large: its 27 lines aren’t shown here.

drivers/media/tuners/fc2580.c+3−3

This diff is large: its 27 lines aren’t shown here.

drivers/media/tuners/tuner-types.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/tuners/xc2028-types.hrenamed from drivers/media/tuners/tuner-xc2028-types.h+3−3

This diff is large: its 13 lines aren’t shown here.

drivers/media/tuners/xc2028.crenamed from drivers/media/tuners/tuner-xc2028.c+3−3

This diff is large: its 18 lines aren’t shown here.

drivers/media/tuners/xc2028.hrenamed from drivers/media/tuners/tuner-xc2028.h+1−1

This diff is large: its 8 lines aren’t shown here.

drivers/media/tuners/xc4000.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/usb/Kconfig+22−11

This diff is large: its 76 lines aren’t shown here.

drivers/media/usb/Makefile+25−15

This diff is large: its 50 lines aren’t shown here.

drivers/media/usb/airspy/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/usb/au0828/Kconfig+3−3

This diff is large: its 24 lines aren’t shown here.

drivers/media/usb/cpia2/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/usb/dvb-usb-v2/Kconfig+19−15

This diff is large: its 76 lines aren’t shown here.

drivers/media/usb/dvb-usb/Kconfig+186−182

This diff is large: its 462 lines aren’t shown here.

drivers/media/usb/dvb-usb/cxusb.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/usb/dvb-usb/dib0700_devices.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/usb/em28xx/em28xx-cards.c+5−8

This diff is large: its 44 lines aren’t shown here.

drivers/media/usb/em28xx/em28xx-i2c.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/usb/em28xx/em28xx.h+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/usb/go7007/s2250-board.c+4−6

This diff is large: its 31 lines aren’t shown here.

drivers/media/usb/go7007/snd-go7007.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/usb/gspca/Kconfig+60−61

This diff is large: its 453 lines aren’t shown here.

drivers/media/usb/gspca/Makefile+44−44

This diff is large: its 103 lines aren’t shown here.

drivers/media/usb/gspca/gl860/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/usb/gspca/jl2005bcd.c+3−1

This diff is large: its 11 lines aren’t shown here.

drivers/media/usb/gspca/m5602/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/usb/gspca/pac7302.c+0−1

This diff is large: its 8 lines aren’t shown here.

drivers/media/usb/hackrf/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/usb/hdpvr/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/usb/hdpvr/hdpvr-video.c+3−1

This diff is large: its 18 lines aren’t shown here.

drivers/media/usb/msi2500/Kconfig+1−1

This diff is large: its 8 lines aren’t shown here.

drivers/media/usb/pvrusb2/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/usb/pwc/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/usb/pwc/pwc-uncompress.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/usb/s2255/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/usb/stk1160/stk1160-core.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/usb/stk1160/stk1160-v4l.c+10−6

This diff is large: its 58 lines aren’t shown here.

drivers/media/usb/stk1160/stk1160-video.c+76−66

This diff is large: its 244 lines aren’t shown here.

drivers/media/usb/stk1160/stk1160.h+17−6

This diff is large: its 55 lines aren’t shown here.

drivers/media/usb/stkwebcam/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/usb/stkwebcam/stk-webcam.c+7−0

This diff is large: its 14 lines aren’t shown here.

drivers/media/usb/tm6000/tm6000-cards.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/usb/tm6000/tm6000-dvb.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/usb/tm6000/tm6000-i2c.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/usb/usbtv/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/usb/uvc/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/usb/uvc/uvc_driver.c+9−0

This diff is large: its 16 lines aren’t shown here.

drivers/media/usb/zr364xx/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/v4l2-core/Kconfig+2−10

This diff is large: its 28 lines aren’t shown here.

drivers/media/v4l2-core/Makefile+18−16

This diff is large: its 56 lines aren’t shown here.

drivers/media/v4l2-core/tuner-core.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/media/v4l2-core/v4l2-ctrls-core.c+19−1

This diff is large: its 49 lines aren’t shown here.

drivers/media/v4l2-core/v4l2-dev.c+34−34

This diff is large: its 188 lines aren’t shown here.

drivers/media/v4l2-core/v4l2-fwnode.c+16−30

This diff is large: its 108 lines aren’t shown here.

drivers/media/v4l2-core/v4l2-ioctl.c+9−5

This diff is large: its 49 lines aren’t shown here.

drivers/media/v4l2-core/v4l2-mem2mem.c+41−12

This diff is large: its 97 lines aren’t shown here.

drivers/media/v4l2-core/v4l2-subdev.c+0−8

This diff is large: its 22 lines aren’t shown here.

drivers/memory/mtk-smi.c+0−14

This diff is large: its 21 lines aren’t shown here.

drivers/staging/media/Kconfig+0−2

This diff is large: its 9 lines aren’t shown here.

drivers/staging/media/Makefile+0−1

This diff is large: its 8 lines aren’t shown here.

drivers/staging/media/atomisp/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/staging/media/atomisp/i2c/Kconfig+7−7

This diff is large: its 63 lines aren’t shown here.

drivers/staging/media/atomisp/pci/atomisp_acc.c+19−9

This diff is large: its 64 lines aren’t shown here.

drivers/staging/media/atomisp/pci/atomisp_compat_css20.c+2−2

This diff is large: its 18 lines aren’t shown here.

drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c+107−41

This diff is large: its 285 lines aren’t shown here.

drivers/staging/media/atomisp/pci/atomisp_v4l2.c+11−10

This diff is large: its 86 lines aren’t shown here.

drivers/staging/media/atomisp/pci/hmm/hmm.c+4−3

This diff is large: its 28 lines aren’t shown here.

drivers/staging/media/atomisp/pci/ia_css_acc_types.h+3−2

This diff is large: its 18 lines aren’t shown here.

drivers/staging/media/atomisp/pci/ia_css_env.h+5−4

This diff is large: its 23 lines aren’t shown here.

drivers/staging/media/atomisp/pci/ia_css_event_public.h+17−16

This diff is large: its 63 lines aren’t shown here.

drivers/staging/media/atomisp/pci/ia_css_irq.h+39−38

This diff is large: its 120 lines aren’t shown here.

drivers/staging/media/atomisp/pci/isp/kernels/macc/macc1_5/ia_css_macc1_5.host.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/staging/media/atomisp/pci/runtime/debug/interface/ia_css_debug.h+16−15

This diff is large: its 45 lines aren’t shown here.

drivers/staging/media/atomisp/pci/sh_css_firmware.c+4−0

This diff is large: its 12 lines aren’t shown here.

drivers/staging/media/hantro/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/staging/media/hantro/TODO+0−7

This diff is large: its 11 lines aren’t shown here.

drivers/staging/media/hantro/hantro.h+0−1

This diff is large: its 8 lines aren’t shown here.

drivers/staging/media/hantro/hantro_drv.c+39−13

This diff is large: its 90 lines aren’t shown here.

drivers/staging/media/hantro/hantro_g2_hevc_dec.c+7−20

This diff is large: its 64 lines aren’t shown here.

drivers/staging/media/hantro/hantro_h1_jpeg_enc.c+25−16

This diff is large: its 77 lines aren’t shown here.

drivers/staging/media/hantro/hantro_h1_regs.h+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/staging/media/hantro/hantro_hw.h+2−11

This diff is large: its 34 lines aren’t shown here.

drivers/staging/media/hantro/hantro_jpeg.c+46−40

This diff is large: its 153 lines aren’t shown here.

drivers/staging/media/hantro/hantro_jpeg.h+1−1

This diff is large: its 8 lines aren’t shown here.

drivers/staging/media/hantro/hantro_v4l2.c+77−0

This diff is large: its 91 lines aren’t shown here.

drivers/staging/media/hantro/imx8m_vpu_hw.c+49−13

This diff is large: its 106 lines aren’t shown here.

drivers/staging/media/hantro/rockchip_vpu2_hw_jpeg_enc.c+26−18

This diff is large: its 92 lines aren’t shown here.

drivers/staging/media/hantro/rockchip_vpu_hw.c+0−6

This diff is large: its 30 lines aren’t shown here.

drivers/staging/media/hantro/sunxi_vpu_hw.c+2−2

This diff is large: its 13 lines aren’t shown here.

drivers/staging/media/imx/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/staging/media/imx/Makefile+0−1

This diff is large: its 6 lines aren’t shown here.

drivers/staging/media/imx/TODO+25−0

This diff is large: its 29 lines aren’t shown here.

drivers/staging/media/imx/imx-media-csi.c+4−3

This diff is large: its 14 lines aren’t shown here.

drivers/staging/media/imx/imx6-mipi-csi2.c+3−22

This diff is large: its 44 lines aren’t shown here.

drivers/staging/media/imx/imx7-media-csi.c+58−6

This diff is large: its 133 lines aren’t shown here.

drivers/staging/media/imx/imx8mq-mipi-csi2.c+47−34

This diff is large: its 174 lines aren’t shown here.

drivers/staging/media/ipu3/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/staging/media/max96712/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/staging/media/max96712/max96712.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/staging/media/meson/vdec/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/staging/media/meson/vdec/esparser.c+6−1

This diff is large: its 14 lines aren’t shown here.

drivers/staging/media/meson/vdec/vdec_helpers.c+6−2

This diff is large: its 27 lines aren’t shown here.

drivers/staging/media/meson/vdec/vdec_helpers.h+2−2

This diff is large: its 11 lines aren’t shown here.

drivers/staging/media/meson/vdec/vdec_platform.c+12−0

This diff is large: its 19 lines aren’t shown here.

drivers/staging/media/omap4iss/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/staging/media/rkvdec/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/staging/media/sunxi/cedrus/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/staging/media/sunxi/cedrus/cedrus.c+2−0

This diff is large: its 9 lines aren’t shown here.

drivers/staging/media/sunxi/cedrus/cedrus.h+3−0

This diff is large: its 17 lines aren’t shown here.

drivers/staging/media/sunxi/cedrus/cedrus_dec.c+4−0

This diff is large: its 9 lines aren’t shown here.

drivers/staging/media/sunxi/cedrus/cedrus_h264.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/staging/media/sunxi/cedrus/cedrus_h265.c+2−2

This diff is large: its 18 lines aren’t shown here.

drivers/staging/media/sunxi/cedrus/cedrus_hw.c+25−0

This diff is large: its 39 lines aren’t shown here.

drivers/staging/media/sunxi/cedrus/cedrus_hw.h+2−0

This diff is large: its 7 lines aren’t shown here.

drivers/staging/media/tegra-vde/Kconfig+0−10

This diff is large: its 11 lines aren’t shown here.

drivers/staging/media/tegra-vde/Makefile+0−3

This diff is large: its 4 lines aren’t shown here.

drivers/staging/media/tegra-vde/TODO+0−4

This diff is large: its 5 lines aren’t shown here.

drivers/staging/media/tegra-vde/uapi.h+0−73

This diff is large: its 74 lines aren’t shown here.

drivers/staging/media/tegra-vde/vde.c+0−1358

This diff is large: its 1359 lines aren’t shown here.

drivers/staging/media/tegra-vde/vde.h+0−125

This diff is large: its 126 lines aren’t shown here.

drivers/staging/media/tegra-video/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/staging/media/zoran/Kconfig+19−21

This diff is large: its 92 lines aren’t shown here.

drivers/staging/media/zoran/Makefile+4−4

This diff is large: its 12 lines aren’t shown here.

drivers/staging/media/zoran/videocodec.c+6−62

This diff is large: its 139 lines aren’t shown here.

drivers/staging/media/zoran/videocodec.h+3−1

This diff is large: its 23 lines aren’t shown here.

drivers/staging/media/zoran/zoran.h+3−15

This diff is large: its 47 lines aren’t shown here.

drivers/staging/media/zoran/zoran_card.c+253−145

This diff is large: its 543 lines aren’t shown here.

drivers/staging/media/zoran/zoran_device.c+10−5

This diff is large: its 57 lines aren’t shown here.

drivers/staging/media/zoran/zoran_device.h+0−2

This diff is large: its 10 lines aren’t shown here.

drivers/staging/media/zoran/zoran_driver.c+26−30

This diff is large: its 219 lines aren’t shown here.

drivers/staging/media/zoran/zr36016.c+8−17

This diff is large: its 65 lines aren’t shown here.

drivers/staging/media/zoran/zr36016.h+2−0

This diff is large: its 7 lines aren’t shown here.

drivers/staging/media/zoran/zr36050.c+6−18

This diff is large: its 64 lines aren’t shown here.

drivers/staging/media/zoran/zr36050.h+2−0

This diff is large: its 7 lines aren’t shown here.

drivers/staging/media/zoran/zr36060.c+6−17

This diff is large: its 63 lines aren’t shown here.

drivers/staging/media/zoran/zr36060.h+2−0

This diff is large: its 7 lines aren’t shown here.

drivers/staging/most/video/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/staging/vc04_services/bcm2835-camera/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/usb/gadget/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/usb/gadget/legacy/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

include/media/hevc-ctrls.h+2−4

This diff is large: its 18 lines aren’t shown here.

include/media/i2c/m5mols.h+0−4

This diff is large: its 16 lines aren’t shown here.

include/media/i2c/noon010pc30.h+0−4

This diff is large: its 15 lines aren’t shown here.

include/media/media-entity.h+19−6

This diff is large: its 60 lines aren’t shown here.

include/media/mipi-csi2.h+45−0

This diff is large: its 46 lines aren’t shown here.

include/media/rc-core.h+4−8

This diff is large: its 41 lines aren’t shown here.

include/media/v4l2-fwnode.h+6−55

This diff is large: its 85 lines aren’t shown here.

include/media/v4l2-mediabus.h+72−32

This diff is large: its 130 lines aren’t shown here.

include/media/v4l2-subdev.h+0−13

This diff is large: its 27 lines aren’t shown here.

include/soc/mediatek/smi.h+0−20

This diff is large: its 27 lines aren’t shown here.

include/uapi/linux/lirc.h+7−9

This diff is large: its 52 lines aren’t shown here.

include/uapi/linux/v4l2-controls.h+8−0

This diff is large: its 22 lines aren’t shown here.

include/uapi/linux/videodev2.h+2−0

This diff is large: its 9 lines aren’t shown here.

sound/pci/Kconfig+2−2

This diff is large: its 18 lines aren’t shown here.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t