aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorChristian Gmeiner <christian.gmeiner@gmail.com>2011-01-08 18:45:35 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-01-19 11:45:55 -0200
commitb7eccc46a1dae153d0102c161b4ce4bddb3f52ba (patch)
treebc502976f43ba88eed1b45994f98a5ac1e66a5ec /drivers/media
parent[media] [v3,media] av7110: check for negative array offset (diff)
downloadlinux-dev-b7eccc46a1dae153d0102c161b4ce4bddb3f52ba.tar.xz
linux-dev-b7eccc46a1dae153d0102c161b4ce4bddb3f52ba.zip
[media] adv7175: support s_power
This patch adds s_power support to adv7175 driver. Power-down is done by power-down all four DACs. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/adv7175.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/media/video/adv7175.c b/drivers/media/video/adv7175.c
index f318b51448b3..d2327dbb473f 100644
--- a/drivers/media/video/adv7175.c
+++ b/drivers/media/video/adv7175.c
@@ -303,11 +303,22 @@ static int adv7175_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ide
return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_ADV7175, 0);
}
+static int adv7175_s_power(struct v4l2_subdev *sd, int on)
+{
+ if (on)
+ adv7175_write(sd, 0x01, 0x00);
+ else
+ adv7175_write(sd, 0x01, 0x78);
+
+ return 0;
+}
+
/* ----------------------------------------------------------------------- */
static const struct v4l2_subdev_core_ops adv7175_core_ops = {
.g_chip_ident = adv7175_g_chip_ident,
.init = adv7175_init,
+ .s_power = adv7175_s_power,
};
static const struct v4l2_subdev_video_ops adv7175_video_ops = {