diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2009-08-25 16:06:21 +0200 |
---|---|---|
committer | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2009-08-25 16:06:21 +0200 |
commit | aea41520a95b61491620e5702c8322a8fcfbf12e (patch) | |
tree | dae424dbcb72aec9da4a9cbfb4c8815f66f75f8c /linux/include | |
parent | 9d0dc1f40d5d02887f421e23e1c6e0c93bf69f00 (diff) | |
download | mediapointer-dvb-s2-aea41520a95b61491620e5702c8322a8fcfbf12e.tar.gz mediapointer-dvb-s2-aea41520a95b61491620e5702c8322a8fcfbf12e.tar.bz2 |
soc-camera: prepare soc_camera_platform.c and its users for conversion
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
soc_camera_platform.c is only used by y SuperH ap325rxa board. This patch
converts soc_camera_platform.c and its users for the soc-camera platform-
device conversion and also extends soc-camera core to handle non-I2C cameras.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Paul Mundt <lethal@linux-sh.org>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Priority: low
---
arch/sh/boards/board-ap325rxa.c | 43 ++++++++++++++++++------
drivers/media/video/soc_camera.c | 61 ++++++++++++++++++++++++++--------
include/media/soc_camera.h | 6 +++
include/media/soc_camera_platform.h | 2 +
4 files changed, 86 insertions(+), 26 deletions(-)
Diffstat (limited to 'linux/include')
-rw-r--r-- | linux/include/media/soc_camera.h | 6 | ||||
-rw-r--r-- | linux/include/media/soc_camera_platform.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/linux/include/media/soc_camera.h b/linux/include/media/soc_camera.h index 23ecead35..813e12061 100644 --- a/linux/include/media/soc_camera.h +++ b/linux/include/media/soc_camera.h @@ -102,6 +102,12 @@ struct soc_camera_link { int i2c_adapter_id; struct i2c_board_info *board_info; const char *module_name; + /* + * For non-I2C devices platform platform has to provide methods to + * add a device to the system and to remove + */ + int (*add_device)(struct soc_camera_link *, struct device *); + void (*del_device)(struct soc_camera_link *); /* Optional callbacks to power on or off and reset the sensor */ int (*power)(struct device *, int); int (*reset)(struct device *); diff --git a/linux/include/media/soc_camera_platform.h b/linux/include/media/soc_camera_platform.h index 1d092b467..af224dead 100644 --- a/linux/include/media/soc_camera_platform.h +++ b/linux/include/media/soc_camera_platform.h @@ -12,6 +12,7 @@ #define __SOC_CAMERA_H__ #include <linux/videodev2.h> +#include <media/soc_camera.h> struct soc_camera_platform_info { int iface; @@ -21,6 +22,7 @@ struct soc_camera_platform_info { unsigned long bus_param; void (*power)(int); int (*set_capture)(struct soc_camera_platform_info *info, int enable); + struct soc_camera_link link; }; #endif /* __SOC_CAMERA_H__ */ |