summaryrefslogtreecommitdiffstats
path: root/drivers/media/radio/radio-sf16fmi.c
Commit message (Collapse)AuthorAgeFilesLines
* MAINTAINERS & files: Canonize the e-mails I use at filesMauro Carvalho Chehab2018-05-041-1/+1
| | | | | | | | | | | | | | | | | | | | | From now on, I'll start using my @kernel.org as my development e-mail. As such, let's remove the entries that point to the old mchehab@s-opensource.com at MAINTAINERS file. For the files written with a copyright with mchehab@s-opensource, let's keep Samsung on their names, using mchehab+samsung@kernel.org, in order to keep pointing to my employer, with sponsors the work. For the files written before I join Samsung (on July, 4 2013), let's just use mchehab@kernel.org. For bug reports, we can simply point to just kernel.org, as this will reach my mchehab+samsung inbox anyway. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Brian Warner <brian.warner@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* media: replace all <spaces><tab> occurrencesMauro Carvalho Chehab2018-01-041-2/+2
| | | | | | | There are a lot of places where sequences of space/tabs are found. Get rid of all spaces before tabs. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] radio-sf16fmi: declare pnp_attached as staticMauro Carvalho Chehab2014-09-261-1/+1
| | | | | | drivers/media/radio/radio-sf16fmi.c:59:6: warning: symbol 'pnp_attached' was not declared. Should it be static? Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] radio: use true/false for boolean varsMauro Carvalho Chehab2014-09-031-2/+2
| | | | | | | Instead of using 0 or 1 for boolean, use the true/false defines. 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/+0Star
| | | | | | | | | | | 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] radio-sf16fmi: Set frequency during initOndrej Zary2013-06-211-8/+17
| | | | | | | | | Set freqency during initialization to fix v4l2-compliance error. This also fixes VIDIOC_G_FREQUENCY always returning zero (broken by me during LM7000 conversion). Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-sf16fmi: Add module name to bus_infoOndrej Zary2013-06-211-1/+1
| | | | | | | | Fix v4l2-compliance in VIDIOC_QUERYCAP by changing "ISA" to "ISA:radio-sf16fmi". Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-sf16fmi: add control event and prio supportHans Verkuil2013-06-171-0/+8
| | | | | | Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-sf16fmi: convert to the control frameworkHans Verkuil2013-06-171-31/+25Star
| | | | | | Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-sf16fmi: clamp frequencyHans Verkuil2013-06-171-6/+5Star
| | | | | | Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-sf16fmi: add device_caps support to querycapHans Verkuil2013-06-171-1/+2
| | | | | | Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-sf16fmi: remove audio/input ioctlsHans Verkuil2013-06-171-30/+0Star
| | | | | | | | The audio and input ioctls do not apply to radio devices. Remove them. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Ondrej Zary <linux@rainbow-software.org> 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-041-1/+1
| | | | | | | | | | | | | | | 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>
* [media] radio-sf16fmi: get rid of warning: no previous prototypeMauro Carvalho Chehab2012-10-271-1/+1
| | | | | | drivers/media/radio/radio-sf16fmi.c:67:6: warning: no previous prototype for 'fmi_set_pins' [-Wmissing-prototypes] 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] radio-sf16fmi: Use LM7000 driverOndrej Zary2012-06-251-36/+25Star
| | | | | | | | Convert radio-sf16fmi to use generic LM7000 driver. Tested with SF16-FMI, SF16-FMP and SF16-FMD. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* Revert "[media] radio-sf16fmi: Use LM7000 driver"Mauro Carvalho Chehab2012-06-251-2/+0Star
| | | | | | | | | | | | | | | | | | | | This reverts commit 1e70a6cf7e965bafd89bf363772eb1a4b8e35934. As requested by Hans Verkuil: > You accidentally merged the wrong first version of the lm7000 patch series. > > These are the correct second version patches: > > http://patchwork.linuxtv.org/patch/11689/ > http://patchwork.linuxtv.org/patch/11690/ > http://patchwork.linuxtv.org/patch/11691/ > > The second version is much simpler and doesn't require the creation of a whole > new driver. Requested-by: Hans Verkuil <hverkuil@xs4all.nl> Cc: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-sf16fmi: Use LM7000 driverOndrej Zary2012-06-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert radio-sf16fmi to use generic LM7000 driver. Tested with SF16-FMI, SF16-FMP and SF16-FMD. radio."); @@ -48,37 +50,40 @@ struct fmi bool mute; unsigned long curfreq; /* freq in kHz */ struct mutex lock; + struct lm7000 lm; }; static struct fmi fmi_card; static struct pnp_dev *dev; bool pnp_attached; -/* freq is in 1/16 kHz to internal number, hw precision is 50 kHz */ -/* It is only useful to give freq in interval of 800 (=0.05Mhz), - * other bits will be truncated, e.g 92.7400016 -> 92.7, but - * 92.7400017 -> 92.75 - */ -#define RSF16_ENCODE(x) ((x) / 800 + 214) #define RSF16_MINFREQ (87 * 16000) #define RSF16_MAXFREQ (108 * 16000) -static void outbits(int bits, unsigned int data, int io) +#define FMI_BIT_TUN_CE (1 << 0) +#define FMI_BIT_TUN_CLK (1 << 1) +#define FMI_BIT_TUN_DATA (1 << 2) +#define FMI_BIT_VOL_SW (1 << 3) +#define FMI_BIT_TUN_STRQ (1 << 4) + +void fmi_set_pins(struct lm7000 *lm, u8 pins) { - while (bits--) { - if (data & 1) { - outb(5, io); - udelay(6); - outb(7, io); - udelay(6); - } else { - outb(1, io); - udelay(6); - outb(3, io); - udelay(6); - } - data >>= 1; - } Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-sf16fmi: add support for SF16-FMDOndrej Zary2012-05-201-5/+9
| | | | | | | | Add support for SF16-FMD card to radio-sf16fmi driver. Only new PnP ID is added and texts changed. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio: Use the subsystem version control for VIDIOC_QUERYCAPMauro Carvalho Chehab2011-07-271-4/+1Star
| | | | | | | | 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] BKL: trivial BKL removal from V4L2 radio driversHans Verkuil2010-12-011-3/+4
| | | | | | | | | | | | | | | | | | | | The patch converts a bunch of V4L2 radio drivers to unlocked_ioctl. These are all simple conversions: most already had a lock and so the ioctl fop could simply be replaced by unlocked_ioctl. radio-miropcm20.c was converted to use the new V4L2 core lock. While doing this work I noticed that many of these drivers initialized some more fields or muted audio or something like that *after* creating the device node. This should be done before the device node is created to prevent problems. Especially hal tends to grab a device node as soon as it is created. In one or two cases the mutex_init was even done after the device creation! Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13609): radio-sf16fmi: add autoprobingOndrej Zary2009-12-161-15/+45
| | | | | | | | | Add automatic probing of ports 0x284 and 0x384 to radio-sf16fmi if no card is found using PnP. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13608): radio-sf16fmi: fix mute, add SF16-FMP to textsOndrej Zary2009-12-161-9/+9
| | | | | | | | | | | Fix completely broken mute handling radio-sf16fmi. The sound was muted immediately after tuning in KRadio. Also fix typos and add SF16-FMP to the texts. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Acked-by: Petr Vandrovec <petr@vandrovec.name> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.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-0/+4
| | | | | | | | 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 (11677): radio-fm16: fix g_tuner.Hans Verkuil2009-06-161-1/+1
| | | | | | | g_tuner handled capability, audmode and rxsubchans incorrectly. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (11676): radio-fm16: cleanupsHans Verkuil2009-06-161-12/+4Star
| | | | | | | Remove bogus flags field Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (11675): ivtv/radio: fix V4L2_TUNER_MODE/V4L2_TUNER_SUB confusionHans Verkuil2009-05-091-1/+1
| | | | | | | | V4L2_TUNER_MODE_ was used in a few places where V4L2_TUNER_SUB_ should have been used. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (11391): pci-isa radios: remove open and release functionsAlexey Klimov2009-04-071-12/+0Star
| | | | | | | | | Patch removes empty open and release functions in pci and isa radio drivers, setting them to NULL. V4L module doesn't call for them due to previous patch. Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10959): radio: remove uaccess includeHans Verkuil2009-03-301-1/+0Star
| | | | | | | This include isn't needed and so can be removed. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10888): radio-sf16fmi: convert to v4l2_device.Hans Verkuil2009-03-301-149/+135Star
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10135): v4l2: introduce v4l2_file_operations.Hans Verkuil2009-01-021-7/+3Star
| | | | | | | | | | | | | | | | Introduce a struct v4l2_file_operations for v4l2 drivers. Remove the unnecessary inode argument. Move compat32 handling (and llseek) into the v4l2-dev core: this is now handled in the v4l2 core and no longer in the drivers themselves. Note that this changeset reverts an earlier patch that changed the return type of__video_ioctl2 from int to long. This change will be reinstated later in a much improved version. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9491): rationalise addresses to one common oneAlan Cox2008-12-291-1/+1
| | | | | Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (8788): v4l: replace video_get_drvdata(video_devdata(filp)) with ↵Hans Verkuil2008-10-121-10/+5Star
| | | | | | | | | video_drvdata(filp) Use the new video_drvdata(filp) function where it is safe to do so. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (8786): v4l2: remove the priv field, use dev_get_drvdata insteadHans Verkuil2008-10-121-6/+6
| | | | | | | | | | Remove the priv field and let video_get/set_drvdata use dev_get_drvdata and dev_set_drvdata instead. Convert all drivers that still used priv directly. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (8783): v4l: add all missing video_device release callbacksHans Verkuil2008-10-121-0/+1
| | | | | | | | | All drivers that call video_device_register where checked to see if they set the release callback of struct video_device. Where that callback was missing it was added. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (8776): radio: replace video_exclusive_open/releaseHans Verkuil2008-10-121-2/+14
| | | | | | | Move the video_exclusive_open/release functionality into the driver itself. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (8778): radio: fix incorrect video_register_device result checkHans Verkuil2008-09-031-1/+1
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (8523): v4l2-dev: remove unused type and type2 field from video_deviceHans Verkuil2008-07-271-1/+0Star
| | | | | | | | | The type and type2 fields were unused and so could be removed. Instead add a vfl_type field that contains the type of the video device. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (8483): Remove obsolete owner field from video_device struct.Hans Verkuil2008-07-261-1/+0Star
| | | | | | | | According to an old comment this should have been removed in 2.6.15. Better late than never... Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (8482): videodev: move all ioctl callbacks to a new v4l2_ioctl_ops ↵Hans Verkuil2008-07-261-6/+9
| | | | | | | | | | | | | struct All ioctl callbacks are now stored in a new v4l2_ioctl_ops struct. Drivers fill in a const struct v4l2_ioctl_ops and video_device just contains a const pointer to it. This ensures a clean separation between the const ops struct and the non-const video_device struct. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (8430): videodev: move some functions from v4l2-dev.h to ↵Hans Verkuil2008-07-241-0/+1
| | | | | | | | | | | | | v4l2-common.h or v4l2-ioctl.h The functions in a header should not belong to another module. The prio functions belong to v4l2-common.c, so move them to v4l2-common.h. The ioctl functions belong to v4l2-ioctl.c, so create a new v4l2-ioctl.h header and move those functions to it. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (7402): add macro validation for v4l_compat_ioctl32Douglas Schilling Landgraf2008-04-241-0/+2
| | | | | | | Added macro CONFIG_COMPAT for v4l_compat_ioctl32. Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (7093): radio-sf16fmi: fix request_region()Mauro Carvalho Chehab2008-02-181-0/+1
| | | | | | | | isapnp_fmi_probe attaches device. However, if request_region() fails, the device isn't disattached. Reviewed-by: Douglas Schilling Landgraf <dougsland@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (7078): radio: fix sf16fmi section mismatchRandy Dunlap2008-01-251-1/+1
| | | | | | | | | | | | | | isapnp_fmi_probe() is only called by fmi_init(), which is __init, so isapnp_fmi_probe() can also be __init. media/radio/radio-sf16fmi.c: WARNING: vmlinux.o(.text+0x994e19): Section mismatch: reference to .init.data: (between 'isapnp_fmi_probe' and 'vidioc_s_tuner') WARNING: vmlinux.o(.text+0x994e22): Section mismatch: reference to .init.data: (between 'isapnp_fmi_probe' and 'vidioc_s_tuner') WARNING: vmlinux.o(.text+0x994e3a): Section mismatch: reference to .init.data:id_table (between 'isapnp_fmi_probe' and 'vidioc_s_tuner') Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (5705): Removed unnecessary .hardware from video_device struct.Douglas Schilling Landgraf2007-07-181-1/+0Star
| | | | | | | From: Douglas Schilling Landgraf <dougsland@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (5550): Radio-sf16fmi.c Replace fmi_do_ioctl to use video_ioctl2Douglas Landgraf2007-04-271-116/+146
| | | | | | | Convert radio-sf16fmi to use video_ioctl2 Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* [PATCH] mark struct file_operations const 4Arjan van de Ven2007-02-121-1/+1
| | | | | | | | | | | | Many struct file_operations in the kernel can be "const". Marking them const moves these to the .rodata section, which avoids false sharing with potential dirty data. In addition it'll catch accidental writes at compile time to these shared resources. [akpm@sdl.org: dvb fix] Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* V4L/DVB (4394): Git-dvb: radio-sf16fmi build fixAndrew Morton2006-09-261-0/+1
| | | | | | | | drivers/media/radio/radio-sf16fmi.c: In function 'fmi_do_ioctl': drivers/media/radio/radio-sf16fmi.c:147: warning: implicit declaration of function 'KERNEL_VERSION' Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>