summaryrefslogtreecommitdiffstats
path: root/include/media/soc_camera.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-05-18 00:46:09 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-18 00:46:09 -0300
commit4f9fb5ed020324d6c151db34460df572b0fdc491 (patch)
treed91ab3117e89c674f2f1bcc897a1b86d6c761154 /include/media/soc_camera.h
parente26b31449142a18512b57dbea515af234992ba7c (diff)
downloadop-kernel-dev-4f9fb5ed020324d6c151db34460df572b0fdc491.zip
op-kernel-dev-4f9fb5ed020324d6c151db34460df572b0fdc491.tar.gz
V4L/DVB: soc-camera: add runtime pm support for subdevices
To save power soc-camera powers subdevices down, when they are not in use, if this is supported by the platform. However, the V4L standard dictates, that video nodes shall preserve configuration between uses. This requires runtime power management, which is implemented by this patch. It allows subdevice drivers to specify their runtime power-management methods, by assigning a type to the video device. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media/soc_camera.h')
-rw-r--r--include/media/soc_camera.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h
index 5a17365..c9a5bbf 100644
--- a/include/media/soc_camera.h
+++ b/include/media/soc_camera.h
@@ -284,4 +284,12 @@ static inline void soc_camera_limit_side(int *start, int *length,
extern unsigned long soc_camera_apply_sensor_flags(struct soc_camera_link *icl,
unsigned long flags);
+/* 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(struct i2c_client *client)
+{
+ struct soc_camera_device *icd = client->dev.platform_data;
+ return icd->vdev;
+}
+
#endif
OpenPOWER on IntegriCloud