Skip to contentSkip to conversation

SoC camera removal

PATCH In review Sakari Ailus 5 participants 27 messages Oct 30, 2018 – Nov 14, 2018

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover SoC camera removal

Hi everyone,

There's been some discussion on SoC camera removal and the idea has been to keep it around as long as the board code refers to it, to keep it compiling.

The references to SoC camera in the board code are effectively references to a single struct, struct soc_camera_link plus a few macros. The rest of the SoC camera framework is not really needed.

These patches remove the SoC camera framework and leave just the struct definition in place so the board files continue to compile. The references can then be removed later on, while the need to maintain over 16000 lines of non-working code will be gone immediately.

There are currently four instances of SoC camera references in the board files:

	arch/arm/mach-imx/mach-imx27_visstrim_m10.c
	arch/arm/mach-omap1/board-ams-delta.c
	arch/arm/mach-pxa/palmz72.c
	arch/arm/mach-pxa/pcm990-baseboard.c

I've compile tested them with the patchset for the affected machines.

If there's a need to revive old drivers, they can always be found in the git history. There's no need to put them to the staging branch.

Sakari Ailus (4):
tw9910: Unregister async subdev at device unbind
tw9910: No SoC camera dependency
SoC camera: Remove the framework and the drivers SoC camera: Tidy the header

 MAINTAINERS                                        |    8 -
 drivers/media/i2c/Kconfig                          |    8 -
 drivers/media/i2c/Makefile                         |    1 -
 drivers/media/i2c/soc_camera/Kconfig               |   66 -
 drivers/media/i2c/soc_camera/Makefile              |   10 -
 drivers/media/i2c/soc_camera/ov9640.h              |  208 --
 drivers/media/i2c/soc_camera/soc_mt9m001.c         |  757 -------
 drivers/media/i2c/soc_camera/soc_mt9t112.c         | 1157 -----------
 drivers/media/i2c/soc_camera/soc_mt9v022.c         | 1012 ---------
 drivers/media/i2c/soc_camera/soc_ov5642.c          | 1087 ----------
 drivers/media/i2c/soc_camera/soc_ov772x.c          | 1123 ----------
 drivers/media/i2c/soc_camera/soc_ov9640.c          |  738 -------
 drivers/media/i2c/soc_camera/soc_ov9740.c          |  996 ---------
 drivers/media/i2c/soc_camera/soc_rj54n1cb0c.c      | 1415 -------------
 drivers/media/i2c/soc_camera/soc_tw9910.c          |  999 ---------
 drivers/media/i2c/tw9910.c                         |    4 +-
 drivers/media/platform/Kconfig                     |    1 -
 drivers/media/platform/Makefile                    |    2 -
 drivers/media/platform/soc_camera/Kconfig          |   26 -
 drivers/media/platform/soc_camera/Makefile         |    9 -
 .../platform/soc_camera/sh_mobile_ceu_camera.c     | 1810 ----------------
 drivers/media/platform/soc_camera/soc_camera.c     | 2169 --------------------
 .../platform/soc_camera/soc_camera_platform.c      |  188 --
 drivers/media/platform/soc_camera/soc_mediabus.c   |  533 -----
 drivers/media/platform/soc_camera/soc_scale_crop.c |  426 ----
 drivers/media/platform/soc_camera/soc_scale_crop.h |   47 -
 drivers/staging/media/Kconfig                      |    4 -
 drivers/staging/media/Makefile                     |    2 -
 drivers/staging/media/imx074/Kconfig               |    5 -
 drivers/staging/media/imx074/Makefile              |    1 -
 drivers/staging/media/imx074/TODO                  |    5 -
 drivers/staging/media/imx074/imx074.c              |  496 -----
 drivers/staging/media/mt9t031/Kconfig              |    5 -
 drivers/staging/media/mt9t031/Makefile             |    1 -
 drivers/staging/media/mt9t031/TODO                 |    5 -
 drivers/staging/media/mt9t031/mt9t031.c            |  857 --------
 include/media/i2c/tw9910.h                         |    2 -
 include/media/soc_camera.h                         |  335 ---
 38 files changed, 3 insertions(+), 16515 deletions(-)
 delete mode 100644 drivers/media/i2c/soc_camera/Kconfig
 delete mode 100644 drivers/media/i2c/soc_camera/Makefile
 delete mode 100644 drivers/media/i2c/soc_camera/ov9640.h
 delete mode 100644 drivers/media/i2c/soc_camera/soc_mt9m001.c
 delete mode 100644 drivers/media/i2c/soc_camera/soc_mt9t112.c
 delete mode 100644 drivers/media/i2c/soc_camera/soc_mt9v022.c
 delete mode 100644 drivers/media/i2c/soc_camera/soc_ov5642.c
 delete mode 100644 drivers/media/i2c/soc_camera/soc_ov772x.c
 delete mode 100644 drivers/media/i2c/soc_camera/soc_ov9640.c
 delete mode 100644 drivers/media/i2c/soc_camera/soc_ov9740.c
 delete mode 100644 drivers/media/i2c/soc_camera/soc_rj54n1cb0c.c
 delete mode 100644 drivers/media/i2c/soc_camera/soc_tw9910.c
 delete mode 100644 drivers/media/platform/soc_camera/Kconfig
 delete mode 100644 drivers/media/platform/soc_camera/Makefile
 delete mode 100644 drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c
 delete mode 100644 drivers/media/platform/soc_camera/soc_camera.c
 delete mode 100644 drivers/media/platform/soc_camera/soc_camera_platform.c
 delete mode 100644 drivers/media/platform/soc_camera/soc_mediabus.c
 delete mode 100644 drivers/media/platform/soc_camera/soc_scale_crop.c
 delete mode 100644 drivers/media/platform/soc_camera/soc_scale_crop.h
 delete mode 100644 drivers/staging/media/imx074/Kconfig
 delete mode 100644 drivers/staging/media/imx074/Makefile
 delete mode 100644 drivers/staging/media/imx074/TODO
 delete mode 100644 drivers/staging/media/imx074/imx074.c
 delete mode 100644 drivers/staging/media/mt9t031/Kconfig
 delete mode 100644 drivers/staging/media/mt9t031/Makefile
 delete mode 100644 drivers/staging/media/mt9t031/TODO
 delete mode 100644 drivers/staging/media/mt9t031/mt9t031.c
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/4 tw9910: Unregister async subdev at device unbind

The async sub-device was added to the async list in probe but it was not removed in the driver's remove function. Fix this. Also unregister the async subdev before powering down the device.

---
 drivers/media/i2c/tw9910.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/media/i2c/tw9910.c +2 -1
index a54548cc4285..7087ce946af1 100644
@@ -997,10 +997,11 @@ static int tw9910_remove(struct i2c_client *client)
 {
 	struct tw9910_priv *priv = to_tw9910(client);
 
+	v4l2_async_unregister_subdev(&priv->subdev);
+
 	if (priv->pdn_gpio)
 		gpiod_put(priv->pdn_gpio);
 	clk_put(priv->clk);
-	v4l2_device_unregister_subdev(&priv->subdev);
 
 	return 0;
 }
Signature · 1 line
2.11.0
#2 lore raw

PATCH 2/4 tw9910: No SoC camera dependency

In reply to Sakari Ailus

The tw9910 driver does not depend on SoC camera framework. Don't include the header, but instead include media/v4l2-async.h which the driver really needs.

---
 drivers/media/i2c/tw9910.c | 1 +
 include/media/i2c/tw9910.h | 2 --
 2 files changed, 1 insertion(+), 2 deletions(-)
drivers/media/i2c/tw9910.c +1 -0
index 7087ce946af1..6478bd41afb8 100644
@@ -27,6 +27,7 @@
 #include <linux/videodev2.h>
 
 #include <media/i2c/tw9910.h>
+#include <media/v4l2-async.h>
 #include <media/v4l2-subdev.h>
 
 #define GET_ID(val)  ((val & 0xF8) >> 3)
include/media/i2c/tw9910.h +0 -2
index bec8f7bce745..2f93799d5a21 100644
@@ -16,8 +16,6 @@
 #ifndef __TW9910_H__
 #define __TW9910_H__
 
-#include <media/soc_camera.h>
-
 /**
  * tw9910_mpout_pin - MPOUT (multi-purpose output) pin functions
  */
Signature · 1 line
2.11.0
#3 lore raw

Re: [PATCH 2/4] tw9910: No SoC camera dependency

Quoted 3 lines · Sakari Ailus

The tw9910 driver does not depend on SoC camera framework. Don't include the header, but instead include media/v4l2-async.h which the driver really needs.

You might want to make a note of the fact that soc_camera.h includes v4l2-async.h, so removing soc_camera.h requires adding v4l2-async.h.

I couldn't understand how it compiled before without the v4l2-async.h header until I saw that soc_camera.h includes it.

Regards,

Hans

Quoted 33 lines
---
 drivers/media/i2c/tw9910.c | 1 +
 include/media/i2c/tw9910.h | 2 --
 2 files changed, 1 insertion(+), 2 deletions(-)
drivers/media/i2c/tw9910.c +1 -0
index 7087ce946af1..6478bd41afb8 100644
@@ -27,6 +27,7 @@
 #include <linux/videodev2.h>
 
 #include <media/i2c/tw9910.h>
+#include <media/v4l2-async.h>
 #include <media/v4l2-subdev.h>
 
 #define GET_ID(val)  ((val & 0xF8) >> 3)
include/media/i2c/tw9910.h +0 -2
index bec8f7bce745..2f93799d5a21 100644
@@ -16,8 +16,6 @@
 #ifndef __TW9910_H__
 #define __TW9910_H__
 
-#include <media/soc_camera.h>
-
 /**
  * tw9910_mpout_pin - MPOUT (multi-purpose output) pin functions
  */
#4 lore raw

Re: [PATCH 2/4] tw9910: No SoC camera dependency

Quoted 10 lines · Hans Verkuil
Quoted 3 lines · Sakari Ailus

The tw9910 driver does not depend on SoC camera framework. Don't include the header, but instead include media/v4l2-async.h which the driver really needs.

You might want to make a note of the fact that soc_camera.h includes v4l2-async.h, so removing soc_camera.h requires adding v4l2-async.h.

I couldn't understand how it compiled before without the v4l2-async.h header until I saw that soc_camera.h includes it.

Yes. How about this:

Also include i2c/v4l2-async.h in drivers/media/i2c/tw9910.c as it depends on the header which used to be included through media/soc_camera.h.

Signature · 2 lines
Sakari Ailus
[email protected]
Acked-by
#5 lore raw

Re: [PATCH 2/4] tw9910: No SoC camera dependency

Quoted 9 lines · Sakari Ailus
Quoted 8 lines · Hans Verkuil
Quoted 3 lines · Sakari Ailus

The tw9910 driver does not depend on SoC camera framework. Don't include the header, but instead include media/v4l2-async.h which the driver really needs.

You might want to make a note of the fact that soc_camera.h includes v4l2-async.h, so removing soc_camera.h requires adding v4l2-async.h.

Quoted 8 lines
Quoted 2 lines

I couldn't understand how it compiled before without the v4l2-async.h header until I saw that soc_camera.h includes it.

Yes. How about this:

Also include i2c/v4l2-async.h in drivers/media/i2c/tw9910.c as it depends on the header which used to be included through media/soc_camera.h.

Looks good. With that change:

for the whole series.

Regards,

Hans

#6 lore raw

PATCH 3/4 SoC camera: Remove the framework and the drivers

In reply to Sakari Ailus

The SoC camera framework has been obsolete for some time and it is no longer functional. A few drivers have been converted to the V4L2 sub-device API but for the rest the conversion has not taken place yet.

In order to keep the tree clean and to avoid keep maintaining non-functional and obsolete code, remove the SoC camera framework as well as the drivers that depend on it.

---
Resending, this time with git format-patch -D .

 MAINTAINERS                                        |    8 -
 drivers/media/i2c/Kconfig                          |    8 -
 drivers/media/i2c/Makefile                         |    1 -
 drivers/media/i2c/soc_camera/Kconfig               |   66 -
 drivers/media/i2c/soc_camera/Makefile              |   10 -
 drivers/media/i2c/soc_camera/ov9640.h              |  208 --
 drivers/media/i2c/soc_camera/soc_mt9m001.c         |  757 -------
 drivers/media/i2c/soc_camera/soc_mt9t112.c         | 1157 -----------
 drivers/media/i2c/soc_camera/soc_mt9v022.c         | 1012 ---------
 drivers/media/i2c/soc_camera/soc_ov5642.c          | 1087 ----------
 drivers/media/i2c/soc_camera/soc_ov772x.c          | 1123 ----------
 drivers/media/i2c/soc_camera/soc_ov9640.c          |  738 -------
 drivers/media/i2c/soc_camera/soc_ov9740.c          |  996 ---------
 drivers/media/i2c/soc_camera/soc_rj54n1cb0c.c      | 1415 -------------
 drivers/media/i2c/soc_camera/soc_tw9910.c          |  999 ---------
 drivers/media/platform/Kconfig                     |    1 -
 drivers/media/platform/Makefile                    |    2 -
 drivers/media/platform/soc_camera/Kconfig          |   26 -
 drivers/media/platform/soc_camera/Makefile         |    9 -
 .../platform/soc_camera/sh_mobile_ceu_camera.c     | 1810 ----------------
 drivers/media/platform/soc_camera/soc_camera.c     | 2169 --------------------
 .../platform/soc_camera/soc_camera_platform.c      |  188 --
 drivers/media/platform/soc_camera/soc_mediabus.c   |  533 -----
 drivers/media/platform/soc_camera/soc_scale_crop.c |  426 ----
 drivers/media/platform/soc_camera/soc_scale_crop.h |   47 -
 drivers/staging/media/Kconfig                      |    4 -
 drivers/staging/media/Makefile                     |    2 -
 drivers/staging/media/imx074/Kconfig               |    5 -
 drivers/staging/media/imx074/Makefile              |    1 -
 drivers/staging/media/imx074/TODO                  |    5 -
 drivers/staging/media/imx074/imx074.c              |  496 -----
 drivers/staging/media/mt9t031/Kconfig              |    5 -
 drivers/staging/media/mt9t031/Makefile             |    1 -
 drivers/staging/media/mt9t031/TODO                 |    5 -
 drivers/staging/media/mt9t031/mt9t031.c            |  857 --------
 35 files changed, 16177 deletions(-)
 delete mode 100644 drivers/media/i2c/soc_camera/Kconfig
 delete mode 100644 drivers/media/i2c/soc_camera/Makefile
 delete mode 100644 drivers/media/i2c/soc_camera/ov9640.h
 delete mode 100644 drivers/media/i2c/soc_camera/soc_mt9m001.c
 delete mode 100644 drivers/media/i2c/soc_camera/soc_mt9t112.c
 delete mode 100644 drivers/media/i2c/soc_camera/soc_mt9v022.c
 delete mode 100644 drivers/media/i2c/soc_camera/soc_ov5642.c
 delete mode 100644 drivers/media/i2c/soc_camera/soc_ov772x.c
 delete mode 100644 drivers/media/i2c/soc_camera/soc_ov9640.c
 delete mode 100644 drivers/media/i2c/soc_camera/soc_ov9740.c
 delete mode 100644 drivers/media/i2c/soc_camera/soc_rj54n1cb0c.c
 delete mode 100644 drivers/media/i2c/soc_camera/soc_tw9910.c
 delete mode 100644 drivers/media/platform/soc_camera/Kconfig
 delete mode 100644 drivers/media/platform/soc_camera/Makefile
 delete mode 100644 drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c
 delete mode 100644 drivers/media/platform/soc_camera/soc_camera.c
 delete mode 100644 drivers/media/platform/soc_camera/soc_camera_platform.c
 delete mode 100644 drivers/media/platform/soc_camera/soc_mediabus.c
 delete mode 100644 drivers/media/platform/soc_camera/soc_scale_crop.c
 delete mode 100644 drivers/media/platform/soc_camera/soc_scale_crop.h
 delete mode 100644 drivers/staging/media/imx074/Kconfig
 delete mode 100644 drivers/staging/media/imx074/Makefile
 delete mode 100644 drivers/staging/media/imx074/TODO
 delete mode 100644 drivers/staging/media/imx074/imx074.c
 delete mode 100644 drivers/staging/media/mt9t031/Kconfig
 delete mode 100644 drivers/staging/media/mt9t031/Makefile
 delete mode 100644 drivers/staging/media/mt9t031/TODO
 delete mode 100644 drivers/staging/media/mt9t031/mt9t031.c
MAINTAINERS +0 -8
index 23021e0df5d7..788de30125c1 100644
@@ -13422,14 +13422,6 @@ L:	[email protected]
 S:	Maintained
 F:	drivers/net/ethernet/smsc/smsc9420.*
 
-SOC-CAMERA V4L2 SUBSYSTEM
-L:	[email protected]
-T:	git git://linuxtv.org/media_tree.git
-S:	Orphan
-F:	include/media/soc*
-F:	drivers/media/i2c/soc_camera/
-F:	drivers/media/platform/soc_camera/
-
 SOCIONEXT SYNQUACER I2C DRIVER
 M:	Ard Biesheuvel <[email protected]>
 L:	[email protected]
drivers/media/i2c/Kconfig +0 -8
index 704af210e270..c7683ac5a3d8 100644
@@ -1091,12 +1091,4 @@ config VIDEO_I2C
 
 endmenu
 
-menu "Sensors used on soc_camera driver"
-
-if SOC_CAMERA
-	source "drivers/media/i2c/soc_camera/Kconfig"
-endif
-
-endmenu
-
 endif
drivers/media/i2c/Makefile +0 -1
index 260d4d9ec2a1..d83d1f2a08ee 100644
@@ -6,7 +6,6 @@ obj-$(CONFIG_VIDEO_SMIAPP)	+= smiapp/
 obj-$(CONFIG_VIDEO_ET8EK8)	+= et8ek8/
 obj-$(CONFIG_VIDEO_CX25840) += cx25840/
 obj-$(CONFIG_VIDEO_M5MOLS)	+= m5mols/
-obj-y				+= soc_camera/
 
 obj-$(CONFIG_VIDEO_APTINA_PLL) += aptina-pll.o
 obj-$(CONFIG_VIDEO_TVAUDIO) += tvaudio.o
drivers/media/i2c/soc_camera/Kconfig deleted +0 -0
deleted file mode 100644
index 7c2aabc8a3f6..000000000000
drivers/media/i2c/soc_camera/Makefile deleted +0 -0
deleted file mode 100644
index 09ae483b96ef..000000000000
drivers/media/i2c/soc_camera/ov9640.h deleted +0 -0
deleted file mode 100644
index 65d13ff17536..000000000000
drivers/media/i2c/soc_camera/soc_mt9m001.c deleted +0 -0
deleted file mode 100644
index a1a85ff838c5..000000000000
drivers/media/i2c/soc_camera/soc_mt9t112.c deleted +0 -0
deleted file mode 100644
index ea1ff270bc2d..000000000000
drivers/media/i2c/soc_camera/soc_mt9v022.c deleted +0 -0
deleted file mode 100644
index 6d922b17ea94..000000000000
drivers/media/i2c/soc_camera/soc_ov5642.c deleted +0 -0
deleted file mode 100644
index 0931898c79dd..000000000000
drivers/media/i2c/soc_camera/soc_ov772x.c deleted +0 -0
deleted file mode 100644
index fafd372527b2..000000000000
drivers/media/i2c/soc_camera/soc_ov9640.c deleted +0 -0
deleted file mode 100644
index eb91b8240083..000000000000
drivers/media/i2c/soc_camera/soc_ov9740.c deleted +0 -0
deleted file mode 100644
index a07d3145d1b4..000000000000
drivers/media/i2c/soc_camera/soc_rj54n1cb0c.c deleted +0 -0
deleted file mode 100644
index f0cb49a6167b..000000000000
drivers/media/i2c/soc_camera/soc_tw9910.c deleted +0 -0
deleted file mode 100644
index bdb5e0a431e9..000000000000
drivers/media/platform/Kconfig +0 -1
index 0edacfb01f3a..87bca0fe37a4 100644
@@ -132,7 +132,6 @@ config VIDEO_RENESAS_CEU
 	---help---
 	  This is a v4l2 driver for the Renesas CEU Interface
 
-source "drivers/media/platform/soc_camera/Kconfig"
 source "drivers/media/platform/exynos4-is/Kconfig"
 source "drivers/media/platform/am437x/Kconfig"
 source "drivers/media/platform/xilinx/Kconfig"
drivers/media/platform/Makefile +0 -2
index 6ab6200dd9c9..ad1d47c1a3b1 100644
@@ -59,8 +59,6 @@ obj-y					+= davinci/
 
 obj-$(CONFIG_VIDEO_SH_VOU)		+= sh_vou.o
 
-obj-$(CONFIG_SOC_CAMERA)		+= soc_camera/
-
 obj-$(CONFIG_VIDEO_RCAR_DRIF)		+= rcar_drif.o
 obj-$(CONFIG_VIDEO_RENESAS_CEU)		+= renesas-ceu.o
 obj-$(CONFIG_VIDEO_RENESAS_FCP)		+= rcar-fcp.o
drivers/media/platform/soc_camera/Kconfig deleted +0 -0
deleted file mode 100644
index 669d116b8f09..000000000000
drivers/media/platform/soc_camera/Makefile deleted +0 -0
deleted file mode 100644
index 07a451e8b228..000000000000
drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c deleted +0 -0
deleted file mode 100644
index 6803f744e307..000000000000
drivers/media/platform/soc_camera/soc_camera.c deleted +0 -0
deleted file mode 100644
index 0a70fb67c401..000000000000
drivers/media/platform/soc_camera/soc_camera_platform.c deleted +0 -0
deleted file mode 100644
index 79fbe1fea95f..000000000000
drivers/media/platform/soc_camera/soc_mediabus.c deleted +0 -0
deleted file mode 100644
index be74008ec0ca..000000000000
drivers/media/platform/soc_camera/soc_scale_crop.c deleted +0 -0
deleted file mode 100644
index 8d25ca0490f7..000000000000
drivers/media/platform/soc_camera/soc_scale_crop.h deleted +0 -0
deleted file mode 100644
index 9ca469312a1f..000000000000
drivers/staging/media/Kconfig +0 -4
index db5cf67047ad..ad0de8a22313 100644
@@ -25,10 +25,6 @@ source "drivers/staging/media/davinci_vpfe/Kconfig"
 
 source "drivers/staging/media/imx/Kconfig"
 
-source "drivers/staging/media/imx074/Kconfig"
-
-source "drivers/staging/media/mt9t031/Kconfig"
-
 source "drivers/staging/media/omap4iss/Kconfig"
 
 source "drivers/staging/media/tegra-vde/Kconfig"
drivers/staging/media/Makefile +0 -2
index 503fbe47fa58..2d268d3905e5 100644
@@ -1,8 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_I2C_BCM2048)	+= bcm2048/
 obj-$(CONFIG_VIDEO_IMX_MEDIA)	+= imx/
-obj-$(CONFIG_SOC_CAMERA_IMX074)	+= imx074/
-obj-$(CONFIG_SOC_CAMERA_MT9T031)	+= mt9t031/
 obj-$(CONFIG_VIDEO_DM365_VPFE)	+= davinci_vpfe/
 obj-$(CONFIG_VIDEO_OMAP4)	+= omap4iss/
 obj-$(CONFIG_TEGRA_VDE)		+= tegra-vde/
drivers/staging/media/imx074/Kconfig deleted +0 -0
deleted file mode 100644
index 229cbeea580b..000000000000
drivers/staging/media/imx074/Makefile deleted +0 -0
deleted file mode 100644
index 7d183574aa84..000000000000
drivers/staging/media/imx074/TODO deleted +0 -0
deleted file mode 100644
index 15580a4f950c..000000000000
drivers/staging/media/imx074/imx074.c deleted +0 -0
deleted file mode 100644
index 1676c166dc83..000000000000
drivers/staging/media/mt9t031/Kconfig deleted +0 -0
deleted file mode 100644
index 9a58aaf72edd..000000000000
drivers/staging/media/mt9t031/Makefile deleted +0 -0
deleted file mode 100644
index bfd24c442b33..000000000000
drivers/staging/media/mt9t031/TODO deleted +0 -0
deleted file mode 100644
index 15580a4f950c..000000000000
drivers/staging/media/mt9t031/mt9t031.c deleted +0 -0
deleted file mode 100644
index 4ff179302b4f..000000000000
Signature · 1 line
2.11.0
#7 lore raw

Re: [PATCH 3/4] SoC camera: Remove the framework and the drivers

Em Tue, 30 Oct 2018 01:21:34 +0200
Sakari Ailus <[email protected]> escreveu:

Quoted 12 lines

The SoC camera framework has been obsolete for some time and it is no longer functional. A few drivers have been converted to the V4L2 sub-device API but for the rest the conversion has not taken place yet.

In order to keep the tree clean and to avoid keep maintaining non-functional and obsolete code, remove the SoC camera framework as well as the drivers that depend on it.

---
Resending, this time with git format-patch -D .

Quoted 15 lines
 MAINTAINERS                                        |    8 -
 drivers/media/i2c/Kconfig                          |    8 -
 drivers/media/i2c/Makefile                         |    1 -
 drivers/media/i2c/soc_camera/Kconfig               |   66 -
 drivers/media/i2c/soc_camera/Makefile              |   10 -
 drivers/media/i2c/soc_camera/ov9640.h              |  208 --
 drivers/media/i2c/soc_camera/soc_mt9m001.c         |  757 -------
 drivers/media/i2c/soc_camera/soc_mt9t112.c         | 1157 -----------
 drivers/media/i2c/soc_camera/soc_mt9v022.c         | 1012 ---------
 drivers/media/i2c/soc_camera/soc_ov5642.c          | 1087 ----------
 drivers/media/i2c/soc_camera/soc_ov772x.c          | 1123 ----------
 drivers/media/i2c/soc_camera/soc_ov9640.c          |  738 -------
 drivers/media/i2c/soc_camera/soc_ov9740.c          |  996 ---------
 drivers/media/i2c/soc_camera/soc_rj54n1cb0c.c      | 1415 -------------
 drivers/media/i2c/soc_camera/soc_tw9910.c          |  999 ---------

I don't see why we should remove those. I mean, Jacopo is actually converting those drivers to not depend on soc_camera, and it is a way better to review those patches with the old code in place.

IMHO, the best would be to move those to /staging, eventually depending on BROKEN.

drivers/staging/media/mt9t031/mt9t031.c

Quoted 235 lines
 drivers/media/platform/Kconfig                     |    1 -
 drivers/media/platform/Makefile                    |    2 -
 drivers/media/platform/soc_camera/Kconfig          |   26 -
 drivers/media/platform/soc_camera/Makefile         |    9 -
 .../platform/soc_camera/sh_mobile_ceu_camera.c     | 1810 ----------------
 drivers/media/platform/soc_camera/soc_camera.c     | 2169 --------------------
 .../platform/soc_camera/soc_camera_platform.c      |  188 --
 drivers/media/platform/soc_camera/soc_mediabus.c   |  533 -----
 drivers/media/platform/soc_camera/soc_scale_crop.c |  426 ----
 drivers/media/platform/soc_camera/soc_scale_crop.h |   47 -
 drivers/staging/media/Kconfig                      |    4 -
 drivers/staging/media/Makefile                     |    2 -
 drivers/staging/media/imx074/Kconfig               |    5 -
 drivers/staging/media/imx074/Makefile              |    1 -
 drivers/staging/media/imx074/TODO                  |    5 -
 drivers/staging/media/imx074/imx074.c              |  496 -----
 drivers/staging/media/mt9t031/Kconfig              |    5 -
 drivers/staging/media/mt9t031/Makefile             |    1 -
 drivers/staging/media/mt9t031/TODO                 |    5 -
 drivers/staging/media/mt9t031/mt9t031.c            |  857 --------
 35 files changed, 16177 deletions(-)
 delete mode 100644 drivers/media/i2c/soc_camera/Kconfig
 delete mode 100644 drivers/media/i2c/soc_camera/Makefile
 delete mode 100644 drivers/media/i2c/soc_camera/ov9640.h
 delete mode 100644 drivers/media/i2c/soc_camera/soc_mt9m001.c
 delete mode 100644 drivers/media/i2c/soc_camera/soc_mt9t112.c
 delete mode 100644 drivers/media/i2c/soc_camera/soc_mt9v022.c
 delete mode 100644 drivers/media/i2c/soc_camera/soc_ov5642.c
 delete mode 100644 drivers/media/i2c/soc_camera/soc_ov772x.c
 delete mode 100644 drivers/media/i2c/soc_camera/soc_ov9640.c
 delete mode 100644 drivers/media/i2c/soc_camera/soc_ov9740.c
 delete mode 100644 drivers/media/i2c/soc_camera/soc_rj54n1cb0c.c
 delete mode 100644 drivers/media/i2c/soc_camera/soc_tw9910.c
 delete mode 100644 drivers/media/platform/soc_camera/Kconfig
 delete mode 100644 drivers/media/platform/soc_camera/Makefile
 delete mode 100644 drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c
 delete mode 100644 drivers/media/platform/soc_camera/soc_camera.c
 delete mode 100644 drivers/media/platform/soc_camera/soc_camera_platform.c
 delete mode 100644 drivers/media/platform/soc_camera/soc_mediabus.c
 delete mode 100644 drivers/media/platform/soc_camera/soc_scale_crop.c
 delete mode 100644 drivers/media/platform/soc_camera/soc_scale_crop.h
 delete mode 100644 drivers/staging/media/imx074/Kconfig
 delete mode 100644 drivers/staging/media/imx074/Makefile
 delete mode 100644 drivers/staging/media/imx074/TODO
 delete mode 100644 drivers/staging/media/imx074/imx074.c
 delete mode 100644 drivers/staging/media/mt9t031/Kconfig
 delete mode 100644 drivers/staging/media/mt9t031/Makefile
 delete mode 100644 drivers/staging/media/mt9t031/TODO
 delete mode 100644 drivers/staging/media/mt9t031/mt9t031.c
MAINTAINERS +0 -8
index 23021e0df5d7..788de30125c1 100644
@@ -13422,14 +13422,6 @@ L:	[email protected]
 S:	Maintained
 F:	drivers/net/ethernet/smsc/smsc9420.*
 
-SOC-CAMERA V4L2 SUBSYSTEM
-L:	[email protected]
-T:	git git://linuxtv.org/media_tree.git
-S:	Orphan
-F:	include/media/soc*
-F:	drivers/media/i2c/soc_camera/
-F:	drivers/media/platform/soc_camera/
-
 SOCIONEXT SYNQUACER I2C DRIVER
 M:	Ard Biesheuvel <[email protected]>
 L:	[email protected]
drivers/media/i2c/Kconfig +0 -8
index 704af210e270..c7683ac5a3d8 100644
@@ -1091,12 +1091,4 @@ config VIDEO_I2C
 
 endmenu
 
-menu "Sensors used on soc_camera driver"
-
-if SOC_CAMERA
-	source "drivers/media/i2c/soc_camera/Kconfig"
-endif
-
-endmenu
-
 endif
drivers/media/i2c/Makefile +0 -1
index 260d4d9ec2a1..d83d1f2a08ee 100644
@@ -6,7 +6,6 @@ obj-$(CONFIG_VIDEO_SMIAPP)	+= smiapp/
 obj-$(CONFIG_VIDEO_ET8EK8)	+= et8ek8/
 obj-$(CONFIG_VIDEO_CX25840) += cx25840/
 obj-$(CONFIG_VIDEO_M5MOLS)	+= m5mols/
-obj-y				+= soc_camera/
 
 obj-$(CONFIG_VIDEO_APTINA_PLL) += aptina-pll.o
 obj-$(CONFIG_VIDEO_TVAUDIO) += tvaudio.o
drivers/media/i2c/soc_camera/Kconfig deleted +0 -0
deleted file mode 100644
index 7c2aabc8a3f6..000000000000
drivers/media/i2c/soc_camera/Makefile deleted +0 -0
deleted file mode 100644
index 09ae483b96ef..000000000000
drivers/media/i2c/soc_camera/ov9640.h deleted +0 -0
deleted file mode 100644
index 65d13ff17536..000000000000
drivers/media/i2c/soc_camera/soc_mt9m001.c deleted +0 -0
deleted file mode 100644
index a1a85ff838c5..000000000000
drivers/media/i2c/soc_camera/soc_mt9t112.c deleted +0 -0
deleted file mode 100644
index ea1ff270bc2d..000000000000
drivers/media/i2c/soc_camera/soc_mt9v022.c deleted +0 -0
deleted file mode 100644
index 6d922b17ea94..000000000000
drivers/media/i2c/soc_camera/soc_ov5642.c deleted +0 -0
deleted file mode 100644
index 0931898c79dd..000000000000
drivers/media/i2c/soc_camera/soc_ov772x.c deleted +0 -0
deleted file mode 100644
index fafd372527b2..000000000000
drivers/media/i2c/soc_camera/soc_ov9640.c deleted +0 -0
deleted file mode 100644
index eb91b8240083..000000000000
drivers/media/i2c/soc_camera/soc_ov9740.c deleted +0 -0
deleted file mode 100644
index a07d3145d1b4..000000000000
drivers/media/i2c/soc_camera/soc_rj54n1cb0c.c deleted +0 -0
deleted file mode 100644
index f0cb49a6167b..000000000000
drivers/media/i2c/soc_camera/soc_tw9910.c deleted +0 -0
deleted file mode 100644
index bdb5e0a431e9..000000000000
drivers/media/platform/Kconfig +0 -1
index 0edacfb01f3a..87bca0fe37a4 100644
@@ -132,7 +132,6 @@ config VIDEO_RENESAS_CEU
 	---help---
 	  This is a v4l2 driver for the Renesas CEU Interface
 
-source "drivers/media/platform/soc_camera/Kconfig"
 source "drivers/media/platform/exynos4-is/Kconfig"
 source "drivers/media/platform/am437x/Kconfig"
 source "drivers/media/platform/xilinx/Kconfig"
drivers/media/platform/Makefile +0 -2
index 6ab6200dd9c9..ad1d47c1a3b1 100644
@@ -59,8 +59,6 @@ obj-y					+= davinci/
 
 obj-$(CONFIG_VIDEO_SH_VOU)		+= sh_vou.o
 
-obj-$(CONFIG_SOC_CAMERA)		+= soc_camera/
-
 obj-$(CONFIG_VIDEO_RCAR_DRIF)		+= rcar_drif.o
 obj-$(CONFIG_VIDEO_RENESAS_CEU)		+= renesas-ceu.o
 obj-$(CONFIG_VIDEO_RENESAS_FCP)		+= rcar-fcp.o
drivers/media/platform/soc_camera/Kconfig deleted +0 -0
deleted file mode 100644
index 669d116b8f09..000000000000
drivers/media/platform/soc_camera/Makefile deleted +0 -0
deleted file mode 100644
index 07a451e8b228..000000000000
drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c deleted +0 -0
deleted file mode 100644
index 6803f744e307..000000000000
drivers/media/platform/soc_camera/soc_camera.c deleted +0 -0
deleted file mode 100644
index 0a70fb67c401..000000000000
drivers/media/platform/soc_camera/soc_camera_platform.c deleted +0 -0
deleted file mode 100644
index 79fbe1fea95f..000000000000
drivers/media/platform/soc_camera/soc_mediabus.c deleted +0 -0
deleted file mode 100644
index be74008ec0ca..000000000000
drivers/media/platform/soc_camera/soc_scale_crop.c deleted +0 -0
deleted file mode 100644
index 8d25ca0490f7..000000000000
drivers/media/platform/soc_camera/soc_scale_crop.h deleted +0 -0
deleted file mode 100644
index 9ca469312a1f..000000000000
drivers/staging/media/Kconfig +0 -4
index db5cf67047ad..ad0de8a22313 100644
@@ -25,10 +25,6 @@ source "drivers/staging/media/davinci_vpfe/Kconfig"
 
 source "drivers/staging/media/imx/Kconfig"
 
-source "drivers/staging/media/imx074/Kconfig"
-
-source "drivers/staging/media/mt9t031/Kconfig"
-
 source "drivers/staging/media/omap4iss/Kconfig"
 
 source "drivers/staging/media/tegra-vde/Kconfig"
drivers/staging/media/Makefile +0 -2
index 503fbe47fa58..2d268d3905e5 100644
@@ -1,8 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_I2C_BCM2048)	+= bcm2048/
 obj-$(CONFIG_VIDEO_IMX_MEDIA)	+= imx/
-obj-$(CONFIG_SOC_CAMERA_IMX074)	+= imx074/
-obj-$(CONFIG_SOC_CAMERA_MT9T031)	+= mt9t031/
 obj-$(CONFIG_VIDEO_DM365_VPFE)	+= davinci_vpfe/
 obj-$(CONFIG_VIDEO_OMAP4)	+= omap4iss/
 obj-$(CONFIG_TEGRA_VDE)		+= tegra-vde/
drivers/staging/media/imx074/Kconfig deleted +0 -0
deleted file mode 100644
index 229cbeea580b..000000000000
drivers/staging/media/imx074/Makefile deleted +0 -0
deleted file mode 100644
index 7d183574aa84..000000000000
drivers/staging/media/imx074/TODO deleted +0 -0
deleted file mode 100644
index 15580a4f950c..000000000000
drivers/staging/media/imx074/imx074.c deleted +0 -0
deleted file mode 100644
index 1676c166dc83..000000000000
drivers/staging/media/mt9t031/Kconfig deleted +0 -0
deleted file mode 100644
index 9a58aaf72edd..000000000000
drivers/staging/media/mt9t031/Makefile deleted +0 -0
deleted file mode 100644
index bfd24c442b33..000000000000
drivers/staging/media/mt9t031/TODO deleted +0 -0
deleted file mode 100644
index 15580a4f950c..000000000000
drivers/staging/media/mt9t031/mt9t031.c deleted +0 -0
deleted file mode 100644
index 4ff179302b4f..000000000000

Thanks,
Mauro

#8 lore raw

Re: [PATCH 3/4] SoC camera: Remove the framework and the drivers

Em Tue, 30 Oct 2018 01:21:34 +0200
Sakari Ailus <[email protected]> escreveu:

Quoted 12 lines

The SoC camera framework has been obsolete for some time and it is no longer functional. A few drivers have been converted to the V4L2 sub-device API but for the rest the conversion has not taken place yet.

In order to keep the tree clean and to avoid keep maintaining non-functional and obsolete code, remove the SoC camera framework as well as the drivers that depend on it.

---
Resending, this time with git format-patch -D .

Quoted 15 lines
 MAINTAINERS                                        |    8 -
 drivers/media/i2c/Kconfig                          |    8 -
 drivers/media/i2c/Makefile                         |    1 -
 drivers/media/i2c/soc_camera/Kconfig               |   66 -
 drivers/media/i2c/soc_camera/Makefile              |   10 -
 drivers/media/i2c/soc_camera/ov9640.h              |  208 --
 drivers/media/i2c/soc_camera/soc_mt9m001.c         |  757 -------
 drivers/media/i2c/soc_camera/soc_mt9t112.c         | 1157 -----------
 drivers/media/i2c/soc_camera/soc_mt9v022.c         | 1012 ---------
 drivers/media/i2c/soc_camera/soc_ov5642.c          | 1087 ----------
 drivers/media/i2c/soc_camera/soc_ov772x.c          | 1123 ----------
 drivers/media/i2c/soc_camera/soc_ov9640.c          |  738 -------
 drivers/media/i2c/soc_camera/soc_ov9740.c          |  996 ---------
 drivers/media/i2c/soc_camera/soc_rj54n1cb0c.c      | 1415 -------------
 drivers/media/i2c/soc_camera/soc_tw9910.c          |  999 ---------  

I don't see why we should remove those. I mean, Jacopo is actually converting those drivers to not depend on soc_camera, and it is a way better to review those patches with the old code in place.

So, at least while Jacopo is keep doing this work, I would keep at Kernel tree, as it helps to see a diff when the driver changes when getting rid of soc_camera dependencies.

So, IMO, the best would be to move those to /staging, eventually depending on BROKEN.

Thanks,
Mauro

#9 lore raw

Re: [PATCH 3/4] SoC camera: Remove the framework and the drivers

Hi Mauro,

Quoted 31 lines · Mauro Carvalho Chehab

Em Tue, 30 Oct 2018 01:21:34 +0200
Sakari Ailus <[email protected]> escreveu:

Quoted 12 lines

The SoC camera framework has been obsolete for some time and it is no longer functional. A few drivers have been converted to the V4L2 sub-device API but for the rest the conversion has not taken place yet.

In order to keep the tree clean and to avoid keep maintaining non-functional and obsolete code, remove the SoC camera framework as well as the drivers that depend on it.

---
Resending, this time with git format-patch -D .

Quoted 15 lines
 MAINTAINERS                                        |    8 -
 drivers/media/i2c/Kconfig                          |    8 -
 drivers/media/i2c/Makefile                         |    1 -
 drivers/media/i2c/soc_camera/Kconfig               |   66 -
 drivers/media/i2c/soc_camera/Makefile              |   10 -
 drivers/media/i2c/soc_camera/ov9640.h              |  208 --
 drivers/media/i2c/soc_camera/soc_mt9m001.c         |  757 -------
 drivers/media/i2c/soc_camera/soc_mt9t112.c         | 1157 -----------
 drivers/media/i2c/soc_camera/soc_mt9v022.c         | 1012 ---------
 drivers/media/i2c/soc_camera/soc_ov5642.c          | 1087 ----------
 drivers/media/i2c/soc_camera/soc_ov772x.c          | 1123 ----------
 drivers/media/i2c/soc_camera/soc_ov9640.c          |  738 -------
 drivers/media/i2c/soc_camera/soc_ov9740.c          |  996 ---------
 drivers/media/i2c/soc_camera/soc_rj54n1cb0c.c      | 1415 -------------
 drivers/media/i2c/soc_camera/soc_tw9910.c          |  999 ---------
Quoted 4 lines

I don't see why we should remove those. I mean, Jacopo is actually converting those drivers to not depend on soc_camera, and it is a way better to review those patches with the old code in place.

I have converted a few drivers used by some SH boards where I dropped dependencies on soc_camera, not to remove camera support from those. For others I don't have cameras to test with, nor I know about boards in mainline using them.

From my side, driver conversion is done.

Quoted 7 lines

So, at least while Jacopo is keep doing this work, I would keep at Kernel tree, as it helps to see a diff when the driver changes when getting rid of soc_camera dependencies.

So, IMO, the best would be to move those to /staging, eventually depending on BROKEN.

However, somebody with a (rather old) development setup using those camera sensor may wants to see if mainline supports them. We actually had a few patches coming lately (for ov. I understand Sakari's argument that those could be retrieved from git history, but a few people will notice imo. I also understand the additional maintainership burden of keeping them around, so I'm fine with either ways ;)

This is a list of the current situation in mainline, to have a better idea:

$for i in seq 1 9; do CAM=$(head -n $i /tmp/soc_cams | tail -n 1); echo $CAM; find drivers/media/ -name $CAM; done t9m001.c
drivers/media/i2c/soc_camera/mt9m001.c
mt9t112.c
drivers/media/i2c/mt9t112.c
drivers/media/i2c/soc_camera/mt9t112.c
mt9v022.c
drivers/media/i2c/soc_camera/mt9v022.c
ov5642.c
drivers/media/i2c/soc_camera/ov5642.c
ov772x.c
drivers/media/i2c/ov772x.c
drivers/media/i2c/soc_camera/ov772x.c
ov9640.c
drivers/media/i2c/soc_camera/ov9640.c
ov9740.c
drivers/media/i2c/soc_camera/ov9740.c
rj54n1cb0c.c
drivers/media/i2c/rj54n1cb0c.c
drivers/media/i2c/soc_camera/rj54n1cb0c.c
tw9910.c
drivers/media/i2c/tw9910.c
drivers/media/i2c/soc_camera/tw9910.c

So it seems to me only the following sensor do not have a non-soc_camera driver at the moment:

mt9m001.c
mt9v022.c
ov5642.c
ov9640.c
ov9740.c

Thanks
j

Quoted 3 lines

Thanks,
Mauro

#10 lore raw

Re: [PATCH 3/4] SoC camera: Remove the framework and the drivers

Em Tue, 30 Oct 2018 21:28:57 +0100
jacopo mondi <[email protected]> escreveu:

Quoted 88 lines

Hi Mauro,

Quoted 31 lines · Mauro Carvalho Chehab

Em Tue, 30 Oct 2018 01:21:34 +0200
Sakari Ailus <[email protected]> escreveu:

Quoted 12 lines

The SoC camera framework has been obsolete for some time and it is no longer functional. A few drivers have been converted to the V4L2 sub-device API but for the rest the conversion has not taken place yet.

In order to keep the tree clean and to avoid keep maintaining non-functional and obsolete code, remove the SoC camera framework as well as the drivers that depend on it.

---
Resending, this time with git format-patch -D .

Quoted 15 lines
 MAINTAINERS                                        |    8 -
 drivers/media/i2c/Kconfig                          |    8 -
 drivers/media/i2c/Makefile                         |    1 -
 drivers/media/i2c/soc_camera/Kconfig               |   66 -
 drivers/media/i2c/soc_camera/Makefile              |   10 -
 drivers/media/i2c/soc_camera/ov9640.h              |  208 --
 drivers/media/i2c/soc_camera/soc_mt9m001.c         |  757 -------
 drivers/media/i2c/soc_camera/soc_mt9t112.c         | 1157 -----------
 drivers/media/i2c/soc_camera/soc_mt9v022.c         | 1012 ---------
 drivers/media/i2c/soc_camera/soc_ov5642.c          | 1087 ----------
 drivers/media/i2c/soc_camera/soc_ov772x.c          | 1123 ----------
 drivers/media/i2c/soc_camera/soc_ov9640.c          |  738 -------
 drivers/media/i2c/soc_camera/soc_ov9740.c          |  996 ---------
 drivers/media/i2c/soc_camera/soc_rj54n1cb0c.c      | 1415 -------------
 drivers/media/i2c/soc_camera/soc_tw9910.c          |  999 ---------  
Quoted 4 lines

I don't see why we should remove those. I mean, Jacopo is actually converting those drivers to not depend on soc_camera, and it is a way better to review those patches with the old code in place.

I have converted a few drivers used by some SH boards where I dropped dependencies on soc_camera, not to remove camera support from those. For others I don't have cameras to test with, nor I know about boards in mainline using them.

From my side, driver conversion is done.

Quoted 7 lines

So, at least while Jacopo is keep doing this work, I would keep at Kernel tree, as it helps to see a diff when the driver changes when getting rid of soc_camera dependencies.

So, IMO, the best would be to move those to /staging, eventually depending on BROKEN.

However, somebody with a (rather old) development setup using those camera sensor may wants to see if mainline supports them. We actually had a few patches coming lately (for ov. I understand Sakari's argument that those could be retrieved from git history, but a few people will notice imo. I also understand the additional maintainership burden of keeping them around, so I'm fine with either ways ;)

This is a list of the current situation in mainline, to have a better idea:

$for i in seq 1 9; do CAM=$(head -n $i /tmp/soc_cams | tail -n 1); echo $CAM; find drivers/media/ -name $CAM; done t9m001.c
drivers/media/i2c/soc_camera/mt9m001.c
mt9t112.c
drivers/media/i2c/mt9t112.c
drivers/media/i2c/soc_camera/mt9t112.c
mt9v022.c
drivers/media/i2c/soc_camera/mt9v022.c
ov5642.c
drivers/media/i2c/soc_camera/ov5642.c
ov772x.c
drivers/media/i2c/ov772x.c
drivers/media/i2c/soc_camera/ov772x.c
ov9640.c
drivers/media/i2c/soc_camera/ov9640.c
ov9740.c
drivers/media/i2c/soc_camera/ov9740.c
rj54n1cb0c.c
drivers/media/i2c/rj54n1cb0c.c
drivers/media/i2c/soc_camera/rj54n1cb0c.c
tw9910.c
drivers/media/i2c/tw9910.c
drivers/media/i2c/soc_camera/tw9910.c

Quoted 8 lines

So it seems to me only the following sensor do not have a non-soc_camera driver at the moment:

mt9m001.c
mt9v022.c
ov5642.c
ov9640.c
ov9740.c

Ok. So, what about keeping just those 5 drivers at staging? If, after an year, people won't do conversions, we can just drop them.

In any case, if we're ripping off soc_camera from the main tree, moving to staging, no dependencies for soc_camera.h should be kept at main tree. If any driver requires it, it should also be moved to staging.

Thanks,
Mauro

#11 lore raw

Re: [PATCH 3/4] SoC camera: Remove the framework and the drivers

Quoted 99 lines · Mauro Carvalho Chehab

Em Tue, 30 Oct 2018 21:28:57 +0100
jacopo mondi <[email protected]> escreveu:

Quoted 96 lines

Hi Mauro,

Quoted 31 lines · Mauro Carvalho Chehab

Em Tue, 30 Oct 2018 01:21:34 +0200
Sakari Ailus <[email protected]> escreveu:

Quoted 12 lines

The SoC camera framework has been obsolete for some time and it is no longer functional. A few drivers have been converted to the V4L2 sub-device API but for the rest the conversion has not taken place yet.

In order to keep the tree clean and to avoid keep maintaining non-functional and obsolete code, remove the SoC camera framework as well as the drivers that depend on it.

---
Resending, this time with git format-patch -D .

Quoted 15 lines
 MAINTAINERS                                        |    8 -
 drivers/media/i2c/Kconfig                          |    8 -
 drivers/media/i2c/Makefile                         |    1 -
 drivers/media/i2c/soc_camera/Kconfig               |   66 -
 drivers/media/i2c/soc_camera/Makefile              |   10 -
 drivers/media/i2c/soc_camera/ov9640.h              |  208 --
 drivers/media/i2c/soc_camera/soc_mt9m001.c         |  757 -------
 drivers/media/i2c/soc_camera/soc_mt9t112.c         | 1157 -----------
 drivers/media/i2c/soc_camera/soc_mt9v022.c         | 1012 ---------
 drivers/media/i2c/soc_camera/soc_ov5642.c          | 1087 ----------
 drivers/media/i2c/soc_camera/soc_ov772x.c          | 1123 ----------
 drivers/media/i2c/soc_camera/soc_ov9640.c          |  738 -------
 drivers/media/i2c/soc_camera/soc_ov9740.c          |  996 ---------
 drivers/media/i2c/soc_camera/soc_rj54n1cb0c.c      | 1415 -------------
 drivers/media/i2c/soc_camera/soc_tw9910.c          |  999 ---------
Quoted 4 lines

I don't see why we should remove those. I mean, Jacopo is actually converting those drivers to not depend on soc_camera, and it is a way better to review those patches with the old code in place.

I have converted a few drivers used by some SH boards where I dropped dependencies on soc_camera, not to remove camera support from those. For others I don't have cameras to test with, nor I know about boards in mainline using them.

From my side, driver conversion is done.

Quoted 7 lines

So, at least while Jacopo is keep doing this work, I would keep at Kernel tree, as it helps to see a diff when the driver changes when getting rid of soc_camera dependencies.

So, IMO, the best would be to move those to /staging, eventually depending on BROKEN.

However, somebody with a (rather old) development setup using those camera sensor may wants to see if mainline supports them. We actually had a few patches coming lately (for ov. I understand Sakari's argument that those could be retrieved from git history, but a few people will notice imo. I also understand the additional maintainership burden of keeping them around, so I'm fine with either ways ;)

This is a list of the current situation in mainline, to have a better idea:

$for i in seq 1 9; do CAM=$(head -n $i /tmp/soc_cams | tail -n 1); echo $CAM; find drivers/media/ -name $CAM; done t9m001.c
drivers/media/i2c/soc_camera/mt9m001.c
mt9t112.c
drivers/media/i2c/mt9t112.c
drivers/media/i2c/soc_camera/mt9t112.c
mt9v022.c
drivers/media/i2c/soc_camera/mt9v022.c
ov5642.c
drivers/media/i2c/soc_camera/ov5642.c
ov772x.c
drivers/media/i2c/ov772x.c
drivers/media/i2c/soc_camera/ov772x.c
ov9640.c
drivers/media/i2c/soc_camera/ov9640.c
ov9740.c
drivers/media/i2c/soc_camera/ov9740.c
rj54n1cb0c.c
drivers/media/i2c/rj54n1cb0c.c
drivers/media/i2c/soc_camera/rj54n1cb0c.c
tw9910.c
drivers/media/i2c/tw9910.c
drivers/media/i2c/soc_camera/tw9910.c

So it seems to me only the following sensor do not have a non-soc_camera driver at the moment:

mt9m001.c
mt9v022.c
ov5642.c
ov9640.c
ov9740.c

For a few of them (mt9m001, ov5642) there are cheap modules available online. The others ones have public documentation. I know they are old and dusty, supporting only parallel video interface.

Quoted 4 lines

Ok. So, what about keeping just those 5 drivers at staging? If, after an year, people won't do conversions, we can just drop them.

Let's see what Sakari and Hans think. Again, I'm fine with both ways ;)

Thanks
j

Quoted 7 lines

In any case, if we're ripping off soc_camera from the main tree, moving to staging, no dependencies for soc_camera.h should be kept at main tree. If any driver requires it, it should also be moved to staging.

Thanks,
Mauro

#12 lore raw

Re: [PATCH 3/4] SoC camera: Remove the framework and the drivers

Quoted 106 lines · jacopo mondi
Quoted 99 lines · Mauro Carvalho Chehab

Em Tue, 30 Oct 2018 21:28:57 +0100
jacopo mondi <[email protected]> escreveu:

Quoted 96 lines

Hi Mauro,

Quoted 31 lines · Mauro Carvalho Chehab

Em Tue, 30 Oct 2018 01:21:34 +0200
Sakari Ailus <[email protected]> escreveu:

Quoted 12 lines

The SoC camera framework has been obsolete for some time and it is no longer functional. A few drivers have been converted to the V4L2 sub-device API but for the rest the conversion has not taken place yet.

In order to keep the tree clean and to avoid keep maintaining non-functional and obsolete code, remove the SoC camera framework as well as the drivers that depend on it.

---
Resending, this time with git format-patch -D .

Quoted 15 lines
 MAINTAINERS                                        |    8 -
 drivers/media/i2c/Kconfig                          |    8 -
 drivers/media/i2c/Makefile                         |    1 -
 drivers/media/i2c/soc_camera/Kconfig               |   66 -
 drivers/media/i2c/soc_camera/Makefile              |   10 -
 drivers/media/i2c/soc_camera/ov9640.h              |  208 --
 drivers/media/i2c/soc_camera/soc_mt9m001.c         |  757 -------
 drivers/media/i2c/soc_camera/soc_mt9t112.c         | 1157 -----------
 drivers/media/i2c/soc_camera/soc_mt9v022.c         | 1012 ---------
 drivers/media/i2c/soc_camera/soc_ov5642.c          | 1087 ----------
 drivers/media/i2c/soc_camera/soc_ov772x.c          | 1123 ----------
 drivers/media/i2c/soc_camera/soc_ov9640.c          |  738 -------
 drivers/media/i2c/soc_camera/soc_ov9740.c          |  996 ---------
 drivers/media/i2c/soc_camera/soc_rj54n1cb0c.c      | 1415 -------------
 drivers/media/i2c/soc_camera/soc_tw9910.c          |  999 ---------
Quoted 4 lines

I don't see why we should remove those. I mean, Jacopo is actually converting those drivers to not depend on soc_camera, and it is a way better to review those patches with the old code in place.

I have converted a few drivers used by some SH boards where I dropped dependencies on soc_camera, not to remove camera support from those. For others I don't have cameras to test with, nor I know about boards in mainline using them.

From my side, driver conversion is done.

Quoted 7 lines

So, at least while Jacopo is keep doing this work, I would keep at Kernel tree, as it helps to see a diff when the driver changes when getting rid of soc_camera dependencies.

So, IMO, the best would be to move those to /staging, eventually depending on BROKEN.

However, somebody with a (rather old) development setup using those camera sensor may wants to see if mainline supports them. We actually had a few patches coming lately (for ov. I understand Sakari's argument that those could be retrieved from git history, but a few people will notice imo. I also understand the additional maintainership burden of keeping them around, so I'm fine with either ways ;)

This is a list of the current situation in mainline, to have a better idea:

$for i in seq 1 9; do CAM=$(head -n $i /tmp/soc_cams | tail -n 1); echo $CAM; find drivers/media/ -name $CAM; done t9m001.c
drivers/media/i2c/soc_camera/mt9m001.c
mt9t112.c
drivers/media/i2c/mt9t112.c
drivers/media/i2c/soc_camera/mt9t112.c
mt9v022.c
drivers/media/i2c/soc_camera/mt9v022.c
ov5642.c
drivers/media/i2c/soc_camera/ov5642.c
ov772x.c
drivers/media/i2c/ov772x.c
drivers/media/i2c/soc_camera/ov772x.c
ov9640.c
drivers/media/i2c/soc_camera/ov9640.c
ov9740.c
drivers/media/i2c/soc_camera/ov9740.c
rj54n1cb0c.c
drivers/media/i2c/rj54n1cb0c.c
drivers/media/i2c/soc_camera/rj54n1cb0c.c
tw9910.c
drivers/media/i2c/tw9910.c
drivers/media/i2c/soc_camera/tw9910.c

So it seems to me only the following sensor do not have a non-soc_camera driver at the moment:

mt9m001.c
mt9v022.c
ov5642.c
ov9640.c
ov9740.c

For a few of them (mt9m001, ov5642) there are cheap modules available online. The others ones have public documentation. I know they are old and dusty, supporting only parallel video interface.

Quoted 1 line
Quoted 6 lines
Quoted 3 lines

Ok. So, what about keeping just those 5 drivers at staging? If, after an year, people won't do conversions, we can just drop them.

Let's see what Sakari and Hans think. Again, I'm fine with both ways ;)

My preference is to just remove them. But moving them to staging under CONFIG_BROKEN for a year is OK with me, but frankly I don't see the point.

Regards,

Hans

#13 lore raw

Re: [PATCH 3/4] SoC camera: Remove the framework and the drivers

In reply to Mauro Carvalho Chehab

Hi Mauro,

Quoted 94 lines · Mauro Carvalho Chehab

Em Tue, 30 Oct 2018 21:28:57 +0100
jacopo mondi <[email protected]> escreveu:

Quoted 91 lines

Hi Mauro,

Quoted 31 lines · Mauro Carvalho Chehab

Em Tue, 30 Oct 2018 01:21:34 +0200
Sakari Ailus <[email protected]> escreveu:

Quoted 12 lines

The SoC camera framework has been obsolete for some time and it is no longer functional. A few drivers have been converted to the V4L2 sub-device API but for the rest the conversion has not taken place yet.

In order to keep the tree clean and to avoid keep maintaining non-functional and obsolete code, remove the SoC camera framework as well as the drivers that depend on it.

---
Resending, this time with git format-patch -D .

Quoted 15 lines
 MAINTAINERS                                        |    8 -
 drivers/media/i2c/Kconfig                          |    8 -
 drivers/media/i2c/Makefile                         |    1 -
 drivers/media/i2c/soc_camera/Kconfig               |   66 -
 drivers/media/i2c/soc_camera/Makefile              |   10 -
 drivers/media/i2c/soc_camera/ov9640.h              |  208 --
 drivers/media/i2c/soc_camera/soc_mt9m001.c         |  757 -------
 drivers/media/i2c/soc_camera/soc_mt9t112.c         | 1157 -----------
 drivers/media/i2c/soc_camera/soc_mt9v022.c         | 1012 ---------
 drivers/media/i2c/soc_camera/soc_ov5642.c          | 1087 ----------
 drivers/media/i2c/soc_camera/soc_ov772x.c          | 1123 ----------
 drivers/media/i2c/soc_camera/soc_ov9640.c          |  738 -------
 drivers/media/i2c/soc_camera/soc_ov9740.c          |  996 ---------
 drivers/media/i2c/soc_camera/soc_rj54n1cb0c.c      | 1415 -------------
 drivers/media/i2c/soc_camera/soc_tw9910.c          |  999 ---------  
Quoted 4 lines

I don't see why we should remove those. I mean, Jacopo is actually converting those drivers to not depend on soc_camera, and it is a way better to review those patches with the old code in place.

I have converted a few drivers used by some SH boards where I dropped dependencies on soc_camera, not to remove camera support from those. For others I don't have cameras to test with, nor I know about boards in mainline using them.

From my side, driver conversion is done.

Quoted 7 lines

So, at least while Jacopo is keep doing this work, I would keep at Kernel tree, as it helps to see a diff when the driver changes when getting rid of soc_camera dependencies.

So, IMO, the best would be to move those to /staging, eventually depending on BROKEN.

However, somebody with a (rather old) development setup using those camera sensor may wants to see if mainline supports them. We actually had a few patches coming lately (for ov. I understand Sakari's argument that those could be retrieved from git history, but a few people will notice imo. I also understand the additional maintainership burden of keeping them around, so I'm fine with either ways ;)

This is a list of the current situation in mainline, to have a better idea:

$for i in seq 1 9; do CAM=$(head -n $i /tmp/soc_cams | tail -n 1); echo $CAM; find drivers/media/ -name $CAM; done t9m001.c
drivers/media/i2c/soc_camera/mt9m001.c
mt9t112.c
drivers/media/i2c/mt9t112.c
drivers/media/i2c/soc_camera/mt9t112.c
mt9v022.c
drivers/media/i2c/soc_camera/mt9v022.c
ov5642.c
drivers/media/i2c/soc_camera/ov5642.c
ov772x.c
drivers/media/i2c/ov772x.c
drivers/media/i2c/soc_camera/ov772x.c
ov9640.c
drivers/media/i2c/soc_camera/ov9640.c
ov9740.c
drivers/media/i2c/soc_camera/ov9740.c
rj54n1cb0c.c
drivers/media/i2c/rj54n1cb0c.c
drivers/media/i2c/soc_camera/rj54n1cb0c.c
tw9910.c
drivers/media/i2c/tw9910.c
drivers/media/i2c/soc_camera/tw9910.c

So it seems to me only the following sensor do not have a non-soc_camera driver at the moment:

Quoted 8 lines
Quoted 5 lines

mt9m001.c
mt9v022.c
ov5642.c
ov9640.c
ov9740.c

Ok. So, what about keeping just those 5 drivers at staging? If, after an year, people won't do conversions, we can just drop them.

They've been there for years without anyone converting them. Do note that the conversion can be still done once the code is removed.

We did the same for a big bunch of sensor drivers that came with the atomisp2 driver. I don't see a difference here.

Signature · 4 lines
Kind regards,

Sakari Ailus
[email protected]
#14 lore raw

Re: [PATCH 3/4] SoC camera: Remove the framework and the drivers

Em Wed, 31 Oct 2018 11:32:02 +0200
Sakari Ailus <[email protected]> escreveu:

Quoted 103 lines

Hi Mauro,

Quoted 100 lines · Mauro Carvalho Chehab

Em Tue, 30 Oct 2018 21:28:57 +0100
jacopo mondi <[email protected]> escreveu:

Quoted 96 lines

Hi Mauro,

Quoted 31 lines · Mauro Carvalho Chehab

Em Tue, 30 Oct 2018 01:21:34 +0200
Sakari Ailus <[email protected]> escreveu:

Quoted 12 lines

The SoC camera framework has been obsolete for some time and it is no longer functional. A few drivers have been converted to the V4L2 sub-device API but for the rest the conversion has not taken place yet.

In order to keep the tree clean and to avoid keep maintaining non-functional and obsolete code, remove the SoC camera framework as well as the drivers that depend on it.

---
Resending, this time with git format-patch -D .

Quoted 15 lines
 MAINTAINERS                                        |    8 -
 drivers/media/i2c/Kconfig                          |    8 -
 drivers/media/i2c/Makefile                         |    1 -
 drivers/media/i2c/soc_camera/Kconfig               |   66 -
 drivers/media/i2c/soc_camera/Makefile              |   10 -
 drivers/media/i2c/soc_camera/ov9640.h              |  208 --
 drivers/media/i2c/soc_camera/soc_mt9m001.c         |  757 -------
 drivers/media/i2c/soc_camera/soc_mt9t112.c         | 1157 -----------
 drivers/media/i2c/soc_camera/soc_mt9v022.c         | 1012 ---------
 drivers/media/i2c/soc_camera/soc_ov5642.c          | 1087 ----------
 drivers/media/i2c/soc_camera/soc_ov772x.c          | 1123 ----------
 drivers/media/i2c/soc_camera/soc_ov9640.c          |  738 -------
 drivers/media/i2c/soc_camera/soc_ov9740.c          |  996 ---------
 drivers/media/i2c/soc_camera/soc_rj54n1cb0c.c      | 1415 -------------
 drivers/media/i2c/soc_camera/soc_tw9910.c          |  999 ---------    
Quoted 4 lines

I don't see why we should remove those. I mean, Jacopo is actually converting those drivers to not depend on soc_camera, and it is a way better to review those patches with the old code in place.

I have converted a few drivers used by some SH boards where I dropped dependencies on soc_camera, not to remove camera support from those. For others I don't have cameras to test with, nor I know about boards in mainline using them.

From my side, driver conversion is done.

Quoted 7 lines

So, at least while Jacopo is keep doing this work, I would keep at Kernel tree, as it helps to see a diff when the driver changes when getting rid of soc_camera dependencies.

So, IMO, the best would be to move those to /staging, eventually depending on BROKEN.

However, somebody with a (rather old) development setup using those camera sensor may wants to see if mainline supports them. We actually had a few patches coming lately (for ov. I understand Sakari's argument that those could be retrieved from git history, but a few people will notice imo. I also understand the additional maintainership burden of keeping them around, so I'm fine with either ways ;)

This is a list of the current situation in mainline, to have a better idea:

$for i in seq 1 9; do CAM=$(head -n $i /tmp/soc_cams | tail -n 1); echo $CAM; find drivers/media/ -name $CAM; done t9m001.c
drivers/media/i2c/soc_camera/mt9m001.c
mt9t112.c
drivers/media/i2c/mt9t112.c
drivers/media/i2c/soc_camera/mt9t112.c
mt9v022.c
drivers/media/i2c/soc_camera/mt9v022.c
ov5642.c
drivers/media/i2c/soc_camera/ov5642.c
ov772x.c
drivers/media/i2c/ov772x.c
drivers/media/i2c/soc_camera/ov772x.c
ov9640.c
drivers/media/i2c/soc_camera/ov9640.c
ov9740.c
drivers/media/i2c/soc_camera/ov9740.c
rj54n1cb0c.c
drivers/media/i2c/rj54n1cb0c.c
drivers/media/i2c/soc_camera/rj54n1cb0c.c
tw9910.c
drivers/media/i2c/tw9910.c
drivers/media/i2c/soc_camera/tw9910.c

So it seems to me only the following sensor do not have a non-soc_camera driver at the moment:

mt9m001.c
mt9v022.c
ov5642.c
ov9640.c
ov9740.c

Quoted 5 lines
Quoted 2 lines

Ok. So, what about keeping just those 5 drivers at staging? If, after an year, people won't do conversions, we can just drop them.

They've been there for years without anyone converting them. Do note that the conversion can be still done once the code is removed.

Well, people converted a lot of drivers already. See above. It is just that it takes time. The same applied to lirc: it stayed at staging for years. People gradually converted the drivers until we finally got rid of them.

That is the goal of staging: to give people some time to fix issues on broken drivers.

Quoted 2 lines

We did the same for a big bunch of sensor drivers that came with the atomisp2 driver. I don't see a difference here.

No, we only removed the atomisp driver after being sure that the only party that was pushing it lost its interest on fixing the issues. Even so, we waited for a while, as other parties might manifest their interests on doing that.

Also, in the case of atomisp, there were no other drivers depending on it, so removing it was a way easier and straight forward.

The point is: there's absolutely no reason why we should rush it, doing a half-baked removal, where several parts of the non working code would be left on drivers and even the header file for soc_camera.h would be kept.

The right way to do it is:

1) remove include soc_camera.h on drivers that don't need it anymore;
2) Move things to staging. There are actually two tasks here:
2a) get rid of useless soc-camera depend code on drivers/board code,

      removing their dependencies of soc_camera.h;

2b) move the soc-camera dependent code that makes sense to
staging (sensors - and maybe driver/board code for platforms that are still be actively maintained);
3) wait for a couple of Kernel releases;
4) drop everything related to soc_camera from staging.

From the e-mail from Jacopo, from sensors PoV, only those sensor drivers may make sense to keep for a while:

	soc_mt9m001.c
	soc_mt9v022.c
	soc_ov5642.c
	soc_ov9640.c
	soc_ov9740.c  

So, on step 2, we can very likely get rid of the other sensor drivers that already exists and don't depend on soc_camera.

Thanks,
Mauro

#15 lore raw

Re: [PATCH 3/4] SoC camera: Remove the framework and the drivers

In reply to Mauro Carvalho Chehab

Em Tue, 30 Oct 2018 06:43:41 -0300
Mauro Carvalho Chehab <[email protected]> escreveu:

Quoted 271 lines

Em Tue, 30 Oct 2018 01:21:34 +0200
Sakari Ailus <[email protected]> escreveu:

Quoted 12 lines

The SoC camera framework has been obsolete for some time and it is no longer functional. A few drivers have been converted to the V4L2 sub-device API but for the rest the conversion has not taken place yet.

In order to keep the tree clean and to avoid keep maintaining non-functional and obsolete code, remove the SoC camera framework as well as the drivers that depend on it.

---
Resending, this time with git format-patch -D .

Quoted 15 lines
 MAINTAINERS                                        |    8 -
 drivers/media/i2c/Kconfig                          |    8 -
 drivers/media/i2c/Makefile                         |    1 -
 drivers/media/i2c/soc_camera/Kconfig               |   66 -
 drivers/media/i2c/soc_camera/Makefile              |   10 -
 drivers/media/i2c/soc_camera/ov9640.h              |  208 --
 drivers/media/i2c/soc_camera/soc_mt9m001.c         |  757 -------
 drivers/media/i2c/soc_camera/soc_mt9t112.c         | 1157 -----------
 drivers/media/i2c/soc_camera/soc_mt9v022.c         | 1012 ---------
 drivers/media/i2c/soc_camera/soc_ov5642.c          | 1087 ----------
 drivers/media/i2c/soc_camera/soc_ov772x.c          | 1123 ----------
 drivers/media/i2c/soc_camera/soc_ov9640.c          |  738 -------
 drivers/media/i2c/soc_camera/soc_ov9740.c          |  996 ---------
 drivers/media/i2c/soc_camera/soc_rj54n1cb0c.c      | 1415 -------------
 drivers/media/i2c/soc_camera/soc_tw9910.c          |  999 ---------  

I don't see why we should remove those. I mean, Jacopo is actually converting those drivers to not depend on soc_camera, and it is a way better to review those patches with the old code in place.

IMHO, the best would be to move those to /staging, eventually depending on BROKEN.

Quoted 232 lines
 drivers/media/platform/Kconfig                     |    1 -
 drivers/media/platform/Makefile                    |    2 -
 drivers/media/platform/soc_camera/Kconfig          |   26 -
 drivers/media/platform/soc_camera/Makefile         |    9 -
 .../platform/soc_camera/sh_mobile_ceu_camera.c     | 1810 ----------------
 drivers/media/platform/soc_camera/soc_camera.c     | 2169 --------------------
 .../platform/soc_camera/soc_camera_platform.c      |  188 --
 drivers/media/platform/soc_camera/soc_mediabus.c   |  533 -----
 drivers/media/platform/soc_camera/soc_scale_crop.c |  426 ----
 drivers/media/platform/soc_camera/soc_scale_crop.h |   47 -
 drivers/staging/media/Kconfig                      |    4 -
 drivers/staging/media/Makefile                     |    2 -
 drivers/staging/media/imx074/Kconfig               |    5 -
 drivers/staging/media/imx074/Makefile              |    1 -
 drivers/staging/media/imx074/TODO                  |    5 -
 drivers/staging/media/imx074/imx074.c              |  496 -----
 drivers/staging/media/mt9t031/Kconfig              |    5 -
 drivers/staging/media/mt9t031/Makefile             |    1 -
 drivers/staging/media/mt9t031/TODO                 |    5 -
 drivers/staging/media/mt9t031/mt9t031.c            |  857 --------
 35 files changed, 16177 deletions(-)
 delete mode 100644 drivers/media/i2c/soc_camera/Kconfig
 delete mode 100644 drivers/media/i2c/soc_camera/Makefile
 delete mode 100644 drivers/media/i2c/soc_camera/ov9640.h
 delete mode 100644 drivers/media/i2c/soc_camera/soc_mt9m001.c
 delete mode 100644 drivers/media/i2c/soc_camera/soc_mt9t112.c
 delete mode 100644 drivers/media/i2c/soc_camera/soc_mt9v022.c
 delete mode 100644 drivers/media/i2c/soc_camera/soc_ov5642.c
 delete mode 100644 drivers/media/i2c/soc_camera/soc_ov772x.c
 delete mode 100644 drivers/media/i2c/soc_camera/soc_ov9640.c
 delete mode 100644 drivers/media/i2c/soc_camera/soc_ov9740.c
 delete mode 100644 drivers/media/i2c/soc_camera/soc_rj54n1cb0c.c
 delete mode 100644 drivers/media/i2c/soc_camera/soc_tw9910.c
 delete mode 100644 drivers/media/platform/soc_camera/Kconfig
 delete mode 100644 drivers/media/platform/soc_camera/Makefile
 delete mode 100644 drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c
 delete mode 100644 drivers/media/platform/soc_camera/soc_camera.c
 delete mode 100644 drivers/media/platform/soc_camera/soc_camera_platform.c
 delete mode 100644 drivers/media/platform/soc_camera/soc_mediabus.c
 delete mode 100644 drivers/media/platform/soc_camera/soc_scale_crop.c
 delete mode 100644 drivers/media/platform/soc_camera/soc_scale_crop.h
 delete mode 100644 drivers/staging/media/imx074/Kconfig
 delete mode 100644 drivers/staging/media/imx074/Makefile
 delete mode 100644 drivers/staging/media/imx074/TODO
 delete mode 100644 drivers/staging/media/imx074/imx074.c
 delete mode 100644 drivers/staging/media/mt9t031/Kconfig
 delete mode 100644 drivers/staging/media/mt9t031/Makefile
 delete mode 100644 drivers/staging/media/mt9t031/TODO
 delete mode 100644 drivers/staging/media/mt9t031/mt9t031.c
MAINTAINERS +0 -8
index 23021e0df5d7..788de30125c1 100644
@@ -13422,14 +13422,6 @@ L:	[email protected]
 S:	Maintained
 F:	drivers/net/ethernet/smsc/smsc9420.*
 
-SOC-CAMERA V4L2 SUBSYSTEM
-L:	[email protected]
-T:	git git://linuxtv.org/media_tree.git
-S:	Orphan
-F:	include/media/soc*
-F:	drivers/media/i2c/soc_camera/
-F:	drivers/media/platform/soc_camera/
-
 SOCIONEXT SYNQUACER I2C DRIVER
 M:	Ard Biesheuvel <[email protected]>
 L:	[email protected]
drivers/media/i2c/Kconfig +0 -8
index 704af210e270..c7683ac5a3d8 100644
@@ -1091,12 +1091,4 @@ config VIDEO_I2C
 
 endmenu
 
-menu "Sensors used on soc_camera driver"
-
-if SOC_CAMERA
-	source "drivers/media/i2c/soc_camera/Kconfig"
-endif
-
-endmenu
-
 endif
drivers/media/i2c/Makefile +0 -1
index 260d4d9ec2a1..d83d1f2a08ee 100644
@@ -6,7 +6,6 @@ obj-$(CONFIG_VIDEO_SMIAPP)	+= smiapp/
 obj-$(CONFIG_VIDEO_ET8EK8)	+= et8ek8/
 obj-$(CONFIG_VIDEO_CX25840) += cx25840/
 obj-$(CONFIG_VIDEO_M5MOLS)	+= m5mols/
-obj-y				+= soc_camera/
 
 obj-$(CONFIG_VIDEO_APTINA_PLL) += aptina-pll.o
 obj-$(CONFIG_VIDEO_TVAUDIO) += tvaudio.o
drivers/media/i2c/soc_camera/Kconfig deleted +0 -0
deleted file mode 100644
index 7c2aabc8a3f6..000000000000
drivers/media/i2c/soc_camera/Makefile deleted +0 -0
deleted file mode 100644
index 09ae483b96ef..000000000000
drivers/media/i2c/soc_camera/ov9640.h deleted +0 -0
deleted file mode 100644
index 65d13ff17536..000000000000
drivers/media/i2c/soc_camera/soc_mt9m001.c deleted +0 -0
deleted file mode 100644
index a1a85ff838c5..000000000000
drivers/media/i2c/soc_camera/soc_mt9t112.c deleted +0 -0
deleted file mode 100644
index ea1ff270bc2d..000000000000
drivers/media/i2c/soc_camera/soc_mt9v022.c deleted +0 -0
deleted file mode 100644
index 6d922b17ea94..000000000000
drivers/media/i2c/soc_camera/soc_ov5642.c deleted +0 -0
deleted file mode 100644
index 0931898c79dd..000000000000
drivers/media/i2c/soc_camera/soc_ov772x.c deleted +0 -0
deleted file mode 100644
index fafd372527b2..000000000000
drivers/media/i2c/soc_camera/soc_ov9640.c deleted +0 -0
deleted file mode 100644
index eb91b8240083..000000000000
drivers/media/i2c/soc_camera/soc_ov9740.c deleted +0 -0
deleted file mode 100644
index a07d3145d1b4..000000000000
drivers/media/i2c/soc_camera/soc_rj54n1cb0c.c deleted +0 -0
deleted file mode 100644
index f0cb49a6167b..000000000000
drivers/media/i2c/soc_camera/soc_tw9910.c deleted +0 -0
deleted file mode 100644
index bdb5e0a431e9..000000000000
drivers/media/platform/Kconfig +0 -1
index 0edacfb01f3a..87bca0fe37a4 100644
@@ -132,7 +132,6 @@ config VIDEO_RENESAS_CEU
 	---help---
 	  This is a v4l2 driver for the Renesas CEU Interface
 
-source "drivers/media/platform/soc_camera/Kconfig"
 source "drivers/media/platform/exynos4-is/Kconfig"
 source "drivers/media/platform/am437x/Kconfig"
 source "drivers/media/platform/xilinx/Kconfig"
drivers/media/platform/Makefile +0 -2
index 6ab6200dd9c9..ad1d47c1a3b1 100644
@@ -59,8 +59,6 @@ obj-y					+= davinci/
 
 obj-$(CONFIG_VIDEO_SH_VOU)		+= sh_vou.o
 
-obj-$(CONFIG_SOC_CAMERA)		+= soc_camera/
-
 obj-$(CONFIG_VIDEO_RCAR_DRIF)		+= rcar_drif.o
 obj-$(CONFIG_VIDEO_RENESAS_CEU)		+= renesas-ceu.o
 obj-$(CONFIG_VIDEO_RENESAS_FCP)		+= rcar-fcp.o
drivers/media/platform/soc_camera/Kconfig deleted +0 -0
deleted file mode 100644
index 669d116b8f09..000000000000
drivers/media/platform/soc_camera/Makefile deleted +0 -0
deleted file mode 100644
index 07a451e8b228..000000000000
drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c deleted +0 -0
deleted file mode 100644
index 6803f744e307..000000000000
drivers/media/platform/soc_camera/soc_camera.c deleted +0 -0
deleted file mode 100644
index 0a70fb67c401..000000000000
drivers/media/platform/soc_camera/soc_camera_platform.c deleted +0 -0
deleted file mode 100644
index 79fbe1fea95f..000000000000
drivers/media/platform/soc_camera/soc_mediabus.c deleted +0 -0
deleted file mode 100644
index be74008ec0ca..000000000000
drivers/media/platform/soc_camera/soc_scale_crop.c deleted +0 -0
deleted file mode 100644
index 8d25ca0490f7..000000000000
drivers/media/platform/soc_camera/soc_scale_crop.h deleted +0 -0
deleted file mode 100644
index 9ca469312a1f..000000000000
drivers/staging/media/Kconfig +0 -4
index db5cf67047ad..ad0de8a22313 100644
@@ -25,10 +25,6 @@ source "drivers/staging/media/davinci_vpfe/Kconfig"
 
 source "drivers/staging/media/imx/Kconfig"
 
-source "drivers/staging/media/imx074/Kconfig"
-
-source "drivers/staging/media/mt9t031/Kconfig"
-
 source "drivers/staging/media/omap4iss/Kconfig"
 
 source "drivers/staging/media/tegra-vde/Kconfig"
drivers/staging/media/Makefile +0 -2
index 503fbe47fa58..2d268d3905e5 100644
@@ -1,8 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_I2C_BCM2048)	+= bcm2048/
 obj-$(CONFIG_VIDEO_IMX_MEDIA)	+= imx/
-obj-$(CONFIG_SOC_CAMERA_IMX074)	+= imx074/
-obj-$(CONFIG_SOC_CAMERA_MT9T031)	+= mt9t031/
 obj-$(CONFIG_VIDEO_DM365_VPFE)	+= davinci_vpfe/
 obj-$(CONFIG_VIDEO_OMAP4)	+= omap4iss/
 obj-$(CONFIG_TEGRA_VDE)		+= tegra-vde/
drivers/staging/media/imx074/Kconfig deleted +0 -0
deleted file mode 100644
index 229cbeea580b..000000000000
drivers/staging/media/imx074/Makefile deleted +0 -0
deleted file mode 100644
index 7d183574aa84..000000000000
drivers/staging/media/imx074/TODO deleted +0 -0
deleted file mode 100644
index 15580a4f950c..000000000000
drivers/staging/media/imx074/imx074.c deleted +0 -0
deleted file mode 100644
index 1676c166dc83..000000000000
drivers/staging/media/mt9t031/Kconfig deleted +0 -0
deleted file mode 100644
index 9a58aaf72edd..000000000000
drivers/staging/media/mt9t031/Makefile deleted +0 -0
deleted file mode 100644
index bfd24c442b33..000000000000
drivers/staging/media/mt9t031/TODO deleted +0 -0
deleted file mode 100644
index 15580a4f950c..000000000000
Quoted 8 lines

drivers/staging/media/mt9t031/mt9t031.c

Quoted 3 lines
drivers/staging/media/mt9t031/mt9t031.c deleted +0 -0
deleted file mode 100644
index 4ff179302b4f..000000000000  

Thanks,
Mauro

Thanks,
Mauro

#16 lore raw

Re: [PATCH 3/4] SoC camera: Remove the framework and the drivers

Em Tue, 30 Oct 2018 09:06:08 -0300
Mauro Carvalho Chehab <[email protected]> escreveu:

Quoted 2 lines

Em Tue, 30 Oct 2018 06:43:41 -0300
Mauro Carvalho Chehab <[email protected]> escreveu:

Please ignore this e-mail. I'm experiencing some e-mail troubles today.

Will resend it properly.

Regards,
Mauro

#17 lore raw

PATCH 4/4 SoC camera: Tidy the header

In reply to Sakari Ailus

Clean up the SoC camera framework header. It only exists now to keep board code compiling. The header can be removed once the board code dependencies to it has been removed.

---
 include/media/soc_camera.h | 335 ---------------------------------------------
 1 file changed, 335 deletions(-)
include/media/soc_camera.h +0 -335
index b7e42a1b0910..14d19da6052a 100644
@@ -22,172 +22,6 @@
 #include <media/v4l2-ctrls.h>
 #include <media/v4l2-device.h>
 
-struct file;
-struct soc_camera_desc;
-struct soc_camera_async_client;
-
-struct soc_camera_device {
-	struct list_head list;		/* list of all registered devices */
-	struct soc_camera_desc *sdesc;
-	struct device *pdev;		/* Platform device */
-	struct device *parent;		/* Camera host device */
-	struct device *control;		/* E.g., the i2c client */
-	s32 user_width;
-	s32 user_height;
-	u32 bytesperline;		/* for padding, zero if unused */
-	u32 sizeimage;
-	enum v4l2_colorspace colorspace;
-	unsigned char iface;		/* Host number */
-	unsigned char devnum;		/* Device number per host */
-	struct soc_camera_sense *sense;	/* See comment in struct definition */
-	struct video_device *vdev;
-	struct v4l2_ctrl_handler ctrl_handler;
-	const struct soc_camera_format_xlate *current_fmt;
-	struct soc_camera_format_xlate *user_formats;
-	int num_user_formats;
-	enum v4l2_field field;		/* Preserve field over close() */
-	void *host_priv;		/* Per-device host private data */
-	/* soc_camera.c private count. Only accessed with .host_lock held */
-	int use_count;
-	struct file *streamer;		/* stream owner */
-	struct v4l2_clk *clk;
-	/* Asynchronous subdevice management */
-	struct soc_camera_async_client *sasc;
-	/* video buffer queue */
-	struct vb2_queue vb2_vidq;
-};
-
-/* Host supports programmable stride */
-#define SOCAM_HOST_CAP_STRIDE		(1 << 0)
-
-enum soc_camera_subdev_role {
-	SOCAM_SUBDEV_DATA_SOURCE = 1,
-	SOCAM_SUBDEV_DATA_SINK,
-	SOCAM_SUBDEV_DATA_PROCESSOR,
-};
-
-struct soc_camera_async_subdev {
-	struct v4l2_async_subdev asd;
-	enum soc_camera_subdev_role role;
-};
-
-struct soc_camera_host {
-	struct v4l2_device v4l2_dev;
-	struct list_head list;
-	struct mutex host_lock;		/* Main synchronisation lock */
-	struct mutex clk_lock;		/* Protect pipeline modifications */
-	unsigned char nr;		/* Host number */
-	u32 capabilities;
-	struct soc_camera_device *icd;	/* Currently attached client */
-	void *priv;
-	const char *drv_name;
-	struct soc_camera_host_ops *ops;
-	struct v4l2_async_subdev **asd;	/* Flat array, arranged in groups */
-	unsigned int *asd_sizes;	/* 0-terminated array of asd group sizes */
-};
-
-struct soc_camera_host_ops {
-	struct module *owner;
-	int (*add)(struct soc_camera_device *);
-	void (*remove)(struct soc_camera_device *);
-	int (*clock_start)(struct soc_camera_host *);
-	void (*clock_stop)(struct soc_camera_host *);
-	/*
-	 * .get_formats() is called for each client device format, but
-	 * .put_formats() is only called once. Further, if any of the calls to
-	 * .get_formats() fail, .put_formats() will not be called at all, the
-	 * failing .get_formats() must then clean up internally.
-	 */
-	int (*get_formats)(struct soc_camera_device *, unsigned int,
-			   struct soc_camera_format_xlate *);
-	void (*put_formats)(struct soc_camera_device *);
-	int (*get_selection)(struct soc_camera_device *, struct v4l2_selection *);
-	int (*set_selection)(struct soc_camera_device *, struct v4l2_selection *);
-	/*
-	 * The difference to .set_selection() is, that .set_liveselection is not allowed
-	 * to change the output sizes
-	 */
-	int (*set_liveselection)(struct soc_camera_device *, struct v4l2_selection *);
-	int (*set_fmt)(struct soc_camera_device *, struct v4l2_format *);
-	int (*try_fmt)(struct soc_camera_device *, struct v4l2_format *);
-	int (*init_videobuf2)(struct vb2_queue *,
-			      struct soc_camera_device *);
-	int (*querycap)(struct soc_camera_host *, struct v4l2_capability *);
-	int (*set_bus_param)(struct soc_camera_device *);
-	int (*get_parm)(struct soc_camera_device *, struct v4l2_streamparm *);
-	int (*set_parm)(struct soc_camera_device *, struct v4l2_streamparm *);
-	int (*enum_framesizes)(struct soc_camera_device *, struct v4l2_frmsizeenum *);
-	__poll_t (*poll)(struct file *, poll_table *);
-};
-
-#define SOCAM_SENSOR_INVERT_PCLK	(1 << 0)
-#define SOCAM_SENSOR_INVERT_MCLK	(1 << 1)
-#define SOCAM_SENSOR_INVERT_HSYNC	(1 << 2)
-#define SOCAM_SENSOR_INVERT_VSYNC	(1 << 3)
-#define SOCAM_SENSOR_INVERT_DATA	(1 << 4)
-
-struct i2c_board_info;
-struct regulator_bulk_data;
-
-struct soc_camera_subdev_desc {
-	/* Per camera SOCAM_SENSOR_* bus flags */
-	unsigned long flags;
-
-	/* sensor driver private platform data */
-	void *drv_priv;
-
-	/*
-	 * Set unbalanced_power to true to deal with legacy drivers, failing to
-	 * balance their calls to subdevice's .s_power() method. clock_state is
-	 * then used internally by helper functions, it shouldn't be touched by
-	 * drivers or the platform code.
-	 */
-	bool unbalanced_power;
-	unsigned long clock_state;
-
-	/* Optional callbacks to power on or off and reset the sensor */
-	int (*power)(struct device *, int);
-	int (*reset)(struct device *);
-
-	/*
-	 * some platforms may support different data widths than the sensors
-	 * native ones due to different data line routing. Let the board code
-	 * overwrite the width flags.
-	 */
-	int (*set_bus_param)(struct soc_camera_subdev_desc *, unsigned long flags);
-	unsigned long (*query_bus_param)(struct soc_camera_subdev_desc *);
-	void (*free_bus)(struct soc_camera_subdev_desc *);
-
-	/* Optional regulators that have to be managed on power on/off events */
-	struct v4l2_subdev_platform_data sd_pdata;
-};
-
-struct soc_camera_host_desc {
-	/* Camera bus id, used to match a camera and a bus */
-	int bus_id;
-	int i2c_adapter_id;
-	struct i2c_board_info *board_info;
-	const char *module_name;
-
-	/*
-	 * For non-I2C devices platform has to provide methods to add a device
-	 * to the system and to remove it
-	 */
-	int (*add_device)(struct soc_camera_device *);
-	void (*del_device)(struct soc_camera_device *);
-};
-
-/*
- * Platform data for "soc-camera-pdrv"
- * This MUST be kept binary-identical to struct soc_camera_link below, until
- * it is completely replaced by this one, after which we can split it into its
- * two components.
- */
-struct soc_camera_desc {
-	struct soc_camera_subdev_desc subdev_desc;
-	struct soc_camera_host_desc host_desc;
-};
-
 /* Prepare to replace this struct: don't change its layout any more! */
 struct soc_camera_link {
 	/*
@@ -200,11 +34,6 @@ struct soc_camera_link {
 
 	void *priv;
 
-	/* Set by platforms to handle misbehaving drivers */
-	bool unbalanced_power;
-	/* Used by soc-camera helper functions */
-	unsigned long clock_state;
-
 	/* Optional callbacks to power on or off and reset the sensor */
 	int (*power)(struct device *, int);
 	int (*reset)(struct device *);
@@ -217,12 +46,6 @@ struct soc_camera_link {
 	unsigned long (*query_bus_param)(struct soc_camera_link *);
 	void (*free_bus)(struct soc_camera_link *);
 
-	/* Optional regulators that have to be managed on power on/off events */
-	struct regulator_bulk_data *regulators;
-	int num_regulators;
-
-	void *host_priv;
-
 	/*
 	 * Host part - keep at bottom and compatible to
 	 * struct soc_camera_host_desc
@@ -233,168 +56,10 @@ struct soc_camera_link {
 	int i2c_adapter_id;
 	struct i2c_board_info *board_info;
 	const char *module_name;
-
-	/*
-	 * For non-I2C devices platform has to provide methods to add a device
-	 * to the system and to remove it
-	 */
-	int (*add_device)(struct soc_camera_device *);
-	void (*del_device)(struct soc_camera_device *);
-};
-
-static inline struct soc_camera_host *to_soc_camera_host(
-	const struct device *dev)
-{
-	struct v4l2_device *v4l2_dev = dev_get_drvdata(dev);
-
-	return container_of(v4l2_dev, struct soc_camera_host, v4l2_dev);
-}
-
-static inline struct soc_camera_desc *to_soc_camera_desc(
-	const struct soc_camera_device *icd)
-{
-	return icd->sdesc;
-}
-
-static inline struct device *to_soc_camera_control(
-	const struct soc_camera_device *icd)
-{
-	return icd->control;
-}
-
-static inline struct v4l2_subdev *soc_camera_to_subdev(
-	const struct soc_camera_device *icd)
-{
-	struct device *control = to_soc_camera_control(icd);
-	return dev_get_drvdata(control);
-}
-
-int soc_camera_host_register(struct soc_camera_host *ici);
-void soc_camera_host_unregister(struct soc_camera_host *ici);
-
-const struct soc_camera_format_xlate *soc_camera_xlate_by_fourcc(
-	struct soc_camera_device *icd, unsigned int fourcc);
-
-/**
- * struct soc_camera_format_xlate - match between host and sensor formats
- * @code: code of a sensor provided format
- * @host_fmt: host format after host translation from code
- *
- * Host and sensor translation structure. Used in table of host and sensor
- * formats matchings in soc_camera_device. A host can override the generic list
- * generation by implementing get_formats(), and use it for format checks and
- * format setup.
- */
-struct soc_camera_format_xlate {
-	u32 code;
-	const struct soc_mbus_pixelfmt *host_fmt;
-};
-
-#define SOCAM_SENSE_PCLK_CHANGED	(1 << 0)
-
-/**
- * This struct can be attached to struct soc_camera_device by the host driver
- * to request sense from the camera, for example, when calling .set_fmt(). The
- * host then can check which flags are set and verify respective values if any.
- * For example, if SOCAM_SENSE_PCLK_CHANGED is set, it means, pixclock has
- * changed during this operation. After completion the host should detach sense.
- *
- * @flags		ored SOCAM_SENSE_* flags
- * @master_clock	if the host wants to be informed about pixel-clock
- *			change, it better set master_clock.
- * @pixel_clock_max	maximum pixel clock frequency supported by the host,
- *			camera is not allowed to exceed this.
- * @pixel_clock		if the camera driver changed pixel clock during this
- *			operation, it sets SOCAM_SENSE_PCLK_CHANGED, uses
- *			master_clock to calculate the new pixel-clock and
- *			sets this field.
- */
-struct soc_camera_sense {
-	unsigned long flags;
-	unsigned long master_clock;
-	unsigned long pixel_clock_max;
-	unsigned long pixel_clock;
 };
 
 #define SOCAM_DATAWIDTH(x)	BIT((x) - 1)
-#define SOCAM_DATAWIDTH_4	SOCAM_DATAWIDTH(4)
 #define SOCAM_DATAWIDTH_8	SOCAM_DATAWIDTH(8)
-#define SOCAM_DATAWIDTH_9	SOCAM_DATAWIDTH(9)
 #define SOCAM_DATAWIDTH_10	SOCAM_DATAWIDTH(10)
-#define SOCAM_DATAWIDTH_12	SOCAM_DATAWIDTH(12)
-#define SOCAM_DATAWIDTH_15	SOCAM_DATAWIDTH(15)
-#define SOCAM_DATAWIDTH_16	SOCAM_DATAWIDTH(16)
-#define SOCAM_DATAWIDTH_18	SOCAM_DATAWIDTH(18)
-#define SOCAM_DATAWIDTH_24	SOCAM_DATAWIDTH(24)
-
-#define SOCAM_DATAWIDTH_MASK (SOCAM_DATAWIDTH_4 | SOCAM_DATAWIDTH_8 | \
-			      SOCAM_DATAWIDTH_9 | SOCAM_DATAWIDTH_10 | \
-			      SOCAM_DATAWIDTH_12 | SOCAM_DATAWIDTH_15 | \
-			      SOCAM_DATAWIDTH_16 | SOCAM_DATAWIDTH_18 | \
-			      SOCAM_DATAWIDTH_24)
-
-static inline void soc_camera_limit_side(int *start, int *length,
-		unsigned int start_min,
-		unsigned int length_min, unsigned int length_max)
-{
-	if (*length < length_min)
-		*length = length_min;
-	else if (*length > length_max)
-		*length = length_max;
-
-	if (*start < start_min)
-		*start = start_min;
-	else if (*start > start_min + length_max - *length)
-		*start = start_min + length_max - *length;
-}
-
-unsigned long soc_camera_apply_board_flags(struct soc_camera_subdev_desc *ssdd,
-					   const struct v4l2_mbus_config *cfg);
-
-int soc_camera_power_init(struct device *dev, struct soc_camera_subdev_desc *ssdd);
-int soc_camera_power_on(struct device *dev, struct soc_camera_subdev_desc *ssdd,
-			struct v4l2_clk *clk);
-int soc_camera_power_off(struct device *dev, struct soc_camera_subdev_desc *ssdd,
-			 struct v4l2_clk *clk);
-
-static inline int soc_camera_set_power(struct device *dev,
-		struct soc_camera_subdev_desc *ssdd, struct v4l2_clk *clk, bool on)
-{
-	return on ? soc_camera_power_on(dev, ssdd, clk)
-		  : soc_camera_power_off(dev, ssdd, clk);
-}
-
-/* This is only temporary here - until v4l2-subdev begins to link to video_device */
-#include <linux/i2c.h>
-static inline struct video_device *soc_camera_i2c_to_vdev(const struct i2c_client *client)
-{
-	struct v4l2_subdev *sd = i2c_get_clientdata(client);
-	struct soc_camera_device *icd = v4l2_get_subdev_hostdata(sd);
-	return icd ? icd->vdev : NULL;
-}
-
-static inline struct soc_camera_subdev_desc *soc_camera_i2c_to_desc(const struct i2c_client *client)
-{
-	return client->dev.platform_data;
-}
-
-static inline struct v4l2_subdev *soc_camera_vdev_to_subdev(struct video_device *vdev)
-{
-	struct soc_camera_device *icd = video_get_drvdata(vdev);
-	return soc_camera_to_subdev(icd);
-}
-
-static inline struct soc_camera_device *soc_camera_from_vb2q(const struct vb2_queue *vq)
-{
-	return container_of(vq, struct soc_camera_device, vb2_vidq);
-}
-
-static inline u32 soc_camera_grp_id(const struct soc_camera_device *icd)
-{
-	return (icd->iface << 8) | (icd->devnum + 1);
-}
-
-void soc_camera_lock(struct vb2_queue *vq);
-void soc_camera_unlock(struct vb2_queue *vq);
 
 #endif
Signature · 1 line
2.11.0
#18 lore raw

Re: [PATCH 4/4] SoC camera: Tidy the header

Em Tue, 30 Oct 2018 01:00:29 +0200
Sakari Ailus <[email protected]> escreveu:

Quoted 14 lines

Clean up the SoC camera framework header. It only exists now to keep board code compiling. The header can be removed once the board code dependencies to it has been removed.

---
 include/media/soc_camera.h | 335 ---------------------------------------------
 1 file changed, 335 deletions(-)
include/media/soc_camera.h +0 -0
index b7e42a1b0910..14d19da6052a 100644

include/media/soc_camera.h line 23

Quoted 2 lines
include/media/soc_camera.h +0 -0
@@ -22,172 +22,6 @@
 #include <media/v4l2-ctrls.h>
 #include <media/v4l2-device.h>

That doesn't make any sense. soc_camera.h should have the same fate as the entire soc_camera infrastructure: either be removed or moved to staging, and everything else that doesn't have the same fate should get rid of this header.

Regards,
Mauro

Quoted 354 lines
include/media/soc_camera.h +0 -327
-struct file;
-struct soc_camera_desc;
-struct soc_camera_async_client;
-
-struct soc_camera_device {
-	struct list_head list;		/* list of all registered devices */
-	struct soc_camera_desc *sdesc;
-	struct device *pdev;		/* Platform device */
-	struct device *parent;		/* Camera host device */
-	struct device *control;		/* E.g., the i2c client */
-	s32 user_width;
-	s32 user_height;
-	u32 bytesperline;		/* for padding, zero if unused */
-	u32 sizeimage;
-	enum v4l2_colorspace colorspace;
-	unsigned char iface;		/* Host number */
-	unsigned char devnum;		/* Device number per host */
-	struct soc_camera_sense *sense;	/* See comment in struct definition */
-	struct video_device *vdev;
-	struct v4l2_ctrl_handler ctrl_handler;
-	const struct soc_camera_format_xlate *current_fmt;
-	struct soc_camera_format_xlate *user_formats;
-	int num_user_formats;
-	enum v4l2_field field;		/* Preserve field over close() */
-	void *host_priv;		/* Per-device host private data */
-	/* soc_camera.c private count. Only accessed with .host_lock held */
-	int use_count;
-	struct file *streamer;		/* stream owner */
-	struct v4l2_clk *clk;
-	/* Asynchronous subdevice management */
-	struct soc_camera_async_client *sasc;
-	/* video buffer queue */
-	struct vb2_queue vb2_vidq;
-};
-
-/* Host supports programmable stride */
-#define SOCAM_HOST_CAP_STRIDE		(1 << 0)
-
-enum soc_camera_subdev_role {
-	SOCAM_SUBDEV_DATA_SOURCE = 1,
-	SOCAM_SUBDEV_DATA_SINK,
-	SOCAM_SUBDEV_DATA_PROCESSOR,
-};
-
-struct soc_camera_async_subdev {
-	struct v4l2_async_subdev asd;
-	enum soc_camera_subdev_role role;
-};
-
-struct soc_camera_host {
-	struct v4l2_device v4l2_dev;
-	struct list_head list;
-	struct mutex host_lock;		/* Main synchronisation lock */
-	struct mutex clk_lock;		/* Protect pipeline modifications */
-	unsigned char nr;		/* Host number */
-	u32 capabilities;
-	struct soc_camera_device *icd;	/* Currently attached client */
-	void *priv;
-	const char *drv_name;
-	struct soc_camera_host_ops *ops;
-	struct v4l2_async_subdev **asd;	/* Flat array, arranged in groups */
-	unsigned int *asd_sizes;	/* 0-terminated array of asd group sizes */
-};
-
-struct soc_camera_host_ops {
-	struct module *owner;
-	int (*add)(struct soc_camera_device *);
-	void (*remove)(struct soc_camera_device *);
-	int (*clock_start)(struct soc_camera_host *);
-	void (*clock_stop)(struct soc_camera_host *);
-	/*
-	 * .get_formats() is called for each client device format, but
-	 * .put_formats() is only called once. Further, if any of the calls to
-	 * .get_formats() fail, .put_formats() will not be called at all, the
-	 * failing .get_formats() must then clean up internally.
-	 */
-	int (*get_formats)(struct soc_camera_device *, unsigned int,
-			   struct soc_camera_format_xlate *);
-	void (*put_formats)(struct soc_camera_device *);
-	int (*get_selection)(struct soc_camera_device *, struct v4l2_selection *);
-	int (*set_selection)(struct soc_camera_device *, struct v4l2_selection *);
-	/*
-	 * The difference to .set_selection() is, that .set_liveselection is not allowed
-	 * to change the output sizes
-	 */
-	int (*set_liveselection)(struct soc_camera_device *, struct v4l2_selection *);
-	int (*set_fmt)(struct soc_camera_device *, struct v4l2_format *);
-	int (*try_fmt)(struct soc_camera_device *, struct v4l2_format *);
-	int (*init_videobuf2)(struct vb2_queue *,
-			      struct soc_camera_device *);
-	int (*querycap)(struct soc_camera_host *, struct v4l2_capability *);
-	int (*set_bus_param)(struct soc_camera_device *);
-	int (*get_parm)(struct soc_camera_device *, struct v4l2_streamparm *);
-	int (*set_parm)(struct soc_camera_device *, struct v4l2_streamparm *);
-	int (*enum_framesizes)(struct soc_camera_device *, struct v4l2_frmsizeenum *);
-	__poll_t (*poll)(struct file *, poll_table *);
-};
-
-#define SOCAM_SENSOR_INVERT_PCLK	(1 << 0)
-#define SOCAM_SENSOR_INVERT_MCLK	(1 << 1)
-#define SOCAM_SENSOR_INVERT_HSYNC	(1 << 2)
-#define SOCAM_SENSOR_INVERT_VSYNC	(1 << 3)
-#define SOCAM_SENSOR_INVERT_DATA	(1 << 4)
-
-struct i2c_board_info;
-struct regulator_bulk_data;
-
-struct soc_camera_subdev_desc {
-	/* Per camera SOCAM_SENSOR_* bus flags */
-	unsigned long flags;
-
-	/* sensor driver private platform data */
-	void *drv_priv;
-
-	/*
-	 * Set unbalanced_power to true to deal with legacy drivers, failing to
-	 * balance their calls to subdevice's .s_power() method. clock_state is
-	 * then used internally by helper functions, it shouldn't be touched by
-	 * drivers or the platform code.
-	 */
-	bool unbalanced_power;
-	unsigned long clock_state;
-
-	/* Optional callbacks to power on or off and reset the sensor */
-	int (*power)(struct device *, int);
-	int (*reset)(struct device *);
-
-	/*
-	 * some platforms may support different data widths than the sensors
-	 * native ones due to different data line routing. Let the board code
-	 * overwrite the width flags.
-	 */
-	int (*set_bus_param)(struct soc_camera_subdev_desc *, unsigned long flags);
-	unsigned long (*query_bus_param)(struct soc_camera_subdev_desc *);
-	void (*free_bus)(struct soc_camera_subdev_desc *);
-
-	/* Optional regulators that have to be managed on power on/off events */
-	struct v4l2_subdev_platform_data sd_pdata;
-};
-
-struct soc_camera_host_desc {
-	/* Camera bus id, used to match a camera and a bus */
-	int bus_id;
-	int i2c_adapter_id;
-	struct i2c_board_info *board_info;
-	const char *module_name;
-
-	/*
-	 * For non-I2C devices platform has to provide methods to add a device
-	 * to the system and to remove it
-	 */
-	int (*add_device)(struct soc_camera_device *);
-	void (*del_device)(struct soc_camera_device *);
-};
-
-/*
- * Platform data for "soc-camera-pdrv"
- * This MUST be kept binary-identical to struct soc_camera_link below, until
- * it is completely replaced by this one, after which we can split it into its
- * two components.
- */
-struct soc_camera_desc {
-	struct soc_camera_subdev_desc subdev_desc;
-	struct soc_camera_host_desc host_desc;
-};
-
 /* Prepare to replace this struct: don't change its layout any more! */
 struct soc_camera_link {
 	/*
@@ -200,11 +34,6 @@ struct soc_camera_link {
 
 	void *priv;
 
-	/* Set by platforms to handle misbehaving drivers */
-	bool unbalanced_power;
-	/* Used by soc-camera helper functions */
-	unsigned long clock_state;
-
 	/* Optional callbacks to power on or off and reset the sensor */
 	int (*power)(struct device *, int);
 	int (*reset)(struct device *);
@@ -217,12 +46,6 @@ struct soc_camera_link {
 	unsigned long (*query_bus_param)(struct soc_camera_link *);
 	void (*free_bus)(struct soc_camera_link *);
 
-	/* Optional regulators that have to be managed on power on/off events */
-	struct regulator_bulk_data *regulators;
-	int num_regulators;
-
-	void *host_priv;
-
 	/*
 	 * Host part - keep at bottom and compatible to
 	 * struct soc_camera_host_desc
@@ -233,168 +56,10 @@ struct soc_camera_link {
 	int i2c_adapter_id;
 	struct i2c_board_info *board_info;
 	const char *module_name;
-
-	/*
-	 * For non-I2C devices platform has to provide methods to add a device
-	 * to the system and to remove it
-	 */
-	int (*add_device)(struct soc_camera_device *);
-	void (*del_device)(struct soc_camera_device *);
-};
-
-static inline struct soc_camera_host *to_soc_camera_host(
-	const struct device *dev)
-{
-	struct v4l2_device *v4l2_dev = dev_get_drvdata(dev);
-
-	return container_of(v4l2_dev, struct soc_camera_host, v4l2_dev);
-}
-
-static inline struct soc_camera_desc *to_soc_camera_desc(
-	const struct soc_camera_device *icd)
-{
-	return icd->sdesc;
-}
-
-static inline struct device *to_soc_camera_control(
-	const struct soc_camera_device *icd)
-{
-	return icd->control;
-}
-
-static inline struct v4l2_subdev *soc_camera_to_subdev(
-	const struct soc_camera_device *icd)
-{
-	struct device *control = to_soc_camera_control(icd);
-	return dev_get_drvdata(control);
-}
-
-int soc_camera_host_register(struct soc_camera_host *ici);
-void soc_camera_host_unregister(struct soc_camera_host *ici);
-
-const struct soc_camera_format_xlate *soc_camera_xlate_by_fourcc(
-	struct soc_camera_device *icd, unsigned int fourcc);
-
-/**
- * struct soc_camera_format_xlate - match between host and sensor formats
- * @code: code of a sensor provided format
- * @host_fmt: host format after host translation from code
- *
- * Host and sensor translation structure. Used in table of host and sensor
- * formats matchings in soc_camera_device. A host can override the generic list
- * generation by implementing get_formats(), and use it for format checks and
- * format setup.
- */
-struct soc_camera_format_xlate {
-	u32 code;
-	const struct soc_mbus_pixelfmt *host_fmt;
-};
-
-#define SOCAM_SENSE_PCLK_CHANGED	(1 << 0)
-
-/**
- * This struct can be attached to struct soc_camera_device by the host driver
- * to request sense from the camera, for example, when calling .set_fmt(). The
- * host then can check which flags are set and verify respective values if any.
- * For example, if SOCAM_SENSE_PCLK_CHANGED is set, it means, pixclock has
- * changed during this operation. After completion the host should detach sense.
- *
- * @flags		ored SOCAM_SENSE_* flags
- * @master_clock	if the host wants to be informed about pixel-clock
- *			change, it better set master_clock.
- * @pixel_clock_max	maximum pixel clock frequency supported by the host,
- *			camera is not allowed to exceed this.
- * @pixel_clock		if the camera driver changed pixel clock during this
- *			operation, it sets SOCAM_SENSE_PCLK_CHANGED, uses
- *			master_clock to calculate the new pixel-clock and
- *			sets this field.
- */
-struct soc_camera_sense {
-	unsigned long flags;
-	unsigned long master_clock;
-	unsigned long pixel_clock_max;
-	unsigned long pixel_clock;
 };
 
 #define SOCAM_DATAWIDTH(x)	BIT((x) - 1)
-#define SOCAM_DATAWIDTH_4	SOCAM_DATAWIDTH(4)
 #define SOCAM_DATAWIDTH_8	SOCAM_DATAWIDTH(8)
-#define SOCAM_DATAWIDTH_9	SOCAM_DATAWIDTH(9)
 #define SOCAM_DATAWIDTH_10	SOCAM_DATAWIDTH(10)
-#define SOCAM_DATAWIDTH_12	SOCAM_DATAWIDTH(12)
-#define SOCAM_DATAWIDTH_15	SOCAM_DATAWIDTH(15)
-#define SOCAM_DATAWIDTH_16	SOCAM_DATAWIDTH(16)
-#define SOCAM_DATAWIDTH_18	SOCAM_DATAWIDTH(18)
-#define SOCAM_DATAWIDTH_24	SOCAM_DATAWIDTH(24)
-
-#define SOCAM_DATAWIDTH_MASK (SOCAM_DATAWIDTH_4 | SOCAM_DATAWIDTH_8 | \
-			      SOCAM_DATAWIDTH_9 | SOCAM_DATAWIDTH_10 | \
-			      SOCAM_DATAWIDTH_12 | SOCAM_DATAWIDTH_15 | \
-			      SOCAM_DATAWIDTH_16 | SOCAM_DATAWIDTH_18 | \
-			      SOCAM_DATAWIDTH_24)
-
-static inline void soc_camera_limit_side(int *start, int *length,
-		unsigned int start_min,
-		unsigned int length_min, unsigned int length_max)
-{
-	if (*length < length_min)
-		*length = length_min;
-	else if (*length > length_max)
-		*length = length_max;
-
-	if (*start < start_min)
-		*start = start_min;
-	else if (*start > start_min + length_max - *length)
-		*start = start_min + length_max - *length;
-}
-
-unsigned long soc_camera_apply_board_flags(struct soc_camera_subdev_desc *ssdd,
-					   const struct v4l2_mbus_config *cfg);
-
-int soc_camera_power_init(struct device *dev, struct soc_camera_subdev_desc *ssdd);
-int soc_camera_power_on(struct device *dev, struct soc_camera_subdev_desc *ssdd,
-			struct v4l2_clk *clk);
-int soc_camera_power_off(struct device *dev, struct soc_camera_subdev_desc *ssdd,
-			 struct v4l2_clk *clk);
-
-static inline int soc_camera_set_power(struct device *dev,
-		struct soc_camera_subdev_desc *ssdd, struct v4l2_clk *clk, bool on)
-{
-	return on ? soc_camera_power_on(dev, ssdd, clk)
-		  : soc_camera_power_off(dev, ssdd, clk);
-}
-
-/* This is only temporary here - until v4l2-subdev begins to link to video_device */
-#include <linux/i2c.h>
-static inline struct video_device *soc_camera_i2c_to_vdev(const struct i2c_client *client)
-{
-	struct v4l2_subdev *sd = i2c_get_clientdata(client);
-	struct soc_camera_device *icd = v4l2_get_subdev_hostdata(sd);
-	return icd ? icd->vdev : NULL;
-}
-
-static inline struct soc_camera_subdev_desc *soc_camera_i2c_to_desc(const struct i2c_client *client)
-{
-	return client->dev.platform_data;
-}
-
-static inline struct v4l2_subdev *soc_camera_vdev_to_subdev(struct video_device *vdev)
-{
-	struct soc_camera_device *icd = video_get_drvdata(vdev);
-	return soc_camera_to_subdev(icd);
-}
-
-static inline struct soc_camera_device *soc_camera_from_vb2q(const struct vb2_queue *vq)
-{
-	return container_of(vq, struct soc_camera_device, vb2_vidq);
-}

include/media/soc_camera.h struct soc_camera_link { · line 65

Quoted 10 lines
include/media/soc_camera.h +0 -8
-
-static inline u32 soc_camera_grp_id(const struct soc_camera_device *icd)
-{
-	return (icd->iface << 8) | (icd->devnum + 1);
-}
-
-void soc_camera_lock(struct vb2_queue *vq);
-void soc_camera_unlock(struct vb2_queue *vq);
 
 #endif

Thanks,
Mauro

#19 lore raw

Re: [PATCH 4/4] SoC camera: Tidy the header

Hi Mauro,

Quoted 12 lines · Mauro Carvalho Chehab

Em Tue, 30 Oct 2018 01:00:29 +0200
Sakari Ailus <[email protected]> escreveu:

Quoted 9 lines

Clean up the SoC camera framework header. It only exists now to keep board code compiling. The header can be removed once the board code dependencies to it has been removed.

---
 include/media/soc_camera.h | 335 ---------------------------------------------
 1 file changed, 335 deletions(-)
Quoted 12 lines

include/media/soc_camera.h line 23

Quoted 7 lines
include/media/soc_camera.h +0 -0
index b7e42a1b0910..14d19da6052a 100644
@@ -22,172 +22,6 @@
 #include <media/v4l2-ctrls.h>
 #include <media/v4l2-device.h>

That doesn't make any sense. soc_camera.h should have the same fate as the entire soc_camera infrastructure: either be removed or moved to staging, and everything else that doesn't have the same fate should get rid of this header.

We can't just remove this; there is board code that depends on it.

The intent is to remove the board code as well but presuming that the board code would be merged through a different tree, it'd be less hassle to wait a bit; hence the patch removing any unnecessary stuff here.

Signature · 4 lines
Regards,

Sakari Ailus
[email protected]
#20 lore raw

Re: [PATCH 4/4] SoC camera: Tidy the header

Em Wed, 31 Oct 2018 11:29:45 +0200
Sakari Ailus <[email protected]> escreveu:

Quoted 28 lines

Hi Mauro,

Quoted 12 lines · Mauro Carvalho Chehab

Em Tue, 30 Oct 2018 01:00:29 +0200
Sakari Ailus <[email protected]> escreveu:

Quoted 9 lines

Clean up the SoC camera framework header. It only exists now to keep board code compiling. The header can be removed once the board code dependencies to it has been removed.

---
 include/media/soc_camera.h | 335 ---------------------------------------------
 1 file changed, 335 deletions(-)
Quoted 12 lines

include/media/soc_camera.h line 23

Quoted 7 lines
include/media/soc_camera.h +0 -0
index b7e42a1b0910..14d19da6052a 100644
@@ -22,172 +22,6 @@
 #include <media/v4l2-ctrls.h>
 #include <media/v4l2-device.h>  

That doesn't make any sense. soc_camera.h should have the same fate as the entire soc_camera infrastructure: either be removed or moved to staging, and everything else that doesn't have the same fate should get rid of this header.

Quoted 5 lines

We can't just remove this; there is board code that depends on it.

The intent is to remove the board code as well but presuming that the board code would be merged through a different tree, it'd be less hassle to wait a bit; hence the patch removing any unnecessary stuff here.

Then we need *first* to remove board code, wait for those changes to be applied and *then* remove soc_camera (and not the opposite).

Thanks,
Mauro

#21 lore raw

Re: [PATCH 4/4] SoC camera: Tidy the header

Quoted 31 lines · Mauro Carvalho Chehab

Em Wed, 31 Oct 2018 11:29:45 +0200
Sakari Ailus <[email protected]> escreveu:

Quoted 28 lines

Hi Mauro,

Quoted 24 lines · Mauro Carvalho Chehab

Em Tue, 30 Oct 2018 01:00:29 +0200
Sakari Ailus <[email protected]> escreveu:

Quoted 14 lines

Clean up the SoC camera framework header. It only exists now to keep board code compiling. The header can be removed once the board code dependencies to it has been removed.

---
 include/media/soc_camera.h | 335 ---------------------------------------------
 1 file changed, 335 deletions(-)
include/media/soc_camera.h +0 -0
index b7e42a1b0910..14d19da6052a 100644

include/media/soc_camera.h line 23

Quoted 2 lines
include/media/soc_camera.h +0 -0
@@ -22,172 +22,6 @@
 #include <media/v4l2-ctrls.h>
 #include <media/v4l2-device.h>  

That doesn't make any sense. soc_camera.h should have the same fate as the entire soc_camera infrastructure: either be removed or moved to staging, and everything else that doesn't have the same fate should get rid of this header.

Quoted 8 lines
Quoted 5 lines

We can't just remove this; there is board code that depends on it.

The intent is to remove the board code as well but presuming that the board code would be merged through a different tree, it'd be less hassle to wait a bit; hence the patch removing any unnecessary stuff here.

Then we need *first* to remove board code, wait for those changes to be applied and *then* remove soc_camera (and not the opposite).

Any reasoning behind that?

It's dead code and there is no dependency between the SoC camera framework (apart from the header) and the board code.

Signature · 2 lines
Sakari Ailus
[email protected]
#22 lore raw

Re: [PATCH 4/4] SoC camera: Tidy the header

In reply to Mauro Carvalho Chehab
Quoted 31 lines · Mauro Carvalho Chehab

Em Wed, 31 Oct 2018 11:29:45 +0200
Sakari Ailus <[email protected]> escreveu:

Quoted 28 lines

Hi Mauro,

Quoted 24 lines · Mauro Carvalho Chehab

Em Tue, 30 Oct 2018 01:00:29 +0200
Sakari Ailus <[email protected]> escreveu:

Quoted 14 lines

Clean up the SoC camera framework header. It only exists now to keep board code compiling. The header can be removed once the board code dependencies to it has been removed.

---
 include/media/soc_camera.h | 335 ---------------------------------------------
 1 file changed, 335 deletions(-)
include/media/soc_camera.h +0 -0
index b7e42a1b0910..14d19da6052a 100644

include/media/soc_camera.h line 23

Quoted 2 lines
include/media/soc_camera.h +0 -0
@@ -22,172 +22,6 @@
 #include <media/v4l2-ctrls.h>
 #include <media/v4l2-device.h>  

That doesn't make any sense. soc_camera.h should have the same fate as the entire soc_camera infrastructure: either be removed or moved to staging, and everything else that doesn't have the same fate should get rid of this header.

Quoted 8 lines
Quoted 5 lines

We can't just remove this; there is board code that depends on it.

The intent is to remove the board code as well but presuming that the board code would be merged through a different tree, it'd be less hassle to wait a bit; hence the patch removing any unnecessary stuff here.

Then we need *first* to remove board code, wait for those changes to be applied and *then* remove soc_camera (and not the opposite).

I'll post patches to remove the affeced board code soon, too. I have no objections to merge it through the media tree either, if the maintainers agree.

Signature · 2 lines
Sakari Ailus
[email protected]
#23 lore raw

Re: [PATCH 4/4] SoC camera: Tidy the header

In reply to Mauro Carvalho Chehab
Quoted 31 lines · Mauro Carvalho Chehab

Em Wed, 31 Oct 2018 11:29:45 +0200
Sakari Ailus <[email protected]> escreveu:

Quoted 28 lines

Hi Mauro,

Quoted 24 lines · Mauro Carvalho Chehab

Em Tue, 30 Oct 2018 01:00:29 +0200
Sakari Ailus <[email protected]> escreveu:

Quoted 14 lines

Clean up the SoC camera framework header. It only exists now to keep board code compiling. The header can be removed once the board code dependencies to it has been removed.

---
 include/media/soc_camera.h | 335 ---------------------------------------------
 1 file changed, 335 deletions(-)
include/media/soc_camera.h +0 -0
index b7e42a1b0910..14d19da6052a 100644

include/media/soc_camera.h line 23

Quoted 2 lines
include/media/soc_camera.h +0 -0
@@ -22,172 +22,6 @@
 #include <media/v4l2-ctrls.h>
 #include <media/v4l2-device.h>  

That doesn't make any sense. soc_camera.h should have the same fate as the entire soc_camera infrastructure: either be removed or moved to staging, and everything else that doesn't have the same fate should get rid of this header.

Quoted 8 lines
Quoted 5 lines

We can't just remove this; there is board code that depends on it.

The intent is to remove the board code as well but presuming that the board code would be merged through a different tree, it'd be less hassle to wait a bit; hence the patch removing any unnecessary stuff here.

Then we need *first* to remove board code, wait for those changes to be applied and *then* remove soc_camera (and not the opposite).

Please note that the camera support for all the remaining boards using soc_camera has been dead for years. The soc_camera drivers that they depended on have been removed a long time ago.

So all they depend on are the header. We can safely remove soc_camera without loss of functionality (and thus prevent others from basing new drivers on soc_camera), while we work to update the board files so we can remove this last header.

I have modified some board files here:

https://git.linuxtv.org/hverkuil/media_tree.git/commit/?h=rm-soc-camera&id=d7ae2fcf6e447022f0780bb86a2b63d5c7cf4d35

Only arch/arm/mach-imx/mach-imx27_visstrim_m10.c hasn't been fixed yet in that patch (ENOTIME).

The problem is just lack of time to clean this up and figure out who should take these board patches.

So I think it is a nice solution to just replace the header with a dummy version so the board files still compile, and then we can delete the dead soc_camera driver. It's probably easier as well to push through the board file changes once soc_camera is removed since you can just point out that the framework it depended on is gone.

Regards,

Hans

#24 lore raw

Re: [PATCH 4/4] SoC camera: Tidy the header

Em Wed, 31 Oct 2018 11:00:22 +0100
Hans Verkuil <[email protected]> escreveu:

Quoted 45 lines · Mauro Carvalho Chehab
Quoted 31 lines

Em Wed, 31 Oct 2018 11:29:45 +0200
Sakari Ailus <[email protected]> escreveu:

Quoted 28 lines

Hi Mauro,

Quoted 24 lines · Mauro Carvalho Chehab

Em Tue, 30 Oct 2018 01:00:29 +0200
Sakari Ailus <[email protected]> escreveu:

Quoted 14 lines

Clean up the SoC camera framework header. It only exists now to keep board code compiling. The header can be removed once the board code dependencies to it has been removed.

---
 include/media/soc_camera.h | 335 ---------------------------------------------
 1 file changed, 335 deletions(-)
include/media/soc_camera.h +0 -0
index b7e42a1b0910..14d19da6052a 100644

include/media/soc_camera.h line 23

Quoted 2 lines
include/media/soc_camera.h +0 -0
@@ -22,172 +22,6 @@
 #include <media/v4l2-ctrls.h>
 #include <media/v4l2-device.h>    

That doesn't make any sense. soc_camera.h should have the same fate as the entire soc_camera infrastructure: either be removed or moved to staging, and everything else that doesn't have the same fate should get rid of this header.

Quoted 8 lines
Quoted 5 lines

We can't just remove this; there is board code that depends on it.

The intent is to remove the board code as well but presuming that the board code would be merged through a different tree, it'd be less hassle to wait a bit; hence the patch removing any unnecessary stuff here.

Then we need *first* to remove board code, wait for those changes to be applied and *then* remove soc_camera (and not the opposite).

Please note that the camera support for all the remaining boards using soc_camera has been dead for years. The soc_camera drivers that they depended on have been removed a long time ago.

Quoted 8 lines

So all they depend on are the header. We can safely remove soc_camera without loss of functionality (and thus prevent others from basing new drivers on soc_camera), while we work to update the board files so we can remove this last header.

I have modified some board files here:

https://git.linuxtv.org/hverkuil/media_tree.git/commit/?h=rm-soc-camera&id=d7ae2fcf6e447022f0780bb86a2b63d5c7cf4d35

Good! the arch-specific mach-* changes should likely be on separate patches, though.

Quoted 2 lines

Only arch/arm/mach-imx/mach-imx27_visstrim_m10.c hasn't been fixed yet in that patch (ENOTIME).

So, the code we don't manage seems to be just 3 archs, right (mach-omap1, mach-pxa and mach-imx)?

Btw, the soc_camera dependent code at mach-imx27_visstrim_m10.c is:

static struct soc_camera_link iclink_tvp5150 = {
.bus_id = 0,
.board_info = &visstrim_i2c_camera,
.i2c_adapter_id = 0,
.power = visstrim_camera_power, .reset = visstrim_camera_reset,
};

...
platform_device_register_resndata(NULL, "soc-camera-pdrv", 0, NULL, 0,
&iclink_tvp5150, sizeof(iclink_tvp5150));

As tvp5150 is not actually a soc_camera driver, I suspect that the conversion here would be to make it to use the tvp5150 driver directly, instead of doing it via soc_camera.

Quoted 2 lines

The problem is just lack of time to clean this up and figure out who should take these board patches.

No need to rush it.

Quoted 5 lines

So I think it is a nice solution to just replace the header with a dummy version so the board files still compile, and then we can delete the dead soc_camera driver. It's probably easier as well to push through the board file changes once soc_camera is removed since you can just point out that the framework it depended on is gone.

I still think that reverting the order and rushing the removal is not the way to go.

For example, on that specific imx.27 board above mentioned, it may still be working with the tvp5150 driver[1] and replacing the soc_camera.h by a dummy version would just break for no good reason.

[1] I don't have such board to test, nor I checked if what's left from soc_camera still allows the tvp5150 driver to register.

Thanks,
Mauro

#25 lore raw

Re: [PATCH 4/4] SoC camera: Tidy the header

Hi Hans, Mauro,

Quoted 76 lines · Mauro Carvalho Chehab

Em Wed, 31 Oct 2018 11:00:22 +0100
Hans Verkuil <[email protected]> escreveu:

Quoted 45 lines · Mauro Carvalho Chehab
Quoted 31 lines

Em Wed, 31 Oct 2018 11:29:45 +0200
Sakari Ailus <[email protected]> escreveu:

Quoted 28 lines

Hi Mauro,

Quoted 24 lines · Mauro Carvalho Chehab

Em Tue, 30 Oct 2018 01:00:29 +0200
Sakari Ailus <[email protected]> escreveu:

Quoted 14 lines

Clean up the SoC camera framework header. It only exists now to keep board code compiling. The header can be removed once the board code dependencies to it has been removed.

---
 include/media/soc_camera.h | 335 ---------------------------------------------
 1 file changed, 335 deletions(-)
include/media/soc_camera.h +0 -0
index b7e42a1b0910..14d19da6052a 100644

include/media/soc_camera.h line 23

Quoted 2 lines
include/media/soc_camera.h +0 -0
@@ -22,172 +22,6 @@
 #include <media/v4l2-ctrls.h>
 #include <media/v4l2-device.h>    

That doesn't make any sense. soc_camera.h should have the same fate as the entire soc_camera infrastructure: either be removed or moved to staging, and everything else that doesn't have the same fate should get rid of this header.

Quoted 8 lines
Quoted 5 lines

We can't just remove this; there is board code that depends on it.

The intent is to remove the board code as well but presuming that the board code would be merged through a different tree, it'd be less hassle to wait a bit; hence the patch removing any unnecessary stuff here.

Then we need *first* to remove board code, wait for those changes to be applied and *then* remove soc_camera (and not the opposite).

Please note that the camera support for all the remaining boards using soc_camera has been dead for years. The soc_camera drivers that they depended on have been removed a long time ago.

Quoted 8 lines

So all they depend on are the header. We can safely remove soc_camera without loss of functionality (and thus prevent others from basing new drivers on soc_camera), while we work to update the board files so we can remove this last header.

I have modified some board files here:

https://git.linuxtv.org/hverkuil/media_tree.git/commit/?h=rm-soc-camera&id=d7ae2fcf6e447022f0780bb86a2b63d5c7cf4d35

Good! the arch-specific mach-* changes should likely be on separate patches, though.

Quoted 2 lines

Only arch/arm/mach-imx/mach-imx27_visstrim_m10.c hasn't been fixed yet in that patch (ENOTIME).

So, the code we don't manage seems to be just 3 archs, right (mach-omap1, mach-pxa and mach-imx)?

Btw, the soc_camera dependent code at mach-imx27_visstrim_m10.c is:

static struct soc_camera_link iclink_tvp5150 = {
.bus_id = 0,
.board_info = &visstrim_i2c_camera,
.i2c_adapter_id = 0,
.power = visstrim_camera_power, .reset = visstrim_camera_reset,
};

Quoted 8 lines

...
platform_device_register_resndata(NULL, "soc-camera-pdrv", 0, NULL, 0,
&iclink_tvp5150, sizeof(iclink_tvp5150));

As tvp5150 is not actually a soc_camera driver, I suspect that the conversion here would be to make it to use the tvp5150 driver directly, instead of doing it via soc_camera.

Using board files? The IMX27 SoC has plenty of dts files around which suggests that it's just this particular board that has not been converted. I don't think this is a good excuse to keep the board file stuff around.

If someone is willing to add dts files for the board, all the better. But I'm not going to do that.

Quoted 6 lines
Quoted 3 lines

The problem is just lack of time to clean this up and figure out who should take these board patches.

No need to rush it.

Quoted 8 lines
Quoted 5 lines

So I think it is a nice solution to just replace the header with a dummy version so the board files still compile, and then we can delete the dead soc_camera driver. It's probably easier as well to push through the board file changes once soc_camera is removed since you can just point out that the framework it depended on is gone.

I still think that reverting the order and rushing the removal is not the way to go.

I think no-one can blame us for rushing the removal of this: it's been broken for years.

I propose removing the dead code with the least effort while minimising collateral damage as well as additional maintenance work done to support the to-be-removed code.

As far as I can see, that involves:

- Removing the SoC camera framework (as my set does; there'll be v2 to fix a few minor matters),

- Removing the board files (I can pick bits from Hans's patch for that if you like) and finally

- Remove the header left in place until the board files are gone.

The two could possibly make it to v4.21.

I'd say that having two of us have written patches to remove this code independently is a clear sign code is ripe to go...

Signature · 4 lines
Kind regards,

Sakari Ailus
e-mail: [email protected]
#26 lore raw

Re: [PATCH 4/4] SoC camera: Tidy the header

In reply to Sakari Ailus

Em Tue, 30 Oct 2018 01:00:29 +0200
Sakari Ailus <[email protected]> escreveu:

Quoted 14 lines

Clean up the SoC camera framework header. It only exists now to keep board code compiling. The header can be removed once the board code dependencies to it has been removed.

---
 include/media/soc_camera.h | 335 ---------------------------------------------
 1 file changed, 335 deletions(-)
include/media/soc_camera.h +0 -0
index b7e42a1b0910..14d19da6052a 100644

include/media/soc_camera.h line 23

Quoted 2 lines
include/media/soc_camera.h +0 -0
@@ -22,172 +22,6 @@
 #include <media/v4l2-ctrls.h>
 #include <media/v4l2-device.h>

That doesn't make any sense. soc_camera.h should have the same fate as the entire soc_camera infrastructure: either be removed or moved to staging, and everything else that doesn't have the same fate should get rid of this header.

Regards,
Mauro

Quoted 354 lines
include/media/soc_camera.h +0 -327
-struct file;
-struct soc_camera_desc;
-struct soc_camera_async_client;
-
-struct soc_camera_device {
-	struct list_head list;		/* list of all registered devices */
-	struct soc_camera_desc *sdesc;
-	struct device *pdev;		/* Platform device */
-	struct device *parent;		/* Camera host device */
-	struct device *control;		/* E.g., the i2c client */
-	s32 user_width;
-	s32 user_height;
-	u32 bytesperline;		/* for padding, zero if unused */
-	u32 sizeimage;
-	enum v4l2_colorspace colorspace;
-	unsigned char iface;		/* Host number */
-	unsigned char devnum;		/* Device number per host */
-	struct soc_camera_sense *sense;	/* See comment in struct definition */
-	struct video_device *vdev;
-	struct v4l2_ctrl_handler ctrl_handler;
-	const struct soc_camera_format_xlate *current_fmt;
-	struct soc_camera_format_xlate *user_formats;
-	int num_user_formats;
-	enum v4l2_field field;		/* Preserve field over close() */
-	void *host_priv;		/* Per-device host private data */
-	/* soc_camera.c private count. Only accessed with .host_lock held */
-	int use_count;
-	struct file *streamer;		/* stream owner */
-	struct v4l2_clk *clk;
-	/* Asynchronous subdevice management */
-	struct soc_camera_async_client *sasc;
-	/* video buffer queue */
-	struct vb2_queue vb2_vidq;
-};
-
-/* Host supports programmable stride */
-#define SOCAM_HOST_CAP_STRIDE		(1 << 0)
-
-enum soc_camera_subdev_role {
-	SOCAM_SUBDEV_DATA_SOURCE = 1,
-	SOCAM_SUBDEV_DATA_SINK,
-	SOCAM_SUBDEV_DATA_PROCESSOR,
-};
-
-struct soc_camera_async_subdev {
-	struct v4l2_async_subdev asd;
-	enum soc_camera_subdev_role role;
-};
-
-struct soc_camera_host {
-	struct v4l2_device v4l2_dev;
-	struct list_head list;
-	struct mutex host_lock;		/* Main synchronisation lock */
-	struct mutex clk_lock;		/* Protect pipeline modifications */
-	unsigned char nr;		/* Host number */
-	u32 capabilities;
-	struct soc_camera_device *icd;	/* Currently attached client */
-	void *priv;
-	const char *drv_name;
-	struct soc_camera_host_ops *ops;
-	struct v4l2_async_subdev **asd;	/* Flat array, arranged in groups */
-	unsigned int *asd_sizes;	/* 0-terminated array of asd group sizes */
-};
-
-struct soc_camera_host_ops {
-	struct module *owner;
-	int (*add)(struct soc_camera_device *);
-	void (*remove)(struct soc_camera_device *);
-	int (*clock_start)(struct soc_camera_host *);
-	void (*clock_stop)(struct soc_camera_host *);
-	/*
-	 * .get_formats() is called for each client device format, but
-	 * .put_formats() is only called once. Further, if any of the calls to
-	 * .get_formats() fail, .put_formats() will not be called at all, the
-	 * failing .get_formats() must then clean up internally.
-	 */
-	int (*get_formats)(struct soc_camera_device *, unsigned int,
-			   struct soc_camera_format_xlate *);
-	void (*put_formats)(struct soc_camera_device *);
-	int (*get_selection)(struct soc_camera_device *, struct v4l2_selection *);
-	int (*set_selection)(struct soc_camera_device *, struct v4l2_selection *);
-	/*
-	 * The difference to .set_selection() is, that .set_liveselection is not allowed
-	 * to change the output sizes
-	 */
-	int (*set_liveselection)(struct soc_camera_device *, struct v4l2_selection *);
-	int (*set_fmt)(struct soc_camera_device *, struct v4l2_format *);
-	int (*try_fmt)(struct soc_camera_device *, struct v4l2_format *);
-	int (*init_videobuf2)(struct vb2_queue *,
-			      struct soc_camera_device *);
-	int (*querycap)(struct soc_camera_host *, struct v4l2_capability *);
-	int (*set_bus_param)(struct soc_camera_device *);
-	int (*get_parm)(struct soc_camera_device *, struct v4l2_streamparm *);
-	int (*set_parm)(struct soc_camera_device *, struct v4l2_streamparm *);
-	int (*enum_framesizes)(struct soc_camera_device *, struct v4l2_frmsizeenum *);
-	__poll_t (*poll)(struct file *, poll_table *);
-};
-
-#define SOCAM_SENSOR_INVERT_PCLK	(1 << 0)
-#define SOCAM_SENSOR_INVERT_MCLK	(1 << 1)
-#define SOCAM_SENSOR_INVERT_HSYNC	(1 << 2)
-#define SOCAM_SENSOR_INVERT_VSYNC	(1 << 3)
-#define SOCAM_SENSOR_INVERT_DATA	(1 << 4)
-
-struct i2c_board_info;
-struct regulator_bulk_data;
-
-struct soc_camera_subdev_desc {
-	/* Per camera SOCAM_SENSOR_* bus flags */
-	unsigned long flags;
-
-	/* sensor driver private platform data */
-	void *drv_priv;
-
-	/*
-	 * Set unbalanced_power to true to deal with legacy drivers, failing to
-	 * balance their calls to subdevice's .s_power() method. clock_state is
-	 * then used internally by helper functions, it shouldn't be touched by
-	 * drivers or the platform code.
-	 */
-	bool unbalanced_power;
-	unsigned long clock_state;
-
-	/* Optional callbacks to power on or off and reset the sensor */
-	int (*power)(struct device *, int);
-	int (*reset)(struct device *);
-
-	/*
-	 * some platforms may support different data widths than the sensors
-	 * native ones due to different data line routing. Let the board code
-	 * overwrite the width flags.
-	 */
-	int (*set_bus_param)(struct soc_camera_subdev_desc *, unsigned long flags);
-	unsigned long (*query_bus_param)(struct soc_camera_subdev_desc *);
-	void (*free_bus)(struct soc_camera_subdev_desc *);
-
-	/* Optional regulators that have to be managed on power on/off events */
-	struct v4l2_subdev_platform_data sd_pdata;
-};
-
-struct soc_camera_host_desc {
-	/* Camera bus id, used to match a camera and a bus */
-	int bus_id;
-	int i2c_adapter_id;
-	struct i2c_board_info *board_info;
-	const char *module_name;
-
-	/*
-	 * For non-I2C devices platform has to provide methods to add a device
-	 * to the system and to remove it
-	 */
-	int (*add_device)(struct soc_camera_device *);
-	void (*del_device)(struct soc_camera_device *);
-};
-
-/*
- * Platform data for "soc-camera-pdrv"
- * This MUST be kept binary-identical to struct soc_camera_link below, until
- * it is completely replaced by this one, after which we can split it into its
- * two components.
- */
-struct soc_camera_desc {
-	struct soc_camera_subdev_desc subdev_desc;
-	struct soc_camera_host_desc host_desc;
-};
-
 /* Prepare to replace this struct: don't change its layout any more! */
 struct soc_camera_link {
 	/*
@@ -200,11 +34,6 @@ struct soc_camera_link {
 
 	void *priv;
 
-	/* Set by platforms to handle misbehaving drivers */
-	bool unbalanced_power;
-	/* Used by soc-camera helper functions */
-	unsigned long clock_state;
-
 	/* Optional callbacks to power on or off and reset the sensor */
 	int (*power)(struct device *, int);
 	int (*reset)(struct device *);
@@ -217,12 +46,6 @@ struct soc_camera_link {
 	unsigned long (*query_bus_param)(struct soc_camera_link *);
 	void (*free_bus)(struct soc_camera_link *);
 
-	/* Optional regulators that have to be managed on power on/off events */
-	struct regulator_bulk_data *regulators;
-	int num_regulators;
-
-	void *host_priv;
-
 	/*
 	 * Host part - keep at bottom and compatible to
 	 * struct soc_camera_host_desc
@@ -233,168 +56,10 @@ struct soc_camera_link {
 	int i2c_adapter_id;
 	struct i2c_board_info *board_info;
 	const char *module_name;
-
-	/*
-	 * For non-I2C devices platform has to provide methods to add a device
-	 * to the system and to remove it
-	 */
-	int (*add_device)(struct soc_camera_device *);
-	void (*del_device)(struct soc_camera_device *);
-};
-
-static inline struct soc_camera_host *to_soc_camera_host(
-	const struct device *dev)
-{
-	struct v4l2_device *v4l2_dev = dev_get_drvdata(dev);
-
-	return container_of(v4l2_dev, struct soc_camera_host, v4l2_dev);
-}
-
-static inline struct soc_camera_desc *to_soc_camera_desc(
-	const struct soc_camera_device *icd)
-{
-	return icd->sdesc;
-}
-
-static inline struct device *to_soc_camera_control(
-	const struct soc_camera_device *icd)
-{
-	return icd->control;
-}
-
-static inline struct v4l2_subdev *soc_camera_to_subdev(
-	const struct soc_camera_device *icd)
-{
-	struct device *control = to_soc_camera_control(icd);
-	return dev_get_drvdata(control);
-}
-
-int soc_camera_host_register(struct soc_camera_host *ici);
-void soc_camera_host_unregister(struct soc_camera_host *ici);
-
-const struct soc_camera_format_xlate *soc_camera_xlate_by_fourcc(
-	struct soc_camera_device *icd, unsigned int fourcc);
-
-/**
- * struct soc_camera_format_xlate - match between host and sensor formats
- * @code: code of a sensor provided format
- * @host_fmt: host format after host translation from code
- *
- * Host and sensor translation structure. Used in table of host and sensor
- * formats matchings in soc_camera_device. A host can override the generic list
- * generation by implementing get_formats(), and use it for format checks and
- * format setup.
- */
-struct soc_camera_format_xlate {
-	u32 code;
-	const struct soc_mbus_pixelfmt *host_fmt;
-};
-
-#define SOCAM_SENSE_PCLK_CHANGED	(1 << 0)
-
-/**
- * This struct can be attached to struct soc_camera_device by the host driver
- * to request sense from the camera, for example, when calling .set_fmt(). The
- * host then can check which flags are set and verify respective values if any.
- * For example, if SOCAM_SENSE_PCLK_CHANGED is set, it means, pixclock has
- * changed during this operation. After completion the host should detach sense.
- *
- * @flags		ored SOCAM_SENSE_* flags
- * @master_clock	if the host wants to be informed about pixel-clock
- *			change, it better set master_clock.
- * @pixel_clock_max	maximum pixel clock frequency supported by the host,
- *			camera is not allowed to exceed this.
- * @pixel_clock		if the camera driver changed pixel clock during this
- *			operation, it sets SOCAM_SENSE_PCLK_CHANGED, uses
- *			master_clock to calculate the new pixel-clock and
- *			sets this field.
- */
-struct soc_camera_sense {
-	unsigned long flags;
-	unsigned long master_clock;
-	unsigned long pixel_clock_max;
-	unsigned long pixel_clock;
 };
 
 #define SOCAM_DATAWIDTH(x)	BIT((x) - 1)
-#define SOCAM_DATAWIDTH_4	SOCAM_DATAWIDTH(4)
 #define SOCAM_DATAWIDTH_8	SOCAM_DATAWIDTH(8)
-#define SOCAM_DATAWIDTH_9	SOCAM_DATAWIDTH(9)
 #define SOCAM_DATAWIDTH_10	SOCAM_DATAWIDTH(10)
-#define SOCAM_DATAWIDTH_12	SOCAM_DATAWIDTH(12)
-#define SOCAM_DATAWIDTH_15	SOCAM_DATAWIDTH(15)
-#define SOCAM_DATAWIDTH_16	SOCAM_DATAWIDTH(16)
-#define SOCAM_DATAWIDTH_18	SOCAM_DATAWIDTH(18)
-#define SOCAM_DATAWIDTH_24	SOCAM_DATAWIDTH(24)
-
-#define SOCAM_DATAWIDTH_MASK (SOCAM_DATAWIDTH_4 | SOCAM_DATAWIDTH_8 | \
-			      SOCAM_DATAWIDTH_9 | SOCAM_DATAWIDTH_10 | \
-			      SOCAM_DATAWIDTH_12 | SOCAM_DATAWIDTH_15 | \
-			      SOCAM_DATAWIDTH_16 | SOCAM_DATAWIDTH_18 | \
-			      SOCAM_DATAWIDTH_24)
-
-static inline void soc_camera_limit_side(int *start, int *length,
-		unsigned int start_min,
-		unsigned int length_min, unsigned int length_max)
-{
-	if (*length < length_min)
-		*length = length_min;
-	else if (*length > length_max)
-		*length = length_max;
-
-	if (*start < start_min)
-		*start = start_min;
-	else if (*start > start_min + length_max - *length)
-		*start = start_min + length_max - *length;
-}
-
-unsigned long soc_camera_apply_board_flags(struct soc_camera_subdev_desc *ssdd,
-					   const struct v4l2_mbus_config *cfg);
-
-int soc_camera_power_init(struct device *dev, struct soc_camera_subdev_desc *ssdd);
-int soc_camera_power_on(struct device *dev, struct soc_camera_subdev_desc *ssdd,
-			struct v4l2_clk *clk);
-int soc_camera_power_off(struct device *dev, struct soc_camera_subdev_desc *ssdd,
-			 struct v4l2_clk *clk);
-
-static inline int soc_camera_set_power(struct device *dev,
-		struct soc_camera_subdev_desc *ssdd, struct v4l2_clk *clk, bool on)
-{
-	return on ? soc_camera_power_on(dev, ssdd, clk)
-		  : soc_camera_power_off(dev, ssdd, clk);
-}
-
-/* This is only temporary here - until v4l2-subdev begins to link to video_device */
-#include <linux/i2c.h>
-static inline struct video_device *soc_camera_i2c_to_vdev(const struct i2c_client *client)
-{
-	struct v4l2_subdev *sd = i2c_get_clientdata(client);
-	struct soc_camera_device *icd = v4l2_get_subdev_hostdata(sd);
-	return icd ? icd->vdev : NULL;
-}
-
-static inline struct soc_camera_subdev_desc *soc_camera_i2c_to_desc(const struct i2c_client *client)
-{
-	return client->dev.platform_data;
-}
-
-static inline struct v4l2_subdev *soc_camera_vdev_to_subdev(struct video_device *vdev)
-{
-	struct soc_camera_device *icd = video_get_drvdata(vdev);
-	return soc_camera_to_subdev(icd);
-}
-
-static inline struct soc_camera_device *soc_camera_from_vb2q(const struct vb2_queue *vq)
-{
-	return container_of(vq, struct soc_camera_device, vb2_vidq);
-}

include/media/soc_camera.h struct soc_camera_link { · line 65

Quoted 10 lines
include/media/soc_camera.h +0 -8
-
-static inline u32 soc_camera_grp_id(const struct soc_camera_device *icd)
-{
-	return (icd->iface << 8) | (icd->devnum + 1);
-}
-
-void soc_camera_lock(struct vb2_queue *vq);
-void soc_camera_unlock(struct vb2_queue *vq);
 
 #endif

Thanks,
Mauro