summaryrefslogtreecommitdiff
path: root/v4l
diff options
context:
space:
mode:
Diffstat (limited to 'v4l')
-rw-r--r--v4l/Kconfig.staging44
-rw-r--r--v4l/Makefile12
-rw-r--r--v4l/compat.h34
-rwxr-xr-xv4l/scripts/make_kconfig.pl4
-rwxr-xr-xv4l/scripts/make_makefile.pl18
-rw-r--r--v4l/versions.txt41
6 files changed, 145 insertions, 8 deletions
diff --git a/v4l/Kconfig.staging b/v4l/Kconfig.staging
new file mode 100644
index 000000000..0ca923421
--- /dev/null
+++ b/v4l/Kconfig.staging
@@ -0,0 +1,44 @@
+menuconfig STAGING
+ bool "Staging drivers"
+ default n
+ ---help---
+ This option allows you to select a number of drivers that are
+ not of the "normal" Linux kernel quality level. These drivers
+ are placed here in order to get a wider audience for use of
+ them. Please note that these drivers are under heavy
+ development, may or may not work, and may contain userspace
+ interfaces that most likely will be changed in the near
+ future.
+
+ Using any of these drivers will taint your kernel which might
+ affect support options from both the community, and various
+ commercial support orginizations.
+
+ If you wish to work on these drivers, to help improve them, or
+ to report problems you have with them, please see the
+ driver_name.README file in the drivers/staging/ directory to
+ see what needs to be worked on, and who to contact.
+
+ If in doubt, say N here.
+
+if STAGING
+menu "Media devices in staging"
+
+config STAGING_BROKEN
+ bool "Enable drivers that are known to not compile"
+ default n
+ --- help ---
+ Say N here, except if you will be fixing the drivers
+ compilation.
+
+source "../linux/drivers/staging/go7007/Kconfig"
+source "../linux/drivers/staging/cx25821/Kconfig"
+source "../linux/drivers/staging/tm6000/Kconfig"
+
+# Currently, there are no broken staging drivers with Kernel 2.6.31
+# if STAGING_BROKEN
+# endif
+
+endmenu
+
+endif # STAGING
diff --git a/v4l/Makefile b/v4l/Makefile
index 23ae32cad..42618efa6 100644
--- a/v4l/Makefile
+++ b/v4l/Makefile
@@ -57,6 +57,9 @@ firmware::
v4l2-spec::
$(MAKE) -C ../v4l2-spec
+man::
+ $(MAKE) -C ../v4l2-spec man
+
dvb-spec::
$(MAKE) -C ../dvb-spec/dvbapi
@@ -65,6 +68,11 @@ spec:: v4l2-spec dvb-spec
apps::
$(MAKE) -C ../v4l2-apps
+docbooks::
+ $(MAKE) -C ../staging-specs prep
+ mkdir -p ../linux/Documentation/Docbook
+ cp -r ../staging-specs/*.xml ../staging-specs/dvb/ ../staging-specs/v4l ../linux/Documentation/Docbook
+
#################################################
# Object specific rules
@@ -225,6 +233,9 @@ remove rminstall:: media-rminstall
firmware_install::
make -C firmware install
+man_install::
+ $(MAKE) -C ../v4l2-spec man_install
+
#################################################
# Compiling preparation rules
@@ -272,6 +283,7 @@ links::
@echo creating symbolic links...
@find ../linux/drivers/media -name '*.[ch]' -type f -print0 | xargs -0n 255 ln -sf --target-directory=.
@find ../linux/sound -name '*.[ch]' -type f -print0 | xargs -0n 255 ln -sf --target-directory=.
+ @find ../linux/drivers/staging -name '*.[ch]' -type f -print0 | xargs -0n 255 ln -sf --target-directory=.
# This link is so code with #include "oss/*.h" will find its header files
oss:
diff --git a/v4l/compat.h b/v4l/compat.h
index 11dc57109..465b3ae8b 100644
--- a/v4l/compat.h
+++ b/v4l/compat.h
@@ -72,6 +72,15 @@
#define vmalloc_32_user(a) vmalloc_32(a)
#endif
+#ifndef DIV_ROUND_CLOSEST
+#define DIV_ROUND_CLOSEST(x, divisor)( \
+{ \
+ typeof(divisor) __divisor = divisor; \
+ (((x) + ((__divisor) / 2)) / (__divisor)); \
+} \
+)
+#endif
+
#ifdef NEED_BOOL_TYPE
/* bool type and enum-based definition of true and false was added in 2.6.19 */
typedef int bool;
@@ -480,4 +489,29 @@ static inline unsigned long v4l_compat_fls(unsigned long x)
}
#endif
+/*
+ * Compatibility code for hrtimer API
+ * This will make hrtimer usable for kernels 2.6.22 and later.
+ * For earlier kernels, not all required functions are exported
+ * so there's nothing we can do.
+ */
+
+#ifdef _LINUX_HRTIMER_H
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25) && \
+ LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
+/* Forward a hrtimer so it expires after the hrtimer's current now */
+static inline unsigned long hrtimer_forward_now(struct hrtimer *timer,
+ ktime_t interval)
+{
+ return hrtimer_forward(timer, timer->base->get_time(), interval);
+}
+#endif
+#endif /* _LINUX_HRTIMER_H */
+
+#ifndef PCI_VDEVICE
+#define PCI_VDEVICE(vendor, device) \
+ PCI_VENDOR_ID_##vendor, (device), \
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0
+#endif
+
#endif /* _COMPAT_H */
diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl
index cfe53a636..8e0504b61 100755
--- a/v4l/scripts/make_kconfig.pl
+++ b/v4l/scripts/make_kconfig.pl
@@ -585,6 +585,7 @@ EOF
open_kconfig('../linux', '../linux/drivers/media/Kconfig');
open_kconfig('.', './Kconfig.sound');
+open_kconfig('.', './Kconfig.staging');
close OUT;
# These options should default to off
@@ -592,6 +593,9 @@ disable_config('DVB_AV7110_FIRMWARE');
disable_config('DVB_CINERGYT2_TUNING');
disable_config('VIDEO_HELPER_CHIPS_AUTO');
disable_config('VIDEO_FIXED_MINOR_RANGES');
+disable_config('STAGING');
+disable_config('STAGING_BROKEN');
+$intopt { "DVB_MAX_ADAPTERS" } = 8;
# Check dependencies
my %newconfig = checkdeps();
diff --git a/v4l/scripts/make_makefile.pl b/v4l/scripts/make_makefile.pl
index 35ab7dddf..b49f960d1 100755
--- a/v4l/scripts/make_makefile.pl
+++ b/v4l/scripts/make_makefile.pl
@@ -1,5 +1,6 @@
#!/usr/bin/perl
use FileHandle;
+use File::Find;
my %instdir = ();
@@ -185,11 +186,23 @@ sub removeubuntu()
print OUT " fi\n";
}
+sub parse_dir()
+{
+ my $file = $File::Find::name;
+
+ return if (!($file =~ /Makefile$/));
+ open_makefile($file);
+}
+
+##############################################################################
+
getobsolete();
open OUT, '>Makefile.media' or die 'Unable to write Makefile.media';
open_makefile('../linux/drivers/media/Makefile');
+find({wanted => \&parse_dir, no_chdir => 1}, '../linux/drivers/staging');
+
# Creating Install rule
print OUT "media-install::\n";
@@ -234,9 +247,12 @@ while ( my ($dir, $files) = each(%instdir) ) {
print OUT " rm \$(DESTDIR)\$(KDIR26)/$dir/\$\$i.gz; fi; done; echo;\n\n";
}
+my $mediadeps = join(" \\\n", map("\t../linux/drivers/media/$_/Makefile", keys %instdir));
+$mediadeps =~ s,\.\./linux/drivers/media/\.\.,..,g;
+
# Print dependencies of Makefile.media
print OUT "Makefile.media: ../linux/drivers/media/Makefile \\\n";
print OUT "\tobsolete.txt \\\n";
-print OUT join(" \\\n", map("\t../linux/drivers/media/$_/Makefile", keys %instdir));
+print OUT $mediadeps;
print OUT "\n";
close OUT;
diff --git a/v4l/versions.txt b/v4l/versions.txt
index 9e23e500c..43ea4f00b 100644
--- a/v4l/versions.txt
+++ b/v4l/versions.txt
@@ -7,11 +7,34 @@ VIDEO_VPSS_SYSTEM
VIDEO_VPFE_CAPTURE
VIDEO_DM6446_CCDC
VIDEO_DM355_CCDC
+# Start version for those drivers - probably compile with older versions
+VIDEO_CX25821
+VIDEO_CX25821_ALSA
+
+# follow_pfn needed by VIDEOBUF_DMA_CONTIG and drivers that use it
+VIDEOBUF_DMA_CONTIG
+VIDEOBUF_VMALLOC
+DISPLAY_DAVINCI_DM646X_EVM
+VIDEO_VPFE_CAPTURE
+VIDEO_MX1
+VIDEO_MX3
+VIDEO_SH_MOBILE_CEU
[2.6.29]
# Needs defines that are only available from 2.6.29
VIDEO_PXA27x
+[2.6.28]
+# dev_get_drvdata switched to const struct device *
+SOC_CAMERA
+SOC_CAMERA_MT9V022
+SOC_CAMERA_MT9M001
+SOC_CAMERA_MT9M111
+SOC_CAMERA_MT9T031
+SOC_CAMERA_OV772X
+SOC_CAMERA_TW9910
+SOC_CAMERA_PLATFORM
+
[2.6.26]
# Requires struct i2c_device_id
VIDEO_TVP514X
@@ -19,16 +42,14 @@ VIDEO_TVP514X
RADIO_TEA5764
VIDEO_THS7303
VIDEO_ADV7343
-
-[2.6.25]
-# Requires gpiolib
-SOC_CAMERA
-SOC_CAMERA_MT9V022
-SOC_CAMERA_MT9M001
+RADIO_SI4713
+I2C_SI4713
[2.6.24]
# Some freezer routines
USB_GSPCA_SN9C20X_EVDEV
+# Requires linux/mmc/sdio_func.h
+SMS_SDIO_DRV
[2.6.23]
# Needs field intf_assoc in struct usb_host_config
@@ -45,6 +66,8 @@ DVB_DRX397XD
DVB_DM1105
# This driver needs print_hex_dump
DVB_FIREDTV
+# This driver needs hrtimer API
+VIDEO_CX88
[2.6.20]
#This driver requires HID_REQ_GET_REPORT
@@ -52,6 +75,7 @@ USB_SI470X
RADIO_SI470X
# use of struct delayed_work
USB_GSPCA_FINEPIX
+USB_GSPCA_JEILINJ
# uses linux/hid.h and struct delayed_work
USB_SI470X
# due to INIT_WORK changes
@@ -60,8 +84,9 @@ USB_GSPCA_SQ905C
VIDEO_HDPVR
[2.6.19]
-#This driver were developed at kernel 2.6.19, requiring vmalloc_user/remap_vmalloc_range
+# requires vmalloc_user/remap_vmalloc_range
VIDEO_CAFE_CCIC
+VIDEO_TM6000
#struct device vs struct class_device issues
USB_ET61X251
USB_SN9C102
@@ -74,6 +99,8 @@ VIDEO_USBVISION
# Uses supports_autosuspend
USB_MR800
USB_DSBR
+# Uses MODULE_FIRMWARE
+DVB_AV7110
# Uses remap_vmalloc_range()
[2.6.18]