@@ -85,7 +85,7 @@ respective V4L2 operations.
Camera API
----------
-Sensor drivers can use struct soc_camera_link, typically provided by the
+Sensor drivers can use struct soc_camera_desc, typically provided by the
platform, and used to specify to which camera host bus the sensor is connected,
and optionally provide platform .power and .reset methods for the camera. This
struct is provided to the camera driver via the I2C client device platform data
@@ -43,10 +43,14 @@ static unsigned short omnivision_sensor_addrs[] = {
};
-static struct soc_camera_link camlink = {
- .bus_id = 0,
- .flags = 0,
- .module_name = "em28xx",
+static struct soc_camera_desc camlink = {
+ .subdev_desc = {
+ .flags = 0,
+ },
+ .host_desc = {
+ .bus_id = 0,
+ .module_name = "em28xx",
+ },
};
@@ -190,54 +190,6 @@ struct soc_camera_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;
-
- /* 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)
{
This updates the last user of struct soc_camera_link and finally removes it. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> --- Documentation/video4linux/soc-camera.txt | 2 +- drivers/media/usb/em28xx/em28xx-camera.c | 12 +++++-- include/media/soc_camera.h | 48 ------------------------------ 3 files changed, 9 insertions(+), 53 deletions(-)