aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/radio/si4713 (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-11-17[media] include/media: move platform_data to linux/platform_data/mediaMauro Carvalho Chehab2-2/+2
Let's not mix platform_data headers with the core headers. Instead, let's create a subdir at linux/platform_data and move the headers to that common place, adding it to MAINTAINERS. The headers were moved with: mkdir include/linux/platform_data/media/; git mv include/media/gpio-ir-recv.h include/media/ir-rx51.h include/media/mmp-camera.h include/media/omap1_camera.h include/media/omap4iss.h include/media/s5p_hdmi.h include/media/si4713.h include/media/sii9234.h include/media/smiapp.h include/media/soc_camera.h include/media/soc_camera_platform.h include/media/timb_radio.h include/media/timb_video.h include/linux/platform_data/media/ And the references fixed with this script: MAIN_DIR="linux/platform_data/" PREV_DIR="media/" DIRS="media/" echo "Checking affected files" >&2 for i in $DIRS; do for j in $(find include/$MAIN_DIR/$i -type f -name '*.h'); do n=`basename $j` git grep -l $n done done|sort|uniq >files && ( echo "Handling files..." >&2; echo "for i in \$(cat files|grep -v Documentation); do cat \$i | \\"; ( cd include/$MAIN_DIR; for j in $DIRS; do for i in $(ls $j); do echo "perl -ne 's,(include [\\\"\\<])$PREV_DIR($i)([\\\"\\>]),\1$MAIN_DIR$j\2\3,; print \$_' |\\"; done; done; echo "cat > a && mv a \$i; done"; ); echo "Handling documentation..." >&2; echo "for i in MAINTAINERS \$(cat files); do cat \$i | \\"; ( cd include/$MAIN_DIR; for j in $DIRS; do for i in $(ls $j); do echo " perl -ne 's,include/$PREV_DIR($i)\b,include/$MAIN_DIR$j\1,; print \$_' |\\"; done; done; echo "cat > a && mv a \$i; done" ); ) >script && . ./script Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Lee Jones <lee.jones@linaro.org> Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
2015-05-01[media] si4713: fix error return codeJulia Lawall1-1/+3
Return a negative error code on failure. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ identifier ret; expression e1,e2; @@ ( if (\(ret < 0\|ret != 0\)) { ... return ret; } | ret = 0 ) ... when != ret = e1 when != &ret *if(...) { ... when != ret = e2 when forall return ret; } // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-08[media] media: radio-si4713: improve usage of gpiod APIUwe Kleine-König1-12/+6
Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions) which appeared in v3.17-rc1, the gpiod_get* functions take an additional parameter that allows to specify direction and initial value for output. Simplify accordingly. Moreover use the _optional variant which has tighter error checking, but is simpler to use which allows further simplification. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-14Merge tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-coreLinus Torvalds1-1/+0
Pull driver core update from Greg KH: "Here's the set of driver core patches for 3.19-rc1. They are dominated by the removal of the .owner field in platform drivers. They touch a lot of files, but they are "simple" changes, just removing a line in a structure. Other than that, a few minor driver core and debugfs changes. There are some ath9k patches coming in through this tree that have been acked by the wireless maintainers as they relied on the debugfs changes. Everything has been in linux-next for a while" * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits) Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries" fs: debugfs: add forward declaration for struct device type firmware class: Deletion of an unnecessary check before the function call "vunmap" firmware loader: fix hung task warning dump devcoredump: provide a one-way disable function device: Add dev_<level>_once variants ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries ath: use seq_file api for ath9k debugfs files debugfs: add helper function to create device related seq_file drivers/base: cacheinfo: remove noisy error boot message Revert "core: platform: add warning if driver has no owner" drivers: base: support cpu cache information interface to userspace via sysfs drivers: base: add cpu_device_create to support per-cpu devices topology: replace custom attribute macros with standard DEVICE_ATTR* cpumask: factor out show_cpumap into separate helper function driver core: Fix unbalanced device reference in drivers_probe driver core: fix race with userland in device_add() sysfs/kernfs: make read requests on pre-alloc files use the buffer. sysfs/kernfs: allow attributes to request write buffer be pre-allocated. fs: sysfs: return EGBIG on write if offset is larger than file size ...
2014-11-14[media] si4713: add device tree supportSebastian Reichel3-22/+40
Add device tree support by changing the device registration order. In the device tree the si4713 node is a normal I2C device, which will be probed as such. Thus the V4L device must be probed from the I2C device and not the other way around. Signed-off-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-14[media] si4713: use managed irq requestSebastian Reichel1-8/+2
Introduce the usage of managed irq request to simplify the code slightly. Signed-off-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-14[media] si4713: use managed memory allocationSebastian Reichel1-5/+2
Introduce the usage of managed memory allocation to simplify the code slightly. Signed-off-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-14[media] si4713: switch reset gpio to devm_gpiod APISebastian Reichel2-22/+19
This updates the driver to use the managed gpiod interface instead of the unmanged old GPIO API. This is a preperation for the introduction of device tree support. Signed-off-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> [hans.verkuil@cisco.com: fixed trivial compiler warning] Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-14[media] si4713: switch to devm regulator APISebastian Reichel2-30/+59
This switches back to the normal regulator API (but use managed variant) in preparation for device tree support. Signed-off-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> [hans.verkuil@cisco.com: fixed two trival compiler warnings] Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-20media: radio: si4713: drop owner assignment from platform_driversWolfram Sang1-1/+0
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-07-25[media] si4713: add the missing RDS functionalityHans Verkuil2-1/+84
Not all the RDS features of the si4713 were supported. Add the missing bits to fully support the hardware capabilities. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Eduardo Valentin <edubezval@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17[media] v4l2-ctrls: use ptrs for all but the s32 typeHans Verkuil1-2/+2
Rather than having two unions for all types just keep 'val' and 'cur.val' and use the p_cur and p_new unions to access all others. The only reason for keeping 'val' and 'cur.val' is that it is used all over, so converting this as well would be a huge job. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-04[media] media: remove the setting of the flag V4L2_FL_USE_FH_PRIORamakrishnan Muthukrishnan2-2/+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>
2014-03-28[media] si4713: fix Kconfig dependenciesHans Verkuil1-3/+3
The SI4713 select should be I2C_SI4713 and the USB driver needs to depend on I2C as well. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reported-by: Paul Bolle <pebolle@tiscali.nl> Reported-by: Richard Weinberger <richard@nod.at> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-02-24[media] radio-usb-si4713: make array of structs constHans Verkuil1-2/+2
The start_seq[] should be const. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-15[media] radio-usb-si4713: fix sparse non static symbol warningsWei Yongjun1-2/+2
Fixes the following sparse warnings: drivers/media/radio/si4713/radio-usb-si4713.c:226:31: warning: symbol 'start_seq' was not declared. Should it be static? drivers/media/radio/si4713/radio-usb-si4713.c:291:29: warning: symbol 'command_table' was not declared. Should it be static? Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-13[media] radio-usb-si4713: make si4713_register_i2c_adapter staticMauro Carvalho Chehab1-1/+1
This function isn't used nowhere outside the same .c file. Fixes this warning: drivers/media/radio/si4713/radio-usb-si4713.c:418:5: warning: no previous prototype for 'si4713_register_i2c_adapter' [-Wmissing-prototypes] int si4713_register_i2c_adapter(struct si4713_usb_device *radio) ^ Cc: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18[media] si4713: coding style time-related cleanupsHans Verkuil1-4/+7
Fix the non-whitespace checkpatch errors/warnings. Replace msleep with usleep_range and the jiffies comparison with time_is_after_jiffies(). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Eduardo Valentin <edubezval@gmail.com> Acked-by: Dinesh Ram <dinesh.ram@cern.ch> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18[media] si4713: coding style whitespace cleanupsHans Verkuil1-47/+49
Fix most whitespace-related checkpatch errors/warnings. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Eduardo Valentin <edubezval@gmail.com> Acked-by: Dinesh Ram <dinesh.ram@cern.ch> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18[media] si4713: print product numberEduardo Valentin1-1/+1
Print the PN value, useful to check what chip the dev board has. Signed-off-by: Eduardo Valentin <edubezval@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18[media] si4713: si4713_set_rds_radio_text overwrites terminating \0Hans Verkuil1-2/+3
si4713_set_rds_radio_text will overwrite the terminating zero at the end of the rds radio text string in order to send out a carriage return as per the RDS spec. Use a separate char buffer for the CR instead of corrupting the control string. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Eduardo Valentin <edubezval@gmail.com> Acked-by: Eduardo Valentin <edubezval@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18[media] si4713: move supply list to si4713_platform_dataDinesh Ram2-27/+28
The supply list is needed by the platform driver, but not by the usb driver. So this information belongs to the platform data and should not be hardcoded in the subdevice driver. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Eduardo Valentin <edubezval@gmail.com> Acked-by: Eduardo Valentin <edubezval@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18[media] si4713: Added the USB driver for Si4713Dinesh Ram3-0/+556
This is the USB driver for the Silicon Labs development board. It contains the Si4713 FM transmitter chip. Signed-off-by: Dinesh Ram <dinesh.ram@cern.ch> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Eduardo Valentin <edubezval@gmail.com> Acked-by: Eduardo Valentin <edubezval@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18[media] si4713: Bug fix for si4713_tx_tune_power() method in the i2c driverDinesh Ram1-8/+8
In the si4713_tx_tune_power() method, the args array element 'power' can take values between SI4713_MIN_POWER and SI4713_MAX_POWER. power = 0 is also valid. All the values (0 > power < SI4713_MIN_POWER) are illegal and hence are all mapped to SI4713_MIN_POWER. Signed-off-by: Dinesh Ram <dinesh.ram@cern.ch> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Eduardo Valentin <edubezval@gmail.com> Acked-by: Eduardo Valentin <edubezval@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18[media] si4713: Reorganized includes in si4713.c/hDinesh Ram2-1/+1
Moved the header <linux/regulator/consumer.h> from si4713.c to si4713.h Signed-off-by: Dinesh Ram <dinesh.ram@cern.ch> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Eduardo Valentin <edubezval@gmail.com> Acked-by: Eduardo Valentin <edubezval@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18[media] si4713: Modified i2c driver to handle cases where interrupts are not usedDinesh Ram1-44/+64
Checks have been introduced at several places in the code to test if an interrupt is set or not. For devices which do not use the interrupt, to get a valid response, within a specified timeout, the device is polled instead. Signed-off-by: Dinesh Ram <dinesh.ram@cern.ch> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Eduardo Valentin <edubezval@gmail.com> Acked-by: Eduardo Valentin <edubezval@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18[media] si4713: Reorganized drivers/media/radio directoryDinesh Ram5-0/+2047
Added a new si4713 directory which will contain all si4713 related files. Also updated Makefile and Kconfig Signed-off-by: Dinesh Ram <dinesh.ram@cern.ch> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Eduardo Valentin <edubezval@gmail.com> Acked-by: Eduardo Valentin <edubezval@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>