Skip to content
  1. Nov 18, 2015
  2. Nov 17, 2015
    • Mauro Carvalho Chehab's avatar
      [media] include/media: move platform_data to linux/platform_data/media · eb4b0ec7
      Mauro Carvalho Chehab authored
      
      
      Let's not mix platform_data headers with the core headers. Instead, let's
      create a subdir at linux/platform_data and move the headers to that
      common place, adding it to MAINTAINERS.
      
      The headers were moved with:
      	mkdir include/linux/platform_data/media/; git mv include/media/gpio-ir-recv.h include/media/ir-rx51.h include/media/mmp-camera.h include/media/omap1_camera.h include/media/omap4iss.h include/media/s5p_hdmi.h include/media/si4713.h include/media/sii9234.h include/media/smiapp.h include/media/soc_camera.h include/media/soc_camera_platform.h include/media/timb_radio.h include/media/timb_video.h include/linux/platform_data/media/
      
      And the references fixed with this script:
          MAIN_DIR="linux/platform_data/"
          PREV_DIR="media/"
          DIRS="media/"
      
          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
      
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarLee Jones <lee.jones@linaro.org>
      Acked-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
      eb4b0ec7
    • Mauro Carvalho Chehab's avatar
      [media] include/media: move driver interface headers to a separate dir · d647f0b7
      Mauro Carvalho Chehab authored
      
      
      Let's not mix headers used by the core with those headers that
      are needed by some driver-specific interface header.
      
      The headers used on drivers were manually moved using:
          mkdir include/media/drv-intf/
          git mv include/media/cx2341x.h include/media/cx25840.h \
      	include/media/exynos-fimc.h include/media/msp3400.h \
      	include/media/s3c_camif.h include/media/saa7146.h \
      	include/media/saa7146_vv.h  include/media/sh_mobile_ceu.h \
      	include/media/sh_mobile_csi2.h include/media/sh_vou.h \
      	include/media/si476x.h include/media/soc_mediabus.h \
      	include/media/tea575x.h include/media/drv-intf/
      
      And the references for those headers were corrected using:
      
          MAIN_DIR="media/"
          PREV_DIR="media/"
          DIRS="drv-intf/"
      
          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
      
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      d647f0b7
    • Mauro Carvalho Chehab's avatar
      [media] include/media: split I2C headers from V4L2 core · b5dcee22
      Mauro Carvalho Chehab authored
      
      
      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: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      b5dcee22
    • Alec Leamas's avatar
      [media] bz#75751: Move internal header file lirc.h to uapi/ · b7be7557
      Alec Leamas authored
      The file include/media/lirc.h describes a public interface and
      should thus be a public header. See kernel bug
      https://bugzilla.kernel.org/show_bug.cgi?id=75751
      
       which has
      a manpage describing the interface + an acknowledgment that this
      info belongs to uapi.
      
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      b7be7557
    • Graham Whaley's avatar
      [media] DocBook/media/Makefile: Do not fail mkdir if dir already exists · f82a9ece
      Graham Whaley authored
      Commit 5240f4e6
      
       ("[media] DocBook/media/Makefile: Avoid make htmldocs
      to fail") introduced a mkdir which is always called through
      install_media_images from the Documentation/DocBook/Makefile htmldocs rule.
      If you run 'make htmldocs' more than once you get:
      
       mkdir: cannot create directory ‘./Documentation/DocBook//media_api’:
        File exists
      
      Add -p to the mkdir to continue no matter if the dir already exists.
      
      Signed-off-by: default avatarGraham Whaley <graham.whaley@linux.intel.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      f82a9ece
    • Mauro Carvalho Chehab's avatar
      [media] dvb_frontend.h: improve documentation for struct dvb_tuner_ops · bef0e549
      Mauro Carvalho Chehab authored
      
      
      Improve the comments at the header, removing kernel-doc
      tag from where it doesn't belong, grouping the legacy tuner
      functions, and improving the text.
      
      No functional changes.
      
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      bef0e549
    • Mauro Carvalho Chehab's avatar
      [media] dvb_frontend: get rid of set_state ops & related data · 45346e0e
      Mauro Carvalho Chehab authored
      
      
      The get_state()/set_state and the corresponding data types
      (struct tuner_state and enum tuner_param) are old DVB interfaces
      that came from the DVBv3 time.
      
      Nowadays, set_params() provide a better way to set the tuner
      and demod parameters. So, no need to keep those legacy stuff,
      as all drivers that were using it got converted.
      
      With this patch, all kABI elements at dvb_frontend.h are now
      documented.
      
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      45346e0e
    • Mauro Carvalho Chehab's avatar
      [media] stb6100: get rid of get_state()/set_state() · 65f0f686
      Mauro Carvalho Chehab authored
      
      
      It is tricky to get rid of those ops here, as the stv0299 driver
      wants to set frequency in separate from setting the bandwidth.
      
      So, we use a small trick: we temporarely fill the cache with
      0 for either frequency or bandwidth and add some logic at
      set_params to only change the property(ies) that aren't zero.
      
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      65f0f686
    • Mauro Carvalho Chehab's avatar
      [media] tda6655: get rid of get_state()/set_state() · b2d3afcf
      Mauro Carvalho Chehab authored
      
      
      Those ops aren't used by any driver, with is weird. I suspect
      that mantis_vb3030 driver were not working properly...
      
      Anyway, now that the driver uses the set_parms, the DVB
      frontend core should do the right thing.
      
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      b2d3afcf
    • Mauro Carvalho Chehab's avatar
      [media] tda8261: don't use set_state/get_state callbacks · e417668d
      Mauro Carvalho Chehab authored
      
      
      Those callbacks are meant to be used only on some very specific
      cases. There's absolutely no need to do that at tda8261, as
      the only parameter that it allows to be set/get is the frequency.
      
      So, use the standard get_params() and get_frequency() kABI
      ops.
      
      There's no need to touch at any bridge driver, as all interactions
      are done via the macros at tda8261_cfg.h.
      
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      e417668d
    • Mauro Carvalho Chehab's avatar
      [media] tda666x: add support for set_parms() and get_frequency() · 8fdc25bf
      Mauro Carvalho Chehab authored
      
      
      Those two callbacks are the ones that should be used by normal
      DVB frontend drivers.
      
      Add support for them.
      
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      8fdc25bf
    • Mauro Carvalho Chehab's avatar
      [media] tda665x: split set_frequency from set_state · 8e6c4be3
      Mauro Carvalho Chehab authored
      
      
      On tda665x, set_state only sets frequency. As the kABI for set_state
      is meant to be used only on special cases, split the function
      into two, in order to allow it to be latter used by a DVBv5
      cache params logic.
      
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      8e6c4be3
    • Mauro Carvalho Chehab's avatar
      [media] stb6100: get rid of tuner_state at struct stb6100_state · cffdbfe7
      Mauro Carvalho Chehab authored
      
      
      The stb6100 driver has a struct tuner_state on its state
      struct, that it is used only to store the bandwidth. Even so,
      this struct is not really used, as every time the bandwidth
      is get or set, it goes through the hardware.
      
      So, get rid of that.
      
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      cffdbfe7