summaryrefslogtreecommitdiff
path: root/drivers/media/i2c/tvp5150.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2016-01-07 15:46:45 +0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-01-25 15:49:19 +0300
commit460b6c0831cb52ef349156cfa27e889606b4cb75 (patch)
tree1154de8f21018e59c44cfe2c1c420dcf1005db0b /drivers/media/i2c/tvp5150.c
parentb1950b8db9896cca59f61b6b7c6d3a14dc782b80 (diff)
downloadlinux-460b6c0831cb52ef349156cfa27e889606b4cb75.tar.xz
[media] tvp5150: Add s_stream subdev operation support
This patch adds the .s_stream subdev operation to the driver. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/i2c/tvp5150.c')
-rw-r--r--drivers/media/i2c/tvp5150.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c
index 555718ebbf0e..08383a273e51 100644
--- a/drivers/media/i2c/tvp5150.c
+++ b/drivers/media/i2c/tvp5150.c
@@ -952,6 +952,21 @@ static int tvp5150_cropcap(struct v4l2_subdev *sd, struct v4l2_cropcap *a)
I2C Command
****************************************************************************/
+static int tvp5150_s_stream(struct v4l2_subdev *sd, int enable)
+{
+ /* Initializes TVP5150 to its default values */
+ /* # set PCLK (27MHz) */
+ tvp5150_write(sd, TVP5150_CONF_SHARED_PIN, 0x00);
+
+ /* Output format: 8-bit ITU-R BT.656 with embedded syncs */
+ if (enable)
+ tvp5150_write(sd, TVP5150_MISC_CTL, 0x09);
+ else
+ tvp5150_write(sd, TVP5150_MISC_CTL, 0x00);
+
+ return 0;
+}
+
static int tvp5150_s_routing(struct v4l2_subdev *sd,
u32 input, u32 output, u32 config)
{
@@ -1073,6 +1088,7 @@ static const struct v4l2_subdev_tuner_ops tvp5150_tuner_ops = {
static const struct v4l2_subdev_video_ops tvp5150_video_ops = {
.s_std = tvp5150_s_std,
+ .s_stream = tvp5150_s_stream,
.s_routing = tvp5150_s_routing,
.s_crop = tvp5150_s_crop,
.g_crop = tvp5150_g_crop,