diff options
| author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-05-26 09:03:01 -0400 |
|---|---|---|
| committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-06-21 09:46:44 -0400 |
| commit | b71c99801e18eb172ae34851daf25044a3bf644a (patch) | |
| tree | bf269d9d56c7a472022866e8cb186d6be6f060f4 | |
| parent | 12869145718571ffa4f6e650a6f759934eeca0d9 (diff) | |
[media] v4l2-core: remove support for obsolete VIDIOC_DBG_G_CHIP_IDENT
This has been replaced by the new and much better VIDIOC_DBG_G_CHIP_INFO.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| -rw-r--r-- | drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 1 | ||||
| -rw-r--r-- | drivers/media/v4l2-core/v4l2-dev.c | 1 | ||||
| -rw-r--r-- | drivers/media/v4l2-core/v4l2-ioctl.c | 28 | ||||
| -rw-r--r-- | include/media/v4l2-chip-ident.h | 354 | ||||
| -rw-r--r-- | include/media/v4l2-ioctl.h | 2 | ||||
| -rw-r--r-- | include/media/v4l2-subdev.h | 4 | ||||
| -rw-r--r-- | include/uapi/linux/videodev2.h | 17 |
7 files changed, 4 insertions, 403 deletions
diff --git a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c index f1295519f285..8f7a6a454a4c 100644 --- a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c +++ b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c | |||
| @@ -1074,7 +1074,6 @@ long v4l2_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg) | |||
| 1074 | case VIDIOC_TRY_DECODER_CMD: | 1074 | case VIDIOC_TRY_DECODER_CMD: |
| 1075 | case VIDIOC_DBG_S_REGISTER: | 1075 | case VIDIOC_DBG_S_REGISTER: |
| 1076 | case VIDIOC_DBG_G_REGISTER: | 1076 | case VIDIOC_DBG_G_REGISTER: |
| 1077 | case VIDIOC_DBG_G_CHIP_IDENT: | ||
| 1078 | case VIDIOC_S_HW_FREQ_SEEK: | 1077 | case VIDIOC_S_HW_FREQ_SEEK: |
| 1079 | case VIDIOC_S_DV_TIMINGS: | 1078 | case VIDIOC_S_DV_TIMINGS: |
| 1080 | case VIDIOC_G_DV_TIMINGS: | 1079 | case VIDIOC_G_DV_TIMINGS: |
diff --git a/drivers/media/v4l2-core/v4l2-dev.c b/drivers/media/v4l2-core/v4l2-dev.c index 2f3fac5345db..0c061e16502e 100644 --- a/drivers/media/v4l2-core/v4l2-dev.c +++ b/drivers/media/v4l2-core/v4l2-dev.c | |||
| @@ -596,7 +596,6 @@ static void determine_valid_ioctls(struct video_device *vdev) | |||
| 596 | set_bit(_IOC_NR(VIDIOC_DBG_G_REGISTER), valid_ioctls); | 596 | set_bit(_IOC_NR(VIDIOC_DBG_G_REGISTER), valid_ioctls); |
| 597 | set_bit(_IOC_NR(VIDIOC_DBG_S_REGISTER), valid_ioctls); | 597 | set_bit(_IOC_NR(VIDIOC_DBG_S_REGISTER), valid_ioctls); |
| 598 | #endif | 598 | #endif |
| 599 | SET_VALID_IOCTL(ops, VIDIOC_DBG_G_CHIP_IDENT, vidioc_g_chip_ident); | ||
| 600 | /* yes, really vidioc_subscribe_event */ | 599 | /* yes, really vidioc_subscribe_event */ |
| 601 | SET_VALID_IOCTL(ops, VIDIOC_DQEVENT, vidioc_subscribe_event); | 600 | SET_VALID_IOCTL(ops, VIDIOC_DQEVENT, vidioc_subscribe_event); |
| 602 | SET_VALID_IOCTL(ops, VIDIOC_SUBSCRIBE_EVENT, vidioc_subscribe_event); | 601 | SET_VALID_IOCTL(ops, VIDIOC_SUBSCRIBE_EVENT, vidioc_subscribe_event); |
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index 423cbf948600..c9d9f01d21bc 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c | |||
| @@ -26,7 +26,6 @@ | |||
| 26 | #include <media/v4l2-fh.h> | 26 | #include <media/v4l2-fh.h> |
| 27 | #include <media/v4l2-event.h> | 27 | #include <media/v4l2-event.h> |
| 28 | #include <media/v4l2-device.h> | 28 | #include <media/v4l2-device.h> |
| 29 | #include <media/v4l2-chip-ident.h> | ||
| 30 | #include <media/videobuf2-core.h> | 29 | #include <media/videobuf2-core.h> |
| 31 | 30 | ||
| 32 | /* Zero out the end of the struct pointed to by p. Everything after, but | 31 | /* Zero out the end of the struct pointed to by p. Everything after, but |
| @@ -619,20 +618,6 @@ static void v4l_print_decoder_cmd(const void *arg, bool write_only) | |||
| 619 | pr_info("pts=%llu\n", p->stop.pts); | 618 | pr_info("pts=%llu\n", p->stop.pts); |
| 620 | } | 619 | } |
| 621 | 620 | ||
| 622 | static void v4l_print_dbg_chip_ident(const void *arg, bool write_only) | ||
| 623 | { | ||
| 624 | const struct v4l2_dbg_chip_ident *p = arg; | ||
| 625 | |||
| 626 | pr_cont("type=%u, ", p->match.type); | ||
| 627 | if (p->match.type == V4L2_CHIP_MATCH_I2C_DRIVER) | ||
| 628 | pr_cont("name=%.*s, ", | ||
| 629 | (int)sizeof(p->match.name), p->match.name); | ||
| 630 | else | ||
| 631 | pr_cont("addr=%u, ", p->match.addr); | ||
| 632 | pr_cont("chip_ident=%u, revision=0x%x\n", | ||
| 633 | p->ident, p->revision); | ||
| 634 | } | ||
| 635 | |||
| 636 | static void v4l_print_dbg_chip_info(const void *arg, bool write_only) | 621 | static void v4l_print_dbg_chip_info(const void *arg, bool write_only) |
| 637 | { | 622 | { |
| 638 | const struct v4l2_dbg_chip_info *p = arg; | 623 | const struct v4l2_dbg_chip_info *p = arg; |
| @@ -1813,18 +1798,6 @@ static int v4l_dbg_s_register(const struct v4l2_ioctl_ops *ops, | |||
| 1813 | #endif | 1798 | #endif |
| 1814 | } | 1799 | } |
| 1815 | 1800 | ||
| 1816 | static int v4l_dbg_g_chip_ident(const struct v4l2_ioctl_ops *ops, | ||
| 1817 | struct file *file, void *fh, void *arg) | ||
| 1818 | { | ||
| 1819 | struct v4l2_dbg_chip_ident *p = arg; | ||
| 1820 | |||
| 1821 | p->ident = V4L2_IDENT_NONE; | ||
| 1822 | p->revision = 0; | ||
| 1823 | if (p->match.type == V4L2_CHIP_MATCH_SUBDEV) | ||
| 1824 | return -EINVAL; | ||
| 1825 | return ops->vidioc_g_chip_ident(file, fh, p); | ||
| 1826 | } | ||
| 1827 | |||
| 1828 | static int v4l_dbg_g_chip_info(const struct v4l2_ioctl_ops *ops, | 1801 | static int v4l_dbg_g_chip_info(const struct v4l2_ioctl_ops *ops, |
| 1829 | struct file *file, void *fh, void *arg) | 1802 | struct file *file, void *fh, void *arg) |
| 1830 | { | 1803 | { |
| @@ -2074,7 +2047,6 @@ static struct v4l2_ioctl_info v4l2_ioctls[] = { | |||
| 2074 | IOCTL_INFO_STD(VIDIOC_TRY_DECODER_CMD, vidioc_try_decoder_cmd, v4l_print_decoder_cmd, 0), | 2047 | IOCTL_INFO_STD(VIDIOC_TRY_DECODER_CMD, vidioc_try_decoder_cmd, v4l_print_decoder_cmd, 0), |
| 2075 | IOCTL_INFO_FNC(VIDIOC_DBG_S_REGISTER, v4l_dbg_s_register, v4l_print_dbg_register, 0), | 2048 | IOCTL_INFO_FNC(VIDIOC_DBG_S_REGISTER, v4l_dbg_s_register, v4l_print_dbg_register, 0), |
| 2076 | IOCTL_INFO_FNC(VIDIOC_DBG_G_REGISTER, v4l_dbg_g_register, v4l_print_dbg_register, 0), | 2049 | IOCTL_INFO_FNC(VIDIOC_DBG_G_REGISTER, v4l_dbg_g_register, v4l_print_dbg_register, 0), |
| 2077 | IOCTL_INFO_FNC(VIDIOC_DBG_G_CHIP_IDENT, v4l_dbg_g_chip_ident, v4l_print_dbg_chip_ident, 0), | ||
| 2078 | IOCTL_INFO_FNC(VIDIOC_S_HW_FREQ_SEEK, v4l_s_hw_freq_seek, v4l_print_hw_freq_seek, INFO_FL_PRIO), | 2050 | IOCTL_INFO_FNC(VIDIOC_S_HW_FREQ_SEEK, v4l_s_hw_freq_seek, v4l_print_hw_freq_seek, INFO_FL_PRIO), |
| 2079 | IOCTL_INFO_STD(VIDIOC_S_DV_TIMINGS, vidioc_s_dv_timings, v4l_print_dv_timings, INFO_FL_PRIO), | 2051 | IOCTL_INFO_STD(VIDIOC_S_DV_TIMINGS, vidioc_s_dv_timings, v4l_print_dv_timings, INFO_FL_PRIO), |
| 2080 | IOCTL_INFO_STD(VIDIOC_G_DV_TIMINGS, vidioc_g_dv_timings, v4l_print_dv_timings, 0), | 2052 | IOCTL_INFO_STD(VIDIOC_G_DV_TIMINGS, vidioc_g_dv_timings, v4l_print_dv_timings, 0), |
diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip-ident.h deleted file mode 100644 index 543f89c18896..000000000000 --- a/include/media/v4l2-chip-ident.h +++ /dev/null | |||
| @@ -1,354 +0,0 @@ | |||
| 1 | /* | ||
| 2 | v4l2 chip identifiers header | ||
| 3 | |||
| 4 | This header provides a list of chip identifiers that can be returned | ||
| 5 | through the VIDIOC_DBG_G_CHIP_IDENT ioctl. | ||
| 6 | |||
| 7 | Copyright (C) 2007 Hans Verkuil <hverkuil@xs4all.nl> | ||
| 8 | |||
| 9 | This program is free software; you can redistribute it and/or modify | ||
| 10 | it under the terms of the GNU General Public License as published by | ||
| 11 | the Free Software Foundation; either version 2 of the License, or | ||
| 12 | (at your option) any later version. | ||
| 13 | |||
| 14 | This program is distributed in the hope that it will be useful, | ||
| 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | GNU General Public License for more details. | ||
| 18 | |||
| 19 | You should have received a copy of the GNU General Public License | ||
| 20 | along with this program; if not, write to the Free Software | ||
| 21 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 22 | */ | ||
| 23 | |||
| 24 | #ifndef V4L2_CHIP_IDENT_H_ | ||
| 25 | #define V4L2_CHIP_IDENT_H_ | ||
| 26 | |||
| 27 | /* VIDIOC_DBG_G_CHIP_IDENT: identifies the actual chip installed on the board */ | ||
| 28 | |||
| 29 | /* KEEP THIS LIST ORDERED BY ID! | ||
| 30 | Otherwise it will be hard to see which ranges are already in use when | ||
| 31 | adding support to a new chip family. */ | ||
| 32 | enum { | ||
| 33 | /* general idents: reserved range 0-49 */ | ||
| 34 | V4L2_IDENT_NONE = 0, /* No chip matched */ | ||
| 35 | V4L2_IDENT_AMBIGUOUS = 1, /* Match too general, multiple chips matched */ | ||
| 36 | V4L2_IDENT_UNKNOWN = 2, /* Chip found, but cannot identify */ | ||
| 37 | |||
| 38 | /* module tvaudio: reserved range 50-99 */ | ||
| 39 | V4L2_IDENT_TVAUDIO = 50, /* A tvaudio chip, unknown which it is exactly */ | ||
| 40 | |||
| 41 | /* Sony IMX074 */ | ||
| 42 | V4L2_IDENT_IMX074 = 74, | ||
| 43 | |||
| 44 | /* module saa7110: just ident 100 */ | ||
| 45 | V4L2_IDENT_SAA7110 = 100, | ||
| 46 | |||
| 47 | /* module saa7115: reserved range 101-149 */ | ||
| 48 | V4L2_IDENT_SAA7111 = 101, | ||
| 49 | V4L2_IDENT_SAA7111A = 102, | ||
| 50 | V4L2_IDENT_SAA7113 = 103, | ||
| 51 | V4L2_IDENT_SAA7114 = 104, | ||
| 52 | V4L2_IDENT_SAA7115 = 105, | ||
| 53 | V4L2_IDENT_SAA7118 = 108, | ||
| 54 | |||
| 55 | V4L2_IDENT_GM7113C = 140, | ||
| 56 | |||
| 57 | /* module saa7127: reserved range 150-199 */ | ||
| 58 | V4L2_IDENT_SAA7127 = 157, | ||
| 59 | V4L2_IDENT_SAA7129 = 159, | ||
| 60 | |||
| 61 | /* module cx25840: reserved range 200-249 */ | ||
| 62 | V4L2_IDENT_CX25836 = 236, | ||
| 63 | V4L2_IDENT_CX25837 = 237, | ||
| 64 | V4L2_IDENT_CX25840 = 240, | ||
| 65 | V4L2_IDENT_CX25841 = 241, | ||
| 66 | V4L2_IDENT_CX25842 = 242, | ||
| 67 | V4L2_IDENT_CX25843 = 243, | ||
| 68 | |||
| 69 | /* OmniVision sensors: reserved range 250-299 */ | ||
| 70 | V4L2_IDENT_OV7670 = 250, | ||
| 71 | V4L2_IDENT_OV7720 = 251, | ||
| 72 | V4L2_IDENT_OV7725 = 252, | ||
| 73 | V4L2_IDENT_OV7660 = 253, | ||
| 74 | V4L2_IDENT_OV9650 = 254, | ||
| 75 | V4L2_IDENT_OV9655 = 255, | ||
| 76 | V4L2_IDENT_SOI968 = 256, | ||
| 77 | V4L2_IDENT_OV9640 = 257, | ||
| 78 | V4L2_IDENT_OV6650 = 258, | ||
| 79 | V4L2_IDENT_OV2640 = 259, | ||
| 80 | V4L2_IDENT_OV9740 = 260, | ||
| 81 | |||
