diff options
author | Steven Toth <stoth@kernellabs.com> | 2012-01-06 09:54:05 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-01-10 20:38:20 -0500 |
commit | a21df45df0c41f3eb7d0ec6676c7d14b20842bc2 (patch) | |
tree | 373d8c08f0a013a8d8c7ec8e3441d59d4e8ba930 /drivers/media | |
parent | 0963119fca6ad250146fd7d27eb90f205e188beb (diff) |
[media] cx25840: Add support for g_input_status
Allow bridge drivers to query status.
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/cx25840/cx25840-core.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c index ad299668c37..05247d4c340 100644 --- a/drivers/media/video/cx25840/cx25840-core.c +++ b/drivers/media/video/cx25840/cx25840-core.c | |||
@@ -1741,6 +1741,21 @@ static int cx25840_g_std(struct v4l2_subdev *sd, v4l2_std_id *std) | |||
1741 | return 0; | 1741 | return 0; |
1742 | } | 1742 | } |
1743 | 1743 | ||
1744 | static int cx25840_g_input_status(struct v4l2_subdev *sd, u32 *status) | ||
1745 | { | ||
1746 | struct i2c_client *client = v4l2_get_subdevdata(sd); | ||
1747 | |||
1748 | /* A limited function that checks for signal status and returns | ||
1749 | * the state. | ||
1750 | */ | ||
1751 | |||
1752 | /* Check for status of Horizontal lock (SRC lock isn't reliable) */ | ||
1753 | if ((cx25840_read4(client, 0x40c) & 0x00010000) == 0) | ||
1754 | *status |= V4L2_IN_ST_NO_SIGNAL; | ||
1755 | |||
1756 | return 0; | ||
1757 | } | ||
1758 | |||
1744 | static int cx25840_s_std(struct v4l2_subdev *sd, v4l2_std_id std) | 1759 | static int cx25840_s_std(struct v4l2_subdev *sd, v4l2_std_id std) |
1745 | { | 1760 | { |
1746 | struct cx25840_state *state = to_state(sd); | 1761 | struct cx25840_state *state = to_state(sd); |
@@ -5037,6 +5052,7 @@ static const struct v4l2_subdev_video_ops cx25840_video_ops = { | |||
5037 | .s_routing = cx25840_s_video_routing, | 5052 | .s_routing = cx25840_s_video_routing, |
5038 | .s_mbus_fmt = cx25840_s_mbus_fmt, | 5053 | .s_mbus_fmt = cx25840_s_mbus_fmt, |
5039 | .s_stream = cx25840_s_stream, | 5054 | .s_stream = cx25840_s_stream, |
5055 | .g_input_status = cx25840_g_input_status, | ||
5040 | }; | 5056 | }; |
5041 | 5057 | ||
5042 | static const struct v4l2_subdev_vbi_ops cx25840_vbi_ops = { | 5058 | static const struct v4l2_subdev_vbi_ops cx25840_vbi_ops = { |