[PATCH v5 08/10] media: platform: broadcom: Move unicam driver to subdir

From: Jai Luthra

Date: Thu Sep 17 2026 - 04:35:43 EST


The BCM283x/BCM2711x SoCs capture camera frames using CSI-2, and
optionally process the raw frames using a VC4 firmware-based ISP block.

As the ISP driver will be added subsequently, move the files related to
the unicam driver to a separate subdirectory to ease distinction between
the two drivers' files.

Reviewed-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
Reviewed-by: Paul Elder <paul.elder@xxxxxxxxxxxxxxxx>
Tested-by: Paul Elder <paul.elder@xxxxxxxxxxxxxxxx>
Signed-off-by: Jai Luthra <jai.luthra@xxxxxxxxxxxxxxxx>
---
Changes in v4:
- Drop old paragraph in Kconfig that got copied from previous revision
---
MAINTAINERS | 2 +-
drivers/media/platform/broadcom/Kconfig | 17 ++---------------
drivers/media/platform/broadcom/Makefile | 2 +-
drivers/media/platform/broadcom/bcm2835-unicam/Kconfig | 18 ++++++++++++++++++
.../media/platform/broadcom/bcm2835-unicam/Makefile | 3 +++
.../{ => bcm2835-unicam}/bcm2835-unicam-regs.h | 0
.../broadcom/{ => bcm2835-unicam}/bcm2835-unicam.c | 0
7 files changed, 25 insertions(+), 17 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 0ac9a9d7b215..68ef4b2f9db6 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -5185,7 +5185,7 @@ M: Raspberry Pi Kernel Maintenance <kernel-list@xxxxxxxxxxxxxxx>
L: linux-media@xxxxxxxxxxxxxxx
S: Maintained
F: Documentation/devicetree/bindings/media/brcm,bcm2835-unicam.yaml
-F: drivers/media/platform/broadcom/bcm2835-unicam*
+F: drivers/media/platform/broadcom/bcm2835-unicam/*

BROADCOM BCM47XX MIPS ARCHITECTURE
M: Hauke Mehrtens <hauke@xxxxxxxxxx>
diff --git a/drivers/media/platform/broadcom/Kconfig b/drivers/media/platform/broadcom/Kconfig
index 93ba565d9a02..cab44885182c 100644
--- a/drivers/media/platform/broadcom/Kconfig
+++ b/drivers/media/platform/broadcom/Kconfig
@@ -1,18 +1,5 @@
# SPDX-License-Identifier: GPL-2.0

-config VIDEO_BCM2835_UNICAM
- tristate "Broadcom BCM283x/BCM271x Unicam video capture driver"
- depends on ARCH_BCM2835 || COMPILE_TEST
- depends on COMMON_CLK && PM
- depends on VIDEO_DEV
- select MEDIA_CONTROLLER
- select V4L2_FWNODE
- select VIDEO_V4L2_SUBDEV_API
- select VIDEOBUF2_DMA_CONTIG
- help
- Say Y here to enable support for the BCM283x/BCM271x CSI-2 receiver.
- This is a V4L2 driver that controls the CSI-2 receiver directly,
- independently from the VC4 firmware.
+comment "Broadcom BCM283x/BCM271x media platform drivers"

- To compile this driver as a module, choose M here. The module will be
- called bcm2835-unicam.
+source "drivers/media/platform/broadcom/bcm2835-unicam/Kconfig"
diff --git a/drivers/media/platform/broadcom/Makefile b/drivers/media/platform/broadcom/Makefile
index 03d2045aba2e..33a89bdb0029 100644
--- a/drivers/media/platform/broadcom/Makefile
+++ b/drivers/media/platform/broadcom/Makefile
@@ -1,3 +1,3 @@
# SPDX-License-Identifier: GPL-2.0

-obj-$(CONFIG_VIDEO_BCM2835_UNICAM) += bcm2835-unicam.o
+obj-y += bcm2835-unicam/
diff --git a/drivers/media/platform/broadcom/bcm2835-unicam/Kconfig b/drivers/media/platform/broadcom/bcm2835-unicam/Kconfig
new file mode 100644
index 000000000000..93ba565d9a02
--- /dev/null
+++ b/drivers/media/platform/broadcom/bcm2835-unicam/Kconfig
@@ -0,0 +1,18 @@
+# SPDX-License-Identifier: GPL-2.0
+
+config VIDEO_BCM2835_UNICAM
+ tristate "Broadcom BCM283x/BCM271x Unicam video capture driver"
+ depends on ARCH_BCM2835 || COMPILE_TEST
+ depends on COMMON_CLK && PM
+ depends on VIDEO_DEV
+ select MEDIA_CONTROLLER
+ select V4L2_FWNODE
+ select VIDEO_V4L2_SUBDEV_API
+ select VIDEOBUF2_DMA_CONTIG
+ help
+ Say Y here to enable support for the BCM283x/BCM271x CSI-2 receiver.
+ This is a V4L2 driver that controls the CSI-2 receiver directly,
+ independently from the VC4 firmware.
+
+ To compile this driver as a module, choose M here. The module will be
+ called bcm2835-unicam.
diff --git a/drivers/media/platform/broadcom/bcm2835-unicam/Makefile b/drivers/media/platform/broadcom/bcm2835-unicam/Makefile
new file mode 100644
index 000000000000..03d2045aba2e
--- /dev/null
+++ b/drivers/media/platform/broadcom/bcm2835-unicam/Makefile
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0
+
+obj-$(CONFIG_VIDEO_BCM2835_UNICAM) += bcm2835-unicam.o
diff --git a/drivers/media/platform/broadcom/bcm2835-unicam-regs.h b/drivers/media/platform/broadcom/bcm2835-unicam/bcm2835-unicam-regs.h
similarity index 100%
rename from drivers/media/platform/broadcom/bcm2835-unicam-regs.h
rename to drivers/media/platform/broadcom/bcm2835-unicam/bcm2835-unicam-regs.h
diff --git a/drivers/media/platform/broadcom/bcm2835-unicam.c b/drivers/media/platform/broadcom/bcm2835-unicam/bcm2835-unicam.c
similarity index 100%
rename from drivers/media/platform/broadcom/bcm2835-unicam.c
rename to drivers/media/platform/broadcom/bcm2835-unicam/bcm2835-unicam.c

--
2.55.0