summaryrefslogtreecommitdiffstats
path: root/drivers
AgeCommit message (Collapse)Author
2016-07-12[media] v4l2-subdev.h: remove the control subdev opsHans Verkuil
These are no longer used (finally!), so remove them. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-12[media] media/i2c: drop the last users of the ctrl core opsHans Verkuil
Nobody is using these ops anymore, so remove these callbacks from the subdev drivers that still have them. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-12[media] ivtv: use v4l2_g/s_ctrl instead of the g/s_ctrl opsHans Verkuil
These ops are deprecated and should not be used anymore. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-12[media] cx18: use v4l2_g/s_ctrl instead of the g/s_ctrl opsHans Verkuil
These ops are deprecated and should not be used anymore. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-12[media] v4l2-flash-led: remove unused opsHans Verkuil
These ops are deprecated and should not be used anymore (and in fact they are not used at all). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-12[media] cx88: use wm8775_s_ctrl instead of the s_ctrl opHans Verkuil
This op is deprecated and should not be used anymore. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-12[media] cx231xx: use v4l2_s_ctrl instead of the s_ctrl opHans Verkuil
This op is deprecated and should not be used anymore. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-12[media] via-camera: use v4l2_s_ctrl instead of the s_ctrl opHans Verkuil
This op is deprecated and should not be used anymore. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-12[media] mcam-core: use v4l2_s_ctrl instead of the s_ctrl opHans Verkuil
This op is deprecated and should not be used anymore. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-12[media] usbvision: use v4l2_ctrl_g_ctrl instead of the g_ctrl opHans Verkuil
This op is deprecated and should not be used anymore. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-12[media] pvrusb2: use v4l2_s_ctrl instead of the s_ctrl opHans Verkuil
This op is deprecated and should not be used anymore. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-12[media] davinci: drop unused control callbacksHans Verkuil
These callbacks are no longer used since the davinci drivers use the control framework. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Prabhakar Lad <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-12[media] saa7164: drop unused saa7164_ctrl structHans Verkuil
No longer used, can be removed. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-12[media] omap_vout: use control frameworkHans Verkuil
Replace the old control code with the control framework. This is one of the few remaining drivers that was not using this framework. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-09[media] Convert Wideview WT220 DVB USB driver to rc-coreJonathan McDowell
Converts the dtt200u DVB USB driver over to the rc-core infrastructure for its handling of IR remotes. This device can receive generic NEC / NEC Extended signals and the switch to the newer core enables the easy use of tools such as ir-keytable to modify the active key map. Signed-off-by: Jonathan McDowell <noodles@earth.li> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-09[media] Fix RC5 decoding with Fintek CIR chipsetJonathan McDowell
Fix RC5 decoding with Fintek CIR chipset Commit e87b540be2dd02552fb9244d50ae8b4e4619a34b tightened up the RC5 decoding by adding a check for trailing silence to ensure a valid RC5 command had been received. Unfortunately the trailer length checked was 10 units and the Fintek CIR device does not want to provide details of a space longer than 6350us. This meant that RC5 remotes working on a Fintek setup on 3.16 failed on 3.17 and later. Fix this by shortening the trailer check to 6 units (allowing for a previous space in the received remote command). Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=117221 Signed-off-by: Jonathan McDowell <noodles@earth.li> Cc: stable@vger.kernel.org Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-09[media] media: dvb_ringbuffer: Add memory barriersSoeren Moch
Implement memory barriers according to Documentation/circular-buffers.txt: - use smp_store_release() to update ringbuffer read/write pointers - use smp_load_acquire() to load write pointer on reader side - use ACCESS_ONCE() to load read pointer on writer side This fixes data stream corruptions observed e.g. on an ARM Cortex-A9 quad core system with different types (PCI, USB) of DVB tuners. Signed-off-by: Soeren Moch <smoch@web.de> Cc: stable@vger.kernel.org # 3.14+ Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-09[media] mtk-vcodec: fix compiler warningHans Verkuil
mtk-vcodec/venc_vpu_if.c:40:30: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] struct venc_vpu_inst *vpu = (struct venc_vpu_inst *)msg->venc_inst; ^ Note: venc_inst is u64. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-09[media] zc3xx: Remove deprecated create_singlethread_workqueueBhaktipriya Shridhar
The workqueue "work_thread" is involved in updating parameters for transfers. It has a single work item(&sd->work) and hence doesn't require ordering. Also, it is not being used on a memory reclaim path. Hence, the singlethreaded workqueue has been replaced with the use of system_wq. System workqueues have been able to handle high level of concurrency for a long time now and hence it's not required to have a singlethreaded workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue created with create_singlethread_workqueue(), system_wq allows multiple work items to overlap executions even on the same CPU; however, a per-cpu workqueue doesn't have any CPU locality or global ordering guarantee unless the target CPU is explicitly specified and thus the increase of local concurrency shouldn't make any difference. Work item has been flushed in sd_stop0() to ensure that there are no pending tasks while disconnecting the driver. Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-09[media] mtk-vcodec: fix two compiler warningsHans Verkuil
mtk-vcodec/mtk_vcodec_enc.c: In function 'mtk_venc_worker': mtk-vcodec/mtk_vcodec_enc.c:1030:43: warning: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'size_t {aka unsigned int}' [-Wformat=] mtk-vcodec/mtk_vcodec_enc.c:1030:43: warning: format '%lx' expects argument of type 'long unsigned int', but argument 10 has type 'size_t {aka unsigned int}' [-Wformat=] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] cxd2841er: don't expose a dvbv5 stats to userspace if not availableMauro Carvalho Chehab
The current code will expose a zero value if one of the stats is not available, but this is not what userspace expects. Instead, if something goes wrong on providing some stats, it should be changing the scale to FE_SCALE_NOT_AVAILABLE. So, change the logic to do the right thing. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] DVB-C read signal strength added for Sony demodAbylay Ospan
cxd2841er_read_agc_gain_c added to obtain signal strength. signal strength now relay on AGC value. Signed-off-by: Abylay Ospan <aospan@netup.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] cxd2841er: Fix signal strengh for DVB-T/T2 and show it in dBmMauro Carvalho Chehab
The signal strength value is reversed: the bigger the number, the weaker is the signal. Fix the logic and present it in dBm. Please notice that the dBm measure is actually an estimation, as the ratio is not fully linear. It also varies with the frequency. Yet, the estimation should be good enough for programs like Kaffeine to indicate when the signal is good or bad. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Acked-by: Abylay Ospan <aospan@netup.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] cxd2841er: Do some changes at the dvbv5 stats logicMauro Carvalho Chehab
It is a good idea to measure the signal strength while tuning, as this helps to identify if the antenna is ok. Also, such measure helps to identify the quality of the signal. Do some changes to enable it before signal lock. While here, optimize the code to only initialize the stats length once, and make sure that, just after set_frontend, any reading for the stats that depends on lock to return FE_SCALE_NOT_AVAILABLE. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Acked-by: Abylay Ospan <aospan@netup.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] cec: fix Kconfig dependency problemsHans Verkuil
- Use IS_REACHABLE(RC_CORE) instead of IS_ENABLED: if cec is built-in and RC_CORE is a module, then CEC can't reach the RC symbols. - Both cec and cec-edid should be bool and use the same build 'mode' as MEDIA_SUPPORT (just as is done for the media controller code). - Add a note to staging that this should be changed once the cec framework is moved out of staging. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] cec: add MEDIA_SUPPORT dependencyArnd Bergmann
The MEDIA_CEC_EDID option is guarded by MEDIA_SUPPORT, so selecting it from MEDIA_CEC produces a warning: warning: (MEDIA_CEC) selects MEDIA_CEC_EDID which has unmet direct dependencies (MEDIA_SUPPORT) The warning is harmless, but it's better to add an explicit dependency to shut it up, to reduce the noise during randconfig builds. Fixes: ca684386e6e2 ("[media] cec: add HDMI CEC framework (api)") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] s5p_cec: mark suspend/resume as __maybe_unusedArnd Bergmann
The suspend/resume functions in the s5p-cec driver are only referenced when CONFIG_PM is enabled, so we get a warning about unused functions otherwise: drivers/staging/media/s5p-cec/s5p_cec.c:260:12: error: 's5p_cec_resume' defined but not used [-Werror=unused-function] static int s5p_cec_resume(struct device *dev) ^~~~~~~~~~~~~~ drivers/staging/media/s5p-cec/s5p_cec.c:253:12: error: 's5p_cec_suspend' defined but not used [-Werror=unused-function] static int s5p_cec_suspend(struct device *dev) This marks them as __maybe_unused to avoid the warning without having to introduce an extra #ifdef. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] cec-adap: prevent write to out-of-bounds array indexHans Verkuil
CEC_MSG_REPORT_PHYSICAL_ADDR can theoretically be received from an unregistered device, but in that case the code should not attempt to write the received physical address to the phys_addrs array. That would be pointless since there can be multiple unregistered devices that report a physical address. We just ignore those. While at it, improve the dprintk since it would attempt to read from that array as well with the same out-of-bounds problem. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] cec-adap: on reply, restore the tx_status value from the transmitHans Verkuil
When a reply to an earlier transmit is received, the tx_status of that transmit needs to be restored. Otherwise the status that the transmit was successful would be lost. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] rc-cec: Add HDMI CEC keymap moduleKamil Debski
Add the keymap module for HDMI CEC remote control commands. Signed-off-by: Kamil Debski <kamil@wypas.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08Merge branch 'topic/cec' into patchworkMauro Carvalho Chehab
* topic/cec: [media] DocBook/media: add CEC documentation [media] s5p_cec: get rid of an unused var [media] move s5p-cec to staging [media] vivid: add CEC emulation [media] cec: s5p-cec: Add s5p-cec driver [media] cec: adv7511: add cec support [media] cec: adv7842: add cec support [media] cec: adv7604: add cec support [media] cec: add compat32 ioctl support [media] cec/TODO: add TODO file so we know why this is still in staging [media] cec: add HDMI CEC framework (api) [media] cec: add HDMI CEC framework (adapter) [media] cec: add HDMI CEC framework (core) [media] cec-funcs.h: static inlines to pack/unpack CEC messages [media] cec.h: add cec header [media] cec-edid: add module for EDID CEC helper functions [media] cec.txt: add CEC framework documentation [media] rc: Add HDMI CEC protocol handling
2016-07-08Merge tag 'v4.7-rc6' into patchworkMauro Carvalho Chehab
Linux 4.7-rc6 * tag 'v4.7-rc6': (1245 commits) Linux 4.7-rc6 ovl: warn instead of error if d_type is not supported MIPS: Fix possible corruption of cache mode by mprotect. locks: use file_inode() usb: dwc3: st: Use explicit reset_control_get_exclusive() API phy: phy-stih407-usb: Use explicit reset_control_get_exclusive() API phy: miphy28lp: Inform the reset framework that our reset line may be shared namespace: update event counter when umounting a deleted dentry 9p: use file_dentry() lockd: unregister notifier blocks if the service fails to come up completely ACPI,PCI,IRQ: correct operator precedence fuse: serialize dirops by default drm/i915: Fix missing unlock on error in i915_ppgtt_info() powerpc: Initialise pci_io_base as early as possible mfd: da9053: Fix compiler warning message for uninitialised variable mfd: max77620: Fix FPS switch statements phy: phy-stih407-usb: Inform the reset framework that our reset line may be shared usb: dwc3: st: Inform the reset framework that our reset line may be shared usb: host: ehci-st: Inform the reset framework that our reset line may be shared usb: host: ohci-st: Inform the reset framework that our reset line may be shared ...
2016-07-08[media] media: rc: nuvoton: remove two unused elements in struct nvt_devHeiner Kallweit
These two fields are not used and can be removed. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] media: rc: nuvoton: remove unneeded check in nvt_get_rx_ir_dataHeiner Kallweit
If the logical device is disabled then it can not generate interrupts. Therefore this check is not needed. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] media: rc: nuvoton: simplify interrupt handling codeHeiner Kallweit
Simplify interupt handling code. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] media: rc: nuvoton: remove study statesHeiner Kallweit
Study states have never been used and are not needed. Remove them. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] media: rc: nuvoton: remove unneeded code in nvt_process_rx_ir_dataHeiner Kallweit
The definition of rawir includes the initialization already. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] media: rc: nuvoton: simplify a few functionsHeiner Kallweit
Simplify a few functions. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] media: rc: nuvoton: remove wake statesHeiner Kallweit
Wake states have never been in use and now that we can set the wakeup sequence via sysfs there's in general no need for them. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] media: rc: nuvoton: clean up initialization of wakeup registersHeiner Kallweit
The registers defining wakeup sequence handling are set when the wakeup sequence is set via sysfs. There's no need to initialize them otherwise. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] media: rc: nuvoton: remove interrupt handling for wakeupHeiner Kallweit
There is a rudimentary ISR for handling interrupts generated by the wakeup part of the chip. Interrupts however have never been enabled in the wakeup part. Also, now that we can set the wakeup sequence via sysfs, there's in general no need to enable interrupts in the wakeup part. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] media: rc: nuvoton: fix rx fifo overrun handlingHeiner Kallweit
To detect a rx fifo overrun it's checked whether the number of elements in the chip fifo exceeds the fifo size. This check can never return true and is wrong. Instead we should generate an interrupt if the fifo overruns. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] rtl2832: do not allow driver unbindAntti Palosaari
Disable runtime unbind as driver does not support it. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] rtl2830: move statistics to read_status()Antti Palosaari
Move statistics polling to read_status() in order to avoid use of kernel work. Also replace home made sign extension used for statistics with kernel sign_extend32(). Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] rtl2830: do not allow driver unbindAntti Palosaari
Disable runtime unbind as driver does not support it. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] it913x: do not allow driver unbindAntti Palosaari
Disable runtime unbind as driver does not support it. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] af9033: do not allow driver unbindAntti Palosaari
Disable runtime unbind as driver does not support it. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] af9033: move statistics to read_status()Antti Palosaari
Move statistics polling to read_status() in order to avoid use of kernel work. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] m88ds3103: refactor firmware downloadAntti Palosaari
* remove some unneeded variable initialization * rename variables * use min() macro to calc max i2c xfer len * change bad firmware error code from EFAULT to EINVAL Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] m88ds3103: use Hz instead of kHz on calculationsAntti Palosaari
There was some calculations where was kHz used in order to keep calculation withing 32-bit. Convert all to Hz and use 64-bit division helpers where needed. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>