mbox series

[00/24] Organize media platform drivers per manufacturer

Message ID cover.1647167750.git.mchehab@kernel.org (mailing list archive)
Headers show
Series Organize media platform drivers per manufacturer | expand

Message

Mauro Carvalho Chehab March 13, 2022, 10:51 a.m. UTC
This series comes after the one I sent earlier today sorting media/platform Makefile and Kconfig.

It basically groups all drivers per vendor, ensuring that each vendor has a Makefile/Kconfig
pair.

The end goal is to keep the platform Makefile/Kconfig clean and easier to maintain, less
prune to errors. After applying both series, the size of such files were drastically reduced:

	 drivers/media/platform/Kconfig  |  731 ++------------------------------
	 drivers/media/platform/Makefile |  115 +----
	 2 files changed, 78 insertions(+), 768 deletions(-)

Mauro Carvalho Chehab (24):
  media: platform: rename coda/ to chips-media/
  media: platform: rename marvell-ccic/ to marvell/
  media: platform: rename meson/ge2d/ to amlogic/meson-ge2d/
  media: platform: rename mtk-jpeg/ to mediatek/mtk-jpeg/
  media: platform: rename mtk-mdp/ to mediatek/mtk-mdp/
  media: platform: rename mtk-vcodec/ to mediatek/mtk-vcodec/
  media: platform: rename mtk-vpu/ to mediatek/mtk-vpu/
  media: platform: rename sunxi/ to allwinner/
  media: platform: rename tegra/vde/ to nvidia/tegra-vde/
  media: platform: rename amphion/ to nxp/amphion/
  media: platform: rename exynos4-is/ to samsung/exynos4-is/
  media: platform: rename exynos-gsc/ to samsung/exynos-gsc/
  media: platform: rename s3c-camif/ to samsung/s3c-camif/
  media: platform: rename s5p-g2d/ to samsung/s5p-g2d/
  media: platform: rename s5p-jpeg/ to samsung/s5p-jpeg/
  media: platform: rename s5p-mfc/ to samsung/s5p-mfc/
  media: platform: rename stm32/ to sti/stm32/
  media: platform: rename am437x/ to ti/am437x/
  media: platform: rename davinci/ to ti/davinci/
  media: platform: rename omap3isp/ to ti/omap3isp/
  media: platform: rename omap/ to ti/omap/
  media: platform: rename ti-vpe/ to ti/vpe/
  media: platform: Create vendor/{Makefile,Kconfig} files
  media: platform/*/Kconfig: make menus more uniform

 Documentation/admin-guide/media/fimc.rst      |  2 +-
 Documentation/admin-guide/media/omap3isp.rst  |  2 +-
 .../admin-guide/media/omap4_camera.rst        |  2 +-
 .../media/drivers/davinci-vpbe-devel.rst      | 20 ++++----
 .../driver-api/media/drivers/fimc-devel.rst   | 14 +++---
 Documentation/driver-api/media/v4l2-event.rst |  2 +-
 MAINTAINERS                                   | 48 +++++++++----------
 drivers/media/platform/Kconfig                | 30 ++++--------
 drivers/media/platform/Makefile               | 41 +++++-----------
 drivers/media/platform/allegro-dvt/Kconfig    |  3 ++
 drivers/media/platform/allwinner/Kconfig      |  6 +++
 .../platform/{sunxi => allwinner}/Makefile    |  0
 .../{sunxi => allwinner}/sun4i-csi/Kconfig    |  0
 .../{sunxi => allwinner}/sun4i-csi/Makefile   |  0
 .../sun4i-csi/sun4i_csi.c                     |  0
 .../sun4i-csi/sun4i_csi.h                     |  0
 .../sun4i-csi/sun4i_dma.c                     |  0
 .../sun4i-csi/sun4i_v4l2.c                    |  0
 .../{sunxi => allwinner}/sun6i-csi/Kconfig    |  0
 .../{sunxi => allwinner}/sun6i-csi/Makefile   |  0
 .../sun6i-csi/sun6i_csi.c                     |  0
 .../sun6i-csi/sun6i_csi.h                     |  0
 .../sun6i-csi/sun6i_csi_reg.h                 |  0
 .../sun6i-csi/sun6i_video.c                   |  0
 .../sun6i-csi/sun6i_video.h                   |  0
 .../{sunxi => allwinner}/sun8i-di/Kconfig     |  0
 .../{sunxi => allwinner}/sun8i-di/Makefile    |  0
 .../{sunxi => allwinner}/sun8i-di/sun8i-di.c  |  0
 .../{sunxi => allwinner}/sun8i-di/sun8i-di.h  |  0
 .../{sunxi => allwinner}/sun8i-rotate/Kconfig |  0
 .../sun8i-rotate/Makefile                     |  0
 .../sun8i-rotate/sun8i-formats.h              |  0
 .../sun8i-rotate/sun8i-rotate.h               |  0
 .../sun8i-rotate/sun8i_formats.c              |  0
 .../sun8i-rotate/sun8i_rotate.c               |  0
 drivers/media/platform/amlogic/Kconfig        |  5 ++
 drivers/media/platform/amlogic/Makefile       |  2 +
 .../ge2d => amlogic/meson-ge2d}/Kconfig       |  0
 .../ge2d => amlogic/meson-ge2d}/Makefile      |  0
 .../ge2d => amlogic/meson-ge2d}/ge2d-regs.h   |  0
 .../{meson/ge2d => amlogic/meson-ge2d}/ge2d.c |  0
 drivers/media/platform/aspeed/Kconfig         |  3 ++
 drivers/media/platform/atmel/Kconfig          |  3 ++
 drivers/media/platform/cadence/Kconfig        | 13 +----
 .../platform/{coda => chips-media}/Kconfig    |  3 ++
 .../platform/{coda => chips-media}/Makefile   |  0
 .../platform/{coda => chips-media}/coda-bit.c |  0
 .../{coda => chips-media}/coda-common.c       |  0
 .../platform/{coda => chips-media}/coda-gdi.c |  0
 .../{coda => chips-media}/coda-h264.c         |  0
 .../{coda => chips-media}/coda-jpeg.c         |  0
 .../{coda => chips-media}/coda-mpeg2.c        |  0
 .../{coda => chips-media}/coda-mpeg4.c        |  0
 .../platform/{coda => chips-media}/coda.h     |  0
 .../{coda => chips-media}/coda_regs.h         |  2 +-
 .../platform/{coda => chips-media}/imx-vdoa.c |  0
 .../platform/{coda => chips-media}/imx-vdoa.h |  0
 .../platform/{coda => chips-media}/trace.h    |  2 +-
 drivers/media/platform/intel/Kconfig          |  3 ++
 .../{marvell-ccic => marvell}/Kconfig         |  3 ++
 .../{marvell-ccic => marvell}/Makefile        |  0
 .../{marvell-ccic => marvell}/cafe-driver.c   |  0
 .../{marvell-ccic => marvell}/mcam-core.c     |  0
 .../{marvell-ccic => marvell}/mcam-core.h     |  0
 .../{marvell-ccic => marvell}/mmp-driver.c    |  0
 drivers/media/platform/mediatek/Kconfig       |  8 ++++
 drivers/media/platform/mediatek/Makefile      |  5 ++
 .../platform/{ => mediatek}/mtk-jpeg/Kconfig  |  0
 .../platform/{ => mediatek}/mtk-jpeg/Makefile |  0
 .../{ => mediatek}/mtk-jpeg/mtk_jpeg_core.c   |  0
 .../{ => mediatek}/mtk-jpeg/mtk_jpeg_core.h   |  0
 .../{ => mediatek}/mtk-jpeg/mtk_jpeg_dec_hw.c |  0
 .../{ => mediatek}/mtk-jpeg/mtk_jpeg_dec_hw.h |  0
 .../mtk-jpeg/mtk_jpeg_dec_parse.c             |  0
 .../mtk-jpeg/mtk_jpeg_dec_parse.h             |  0
 .../mtk-jpeg/mtk_jpeg_dec_reg.h               |  0
 .../{ => mediatek}/mtk-jpeg/mtk_jpeg_enc_hw.c |  0
 .../{ => mediatek}/mtk-jpeg/mtk_jpeg_enc_hw.h |  0
 .../platform/{ => mediatek}/mtk-mdp/Kconfig   |  0
 .../platform/{ => mediatek}/mtk-mdp/Makefile  |  2 +-
 .../{ => mediatek}/mtk-mdp/mtk_mdp_comp.c     |  0
 .../{ => mediatek}/mtk-mdp/mtk_mdp_comp.h     |  0
 .../{ => mediatek}/mtk-mdp/mtk_mdp_core.c     |  0
 .../{ => mediatek}/mtk-mdp/mtk_mdp_core.h     |  0
 .../{ => mediatek}/mtk-mdp/mtk_mdp_ipi.h      |  0
 .../{ => mediatek}/mtk-mdp/mtk_mdp_m2m.c      |  0
 .../{ => mediatek}/mtk-mdp/mtk_mdp_m2m.h      |  0
 .../{ => mediatek}/mtk-mdp/mtk_mdp_regs.c     |  0
 .../{ => mediatek}/mtk-mdp/mtk_mdp_regs.h     |  0
 .../{ => mediatek}/mtk-mdp/mtk_mdp_vpu.c      |  0
 .../{ => mediatek}/mtk-mdp/mtk_mdp_vpu.h      |  0
 .../{ => mediatek}/mtk-vcodec/Kconfig         |  0
 .../{ => mediatek}/mtk-vcodec/Makefile        |  0
 .../mtk-vcodec/mtk_vcodec_dec.c               |  0
 .../mtk-vcodec/mtk_vcodec_dec.h               |  0
 .../mtk-vcodec/mtk_vcodec_dec_drv.c           |  0
 .../mtk-vcodec/mtk_vcodec_dec_hw.c            |  0
 .../mtk-vcodec/mtk_vcodec_dec_hw.h            |  0
 .../mtk-vcodec/mtk_vcodec_dec_pm.c            |  0
 .../mtk-vcodec/mtk_vcodec_dec_pm.h            |  0
 .../mtk-vcodec/mtk_vcodec_dec_stateful.c      |  0
 .../mtk-vcodec/mtk_vcodec_dec_stateless.c     |  0
 .../mtk-vcodec/mtk_vcodec_drv.h               |  0
 .../mtk-vcodec/mtk_vcodec_enc.c               |  0
 .../mtk-vcodec/mtk_vcodec_enc.h               |  0
 .../mtk-vcodec/mtk_vcodec_enc_drv.c           |  0
 .../mtk-vcodec/mtk_vcodec_enc_pm.c            |  0
 .../mtk-vcodec/mtk_vcodec_enc_pm.h            |  0
 .../{ => mediatek}/mtk-vcodec/mtk_vcodec_fw.c |  0
 .../{ => mediatek}/mtk-vcodec/mtk_vcodec_fw.h |  0
 .../mtk-vcodec/mtk_vcodec_fw_priv.h           |  0
 .../mtk-vcodec/mtk_vcodec_fw_scp.c            |  0
 .../mtk-vcodec/mtk_vcodec_fw_vpu.c            |  0
 .../mtk-vcodec/mtk_vcodec_intr.c              |  0
 .../mtk-vcodec/mtk_vcodec_intr.h              |  0
 .../mtk-vcodec/mtk_vcodec_util.c              |  0
 .../mtk-vcodec/mtk_vcodec_util.h              |  0
 .../mtk-vcodec/vdec/vdec_h264_if.c            |  0
 .../mtk-vcodec/vdec/vdec_h264_req_if.c        |  0
 .../mtk-vcodec/vdec/vdec_vp8_if.c             |  0
 .../mtk-vcodec/vdec/vdec_vp9_if.c             |  0
 .../{ => mediatek}/mtk-vcodec/vdec_drv_base.h |  0
 .../{ => mediatek}/mtk-vcodec/vdec_drv_if.c   |  0
 .../{ => mediatek}/mtk-vcodec/vdec_drv_if.h   |  0
 .../{ => mediatek}/mtk-vcodec/vdec_ipi_msg.h  |  0
 .../mtk-vcodec/vdec_msg_queue.c               |  0
 .../mtk-vcodec/vdec_msg_queue.h               |  0
 .../{ => mediatek}/mtk-vcodec/vdec_vpu_if.c   |  0
 .../{ => mediatek}/mtk-vcodec/vdec_vpu_if.h   |  0
 .../mtk-vcodec/venc/venc_h264_if.c            |  0
 .../mtk-vcodec/venc/venc_vp8_if.c             |  0
 .../{ => mediatek}/mtk-vcodec/venc_drv_base.h |  0
 .../{ => mediatek}/mtk-vcodec/venc_drv_if.c   |  0
 .../{ => mediatek}/mtk-vcodec/venc_drv_if.h   |  0
 .../{ => mediatek}/mtk-vcodec/venc_ipi_msg.h  |  0
 .../{ => mediatek}/mtk-vcodec/venc_vpu_if.c   |  0
 .../{ => mediatek}/mtk-vcodec/venc_vpu_if.h   |  0
 .../platform/{ => mediatek}/mtk-vpu/Kconfig   |  0
 .../platform/{ => mediatek}/mtk-vpu/Makefile  |  0
 .../platform/{ => mediatek}/mtk-vpu/mtk_vpu.c |  0
 .../platform/{ => mediatek}/mtk-vpu/mtk_vpu.h |  0
 drivers/media/platform/nvidia/Kconfig         |  5 ++
 .../{tegra/vde => nvidia/tegra-vde}/Kconfig   |  0
 .../{tegra/vde => nvidia/tegra-vde}/Makefile  |  0
 .../vde => nvidia/tegra-vde}/dmabuf-cache.c   |  0
 .../{tegra/vde => nvidia/tegra-vde}/h264.c    |  0
 .../{tegra/vde => nvidia/tegra-vde}/iommu.c   |  0
 .../{tegra/vde => nvidia/tegra-vde}/trace.h   |  2 +-
 .../{tegra/vde => nvidia/tegra-vde}/v4l2.c    |  0
 .../{tegra/vde => nvidia/tegra-vde}/vde.c     |  0
 .../{tegra/vde => nvidia/tegra-vde}/vde.h     |  0
 drivers/media/platform/nxp/Kconfig            | 23 +++------
 drivers/media/platform/nxp/Makefile           |  1 +
 .../media/platform/{ => nxp}/amphion/Kconfig  |  0
 .../media/platform/{ => nxp}/amphion/Makefile |  0
 .../media/platform/{ => nxp}/amphion/vdec.c   |  0
 .../media/platform/{ => nxp}/amphion/venc.c   |  0
 .../media/platform/{ => nxp}/amphion/vpu.h    |  0
 .../platform/{ => nxp}/amphion/vpu_cmds.c     |  0
 .../platform/{ => nxp}/amphion/vpu_cmds.h     |  0
 .../platform/{ => nxp}/amphion/vpu_codec.h    |  0
 .../platform/{ => nxp}/amphion/vpu_color.c    |  0
 .../platform/{ => nxp}/amphion/vpu_core.c     |  0
 .../platform/{ => nxp}/amphion/vpu_core.h     |  0
 .../platform/{ => nxp}/amphion/vpu_dbg.c      |  0
 .../platform/{ => nxp}/amphion/vpu_defs.h     |  0
 .../platform/{ => nxp}/amphion/vpu_drv.c      |  0
 .../platform/{ => nxp}/amphion/vpu_helpers.c  |  0
 .../platform/{ => nxp}/amphion/vpu_helpers.h  |  0
 .../platform/{ => nxp}/amphion/vpu_imx8q.c    |  0
 .../platform/{ => nxp}/amphion/vpu_imx8q.h    |  0
 .../platform/{ => nxp}/amphion/vpu_malone.c   |  0
 .../platform/{ => nxp}/amphion/vpu_malone.h   |  0
 .../platform/{ => nxp}/amphion/vpu_mbox.c     |  0
 .../platform/{ => nxp}/amphion/vpu_mbox.h     |  0
 .../platform/{ => nxp}/amphion/vpu_msgs.c     |  0
 .../platform/{ => nxp}/amphion/vpu_msgs.h     |  0
 .../platform/{ => nxp}/amphion/vpu_rpc.c      |  0
 .../platform/{ => nxp}/amphion/vpu_rpc.h      |  0
 .../platform/{ => nxp}/amphion/vpu_v4l2.c     |  0
 .../platform/{ => nxp}/amphion/vpu_v4l2.h     |  0
 .../platform/{ => nxp}/amphion/vpu_windsor.c  |  0
 .../platform/{ => nxp}/amphion/vpu_windsor.h  |  0
 .../media/platform/nxp/imx-jpeg/mxc-jpeg.c    |  2 +-
 drivers/media/platform/qcom/Kconfig           |  3 ++
 drivers/media/platform/qcom/Makefile          |  3 ++
 drivers/media/platform/renesas/Kconfig        |  2 +
 drivers/media/platform/renesas/rcar_jpu.c     |  2 +-
 drivers/media/platform/rockchip/Kconfig       |  3 ++
 drivers/media/platform/rockchip/Makefile      |  3 ++
 drivers/media/platform/samsung/Kconfig        | 10 ++++
 drivers/media/platform/samsung/Makefile       |  7 +++
 .../platform/{ => samsung}/exynos-gsc/Kconfig |  0
 .../{ => samsung}/exynos-gsc/Makefile         |  0
 .../{ => samsung}/exynos-gsc/gsc-core.c       |  0
 .../{ => samsung}/exynos-gsc/gsc-core.h       |  0
 .../{ => samsung}/exynos-gsc/gsc-m2m.c        |  0
 .../{ => samsung}/exynos-gsc/gsc-regs.c       |  0
 .../{ => samsung}/exynos-gsc/gsc-regs.h       |  0
 .../platform/{ => samsung}/exynos4-is/Kconfig |  0
 .../{ => samsung}/exynos4-is/Makefile         |  0
 .../{ => samsung}/exynos4-is/common.c         |  0
 .../{ => samsung}/exynos4-is/common.h         |  0
 .../{ => samsung}/exynos4-is/fimc-capture.c   |  0
 .../{ => samsung}/exynos4-is/fimc-core.c      |  0
 .../{ => samsung}/exynos4-is/fimc-core.h      |  0
 .../exynos4-is/fimc-is-command.h              |  0
 .../{ => samsung}/exynos4-is/fimc-is-errno.c  |  0
 .../{ => samsung}/exynos4-is/fimc-is-errno.h  |  0
 .../{ => samsung}/exynos4-is/fimc-is-i2c.c    |  0
 .../{ => samsung}/exynos4-is/fimc-is-i2c.h    |  0
 .../{ => samsung}/exynos4-is/fimc-is-param.c  |  0
 .../{ => samsung}/exynos4-is/fimc-is-param.h  |  0
 .../{ => samsung}/exynos4-is/fimc-is-regs.c   |  0
 .../{ => samsung}/exynos4-is/fimc-is-regs.h   |  0
 .../{ => samsung}/exynos4-is/fimc-is-sensor.c |  0
 .../{ => samsung}/exynos4-is/fimc-is-sensor.h |  0
 .../{ => samsung}/exynos4-is/fimc-is.c        |  0
 .../{ => samsung}/exynos4-is/fimc-is.h        |  0
 .../{ => samsung}/exynos4-is/fimc-isp-video.c |  0
 .../{ => samsung}/exynos4-is/fimc-isp-video.h |  0
 .../{ => samsung}/exynos4-is/fimc-isp.c       |  0
 .../{ => samsung}/exynos4-is/fimc-isp.h       |  0
 .../{ => samsung}/exynos4-is/fimc-lite-reg.c  |  0
 .../{ => samsung}/exynos4-is/fimc-lite-reg.h  |  0
 .../{ => samsung}/exynos4-is/fimc-lite.c      |  0
 .../{ => samsung}/exynos4-is/fimc-lite.h      |  0
 .../{ => samsung}/exynos4-is/fimc-m2m.c       |  0
 .../{ => samsung}/exynos4-is/fimc-reg.c       |  0
 .../{ => samsung}/exynos4-is/fimc-reg.h       |  0
 .../{ => samsung}/exynos4-is/media-dev.c      |  0
 .../{ => samsung}/exynos4-is/media-dev.h      |  0
 .../{ => samsung}/exynos4-is/mipi-csis.c      |  0
 .../{ => samsung}/exynos4-is/mipi-csis.h      |  0
 .../platform/{ => samsung}/s3c-camif/Kconfig  |  0
 .../platform/{ => samsung}/s3c-camif/Makefile |  0
 .../{ => samsung}/s3c-camif/camif-capture.c   |  0
 .../{ => samsung}/s3c-camif/camif-core.c      |  0
 .../{ => samsung}/s3c-camif/camif-core.h      |  0
 .../{ => samsung}/s3c-camif/camif-regs.c      |  0
 .../{ => samsung}/s3c-camif/camif-regs.h      |  0
 .../platform/{ => samsung}/s5p-g2d/Kconfig    |  0
 .../platform/{ => samsung}/s5p-g2d/Makefile   |  0
 .../platform/{ => samsung}/s5p-g2d/g2d-hw.c   |  0
 .../platform/{ => samsung}/s5p-g2d/g2d-regs.h |  0
 .../platform/{ => samsung}/s5p-g2d/g2d.c      |  0
 .../platform/{ => samsung}/s5p-g2d/g2d.h      |  0
 .../platform/{ => samsung}/s5p-jpeg/Kconfig   |  0
 .../platform/{ => samsung}/s5p-jpeg/Makefile  |  0
 .../{ => samsung}/s5p-jpeg/jpeg-core.c        |  2 +-
 .../{ => samsung}/s5p-jpeg/jpeg-core.h        |  2 +-
 .../s5p-jpeg/jpeg-hw-exynos3250.c             |  0
 .../s5p-jpeg/jpeg-hw-exynos3250.h             |  2 +-
 .../{ => samsung}/s5p-jpeg/jpeg-hw-exynos4.c  |  0
 .../{ => samsung}/s5p-jpeg/jpeg-hw-exynos4.h  |  0
 .../{ => samsung}/s5p-jpeg/jpeg-hw-s5p.c      |  2 +-
 .../{ => samsung}/s5p-jpeg/jpeg-hw-s5p.h      |  2 +-
 .../{ => samsung}/s5p-jpeg/jpeg-regs.h        |  2 +-
 .../platform/{ => samsung}/s5p-mfc/Kconfig    |  0
 .../platform/{ => samsung}/s5p-mfc/Makefile   |  0
 .../{ => samsung}/s5p-mfc/regs-mfc-v10.h      |  0
 .../{ => samsung}/s5p-mfc/regs-mfc-v6.h       |  0
 .../{ => samsung}/s5p-mfc/regs-mfc-v7.h       |  0
 .../{ => samsung}/s5p-mfc/regs-mfc-v8.h       |  0
 .../platform/{ => samsung}/s5p-mfc/regs-mfc.h |  0
 .../platform/{ => samsung}/s5p-mfc/s5p_mfc.c  |  0
 .../{ => samsung}/s5p-mfc/s5p_mfc_cmd.c       |  2 +-
 .../{ => samsung}/s5p-mfc/s5p_mfc_cmd.h       |  2 +-
 .../{ => samsung}/s5p-mfc/s5p_mfc_cmd_v5.c    |  2 +-
 .../{ => samsung}/s5p-mfc/s5p_mfc_cmd_v5.h    |  2 +-
 .../{ => samsung}/s5p-mfc/s5p_mfc_cmd_v6.c    |  2 +-
 .../{ => samsung}/s5p-mfc/s5p_mfc_cmd_v6.h    |  2 +-
 .../{ => samsung}/s5p-mfc/s5p_mfc_common.h    |  0
 .../{ => samsung}/s5p-mfc/s5p_mfc_ctrl.c      |  2 +-
 .../{ => samsung}/s5p-mfc/s5p_mfc_ctrl.h      |  2 +-
 .../{ => samsung}/s5p-mfc/s5p_mfc_debug.h     |  2 +-
 .../{ => samsung}/s5p-mfc/s5p_mfc_dec.c       |  2 +-
 .../{ => samsung}/s5p-mfc/s5p_mfc_dec.h       |  2 +-
 .../{ => samsung}/s5p-mfc/s5p_mfc_enc.c       |  2 +-
 .../{ => samsung}/s5p-mfc/s5p_mfc_enc.h       |  2 +-
 .../{ => samsung}/s5p-mfc/s5p_mfc_intr.c      |  0
 .../{ => samsung}/s5p-mfc/s5p_mfc_intr.h      |  0
 .../{ => samsung}/s5p-mfc/s5p_mfc_iommu.h     |  0
 .../{ => samsung}/s5p-mfc/s5p_mfc_opr.c       |  2 +-
 .../{ => samsung}/s5p-mfc/s5p_mfc_opr.h       |  2 +-
 .../{ => samsung}/s5p-mfc/s5p_mfc_opr_v5.c    |  0
 .../{ => samsung}/s5p-mfc/s5p_mfc_opr_v5.h    |  0
 .../{ => samsung}/s5p-mfc/s5p_mfc_opr_v6.c    |  2 +-
 .../{ => samsung}/s5p-mfc/s5p_mfc_opr_v6.h    |  2 +-
 .../{ => samsung}/s5p-mfc/s5p_mfc_pm.c        |  2 +-
 .../{ => samsung}/s5p-mfc/s5p_mfc_pm.h        |  2 +-
 drivers/media/platform/sti/Kconfig            |  4 ++
 drivers/media/platform/sti/Makefile           |  6 +++
 .../media/platform/{ => sti}/stm32/Kconfig    |  0
 .../media/platform/{ => sti}/stm32/Makefile   |  0
 .../platform/{ => sti}/stm32/dma2d/dma2d-hw.c |  0
 .../{ => sti}/stm32/dma2d/dma2d-regs.h        |  0
 .../platform/{ => sti}/stm32/dma2d/dma2d.c    |  0
 .../platform/{ => sti}/stm32/dma2d/dma2d.h    |  0
 .../platform/{ => sti}/stm32/stm32-dcmi.c     |  0
 drivers/media/platform/sunxi/Kconfig          |  6 ---
 drivers/media/platform/ti/Kconfig             |  9 ++++
 drivers/media/platform/ti/Makefile            |  6 +++
 .../media/platform/{ => ti}/am437x/Kconfig    |  0
 .../media/platform/{ => ti}/am437x/Makefile   |  0
 .../platform/{ => ti}/am437x/am437x-vpfe.c    |  0
 .../platform/{ => ti}/am437x/am437x-vpfe.h    |  0
 .../{ => ti}/am437x/am437x-vpfe_regs.h        |  0
 .../media/platform/{ => ti}/davinci/Kconfig   |  0
 .../media/platform/{ => ti}/davinci/Makefile  |  0
 .../{ => ti}/davinci/ccdc_hw_device.h         |  0
 .../platform/{ => ti}/davinci/dm355_ccdc.c    |  0
 .../{ => ti}/davinci/dm355_ccdc_regs.h        |  0
 .../platform/{ => ti}/davinci/dm644x_ccdc.c   |  0
 .../{ => ti}/davinci/dm644x_ccdc_regs.h       |  0
 .../media/platform/{ => ti}/davinci/isif.c    |  0
 .../platform/{ => ti}/davinci/isif_regs.h     |  0
 .../media/platform/{ => ti}/davinci/vpbe.c    |  0
 .../platform/{ => ti}/davinci/vpbe_display.c  |  0
 .../platform/{ => ti}/davinci/vpbe_osd.c      |  0
 .../platform/{ => ti}/davinci/vpbe_osd_regs.h |  0
 .../platform/{ => ti}/davinci/vpbe_venc.c     |  0
 .../{ => ti}/davinci/vpbe_venc_regs.h         |  0
 .../platform/{ => ti}/davinci/vpfe_capture.c  |  0
 .../media/platform/{ => ti}/davinci/vpif.c    |  0
 .../media/platform/{ => ti}/davinci/vpif.h    |  0
 .../platform/{ => ti}/davinci/vpif_capture.c  |  0
 .../platform/{ => ti}/davinci/vpif_capture.h  |  0
 .../platform/{ => ti}/davinci/vpif_display.c  |  0
 .../platform/{ => ti}/davinci/vpif_display.h  |  0
 .../media/platform/{ => ti}/davinci/vpss.c    |  0
 drivers/media/platform/{ => ti}/omap/Kconfig  |  0
 drivers/media/platform/{ => ti}/omap/Makefile |  0
 .../media/platform/{ => ti}/omap/omap_vout.c  |  0
 .../platform/{ => ti}/omap/omap_vout_vrfb.c   |  0
 .../platform/{ => ti}/omap/omap_vout_vrfb.h   |  0
 .../platform/{ => ti}/omap/omap_voutdef.h     |  0
 .../platform/{ => ti}/omap/omap_voutlib.c     |  0
 .../platform/{ => ti}/omap/omap_voutlib.h     |  0
 .../media/platform/{ => ti}/omap3isp/Kconfig  |  0
 .../media/platform/{ => ti}/omap3isp/Makefile |  0
 .../{ => ti}/omap3isp/cfa_coef_table.h        |  0
 .../platform/{ => ti}/omap3isp/gamma_table.h  |  0
 .../media/platform/{ => ti}/omap3isp/isp.c    |  0
 .../media/platform/{ => ti}/omap3isp/isp.h    |  0
 .../platform/{ => ti}/omap3isp/ispccdc.c      |  0
 .../platform/{ => ti}/omap3isp/ispccdc.h      |  0
 .../platform/{ => ti}/omap3isp/ispccp2.c      |  0
 .../platform/{ => ti}/omap3isp/ispccp2.h      |  0
 .../platform/{ => ti}/omap3isp/ispcsi2.c      |  0
 .../platform/{ => ti}/omap3isp/ispcsi2.h      |  0
 .../platform/{ => ti}/omap3isp/ispcsiphy.c    |  0
 .../platform/{ => ti}/omap3isp/ispcsiphy.h    |  0
 .../media/platform/{ => ti}/omap3isp/isph3a.h |  0
 .../platform/{ => ti}/omap3isp/isph3a_aewb.c  |  0
 .../platform/{ => ti}/omap3isp/isph3a_af.c    |  0
 .../platform/{ => ti}/omap3isp/isphist.c      |  0
 .../platform/{ => ti}/omap3isp/isphist.h      |  0
 .../platform/{ => ti}/omap3isp/isppreview.c   |  0
 .../platform/{ => ti}/omap3isp/isppreview.h   |  0
 .../media/platform/{ => ti}/omap3isp/ispreg.h |  0
 .../platform/{ => ti}/omap3isp/ispresizer.c   |  0
 .../platform/{ => ti}/omap3isp/ispresizer.h   |  0
 .../platform/{ => ti}/omap3isp/ispstat.c      |  0
 .../platform/{ => ti}/omap3isp/ispstat.h      |  0
 .../platform/{ => ti}/omap3isp/ispvideo.c     |  0
 .../platform/{ => ti}/omap3isp/ispvideo.h     |  0
 .../{ => ti}/omap3isp/luma_enhance_table.h    |  0
 .../{ => ti}/omap3isp/noise_filter_table.h    |  0
 .../platform/{ => ti}/omap3isp/omap3isp.h     |  0
 .../media/platform/{ti-vpe => ti/vpe}/Kconfig |  0
 .../platform/{ti-vpe => ti/vpe}/Makefile      |  0
 .../{ti-vpe => ti/vpe}/cal-camerarx.c         |  0
 .../platform/{ti-vpe => ti/vpe}/cal-video.c   |  0
 .../media/platform/{ti-vpe => ti/vpe}/cal.c   |  0
 .../media/platform/{ti-vpe => ti/vpe}/cal.h   |  0
 .../platform/{ti-vpe => ti/vpe}/cal_regs.h    |  0
 .../media/platform/{ti-vpe => ti/vpe}/csc.c   |  0
 .../media/platform/{ti-vpe => ti/vpe}/csc.h   |  0
 .../media/platform/{ti-vpe => ti/vpe}/sc.c    |  0
 .../media/platform/{ti-vpe => ti/vpe}/sc.h    |  0
 .../platform/{ti-vpe => ti/vpe}/sc_coeff.h    |  0
 .../media/platform/{ti-vpe => ti/vpe}/vpdma.c |  0
 .../media/platform/{ti-vpe => ti/vpe}/vpdma.h |  0
 .../platform/{ti-vpe => ti/vpe}/vpdma_priv.h  |  0
 .../media/platform/{ti-vpe => ti/vpe}/vpe.c   |  0
 .../platform/{ti-vpe => ti/vpe}/vpe_regs.h    |  0
 drivers/media/platform/via/Kconfig            |  3 ++
 drivers/media/platform/xilinx/Kconfig         |  7 ++-
 389 files changed, 214 insertions(+), 167 deletions(-)
 create mode 100644 drivers/media/platform/allwinner/Kconfig
 rename drivers/media/platform/{sunxi => allwinner}/Makefile (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun4i-csi/Kconfig (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun4i-csi/Makefile (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun4i-csi/sun4i_csi.c (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun4i-csi/sun4i_csi.h (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun4i-csi/sun4i_dma.c (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun4i-csi/sun4i_v4l2.c (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun6i-csi/Kconfig (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun6i-csi/Makefile (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun6i-csi/sun6i_csi.c (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun6i-csi/sun6i_csi.h (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun6i-csi/sun6i_csi_reg.h (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun6i-csi/sun6i_video.c (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun6i-csi/sun6i_video.h (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun8i-di/Kconfig (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun8i-di/Makefile (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun8i-di/sun8i-di.c (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun8i-di/sun8i-di.h (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun8i-rotate/Kconfig (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun8i-rotate/Makefile (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun8i-rotate/sun8i-formats.h (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun8i-rotate/sun8i-rotate.h (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun8i-rotate/sun8i_formats.c (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun8i-rotate/sun8i_rotate.c (100%)
 create mode 100644 drivers/media/platform/amlogic/Kconfig
 create mode 100644 drivers/media/platform/amlogic/Makefile
 rename drivers/media/platform/{meson/ge2d => amlogic/meson-ge2d}/Kconfig (100%)
 rename drivers/media/platform/{meson/ge2d => amlogic/meson-ge2d}/Makefile (100%)
 rename drivers/media/platform/{meson/ge2d => amlogic/meson-ge2d}/ge2d-regs.h (100%)
 rename drivers/media/platform/{meson/ge2d => amlogic/meson-ge2d}/ge2d.c (100%)
 rename drivers/media/platform/{coda => chips-media}/Kconfig (94%)
 rename drivers/media/platform/{coda => chips-media}/Makefile (100%)
 rename drivers/media/platform/{coda => chips-media}/coda-bit.c (100%)
 rename drivers/media/platform/{coda => chips-media}/coda-common.c (100%)
 rename drivers/media/platform/{coda => chips-media}/coda-gdi.c (100%)
 rename drivers/media/platform/{coda => chips-media}/coda-h264.c (100%)
 rename drivers/media/platform/{coda => chips-media}/coda-jpeg.c (100%)
 rename drivers/media/platform/{coda => chips-media}/coda-mpeg2.c (100%)
 rename drivers/media/platform/{coda => chips-media}/coda-mpeg4.c (100%)
 rename drivers/media/platform/{coda => chips-media}/coda.h (100%)
 rename drivers/media/platform/{coda => chips-media}/coda_regs.h (99%)
 rename drivers/media/platform/{coda => chips-media}/imx-vdoa.c (100%)
 rename drivers/media/platform/{coda => chips-media}/imx-vdoa.h (100%)
 rename drivers/media/platform/{coda => chips-media}/trace.h (98%)
 rename drivers/media/platform/{marvell-ccic => marvell}/Kconfig (97%)
 rename drivers/media/platform/{marvell-ccic => marvell}/Makefile (100%)
 rename drivers/media/platform/{marvell-ccic => marvell}/cafe-driver.c (100%)
 rename drivers/media/platform/{marvell-ccic => marvell}/mcam-core.c (100%)
 rename drivers/media/platform/{marvell-ccic => marvell}/mcam-core.h (100%)
 rename drivers/media/platform/{marvell-ccic => marvell}/mmp-driver.c (100%)
 create mode 100644 drivers/media/platform/mediatek/Kconfig
 create mode 100644 drivers/media/platform/mediatek/Makefile
 rename drivers/media/platform/{ => mediatek}/mtk-jpeg/Kconfig (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-jpeg/Makefile (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-jpeg/mtk_jpeg_core.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-jpeg/mtk_jpeg_core.h (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-jpeg/mtk_jpeg_dec_hw.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-jpeg/mtk_jpeg_dec_hw.h (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-jpeg/mtk_jpeg_dec_parse.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-jpeg/mtk_jpeg_dec_parse.h (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-jpeg/mtk_jpeg_dec_reg.h (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-jpeg/mtk_jpeg_enc_hw.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-jpeg/mtk_jpeg_enc_hw.h (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-mdp/Kconfig (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-mdp/Makefile (77%)
 rename drivers/media/platform/{ => mediatek}/mtk-mdp/mtk_mdp_comp.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-mdp/mtk_mdp_comp.h (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-mdp/mtk_mdp_core.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-mdp/mtk_mdp_core.h (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-mdp/mtk_mdp_ipi.h (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-mdp/mtk_mdp_m2m.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-mdp/mtk_mdp_m2m.h (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-mdp/mtk_mdp_regs.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-mdp/mtk_mdp_regs.h (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-mdp/mtk_mdp_vpu.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-mdp/mtk_mdp_vpu.h (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/Kconfig (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/Makefile (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/mtk_vcodec_dec.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/mtk_vcodec_dec.h (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/mtk_vcodec_dec_drv.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/mtk_vcodec_dec_hw.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/mtk_vcodec_dec_hw.h (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/mtk_vcodec_dec_pm.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/mtk_vcodec_dec_pm.h (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/mtk_vcodec_dec_stateful.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/mtk_vcodec_dec_stateless.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/mtk_vcodec_drv.h (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/mtk_vcodec_enc.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/mtk_vcodec_enc.h (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/mtk_vcodec_enc_drv.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/mtk_vcodec_enc_pm.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/mtk_vcodec_enc_pm.h (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/mtk_vcodec_fw.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/mtk_vcodec_fw.h (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/mtk_vcodec_fw_priv.h (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/mtk_vcodec_fw_scp.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/mtk_vcodec_fw_vpu.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/mtk_vcodec_intr.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/mtk_vcodec_intr.h (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/mtk_vcodec_util.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/mtk_vcodec_util.h (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/vdec/vdec_h264_if.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/vdec/vdec_h264_req_if.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/vdec/vdec_vp8_if.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/vdec/vdec_vp9_if.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/vdec_drv_base.h (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/vdec_drv_if.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/vdec_drv_if.h (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/vdec_ipi_msg.h (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/vdec_msg_queue.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/vdec_msg_queue.h (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/vdec_vpu_if.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/vdec_vpu_if.h (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/venc/venc_h264_if.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/venc/venc_vp8_if.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/venc_drv_base.h (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/venc_drv_if.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/venc_drv_if.h (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/venc_ipi_msg.h (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/venc_vpu_if.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vcodec/venc_vpu_if.h (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vpu/Kconfig (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vpu/Makefile (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vpu/mtk_vpu.c (100%)
 rename drivers/media/platform/{ => mediatek}/mtk-vpu/mtk_vpu.h (100%)
 create mode 100644 drivers/media/platform/nvidia/Kconfig
 rename drivers/media/platform/{tegra/vde => nvidia/tegra-vde}/Kconfig (100%)
 rename drivers/media/platform/{tegra/vde => nvidia/tegra-vde}/Makefile (100%)
 rename drivers/media/platform/{tegra/vde => nvidia/tegra-vde}/dmabuf-cache.c (100%)
 rename drivers/media/platform/{tegra/vde => nvidia/tegra-vde}/h264.c (100%)
 rename drivers/media/platform/{tegra/vde => nvidia/tegra-vde}/iommu.c (100%)
 rename drivers/media/platform/{tegra/vde => nvidia/tegra-vde}/trace.h (97%)
 rename drivers/media/platform/{tegra/vde => nvidia/tegra-vde}/v4l2.c (100%)
 rename drivers/media/platform/{tegra/vde => nvidia/tegra-vde}/vde.c (100%)
 rename drivers/media/platform/{tegra/vde => nvidia/tegra-vde}/vde.h (100%)
 rename drivers/media/platform/{ => nxp}/amphion/Kconfig (100%)
 rename drivers/media/platform/{ => nxp}/amphion/Makefile (100%)
 rename drivers/media/platform/{ => nxp}/amphion/vdec.c (100%)
 rename drivers/media/platform/{ => nxp}/amphion/venc.c (100%)
 rename drivers/media/platform/{ => nxp}/amphion/vpu.h (100%)
 rename drivers/media/platform/{ => nxp}/amphion/vpu_cmds.c (100%)
 rename drivers/media/platform/{ => nxp}/amphion/vpu_cmds.h (100%)
 rename drivers/media/platform/{ => nxp}/amphion/vpu_codec.h (100%)
 rename drivers/media/platform/{ => nxp}/amphion/vpu_color.c (100%)
 rename drivers/media/platform/{ => nxp}/amphion/vpu_core.c (100%)
 rename drivers/media/platform/{ => nxp}/amphion/vpu_core.h (100%)
 rename drivers/media/platform/{ => nxp}/amphion/vpu_dbg.c (100%)
 rename drivers/media/platform/{ => nxp}/amphion/vpu_defs.h (100%)
 rename drivers/media/platform/{ => nxp}/amphion/vpu_drv.c (100%)
 rename drivers/media/platform/{ => nxp}/amphion/vpu_helpers.c (100%)
 rename drivers/media/platform/{ => nxp}/amphion/vpu_helpers.h (100%)
 rename drivers/media/platform/{ => nxp}/amphion/vpu_imx8q.c (100%)
 rename drivers/media/platform/{ => nxp}/amphion/vpu_imx8q.h (100%)
 rename drivers/media/platform/{ => nxp}/amphion/vpu_malone.c (100%)
 rename drivers/media/platform/{ => nxp}/amphion/vpu_malone.h (100%)
 rename drivers/media/platform/{ => nxp}/amphion/vpu_mbox.c (100%)
 rename drivers/media/platform/{ => nxp}/amphion/vpu_mbox.h (100%)
 rename drivers/media/platform/{ => nxp}/amphion/vpu_msgs.c (100%)
 rename drivers/media/platform/{ => nxp}/amphion/vpu_msgs.h (100%)
 rename drivers/media/platform/{ => nxp}/amphion/vpu_rpc.c (100%)
 rename drivers/media/platform/{ => nxp}/amphion/vpu_rpc.h (100%)
 rename drivers/media/platform/{ => nxp}/amphion/vpu_v4l2.c (100%)
 rename drivers/media/platform/{ => nxp}/amphion/vpu_v4l2.h (100%)
 rename drivers/media/platform/{ => nxp}/amphion/vpu_windsor.c (100%)
 rename drivers/media/platform/{ => nxp}/amphion/vpu_windsor.h (100%)
 create mode 100644 drivers/media/platform/qcom/Makefile
 create mode 100644 drivers/media/platform/rockchip/Makefile
 create mode 100644 drivers/media/platform/samsung/Kconfig
 create mode 100644 drivers/media/platform/samsung/Makefile
 rename drivers/media/platform/{ => samsung}/exynos-gsc/Kconfig (100%)
 rename drivers/media/platform/{ => samsung}/exynos-gsc/Makefile (100%)
 rename drivers/media/platform/{ => samsung}/exynos-gsc/gsc-core.c (100%)
 rename drivers/media/platform/{ => samsung}/exynos-gsc/gsc-core.h (100%)
 rename drivers/media/platform/{ => samsung}/exynos-gsc/gsc-m2m.c (100%)
 rename drivers/media/platform/{ => samsung}/exynos-gsc/gsc-regs.c (100%)
 rename drivers/media/platform/{ => samsung}/exynos-gsc/gsc-regs.h (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/Kconfig (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/Makefile (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/common.c (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/common.h (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-capture.c (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-core.c (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-core.h (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-is-command.h (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-is-errno.c (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-is-errno.h (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-is-i2c.c (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-is-i2c.h (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-is-param.c (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-is-param.h (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-is-regs.c (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-is-regs.h (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-is-sensor.c (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-is-sensor.h (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-is.c (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-is.h (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-isp-video.c (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-isp-video.h (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-isp.c (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-isp.h (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-lite-reg.c (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-lite-reg.h (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-lite.c (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-lite.h (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-m2m.c (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-reg.c (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-reg.h (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/media-dev.c (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/media-dev.h (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/mipi-csis.c (100%)
 rename drivers/media/platform/{ => samsung}/exynos4-is/mipi-csis.h (100%)
 rename drivers/media/platform/{ => samsung}/s3c-camif/Kconfig (100%)
 rename drivers/media/platform/{ => samsung}/s3c-camif/Makefile (100%)
 rename drivers/media/platform/{ => samsung}/s3c-camif/camif-capture.c (100%)
 rename drivers/media/platform/{ => samsung}/s3c-camif/camif-core.c (100%)
 rename drivers/media/platform/{ => samsung}/s3c-camif/camif-core.h (100%)
 rename drivers/media/platform/{ => samsung}/s3c-camif/camif-regs.c (100%)
 rename drivers/media/platform/{ => samsung}/s3c-camif/camif-regs.h (100%)
 rename drivers/media/platform/{ => samsung}/s5p-g2d/Kconfig (100%)
 rename drivers/media/platform/{ => samsung}/s5p-g2d/Makefile (100%)
 rename drivers/media/platform/{ => samsung}/s5p-g2d/g2d-hw.c (100%)
 rename drivers/media/platform/{ => samsung}/s5p-g2d/g2d-regs.h (100%)
 rename drivers/media/platform/{ => samsung}/s5p-g2d/g2d.c (100%)
 rename drivers/media/platform/{ => samsung}/s5p-g2d/g2d.h (100%)
 rename drivers/media/platform/{ => samsung}/s5p-jpeg/Kconfig (100%)
 rename drivers/media/platform/{ => samsung}/s5p-jpeg/Makefile (100%)
 rename drivers/media/platform/{ => samsung}/s5p-jpeg/jpeg-core.c (99%)
 rename drivers/media/platform/{ => samsung}/s5p-jpeg/jpeg-core.h (99%)
 rename drivers/media/platform/{ => samsung}/s5p-jpeg/jpeg-hw-exynos3250.c (100%)
 rename drivers/media/platform/{ => samsung}/s5p-jpeg/jpeg-hw-exynos3250.h (97%)
 rename drivers/media/platform/{ => samsung}/s5p-jpeg/jpeg-hw-exynos4.c (100%)
 rename drivers/media/platform/{ => samsung}/s5p-jpeg/jpeg-hw-exynos4.h (100%)
 rename drivers/media/platform/{ => samsung}/s5p-jpeg/jpeg-hw-s5p.c (99%)
 rename drivers/media/platform/{ => samsung}/s5p-jpeg/jpeg-hw-s5p.h (97%)
 rename drivers/media/platform/{ => samsung}/s5p-jpeg/jpeg-regs.h (99%)
 rename drivers/media/platform/{ => samsung}/s5p-mfc/Kconfig (100%)
 rename drivers/media/platform/{ => samsung}/s5p-mfc/Makefile (100%)
 rename drivers/media/platform/{ => samsung}/s5p-mfc/regs-mfc-v10.h (100%)
 rename drivers/media/platform/{ => samsung}/s5p-mfc/regs-mfc-v6.h (100%)
 rename drivers/media/platform/{ => samsung}/s5p-mfc/regs-mfc-v7.h (100%)
 rename drivers/media/platform/{ => samsung}/s5p-mfc/regs-mfc-v8.h (100%)
 rename drivers/media/platform/{ => samsung}/s5p-mfc/regs-mfc.h (100%)
 rename drivers/media/platform/{ => samsung}/s5p-mfc/s5p_mfc.c (100%)
 rename drivers/media/platform/{ => samsung}/s5p-mfc/s5p_mfc_cmd.c (89%)
 rename drivers/media/platform/{ => samsung}/s5p-mfc/s5p_mfc_cmd.h (92%)
 rename drivers/media/platform/{ => samsung}/s5p-mfc/s5p_mfc_cmd_v5.c (98%)
 rename drivers/media/platform/{ => samsung}/s5p-mfc/s5p_mfc_cmd_v5.h (82%)
 rename drivers/media/platform/{ => samsung}/s5p-mfc/s5p_mfc_cmd_v6.c (98%)
 rename drivers/media/platform/{ => samsung}/s5p-mfc/s5p_mfc_cmd_v6.h (82%)
 rename drivers/media/platform/{ => samsung}/s5p-mfc/s5p_mfc_common.h (100%)
 rename drivers/media/platform/{ => samsung}/s5p-mfc/s5p_mfc_ctrl.c (99%)
 rename drivers/media/platform/{ => samsung}/s5p-mfc/s5p_mfc_ctrl.h (92%)
 rename drivers/media/platform/{ => samsung}/s5p-mfc/s5p_mfc_debug.h (95%)
 rename drivers/media/platform/{ => samsung}/s5p-mfc/s5p_mfc_dec.c (99%)
 rename drivers/media/platform/{ => samsung}/s5p-mfc/s5p_mfc_dec.h (90%)
 rename drivers/media/platform/{ => samsung}/s5p-mfc/s5p_mfc_enc.c (99%)
 rename drivers/media/platform/{ => samsung}/s5p-mfc/s5p_mfc_enc.h (90%)
 rename drivers/media/platform/{ => samsung}/s5p-mfc/s5p_mfc_intr.c (100%)
 rename drivers/media/platform/{ => samsung}/s5p-mfc/s5p_mfc_intr.h (100%)
 rename drivers/media/platform/{ => samsung}/s5p-mfc/s5p_mfc_iommu.h (100%)
 rename drivers/media/platform/{ => samsung}/s5p-mfc/s5p_mfc_opr.c (98%)
 rename drivers/media/platform/{ => samsung}/s5p-mfc/s5p_mfc_opr.h (99%)
 rename drivers/media/platform/{ => samsung}/s5p-mfc/s5p_mfc_opr_v5.c (100%)
 rename drivers/media/platform/{ => samsung}/s5p-mfc/s5p_mfc_opr_v5.h (100%)
 rename drivers/media/platform/{ => samsung}/s5p-mfc/s5p_mfc_opr_v6.c (99%)
 rename drivers/media/platform/{ => samsung}/s5p-mfc/s5p_mfc_opr_v6.h (96%)
 rename drivers/media/platform/{ => samsung}/s5p-mfc/s5p_mfc_pm.c (97%)
 rename drivers/media/platform/{ => samsung}/s5p-mfc/s5p_mfc_pm.h (87%)
 create mode 100644 drivers/media/platform/sti/Makefile
 rename drivers/media/platform/{ => sti}/stm32/Kconfig (100%)
 rename drivers/media/platform/{ => sti}/stm32/Makefile (100%)
 rename drivers/media/platform/{ => sti}/stm32/dma2d/dma2d-hw.c (100%)
 rename drivers/media/platform/{ => sti}/stm32/dma2d/dma2d-regs.h (100%)
 rename drivers/media/platform/{ => sti}/stm32/dma2d/dma2d.c (100%)
 rename drivers/media/platform/{ => sti}/stm32/dma2d/dma2d.h (100%)
 rename drivers/media/platform/{ => sti}/stm32/stm32-dcmi.c (100%)
 delete mode 100644 drivers/media/platform/sunxi/Kconfig
 create mode 100644 drivers/media/platform/ti/Kconfig
 create mode 100644 drivers/media/platform/ti/Makefile
 rename drivers/media/platform/{ => ti}/am437x/Kconfig (100%)
 rename drivers/media/platform/{ => ti}/am437x/Makefile (100%)
 rename drivers/media/platform/{ => ti}/am437x/am437x-vpfe.c (100%)
 rename drivers/media/platform/{ => ti}/am437x/am437x-vpfe.h (100%)
 rename drivers/media/platform/{ => ti}/am437x/am437x-vpfe_regs.h (100%)
 rename drivers/media/platform/{ => ti}/davinci/Kconfig (100%)
 rename drivers/media/platform/{ => ti}/davinci/Makefile (100%)
 rename drivers/media/platform/{ => ti}/davinci/ccdc_hw_device.h (100%)
 rename drivers/media/platform/{ => ti}/davinci/dm355_ccdc.c (100%)
 rename drivers/media/platform/{ => ti}/davinci/dm355_ccdc_regs.h (100%)
 rename drivers/media/platform/{ => ti}/davinci/dm644x_ccdc.c (100%)
 rename drivers/media/platform/{ => ti}/davinci/dm644x_ccdc_regs.h (100%)
 rename drivers/media/platform/{ => ti}/davinci/isif.c (100%)
 rename drivers/media/platform/{ => ti}/davinci/isif_regs.h (100%)
 rename drivers/media/platform/{ => ti}/davinci/vpbe.c (100%)
 rename drivers/media/platform/{ => ti}/davinci/vpbe_display.c (100%)
 rename drivers/media/platform/{ => ti}/davinci/vpbe_osd.c (100%)
 rename drivers/media/platform/{ => ti}/davinci/vpbe_osd_regs.h (100%)
 rename drivers/media/platform/{ => ti}/davinci/vpbe_venc.c (100%)
 rename drivers/media/platform/{ => ti}/davinci/vpbe_venc_regs.h (100%)
 rename drivers/media/platform/{ => ti}/davinci/vpfe_capture.c (100%)
 rename drivers/media/platform/{ => ti}/davinci/vpif.c (100%)
 rename drivers/media/platform/{ => ti}/davinci/vpif.h (100%)
 rename drivers/media/platform/{ => ti}/davinci/vpif_capture.c (100%)
 rename drivers/media/platform/{ => ti}/davinci/vpif_capture.h (100%)
 rename drivers/media/platform/{ => ti}/davinci/vpif_display.c (100%)
 rename drivers/media/platform/{ => ti}/davinci/vpif_display.h (100%)
 rename drivers/media/platform/{ => ti}/davinci/vpss.c (100%)
 rename drivers/media/platform/{ => ti}/omap/Kconfig (100%)
 rename drivers/media/platform/{ => ti}/omap/Makefile (100%)
 rename drivers/media/platform/{ => ti}/omap/omap_vout.c (100%)
 rename drivers/media/platform/{ => ti}/omap/omap_vout_vrfb.c (100%)
 rename drivers/media/platform/{ => ti}/omap/omap_vout_vrfb.h (100%)
 rename drivers/media/platform/{ => ti}/omap/omap_voutdef.h (100%)
 rename drivers/media/platform/{ => ti}/omap/omap_voutlib.c (100%)
 rename drivers/media/platform/{ => ti}/omap/omap_voutlib.h (100%)
 rename drivers/media/platform/{ => ti}/omap3isp/Kconfig (100%)
 rename drivers/media/platform/{ => ti}/omap3isp/Makefile (100%)
 rename drivers/media/platform/{ => ti}/omap3isp/cfa_coef_table.h (100%)
 rename drivers/media/platform/{ => ti}/omap3isp/gamma_table.h (100%)
 rename drivers/media/platform/{ => ti}/omap3isp/isp.c (100%)
 rename drivers/media/platform/{ => ti}/omap3isp/isp.h (100%)
 rename drivers/media/platform/{ => ti}/omap3isp/ispccdc.c (100%)
 rename drivers/media/platform/{ => ti}/omap3isp/ispccdc.h (100%)
 rename drivers/media/platform/{ => ti}/omap3isp/ispccp2.c (100%)
 rename drivers/media/platform/{ => ti}/omap3isp/ispccp2.h (100%)
 rename drivers/media/platform/{ => ti}/omap3isp/ispcsi2.c (100%)
 rename drivers/media/platform/{ => ti}/omap3isp/ispcsi2.h (100%)
 rename drivers/media/platform/{ => ti}/omap3isp/ispcsiphy.c (100%)
 rename drivers/media/platform/{ => ti}/omap3isp/ispcsiphy.h (100%)
 rename drivers/media/platform/{ => ti}/omap3isp/isph3a.h (100%)
 rename drivers/media/platform/{ => ti}/omap3isp/isph3a_aewb.c (100%)
 rename drivers/media/platform/{ => ti}/omap3isp/isph3a_af.c (100%)
 rename drivers/media/platform/{ => ti}/omap3isp/isphist.c (100%)
 rename drivers/media/platform/{ => ti}/omap3isp/isphist.h (100%)
 rename drivers/media/platform/{ => ti}/omap3isp/isppreview.c (100%)
 rename drivers/media/platform/{ => ti}/omap3isp/isppreview.h (100%)
 rename drivers/media/platform/{ => ti}/omap3isp/ispreg.h (100%)
 rename drivers/media/platform/{ => ti}/omap3isp/ispresizer.c (100%)
 rename drivers/media/platform/{ => ti}/omap3isp/ispresizer.h (100%)
 rename drivers/media/platform/{ => ti}/omap3isp/ispstat.c (100%)
 rename drivers/media/platform/{ => ti}/omap3isp/ispstat.h (100%)
 rename drivers/media/platform/{ => ti}/omap3isp/ispvideo.c (100%)
 rename drivers/media/platform/{ => ti}/omap3isp/ispvideo.h (100%)
 rename drivers/media/platform/{ => ti}/omap3isp/luma_enhance_table.h (100%)
 rename drivers/media/platform/{ => ti}/omap3isp/noise_filter_table.h (100%)
 rename drivers/media/platform/{ => ti}/omap3isp/omap3isp.h (100%)
 rename drivers/media/platform/{ti-vpe => ti/vpe}/Kconfig (100%)
 rename drivers/media/platform/{ti-vpe => ti/vpe}/Makefile (100%)
 rename drivers/media/platform/{ti-vpe => ti/vpe}/cal-camerarx.c (100%)
 rename drivers/media/platform/{ti-vpe => ti/vpe}/cal-video.c (100%)
 rename drivers/media/platform/{ti-vpe => ti/vpe}/cal.c (100%)
 rename drivers/media/platform/{ti-vpe => ti/vpe}/cal.h (100%)
 rename drivers/media/platform/{ti-vpe => ti/vpe}/cal_regs.h (100%)
 rename drivers/media/platform/{ti-vpe => ti/vpe}/csc.c (100%)
 rename drivers/media/platform/{ti-vpe => ti/vpe}/csc.h (100%)
 rename drivers/media/platform/{ti-vpe => ti/vpe}/sc.c (100%)
 rename drivers/media/platform/{ti-vpe => ti/vpe}/sc.h (100%)
 rename drivers/media/platform/{ti-vpe => ti/vpe}/sc_coeff.h (100%)
 rename drivers/media/platform/{ti-vpe => ti/vpe}/vpdma.c (100%)
 rename drivers/media/platform/{ti-vpe => ti/vpe}/vpdma.h (100%)
 rename drivers/media/platform/{ti-vpe => ti/vpe}/vpdma_priv.h (100%)
 rename drivers/media/platform/{ti-vpe => ti/vpe}/vpe.c (100%)
 rename drivers/media/platform/{ti-vpe => ti/vpe}/vpe_regs.h (100%)

Comments

Mauro Carvalho Chehab March 13, 2022, 11 a.m. UTC | #1
Em Sun, 13 Mar 2022 11:51:41 +0100
Mauro Carvalho Chehab <mchehab@kernel.org> escreveu:

> This series comes after the one I sent earlier today sorting media/platform Makefile and Kconfig.
> 
> It basically groups all drivers per vendor, ensuring that each vendor has a Makefile/Kconfig
> pair.
> 
> The end goal is to keep the platform Makefile/Kconfig clean and easier to maintain, less
> prune to errors. After applying both series, the size of such files were drastically reduced:
> 
> 	 drivers/media/platform/Kconfig  |  731 ++------------------------------
> 	 drivers/media/platform/Makefile |  115 +----
> 	 2 files changed, 78 insertions(+), 768 deletions(-)
> 
> Mauro Carvalho Chehab (24):
>   media: platform: rename coda/ to chips-media/
>   media: platform: rename marvell-ccic/ to marvell/
>   media: platform: rename meson/ge2d/ to amlogic/meson-ge2d/
>   media: platform: rename mtk-jpeg/ to mediatek/mtk-jpeg/
>   media: platform: rename mtk-mdp/ to mediatek/mtk-mdp/
>   media: platform: rename mtk-vcodec/ to mediatek/mtk-vcodec/
>   media: platform: rename mtk-vpu/ to mediatek/mtk-vpu/
>   media: platform: rename sunxi/ to allwinner/
>   media: platform: rename tegra/vde/ to nvidia/tegra-vde/
>   media: platform: rename amphion/ to nxp/amphion/
>   media: platform: rename exynos4-is/ to samsung/exynos4-is/
>   media: platform: rename exynos-gsc/ to samsung/exynos-gsc/
>   media: platform: rename s3c-camif/ to samsung/s3c-camif/
>   media: platform: rename s5p-g2d/ to samsung/s5p-g2d/
>   media: platform: rename s5p-jpeg/ to samsung/s5p-jpeg/
>   media: platform: rename s5p-mfc/ to samsung/s5p-mfc/
>   media: platform: rename stm32/ to sti/stm32/
>   media: platform: rename am437x/ to ti/am437x/
>   media: platform: rename davinci/ to ti/davinci/
>   media: platform: rename omap3isp/ to ti/omap3isp/
>   media: platform: rename omap/ to ti/omap/
>   media: platform: rename ti-vpe/ to ti/vpe/
>   media: platform: Create vendor/{Makefile,Kconfig} files

Worth mention that, while the above changes are really trivial, it is
no fun to do them individually. It is also subject to errors.

So, after manually doing a couple of them, I decided to revert
to the original state and do it via the script below, checking
the patches and editing the last one.

Thanks,
Mauro

---

#!/bin/bash -e

export LC_ALL=C # Needed by sort

TMP=$(mktemp /tmp/rename.XXXXXXXXX)

trap 'catch $LINENO' ERR SIGINT
catch()
{
	echo "Error on line $1"
	rm $TMP || true
	exit 1
}

sort_makefile()
{
	# sort Makefile
	sed '/^obj-y/Q' drivers/media/platform/Makefile> $TMP
	grep "^obj-y" drivers/media/platform/Makefile |sort | uniq >> $TMP
	cat <<EOF >> $TMP

# Please place here only ancillary drivers that aren't SoC-specific
# Please keep it alphabetically sorted by Kconfig name
# (e. g. LC_ALL=C sort Makefile)
obj-\$(CONFIG_VIDEO_MEM2MEM_DEINTERLACE)	+= m2m-deinterlace.o
obj-\$(CONFIG_VIDEO_MUX)			+= video-mux.o
EOF
	mv $TMP drivers/media/platform/Makefile
}

sort_kconfig()
{
	# sort Kconfig
	sed '/^source/Q' drivers/media/platform/Kconfig> $TMP
	grep "^source" drivers/media/platform/Kconfig |sort | uniq >> $TMP
	cat <<EOF >> $TMP

endif # MEDIA_PLATFORM_DRIVERS
EOF

	mv $TMP drivers/media/platform/Kconfig
}

do_rename_vendor()
{
	old=$(echo $1 |perl -ne 's,/$,,; print $_')
	new=$(echo $2 |perl -ne 's,/$,,; print $_')

	echo "$old -> $new"

	mkdir -p dirname drivers/media/platform/$new

	git mv drivers/media/platform/$old/* drivers/media/platform/$new/

	sed s,$old/,$new/, -i $(find drivers/media/platform/ -name Kconfig) $(find drivers/media/platform/ -name Makefile)
	sed s,drivers/media/platform/$old,drivers/media/platform/$new, -i $(git grep -l drivers/media/platform/$old) || true

	# Remove obj files, to make the directory cleaner
	rm -rf drivers/media/platform/$old/ || true

	sort_makefile
	sort_kconfig

	cat <<EOF >> $TMP
media: platform: rename $old/ to $new/

As the end goal is to have platform drivers split by vendor,
rename $old/ to $new/.
EOF

	git commit -as -m "$(cat $TMP)" --no-edit
}

do_rename_vendor coda chips-media
do_rename_vendor marvell-ccic/ marvell/
do_rename_vendor meson/ge2d/ amlogic/meson-ge2d/
do_rename_vendor mtk-jpeg mediatek/mtk-jpeg
do_rename_vendor mtk-mdp mediatek/mtk-mdp
do_rename_vendor mtk-vcodec mediatek/mtk-vcodec
do_rename_vendor mtk-vpu mediatek/mtk-vpu
do_rename_vendor sunxi/ allwinner/
do_rename_vendor tegra/vde nvidia/tegra-vde
do_rename_vendor amphion nxp/amphion
do_rename_vendor exynos4-is/ samsung/exynos4-is/
do_rename_vendor exynos-gsc samsung/exynos-gsc
do_rename_vendor s3c-camif samsung/s3c-camif
do_rename_vendor s5p-g2d samsung/s5p-g2d
do_rename_vendor s5p-jpeg samsung/s5p-jpeg
do_rename_vendor s5p-mfc samsung/s5p-mfc
do_rename_vendor stm32 sti/stm32
do_rename_vendor am437x/ ti/am437x/
do_rename_vendor davinci ti/davinci
do_rename_vendor omap3isp ti/omap3isp
do_rename_vendor omap ti/omap
do_rename_vendor ti-vpe ti/vpe

# Create or update drivers/media/platform/*/Kconfig

IFS=$'\n'

# Fixup Kconfig files
for i in $(cat drivers/media/platform/Kconfig|perl -ne 'if (m,platform/([^/]+)/([^/]+)/Kconfig,) { print "$1 $2\n" }'); do
        echo "Handling $i Kconfig entries"

        a=$(echo $i|cut -d' ' -f1)
        b=$(echo $i|cut -d' ' -f2)

	kconfig="drivers/media/platform/$a/$b/Kconfig"
	parent="drivers/media/platform/$a/Kconfig"

        if [ ! -e $parent ]; then
                echo "creating $parent..."
                echo "# SPDX-License-Identifier: GPL-2.0" > $parent
		git add $parent
        fi

        echo "source \"$kconfig\"" >> drivers/media/platform/$a/Kconfig
        echo "source \"$parent\"" >> drivers/media/platform/Kconfig

        sed s,$kconfig,$parent, -i drivers/media/platform/Kconfig

        echo "sorting..."
	sort_kconfig
done

# Create or update drivers/media/platform/*/Makefile

for i in $(cat drivers/media/platform/Makefile|perl -ne 'if (m,.*=\s*([^/]+)/([^/]+)/,) { print "$1 $2\n" }'); do
        echo "Handling $i Makefile entries"

        a=$(echo $i|cut -d' ' -f1)
        b=$(echo $i|cut -d' ' -f2)

        make="$a/$b/"
        parent="$a/"

        if [ ! -e drivers/media/platform/$a/Makefile ]; then
                echo "creating $parent..."
                echo "# SPDX-License-Identifier: GPL-2.0" > drivers/media/platform/$a/Makefile
                git add drivers/media/platform/$a/Makefile
        fi
        echo "obj-y += $b/" >> drivers/media/platform/$a/Makefile
        echo "obj-y += $parent" >> drivers/media/platform/Makefile

        sed s,$make\$,$parent, -i drivers/media/platform/Makefile
done

sort_kconfig
sort_makefile

	cat <<EOF >> $TMP
media: platform: Create vendor/{Makefile,Kconfig} files

Instead of placing multiple per-vendor entries at the
platform/{Makefile,Kconfig}, create them at the per-vendor
directories.
EOF

git commit -as -m "$(cat $TMP)" --no-edit