aboutsummaryrefslogtreecommitdiffstats
path: root/include/media/soc_camera.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/media/soc_camera.h')
-rw-r--r--include/media/soc_camera.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h
index 37013688af44..23ecead35e7a 100644
--- a/include/media/soc_camera.h
+++ b/include/media/soc_camera.h
@@ -60,7 +60,7 @@ struct soc_camera_file {
60 60
61struct soc_camera_host { 61struct soc_camera_host {
62 struct list_head list; 62 struct list_head list;
63 struct device dev; 63 struct device *dev;
64 unsigned char nr; /* Host number */ 64 unsigned char nr; /* Host number */
65 void *priv; 65 void *priv;
66 const char *drv_name; 66 const char *drv_name;
@@ -92,11 +92,16 @@ struct soc_camera_host_ops {
92#define SOCAM_SENSOR_INVERT_VSYNC (1 << 3) 92#define SOCAM_SENSOR_INVERT_VSYNC (1 << 3)
93#define SOCAM_SENSOR_INVERT_DATA (1 << 4) 93#define SOCAM_SENSOR_INVERT_DATA (1 << 4)
94 94
95struct i2c_board_info;
96
95struct soc_camera_link { 97struct soc_camera_link {
96 /* Camera bus id, used to match a camera and a bus */ 98 /* Camera bus id, used to match a camera and a bus */
97 int bus_id; 99 int bus_id;
98 /* Per camera SOCAM_SENSOR_* bus flags */ 100 /* Per camera SOCAM_SENSOR_* bus flags */
99 unsigned long flags; 101 unsigned long flags;
102 int i2c_adapter_id;
103 struct i2c_board_info *board_info;
104 const char *module_name;
100 /* Optional callbacks to power on or off and reset the sensor */ 105 /* Optional callbacks to power on or off and reset the sensor */
101 int (*power)(struct device *, int); 106 int (*power)(struct device *, int);
102 int (*reset)(struct device *); 107 int (*reset)(struct device *);
@@ -107,6 +112,7 @@ struct soc_camera_link {
107 */ 112 */
108 int (*set_bus_param)(struct soc_camera_link *, unsigned long flags); 113 int (*set_bus_param)(struct soc_camera_link *, unsigned long flags);
109 unsigned long (*query_bus_param)(struct soc_camera_link *); 114 unsigned long (*query_bus_param)(struct soc_camera_link *);
115 void (*free_bus)(struct soc_camera_link *);
110}; 116};
111 117
112static inline struct soc_camera_device *to_soc_camera_dev(struct device *dev) 118static inline struct soc_camera_device *to_soc_camera_dev(struct device *dev)
@@ -116,7 +122,7 @@ static inline struct soc_camera_device *to_soc_camera_dev(struct device *dev)
116 122
117static inline struct soc_camera_host *to_soc_camera_host(struct device *dev) 123static inline struct soc_camera_host *to_soc_camera_host(struct device *dev)
118{ 124{
119 return container_of(dev, struct soc_camera_host, dev); 125 return dev_get_drvdata(dev);
120} 126}
121 127
122extern int soc_camera_host_register(struct soc_camera_host *ici); 128extern int soc_camera_host_register(struct soc_camera_host *ici);