summaryrefslogtreecommitdiffstats
path: root/drivers/media/v4l2-core/v4l2-common.c
Commit message (Collapse)AuthorAgeFilesLines
* [media] v4l2: drop V4L2_CHIP_MATCH_SUBDEV_NAMEHans Verkuil2013-04-141-2/+1
| | | | | | | | | | | After using the new VIDIOC_DBG_G_CHIP_NAME ioctl I realized that the matching by name possibility is useless. Just drop it and rename MATCH_SUBDEV_IDX to just MATCH_SUBDEV. The v4l2-dbg utility is much better placed to match by name by just enumerating all bridge and subdev devices until chip_name.name matches. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2: add new VIDIOC_DBG_G_CHIP_NAME ioctlHans Verkuil2013-03-251-1/+4
| | | | | | | | | | | | | Simplify the debugging ioctls by creating the VIDIOC_DBG_G_CHIP_NAME ioctl. This will eventually replace VIDIOC_DBG_G_CHIP_IDENT. Chip matching is done by the name or index of subdevices or an index to a bridge chip. Most of this can all be done automatically, so most drivers just need to provide get/set register ops. In particular, it is now possible to get/set subdev registers without requiring assistance of the bridge driver. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2-common: remove obsolete check for ' at the end of a driver nameHans Verkuil2013-03-251-3/+0
| | | | | | | | | | During the transition to sub-devices several years ago non-subdev drivers had a ' at the end of their driver name to tell them apart from already converted drivers. This check was a left-over from that time and can be removed. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2-common: remove obsolete v4l_fill_dv_preset_infoHans Verkuil2013-03-241-47/+0
| | | | | | | It's no longer used, so it can now be removed. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] [V2,24/24] v4l2-core/v4l2-common.c: use IS_ENABLED() macroPeter Senna Tschudin2013-02-061-2/+2
| | | | | | | | | | | | | | | | | | replace: #if defined(CONFIG_MEDIA_TUNER_TEA5761) || \ defined(CONFIG_MEDIA_TUNER_TEA5761_MODULE) with: #if IS_ENABLED(CONFIG_MEDIA_TUNER_TEA5761) This change was made for: CONFIG_MEDIA_TUNER_TEA5761 Also replaced: #if defined(CONFIG_I2C) || (defined(CONFIG_I2C_MODULE) && defined(MODULE)) with: #if IS_ENABLED(CONFIG_I2C) Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l: Helper function for obtaining timestampsSakari Ailus2012-12-211-0/+10
| | | | | | | | | | | v4l2_get_timestamp() produces a monotonic timestamp but unlike ktime_get_ts(), it uses struct timeval instead of struct timespec, saving the drivers the conversion job when getting timestamps for v4l2_buffer's timestamp field. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2-common: h_bp var is unused at v4l2_detect_gtf()Mauro Carvalho Chehab2012-10-281-2/+1
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2: spi modalias is an arrayAlan Cox2012-09-271-1/+1
| | | | | | | We want to check the contents not the array itself versus NULL Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2-common: add CVT and GTF detection functionsHans Verkuil2012-09-131-0/+325
| | | | | | | | | | | | | | These two helper functions detect whether the analog video timings detected by the video receiver match the VESA CVT or GTF standards. They basically do the inverse of the CVT and GTF modeline calculations. This patch also adds a helper function that will determine the aspect ratio based on the provided EDID values. This aspect ratio can be given to the GTF helper function. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2-common: add v4l_match_dv_timingsHans Verkuil2012-09-131-0/+33
| | | | | | | | Add the v4l_match_dv_timings function that can be used to compare two v4l2_dv_timings structs. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l: move v4l2 core into a separate directoryMauro Carvalho Chehab2012-08-131-0/+623
Currently, the v4l2 core is mixed together with other non-core drivers. Move them into a separate directory. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>