summaryrefslogtreecommitdiffstats
path: root/drivers/media/radio/radio-tea5764.c
Commit message (Collapse)AuthorAgeFilesLines
* [media] radio: Drop owner assignment from i2c_driverKrzysztof Kozlowski2015-08-111-1/+0
| | | | | | | | i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] radio-tea5764: fix sparse warningsHans Verkuil2014-09-031-6/+6
| | | | | | | | | | | | | | | drivers/media/radio/radio-tea5764.c:168:24: warning: cast to restricted __be16 drivers/media/radio/radio-tea5764.c:168:24: warning: cast to restricted __be16 drivers/media/radio/radio-tea5764.c:168:24: warning: cast to restricted __be16 drivers/media/radio/radio-tea5764.c:168:24: warning: cast to restricted __be16 drivers/media/radio/radio-tea5764.c:185:20: warning: incorrect type in assignment (different base types) drivers/media/radio/radio-tea5764.c:186:20: warning: incorrect type in assignment (different base types) drivers/media/radio/radio-tea5764.c:187:20: warning: incorrect type in assignment (different base types) drivers/media/radio/radio-tea5764.c:188:20: warning: incorrect type in assignment (different base types) drivers/media/radio/radio-tea5764.c:189:20: warning: incorrect type in assignment (different base types) Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] media: remove the setting of the flag V4L2_FL_USE_FH_PRIORamakrishnan Muthukrishnan2014-07-041-1/+0
| | | | | | | | | | | Since all the drivers that use `struct v4l2_fh' use the core priority checking, the setting of the flag in the drivers can be removed. Signed-off-by: Ramakrishnan Muthukrishnan <ramakrmu@cisco.com> Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] tef6862/radio-tea5764: actually assign clamp resultHans Verkuil2013-11-291-1/+1
| | | | | | | | | | When adding frequency clamping to the tef6862 and radio-tea5764 drivers I forgot to actually *assign* the clamp result to the frequency. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reported-by: Hans Petter Selasky <hps@bitfrost.no> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Cc: stable@vger.kernel.org # for 3.11 and up
* [media] radio-tea5764: some cleanups and clamp frequency when out-of-rangeHans Verkuil2013-06-171-11/+13
| | | | | | | | | Some small cleanups and when setting the frequency it is now clamped to the valid frequency range instead of returning an error. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Fabio Belavenuto <belavenuto@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-tea5764: add prio and control event supportHans Verkuil2013-06-171-0/+8
| | | | | | Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Fabio Belavenuto <belavenuto@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-tea5764: add device_caps supportHans Verkuil2013-06-171-1/+2
| | | | | | Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Fabio Belavenuto <belavenuto@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-tea5764: audio and input ioctls do not apply to radio devicesHans Verkuil2013-06-171-37/+0
| | | | | | | | Deleted those ioctls from this driver. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Fabio Belavenuto <belavenuto@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-tea5764: convert to the control frameworkHans Verkuil2013-06-171-53/+26
| | | | | | Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Fabio Belavenuto <belavenuto@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-tea5764: embed struct video_deviceHans Verkuil2013-06-171-17/+10
| | | | | | | | This simplifies the code as it removes a memory allocation check. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Fabio Belavenuto <belavenuto@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-tea5764: add support for struct v4l2_deviceHans Verkuil2013-06-171-5/+17
| | | | | | Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Fabio Belavenuto <belavenuto@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2: add const to argument of write-only s_tuner ioctlHans Verkuil2013-03-241-1/+1
| | | | | | | | | This ioctl is defined as IOW, so pass the argument as const. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2: add const to argument of write-only s_frequency ioctlHans Verkuil2013-03-241-1/+1
| | | | | | | This ioctl is defined as IOW, so pass the argument as const. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* Drivers: media: remove __dev* attributes.Greg Kroah-Hartman2013-01-031-4/+4
| | | | | | | | | | | | | | | CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit from these drivers. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton <wfp5p@virginia.edu> Cc: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* radio tea5764, si4713: get rid of warning: no previous prototypeMauro Carvalho Chehab2012-10-281-2/+2
| | | | | | | | drivers/media/radio/radio-tea5764.c:148:5: warning: no previous prototype for 'tea5764_i2c_read' [-Wmissing-prototypes] drivers/media/radio/radio-tea5764.c:168:5: warning: no previous prototype for 'tea5764_i2c_write' [-Wmissing-prototypes] drivers/media/radio/si4713-i2c.c:1772:6: warning: no previous prototype for 'si4713_ioctl' [-Wmissing-prototypes] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-tea5764: convert struct i2c_msg initialization to C99 formatShubhrajyoti D2012-09-271-3/+10
| | | | | | | | | Convert the struct i2c_msg initialization to C99 format. This makes maintaining and editing the code simpler. Also helps once other fields like transferred are added in future. Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2: make vidioc_s_audio constHans Verkuil2012-09-261-1/+1
| | | | | | | | | Write-only ioctls should have a const argument in the ioctl op. Do this conversion for vidioc_s_audio. Adding const for write-only ioctls was decided during the 2012 Media Workshop. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] convert drivers/media/* to use module_i2c_driver()Axel Lin2012-03-081-18/+1
| | | | | | | | | | | | | | | | | | | | | | | This patch converts the drivers in drivers/media/* to use the module_i2_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Heungjun Kim <riverful.kim@samsung.com> Cc: Joonyoung Shim <jy0922.shim@samsung.com> Cc: Andrew Chew <achew@nvidia.com> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Michael Grzeschik <m.grzeschik@pengutronix.de> Cc: Johannes Obermaier <johannes.obermaier@gmail.com> Cc: Steven Toth <stoth@kernellabs.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Acked-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] media: tea5764: reconcile Kconfig symbol and macroPaul Bolle2011-11-031-1/+3
| | | | | | | | | | | | | The Kconfig symbol RADIO_TEA5764_XTAL is unused. The code does use a RADIO_TEA5764_XTAL macro, but does that rather peculiar. But there seems to be a way to keep both. (The easiest way out would be to rip out both the Kconfig symbol and the macro.) Note there's also a module parameter 'use_xtal' to influence all this. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tea5764: Fix module parameter permissionsJean Delvare2011-07-271-1/+1
| | | | | | | | | | | | | | | | The third parameter of module_param is supposed to represent sysfs file permissions. A value of "1" leads to the following: $ ls -l /sys/module/radio_tea5764/parameters/ total 0 I am changing it to "0" to align with the other module parameters in this driver. Signed-off-by: Jean Delvare <jdelvare@suse.de> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: Fabio Belavenuto <belavenuto@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio: Use the subsystem version control for VIDIOC_QUERYCAPMauro Carvalho Chehab2011-07-271-4/+2
| | | | | | | | Just like the video drivers, the right thing to do is to use the per-subsystem version control. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tea5764: convert to unlocked_ioctlHans Verkuil2010-12-011-40/+9
| | | | | | | | | | Convert from ioctl to unlocked_ioctl using the v4l2 core lock. Also removed the 'exclusive access' limitation. There was no need for it and it violates the v4l2 spec as well. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo2010-03-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
* V4L/DVB (13611): radio-tea5764: Correct size given to memsetJulia Lawall2009-12-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Memset should be given the size of the structure, not the size of the pointer. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ type T; T *x; expression E; @@ memset(x, E, sizeof( + * x)) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13557): v4l: Remove unneeded video_device::minor usage in driversLaurent Pinchart2009-12-161-4/+0
| | | | | | | | | | | | | | | | The video_device::minor field is used where it shouldn't, either to - test for error conditions that can't happen anymore with the current v4l-dvb core, - store the value in a driver private field that isn't used anymore, - check the video device type where video_device::vfl_type should be used, or - create the name of a kernel thread that should get a stable name. Remove or fix those use cases. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13547): radio: add trivial checks on the tuner and type args.Hans Verkuil2009-12-161-1/+3
| | | | | | | | Many radio drivers did not check the tuner and type field correctly for g/s_frequency. These checks have now been added. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12109): radio-tea5764: fix incorrect rxsubchans valueHans Verkuil2009-06-231-1/+3
| | | | | | | | rxsubchans was only set when stereo was detected, otherwise it was left to 0 instead of setting it to mono. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* v4l: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers2009-03-241-1/+2
| | | | | | | Cc: mchehab@infradead.org Cc: linux-media@vger.kernel.org Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
* V4L/DVB (10155): Add TEA5764 radio driverFabio Belavenuto2009-01-021-0/+634
Add support for radio driver TEA5764 from NXP. This chip is connected in pxa I2C bus in EZX phones from Motorola, the chip is used in phone model A1200. This driver is for OpenEZX project (www.openezx.org) Tested with A1200 phone, openezx kernel and fm-tools [mchehab@redhat.com: Fixed CodingStyle and solved some merge conflicts] Signed-off-by: Fabio Belavenuto <belavenuto@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
OpenPOWER on IntegriCloud