media: starfive: Support starfive platfrom driver build into module
authorliuxl0327 <liuxl0327@starfivetech.com>
Thu, 31 Mar 2022 03:05:45 +0000 (11:05 +0800)
committermason.huo <mason.huo@starfivetech.com>
Fri, 1 Jul 2022 07:05:39 +0000 (15:05 +0800)
To support ISP usr mode debugging, support starfive v4l2 driver for kernel
module.
The starfive v4l2 driver is built in kernel by default,
user needs to modify the kernel deconfig to support kernel module.

Signed-off-by: mason.huo <mason.huo@starfivetech.com>
drivers/media/platform/starfive/Kconfig
drivers/media/platform/starfive/Makefile [changed mode: 0755->0644]
drivers/media/platform/starfive/v4l2_driver/stfcamss.c

index b885804..4929912 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 config VIN_SENSOR_OV5640
-       bool "VIN SENSOR support OV5640"
+       tristate "VIN SENSOR support OV5640"
        depends on VIDEO_STF_VIN
        select V4L2_FWNODE
        default n
@@ -11,7 +11,7 @@ config VIN_SENSOR_OV5640
          Say Y here if you want to have support for VIN sensor OV5640
 
 config VIN_SENSOR_SC2235
-       bool "VIN SENSOR support SC2235"
+       tristate "VIN SENSOR support SC2235"
        depends on VIDEO_STF_VIN
        select V4L2_FWNODE
        default n
@@ -19,15 +19,15 @@ config VIN_SENSOR_SC2235
          Say Y here if you want to have support for VIN sensor SC2235
 
 config VIN_SENSOR_OV4689
-       bool "VIN SENSOR support OV4689"
+       tristate "VIN SENSOR support OV4689"
        depends on VIDEO_STF_VIN
        select V4L2_FWNODE
        default n
        help
          Say Y here if you want to have support for VIN sensor OV4689
 
-config VIN_SENSOR_OV13850
-       bool "VIN SENSOR support OV13850"
+config VIN_SENSOR_IMX219
+       tristate "VIN SENSOR support imx219"
        depends on VIDEO_STF_VIN
        select V4L2_FWNODE
        default n
old mode 100755 (executable)
new mode 100644 (file)
index 24aa8e4..a1d46ed
@@ -14,7 +14,7 @@ obj-$(CONFIG_VIN_SENSOR_OV4689) += v4l2_driver/ov4689_mipi.o
 obj-$(CONFIG_VIN_SENSOR_OV13850) += v4l2_driver/ov13850_mipi.o
 obj-$(CONFIG_VIN_SENSOR_IMX219) += v4l2_driver/imx219_mipi.o
 
-obj-$(CONFIG_VIDEO_STF_VIN) +=         v4l2_driver/stfcamss.o \
+starfivecamss-objs +=  v4l2_driver/stfcamss.o \
                                v4l2_driver/stf_event.o \
                                v4l2_driver/stf_dvp.o   \
                                v4l2_driver/stf_csi.o   \
@@ -28,3 +28,6 @@ obj-$(CONFIG_VIDEO_STF_VIN) +=        v4l2_driver/stfcamss.o \
                                v4l2_driver/stf_isp_hw_ops.o \
                                v4l2_driver/stf_dvp_hw_ops.o \
                                v4l2_driver/stf_dmabuf.o
+
+
+obj-$(CONFIG_VIDEO_STF_VIN) += starfivecamss.o \
index 5bb4a86..9cfb8e0 100644 (file)
@@ -40,6 +40,8 @@ unsigned int stdbg_mask = 0x7F;
 unsigned int stdbg_level = ST_ERR;
 unsigned int stdbg_mask = 0x7F;
 #endif
+EXPORT_SYMBOL_GPL(stdbg_level);
+EXPORT_SYMBOL_GPL(stdbg_mask);
 
 static const struct reg_name mem_reg_name[] = {
 #ifndef CONFIG_VIDEO_CADENCE_CSI2RX