* [PATCH 1/7] ov9640: update MODULE_DESCRIPTION
2020-06-26 11:53 [PATCH 0/7] media: kill off broken soc_camera Hans Verkuil
@ 2020-06-26 11:53 ` Hans Verkuil
2020-06-26 11:53 ` [PATCH 2/7] pxa_camera: " Hans Verkuil
` (4 subsequent siblings)
5 siblings, 0 replies; 15+ messages in thread
From: Hans Verkuil @ 2020-06-26 11:53 UTC (permalink / raw)
To: linux-media; +Cc: linux-omap, linux-arm-kernel, Hans Verkuil
Remove the confusing SoC Camera reference.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
---
drivers/media/i2c/ov9640.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/i2c/ov9640.c b/drivers/media/i2c/ov9640.c
index 482609665305..3a21f51d9325 100644
--- a/drivers/media/i2c/ov9640.c
+++ b/drivers/media/i2c/ov9640.c
@@ -772,6 +772,6 @@ static struct i2c_driver ov9640_i2c_driver = {
module_i2c_driver(ov9640_i2c_driver);
-MODULE_DESCRIPTION("SoC Camera driver for OmniVision OV96xx");
+MODULE_DESCRIPTION("OmniVision OV96xx CMOS Image Sensor driver");
MODULE_AUTHOR("Marek Vasut <marek.vasut@gmail.com>");
MODULE_LICENSE("GPL v2");
--
2.27.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 2/7] pxa_camera: update MODULE_DESCRIPTION
2020-06-26 11:53 [PATCH 0/7] media: kill off broken soc_camera Hans Verkuil
2020-06-26 11:53 ` [PATCH 1/7] ov9640: update MODULE_DESCRIPTION Hans Verkuil
@ 2020-06-26 11:53 ` Hans Verkuil
2020-07-08 10:33 ` Robert Jarzmik
2020-06-26 11:53 ` [PATCH 3/7] mach-imx: mach-imx27_visstrim_m10.c: remove soc_camera dependencies Hans Verkuil
` (3 subsequent siblings)
5 siblings, 1 reply; 15+ messages in thread
From: Hans Verkuil @ 2020-06-26 11:53 UTC (permalink / raw)
To: linux-media; +Cc: linux-omap, linux-arm-kernel, Hans Verkuil, Robert Jarzmik
Remove the confusing SoC Camera reference.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
---
drivers/media/platform/pxa_camera.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/pxa_camera.c b/drivers/media/platform/pxa_camera.c
index 3c5fe737d36f..a7cf830235b6 100644
--- a/drivers/media/platform/pxa_camera.c
+++ b/drivers/media/platform/pxa_camera.c
@@ -2588,7 +2588,7 @@ static struct platform_driver pxa_camera_driver = {
module_platform_driver(pxa_camera_driver);
-MODULE_DESCRIPTION("PXA27x SoC Camera Host driver");
+MODULE_DESCRIPTION("PXA27x Camera Driver");
MODULE_AUTHOR("Guennadi Liakhovetski <kernel@pengutronix.de>");
MODULE_LICENSE("GPL");
MODULE_VERSION(PXA_CAM_VERSION);
--
2.27.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 3/7] mach-imx: mach-imx27_visstrim_m10.c: remove soc_camera dependencies
2020-06-26 11:53 [PATCH 0/7] media: kill off broken soc_camera Hans Verkuil
2020-06-26 11:53 ` [PATCH 1/7] ov9640: update MODULE_DESCRIPTION Hans Verkuil
2020-06-26 11:53 ` [PATCH 2/7] pxa_camera: " Hans Verkuil
@ 2020-06-26 11:53 ` Hans Verkuil
2020-06-26 12:58 ` Arnd Bergmann
2020-06-26 11:53 ` [PATCH 4/7] mach-omap1: board-ams-delta.c: " Hans Verkuil
` (2 subsequent siblings)
5 siblings, 1 reply; 15+ messages in thread
From: Hans Verkuil @ 2020-06-26 11:53 UTC (permalink / raw)
To: linux-media; +Cc: linux-omap, linux-arm-kernel, Hans Verkuil, Arnd Bergmann
The soc_camera.h header driver is about to be removed, so drop camera
support from this board. Note that the soc_camera driver itself has
long since been deprecated and can't be compiled anymore (it depends
on BROKEN), so camera support on this board has been broken for a long
time (at least since 4.6 when the mx2_camera.c was removed from soc_camera).
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: Arnd Bergmann <arnd@arndb.de>
---
arch/arm/mach-imx/mach-imx27_visstrim_m10.c | 31 ---------------------
1 file changed, 31 deletions(-)
diff --git a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
index c0350bc20941..3da4c0920198 100644
--- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
+++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
@@ -19,7 +19,6 @@
#include <linux/dma-mapping.h>
#include <linux/leds.h>
#include <linux/platform_data/asoc-mx27vis.h>
-#include <media/soc_camera.h>
#include <sound/tlv320aic32x4.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -191,34 +190,6 @@ static const struct gpio visstrim_m10_gpios[] __initconst = {
};
/* Camera */
-static int visstrim_camera_power(struct device *dev, int on)
-{
- gpio_set_value(TVP5150_PWDN, on);
-
- return 0;
-};
-
-static int visstrim_camera_reset(struct device *dev)
-{
- gpio_set_value(TVP5150_RSTN, 0);
- ndelay(500);
- gpio_set_value(TVP5150_RSTN, 1);
-
- return 0;
-};
-
-static struct i2c_board_info visstrim_i2c_camera = {
- I2C_BOARD_INFO("tvp5150", 0x5d),
-};
-
-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,
-};
-
static struct mx2_camera_platform_data visstrim_camera = {
.flags = MX2_CAMERA_CCIR | MX2_CAMERA_CCIR_INTERLACE |
MX2_CAMERA_PCLK_SAMPLE_RISING,
@@ -549,8 +520,6 @@ static void __init visstrim_m10_late_init(void)
imx_add_platform_device("mx27vis", 0, NULL, 0, &snd_mx27vis_pdata,
sizeof(snd_mx27vis_pdata));
- platform_device_register_resndata(NULL, "soc-camera-pdrv", 0, NULL, 0,
- &iclink_tvp5150, sizeof(iclink_tvp5150));
gpio_led_register_device(0, &visstrim_m10_led_data);
--
2.27.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 3/7] mach-imx: mach-imx27_visstrim_m10.c: remove soc_camera dependencies
2020-06-26 11:53 ` [PATCH 3/7] mach-imx: mach-imx27_visstrim_m10.c: remove soc_camera dependencies Hans Verkuil
@ 2020-06-26 12:58 ` Arnd Bergmann
0 siblings, 0 replies; 15+ messages in thread
From: Arnd Bergmann @ 2020-06-26 12:58 UTC (permalink / raw)
To: Hans Verkuil; +Cc: Linux Media Mailing List, linux-omap, Linux ARM
On Fri, Jun 26, 2020 at 1:53 PM Hans Verkuil <hverkuil-cisco@xs4all.nl> wrote:
>
> The soc_camera.h header driver is about to be removed, so drop camera
> support from this board. Note that the soc_camera driver itself has
> long since been deprecated and can't be compiled anymore (it depends
> on BROKEN), so camera support on this board has been broken for a long
> time (at least since 4.6 when the mx2_camera.c was removed from soc_camera).
>
> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> Cc: Arnd Bergmann <arnd@arndb.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Please merge this through the media tree if there are no objections.
Arnd
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 4/7] mach-omap1: board-ams-delta.c: remove soc_camera dependencies
2020-06-26 11:53 [PATCH 0/7] media: kill off broken soc_camera Hans Verkuil
` (2 preceding siblings ...)
2020-06-26 11:53 ` [PATCH 3/7] mach-imx: mach-imx27_visstrim_m10.c: remove soc_camera dependencies Hans Verkuil
@ 2020-06-26 11:53 ` Hans Verkuil
2020-06-26 12:58 ` Arnd Bergmann
2020-06-26 11:53 ` [PATCH 5/7] mach-pxa: palmz72/pcm990: " Hans Verkuil
2020-06-26 11:53 ` [PATCH 7/7] soc_camera.h: remove this unused header Hans Verkuil
5 siblings, 1 reply; 15+ messages in thread
From: Hans Verkuil @ 2020-06-26 11:53 UTC (permalink / raw)
To: linux-media
Cc: linux-omap, linux-arm-kernel, Hans Verkuil, Arnd Bergmann, Tony Lindgren
The soc_camera driver is about to be removed, so drop camera
support from this board. Note that the soc_camera driver itself has
long since been deprecated and can't be compiled anymore (it depends
on BROKEN), so camera support on this board has been broken for a long
time (at least since 4.6 when the omap1_camera.c was removed from soc_camera).
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap1/board-ams-delta.c | 32 --------------
arch/arm/mach-omap1/camera.h | 14 ------
arch/arm/mach-omap1/devices.c | 43 -------------------
.../linux/platform_data/media/omap1_camera.h | 32 --------------
4 files changed, 121 deletions(-)
delete mode 100644 arch/arm/mach-omap1/camera.h
delete mode 100644 include/linux/platform_data/media/omap1_camera.h
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
index 8d32894ecd2e..2ee527c00284 100644
--- a/arch/arm/mach-omap1/board-ams-delta.c
+++ b/arch/arm/mach-omap1/board-ams-delta.c
@@ -29,8 +29,6 @@
#include <linux/io.h>
#include <linux/platform_data/gpio-omap.h>
-#include <media/soc_camera.h>
-
#include <asm/serial.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -40,7 +38,6 @@
#include <mach/mux.h>
#include <mach/hardware.h>
-#include "camera.h"
#include <mach/usb.h>
#include "ams-delta-fiq.h"
@@ -459,12 +456,6 @@ static struct gpiod_lookup_table leds_gpio_table = {
},
};
-static struct i2c_board_info ams_delta_camera_board_info[] = {
- {
- I2C_BOARD_INFO("ov6650", 0x60),
- },
-};
-
#ifdef CONFIG_LEDS_TRIGGERS
DEFINE_LED_TRIGGER(ams_delta_camera_led_trigger);
@@ -483,27 +474,6 @@ static int ams_delta_camera_power(struct device *dev, int power)
#define ams_delta_camera_power NULL
#endif
-static struct soc_camera_link ams_delta_iclink = {
- .bus_id = 0, /* OMAP1 SoC camera bus */
- .i2c_adapter_id = 1,
- .board_info = &ams_delta_camera_board_info[0],
- .module_name = "ov6650",
- .power = ams_delta_camera_power,
-};
-
-static struct platform_device ams_delta_camera_device = {
- .name = "soc-camera-pdrv",
- .id = 0,
- .dev = {
- .platform_data = &ams_delta_iclink,
- },
-};
-
-static struct omap1_cam_platform_data ams_delta_camera_platform_data = {
- .camexclk_khz = 12000, /* default 12MHz clock, no extra DPLL */
- .lclk_khz_max = 1334, /* results in 5fps CIF, 10fps QCIF */
-};
-
static struct platform_device ams_delta_audio_device = {
.name = "ams-delta-audio",
.id = -1,
@@ -598,7 +568,6 @@ static struct platform_device *ams_delta_devices[] __initdata = {
&latch1_gpio_device,
&latch2_gpio_device,
&ams_delta_kp_device,
- &ams_delta_camera_device,
&ams_delta_audio_device,
&ams_delta_serio_device,
&ams_delta_nand_device,
@@ -750,7 +719,6 @@ static void __init ams_delta_init(void)
omap_register_i2c_bus(1, 100, NULL, 0);
omap1_usb_init(&ams_delta_usb_config);
- omap1_set_camera_info(&ams_delta_camera_platform_data);
#ifdef CONFIG_LEDS_TRIGGERS
led_trigger_register_simple("ams_delta_camera",
&ams_delta_camera_led_trigger);
diff --git a/arch/arm/mach-omap1/camera.h b/arch/arm/mach-omap1/camera.h
deleted file mode 100644
index 8018f410d024..000000000000
--- a/arch/arm/mach-omap1/camera.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef __ASM_ARCH_CAMERA_H_
-#define __ASM_ARCH_CAMERA_H_
-
-#include <linux/platform_data/media/omap1_camera.h>
-
-void omap1_camera_init(void *);
-
-static inline void omap1_set_camera_info(struct omap1_cam_platform_data *info)
-{
- omap1_camera_init(info);
-}
-
-#endif /* __ASM_ARCH_CAMERA_H_ */
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c
index 3c4900ac72fc..eb0f09edb3d1 100644
--- a/arch/arm/mach-omap1/devices.c
+++ b/arch/arm/mach-omap1/devices.c
@@ -21,7 +21,6 @@
#include <mach/mux.h>
#include <mach/omap7xx.h>
-#include "camera.h"
#include <mach/hardware.h>
#include "common.h"
@@ -258,48 +257,6 @@ static inline void omap_init_spi100k(void)
}
#endif
-
-#define OMAP1_CAMERA_BASE 0xfffb6800
-#define OMAP1_CAMERA_IOSIZE 0x1c
-
-static struct resource omap1_camera_resources[] = {
- [0] = {
- .start = OMAP1_CAMERA_BASE,
- .end = OMAP1_CAMERA_BASE + OMAP1_CAMERA_IOSIZE - 1,
- .flags = IORESOURCE_MEM,
- },
- [1] = {
- .start = INT_CAMERA,
- .flags = IORESOURCE_IRQ,
- },
-};
-
-static u64 omap1_camera_dma_mask = DMA_BIT_MASK(32);
-
-static struct platform_device omap1_camera_device = {
- .name = "omap1-camera",
- .id = 0, /* This is used to put cameras on this interface */
- .dev = {
- .dma_mask = &omap1_camera_dma_mask,
- .coherent_dma_mask = DMA_BIT_MASK(32),
- },
- .num_resources = ARRAY_SIZE(omap1_camera_resources),
- .resource = omap1_camera_resources,
-};
-
-void __init omap1_camera_init(void *info)
-{
- struct platform_device *dev = &omap1_camera_device;
- int ret;
-
- dev->dev.platform_data = info;
-
- ret = platform_device_register(dev);
- if (ret)
- dev_err(&dev->dev, "unable to register device: %d\n", ret);
-}
-
-
/*-------------------------------------------------------------------------*/
static inline void omap_init_sti(void) {}
diff --git a/include/linux/platform_data/media/omap1_camera.h b/include/linux/platform_data/media/omap1_camera.h
deleted file mode 100644
index 386439db68de..000000000000
--- a/include/linux/platform_data/media/omap1_camera.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Header for V4L2 SoC Camera driver for OMAP1 Camera Interface
- *
- * Copyright (C) 2010, Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
- */
-
-#ifndef __MEDIA_OMAP1_CAMERA_H_
-#define __MEDIA_OMAP1_CAMERA_H_
-
-#include <linux/bitops.h>
-
-#define OMAP1_CAMERA_IOSIZE 0x1c
-
-enum omap1_cam_vb_mode {
- OMAP1_CAM_DMA_CONTIG = 0,
- OMAP1_CAM_DMA_SG,
-};
-
-#define OMAP1_CAMERA_MIN_BUF_COUNT(x) ((x) == OMAP1_CAM_DMA_CONTIG ? 3 : 2)
-
-struct omap1_cam_platform_data {
- unsigned long camexclk_khz;
- unsigned long lclk_khz_max;
- unsigned long flags;
-};
-
-#define OMAP1_CAMERA_LCLK_RISING BIT(0)
-#define OMAP1_CAMERA_RST_LOW BIT(1)
-#define OMAP1_CAMERA_RST_HIGH BIT(2)
-
-#endif /* __MEDIA_OMAP1_CAMERA_H_ */
--
2.27.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 4/7] mach-omap1: board-ams-delta.c: remove soc_camera dependencies
2020-06-26 11:53 ` [PATCH 4/7] mach-omap1: board-ams-delta.c: " Hans Verkuil
@ 2020-06-26 12:58 ` Arnd Bergmann
2020-06-29 15:29 ` Tony Lindgren
0 siblings, 1 reply; 15+ messages in thread
From: Arnd Bergmann @ 2020-06-26 12:58 UTC (permalink / raw)
To: Hans Verkuil
Cc: Linux Media Mailing List, linux-omap, Linux ARM, Tony Lindgren
On Fri, Jun 26, 2020 at 1:53 PM Hans Verkuil <hverkuil-cisco@xs4all.nl> wrote:
>
> The soc_camera driver is about to be removed, so drop camera
> support from this board. Note that the soc_camera driver itself has
> long since been deprecated and can't be compiled anymore (it depends
> on BROKEN), so camera support on this board has been broken for a long
> time (at least since 4.6 when the omap1_camera.c was removed from soc_camera).
>
> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Tony Lindgren <tony@atomide.com>
> ---
> arch/arm/mach-omap1/board-ams-delta.c | 32 --------------
> arch/arm/mach-omap1/camera.h | 14 ------
> arch/arm/mach-omap1/devices.c | 43 -------------------
> .../linux/platform_data/media/omap1_camera.h | 32 --------------
Acked-by: Arnd Bergmann <arnd@arndb.de>
Please merge this through the media tree if there are no objections.
Arnd
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 4/7] mach-omap1: board-ams-delta.c: remove soc_camera dependencies
2020-06-26 12:58 ` Arnd Bergmann
@ 2020-06-29 15:29 ` Tony Lindgren
0 siblings, 0 replies; 15+ messages in thread
From: Tony Lindgren @ 2020-06-29 15:29 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Hans Verkuil, Linux Media Mailing List, linux-omap, Linux ARM
* Arnd Bergmann <arnd@arndb.de> [200626 12:59]:
> On Fri, Jun 26, 2020 at 1:53 PM Hans Verkuil <hverkuil-cisco@xs4all.nl> wrote:
> >
> > The soc_camera driver is about to be removed, so drop camera
> > support from this board. Note that the soc_camera driver itself has
> > long since been deprecated and can't be compiled anymore (it depends
> > on BROKEN), so camera support on this board has been broken for a long
> > time (at least since 4.6 when the omap1_camera.c was removed from soc_camera).
> >
> > Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> > Cc: Arnd Bergmann <arnd@arndb.de>
> > Cc: Tony Lindgren <tony@atomide.com>
> > ---
> > arch/arm/mach-omap1/board-ams-delta.c | 32 --------------
> > arch/arm/mach-omap1/camera.h | 14 ------
> > arch/arm/mach-omap1/devices.c | 43 -------------------
> > .../linux/platform_data/media/omap1_camera.h | 32 --------------
>
> Acked-by: Arnd Bergmann <arnd@arndb.de>
>
> Please merge this through the media tree if there are no objections.
Yes agreed, this is unlikely to conflict with anything:
Acked-by: Tony Lindgren <tony@atomide.com>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 5/7] mach-pxa: palmz72/pcm990: remove soc_camera dependencies
2020-06-26 11:53 [PATCH 0/7] media: kill off broken soc_camera Hans Verkuil
` (3 preceding siblings ...)
2020-06-26 11:53 ` [PATCH 4/7] mach-omap1: board-ams-delta.c: " Hans Verkuil
@ 2020-06-26 11:53 ` Hans Verkuil
2020-06-26 12:58 ` Arnd Bergmann
2020-06-26 11:53 ` [PATCH 7/7] soc_camera.h: remove this unused header Hans Verkuil
5 siblings, 1 reply; 15+ messages in thread
From: Hans Verkuil @ 2020-06-26 11:53 UTC (permalink / raw)
To: linux-media
Cc: linux-omap, linux-arm-kernel, Hans Verkuil, Arnd Bergmann,
Robert Jarzmik
The soc_camera driver is about to be removed, so drop camera
support from this board. Note that the soc_camera driver itself has
long since been deprecated and can't be compiled anymore (it depends
on BROKEN), so camera support on this board has been broken for a long
time (at least since 4.9 when the pxa_camera.c was removed from soc_camera).
Note that there is a new pxa_camera.c driver that replaced the old
soc_camera based driver, but using that would require these boards to
be converted to use the device tree.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
---
arch/arm/mach-pxa/palmz72.c | 112 -------------------
arch/arm/mach-pxa/pcm990-baseboard.c | 157 ---------------------------
2 files changed, 269 deletions(-)
diff --git a/arch/arm/mach-pxa/palmz72.c b/arch/arm/mach-pxa/palmz72.c
index 4df443943579..b4a5fe02a0af 100644
--- a/arch/arm/mach-pxa/palmz72.c
+++ b/arch/arm/mach-pxa/palmz72.c
@@ -47,8 +47,6 @@
#include "pm.h"
#include <linux/platform_data/media/camera-pxa.h>
-#include <media/soc_camera.h>
-
#include "generic.h"
#include "devices.h"
@@ -272,115 +270,6 @@ static int __init palmz72_pm_init(void)
device_initcall(palmz72_pm_init);
#endif
-/******************************************************************************
- * SoC Camera
- ******************************************************************************/
-#if defined(CONFIG_SOC_CAMERA_OV9640) || \
- defined(CONFIG_SOC_CAMERA_OV9640_MODULE)
-static struct pxacamera_platform_data palmz72_pxacamera_platform_data = {
- .flags = PXA_CAMERA_MASTER | PXA_CAMERA_DATAWIDTH_8 |
- PXA_CAMERA_PCLK_EN | PXA_CAMERA_MCLK_EN,
- .mclk_10khz = 2600,
-};
-
-/* Board I2C devices. */
-static struct i2c_board_info palmz72_i2c_device[] = {
- {
- I2C_BOARD_INFO("ov9640", 0x30),
- }
-};
-
-static int palmz72_camera_power(struct device *dev, int power)
-{
- gpio_set_value(GPIO_NR_PALMZ72_CAM_PWDN, !power);
- mdelay(50);
- return 0;
-}
-
-static int palmz72_camera_reset(struct device *dev)
-{
- gpio_set_value(GPIO_NR_PALMZ72_CAM_RESET, 1);
- mdelay(50);
- gpio_set_value(GPIO_NR_PALMZ72_CAM_RESET, 0);
- mdelay(50);
- return 0;
-}
-
-static struct soc_camera_link palmz72_iclink = {
- .bus_id = 0, /* Match id in pxa27x_device_camera in device.c */
- .board_info = &palmz72_i2c_device[0],
- .i2c_adapter_id = 0,
- .module_name = "ov96xx",
- .power = &palmz72_camera_power,
- .reset = &palmz72_camera_reset,
- .flags = SOCAM_DATAWIDTH_8,
-};
-
-static struct gpiod_lookup_table palmz72_i2c_gpiod_table = {
- .dev_id = "i2c-gpio.0",
- .table = {
- GPIO_LOOKUP_IDX("gpio-pxa", 118, NULL, 0,
- GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
- GPIO_LOOKUP_IDX("gpio-pxa", 117, NULL, 1,
- GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
- },
-};
-
-static struct i2c_gpio_platform_data palmz72_i2c_bus_data = {
- .udelay = 10,
- .timeout = 100,
-};
-
-static struct platform_device palmz72_i2c_bus_device = {
- .name = "i2c-gpio",
- .id = 0, /* we use this as a replacement for i2c-pxa */
- .dev = {
- .platform_data = &palmz72_i2c_bus_data,
- }
-};
-
-static struct platform_device palmz72_camera = {
- .name = "soc-camera-pdrv",
- .id = -1,
- .dev = {
- .platform_data = &palmz72_iclink,
- },
-};
-
-/* Here we request the camera GPIOs and configure them. We power up the camera
- * module, deassert the reset pin, but put it into powerdown (low to no power
- * consumption) mode. This allows us to later bring the module up fast. */
-static struct gpio palmz72_camera_gpios[] = {
- { GPIO_NR_PALMZ72_CAM_POWER, GPIOF_INIT_HIGH,"Camera DVDD" },
- { GPIO_NR_PALMZ72_CAM_RESET, GPIOF_INIT_LOW, "Camera RESET" },
- { GPIO_NR_PALMZ72_CAM_PWDN, GPIOF_INIT_LOW, "Camera PWDN" },
-};
-
-static inline void __init palmz72_cam_gpio_init(void)
-{
- int ret;
-
- ret = gpio_request_array(ARRAY_AND_SIZE(palmz72_camera_gpios));
- if (!ret)
- gpio_free_array(ARRAY_AND_SIZE(palmz72_camera_gpios));
- else
- printk(KERN_ERR "Camera GPIO init failed!\n");
-
- return;
-}
-
-static void __init palmz72_camera_init(void)
-{
- palmz72_cam_gpio_init();
- pxa_set_camera_info(&palmz72_pxacamera_platform_data);
- gpiod_add_lookup_table(&palmz72_i2c_gpiod_table);
- platform_device_register(&palmz72_i2c_bus_device);
- platform_device_register(&palmz72_camera);
-}
-#else
-static inline void palmz72_camera_init(void) {}
-#endif
-
static struct gpiod_lookup_table palmz72_mci_gpio_table = {
.dev_id = "pxa2xx-mci.0",
.table = {
@@ -416,7 +305,6 @@ static void __init palmz72_init(void)
palm27x_pmic_init();
palmz72_kpc_init();
palmz72_leds_init();
- palmz72_camera_init();
}
MACHINE_START(PALMZ72, "Palm Zire72")
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c
index bf613f88d70b..8dfcc366d0fe 100644
--- a/arch/arm/mach-pxa/pcm990-baseboard.c
+++ b/arch/arm/mach-pxa/pcm990-baseboard.c
@@ -24,10 +24,6 @@
#include <linux/pwm.h>
#include <linux/pwm_backlight.h>
-#include <media/i2c/mt9v022.h>
-#include <media/soc_camera.h>
-
-#include <linux/platform_data/media/camera-pxa.h>
#include <asm/mach/map.h>
#include "pxa27x.h"
#include <mach/audio.h>
@@ -374,149 +370,6 @@ static struct pxaohci_platform_data pcm990_ohci_platform_data = {
.power_on_delay = 10,
};
-/*
- * PXA27x Camera specific stuff
- */
-#if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE)
-static unsigned long pcm990_camera_pin_config[] = {
- /* CIF */
- GPIO98_CIF_DD_0,
- GPIO105_CIF_DD_1,
- GPIO104_CIF_DD_2,
- GPIO103_CIF_DD_3,
- GPIO95_CIF_DD_4,
- GPIO94_CIF_DD_5,
- GPIO93_CIF_DD_6,
- GPIO108_CIF_DD_7,
- GPIO107_CIF_DD_8,
- GPIO106_CIF_DD_9,
- GPIO42_CIF_MCLK,
- GPIO45_CIF_PCLK,
- GPIO43_CIF_FV,
- GPIO44_CIF_LV,
-};
-
-/*
- * CICR4: PCLK_EN: Pixel clock is supplied by the sensor
- * MCLK_EN: Master clock is generated by PXA
- * PCP: Data sampled on the falling edge of pixel clock
- */
-struct pxacamera_platform_data pcm990_pxacamera_platform_data = {
- .flags = PXA_CAMERA_MASTER | PXA_CAMERA_DATAWIDTH_8 | PXA_CAMERA_DATAWIDTH_10 |
- PXA_CAMERA_PCLK_EN | PXA_CAMERA_MCLK_EN/* | PXA_CAMERA_PCP*/,
- .mclk_10khz = 1000,
-};
-
-#include <linux/platform_data/pca953x.h>
-
-static struct pca953x_platform_data pca9536_data = {
- .gpio_base = PXA_NR_BUILTIN_GPIO,
-};
-
-static int gpio_bus_switch = -EINVAL;
-
-static int pcm990_camera_set_bus_param(struct soc_camera_link *link,
- unsigned long flags)
-{
- if (gpio_bus_switch < 0) {
- if (flags == SOCAM_DATAWIDTH_10)
- return 0;
- else
- return -EINVAL;
- }
-
- if (flags & SOCAM_DATAWIDTH_8)
- gpio_set_value_cansleep(gpio_bus_switch, 1);
- else
- gpio_set_value_cansleep(gpio_bus_switch, 0);
-
- return 0;
-}
-
-static unsigned long pcm990_camera_query_bus_param(struct soc_camera_link *link)
-{
- int ret;
-
- if (gpio_bus_switch < 0) {
- ret = gpio_request(PXA_NR_BUILTIN_GPIO, "camera");
- if (!ret) {
- gpio_bus_switch = PXA_NR_BUILTIN_GPIO;
- gpio_direction_output(gpio_bus_switch, 0);
- }
- }
-
- if (gpio_bus_switch >= 0)
- return SOCAM_DATAWIDTH_8 | SOCAM_DATAWIDTH_10;
- else
- return SOCAM_DATAWIDTH_10;
-}
-
-static void pcm990_camera_free_bus(struct soc_camera_link *link)
-{
- if (gpio_bus_switch < 0)
- return;
-
- gpio_free(gpio_bus_switch);
- gpio_bus_switch = -EINVAL;
-}
-
-/* Board I2C devices. */
-static struct i2c_board_info __initdata pcm990_i2c_devices[] = {
- {
- /* Must initialize before the camera(s) */
- I2C_BOARD_INFO("pca9536", 0x41),
- .platform_data = &pca9536_data,
- },
-};
-
-static struct mt9v022_platform_data mt9v022_pdata = {
- .y_skip_top = 1,
-};
-
-static struct i2c_board_info pcm990_camera_i2c[] = {
- {
- I2C_BOARD_INFO("mt9v022", 0x48),
- }, {
- I2C_BOARD_INFO("mt9m001", 0x5d),
- },
-};
-
-static struct soc_camera_link iclink[] = {
- {
- .bus_id = 0, /* Must match with the camera ID */
- .board_info = &pcm990_camera_i2c[0],
- .priv = &mt9v022_pdata,
- .i2c_adapter_id = 0,
- .query_bus_param = pcm990_camera_query_bus_param,
- .set_bus_param = pcm990_camera_set_bus_param,
- .free_bus = pcm990_camera_free_bus,
- }, {
- .bus_id = 0, /* Must match with the camera ID */
- .board_info = &pcm990_camera_i2c[1],
- .i2c_adapter_id = 0,
- .query_bus_param = pcm990_camera_query_bus_param,
- .set_bus_param = pcm990_camera_set_bus_param,
- .free_bus = pcm990_camera_free_bus,
- },
-};
-
-static struct platform_device pcm990_camera[] = {
- {
- .name = "soc-camera-pdrv",
- .id = 0,
- .dev = {
- .platform_data = &iclink[0],
- },
- }, {
- .name = "soc-camera-pdrv",
- .id = 1,
- .dev = {
- .platform_data = &iclink[1],
- },
- },
-};
-#endif /* CONFIG_VIDEO_PXA27x ||CONFIG_VIDEO_PXA27x_MODULE */
-
/*
* system init for baseboard usage. Will be called by pcm027 init.
*
@@ -551,15 +404,5 @@ void __init pcm990_baseboard_init(void)
pxa_set_i2c_info(NULL);
pxa_set_ac97_info(NULL);
-#if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE)
- pxa2xx_mfp_config(ARRAY_AND_SIZE(pcm990_camera_pin_config));
- pxa_set_camera_info(&pcm990_pxacamera_platform_data);
-
- i2c_register_board_info(0, ARRAY_AND_SIZE(pcm990_i2c_devices));
-
- platform_device_register(&pcm990_camera[0]);
- platform_device_register(&pcm990_camera[1]);
-#endif
-
printk(KERN_INFO "PCM-990 Evaluation baseboard initialized\n");
}
--
2.27.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 5/7] mach-pxa: palmz72/pcm990: remove soc_camera dependencies
2020-06-26 11:53 ` [PATCH 5/7] mach-pxa: palmz72/pcm990: " Hans Verkuil
@ 2020-06-26 12:58 ` Arnd Bergmann
2020-07-11 19:44 ` Robert Jarzmik
0 siblings, 1 reply; 15+ messages in thread
From: Arnd Bergmann @ 2020-06-26 12:58 UTC (permalink / raw)
To: Hans Verkuil
Cc: Linux Media Mailing List, linux-omap, Linux ARM, Robert Jarzmik
On Fri, Jun 26, 2020 at 1:53 PM Hans Verkuil <hverkuil-cisco@xs4all.nl> wrote:
>
> The soc_camera driver is about to be removed, so drop camera
> support from this board. Note that the soc_camera driver itself has
> long since been deprecated and can't be compiled anymore (it depends
> on BROKEN), so camera support on this board has been broken for a long
> time (at least since 4.9 when the pxa_camera.c was removed from soc_camera).
>
> Note that there is a new pxa_camera.c driver that replaced the old
> soc_camera based driver, but using that would require these boards to
> be converted to use the device tree.
>
> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Robert Jarzmik <robert.jarzmik@free.fr>
> ---
> arch/arm/mach-pxa/palmz72.c | 112 -------------------
> arch/arm/mach-pxa/pcm990-baseboard.c | 157 ---------------------------
> 2 files changed, 269 deletions(-)
Acked-by: Arnd Bergmann <arnd@arndb.de>
Please merge this through the media tree if there are no objections.
Arnd
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 5/7] mach-pxa: palmz72/pcm990: remove soc_camera dependencies
2020-06-26 12:58 ` Arnd Bergmann
@ 2020-07-11 19:44 ` Robert Jarzmik
0 siblings, 0 replies; 15+ messages in thread
From: Robert Jarzmik @ 2020-07-11 19:44 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Hans Verkuil, Linux Media Mailing List, linux-omap, Linux ARM
Arnd Bergmann <arnd@arndb.de> writes:
> On Fri, Jun 26, 2020 at 1:53 PM Hans Verkuil <hverkuil-cisco@xs4all.nl> wrote:
>>
>> The soc_camera driver is about to be removed, so drop camera
>> support from this board. Note that the soc_camera driver itself has
>> long since been deprecated and can't be compiled anymore (it depends
>> on BROKEN), so camera support on this board has been broken for a long
>> time (at least since 4.9 when the pxa_camera.c was removed from soc_camera).
>>
>> Note that there is a new pxa_camera.c driver that replaced the old
>> soc_camera based driver, but using that would require these boards to
>> be converted to use the device tree.
This statement is not accurate, pxa_camera should be working in platform_data
based boards, it's just that the solution to make it work was not found yet if I
remember correctly, since the evolutions to the clocking in v4l2 hit it.
> Acked-by: Arnd Bergmann <arnd@arndb.de>
>
> Please merge this through the media tree if there are no objections.
So be it.
--
Robert
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 7/7] soc_camera.h: remove this unused header
2020-06-26 11:53 [PATCH 0/7] media: kill off broken soc_camera Hans Verkuil
` (4 preceding siblings ...)
2020-06-26 11:53 ` [PATCH 5/7] mach-pxa: palmz72/pcm990: " Hans Verkuil
@ 2020-06-26 11:53 ` Hans Verkuil
2020-06-26 13:11 ` [PATCH 8/7] arch/arm/configs: remove obsolete CONFIG_SOC_CAMERA* Hans Verkuil
5 siblings, 1 reply; 15+ messages in thread
From: Hans Verkuil @ 2020-06-26 11:53 UTC (permalink / raw)
To: linux-media; +Cc: linux-omap, linux-arm-kernel, Hans Verkuil, Arnd Bergmann
The soc_camera driver has been removed and all board files
that used it have been fixed. This header can now be removed
altogether.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: Arnd Bergmann <arnd@arndb.de>
---
include/media/soc_camera.h | 397 -------------------------------------
1 file changed, 397 deletions(-)
delete mode 100644 include/media/soc_camera.h
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h
deleted file mode 100644
index 331c343a5b5a..000000000000
--- a/include/media/soc_camera.h
+++ /dev/null
@@ -1,397 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * camera image capture (abstract) bus driver header
- *
- * Copyright (C) 2006, Sascha Hauer, Pengutronix
- * Copyright (C) 2008, Guennadi Liakhovetski <kernel@pengutronix.de>
- */
-
-#ifndef SOC_CAMERA_H
-#define SOC_CAMERA_H
-
-#include <linux/bitops.h>
-#include <linux/device.h>
-#include <linux/mutex.h>
-#include <linux/pm.h>
-#include <linux/videodev2.h>
-#include <media/videobuf2-v4l2.h>
-#include <media/v4l2-async.h>
-#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 {
- /*
- * Subdevice part - keep at top and compatible to
- * struct soc_camera_subdev_desc
- */
-
- /* Per camera SOCAM_SENSOR_* bus flags */
- unsigned long flags;
-
- 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 *);
- /*
- * 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_link *, unsigned long flags);
- 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
- */
-
- /* 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 *);
-};
-
-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
--
2.27.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 8/7] arch/arm/configs: remove obsolete CONFIG_SOC_CAMERA*
2020-06-26 11:53 ` [PATCH 7/7] soc_camera.h: remove this unused header Hans Verkuil
@ 2020-06-26 13:11 ` Hans Verkuil
2020-06-27 9:35 ` [PATCH 9/7] MAINTAINERS: remove SOC-CAMERA entry Hans Verkuil
0 siblings, 1 reply; 15+ messages in thread
From: Hans Verkuil @ 2020-06-26 13:11 UTC (permalink / raw)
To: linux-media; +Cc: linux-omap, linux-arm-kernel, Arnd Bergmann
Drop all configs with the CONFIG_SOC_CAMERA prefix since those
have been removed.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
---
arch/arm/configs/ezx_defconfig | 2 --
arch/arm/configs/imote2_defconfig | 2 --
arch/arm/configs/imx_v4_v5_defconfig | 1 -
arch/arm/configs/imx_v6_v7_defconfig | 1 -
arch/arm/configs/pxa_defconfig | 3 ---
arch/arm/configs/sama5_defconfig | 2 --
6 files changed, 11 deletions(-)
diff --git a/arch/arm/configs/ezx_defconfig b/arch/arm/configs/ezx_defconfig
index bd7b7f945e01..81665b7abf83 100644
--- a/arch/arm/configs/ezx_defconfig
+++ b/arch/arm/configs/ezx_defconfig
@@ -236,8 +236,6 @@ CONFIG_MEDIA_TUNER_CUSTOMISE=y
# CONFIG_MEDIA_TUNER_MXL5007T is not set
# CONFIG_MEDIA_TUNER_MC44S803 is not set
# CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set
-CONFIG_SOC_CAMERA=y
-CONFIG_SOC_CAMERA_MT9M111=y
CONFIG_VIDEO_PXA27x=y
# CONFIG_V4L_USB_DRIVERS is not set
CONFIG_RADIO_TEA5764=y
diff --git a/arch/arm/configs/imote2_defconfig b/arch/arm/configs/imote2_defconfig
index 05c5515fa871..ae15a2a33802 100644
--- a/arch/arm/configs/imote2_defconfig
+++ b/arch/arm/configs/imote2_defconfig
@@ -217,8 +217,6 @@ CONFIG_MEDIA_TUNER_CUSTOMISE=y
# CONFIG_MEDIA_TUNER_MXL5007T is not set
# CONFIG_MEDIA_TUNER_MC44S803 is not set
# CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set
-CONFIG_SOC_CAMERA=y
-CONFIG_SOC_CAMERA_MT9M111=y
CONFIG_VIDEO_PXA27x=y
# CONFIG_V4L_USB_DRIVERS is not set
# CONFIG_RADIO_ADAPTERS is not set
diff --git a/arch/arm/configs/imx_v4_v5_defconfig b/arch/arm/configs/imx_v4_v5_defconfig
index 3df90fc38398..f5f1111f2118 100644
--- a/arch/arm/configs/imx_v4_v5_defconfig
+++ b/arch/arm/configs/imx_v4_v5_defconfig
@@ -110,7 +110,6 @@ CONFIG_REGULATOR_MC13892=y
CONFIG_MEDIA_SUPPORT=y
CONFIG_MEDIA_CAMERA_SUPPORT=y
CONFIG_V4L_PLATFORM_DRIVERS=y
-CONFIG_SOC_CAMERA=y
CONFIG_V4L_MEM2MEM_DRIVERS=y
CONFIG_VIDEO_CODA=y
CONFIG_FB=y
diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig
index 87e6400c436b..38968b862630 100644
--- a/arch/arm/configs/imx_v6_v7_defconfig
+++ b/arch/arm/configs/imx_v6_v7_defconfig
@@ -271,7 +271,6 @@ CONFIG_MEDIA_USB_SUPPORT=y
CONFIG_USB_VIDEO_CLASS=m
CONFIG_V4L_PLATFORM_DRIVERS=y
CONFIG_VIDEO_MUX=y
-CONFIG_SOC_CAMERA=y
CONFIG_V4L_MEM2MEM_DRIVERS=y
CONFIG_VIDEO_CODA=m
CONFIG_VIDEO_IMX_PXP=y
diff --git a/arch/arm/configs/pxa_defconfig b/arch/arm/configs/pxa_defconfig
index e6559e3350e6..aa94d22df0aa 100644
--- a/arch/arm/configs/pxa_defconfig
+++ b/arch/arm/configs/pxa_defconfig
@@ -445,11 +445,8 @@ CONFIG_VIDEO_V4L2_SUBDEV_API=y
CONFIG_MEDIA_USB_SUPPORT=y
CONFIG_USB_VIDEO_CLASS=m
CONFIG_V4L_PLATFORM_DRIVERS=y
-CONFIG_SOC_CAMERA=m
-CONFIG_SOC_CAMERA_PLATFORM=m
CONFIG_VIDEO_PXA27x=m
CONFIG_V4L_MEM2MEM_DRIVERS=y
-CONFIG_SOC_CAMERA_MT9M111=m
CONFIG_DRM=m
CONFIG_FIRMWARE_EDID=y
CONFIG_FB_TILEBLITTING=y
diff --git a/arch/arm/configs/sama5_defconfig b/arch/arm/configs/sama5_defconfig
index 8e1f78c19920..012812d6bb33 100644
--- a/arch/arm/configs/sama5_defconfig
+++ b/arch/arm/configs/sama5_defconfig
@@ -148,9 +148,7 @@ CONFIG_REGULATOR_PWM=m
CONFIG_MEDIA_SUPPORT=y
CONFIG_MEDIA_CAMERA_SUPPORT=y
CONFIG_V4L_PLATFORM_DRIVERS=y
-CONFIG_SOC_CAMERA=y
CONFIG_VIDEO_ATMEL_ISI=y
-CONFIG_SOC_CAMERA_OV2640=m
CONFIG_DRM=y
CONFIG_DRM_ATMEL_HLCDC=y
CONFIG_DRM_PANEL_SIMPLE=y
--
2.27.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 9/7] MAINTAINERS: remove SOC-CAMERA entry
2020-06-26 13:11 ` [PATCH 8/7] arch/arm/configs: remove obsolete CONFIG_SOC_CAMERA* Hans Verkuil
@ 2020-06-27 9:35 ` Hans Verkuil
0 siblings, 0 replies; 15+ messages in thread
From: Hans Verkuil @ 2020-06-27 9:35 UTC (permalink / raw)
To: linux-media; +Cc: linux-omap, linux-arm-kernel, Arnd Bergmann
After the removal of the soc_camera driver and the soc_camera.h header
the SOC-CAMERA entry in the MAINTAINERS file can also be removed.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
---
diff --git a/MAINTAINERS b/MAINTAINERS
index 634d2c3d621a..ef9afc88e9d5 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -15764,13 +15764,6 @@ L: netdev@vger.kernel.org
S: Maintained
F: drivers/net/ethernet/smsc/smsc9420.*
-SOC-CAMERA V4L2 SUBSYSTEM
-L: linux-media@vger.kernel.org
-S: Orphan
-T: git git://linuxtv.org/media_tree.git
-F: drivers/staging/media/soc_camera/
-F: include/media/soc_camera.h
-
SOCIONEXT (SNI) AVE NETWORK DRIVER
M: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
L: netdev@vger.kernel.org
^ permalink raw reply related [flat|nested] 15+ messages in thread