1. 22 12月, 2012 2 次提交
    • M
      [media] rc: Set rdev before irq setup · d62b6818
      Matthijs Kooijman 提交于
      This fixes a problem in fintek-cir and nuvoton-cir where the
      irq handler would trigger during module load before the rdev member was
      set, causing a NULL pointer crash.
      It seems this crash is very reproducible (just bombard the receiver with
      IR signals during module load), probably because when request_irq is
      called, any pending intterupt is handled immediately, before
      request_irq returns and rdev can be set.
      This same crash was supposed to be fixed by commit
      9ef449c6 ("[media] rc: Postpone ISR
      registration"), but the crash was still observed on the nuvoton-cir
      driver.
      This commit was tested on nuvoton-cir only.
      
      Cc: Jarod Wilson <jarod@redhat.com>
      Signed-off-by: NMatthijs Kooijman <matthijs@stdin.nl>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      d62b6818
    • M
      [media] rc: Make probe cleanup goto labels more verbose · 70ef6991
      Matthijs Kooijman 提交于
      Before, labels were simply numbered. Now, the labels are named after the
      cleanup action they'll perform (first), based on how the winbond-cir
      driver does it. This makes the code a bit more clear and makes changes
      in the ordering of labels easier to review.
      This change is applied only to the rc drivers that do significant
      cleanup in their probe functions: ati-remote, ene-ir, fintek-cir,
      gpio-ir-recv, ite-cir, nuvoton-cir.
      This commit should not change any code, it just renames goto labels.
      
      [mchehab@redhat.com: removed changes at gpio-ir-recv.c, due to
       merge conflicts]
      Signed-off-by: NMatthijs Kooijman <matthijs@stdin.nl>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      70ef6991
  2. 28 10月, 2012 2 次提交
  3. 27 10月, 2012 1 次提交
    • D
      [media] rc-core: add separate defines for protocol bitmaps and numbers · c003ab1b
      David Härdeman 提交于
      The RC_TYPE_* defines are currently used both where a single protocol is
      expected and where a bitmap of protocols is expected.
      
      Functions like rc_keydown() and functions which add/remove entries to the
      keytable want a single protocol. Future userspace APIs would also
      benefit from numeric protocols (rather than bitmap ones). Keytables are
      smaller if they can use a small(ish) integer rather than a bitmap.
      
      Other functions or struct members (e.g. allowed_protos,
      enabled_protocols, etc) accept multiple protocols and need a bitmap.
      
      Using different types reduces the risk of programmer error. Using a
      protocol enum whereever possible also makes for a more future-proof
      user-space API as we don't need to worry about a sufficient number of
      bits being available (e.g. in structs used for ioctl() calls).
      
      The use of both a number and a corresponding bit is dalso one in e.g.
      the input subsystem as well (see all the references to set/clear bit when
      changing keytables for example).
      
      This patch separate the different usages in preparation for
      upcoming patches.
      
      Where a single protocol is expected, enum rc_type is used; where one or more
      protocol(s) are expected, something like u64 is used.
      
      The patch has been rewritten so that the format of the sysfs "protocols"
      file is no longer altered (at the loss of some detail). The file itself
      should probably be deprecated in the future though.
      Signed-off-by: NDavid Härdeman <david@hardeman.nu>
      Cc: Andy Walls <awalls@md.metrocast.net>
      Cc: Maxim Levitsky <maximlevitsky@gmail.com>
      Cc: Antti Palosaari <crope@iki.fi>
      Cc: Mike Isely <isely@pobox.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      c003ab1b
  4. 06 10月, 2012 1 次提交
  5. 07 7月, 2012 1 次提交
  6. 20 5月, 2012 1 次提交
  7. 27 4月, 2012 1 次提交
  8. 11 9月, 2011 1 次提交
    • J
      [media] nuvoton-cir: simplify raw IR sample handling · de4ed0c1
      Jarod Wilson 提交于
      The nuvoton-cir driver was storing up consecutive pulse-pulse and
      space-space samples internally, for no good reason, since
      ir_raw_event_store_with_filter() already merges back to back like
      samples types for us. This should also fix a regression introduced late
      in 3.0 that related to a timeout change, which actually becomes correct
      when coupled with this change. Tested with RC6 and RC5 on my own
      nuvoton-cir hardware atop vanilla 3.0.0, after verifying quirky
      behavior in 3.0 due to the timeout change.
      Reported-by: NStephan Raue <sraue@openelec.tv>
      CC: Stephan Raue <sraue@openelec.tv>
      CC: stable@vger.kernel.org
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      de4ed0c1
  9. 28 7月, 2011 1 次提交
  10. 12 7月, 2011 1 次提交
  11. 11 6月, 2011 1 次提交
  12. 21 5月, 2011 1 次提交
  13. 20 5月, 2011 2 次提交
  14. 03 3月, 2011 1 次提交
  15. 31 1月, 2011 1 次提交
  16. 29 12月, 2010 5 次提交
  17. 21 12月, 2010 1 次提交
  18. 21 10月, 2010 4 次提交
    • M
      [media] IR: extend ir_raw_event and do refactoring · 4651918a
      Maxim Levitsky 提交于
      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: NMaxim Levitsky <maximlevitsky@gmail.com>
      Acked-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      4651918a
    • J
      [media] IR/nuvoton: address all checkpatch.pl issues · 4e6e29ad
      Jarod Wilson 提交于
      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: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      4e6e29ad
    • J
      [media] nuvoton-cir: add proper rx fifo overrun handling · fbdc781c
      Jarod Wilson 提交于
      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: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      fbdc781c
    • J
      [media] IR: add driver for Nuvoton w836x7hg integrated CIR · 6d2f5c27
      Jarod Wilson 提交于
      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: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      6d2f5c27