1. 18 Aug, 2013 34 commits
  2. 01 Aug, 2013 4 commits
  3. 31 Jul, 2013 2 commits
    • Srinivas Kandagatla's avatar
      [media] media: lirc: Allow lirc dev to talk to rc device · ca7a722d
      Srinivas Kandagatla authored
      The use case is simple, if any rc device has allowed protocols =
      RC_TYPE_LIRC and map_name = RC_MAP_LIRC set, the driver open will be never
      called. The reason for this is, all of the key maps except lirc have some
      KEYS in there map, so during rc_register_device process these keys are
      matched against the input drivers and open is performed, so for the case
      of RC_MAP_EMPTY, a vt/keyboard is matched and the driver open is
      performed.
      In case of lirc, there is no match and result is that there is no open
      performed, however the lirc-dev will go ahead and create a /dev/lirc0
      node. Now when lircd/mode2 opens this device, no data is available
      because the driver was never opened.
      Other case pointed by Sean Young, As rc device gets opened via the
      input interface. If the input device is never opened (e.g. embedded with
      no console) then the rc open is never called and lirc will not work
      either. So that's another case.
      lirc_dev seems to have no link with actual rc device w.r.t open/close.
      This patch adds rc_dev pointer to lirc_driver structure for cases like
      this, so that it can do the open/close of the real driver in accordance
      to lircd/mode2 open/close.
      Without this patch its impossible to open a rc device which has
      RC_TYPE_LIRC ad RC_MAP_LIRC set.
      Signed-off-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@st.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
      ca7a722d
    • Srinivas Kandagatla's avatar
      [media] media: rc: Add rc_open/close and use count to rc_dev · 8b2ff320
      Srinivas Kandagatla authored
      This patch adds user count to rc_dev structure, the reason to add this
      new member is to allow other code like lirc to open rc device directly.
      In the existing code, rc device is only opened by input subsystem which
      works ok if we have any input drivers to match. But in case like lirc
      where there will be no input driver, rc device will be never opened.
      Having this user count variable will be usefull to allow rc device to be
      opened from code other than rc-main.
      This patch also adds rc_open and rc_close functions for other drivers
      like lirc to open and close rc devices. This functions safely increment
      and decrement the user count. Other driver wanting to open rc device
      should call rc_open and rc_close, rather than directly modifying the
      rc_dev structure.
      Signed-off-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@st.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
      8b2ff320