aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/IR (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-10-31Input: ir-keytable - fix uninitialized variable warningDmitry Torokhov1-0/+2
We were forgetting to set up proper return value in success path causing ir_getkeycode() to fail intermittently: drivers/media/IR/ir-keytable.c: In function 'ir_getkeycode': drivers/media/IR/ir-keytable.c:363: warning: 'retval' may be used uninitialized in this function Reported-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-30drivers/media/IR/ir-keytable.c: fix binary searchDavid Härdeman1-3/+3
The input-large-scancode patches changed the binary search in drivers/media/IR/ir-keytable.c to use unsigned integers, but signed integers are actually necessary for the algorithm to work. Signed-off-by: David Härdeman <david@hardeman.nu> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-28Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6Linus Torvalds40-1604/+5066
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (505 commits) [media] af9015: Fix max I2C message size when used with tda18271 [media] IR: initialize ir_raw_event in few more drivers [media] Guard a divide in v4l1 compat layer [media] imon: fix nomouse modprobe option [media] imon: remove redundant change_protocol call [media] imon: fix my egregious brown paper bag w/rdev/idev split [media] cafe_ccic: Configure ov7670 correctly [media] ov7670: allow configuration of image size, clock speed, and I/O method [media] af9015: support for DigitalNow TinyTwin v3 [1f4d:9016] [media] af9015: map DigitalNow TinyTwin v2 remote [media] DigitalNow TinyTwin remote controller [media] af9015: RC fixes and improvements videodev2.h.xml: Update to reflect the latest changes at videodev2.h [media] v4l: document new Bayer and monochrome pixel formats [media] DocBook/v4l: Add missing formats used on gspca cpia1 and sn9c2028 [media] firedtv: add parameter to fake ca_system_ids in CA_INFO [media] tm6000: fix a macro coding style issue tm6000: Remove some ugly debug code [media] Nova-S-Plus audio line input [media] [RFC,1/1] V4L2: Use new CAP bits in existing RDS capable drivers ...
2010-10-27Remove duplicate includes from many filesZimny Lech1-1/+0
Signed-off-by: Zimny Lech <napohybelskurwysynom2010@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-25Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/inputLinus Torvalds1-131/+262
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (75 commits) Input: wacom - specify Cinitq supported tools Input: ab8500-ponkey - fix IRQ freeing in error path Input: adp5588-keys - use more obvious i2c_device_id name string Input: ad7877 - switch to using threaded IRQ Input: ad7877 - use attribute group to control visibility of attributes Input: serio - add support for PS2Mult multiplexer protocol Input: wacom - properly enable runtime PM Input: ad7877 - filter events where pressure is beyond the maximum Input: ad7877 - implement EV_KEY:BTN_TOUCH reporting Input: ad7877 - implement specified chip select behavior Input: hp680_ts_input - use cancel_delayed_work_sync() Input: mousedev - correct lockdep annotation Input: ads7846 - switch to using threaded IRQ Input: serio - support multiple child devices per single parent Input: synaptics - simplify pass-through port handling Input: add ROHM BU21013 touch panel controller support Input: omap4-keypad - wake-up on events & long presses Input: omap4-keypad - fix interrupt line configuration Input: omap4-keypad - SYSCONFIG register configuration Input: omap4-keypad - use platform device helpers ...
2010-10-24Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivialLinus Torvalds1-1/+0
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits) Update broken web addresses in arch directory. Update broken web addresses in the kernel. Revert "drivers/usb: Remove unnecessary return's from void functions" for musb gadget Revert "Fix typo: configuation => configuration" partially ida: document IDA_BITMAP_LONGS calculation ext2: fix a typo on comment in ext2/inode.c drivers/scsi: Remove unnecessary casts of private_data drivers/s390: Remove unnecessary casts of private_data net/sunrpc/rpc_pipe.c: Remove unnecessary casts of private_data drivers/infiniband: Remove unnecessary casts of private_data drivers/gpu/drm: Remove unnecessary casts of private_data kernel/pm_qos_params.c: Remove unnecessary casts of private_data fs/ecryptfs: Remove unnecessary casts of private_data fs/seq_file.c: Remove unnecessary casts of private_data arm: uengine.c: remove C99 comments arm: scoop.c: remove C99 comments Fix typo configue => configure in comments Fix typo: configuation => configuration Fix typo interrest[ing|ed] => interest[ing|ed] Fix various typos of valid in comments ... Fix up trivial conflicts in: drivers/char/ipmi/ipmi_si_intf.c drivers/usb/gadget/rndis.c net/irda/irnet/irnet_ppp.c
2010-10-23[media] imon: fix nomouse modprobe optionJarod Wilson1-2/+2
Pointed out by Bonne Eggleston on the lirc list. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-23[media] imon: remove redundant change_protocol callJarod Wilson1-18/+7
There was a redundant call to imon_ir_change_protocol -- its already getting called from ir_input_register. Also do some minor housekeeping with var names and formatting. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-23[media] imon: fix my egregious brown paper bag w/rdev/idev splitJarod Wilson1-10/+9
Somehow, I managed to screw things up when reworking the rdev/idev split patch from David, and started trying to get ir_input_dev from idev instead of rdev, thus resulting in button presses hanging the system. This fixes it. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-23[media] DigitalNow TinyTwin remote controllerAntti Palosaari2-0/+99
Signed-off-by: Antti Palosaari <crope@iki.fi> Cc: Renura Enterprises Pty Ltd <renura@digitalnow.com.au> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-22[media] drivers/media/IR/imon.c: Use pr_err instead of errJoe Perches1-39/+34
Use the standard error logging mechanisms. Add #define pr_fmt(fmt) KBUILD_MODNAME ":%s" fmt, __func__ Remove __func__ from err calls, add '\n', rename to pr_err Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-22[media] Anysee remote controllerAntti Palosaari2-0/+94
Anysee remote controller keytable. Uses NEC address 0x08. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-22[media] mceusb: hook debug print spew directly into parser routineJarod Wilson1-20/+25
Provides more complete debug spew, parses individual commands and raw IR data one chunk at a time. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-22[media] mceusb: add symbolic names for commandsJarod Wilson1-76/+117
And replace usage of hex values w/symbolic names wherever possible Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-22[media] mceusb: Allow a per-model device nameMauro Carvalho Chehab1-2/+8
It is better to use a per-model device name, especially on multi-function devices like Polaris. So, allow overriding the default name at the mceusb model table. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Jarod Wilson <jarod@redhat.com>
2010-10-22[media] mceusb: allow a per-model RC mapMauro Carvalho Chehab1-5/+12
Especially when used with Polaris boards, devices may have different types of remotes shipped. So, we need a per-model rc-map. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Jarod Wilson <jarod@redhat.com>
2010-10-22[media] mceusb: add a per-model structureMauro Carvalho Chehab1-50/+76
The previous logic needed duplicate USB table structs, one to store the list of the devices, and 3 sets of other structs, to store the quirks list. With this change, devices that require expecial quirks just need to have a .driver_info = <quirk entry>. It also allows adding some extra quirks, like per-model RC tables. As a bonus, this patch reduced in 10% the data segment size: text data bss dec hex filename 15487 5008 4 20499 5013 old/mceusb.ko 15438 4496 4 19938 4de2 new/mceusb.ko Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Jarod Wilson <jarod@redhat.com>
2010-10-22[media] mceusb: improve ir data buffer parserMauro Carvalho Chehab1-48/+103
Switch to a state machine that properly handles all incoming urb data packets, and reads much cleaner and corrects some minor parsing errors that were hindering decode on cx231xx/Polaris integrated IR. Also tested with four different mceusb variants, and works perfectly with all of them (at least for the rc6a mce remotes). Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Jarod Wilson <jarod@redhat.com>
2010-10-22[media] lirc_dev: rework storage for cdev dataJarod Wilson1-17/+23
Fixes an oops when an lirc driver that doesn't provide its own fops is unplugged while the lirc cdev is open. Tested with lirc_igorplugusb, with a special thanks to Timo Boettcher for providing the test hardware. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-22[media] lirc_dev: call cdev_del *after* irctl cleanupJarod Wilson1-1/+1
Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-22[media] lirc_dev: more error-checking improvementsJarod Wilson1-5/+33
Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-22[media] lirc_dev: get irctl from irctls by inode againJarod Wilson1-2/+1
Can't explain it (yet), but I've seen the 'get irctl via private_data' setup fail for a number of people (ioctl called before its filled in?), so lets go back to a variant of the old way, but one that still works with unlocked_ioctl. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-22[media] lirc_dev: fix pointer to ownerJarod Wilson1-4/+4
If an lirc device driver doesn't specify its own fops, we set set ir->cdev.owner to THIS_MODULE. If it does specify its own fops, we set ir->cdev.owner to ir->d.owner. Subsequent module_{get,put} calls should be using ir->cdev.owner, not ir->d.owner. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-22[media] lirc_dev: sanitize function and struct names a bitJarod Wilson1-9/+9
Use names that clearly identify functions as lirc functions. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-22Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bklLinus Torvalds3-2/+8
* 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl: vfs: make no_llseek the default vfs: don't use BKL in default_llseek llseek: automatically add .llseek fop libfs: use generic_file_llseek for simple_attr mac80211: disallow seeks in minstrel debug code lirc: make chardev nonseekable viotape: use noop_llseek raw: use explicit llseek file operations ibmasmfs: use generic_file_llseek spufs: use llseek in all file operations arm/omap: use generic_file_llseek in iommu_debug lkdtm: use generic_file_llseek in debugfs net/wireless: use generic_file_llseek in debugfs drm: use noop_llseek
2010-10-21[media] ir-raw-event: Fix a stupid error at a printkMauro Carvalho Chehab1-1/+1
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] mceusb: add support for cx231xx-based IR (e. g. Polaris)Mauro Carvalho Chehab1-0/+16
For now, it adds support for Conexant EVK and for Pixelview. We should probably find a better way to specify all Conexant Polaris devices, to avoid needing to repeat this setup on both mceusb and cx231xx-cards. Reviewed-by: Jarod Wilson <jarod@redhat.com> Acked-by: Sri Devi <Srinivasa.Deevi@conexant.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] IR: ene_ir: don't upload all settings on each TX packetMaxim Levitsky2-229/+251
This is just unnessesary, and now more logical Also a lot of refactoring Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] IR: ene_ir: add support for carrier reportsMaxim Levitsky1-8/+29
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] IR: extend ir_raw_event and do refactoringMaxim Levitsky13-87/+147
Add new event types for timeout & carrier report Move timeout handling from ir_raw_event_store_with_filter to ir-lirc-codec, where it is really needed. Now lirc bridge ensures proper gap handling. Extend lirc bridge for carrier & timeout reports Note: all new ir_raw_event variables now should be initialized like that: DEFINE_IR_RAW_EVENT(ev); To clean an existing event, use init_ir_raw_event(&ev); Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Acked-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] Twinhan 1027 + IR Port supportSergey Ivanov2-0/+88
Patch add support of TwinHan 1027 DVB-S card. Refreshed version of https://patchwork.kernel.org/patch/79753/ patch. (adapted for the new IR system), still works. DVB-S support come from a patch originally authored by Manu Abraham (abraham.manu@gmail.com). IR Port support were added by Sergey. Cc: Manu Abraham <abraham.manu@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] drivers/media/IR/ene_ir.c: fix NULL dereferenceJiri Slaby1-2/+2
When 'dev' allocation fails in ene_probe we jump to error label where we dereference the 'dev'. Fix it by jumping few lines below. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Maxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] IR: ene_ir: few bugfixesMaxim Levitsky1-23/+20
This is a result of last round of debug with Sami R <maesesami@gmail.com>. Thank you Sami very much! The biggest bug I fixed is that, I was clobbering the CIRCFG register after it is setup That wasn't a good idea really And some small refactoring, etc. Tested-by: Sami R <maesesami@gmail.com> Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Acked-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] IR: extend and sort the MCE keymapMaxim Levitsky1-43/+45
Add new keys, found on: Toshiba Qosmio F50-10q. Toshiba Qosmio X300 Toshiba A500-141 Also sort the keytable by scancode number as that makes sense and alows easily to add new keycodes. Thanks to: Sami R <maesesami@gmail.com> Alexander Skiba <ghostlyrics@gmail.com> Jordi Pelegrin <pelegrin.jordi@gmail.com> For reports and testing. Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Acked-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] IR/nuvoton: address all checkpatch.pl issuesJarod Wilson2-54/+60
The driver was missing KERN_ facilities on a number of printks. The register dump functions have been updated to use KERN_INFO, so that the register dump gets logged in syslog (they only run on driver load, and only when debug is enabled). The buffer dump routine now uses KERN_DEBUG, as that spew will happen quite frequently (several times every IR signal), and shouldn't need to be logged. Also split up the small handful of lines that were just over 80 characaters, and fixed the ioctl.h include. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] IR: ene_ir: updatesMaxim Levitsky3-538/+719
* Add support for newer firmware version that uses different buffer format. Makes hardware work for many users. * Register name updates * Lot of refactoring * Lots of fixes as a result of full testing * Idle mode is done now by resetting the device, and this eliminates the ugly sample_period = 75 hack. Every feature of the driver is now well tested. Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] ir: properly handle an error at input_registerMauro Carvalho Chehab1-0/+2
Be sure to rollback all init if input register fails. Cc: Maxim Levitsky <maximlevitsky@gmail.com> Acked-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] IR: make sure we register the input device when it is safe to do soMaxim Levitsky3-10/+20
As soon as input device is registered, it might be accessed (and it is) This can trigger a hardware interrupt that can access not yet initialized ir->raw, (by sending a sample) This can be reproduced by holding down a remote button and reloading the module. And this always crashes the systems where hardware decides to send an interrupt right at the moment it is enabled. Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Acked-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] IR: plug races in IR raw threadMaxim Levitsky2-9/+27
Unfortunelly (my fault) the kernel thread that now handles IR processing has classical races in regard to wakeup and stop. This patch hopefully closes them all. Tested with module reload running in a loop, while receiver is blasted with IR data for 10 minutes. Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Acked-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] saa7134: port Asus P7131 Hybrid to use the new rc-coreMauro Carvalho Chehab1-40/+40
The rc map table were corrected thanks to Giorgio input and tests. Reported-by: Giorgio Vazzana <mywing81@gmail.com> Tested-by: Giorgio Vazzana <mywing81@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] ir: avoid race conditions at device disconnectMauro Carvalho Chehab1-0/+9
It is possible that, while ir_unregister_class() is handling, some application could try to access the sysfs nodes, causing an OOPS. Reviewed-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] IR/streamzap: fix usec to nsec conversionDan Carpenter1-2/+2
There is an integer overflow here because 0x03000000 * 1000 is too large for 31 bits. rawir.duration should be in terms of nsecs. IR_MAX_DURATION and 0x03000000 are already in terms of nsecs. STREAMZAP_TIMEOUT and STREAMZAP_RESOLUTION are 255 and 256 respectively and are in terms of usecs. The original code had a deadline of 1.005 seconds and the new code has a deadline of .065 seconds. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] IR/streamzap: shorten up some define names for readabilityJarod Wilson1-20/+20
Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] lirc_dev: fixup error messages w/missing newlinesJarod Wilson1-7/+6
Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] lirc: wire up .compat_ioctl to main ioctl handlerJarod Wilson2-0/+11
As pointed out (and tested) by Joris van Rantwijk, we do actually need to wire up .compat_ioctl for 32-bit lirc userspace to work with 64-bit lirc kernelspace. Do it. And add a check to make sure we get a valid irctl in the ioctl handler. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] IR/lirc: further ioctl portability fixupsJarod Wilson2-12/+12
>From Joris van Rantwijk <jorispubl@xs4all.nl>: I tested lirc_serial and found that it works fine. Except the LIRC ioctls do not work in my 64-bit-kernel/32-bit-user setup. I added compat_ioctl entries in the drivers to fix this. While doing so, I noticed inconsistencies in the argument type of the LIRC ioctls. All ioctls are declared in lirc.h as having argument type __u32, however there are a few places where the driver calls get_user/put_user with an unsigned long argument. The patch below changes lirc_dev and lirc_serial to use __u32 for all ioctl arguments, and adds compat_ioctl entries. It should probably also be done in the other low-level drivers, but I don't have hardware to test those. I've dropped the .compat_ioctl addition from Joris' original patch, as I swear the non-compat definition should now work for both 32-bit and 64-bit userspace. Technically, I think we still need/want a in getting a reply to you). Reported-by: Joris van Rantwijk <jorispubl@xs4all.nl> Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] IR/Kconfig: sort hardware entries alphabeticallyJarod Wilson1-20/+20
Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] nuvoton-cir: add proper rx fifo overrun handlingJarod Wilson1-8/+29
Per discussion with Andy Walls on irc, rx fifo overruns are not all that uncommon on a busy system, and the initial posting of the nuvoton-cir driver doesn't handle them well enough. With this addition, we'll drain the hw fifo, attempt to process any ir pulse trains completed with that flush, then we'll issue a hw rx fifo clear and reset the raw ir sample kfifo and start over collecting raw ir data. Also slightly refactors the cir interrupt enabling so that we always get consistent flags set and only have to modify them in one place, should they need to be altered. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] IR: add driver for Nuvoton w836x7hg integrated CIRJarod Wilson4-0/+1638
This is a new ir-core pnp driver for the Nuvoton w836x7hg integrated CIR function. The chip is found on at least the ASRock ION 330HT boxes and apparently, on a number of Intel DP55-series motherboards: http://www.asrock.com/nettop/overview.asp?Model=ION%20330HT http://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&DwnldID=17685&lang=eng This driver was made possible by a hardware donation from Nuvoton, along with sample code (in the form of an lirc driver) and datasheet, so huge thanks to them for supporting this effort. Note that this driver constitutes a massive rewrite, porting from the lirc interfaces to the ir-core interfaces, and restructuring the driver to look more like Maxim Levitsky's ene_ir driver (as well as generally making it look more like kernel code). There's some work left to be done on this driver, to fully support the range of functionality possible, but receive and IR power-on/wake are both functional (may require setting wake key under another OS atm). The hardware I've got (one of the ASRock boxes) only supports RX, so TX is completely untested as of yet. Certain RX parameters, like sample resolution and RX IRQ sample length trigger level could possibly stand to be made tweakable via modparams or sysfs nodes, but the current values work well enough for me w/an MCE RC6A remote. The original lirc driver carried support for the Windows MCE IR keyboard/mouse device, which I plan to add back generically, in a way that should be usable by any raw IR receiver (or at least by this driver and the mceusb driver). Suspend and resume have also been tested, the power button on my remote can be used to wake the machine, and CIR functionality resumes just fine. Module unload/reload has also been tested, though not extensively or repetitively. Also tested to work with the lirc bridge plugin for userspace decoding. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] fix A-Link DTU(m) remote controller PIP buttonAntti Palosaari1-1/+1
Button is PIP => KEY_NEW http://www.linuxtv.org/wiki/index.php/Remote_Controllers Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>