summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2014-03-12[media] m88ds3103: remove dead codeAntti Palosaari
Coverity CID 1166050: Dead default in switch (DEADCODE) Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] rc-main: fix missing unlock if no devno leftJames Hogan
While playing with make coccicheck I noticed this message: drivers/media/rc/rc-main.c:1245:3-9: preceding lock on line 1238 It was introduced by commit 587d1b06e07b ([media] rc-core: reuse device numbers) which returns -ENOMEM after a mutex_lock without first unlocking it when there are no more device numbers left. The added code doesn't depend on the device lock, so move it before the lock is taken. Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] ddbridge: remove unneeded an NULL checkDan Carpenter
Static checkers complain about the inconsistent NULL check here. There is an unchecked dereference of "input->fe" in the call to tuner_attach_tda18271() and there is a second unchecked dereference a couple lines later when we do: input->fe2->tuner_priv = input->fe->tuner_priv; But actually "intput->fe" can't be NULL because if demod_attach_drxk() fails to allocate it, then we would have return an error code. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] av7110_hw: fix a sanity check in av7110_fw_cmd()Dan Carpenter
ARRAY_SIZE(buf) (8 elements) was intended instead of sizeof(buf) (16 bytes). But this is just a sanity check and the callers always pass valid values so this doesn't cause a problem. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] rc: img-ir: add Sanyo decoder moduleJames Hogan
Add an img-ir module for decoding the Sanyo infrared protocol. Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] rc: img-ir: add Sharp decoder moduleJames Hogan
Add an img-ir module for decoding the Sharp infrared protocol. Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] rc: img-ir: add Sony decoder moduleJames Hogan
Add an img-ir module for decoding the Sony infrared protocol. Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] rc: img-ir: add JVC decoder moduleJames Hogan
Add an img-ir module for decoding the JVC infrared protocol. Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] rc: img-ir: add NEC decoder moduleJames Hogan
Add an img-ir module for decoding the NEC and extended NEC infrared protocols. Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] rc: img-ir: add to buildJames Hogan
Add ImgTec IR decoder driver to the build system. Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] rc: img-ir: add hardware decoder driverJames Hogan
Add remote control input driver for the ImgTec Infrared block hardware decoder, which is set up with timings for a specific protocol and supports mask/value filtering and wake events. The hardware decoder timing values, raw data to scan code conversion function and scan code filter to raw data filter conversion function will be provided in separate files for each protocol which this part of the driver can use. The new generic scan code filter interface is made use of to reduce interrupts and control wake events. Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] rc: img-ir: add raw driverJames Hogan
Add raw IR remote control input driver for the ImgTec Infrared decoder block's raw edge interrupts. Generic software protocol decoders are used to allow multiple protocols to be supported at a time, including those not supported by the hardware decoder. Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] rc: img-ir: add base driverJames Hogan
Add base driver for the ImgTec Infrared decoder block. The driver is split into separate components for raw (software) decode and hardware decoder which are in following commits. Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] rc-main: automatically refresh filter on protocol changeJames Hogan
When either of the normal or wakeup filter protocols are changed, refresh the corresponding scancode filter, i.e. try and set the same scancode filter with the new protocol. If that fails clear the filter instead. If no protocol was selected the filter is just cleared, and if no s_filter callback exists the filter is left unmodified. Similarly clear the filter mask when the filter is set if no protocol is currently selected. This simplifies driver code which no longer has to explicitly worry about modifying the filter on a protocol change. This also allows the change_wakeup_protocol callback to be omitted entirely if there is only a single available wakeup protocol at a time, since selecting no protocol will automatically clear the wakeup filter, disabling wakeup. Signed-off-by: James Hogan <james.hogan@imgtec.com> Reviewed-by: Antti Seppälä <a.seppala@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] rc: add wakeup_protocols sysfs fileJames Hogan
Add a wakeup_protocols sysfs file which controls the new rc_dev::enabled_protocols[RC_FILTER_WAKEUP], which is the mask of protocols that are used for the wakeup filter. A new RC driver callback change_wakeup_protocol() is called to change the wakeup protocol mask. Signed-off-by: James Hogan <james.hogan@imgtec.com> Reviewed-by: Antti Seppälä <a.seppala@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] rc: add allowed/enabled wakeup protocol masksJames Hogan
Only a single allowed and enabled protocol mask currently exists in struct rc_dev, however to support a separate wakeup filter protocol two of each are needed, ideally as an array. Therefore make both rc_dev::allowed_protos and rc_dev::enabled_protocols arrays, update all users to reference the first element (RC_FILTER_NORMAL), and add a couple more helper functions for drivers to use for setting the allowed and enabled wakeup protocols. We also rename allowed_protos to allowed_protocols while we're at it, which is more consistent with enabled_protocols. Signed-off-by: James Hogan <james.hogan@imgtec.com> Reviewed-by: Antti Seppälä <a.seppala@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] rc: abstract access to allowed/enabled protocolsJames Hogan
The allowed and enabled protocol masks need to be expanded to be per filter type in order to support wakeup filter protocol selection. To ease that process abstract access to the rc_dev::allowed_protos and rc_dev::enabled_protocols members with inline functions. Signed-off-by: James Hogan <james.hogan@imgtec.com> Reviewed-by: Antti Seppälä <a.seppala@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] rc-main: add generic scancode filteringJames Hogan
Add generic scancode filtering of RC input events, and fall back to permitting any RC_FILTER_NORMAL scancode filter to be set if no s_filter callback exists. This allows raw IR decoder events to be filtered, and potentially allows hardware decoders to set looser filters and rely on generic code to filter out the corner cases. Signed-off-by: James Hogan <james.hogan@imgtec.com> Reviewed-by: Antti Seppälä <a.seppala@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] nuvoton-cir: Activate PNP device when probingAntti Seppälä
On certain motherboards (mainly Intel NUC series) bios keeps the Nuvoton CIR device disabled at boot. This patch adds a call to kernel PNP layer to activate the device if it is not already activated. This will improve the chances of the PNP probe actually succeeding on Intel NUC platforms. Signed-off-by: Antti Seppälä <a.seppala@gmail.com> Cc: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] au0828: fix i2c clock speed for DViCO FusionHDTV7Joonyoung Shim
DViCO FusionHDTV7 device that use au0828 can fail to communicate with xc5000 using i2c interface because of high i2c clock speed - i2c clock stretching bug. It causes to fail xc5000 firmware loading normally at the current driver. Already this problem fixed as changing to low i2c clock speed at HVR-950q device, also DViCO FusionHDTV7 device can solve it as using low i2c clock speed - 20KHz. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] rc-main: store_filter: pass errors to userlandJames Hogan
Propagate errors returned by drivers from the s_filter callback back to userland when updating scancode filters. This allows userland to see when the filter couldn't be updated, usually because it's not a valid filter for the hardware. Previously the filter was being updated conditionally on success of s_filter, but the write always reported success back to userland. Reported-by: Antti Seppälä <a.seppala@gmail.com> Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] Siano: smsusb - Add a device id for PX-S1UDSatoshi Nagahama
Add a device id to support for PX-S1UD (PLEX ISDB-T usb dongle) which has sms2270. Signed-off-by: Satoshi Nagahama <sattnag@aim.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] omap_vout: Add DVI display type supportLaurent Pinchart
Since the introduction of the new OMAP DSS DVI connector driver in commit 348077b154357eec595068a3336ef6beb870e6f3 ("OMAPDSS: Add new DVI Connector driver"), DVI outputs report a new display type of OMAP_DISPLAY_TYPE_DVI instead of OMAP_DISPLAY_TYPE_DPI. Handle the new type in the IRQ handler. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] bttv: Add support for Kworld V-Stream Xpert TV PVR878Pojar George
New board addition. No other changes. [m.chehab@samsung.com: rebase patch and fix whitespace mangling] Signed-off-by: Pojar George <geoubuntu@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] media: i2c: Kconfig: create dependency to MEDIA_CONTROLLER for adv7*Marcus Folkesson
These chips makes use of the media_entity in the v4l2_subdev struct and is therefor dependent of the MEDIA_CONTROLLER config. Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] drx39xyj: fix 64 bit division on 32 bit archGianluca Gennari
Fix this linker warning: WARNING: "__divdi3" [media_build/v4l/drx39xyj.ko] undefined! [m.chehab@samsung.com: add include for asm/div64.h] Signed-off-by: Gianluca Gennari <gennarone@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] mem2mem_testdev: improve field handlingHans Verkuil
try_fmt should just set field to NONE and not return an error if a different field was passed. buf_prepare should check if the field passed in from userspace has a supported field value. At the moment only NONE is supported and ANY is mapped to NONE. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] mem2mem_testdev: fix field, sequence and time copyingHans Verkuil
- Set the sequence counters correctly. - Copy timestamps, timecode, relevant buffer flags and field from the received buffer to the outgoing buffer. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] mem2mem_testdev: return pending buffers in stop_streaming()Hans Verkuil
To keep the vb2 buffer administration in balance stop_streaming() must return any pending buffers to the vb2 framework. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] mem2mem_testdev: add USERPTR supportHans Verkuil
There is no reason why we shouldn't enable this here. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] mem2mem_testdev: set priv to 0Hans Verkuil
v4l2_compliance fix. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] mem2mem_testdev: pick default format with try_fmtHans Verkuil
This resolves an issue raised by v4l2-compliance: if the given format does not exist, then pick a default format. While there is an exception regarding this for TV capture drivers, this m2m driver should do the right thing. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] mem2mem_testdev: use 40ms default transfer timeHans Verkuil
The default of 1 second is a bit painful, switch to a 25 Hz framerate. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] s5p-mfc: remove meaningless memory bank assignmentSeung-Woo Kim
This patch removes meaningless assignment of memory bank to itself. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Acked-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] s5p-mfc: Replaced commas with semicolonsJoonyoung Shim
There is no any reason to use comma here. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] adv7180: Add support for power downLars-Peter Clausen
The adv7180 has a low power mode in which the analog and the digital processing section are shut down. Implement the s_power callback to let bridge drivers put the part into low power mode when not needed. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] adv7180: Add support for async device registrationLars-Peter Clausen
Add support for async device registration to the adv7180 driver. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] adv7180: Use threaded IRQ instead of IRQ + workqueueLars-Peter Clausen
The proper way to handle IRQs that need to be able to sleep in their IRQ handler is to use a threaded IRQ. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] adv7180: Remove duplicated probe error messageLars-Peter Clausen
The device driver core already prints out a very similar message when a driver fails to probe. No need to print one in the driver itself. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] adv7180: Remove unnecessary v4l2_device_unregister_subdev() from ↵Lars-Peter Clausen
probe error path The device can't possibly be registered at this point, so no need to to call v4l2_device_unregister_subdev(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] adv7180: Free control handler on remove()Lars-Peter Clausen
Make sure to free the control handler when the device is removed. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] adv7180: Fix remove orderLars-Peter Clausen
The mutex is used in the subdev callbacks, so unregister the subdev before the mutex is destroyed. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] adv*: replace the deprecated v4l2_subdev_edid by v4l2_edidHans Verkuil
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] v4l2: add VIDIOC_G/S_EDID support to the v4l2 coreHans Verkuil
Support this ioctl as part of the v4l2 core. Use the new ioctl name and struct v4l2_edid type in the existing core code. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] v4l2-compat-ioctl32: fix wrong VIDIOC_SUBDEV_G/S_EDID32 supportHans Verkuil
The wrong ioctl numbers were used due to a copy-and-paste error. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: stable@vger.kernel.org # for v3.7 and up Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] lm3646: add new dual LED Flash driverDaniel Jeong
This patch adds the driver for the LM3646, dual LED Flash driver. The LM3646 has two 1.5A sync. boost converter with dual white current source. It is controlled via an I2C compatible interface. Each flash brightness, torch brightness and enable/disable can be controlled. Under voltage, input voltage monitor and thermal threshhold Faults are added. Please refer the datasheet http://www.ti.com/lit/ds/snvs962/snvs962.pdf Signed-off-by: Daniel Jeong <gshark.jeong@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] lm3560: prevent memory leak in case of pdata absenceAndy Shevchenko
If we have no pdata defined and driver fails to register we leak memory. Converting to devm_kzalloc prevents this to happen. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] lm3560: keep style for the commentsAndy Shevchenko
Let's keep the style for all comments in the code, namely using small letters whenever it's possible. There is no functional change. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] lm3560: remove FSF address from the licenseAndy Shevchenko
There is no need to keep the FSF address inside each file. Moreover, it might change in future which will make this one obsolete. There is no functional change. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] v4l: of: Support empty port nodesLaurent Pinchart
Empty port nodes are allowed but currently unsupported as the v4l2_of_get_next_endpoint() function assumes that all port nodes have at least an endpoint. Fix this. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>