1. 01 2月, 2016 1 次提交
    • J
      [media] media: i2c: Don't export ir-kbd-i2c module alias · 329d88da
      Javier Martinez Canillas 提交于
      This is a partial revert of commit ed8d1cf0 ("[media] Export I2C
      module alias information in missing drivers") that exported the module
      aliases for the I2C drivers that were missing to make autoload to work.
      
      But there is a bug report [0] that auto load of the ir-kbd-i2c driver
      cause the Hauppauge HD-PVR driver to not behave correctly.
      
      This is a hdpvr latent bug that was just exposed by ir-kbd-i2c module
      autoloading working and will also happen if the I2C driver is built-in
      or a user calls modprobe to load the module and register the driver.
      
      But there is a regression experimented by users so until the real bug
      is fixed, let's not export the module alias for the ir-kbd-i2c driver
      even when this just masks the actual issue.
      
      [0]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=810726
      
      Fixes: ed8d1cf0 ("[media] Export I2C module alias information in missing drivers")
      
      Cc: <stable@vger.kernel.org> # 4.3+
      Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com>
      329d88da
  2. 17 11月, 2015 1 次提交
    • M
      [media] include/media: split I2C headers from V4L2 core · b5dcee22
      Mauro Carvalho Chehab 提交于
      Currently, include/media is messy, as it contains both the V4L2 core
      headers and some driver-specific headers on the same place. That makes
      harder to identify what core headers should be documented and what
      headers belong to I2C drivers that are included only by bridge/main
      drivers that would require the functions provided by them.
      
      Let's move those i2c specific files to its own subdirectory.
      
      The files to move were produced via the following script:
      	mkdir include/media/i2c
      	(cd include/media; for i in *.h; do n=`echo $i|sed s/.h$/.c/`; if [ -e ../../drivers/media/i2c/$n ]; then echo $i; git mv $i i2c/; fi; done)
      	(cd include/media; for i in *.h; do n=`echo $i|sed s/.h$/.c/`; if [ -e ../../drivers/media/*/i2c/$n ]; then echo $i; git mv $i i2c/; fi; done)
      	for i in include/media/*.h; do n=`basename $i`;  (for j in $(git grep -l $n); do dirname $j; done)|sort|uniq|grep -ve '^.$' > list; num=$(wc -l list|cut -d' ' -f1); if [ $num == 1 ]; then if [ "`grep i2c list`" != "" ]; then git mv $i include/media/i2c; fi; fi; done
      
      And the references corrected via this script:
          MAIN_DIR="media/"
          PREV_DIR="media/"
          DIRS="i2c/"
      
          echo "Checking affected files" >&2
          for i in $DIRS; do
      	for j in $(find include/$MAIN_DIR/$i -type f -name '*.h'); do
      		 n=`basename $j`
      		git grep -l $n
      	done
          done|sort|uniq >files && (
      	echo "Handling files..." >&2;
      	echo "for i in \$(cat files|grep -v Documentation); do cat \$i | \\";
      	(
      		cd include/$MAIN_DIR;
      		for j in $DIRS; do
      			for i in $(ls $j); do
      				echo "perl -ne 's,(include [\\\"\\<])$PREV_DIR($i)([\\\"\\>]),\1$MAIN_DIR$j\2\3,; print \$_' |\\";
      			done;
      		done;
      		echo "cat > a && mv a \$i; done";
      	);
      	echo "Handling documentation..." >&2;
      	echo "for i in MAINTAINERS \$(cat files); do cat \$i | \\";
      	(
      		cd include/$MAIN_DIR;
      		for j in $DIRS; do
      			for i in $(ls $j); do
      				echo "  perl -ne 's,include/$PREV_DIR($i)\b,include/$MAIN_DIR$j\1,; print \$_' |\\";
      			done;
      		done;
      		echo "cat > a && mv a \$i; done"
      	);
          ) >script && . ./script
      
      Merged Sakari Ailus patch that moves smiapp.h to include/media/i2c.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      b5dcee22
  3. 12 8月, 2015 1 次提交
  4. 25 11月, 2014 1 次提交
  5. 26 7月, 2014 1 次提交
    • D
      [media] rc-core: remove protocol arrays · c5540fbb
      David Härdeman 提交于
      The basic API of rc-core used to be:
      
      	dev = rc_allocate_device();
      	dev->x = a;
      	dev->y = b;
      	dev->z = c;
      	rc_register_device();
      
      which is a pretty common pattern in the kernel, after the introduction of
      protocol arrays the API looks something like:
      
      	dev = rc_allocate_device();
      	dev->x = a;
      	rc_set_allowed_protocols(dev, RC_BIT_X);
      	dev->z = c;
      	rc_register_device();
      
      There's no real need for the protocols to be an array, so change it
      back to be consistent (and in preparation for the following patches).
      
      [m.chehab@samsung.com: added missing changes at some files]
      Signed-off-by: NDavid Härdeman <david@hardeman.nu>
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      c5540fbb
  6. 24 7月, 2014 2 次提交
  7. 12 3月, 2014 1 次提交
  8. 10 12月, 2013 1 次提交
  9. 30 11月, 2013 1 次提交
  10. 21 5月, 2013 1 次提交
  11. 08 4月, 2013 1 次提交
  12. 23 3月, 2013 1 次提交
  13. 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
  14. 16 8月, 2012 1 次提交
  15. 08 3月, 2012 1 次提交
  16. 11 1月, 2012 2 次提交
    • M
      [media] cx231xx: Fix unregister logic · 7528cd27
      Mauro Carvalho Chehab 提交于
      There are several weirdness at the unregister logic.
      
      First of all, IR has a poll thread. This thread needs to be
      removed, as it uses some resources associated to the main driver.
      So, the driver needs to explicitly unregister the I2C client for
      ir-kbd-i2c.
      
      If, for some reason, the driver needs to wait for a close()
      to happen, not all memories will be freed, because the free
      logic were in the wrong place.
      
      Also, v4l2_device_unregister() seems to be called too early,
      as devices are still using it.
      
      Finally, even with the device disconnected, there is one
      USB function call that will still try to talk with it.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      7528cd27
    • M
      [media] cx231xx-input: stop polling if the device got removed. · 90bf3aab
      Mauro Carvalho Chehab 提交于
      If the device got removed, stops polling it. Also, un-registers
      it at input/evdev, as it won't work anymore. We can't free the
      IR structure yet, as the ir_remove method will be called later.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      90bf3aab
  17. 23 3月, 2011 3 次提交
  18. 31 1月, 2011 1 次提交
  19. 19 1月, 2011 2 次提交
  20. 30 12月, 2010 1 次提交
  21. 29 12月, 2010 6 次提交
  22. 16 11月, 2010 1 次提交
  23. 21 10月, 2010 4 次提交
  24. 03 8月, 2010 1 次提交
  25. 19 5月, 2010 3 次提交