aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2011-05-18 11:06:31 -0400
committerJiri Kosina <jkosina@suse.cz>2011-05-18 11:06:49 -0400
commit6b7b8e488bbdedeccabdd001a78ffcbe43bb8a3a (patch)
treef2f77cc31b4548745778fca6a51b09e1d8a49804 /Documentation
parentb50f315cbb865079a16a12fd9ae6083f98fd592c (diff)
parentc1d10d18c542278b7fbc413c289d3cb6219da6b3 (diff)
Merge branch 'master' into upstream.
This is sync with Linus' tree to receive KEY_IMAGES definition that went in through input tree.
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/00-INDEX4
-rw-r--r--Documentation/ABI/stable/sysfs-class-backlight20
-rw-r--r--Documentation/ABI/testing/configfs-spear-pcie-gadget31
-rw-r--r--Documentation/ABI/testing/pstore12
-rw-r--r--Documentation/ABI/testing/sysfs-bus-css2
-rw-r--r--Documentation/ABI/testing/sysfs-bus-media6
-rw-r--r--Documentation/ABI/testing/sysfs-bus-pci-devices-cciss12
-rw-r--r--Documentation/ABI/testing/sysfs-bus-rbd2
-rw-r--r--Documentation/ABI/testing/sysfs-class-led2
-rw-r--r--Documentation/ABI/testing/sysfs-devices-mmc21
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid-roccat-kone2
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus8
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus8
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra8
-rw-r--r--Documentation/ABI/testing/sysfs-driver-samsung-laptop19
-rw-r--r--Documentation/ABI/testing/sysfs-fs-ext413
-rw-r--r--Documentation/ABI/testing/sysfs-fs-pstore7
-rw-r--r--Documentation/ABI/testing/sysfs-platform-asus-laptop2
-rw-r--r--Documentation/ABI/testing/sysfs-platform-asus-wmi31
-rw-r--r--Documentation/ABI/testing/sysfs-platform-eeepc-wmi10
-rw-r--r--Documentation/Changes8
-rw-r--r--Documentation/CodingStyle7
-rw-r--r--Documentation/DocBook/Makefile4
-rw-r--r--Documentation/DocBook/dvb/dvbproperty.xml2
-rw-r--r--Documentation/DocBook/dvb/frontend.xml2
-rw-r--r--Documentation/DocBook/kernel-locking.tmpl2
-rw-r--r--Documentation/DocBook/libata.tmpl10
-rw-r--r--Documentation/DocBook/media-entities.tmpl60
-rw-r--r--Documentation/DocBook/media.tmpl3
-rw-r--r--Documentation/DocBook/mtdnand.tmpl12
-rw-r--r--Documentation/DocBook/rapidio.tmpl1
-rw-r--r--Documentation/DocBook/regulator.tmpl4
-rw-r--r--Documentation/DocBook/uio-howto.tmpl2
-rw-r--r--Documentation/DocBook/usb.tmpl2
-rw-r--r--Documentation/DocBook/v4l/bayer.pdfbin0 -> 12116 bytes
-rw-r--r--Documentation/DocBook/v4l/bayer.pngbin0 -> 9725 bytes
-rw-r--r--Documentation/DocBook/v4l/common.xml4
-rw-r--r--Documentation/DocBook/v4l/compat.xml26
-rw-r--r--Documentation/DocBook/v4l/controls.xml2
-rw-r--r--Documentation/DocBook/v4l/dev-capture.xml13
-rw-r--r--Documentation/DocBook/v4l/dev-output.xml13
-rw-r--r--Documentation/DocBook/v4l/dev-subdev.xml313
-rw-r--r--Documentation/DocBook/v4l/func-mmap.xml10
-rw-r--r--Documentation/DocBook/v4l/func-munmap.xml3
-rw-r--r--Documentation/DocBook/v4l/io.xml283
-rw-r--r--Documentation/DocBook/v4l/libv4l.xml2
-rw-r--r--Documentation/DocBook/v4l/lirc_device_interface.xml2
-rw-r--r--Documentation/DocBook/v4l/media-controller.xml89
-rw-r--r--Documentation/DocBook/v4l/media-func-close.xml59
-rw-r--r--Documentation/DocBook/v4l/media-func-ioctl.xml116
-rw-r--r--Documentation/DocBook/v4l/media-func-open.xml94
-rw-r--r--Documentation/DocBook/v4l/media-ioc-device-info.xml133
-rw-r--r--Documentation/DocBook/v4l/media-ioc-enum-entities.xml308
-rw-r--r--Documentation/DocBook/v4l/media-ioc-enum-links.xml207
-rw-r--r--Documentation/DocBook/v4l/media-ioc-setup-link.xml93
-rw-r--r--Documentation/DocBook/v4l/nv12mt.gifbin0 -> 2108 bytes
-rw-r--r--Documentation/DocBook/v4l/nv12mt_example.gifbin0 -> 6858 bytes
-rw-r--r--Documentation/DocBook/v4l/pipeline.pdfbin0 -> 20276 bytes
-rw-r--r--Documentation/DocBook/v4l/pipeline.pngbin0 -> 12130 bytes
-rw-r--r--Documentation/DocBook/v4l/pixfmt-nv12m.xml154
-rw-r--r--Documentation/DocBook/v4l/pixfmt-nv12mt.xml74
-rw-r--r--Documentation/DocBook/v4l/pixfmt-srggb12.xml90
-rw-r--r--Documentation/DocBook/v4l/pixfmt-y12.xml79
-rw-r--r--Documentation/DocBook/v4l/pixfmt-yuv420m.xml162
-rw-r--r--Documentation/DocBook/v4l/pixfmt.xml120
-rw-r--r--Documentation/DocBook/v4l/planar-apis.xml62
-rw-r--r--Documentation/DocBook/v4l/remote_controllers.xml2
-rw-r--r--Documentation/DocBook/v4l/subdev-formats.xml2526
-rw-r--r--Documentation/DocBook/v4l/v4l2.xml30
-rw-r--r--Documentation/DocBook/v4l/videodev2.h.xml141
-rw-r--r--Documentation/DocBook/v4l/vidioc-enum-fmt.xml2
-rw-r--r--Documentation/DocBook/v4l/vidioc-g-fmt.xml15
-rw-r--r--Documentation/DocBook/v4l/vidioc-qbuf.xml24
-rw-r--r--Documentation/DocBook/v4l/vidioc-querybuf.xml14
-rw-r--r--Documentation/DocBook/v4l/vidioc-querycap.xml18
-rw-r--r--Documentation/DocBook/v4l/vidioc-streamon.xml9
-rw-r--r--Documentation/DocBook/v4l/vidioc-subdev-enum-frame-interval.xml152
-rw-r--r--Documentation/DocBook/v4l/vidioc-subdev-enum-frame-size.xml154
-rw-r--r--Documentation/DocBook/v4l/vidioc-subdev-enum-mbus-code.xml119
-rw-r--r--Documentation/DocBook/v4l/vidioc-subdev-g-crop.xml155
-rw-r--r--Documentation/DocBook/v4l/vidioc-subdev-g-fmt.xml180
-rw-r--r--Documentation/DocBook/v4l/vidioc-subdev-g-frame-interval.xml141
-rw-r--r--Documentation/DocBook/writing-an-alsa-driver.tmpl2
-rw-r--r--Documentation/PCI/MSI-HOWTO.txt4
-rw-r--r--Documentation/SecurityBugs2
-rw-r--r--Documentation/SubmittingDrivers2
-rw-r--r--Documentation/SubmittingPatches2
-rw-r--r--Documentation/acpi/apei/output_format.txt25
-rw-r--r--Documentation/arm/IXP4xx4
-rw-r--r--Documentation/arm/Samsung-S3C24XX/Suspend.txt2
-rw-r--r--Documentation/arm/Samsung/GPIO.txt2
-rw-r--r--Documentation/block/biodoc.txt9
-rw-r--r--Documentation/cgroups/blkio-controller.txt30
-rw-r--r--Documentation/cgroups/cgroups.txt12
-rw-r--r--Documentation/cgroups/memory.txt15
-rw-r--r--Documentation/cpu-hotplug.txt2
-rw-r--r--Documentation/dell_rbu.txt2
-rw-r--r--Documentation/development-process/1.Intro18
-rw-r--r--Documentation/development-process/2.Process177
-rw-r--r--Documentation/development-process/3.Early-stage31
-rw-r--r--Documentation/development-process/4.Coding21
-rw-r--r--Documentation/development-process/5.Posting28
-rw-r--r--Documentation/development-process/6.Followthrough16
-rw-r--r--Documentation/development-process/7.AdvancedTopics4
-rw-r--r--Documentation/device-mapper/dm-flakey.txt17
-rw-r--r--Documentation/device-mapper/dm-service-time.txt2
-rw-r--r--Documentation/devicetree/bindings/fb/sm501fb.txt34
-rw-r--r--Documentation/devicetree/bindings/hwmon/ads1015.txt73
-rw-r--r--Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt2
-rw-r--r--Documentation/devicetree/bindings/net/can/sja1000.txt2
-rw-r--r--Documentation/devicetree/bindings/open-pic.txt98
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/mpic.txt2
-rw-r--r--Documentation/devicetree/booting-without-of.txt6
-rw-r--r--Documentation/dvb/README.dvb-usb2
-rw-r--r--Documentation/dvb/ci.txt2
-rw-r--r--Documentation/dvb/faq.txt2
-rw-r--r--Documentation/dvb/get_dvb_firmware8
-rw-r--r--Documentation/dvb/lmedm04.txt16
-rw-r--r--Documentation/dvb/udev.txt2
-rw-r--r--Documentation/dynamic-debug-howto.txt4
-rw-r--r--Documentation/edac.txt4
-rw-r--r--Documentation/eisa.txt2
-rw-r--r--Documentation/fb/sm501.txt10
-rw-r--r--Documentation/fb/viafb.txt4
-rw-r--r--Documentation/feature-removal-schedule.txt83
-rw-r--r--Documentation/filesystems/Locking2
-rw-r--r--Documentation/filesystems/adfs.txt18
-rw-r--r--Documentation/filesystems/autofs4-mount-control.txt2
-rw-r--r--Documentation/filesystems/caching/netfs-api.txt18
-rw-r--r--Documentation/filesystems/configfs/configfs.txt2
-rw-r--r--Documentation/filesystems/exofs.txt10
-rw-r--r--Documentation/filesystems/ext4.txt211
-rw-r--r--Documentation/filesystems/gfs2-uevents.txt2
-rw-r--r--Documentation/filesystems/gfs2.txt2
-rw-r--r--Documentation/filesystems/ntfs.txt2
-rw-r--r--Documentation/filesystems/ocfs2.txt2
-rw-r--r--Documentation/filesystems/path-lookup.txt4
-rw-r--r--Documentation/filesystems/pohmelfs/network_protocol.txt2
-rw-r--r--Documentation/filesystems/porting16
-rw-r--r--Documentation/filesystems/proc.txt6
-rw-r--r--Documentation/filesystems/squashfs.txt30
-rw-r--r--Documentation/filesystems/sysfs.txt2
-rw-r--r--Documentation/filesystems/vfs.txt4
-rw-r--r--Documentation/filesystems/xfs-delayed-logging-design.txt15
-rw-r--r--Documentation/flexible-arrays.txt4
-rw-r--r--Documentation/hwmon/abituguru2
-rw-r--r--Documentation/hwmon/abituguru-datasheet8
-rw-r--r--Documentation/hwmon/abituguru32
-rw-r--r--Documentation/hwmon/adm102136
-rw-r--r--Documentation/hwmon/ads101572
-rw-r--r--Documentation/hwmon/f71882fg19
-rw-r--r--Documentation/hwmon/lm755
-rw-r--r--Documentation/hwmon/lm9029
-rw-r--r--Documentation/hwmon/max1606462
-rw-r--r--Documentation/hwmon/max3444079
-rw-r--r--Documentation/hwmon/max868869
-rw-r--r--Documentation/hwmon/pmbus40
-rw-r--r--Documentation/hwmon/sch562722
-rw-r--r--Documentation/hwmon/smm6658
-rw-r--r--Documentation/hwmon/submitting-patches109
-rw-r--r--Documentation/hwmon/sysfs-interface2
-rw-r--r--Documentation/hwmon/twl4030-madc-hwmon45
-rw-r--r--Documentation/hwmon/w83781d2
-rw-r--r--Documentation/hwmon/w83791d2
-rw-r--r--Documentation/hwmon/w83795127
-rw-r--r--Documentation/i2c/busses/i2c-diolan-u2c26
-rw-r--r--Documentation/i2c/busses/i2c-i8013
-rw-r--r--Documentation/i2c/busses/i2c-parport-light2
-rw-r--r--Documentation/i2c/busses/i2c-sis96x2
-rw-r--r--Documentation/i2c/busses/i2c-taos-evm2
-rw-r--r--Documentation/i2c/instantiating-devices2
-rw-r--r--Documentation/i2c/upgrading-clients18
-rw-r--r--Documentation/i2o/README2
-rw-r--r--Documentation/ia64/aliasing-test.c2
-rw-r--r--Documentation/input/event-codes.txt262
-rw-r--r--Documentation/input/joystick-parport.txt2
-rw-r--r--Documentation/input/rotary-encoder.txt2
-rw-r--r--Documentation/input/walkera0701.txt2
-rw-r--r--Documentation/ioctl/ioctl-number.txt1
-rw-r--r--Documentation/iostats.txt17
-rw-r--r--Documentation/irqflags-tracing.txt2
-rw-r--r--Documentation/isdn/INTERFACE.CAPI2
-rw-r--r--Documentation/kbuild/kbuild.txt13
-rw-r--r--Documentation/kernel-parameters.txt30
-rw-r--r--Documentation/kmemleak.txt4
-rw-r--r--Documentation/kvm/mmu.txt2
-rw-r--r--Documentation/kvm/ppc-pv.txt2
-rw-r--r--Documentation/kvm/timekeeping.txt2
-rw-r--r--Documentation/laptops/asus-laptop.txt4
-rw-r--r--Documentation/laptops/hpfall.c (renamed from Documentation/hwmon/hpfall.c)0
-rw-r--r--Documentation/laptops/sony-laptop.txt37
-rw-r--r--Documentation/leds/00-INDEX8
-rw-r--r--Documentation/leds/leds-class.txt (renamed from Documentation/leds-class.txt)1
-rw-r--r--Documentation/leds/leds-lp3944.txt (renamed from Documentation/leds-lp3944.txt)0
-rw-r--r--Documentation/md.txt10
-rw-r--r--Documentation/media-framework.txt353
-rw-r--r--Documentation/mips/AU1xxx_IDE.README4
-rw-r--r--Documentation/misc-devices/ics932s4012
-rw-r--r--Documentation/misc-devices/lis3lv02d (renamed from Documentation/hwmon/lis3lv02d)4
-rw-r--r--Documentation/misc-devices/spear-pcie-gadget.txt130
-rw-r--r--Documentation/networking/3c359.txt2
-rw-r--r--Documentation/networking/README.ipw22002
-rw-r--r--Documentation/networking/batman-adv.txt2
-rw-r--r--Documentation/networking/bonding.txt2
-rw-r--r--Documentation/networking/caif/Linux-CAIF.txt2
-rw-r--r--Documentation/networking/caif/spi_porting.txt2
-rw-r--r--Documentation/networking/can.txt2
-rw-r--r--Documentation/networking/ieee802154.txt2
-rw-r--r--Documentation/networking/olympic.txt2
-rw-r--r--Documentation/networking/packet_mmap.txt2
-rw-r--r--Documentation/networking/s2io.txt4
-rw-r--r--Documentation/networking/tc-actions-env-rules.txt4
-rw-r--r--Documentation/power/devices.txt2
-rw-r--r--Documentation/power/notifiers.txt4
-rw-r--r--Documentation/power/opp.txt2
-rw-r--r--Documentation/power/swsusp.txt4
-rw-r--r--Documentation/power/userland-swsusp.txt6
-rw-r--r--Documentation/powerpc/hvcs.txt2
-rw-r--r--Documentation/rapidio/rapidio.txt173
-rw-r--r--Documentation/rapidio/sysfs.txt90
-rw-r--r--Documentation/s390/Debugging390.txt2
-rw-r--r--Documentation/scheduler/sched-design-CFS.txt7
-rw-r--r--Documentation/scheduler/sched-domains.txt32
-rw-r--r--Documentation/scsi/ChangeLog.lpfc18
-rw-r--r--Documentation/scsi/ChangeLog.megaraid2
-rw-r--r--Documentation/scsi/ChangeLog.ncr53c8xx2
-rw-r--r--Documentation/scsi/ChangeLog.sym53c8xx2
-rw-r--r--Documentation/scsi/aha152x.txt2
-rw-r--r--Documentation/scsi/aic79xx.txt12
-rw-r--r--Documentation/scsi/ibmmca.txt4
-rw-r--r--Documentation/scsi/scsi-changer.txt2
-rw-r--r--Documentation/scsi/scsi_eh.txt2
-rw-r--r--Documentation/scsi/scsi_fc_transport.txt2
-rw-r--r--Documentation/scsi/sym53c8xx_2.txt2
-rw-r--r--Documentation/serial/moxa-smartio2
-rw-r--r--Documentation/serial/n_gsm.txt2
-rw-r--r--Documentation/sound/alsa/ALSA-Configuration.txt6
-rw-r--r--Documentation/sound/alsa/SB-Live-mixer.txt6
-rw-r--r--Documentation/sound/oss/AudioExcelDSP166
-rw-r--r--Documentation/sound/oss/README.OSS2
-rw-r--r--Documentation/sound/oss/README.ymfsb2
-rw-r--r--Documentation/spi/pxa2xx2
-rw-r--r--Documentation/spi/spi-lm70llp2
-rwxr-xr-xDocumentation/target/tcm_mod_builder.py18
-rw-r--r--Documentation/telephony/ixj.txt2
-rw-r--r--Documentation/trace/ring-buffer-design.txt2
-rw-r--r--Documentation/video4linux/README.ivtv3
-rw-r--r--Documentation/video4linux/README.pvrusb22
-rw-r--r--Documentation/video4linux/Zoran2
-rw-r--r--Documentation/video4linux/bttv/Insmod-options2
-rw-r--r--Documentation/video4linux/bttv/README2
-rw-r--r--Documentation/video4linux/bttv/README.freeze2
-rw-r--r--Documentation/video4linux/bttv/Sound-FAQ4
-rw-r--r--Documentation/video4linux/et61x251.txt4
-rw-r--r--Documentation/video4linux/gspca.txt10
-rw-r--r--Documentation/video4linux/omap3isp.txt278
-rw-r--r--Documentation/video4linux/pxa_camera.txt8
-rw-r--r--Documentation/video4linux/sh_mobile_ceu_camera.txt6
-rw-r--r--Documentation/video4linux/sn9c102.txt4
-rw-r--r--Documentation/video4linux/v4l2-framework.txt269
-rw-r--r--Documentation/video4linux/w9968cf.txt2
-rw-r--r--Documentation/video4linux/zc0301.txt6
-rw-r--r--Documentation/vm/active_mm.txt2
-rw-r--r--Documentation/vm/hugetlbpage.txt2
-rw-r--r--Documentation/vm/overcommit-accounting2
-rw-r--r--Documentation/vm/page-types.c105
-rw-r--r--Documentation/w1/slaves/w1_ds24236
-rw-r--r--Documentation/w1/w1.netlink2
-rw-r--r--Documentation/watchdog/hpwdt.txt2
-rw-r--r--Documentation/workqueue.txt40
-rw-r--r--Documentation/x86/x86_64/boot-options.txt5
271 files changed, 9777 insertions, 813 deletions
diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX
index f607367e642f..c17cd4bb2290 100644
--- a/Documentation/00-INDEX
+++ b/Documentation/00-INDEX
@@ -206,8 +206,8 @@ laptops/
206 - directory with laptop related info and laptop driver documentation. 206 - directory with laptop related info and laptop driver documentation.
207ldm.txt 207ldm.txt
208 - a brief description of LDM (Windows Dynamic Disks). 208 - a brief description of LDM (Windows Dynamic Disks).
209leds-class.txt 209leds/
210 - documents LED handling under Linux. 210 - directory with info about LED handling under Linux.
211local_ops.txt 211local_ops.txt
212 - semantics and behavior of local atomic operations. 212 - semantics and behavior of local atomic operations.
213lockdep-design.txt 213lockdep-design.txt
diff --git a/Documentation/ABI/stable/sysfs-class-backlight b/Documentation/ABI/stable/sysfs-class-backlight
index 4d637e1c4ff7..70302f370e7e 100644
--- a/Documentation/ABI/stable/sysfs-class-backlight
+++ b/Documentation/ABI/stable/sysfs-class-backlight
@@ -34,3 +34,23 @@ Contact: Richard Purdie <rpurdie@rpsys.net>
34Description: 34Description:
35 Maximum brightness for <backlight>. 35 Maximum brightness for <backlight>.
36Users: HAL 36Users: HAL
37
38What: /sys/class/backlight/<backlight>/type
39Date: September 2010
40KernelVersion: 2.6.37
41Contact: Matthew Garrett <mjg@redhat.com>
42Description:
43 The type of interface controlled by <backlight>.
44 "firmware": The driver uses a standard firmware interface
45 "platform": The driver uses a platform-specific interface
46 "raw": The driver controls hardware registers directly
47
48 In the general case, when multiple backlight
49 interfaces are available for a single device, firmware
50 control should be preferred to platform control should
51 be preferred to raw control. Using a firmware
52 interface reduces the probability of confusion with
53 the hardware and the OS independently updating the
54 backlight state. Platform interfaces are mostly a
55 holdover from pre-standardisation of firmware
56 interfaces.
diff --git a/Documentation/ABI/testing/configfs-spear-pcie-gadget b/Documentation/ABI/testing/configfs-spear-pcie-gadget
new file mode 100644
index 000000000000..875988146a63
--- /dev/null
+++ b/Documentation/ABI/testing/configfs-spear-pcie-gadget
@@ -0,0 +1,31 @@
1What: /config/pcie-gadget
2Date: Feb 2011
3KernelVersion: 2.6.37
4Contact: Pratyush Anand <pratyush.anand@st.com>
5Description:
6
7 Interface is used to configure selected dual mode PCIe controller
8 as device and then program its various registers to configure it
9 as a particular device type.
10 This interfaces can be used to show spear's PCIe device capability.
11
12 Nodes are only visible when configfs is mounted. To mount configfs
13 in /config directory use:
14 # mount -t configfs none /config/
15
16 For nth PCIe Device Controller
17 /config/pcie-gadget.n/
18 link ... used to enable ltssm and read its status.
19 int_type ...used to configure and read type of supported
20 interrupt
21 no_of_msi ... used to configure number of MSI vector needed and
22 to read no of MSI granted.
23 inta ... write 1 to assert INTA and 0 to de-assert.
24 send_msi ... write MSI vector to be sent.
25 vendor_id ... used to write and read vendor id (hex)
26 device_id ... used to write and read device id (hex)
27 bar0_size ... used to write and read bar0_size
28 bar0_address ... used to write and read bar0 mapped area in hex.
29 bar0_rw_offset ... used to write and read offset of bar0 where
30 bar0_data will be written or read.
31 bar0_data ... used to write and read data at bar0_rw_offset.
diff --git a/Documentation/ABI/testing/pstore b/Documentation/ABI/testing/pstore
index f1fb2a004264..ddf451ee2a08 100644
--- a/Documentation/ABI/testing/pstore
+++ b/Documentation/ABI/testing/pstore
@@ -1,6 +1,6 @@
1Where: /dev/pstore/... 1Where: /dev/pstore/...
2Date: January 2011 2Date: March 2011
3Kernel Version: 2.6.38 3Kernel Version: 2.6.39
4Contact: tony.luck@intel.com 4Contact: tony.luck@intel.com
5Description: Generic interface to platform dependent persistent storage. 5Description: Generic interface to platform dependent persistent storage.
6 6
@@ -11,7 +11,7 @@ Description: Generic interface to platform dependent persistent storage.
11 of the console log is captured, but other interesting 11 of the console log is captured, but other interesting
12 data can also be saved. 12 data can also be saved.
13 13
14 # mount -t pstore - /dev/pstore 14 # mount -t pstore -o kmsg_bytes=8000 - /dev/pstore
15 15
16 $ ls -l /dev/pstore 16 $ ls -l /dev/pstore
17 total 0 17 total 0
@@ -33,3 +33,9 @@ Description: Generic interface to platform dependent persistent storage.
33 will be saved elsewhere and erased from persistent store 33 will be saved elsewhere and erased from persistent store
34 soon after boot to free up space ready for the next 34 soon after boot to free up space ready for the next
35 catastrophe. 35 catastrophe.
36
37 The 'kmsg_bytes' mount option changes the target amount of
38 data saved on each oops/panic. Pstore saves (possibly
39 multiple) files based on the record size of the underlying
40 persistent storage until at least this amount is reached.
41 Default is 10 Kbytes.
diff --git a/Documentation/ABI/testing/sysfs-bus-css b/Documentation/ABI/testing/sysfs-bus-css
index b585ec258a08..2979c40c10e9 100644
--- a/Documentation/ABI/testing/sysfs-bus-css
+++ b/Documentation/ABI/testing/sysfs-bus-css
@@ -29,7 +29,7 @@ Contact: Cornelia Huck <cornelia.huck@de.ibm.com>
29 linux-s390@vger.kernel.org 29 linux-s390@vger.kernel.org
30Description: Contains the PIM/PAM/POM values, as reported by the 30Description: Contains the PIM/PAM/POM values, as reported by the
31 channel subsystem when last queried by the common I/O 31 channel subsystem when last queried by the common I/O
32 layer (this implies that this attribute is not neccessarily 32 layer (this implies that this attribute is not necessarily
33 in sync with the values current in the channel subsystem). 33 in sync with the values current in the channel subsystem).
34 Note: This is an I/O-subchannel specific attribute. 34 Note: This is an I/O-subchannel specific attribute.
35Users: s390-tools, HAL 35Users: s390-tools, HAL
diff --git a/Documentation/ABI/testing/sysfs-bus-media b/Documentation/ABI/testing/sysfs-bus-media
new file mode 100644
index 000000000000..7057e574154a
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-media
@@ -0,0 +1,6 @@
1What: /sys/bus/media/devices/.../model
2Date: January 2011
3Contact: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
4 linux-media@vger.kernel.org
5Description: Contains the device model name in UTF-8. The device version is
6 is not be appended to the model name.
diff --git a/Documentation/ABI/testing/sysfs-bus-pci-devices-cciss b/Documentation/ABI/testing/sysfs-bus-pci-devices-cciss
index 4f29e5f1ebfa..f5bb0a3bb8c0 100644
--- a/Documentation/ABI/testing/sysfs-bus-pci-devices-cciss
+++ b/Documentation/ABI/testing/sysfs-bus-pci-devices-cciss
@@ -59,3 +59,15 @@ Kernel Version: 2.6.31
59Contact: iss_storagedev@hp.com 59Contact: iss_storagedev@hp.com
60Description: Displays the usage count (number of opens) of logical drive Y 60Description: Displays the usage count (number of opens) of logical drive Y
61 of controller X. 61 of controller X.
62
63Where: /sys/bus/pci/devices/<dev>/ccissX/resettable
64Date: February 2011
65Kernel Version: 2.6.38
66Contact: iss_storagedev@hp.com
67Description: Value of 1 indicates the controller can honor the reset_devices
68 kernel parameter. Value of 0 indicates reset_devices cannot be
69 honored. This is to allow, for example, kexec tools to be able
70 to warn the user if they designate an unresettable device as
71 a dump device, as kdump requires resetting the device in order
72 to work reliably.
73
diff --git a/Documentation/ABI/testing/sysfs-bus-rbd b/Documentation/ABI/testing/sysfs-bus-rbd
index 90a87e2a572b..fa72ccb2282e 100644
--- a/Documentation/ABI/testing/sysfs-bus-rbd
+++ b/Documentation/ABI/testing/sysfs-bus-rbd
@@ -1,6 +1,6 @@
1What: /sys/bus/rbd/ 1What: /sys/bus/rbd/
2Date: November 2010 2Date: November 2010
3Contact: Yehuda Sadeh <yehuda@hq.newdream.net>, 3Contact: Yehuda Sadeh <yehuda@newdream.net>,
4 Sage Weil <sage@newdream.net> 4 Sage Weil <sage@newdream.net>
5Description: 5Description:
6 6
diff --git a/Documentation/ABI/testing/sysfs-class-led b/Documentation/ABI/testing/sysfs-class-led
index edff6630c805..3646ec85d513 100644
--- a/Documentation/ABI/testing/sysfs-class-led
+++ b/Documentation/ABI/testing/sysfs-class-led
@@ -33,5 +33,5 @@ Contact: Richard Purdie <rpurdie@rpsys.net>
33Description: 33Description:
34 Invert the LED on/off state. This parameter is specific to 34 Invert the LED on/off state. This parameter is specific to
35 gpio and backlight triggers. In case of the backlight trigger, 35 gpio and backlight triggers. In case of the backlight trigger,
36 it is usefull when driving a LED which is intended to indicate 36 it is useful when driving a LED which is intended to indicate
37 a device in a standby like state. 37 a device in a standby like state.
diff --git a/Documentation/ABI/testing/sysfs-devices-mmc b/Documentation/ABI/testing/sysfs-devices-mmc
new file mode 100644
index 000000000000..5a50ab655843
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-devices-mmc
@@ -0,0 +1,21 @@
1What: /sys/devices/.../mmc_host/mmcX/mmcX:XXXX/enhanced_area_offset
2Date: January 2011
3Contact: Chuanxiao Dong <chuanxiao.dong@intel.com>
4Description:
5 Enhanced area is a new feature defined in eMMC4.4 standard.
6 eMMC4.4 or later card can support such feature. This kind of
7 area can help to improve the card performance. If the feature
8 is enabled, this attribute will indicate the start address of
9 enhanced data area. If not, this attribute will be -EINVAL.
10 Unit Byte. Format decimal.
11
12What: /sys/devices/.../mmc_host/mmcX/mmcX:XXXX/enhanced_area_size
13Date: January 2011
14Contact: Chuanxiao Dong <chuanxiao.dong@intel.com>
15Description:
16 Enhanced area is a new feature defined in eMMC4.4 standard.
17 eMMC4.4 or later card can support such feature. This kind of
18 area can help to improve the card performance. If the feature
19 is enabled, this attribute will indicate the size of enhanced
20 data area. If not, this attribute will be -EINVAL.
21 Unit KByte. Format decimal.
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-kone b/Documentation/ABI/testing/sysfs-driver-hid-roccat-kone
index b4c4f158ab9c..3ca3971109bf 100644
--- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-kone
+++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-kone
@@ -40,7 +40,7 @@ What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-
40Date: March 2010 40Date: March 2010
41Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 41Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
42Description: The mouse can store 5 profiles which can be switched by the 42Description: The mouse can store 5 profiles which can be switched by the
43 press of a button. A profile holds informations like button 43 press of a button. A profile holds information like button
44 mappings, sensitivity, the colors of the 5 leds and light 44 mappings, sensitivity, the colors of the 5 leds and light
45 effects. 45 effects.
46 When read, these files return the respective profile. The 46 When read, these files return the respective profile. The
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus b/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus
index e5311a084a31..c1b53b8bc2ae 100644
--- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus
+++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus
@@ -36,7 +36,7 @@ Date: August 2010
36Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 36Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
37Description: The mouse can store 5 profiles which can be switched by the 37Description: The mouse can store 5 profiles which can be switched by the
38 press of a button. A profile is split in settings and buttons. 38 press of a button. A profile is split in settings and buttons.
39 profile_buttons holds informations about button layout. 39 profile_buttons holds information about button layout.
40 When written, this file lets one write the respective profile 40 When written, this file lets one write the respective profile
41 buttons back to the mouse. The data has to be 77 bytes long. 41 buttons back to the mouse. The data has to be 77 bytes long.
42 The mouse will reject invalid data. 42 The mouse will reject invalid data.
@@ -50,7 +50,7 @@ Date: August 2010
50Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 50Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
51Description: The mouse can store 5 profiles which can be switched by the 51Description: The mouse can store 5 profiles which can be switched by the
52 press of a button. A profile is split in settings and buttons. 52 press of a button. A profile is split in settings and buttons.
53 profile_buttons holds informations about button layout. 53 profile_buttons holds information about button layout.
54 When read, these files return the respective profile buttons. 54 When read, these files return the respective profile buttons.
55 The returned data is 77 bytes in size. 55 The returned data is 77 bytes in size.
56 This file is readonly. 56 This file is readonly.
@@ -61,7 +61,7 @@ Date: October 2010
61Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 61Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
62Description: The mouse can store 5 profiles which can be switched by the 62Description: The mouse can store 5 profiles which can be switched by the
63 press of a button. A profile is split in settings and buttons. 63 press of a button. A profile is split in settings and buttons.
64 profile_settings holds informations like resolution, sensitivity 64 profile_settings holds information like resolution, sensitivity
65 and light effects. 65 and light effects.
66 When written, this file lets one write the respective profile 66 When written, this file lets one write the respective profile
67 settings back to the mouse. The data has to be 43 bytes long. 67 settings back to the mouse. The data has to be 43 bytes long.
@@ -76,7 +76,7 @@ Date: August 2010
76Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 76Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
77Description: The mouse can store 5 profiles which can be switched by the 77Description: The mouse can store 5 profiles which can be switched by the
78 press of a button. A profile is split in settings and buttons. 78 press of a button. A profile is split in settings and buttons.
79 profile_settings holds informations like resolution, sensitivity 79 profile_settings holds information like resolution, sensitivity
80 and light effects. 80 and light effects.
81 When read, these files return the respective profile settings. 81 When read, these files return the respective profile settings.
82 The returned data is 43 bytes in size. 82 The returned data is 43 bytes in size.
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus b/Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus
index fdfa16f8189b..20f937c9d84f 100644
--- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus
+++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus
@@ -52,7 +52,7 @@ Date: January 2011
52Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 52Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
53Description: The mouse can store 5 profiles which can be switched by the 53Description: The mouse can store 5 profiles which can be switched by the
54 press of a button. A profile is split in settings and buttons. 54 press of a button. A profile is split in settings and buttons.
55 profile_buttons holds informations about button layout. 55 profile_buttons holds information about button layout.
56 When written, this file lets one write the respective profile 56 When written, this file lets one write the respective profile
57 buttons back to the mouse. The data has to be 23 bytes long. 57 buttons back to the mouse. The data has to be 23 bytes long.
58 The mouse will reject invalid data. 58 The mouse will reject invalid data.
@@ -66,7 +66,7 @@ Date: January 2011
66Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 66Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
67Description: The mouse can store 5 profiles which can be switched by the 67Description: The mouse can store 5 profiles which can be switched by the
68 press of a button. A profile is split in settings and buttons. 68 press of a button. A profile is split in settings and buttons.
69 profile_buttons holds informations about button layout. 69 profile_buttons holds information about button layout.
70 When read, these files return the respective profile buttons. 70 When read, these files return the respective profile buttons.
71 The returned data is 23 bytes in size. 71 The returned data is 23 bytes in size.
72 This file is readonly. 72 This file is readonly.
@@ -77,7 +77,7 @@ Date: January 2011
77Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 77Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
78Description: The mouse can store 5 profiles which can be switched by the 78Description: The mouse can store 5 profiles which can be switched by the
79 press of a button. A profile is split in settings and buttons. 79 press of a button. A profile is split in settings and buttons.
80 profile_settings holds informations like resolution, sensitivity 80 profile_settings holds information like resolution, sensitivity
81 and light effects. 81 and light effects.
82 When written, this file lets one write the respective profile 82 When written, this file lets one write the respective profile
83 settings back to the mouse. The data has to be 16 bytes long. 83 settings back to the mouse. The data has to be 16 bytes long.
@@ -92,7 +92,7 @@ Date: January 2011
92Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 92Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
93Description: The mouse can store 5 profiles which can be switched by the 93Description: The mouse can store 5 profiles which can be switched by the
94 press of a button. A profile is split in settings and buttons. 94 press of a button. A profile is split in settings and buttons.
95 profile_settings holds informations like resolution, sensitivity 95 profile_settings holds information like resolution, sensitivity
96 and light effects. 96 and light effects.
97 When read, these files return the respective profile settings. 97 When read, these files return the respective profile settings.
98 The returned data is 16 bytes in size. 98 The returned data is 16 bytes in size.
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra b/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra
index 5fab71af3c46..3f8de50e4ff1 100644
--- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra
+++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra
@@ -39,7 +39,7 @@ Date: August 2010
39Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 39Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
40Description: The mouse can store 5 profiles which can be switched by the 40Description: The mouse can store 5 profiles which can be switched by the
41 press of a button. A profile is split in settings and buttons. 41 press of a button. A profile is split in settings and buttons.
42 profile_settings holds informations like resolution, sensitivity 42 profile_settings holds information like resolution, sensitivity
43 and light effects. 43 and light effects.
44 When written, this file lets one write the respective profile 44 When written, this file lets one write the respective profile
45 settings back to the mouse. The data has to be 13 bytes long. 45 settings back to the mouse. The data has to be 13 bytes long.
@@ -54,7 +54,7 @@ Date: August 2010
54Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 54Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
55Description: The mouse can store 5 profiles which can be switched by the 55Description: The mouse can store 5 profiles which can be switched by the
56 press of a button. A profile is split in settings and buttons. 56 press of a button. A profile is split in settings and buttons.
57 profile_settings holds informations like resolution, sensitivity 57 profile_settings holds information like resolution, sensitivity
58 and light effects. 58 and light effects.
59 When read, these files return the respective profile settings. 59 When read, these files return the respective profile settings.
60 The returned data is 13 bytes in size. 60 The returned data is 13 bytes in size.
@@ -66,7 +66,7 @@ Date: August 2010
66Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 66Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
67Description: The mouse can store 5 profiles which can be switched by the 67Description: The mouse can store 5 profiles which can be switched by the
68 press of a button. A profile is split in settings and buttons. 68 press of a button. A profile is split in settings and buttons.
69 profile_buttons holds informations about button layout. 69 profile_buttons holds information about button layout.
70 When written, this file lets one write the respective profile 70 When written, this file lets one write the respective profile
71 buttons back to the mouse. The data has to be 19 bytes long. 71 buttons back to the mouse. The data has to be 19 bytes long.
72 The mouse will reject invalid data. 72 The mouse will reject invalid data.
@@ -80,7 +80,7 @@ Date: August 2010
80Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 80Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
81Description: The mouse can store 5 profiles which can be switched by the 81Description: The mouse can store 5 profiles which can be switched by the
82 press of a button. A profile is split in settings and buttons. 82 press of a button. A profile is split in settings and buttons.
83 profile_buttons holds informations about button layout. 83 profile_buttons holds information about button layout.
84 When read, these files return the respective profile buttons. 84 When read, these files return the respective profile buttons.
85 The returned data is 19 bytes in size. 85 The returned data is 19 bytes in size.
86 This file is readonly. 86 This file is readonly.
diff --git a/Documentation/ABI/testing/sysfs-driver-samsung-laptop b/Documentation/ABI/testing/sysfs-driver-samsung-laptop
new file mode 100644
index 000000000000..0a810231aad4
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-driver-samsung-laptop
@@ -0,0 +1,19 @@
1What: /sys/devices/platform/samsung/performance_level
2Date: January 1, 2010
3KernelVersion: 2.6.33
4Contact: Greg Kroah-Hartman <gregkh@suse.de>
5Description: Some Samsung laptops have different "performance levels"
6 that are can be modified by a function key, and by this
7 sysfs file. These values don't always make a whole lot
8 of sense, but some users like to modify them to keep
9 their fans quiet at all costs. Reading from this file
10 will show the current performance level. Writing to the
11 file can change this value.
12 Valid options:
13 "silent"
14 "normal"
15 "overclock"
16 Note that not all laptops support all of these options.
17 Specifically, not all support the "overclock" option,
18 and it's still unknown if this value even changes
19 anything, other than making the user feel a bit better.
diff --git a/Documentation/ABI/testing/sysfs-fs-ext4 b/Documentation/ABI/testing/sysfs-fs-ext4
index 5fb709997d96..f22ac0872ae8 100644
--- a/Documentation/ABI/testing/sysfs-fs-ext4
+++ b/Documentation/ABI/testing/sysfs-fs-ext4
@@ -48,7 +48,7 @@ Description:
48 will have its blocks allocated out of its own unique 48 will have its blocks allocated out of its own unique
49 preallocation pool. 49 preallocation pool.
50 50
51What: /sys/fs/ext4/<disk>/inode_readahead 51What: /sys/fs/ext4/<disk>/inode_readahead_blks
52Date: March 2008 52Date: March 2008
53Contact: "Theodore Ts'o" <tytso@mit.edu> 53Contact: "Theodore Ts'o" <tytso@mit.edu>
54Description: 54Description:
@@ -85,7 +85,14 @@ Date: June 2008
85Contact: "Theodore Ts'o" <tytso@mit.edu> 85Contact: "Theodore Ts'o" <tytso@mit.edu>
86Description: 86Description:
87 Tuning parameter which (if non-zero) controls the goal 87 Tuning parameter which (if non-zero) controls the goal
88 inode used by the inode allocator in p0reference to 88 inode used by the inode allocator in preference to
89 all other allocation hueristics. This is intended for 89 all other allocation heuristics. This is intended for
90 debugging use only, and should be 0 on production 90 debugging use only, and should be 0 on production
91 systems. 91 systems.
92
93What: /sys/fs/ext4/<disk>/max_writeback_mb_bump
94Date: September 2009
95Contact: "Theodore Ts'o" <tytso@mit.edu>
96Description:
97 The maximum number of megabytes the writeback code will
98 try to write out before move on to another inode.
diff --git a/Documentation/ABI/testing/sysfs-fs-pstore b/Documentation/ABI/testing/sysfs-fs-pstore
deleted file mode 100644
index 8e659d854805..000000000000
--- a/Documentation/ABI/testing/sysfs-fs-pstore
+++ /dev/null
@@ -1,7 +0,0 @@
1What: /sys/fs/pstore/kmsg_bytes
2Date: January 2011
3Kernel Version: 2.6.38
4Contact: "Tony Luck" <tony.luck@intel.com>
5Description:
6 Controls amount of console log that will be saved
7 to persistent store on oops/panic.
diff --git a/Documentation/ABI/testing/sysfs-platform-asus-laptop b/Documentation/ABI/testing/sysfs-platform-asus-laptop
index 41ff8ae4dee0..cd9d667c3da2 100644
--- a/Documentation/ABI/testing/sysfs-platform-asus-laptop
+++ b/Documentation/ABI/testing/sysfs-platform-asus-laptop
@@ -27,7 +27,7 @@ KernelVersion: 2.6.20
27Contact: "Corentin Chary" <corentincj@iksaif.net> 27Contact: "Corentin Chary" <corentincj@iksaif.net>
28Description: 28Description:
29 Some models like the W1N have a LED display that can be 29 Some models like the W1N have a LED display that can be
30 used to display several informations. 30 used to display several items of information.
31 To control the LED display, use the following : 31 To control the LED display, use the following :
32 echo 0x0T000DDD > /sys/devices/platform/asus_laptop/ 32 echo 0x0T000DDD > /sys/devices/platform/asus_laptop/
33 where T control the 3 letters display, and DDD the 3 digits display. 33 where T control the 3 letters display, and DDD the 3 digits display.
diff --git a/Documentation/ABI/testing/sysfs-platform-asus-wmi b/Documentation/ABI/testing/sysfs-platform-asus-wmi
new file mode 100644
index 000000000000..2e7df91620de
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-platform-asus-wmi
@@ -0,0 +1,31 @@
1What: /sys/devices/platform/<platform>/cpufv
2Date: Oct 2010
3KernelVersion: 2.6.37
4Contact: "Corentin Chary" <corentincj@iksaif.net>
5Description:
6 Change CPU clock configuration (write-only).
7 There are three available clock configuration:
8 * 0 -> Super Performance Mode
9 * 1 -> High Performance Mode
10 * 2 -> Power Saving Mode
11
12What: /sys/devices/platform/<platform>/camera
13Date: Jan 2010
14KernelVersion: 2.6.39
15Contact: "Corentin Chary" <corentincj@iksaif.net>
16Description:
17 Control the camera. 1 means on, 0 means off.
18
19What: /sys/devices/platform/<platform>/cardr
20Date: Jan 2010
21KernelVersion: 2.6.39
22Contact: "Corentin Chary" <corentincj@iksaif.net>
23Description:
24 Control the card reader. 1 means on, 0 means off.
25
26What: /sys/devices/platform/<platform>/touchpad
27Date: Jan 2010
28KernelVersion: 2.6.39
29Contact: "Corentin Chary" <corentincj@iksaif.net>
30Description:
31 Control the card touchpad. 1 means on, 0 means off.
diff --git a/Documentation/ABI/testing/sysfs-platform-eeepc-wmi b/Documentation/ABI/testing/sysfs-platform-eeepc-wmi
deleted file mode 100644
index e4b5fef5fadd..000000000000
--- a/Documentation/ABI/testing/sysfs-platform-eeepc-wmi
+++ /dev/null
@@ -1,10 +0,0 @@
1What: /sys/devices/platform/eeepc-wmi/cpufv
2Date: Oct 2010
3KernelVersion: 2.6.37
4Contact: "Corentin Chary" <corentincj@iksaif.net>
5Description:
6 Change CPU clock configuration (write-only).
7 There are three available clock configuration:
8 * 0 -> Super Performance Mode
9 * 1 -> High Performance Mode
10 * 2 -> Power Saving Mode
diff --git a/Documentation/Changes b/Documentation/Changes
index 4fb88f15f2ef..5f4828a034e3 100644
--- a/Documentation/Changes
+++ b/Documentation/Changes
@@ -35,7 +35,7 @@ o util-linux 2.10o # fdformat --version
35o module-init-tools 0.9.10 # depmod -V 35o module-init-tools 0.9.10 # depmod -V
36o e2fsprogs 1.41.4 # e2fsck -V 36o e2fsprogs 1.41.4 # e2fsck -V
37o jfsutils 1.1.3 # fsck.jfs -V 37o jfsutils 1.1.3 # fsck.jfs -V
38o reiserfsprogs 3.6.3 # reiserfsck -V 2>&1|grep reiserfsprogs 38o reiserfsprogs 3.6.3 # reiserfsck -V
39o xfsprogs 2.6.0 # xfs_db -V 39o xfsprogs 2.6.0 # xfs_db -V
40o squashfs-tools 4.0 # mksquashfs -version 40o squashfs-tools 4.0 # mksquashfs -version
41o btrfs-progs 0.18 # btrfsck 41o btrfs-progs 0.18 # btrfsck
@@ -46,9 +46,9 @@ o isdn4k-utils 3.1pre1 # isdnctrl 2>&1|grep version
46o nfs-utils 1.0.5 # showmount --version 46o nfs-utils 1.0.5 # showmount --version
47o procps 3.2.0 # ps --version 47o procps 3.2.0 # ps --version
48o oprofile 0.9 # oprofiled --version 48o oprofile 0.9 # oprofiled --version
49o udev 081 # udevinfo -V 49o udev 081 # udevd --version
50o grub 0.93 # grub --version 50o grub 0.93 # grub --version || grub-install --version
51o mcelog 0.6 51o mcelog 0.6 # mcelog --version
52o iptables 1.4.2 # iptables -V 52o iptables 1.4.2 # iptables -V
53 53
54 54
diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle
index 1cd3478e5834..58b0bf917834 100644
--- a/Documentation/CodingStyle
+++ b/Documentation/CodingStyle
@@ -168,6 +168,13 @@ Do not unnecessarily use braces where a single statement will do.
168if (condition) 168if (condition)
169 action(); 169 action();
170 170
171and
172
173if (condition)
174 do_this();
175else
176 do_that();
177
171This does not apply if one branch of a conditional statement is a single 178This does not apply if one branch of a conditional statement is a single
172statement. Use braces in both branches. 179statement. Use braces in both branches.
173 180
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index 8b6e00a71034..8436b018c289 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -53,7 +53,9 @@ MAN := $(patsubst %.xml, %.9, $(BOOKS))
53mandocs: $(MAN) 53mandocs: $(MAN)
54 54
55build_images = mkdir -p $(objtree)/Documentation/DocBook/media/ && \ 55build_images = mkdir -p $(objtree)/Documentation/DocBook/media/ && \
56 cp $(srctree)/Documentation/DocBook/dvb/*.png $(srctree)/Documentation/DocBook/v4l/*.gif $(objtree)/Documentation/DocBook/media/ 56 cp $(srctree)/Documentation/DocBook/dvb/*.png \
57 $(srctree)/Documentation/DocBook/v4l/*.gif \
58 $(objtree)/Documentation/DocBook/media/
57 59
58xmldoclinks: 60xmldoclinks:
59ifneq ($(objtree),$(srctree)) 61ifneq ($(objtree),$(srctree))
diff --git a/Documentation/DocBook/dvb/dvbproperty.xml b/Documentation/DocBook/dvb/dvbproperty.xml
index 5f57c7ccd4ba..97f397e2fb3a 100644
--- a/Documentation/DocBook/dvb/dvbproperty.xml
+++ b/Documentation/DocBook/dvb/dvbproperty.xml
@@ -40,7 +40,7 @@
40 40
41 <para>Central frequency of the channel.</para> 41 <para>Central frequency of the channel.</para>
42 42
43 <para>For ISDB-T the channels are usally transmitted with an offset of 143kHz. E.g. a 43 <para>For ISDB-T the channels are usually transmitted with an offset of 143kHz. E.g. a
44 valid frequncy could be 474143 kHz. The stepping is bound to the bandwidth of 44 valid frequncy could be 474143 kHz. The stepping is bound to the bandwidth of
45 the channel which is 6MHz.</para> 45 the channel which is 6MHz.</para>
46 46
diff --git a/Documentation/DocBook/dvb/frontend.xml b/Documentation/DocBook/dvb/frontend.xml
index 78d756de5906..60c6976fb311 100644
--- a/Documentation/DocBook/dvb/frontend.xml
+++ b/Documentation/DocBook/dvb/frontend.xml
@@ -139,7 +139,7 @@ consistently to the DiSEqC commands as described in the DiSEqC spec.</para>
139<section id="frontend_sec_tone"> 139<section id="frontend_sec_tone">
140<title>SEC continuous tone</title> 140<title>SEC continuous tone</title>
141 141
142<para>The continous 22KHz tone is usually used with non-DiSEqC capable LNBs to switch the 142<para>The continuous 22KHz tone is usually used with non-DiSEqC capable LNBs to switch the
143high/low band of a dual-band LNB. When using DiSEqC epuipment this voltage has to 143high/low band of a dual-band LNB. When using DiSEqC epuipment this voltage has to
144be switched consistently to the DiSEqC commands as described in the DiSEqC 144be switched consistently to the DiSEqC commands as described in the DiSEqC
145spec.</para> 145spec.</para>
diff --git a/Documentation/DocBook/kernel-locking.tmpl b/Documentation/DocBook/kernel-locking.tmpl
index f66f4df18690..67e7ab41c0a6 100644
--- a/Documentation/DocBook/kernel-locking.tmpl
+++ b/Documentation/DocBook/kernel-locking.tmpl
@@ -1763,7 +1763,7 @@ as it would be on UP.
1763There is a furthur optimization possible here: remember our original 1763There is a furthur optimization possible here: remember our original
1764cache code, where there were no reference counts and the caller simply 1764cache code, where there were no reference counts and the caller simply
1765held the lock whenever using the object? This is still possible: if 1765held the lock whenever using the object? This is still possible: if
1766you hold the lock, noone can delete the object, so you don't need to 1766you hold the lock, no one can delete the object, so you don't need to
1767get and put the reference count. 1767get and put the reference count.
1768</para> 1768</para>
1769 1769
diff --git a/Documentation/DocBook/libata.tmpl b/Documentation/DocBook/libata.tmpl
index 8c5411cfeaf0..cdd1bb9aac0d 100644
--- a/Documentation/DocBook/libata.tmpl
+++ b/Documentation/DocBook/libata.tmpl
@@ -1032,7 +1032,7 @@ and other resources, etc.
1032 <listitem> 1032 <listitem>
1033 <para> 1033 <para>
1034 This is indicated by ICRC bit in the ERROR register and 1034 This is indicated by ICRC bit in the ERROR register and
1035 means that corruption occurred during data transfer. Upto 1035 means that corruption occurred during data transfer. Up to
1036 ATA/ATAPI-7, the standard specifies that this bit is only 1036 ATA/ATAPI-7, the standard specifies that this bit is only
1037 applicable to UDMA transfers but ATA/ATAPI-8 draft revision 1037 applicable to UDMA transfers but ATA/ATAPI-8 draft revision
1038 1f says that the bit may be applicable to multiword DMA and 1038 1f says that the bit may be applicable to multiword DMA and
@@ -1045,10 +1045,10 @@ and other resources, etc.
1045 <term>ABRT error during data transfer or on completion</term> 1045 <term>ABRT error during data transfer or on completion</term>
1046 <listitem> 1046 <listitem>
1047 <para> 1047 <para>
1048 Upto ATA/ATAPI-7, the standard specifies that ABRT could be 1048 Up to ATA/ATAPI-7, the standard specifies that ABRT could be
1049 set on ICRC errors and on cases where a device is not able 1049 set on ICRC errors and on cases where a device is not able
1050 to complete a command. Combined with the fact that MWDMA 1050 to complete a command. Combined with the fact that MWDMA
1051 and PIO transfer errors aren't allowed to use ICRC bit upto 1051 and PIO transfer errors aren't allowed to use ICRC bit up to
1052 ATA/ATAPI-7, it seems to imply that ABRT bit alone could 1052 ATA/ATAPI-7, it seems to imply that ABRT bit alone could
1053 indicate tranfer errors. 1053 indicate tranfer errors.
1054 </para> 1054 </para>
@@ -1122,7 +1122,7 @@ and other resources, etc.
1122 <para> 1122 <para>
1123 Depending on commands, not all STATUS/ERROR bits are 1123 Depending on commands, not all STATUS/ERROR bits are
1124 applicable. These non-applicable bits are marked with 1124 applicable. These non-applicable bits are marked with
1125 &quot;na&quot; in the output descriptions but upto ATA/ATAPI-7 1125 &quot;na&quot; in the output descriptions but up to ATA/ATAPI-7
1126 no definition of &quot;na&quot; can be found. However, 1126 no definition of &quot;na&quot; can be found. However,
1127 ATA/ATAPI-8 draft revision 1f describes &quot;N/A&quot; as 1127 ATA/ATAPI-8 draft revision 1f describes &quot;N/A&quot; as
1128 follows. 1128 follows.
@@ -1507,7 +1507,7 @@ and other resources, etc.
1507 1507
1508 <listitem> 1508 <listitem>
1509 <para> 1509 <para>
1510 CHS set up with INITIALIZE DEVICE PARAMETERS (seldomly used) 1510 CHS set up with INITIALIZE DEVICE PARAMETERS (seldom used)
1511 </para> 1511 </para>
1512 </listitem> 1512 </listitem>
1513 1513
diff --git a/Documentation/DocBook/media-entities.tmpl b/Documentation/DocBook/media-entities.tmpl
index be34dcbe0d90..fea63b45471a 100644
--- a/Documentation/DocBook/media-entities.tmpl
+++ b/Documentation/DocBook/media-entities.tmpl
@@ -11,6 +11,10 @@
11<!ENTITY func-select "<link linkend='func-select'><function>select()</function></link>"> 11<!ENTITY func-select "<link linkend='func-select'><function>select()</function></link>">
12<!ENTITY func-write "<link linkend='func-write'><function>write()</function></link>"> 12<!ENTITY func-write "<link linkend='func-write'><function>write()</function></link>">
13 13
14<!ENTITY media-func-close "<link linkend='media-func-close'><function>close()</function></link>">
15<!ENTITY media-func-ioctl "<link linkend='media-func-ioctl'><function>ioctl()</function></link>">
16<!ENTITY media-func-open "<link linkend='media-func-open'><function>open()</function></link>">
17
14<!-- Ioctls --> 18<!-- Ioctls -->
15<!ENTITY VIDIOC-CROPCAP "<link linkend='vidioc-cropcap'><constant>VIDIOC_CROPCAP</constant></link>"> 19<!ENTITY VIDIOC-CROPCAP "<link linkend='vidioc-cropcap'><constant>VIDIOC_CROPCAP</constant></link>">
16<!ENTITY VIDIOC-DBG-G-CHIP-IDENT "<link linkend='vidioc-dbg-g-chip-ident'><constant>VIDIOC_DBG_G_CHIP_IDENT</constant></link>"> 20<!ENTITY VIDIOC-DBG-G-CHIP-IDENT "<link linkend='vidioc-dbg-g-chip-ident'><constant>VIDIOC_DBG_G_CHIP_IDENT</constant></link>">
@@ -82,11 +86,24 @@
82<!ENTITY VIDIOC-S-PRIORITY "<link linkend='vidioc-g-priority'><constant>VIDIOC_S_PRIORITY</constant></link>"> 86<!ENTITY VIDIOC-S-PRIORITY "<link linkend='vidioc-g-priority'><constant>VIDIOC_S_PRIORITY</constant></link>">
83<!ENTITY VIDIOC-S-STD "<link linkend='vidioc-g-std'><constant>VIDIOC_S_STD</constant></link>"> 87<!ENTITY VIDIOC-S-STD "<link linkend='vidioc-g-std'><constant>VIDIOC_S_STD</constant></link>">
84<!ENTITY VIDIOC-S-TUNER "<link linkend='vidioc-g-tuner'><constant>VIDIOC_S_TUNER</constant></link>"> 88<!ENTITY VIDIOC-S-TUNER "<link linkend='vidioc-g-tuner'><constant>VIDIOC_S_TUNER</constant></link>">
89<!ENTITY VIDIOC-SUBDEV-ENUM-FRAME-SIZE "<link linkend='vidioc-subdev-enum-frame-size'><constant>VIDIOC_SUBDEV_ENUM_FRAME_SIZE</constant></link>">
90<!ENTITY VIDIOC-SUBDEV-ENUM-MBUS-CODE "<link linkend='vidioc-subdev-enum-mbus-code'><constant>VIDIOC_SUBDEV_ENUM_MBUS_CODE</constant></link>">
91<!ENTITY VIDIOC-SUBDEV-G-CROP "<link linkend='vidioc-subdev-g-crop'><constant>VIDIOC_SUBDEV_G_CROP</constant></link>">
92<!ENTITY VIDIOC-SUBDEV-G-FMT "<link linkend='vidioc-subdev-g-fmt'><constant>VIDIOC_SUBDEV_G_FMT</constant></link>">
93<!ENTITY VIDIOC-SUBDEV-G-FRAME-INTERVAL "<link linkend='vidioc-subdev-g-frame-interval'><constant>VIDIOC_SUBDEV_G_FRAME_INTERVAL</constant></link>">
94<!ENTITY VIDIOC-SUBDEV-S-CROP "<link linkend='vidioc-subdev-g-crop'><constant>VIDIOC_SUBDEV_S_CROP</constant></link>">
95<!ENTITY VIDIOC-SUBDEV-S-FMT "<link linkend='vidioc-subdev-g-fmt'><constant>VIDIOC_SUBDEV_S_FMT</constant></link>">
96<!ENTITY VIDIOC-SUBDEV-S-FRAME-INTERVAL "<link linkend='vidioc-subdev-g-frame-interval'><constant>VIDIOC_SUBDEV_S_FRAME_INTERVAL</constant></link>">
85<!ENTITY VIDIOC-TRY-ENCODER-CMD "<link linkend='vidioc-encoder-cmd'><constant>VIDIOC_TRY_ENCODER_CMD</constant></link>"> 97<!ENTITY VIDIOC-TRY-ENCODER-CMD "<link linkend='vidioc-encoder-cmd'><constant>VIDIOC_TRY_ENCODER_CMD</constant></link>">
86<!ENTITY VIDIOC-TRY-EXT-CTRLS "<link linkend='vidioc-g-ext-ctrls'><constant>VIDIOC_TRY_EXT_CTRLS</constant></link>"> 98<!ENTITY VIDIOC-TRY-EXT-CTRLS "<link linkend='vidioc-g-ext-ctrls'><constant>VIDIOC_TRY_EXT_CTRLS</constant></link>">
87<!ENTITY VIDIOC-TRY-FMT "<link linkend='vidioc-g-fmt'><constant>VIDIOC_TRY_FMT</constant></link>"> 99<!ENTITY VIDIOC-TRY-FMT "<link linkend='vidioc-g-fmt'><constant>VIDIOC_TRY_FMT</constant></link>">
88<!ENTITY VIDIOC-UNSUBSCRIBE-EVENT "<link linkend='vidioc-subscribe-event'><constant>VIDIOC_UNSUBSCRIBE_EVENT</constant></link>"> 100<!ENTITY VIDIOC-UNSUBSCRIBE-EVENT "<link linkend='vidioc-subscribe-event'><constant>VIDIOC_UNSUBSCRIBE_EVENT</constant></link>">
89 101
102<!ENTITY MEDIA-IOC-DEVICE-INFO "<link linkend='media-ioc-device-info'><constant>MEDIA_IOC_DEVICE_INFO</constant></link>">
103<!ENTITY MEDIA-IOC-ENUM-ENTITIES "<link linkend='media-ioc-enum-entities'><constant>MEDIA_IOC_ENUM_ENTITIES</constant></link>">
104<!ENTITY MEDIA-IOC-ENUM-LINKS "<link linkend='media-ioc-enum-links'><constant>MEDIA_IOC_ENUM_LINKS</constant></link>">
105<!ENTITY MEDIA-IOC-SETUP-LINK "<link linkend='media-ioc-setup-link'><constant>MEDIA_IOC_SETUP_LINK</constant></link>">
106
90<!-- Types --> 107<!-- Types -->
91<!ENTITY v4l2-std-id "<link linkend='v4l2-std-id'>v4l2_std_id</link>"> 108<!ENTITY v4l2-std-id "<link linkend='v4l2-std-id'>v4l2_std_id</link>">
92 109
@@ -98,6 +115,7 @@
98<!ENTITY v4l2-field "enum&nbsp;<link linkend='v4l2-field'>v4l2_field</link>"> 115<!ENTITY v4l2-field "enum&nbsp;<link linkend='v4l2-field'>v4l2_field</link>">
99<!ENTITY v4l2-frmivaltypes "enum&nbsp;<link linkend='v4l2-frmivaltypes'>v4l2_frmivaltypes</link>"> 116<!ENTITY v4l2-frmivaltypes "enum&nbsp;<link linkend='v4l2-frmivaltypes'>v4l2_frmivaltypes</link>">
100<!ENTITY v4l2-frmsizetypes "enum&nbsp;<link linkend='v4l2-frmsizetypes'>v4l2_frmsizetypes</link>"> 117<!ENTITY v4l2-frmsizetypes "enum&nbsp;<link linkend='v4l2-frmsizetypes'>v4l2_frmsizetypes</link>">
118<!ENTITY v4l2-mbus-pixelcode "enum&nbsp;<link linkend='v4l2-mbus-pixelcode'>v4l2_mbus_pixelcode</link>">
101<!ENTITY v4l2-memory "enum&nbsp;<link linkend='v4l2-memory'>v4l2_memory</link>"> 119<!ENTITY v4l2-memory "enum&nbsp;<link linkend='v4l2-memory'>v4l2_memory</link>">
102<!ENTITY v4l2-mpeg-audio-ac3-bitrate "enum&nbsp;<link linkend='v4l2-mpeg-audio-ac3-bitrate'>v4l2_mpeg_audio_ac3_bitrate</link>"> 120<!ENTITY v4l2-mpeg-audio-ac3-bitrate "enum&nbsp;<link linkend='v4l2-mpeg-audio-ac3-bitrate'>v4l2_mpeg_audio_ac3_bitrate</link>">
103<!ENTITY v4l2-mpeg-audio-crc "enum&nbsp;<link linkend='v4l2-mpeg-audio-crc'>v4l2_mpeg_audio_crc</link>"> 121<!ENTITY v4l2-mpeg-audio-crc "enum&nbsp;<link linkend='v4l2-mpeg-audio-crc'>v4l2_mpeg_audio_crc</link>">
@@ -121,6 +139,7 @@
121<!ENTITY v4l2-mpeg-video-encoding "enum&nbsp;<link linkend='v4l2-mpeg-video-encoding'>v4l2_mpeg_video_encoding</link>"> 139<!ENTITY v4l2-mpeg-video-encoding "enum&nbsp;<link linkend='v4l2-mpeg-video-encoding'>v4l2_mpeg_video_encoding</link>">
122<!ENTITY v4l2-power-line-frequency "enum&nbsp;<link linkend='v4l2-power-line-frequency'>v4l2_power_line_frequency</link>"> 140<!ENTITY v4l2-power-line-frequency "enum&nbsp;<link linkend='v4l2-power-line-frequency'>v4l2_power_line_frequency</link>">
123<!ENTITY v4l2-priority "enum&nbsp;<link linkend='v4l2-priority'>v4l2_priority</link>"> 141<!ENTITY v4l2-priority "enum&nbsp;<link linkend='v4l2-priority'>v4l2_priority</link>">
142<!ENTITY v4l2-subdev-format-whence "enum&nbsp;<link linkend='v4l2-subdev-format-whence'>v4l2_subdev_format_whence</link>">
124<!ENTITY v4l2-tuner-type "enum&nbsp;<link linkend='v4l2-tuner-type'>v4l2_tuner_type</link>"> 143<!ENTITY v4l2-tuner-type "enum&nbsp;<link linkend='v4l2-tuner-type'>v4l2_tuner_type</link>">
125<!ENTITY v4l2-preemphasis "enum&nbsp;<link linkend='v4l2-preemphasis'>v4l2_preemphasis</link>"> 144<!ENTITY v4l2-preemphasis "enum&nbsp;<link linkend='v4l2-preemphasis'>v4l2_preemphasis</link>">
126 145
@@ -129,6 +148,7 @@
129<!ENTITY v4l2-audioout "struct&nbsp;<link linkend='v4l2-audioout'>v4l2_audioout</link>"> 148<!ENTITY v4l2-audioout "struct&nbsp;<link linkend='v4l2-audioout'>v4l2_audioout</link>">
130<!ENTITY v4l2-bt-timings "struct&nbsp;<link linkend='v4l2-bt-timings'>v4l2_bt_timings</link>"> 149<!ENTITY v4l2-bt-timings "struct&nbsp;<link linkend='v4l2-bt-timings'>v4l2_bt_timings</link>">
131<!ENTITY v4l2-buffer "struct&nbsp;<link linkend='v4l2-buffer'>v4l2_buffer</link>"> 150<!ENTITY v4l2-buffer "struct&nbsp;<link linkend='v4l2-buffer'>v4l2_buffer</link>">
151<!ENTITY v4l2-plane "struct&nbsp;<link linkend='v4l2-plane'>v4l2_plane</link>">
132<!ENTITY v4l2-capability "struct&nbsp;<link linkend='v4l2-capability'>v4l2_capability</link>"> 152<!ENTITY v4l2-capability "struct&nbsp;<link linkend='v4l2-capability'>v4l2_capability</link>">
133<!ENTITY v4l2-captureparm "struct&nbsp;<link linkend='v4l2-captureparm'>v4l2_captureparm</link>"> 153<!ENTITY v4l2-captureparm "struct&nbsp;<link linkend='v4l2-captureparm'>v4l2_captureparm</link>">
134<!ENTITY v4l2-clip "struct&nbsp;<link linkend='v4l2-clip'>v4l2_clip</link>"> 154<!ENTITY v4l2-clip "struct&nbsp;<link linkend='v4l2-clip'>v4l2_clip</link>">
@@ -162,11 +182,14 @@
162<!ENTITY v4l2-hw-freq-seek "struct&nbsp;<link linkend='v4l2-hw-freq-seek'>v4l2_hw_freq_seek</link>"> 182<!ENTITY v4l2-hw-freq-seek "struct&nbsp;<link linkend='v4l2-hw-freq-seek'>v4l2_hw_freq_seek</link>">
163<!ENTITY v4l2-input "struct&nbsp;<link linkend='v4l2-input'>v4l2_input</link>"> 183<!ENTITY v4l2-input "struct&nbsp;<link linkend='v4l2-input'>v4l2_input</link>">
164<!ENTITY v4l2-jpegcompression "struct&nbsp;<link linkend='v4l2-jpegcompression'>v4l2_jpegcompression</link>"> 184<!ENTITY v4l2-jpegcompression "struct&nbsp;<link linkend='v4l2-jpegcompression'>v4l2_jpegcompression</link>">
185<!ENTITY v4l2-mbus-framefmt "struct&nbsp;<link linkend='v4l2-mbus-framefmt'>v4l2_mbus_framefmt</link>">
165<!ENTITY v4l2-modulator "struct&nbsp;<link linkend='v4l2-modulator'>v4l2_modulator</link>"> 186<!ENTITY v4l2-modulator "struct&nbsp;<link linkend='v4l2-modulator'>v4l2_modulator</link>">
166<!ENTITY v4l2-mpeg-vbi-fmt-ivtv "struct&nbsp;<link linkend='v4l2-mpeg-vbi-fmt-ivtv'>v4l2_mpeg_vbi_fmt_ivtv</link>"> 187<!ENTITY v4l2-mpeg-vbi-fmt-ivtv "struct&nbsp;<link linkend='v4l2-mpeg-vbi-fmt-ivtv'>v4l2_mpeg_vbi_fmt_ivtv</link>">
167<!ENTITY v4l2-output "struct&nbsp;<link linkend='v4l2-output'>v4l2_output</link>"> 188<!ENTITY v4l2-output "struct&nbsp;<link linkend='v4l2-output'>v4l2_output</link>">
168<!ENTITY v4l2-outputparm "struct&nbsp;<link linkend='v4l2-outputparm'>v4l2_outputparm</link>"> 189<!ENTITY v4l2-outputparm "struct&nbsp;<link linkend='v4l2-outputparm'>v4l2_outputparm</link>">
169<!ENTITY v4l2-pix-format "struct&nbsp;<link linkend='v4l2-pix-format'>v4l2_pix_format</link>"> 190<!ENTITY v4l2-pix-format "struct&nbsp;<link linkend='v4l2-pix-format'>v4l2_pix_format</link>">
191<!ENTITY v4l2-pix-format-mplane "struct&nbsp;<link linkend='v4l2-pix-format-mplane'>v4l2_pix_format_mplane</link>">
192<!ENTITY v4l2-plane-pix-format "struct&nbsp;<link linkend='v4l2-plane-pix-format'>v4l2_plane_pix_format</link>">
170<!ENTITY v4l2-queryctrl "struct&nbsp;<link linkend='v4l2-queryctrl'>v4l2_queryctrl</link>"> 193<!ENTITY v4l2-queryctrl "struct&nbsp;<link linkend='v4l2-queryctrl'>v4l2_queryctrl</link>">
171<!ENTITY v4l2-querymenu "struct&nbsp;<link linkend='v4l2-querymenu'>v4l2_querymenu</link>"> 194<!ENTITY v4l2-querymenu "struct&nbsp;<link linkend='v4l2-querymenu'>v4l2_querymenu</link>">
172<!ENTITY v4l2-rect "struct&nbsp;<link linkend='v4l2-rect'>v4l2_rect</link>"> 195<!ENTITY v4l2-rect "struct&nbsp;<link linkend='v4l2-rect'>v4l2_rect</link>">
@@ -174,6 +197,12 @@
174<!ENTITY v4l2-sliced-vbi-cap "struct&nbsp;<link linkend='v4l2-sliced-vbi-cap'>v4l2_sliced_vbi_cap</link>"> 197<!ENTITY v4l2-sliced-vbi-cap "struct&nbsp;<link linkend='v4l2-sliced-vbi-cap'>v4l2_sliced_vbi_cap</link>">
175<!ENTITY v4l2-sliced-vbi-data "struct&nbsp;<link linkend='v4l2-sliced-vbi-data'>v4l2_sliced_vbi_data</link>"> 198<!ENTITY v4l2-sliced-vbi-data "struct&nbsp;<link linkend='v4l2-sliced-vbi-data'>v4l2_sliced_vbi_data</link>">
176<!ENTITY v4l2-sliced-vbi-format "struct&nbsp;<link linkend='v4l2-sliced-vbi-format'>v4l2_sliced_vbi_format</link>"> 199<!ENTITY v4l2-sliced-vbi-format "struct&nbsp;<link linkend='v4l2-sliced-vbi-format'>v4l2_sliced_vbi_format</link>">
200<!ENTITY v4l2-subdev-frame-interval "struct&nbsp;<link linkend='v4l2-subdev-frame-interval'>v4l2_subdev_frame_interval</link>">
201<!ENTITY v4l2-subdev-frame-interval-enum "struct&nbsp;<link linkend='v4l2-subdev-frame-interval-enum'>v4l2_subdev_frame_interval_enum</link>">
202<!ENTITY v4l2-subdev-frame-size-enum "struct&nbsp;<link linkend='v4l2-subdev-frame-size-enum'>v4l2_subdev_frame_size_enum</link>">
203<!ENTITY v4l2-subdev-crop "struct&nbsp;<link linkend='v4l2-subdev-crop'>v4l2_subdev_crop</link>">
204<!ENTITY v4l2-subdev-format "struct&nbsp;<link linkend='v4l2-subdev-format'>v4l2_subdev_format</link>">
205<!ENTITY v4l2-subdev-mbus-code-enum "struct&nbsp;<link linkend='v4l2-subdev-mbus-code-enum'>v4l2_subdev_mbus_code_enum</link>">
177<!ENTITY v4l2-standard "struct&nbsp;<link linkend='v4l2-standard'>v4l2_standard</link>"> 206<!ENTITY v4l2-standard "struct&nbsp;<link linkend='v4l2-standard'>v4l2_standard</link>">
178<!ENTITY v4l2-streamparm "struct&nbsp;<link linkend='v4l2-streamparm'>v4l2_streamparm</link>"> 207<!ENTITY v4l2-streamparm "struct&nbsp;<link linkend='v4l2-streamparm'>v4l2_streamparm</link>">
179<!ENTITY v4l2-timecode "struct&nbsp;<link linkend='v4l2-timecode'>v4l2_timecode</link>"> 208<!ENTITY v4l2-timecode "struct&nbsp;<link linkend='v4l2-timecode'>v4l2_timecode</link>">
@@ -181,6 +210,12 @@
181<!ENTITY v4l2-vbi-format "struct&nbsp;<link linkend='v4l2-vbi-format'>v4l2_vbi_format</link>"> 210<!ENTITY v4l2-vbi-format "struct&nbsp;<link linkend='v4l2-vbi-format'>v4l2_vbi_format</link>">
182<!ENTITY v4l2-window "struct&nbsp;<link linkend='v4l2-window'>v4l2_window</link>"> 211<!ENTITY v4l2-window "struct&nbsp;<link linkend='v4l2-window'>v4l2_window</link>">
183 212
213<!ENTITY media-device-info "struct&nbsp;<link linkend='media-device-info'>media_device_info</link>">
214<!ENTITY media-entity-desc "struct&nbsp;<link linkend='media-entity-desc'>media_entity_desc</link>">
215<!ENTITY media-links-enum "struct&nbsp;<link linkend='media-links-enum'>media_links_enum</link>">
216<!ENTITY media-pad-desc "struct&nbsp;<link linkend='media-pad-desc'>media_pad_desc</link>">
217<!ENTITY media-link-desc "struct&nbsp;<link linkend='media-link-desc'>media_link_desc</link>">
218
184<!-- Error Codes --> 219<!-- Error Codes -->
185<!ENTITY EACCES "<errorcode>EACCES</errorcode> error code"> 220<!ENTITY EACCES "<errorcode>EACCES</errorcode> error code">
186<!ENTITY EAGAIN "<errorcode>EAGAIN</errorcode> error code"> 221<!ENTITY EAGAIN "<errorcode>EAGAIN</errorcode> error code">
@@ -197,11 +232,13 @@
197<!ENTITY ENXIO "<errorcode>ENXIO</errorcode> error code"> 232<!ENTITY ENXIO "<errorcode>ENXIO</errorcode> error code">
198<!ENTITY EMFILE "<errorcode>EMFILE</errorcode> error code"> 233<!ENTITY EMFILE "<errorcode>EMFILE</errorcode> error code">
199<!ENTITY EPERM "<errorcode>EPERM</errorcode> error code"> 234<!ENTITY EPERM "<errorcode>EPERM</errorcode> error code">
235<!ENTITY EPIPE "<errorcode>EPIPE</errorcode> error code">
200<!ENTITY ERANGE "<errorcode>ERANGE</errorcode> error code"> 236<!ENTITY ERANGE "<errorcode>ERANGE</errorcode> error code">
201 237
202<!-- Subsections --> 238<!-- Subsections -->
203<!ENTITY sub-biblio SYSTEM "v4l/biblio.xml"> 239<!ENTITY sub-biblio SYSTEM "v4l/biblio.xml">
204<!ENTITY sub-common SYSTEM "v4l/common.xml"> 240<!ENTITY sub-common SYSTEM "v4l/common.xml">
241<!ENTITY sub-planar-apis SYSTEM "v4l/planar-apis.xml">
205<!ENTITY sub-compat SYSTEM "v4l/compat.xml"> 242<!ENTITY sub-compat SYSTEM "v4l/compat.xml">
206<!ENTITY sub-controls SYSTEM "v4l/controls.xml"> 243<!ENTITY sub-controls SYSTEM "v4l/controls.xml">
207<!ENTITY sub-dev-capture SYSTEM "v4l/dev-capture.xml"> 244<!ENTITY sub-dev-capture SYSTEM "v4l/dev-capture.xml">
@@ -215,6 +252,7 @@
215<!ENTITY sub-dev-raw-vbi SYSTEM "v4l/dev-raw-vbi.xml"> 252<!ENTITY sub-dev-raw-vbi SYSTEM "v4l/dev-raw-vbi.xml">
216<!ENTITY sub-dev-rds SYSTEM "v4l/dev-rds.xml"> 253<!ENTITY sub-dev-rds SYSTEM "v4l/dev-rds.xml">
217<!ENTITY sub-dev-sliced-vbi SYSTEM "v4l/dev-sliced-vbi.xml"> 254<!ENTITY sub-dev-sliced-vbi SYSTEM "v4l/dev-sliced-vbi.xml">
255<!ENTITY sub-dev-subdev SYSTEM "v4l/dev-subdev.xml">
218<!ENTITY sub-dev-teletext SYSTEM "v4l/dev-teletext.xml"> 256<!ENTITY sub-dev-teletext SYSTEM "v4l/dev-teletext.xml">
219<!ENTITY sub-driver SYSTEM "v4l/driver.xml"> 257<!ENTITY sub-driver SYSTEM "v4l/driver.xml">
220<!ENTITY sub-libv4l SYSTEM "v4l/libv4l.xml"> 258<!ENTITY sub-libv4l SYSTEM "v4l/libv4l.xml">
@@ -233,6 +271,8 @@
233<!ENTITY sub-io SYSTEM "v4l/io.xml"> 271<!ENTITY sub-io SYSTEM "v4l/io.xml">
234<!ENTITY sub-grey SYSTEM "v4l/pixfmt-grey.xml"> 272<!ENTITY sub-grey SYSTEM "v4l/pixfmt-grey.xml">
235<!ENTITY sub-nv12 SYSTEM "v4l/pixfmt-nv12.xml"> 273<!ENTITY sub-nv12 SYSTEM "v4l/pixfmt-nv12.xml">
274<!ENTITY sub-nv12m SYSTEM "v4l/pixfmt-nv12m.xml">
275<!ENTITY sub-nv12mt SYSTEM "v4l/pixfmt-nv12mt.xml">
236<!ENTITY sub-nv16 SYSTEM "v4l/pixfmt-nv16.xml"> 276<!ENTITY sub-nv16 SYSTEM "v4l/pixfmt-nv16.xml">
237<!ENTITY sub-packed-rgb SYSTEM "v4l/pixfmt-packed-rgb.xml"> 277<!ENTITY sub-packed-rgb SYSTEM "v4l/pixfmt-packed-rgb.xml">
238<!ENTITY sub-packed-yuv SYSTEM "v4l/pixfmt-packed-yuv.xml"> 278<!ENTITY sub-packed-yuv SYSTEM "v4l/pixfmt-packed-yuv.xml">
@@ -247,12 +287,14 @@
247<!ENTITY sub-yuv410 SYSTEM "v4l/pixfmt-yuv410.xml"> 287<!ENTITY sub-yuv410 SYSTEM "v4l/pixfmt-yuv410.xml">
248<!ENTITY sub-yuv411p SYSTEM "v4l/pixfmt-yuv411p.xml"> 288<!ENTITY sub-yuv411p SYSTEM "v4l/pixfmt-yuv411p.xml">
249<!ENTITY sub-yuv420 SYSTEM "v4l/pixfmt-yuv420.xml"> 289<!ENTITY sub-yuv420 SYSTEM "v4l/pixfmt-yuv420.xml">
290<!ENTITY sub-yuv420m SYSTEM "v4l/pixfmt-yuv420m.xml">
250<!ENTITY sub-yuv422p SYSTEM "v4l/pixfmt-yuv422p.xml"> 291<!ENTITY sub-yuv422p SYSTEM "v4l/pixfmt-yuv422p.xml">
251<!ENTITY sub-yuyv SYSTEM "v4l/pixfmt-yuyv.xml"> 292<!ENTITY sub-yuyv SYSTEM "v4l/pixfmt-yuyv.xml">
252<!ENTITY sub-yvyu SYSTEM "v4l/pixfmt-yvyu.xml"> 293<!ENTITY sub-yvyu SYSTEM "v4l/pixfmt-yvyu.xml">
253<!ENTITY sub-srggb10 SYSTEM "v4l/pixfmt-srggb10.xml"> 294<!ENTITY sub-srggb10 SYSTEM "v4l/pixfmt-srggb10.xml">
254<!ENTITY sub-srggb8 SYSTEM "v4l/pixfmt-srggb8.xml"> 295<!ENTITY sub-srggb8 SYSTEM "v4l/pixfmt-srggb8.xml">
255<!ENTITY sub-y10 SYSTEM "v4l/pixfmt-y10.xml"> 296<!ENTITY sub-y10 SYSTEM "v4l/pixfmt-y10.xml">
297<!ENTITY sub-y12 SYSTEM "v4l/pixfmt-y12.xml">
256<!ENTITY sub-pixfmt SYSTEM "v4l/pixfmt.xml"> 298<!ENTITY sub-pixfmt SYSTEM "v4l/pixfmt.xml">
257<!ENTITY sub-cropcap SYSTEM "v4l/vidioc-cropcap.xml"> 299<!ENTITY sub-cropcap SYSTEM "v4l/vidioc-cropcap.xml">
258<!ENTITY sub-dbg-g-register SYSTEM "v4l/vidioc-dbg-g-register.xml"> 300<!ENTITY sub-dbg-g-register SYSTEM "v4l/vidioc-dbg-g-register.xml">
@@ -298,6 +340,13 @@
298<!ENTITY sub-reqbufs SYSTEM "v4l/vidioc-reqbufs.xml"> 340<!ENTITY sub-reqbufs SYSTEM "v4l/vidioc-reqbufs.xml">
299<!ENTITY sub-s-hw-freq-seek SYSTEM "v4l/vidioc-s-hw-freq-seek.xml"> 341<!ENTITY sub-s-hw-freq-seek SYSTEM "v4l/vidioc-s-hw-freq-seek.xml">
300<!ENTITY sub-streamon SYSTEM "v4l/vidioc-streamon.xml"> 342<!ENTITY sub-streamon SYSTEM "v4l/vidioc-streamon.xml">
343<!ENTITY sub-subdev-enum-frame-interval SYSTEM "v4l/vidioc-subdev-enum-frame-interval.xml">
344<!ENTITY sub-subdev-enum-frame-size SYSTEM "v4l/vidioc-subdev-enum-frame-size.xml">
345<!ENTITY sub-subdev-enum-mbus-code SYSTEM "v4l/vidioc-subdev-enum-mbus-code.xml">
346<!ENTITY sub-subdev-formats SYSTEM "v4l/subdev-formats.xml">
347<!ENTITY sub-subdev-g-crop SYSTEM "v4l/vidioc-subdev-g-crop.xml">
348<!ENTITY sub-subdev-g-fmt SYSTEM "v4l/vidioc-subdev-g-fmt.xml">
349<!ENTITY sub-subdev-g-frame-interval SYSTEM "v4l/vidioc-subdev-g-frame-interval.xml">
301<!ENTITY sub-capture-c SYSTEM "v4l/capture.c.xml"> 350<!ENTITY sub-capture-c SYSTEM "v4l/capture.c.xml">
302<!ENTITY sub-keytable-c SYSTEM "v4l/keytable.c.xml"> 351<!ENTITY sub-keytable-c SYSTEM "v4l/keytable.c.xml">
303<!ENTITY sub-v4l2grab-c SYSTEM "v4l/v4l2grab.c.xml"> 352<!ENTITY sub-v4l2grab-c SYSTEM "v4l/v4l2grab.c.xml">
@@ -321,6 +370,15 @@
321<!ENTITY sub-media-entities SYSTEM "media-entities.tmpl"> 370<!ENTITY sub-media-entities SYSTEM "media-entities.tmpl">
322<!ENTITY sub-media-indices SYSTEM "media-indices.tmpl"> 371<!ENTITY sub-media-indices SYSTEM "media-indices.tmpl">
323 372
373<!ENTITY sub-media-controller SYSTEM "v4l/media-controller.xml">
374<!ENTITY sub-media-open SYSTEM "v4l/media-func-open.xml">
375<!ENTITY sub-media-close SYSTEM "v4l/media-func-close.xml">
376<!ENTITY sub-media-ioctl SYSTEM "v4l/media-func-ioctl.xml">
377<!ENTITY sub-media-ioc-device-info SYSTEM "v4l/media-ioc-device-info.xml">
378<!ENTITY sub-media-ioc-enum-entities SYSTEM "v4l/media-ioc-enum-entities.xml">
379<!ENTITY sub-media-ioc-enum-links SYSTEM "v4l/media-ioc-enum-links.xml">
380<!ENTITY sub-media-ioc-setup-link SYSTEM "v4l/media-ioc-setup-link.xml">
381
324<!-- Function Reference --> 382<!-- Function Reference -->
325<!ENTITY close SYSTEM "v4l/func-close.xml"> 383<!ENTITY close SYSTEM "v4l/func-close.xml">
326<!ENTITY ioctl SYSTEM "v4l/func-ioctl.xml"> 384<!ENTITY ioctl SYSTEM "v4l/func-ioctl.xml">
@@ -333,6 +391,7 @@
333<!ENTITY write SYSTEM "v4l/func-write.xml"> 391<!ENTITY write SYSTEM "v4l/func-write.xml">
334<!ENTITY grey SYSTEM "v4l/pixfmt-grey.xml"> 392<!ENTITY grey SYSTEM "v4l/pixfmt-grey.xml">
335<!ENTITY nv12 SYSTEM "v4l/pixfmt-nv12.xml"> 393<!ENTITY nv12 SYSTEM "v4l/pixfmt-nv12.xml">
394<!ENTITY nv12m SYSTEM "v4l/pixfmt-nv12m.xml">
336<!ENTITY nv16 SYSTEM "v4l/pixfmt-nv16.xml"> 395<!ENTITY nv16 SYSTEM "v4l/pixfmt-nv16.xml">
337<!ENTITY packed-rgb SYSTEM "v4l/pixfmt-packed-rgb.xml"> 396<!ENTITY packed-rgb SYSTEM "v4l/pixfmt-packed-rgb.xml">
338<!ENTITY packed-yuv SYSTEM "v4l/pixfmt-packed-yuv.xml"> 397<!ENTITY packed-yuv SYSTEM "v4l/pixfmt-packed-yuv.xml">
@@ -347,6 +406,7 @@
347<!ENTITY yuv410 SYSTEM "v4l/pixfmt-yuv410.xml"> 406<!ENTITY yuv410 SYSTEM "v4l/pixfmt-yuv410.xml">
348<!ENTITY yuv411p SYSTEM "v4l/pixfmt-yuv411p.xml"> 407<!ENTITY yuv411p SYSTEM "v4l/pixfmt-yuv411p.xml">
349<!ENTITY yuv420 SYSTEM "v4l/pixfmt-yuv420.xml"> 408<!ENTITY yuv420 SYSTEM "v4l/pixfmt-yuv420.xml">
409<!ENTITY yuv420m SYSTEM "v4l/pixfmt-yuv420m.xml">
350<!ENTITY yuv422p SYSTEM "v4l/pixfmt-yuv422p.xml"> 410<!ENTITY yuv422p SYSTEM "v4l/pixfmt-yuv422p.xml">
351<!ENTITY yuyv SYSTEM "v4l/pixfmt-yuyv.xml"> 411<!ENTITY yuyv SYSTEM "v4l/pixfmt-yuyv.xml">
352<!ENTITY yvyu SYSTEM "v4l/pixfmt-yvyu.xml"> 412<!ENTITY yvyu SYSTEM "v4l/pixfmt-yvyu.xml">
diff --git a/Documentation/DocBook/media.tmpl b/Documentation/DocBook/media.tmpl
index a99088aae1aa..88f2cc680cc2 100644
--- a/Documentation/DocBook/media.tmpl
+++ b/Documentation/DocBook/media.tmpl
@@ -106,6 +106,9 @@ Foundation. A copy of the license is included in the chapter entitled
106&sub-remote_controllers; 106&sub-remote_controllers;
107</chapter> 107</chapter>
108</part> 108</part>
109<part id="media_common">
110&sub-media-controller;
111</part>
109 112
110&sub-fdl-appendix; 113&sub-fdl-appendix;
111 114
diff --git a/Documentation/DocBook/mtdnand.tmpl b/Documentation/DocBook/mtdnand.tmpl
index 620eb3f6a90a..6f242d5dee9a 100644
--- a/Documentation/DocBook/mtdnand.tmpl
+++ b/Documentation/DocBook/mtdnand.tmpl
@@ -485,7 +485,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
485 Reed-Solomon library. 485 Reed-Solomon library.
486 </para> 486 </para>
487 <para> 487 <para>
488 The ECC bytes must be placed immidiately after the data 488 The ECC bytes must be placed immediately after the data
489 bytes in order to make the syndrome generator work. This 489 bytes in order to make the syndrome generator work. This
490 is contrary to the usual layout used by software ECC. The 490 is contrary to the usual layout used by software ECC. The
491 separation of data and out of band area is not longer 491 separation of data and out of band area is not longer
@@ -629,7 +629,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
629 holds the bad block table. Store a pointer to the pattern 629 holds the bad block table. Store a pointer to the pattern
630 in the pattern field. Further the length of the pattern has to be 630 in the pattern field. Further the length of the pattern has to be
631 stored in len and the offset in the spare area must be given 631 stored in len and the offset in the spare area must be given
632 in the offs member of the nand_bbt_descr stucture. For mirrored 632 in the offs member of the nand_bbt_descr structure. For mirrored
633 bad block tables different patterns are mandatory.</para></listitem> 633 bad block tables different patterns are mandatory.</para></listitem>
634 <listitem><para>Table creation</para> 634 <listitem><para>Table creation</para>
635 <para>Set the option NAND_BBT_CREATE to enable the table creation 635 <para>Set the option NAND_BBT_CREATE to enable the table creation
@@ -648,7 +648,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
648 <listitem><para>Table version control</para> 648 <listitem><para>Table version control</para>
649 <para>Set the option NAND_BBT_VERSION to enable the table version control. 649 <para>Set the option NAND_BBT_VERSION to enable the table version control.
650 It's highly recommended to enable this for mirrored tables with write 650 It's highly recommended to enable this for mirrored tables with write
651 support. It makes sure that the risk of loosing the bad block 651 support. It makes sure that the risk of losing the bad block
652 table information is reduced to the loss of the information about the 652 table information is reduced to the loss of the information about the
653 one worn out block which should be marked bad. The version is stored in 653 one worn out block which should be marked bad. The version is stored in
654 4 consecutive bytes in the spare area of the device. The position of 654 4 consecutive bytes in the spare area of the device. The position of
@@ -1060,19 +1060,19 @@ data in this page</entry>
1060<row> 1060<row>
1061<entry>0x3D</entry> 1061<entry>0x3D</entry>
1062<entry>ECC byte 21</entry> 1062<entry>ECC byte 21</entry>
1063<entry>Error correction code byte 0 of the eigth 256 Bytes of data 1063<entry>Error correction code byte 0 of the eighth 256 Bytes of data
1064in this page</entry> 1064in this page</entry>
1065</row> 1065</row>
1066<row> 1066<row>
1067<entry>0x3E</entry> 1067<entry>0x3E</entry>
1068<entry>ECC byte 22</entry> 1068<entry>ECC byte 22</entry>
1069<entry>Error correction code byte 1 of the eigth 256 Bytes of data 1069<entry>Error correction code byte 1 of the eighth 256 Bytes of data
1070in this page</entry> 1070in this page</entry>
1071</row> 1071</row>
1072<row> 1072<row>
1073<entry>0x3F</entry> 1073<entry>0x3F</entry>
1074<entry>ECC byte 23</entry> 1074<entry>ECC byte 23</entry>
1075<entry>Error correction code byte 2 of the eigth 256 Bytes of data 1075<entry>Error correction code byte 2 of the eighth 256 Bytes of data
1076in this page</entry> 1076in this page</entry>
1077</row> 1077</row>
1078</tbody></tgroup></informaltable> 1078</tbody></tgroup></informaltable>
diff --git a/Documentation/DocBook/rapidio.tmpl b/Documentation/DocBook/rapidio.tmpl
index 54eb26b57372..50479360d845 100644
--- a/Documentation/DocBook/rapidio.tmpl
+++ b/Documentation/DocBook/rapidio.tmpl
@@ -133,7 +133,6 @@
133!Idrivers/rapidio/rio-sysfs.c 133!Idrivers/rapidio/rio-sysfs.c
134 </sect1> 134 </sect1>
135 <sect1 id="PPC32_support"><title>PPC32 support</title> 135 <sect1 id="PPC32_support"><title>PPC32 support</title>
136!Earch/powerpc/sysdev/fsl_rio.c
137!Iarch/powerpc/sysdev/fsl_rio.c 136!Iarch/powerpc/sysdev/fsl_rio.c
138 </sect1> 137 </sect1>
139 </chapter> 138 </chapter>
diff --git a/Documentation/DocBook/regulator.tmpl b/Documentation/DocBook/regulator.tmpl
index 53f4f8d3b810..346e552fa2cc 100644
--- a/Documentation/DocBook/regulator.tmpl
+++ b/Documentation/DocBook/regulator.tmpl
@@ -267,8 +267,8 @@
267 <sect1 id="machine-constraint"> 267 <sect1 id="machine-constraint">
268 <title>Constraints</title> 268 <title>Constraints</title>
269 <para> 269 <para>
270 As well as definining the connections the machine interface 270 As well as defining the connections the machine interface
271 also provides constraints definining the operations that 271 also provides constraints defining the operations that
272 clients are allowed to perform and the parameters that may be 272 clients are allowed to perform and the parameters that may be
273 set. This is required since generally regulator devices will 273 set. This is required since generally regulator devices will
274 offer more flexibility than it is safe to use on a given 274 offer more flexibility than it is safe to use on a given
diff --git a/Documentation/DocBook/uio-howto.tmpl b/Documentation/DocBook/uio-howto.tmpl
index b4665b9c40b0..7c4b514d62b1 100644
--- a/Documentation/DocBook/uio-howto.tmpl
+++ b/Documentation/DocBook/uio-howto.tmpl
@@ -797,7 +797,7 @@ framework to set up sysfs files for this region. Simply leave it alone.
797 perform some initialization. After that, your hardware 797 perform some initialization. After that, your hardware
798 starts working and will generate an interrupt as soon 798 starts working and will generate an interrupt as soon
799 as it's finished, has some data available, or needs your 799 as it's finished, has some data available, or needs your
800 attention because an error occured. 800 attention because an error occurred.
801 </para> 801 </para>
802 <para> 802 <para>
803 <filename>/dev/uioX</filename> is a read-only file. A 803 <filename>/dev/uioX</filename> is a read-only file. A
diff --git a/Documentation/DocBook/usb.tmpl b/Documentation/DocBook/usb.tmpl
index af293606fbe3..8d57c1888dca 100644
--- a/Documentation/DocBook/usb.tmpl
+++ b/Documentation/DocBook/usb.tmpl
@@ -690,7 +690,7 @@ usbdev_ioctl (int fd, int ifno, unsigned request, void *param)
690 </para><para> 690 </para><para>
691 This request lets kernel drivers talk to user mode code 691 This request lets kernel drivers talk to user mode code
692 through filesystem operations even when they don't create 692 through filesystem operations even when they don't create
693 a charactor or block special device. 693 a character or block special device.
694 It's also been used to do things like ask devices what 694 It's also been used to do things like ask devices what
695 device special file should be used. 695 device special file should be used.
696 Two pre-defined ioctls are used 696 Two pre-defined ioctls are used
diff --git a/Documentation/DocBook/v4l/bayer.pdf b/Documentation/DocBook/v4l/bayer.pdf
new file mode 100644
index 000000000000..905e60e6cd42
--- /dev/null
+++ b/Documentation/DocBook/v4l/bayer.pdf
Binary files differ
diff --git a/Documentation/DocBook/v4l/bayer.png b/Documentation/DocBook/v4l/bayer.png
new file mode 100644
index 000000000000..9b15fb22e817
--- /dev/null
+++ b/Documentation/DocBook/v4l/bayer.png
Binary files differ
diff --git a/Documentation/DocBook/v4l/common.xml b/Documentation/DocBook/v4l/common.xml
index cea23e1c4fc6..9028721438dc 100644
--- a/Documentation/DocBook/v4l/common.xml
+++ b/Documentation/DocBook/v4l/common.xml
@@ -100,7 +100,7 @@ linux-kernel@vger.kernel.org, 2002-11-20. --></para>
100 100
101 <para>By convention system administrators create various 101 <para>By convention system administrators create various
102character device special files with these major and minor numbers in 102character device special files with these major and minor numbers in
103the <filename>/dev</filename> directory. The names recomended for the 103the <filename>/dev</filename> directory. The names recommended for the
104different V4L2 device types are listed in <xref linkend="devices" />. 104different V4L2 device types are listed in <xref linkend="devices" />.
105</para> 105</para>
106 106
@@ -846,6 +846,8 @@ conversion routine or library for integration into applications.</para>
846 </section> 846 </section>
847 </section> 847 </section>
848 848
849 &sub-planar-apis;
850
849 <section id="crop"> 851 <section id="crop">
850 <title>Image Cropping, Insertion and Scaling</title> 852 <title>Image Cropping, Insertion and Scaling</title>
851 853
diff --git a/Documentation/DocBook/v4l/compat.xml b/Documentation/DocBook/v4l/compat.xml
index c9ce61d981f5..9f7cd4f25792 100644
--- a/Documentation/DocBook/v4l/compat.xml
+++ b/Documentation/DocBook/v4l/compat.xml
@@ -1711,8 +1711,8 @@ ioctl would enumerate the available audio inputs. An ioctl to
1711determine the current audio input, if more than one combines with the 1711determine the current audio input, if more than one combines with the
1712current video input, did not exist. So 1712current video input, did not exist. So
1713<constant>VIDIOC_G_AUDIO</constant> was renamed to 1713<constant>VIDIOC_G_AUDIO</constant> was renamed to
1714<constant>VIDIOC_G_AUDIO_OLD</constant>, this ioctl will be removed in 1714<constant>VIDIOC_G_AUDIO_OLD</constant>, this ioctl was removed on
1715the future. The &VIDIOC-ENUMAUDIO; ioctl was added to enumerate 1715Kernel 2.6.39. The &VIDIOC-ENUMAUDIO; ioctl was added to enumerate
1716audio inputs, while &VIDIOC-G-AUDIO; now reports the current audio 1716audio inputs, while &VIDIOC-G-AUDIO; now reports the current audio
1717input.</para> 1717input.</para>
1718 <para>The same changes were made to &VIDIOC-G-AUDOUT; and 1718 <para>The same changes were made to &VIDIOC-G-AUDOUT; and
@@ -1726,7 +1726,7 @@ must be updated to successfully compile again.</para>
1726 <para>The &VIDIOC-OVERLAY; ioctl was incorrectly defined with 1726 <para>The &VIDIOC-OVERLAY; ioctl was incorrectly defined with
1727write-read parameter. It was changed to write-only, while the write-read 1727write-read parameter. It was changed to write-only, while the write-read
1728version was renamed to <constant>VIDIOC_OVERLAY_OLD</constant>. The old 1728version was renamed to <constant>VIDIOC_OVERLAY_OLD</constant>. The old
1729ioctl will be removed in the future. Until further the "videodev" 1729ioctl was removed on Kernel 2.6.39. Until further the "videodev"
1730kernel module will automatically translate to the new version, so drivers 1730kernel module will automatically translate to the new version, so drivers
1731must be recompiled, but not applications.</para> 1731must be recompiled, but not applications.</para>
1732 </listitem> 1732 </listitem>
@@ -1744,7 +1744,7 @@ surface can be seen.</para>
1744defined with write-only parameter, inconsistent with other ioctls 1744defined with write-only parameter, inconsistent with other ioctls
1745modifying their argument. They were changed to write-read, while a 1745modifying their argument. They were changed to write-read, while a
1746<constant>_OLD</constant> suffix was added to the write-only versions. 1746<constant>_OLD</constant> suffix was added to the write-only versions.
1747The old ioctls will be removed in the future. Drivers and 1747The old ioctls were removed on Kernel 2.6.39. Drivers and
1748applications assuming a constant parameter need an update.</para> 1748applications assuming a constant parameter need an update.</para>
1749 </listitem> 1749 </listitem>
1750 </orderedlist> 1750 </orderedlist>
@@ -1815,8 +1815,8 @@ yet to be addressed, for details see <xref
1815 <para>The &VIDIOC-CROPCAP; ioctl was incorrectly defined 1815 <para>The &VIDIOC-CROPCAP; ioctl was incorrectly defined
1816with read-only parameter. It is now defined as write-read ioctl, while 1816with read-only parameter. It is now defined as write-read ioctl, while
1817the read-only version was renamed to 1817the read-only version was renamed to
1818<constant>VIDIOC_CROPCAP_OLD</constant>. The old ioctl will be removed 1818<constant>VIDIOC_CROPCAP_OLD</constant>. The old ioctl was removed
1819in the future.</para> 1819on Kernel 2.6.39.</para>
1820 </listitem> 1820 </listitem>
1821 </orderedlist> 1821 </orderedlist>
1822 </section> 1822 </section>
@@ -2353,6 +2353,20 @@ that used it. It was originally scheduled for removal in 2.6.35.
2353 </listitem> 2353 </listitem>
2354 </orderedlist> 2354 </orderedlist>
2355 </section> 2355 </section>
2356 <section>
2357 <title>V4L2 in Linux 2.6.39</title>
2358 <orderedlist>
2359 <listitem>
2360 <para>The old VIDIOC_*_OLD symbols and V4L1 support were removed.</para>
2361 </listitem>
2362 <listitem>
2363 <para>Multi-planar API added. Does not affect the compatibility of
2364 current drivers and applications. See
2365 <link linkend="planar-apis">multi-planar API</link>
2366 for details.</para>
2367 </listitem>
2368 </orderedlist>
2369 </section>
2356 2370
2357 <section id="other"> 2371 <section id="other">
2358 <title>Relation of V4L2 to other Linux multimedia APIs</title> 2372 <title>Relation of V4L2 to other Linux multimedia APIs</title>
diff --git a/Documentation/DocBook/v4l/controls.xml b/Documentation/DocBook/v4l/controls.xml
index 2fae3e87ce73..a920ee80f640 100644
--- a/Documentation/DocBook/v4l/controls.xml
+++ b/Documentation/DocBook/v4l/controls.xml
@@ -1243,7 +1243,7 @@ values are:</entry>
1243 </row><row><entry spanname="descr">Mutes the audio when 1243 </row><row><entry spanname="descr">Mutes the audio when
1244capturing. This is not done by muting audio hardware, which can still 1244capturing. This is not done by muting audio hardware, which can still
1245produce a slight hiss, but in the encoder itself, guaranteeing a fixed 1245produce a slight hiss, but in the encoder itself, guaranteeing a fixed
1246and reproducable audio bitstream. 0 = unmuted, 1 = muted.</entry> 1246and reproducible audio bitstream. 0 = unmuted, 1 = muted.</entry>
1247 </row> 1247 </row>
1248 <row><entry></entry></row> 1248 <row><entry></entry></row>
1249 <row id="v4l2-mpeg-video-encoding"> 1249 <row id="v4l2-mpeg-video-encoding">
diff --git a/Documentation/DocBook/v4l/dev-capture.xml b/Documentation/DocBook/v4l/dev-capture.xml
index 32807e43f170..2237c661f26a 100644
--- a/Documentation/DocBook/v4l/dev-capture.xml
+++ b/Documentation/DocBook/v4l/dev-capture.xml
@@ -18,7 +18,8 @@ files are used for video output devices.</para>
18 <title>Querying Capabilities</title> 18 <title>Querying Capabilities</title>
19 19
20 <para>Devices supporting the video capture interface set the 20 <para>Devices supporting the video capture interface set the
21<constant>V4L2_CAP_VIDEO_CAPTURE</constant> flag in the 21<constant>V4L2_CAP_VIDEO_CAPTURE</constant> or
22<constant>V4L2_CAP_VIDEO_CAPTURE_MPLANE</constant> flag in the
22<structfield>capabilities</structfield> field of &v4l2-capability; 23<structfield>capabilities</structfield> field of &v4l2-capability;
23returned by the &VIDIOC-QUERYCAP; ioctl. As secondary device functions 24returned by the &VIDIOC-QUERYCAP; ioctl. As secondary device functions
24they may also support the <link linkend="overlay">video overlay</link> 25they may also support the <link linkend="overlay">video overlay</link>
@@ -64,9 +65,11 @@ linkend="crop" />.</para>
64 65
65 <para>To query the current image format applications set the 66 <para>To query the current image format applications set the
66<structfield>type</structfield> field of a &v4l2-format; to 67<structfield>type</structfield> field of a &v4l2-format; to
67<constant>V4L2_BUF_TYPE_VIDEO_CAPTURE</constant> and call the 68<constant>V4L2_BUF_TYPE_VIDEO_CAPTURE</constant> or
69<constant>V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE</constant> and call the
68&VIDIOC-G-FMT; ioctl with a pointer to this structure. Drivers fill 70&VIDIOC-G-FMT; ioctl with a pointer to this structure. Drivers fill
69the &v4l2-pix-format; <structfield>pix</structfield> member of the 71the &v4l2-pix-format; <structfield>pix</structfield> or the
72&v4l2-pix-format-mplane; <structfield>pix_mp</structfield> member of the
70<structfield>fmt</structfield> union.</para> 73<structfield>fmt</structfield> union.</para>
71 74
72 <para>To request different parameters applications set the 75 <para>To request different parameters applications set the
@@ -84,8 +87,8 @@ adjust the parameters and finally return the actual parameters as
84without disabling I/O or possibly time consuming hardware 87without disabling I/O or possibly time consuming hardware
85preparations.</para> 88preparations.</para>
86 89
87 <para>The contents of &v4l2-pix-format; are discussed in <xref 90 <para>The contents of &v4l2-pix-format; and &v4l2-pix-format-mplane;
88linkend="pixfmt" />. See also the specification of the 91are discussed in <xref linkend="pixfmt" />. See also the specification of the
89<constant>VIDIOC_G_FMT</constant>, <constant>VIDIOC_S_FMT</constant> 92<constant>VIDIOC_G_FMT</constant>, <constant>VIDIOC_S_FMT</constant>
90and <constant>VIDIOC_TRY_FMT</constant> ioctls for details. Video 93and <constant>VIDIOC_TRY_FMT</constant> ioctls for details. Video
91capture devices must implement both the 94capture devices must implement both the
diff --git a/Documentation/DocBook/v4l/dev-output.xml b/Documentation/DocBook/v4l/dev-output.xml
index 63c3c20e5a72..919e22c53854 100644
--- a/Documentation/DocBook/v4l/dev-output.xml
+++ b/Documentation/DocBook/v4l/dev-output.xml
@@ -17,7 +17,8 @@ files are used for video capture devices.</para>
17 <title>Querying Capabilities</title> 17 <title>Querying Capabilities</title>
18 18
19 <para>Devices supporting the video output interface set the 19 <para>Devices supporting the video output interface set the
20<constant>V4L2_CAP_VIDEO_OUTPUT</constant> flag in the 20<constant>V4L2_CAP_VIDEO_OUTPUT</constant> or
21<constant>V4L2_CAP_VIDEO_OUTPUT_MPLANE</constant> flag in the
21<structfield>capabilities</structfield> field of &v4l2-capability; 22<structfield>capabilities</structfield> field of &v4l2-capability;
22returned by the &VIDIOC-QUERYCAP; ioctl. As secondary device functions 23returned by the &VIDIOC-QUERYCAP; ioctl. As secondary device functions
23they may also support the <link linkend="raw-vbi">raw VBI 24they may also support the <link linkend="raw-vbi">raw VBI
@@ -60,9 +61,11 @@ linkend="crop" />.</para>
60 61
61 <para>To query the current image format applications set the 62 <para>To query the current image format applications set the
62<structfield>type</structfield> field of a &v4l2-format; to 63<structfield>type</structfield> field of a &v4l2-format; to
63<constant>V4L2_BUF_TYPE_VIDEO_OUTPUT</constant> and call the 64<constant>V4L2_BUF_TYPE_VIDEO_OUTPUT</constant> or
65<constant>V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE</constant> and call the
64&VIDIOC-G-FMT; ioctl with a pointer to this structure. Drivers fill 66&VIDIOC-G-FMT; ioctl with a pointer to this structure. Drivers fill
65the &v4l2-pix-format; <structfield>pix</structfield> member of the 67the &v4l2-pix-format; <structfield>pix</structfield> or the
68&v4l2-pix-format-mplane; <structfield>pix_mp</structfield> member of the
66<structfield>fmt</structfield> union.</para> 69<structfield>fmt</structfield> union.</para>
67 70
68 <para>To request different parameters applications set the 71 <para>To request different parameters applications set the
@@ -80,8 +83,8 @@ adjust the parameters and finally return the actual parameters as
80without disabling I/O or possibly time consuming hardware 83without disabling I/O or possibly time consuming hardware
81preparations.</para> 84preparations.</para>
82 85
83 <para>The contents of &v4l2-pix-format; are discussed in <xref 86 <para>The contents of &v4l2-pix-format; and &v4l2-pix-format-mplane;
84linkend="pixfmt" />. See also the specification of the 87are discussed in <xref linkend="pixfmt" />. See also the specification of the
85<constant>VIDIOC_G_FMT</constant>, <constant>VIDIOC_S_FMT</constant> 88<constant>VIDIOC_G_FMT</constant>, <constant>VIDIOC_S_FMT</constant>
86and <constant>VIDIOC_TRY_FMT</constant> ioctls for details. Video 89and <constant>VIDIOC_TRY_FMT</constant> ioctls for details. Video
87output devices must implement both the 90output devices must implement both the
diff --git a/Documentation/DocBook/v4l/dev-subdev.xml b/Documentation/DocBook/v4l/dev-subdev.xml
new file mode 100644
index 000000000000..05c8fefcbcbe
--- /dev/null
+++ b/Documentation/DocBook/v4l/dev-subdev.xml
@@ -0,0 +1,313 @@
1 <title>Sub-device Interface</title>
2
3 <note>
4 <title>Experimental</title>
5 <para>This is an <link linkend="experimental">experimental</link>
6 interface and may change in the future.</para>
7 </note>
8
9 <para>The complex nature of V4L2 devices, where hardware is often made of
10 several integrated circuits that need to interact with each other in a
11 controlled way, leads to complex V4L2 drivers. The drivers usually reflect
12 the hardware model in software, and model the different hardware components
13 as software blocks called sub-devices.</para>
14
15 <para>V4L2 sub-devices are usually kernel-only objects. If the V4L2 driver
16 implements the media device API, they will automatically inherit from media
17 entities. Applications will be able to enumerate the sub-devices and discover
18 the hardware topology using the media entities, pads and links enumeration
19 API.</para>
20
21 <para>In addition to make sub-devices discoverable, drivers can also choose
22 to make them directly configurable by applications. When both the sub-device
23 driver and the V4L2 device driver support this, sub-devices will feature a
24 character device node on which ioctls can be called to
25 <itemizedlist>
26 <listitem><para>query, read and write sub-devices controls</para></listitem>
27 <listitem><para>subscribe and unsubscribe to events and retrieve them</para></listitem>
28 <listitem><para>negotiate image formats on individual pads</para></listitem>
29 </itemizedlist>
30 </para>
31
32 <para>Sub-device character device nodes, conventionally named
33 <filename>/dev/v4l-subdev*</filename>, use major number 81.</para>
34
35 <section>
36 <title>Controls</title>
37 <para>Most V4L2 controls are implemented by sub-device hardware. Drivers
38 usually merge all controls and expose them through video device nodes.
39 Applications can control all sub-devices through a single interface.</para>
40
41 <para>Complex devices sometimes implement the same control in different
42 pieces of hardware. This situation is common in embedded platforms, where
43 both sensors and image processing hardware implement identical functions,
44 such as contrast adjustment, white balance or faulty pixels correction. As
45 the V4L2 controls API doesn't support several identical controls in a single
46 device, all but one of the identical controls are hidden.</para>
47
48 <para>Applications can access those hidden controls through the sub-device
49 node with the V4L2 control API described in <xref linkend="control" />. The
50 ioctls behave identically as when issued on V4L2 device nodes, with the
51 exception that they deal only with controls implemented in the sub-device.
52 </para>
53
54 <para>Depending on the driver, those controls might also be exposed through
55 one (or several) V4L2 device nodes.</para>
56 </section>
57
58 <section>
59 <title>Events</title>
60 <para>V4L2 sub-devices can notify applications of events as described in
61 <xref linkend="event" />. The API behaves identically as when used on V4L2
62 device nodes, with the exception that it only deals with events generated by
63 the sub-device. Depending on the driver, those events might also be reported
64 on one (or several) V4L2 device nodes.</para>
65 </section>
66
67 <section id="pad-level-formats">
68 <title>Pad-level Formats</title>
69
70 <warning><para>Pad-level formats are only applicable to very complex device that
71 need to expose low-level format configuration to user space. Generic V4L2
72 applications do <emphasis>not</emphasis> need to use the API described in
73 this section.</para></warning>
74
75 <note><para>For the purpose of this section, the term
76 <wordasword>format</wordasword> means the combination of media bus data
77 format, frame width and frame height.</para></note>
78
79 <para>Image formats are typically negotiated on video capture and output
80 devices using the <link linkend="crop">cropping and scaling</link> ioctls.
81 The driver is responsible for configuring every block in the video pipeline
82 according to the requested format at the pipeline input and/or
83 output.</para>
84
85 <para>For complex devices, such as often found in embedded systems,
86 identical image sizes at the output of a pipeline can be achieved using
87 different hardware configurations. One such example is shown on
88 <xref linkend="pipeline-scaling" />, where
89 image scaling can be performed on both the video sensor and the host image
90 processing hardware.</para>
91
92 <figure id="pipeline-scaling">
93 <title>Image Format Negotiation on Pipelines</title>
94 <mediaobject>
95 <imageobject>
96 <imagedata fileref="pipeline.pdf" format="PS" />
97 </imageobject>
98 <imageobject>
99 <imagedata fileref="pipeline.png" format="PNG" />
100 </imageobject>
101 <textobject>
102 <phrase>High quality and high speed pipeline configuration</phrase>
103 </textobject>
104 </mediaobject>
105 </figure>
106
107 <para>The sensor scaler is usually of less quality than the host scaler, but
108 scaling on the sensor is required to achieve higher frame rates. Depending
109 on the use case (quality vs. speed), the pipeline must be configured
110 differently. Applications need to configure the formats at every point in
111 the pipeline explicitly.</para>
112
113 <para>Drivers that implement the <link linkend="media-controller-intro">media
114 API</link> can expose pad-level image format configuration to applications.
115 When they do, applications can use the &VIDIOC-SUBDEV-G-FMT; and
116 &VIDIOC-SUBDEV-S-FMT; ioctls. to negotiate formats on a per-pad basis.</para>
117
118 <para>Applications are responsible for configuring coherent parameters on
119 the whole pipeline and making sure that connected pads have compatible
120 formats. The pipeline is checked for formats mismatch at &VIDIOC-STREAMON;
121 time, and an &EPIPE; is then returned if the configuration is
122 invalid.</para>
123
124 <para>Pad-level image format configuration support can be tested by calling
125 the &VIDIOC-SUBDEV-G-FMT; ioctl on pad 0. If the driver returns an &EINVAL;
126 pad-level format configuration is not supported by the sub-device.</para>
127
128 <section>
129 <title>Format Negotiation</title>
130
131 <para>Acceptable formats on pads can (and usually do) depend on a number
132 of external parameters, such as formats on other pads, active links, or
133 even controls. Finding a combination of formats on all pads in a video
134 pipeline, acceptable to both application and driver, can't rely on formats
135 enumeration only. A format negotiation mechanism is required.</para>
136
137 <para>Central to the format negotiation mechanism are the get/set format
138 operations. When called with the <structfield>which</structfield> argument
139 set to <constant>V4L2_SUBDEV_FORMAT_TRY</constant>, the
140 &VIDIOC-SUBDEV-G-FMT; and &VIDIOC-SUBDEV-S-FMT; ioctls operate on a set of
141 formats parameters that are not connected to the hardware configuration.
142 Modifying those 'try' formats leaves the device state untouched (this
143 applies to both the software state stored in the driver and the hardware
144 state stored in the device itself).</para>
145
146 <para>While not kept as part of the device state, try formats are stored
147 in the sub-device file handles. A &VIDIOC-SUBDEV-G-FMT; call will return
148 the last try format set <emphasis>on the same sub-device file
149 handle</emphasis>. Several applications querying the same sub-device at
150 the same time will thus not interact with each other.</para>
151
152 <para>To find out whether a particular format is supported by the device,
153 applications use the &VIDIOC-SUBDEV-S-FMT; ioctl. Drivers verify and, if
154 needed, change the requested <structfield>format</structfield> based on
155 device requirements and return the possibly modified value. Applications
156 can then choose to try a different format or accept the returned value and
157 continue.</para>
158
159 <para>Formats returned by the driver during a negotiation iteration are
160 guaranteed to be supported by the device. In particular, drivers guarantee
161 that a returned format will not be further changed if passed to an
162 &VIDIOC-SUBDEV-S-FMT; call as-is (as long as external parameters, such as
163 formats on other pads or links' configuration are not changed).</para>
164
165 <para>Drivers automatically propagate formats inside sub-devices. When a
166 try or active format is set on a pad, corresponding formats on other pads
167 of the same sub-device can be modified by the driver. Drivers are free to
168 modify formats as required by the device. However, they should comply with
169 the following rules when possible:
170 <itemizedlist>
171 <listitem><para>Formats should be propagated from sink pads to source pads.
172 Modifying a format on a source pad should not modify the format on any
173 sink pad.</para></listitem>
174 <listitem><para>Sub-devices that scale frames using variable scaling factors
175 should reset the scale factors to default values when sink pads formats
176 are modified. If the 1:1 scaling ratio is supported, this means that
177 source pads formats should be reset to the sink pads formats.</para></listitem>
178 </itemizedlist>
179 </para>
180
181 <para>Formats are not propagated across links, as that would involve
182 propagating them from one sub-device file handle to another. Applications
183 must then take care to configure both ends of every link explicitly with
184 compatible formats. Identical formats on the two ends of a link are
185 guaranteed to be compatible. Drivers are free to accept different formats
186 matching device requirements as being compatible.</para>
187
188 <para><xref linkend="sample-pipeline-config" />
189 shows a sample configuration sequence for the pipeline described in
190 <xref linkend="pipeline-scaling" /> (table
191 columns list entity names and pad numbers).</para>
192
193 <table pgwide="0" frame="none" id="sample-pipeline-config">
194 <title>Sample Pipeline Configuration</title>
195 <tgroup cols="3">
196 <colspec colname="what"/>
197 <colspec colname="sensor-0" />
198 <colspec colname="frontend-0" />
199 <colspec colname="frontend-1" />
200 <colspec colname="scaler-0" />
201 <colspec colname="scaler-1" />
202 <thead>
203 <row>
204 <entry></entry>
205 <entry>Sensor/0</entry>
206 <entry>Frontend/0</entry>
207 <entry>Frontend/1</entry>
208 <entry>Scaler/0</entry>
209 <entry>Scaler/1</entry>
210 </row>
211 </thead>
212 <tbody valign="top">
213 <row>
214 <entry>Initial state</entry>
215 <entry>2048x1536</entry>
216 <entry>-</entry>
217 <entry>-</entry>
218 <entry>-</entry>
219 <entry>-</entry>
220 </row>
221 <row>
222 <entry>Configure frontend input</entry>
223 <entry>2048x1536</entry>
224 <entry><emphasis>2048x1536</emphasis></entry>
225 <entry><emphasis>2046x1534</emphasis></entry>
226 <entry>-</entry>
227 <entry>-</entry>
228 </row>
229 <row>
230 <entry>Configure scaler input</entry>
231 <entry>2048x1536</entry>
232 <entry>2048x1536</entry>
233 <entry>2046x1534</entry>
234 <entry><emphasis>2046x1534</emphasis></entry>
235 <entry><emphasis>2046x1534</emphasis></entry>
236 </row>
237 <row>
238 <entry>Configure scaler output</entry>
239 <entry>2048x1536</entry>
240 <entry>2048x1536</entry>
241 <entry>2046x1534</entry>
242 <entry>2046x1534</entry>
243 <entry><emphasis>1280x960</emphasis></entry>
244 </row>
245 </tbody>
246 </tgroup>
247 </table>
248
249 <para>
250 <orderedlist>
251 <listitem><para>Initial state. The sensor output is set to its native 3MP
252 resolution. Resolutions on the host frontend and scaler input and output
253 pads are undefined.</para></listitem>
254 <listitem><para>The application configures the frontend input pad resolution to
255 2048x1536. The driver propagates the format to the frontend output pad.
256 Note that the propagated output format can be different, as in this case,
257 than the input format, as the hardware might need to crop pixels (for
258 instance when converting a Bayer filter pattern to RGB or YUV).</para></listitem>
259 <listitem><para>The application configures the scaler input pad resolution to
260 2046x1534 to match the frontend output resolution. The driver propagates
261 the format to the scaler output pad.</para></listitem>
262 <listitem><para>The application configures the scaler output pad resolution to
263 1280x960.</para></listitem>
264 </orderedlist>
265 </para>
266
267 <para>When satisfied with the try results, applications can set the active
268 formats by setting the <structfield>which</structfield> argument to
269 <constant>V4L2_SUBDEV_FORMAT_TRY</constant>. Active formats are changed
270 exactly as try formats by drivers. To avoid modifying the hardware state
271 during format negotiation, applications should negotiate try formats first
272 and then modify the active settings using the try formats returned during
273 the last negotiation iteration. This guarantees that the active format
274 will be applied as-is by the driver without being modified.
275 </para>
276 </section>
277
278 <section>
279 <title>Cropping and scaling</title>
280
281 <para>Many sub-devices support cropping frames on their input or output
282 pads (or possible even on both). Cropping is used to select the area of
283 interest in an image, typically on a video sensor or video decoder. It can
284 also be used as part of digital zoom implementations to select the area of
285 the image that will be scaled up.</para>
286
287 <para>Crop settings are defined by a crop rectangle and represented in a
288 &v4l2-rect; by the coordinates of the top left corner and the rectangle
289 size. Both the coordinates and sizes are expressed in pixels.</para>
290
291 <para>The crop rectangle is retrieved and set using the
292 &VIDIOC-SUBDEV-G-CROP; and &VIDIOC-SUBDEV-S-CROP; ioctls. Like for pad
293 formats, drivers store try and active crop rectangles. The format
294 negotiation mechanism applies to crop settings as well.</para>
295
296 <para>On input pads, cropping is applied relatively to the current pad
297 format. The pad format represents the image size as received by the
298 sub-device from the previous block in the pipeline, and the crop rectangle
299 represents the sub-image that will be transmitted further inside the
300 sub-device for processing. The crop rectangle be entirely containted
301 inside the input image size.</para>
302
303 <para>Input crop rectangle are reset to their default value when the input
304 image format is modified. Drivers should use the input image size as the
305 crop rectangle default value, but hardware requirements may prevent this.
306 </para>
307
308 <para>Cropping behaviour on output pads is not defined.</para>
309
310 </section>
311 </section>
312
313 &sub-subdev-formats;
diff --git a/Documentation/DocBook/v4l/func-mmap.xml b/Documentation/DocBook/v4l/func-mmap.xml
index 2e2fc3933aea..786732b64bbd 100644
--- a/Documentation/DocBook/v4l/func-mmap.xml
+++ b/Documentation/DocBook/v4l/func-mmap.xml
@@ -45,7 +45,10 @@ just specify a <constant>NULL</constant> pointer here.</para>
45 <listitem> 45 <listitem>
46 <para>Length of the memory area to map. This must be the 46 <para>Length of the memory area to map. This must be the
47same value as returned by the driver in the &v4l2-buffer; 47same value as returned by the driver in the &v4l2-buffer;
48<structfield>length</structfield> field.</para> 48<structfield>length</structfield> field for the
49single-planar API, and the same value as returned by the driver
50in the &v4l2-plane; <structfield>length</structfield> field for the
51multi-planar API.</para>
49 </listitem> 52 </listitem>
50 </varlistentry> 53 </varlistentry>
51 <varlistentry> 54 <varlistentry>
@@ -106,7 +109,10 @@ flag.</para>
106 <listitem> 109 <listitem>
107 <para>Offset of the buffer in device memory. This must be the 110 <para>Offset of the buffer in device memory. This must be the
108same value as returned by the driver in the &v4l2-buffer; 111same value as returned by the driver in the &v4l2-buffer;
109<structfield>m</structfield> union <structfield>offset</structfield> field.</para> 112<structfield>m</structfield> union <structfield>offset</structfield> field for
113the single-planar API, and the same value as returned by the driver
114in the &v4l2-plane; <structfield>m</structfield> union
115<structfield>mem_offset</structfield> field for the multi-planar API.</para>
110 </listitem> 116 </listitem>
111 </varlistentry> 117 </varlistentry>
112 </variablelist> 118 </variablelist>
diff --git a/Documentation/DocBook/v4l/func-munmap.xml b/Documentation/DocBook/v4l/func-munmap.xml
index 502ed49323b0..e2c4190f9bb6 100644
--- a/Documentation/DocBook/v4l/func-munmap.xml
+++ b/Documentation/DocBook/v4l/func-munmap.xml
@@ -37,7 +37,8 @@
37 <para>Length of the mapped buffer. This must be the same 37 <para>Length of the mapped buffer. This must be the same
38value as given to <function>mmap()</function> and returned by the 38value as given to <function>mmap()</function> and returned by the
39driver in the &v4l2-buffer; <structfield>length</structfield> 39driver in the &v4l2-buffer; <structfield>length</structfield>
40field.</para> 40field for the single-planar API and in the &v4l2-plane;
41<structfield>length</structfield> field for the multi-planar API.</para>
41 </listitem> 42 </listitem>
42 </varlistentry> 43 </varlistentry>
43 </variablelist> 44 </variablelist>
diff --git a/Documentation/DocBook/v4l/io.xml b/Documentation/DocBook/v4l/io.xml
index d424886beda0..227e7ac45a06 100644
--- a/Documentation/DocBook/v4l/io.xml
+++ b/Documentation/DocBook/v4l/io.xml
@@ -121,18 +121,22 @@ mapped.</para>
121 <para>Before applications can access the buffers they must map 121 <para>Before applications can access the buffers they must map
122them into their address space with the &func-mmap; function. The 122them into their address space with the &func-mmap; function. The
123location of the buffers in device memory can be determined with the 123location of the buffers in device memory can be determined with the
124&VIDIOC-QUERYBUF; ioctl. The <structfield>m.offset</structfield> and 124&VIDIOC-QUERYBUF; ioctl. In the single-planar API case, the
125<structfield>length</structfield> returned in a &v4l2-buffer; are 125<structfield>m.offset</structfield> and <structfield>length</structfield>
126passed as sixth and second parameter to the 126returned in a &v4l2-buffer; are passed as sixth and second parameter to the
127<function>mmap()</function> function. The offset and length values 127<function>mmap()</function> function. When using the multi-planar API,
128must not be modified. Remember the buffers are allocated in physical 128struct &v4l2-buffer; contains an array of &v4l2-plane; structures, each
129memory, as opposed to virtual memory which can be swapped out to disk. 129containing its own <structfield>m.offset</structfield> and
130Applications should free the buffers as soon as possible with the 130<structfield>length</structfield>. When using the multi-planar API, every
131&func-munmap; function.</para> 131plane of every buffer has to be mapped separately, so the number of
132calls to &func-mmap; should be equal to number of buffers times number of
133planes in each buffer. The offset and length values must not be modified.
134Remember, the buffers are allocated in physical memory, as opposed to virtual
135memory, which can be swapped out to disk. Applications should free the buffers
136as soon as possible with the &func-munmap; function.</para>
132 137
133 <example> 138 <example>
134 <title>Mapping buffers</title> 139 <title>Mapping buffers in the single-planar API</title>
135
136 <programlisting> 140 <programlisting>
137&v4l2-requestbuffers; reqbuf; 141&v4l2-requestbuffers; reqbuf;
138struct { 142struct {
@@ -141,63 +145,145 @@ struct {
141} *buffers; 145} *buffers;
142unsigned int i; 146unsigned int i;
143 147
144memset (&amp;reqbuf, 0, sizeof (reqbuf)); 148memset(&amp;reqbuf, 0, sizeof(reqbuf));
145reqbuf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; 149reqbuf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
146reqbuf.memory = V4L2_MEMORY_MMAP; 150reqbuf.memory = V4L2_MEMORY_MMAP;
147reqbuf.count = 20; 151reqbuf.count = 20;
148 152
149if (-1 == ioctl (fd, &VIDIOC-REQBUFS;, &amp;reqbuf)) { 153if (-1 == ioctl (fd, &VIDIOC-REQBUFS;, &amp;reqbuf)) {
150 if (errno == EINVAL) 154 if (errno == EINVAL)
151 printf ("Video capturing or mmap-streaming is not supported\n"); 155 printf("Video capturing or mmap-streaming is not supported\n");
152 else 156 else
153 perror ("VIDIOC_REQBUFS"); 157 perror("VIDIOC_REQBUFS");
154 158
155 exit (EXIT_FAILURE); 159 exit(EXIT_FAILURE);
156} 160}
157 161
158/* We want at least five buffers. */ 162/* We want at least five buffers. */
159 163
160if (reqbuf.count &lt; 5) { 164if (reqbuf.count &lt; 5) {
161 /* You may need to free the buffers here. */ 165 /* You may need to free the buffers here. */
162 printf ("Not enough buffer memory\n"); 166 printf("Not enough buffer memory\n");
163 exit (EXIT_FAILURE); 167 exit(EXIT_FAILURE);
164} 168}
165 169
166buffers = calloc (reqbuf.count, sizeof (*buffers)); 170buffers = calloc(reqbuf.count, sizeof(*buffers));
167assert (buffers != NULL); 171assert(buffers != NULL);
168 172
169for (i = 0; i &lt; reqbuf.count; i++) { 173for (i = 0; i &lt; reqbuf.count; i++) {
170 &v4l2-buffer; buffer; 174 &v4l2-buffer; buffer;
171 175
172 memset (&amp;buffer, 0, sizeof (buffer)); 176 memset(&amp;buffer, 0, sizeof(buffer));
173 buffer.type = reqbuf.type; 177 buffer.type = reqbuf.type;
174 buffer.memory = V4L2_MEMORY_MMAP; 178 buffer.memory = V4L2_MEMORY_MMAP;
175 buffer.index = i; 179 buffer.index = i;
176 180
177 if (-1 == ioctl (fd, &VIDIOC-QUERYBUF;, &amp;buffer)) { 181 if (-1 == ioctl (fd, &VIDIOC-QUERYBUF;, &amp;buffer)) {
178 perror ("VIDIOC_QUERYBUF"); 182 perror("VIDIOC_QUERYBUF");
179 exit (EXIT_FAILURE); 183 exit(EXIT_FAILURE);
180 } 184 }
181 185
182 buffers[i].length = buffer.length; /* remember for munmap() */ 186 buffers[i].length = buffer.length; /* remember for munmap() */
183 187
184 buffers[i].start = mmap (NULL, buffer.length, 188 buffers[i].start = mmap(NULL, buffer.length,
185 PROT_READ | PROT_WRITE, /* recommended */ 189 PROT_READ | PROT_WRITE, /* recommended */
186 MAP_SHARED, /* recommended */ 190 MAP_SHARED, /* recommended */
187 fd, buffer.m.offset); 191 fd, buffer.m.offset);
188 192
189 if (MAP_FAILED == buffers[i].start) { 193 if (MAP_FAILED == buffers[i].start) {
190 /* If you do not exit here you should unmap() and free() 194 /* If you do not exit here you should unmap() and free()
191 the buffers mapped so far. */ 195 the buffers mapped so far. */
192 perror ("mmap"); 196 perror("mmap");
193 exit (EXIT_FAILURE); 197 exit(EXIT_FAILURE);
198 }
199}
200
201/* Cleanup. */
202
203for (i = 0; i &lt; reqbuf.count; i++)
204 munmap(buffers[i].start, buffers[i].length);
205 </programlisting>
206 </example>
207
208 <example>
209 <title>Mapping buffers in the multi-planar API</title>
210 <programlisting>
211&v4l2-requestbuffers; reqbuf;
212/* Our current format uses 3 planes per buffer */
213#define FMT_NUM_PLANES = 3;
214
215struct {
216 void *start[FMT_NUM_PLANES];
217 size_t length[FMT_NUM_PLANES];
218} *buffers;
219unsigned int i, j;
220
221memset(&amp;reqbuf, 0, sizeof(reqbuf));
222reqbuf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
223reqbuf.memory = V4L2_MEMORY_MMAP;
224reqbuf.count = 20;
225
226if (ioctl(fd, &VIDIOC-REQBUFS;, &amp;reqbuf) &lt; 0) {
227 if (errno == EINVAL)
228 printf("Video capturing or mmap-streaming is not supported\n");
229 else
230 perror("VIDIOC_REQBUFS");
231
232 exit(EXIT_FAILURE);
233}
234
235/* We want at least five buffers. */
236
237if (reqbuf.count &lt; 5) {
238 /* You may need to free the buffers here. */
239 printf("Not enough buffer memory\n");
240 exit(EXIT_FAILURE);
241}
242
243buffers = calloc(reqbuf.count, sizeof(*buffers));
244assert(buffers != NULL);
245
246for (i = 0; i &lt; reqbuf.count; i++) {
247 &v4l2-buffer; buffer;
248 &v4l2-plane; planes[FMT_NUM_PLANES];
249
250 memset(&amp;buffer, 0, sizeof(buffer));
251 buffer.type = reqbuf.type;
252 buffer.memory = V4L2_MEMORY_MMAP;
253 buffer.index = i;
254 /* length in struct v4l2_buffer in multi-planar API stores the size
255 * of planes array. */
256 buffer.length = FMT_NUM_PLANES;
257 buffer.m.planes = planes;
258
259 if (ioctl(fd, &VIDIOC-QUERYBUF;, &amp;buffer) &lt; 0) {
260 perror("VIDIOC_QUERYBUF");
261 exit(EXIT_FAILURE);
262 }
263
264 /* Every plane has to be mapped separately */
265 for (j = 0; j &lt; FMT_NUM_PLANES; j++) {
266 buffers[i].length[j] = buffer.m.planes[j].length; /* remember for munmap() */
267
268 buffers[i].start[j] = mmap(NULL, buffer.m.planes[j].length,
269 PROT_READ | PROT_WRITE, /* recommended */
270 MAP_SHARED, /* recommended */
271 fd, buffer.m.planes[j].m.offset);
272
273 if (MAP_FAILED == buffers[i].start[j]) {
274 /* If you do not exit here you should unmap() and free()
275 the buffers and planes mapped so far. */
276 perror("mmap");
277 exit(EXIT_FAILURE);
278 }
194 } 279 }
195} 280}
196 281
197/* Cleanup. */ 282/* Cleanup. */
198 283
199for (i = 0; i &lt; reqbuf.count; i++) 284for (i = 0; i &lt; reqbuf.count; i++)
200 munmap (buffers[i].start, buffers[i].length); 285 for (j = 0; j &lt; FMT_NUM_PLANES; j++)
286 munmap(buffers[i].start[j], buffers[i].length[j]);
201 </programlisting> 287 </programlisting>
202 </example> 288 </example>
203 289
@@ -286,13 +372,13 @@ pointer method (not only memory mapping) is supported must be
286determined by calling the &VIDIOC-REQBUFS; ioctl.</para> 372determined by calling the &VIDIOC-REQBUFS; ioctl.</para>
287 373
288 <para>This I/O method combines advantages of the read/write and 374 <para>This I/O method combines advantages of the read/write and
289memory mapping methods. Buffers are allocated by the application 375memory mapping methods. Buffers (planes) are allocated by the application
290itself, and can reside for example in virtual or shared memory. Only 376itself, and can reside for example in virtual or shared memory. Only
291pointers to data are exchanged, these pointers and meta-information 377pointers to data are exchanged, these pointers and meta-information
292are passed in &v4l2-buffer;. The driver must be switched 378are passed in &v4l2-buffer; (or in &v4l2-plane; in the multi-planar API case).
293into user pointer I/O mode by calling the &VIDIOC-REQBUFS; with the 379The driver must be switched into user pointer I/O mode by calling the
294desired buffer type. No buffers are allocated beforehands, 380&VIDIOC-REQBUFS; with the desired buffer type. No buffers (planes) are allocated
295consequently they are not indexed and cannot be queried like mapped 381beforehand, consequently they are not indexed and cannot be queried like mapped
296buffers with the <constant>VIDIOC_QUERYBUF</constant> ioctl.</para> 382buffers with the <constant>VIDIOC_QUERYBUF</constant> ioctl.</para>
297 383
298 <example> 384 <example>
@@ -316,7 +402,7 @@ if (ioctl (fd, &VIDIOC-REQBUFS;, &amp;reqbuf) == -1) {
316 </programlisting> 402 </programlisting>
317 </example> 403 </example>
318 404
319 <para>Buffer addresses and sizes are passed on the fly with the 405 <para>Buffer (plane) addresses and sizes are passed on the fly with the
320&VIDIOC-QBUF; ioctl. Although buffers are commonly cycled, 406&VIDIOC-QBUF; ioctl. Although buffers are commonly cycled,
321applications can pass different addresses and sizes at each 407applications can pass different addresses and sizes at each
322<constant>VIDIOC_QBUF</constant> call. If required by the hardware the 408<constant>VIDIOC_QBUF</constant> call. If required by the hardware the
@@ -396,11 +482,18 @@ rest should be evident.</para>
396 <title>Buffers</title> 482 <title>Buffers</title>
397 483
398 <para>A buffer contains data exchanged by application and 484 <para>A buffer contains data exchanged by application and
399driver using one of the Streaming I/O methods. Only pointers to 485driver using one of the Streaming I/O methods. In the multi-planar API, the
400buffers are exchanged, the data itself is not copied. These pointers, 486data is held in planes, while the buffer structure acts as a container
401together with meta-information like timestamps or field parity, are 487for the planes. Only pointers to buffers (planes) are exchanged, the data
402stored in a struct <structname>v4l2_buffer</structname>, argument to 488itself is not copied. These pointers, together with meta-information like
403the &VIDIOC-QUERYBUF;, &VIDIOC-QBUF; and &VIDIOC-DQBUF; ioctl.</para> 489timestamps or field parity, are stored in a struct
490<structname>v4l2_buffer</structname>, argument to
491the &VIDIOC-QUERYBUF;, &VIDIOC-QBUF; and &VIDIOC-DQBUF; ioctl.
492In the multi-planar API, some plane-specific members of struct
493<structname>v4l2_buffer</structname>, such as pointers and sizes for each
494plane, are stored in struct <structname>v4l2_plane</structname> instead.
495In that case, struct <structname>v4l2_buffer</structname> contains an array of
496plane structures.</para>
404 497
405 <para>Nominally timestamps refer to the first data byte transmitted. 498 <para>Nominally timestamps refer to the first data byte transmitted.
406In practice however the wide range of hardware covered by the V4L2 API 499In practice however the wide range of hardware covered by the V4L2 API
@@ -551,26 +644,40 @@ in accordance with the selected I/O method.</entry>
551 <entry></entry> 644 <entry></entry>
552 <entry>__u32</entry> 645 <entry>__u32</entry>
553 <entry><structfield>offset</structfield></entry> 646 <entry><structfield>offset</structfield></entry>
554 <entry>When <structfield>memory</structfield> is 647 <entry>For the single-planar API and when
555<constant>V4L2_MEMORY_MMAP</constant> this is the offset of the buffer 648<structfield>memory</structfield> is <constant>V4L2_MEMORY_MMAP</constant> this
556from the start of the device memory. The value is returned by the 649is the offset of the buffer from the start of the device memory. The value is
557driver and apart of serving as parameter to the &func-mmap; function 650returned by the driver and apart of serving as parameter to the &func-mmap;
558not useful for applications. See <xref linkend="mmap" /> for details.</entry> 651function not useful for applications. See <xref linkend="mmap" /> for details
652 </entry>
559 </row> 653 </row>
560 <row> 654 <row>
561 <entry></entry> 655 <entry></entry>
562 <entry>unsigned long</entry> 656 <entry>unsigned long</entry>
563 <entry><structfield>userptr</structfield></entry> 657 <entry><structfield>userptr</structfield></entry>
564 <entry>When <structfield>memory</structfield> is 658 <entry>For the single-planar API and when
565<constant>V4L2_MEMORY_USERPTR</constant> this is a pointer to the 659<structfield>memory</structfield> is <constant>V4L2_MEMORY_USERPTR</constant>
566buffer (casted to unsigned long type) in virtual memory, set by the 660this is a pointer to the buffer (casted to unsigned long type) in virtual
567application. See <xref linkend="userp" /> for details.</entry> 661memory, set by the application. See <xref linkend="userp" /> for details.
662 </entry>
663 </row>
664 <row>
665 <entry></entry>
666 <entry>struct v4l2_plane</entry>
667 <entry><structfield>*planes</structfield></entry>
668 <entry>When using the multi-planar API, contains a userspace pointer
669 to an array of &v4l2-plane;. The size of the array should be put
670 in the <structfield>length</structfield> field of this
671 <structname>v4l2_buffer</structname> structure.</entry>
568 </row> 672 </row>
569 <row> 673 <row>
570 <entry>__u32</entry> 674 <entry>__u32</entry>
571 <entry><structfield>length</structfield></entry> 675 <entry><structfield>length</structfield></entry>
572 <entry></entry> 676 <entry></entry>
573 <entry>Size of the buffer (not the payload) in bytes.</entry> 677 <entry>Size of the buffer (not the payload) in bytes for the
678 single-planar API. For the multi-planar API should contain the
679 number of elements in the <structfield>planes</structfield> array.
680 </entry>
574 </row> 681 </row>
575 <row> 682 <row>
576 <entry>__u32</entry> 683 <entry>__u32</entry>
@@ -596,6 +703,66 @@ should set this to 0.</entry>
596 </tgroup> 703 </tgroup>
597 </table> 704 </table>
598 705
706 <table frame="none" pgwide="1" id="v4l2-plane">
707 <title>struct <structname>v4l2_plane</structname></title>
708 <tgroup cols="4">
709 &cs-ustr;
710 <tbody valign="top">
711 <row>
712 <entry>__u32</entry>
713 <entry><structfield>bytesused</structfield></entry>
714 <entry></entry>
715 <entry>The number of bytes occupied by data in the plane
716 (its payload).</entry>
717 </row>
718 <row>
719 <entry>__u32</entry>
720 <entry><structfield>length</structfield></entry>
721 <entry></entry>
722 <entry>Size in bytes of the plane (not its payload).</entry>
723 </row>
724 <row>
725 <entry>union</entry>
726 <entry><structfield>m</structfield></entry>
727 <entry></entry>
728 <entry></entry>
729 </row>
730 <row>
731 <entry></entry>
732 <entry>__u32</entry>
733 <entry><structfield>mem_offset</structfield></entry>
734 <entry>When the memory type in the containing &v4l2-buffer; is
735 <constant>V4L2_MEMORY_MMAP</constant>, this is the value that
736 should be passed to &func-mmap;, similar to the
737 <structfield>offset</structfield> field in &v4l2-buffer;.</entry>
738 </row>
739 <row>
740 <entry></entry>
741 <entry>__unsigned long</entry>
742 <entry><structfield>userptr</structfield></entry>
743 <entry>When the memory type in the containing &v4l2-buffer; is
744 <constant>V4L2_MEMORY_USERPTR</constant>, this is a userspace
745 pointer to the memory allocated for this plane by an application.
746 </entry>
747 </row>
748 <row>
749 <entry>__u32</entry>
750 <entry><structfield>data_offset</structfield></entry>
751 <entry></entry>
752 <entry>Offset in bytes to video data in the plane, if applicable.
753 </entry>
754 </row>
755 <row>
756 <entry>__u32</entry>
757 <entry><structfield>reserved[11]</structfield></entry>
758 <entry></entry>
759 <entry>Reserved for future use. Should be zeroed by an
760 application.</entry>
761 </row>
762 </tbody>
763 </tgroup>
764 </table>
765
599 <table frame="none" pgwide="1" id="v4l2-buf-type"> 766 <table frame="none" pgwide="1" id="v4l2-buf-type">
600 <title>enum v4l2_buf_type</title> 767 <title>enum v4l2_buf_type</title>
601 <tgroup cols="3"> 768 <tgroup cols="3">
@@ -604,13 +771,27 @@ should set this to 0.</entry>
604 <row> 771 <row>
605 <entry><constant>V4L2_BUF_TYPE_VIDEO_CAPTURE</constant></entry> 772 <entry><constant>V4L2_BUF_TYPE_VIDEO_CAPTURE</constant></entry>
606 <entry>1</entry> 773 <entry>1</entry>
607 <entry>Buffer of a video capture stream, see <xref 774 <entry>Buffer of a single-planar video capture stream, see <xref
775 linkend="capture" />.</entry>
776 </row>
777 <row>
778 <entry><constant>V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE</constant>
779 </entry>
780 <entry>9</entry>
781 <entry>Buffer of a multi-planar video capture stream, see <xref
608 linkend="capture" />.</entry> 782 linkend="capture" />.</entry>
609 </row> 783 </row>
610 <row> 784 <row>
611 <entry><constant>V4L2_BUF_TYPE_VIDEO_OUTPUT</constant></entry> 785 <entry><constant>V4L2_BUF_TYPE_VIDEO_OUTPUT</constant></entry>
612 <entry>2</entry> 786 <entry>2</entry>
613 <entry>Buffer of a video output stream, see <xref 787 <entry>Buffer of a single-planar video output stream, see <xref
788 linkend="output" />.</entry>
789 </row>
790 <row>
791 <entry><constant>V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE</constant>
792 </entry>
793 <entry>10</entry>
794 <entry>Buffer of a multi-planar video output stream, see <xref
614 linkend="output" />.</entry> 795 linkend="output" />.</entry>
615 </row> 796 </row>
616 <row> 797 <row>
diff --git a/Documentation/DocBook/v4l/libv4l.xml b/Documentation/DocBook/v4l/libv4l.xml
index c14fc3db2a81..3cb10ec51929 100644
--- a/Documentation/DocBook/v4l/libv4l.xml
+++ b/Documentation/DocBook/v4l/libv4l.xml
@@ -140,7 +140,7 @@ and is not locked sets the cid to the scaled value.
140 <para>int v4l2_get_control(int fd, int cid) - 140 <para>int v4l2_get_control(int fd, int cid) -
141This function returns a value of 0 - 65535, scaled to from the actual range 141This function returns a value of 0 - 65535, scaled to from the actual range
142of the given v4l control id. when the cid does not exist, could not be 142of the given v4l control id. when the cid does not exist, could not be
143accessed for some reason, or some error occured 0 is returned. 143accessed for some reason, or some error occurred 0 is returned.
144</para></listitem> 144</para></listitem>
145</itemizedlist> 145</itemizedlist>
146 </section> 146 </section>
diff --git a/Documentation/DocBook/v4l/lirc_device_interface.xml b/Documentation/DocBook/v4l/lirc_device_interface.xml
index 68134c0ab4d1..0e0453f39e73 100644
--- a/Documentation/DocBook/v4l/lirc_device_interface.xml
+++ b/Documentation/DocBook/v4l/lirc_device_interface.xml
@@ -45,7 +45,7 @@ describing an IR signal are read from the chardev.</para>
45<para>The data written to the chardev is a pulse/space sequence of integer 45<para>The data written to the chardev is a pulse/space sequence of integer
46values. Pulses and spaces are only marked implicitly by their position. The 46values. Pulses and spaces are only marked implicitly by their position. The
47data must start and end with a pulse, therefore, the data must always include 47data must start and end with a pulse, therefore, the data must always include
48an unevent number of samples. The write function must block until the data has 48an uneven number of samples. The write function must block until the data has
49been transmitted by the hardware.</para> 49been transmitted by the hardware.</para>
50</section> 50</section>
51 51
diff --git a/Documentation/DocBook/v4l/media-controller.xml b/Documentation/DocBook/v4l/media-controller.xml
new file mode 100644
index 000000000000..2dc25e1d4089
--- /dev/null
+++ b/Documentation/DocBook/v4l/media-controller.xml
@@ -0,0 +1,89 @@
1<partinfo>
2 <authorgroup>
3 <author>
4 <firstname>Laurent</firstname>
5 <surname>Pinchart</surname>
6 <affiliation><address><email>laurent.pinchart@ideasonboard.com</email></address></affiliation>
7 <contrib>Initial version.</contrib>
8 </author>
9 </authorgroup>
10 <copyright>
11 <year>2010</year>
12 <holder>Laurent Pinchart</holder>
13 </copyright>
14
15 <revhistory>
16 <!-- Put document revisions here, newest first. -->
17 <revision>
18 <revnumber>1.0.0</revnumber>
19 <date>2010-11-10</date>
20 <authorinitials>lp</authorinitials>
21 <revremark>Initial revision</revremark>
22 </revision>
23 </revhistory>
24</partinfo>
25
26<title>Media Controller API</title>
27
28<chapter id="media_controller">
29 <title>Media Controller</title>
30
31 <section id="media-controller-intro">
32 <title>Introduction</title>
33 <para>Media devices increasingly handle multiple related functions. Many USB
34 cameras include microphones, video capture hardware can also output video,
35 or SoC camera interfaces also perform memory-to-memory operations similar to
36 video codecs.</para>
37 <para>Independent functions, even when implemented in the same hardware, can
38 be modelled as separate devices. A USB camera with a microphone will be
39 presented to userspace applications as V4L2 and ALSA capture devices. The
40 devices' relationships (when using a webcam, end-users shouldn't have to
41 manually select the associated USB microphone), while not made available
42 directly to applications by the drivers, can usually be retrieved from
43 sysfs.</para>
44 <para>With more and more advanced SoC devices being introduced, the current
45 approach will not scale. Device topologies are getting increasingly complex
46 and can't always be represented by a tree structure. Hardware blocks are
47 shared between different functions, creating dependencies between seemingly
48 unrelated devices.</para>
49 <para>Kernel abstraction APIs such as V4L2 and ALSA provide means for
50 applications to access hardware parameters. As newer hardware expose an
51 increasingly high number of those parameters, drivers need to guess what
52 applications really require based on limited information, thereby
53 implementing policies that belong to userspace.</para>
54 <para>The media controller API aims at solving those problems.</para>
55 </section>
56
57 <section id="media-controller-model">
58 <title>Media device model</title>
59 <para>Discovering a device internal topology, and configuring it at runtime,
60 is one of the goals of the media controller API. To achieve this, hardware
61 devices are modelled as an oriented graph of building blocks called entities
62 connected through pads.</para>
63 <para>An entity is a basic media hardware or software building block. It can
64 correspond to a large variety of logical blocks such as physical hardware
65 devices (CMOS sensor for instance), logical hardware devices (a building
66 block in a System-on-Chip image processing pipeline), DMA channels or
67 physical connectors.</para>
68 <para>A pad is a connection endpoint through which an entity can interact
69 with other entities. Data (not restricted to video) produced by an entity
70 flows from the entity's output to one or more entity inputs. Pads should not
71 be confused with physical pins at chip boundaries.</para>
72 <para>A link is a point-to-point oriented connection between two pads,
73 either on the same entity or on different entities. Data flows from a source
74 pad to a sink pad.</para>
75 </section>
76</chapter>
77
78<appendix id="media-user-func">
79 <title>Function Reference</title>
80 <!-- Keep this alphabetically sorted. -->
81 &sub-media-open;
82 &sub-media-close;
83 &sub-media-ioctl;
84 <!-- All ioctls go here. -->
85 &sub-media-ioc-device-info;
86 &sub-media-ioc-enum-entities;
87 &sub-media-ioc-enum-links;
88 &sub-media-ioc-setup-link;
89</appendix>
diff --git a/Documentation/DocBook/v4l/media-func-close.xml b/Documentation/DocBook/v4l/media-func-close.xml
new file mode 100644
index 000000000000..be149c802aeb
--- /dev/null
+++ b/Documentation/DocBook/v4l/media-func-close.xml
@@ -0,0 +1,59 @@
1<refentry id="media-func-close">
2 <refmeta>
3 <refentrytitle>media close()</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>media-close</refname>
9 <refpurpose>Close a media device</refpurpose>
10 </refnamediv>
11
12 <refsynopsisdiv>
13 <funcsynopsis>
14 <funcsynopsisinfo>#include &lt;unistd.h&gt;</funcsynopsisinfo>
15 <funcprototype>
16 <funcdef>int <function>close</function></funcdef>
17 <paramdef>int <parameter>fd</parameter></paramdef>
18 </funcprototype>
19 </funcsynopsis>
20 </refsynopsisdiv>
21
22 <refsect1>
23 <title>Arguments</title>
24
25 <variablelist>
26 <varlistentry>
27 <term><parameter>fd</parameter></term>
28 <listitem>
29 <para>&fd;</para>
30 </listitem>
31 </varlistentry>
32 </variablelist>
33 </refsect1>
34
35 <refsect1>
36 <title>Description</title>
37
38 <para>Closes the media device. Resources associated with the file descriptor
39 are freed. The device configuration remain unchanged.</para>
40 </refsect1>
41
42 <refsect1>
43 <title>Return Value</title>
44
45 <para><function>close</function> returns 0 on success. On error, -1 is
46 returned, and <varname>errno</varname> is set appropriately. Possible error
47 codes are:</para>
48
49 <variablelist>
50 <varlistentry>
51 <term><errorcode>EBADF</errorcode></term>
52 <listitem>
53 <para><parameter>fd</parameter> is not a valid open file descriptor.
54 </para>
55 </listitem>
56 </varlistentry>
57 </variablelist>
58 </refsect1>
59</refentry>
diff --git a/Documentation/DocBook/v4l/media-func-ioctl.xml b/Documentation/DocBook/v4l/media-func-ioctl.xml
new file mode 100644
index 000000000000..bda8604de15c
--- /dev/null
+++ b/Documentation/DocBook/v4l/media-func-ioctl.xml
@@ -0,0 +1,116 @@
1<refentry id="media-func-ioctl">
2 <refmeta>
3 <refentrytitle>media ioctl()</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>media-ioctl</refname>
9 <refpurpose>Control a media device</refpurpose>
10 </refnamediv>
11
12 <refsynopsisdiv>
13 <funcsynopsis>
14 <funcsynopsisinfo>#include &lt;sys/ioctl.h&gt;</funcsynopsisinfo>
15 <funcprototype>
16 <funcdef>int <function>ioctl</function></funcdef>
17 <paramdef>int <parameter>fd</parameter></paramdef>
18 <paramdef>int <parameter>request</parameter></paramdef>
19 <paramdef>void *<parameter>argp</parameter></paramdef>
20 </funcprototype>
21 </funcsynopsis>
22 </refsynopsisdiv>
23
24 <refsect1>
25 <title>Arguments</title>
26
27 <variablelist>
28 <varlistentry>
29 <term><parameter>fd</parameter></term>
30 <listitem>
31 <para>&fd;</para>
32 </listitem>
33 </varlistentry>
34 <varlistentry>
35 <term><parameter>request</parameter></term>
36 <listitem>
37 <para>Media ioctl request code as defined in the media.h header file,
38 for example MEDIA_IOC_SETUP_LINK.</para>
39 </listitem>
40 </varlistentry>
41 <varlistentry>
42 <term><parameter>argp</parameter></term>
43 <listitem>
44 <para>Pointer to a request-specific structure.</para>
45 </listitem>
46 </varlistentry>
47 </variablelist>
48 </refsect1>
49
50 <refsect1>
51 <title>Description</title>
52 <para>The <function>ioctl()</function> function manipulates media device
53 parameters. The argument <parameter>fd</parameter> must be an open file
54 descriptor.</para>
55 <para>The ioctl <parameter>request</parameter> code specifies the media
56 function to be called. It has encoded in it whether the argument is an
57 input, output or read/write parameter, and the size of the argument
58 <parameter>argp</parameter> in bytes.</para>
59 <para>Macros and structures definitions specifying media ioctl requests and
60 their parameters are located in the media.h header file. All media ioctl
61 requests, their respective function and parameters are specified in
62 <xref linkend="media-user-func" />.</para>
63 </refsect1>
64
65 <refsect1>
66 <title>Return Value</title>
67
68 <para><function>ioctl()</function> returns <returnvalue>0</returnvalue> on
69 success. On failure, <returnvalue>-1</returnvalue> is returned, and the
70 <varname>errno</varname> variable is set appropriately. Generic error codes
71 are listed below, and request-specific error codes are listed in the
72 individual requests descriptions.</para>
73 <para>When an ioctl that takes an output or read/write parameter fails,
74 the parameter remains unmodified.</para>
75
76 <variablelist>
77 <varlistentry>
78 <term><errorcode>EBADF</errorcode></term>
79 <listitem>
80 <para><parameter>fd</parameter> is not a valid open file descriptor.
81 </para>
82 </listitem>
83 </varlistentry>
84 <varlistentry>
85 <term><errorcode>EFAULT</errorcode></term>
86 <listitem>
87 <para><parameter>argp</parameter> references an inaccessible memory
88 area.</para>
89 </listitem>
90 </varlistentry>
91 <varlistentry>
92 <term><errorcode>EINVAL</errorcode></term>
93 <listitem>
94 <para>The <parameter>request</parameter> or the data pointed to by
95 <parameter>argp</parameter> is not valid. This is a very common error
96 code, see the individual ioctl requests listed in
97 <xref linkend="media-user-func" /> for actual causes.</para>
98 </listitem>
99 </varlistentry>
100 <varlistentry>
101 <term><errorcode>ENOMEM</errorcode></term>
102 <listitem>
103 <para>Insufficient kernel memory was available to complete the
104 request.</para>
105 </listitem>
106 </varlistentry>
107 <varlistentry>
108 <term><errorcode>ENOTTY</errorcode></term>
109 <listitem>
110 <para><parameter>fd</parameter> is not associated with a character
111 special device.</para>
112 </listitem>
113 </varlistentry>
114 </variablelist>
115 </refsect1>
116</refentry>
diff --git a/Documentation/DocBook/v4l/media-func-open.xml b/Documentation/DocBook/v4l/media-func-open.xml
new file mode 100644
index 000000000000..f7df034dc9ed
--- /dev/null
+++ b/Documentation/DocBook/v4l/media-func-open.xml
@@ -0,0 +1,94 @@
1<refentry id="media-func-open">
2 <refmeta>
3 <refentrytitle>media open()</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>media-open</refname>
9 <refpurpose>Open a media device</refpurpose>
10 </refnamediv>
11
12 <refsynopsisdiv>
13 <funcsynopsis>
14 <funcsynopsisinfo>#include &lt;fcntl.h&gt;</funcsynopsisinfo>
15 <funcprototype>
16 <funcdef>int <function>open</function></funcdef>
17 <paramdef>const char *<parameter>device_name</parameter></paramdef>
18 <paramdef>int <parameter>flags</parameter></paramdef>
19 </funcprototype>
20 </funcsynopsis>
21 </refsynopsisdiv>
22
23 <refsect1>
24 <title>Arguments</title>
25
26 <variablelist>
27 <varlistentry>
28 <term><parameter>device_name</parameter></term>
29 <listitem>
30 <para>Device to be opened.</para>
31 </listitem>
32 </varlistentry>
33 <varlistentry>
34 <term><parameter>flags</parameter></term>
35 <listitem>
36 <para>Open flags. Access mode must be either <constant>O_RDONLY</constant>
37 or <constant>O_RDWR</constant>. Other flags have no effect.</para>
38 </listitem>
39 </varlistentry>
40 </variablelist>
41 </refsect1>
42 <refsect1>
43 <title>Description</title>
44 <para>To open a media device applications call <function>open()</function>
45 with the desired device name. The function has no side effects; the device
46 configuration remain unchanged.</para>
47 <para>When the device is opened in read-only mode, attemps to modify its
48 configuration will result in an error, and <varname>errno</varname> will be
49 set to <errorcode>EBADF</errorcode>.</para>
50 </refsect1>
51 <refsect1>
52 <title>Return Value</title>
53
54 <para><function>open</function> returns the new file descriptor on success.
55 On error, -1 is returned, and <varname>errno</varname> is set appropriately.
56 Possible error codes are:</para>
57
58 <variablelist>
59 <varlistentry>
60 <term><errorcode>EACCES</errorcode></term>
61 <listitem>
62 <para>The requested access to the file is not allowed.</para>
63 </listitem>
64 </varlistentry>
65 <varlistentry>
66 <term><errorcode>EMFILE</errorcode></term>
67 <listitem>
68 <para>The process already has the maximum number of files open.
69 </para>
70 </listitem>
71 </varlistentry>
72 <varlistentry>
73 <term><errorcode>ENFILE</errorcode></term>
74 <listitem>
75 <para>The system limit on the total number of open files has been
76 reached.</para>
77 </listitem>
78 </varlistentry>
79 <varlistentry>
80 <term><errorcode>ENOMEM</errorcode></term>
81 <listitem>
82 <para>Insufficient kernel memory was available.</para>
83 </listitem>
84 </varlistentry>
85 <varlistentry>
86 <term><errorcode>ENXIO</errorcode></term>
87 <listitem>
88 <para>No device corresponding to this device special file exists.
89 </para>
90 </listitem>
91 </varlistentry>
92 </variablelist>
93 </refsect1>
94</refentry>
diff --git a/Documentation/DocBook/v4l/media-ioc-device-info.xml b/Documentation/DocBook/v4l/media-ioc-device-info.xml
new file mode 100644
index 000000000000..1f3237351bba
--- /dev/null
+++ b/Documentation/DocBook/v4l/media-ioc-device-info.xml
@@ -0,0 +1,133 @@
1<refentry id="media-ioc-device-info">
2 <refmeta>
3 <refentrytitle>ioctl MEDIA_IOC_DEVICE_INFO</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>MEDIA_IOC_DEVICE_INFO</refname>
9 <refpurpose>Query device information</refpurpose>
10 </refnamediv>
11
12 <refsynopsisdiv>
13 <funcsynopsis>
14 <funcprototype>
15 <funcdef>int <function>ioctl</function></funcdef>
16 <paramdef>int <parameter>fd</parameter></paramdef>
17 <paramdef>int <parameter>request</parameter></paramdef>
18 <paramdef>struct media_device_info *<parameter>argp</parameter></paramdef>
19 </funcprototype>
20 </funcsynopsis>
21 </refsynopsisdiv>
22
23 <refsect1>
24 <title>Arguments</title>
25
26 <variablelist>
27 <varlistentry>
28 <term><parameter>fd</parameter></term>
29 <listitem>
30 <para>File descriptor returned by
31 <link linkend='media-func-open'><function>open()</function></link>.</para>
32 </listitem>
33 </varlistentry>
34 <varlistentry>
35 <term><parameter>request</parameter></term>
36 <listitem>
37 <para>MEDIA_IOC_DEVICE_INFO</para>
38 </listitem>
39 </varlistentry>
40 <varlistentry>
41 <term><parameter>argp</parameter></term>
42 <listitem>
43 <para></para>
44 </listitem>
45 </varlistentry>
46 </variablelist>
47 </refsect1>
48
49 <refsect1>
50 <title>Description</title>
51
52 <para>All media devices must support the <constant>MEDIA_IOC_DEVICE_INFO</constant>
53 ioctl. To query device information, applications call the ioctl with a
54 pointer to a &media-device-info;. The driver fills the structure and returns
55 the information to the application.
56 The ioctl never fails.</para>
57
58 <table pgwide="1" frame="none" id="media-device-info">
59 <title>struct <structname>media_device_info</structname></title>
60 <tgroup cols="3">
61 &cs-str;
62 <tbody valign="top">
63 <row>
64 <entry>char</entry>
65 <entry><structfield>driver</structfield>[16]</entry>
66 <entry><para>Name of the driver implementing the media API as a
67 NUL-terminated ASCII string. The driver version is stored in the
68 <structfield>driver_version</structfield> field.</para>
69 <para>Driver specific applications can use this information to
70 verify the driver identity. It is also useful to work around
71 known bugs, or to identify drivers in error reports.</para></entry>
72 </row>
73 <row>
74 <entry>char</entry>
75 <entry><structfield>model</structfield>[32]</entry>
76 <entry>Device model name as a NUL-terminated UTF-8 string. The
77 device version is stored in the <structfield>device_version</structfield>
78 field and is not be appended to the model name.</entry>
79 </row>
80 <row>
81 <entry>char</entry>
82 <entry><structfield>serial</structfield>[40]</entry>
83 <entry>Serial number as a NUL-terminated ASCII string.</entry>
84 </row>
85 <row>
86 <entry>char</entry>
87 <entry><structfield>bus_info</structfield>[32]</entry>
88 <entry>Location of the device in the system as a NUL-terminated
89 ASCII string. This includes the bus type name (PCI, USB, ...) and a
90 bus-specific identifier.</entry>
91 </row>
92 <row>
93 <entry>__u32</entry>
94 <entry><structfield>media_version</structfield></entry>
95 <entry>Media API version, formatted with the
96 <constant>KERNEL_VERSION()</constant> macro.</entry>
97 </row>
98 <row>
99 <entry>__u32</entry>
100 <entry><structfield>hw_revision</structfield></entry>
101 <entry>Hardware device revision in a driver-specific format.</entry>
102 </row>
103 <row>
104 <entry>__u32</entry>
105 <entry><structfield>media_version</structfield></entry>
106 <entry>Media device driver version, formatted with the
107 <constant>KERNEL_VERSION()</constant> macro. Together with the
108 <structfield>driver</structfield> field this identifies a particular
109 driver.</entry>
110 </row>
111 <row>
112 <entry>__u32</entry>
113 <entry><structfield>reserved</structfield>[31]</entry>
114 <entry>Reserved for future extensions. Drivers and applications must
115 set this array to zero.</entry>
116 </row>
117 </tbody>
118 </tgroup>
119 </table>
120 <para>The <structfield>serial</structfield> and <structfield>bus_info</structfield>
121 fields can be used to distinguish between multiple instances of otherwise
122 identical hardware. The serial number takes precedence when provided and can
123 be assumed to be unique. If the serial number is an empty string, the
124 <structfield>bus_info</structfield> field can be used instead. The
125 <structfield>bus_info</structfield> field is guaranteed to be unique, but
126 can vary across reboots or device unplug/replug.</para>
127 </refsect1>
128
129 <refsect1>
130 <title>Return value</title>
131 <para>This function doesn't return specific error codes.</para>
132 </refsect1>
133</refentry>
diff --git a/Documentation/DocBook/v4l/media-ioc-enum-entities.xml b/Documentation/DocBook/v4l/media-ioc-enum-entities.xml
new file mode 100644
index 000000000000..576b68b33f2c
--- /dev/null
+++ b/Documentation/DocBook/v4l/media-ioc-enum-entities.xml
@@ -0,0 +1,308 @@
1<refentry id="media-ioc-enum-entities">
2 <refmeta>
3 <refentrytitle>ioctl MEDIA_IOC_ENUM_ENTITIES</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>MEDIA_IOC_ENUM_ENTITIES</refname>
9 <refpurpose>Enumerate entities and their properties</refpurpose>
10 </refnamediv>
11
12 <refsynopsisdiv>
13 <funcsynopsis>
14 <funcprototype>
15 <funcdef>int <function>ioctl</function></funcdef>
16 <paramdef>int <parameter>fd</parameter></paramdef>
17 <paramdef>int <parameter>request</parameter></paramdef>
18 <paramdef>struct media_entity_desc *<parameter>argp</parameter></paramdef>
19 </funcprototype>
20 </funcsynopsis>
21 </refsynopsisdiv>
22
23 <refsect1>
24 <title>Arguments</title>
25
26 <variablelist>
27 <varlistentry>
28 <term><parameter>fd</parameter></term>
29 <listitem>
30 <para>File descriptor returned by
31 <link linkend='media-func-open'><function>open()</function></link>.</para>
32 </listitem>
33 </varlistentry>
34 <varlistentry>
35 <term><parameter>request</parameter></term>
36 <listitem>
37 <para>MEDIA_IOC_ENUM_ENTITIES</para>
38 </listitem>
39 </varlistentry>
40 <varlistentry>
41 <term><parameter>argp</parameter></term>
42 <listitem>
43 <para></para>
44 </listitem>
45 </varlistentry>
46 </variablelist>
47 </refsect1>
48
49 <refsect1>
50 <title>Description</title>
51 <para>To query the attributes of an entity, applications set the id field
52 of a &media-entity-desc; structure and call the MEDIA_IOC_ENUM_ENTITIES
53 ioctl with a pointer to this structure. The driver fills the rest of the
54 structure or returns an &EINVAL; when the id is invalid.</para>
55 <para>Entities can be enumerated by or'ing the id with the
56 <constant>MEDIA_ENT_ID_FLAG_NEXT</constant> flag. The driver will return
57 information about the entity with the smallest id strictly larger than the
58 requested one ('next entity'), or the &EINVAL; if there is none.</para>
59 <para>Entity IDs can be non-contiguous. Applications must
60 <emphasis>not</emphasis> try to enumerate entities by calling
61 MEDIA_IOC_ENUM_ENTITIES with increasing id's until they get an error.</para>
62 <para>Two or more entities that share a common non-zero
63 <structfield>group_id</structfield> value are considered as logically
64 grouped. Groups are used to report
65 <itemizedlist>
66 <listitem><para>ALSA, VBI and video nodes that carry the same media
67 stream</para></listitem>
68 <listitem><para>lens and flash controllers associated with a sensor</para></listitem>
69 </itemizedlist>
70 </para>
71
72 <table pgwide="1" frame="none" id="media-entity-desc">
73 <title>struct <structname>media_entity_desc</structname></title>
74 <tgroup cols="5">
75 <colspec colname="c1" />
76 <colspec colname="c2" />
77 <colspec colname="c3" />
78 <colspec colname="c4" />
79 <colspec colname="c5" />
80 <tbody valign="top">
81 <row>
82 <entry>__u32</entry>
83 <entry><structfield>id</structfield></entry>
84 <entry></entry>
85 <entry></entry>
86 <entry>Entity id, set by the application. When the id is or'ed with
87 <constant>MEDIA_ENT_ID_FLAG_NEXT</constant>, the driver clears the
88 flag and returns the first entity with a larger id.</entry>
89 </row>
90 <row>
91 <entry>char</entry>
92 <entry><structfield>name</structfield>[32]</entry>
93 <entry></entry>
94 <entry></entry>
95 <entry>Entity name as an UTF-8 NULL-terminated string.</entry>
96 </row>
97 <row>
98 <entry>__u32</entry>
99 <entry><structfield>type</structfield></entry>
100 <entry></entry>
101 <entry></entry>
102 <entry>Entity type, see <xref linkend="media-entity-type" /> for details.</entry>
103 </row>
104 <row>
105 <entry>__u32</entry>
106 <entry><structfield>revision</structfield></entry>
107 <entry></entry>
108 <entry></entry>
109 <entry>Entity revision in a driver/hardware specific format.</entry>
110 </row>
111 <row>
112 <entry>__u32</entry>
113 <entry><structfield>flags</structfield></entry>
114 <entry></entry>
115 <entry></entry>
116 <entry>Entity flags, see <xref linkend="media-entity-flag" /> for details.</entry>
117 </row>
118 <row>
119 <entry>__u32</entry>
120 <entry><structfield>group_id</structfield></entry>
121 <entry></entry>
122 <entry></entry>
123 <entry>Entity group ID</entry>
124 </row>
125 <row>
126 <entry>__u16</entry>
127 <entry><structfield>pads</structfield></entry>
128 <entry></entry>
129 <entry></entry>
130 <entry>Number of pads</entry>
131 </row>
132 <row>
133 <entry>__u16</entry>
134 <entry><structfield>links</structfield></entry>
135 <entry></entry>
136 <entry></entry>
137 <entry>Total number of outbound links. Inbound links are not counted
138 in this field.</entry>
139 </row>
140 <row>
141 <entry>union</entry>
142 </row>
143 <row>
144 <entry></entry>
145 <entry>struct</entry>
146 <entry><structfield>v4l</structfield></entry>
147 <entry></entry>
148 <entry>Valid for V4L sub-devices and nodes only.</entry>
149 </row>
150 <row>
151 <entry></entry>
152 <entry></entry>
153 <entry>__u32</entry>
154 <entry><structfield>major</structfield></entry>
155 <entry>V4L device node major number. For V4L sub-devices with no
156 device node, set by the driver to 0.</entry>
157 </row>
158 <row>
159 <entry></entry>
160 <entry></entry>
161 <entry>__u32</entry>
162 <entry><structfield>minor</structfield></entry>
163 <entry>V4L device node minor number. For V4L sub-devices with no
164 device node, set by the driver to 0.</entry>
165 </row>
166 <row>
167 <entry></entry>
168 <entry>struct</entry>
169 <entry><structfield>fb</structfield></entry>
170 <entry></entry>
171 <entry>Valid for frame buffer nodes only.</entry>
172 </row>
173 <row>
174 <entry></entry>
175 <entry></entry>
176 <entry>__u32</entry>
177 <entry><structfield>major</structfield></entry>
178 <entry>Frame buffer device node major number.</entry>
179 </row>
180 <row>
181 <entry></entry>
182 <entry></entry>
183 <entry>__u32</entry>
184 <entry><structfield>minor</structfield></entry>
185 <entry>Frame buffer device node minor number.</entry>
186 </row>
187 <row>
188 <entry></entry>
189 <entry>struct</entry>
190 <entry><structfield>alsa</structfield></entry>
191 <entry></entry>
192 <entry>Valid for ALSA devices only.</entry>
193 </row>
194 <row>
195 <entry></entry>
196 <entry></entry>
197 <entry>__u32</entry>
198 <entry><structfield>card</structfield></entry>
199 <entry>ALSA card number</entry>
200 </row>
201 <row>
202 <entry></entry>
203 <entry></entry>
204 <entry>__u32</entry>
205 <entry><structfield>device</structfield></entry>
206 <entry>ALSA device number</entry>
207 </row>
208 <row>
209 <entry></entry>
210 <entry></entry>
211 <entry>__u32</entry>
212 <entry><structfield>subdevice</structfield></entry>
213 <entry>ALSA sub-device number</entry>
214 </row>
215 <row>
216 <entry></entry>
217 <entry>int</entry>
218 <entry><structfield>dvb</structfield></entry>
219 <entry></entry>
220 <entry>DVB card number</entry>
221 </row>
222 <row>
223 <entry></entry>
224 <entry>__u8</entry>
225 <entry><structfield>raw</structfield>[180]</entry>
226 <entry></entry>
227 <entry></entry>
228 </row>
229 </tbody>
230 </tgroup>
231 </table>
232
233 <table frame="none" pgwide="1" id="media-entity-type">
234 <title>Media entity types</title>
235 <tgroup cols="2">
236 <colspec colname="c1"/>
237 <colspec colname="c2"/>
238 <tbody valign="top">
239 <row>
240 <entry><constant>MEDIA_ENT_T_DEVNODE</constant></entry>
241 <entry>Unknown device node</entry>
242 </row>
243 <row>
244 <entry><constant>MEDIA_ENT_T_DEVNODE_V4L</constant></entry>
245 <entry>V4L video, radio or vbi device node</entry>
246 </row>
247 <row>
248 <entry><constant>MEDIA_ENT_T_DEVNODE_FB</constant></entry>
249 <entry>Frame buffer device node</entry>
250 </row>
251 <row>
252 <entry><constant>MEDIA_ENT_T_DEVNODE_ALSA</constant></entry>
253 <entry>ALSA card</entry>
254 </row>
255 <row>
256 <entry><constant>MEDIA_ENT_T_DEVNODE_DVB</constant></entry>
257 <entry>DVB card</entry>
258 </row>
259 <row>
260 <entry><constant>MEDIA_ENT_T_V4L2_SUBDEV</constant></entry>
261 <entry>Unknown V4L sub-device</entry>
262 </row>
263 <row>
264 <entry><constant>MEDIA_ENT_T_V4L2_SUBDEV_SENSOR</constant></entry>
265 <entry>Video sensor</entry>
266 </row>
267 <row>
268 <entry><constant>MEDIA_ENT_T_V4L2_SUBDEV_FLASH</constant></entry>
269 <entry>Flash controller</entry>
270 </row>
271 <row>
272 <entry><constant>MEDIA_ENT_T_V4L2_SUBDEV_LENS</constant></entry>
273 <entry>Lens controller</entry>
274 </row>
275 </tbody>
276 </tgroup>
277 </table>
278
279 <table frame="none" pgwide="1" id="media-entity-flag">
280 <title>Media entity flags</title>
281 <tgroup cols="2">
282 <colspec colname="c1"/>
283 <colspec colname="c2"/>
284 <tbody valign="top">
285 <row>
286 <entry><constant>MEDIA_ENT_FL_DEFAULT</constant></entry>
287 <entry>Default entity for its type. Used to discover the default
288 audio, VBI and video devices, the default camera sensor, ...</entry>
289 </row>
290 </tbody>
291 </tgroup>
292 </table>
293 </refsect1>
294
295 <refsect1>
296 &return-value;
297
298 <variablelist>
299 <varlistentry>
300 <term><errorcode>EINVAL</errorcode></term>
301 <listitem>
302 <para>The &media-entity-desc; <structfield>id</structfield> references
303 a non-existing entity.</para>
304 </listitem>
305 </varlistentry>
306 </variablelist>
307 </refsect1>
308</refentry>
diff --git a/Documentation/DocBook/v4l/media-ioc-enum-links.xml b/Documentation/DocBook/v4l/media-ioc-enum-links.xml
new file mode 100644
index 000000000000..d2fc73ef8d56
--- /dev/null
+++ b/Documentation/DocBook/v4l/media-ioc-enum-links.xml
@@ -0,0 +1,207 @@
1<refentry id="media-ioc-enum-links">
2 <refmeta>
3 <refentrytitle>ioctl MEDIA_IOC_ENUM_LINKS</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>MEDIA_IOC_ENUM_LINKS</refname>
9 <refpurpose>Enumerate all pads and links for a given entity</refpurpose>
10 </refnamediv>
11
12 <refsynopsisdiv>
13 <funcsynopsis>
14 <funcprototype>
15 <funcdef>int <function>ioctl</function></funcdef>
16 <paramdef>int <parameter>fd</parameter></paramdef>
17 <paramdef>int <parameter>request</parameter></paramdef>
18 <paramdef>struct media_links_enum *<parameter>argp</parameter></paramdef>
19 </funcprototype>
20 </funcsynopsis>
21 </refsynopsisdiv>
22
23 <refsect1>
24 <title>Arguments</title>
25
26 <variablelist>
27 <varlistentry>
28 <term><parameter>fd</parameter></term>
29 <listitem>
30 <para>File descriptor returned by
31 <link linkend='media-func-open'><function>open()</function></link>.</para>
32 </listitem>
33 </varlistentry>
34 <varlistentry>
35 <term><parameter>request</parameter></term>
36 <listitem>
37 <para>MEDIA_IOC_ENUM_LINKS</para>
38 </listitem>
39 </varlistentry>
40 <varlistentry>
41 <term><parameter>argp</parameter></term>
42 <listitem>
43 <para></para>
44 </listitem>
45 </varlistentry>
46 </variablelist>
47 </refsect1>
48
49 <refsect1>
50 <title>Description</title>
51
52 <para>To enumerate pads and/or links for a given entity, applications set
53 the entity field of a &media-links-enum; structure and initialize the
54 &media-pad-desc; and &media-link-desc; structure arrays pointed by the
55 <structfield>pads</structfield> and <structfield>links</structfield> fields.
56 They then call the MEDIA_IOC_ENUM_LINKS ioctl with a pointer to this
57 structure.</para>
58 <para>If the <structfield>pads</structfield> field is not NULL, the driver
59 fills the <structfield>pads</structfield> array with information about the
60 entity's pads. The array must have enough room to store all the entity's
61 pads. The number of pads can be retrieved with the &MEDIA-IOC-ENUM-ENTITIES;
62 ioctl.</para>
63 <para>If the <structfield>links</structfield> field is not NULL, the driver
64 fills the <structfield>links</structfield> array with information about the
65 entity's outbound links. The array must have enough room to store all the
66 entity's outbound links. The number of outbound links can be retrieved with
67 the &MEDIA-IOC-ENUM-ENTITIES; ioctl.</para>
68 <para>Only forward links that originate at one of the entity's source pads
69 are returned during the enumeration process.</para>
70
71 <table pgwide="1" frame="none" id="media-links-enum">
72 <title>struct <structname>media_links_enum</structname></title>
73 <tgroup cols="3">
74 &cs-str;
75 <tbody valign="top">
76 <row>
77 <entry>__u32</entry>
78 <entry><structfield>entity</structfield></entry>
79 <entry>Entity id, set by the application.</entry>
80 </row>
81 <row>
82 <entry>struct &media-pad-desc;</entry>
83 <entry>*<structfield>pads</structfield></entry>
84 <entry>Pointer to a pads array allocated by the application. Ignored
85 if NULL.</entry>
86 </row>
87 <row>
88 <entry>struct &media-link-desc;</entry>
89 <entry>*<structfield>links</structfield></entry>
90 <entry>Pointer to a links array allocated by the application. Ignored
91 if NULL.</entry>
92 </row>
93 </tbody>
94 </tgroup>
95 </table>
96
97 <table pgwide="1" frame="none" id="media-pad-desc">
98 <title>struct <structname>media_pad_desc</structname></title>
99 <tgroup cols="3">
100 &cs-str;
101 <tbody valign="top">
102 <row>
103 <entry>__u32</entry>
104 <entry><structfield>entity</structfield></entry>
105 <entry>ID of the entity this pad belongs to.</entry>
106 </row>
107 <row>
108 <entry>__u16</entry>
109 <entry><structfield>index</structfield></entry>
110 <entry>0-based pad index.</entry>
111 </row>
112 <row>
113 <entry>__u32</entry>
114 <entry><structfield>flags</structfield></entry>
115 <entry>Pad flags, see <xref linkend="media-pad-flag" /> for more details.</entry>
116 </row>
117 </tbody>
118 </tgroup>
119 </table>
120
121 <table frame="none" pgwide="1" id="media-pad-flag">
122 <title>Media pad flags</title>
123 <tgroup cols="2">
124 <colspec colname="c1"/>
125 <colspec colname="c2"/>
126 <tbody valign="top">
127 <row>
128 <entry><constant>MEDIA_PAD_FL_SINK</constant></entry>
129 <entry>Input pad, relative to the entity. Input pads sink data and
130 are targets of links.</entry>
131 </row>
132 <row>
133 <entry><constant>MEDIA_PAD_FL_SOURCE</constant></entry>
134 <entry>Output pad, relative to the entity. Output pads source data
135 and are origins of links.</entry>
136 </row>
137 </tbody>
138 </tgroup>
139 </table>
140
141 <table pgwide="1" frame="none" id="media-link-desc">
142 <title>struct <structname>media_links_desc</structname></title>
143 <tgroup cols="3">
144 &cs-str;
145 <tbody valign="top">
146 <row>
147 <entry>struct &media-pad-desc;</entry>
148 <entry><structfield>source</structfield></entry>
149 <entry>Pad at the origin of this link.</entry>
150 </row>
151 <row>
152 <entry>struct &media-pad-desc;</entry>
153 <entry><structfield>sink</structfield></entry>
154 <entry>Pad at the target of this link.</entry>
155 </row>
156 <row>
157 <entry>__u32</entry>
158 <entry><structfield>flags</structfield></entry>
159 <entry>Link flags, see <xref linkend="media-link-flag" /> for more details.</entry>
160 </row>
161 </tbody>
162 </tgroup>
163 </table>
164
165 <table frame="none" pgwide="1" id="media-link-flag">
166 <title>Media link flags</title>
167 <tgroup cols="2">
168 <colspec colname="c1"/>
169 <colspec colname="c2"/>
170 <tbody valign="top">
171 <row>
172 <entry><constant>MEDIA_LNK_FL_ENABLED</constant></entry>
173 <entry>The link is enabled and can be used to transfer media data.
174 When two or more links target a sink pad, only one of them can be
175 enabled at a time.</entry>
176 </row>
177 <row>
178 <entry><constant>MEDIA_LNK_FL_IMMUTABLE</constant></entry>
179 <entry>The link enabled state can't be modified at runtime. An
180 immutable link is always enabled.</entry>
181 </row>
182 <row>
183 <entry><constant>MEDIA_LNK_FL_DYNAMIC</constant></entry>
184 <entry>The link enabled state can be modified during streaming. This
185 flag is set by drivers and is read-only for applications.</entry>
186 </row>
187 </tbody>
188 </tgroup>
189 </table>
190 <para>One and only one of <constant>MEDIA_PAD_FL_SINK</constant> and
191 <constant>MEDIA_PAD_FL_SOURCE</constant> must be set for every pad.</para>
192 </refsect1>
193
194 <refsect1>
195 &return-value;
196
197 <variablelist>
198 <varlistentry>
199 <term><errorcode>EINVAL</errorcode></term>
200 <listitem>
201 <para>The &media-links-enum; <structfield>id</structfield> references
202 a non-existing entity.</para>
203 </listitem>
204 </varlistentry>
205 </variablelist>
206 </refsect1>
207</refentry>
diff --git a/Documentation/DocBook/v4l/media-ioc-setup-link.xml b/Documentation/DocBook/v4l/media-ioc-setup-link.xml
new file mode 100644
index 000000000000..cec97af4dab4
--- /dev/null
+++ b/Documentation/DocBook/v4l/media-ioc-setup-link.xml
@@ -0,0 +1,93 @@
1<refentry id="media-ioc-setup-link">
2 <refmeta>
3 <refentrytitle>ioctl MEDIA_IOC_SETUP_LINK</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>MEDIA_IOC_SETUP_LINK</refname>
9 <refpurpose>Modify the properties of a link</refpurpose>
10 </refnamediv>
11
12 <refsynopsisdiv>
13 <funcsynopsis>
14 <funcprototype>
15 <funcdef>int <function>ioctl</function></funcdef>
16 <paramdef>int <parameter>fd</parameter></paramdef>
17 <paramdef>int <parameter>request</parameter></paramdef>
18 <paramdef>struct media_link_desc *<parameter>argp</parameter></paramdef>
19 </funcprototype>
20 </funcsynopsis>
21 </refsynopsisdiv>
22
23 <refsect1>
24 <title>Arguments</title>
25
26 <variablelist>
27 <varlistentry>
28 <term><parameter>fd</parameter></term>
29 <listitem>
30 <para>File descriptor returned by
31 <link linkend='media-func-open'><function>open()</function></link>.</para>
32 </listitem>
33 </varlistentry>
34 <varlistentry>
35 <term><parameter>request</parameter></term>
36 <listitem>
37 <para>MEDIA_IOC_SETUP_LINK</para>
38 </listitem>
39 </varlistentry>
40 <varlistentry>
41 <term><parameter>argp</parameter></term>
42 <listitem>
43 <para></para>
44 </listitem>
45 </varlistentry>
46 </variablelist>
47 </refsect1>
48
49 <refsect1>
50 <title>Description</title>
51
52 <para>To change link properties applications fill a &media-link-desc; with
53 link identification information (source and sink pad) and the new requested
54 link flags. They then call the MEDIA_IOC_SETUP_LINK ioctl with a pointer to
55 that structure.</para>
56 <para>The only configurable property is the <constant>ENABLED</constant>
57 link flag to enable/disable a link. Links marked with the
58 <constant>IMMUTABLE</constant> link flag can not be enabled or disabled.
59 </para>
60 <para>Link configuration has no side effect on other links. If an enabled
61 link at the sink pad prevents the link from being enabled, the driver
62 returns with an &EBUSY;.</para>
63 <para>Only links marked with the <constant>DYNAMIC</constant> link flag can
64 be enabled/disabled while streaming media data. Attempting to enable or
65 disable a streaming non-dynamic link will return an &EBUSY;.</para>
66 <para>If the specified link can't be found the driver returns with an
67 &EINVAL;.</para>
68 </refsect1>
69
70 <refsect1>
71 &return-value;
72
73 <variablelist>
74 <varlistentry>
75 <term><errorcode>EBUSY</errorcode></term>
76 <listitem>
77 <para>The link properties can't be changed because the link is
78 currently busy. This can be caused, for instance, by an active media
79 stream (audio or video) on the link. The ioctl shouldn't be retried if
80 no other action is performed before to fix the problem.</para>
81 </listitem>
82 </varlistentry>
83 <varlistentry>
84 <term><errorcode>EINVAL</errorcode></term>
85 <listitem>
86 <para>The &media-link-desc; references a non-existing link, or the
87 link is immutable and an attempt to modify its configuration was made.
88 </para>
89 </listitem>
90 </varlistentry>
91 </variablelist>
92 </refsect1>
93</refentry>
diff --git a/Documentation/DocBook/v4l/nv12mt.gif b/Documentation/DocBook/v4l/nv12mt.gif
new file mode 100644
index 000000000000..ef2d4cf8367b
--- /dev/null
+++ b/Documentation/DocBook/v4l/nv12mt.gif
Binary files differ
diff --git a/Documentation/DocBook/v4l/nv12mt_example.gif b/Documentation/DocBook/v4l/nv12mt_example.gif
new file mode 100644
index 000000000000..df81d68108ee
--- /dev/null
+++ b/Documentation/DocBook/v4l/nv12mt_example.gif
Binary files differ
diff --git a/Documentation/DocBook/v4l/pipeline.pdf b/Documentation/DocBook/v4l/pipeline.pdf
new file mode 100644
index 000000000000..ee3e37f04b6a
--- /dev/null
+++ b/Documentation/DocBook/v4l/pipeline.pdf
Binary files differ
diff --git a/Documentation/DocBook/v4l/pipeline.png b/Documentation/DocBook/v4l/pipeline.png
new file mode 100644
index 000000000000..f19b86c2c24d
--- /dev/null
+++ b/Documentation/DocBook/v4l/pipeline.png
Binary files differ
diff --git a/Documentation/DocBook/v4l/pixfmt-nv12m.xml b/Documentation/DocBook/v4l/pixfmt-nv12m.xml
new file mode 100644
index 000000000000..c9e166d9ded8
--- /dev/null
+++ b/Documentation/DocBook/v4l/pixfmt-nv12m.xml
@@ -0,0 +1,154 @@
1 <refentry id="V4L2-PIX-FMT-NV12M">
2 <refmeta>
3 <refentrytitle>V4L2_PIX_FMT_NV12M ('NV12M')</refentrytitle>
4 &manvol;
5 </refmeta>
6 <refnamediv>
7 <refname> <constant>V4L2_PIX_FMT_NV12M</constant></refname>
8 <refpurpose>Variation of <constant>V4L2_PIX_FMT_NV12</constant> with planes
9 non contiguous in memory. </refpurpose>
10 </refnamediv>
11 <refsect1>
12 <title>Description</title>
13
14 <para>This is a multi-planar, two-plane version of the YUV 4:2:0 format.
15The three components are separated into two sub-images or planes.
16<constant>V4L2_PIX_FMT_NV12M</constant> differs from <constant>V4L2_PIX_FMT_NV12
17</constant> in that the two planes are non-contiguous in memory, i.e. the chroma
18plane do not necessarily immediately follows the luma plane.
19The luminance data occupies the first plane. The Y plane has one byte per pixel.
20In the second plane there is a chrominance data with alternating chroma samples.
21The CbCr plane is the same width, in bytes, as the Y plane (and of the image),
22but is half as tall in pixels. Each CbCr pair belongs to four pixels. For example,
23Cb<subscript>0</subscript>/Cr<subscript>0</subscript> belongs to
24Y'<subscript>00</subscript>, Y'<subscript>01</subscript>,
25Y'<subscript>10</subscript>, Y'<subscript>11</subscript>. </para>
26
27 <para><constant>V4L2_PIX_FMT_NV12M</constant> is intended to be
28used only in drivers and applications that support the multi-planar API,
29described in <xref linkend="planar-apis"/>. </para>
30
31 <para>If the Y plane has pad bytes after each row, then the
32CbCr plane has as many pad bytes after its rows.</para>
33
34 <example>
35 <title><constant>V4L2_PIX_FMT_NV12M</constant> 4 &times; 4 pixel image</title>
36
37 <formalpara>
38 <title>Byte Order.</title>
39 <para>Each cell is one byte.
40 <informaltable frame="none">
41 <tgroup cols="5" align="center">
42 <colspec align="left" colwidth="2*" />
43 <tbody valign="top">
44 <row>
45 <entry>start0&nbsp;+&nbsp;0:</entry>
46 <entry>Y'<subscript>00</subscript></entry>
47 <entry>Y'<subscript>01</subscript></entry>
48 <entry>Y'<subscript>02</subscript></entry>
49 <entry>Y'<subscript>03</subscript></entry>
50 </row>
51 <row>
52 <entry>start0&nbsp;+&nbsp;4:</entry>
53 <entry>Y'<subscript>10</subscript></entry>
54 <entry>Y'<subscript>11</subscript></entry>
55 <entry>Y'<subscript>12</subscript></entry>
56 <entry>Y'<subscript>13</subscript></entry>
57 </row>
58 <row>
59 <entry>start0&nbsp;+&nbsp;8:</entry>
60 <entry>Y'<subscript>20</subscript></entry>
61 <entry>Y'<subscript>21</subscript></entry>
62 <entry>Y'<subscript>22</subscript></entry>
63 <entry>Y'<subscript>23</subscript></entry>
64 </row>
65 <row>
66 <entry>start0&nbsp;+&nbsp;12:</entry>
67 <entry>Y'<subscript>30</subscript></entry>
68 <entry>Y'<subscript>31</subscript></entry>
69 <entry>Y'<subscript>32</subscript></entry>
70 <entry>Y'<subscript>33</subscript></entry>
71 </row>
72 <row>
73 <entry></entry>
74 </row>
75 <row>
76 <entry>start1&nbsp;+&nbsp;0:</entry>
77 <entry>Cb<subscript>00</subscript></entry>
78 <entry>Cr<subscript>00</subscript></entry>
79 <entry>Cb<subscript>01</subscript></entry>
80 <entry>Cr<subscript>01</subscript></entry>
81 </row>
82 <row>
83 <entry>start1&nbsp;+&nbsp;4:</entry>
84 <entry>Cb<subscript>10</subscript></entry>
85 <entry>Cr<subscript>10</subscript></entry>
86 <entry>Cb<subscript>11</subscript></entry>
87 <entry>Cr<subscript>11</subscript></entry>
88 </row>
89 </tbody>
90 </tgroup>
91 </informaltable>
92 </para>
93 </formalpara>
94
95 <formalpara>
96 <title>Color Sample Location.</title>
97 <para>
98 <informaltable frame="none">
99 <tgroup cols="7" align="center">
100 <tbody valign="top">
101 <row>
102 <entry></entry>
103 <entry>0</entry><entry></entry><entry>1</entry><entry></entry>
104 <entry>2</entry><entry></entry><entry>3</entry>
105 </row>
106 <row>
107 <entry>0</entry>
108 <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
109 <entry>Y</entry><entry></entry><entry>Y</entry>
110 </row>
111 <row>
112 <entry></entry>
113 <entry></entry><entry>C</entry><entry></entry><entry></entry>
114 <entry></entry><entry>C</entry><entry></entry>
115 </row>
116 <row>
117 <entry>1</entry>
118 <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
119 <entry>Y</entry><entry></entry><entry>Y</entry>
120 </row>
121 <row>
122 <entry></entry>
123 </row>
124 <row>
125 <entry>2</entry>
126 <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
127 <entry>Y</entry><entry></entry><entry>Y</entry>
128 </row>
129 <row>
130 <entry></entry>
131 <entry></entry><entry>C</entry><entry></entry><entry></entry>
132 <entry></entry><entry>C</entry><entry></entry>
133 </row>
134 <row>
135 <entry>3</entry>
136 <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
137 <entry>Y</entry><entry></entry><entry>Y</entry>
138 </row>
139 </tbody>
140 </tgroup>
141 </informaltable>
142 </para>
143 </formalpara>
144 </example>
145 </refsect1>
146 </refentry>
147
148 <!--
149Local Variables:
150mode: sgml
151sgml-parent-document: "pixfmt.sgml"
152indent-tabs-mode: nil
153End:
154 -->
diff --git a/Documentation/DocBook/v4l/pixfmt-nv12mt.xml b/Documentation/DocBook/v4l/pixfmt-nv12mt.xml
new file mode 100644
index 000000000000..7a2855a526c1
--- /dev/null
+++ b/Documentation/DocBook/v4l/pixfmt-nv12mt.xml
@@ -0,0 +1,74 @@
1 <refentry>
2 <refmeta>
3 <refentrytitle>V4L2_PIX_FMT_NV12MT ('TM12')</refentrytitle>
4 &manvol;
5 </refmeta>
6 <refnamediv>
7 <refname id="V4L2-PIX-FMT-NV12MT"><constant>V4L2_PIX_FMT_NV12MT
8</constant></refname>
9 <refpurpose>Formats with &frac12; horizontal and vertical
10chroma resolution. This format has two planes - one for luminance and one for
11chrominance. Chroma samples are interleaved. The difference to
12<constant>V4L2_PIX_FMT_NV12</constant> is the memory layout. Pixels are
13grouped in macroblocks of 64x32 size. The order of macroblocks in memory is
14also not standard.
15 </refpurpose>
16 </refnamediv>
17 <refsect1>
18 <title>Description</title>
19
20 <para>This is the two-plane versions of the YUV 4:2:0 format where data
21is grouped into 64x32 macroblocks. The three components are separated into two
22sub-images or planes. The Y plane has one byte per pixel and pixels are grouped
23into 64x32 macroblocks. The CbCr plane has the same width, in bytes, as the Y
24plane (and the image), but is half as tall in pixels. The chroma plane is also
25grouped into 64x32 macroblocks.</para>
26 <para>Width of the buffer has to be aligned to the multiple of 128, and
27height alignment is 32. Every four adjactent buffers - two horizontally and two
28vertically are grouped together and are located in memory in Z or flipped Z
29order. </para>
30 <para>Layout of macroblocks in memory is presented in the following
31figure.</para>
32 <para><figure id="nv12mt">
33 <title><constant>V4L2_PIX_FMT_NV12MT</constant> macroblock Z shape
34memory layout</title>
35 <mediaobject>
36 <imageobject>
37 <imagedata fileref="nv12mt.gif" format="GIF" />
38 </imageobject>
39 </mediaobject>
40 </figure>
41 The requirement that width is multiple of 128 is implemented because,
42the Z shape cannot be cut in half horizontally. In case the vertical resolution
43of macroblocks is odd then the last row of macroblocks is arranged in a linear
44order. </para>
45 <para>In case of chroma the layout is identical. Cb and Cr samples are
46interleaved. Height of the buffer is aligned to 32.
47 </para>
48 <example>
49 <title>Memory layout of macroblocks in <constant>V4L2_PIX_FMT_NV12
50</constant> format pixel image - extreme case</title>
51 <para>
52 <figure id="nv12mt_ex">
53 <title>Example <constant>V4L2_PIX_FMT_NV12MT</constant> memory
54layout of macroblocks</title>
55 <mediaobject>
56 <imageobject>
57 <imagedata fileref="nv12mt_example.gif" format="GIF" />
58 </imageobject>
59 </mediaobject>
60 </figure>
61 Memory layout of macroblocks of <constant>V4L2_PIX_FMT_NV12MT
62</constant> format in most extreme case.
63 </para>
64 </example>
65 </refsect1>
66 </refentry>
67
68 <!--
69Local Variables:
70mode: sgml
71sgml-parent-document: "pixfmt.sgml"
72indent-tabs-mode: nil
73End:
74 -->
diff --git a/Documentation/DocBook/v4l/pixfmt-srggb12.xml b/Documentation/DocBook/v4l/pixfmt-srggb12.xml
new file mode 100644
index 000000000000..9ba4fb690bc0
--- /dev/null
+++ b/Documentation/DocBook/v4l/pixfmt-srggb12.xml
@@ -0,0 +1,90 @@
1 <refentry>
2 <refmeta>
3 <refentrytitle>V4L2_PIX_FMT_SRGGB12 ('RG12'),
4 V4L2_PIX_FMT_SGRBG12 ('BA12'),
5 V4L2_PIX_FMT_SGBRG12 ('GB12'),
6 V4L2_PIX_FMT_SBGGR12 ('BG12'),
7 </refentrytitle>
8 &manvol;
9 </refmeta>
10 <refnamediv>
11 <refname id="V4L2-PIX-FMT-SRGGB12"><constant>V4L2_PIX_FMT_SRGGB12</constant></refname>
12 <refname id="V4L2-PIX-FMT-SGRBG12"><constant>V4L2_PIX_FMT_SGRBG12</constant></refname>
13 <refname id="V4L2-PIX-FMT-SGBRG12"><constant>V4L2_PIX_FMT_SGBRG12</constant></refname>
14 <refname id="V4L2-PIX-FMT-SBGGR12"><constant>V4L2_PIX_FMT_SBGGR12</constant></refname>
15 <refpurpose>12-bit Bayer formats expanded to 16 bits</refpurpose>
16 </refnamediv>
17 <refsect1>
18 <title>Description</title>
19
20 <para>The following four pixel formats are raw sRGB / Bayer formats with
2112 bits per colour. Each colour component is stored in a 16-bit word, with 6
22unused high bits filled with zeros. Each n-pixel row contains n/2 green samples
23and n/2 blue or red samples, with alternating red and blue rows. Bytes are
24stored in memory in little endian order. They are conventionally described
25as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example of one of these
26formats</para>
27
28 <example>
29 <title><constant>V4L2_PIX_FMT_SBGGR12</constant> 4 &times; 4
30pixel image</title>
31
32 <formalpara>
33 <title>Byte Order.</title>
34 <para>Each cell is one byte, high 6 bits in high bytes are 0.
35 <informaltable frame="none">
36 <tgroup cols="5" align="center">
37 <colspec align="left" colwidth="2*" />
38 <tbody valign="top">
39 <row>
40 <entry>start&nbsp;+&nbsp;0:</entry>
41 <entry>B<subscript>00low</subscript></entry>
42 <entry>B<subscript>00high</subscript></entry>
43 <entry>G<subscript>01low</subscript></entry>
44 <entry>G<subscript>01high</subscript></entry>
45 <entry>B<subscript>02low</subscript></entry>
46 <entry>B<subscript>02high</subscript></entry>
47 <entry>G<subscript>03low</subscript></entry>
48 <entry>G<subscript>03high</subscript></entry>
49 </row>
50 <row>
51 <entry>start&nbsp;+&nbsp;8:</entry>
52 <entry>G<subscript>10low</subscript></entry>
53 <entry>G<subscript>10high</subscript></entry>
54 <entry>R<subscript>11low</subscript></entry>
55 <entry>R<subscript>11high</subscript></entry>
56 <entry>G<subscript>12low</subscript></entry>
57 <entry>G<subscript>12high</subscript></entry>
58 <entry>R<subscript>13low</subscript></entry>
59 <entry>R<subscript>13high</subscript></entry>
60 </row>
61 <row>
62 <entry>start&nbsp;+&nbsp;16:</entry>
63 <entry>B<subscript>20low</subscript></entry>
64 <entry>B<subscript>20high</subscript></entry>
65 <entry>G<subscript>21low</subscript></entry>
66 <entry>G<subscript>21high</subscript></entry>
67 <entry>B<subscript>22low</subscript></entry>
68 <entry>B<subscript>22high</subscript></entry>
69 <entry>G<subscript>23low</subscript></entry>
70 <entry>G<subscript>23high</subscript></entry>
71 </row>
72 <row>
73 <entry>start&nbsp;+&nbsp;24:</entry>
74 <entry>G<subscript>30low</subscript></entry>
75 <entry>G<subscript>30high</subscript></entry>
76 <entry>R<subscript>31low</subscript></entry>
77 <entry>R<subscript>31high</subscript></entry>
78 <entry>G<subscript>32low</subscript></entry>
79 <entry>G<subscript>32high</subscript></entry>
80 <entry>R<subscript>33low</subscript></entry>
81 <entry>R<subscript>33high</subscript></entry>
82 </row>
83 </tbody>
84 </tgroup>
85 </informaltable>
86 </para>
87 </formalpara>
88 </example>
89 </refsect1>
90</refentry>
diff --git a/Documentation/DocBook/v4l/pixfmt-y12.xml b/Documentation/DocBook/v4l/pixfmt-y12.xml
new file mode 100644
index 000000000000..ff417b858cc9
--- /dev/null
+++ b/Documentation/DocBook/v4l/pixfmt-y12.xml
@@ -0,0 +1,79 @@
1<refentry id="V4L2-PIX-FMT-Y12">
2 <refmeta>
3 <refentrytitle>V4L2_PIX_FMT_Y12 ('Y12 ')</refentrytitle>
4 &manvol;
5 </refmeta>
6 <refnamediv>
7 <refname><constant>V4L2_PIX_FMT_Y12</constant></refname>
8 <refpurpose>Grey-scale image</refpurpose>
9 </refnamediv>
10 <refsect1>
11 <title>Description</title>
12
13 <para>This is a grey-scale image with a depth of 12 bits per pixel. Pixels
14are stored in 16-bit words with unused high bits padded with 0. The least
15significant byte is stored at lower memory addresses (little-endian).</para>
16
17 <example>
18 <title><constant>V4L2_PIX_FMT_Y12</constant> 4 &times; 4
19pixel image</title>
20
21 <formalpara>
22 <title>Byte Order.</title>
23 <para>Each cell is one byte.
24 <informaltable frame="none">
25 <tgroup cols="9" align="center">
26 <colspec align="left" colwidth="2*" />
27 <tbody valign="top">
28 <row>
29 <entry>start&nbsp;+&nbsp;0:</entry>
30 <entry>Y'<subscript>00low</subscript></entry>
31 <entry>Y'<subscript>00high</subscript></entry>
32 <entry>Y'<subscript>01low</subscript></entry>
33 <entry>Y'<subscript>01high</subscript></entry>
34 <entry>Y'<subscript>02low</subscript></entry>
35 <entry>Y'<subscript>02high</subscript></entry>
36 <entry>Y'<subscript>03low</subscript></entry>
37 <entry>Y'<subscript>03high</subscript></entry>
38 </row>
39 <row>
40 <entry>start&nbsp;+&nbsp;8:</entry>
41 <entry>Y'<subscript>10low</subscript></entry>
42 <entry>Y'<subscript>10high</subscript></entry>
43 <entry>Y'<subscript>11low</subscript></entry>
44 <entry>Y'<subscript>11high</subscript></entry>
45 <entry>Y'<subscript>12low</subscript></entry>
46 <entry>Y'<subscript>12high</subscript></entry>
47 <entry>Y'<subscript>13low</subscript></entry>
48 <entry>Y'<subscript>13high</subscript></entry>
49 </row>
50 <row>
51 <entry>start&nbsp;+&nbsp;16:</entry>
52 <entry>Y'<subscript>20low</subscript></entry>
53 <entry>Y'<subscript>20high</subscript></entry>
54 <entry>Y'<subscript>21low</subscript></entry>
55 <entry>Y'<subscript>21high</subscript></entry>
56 <entry>Y'<subscript>22low</subscript></entry>
57 <entry>Y'<subscript>22high</subscript></entry>
58 <entry>Y'<subscript>23low</subscript></entry>
59 <entry>Y'<subscript>23high</subscript></entry>
60 </row>
61 <row>
62 <entry>start&nbsp;+&nbsp;24:</entry>
63 <entry>Y'<subscript>30low</subscript></entry>
64 <entry>Y'<subscript>30high</subscript></entry>
65 <entry>Y'<subscript>31low</subscript></entry>
66 <entry>Y'<subscript>31high</subscript></entry>
67 <entry>Y'<subscript>32low</subscript></entry>
68 <entry>Y'<subscript>32high</subscript></entry>
69 <entry>Y'<subscript>33low</subscript></entry>
70 <entry>Y'<subscript>33high</subscript></entry>
71 </row>
72 </tbody>
73 </tgroup>
74 </informaltable>
75 </para>
76 </formalpara>
77 </example>
78 </refsect1>
79</refentry>
diff --git a/Documentation/DocBook/v4l/pixfmt-yuv420m.xml b/Documentation/DocBook/v4l/pixfmt-yuv420m.xml
new file mode 100644
index 000000000000..f5d8f57495c8
--- /dev/null
+++ b/Documentation/DocBook/v4l/pixfmt-yuv420m.xml
@@ -0,0 +1,162 @@
1 <refentry id="V4L2-PIX-FMT-YUV420M">
2 <refmeta>
3 <refentrytitle>V4L2_PIX_FMT_YUV420M ('YU12M')</refentrytitle>
4 &manvol;
5 </refmeta>
6 <refnamediv>
7 <refname> <constant>V4L2_PIX_FMT_YUV420M</constant></refname>
8 <refpurpose>Variation of <constant>V4L2_PIX_FMT_YUV420</constant>
9 with planes non contiguous in memory. </refpurpose>
10 </refnamediv>
11
12 <refsect1>
13 <title>Description</title>
14
15 <para>This is a multi-planar format, as opposed to a packed format.
16The three components are separated into three sub- images or planes.
17
18The Y plane is first. The Y plane has one byte per pixel. The Cb data
19constitutes the second plane which is half the width and half
20the height of the Y plane (and of the image). Each Cb belongs to four
21pixels, a two-by-two square of the image. For example,
22Cb<subscript>0</subscript> belongs to Y'<subscript>00</subscript>,
23Y'<subscript>01</subscript>, Y'<subscript>10</subscript>, and
24Y'<subscript>11</subscript>. The Cr data, just like the Cb plane, is
25in the third plane. </para>
26
27 <para>If the Y plane has pad bytes after each row, then the Cb
28and Cr planes have half as many pad bytes after their rows. In other
29words, two Cx rows (including padding) is exactly as long as one Y row
30(including padding).</para>
31
32 <para><constant>V4L2_PIX_FMT_NV12M</constant> is intended to be
33used only in drivers and applications that support the multi-planar API,
34described in <xref linkend="planar-apis"/>. </para>
35
36 <example>
37 <title><constant>V4L2_PIX_FMT_YVU420M</constant> 4 &times; 4
38pixel image</title>
39
40 <formalpara>
41 <title>Byte Order.</title>
42 <para>Each cell is one byte.
43 <informaltable frame="none">
44 <tgroup cols="5" align="center">
45 <colspec align="left" colwidth="2*" />
46 <tbody valign="top">
47 <row>
48 <entry>start0&nbsp;+&nbsp;0:</entry>
49 <entry>Y'<subscript>00</subscript></entry>
50 <entry>Y'<subscript>01</subscript></entry>
51 <entry>Y'<subscript>02</subscript></entry>
52 <entry>Y'<subscript>03</subscript></entry>
53 </row>
54 <row>
55 <entry>start0&nbsp;+&nbsp;4:</entry>
56 <entry>Y'<subscript>10</subscript></entry>
57 <entry>Y'<subscript>11</subscript></entry>
58 <entry>Y'<subscript>12</subscript></entry>
59 <entry>Y'<subscript>13</subscript></entry>
60 </row>
61 <row>
62 <entry>start0&nbsp;+&nbsp;8:</entry>
63 <entry>Y'<subscript>20</subscript></entry>
64 <entry>Y'<subscript>21</subscript></entry>
65 <entry>Y'<subscript>22</subscript></entry>
66 <entry>Y'<subscript>23</subscript></entry>
67 </row>
68 <row>
69 <entry>start0&nbsp;+&nbsp;12:</entry>
70 <entry>Y'<subscript>30</subscript></entry>
71 <entry>Y'<subscript>31</subscript></entry>
72 <entry>Y'<subscript>32</subscript></entry>
73 <entry>Y'<subscript>33</subscript></entry>
74 </row>
75 <row><entry></entry></row>
76 <row>
77 <entry>start1&nbsp;+&nbsp;0:</entry>
78 <entry>Cb<subscript>00</subscript></entry>
79 <entry>Cb<subscript>01</subscript></entry>
80 </row>
81 <row>
82 <entry>start1&nbsp;+&nbsp;2:</entry>
83 <entry>Cb<subscript>10</subscript></entry>
84 <entry>Cb<subscript>11</subscript></entry>
85 </row>
86 <row><entry></entry></row>
87 <row>
88 <entry>start2&nbsp;+&nbsp;0:</entry>
89 <entry>Cr<subscript>00</subscript></entry>
90 <entry>Cr<subscript>01</subscript></entry>
91 </row>
92 <row>
93 <entry>start2&nbsp;+&nbsp;2:</entry>
94 <entry>Cr<subscript>10</subscript></entry>
95 <entry>Cr<subscript>11</subscript></entry>
96 </row>
97 </tbody>
98 </tgroup>
99 </informaltable>
100 </para>
101 </formalpara>
102
103 <formalpara>
104 <title>Color Sample Location.</title>
105 <para>
106 <informaltable frame="none">
107 <tgroup cols="7" align="center">
108 <tbody valign="top">
109 <row>
110 <entry></entry>
111 <entry>0</entry><entry></entry><entry>1</entry><entry></entry>
112 <entry>2</entry><entry></entry><entry>3</entry>
113 </row>
114 <row>
115 <entry>0</entry>
116 <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
117 <entry>Y</entry><entry></entry><entry>Y</entry>
118 </row>
119 <row>
120 <entry></entry>
121 <entry></entry><entry>C</entry><entry></entry><entry></entry>
122 <entry></entry><entry>C</entry><entry></entry>
123 </row>
124 <row>
125 <entry>1</entry>
126 <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
127 <entry>Y</entry><entry></entry><entry>Y</entry>
128 </row>
129 <row>
130 <entry></entry>
131 </row>
132 <row>
133 <entry>2</entry>
134 <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
135 <entry>Y</entry><entry></entry><entry>Y</entry>
136 </row>
137 <row>
138 <entry></entry>
139 <entry></entry><entry>C</entry><entry></entry><entry></entry>
140 <entry></entry><entry>C</entry><entry></entry>
141 </row>
142 <row>
143 <entry>3</entry>
144 <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
145 <entry>Y</entry><entry></entry><entry>Y</entry>
146 </row>
147 </tbody>
148 </tgroup>
149 </informaltable>
150 </para>
151 </formalpara>
152 </example>
153 </refsect1>
154 </refentry>
155
156 <!--
157Local Variables:
158mode: sgml
159sgml-parent-document: "pixfmt.sgml"
160indent-tabs-mode: nil
161End:
162 -->
diff --git a/Documentation/DocBook/v4l/pixfmt.xml b/Documentation/DocBook/v4l/pixfmt.xml
index cfffc88d7383..40af4beb48b9 100644
--- a/Documentation/DocBook/v4l/pixfmt.xml
+++ b/Documentation/DocBook/v4l/pixfmt.xml
@@ -2,12 +2,16 @@
2 2
3 <para>The V4L2 API was primarily designed for devices exchanging 3 <para>The V4L2 API was primarily designed for devices exchanging
4image data with applications. The 4image data with applications. The
5<structname>v4l2_pix_format</structname> structure defines the format 5<structname>v4l2_pix_format</structname> and <structname>v4l2_pix_format_mplane
6and layout of an image in memory. Image formats are negotiated with 6</structname> structures define the format and layout of an image in memory.
7the &VIDIOC-S-FMT; ioctl. (The explanations here focus on video 7The former is used with the single-planar API, while the latter is used with the
8multi-planar version (see <xref linkend="planar-apis"/>). Image formats are
9negotiated with the &VIDIOC-S-FMT; ioctl. (The explanations here focus on video
8capturing and output, for overlay frame buffer formats see also 10capturing and output, for overlay frame buffer formats see also
9&VIDIOC-G-FBUF;.)</para> 11&VIDIOC-G-FBUF;.)</para>
10 12
13<section>
14 <title>Single-planar format structure</title>
11 <table pgwide="1" frame="none" id="v4l2-pix-format"> 15 <table pgwide="1" frame="none" id="v4l2-pix-format">
12 <title>struct <structname>v4l2_pix_format</structname></title> 16 <title>struct <structname>v4l2_pix_format</structname></title>
13 <tgroup cols="3"> 17 <tgroup cols="3">
@@ -106,6 +110,98 @@ set this field to zero.</entry>
106 </tbody> 110 </tbody>
107 </tgroup> 111 </tgroup>
108 </table> 112 </table>
113</section>
114
115<section>
116 <title>Multi-planar format structures</title>
117 <para>The <structname>v4l2_plane_pix_format</structname> structures define
118 size and layout for each of the planes in a multi-planar format.
119 The <structname>v4l2_pix_format_mplane</structname> structure contains
120 information common to all planes (such as image width and height) and
121 an array of <structname>v4l2_plane_pix_format</structname> structures,
122 describing all planes of that format.</para>
123 <table pgwide="1" frame="none" id="v4l2-plane-pix-format">
124 <title>struct <structname>vl42_plane_pix_format</structname></title>
125 <tgroup cols="3">
126 &cs-str;
127 <tbody valign="top">
128 <row>
129 <entry>__u32</entry>
130 <entry><structfield>sizeimage</structfield></entry>
131 <entry>Maximum size in bytes required for image data in this plane.
132 </entry>
133 </row>
134 <row>
135 <entry>__u16</entry>
136 <entry><structfield>bytesperline</structfield></entry>
137 <entry>Distance in bytes between the leftmost pixels in two adjacent
138 lines.</entry>
139 </row>
140 <row>
141 <entry>__u16</entry>
142 <entry><structfield>reserved[7]</structfield></entry>
143 <entry>Reserved for future extensions. Should be zeroed by the
144 application.</entry>
145 </row>
146 </tbody>
147 </tgroup>
148 </table>
149 <table pgwide="1" frame="none" id="v4l2-pix-format-mplane">
150 <title>struct <structname>v4l2_pix_format_mplane</structname></title>
151 <tgroup cols="3">
152 &cs-str;
153 <tbody valign="top">
154 <row>
155 <entry>__u32</entry>
156 <entry><structfield>width</structfield></entry>
157 <entry>Image width in pixels.</entry>
158 </row>
159 <row>
160 <entry>__u32</entry>
161 <entry><structfield>height</structfield></entry>
162 <entry>Image height in pixels.</entry>
163 </row>
164 <row>
165 <entry>__u32</entry>
166 <entry><structfield>pixelformat</structfield></entry>
167 <entry>The pixel format. Both single- and multi-planar four character
168codes can be used.</entry>
169 </row>
170 <row>
171 <entry>&v4l2-field;</entry>
172 <entry><structfield>field</structfield></entry>
173 <entry>See &v4l2-pix-format;.</entry>
174 </row>
175 <row>
176 <entry>&v4l2-colorspace;</entry>
177 <entry><structfield>colorspace</structfield></entry>
178 <entry>See &v4l2-pix-format;.</entry>
179 </row>
180 <row>
181 <entry>&v4l2-plane-pix-format;</entry>
182 <entry><structfield>plane_fmt[VIDEO_MAX_PLANES]</structfield></entry>
183 <entry>An array of structures describing format of each plane this
184 pixel format consists of. The number of valid entries in this array
185 has to be put in the <structfield>num_planes</structfield>
186 field.</entry>
187 </row>
188 <row>
189 <entry>__u8</entry>
190 <entry><structfield>num_planes</structfield></entry>
191 <entry>Number of planes (i.e. separate memory buffers) for this format
192 and the number of valid entries in the
193 <structfield>plane_fmt</structfield> array.</entry>
194 </row>
195 <row>
196 <entry>__u8</entry>
197 <entry><structfield>reserved[11]</structfield></entry>
198 <entry>Reserved for future extensions. Should be zeroed by the
199 application.</entry>
200 </row>
201 </tbody>
202 </tgroup>
203 </table>
204</section>
109 205
110 <section> 206 <section>
111 <title>Standard Image Formats</title> 207 <title>Standard Image Formats</title>
@@ -142,11 +238,19 @@ leftmost pixel of the second row from the top, and so on. The last row
142has just as many pad bytes after it as the other rows.</para> 238has just as many pad bytes after it as the other rows.</para>
143 239
144 <para>In V4L2 each format has an identifier which looks like 240 <para>In V4L2 each format has an identifier which looks like
145<constant>PIX_FMT_XXX</constant>, defined in the <filename>videodev2.h</filename> 241<constant>PIX_FMT_XXX</constant>, defined in the <link
146header file. These identifiers 242linkend="videodev">videodev.h</link> header file. These identifiers
147represent <link linkend="v4l2-fourcc">four character codes</link> 243represent <link linkend="v4l2-fourcc">four character (FourCC) codes</link>
148which are also listed below, however they are not the same as those 244which are also listed below, however they are not the same as those
149used in the Windows world.</para> 245used in the Windows world.</para>
246
247 <para>For some formats, data is stored in separate, discontiguous
248memory buffers. Those formats are identified by a separate set of FourCC codes
249and are referred to as "multi-planar formats". For example, a YUV422 frame is
250normally stored in one memory buffer, but it can also be placed in two or three
251separate buffers, with Y component in one buffer and CbCr components in another
252in the 2-planar version or with each component in its own buffer in the
2533-planar case. Those sub-buffers are referred to as "planes".</para>
150 </section> 254 </section>
151 255
152 <section id="colorspaces"> 256 <section id="colorspaces">
@@ -592,6 +696,7 @@ information.</para>
592 &sub-packed-yuv; 696 &sub-packed-yuv;
593 &sub-grey; 697 &sub-grey;
594 &sub-y10; 698 &sub-y10;
699 &sub-y12;
595 &sub-y16; 700 &sub-y16;
596 &sub-yuyv; 701 &sub-yuyv;
597 &sub-uyvy; 702 &sub-uyvy;
@@ -599,10 +704,13 @@ information.</para>
599 &sub-vyuy; 704 &sub-vyuy;
600 &sub-y41p; 705 &sub-y41p;
601 &sub-yuv420; 706 &sub-yuv420;
707 &sub-yuv420m;
602 &sub-yuv410; 708 &sub-yuv410;
603 &sub-yuv422p; 709 &sub-yuv422p;
604 &sub-yuv411p; 710 &sub-yuv411p;
605 &sub-nv12; 711 &sub-nv12;
712 &sub-nv12m;
713 &sub-nv12mt;
606 &sub-nv16; 714 &sub-nv16;
607 </section> 715 </section>
608 716
diff --git a/Documentation/DocBook/v4l/planar-apis.xml b/Documentation/DocBook/v4l/planar-apis.xml
new file mode 100644
index 000000000000..878ce2040488
--- /dev/null
+++ b/Documentation/DocBook/v4l/planar-apis.xml
@@ -0,0 +1,62 @@
1<section id="planar-apis">
2 <title>Single- and multi-planar APIs</title>
3
4 <para>Some devices require data for each input or output video frame
5 to be placed in discontiguous memory buffers. In such cases, one
6 video frame has to be addressed using more than one memory address, i.e. one
7 pointer per "plane". A plane is a sub-buffer of the current frame. For
8 examples of such formats see <xref linkend="pixfmt" />.</para>
9
10 <para>Initially, V4L2 API did not support multi-planar buffers and a set of
11 extensions has been introduced to handle them. Those extensions constitute
12 what is being referred to as the "multi-planar API".</para>
13
14 <para>Some of the V4L2 API calls and structures are interpreted differently,
15 depending on whether single- or multi-planar API is being used. An application
16 can choose whether to use one or the other by passing a corresponding buffer
17 type to its ioctl calls. Multi-planar versions of buffer types are suffixed
18 with an `_MPLANE' string. For a list of available multi-planar buffer types
19 see &v4l2-buf-type;.
20 </para>
21
22 <section>
23 <title>Multi-planar formats</title>
24 <para>Multi-planar API introduces new multi-planar formats. Those formats
25 use a separate set of FourCC codes. It is important to distinguish between
26 the multi-planar API and a multi-planar format. Multi-planar API calls can
27 handle all single-planar formats as well (as long as they are passed in
28 multi-planar API structures), while the single-planar API cannot
29 handle multi-planar formats.</para>
30 </section>
31
32 <section>
33 <title>Calls that distinguish between single and multi-planar APIs</title>
34 <variablelist>
35 <varlistentry>
36 <term>&VIDIOC-QUERYCAP;</term>
37 <listitem><para>Two additional multi-planar capabilities are added. They can
38 be set together with non-multi-planar ones for devices that handle
39 both single- and multi-planar formats.</para></listitem>
40 </varlistentry>
41 <varlistentry>
42 <term>&VIDIOC-G-FMT;, &VIDIOC-S-FMT;, &VIDIOC-TRY-FMT;</term>
43 <listitem><para>New structures for describing multi-planar formats are added:
44 &v4l2-pix-format-mplane; and &v4l2-plane-pix-format;. Drivers may
45 define new multi-planar formats, which have distinct FourCC codes from
46 the existing single-planar ones.</para>
47 </listitem>
48 </varlistentry>
49 <varlistentry>
50 <term>&VIDIOC-QBUF;, &VIDIOC-DQBUF;, &VIDIOC-QUERYBUF;</term>
51 <listitem><para>A new &v4l2-plane; structure for describing planes is added.
52 Arrays of this structure are passed in the new
53 <structfield>m.planes</structfield> field of &v4l2-buffer;.</para>
54 </listitem>
55 </varlistentry>
56 <varlistentry>
57 <term>&VIDIOC-REQBUFS;</term>
58 <listitem><para>Will allocate multi-planar buffers as requested.</para></listitem>
59 </varlistentry>
60 </variablelist>
61 </section>
62</section>
diff --git a/Documentation/DocBook/v4l/remote_controllers.xml b/Documentation/DocBook/v4l/remote_controllers.xml
index 3c3b667b28e7..160e464d44b7 100644
--- a/Documentation/DocBook/v4l/remote_controllers.xml
+++ b/Documentation/DocBook/v4l/remote_controllers.xml
@@ -133,7 +133,7 @@ different IR's. Due to that, V4L2 API now specifies a standard for mapping Media
133<row><entry><constant>KEY_LEFT</constant></entry><entry>Left key</entry><entry>LEFT</entry></row> 133<row><entry><constant>KEY_LEFT</constant></entry><entry>Left key</entry><entry>LEFT</entry></row>
134<row><entry><constant>KEY_RIGHT</constant></entry><entry>Right key</entry><entry>RIGHT</entry></row> 134<row><entry><constant>KEY_RIGHT</constant></entry><entry>Right key</entry><entry>RIGHT</entry></row>
135 135
136<row><entry><emphasis role="bold">Miscelaneous keys</emphasis></entry></row> 136<row><entry><emphasis role="bold">Miscellaneous keys</emphasis></entry></row>
137 137
138<row><entry><constant>KEY_DOT</constant></entry><entry>Return a dot</entry><entry>.</entry></row> 138<row><entry><constant>KEY_DOT</constant></entry><entry>Return a dot</entry><entry>.</entry></row>
139<row><entry><constant>KEY_FN</constant></entry><entry>Select a function</entry><entry>FUNCTION</entry></row> 139<row><entry><constant>KEY_FN</constant></entry><entry>Select a function</entry><entry>FUNCTION</entry></row>
diff --git a/Documentation/DocBook/v4l/subdev-formats.xml b/Documentation/DocBook/v4l/subdev-formats.xml
new file mode 100644
index 000000000000..d7ccd25edcc1
--- /dev/null
+++ b/Documentation/DocBook/v4l/subdev-formats.xml
@@ -0,0 +1,2526 @@
1<section id="v4l2-mbus-format">
2 <title>Media Bus Formats</title>
3
4 <table pgwide="1" frame="none" id="v4l2-mbus-framefmt">
5 <title>struct <structname>v4l2_mbus_framefmt</structname></title>
6 <tgroup cols="3">
7 &cs-str;
8 <tbody valign="top">
9 <row>
10 <entry>__u32</entry>
11 <entry><structfield>width</structfield></entry>
12 <entry>Image width, in pixels.</entry>
13 </row>
14 <row>
15 <entry>__u32</entry>
16 <entry><structfield>height</structfield></entry>
17 <entry>Image height, in pixels.</entry>
18 </row>
19 <row>
20 <entry>__u32</entry>
21 <entry><structfield>code</structfield></entry>
22 <entry>Format code, from &v4l2-mbus-pixelcode;.</entry>
23 </row>
24 <row>
25 <entry>__u32</entry>
26 <entry><structfield>field</structfield></entry>
27 <entry>Field order, from &v4l2-field;. See
28 <xref linkend="field-order" /> for details.</entry>
29 </row>
30 <row>
31 <entry>__u32</entry>
32 <entry><structfield>colorspace</structfield></entry>
33 <entry>Image colorspace, from &v4l2-colorspace;. See
34 <xref linkend="colorspaces" /> for details.</entry>
35 </row>
36 <row>
37 <entry>__u32</entry>
38 <entry><structfield>reserved</structfield>[7]</entry>
39 <entry>Reserved for future extensions. Applications and drivers must
40 set the array to zero.</entry>
41 </row>
42 </tbody>
43 </tgroup>
44 </table>
45
46 <section id="v4l2-mbus-pixelcode">
47 <title>Media Bus Pixel Codes</title>
48
49 <para>The media bus pixel codes describe image formats as flowing over
50 physical busses (both between separate physical components and inside SoC
51 devices). This should not be confused with the V4L2 pixel formats that
52 describe, using four character codes, image formats as stored in memory.
53 </para>
54
55 <para>While there is a relationship between image formats on busses and
56 image formats in memory (a raw Bayer image won't be magically converted to
57 JPEG just by storing it to memory), there is no one-to-one correspondance
58 between them.</para>
59
60 <section>
61 <title>Packed RGB Formats</title>
62
63 <para>Those formats transfer pixel data as red, green and blue components.
64 The format code is made of the following information.
65 <itemizedlist>
66 <listitem><para>The red, green and blue components order code, as encoded in a
67 pixel sample. Possible values are RGB and BGR.</para></listitem>
68 <listitem><para>The number of bits per component, for each component. The values
69 can be different for all components. Common values are 555 and 565.</para>
70 </listitem>
71 <listitem><para>The number of bus samples per pixel. Pixels that are wider than
72 the bus width must be transferred in multiple samples. Common values are
73 1 and 2.</para></listitem>
74 <listitem><para>The bus width.</para></listitem>
75 <listitem><para>For formats where the total number of bits per pixel is smaller
76 than the number of bus samples per pixel times the bus width, a padding
77 value stating if the bytes are padded in their most high order bits
78 (PADHI) or low order bits (PADLO).</para></listitem>
79 <listitem><para>For formats where the number of bus samples per pixel is larger
80 than 1, an endianness value stating if the pixel is transferred MSB first
81 (BE) or LSB first (LE).</para></listitem>
82 </itemizedlist>
83 </para>
84
85 <para>For instance, a format where pixels are encoded as 5-bits red, 5-bits
86 green and 5-bit blue values padded on the high bit, transferred as 2 8-bit
87 samples per pixel with the most significant bits (padding, red and half of
88 the green value) transferred first will be named
89 <constant>V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE</constant>.
90 </para>
91
92 <para>The following tables list existing packet RGB formats.</para>
93
94 <table pgwide="0" frame="none" id="v4l2-mbus-pixelcode-rgb">
95 <title>RGB formats</title>
96 <tgroup cols="11">
97 <colspec colname="id" align="left" />
98 <colspec colname="code" align="center"/>
99 <colspec colname="bit" />
100 <colspec colnum="4" colname="b07" align="center" />
101 <colspec colnum="5" colname="b06" align="center" />
102 <colspec colnum="6" colname="b05" align="center" />
103 <colspec colnum="7" colname="b04" align="center" />
104 <colspec colnum="8" colname="b03" align="center" />
105 <colspec colnum="9" colname="b02" align="center" />
106 <colspec colnum="10" colname="b01" align="center" />
107 <colspec colnum="11" colname="b00" align="center" />
108 <spanspec namest="b07" nameend="b00" spanname="b0" />
109 <thead>
110 <row>
111 <entry>Identifier</entry>
112 <entry>Code</entry>
113 <entry></entry>
114 <entry spanname="b0">Data organization</entry>
115 </row>
116 <row>
117 <entry></entry>
118 <entry></entry>
119 <entry>Bit</entry>
120 <entry>7</entry>
121 <entry>6</entry>
122 <entry>5</entry>
123 <entry>4</entry>
124 <entry>3</entry>
125 <entry>2</entry>
126 <entry>1</entry>
127 <entry>0</entry>
128 </row>
129 </thead>
130 <tbody valign="top">
131 <row id="V4L2-MBUS-FMT-RGB444-2X8-PADHI-BE">
132 <entry>V4L2_MBUS_FMT_RGB444_2X8_PADHI_BE</entry>
133 <entry>0x1001</entry>
134 <entry></entry>
135 <entry>0</entry>
136 <entry>0</entry>
137 <entry>0</entry>
138 <entry>0</entry>
139 <entry>r<subscript>3</subscript></entry>
140 <entry>r<subscript>2</subscript></entry>
141 <entry>r<subscript>1</subscript></entry>
142 <entry>r<subscript>0</subscript></entry>
143 </row>
144 <row>
145 <entry></entry>
146 <entry></entry>
147 <entry></entry>
148 <entry>g<subscript>3</subscript></entry>
149 <entry>g<subscript>2</subscript></entry>
150 <entry>g<subscript>1</subscript></entry>
151 <entry>g<subscript>0</subscript></entry>
152 <entry>b<subscript>3</subscript></entry>
153 <entry>b<subscript>2</subscript></entry>
154 <entry>b<subscript>1</subscript></entry>
155 <entry>b<subscript>0</subscript></entry>
156 </row>
157 <row id="V4L2-MBUS-FMT-RGB444-2X8-PADHI-LE">
158 <entry>V4L2_MBUS_FMT_RGB444_2X8_PADHI_LE</entry>
159 <entry>0x1002</entry>
160 <entry></entry>
161 <entry>g<subscript>3</subscript></entry>
162 <entry>g<subscript>2</subscript></entry>
163 <entry>g<subscript>1</subscript></entry>
164 <entry>g<subscript>0</subscript></entry>
165 <entry>b<subscript>3</subscript></entry>
166 <entry>b<subscript>2</subscript></entry>
167 <entry>b<subscript>1</subscript></entry>
168 <entry>b<subscript>0</subscript></entry>
169 </row>
170 <row>
171 <entry></entry>
172 <entry></entry>
173 <entry></entry>
174 <entry>0</entry>
175 <entry>0</entry>
176 <entry>0</entry>
177 <entry>0</entry>
178 <entry>r<subscript>3</subscript></entry>
179 <entry>r<subscript>2</subscript></entry>
180 <entry>r<subscript>1</subscript></entry>
181 <entry>r<subscript>0</subscript></entry>
182 </row>
183 <row id="V4L2-MBUS-FMT-RGB555-2X8-PADHI-BE">
184 <entry>V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE</entry>
185 <entry>0x1003</entry>
186 <entry></entry>
187 <entry>0</entry>
188 <entry>r<subscript>4</subscript></entry>
189 <entry>r<subscript>3</subscript></entry>
190 <entry>r<subscript>2</subscript></entry>
191 <entry>r<subscript>1</subscript></entry>
192 <entry>r<subscript>0</subscript></entry>
193 <entry>g<subscript>4</subscript></entry>
194 <entry>g<subscript>3</subscript></entry>
195 </row>
196 <row>
197 <entry></entry>
198 <entry></entry>
199 <entry></entry>
200 <entry>g<subscript>2</subscript></entry>
201 <entry>g<subscript>1</subscript></entry>
202 <entry>g<subscript>0</subscript></entry>
203 <entry>b<subscript>4</subscript></entry>
204 <entry>b<subscript>3</subscript></entry>
205 <entry>b<subscript>2</subscript></entry>
206 <entry>b<subscript>1</subscript></entry>
207 <entry>b<subscript>0</subscript></entry>
208 </row>
209 <row id="V4L2-MBUS-FMT-RGB555-2X8-PADHI-LE">
210 <entry>V4L2_MBUS_FMT_RGB555_2X8_PADHI_LE</entry>
211 <entry>0x1004</entry>
212 <entry></entry>
213 <entry>g<subscript>2</subscript></entry>
214 <entry>g<subscript>1</subscript></entry>
215 <entry>g<subscript>0</subscript></entry>
216 <entry>b<subscript>4</subscript></entry>
217 <entry>b<subscript>3</subscript></entry>
218 <entry>b<subscript>2</subscript></entry>
219 <entry>b<subscript>1</subscript></entry>
220 <entry>b<subscript>0</subscript></entry>
221 </row>
222 <row>
223 <entry></entry>
224 <entry></entry>
225 <entry></entry>
226 <entry>0</entry>
227 <entry>r<subscript>4</subscript></entry>
228 <entry>r<subscript>3</subscript></entry>
229 <entry>r<subscript>2</subscript></entry>
230 <entry>r<subscript>1</subscript></entry>
231 <entry>r<subscript>0</subscript></entry>
232 <entry>g<subscript>4</subscript></entry>
233 <entry>g<subscript>3</subscript></entry>
234 </row>
235 <row id="V4L2-MBUS-FMT-BGR565-2X8-BE">
236 <entry>V4L2_MBUS_FMT_BGR565_2X8_BE</entry>
237 <entry>0x1005</entry>
238 <entry></entry>
239 <entry>b<subscript>4</subscript></entry>
240 <entry>b<subscript>3</subscript></entry>
241 <entry>b<subscript>2</subscript></entry>
242 <entry>b<subscript>1</subscript></entry>
243 <entry>b<subscript>0</subscript></entry>
244 <entry>g<subscript>5</subscript></entry>
245 <entry>g<subscript>4</subscript></entry>
246 <entry>g<subscript>3</subscript></entry>
247 </row>
248 <row>
249 <entry></entry>
250 <entry></entry>
251 <entry></entry>
252 <entry>g<subscript>2</subscript></entry>
253 <entry>g<subscript>1</subscript></entry>
254 <entry>g<subscript>0</subscript></entry>
255 <entry>r<subscript>4</subscript></entry>
256 <entry>r<subscript>3</subscript></entry>
257 <entry>r<subscript>2</subscript></entry>
258 <entry>r<subscript>1</subscript></entry>
259 <entry>r<subscript>0</subscript></entry>
260 </row>
261 <row id="V4L2-MBUS-FMT-BGR565-2X8-LE">
262 <entry>V4L2_MBUS_FMT_BGR565_2X8_LE</entry>
263 <entry>0x1006</entry>
264 <entry></entry>
265 <entry>g<subscript>2</subscript></entry>
266 <entry>g<subscript>1</subscript></entry>
267 <entry>g<subscript>0</subscript></entry>
268 <entry>r<subscript>4</subscript></entry>
269 <entry>r<subscript>3</subscript></entry>
270 <entry>r<subscript>2</subscript></entry>
271 <entry>r<subscript>1</subscript></entry>
272 <entry>r<subscript>0</subscript></entry>
273 </row>
274 <row>
275 <entry></entry>
276 <entry></entry>
277 <entry></entry>
278 <entry>b<subscript>4</subscript></entry>
279 <entry>b<subscript>3</subscript></entry>
280 <entry>b<subscript>2</subscript></entry>
281 <entry>b<subscript>1</subscript></entry>
282 <entry>b<subscript>0</subscript></entry>
283 <entry>g<subscript>5</subscript></entry>
284 <entry>g<subscript>4</subscript></entry>
285 <entry>g<subscript>3</subscript></entry>
286 </row>
287 <row id="V4L2-MBUS-FMT-RGB565-2X8-BE">
288 <entry>V4L2_MBUS_FMT_RGB565_2X8_BE</entry>
289 <entry>0x1007</entry>
290 <entry></entry>
291 <entry>r<subscript>4</subscript></entry>
292 <entry>r<subscript>3</subscript></entry>
293 <entry>r<subscript>2</subscript></entry>
294 <entry>r<subscript>1</subscript></entry>
295 <entry>r<subscript>0</subscript></entry>
296 <entry>g<subscript>5</subscript></entry>
297 <entry>g<subscript>4</subscript></entry>
298 <entry>g<subscript>3</subscript></entry>
299 </row>
300 <row>
301 <entry></entry>
302 <entry></entry>
303 <entry></entry>
304 <entry>g<subscript>2</subscript></entry>
305 <entry>g<subscript>1</subscript></entry>
306 <entry>g<subscript>0</subscript></entry>
307 <entry>b<subscript>4</subscript></entry>
308 <entry>b<subscript>3</subscript></entry>
309 <entry>b<subscript>2</subscript></entry>
310 <entry>b<subscript>1</subscript></entry>
311 <entry>b<subscript>0</subscript></entry>
312 </row>
313 <row id="V4L2-MBUS-FMT-RGB565-2X8-LE">
314 <entry>V4L2_MBUS_FMT_RGB565_2X8_LE</entry>
315 <entry>0x1008</entry>
316 <entry></entry>
317 <entry>g<subscript>2</subscript></entry>
318 <entry>g<subscript>1</subscript></entry>
319 <entry>g<subscript>0</subscript></entry>
320 <entry>b<subscript>4</subscript></entry>
321 <entry>b<subscript>3</subscript></entry>
322 <entry>b<subscript>2</subscript></entry>
323 <entry>b<subscript>1</subscript></entry>
324 <entry>b<subscript>0</subscript></entry>
325 </row>
326 <row>
327 <entry></entry>
328 <entry></entry>
329 <entry></entry>
330 <entry>r<subscript>4</subscript></entry>
331 <entry>r<subscript>3</subscript></entry>
332 <entry>r<subscript>2</subscript></entry>
333 <entry>r<subscript>1</subscript></entry>
334 <entry>r<subscript>0</subscript></entry>
335 <entry>g<subscript>5</subscript></entry>
336 <entry>g<subscript>4</subscript></entry>
337 <entry>g<subscript>3</subscript></entry>
338 </row>
339 </tbody>
340 </tgroup>
341 </table>
342 </section>
343
344 <section>
345 <title>Bayer Formats</title>
346
347 <para>Those formats transfer pixel data as red, green and blue components.
348 The format code is made of the following information.
349 <itemizedlist>
350 <listitem><para>The red, green and blue components order code, as encoded in a
351 pixel sample. The possible values are shown in <xref
352 linkend="bayer-patterns" />.</para></listitem>
353 <listitem><para>The number of bits per pixel component. All components are
354 transferred on the same number of bits. Common values are 8, 10 and 12.</para>
355 </listitem>
356 <listitem><para>If the pixel components are DPCM-compressed, a mention of the
357 DPCM compression and the number of bits per compressed pixel component.</para>
358 </listitem>
359 <listitem><para>The number of bus samples per pixel. Pixels that are wider than
360 the bus width must be transferred in multiple samples. Common values are
361 1 and 2.</para></listitem>
362 <listitem><para>The bus width.</para></listitem>
363 <listitem><para>For formats where the total number of bits per pixel is smaller
364 than the number of bus samples per pixel times the bus width, a padding
365 value stating if the bytes are padded in their most high order bits
366 (PADHI) or low order bits (PADLO).</para></listitem>
367 <listitem><para>For formats where the number of bus samples per pixel is larger
368 than 1, an endianness value stating if the pixel is transferred MSB first
369 (BE) or LSB first (LE).</para></listitem>
370 </itemizedlist>
371 </para>
372
373 <para>For instance, a format with uncompressed 10-bit Bayer components
374 arranged in a red, green, green, blue pattern transferred as 2 8-bit
375 samples per pixel with the least significant bits transferred first will
376 be named <constant>V4L2_MBUS_FMT_SRGGB10_2X8_PADHI_LE</constant>.
377 </para>
378
379 <figure id="bayer-patterns">
380 <title>Bayer Patterns</title>
381 <mediaobject>
382 <imageobject>
383 <imagedata fileref="bayer.pdf" format="PS" />
384 </imageobject>
385 <imageobject>
386 <imagedata fileref="bayer.png" format="PNG" />
387 </imageobject>
388 <textobject>
389 <phrase>Bayer filter color patterns</phrase>
390 </textobject>
391 </mediaobject>
392 </figure>
393
394 <para>The following table lists existing packet Bayer formats. The data
395 organization is given as an example for the first pixel only.</para>
396
397 <table pgwide="0" frame="none" id="v4l2-mbus-pixelcode-bayer">
398 <title>Bayer Formats</title>
399 <tgroup cols="15">
400 <colspec colname="id" align="left" />
401 <colspec colname="code" align="center"/>
402 <colspec colname="bit" />
403 <colspec colnum="4" colname="b11" align="center" />
404 <colspec colnum="5" colname="b10" align="center" />
405 <colspec colnum="6" colname="b09" align="center" />
406 <colspec colnum="7" colname="b08" align="center" />
407 <colspec colnum="8" colname="b07" align="center" />
408 <colspec colnum="9" colname="b06" align="center" />
409 <colspec colnum="10" colname="b05" align="center" />
410 <colspec colnum="11" colname="b04" align="center" />
411 <colspec colnum="12" colname="b03" align="center" />
412 <colspec colnum="13" colname="b02" align="center" />
413 <colspec colnum="14" colname="b01" align="center" />
414 <colspec colnum="15" colname="b00" align="center" />
415 <spanspec namest="b11" nameend="b00" spanname="b0" />
416 <thead>
417 <row>
418 <entry>Identifier</entry>
419 <entry>Code</entry>
420 <entry></entry>
421 <entry spanname="b0">Data organization</entry>
422 </row>
423 <row>
424 <entry></entry>
425 <entry></entry>
426 <entry>Bit</entry>
427 <entry>11</entry>
428 <entry>10</entry>
429 <entry>9</entry>
430 <entry>8</entry>
431 <entry>7</entry>
432 <entry>6</entry>
433 <entry>5</entry>
434 <entry>4</entry>
435 <entry>3</entry>
436 <entry>2</entry>
437 <entry>1</entry>
438 <entry>0</entry>
439 </row>
440 </thead>
441 <tbody valign="top">
442 <row id="V4L2-MBUS-FMT-SBGGR8-1X8">
443 <entry>V4L2_MBUS_FMT_SBGGR8_1X8</entry>
444 <entry>0x3001</entry>
445 <entry></entry>
446 <entry>-</entry>
447 <entry>-</entry>
448 <entry>-</entry>
449 <entry>-</entry>
450 <entry>b<subscript>7</subscript></entry>
451 <entry>b<subscript>6</subscript></entry>
452 <entry>b<subscript>5</subscript></entry>
453 <entry>b<subscript>4</subscript></entry>
454 <entry>b<subscript>3</subscript></entry>
455 <entry>b<subscript>2</subscript></entry>
456 <entry>b<subscript>1</subscript></entry>
457 <entry>b<subscript>0</subscript></entry>
458 </row>
459 <row id="V4L2-MBUS-FMT-SGBRG8-1X8">
460 <entry>V4L2_MBUS_FMT_SGBRG8_1X8</entry>
461 <entry>0x3013</entry>
462 <entry></entry>
463 <entry>-</entry>
464 <entry>-</entry>
465 <entry>-</entry>
466 <entry>-</entry>
467 <entry>g<subscript>7</subscript></entry>
468 <entry>g<subscript>6</subscript></entry>
469 <entry>g<subscript>5</subscript></entry>
470 <entry>g<subscript>4</subscript></entry>
471 <entry>g<subscript>3</subscript></entry>
472 <entry>g<subscript>2</subscript></entry>
473 <entry>g<subscript>1</subscript></entry>
474 <entry>g<subscript>0</subscript></entry>
475 </row>
476 <row id="V4L2-MBUS-FMT-SGRBG8-1X8">
477 <entry>V4L2_MBUS_FMT_SGRBG8_1X8</entry>
478 <entry>0x3002</entry>
479 <entry></entry>
480 <entry>-</entry>
481 <entry>-</entry>
482 <entry>-</entry>
483 <entry>-</entry>
484 <entry>g<subscript>7</subscript></entry>
485 <entry>g<subscript>6</subscript></entry>
486 <entry>g<subscript>5</subscript></entry>
487 <entry>g<subscript>4</subscript></entry>
488 <entry>g<subscript>3</subscript></entry>
489 <entry>g<subscript>2</subscript></entry>
490 <entry>g<subscript>1</subscript></entry>
491 <entry>g<subscript>0</subscript></entry>
492 </row>
493 <row id="V4L2-MBUS-FMT-SRGGB8-1X8">
494 <entry>V4L2_MBUS_FMT_SRGGB8_1X8</entry>
495 <entry>0x3014</entry>
496 <entry></entry>
497 <entry>-</entry>
498 <entry>-</entry>
499 <entry>-</entry>
500 <entry>-</entry>
501 <entry>r<subscript>7</subscript></entry>
502 <entry>r<subscript>6</subscript></entry>
503 <entry>r<subscript>5</subscript></entry>
504 <entry>r<subscript>4</subscript></entry>
505 <entry>r<subscript>3</subscript></entry>
506 <entry>r<subscript>2</subscript></entry>
507 <entry>r<subscript>1</subscript></entry>
508 <entry>r<subscript>0</subscript></entry>
509 </row>
510 <row id="V4L2-MBUS-FMT-SBGGR10-DPCM8-1X8">
511 <entry>V4L2_MBUS_FMT_SBGGR10_DPCM8_1X8</entry>
512 <entry>0x300b</entry>
513 <entry></entry>
514 <entry>-</entry>
515 <entry>-</entry>
516 <entry>-</entry>
517 <entry>-</entry>
518 <entry>b<subscript>7</subscript></entry>
519 <entry>b<subscript>6</subscript></entry>
520 <entry>b<subscript>5</subscript></entry>
521 <entry>b<subscript>4</subscript></entry>
522 <entry>b<subscript>3</subscript></entry>
523 <entry>b<subscript>2</subscript></entry>
524 <entry>b<subscript>1</subscript></entry>
525 <entry>b<subscript>0</subscript></entry>
526 </row>
527 <row id="V4L2-MBUS-FMT-SGBRG10-DPCM8-1X8">
528 <entry>V4L2_MBUS_FMT_SGBRG10_DPCM8_1X8</entry>
529 <entry>0x300c</entry>
530 <entry></entry>
531 <entry>-</entry>
532 <entry>-</entry>
533 <entry>-</entry>
534 <entry>-</entry>
535 <entry>g<subscript>7</subscript></entry>
536 <entry>g<subscript>6</subscript></entry>
537 <entry>g<subscript>5</subscript></entry>
538 <entry>g<subscript>4</subscript></entry>
539 <entry>g<subscript>3</subscript></entry>
540 <entry>g<subscript>2</subscript></entry>
541 <entry>g<subscript>1</subscript></entry>
542 <entry>g<subscript>0</subscript></entry>
543 </row>
544 <row id="V4L2-MBUS-FMT-SGRBG10-DPCM8-1X8">
545 <entry>V4L2_MBUS_FMT_SGRBG10_DPCM8_1X8</entry>
546 <entry>0x3009</entry>
547 <entry></entry>
548 <entry>-</entry>
549 <entry>-</entry>
550 <entry>-</entry>
551 <entry>-</entry>
552 <entry>g<subscript>7</subscript></entry>
553 <entry>g<subscript>6</subscript></entry>
554 <entry>g<subscript>5</subscript></entry>
555 <entry>g<subscript>4</subscript></entry>
556 <entry>g<subscript>3</subscript></entry>
557 <entry>g<subscript>2</subscript></entry>
558 <entry>g<subscript>1</subscript></entry>
559 <entry>g<subscript>0</subscript></entry>
560 </row>
561 <row id="V4L2-MBUS-FMT-SRGGB10-DPCM8-1X8">
562 <entry>V4L2_MBUS_FMT_SRGGB10_DPCM8_1X8</entry>
563 <entry>0x300d</entry>
564 <entry></entry>
565 <entry>-</entry>
566 <entry>-</entry>
567 <entry>-</entry>
568 <entry>-</entry>
569 <entry>r<subscript>7</subscript></entry>
570 <entry>r<subscript>6</subscript></entry>
571 <entry>r<subscript>5</subscript></entry>
572 <entry>r<subscript>4</subscript></entry>
573 <entry>r<subscript>3</subscript></entry>
574 <entry>r<subscript>2</subscript></entry>
575 <entry>r<subscript>1</subscript></entry>
576 <entry>r<subscript>0</subscript></entry>
577 </row>
578 <row id="V4L2-MBUS-FMT-SBGGR10-2X8-PADHI-BE">
579 <entry>V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_BE</entry>
580 <entry>0x3003</entry>
581 <entry></entry>
582 <entry>-</entry>
583 <entry>-</entry>
584 <entry>-</entry>
585 <entry>-</entry>
586 <entry>0</entry>
587 <entry>0</entry>
588 <entry>0</entry>
589 <entry>0</entry>
590 <entry>0</entry>
591 <entry>0</entry>
592 <entry>b<subscript>9</subscript></entry>
593 <entry>b<subscript>8</subscript></entry>
594 </row>
595 <row>
596 <entry></entry>
597 <entry></entry>
598 <entry></entry>
599 <entry>-</entry>
600 <entry>-</entry>
601 <entry>-</entry>
602 <entry>-</entry>
603 <entry>b<subscript>7</subscript></entry>
604 <entry>b<subscript>6</subscript></entry>
605 <entry>b<subscript>5</subscript></entry>
606 <entry>b<subscript>4</subscript></entry>
607 <entry>b<subscript>3</subscript></entry>
608 <entry>b<subscript>2</subscript></entry>
609 <entry>b<subscript>1</subscript></entry>
610 <entry>b<subscript>0</subscript></entry>
611 </row>
612 <row id="V4L2-MBUS-FMT-SBGGR10-2X8-PADHI-LE">
613 <entry>V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_LE</entry>
614 <entry>0x3004</entry>
615 <entry></entry>
616 <entry>-</entry>
617 <entry>-</entry>
618 <entry>-</entry>
619 <entry>-</entry>
620 <entry>b<subscript>7</subscript></entry>
621 <entry>b<subscript>6</subscript></entry>
622 <entry>b<subscript>5</subscript></entry>
623 <entry>b<subscript>4</subscript></entry>
624 <entry>b<subscript>3</subscript></entry>
625 <entry>b<subscript>2</subscript></entry>
626 <entry>b<subscript>1</subscript></entry>
627 <entry>b<subscript>0</subscript></entry>
628 </row>
629 <row>
630 <entry></entry>
631 <entry></entry>
632 <entry></entry>
633 <entry>-</entry>
634 <entry>-</entry>
635 <entry>-</entry>
636 <entry>-</entry>
637 <entry>0</entry>
638 <entry>0</entry>
639 <entry>0</entry>
640 <entry>0</entry>
641 <entry>0</entry>
642 <entry>0</entry>
643 <entry>b<subscript>9</subscript></entry>
644 <entry>b<subscript>8</subscript></entry>
645 </row>
646 <row id="V4L2-MBUS-FMT-SBGGR10-2X8-PADLO-BE">
647 <entry>V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_BE</entry>
648 <entry>0x3005</entry>
649 <entry></entry>
650 <entry>-</entry>
651 <entry>-</entry>
652 <entry>-</entry>
653 <entry>-</entry>
654 <entry>b<subscript>9</subscript></entry>
655 <entry>b<subscript>8</subscript></entry>
656 <entry>b<subscript>7</subscript></entry>
657 <entry>b<subscript>6</subscript></entry>
658 <entry>b<subscript>5</subscript></entry>
659 <entry>b<subscript>4</subscript></entry>
660 <entry>b<subscript>3</subscript></entry>
661 <entry>b<subscript>2</subscript></entry>
662 </row>
663 <row>
664 <entry></entry>
665 <entry></entry>
666 <entry></entry>
667 <entry>-</entry>
668 <entry>-</entry>
669 <entry>-</entry>
670 <entry>-</entry>
671 <entry>b<subscript>1</subscript></entry>
672 <entry>b<subscript>0</subscript></entry>
673 <entry>0</entry>
674 <entry>0</entry>
675 <entry>0</entry>
676 <entry>0</entry>
677 <entry>0</entry>
678 <entry>0</entry>
679 </row>
680 <row id="V4L2-MBUS-FMT-SBGGR10-2X8-PADLO-LE">
681 <entry>V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_LE</entry>
682 <entry>0x3006</entry>
683 <entry></entry>
684 <entry>-</entry>
685 <entry>-</entry>
686 <entry>-</entry>
687 <entry>-</entry>
688 <entry>b<subscript>1</subscript></entry>
689 <entry>b<subscript>0</subscript></entry>
690 <entry>0</entry>
691 <entry>0</entry>
692 <entry>0</entry>
693 <entry>0</entry>
694 <entry>0</entry>
695 <entry>0</entry>
696 </row>
697 <row>
698 <entry></entry>
699 <entry></entry>
700 <entry></entry>
701 <entry>-</entry>
702 <entry>-</entry>
703 <entry>-</entry>
704 <entry>-</entry>
705 <entry>b<subscript>9</subscript></entry>
706 <entry>b<subscript>8</subscript></entry>
707 <entry>b<subscript>7</subscript></entry>
708 <entry>b<subscript>6</subscript></entry>
709 <entry>b<subscript>5</subscript></entry>
710 <entry>b<subscript>4</subscript></entry>
711 <entry>b<subscript>3</subscript></entry>
712 <entry>b<subscript>2</subscript></entry>
713 </row>
714 <row id="V4L2-MBUS-FMT-SBGGR10-1X10">
715 <entry>V4L2_MBUS_FMT_SBGGR10_1X10</entry>
716 <entry>0x3007</entry>
717 <entry></entry>
718 <entry>-</entry>
719 <entry>-</entry>
720 <entry>b<subscript>9</subscript></entry>
721 <entry>b<subscript>8</subscript></entry>
722 <entry>b<subscript>7</subscript></entry>
723 <entry>b<subscript>6</subscript></entry>
724 <entry>b<subscript>5</subscript></entry>
725 <entry>b<subscript>4</subscript></entry>
726 <entry>b<subscript>3</subscript></entry>
727 <entry>b<subscript>2</subscript></entry>
728 <entry>b<subscript>1</subscript></entry>
729 <entry>b<subscript>0</subscript></entry>
730 </row>
731 <row id="V4L2-MBUS-FMT-SGBRG10-1X10">
732 <entry>V4L2_MBUS_FMT_SGBRG10_1X10</entry>
733 <entry>0x300e</entry>
734 <entry></entry>
735 <entry>-</entry>
736 <entry>-</entry>
737 <entry>g<subscript>9</subscript></entry>
738 <entry>g<subscript>8</subscript></entry>
739 <entry>g<subscript>7</subscript></entry>
740 <entry>g<subscript>6</subscript></entry>
741 <entry>g<subscript>5</subscript></entry>
742 <entry>g<subscript>4</subscript></entry>
743 <entry>g<subscript>3</subscript></entry>
744 <entry>g<subscript>2</subscript></entry>
745 <entry>g<subscript>1</subscript></entry>
746 <entry>g<subscript>0</subscript></entry>
747 </row>
748 <row id="V4L2-MBUS-FMT-SGRBG10-1X10">
749 <entry>V4L2_MBUS_FMT_SGRBG10_1X10</entry>
750 <entry>0x300a</entry>
751 <entry></entry>
752 <entry>-</entry>
753 <entry>-</entry>
754 <entry>g<subscript>9</subscript></entry>
755 <entry>g<subscript>8</subscript></entry>
756 <entry>g<subscript>7</subscript></entry>
757 <entry>g<subscript>6</subscript></entry>
758 <entry>g<subscript>5</subscript></entry>
759 <entry>g<subscript>4</subscript></entry>
760 <entry>g<subscript>3</subscript></entry>
761 <entry>g<subscript>2</subscript></entry>
762 <entry>g<subscript>1</subscript></entry>
763 <entry>g<subscript>0</subscript></entry>
764 </row>
765 <row id="V4L2-MBUS-FMT-SRGGB10-1X10">
766 <entry>V4L2_MBUS_FMT_SRGGB10_1X10</entry>
767 <entry>0x300f</entry>
768 <entry></entry>
769 <entry>-</entry>
770 <entry>-</entry>
771 <entry>r<subscript>9</subscript></entry>
772 <entry>r<subscript>8</subscript></entry>
773 <entry>r<subscript>7</subscript></entry>
774 <entry>r<subscript>6</subscript></entry>
775 <entry>r<subscript>5</subscript></entry>
776 <entry>r<subscript>4</subscript></entry>
777 <entry>r<subscript>3</subscript></entry>
778 <entry>r<subscript>2</subscript></entry>
779 <entry>r<subscript>1</subscript></entry>
780 <entry>r<subscript>0</subscript></entry>
781 </row>
782 <row id="V4L2-MBUS-FMT-SBGGR12-1X12">
783 <entry>V4L2_MBUS_FMT_SBGGR12_1X12</entry>
784 <entry>0x3008</entry>
785 <entry></entry>
786 <entry>b<subscript>11</subscript></entry>
787 <entry>b<subscript>10</subscript></entry>
788 <entry>b<subscript>9</subscript></entry>
789 <entry>b<subscript>8</subscript></entry>
790 <entry>b<subscript>7</subscript></entry>
791 <entry>b<subscript>6</subscript></entry>
792 <entry>b<subscript>5</subscript></entry>
793 <entry>b<subscript>4</subscript></entry>
794 <entry>b<subscript>3</subscript></entry>
795 <entry>b<subscript>2</subscript></entry>
796 <entry>b<subscript>1</subscript></entry>
797 <entry>b<subscript>0</subscript></entry>
798 </row>
799 <row id="V4L2-MBUS-FMT-SGBRG12-1X12">
800 <entry>V4L2_MBUS_FMT_SGBRG12_1X12</entry>
801 <entry>0x3010</entry>
802 <entry></entry>
803 <entry>g<subscript>11</subscript></entry>
804 <entry>g<subscript>10</subscript></entry>
805 <entry>g<subscript>9</subscript></entry>
806 <entry>g<subscript>8</subscript></entry>
807 <entry>g<subscript>7</subscript></entry>
808 <entry>g<subscript>6</subscript></entry>
809 <entry>g<subscript>5</subscript></entry>
810 <entry>g<subscript>4</subscript></entry>
811 <entry>g<subscript>3</subscript></entry>
812 <entry>g<subscript>2</subscript></entry>
813 <entry>g<subscript>1</subscript></entry>
814 <entry>g<subscript>0</subscript></entry>
815 </row>
816 <row id="V4L2-MBUS-FMT-SGRBG12-1X12">
817 <entry>V4L2_MBUS_FMT_SGRBG12_1X12</entry>
818 <entry>0x3011</entry>
819 <entry></entry>
820 <entry>g<subscript>11</subscript></entry>
821 <entry>g<subscript>10</subscript></entry>
822 <entry>g<subscript>9</subscript></entry>
823 <entry>g<subscript>8</subscript></entry>
824 <entry>g<subscript>7</subscript></entry>
825 <entry>g<subscript>6</subscript></entry>
826 <entry>g<subscript>5</subscript></entry>
827 <entry>g<subscript>4</subscript></entry>
828 <entry>g<subscript>3</subscript></entry>
829 <entry>g<subscript>2</subscript></entry>
830 <entry>g<subscript>1</subscript></entry>
831 <entry>g<subscript>0</subscript></entry>
832 </row>
833 <row id="V4L2-MBUS-FMT-SRGGB12-1X12">
834 <entry>V4L2_MBUS_FMT_SRGGB12_1X12</entry>
835 <entry>0x3012</entry>
836 <entry></entry>
837 <entry>r<subscript>11</subscript></entry>
838 <entry>r<subscript>10</subscript></entry>
839 <entry>r<subscript>9</subscript></entry>
840 <entry>r<subscript>8</subscript></entry>
841 <entry>r<subscript>7</subscript></entry>
842 <entry>r<subscript>6</subscript></entry>
843 <entry>r<subscript>5</subscript></entry>
844 <entry>r<subscript>4</subscript></entry>
845 <entry>r<subscript>3</subscript></entry>
846 <entry>r<subscript>2</subscript></entry>
847 <entry>r<subscript>1</subscript></entry>
848 <entry>r<subscript>0</subscript></entry>
849 </row>
850 </tbody>
851 </tgroup>
852 </table>
853 </section>
854
855 <section>
856 <title>Packed YUV Formats</title>
857
858 <para>Those data formats transfer pixel data as (possibly downsampled) Y, U
859 and V components. The format code is made of the following information.
860 <itemizedlist>
861 <listitem><para>The Y, U and V components order code, as transferred on the
862 bus. Possible values are YUYV, UYVY, YVYU and VYUY.</para></listitem>
863 <listitem><para>The number of bits per pixel component. All components are
864 transferred on the same number of bits. Common values are 8, 10 and 12.</para>
865 </listitem>
866 <listitem><para>The number of bus samples per pixel. Pixels that are wider than
867 the bus width must be transferred in multiple samples. Common values are
868 1, 1.5 (encoded as 1_5) and 2.</para></listitem>
869 <listitem><para>The bus width. When the bus width is larger than the number of
870 bits per pixel component, several components are packed in a single bus
871 sample. The components are ordered as specified by the order code, with
872 components on the left of the code transferred in the high order bits.
873 Common values are 8 and 16.</para>
874 </listitem>
875 </itemizedlist>
876 </para>
877
878 <para>For instance, a format where pixels are encoded as 8-bit YUV values
879 downsampled to 4:2:2 and transferred as 2 8-bit bus samples per pixel in the
880 U, Y, V, Y order will be named <constant>V4L2_MBUS_FMT_UYVY8_2X8</constant>.
881 </para>
882
883 <para>The following table lisst existing packet YUV formats.</para>
884
885 <table pgwide="0" frame="none" id="v4l2-mbus-pixelcode-yuv8">
886 <title>YUV Formats</title>
887 <tgroup cols="23">
888 <colspec colname="id" align="left" />
889 <colspec colname="code" align="center"/>
890 <colspec colname="bit" />
891 <colspec colnum="4" colname="b19" align="center" />
892 <colspec colnum="5" colname="b18" align="center" />
893 <colspec colnum="6" colname="b17" align="center" />
894 <colspec colnum="7" colname="b16" align="center" />
895 <colspec colnum="8" colname="b15" align="center" />
896 <colspec colnum="9" colname="b14" align="center" />
897 <colspec colnum="10" colname="b13" align="center" />
898 <colspec colnum="11" colname="b12" align="center" />
899 <colspec colnum="12" colname="b11" align="center" />
900 <colspec colnum="13" colname="b10" align="center" />
901 <colspec colnum="14" colname="b09" align="center" />
902 <colspec colnum="15" colname="b08" align="center" />
903 <colspec colnum="16" colname="b07" align="center" />
904 <colspec colnum="17" colname="b06" align="center" />
905 <colspec colnum="18" colname="b05" align="center" />
906 <colspec colnum="19" colname="b04" align="center" />
907 <colspec colnum="20" colname="b03" align="center" />
908 <colspec colnum="21" colname="b02" align="center" />
909 <colspec colnum="22" colname="b01" align="center" />
910 <colspec colnum="23" colname="b00" align="center" />
911 <spanspec namest="b19" nameend="b00" spanname="b0" />
912 <thead>
913 <row>
914 <entry>Identifier</entry>
915 <entry>Code</entry>
916 <entry></entry>
917 <entry spanname="b0">Data organization</entry>
918 </row>
919 <row>
920 <entry></entry>
921 <entry></entry>
922 <entry>Bit</entry>
923 <entry>19</entry>
924 <entry>18</entry>
925 <entry>17</entry>
926 <entry>16</entry>
927 <entry>15</entry>
928 <entry>14</entry>
929 <entry>13</entry>
930 <entry>12</entry>
931 <entry>11</entry>
932 <entry>10</entry>
933 <entry>9</entry>
934 <entry>8</entry>
935 <entry>7</entry>
936 <entry>6</entry>
937 <entry>5</entry>
938 <entry>4</entry>
939 <entry>3</entry>
940 <entry>2</entry>
941 <entry>1</entry>
942 <entry>0</entry>
943 </row>
944 </thead>
945 <tbody valign="top">
946 <row id="V4L2-MBUS-FMT-Y8-1X8">
947 <entry>V4L2_MBUS_FMT_Y8_1X8</entry>
948 <entry>0x2001</entry>
949 <entry></entry>
950 <entry>-</entry>
951 <entry>-</entry>
952 <entry>-</entry>
953 <entry>-</entry>
954 <entry>-</entry>
955 <entry>-</entry>
956 <entry>-</entry>
957 <entry>-</entry>
958 <entry>-</entry>
959 <entry>-</entry>
960 <entry>-</entry>
961 <entry>-</entry>
962 <entry>y<subscript>7</subscript></entry>
963 <entry>y<subscript>6</subscript></entry>
964 <entry>y<subscript>5</subscript></entry>
965 <entry>y<subscript>4</subscript></entry>
966 <entry>y<subscript>3</subscript></entry>
967 <entry>y<subscript>2</subscript></entry>
968 <entry>y<subscript>1</subscript></entry>
969 <entry>y<subscript>0</subscript></entry>
970 </row>
971 <row id="V4L2-MBUS-FMT-UYVY8-1_5X8">
972 <entry>V4L2_MBUS_FMT_UYVY8_1_5X8</entry>
973 <entry>0x2002</entry>
974 <entry></entry>
975 <entry>-</entry>
976 <entry>-</entry>
977 <entry>-</entry>
978 <entry>-</entry>
979 <entry>-</entry>
980 <entry>-</entry>
981 <entry>-</entry>
982 <entry>-</entry>
983 <entry>-</entry>
984 <entry>-</entry>
985 <entry>-</entry>
986 <entry>-</entry>
987 <entry>u<subscript>7</subscript></entry>
988 <entry>u<subscript>6</subscript></entry>
989 <entry>u<subscript>5</subscript></entry>
990 <entry>u<subscript>4</subscript></entry>
991 <entry>u<subscript>3</subscript></entry>
992 <entry>u<subscript>2</subscript></entry>
993 <entry>u<subscript>1</subscript></entry>
994 <entry>u<subscript>0</subscript></entry>
995 </row>
996 <row>
997 <entry></entry>
998 <entry></entry>
999 <entry></entry>
1000 <entry>-</entry>
1001 <entry>-</entry>
1002 <entry>-</entry>
1003 <entry>-</entry>
1004 <entry>-</entry>
1005 <entry>-</entry>
1006 <entry>-</entry>
1007 <entry>-</entry>
1008 <entry>-</entry>
1009 <entry>-</entry>
1010 <entry>-</entry>
1011 <entry>-</entry>
1012 <entry>y<subscript>7</subscript></entry>
1013 <entry>y<subscript>6</subscript></entry>
1014 <entry>y<subscript>5</subscript></entry>
1015 <entry>y<subscript>4</subscript></entry>
1016 <entry>y<subscript>3</subscript></entry>
1017 <entry>y<subscript>2</subscript></entry>
1018 <entry>y<subscript>1</subscript></entry>
1019 <entry>y<subscript>0</subscript></entry>
1020 </row>
1021 <row>
1022 <entry></entry>
1023 <entry></entry>
1024 <entry></entry>
1025 <entry>-</entry>
1026 <entry>-</entry>
1027 <entry>-</entry>
1028 <entry>-</entry>
1029 <entry>-</entry>
1030 <entry>-</entry>
1031 <entry>-</entry>
1032 <entry>-</entry>
1033 <entry>-</entry>
1034 <entry>-</entry>
1035 <entry>-</entry>
1036 <entry>-</entry>
1037 <entry>y<subscript>7</subscript></entry>
1038 <entry>y<subscript>6</subscript></entry>
1039 <entry>y<subscript>5</subscript></entry>
1040 <entry>y<subscript>4</subscript></entry>
1041 <entry>y<subscript>3</subscript></entry>
1042 <entry>y<subscript>2</subscript></entry>
1043 <entry>y<subscript>1</subscript></entry>
1044 <entry>y<subscript>0</subscript></entry>
1045 </row>
1046 <row>
1047 <entry></entry>
1048 <entry></entry>
1049 <entry></entry>
1050 <entry>-</entry>
1051 <entry>-</entry>
1052 <entry>-</entry>
1053 <entry>-</entry>
1054 <entry>-</entry>
1055 <entry>-</entry>
1056 <entry>-</entry>
1057 <entry>-</entry>
1058 <entry>-</entry>
1059 <entry>-</entry>
1060 <entry>-</entry>
1061 <entry>-</entry>
1062 <entry>v<subscript>7</subscript></entry>
1063 <entry>v<subscript>6</subscript></entry>
1064 <entry>v<subscript>5</subscript></entry>
1065 <entry>v<subscript>4</subscript></entry>
1066 <entry>v<subscript>3</subscript></entry>
1067 <entry>v<subscript>2</subscript></entry>
1068 <entry>v<subscript>1</subscript></entry>
1069 <entry>v<subscript>0</subscript></entry>
1070 </row>
1071 <row>
1072 <entry></entry>
1073 <entry></entry>
1074 <entry></entry>
1075 <entry>-</entry>
1076 <entry>-</entry>
1077 <entry>-</entry>
1078 <entry>-</entry>
1079 <entry>-</entry>
1080 <entry>-</entry>
1081 <entry>-</entry>
1082 <entry>-</entry>
1083 <entry>-</entry>
1084 <entry>-</entry>
1085 <entry>-</entry>
1086 <entry>-</entry>
1087 <entry>y<subscript>7</subscript></entry>
1088 <entry>y<subscript>6</subscript></entry>
1089 <entry>y<subscript>5</subscript></entry>
1090 <entry>y<subscript>4</subscript></entry>
1091 <entry>y<subscript>3</subscript></entry>
1092 <entry>y<subscript>2</subscript></entry>
1093 <entry>y<subscript>1</subscript></entry>
1094 <entry>y<subscript>0</subscript></entry>
1095 </row>
1096 <row>
1097 <entry></entry>
1098 <entry></entry>
1099 <entry></entry>
1100 <entry>-</entry>
1101 <entry>-</entry>
1102 <entry>-</entry>
1103 <entry>-</entry>
1104 <entry>-</entry>
1105 <entry>-</entry>
1106 <entry>-</entry>
1107 <entry>-</entry>
1108 <entry>-</entry>
1109 <entry>-</entry>
1110 <entry>-</entry>
1111 <entry>-</entry>
1112 <entry>y<subscript>7</subscript></entry>
1113 <entry>y<subscript>6</subscript></entry>
1114 <entry>y<subscript>5</subscript></entry>
1115 <entry>y<subscript>4</subscript></entry>
1116 <entry>y<subscript>3</subscript></entry>
1117 <entry>y<subscript>2</subscript></entry>
1118 <entry>y<subscript>1</subscript></entry>
1119 <entry>y<subscript>0</subscript></entry>
1120 </row>
1121 <row id="V4L2-MBUS-FMT-VYUY8-1_5X8">
1122 <entry>V4L2_MBUS_FMT_VYUY8_1_5X8</entry>
1123 <entry>0x2003</entry>
1124 <entry></entry>
1125 <entry>-</entry>
1126 <entry>-</entry>
1127 <entry>-</entry>
1128 <entry>-</entry>
1129 <entry>-</entry>
1130 <entry>-</entry>
1131 <entry>-</entry>
1132 <entry>-</entry>
1133 <entry>-</entry>
1134 <entry>-</entry>
1135 <entry>-</entry>
1136 <entry>-</entry>
1137 <entry>v<subscript>7</subscript></entry>
1138 <entry>v<subscript>6</subscript></entry>
1139 <entry>v<subscript>5</subscript></entry>
1140 <entry>v<subscript>4</subscript></entry>
1141 <entry>v<subscript>3</subscript></entry>
1142 <entry>v<subscript>2</subscript></entry>
1143 <entry>v<subscript>1</subscript></entry>
1144 <entry>v<subscript>0</subscript></entry>
1145 </row>
1146 <row>
1147 <entry></entry>
1148 <entry></entry>
1149 <entry></entry>
1150 <entry>-</entry>
1151 <entry>-</entry>
1152 <entry>-</entry>
1153 <entry>-</entry>
1154 <entry>-</entry>
1155 <entry>-</entry>
1156 <entry>-</entry>
1157 <entry>-</entry>
1158 <entry>-</entry>
1159 <entry>-</entry>
1160 <entry>-</entry>
1161 <entry>-</entry>
1162 <entry>y<subscript>7</subscript></entry>
1163 <entry>y<subscript>6</subscript></entry>
1164 <entry>y<subscript>5</subscript></entry>
1165 <entry>y<subscript>4</subscript></entry>
1166 <entry>y<subscript>3</subscript></entry>
1167 <entry>y<subscript>2</subscript></entry>
1168 <entry>y<subscript>1</subscript></entry>
1169 <entry>y<subscript>0</subscript></entry>
1170 </row>
1171 <row>
1172 <entry></entry>
1173 <entry></entry>
1174 <entry></entry>
1175 <entry>-</entry>
1176 <entry>-</entry>
1177 <entry>-</entry>
1178 <entry>-</entry>
1179 <entry>-</entry>
1180 <entry>-</entry>
1181 <entry>-</entry>
1182 <entry>-</entry>
1183 <entry>-</entry>
1184 <entry>-</entry>
1185 <entry>-</entry>
1186 <entry>-</entry>
1187 <entry>y<subscript>7</subscript></entry>
1188 <entry>y<subscript>6</subscript></entry>
1189 <entry>y<subscript>5</subscript></entry>
1190 <entry>y<subscript>4</subscript></entry>
1191 <entry>y<subscript>3</subscript></entry>
1192 <entry>y<subscript>2</subscript></entry>
1193 <entry>y<subscript>1</subscript></entry>
1194 <entry>y<subscript>0</subscript></entry>
1195 </row>
1196 <row>
1197 <entry></entry>
1198 <entry></entry>
1199 <entry></entry>
1200 <entry>-</entry>
1201 <entry>-</entry>
1202 <entry>-</entry>
1203 <entry>-</entry>
1204 <entry>-</entry>
1205 <entry>-</entry>
1206 <entry>-</entry>
1207 <entry>-</entry>
1208 <entry>-</entry>
1209 <entry>-</entry>
1210 <entry>-</entry>
1211 <entry>-</entry>
1212 <entry>u<subscript>7</subscript></entry>
1213 <entry>u<subscript>6</subscript></entry>
1214 <entry>u<subscript>5</subscript></entry>
1215 <entry>u<subscript>4</subscript></entry>
1216 <entry>u<subscript>3</subscript></entry>
1217 <entry>u<subscript>2</subscript></entry>
1218 <entry>u<subscript>1</subscript></entry>
1219 <entry>u<subscript>0</subscript></entry>
1220 </row>
1221 <row>
1222 <entry></entry>
1223 <entry></entry>
1224 <entry></entry>
1225 <entry>-</entry>
1226 <entry>-</entry>
1227 <entry>-</entry>
1228 <entry>-</entry>
1229 <entry>-</entry>
1230 <entry>-</entry>
1231 <entry>-</entry>
1232 <entry>-</entry>
1233 <entry>-</entry>
1234 <entry>-</entry>
1235 <entry>-</entry>
1236 <entry>-</entry>
1237 <entry>y<subscript>7</subscript></entry>
1238 <entry>y<subscript>6</subscript></entry>
1239 <entry>y<subscript>5</subscript></entry>
1240 <entry>y<subscript>4</subscript></entry>
1241 <entry>y<subscript>3</subscript></entry>
1242 <entry>y<subscript>2</subscript></entry>
1243 <entry>y<subscript>1</subscript></entry>
1244 <entry>y<subscript>0</subscript></entry>
1245 </row>
1246 <row>
1247 <entry></entry>
1248 <entry></entry>
1249 <entry></entry>
1250 <entry>-</entry>
1251 <entry>-</entry>
1252 <entry>-</entry>
1253 <entry>-</entry>
1254 <entry>-</entry>
1255 <entry>-</entry>
1256 <entry>-</entry>
1257 <entry>-</entry>
1258 <entry>-</entry>
1259 <entry>-</entry>
1260 <entry>-</entry>
1261 <entry>-</entry>
1262 <entry>y<subscript>7</subscript></entry>
1263 <entry>y<subscript>6</subscript></entry>
1264 <entry>y<subscript>5</subscript></entry>
1265 <entry>y<subscript>4</subscript></entry>
1266 <entry>y<subscript>3</subscript></entry>
1267 <entry>y<subscript>2</subscript></entry>
1268 <entry>y<subscript>1</subscript></entry>
1269 <entry>y<subscript>0</subscript></entry>
1270 </row>
1271 <row id="V4L2-MBUS-FMT-YUYV8-1_5X8">
1272 <entry>V4L2_MBUS_FMT_YUYV8_1_5X8</entry>
1273 <entry>0x2004</entry>
1274 <entry></entry>
1275 <entry>-</entry>
1276 <entry>-</entry>
1277 <entry>-</entry>
1278 <entry>-</entry>
1279 <entry>-</entry>
1280 <entry>-</entry>
1281 <entry>-</entry>
1282 <entry>-</entry>
1283 <entry>-</entry>
1284 <entry>-</entry>
1285 <entry>-</entry>
1286 <entry>-</entry>
1287 <entry>y<subscript>7</subscript></entry>
1288 <entry>y<subscript>6</subscript></entry>
1289 <entry>y<subscript>5</subscript></entry>
1290 <entry>y<subscript>4</subscript></entry>
1291 <entry>y<subscript>3</subscript></entry>
1292 <entry>y<subscript>2</subscript></entry>
1293 <entry>y<subscript>1</subscript></entry>
1294 <entry>y<subscript>0</subscript></entry>
1295 </row>
1296 <row>
1297 <entry></entry>
1298 <entry></entry>
1299 <entry></entry>
1300 <entry>-</entry>
1301 <entry>-</entry>
1302 <entry>-</entry>
1303 <entry>-</entry>
1304 <entry>-</entry>
1305 <entry>-</entry>
1306 <entry>-</entry>
1307 <entry>-</entry>
1308 <entry>-</entry>
1309 <entry>-</entry>
1310 <entry>-</entry>
1311 <entry>-</entry>
1312 <entry>y<subscript>7</subscript></entry>
1313 <entry>y<subscript>6</subscript></entry>
1314 <entry>y<subscript>5</subscript></entry>
1315 <entry>y<subscript>4</subscript></entry>
1316 <entry>y<subscript>3</subscript></entry>
1317 <entry>y<subscript>2</subscript></entry>
1318 <entry>y<subscript>1</subscript></entry>
1319 <entry>y<subscript>0</subscript></entry>
1320 </row>
1321 <row>
1322 <entry></entry>
1323 <entry></entry>
1324 <entry></entry>
1325 <entry>-</entry>
1326 <entry>-</entry>
1327 <entry>-</entry>
1328 <entry>-</entry>
1329 <entry>-</entry>
1330 <entry>-</entry>
1331 <entry>-</entry>
1332 <entry>-</entry>
1333 <entry>-</entry>
1334 <entry>-</entry>
1335 <entry>-</entry>
1336 <entry>-</entry>
1337 <entry>u<subscript>7</subscript></entry>
1338 <entry>u<subscript>6</subscript></entry>
1339 <entry>u<subscript>5</subscript></entry>
1340 <entry>u<subscript>4</subscript></entry>
1341 <entry>u<subscript>3</subscript></entry>
1342 <entry>u<subscript>2</subscript></entry>
1343 <entry>u<subscript>1</subscript></entry>
1344 <entry>u<subscript>0</subscript></entry>
1345 </row>
1346 <row>
1347 <entry></entry>
1348 <entry></entry>
1349 <entry></entry>
1350 <entry>-</entry>
1351 <entry>-</entry>
1352 <entry>-</entry>
1353 <entry>-</entry>
1354 <entry>-</entry>
1355 <entry>-</entry>
1356 <entry>-</entry>
1357 <entry>-</entry>
1358 <entry>-</entry>
1359 <entry>-</entry>
1360 <entry>-</entry>
1361 <entry>-</entry>
1362 <entry>y<subscript>7</subscript></entry>
1363 <entry>y<subscript>6</subscript></entry>
1364 <entry>y<subscript>5</subscript></entry>
1365 <entry>y<subscript>4</subscript></entry>
1366 <entry>y<subscript>3</subscript></entry>
1367 <entry>y<subscript>2</subscript></entry>
1368 <entry>y<subscript>1</subscript></entry>
1369 <entry>y<subscript>0</subscript></entry>
1370 </row>
1371 <row>
1372 <entry></entry>
1373 <entry></entry>
1374 <entry></entry>
1375 <entry>-</entry>
1376 <entry>-</entry>
1377 <entry>-</entry>
1378 <entry>-</entry>
1379 <entry>-</entry>
1380 <entry>-</entry>
1381 <entry>-</entry>
1382 <entry>-</entry>
1383 <entry>-</entry>
1384 <entry>-</entry>
1385 <entry>-</entry>
1386 <entry>-</entry>
1387 <entry>y<subscript>7</subscript></entry>
1388 <entry>y<subscript>6</subscript></entry>
1389 <entry>y<subscript>5</subscript></entry>
1390 <entry>y<subscript>4</subscript></entry>
1391 <entry>y<subscript>3</subscript></entry>
1392 <entry>y<subscript>2</subscript></entry>
1393 <entry>y<subscript>1</subscript></entry>
1394 <entry>y<subscript>0</subscript></entry>
1395 </row>
1396 <row>
1397 <entry></entry>
1398 <entry></entry>
1399 <entry></entry>
1400 <entry>-</entry>
1401 <entry>-</entry>
1402 <entry>-</entry>
1403 <entry>-</entry>
1404 <entry>-</entry>
1405 <entry>-</entry>
1406 <entry>-</entry>
1407 <entry>-</entry>
1408 <entry>-</entry>
1409 <entry>-</entry>
1410 <entry>-</entry>
1411 <entry>-</entry>
1412 <entry>v<subscript>7</subscript></entry>
1413 <entry>v<subscript>6</subscript></entry>
1414 <entry>v<subscript>5</subscript></entry>
1415 <entry>v<subscript>4</subscript></entry>
1416 <entry>v<subscript>3</subscript></entry>
1417 <entry>v<subscript>2</subscript></entry>
1418 <entry>v<subscript>1</subscript></entry>
1419 <entry>v<subscript>0</subscript></entry>
1420 </row>
1421 <row id="V4L2-MBUS-FMT-YVYU8-1_5X8">
1422 <entry>V4L2_MBUS_FMT_YVYU8_1_5X8</entry>
1423 <entry>0x2005</entry>
1424 <entry></entry>
1425 <entry>-</entry>
1426 <entry>-</entry>
1427 <entry>-</entry>
1428 <entry>-</entry>
1429 <entry>-</entry>
1430 <entry>-</entry>
1431 <entry>-</entry>
1432 <entry>-</entry>
1433 <entry>-</entry>
1434 <entry>-</entry>
1435 <entry>-</entry>
1436 <entry>-</entry>
1437 <entry>y<subscript>7</subscript></entry>
1438 <entry>y<subscript>6</subscript></entry>
1439 <entry>y<subscript>5</subscript></entry>
1440 <entry>y<subscript>4</subscript></entry>
1441 <entry>y<subscript>3</subscript></entry>
1442 <entry>y<subscript>2</subscript></entry>
1443 <entry>y<subscript>1</subscript></entry>
1444 <entry>y<subscript>0</subscript></entry>
1445 </row>
1446 <row>
1447 <entry></entry>
1448 <entry></entry>
1449 <entry></entry>
1450 <entry>-</entry>
1451 <entry>-</entry>
1452 <entry>-</entry>
1453 <entry>-</entry>
1454 <entry>-</entry>
1455 <entry>-</entry>
1456 <entry>-</entry>
1457 <entry>-</entry>
1458 <entry>-</entry>
1459 <entry>-</entry>
1460 <entry>-</entry>
1461 <entry>-</entry>
1462 <entry>y<subscript>7</subscript></entry>
1463 <entry>y<subscript>6</subscript></entry>
1464 <entry>y<subscript>5</subscript></entry>
1465 <entry>y<subscript>4</subscript></entry>
1466 <entry>y<subscript>3</subscript></entry>
1467 <entry>y<subscript>2</subscript></entry>
1468 <entry>y<subscript>1</subscript></entry>
1469 <entry>y<subscript>0</subscript></entry>
1470 </row>
1471 <row>
1472 <entry></entry>
1473 <entry></entry>
1474 <entry></entry>
1475 <entry>-</entry>
1476 <entry>-</entry>
1477 <entry>-</entry>
1478 <entry>-</entry>
1479 <entry>-</entry>
1480 <entry>-</entry>
1481 <entry>-</entry>
1482 <entry>-</entry>
1483 <entry>-</entry>
1484 <entry>-</entry>
1485 <entry>-</entry>
1486 <entry>-</entry>
1487 <entry>v<subscript>7</subscript></entry>
1488 <entry>v<subscript>6</subscript></entry>
1489 <entry>v<subscript>5</subscript></entry>
1490 <entry>v<subscript>4</subscript></entry>
1491 <entry>v<subscript>3</subscript></entry>
1492 <entry>v<subscript>2</subscript></entry>
1493 <entry>v<subscript>1</subscript></entry>
1494 <entry>v<subscript>0</subscript></entry>
1495 </row>
1496 <row>
1497 <entry></entry>
1498 <entry></entry>
1499 <entry></entry>
1500 <entry>-</entry>
1501 <entry>-</entry>
1502 <entry>-</entry>
1503 <entry>-</entry>
1504 <entry>-</entry>
1505 <entry>-</entry>
1506 <entry>-</entry>
1507 <entry>-</entry>
1508 <entry>-</entry>
1509 <entry>-</entry>
1510 <entry>-</entry>
1511 <entry>-</entry>
1512 <entry>y<subscript>7</subscript></entry>
1513 <entry>y<subscript>6</subscript></entry>
1514 <entry>y<subscript>5</subscript></entry>
1515 <entry>y<subscript>4</subscript></entry>
1516 <entry>y<subscript>3</subscript></entry>
1517 <entry>y<subscript>2</subscript></entry>
1518 <entry>y<subscript>1</subscript></entry>
1519 <entry>y<subscript>0</subscript></entry>
1520 </row>
1521 <row>
1522 <entry></entry>
1523 <entry></entry>
1524 <entry></entry>
1525 <entry>-</entry>
1526 <entry>-</entry>
1527 <entry>-</entry>
1528 <entry>-</entry>
1529 <entry>-</entry>
1530 <entry>-</entry>
1531 <entry>-</entry>
1532 <entry>-</entry>
1533 <entry>-</entry>
1534 <entry>-</entry>
1535 <entry>-</entry>
1536 <entry>-</entry>
1537 <entry>y<subscript>7</subscript></entry>
1538 <entry>y<subscript>6</subscript></entry>
1539 <entry>y<subscript>5</subscript></entry>
1540 <entry>y<subscript>4</subscript></entry>
1541 <entry>y<subscript>3</subscript></entry>
1542 <entry>y<subscript>2</subscript></entry>
1543 <entry>y<subscript>1</subscript></entry>
1544 <entry>y<subscript>0</subscript></entry>
1545 </row>
1546 <row>
1547 <entry></entry>
1548 <entry></entry>
1549 <entry></entry>
1550 <entry>-</entry>
1551 <entry>-</entry>
1552 <entry>-</entry>
1553 <entry>-</entry>
1554 <entry>-</entry>
1555 <entry>-</entry>
1556 <entry>-</entry>
1557 <entry>-</entry>
1558 <entry>-</entry>
1559 <entry>-</entry>
1560 <entry>-</entry>
1561 <entry>-</entry>
1562 <entry>u<subscript>7</subscript></entry>
1563 <entry>u<subscript>6</subscript></entry>
1564 <entry>u<subscript>5</subscript></entry>
1565 <entry>u<subscript>4</subscript></entry>
1566 <entry>u<subscript>3</subscript></entry>
1567 <entry>u<subscript>2</subscript></entry>
1568 <entry>u<subscript>1</subscript></entry>
1569 <entry>u<subscript>0</subscript></entry>
1570 </row>
1571 <row id="V4L2-MBUS-FMT-UYVY8-2X8">
1572 <entry>V4L2_MBUS_FMT_UYVY8_2X8</entry>
1573 <entry>0x2006</entry>
1574 <entry></entry>
1575 <entry>-</entry>
1576 <entry>-</entry>
1577 <entry>-</entry>
1578 <entry>-</entry>
1579 <entry>-</entry>
1580 <entry>-</entry>
1581 <entry>-</entry>
1582 <entry>-</entry>
1583 <entry>-</entry>
1584 <entry>-</entry>
1585 <entry>-</entry>
1586 <entry>-</entry>
1587 <entry>u<subscript>7</subscript></entry>
1588 <entry>u<subscript>6</subscript></entry>
1589 <entry>u<subscript>5</subscript></entry>
1590 <entry>u<subscript>4</subscript></entry>
1591 <entry>u<subscript>3</subscript></entry>
1592 <entry>u<subscript>2</subscript></entry>
1593 <entry>u<subscript>1</subscript></entry>
1594 <entry>u<subscript>0</subscript></entry>
1595 </row>
1596 <row>
1597 <entry></entry>
1598 <entry></entry>
1599 <entry></entry>
1600 <entry>-</entry>
1601 <entry>-</entry>
1602 <entry>-</entry>
1603 <entry>-</entry>
1604 <entry>-</entry>
1605 <entry>-</entry>
1606 <entry>-</entry>
1607 <entry>-</entry>
1608 <entry>-</entry>
1609 <entry>-</entry>
1610 <entry>-</entry>
1611 <entry>-</entry>
1612 <entry>y<subscript>7</subscript></entry>
1613 <entry>y<subscript>6</subscript></entry>
1614 <entry>y<subscript>5</subscript></entry>
1615 <entry>y<subscript>4</subscript></entry>
1616 <entry>y<subscript>3</subscript></entry>
1617 <entry>y<subscript>2</subscript></entry>
1618 <entry>y<subscript>1</subscript></entry>
1619 <entry>y<subscript>0</subscript></entry>
1620 </row>
1621 <row>
1622 <entry></entry>
1623 <entry></entry>
1624 <entry></entry>
1625 <entry>-</entry>
1626 <entry>-</entry>
1627 <entry>-</entry>
1628 <entry>-</entry>
1629 <entry>-</entry>
1630 <entry>-</entry>
1631 <entry>-</entry>
1632 <entry>-</entry>
1633 <entry>-</entry>
1634 <entry>-</entry>
1635 <entry>-</entry>
1636 <entry>-</entry>
1637 <entry>v<subscript>7</subscript></entry>
1638 <entry>v<subscript>6</subscript></entry>
1639 <entry>v<subscript>5</subscript></entry>
1640 <entry>v<subscript>4</subscript></entry>
1641 <entry>v<subscript>3</subscript></entry>
1642 <entry>v<subscript>2</subscript></entry>
1643 <entry>v<subscript>1</subscript></entry>
1644 <entry>v<subscript>0</subscript></entry>
1645 </row>
1646 <row>
1647 <entry></entry>
1648 <entry></entry>
1649 <entry></entry>
1650 <entry>-</entry>
1651 <entry>-</entry>
1652 <entry>-</entry>
1653 <entry>-</entry>
1654 <entry>-</entry>
1655 <entry>-</entry>
1656 <entry>-</entry>
1657 <entry>-</entry>
1658 <entry>-</entry>
1659 <entry>-</entry>
1660 <entry>-</entry>
1661 <entry>-</entry>
1662 <entry>y<subscript>7</subscript></entry>
1663 <entry>y<subscript>6</subscript></entry>
1664 <entry>y<subscript>5</subscript></entry>
1665 <entry>y<subscript>4</subscript></entry>
1666 <entry>y<subscript>3</subscript></entry>
1667 <entry>y<subscript>2</subscript></entry>
1668 <entry>y<subscript>1</subscript></entry>
1669 <entry>y<subscript>0</subscript></entry>
1670 </row>
1671 <row id="V4L2-MBUS-FMT-VYUY8-2X8">
1672 <entry>V4L2_MBUS_FMT_VYUY8_2X8</entry>
1673 <entry>0x2007</entry>
1674 <entry></entry>
1675 <entry>-</entry>
1676 <entry>-</entry>
1677 <entry>-</entry>
1678 <entry>-</entry>
1679 <entry>-</entry>
1680 <entry>-</entry>
1681 <entry>-</entry>
1682 <entry>-</entry>
1683 <entry>-</entry>
1684 <entry>-</entry>
1685 <entry>-</entry>
1686 <entry>-</entry>
1687 <entry>v<subscript>7</subscript></entry>
1688 <entry>v<subscript>6</subscript></entry>
1689 <entry>v<subscript>5</subscript></entry>
1690 <entry>v<subscript>4</subscript></entry>
1691 <entry>v<subscript>3</subscript></entry>
1692 <entry>v<subscript>2</subscript></entry>
1693 <entry>v<subscript>1</subscript></entry>
1694 <entry>v<subscript>0</subscript></entry>
1695 </row>
1696 <row>
1697 <entry></entry>
1698 <entry></entry>
1699 <entry></entry>
1700 <entry>-</entry>
1701 <entry>-</entry>
1702 <entry>-</entry>
1703 <entry>-</entry>
1704 <entry>-</entry>
1705 <entry>-</entry>
1706 <entry>-</entry>
1707 <entry>-</entry>
1708 <entry>-</entry>
1709 <entry>-</entry>
1710 <entry>-</entry>
1711 <entry>-</entry>
1712 <entry>y<subscript>7</subscript></entry>
1713 <entry>y<subscript>6</subscript></entry>
1714 <entry>y<subscript>5</subscript></entry>
1715 <entry>y<subscript>4</subscript></entry>
1716 <entry>y<subscript>3</subscript></entry>
1717 <entry>y<subscript>2</subscript></entry>
1718 <entry>y<subscript>1</subscript></entry>
1719 <entry>y<subscript>0</subscript></entry>
1720 </row>
1721 <row>
1722 <entry></entry>
1723 <entry></entry>
1724 <entry></entry>
1725 <entry>-</entry>
1726 <entry>-</entry>
1727 <entry>-</entry>
1728 <entry>-</entry>
1729 <entry>-</entry>
1730 <entry>-</entry>
1731 <entry>-</entry>
1732 <entry>-</entry>
1733 <entry>-</entry>
1734 <entry>-</entry>
1735 <entry>-</entry>
1736 <entry>-</entry>
1737 <entry>u<subscript>7</subscript></entry>
1738 <entry>u<subscript>6</subscript></entry>
1739 <entry>u<subscript>5</subscript></entry>
1740 <entry>u<subscript>4</subscript></entry>
1741 <entry>u<subscript>3</subscript></entry>
1742 <entry>u<subscript>2</subscript></entry>
1743 <entry>u<subscript>1</subscript></entry>
1744 <entry>u<subscript>0</subscript></entry>
1745 </row>
1746 <row>
1747 <entry></entry>
1748 <entry></entry>
1749 <entry></entry>
1750 <entry>-</entry>
1751 <entry>-</entry>
1752 <entry>-</entry>
1753 <entry>-</entry>
1754 <entry>-</entry>
1755 <entry>-</entry>
1756 <entry>-</entry>
1757 <entry>-</entry>
1758 <entry>-</entry>
1759 <entry>-</entry>
1760 <entry>-</entry>
1761 <entry>-</entry>
1762 <entry>y<subscript>7</subscript></entry>
1763 <entry>y<subscript>6</subscript></entry>
1764 <entry>y<subscript>5</subscript></entry>
1765 <entry>y<subscript>4</subscript></entry>
1766 <entry>y<subscript>3</subscript></entry>
1767 <entry>y<subscript>2</subscript></entry>
1768 <entry>y<subscript>1</subscript></entry>
1769 <entry>y<subscript>0</subscript></entry>
1770 </row>
1771 <row id="V4L2-MBUS-FMT-YUYV8-2X8">
1772 <entry>V4L2_MBUS_FMT_YUYV8_2X8</entry>
1773 <entry>0x2008</entry>
1774 <entry></entry>
1775 <entry>-</entry>
1776 <entry>-</entry>
1777 <entry>-</entry>
1778 <entry>-</entry>
1779 <entry>-</entry>
1780 <entry>-</entry>
1781 <entry>-</entry>
1782 <entry>-</entry>
1783 <entry>-</entry>
1784 <entry>-</entry>
1785 <entry>-</entry>
1786 <entry>-</entry>
1787 <entry>y<subscript>7</subscript></entry>
1788 <entry>y<subscript>6</subscript></entry>
1789 <entry>y<subscript>5</subscript></entry>
1790 <entry>y<subscript>4</subscript></entry>
1791 <entry>y<subscript>3</subscript></entry>
1792 <entry>y<subscript>2</subscript></entry>
1793 <entry>y<subscript>1</subscript></entry>
1794 <entry>y<subscript>0</subscript></entry>
1795 </row>
1796 <row>
1797 <entry></entry>
1798 <entry></entry>
1799 <entry></entry>
1800 <entry>-</entry>
1801 <entry>-</entry>
1802 <entry>-</entry>
1803 <entry>-</entry>
1804 <entry>-</entry>
1805 <entry>-</entry>
1806 <entry>-</entry>
1807 <entry>-</entry>
1808 <entry>-</entry>
1809 <entry>-</entry>
1810 <entry>-</entry>
1811 <entry>-</entry>
1812 <entry>u<subscript>7</subscript></entry>
1813 <entry>u<subscript>6</subscript></entry>
1814 <entry>u<subscript>5</subscript></entry>
1815 <entry>u<subscript>4</subscript></entry>
1816 <entry>u<subscript>3</subscript></entry>
1817 <entry>u<subscript>2</subscript></entry>
1818 <entry>u<subscript>1</subscript></entry>
1819 <entry>u<subscript>0</subscript></entry>
1820 </row>
1821 <row>
1822 <entry></entry>
1823 <entry></entry>
1824 <entry></entry>
1825 <entry>-</entry>
1826 <entry>-</entry>
1827 <entry>-</entry>
1828 <entry>-</entry>
1829 <entry>-</entry>
1830 <entry>-</entry>
1831 <entry>-</entry>
1832 <entry>-</entry>
1833 <entry>-</entry>
1834 <entry>-</entry>
1835 <entry>-</entry>
1836 <entry>-</entry>
1837 <entry>y<subscript>7</subscript></entry>
1838 <entry>y<subscript>6</subscript></entry>
1839 <entry>y<subscript>5</subscript></entry>
1840 <entry>y<subscript>4</subscript></entry>
1841 <entry>y<subscript>3</subscript></entry>
1842 <entry>y<subscript>2</subscript></entry>
1843 <entry>y<subscript>1</subscript></entry>
1844 <entry>y<subscript>0</subscript></entry>
1845 </row>
1846 <row>
1847 <entry></entry>
1848 <entry></entry>
1849 <entry></entry>
1850 <entry>-</entry>
1851 <entry>-</entry>
1852 <entry>-</entry>
1853 <entry>-</entry>
1854 <entry>-</entry>
1855 <entry>-</entry>
1856 <entry>-</entry>
1857 <entry>-</entry>
1858 <entry>-</entry>
1859 <entry>-</entry>
1860 <entry>-</entry>
1861 <entry>-</entry>
1862 <entry>v<subscript>7</subscript></entry>
1863 <entry>v<subscript>6</subscript></entry>
1864 <entry>v<subscript>5</subscript></entry>
1865 <entry>v<subscript>4</subscript></entry>
1866 <entry>v<subscript>3</subscript></entry>
1867 <entry>v<subscript>2</subscript></entry>
1868 <entry>v<subscript>1</subscript></entry>
1869 <entry>v<subscript>0</subscript></entry>
1870 </row>
1871 <row id="V4L2-MBUS-FMT-YVYU8-2X8">
1872 <entry>V4L2_MBUS_FMT_YVYU8_2X8</entry>
1873 <entry>0x2009</entry>
1874 <entry></entry>
1875 <entry>-</entry>
1876 <entry>-</entry>
1877 <entry>-</entry>
1878 <entry>-</entry>
1879 <entry>-</entry>
1880 <entry>-</entry>
1881 <entry>-</entry>
1882 <entry>-</entry>
1883 <entry>-</entry>
1884 <entry>-</entry>
1885 <entry>-</entry>
1886 <entry>-</entry>
1887 <entry>y<subscript>7</subscript></entry>
1888 <entry>y<subscript>6</subscript></entry>
1889 <entry>y<subscript>5</subscript></entry>
1890 <entry>y<subscript>4</subscript></entry>
1891 <entry>y<subscript>3</subscript></entry>
1892 <entry>y<subscript>2</subscript></entry>
1893 <entry>y<subscript>1</subscript></entry>
1894 <entry>y<subscript>0</subscript></entry>
1895 </row>
1896 <row>
1897 <entry></entry>
1898 <entry></entry>
1899 <entry></entry>
1900 <entry>-</entry>
1901 <entry>-</entry>
1902 <entry>-</entry>
1903 <entry>-</entry>
1904 <entry>-</entry>
1905 <entry>-</entry>
1906 <entry>-</entry>
1907 <entry>-</entry>
1908 <entry>-</entry>
1909 <entry>-</entry>
1910 <entry>-</entry>
1911 <entry>-</entry>
1912 <entry>v<subscript>7</subscript></entry>
1913 <entry>v<subscript>6</subscript></entry>
1914 <entry>v<subscript>5</subscript></entry>
1915 <entry>v<subscript>4</subscript></entry>
1916 <entry>v<subscript>3</subscript></entry>
1917 <entry>v<subscript>2</subscript></entry>
1918 <entry>v<subscript>1</subscript></entry>
1919 <entry>v<subscript>0</subscript></entry>
1920 </row>
1921 <row>
1922 <entry></entry>
1923 <entry></entry>
1924 <entry></entry>
1925 <entry>-</entry>
1926 <entry>-</entry>
1927 <entry>-</entry>
1928 <entry>-</entry>
1929 <entry>-</entry>
1930 <entry>-</entry>
1931 <entry>-</entry>
1932 <entry>-</entry>
1933 <entry>-</entry>
1934 <entry>-</entry>
1935 <entry>-</entry>
1936 <entry>-</entry>
1937 <entry>y<subscript>7</subscript></entry>
1938 <entry>y<subscript>6</subscript></entry>
1939 <entry>y<subscript>5</subscript></entry>
1940 <entry>y<subscript>4</subscript></entry>
1941 <entry>y<subscript>3</subscript></entry>
1942 <entry>y<subscript>2</subscript></entry>
1943 <entry>y<subscript>1</subscript></entry>
1944 <entry>y<subscript>0</subscript></entry>
1945 </row>
1946 <row>
1947 <entry></entry>
1948 <entry></entry>
1949 <entry></entry>
1950 <entry>-</entry>
1951 <entry>-</entry>
1952 <entry>-</entry>
1953 <entry>-</entry>
1954 <entry>-</entry>
1955 <entry>-</entry>
1956 <entry>-</entry>
1957 <entry>-</entry>
1958 <entry>-</entry>
1959 <entry>-</entry>
1960 <entry>-</entry>
1961 <entry>-</entry>
1962 <entry>u<subscript>7</subscript></entry>
1963 <entry>u<subscript>6</subscript></entry>
1964 <entry>u<subscript>5</subscript></entry>
1965 <entry>u<subscript>4</subscript></entry>
1966 <entry>u<subscript>3</subscript></entry>
1967 <entry>u<subscript>2</subscript></entry>
1968 <entry>u<subscript>1</subscript></entry>
1969 <entry>u<subscript>0</subscript></entry>
1970 </row>
1971 <row id="V4L2-MBUS-FMT-Y10-1X10">
1972 <entry>V4L2_MBUS_FMT_Y10_1X10</entry>
1973 <entry>0x200a</entry>
1974 <entry></entry>
1975 <entry>-</entry>
1976 <entry>-</entry>
1977 <entry>-</entry>
1978 <entry>-</entry>
1979 <entry>-</entry>
1980 <entry>-</entry>
1981 <entry>-</entry>
1982 <entry>-</entry>
1983 <entry>-</entry>
1984 <entry>-</entry>
1985 <entry>y<subscript>9</subscript></entry>
1986 <entry>y<subscript>8</subscript></entry>
1987 <entry>y<subscript>7</subscript></entry>
1988 <entry>y<subscript>6</subscript></entry>
1989 <entry>y<subscript>5</subscript></entry>
1990 <entry>y<subscript>4</subscript></entry>
1991 <entry>y<subscript>3</subscript></entry>
1992 <entry>y<subscript>2</subscript></entry>
1993 <entry>y<subscript>1</subscript></entry>
1994 <entry>y<subscript>0</subscript></entry>
1995 </row>
1996 <row id="V4L2-MBUS-FMT-YUYV10-2X10">
1997 <entry>V4L2_MBUS_FMT_YUYV10_2X10</entry>
1998 <entry>0x200b</entry>
1999 <entry></entry>
2000 <entry>-</entry>
2001 <entry>-</entry>
2002 <entry>-</entry>
2003 <entry>-</entry>
2004 <entry>-</entry>
2005 <entry>-</entry>
2006 <entry>-</entry>
2007 <entry>-</entry>
2008 <entry>-</entry>
2009 <entry>-</entry>
2010 <entry>y<subscript>9</subscript></entry>
2011 <entry>y<subscript>8</subscript></entry>
2012 <entry>y<subscript>7</subscript></entry>
2013 <entry>y<subscript>6</subscript></entry>
2014 <entry>y<subscript>5</subscript></entry>
2015 <entry>y<subscript>4</subscript></entry>
2016 <entry>y<subscript>3</subscript></entry>
2017 <entry>y<subscript>2</subscript></entry>
2018 <entry>y<subscript>1</subscript></entry>
2019 <entry>y<subscript>0</subscript></entry>
2020 </row>
2021 <row>
2022 <entry></entry>
2023 <entry></entry>
2024 <entry></entry>
2025 <entry>-</entry>
2026 <entry>-</entry>
2027 <entry>-</entry>
2028 <entry>-</entry>
2029 <entry>-</entry>
2030 <entry>-</entry>
2031 <entry>-</entry>
2032 <entry>-</entry>
2033 <entry>-</entry>
2034 <entry>-</entry>
2035 <entry>u<subscript>9</subscript></entry>
2036 <entry>u<subscript>8</subscript></entry>
2037 <entry>u<subscript>7</subscript></entry>
2038 <entry>u<subscript>6</subscript></entry>
2039 <entry>u<subscript>5</subscript></entry>
2040 <entry>u<subscript>4</subscript></entry>
2041 <entry>u<subscript>3</subscript></entry>
2042 <entry>u<subscript>2</subscript></entry>
2043 <entry>u<subscript>1</subscript></entry>
2044 <entry>u<subscript>0</subscript></entry>
2045 </row>
2046 <row>
2047 <entry></entry>
2048 <entry></entry>
2049 <entry></entry>
2050 <entry>-</entry>
2051 <entry>-</entry>
2052 <entry>-</entry>
2053 <entry>-</entry>
2054 <entry>-</entry>
2055 <entry>-</entry>
2056 <entry>-</entry>
2057 <entry>-</entry>
2058 <entry>-</entry>
2059 <entry>-</entry>
2060 <entry>y<subscript>9</subscript></entry>
2061 <entry>y<subscript>8</subscript></entry>
2062 <entry>y<subscript>7</subscript></entry>
2063 <entry>y<subscript>6</subscript></entry>
2064 <entry>y<subscript>5</subscript></entry>
2065 <entry>y<subscript>4</subscript></entry>
2066 <entry>y<subscript>3</subscript></entry>
2067 <entry>y<subscript>2</subscript></entry>
2068 <entry>y<subscript>1</subscript></entry>
2069 <entry>y<subscript>0</subscript></entry>
2070 </row>
2071 <row>
2072 <entry></entry>
2073 <entry></entry>
2074 <entry></entry>
2075 <entry>-</entry>
2076 <entry>-</entry>
2077 <entry>-</entry>
2078 <entry>-</entry>
2079 <entry>-</entry>
2080 <entry>-</entry>
2081 <entry>-</entry>
2082 <entry>-</entry>
2083 <entry>-</entry>
2084 <entry>-</entry>
2085 <entry>v<subscript>9</subscript></entry>
2086 <entry>v<subscript>8</subscript></entry>
2087 <entry>v<subscript>7</subscript></entry>
2088 <entry>v<subscript>6</subscript></entry>
2089 <entry>v<subscript>5</subscript></entry>
2090 <entry>v<subscript>4</subscript></entry>
2091 <entry>v<subscript>3</subscript></entry>
2092 <entry>v<subscript>2</subscript></entry>
2093 <entry>v<subscript>1</subscript></entry>
2094 <entry>v<subscript>0</subscript></entry>
2095 </row>
2096 <row id="V4L2-MBUS-FMT-YVYU10-2X10">
2097 <entry>V4L2_MBUS_FMT_YVYU10_2X10</entry>
2098 <entry>0x200c</entry>
2099 <entry></entry>
2100 <entry>-</entry>
2101 <entry>-</entry>
2102 <entry>-</entry>
2103 <entry>-</entry>
2104 <entry>-</entry>
2105 <entry>-</entry>
2106 <entry>-</entry>
2107 <entry>-</entry>
2108 <entry>-</entry>
2109 <entry>-</entry>
2110 <entry>y<subscript>9</subscript></entry>
2111 <entry>y<subscript>8</subscript></entry>
2112 <entry>y<subscript>7</subscript></entry>
2113 <entry>y<subscript>6</subscript></entry>
2114 <entry>y<subscript>5</subscript></entry>
2115 <entry>y<subscript>4</subscript></entry>
2116 <entry>y<subscript>3</subscript></entry>
2117 <entry>y<subscript>2</subscript></entry>
2118 <entry>y<subscript>1</subscript></entry>
2119 <entry>y<subscript>0</subscript></entry>
2120 </row>
2121 <row>
2122 <entry></entry>
2123 <entry></entry>
2124 <entry></entry>
2125 <entry>-</entry>
2126 <entry>-</entry>
2127 <entry>-</entry>
2128 <entry>-</entry>
2129 <entry>-</entry>
2130 <entry>-</entry>
2131 <entry>-</entry>
2132 <entry>-</entry>
2133 <entry>-</entry>
2134 <entry>-</entry>
2135 <entry>v<subscript>9</subscript></entry>
2136 <entry>v<subscript>8</subscript></entry>
2137 <entry>v<subscript>7</subscript></entry>
2138 <entry>v<subscript>6</subscript></entry>
2139 <entry>v<subscript>5</subscript></entry>
2140 <entry>v<subscript>4</subscript></entry>
2141 <entry>v<subscript>3</subscript></entry>
2142 <entry>v<subscript>2</subscript></entry>
2143 <entry>v<subscript>1</subscript></entry>
2144 <entry>v<subscript>0</subscript></entry>
2145 </row>
2146 <row>
2147 <entry></entry>
2148 <entry></entry>
2149 <entry></entry>
2150 <entry>-</entry>
2151 <entry>-</entry>
2152 <entry>-</entry>
2153 <entry>-</entry>
2154 <entry>-</entry>
2155 <entry>-</entry>
2156 <entry>-</entry>
2157 <entry>-</entry>
2158 <entry>-</entry>
2159 <entry>-</entry>
2160 <entry>y<subscript>9</subscript></entry>
2161 <entry>y<subscript>8</subscript></entry>
2162 <entry>y<subscript>7</subscript></entry>
2163 <entry>y<subscript>6</subscript></entry>
2164 <entry>y<subscript>5</subscript></entry>
2165 <entry>y<subscript>4</subscript></entry>
2166 <entry>y<subscript>3</subscript></entry>
2167 <entry>y<subscript>2</subscript></entry>
2168 <entry>y<subscript>1</subscript></entry>
2169 <entry>y<subscript>0</subscript></entry>
2170 </row>
2171 <row>
2172 <entry></entry>
2173 <entry></entry>
2174 <entry></entry>
2175 <entry>-</entry>
2176 <entry>-</entry>
2177 <entry>-</entry>
2178 <entry>-</entry>
2179 <entry>-</entry>
2180 <entry>-</entry>
2181 <entry>-</entry>
2182 <entry>-</entry>
2183 <entry>-</entry>
2184 <entry>-</entry>
2185 <entry>u<subscript>9</subscript></entry>
2186 <entry>u<subscript>8</subscript></entry>
2187 <entry>u<subscript>7</subscript></entry>
2188 <entry>u<subscript>6</subscript></entry>
2189 <entry>u<subscript>5</subscript></entry>
2190 <entry>u<subscript>4</subscript></entry>
2191 <entry>u<subscript>3</subscript></entry>
2192 <entry>u<subscript>2</subscript></entry>
2193 <entry>u<subscript>1</subscript></entry>
2194 <entry>u<subscript>0</subscript></entry>
2195 </row>
2196 <row id="V4L2-MBUS-FMT-Y12-1X12">
2197 <entry>V4L2_MBUS_FMT_Y12_1X12</entry>
2198 <entry>0x2013</entry>
2199 <entry></entry>
2200 <entry>-</entry>
2201 <entry>-</entry>
2202 <entry>-</entry>
2203 <entry>-</entry>
2204 <entry>-</entry>
2205 <entry>-</entry>
2206 <entry>-</entry>
2207 <entry>-</entry>
2208 <entry>y<subscript>11</subscript></entry>
2209 <entry>y<subscript>10</subscript></entry>
2210 <entry>y<subscript>9</subscript></entry>
2211 <entry>y<subscript>8</subscript></entry>
2212 <entry>y<subscript>7</subscript></entry>
2213 <entry>y<subscript>6</subscript></entry>
2214 <entry>y<subscript>5</subscript></entry>
2215 <entry>y<subscript>4</subscript></entry>
2216 <entry>y<subscript>3</subscript></entry>
2217 <entry>y<subscript>2</subscript></entry>
2218 <entry>y<subscript>1</subscript></entry>
2219 <entry>y<subscript>0</subscript></entry>
2220 </row>
2221 <row id="V4L2-MBUS-FMT-UYVY8-1X16">
2222 <entry>V4L2_MBUS_FMT_UYVY8_1X16</entry>
2223 <entry>0x200f</entry>
2224 <entry></entry>
2225 <entry>-</entry>
2226 <entry>-</entry>
2227 <entry>-</entry>
2228 <entry>-</entry>
2229 <entry>u<subscript>7</subscript></entry>
2230 <entry>u<subscript>6</subscript></entry>
2231 <entry>u<subscript>5</subscript></entry>
2232 <entry>u<subscript>4</subscript></entry>
2233 <entry>u<subscript>3</subscript></entry>
2234 <entry>u<subscript>2</subscript></entry>
2235 <entry>u<subscript>1</subscript></entry>
2236 <entry>u<subscript>0</subscript></entry>
2237 <entry>y<subscript>7</subscript></entry>
2238 <entry>y<subscript>6</subscript></entry>
2239 <entry>y<subscript>5</subscript></entry>
2240 <entry>y<subscript>4</subscript></entry>
2241 <entry>y<subscript>3</subscript></entry>
2242 <entry>y<subscript>2</subscript></entry>
2243 <entry>y<subscript>1</subscript></entry>
2244 <entry>y<subscript>0</subscript></entry>
2245 </row>
2246 <row>
2247 <entry></entry>
2248 <entry></entry>
2249 <entry></entry>
2250 <entry>-</entry>
2251 <entry>-</entry>
2252 <entry>-</entry>
2253 <entry>-</entry>
2254 <entry>v<subscript>7</subscript></entry>
2255 <entry>v<subscript>6</subscript></entry>
2256 <entry>v<subscript>5</subscript></entry>
2257 <entry>v<subscript>4</subscript></entry>
2258 <entry>v<subscript>3</subscript></entry>
2259 <entry>v<subscript>2</subscript></entry>
2260 <entry>v<subscript>1</subscript></entry>
2261 <entry>v<subscript>0</subscript></entry>
2262 <entry>y<subscript>7</subscript></entry>
2263 <entry>y<subscript>6</subscript></entry>
2264 <entry>y<subscript>5</subscript></entry>
2265 <entry>y<subscript>4</subscript></entry>
2266 <entry>y<subscript>3</subscript></entry>
2267 <entry>y<subscript>2</subscript></entry>
2268 <entry>y<subscript>1</subscript></entry>
2269 <entry>y<subscript>0</subscript></entry>
2270 </row>
2271 <row id="V4L2-MBUS-FMT-VYUY8-1X16">
2272 <entry>V4L2_MBUS_FMT_VYUY8_1X16</entry>
2273 <entry>0x2010</entry>
2274 <entry></entry>
2275 <entry>-</entry>
2276 <entry>-</entry>
2277 <entry>-</entry>
2278 <entry>-</entry>
2279 <entry>v<subscript>7</subscript></entry>
2280 <entry>v<subscript>6</subscript></entry>
2281 <entry>v<subscript>5</subscript></entry>
2282 <entry>v<subscript>4</subscript></entry>
2283 <entry>v<subscript>3</subscript></entry>
2284 <entry>v<subscript>2</subscript></entry>
2285 <entry>v<subscript>1</subscript></entry>
2286 <entry>v<subscript>0</subscript></entry>
2287 <entry>y<subscript>7</subscript></entry>
2288 <entry>y<subscript>6</subscript></entry>
2289 <entry>y<subscript>5</subscript></entry>
2290 <entry>y<subscript>4</subscript></entry>
2291 <entry>y<subscript>3</subscript></entry>
2292 <entry>y<subscript>2</subscript></entry>
2293 <entry>y<subscript>1</subscript></entry>
2294 <entry>y<subscript>0</subscript></entry>
2295 </row>
2296 <row>
2297 <entry></entry>
2298 <entry></entry>
2299 <entry></entry>
2300 <entry>-</entry>
2301 <entry>-</entry>
2302 <entry>-</entry>
2303 <entry>-</entry>
2304 <entry>u<subscript>7</subscript></entry>
2305 <entry>u<subscript>6</subscript></entry>
2306 <entry>u<subscript>5</subscript></entry>
2307 <entry>u<subscript>4</subscript></entry>
2308 <entry>u<subscript>3</subscript></entry>
2309 <entry>u<subscript>2</subscript></entry>
2310 <entry>u<subscript>1</subscript></entry>
2311 <entry>u<subscript>0</subscript></entry>
2312 <entry>y<subscript>7</subscript></entry>
2313 <entry>y<subscript>6</subscript></entry>
2314 <entry>y<subscript>5</subscript></entry>
2315 <entry>y<subscript>4</subscript></entry>
2316 <entry>y<subscript>3</subscript></entry>
2317 <entry>y<subscript>2</subscript></entry>
2318 <entry>y<subscript>1</subscript></entry>
2319 <entry>y<subscript>0</subscript></entry>
2320 </row>
2321 <row id="V4L2-MBUS-FMT-YUYV8-1X16">
2322 <entry>V4L2_MBUS_FMT_YUYV8_1X16</entry>
2323 <entry>0x2011</entry>
2324 <entry></entry>
2325 <entry>-</entry>
2326 <entry>-</entry>
2327 <entry>-</entry>
2328 <entry>-</entry>
2329 <entry>y<subscript>7</subscript></entry>
2330 <entry>y<subscript>6</subscript></entry>
2331 <entry>y<subscript>5</subscript></entry>
2332 <entry>y<subscript>4</subscript></entry>
2333 <entry>y<subscript>3</subscript></entry>
2334 <entry>y<subscript>2</subscript></entry>
2335 <entry>y<subscript>1</subscript></entry>
2336 <entry>y<subscript>0</subscript></entry>
2337 <entry>u<subscript>7</subscript></entry>
2338 <entry>u<subscript>6</subscript></entry>
2339 <entry>u<subscript>5</subscript></entry>
2340 <entry>u<subscript>4</subscript></entry>
2341 <entry>u<subscript>3</subscript></entry>
2342 <entry>u<subscript>2</subscript></entry>
2343 <entry>u<subscript>1</subscript></entry>
2344 <entry>u<subscript>0</subscript></entry>
2345 </row>
2346 <row>
2347 <entry></entry>
2348 <entry></entry>
2349 <entry></entry>
2350 <entry>-</entry>
2351 <entry>-</entry>
2352 <entry>-</entry>
2353 <entry>-</entry>
2354 <entry>y<subscript>7</subscript></entry>
2355 <entry>y<subscript>6</subscript></entry>
2356 <entry>y<subscript>5</subscript></entry>
2357 <entry>y<subscript>4</subscript></entry>
2358 <entry>y<subscript>3</subscript></entry>
2359 <entry>y<subscript>2</subscript></entry>
2360 <entry>y<subscript>1</subscript></entry>
2361 <entry>y<subscript>0</subscript></entry>
2362 <entry>v<subscript>7</subscript></entry>
2363 <entry>v<subscript>6</subscript></entry>
2364 <entry>v<subscript>5</subscript></entry>
2365 <entry>v<subscript>4</subscript></entry>
2366 <entry>v<subscript>3</subscript></entry>
2367 <entry>v<subscript>2</subscript></entry>
2368 <entry>v<subscript>1</subscript></entry>
2369 <entry>v<subscript>0</subscript></entry>
2370 </row>
2371 <row id="V4L2-MBUS-FMT-YVYU8-1X16">
2372 <entry>V4L2_MBUS_FMT_YVYU8_1X16</entry>
2373 <entry>0x2012</entry>
2374 <entry></entry>
2375 <entry>-</entry>
2376 <entry>-</entry>
2377 <entry>-</entry>
2378 <entry>-</entry>
2379 <entry>y<subscript>7</subscript></entry>
2380 <entry>y<subscript>6</subscript></entry>
2381 <entry>y<subscript>5</subscript></entry>
2382 <entry>y<subscript>4</subscript></entry>
2383 <entry>y<subscript>3</subscript></entry>
2384 <entry>y<subscript>2</subscript></entry>
2385 <entry>y<subscript>1</subscript></entry>
2386 <entry>y<subscript>0</subscript></entry>
2387 <entry>v<subscript>7</subscript></entry>
2388 <entry>v<subscript>6</subscript></entry>
2389 <entry>v<subscript>5</subscript></entry>
2390 <entry>v<subscript>4</subscript></entry>
2391 <entry>v<subscript>3</subscript></entry>
2392 <entry>v<subscript>2</subscript></entry>
2393 <entry>v<subscript>1</subscript></entry>
2394 <entry>v<subscript>0</subscript></entry>
2395 </row>
2396 <row>
2397 <entry></entry>
2398 <entry></entry>
2399 <entry></entry>
2400 <entry>-</entry>
2401 <entry>-</entry>
2402 <entry>-</entry>
2403 <entry>-</entry>
2404 <entry>y<subscript>7</subscript></entry>
2405 <entry>y<subscript>6</subscript></entry>
2406 <entry>y<subscript>5</subscript></entry>
2407 <entry>y<subscript>4</subscript></entry>
2408 <entry>y<subscript>3</subscript></entry>
2409 <entry>y<subscript>2</subscript></entry>
2410 <entry>y<subscript>1</subscript></entry>
2411 <entry>y<subscript>0</subscript></entry>
2412 <entry>u<subscript>7</subscript></entry>
2413 <entry>u<subscript>6</subscript></entry>
2414 <entry>u<subscript>5</subscript></entry>
2415 <entry>u<subscript>4</subscript></entry>
2416 <entry>u<subscript>3</subscript></entry>
2417 <entry>u<subscript>2</subscript></entry>
2418 <entry>u<subscript>1</subscript></entry>
2419 <entry>u<subscript>0</subscript></entry>
2420 </row>
2421 <row id="V4L2-MBUS-FMT-YUYV10-1X20">
2422 <entry>V4L2_MBUS_FMT_YUYV10_1X20</entry>
2423 <entry>0x200d</entry>
2424 <entry></entry>
2425 <entry>y<subscript>9</subscript></entry>
2426 <entry>y<subscript>8</subscript></entry>
2427 <entry>y<subscript>7</subscript></entry>
2428 <entry>y<subscript>6</subscript></entry>
2429 <entry>y<subscript>5</subscript></entry>
2430 <entry>y<subscript>4</subscript></entry>
2431 <entry>y<subscript>3</subscript></entry>
2432 <entry>y<subscript>2</subscript></entry>
2433 <entry>y<subscript>1</subscript></entry>
2434 <entry>y<subscript>0</subscript></entry>
2435 <entry>u<subscript>9</subscript></entry>
2436 <entry>u<subscript>8</subscript></entry>
2437 <entry>u<subscript>7</subscript></entry>
2438 <entry>u<subscript>6</subscript></entry>
2439 <entry>u<subscript>5</subscript></entry>
2440 <entry>u<subscript>4</subscript></entry>
2441 <entry>u<subscript>3</subscript></entry>
2442 <entry>u<subscript>2</subscript></entry>
2443 <entry>u<subscript>1</subscript></entry>
2444 <entry>u<subscript>0</subscript></entry>
2445 </row>
2446 <row>
2447 <entry></entry>
2448 <entry></entry>
2449 <entry></entry>
2450 <entry>y<subscript>9</subscript></entry>
2451 <entry>y<subscript>8</subscript></entry>
2452 <entry>y<subscript>7</subscript></entry>
2453 <entry>y<subscript>6</subscript></entry>
2454 <entry>y<subscript>5</subscript></entry>
2455 <entry>y<subscript>4</subscript></entry>
2456 <entry>y<subscript>3</subscript></entry>
2457 <entry>y<subscript>2</subscript></entry>
2458 <entry>y<subscript>1</subscript></entry>
2459 <entry>y<subscript>0</subscript></entry>
2460 <entry>v<subscript>9</subscript></entry>
2461 <entry>v<subscript>8</subscript></entry>
2462 <entry>v<subscript>7</subscript></entry>
2463 <entry>v<subscript>6</subscript></entry>
2464 <entry>v<subscript>5</subscript></entry>
2465 <entry>v<subscript>4</subscript></entry>
2466 <entry>v<subscript>3</subscript></entry>
2467 <entry>v<subscript>2</subscript></entry>
2468 <entry>v<subscript>1</subscript></entry>
2469 <entry>v<subscript>0</subscript></entry>
2470 </row>
2471 <row id="V4L2-MBUS-FMT-YVYU10-1X20">
2472 <entry>V4L2_MBUS_FMT_YVYU10_1X20</entry>
2473 <entry>0x200e</entry>
2474 <entry></entry>
2475 <entry>y<subscript>9</subscript></entry>
2476 <entry>y<subscript>8</subscript></entry>
2477 <entry>y<subscript>7</subscript></entry>
2478 <entry>y<subscript>6</subscript></entry>
2479 <entry>y<subscript>5</subscript></entry>
2480 <entry>y<subscript>4</subscript></entry>
2481 <entry>y<subscript>3</subscript></entry>
2482 <entry>y<subscript>2</subscript></entry>
2483 <entry>y<subscript>1</subscript></entry>
2484 <entry>y<subscript>0</subscript></entry>
2485 <entry>v<subscript>9</subscript></entry>
2486 <entry>v<subscript>8</subscript></entry>
2487 <entry>v<subscript>7</subscript></entry>
2488 <entry>v<subscript>6</subscript></entry>
2489 <entry>v<subscript>5</subscript></entry>
2490 <entry>v<subscript>4</subscript></entry>
2491 <entry>v<subscript>3</subscript></entry>
2492 <entry>v<subscript>2</subscript></entry>
2493 <entry>v<subscript>1</subscript></entry>
2494 <entry>v<subscript>0</subscript></entry>
2495 </row>
2496 <row>
2497 <entry></entry>
2498 <entry></entry>
2499 <entry></entry>
2500 <entry>y<subscript>9</subscript></entry>
2501 <entry>y<subscript>8</subscript></entry>
2502 <entry>y<subscript>7</subscript></entry>
2503 <entry>y<subscript>6</subscript></entry>
2504 <entry>y<subscript>5</subscript></entry>
2505 <entry>y<subscript>4</subscript></entry>
2506 <entry>y<subscript>3</subscript></entry>
2507 <entry>y<subscript>2</subscript></entry>
2508 <entry>y<subscript>1</subscript></entry>
2509 <entry>y<subscript>0</subscript></entry>
2510 <entry>u<subscript>9</subscript></entry>
2511 <entry>u<subscript>8</subscript></entry>
2512 <entry>u<subscript>7</subscript></entry>
2513 <entry>u<subscript>6</subscript></entry>
2514 <entry>u<subscript>5</subscript></entry>
2515 <entry>u<subscript>4</subscript></entry>
2516 <entry>u<subscript>3</subscript></entry>
2517 <entry>u<subscript>2</subscript></entry>
2518 <entry>u<subscript>1</subscript></entry>
2519 <entry>u<subscript>0</subscript></entry>
2520 </row>
2521 </tbody>
2522 </tgroup>
2523 </table>
2524 </section>
2525 </section>
2526</section>
diff --git a/Documentation/DocBook/v4l/v4l2.xml b/Documentation/DocBook/v4l/v4l2.xml
index 9288af96de34..a7fd76d0dac1 100644
--- a/Documentation/DocBook/v4l/v4l2.xml
+++ b/Documentation/DocBook/v4l/v4l2.xml
@@ -85,6 +85,17 @@ Remote Controller chapter.</contrib>
85 </address> 85 </address>
86 </affiliation> 86 </affiliation>
87 </author> 87 </author>
88
89 <author>
90 <firstname>Pawel</firstname>
91 <surname>Osciak</surname>
92 <contrib>Designed and documented the multi-planar API.</contrib>
93 <affiliation>
94 <address>
95 <email>pawel AT osciak.com</email>
96 </address>
97 </affiliation>
98 </author>
88 </authorgroup> 99 </authorgroup>
89 100
90 <copyright> 101 <copyright>
@@ -102,7 +113,8 @@ Remote Controller chapter.</contrib>
102 <year>2010</year> 113 <year>2010</year>
103 <year>2011</year> 114 <year>2011</year>
104 <holder>Bill Dirks, Michael H. Schimek, Hans Verkuil, Martin 115 <holder>Bill Dirks, Michael H. Schimek, Hans Verkuil, Martin
105Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab</holder> 116Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab,
117 Pawel Osciak</holder>
106 </copyright> 118 </copyright>
107 <legalnotice> 119 <legalnotice>
108 <para>Except when explicitly stated as GPL, programming examples within 120 <para>Except when explicitly stated as GPL, programming examples within
@@ -116,6 +128,13 @@ structs, ioctls) must be noted in more detail in the history chapter
116applications. --> 128applications. -->
117 129
118 <revision> 130 <revision>
131 <revnumber>2.6.39</revnumber>
132 <date>2011-03-01</date>
133 <authorinitials>mcc, po</authorinitials>
134 <revremark>Removed VIDIOC_*_OLD from videodev2.h header and update it to reflect latest changes. Added the <link linkend="planar-apis">multi-planar API</link>.</revremark>
135 </revision>
136
137 <revision>
119 <revnumber>2.6.37</revnumber> 138 <revnumber>2.6.37</revnumber>
120 <date>2010-08-06</date> 139 <date>2010-08-06</date>
121 <authorinitials>hv</authorinitials> 140 <authorinitials>hv</authorinitials>
@@ -382,7 +401,7 @@ and discussions on the V4L mailing list.</revremark>
382</partinfo> 401</partinfo>
383 402
384<title>Video for Linux Two API Specification</title> 403<title>Video for Linux Two API Specification</title>
385 <subtitle>Revision 2.6.38</subtitle> 404 <subtitle>Revision 2.6.39</subtitle>
386 405
387 <chapter id="common"> 406 <chapter id="common">
388 &sub-common; 407 &sub-common;
@@ -411,6 +430,7 @@ and discussions on the V4L mailing list.</revremark>
411 <section id="radio"> &sub-dev-radio; </section> 430 <section id="radio"> &sub-dev-radio; </section>
412 <section id="rds"> &sub-dev-rds; </section> 431 <section id="rds"> &sub-dev-rds; </section>
413 <section id="event"> &sub-dev-event; </section> 432 <section id="event"> &sub-dev-event; </section>
433 <section id="subdev"> &sub-dev-subdev; </section>
414 </chapter> 434 </chapter>
415 435
416 <chapter id="driver"> 436 <chapter id="driver">
@@ -478,6 +498,12 @@ and discussions on the V4L mailing list.</revremark>
478 &sub-reqbufs; 498 &sub-reqbufs;
479 &sub-s-hw-freq-seek; 499 &sub-s-hw-freq-seek;
480 &sub-streamon; 500 &sub-streamon;
501 &sub-subdev-enum-frame-interval;
502 &sub-subdev-enum-frame-size;
503 &sub-subdev-enum-mbus-code;
504 &sub-subdev-g-crop;
505 &sub-subdev-g-fmt;
506 &sub-subdev-g-frame-interval;
481 &sub-subscribe-event; 507 &sub-subscribe-event;
482 <!-- End of ioctls. --> 508 <!-- End of ioctls. -->
483 &sub-mmap; 509 &sub-mmap;
diff --git a/Documentation/DocBook/v4l/videodev2.h.xml b/Documentation/DocBook/v4l/videodev2.h.xml
index 325b23b6964c..2b796a2ee98a 100644
--- a/Documentation/DocBook/v4l/videodev2.h.xml
+++ b/Documentation/DocBook/v4l/videodev2.h.xml
@@ -71,6 +71,7 @@
71 * Moved from videodev.h 71 * Moved from videodev.h
72 */ 72 */
73#define VIDEO_MAX_FRAME 32 73#define VIDEO_MAX_FRAME 32
74#define VIDEO_MAX_PLANES 8
74 75
75#ifndef __KERNEL__ 76#ifndef __KERNEL__
76 77
@@ -158,9 +159,23 @@ enum <link linkend="v4l2-buf-type">v4l2_buf_type</link> {
158 /* Experimental */ 159 /* Experimental */
159 V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY = 8, 160 V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY = 8,
160#endif 161#endif
162 V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE = 9,
163 V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE = 10,
161 V4L2_BUF_TYPE_PRIVATE = 0x80, 164 V4L2_BUF_TYPE_PRIVATE = 0x80,
162}; 165};
163 166
167#define V4L2_TYPE_IS_MULTIPLANAR(type) \
168 ((type) == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE \
169 || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
170
171#define V4L2_TYPE_IS_OUTPUT(type) \
172 ((type) == V4L2_BUF_TYPE_VIDEO_OUTPUT \
173 || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE \
174 || (type) == V4L2_BUF_TYPE_VIDEO_OVERLAY \
175 || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY \
176 || (type) == V4L2_BUF_TYPE_VBI_OUTPUT \
177 || (type) == V4L2_BUF_TYPE_SLICED_VBI_OUTPUT)
178
164enum <link linkend="v4l2-tuner-type">v4l2_tuner_type</link> { 179enum <link linkend="v4l2-tuner-type">v4l2_tuner_type</link> {
165 V4L2_TUNER_RADIO = 1, 180 V4L2_TUNER_RADIO = 1,
166 V4L2_TUNER_ANALOG_TV = 2, 181 V4L2_TUNER_ANALOG_TV = 2,
@@ -246,6 +261,11 @@ struct <link linkend="v4l2-capability">v4l2_capability</link> {
246#define V4L2_CAP_HW_FREQ_SEEK 0x00000400 /* Can do hardware frequency seek */ 261#define V4L2_CAP_HW_FREQ_SEEK 0x00000400 /* Can do hardware frequency seek */
247#define V4L2_CAP_RDS_OUTPUT 0x00000800 /* Is an RDS encoder */ 262#define V4L2_CAP_RDS_OUTPUT 0x00000800 /* Is an RDS encoder */
248 263
264/* Is a video capture device that supports multiplanar formats */
265#define V4L2_CAP_VIDEO_CAPTURE_MPLANE 0x00001000
266/* Is a video output device that supports multiplanar formats */
267#define V4L2_CAP_VIDEO_OUTPUT_MPLANE 0x00002000
268
249#define V4L2_CAP_TUNER 0x00010000 /* has a tuner */ 269#define V4L2_CAP_TUNER 0x00010000 /* has a tuner */
250#define V4L2_CAP_AUDIO 0x00020000 /* has audio support */ 270#define V4L2_CAP_AUDIO 0x00020000 /* has audio support */
251#define V4L2_CAP_RADIO 0x00040000 /* is a radio device */ 271#define V4L2_CAP_RADIO 0x00040000 /* is a radio device */
@@ -320,6 +340,13 @@ struct <link linkend="v4l2-pix-format">v4l2_pix_format</link> {
320#define <link linkend="V4L2-PIX-FMT-NV16">V4L2_PIX_FMT_NV16</link> v4l2_fourcc('N', 'V', '1', '6') /* 16 Y/CbCr 4:2:2 */ 340#define <link linkend="V4L2-PIX-FMT-NV16">V4L2_PIX_FMT_NV16</link> v4l2_fourcc('N', 'V', '1', '6') /* 16 Y/CbCr 4:2:2 */
321#define <link linkend="V4L2-PIX-FMT-NV61">V4L2_PIX_FMT_NV61</link> v4l2_fourcc('N', 'V', '6', '1') /* 16 Y/CrCb 4:2:2 */ 341#define <link linkend="V4L2-PIX-FMT-NV61">V4L2_PIX_FMT_NV61</link> v4l2_fourcc('N', 'V', '6', '1') /* 16 Y/CrCb 4:2:2 */
322 342
343/* two non contiguous planes - one Y, one Cr + Cb interleaved */
344#define <link linkend="V4L2-PIX-FMT-NV12M">V4L2_PIX_FMT_NV12M</link> v4l2_fourcc('N', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 */
345#define <link linkend="V4L2-PIX-FMT-NV12MT">V4L2_PIX_FMT_NV12MT</link> v4l2_fourcc('T', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 64x32 macroblocks */
346
347/* three non contiguous planes - Y, Cb, Cr */
348#define <link linkend="V4L2-PIX-FMT-YUV420M">V4L2_PIX_FMT_YUV420M</link> v4l2_fourcc('Y', 'M', '1', '2') /* 12 YUV420 planar */
349
323/* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */ 350/* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */
324#define <link linkend="V4L2-PIX-FMT-SBGGR8">V4L2_PIX_FMT_SBGGR8</link> v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */ 351#define <link linkend="V4L2-PIX-FMT-SBGGR8">V4L2_PIX_FMT_SBGGR8</link> v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */
325#define <link linkend="V4L2-PIX-FMT-SGBRG8">V4L2_PIX_FMT_SGBRG8</link> v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */ 352#define <link linkend="V4L2-PIX-FMT-SGBRG8">V4L2_PIX_FMT_SGBRG8</link> v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */
@@ -518,6 +545,62 @@ struct <link linkend="v4l2-requestbuffers">v4l2_requestbuffers</link> {
518 __u32 reserved[2]; 545 __u32 reserved[2];
519}; 546};
520 547
548/**
549 * struct <link linkend="v4l2-plane">v4l2_plane</link> - plane info for multi-planar buffers
550 * @bytesused: number of bytes occupied by data in the plane (payload)
551 * @length: size of this plane (NOT the payload) in bytes
552 * @mem_offset: when memory in the associated struct <link linkend="v4l2-buffer">v4l2_buffer</link> is
553 * V4L2_MEMORY_MMAP, equals the offset from the start of
554 * the device memory for this plane (or is a "cookie" that
555 * should be passed to mmap() called on the video node)
556 * @userptr: when memory is V4L2_MEMORY_USERPTR, a userspace pointer
557 * pointing to this plane
558 * @data_offset: offset in the plane to the start of data; usually 0,
559 * unless there is a header in front of the data
560 *
561 * Multi-planar buffers consist of one or more planes, e.g. an YCbCr buffer
562 * with two planes can have one plane for Y, and another for interleaved CbCr
563 * components. Each plane can reside in a separate memory buffer, or even in
564 * a completely separate memory node (e.g. in embedded devices).
565 */
566struct <link linkend="v4l2-plane">v4l2_plane</link> {
567 __u32 bytesused;
568 __u32 length;
569 union {
570 __u32 mem_offset;
571 unsigned long userptr;
572 } m;
573 __u32 data_offset;
574 __u32 reserved[11];
575};
576
577/**
578 * struct <link linkend="v4l2-buffer">v4l2_buffer</link> - video buffer info
579 * @index: id number of the buffer
580 * @type: buffer type (type == *_MPLANE for multiplanar buffers)
581 * @bytesused: number of bytes occupied by data in the buffer (payload);
582 * unused (set to 0) for multiplanar buffers
583 * @flags: buffer informational flags
584 * @field: field order of the image in the buffer
585 * @timestamp: frame timestamp
586 * @timecode: frame timecode
587 * @sequence: sequence count of this frame
588 * @memory: the method, in which the actual video data is passed
589 * @offset: for non-multiplanar buffers with memory == V4L2_MEMORY_MMAP;
590 * offset from the start of the device memory for this plane,
591 * (or a "cookie" that should be passed to mmap() as offset)
592 * @userptr: for non-multiplanar buffers with memory == V4L2_MEMORY_USERPTR;
593 * a userspace pointer pointing to this buffer
594 * @planes: for multiplanar buffers; userspace pointer to the array of plane
595 * info structs for this buffer
596 * @length: size in bytes of the buffer (NOT its payload) for single-plane
597 * buffers (when type != *_MPLANE); number of elements in the
598 * planes array for multi-plane buffers
599 * @input: input number from which the video data has has been captured
600 *
601 * Contains data exchanged by application and driver using one of the Streaming
602 * I/O methods.
603 */
521struct <link linkend="v4l2-buffer">v4l2_buffer</link> { 604struct <link linkend="v4l2-buffer">v4l2_buffer</link> {
522 __u32 index; 605 __u32 index;
523 enum <link linkend="v4l2-buf-type">v4l2_buf_type</link> type; 606 enum <link linkend="v4l2-buf-type">v4l2_buf_type</link> type;
@@ -533,6 +616,7 @@ struct <link linkend="v4l2-buffer">v4l2_buffer</link> {
533 union { 616 union {
534 __u32 offset; 617 __u32 offset;
535 unsigned long userptr; 618 unsigned long userptr;
619 struct <link linkend="v4l2-plane">v4l2_plane</link> *planes;
536 } m; 620 } m;
537 __u32 length; 621 __u32 length;
538 __u32 input; 622 __u32 input;
@@ -1623,12 +1707,56 @@ struct <link linkend="v4l2-mpeg-vbi-fmt-ivtv">v4l2_mpeg_vbi_fmt_ivtv</link> {
1623 * A G G R E G A T E S T R U C T U R E S 1707 * A G G R E G A T E S T R U C T U R E S
1624 */ 1708 */
1625 1709
1626/* Stream data format 1710/**
1711 * struct <link linkend="v4l2-plane-pix-format">v4l2_plane_pix_format</link> - additional, per-plane format definition
1712 * @sizeimage: maximum size in bytes required for data, for which
1713 * this plane will be used
1714 * @bytesperline: distance in bytes between the leftmost pixels in two
1715 * adjacent lines
1716 */
1717struct <link linkend="v4l2-plane-pix-format">v4l2_plane_pix_format</link> {
1718 __u32 sizeimage;
1719 __u16 bytesperline;
1720 __u16 reserved[7];
1721} __attribute__ ((packed));
1722
1723/**
1724 * struct <link linkend="v4l2-pix-format-mplane">v4l2_pix_format_mplane</link> - multiplanar format definition
1725 * @width: image width in pixels
1726 * @height: image height in pixels
1727 * @pixelformat: little endian four character code (fourcc)
1728 * @field: field order (for interlaced video)
1729 * @colorspace: supplemental to pixelformat
1730 * @plane_fmt: per-plane information
1731 * @num_planes: number of planes for this format
1732 */
1733struct <link linkend="v4l2-pix-format-mplane">v4l2_pix_format_mplane</link> {
1734 __u32 width;
1735 __u32 height;
1736 __u32 pixelformat;
1737 enum <link linkend="v4l2-field">v4l2_field</link> field;
1738 enum <link linkend="v4l2-colorspace">v4l2_colorspace</link> colorspace;
1739
1740 struct <link linkend="v4l2-plane-pix-format">v4l2_plane_pix_format</link> plane_fmt[VIDEO_MAX_PLANES];
1741 __u8 num_planes;
1742 __u8 reserved[11];
1743} __attribute__ ((packed));
1744
1745/**
1746 * struct <link linkend="v4l2-format">v4l2_format</link> - stream data format
1747 * @type: type of the data stream
1748 * @pix: definition of an image format
1749 * @pix_mp: definition of a multiplanar image format
1750 * @win: definition of an overlaid image
1751 * @vbi: raw VBI capture or output parameters
1752 * @sliced: sliced VBI capture or output parameters
1753 * @raw_data: placeholder for future extensions and custom formats
1627 */ 1754 */
1628struct <link linkend="v4l2-format">v4l2_format</link> { 1755struct <link linkend="v4l2-format">v4l2_format</link> {
1629 enum <link linkend="v4l2-buf-type">v4l2_buf_type</link> type; 1756 enum <link linkend="v4l2-buf-type">v4l2_buf_type</link> type;
1630 union { 1757 union {
1631 struct <link linkend="v4l2-pix-format">v4l2_pix_format</link> pix; /* V4L2_BUF_TYPE_VIDEO_CAPTURE */ 1758 struct <link linkend="v4l2-pix-format">v4l2_pix_format</link> pix; /* V4L2_BUF_TYPE_VIDEO_CAPTURE */
1759 struct <link linkend="v4l2-pix-format-mplane">v4l2_pix_format_mplane</link> pix_mp; /* V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE */
1632 struct <link linkend="v4l2-window">v4l2_window</link> win; /* V4L2_BUF_TYPE_VIDEO_OVERLAY */ 1760 struct <link linkend="v4l2-window">v4l2_window</link> win; /* V4L2_BUF_TYPE_VIDEO_OVERLAY */
1633 struct <link linkend="v4l2-vbi-format">v4l2_vbi_format</link> vbi; /* V4L2_BUF_TYPE_VBI_CAPTURE */ 1761 struct <link linkend="v4l2-vbi-format">v4l2_vbi_format</link> vbi; /* V4L2_BUF_TYPE_VBI_CAPTURE */
1634 struct <link linkend="v4l2-sliced-vbi-format">v4l2_sliced_vbi_format</link> sliced; /* V4L2_BUF_TYPE_SLICED_VBI_CAPTURE */ 1762 struct <link linkend="v4l2-sliced-vbi-format">v4l2_sliced_vbi_format</link> sliced; /* V4L2_BUF_TYPE_SLICED_VBI_CAPTURE */
@@ -1636,7 +1764,6 @@ struct <link linkend="v4l2-format">v4l2_format</link> {
1636 } fmt; 1764 } fmt;
1637}; 1765};
1638 1766
1639
1640/* Stream type-dependent parameters 1767/* Stream type-dependent parameters
1641 */ 1768 */
1642struct <link linkend="v4l2-streamparm">v4l2_streamparm</link> { 1769struct <link linkend="v4l2-streamparm">v4l2_streamparm</link> {
@@ -1809,16 +1936,6 @@ struct <link linkend="v4l2-dbg-chip-ident">v4l2_dbg_chip_ident</link> {
1809/* Reminder: when adding new ioctls please add support for them to 1936/* Reminder: when adding new ioctls please add support for them to
1810 drivers/media/video/v4l2-compat-ioctl32.c as well! */ 1937 drivers/media/video/v4l2-compat-ioctl32.c as well! */
1811 1938
1812#ifdef __OLD_VIDIOC_
1813/* for compatibility, will go away some day */
1814#define VIDIOC_OVERLAY_OLD _IOWR('V', 14, int)
1815#define VIDIOC_S_PARM_OLD _IOW('V', 22, struct <link linkend="v4l2-streamparm">v4l2_streamparm</link>)
1816#define VIDIOC_S_CTRL_OLD _IOW('V', 28, struct <link linkend="v4l2-control">v4l2_control</link>)
1817#define VIDIOC_G_AUDIO_OLD _IOWR('V', 33, struct <link linkend="v4l2-audio">v4l2_audio</link>)
1818#define VIDIOC_G_AUDOUT_OLD _IOWR('V', 49, struct <link linkend="v4l2-audioout">v4l2_audioout</link>)
1819#define VIDIOC_CROPCAP_OLD _IOR('V', 58, struct <link linkend="v4l2-cropcap">v4l2_cropcap</link>)
1820#endif
1821
1822#define BASE_VIDIOC_PRIVATE 192 /* 192-255 are private */ 1939#define BASE_VIDIOC_PRIVATE 192 /* 192-255 are private */
1823 1940
1824#endif /* __LINUX_VIDEODEV2_H */ 1941#endif /* __LINUX_VIDEODEV2_H */
diff --git a/Documentation/DocBook/v4l/vidioc-enum-fmt.xml b/Documentation/DocBook/v4l/vidioc-enum-fmt.xml
index 960d44615ca6..71d373b6d36a 100644
--- a/Documentation/DocBook/v4l/vidioc-enum-fmt.xml
+++ b/Documentation/DocBook/v4l/vidioc-enum-fmt.xml
@@ -76,7 +76,9 @@ pixelformat</structfield> field.</entry>
76 <entry>Type of the data stream, set by the application. 76 <entry>Type of the data stream, set by the application.
77Only these types are valid here: 77Only these types are valid here:
78<constant>V4L2_BUF_TYPE_VIDEO_CAPTURE</constant>, 78<constant>V4L2_BUF_TYPE_VIDEO_CAPTURE</constant>,
79<constant>V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE</constant>,
79<constant>V4L2_BUF_TYPE_VIDEO_OUTPUT</constant>, 80<constant>V4L2_BUF_TYPE_VIDEO_OUTPUT</constant>,
81<constant>V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE</constant>,
80<constant>V4L2_BUF_TYPE_VIDEO_OVERLAY</constant>, and custom (driver 82<constant>V4L2_BUF_TYPE_VIDEO_OVERLAY</constant>, and custom (driver
81defined) types with code <constant>V4L2_BUF_TYPE_PRIVATE</constant> 83defined) types with code <constant>V4L2_BUF_TYPE_PRIVATE</constant>
82and higher.</entry> 84and higher.</entry>
diff --git a/Documentation/DocBook/v4l/vidioc-g-fmt.xml b/Documentation/DocBook/v4l/vidioc-g-fmt.xml
index 7c7d1b72c40d..a4ae59b664eb 100644
--- a/Documentation/DocBook/v4l/vidioc-g-fmt.xml
+++ b/Documentation/DocBook/v4l/vidioc-g-fmt.xml
@@ -60,11 +60,13 @@ application.</para>
60<structfield>type</structfield> field of a struct 60<structfield>type</structfield> field of a struct
61<structname>v4l2_format</structname> to the respective buffer (stream) 61<structname>v4l2_format</structname> to the respective buffer (stream)
62type. For example video capture devices use 62type. For example video capture devices use
63<constant>V4L2_BUF_TYPE_VIDEO_CAPTURE</constant>. When the application 63<constant>V4L2_BUF_TYPE_VIDEO_CAPTURE</constant> or
64<constant>V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE</constant>. When the application
64calls the <constant>VIDIOC_G_FMT</constant> ioctl with a pointer to 65calls the <constant>VIDIOC_G_FMT</constant> ioctl with a pointer to
65this structure the driver fills the respective member of the 66this structure the driver fills the respective member of the
66<structfield>fmt</structfield> union. In case of video capture devices 67<structfield>fmt</structfield> union. In case of video capture devices
67that is the &v4l2-pix-format; <structfield>pix</structfield> member. 68that is either the &v4l2-pix-format; <structfield>pix</structfield> or
69the &v4l2-pix-format-mplane; <structfield>pix_mp</structfield> member.
68When the requested buffer type is not supported drivers return an 70When the requested buffer type is not supported drivers return an
69&EINVAL;.</para> 71&EINVAL;.</para>
70 72
@@ -134,6 +136,15 @@ devices.</entry>
134 </row> 136 </row>
135 <row> 137 <row>
136 <entry></entry> 138 <entry></entry>
139 <entry>&v4l2-pix-format-mplane;</entry>
140 <entry><structfield>pix_mp</structfield></entry>
141 <entry>Definition of an image format, see <xref
142 linkend="pixfmt" />, used by video capture and output
143devices that support the <link linkend="planar-apis">multi-planar
144version of the API</link>.</entry>
145 </row>
146 <row>
147 <entry></entry>
137 <entry>&v4l2-window;</entry> 148 <entry>&v4l2-window;</entry>
138 <entry><structfield>win</structfield></entry> 149 <entry><structfield>win</structfield></entry>
139 <entry>Definition of an overlaid image, see <xref 150 <entry>Definition of an overlaid image, see <xref
diff --git a/Documentation/DocBook/v4l/vidioc-qbuf.xml b/Documentation/DocBook/v4l/vidioc-qbuf.xml
index ab691ebf3b93..f2b11f8a4031 100644
--- a/Documentation/DocBook/v4l/vidioc-qbuf.xml
+++ b/Documentation/DocBook/v4l/vidioc-qbuf.xml
@@ -64,7 +64,8 @@ zero to the number of buffers allocated with &VIDIOC-REQBUFS;
64contents of the struct <structname>v4l2_buffer</structname> returned 64contents of the struct <structname>v4l2_buffer</structname> returned
65by a &VIDIOC-QUERYBUF; ioctl will do as well. When the buffer is 65by a &VIDIOC-QUERYBUF; ioctl will do as well. When the buffer is
66intended for output (<structfield>type</structfield> is 66intended for output (<structfield>type</structfield> is
67<constant>V4L2_BUF_TYPE_VIDEO_OUTPUT</constant> or 67<constant>V4L2_BUF_TYPE_VIDEO_OUTPUT</constant>,
68<constant>V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE</constant>, or
68<constant>V4L2_BUF_TYPE_VBI_OUTPUT</constant>) applications must also 69<constant>V4L2_BUF_TYPE_VBI_OUTPUT</constant>) applications must also
69initialize the <structfield>bytesused</structfield>, 70initialize the <structfield>bytesused</structfield>,
70<structfield>field</structfield> and 71<structfield>field</structfield> and
@@ -75,7 +76,11 @@ supports capturing from specific video inputs and you want to specify a video
75input, then <structfield>flags</structfield> should be set to 76input, then <structfield>flags</structfield> should be set to
76<constant>V4L2_BUF_FLAG_INPUT</constant> and the field 77<constant>V4L2_BUF_FLAG_INPUT</constant> and the field
77<structfield>input</structfield> must be initialized to the desired input. 78<structfield>input</structfield> must be initialized to the desired input.
78The <structfield>reserved</structfield> field must be set to 0. 79The <structfield>reserved</structfield> field must be set to 0. When using
80the <link linkend="planar-apis">multi-planar API</link>, the
81<structfield>m.planes</structfield> field must contain a userspace pointer
82to a filled-in array of &v4l2-plane; and the <structfield>length</structfield>
83field must be set to the number of elements in that array.
79</para> 84</para>
80 85
81 <para>To enqueue a <link linkend="mmap">memory mapped</link> 86 <para>To enqueue a <link linkend="mmap">memory mapped</link>
@@ -93,10 +98,13 @@ structure the driver sets the
93buffer applications set the <structfield>memory</structfield> 98buffer applications set the <structfield>memory</structfield>
94field to <constant>V4L2_MEMORY_USERPTR</constant>, the 99field to <constant>V4L2_MEMORY_USERPTR</constant>, the
95<structfield>m.userptr</structfield> field to the address of the 100<structfield>m.userptr</structfield> field to the address of the
96buffer and <structfield>length</structfield> to its size. 101buffer and <structfield>length</structfield> to its size. When the multi-planar
97When <constant>VIDIOC_QBUF</constant> is called with a pointer to this 102API is used, <structfield>m.userptr</structfield> and
98structure the driver sets the <constant>V4L2_BUF_FLAG_QUEUED</constant> 103<structfield>length</structfield> members of the passed array of &v4l2-plane;
99flag and clears the <constant>V4L2_BUF_FLAG_MAPPED</constant> and 104have to be used instead. When <constant>VIDIOC_QBUF</constant> is called with
105a pointer to this structure the driver sets the
106<constant>V4L2_BUF_FLAG_QUEUED</constant> flag and clears the
107<constant>V4L2_BUF_FLAG_MAPPED</constant> and
100<constant>V4L2_BUF_FLAG_DONE</constant> flags in the 108<constant>V4L2_BUF_FLAG_DONE</constant> flags in the
101<structfield>flags</structfield> field, or it returns an error code. 109<structfield>flags</structfield> field, or it returns an error code.
102This ioctl locks the memory pages of the buffer in physical memory, 110This ioctl locks the memory pages of the buffer in physical memory,
@@ -115,7 +123,9 @@ remaining fields or returns an error code. The driver may also set
115<constant>V4L2_BUF_FLAG_ERROR</constant> in the <structfield>flags</structfield> 123<constant>V4L2_BUF_FLAG_ERROR</constant> in the <structfield>flags</structfield>
116field. It indicates a non-critical (recoverable) streaming error. In such case 124field. It indicates a non-critical (recoverable) streaming error. In such case
117the application may continue as normal, but should be aware that data in the 125the application may continue as normal, but should be aware that data in the
118dequeued buffer might be corrupted.</para> 126dequeued buffer might be corrupted. When using the multi-planar API, the
127planes array does not have to be passed; the <structfield>m.planes</structfield>
128member must be set to NULL in that case.</para>
119 129
120 <para>By default <constant>VIDIOC_DQBUF</constant> blocks when no 130 <para>By default <constant>VIDIOC_DQBUF</constant> blocks when no
121buffer is in the outgoing queue. When the 131buffer is in the outgoing queue. When the
diff --git a/Documentation/DocBook/v4l/vidioc-querybuf.xml b/Documentation/DocBook/v4l/vidioc-querybuf.xml
index e649805a4908..5c104d42d31c 100644
--- a/Documentation/DocBook/v4l/vidioc-querybuf.xml
+++ b/Documentation/DocBook/v4l/vidioc-querybuf.xml
@@ -61,6 +61,10 @@ buffer at any time after buffers have been allocated with the
61to the number of buffers allocated with &VIDIOC-REQBUFS; 61to the number of buffers allocated with &VIDIOC-REQBUFS;
62 (&v4l2-requestbuffers; <structfield>count</structfield>) minus one. 62 (&v4l2-requestbuffers; <structfield>count</structfield>) minus one.
63The <structfield>reserved</structfield> field should to set to 0. 63The <structfield>reserved</structfield> field should to set to 0.
64When using the <link linkend="planar-apis">multi-planar API</link>, the
65<structfield>m.planes</structfield> field must contain a userspace pointer to an
66array of &v4l2-plane; and the <structfield>length</structfield> field has
67to be set to the number of elements in that array.
64After calling <constant>VIDIOC_QUERYBUF</constant> with a pointer to 68After calling <constant>VIDIOC_QUERYBUF</constant> with a pointer to
65 this structure drivers return an error code or fill the rest of 69 this structure drivers return an error code or fill the rest of
66the structure.</para> 70the structure.</para>
@@ -70,11 +74,13 @@ the structure.</para>
70<constant>V4L2_BUF_FLAG_QUEUED</constant> and 74<constant>V4L2_BUF_FLAG_QUEUED</constant> and
71<constant>V4L2_BUF_FLAG_DONE</constant> flags will be valid. The 75<constant>V4L2_BUF_FLAG_DONE</constant> flags will be valid. The
72<structfield>memory</structfield> field will be set to the current 76<structfield>memory</structfield> field will be set to the current
73I/O method, the <structfield>m.offset</structfield> 77I/O method. For the single-planar API, the <structfield>m.offset</structfield>
74contains the offset of the buffer from the start of the device memory, 78contains the offset of the buffer from the start of the device memory,
75the <structfield>length</structfield> field its size. The driver may 79the <structfield>length</structfield> field its size. For the multi-planar API,
76or may not set the remaining fields and flags, they are meaningless in 80fields <structfield>m.mem_offset</structfield> and
77this context.</para> 81<structfield>length</structfield> in the <structfield>m.planes</structfield>
82array elements will be used instead. The driver may or may not set the remaining
83fields and flags, they are meaningless in this context.</para>
78 84
79 <para>The <structname>v4l2_buffer</structname> structure is 85 <para>The <structname>v4l2_buffer</structname> structure is
80 specified in <xref linkend="buffer" />.</para> 86 specified in <xref linkend="buffer" />.</para>
diff --git a/Documentation/DocBook/v4l/vidioc-querycap.xml b/Documentation/DocBook/v4l/vidioc-querycap.xml
index d499da93a450..f29f1b86213c 100644
--- a/Documentation/DocBook/v4l/vidioc-querycap.xml
+++ b/Documentation/DocBook/v4l/vidioc-querycap.xml
@@ -142,16 +142,30 @@ this array to zero.</entry>
142 <row> 142 <row>
143 <entry><constant>V4L2_CAP_VIDEO_CAPTURE</constant></entry> 143 <entry><constant>V4L2_CAP_VIDEO_CAPTURE</constant></entry>
144 <entry>0x00000001</entry> 144 <entry>0x00000001</entry>
145 <entry>The device supports the <link 145 <entry>The device supports the single-planar API through the <link
146linkend="capture">Video Capture</link> interface.</entry> 146linkend="capture">Video Capture</link> interface.</entry>
147 </row> 147 </row>
148 <row> 148 <row>
149 <entry><constant>V4L2_CAP_VIDEO_CAPTURE_MPLANE</constant></entry>
150 <entry>0x00001000</entry>
151 <entry>The device supports the
152 <link linkend="planar-apis">multi-planar API</link> through the
153 <link linkend="capture">Video Capture</link> interface.</entry>
154 </row>
155 <row>
149 <entry><constant>V4L2_CAP_VIDEO_OUTPUT</constant></entry> 156 <entry><constant>V4L2_CAP_VIDEO_OUTPUT</constant></entry>
150 <entry>0x00000002</entry> 157 <entry>0x00000002</entry>
151 <entry>The device supports the <link 158 <entry>The device supports the single-planar API through the <link
152linkend="output">Video Output</link> interface.</entry> 159linkend="output">Video Output</link> interface.</entry>
153 </row> 160 </row>
154 <row> 161 <row>
162 <entry><constant>V4L2_CAP_VIDEO_OUTPUT_MPLANE</constant></entry>
163 <entry>0x00002000</entry>
164 <entry>The device supports the
165 <link linkend="planar-apis">multi-planar API</link> through the
166 <link linkend="output">Video Output</link> interface.</entry>
167 </row>
168 <row>
155 <entry><constant>V4L2_CAP_VIDEO_OVERLAY</constant></entry> 169 <entry><constant>V4L2_CAP_VIDEO_OVERLAY</constant></entry>
156 <entry>0x00000004</entry> 170 <entry>0x00000004</entry>
157 <entry>The device supports the <link 171 <entry>The device supports the <link
diff --git a/Documentation/DocBook/v4l/vidioc-streamon.xml b/Documentation/DocBook/v4l/vidioc-streamon.xml
index e42bff1f2c0a..75ed39bf4d2b 100644
--- a/Documentation/DocBook/v4l/vidioc-streamon.xml
+++ b/Documentation/DocBook/v4l/vidioc-streamon.xml
@@ -93,6 +93,15 @@ synchronize with other events.</para>
93been allocated (memory mapping) or enqueued (output) yet.</para> 93been allocated (memory mapping) or enqueued (output) yet.</para>
94 </listitem> 94 </listitem>
95 </varlistentry> 95 </varlistentry>
96 <varlistentry>
97 <term><errorcode>EPIPE</errorcode></term>
98 <listitem>
99 <para>The driver implements <link
100 linkend="pad-level-formats">pad-level format configuration</link> and
101 the pipeline configuration is invalid.
102 </para>
103 </listitem>
104 </varlistentry>
96 </variablelist> 105 </variablelist>
97 </refsect1> 106 </refsect1>
98</refentry> 107</refentry>
diff --git a/Documentation/DocBook/v4l/vidioc-subdev-enum-frame-interval.xml b/Documentation/DocBook/v4l/vidioc-subdev-enum-frame-interval.xml
new file mode 100644
index 000000000000..2f8f4f0a0235
--- /dev/null
+++ b/Documentation/DocBook/v4l/vidioc-subdev-enum-frame-interval.xml
@@ -0,0 +1,152 @@
1<refentry id="vidioc-subdev-enum-frame-interval">
2 <refmeta>
3 <refentrytitle>ioctl VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL</refname>
9 <refpurpose>Enumerate frame intervals</refpurpose>
10 </refnamediv>
11
12 <refsynopsisdiv>
13 <funcsynopsis>
14 <funcprototype>
15 <funcdef>int <function>ioctl</function></funcdef>
16 <paramdef>int <parameter>fd</parameter></paramdef>
17 <paramdef>int <parameter>request</parameter></paramdef>
18 <paramdef>struct v4l2_subdev_frame_interval_enum *
19 <parameter>argp</parameter></paramdef>
20 </funcprototype>
21 </funcsynopsis>
22 </refsynopsisdiv>
23
24 <refsect1>
25 <title>Arguments</title>
26
27 <variablelist>
28 <varlistentry>
29 <term><parameter>fd</parameter></term>
30 <listitem>
31 <para>&fd;</para>
32 </listitem>
33 </varlistentry>
34 <varlistentry>
35 <term><parameter>request</parameter></term>
36 <listitem>
37 <para>VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL</para>
38 </listitem>
39 </varlistentry>
40 <varlistentry>
41 <term><parameter>argp</parameter></term>
42 <listitem>
43 <para></para>
44 </listitem>
45 </varlistentry>
46 </variablelist>
47 </refsect1>
48
49 <refsect1>
50 <title>Description</title>
51
52 <note>
53 <title>Experimental</title>
54 <para>This is an <link linkend="experimental">experimental</link>
55 interface and may change in the future.</para>
56 </note>
57
58 <para>This ioctl lets applications enumerate available frame intervals on a
59 given sub-device pad. Frame intervals only makes sense for sub-devices that
60 can control the frame period on their own. This includes, for instance,
61 image sensors and TV tuners.</para>
62
63 <para>For the common use case of image sensors, the frame intervals
64 available on the sub-device output pad depend on the frame format and size
65 on the same pad. Applications must thus specify the desired format and size
66 when enumerating frame intervals.</para>
67
68 <para>To enumerate frame intervals applications initialize the
69 <structfield>index</structfield>, <structfield>pad</structfield>,
70 <structfield>code</structfield>, <structfield>width</structfield> and
71 <structfield>height</structfield> fields of
72 &v4l2-subdev-frame-interval-enum; and call the
73 <constant>VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL</constant> ioctl with a pointer
74 to this structure. Drivers fill the rest of the structure or return
75 an &EINVAL; if one of the input fields is invalid. All frame intervals are
76 enumerable by beginning at index zero and incrementing by one until
77 <errorcode>EINVAL</errorcode> is returned.</para>
78
79 <para>Available frame intervals may depend on the current 'try' formats
80 at other pads of the sub-device, as well as on the current active links. See
81 &VIDIOC-SUBDEV-G-FMT; for more information about the try formats.</para>
82
83 <para>Sub-devices that support the frame interval enumeration ioctl should
84 implemented it on a single pad only. Its behaviour when supported on
85 multiple pads of the same sub-device is not defined.</para>
86
87 <table pgwide="1" frame="none" id="v4l2-subdev-frame-interval-enum">
88 <title>struct <structname>v4l2_subdev_frame_interval_enum</structname></title>
89 <tgroup cols="3">
90 &cs-str;
91 <tbody valign="top">
92 <row>
93 <entry>__u32</entry>
94 <entry><structfield>index</structfield></entry>
95 <entry>Number of the format in the enumeration, set by the
96 application.</entry>
97 </row>
98 <row>
99 <entry>__u32</entry>
100 <entry><structfield>pad</structfield></entry>
101 <entry>Pad number as reported by the media controller API.</entry>
102 </row>
103 <row>
104 <entry>__u32</entry>
105 <entry><structfield>code</structfield></entry>
106 <entry>The media bus format code, as defined in
107 <xref linkend="v4l2-mbus-format" />.</entry>
108 </row>
109 <row>
110 <entry>__u32</entry>
111 <entry><structfield>width</structfield></entry>
112 <entry>Frame width, in pixels.</entry>
113 </row>
114 <row>
115 <entry>__u32</entry>
116 <entry><structfield>height</structfield></entry>
117 <entry>Frame height, in pixels.</entry>
118 </row>
119 <row>
120 <entry>&v4l2-fract;</entry>
121 <entry><structfield>interval</structfield></entry>
122 <entry>Period, in seconds, between consecutive video frames.</entry>
123 </row>
124 <row>
125 <entry>__u32</entry>
126 <entry><structfield>reserved</structfield>[9]</entry>
127 <entry>Reserved for future extensions. Applications and drivers must
128 set the array to zero.</entry>
129 </row>
130 </tbody>
131 </tgroup>
132 </table>
133 </refsect1>
134
135 <refsect1>
136 &return-value;
137
138 <variablelist>
139 <varlistentry>
140 <term><errorcode>EINVAL</errorcode></term>
141 <listitem>
142 <para>The &v4l2-subdev-frame-interval-enum;
143 <structfield>pad</structfield> references a non-existing pad, one of
144 the <structfield>code</structfield>, <structfield>width</structfield>
145 or <structfield>height</structfield> fields are invalid for the given
146 pad or the <structfield>index</structfield> field is out of bounds.
147 </para>
148 </listitem>
149 </varlistentry>
150 </variablelist>
151 </refsect1>
152</refentry>
diff --git a/Documentation/DocBook/v4l/vidioc-subdev-enum-frame-size.xml b/Documentation/DocBook/v4l/vidioc-subdev-enum-frame-size.xml
new file mode 100644
index 000000000000..79ce42b7c60c
--- /dev/null
+++ b/Documentation/DocBook/v4l/vidioc-subdev-enum-frame-size.xml
@@ -0,0 +1,154 @@
1<refentry id="vidioc-subdev-enum-frame-size">
2 <refmeta>
3 <refentrytitle>ioctl VIDIOC_SUBDEV_ENUM_FRAME_SIZE</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>VIDIOC_SUBDEV_ENUM_FRAME_SIZE</refname>
9 <refpurpose>Enumerate media bus frame sizes</refpurpose>
10 </refnamediv>
11
12 <refsynopsisdiv>
13 <funcsynopsis>
14 <funcprototype>
15 <funcdef>int <function>ioctl</function></funcdef>
16 <paramdef>int <parameter>fd</parameter></paramdef>
17 <paramdef>int <parameter>request</parameter></paramdef>
18 <paramdef>struct v4l2_subdev_frame_size_enum *
19 <parameter>argp</parameter></paramdef>
20 </funcprototype>
21 </funcsynopsis>
22 </refsynopsisdiv>
23
24 <refsect1>
25 <title>Arguments</title>
26
27 <variablelist>
28 <varlistentry>
29 <term><parameter>fd</parameter></term>
30 <listitem>
31 <para>&fd;</para>
32 </listitem>
33 </varlistentry>
34 <varlistentry>
35 <term><parameter>request</parameter></term>
36 <listitem>
37 <para>VIDIOC_SUBDEV_ENUM_FRAME_SIZE</para>
38 </listitem>
39 </varlistentry>
40 <varlistentry>
41 <term><parameter>argp</parameter></term>
42 <listitem>
43 <para></para>
44 </listitem>
45 </varlistentry>
46 </variablelist>
47 </refsect1>
48
49 <refsect1>
50 <title>Description</title>
51
52 <note>
53 <title>Experimental</title>
54 <para>This is an <link linkend="experimental">experimental</link>
55 interface and may change in the future.</para>
56 </note>
57
58 <para>This ioctl allows applications to enumerate all frame sizes
59 supported by a sub-device on the given pad for the given media bus format.
60 Supported formats can be retrieved with the &VIDIOC-SUBDEV-ENUM-MBUS-CODE;
61 ioctl.</para>
62
63 <para>To enumerate frame sizes applications initialize the
64 <structfield>pad</structfield>, <structfield>code</structfield> and
65 <structfield>index</structfield> fields of the
66 &v4l2-subdev-mbus-code-enum; and call the
67 <constant>VIDIOC_SUBDEV_ENUM_FRAME_SIZE</constant> ioctl with a pointer to
68 the structure. Drivers fill the minimum and maximum frame sizes or return
69 an &EINVAL; if one of the input parameters is invalid.</para>
70
71 <para>Sub-devices that only support discrete frame sizes (such as most
72 sensors) will return one or more frame sizes with identical minimum and
73 maximum values.</para>
74
75 <para>Not all possible sizes in given [minimum, maximum] ranges need to be
76 supported. For instance, a scaler that uses a fixed-point scaling ratio
77 might not be able to produce every frame size between the minimum and
78 maximum values. Applications must use the &VIDIOC-SUBDEV-S-FMT; ioctl to
79 try the sub-device for an exact supported frame size.</para>
80
81 <para>Available frame sizes may depend on the current 'try' formats at other
82 pads of the sub-device, as well as on the current active links and the
83 current values of V4L2 controls. See &VIDIOC-SUBDEV-G-FMT; for more
84 information about try formats.</para>
85
86 <table pgwide="1" frame="none" id="v4l2-subdev-frame-size-enum">
87 <title>struct <structname>v4l2_subdev_frame_size_enum</structname></title>
88 <tgroup cols="3">
89 &cs-str;
90 <tbody valign="top">
91 <row>
92 <entry>__u32</entry>
93 <entry><structfield>index</structfield></entry>
94 <entry>Number of the format in the enumeration, set by the
95 application.</entry>
96 </row>
97 <row>
98 <entry>__u32</entry>
99 <entry><structfield>pad</structfield></entry>
100 <entry>Pad number as reported by the media controller API.</entry>
101 </row>
102 <row>
103 <entry>__u32</entry>
104 <entry><structfield>code</structfield></entry>
105 <entry>The media bus format code, as defined in
106 <xref linkend="v4l2-mbus-format" />.</entry>
107 </row>
108 <row>
109 <entry>__u32</entry>
110 <entry><structfield>min_width</structfield></entry>
111 <entry>Minimum frame width, in pixels.</entry>
112 </row>
113 <row>
114 <entry>__u32</entry>
115 <entry><structfield>max_width</structfield></entry>
116 <entry>Maximum frame width, in pixels.</entry>
117 </row>
118 <row>
119 <entry>__u32</entry>
120 <entry><structfield>min_height</structfield></entry>
121 <entry>Minimum frame height, in pixels.</entry>
122 </row>
123 <row>
124 <entry>__u32</entry>
125 <entry><structfield>max_height</structfield></entry>
126 <entry>Maximum frame height, in pixels.</entry>
127 </row>
128 <row>
129 <entry>__u32</entry>
130 <entry><structfield>reserved</structfield>[9]</entry>
131 <entry>Reserved for future extensions. Applications and drivers must
132 set the array to zero.</entry>
133 </row>
134 </tbody>
135 </tgroup>
136 </table>
137 </refsect1>
138
139 <refsect1>
140 &return-value;
141
142 <variablelist>
143 <varlistentry>
144 <term><errorcode>EINVAL</errorcode></term>
145 <listitem>
146 <para>The &v4l2-subdev-frame-size-enum; <structfield>pad</structfield>
147 references a non-existing pad, the <structfield>code</structfield> is
148 invalid for the given pad or the <structfield>index</structfield>
149 field is out of bounds.</para>
150 </listitem>
151 </varlistentry>
152 </variablelist>
153 </refsect1>
154</refentry>
diff --git a/Documentation/DocBook/v4l/vidioc-subdev-enum-mbus-code.xml b/Documentation/DocBook/v4l/vidioc-subdev-enum-mbus-code.xml
new file mode 100644
index 000000000000..a6b3432449f6
--- /dev/null
+++ b/Documentation/DocBook/v4l/vidioc-subdev-enum-mbus-code.xml
@@ -0,0 +1,119 @@
1<refentry id="vidioc-subdev-enum-mbus-code">
2 <refmeta>
3 <refentrytitle>ioctl VIDIOC_SUBDEV_ENUM_MBUS_CODE</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>VIDIOC_SUBDEV_ENUM_MBUS_CODE</refname>
9 <refpurpose>Enumerate media bus formats</refpurpose>
10 </refnamediv>
11
12 <refsynopsisdiv>
13 <funcsynopsis>
14 <funcprototype>
15 <funcdef>int <function>ioctl</function></funcdef>
16 <paramdef>int <parameter>fd</parameter></paramdef>
17 <paramdef>int <parameter>request</parameter></paramdef>
18 <paramdef>struct v4l2_subdev_mbus_code_enum *
19 <parameter>argp</parameter></paramdef>
20 </funcprototype>
21 </funcsynopsis>
22 </refsynopsisdiv>
23
24 <refsect1>
25 <title>Arguments</title>
26
27 <variablelist>
28 <varlistentry>
29 <term><parameter>fd</parameter></term>
30 <listitem>
31 <para>&fd;</para>
32 </listitem>
33 </varlistentry>
34 <varlistentry>
35 <term><parameter>request</parameter></term>
36 <listitem>
37 <para>VIDIOC_SUBDEV_ENUM_MBUS_CODE</para>
38 </listitem>
39 </varlistentry>
40 <varlistentry>
41 <term><parameter>argp</parameter></term>
42 <listitem>
43 <para></para>
44 </listitem>
45 </varlistentry>
46 </variablelist>
47 </refsect1>
48
49 <refsect1>
50 <title>Description</title>
51
52 <note>
53 <title>Experimental</title>
54 <para>This is an <link linkend="experimental">experimental</link>
55 interface and may change in the future.</para>
56 </note>
57
58 <para>To enumerate media bus formats available at a given sub-device pad
59 applications initialize the <structfield>pad</structfield> and
60 <structfield>index</structfield> fields of &v4l2-subdev-mbus-code-enum; and
61 call the <constant>VIDIOC_SUBDEV_ENUM_MBUS_CODE</constant> ioctl with a
62 pointer to this structure. Drivers fill the rest of the structure or return
63 an &EINVAL; if either the <structfield>pad</structfield> or
64 <structfield>index</structfield> are invalid. All media bus formats are
65 enumerable by beginning at index zero and incrementing by one until
66 <errorcode>EINVAL</errorcode> is returned.</para>
67
68 <para>Available media bus formats may depend on the current 'try' formats
69 at other pads of the sub-device, as well as on the current active links. See
70 &VIDIOC-SUBDEV-G-FMT; for more information about the try formats.</para>
71
72 <table pgwide="1" frame="none" id="v4l2-subdev-mbus-code-enum">
73 <title>struct <structname>v4l2_subdev_mbus_code_enum</structname></title>
74 <tgroup cols="3">
75 &cs-str;
76 <tbody valign="top">
77 <row>
78 <entry>__u32</entry>
79 <entry><structfield>pad</structfield></entry>
80 <entry>Pad number as reported by the media controller API.</entry>
81 </row>
82 <row>
83 <entry>__u32</entry>
84 <entry><structfield>index</structfield></entry>
85 <entry>Number of the format in the enumeration, set by the
86 application.</entry>
87 </row>
88 <row>
89 <entry>__u32</entry>
90 <entry><structfield>code</structfield></entry>
91 <entry>The media bus format code, as defined in
92 <xref linkend="v4l2-mbus-format" />.</entry>
93 </row>
94 <row>
95 <entry>__u32</entry>
96 <entry><structfield>reserved</structfield>[9]</entry>
97 <entry>Reserved for future extensions. Applications and drivers must
98 set the array to zero.</entry>
99 </row>
100 </tbody>
101 </tgroup>
102 </table>
103 </refsect1>
104
105 <refsect1>
106 &return-value;
107
108 <variablelist>
109 <varlistentry>
110 <term><errorcode>EINVAL</errorcode></term>
111 <listitem>
112 <para>The &v4l2-subdev-mbus-code-enum; <structfield>pad</structfield>
113 references a non-existing pad, or the <structfield>index</structfield>
114 field is out of bounds.</para>
115 </listitem>
116 </varlistentry>
117 </variablelist>
118 </refsect1>
119</refentry>
diff --git a/Documentation/DocBook/v4l/vidioc-subdev-g-crop.xml b/Documentation/DocBook/v4l/vidioc-subdev-g-crop.xml
new file mode 100644
index 000000000000..06197323a8cc
--- /dev/null
+++ b/Documentation/DocBook/v4l/vidioc-subdev-g-crop.xml
@@ -0,0 +1,155 @@
1<refentry id="vidioc-subdev-g-crop">
2 <refmeta>
3 <refentrytitle>ioctl VIDIOC_SUBDEV_G_CROP, VIDIOC_SUBDEV_S_CROP</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>VIDIOC_SUBDEV_G_CROP</refname>
9 <refname>VIDIOC_SUBDEV_S_CROP</refname>
10 <refpurpose>Get or set the crop rectangle on a subdev pad</refpurpose>
11 </refnamediv>
12
13 <refsynopsisdiv>
14 <funcsynopsis>
15 <funcprototype>
16 <funcdef>int <function>ioctl</function></funcdef>
17 <paramdef>int <parameter>fd</parameter></paramdef>
18 <paramdef>int <parameter>request</parameter></paramdef>
19 <paramdef>struct v4l2_subdev_crop *<parameter>argp</parameter></paramdef>
20 </funcprototype>
21 </funcsynopsis>
22 <funcsynopsis>
23 <funcprototype>
24 <funcdef>int <function>ioctl</function></funcdef>
25 <paramdef>int <parameter>fd</parameter></paramdef>
26 <paramdef>int <parameter>request</parameter></paramdef>
27 <paramdef>const struct v4l2_subdev_crop *<parameter>argp</parameter></paramdef>
28 </funcprototype>
29 </funcsynopsis>
30 </refsynopsisdiv>
31
32 <refsect1>
33 <title>Arguments</title>
34
35 <variablelist>
36 <varlistentry>
37 <term><parameter>fd</parameter></term>
38 <listitem>
39 <para>&fd;</para>
40 </listitem>
41 </varlistentry>
42 <varlistentry>
43 <term><parameter>request</parameter></term>
44 <listitem>
45 <para>VIDIOC_SUBDEV_G_CROP, VIDIOC_SUBDEV_S_CROP</para>
46 </listitem>
47 </varlistentry>
48 <varlistentry>
49 <term><parameter>argp</parameter></term>
50 <listitem>
51 <para></para>
52 </listitem>
53 </varlistentry>
54 </variablelist>
55 </refsect1>
56
57 <refsect1>
58 <title>Description</title>
59
60 <note>
61 <title>Experimental</title>
62 <para>This is an <link linkend="experimental">experimental</link>
63 interface and may change in the future.</para>
64 </note>
65
66 <para>To retrieve the current crop rectangle applications set the
67 <structfield>pad</structfield> field of a &v4l2-subdev-crop; to the
68 desired pad number as reported by the media API and the
69 <structfield>which</structfield> field to
70 <constant>V4L2_SUBDEV_FORMAT_ACTIVE</constant>. They then call the
71 <constant>VIDIOC_SUBDEV_G_CROP</constant> ioctl with a pointer to this
72 structure. The driver fills the members of the <structfield>rect</structfield>
73 field or returns &EINVAL; if the input arguments are invalid, or if cropping
74 is not supported on the given pad.</para>
75
76 <para>To change the current crop rectangle applications set both the
77 <structfield>pad</structfield> and <structfield>which</structfield> fields
78 and all members of the <structfield>rect</structfield> field. They then call
79 the <constant>VIDIOC_SUBDEV_S_CROP</constant> ioctl with a pointer to this
80 structure. The driver verifies the requested crop rectangle, adjusts it
81 based on the hardware capabilities and configures the device. Upon return
82 the &v4l2-subdev-crop; contains the current format as would be returned
83 by a <constant>VIDIOC_SUBDEV_G_CROP</constant> call.</para>
84
85 <para>Applications can query the device capabilities by setting the
86 <structfield>which</structfield> to
87 <constant>V4L2_SUBDEV_FORMAT_TRY</constant>. When set, 'try' crop
88 rectangles are not applied to the device by the driver, but are mangled
89 exactly as active crop rectangles and stored in the sub-device file handle.
90 Two applications querying the same sub-device would thus not interact with
91 each other.</para>
92
93 <para>Drivers must not return an error solely because the requested crop
94 rectangle doesn't match the device capabilities. They must instead modify
95 the rectangle to match what the hardware can provide. The modified format
96 should be as close as possible to the original request.</para>
97
98 <table pgwide="1" frame="none" id="v4l2-subdev-crop">
99 <title>struct <structname>v4l2_subdev_crop</structname></title>
100 <tgroup cols="3">
101 &cs-str;
102 <tbody valign="top">
103 <row>
104 <entry>__u32</entry>
105 <entry><structfield>pad</structfield></entry>
106 <entry>Pad number as reported by the media framework.</entry>
107 </row>
108 <row>
109 <entry>__u32</entry>
110 <entry><structfield>which</structfield></entry>
111 <entry>Crop rectangle to get or set, from
112 &v4l2-subdev-format-whence;.</entry>
113 </row>
114 <row>
115 <entry>&v4l2-rect;</entry>
116 <entry><structfield>rect</structfield></entry>
117 <entry>Crop rectangle boundaries, in pixels.</entry>
118 </row>
119 <row>
120 <entry>__u32</entry>
121 <entry><structfield>reserved</structfield>[8]</entry>
122 <entry>Reserved for future extensions. Applications and drivers must
123 set the array to zero.</entry>
124 </row>
125 </tbody>
126 </tgroup>
127 </table>
128 </refsect1>
129
130 <refsect1>
131 &return-value;
132
133 <variablelist>
134 <varlistentry>
135 <term><errorcode>EBUSY</errorcode></term>
136 <listitem>
137 <para>The crop rectangle can't be changed because the pad is currently
138 busy. This can be caused, for instance, by an active video stream on
139 the pad. The ioctl must not be retried without performing another
140 action to fix the problem first. Only returned by
141 <constant>VIDIOC_SUBDEV_S_CROP</constant></para>
142 </listitem>
143 </varlistentry>
144 <varlistentry>
145 <term><errorcode>EINVAL</errorcode></term>
146 <listitem>
147 <para>The &v4l2-subdev-crop; <structfield>pad</structfield>
148 references a non-existing pad, the <structfield>which</structfield>
149 field references a non-existing format, or cropping is not supported
150 on the given subdev pad.</para>
151 </listitem>
152 </varlistentry>
153 </variablelist>
154 </refsect1>
155</refentry>
diff --git a/Documentation/DocBook/v4l/vidioc-subdev-g-fmt.xml b/Documentation/DocBook/v4l/vidioc-subdev-g-fmt.xml
new file mode 100644
index 000000000000..f367c570c530
--- /dev/null
+++ b/Documentation/DocBook/v4l/vidioc-subdev-g-fmt.xml
@@ -0,0 +1,180 @@
1<refentry id="vidioc-subdev-g-fmt">
2 <refmeta>
3 <refentrytitle>ioctl VIDIOC_SUBDEV_G_FMT, VIDIOC_SUBDEV_S_FMT</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>VIDIOC_SUBDEV_G_FMT</refname>
9 <refname>VIDIOC_SUBDEV_S_FMT</refname>
10 <refpurpose>Get or set the data format on a subdev pad</refpurpose>
11 </refnamediv>
12
13 <refsynopsisdiv>
14 <funcsynopsis>
15 <funcprototype>
16 <funcdef>int <function>ioctl</function></funcdef>
17 <paramdef>int <parameter>fd</parameter></paramdef>
18 <paramdef>int <parameter>request</parameter></paramdef>
19 <paramdef>struct v4l2_subdev_format *<parameter>argp</parameter>
20 </paramdef>
21 </funcprototype>
22 </funcsynopsis>
23 </refsynopsisdiv>
24
25 <refsect1>
26 <title>Arguments</title>
27
28 <variablelist>
29 <varlistentry>
30 <term><parameter>fd</parameter></term>
31 <listitem>
32 <para>&fd;</para>
33 </listitem>
34 </varlistentry>
35 <varlistentry>
36 <term><parameter>request</parameter></term>
37 <listitem>
38 <para>VIDIOC_SUBDEV_G_FMT, VIDIOC_SUBDEV_S_FMT</para>
39 </listitem>
40 </varlistentry>
41 <varlistentry>
42 <term><parameter>argp</parameter></term>
43 <listitem>
44 <para></para>
45 </listitem>
46 </varlistentry>
47 </variablelist>
48 </refsect1>
49
50 <refsect1>
51 <title>Description</title>
52
53 <note>
54 <title>Experimental</title>
55 <para>This is an <link linkend="experimental">experimental</link>
56 interface and may change in the future.</para>
57 </note>
58
59 <para>These ioctls are used to negotiate the frame format at specific
60 subdev pads in the image pipeline.</para>
61
62 <para>To retrieve the current format applications set the
63 <structfield>pad</structfield> field of a &v4l2-subdev-format; to the
64 desired pad number as reported by the media API and the
65 <structfield>which</structfield> field to
66 <constant>V4L2_SUBDEV_FORMAT_ACTIVE</constant>. When they call the
67 <constant>VIDIOC_SUBDEV_G_FMT</constant> ioctl with a pointer to this
68 structure the driver fills the members of the <structfield>format</structfield>
69 field.</para>
70
71 <para>To change the current format applications set both the
72 <structfield>pad</structfield> and <structfield>which</structfield> fields
73 and all members of the <structfield>format</structfield> field. When they
74 call the <constant>VIDIOC_SUBDEV_S_FMT</constant> ioctl with a pointer to this
75 structure the driver verifies the requested format, adjusts it based on the
76 hardware capabilities and configures the device. Upon return the
77 &v4l2-subdev-format; contains the current format as would be returned by a
78 <constant>VIDIOC_SUBDEV_G_FMT</constant> call.</para>
79
80 <para>Applications can query the device capabilities by setting the
81 <structfield>which</structfield> to
82 <constant>V4L2_SUBDEV_FORMAT_TRY</constant>. When set, 'try' formats are not
83 applied to the device by the driver, but are changed exactly as active
84 formats and stored in the sub-device file handle. Two applications querying
85 the same sub-device would thus not interact with each other.</para>
86
87 <para>For instance, to try a format at the output pad of a sub-device,
88 applications would first set the try format at the sub-device input with the
89 <constant>VIDIOC_SUBDEV_S_FMT</constant> ioctl. They would then either
90 retrieve the default format at the output pad with the
91 <constant>VIDIOC_SUBDEV_G_FMT</constant> ioctl, or set the desired output
92 pad format with the <constant>VIDIOC_SUBDEV_S_FMT</constant> ioctl and check
93 the returned value.</para>
94
95 <para>Try formats do not depend on active formats, but can depend on the
96 current links configuration or sub-device controls value. For instance, a
97 low-pass noise filter might crop pixels at the frame boundaries, modifying
98 its output frame size.</para>
99
100 <para>Drivers must not return an error solely because the requested format
101 doesn't match the device capabilities. They must instead modify the format
102 to match what the hardware can provide. The modified format should be as
103 close as possible to the original request.</para>
104
105 <table pgwide="1" frame="none" id="v4l2-subdev-format">
106 <title>struct <structname>v4l2_subdev_format</structname></title>
107 <tgroup cols="3">
108 &cs-str;
109 <tbody valign="top">
110 <row>
111 <entry>__u32</entry>
112 <entry><structfield>pad</structfield></entry>
113 <entry>Pad number as reported by the media controller API.</entry>
114 </row>
115 <row>
116 <entry>__u32</entry>
117 <entry><structfield>which</structfield></entry>
118 <entry>Format to modified, from &v4l2-subdev-format-whence;.</entry>
119 </row>
120 <row>
121 <entry>&v4l2-mbus-framefmt;</entry>
122 <entry><structfield>format</structfield></entry>
123 <entry>Definition of an image format, see <xref
124 linkend="v4l2-mbus-framefmt" /> for details.</entry>
125 </row>
126 <row>
127 <entry>__u32</entry>
128 <entry><structfield>reserved</structfield>[8]</entry>
129 <entry>Reserved for future extensions. Applications and drivers must
130 set the array to zero.</entry>
131 </row>
132 </tbody>
133 </tgroup>
134 </table>
135
136 <table pgwide="1" frame="none" id="v4l2-subdev-format-whence">
137 <title>enum <structname>v4l2_subdev_format_whence</structname></title>
138 <tgroup cols="3">
139 &cs-def;
140 <tbody valign="top">
141 <row>
142 <entry>V4L2_SUBDEV_FORMAT_TRY</entry>
143 <entry>0</entry>
144 <entry>Try formats, used for querying device capabilities.</entry>
145 </row>
146 <row>
147 <entry>V4L2_SUBDEV_FORMAT_ACTIVE</entry>
148 <entry>1</entry>
149 <entry>Active formats, applied to the hardware.</entry>
150 </row>
151 </tbody>
152 </tgroup>
153 </table>
154 </refsect1>
155
156 <refsect1>
157 &return-value;
158
159 <variablelist>
160 <varlistentry>
161 <term><errorcode>EBUSY</errorcode></term>
162 <listitem>
163 <para>The format can't be changed because the pad is currently busy.
164 This can be caused, for instance, by an active video stream on the
165 pad. The ioctl must not be retried without performing another action
166 to fix the problem first. Only returned by
167 <constant>VIDIOC_SUBDEV_S_FMT</constant></para>
168 </listitem>
169 </varlistentry>
170 <varlistentry>
171 <term><errorcode>EINVAL</errorcode></term>
172 <listitem>
173 <para>The &v4l2-subdev-format; <structfield>pad</structfield>
174 references a non-existing pad, or the <structfield>which</structfield>
175 field references a non-existing format.</para>
176 </listitem>
177 </varlistentry>
178 </variablelist>
179 </refsect1>
180</refentry>
diff --git a/Documentation/DocBook/v4l/vidioc-subdev-g-frame-interval.xml b/Documentation/DocBook/v4l/vidioc-subdev-g-frame-interval.xml
new file mode 100644
index 000000000000..0bc3ea22d31f
--- /dev/null
+++ b/Documentation/DocBook/v4l/vidioc-subdev-g-frame-interval.xml
@@ -0,0 +1,141 @@
1<refentry id="vidioc-subdev-g-frame-interval">
2 <refmeta>
3 <refentrytitle>ioctl VIDIOC_SUBDEV_G_FRAME_INTERVAL, VIDIOC_SUBDEV_S_FRAME_INTERVAL</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>VIDIOC_SUBDEV_G_FRAME_INTERVAL</refname>
9 <refname>VIDIOC_SUBDEV_S_FRAME_INTERVAL</refname>
10 <refpurpose>Get or set the frame interval on a subdev pad</refpurpose>
11 </refnamediv>
12
13 <refsynopsisdiv>
14 <funcsynopsis>
15 <funcprototype>
16 <funcdef>int <function>ioctl</function></funcdef>
17 <paramdef>int <parameter>fd</parameter></paramdef>
18 <paramdef>int <parameter>request</parameter></paramdef>
19 <paramdef>struct v4l2_subdev_frame_interval *<parameter>argp</parameter>
20 </paramdef>
21 </funcprototype>
22 </funcsynopsis>
23 </refsynopsisdiv>
24
25 <refsect1>
26 <title>Arguments</title>
27
28 <variablelist>
29 <varlistentry>
30 <term><parameter>fd</parameter></term>
31 <listitem>
32 <para>&fd;</para>
33 </listitem>
34 </varlistentry>
35 <varlistentry>
36 <term><parameter>request</parameter></term>
37 <listitem>
38 <para>VIDIOC_SUBDEV_G_FRAME_INTERVAL, VIDIOC_SUBDEV_S_FRAME_INTERVAL</para>
39 </listitem>
40 </varlistentry>
41 <varlistentry>
42 <term><parameter>argp</parameter></term>
43 <listitem>
44 <para></para>
45 </listitem>
46 </varlistentry>
47 </variablelist>
48 </refsect1>
49
50 <refsect1>
51 <title>Description</title>
52
53 <note>
54 <title>Experimental</title>
55 <para>This is an <link linkend="experimental">experimental</link>
56 interface and may change in the future.</para>
57 </note>
58
59 <para>These ioctls are used to get and set the frame interval at specific
60 subdev pads in the image pipeline. The frame interval only makes sense for
61 sub-devices that can control the frame period on their own. This includes,
62 for instance, image sensors and TV tuners. Sub-devices that don't support
63 frame intervals must not implement these ioctls.</para>
64
65 <para>To retrieve the current frame interval applications set the
66 <structfield>pad</structfield> field of a &v4l2-subdev-frame-interval; to
67 the desired pad number as reported by the media controller API. When they
68 call the <constant>VIDIOC_SUBDEV_G_FRAME_INTERVAL</constant> ioctl with a
69 pointer to this structure the driver fills the members of the
70 <structfield>interval</structfield> field.</para>
71
72 <para>To change the current frame interval applications set both the
73 <structfield>pad</structfield> field and all members of the
74 <structfield>interval</structfield> field. When they call the
75 <constant>VIDIOC_SUBDEV_S_FRAME_INTERVAL</constant> ioctl with a pointer to
76 this structure the driver verifies the requested interval, adjusts it based
77 on the hardware capabilities and configures the device. Upon return the
78 &v4l2-subdev-frame-interval; contains the current frame interval as would be
79 returned by a <constant>VIDIOC_SUBDEV_G_FRAME_INTERVAL</constant> call.
80 </para>
81
82 <para>Drivers must not return an error solely because the requested interval
83 doesn't match the device capabilities. They must instead modify the interval
84 to match what the hardware can provide. The modified interval should be as
85 close as possible to the original request.</para>
86
87 <para>Sub-devices that support the frame interval ioctls should implement
88 them on a single pad only. Their behaviour when supported on multiple pads
89 of the same sub-device is not defined.</para>
90
91 <table pgwide="1" frame="none" id="v4l2-subdev-frame-interval">
92 <title>struct <structname>v4l2_subdev_frame_interval</structname></title>
93 <tgroup cols="3">
94 &cs-str;
95 <tbody valign="top">
96 <row>
97 <entry>__u32</entry>
98 <entry><structfield>pad</structfield></entry>
99 <entry>Pad number as reported by the media controller API.</entry>
100 </row>
101 <row>
102 <entry>&v4l2-fract;</entry>
103 <entry><structfield>interval</structfield></entry>
104 <entry>Period, in seconds, between consecutive video frames.</entry>
105 </row>
106 <row>
107 <entry>__u32</entry>
108 <entry><structfield>reserved</structfield>[9]</entry>
109 <entry>Reserved for future extensions. Applications and drivers must
110 set the array to zero.</entry>
111 </row>
112 </tbody>
113 </tgroup>
114 </table>
115 </refsect1>
116
117 <refsect1>
118 &return-value;
119
120 <variablelist>
121 <varlistentry>
122 <term><errorcode>EBUSY</errorcode></term>
123 <listitem>
124 <para>The frame interval can't be changed because the pad is currently
125 busy. This can be caused, for instance, by an active video stream on
126 the pad. The ioctl must not be retried without performing another
127 action to fix the problem first. Only returned by
128 <constant>VIDIOC_SUBDEV_S_FRAME_INTERVAL</constant></para>
129 </listitem>
130 </varlistentry>
131 <varlistentry>
132 <term><errorcode>EINVAL</errorcode></term>
133 <listitem>
134 <para>The &v4l2-subdev-frame-interval; <structfield>pad</structfield>
135 references a non-existing pad, or the pad doesn't support frame
136 intervals.</para>
137 </listitem>
138 </varlistentry>
139 </variablelist>
140 </refsect1>
141</refentry>
diff --git a/Documentation/DocBook/writing-an-alsa-driver.tmpl b/Documentation/DocBook/writing-an-alsa-driver.tmpl
index 0ba149de2608..58ced2346e67 100644
--- a/Documentation/DocBook/writing-an-alsa-driver.tmpl
+++ b/Documentation/DocBook/writing-an-alsa-driver.tmpl
@@ -4784,7 +4784,7 @@ struct _snd_pcm_runtime {
4784 FM registers can be directly accessed through the direct-FM API, 4784 FM registers can be directly accessed through the direct-FM API,
4785 defined in <filename>&lt;sound/asound_fm.h&gt;</filename>. In 4785 defined in <filename>&lt;sound/asound_fm.h&gt;</filename>. In
4786 ALSA native mode, FM registers are accessed through 4786 ALSA native mode, FM registers are accessed through
4787 the Hardware-Dependant Device direct-FM extension API, whereas in 4787 the Hardware-Dependent Device direct-FM extension API, whereas in
4788 OSS compatible mode, FM registers can be accessed with the OSS 4788 OSS compatible mode, FM registers can be accessed with the OSS
4789 direct-FM compatible API in <filename>/dev/dmfmX</filename> device. 4789 direct-FM compatible API in <filename>/dev/dmfmX</filename> device.
4790 </para> 4790 </para>
diff --git a/Documentation/PCI/MSI-HOWTO.txt b/Documentation/PCI/MSI-HOWTO.txt
index dcf7acc720e1..3f5e0b09bed5 100644
--- a/Documentation/PCI/MSI-HOWTO.txt
+++ b/Documentation/PCI/MSI-HOWTO.txt
@@ -253,8 +253,8 @@ In constrast, MSI is restricted to a maximum of 32 interrupts (and
253must be a power of two). In addition, the MSI interrupt vectors must 253must be a power of two). In addition, the MSI interrupt vectors must
254be allocated consecutively, so the system may not be able to allocate 254be allocated consecutively, so the system may not be able to allocate
255as many vectors for MSI as it could for MSI-X. On some platforms, MSI 255as many vectors for MSI as it could for MSI-X. On some platforms, MSI
256interrupts must all be targetted at the same set of CPUs whereas MSI-X 256interrupts must all be targeted at the same set of CPUs whereas MSI-X
257interrupts can all be targetted at different CPUs. 257interrupts can all be targeted at different CPUs.
258 258
2594.5.2 Spinlocks 2594.5.2 Spinlocks
260 260
diff --git a/Documentation/SecurityBugs b/Documentation/SecurityBugs
index 26c3b3635d9f..a660d494c8ed 100644
--- a/Documentation/SecurityBugs
+++ b/Documentation/SecurityBugs
@@ -28,7 +28,7 @@ expect these delays to be short, measurable in days, not weeks or months.
28A disclosure date is negotiated by the security team working with the 28A disclosure date is negotiated by the security team working with the
29bug submitter as well as vendors. However, the kernel security team 29bug submitter as well as vendors. However, the kernel security team
30holds the final say when setting a disclosure date. The timeframe for 30holds the final say when setting a disclosure date. The timeframe for
31disclosure is from immediate (esp. if it's already publically known) 31disclosure is from immediate (esp. if it's already publicly known)
32to a few weeks. As a basic default policy, we expect report date to 32to a few weeks. As a basic default policy, we expect report date to
33disclosure date to be on the order of 7 days. 33disclosure date to be on the order of 7 days.
34 34
diff --git a/Documentation/SubmittingDrivers b/Documentation/SubmittingDrivers
index 38d2aab59cac..319baa8b60dd 100644
--- a/Documentation/SubmittingDrivers
+++ b/Documentation/SubmittingDrivers
@@ -101,7 +101,7 @@ PM support: Since Linux is used on many portable and desktop systems, your
101 complete overview of the power management issues related to 101 complete overview of the power management issues related to
102 drivers see Documentation/power/devices.txt . 102 drivers see Documentation/power/devices.txt .
103 103
104Control: In general if there is active maintainance of a driver by 104Control: In general if there is active maintenance of a driver by
105 the author then patches will be redirected to them unless 105 the author then patches will be redirected to them unless
106 they are totally obvious and without need of checking. 106 they are totally obvious and without need of checking.
107 If you want to be the contact and update point for the 107 If you want to be the contact and update point for the
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index 689e2371095c..e439cd0d3375 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -729,7 +729,7 @@ Linus Torvalds's mail on the canonical patch format:
729 <http://lkml.org/lkml/2005/4/7/183> 729 <http://lkml.org/lkml/2005/4/7/183>
730 730
731Andi Kleen, "On submitting kernel patches" 731Andi Kleen, "On submitting kernel patches"
732 Some strategies to get difficult or controversal changes in. 732 Some strategies to get difficult or controversial changes in.
733 http://halobates.de/on-submitting-patches.pdf 733 http://halobates.de/on-submitting-patches.pdf
734 734
735-- 735--
diff --git a/Documentation/acpi/apei/output_format.txt b/Documentation/acpi/apei/output_format.txt
index 9146952c612a..0c49c197c47a 100644
--- a/Documentation/acpi/apei/output_format.txt
+++ b/Documentation/acpi/apei/output_format.txt
@@ -92,6 +92,11 @@ vendor_id: <integer>, device_id: <integer>
92class_code: <integer>] 92class_code: <integer>]
93[serial number: <integer>, <integer>] 93[serial number: <integer>, <integer>]
94[bridge: secondary_status: <integer>, control: <integer>] 94[bridge: secondary_status: <integer>, control: <integer>]
95[aer_status: <integer>, aer_mask: <integer>
96<aer status string>
97[aer_uncor_severity: <integer>]
98aer_layer=<aer layer string>, aer_agent=<aer agent string>
99aer_tlp_header: <integer> <integer> <integer> <integer>]
95 100
96<pcie port type string>* := PCIe end point | legacy PCI end point | \ 101<pcie port type string>* := PCIe end point | legacy PCI end point | \
97unknown | unknown | root port | upstream switch port | \ 102unknown | unknown | root port | upstream switch port | \
@@ -99,6 +104,26 @@ downstream switch port | PCIe to PCI/PCI-X bridge | \
99PCI/PCI-X to PCIe bridge | root complex integrated endpoint device | \ 104PCI/PCI-X to PCIe bridge | root complex integrated endpoint device | \
100root complex event collector 105root complex event collector
101 106
107if section severity is fatal or recoverable
108<aer status string># :=
109unknown | unknown | unknown | unknown | Data Link Protocol | \
110unknown | unknown | unknown | unknown | unknown | unknown | unknown | \
111Poisoned TLP | Flow Control Protocol | Completion Timeout | \
112Completer Abort | Unexpected Completion | Receiver Overflow | \
113Malformed TLP | ECRC | Unsupported Request
114else
115<aer status string># :=
116Receiver Error | unknown | unknown | unknown | unknown | unknown | \
117Bad TLP | Bad DLLP | RELAY_NUM Rollover | unknown | unknown | unknown | \
118Replay Timer Timeout | Advisory Non-Fatal
119fi
120
121<aer layer string> :=
122Physical Layer | Data Link Layer | Transaction Layer
123
124<aer agent string> :=
125Receiver ID | Requester ID | Completer ID | Transmitter ID
126
102Where, [] designate corresponding content is optional 127Where, [] designate corresponding content is optional
103 128
104All <field string> description with * has the following format: 129All <field string> description with * has the following format:
diff --git a/Documentation/arm/IXP4xx b/Documentation/arm/IXP4xx
index 133c5fa6c7a1..7b9351f2f555 100644
--- a/Documentation/arm/IXP4xx
+++ b/Documentation/arm/IXP4xx
@@ -36,7 +36,7 @@ Linux currently supports the following features on the IXP4xx chips:
36- Timers (watchdog, OS) 36- Timers (watchdog, OS)
37 37
38The following components of the chips are not supported by Linux and 38The following components of the chips are not supported by Linux and
39require the use of Intel's propietary CSR softare: 39require the use of Intel's proprietary CSR softare:
40 40
41- USB device interface 41- USB device interface
42- Network interfaces (HSS, Utopia, NPEs, etc) 42- Network interfaces (HSS, Utopia, NPEs, etc)
@@ -47,7 +47,7 @@ software from:
47 47
48 http://developer.intel.com/design/network/products/npfamily/ixp425.htm 48 http://developer.intel.com/design/network/products/npfamily/ixp425.htm
49 49
50DO NOT POST QUESTIONS TO THE LINUX MAILING LISTS REGARDING THE PROPIETARY 50DO NOT POST QUESTIONS TO THE LINUX MAILING LISTS REGARDING THE PROPRIETARY
51SOFTWARE. 51SOFTWARE.
52 52
53There are several websites that provide directions/pointers on using 53There are several websites that provide directions/pointers on using
diff --git a/Documentation/arm/Samsung-S3C24XX/Suspend.txt b/Documentation/arm/Samsung-S3C24XX/Suspend.txt
index 7edd0e2e6c5b..1ca63b3e5635 100644
--- a/Documentation/arm/Samsung-S3C24XX/Suspend.txt
+++ b/Documentation/arm/Samsung-S3C24XX/Suspend.txt
@@ -116,7 +116,7 @@ Configuration
116 Allows the entire memory to be checksummed before and after the 116 Allows the entire memory to be checksummed before and after the
117 suspend to see if there has been any corruption of the contents. 117 suspend to see if there has been any corruption of the contents.
118 118
119 Note, the time to calculate the CRC is dependant on the CPU speed 119 Note, the time to calculate the CRC is dependent on the CPU speed
120 and the size of memory. For an 64Mbyte RAM area on an 200MHz 120 and the size of memory. For an 64Mbyte RAM area on an 200MHz
121 S3C2410, this can take approximately 4 seconds to complete. 121 S3C2410, this can take approximately 4 seconds to complete.
122 122
diff --git a/Documentation/arm/Samsung/GPIO.txt b/Documentation/arm/Samsung/GPIO.txt
index 05850c62abeb..513f2562c1a3 100644
--- a/Documentation/arm/Samsung/GPIO.txt
+++ b/Documentation/arm/Samsung/GPIO.txt
@@ -5,7 +5,7 @@ Introduction
5------------ 5------------
6 6
7This outlines the Samsung GPIO implementation and the architecture 7This outlines the Samsung GPIO implementation and the architecture
8specfic calls provided alongisde the drivers/gpio core. 8specific calls provided alongisde the drivers/gpio core.
9 9
10 10
11S3C24XX (Legacy) 11S3C24XX (Legacy)
diff --git a/Documentation/block/biodoc.txt b/Documentation/block/biodoc.txt
index b9a83dd24732..c6d84cfd2f56 100644
--- a/Documentation/block/biodoc.txt
+++ b/Documentation/block/biodoc.txt
@@ -497,7 +497,7 @@ The scatter gather list is in the form of an array of <page, offset, len>
497entries with their corresponding dma address mappings filled in at the 497entries with their corresponding dma address mappings filled in at the
498appropriate time. As an optimization, contiguous physical pages can be 498appropriate time. As an optimization, contiguous physical pages can be
499covered by a single entry where <page> refers to the first page and <len> 499covered by a single entry where <page> refers to the first page and <len>
500covers the range of pages (upto 16 contiguous pages could be covered this 500covers the range of pages (up to 16 contiguous pages could be covered this
501way). There is a helper routine (blk_rq_map_sg) which drivers can use to build 501way). There is a helper routine (blk_rq_map_sg) which drivers can use to build
502the sg list. 502the sg list.
503 503
@@ -565,7 +565,7 @@ struct request {
565 . 565 .
566 int tag; /* command tag associated with request */ 566 int tag; /* command tag associated with request */
567 void *special; /* same as before */ 567 void *special; /* same as before */
568 char *buffer; /* valid only for low memory buffers upto 568 char *buffer; /* valid only for low memory buffers up to
569 current_nr_sectors */ 569 current_nr_sectors */
570 . 570 .
571 . 571 .
@@ -963,11 +963,6 @@ elevator_dispatch_fn* fills the dispatch queue with ready requests.
963 963
964elevator_add_req_fn* called to add a new request into the scheduler 964elevator_add_req_fn* called to add a new request into the scheduler
965 965
966elevator_queue_empty_fn returns true if the merge queue is empty.
967 Drivers shouldn't use this, but rather check
968 if elv_next_request is NULL (without losing the
969 request if one exists!)
970
971elevator_former_req_fn 966elevator_former_req_fn
972elevator_latter_req_fn These return the request before or after the 967elevator_latter_req_fn These return the request before or after the
973 one specified in disk sort order. Used by the 968 one specified in disk sort order. Used by the
diff --git a/Documentation/cgroups/blkio-controller.txt b/Documentation/cgroups/blkio-controller.txt
index 4ed7b5ceeed2..465351d4cf85 100644
--- a/Documentation/cgroups/blkio-controller.txt
+++ b/Documentation/cgroups/blkio-controller.txt
@@ -140,7 +140,7 @@ Proportional weight policy files
140 - Specifies per cgroup weight. This is default weight of the group 140 - Specifies per cgroup weight. This is default weight of the group
141 on all the devices until and unless overridden by per device rule. 141 on all the devices until and unless overridden by per device rule.
142 (See blkio.weight_device). 142 (See blkio.weight_device).
143 Currently allowed range of weights is from 100 to 1000. 143 Currently allowed range of weights is from 10 to 1000.
144 144
145- blkio.weight_device 145- blkio.weight_device
146 - One can specify per cgroup per device rules using this interface. 146 - One can specify per cgroup per device rules using this interface.
@@ -343,34 +343,6 @@ Common files among various policies
343 343
344CFQ sysfs tunable 344CFQ sysfs tunable
345================= 345=================
346/sys/block/<disk>/queue/iosched/group_isolation
347-----------------------------------------------
348
349If group_isolation=1, it provides stronger isolation between groups at the
350expense of throughput. By default group_isolation is 0. In general that
351means that if group_isolation=0, expect fairness for sequential workload
352only. Set group_isolation=1 to see fairness for random IO workload also.
353
354Generally CFQ will put random seeky workload in sync-noidle category. CFQ
355will disable idling on these queues and it does a collective idling on group
356of such queues. Generally these are slow moving queues and if there is a
357sync-noidle service tree in each group, that group gets exclusive access to
358disk for certain period. That means it will bring the throughput down if
359group does not have enough IO to drive deeper queue depths and utilize disk
360capacity to the fullest in the slice allocated to it. But the flip side is
361that even a random reader should get better latencies and overall throughput
362if there are lots of sequential readers/sync-idle workload running in the
363system.
364
365If group_isolation=0, then CFQ automatically moves all the random seeky queues
366in the root group. That means there will be no service differentiation for
367that kind of workload. This leads to better throughput as we do collective
368idling on root sync-noidle tree.
369
370By default one should run with group_isolation=0. If that is not sufficient
371and one wants stronger isolation between groups, then set group_isolation=1
372but this will come at cost of reduced throughput.
373
374/sys/block/<disk>/queue/iosched/slice_idle 346/sys/block/<disk>/queue/iosched/slice_idle
375------------------------------------------ 347------------------------------------------
376On a faster hardware CFQ can be slow, especially with sequential workload. 348On a faster hardware CFQ can be slow, especially with sequential workload.
diff --git a/Documentation/cgroups/cgroups.txt b/Documentation/cgroups/cgroups.txt
index cbdfb7d9455b..aedf1bd02fdd 100644
--- a/Documentation/cgroups/cgroups.txt
+++ b/Documentation/cgroups/cgroups.txt
@@ -110,22 +110,22 @@ university server with various users - students, professors, system
110tasks etc. The resource planning for this server could be along the 110tasks etc. The resource planning for this server could be along the
111following lines: 111following lines:
112 112
113 CPU : Top cpuset 113 CPU : "Top cpuset"
114 / \ 114 / \
115 CPUSet1 CPUSet2 115 CPUSet1 CPUSet2
116 | | 116 | |
117 (Profs) (Students) 117 (Professors) (Students)
118 118
119 In addition (system tasks) are attached to topcpuset (so 119 In addition (system tasks) are attached to topcpuset (so
120 that they can run anywhere) with a limit of 20% 120 that they can run anywhere) with a limit of 20%
121 121
122 Memory : Professors (50%), students (30%), system (20%) 122 Memory : Professors (50%), Students (30%), system (20%)
123 123
124 Disk : Prof (50%), students (30%), system (20%) 124 Disk : Professors (50%), Students (30%), system (20%)
125 125
126 Network : WWW browsing (20%), Network File System (60%), others (20%) 126 Network : WWW browsing (20%), Network File System (60%), others (20%)
127 / \ 127 / \
128 Prof (15%) students (5%) 128 Professors (15%) students (5%)
129 129
130Browsers like Firefox/Lynx go into the WWW network class, while (k)nfsd go 130Browsers like Firefox/Lynx go into the WWW network class, while (k)nfsd go
131into NFS network class. 131into NFS network class.
diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt
index b6ed61c95856..7c163477fcd8 100644
--- a/Documentation/cgroups/memory.txt
+++ b/Documentation/cgroups/memory.txt
@@ -52,8 +52,10 @@ Brief summary of control files.
52 tasks # attach a task(thread) and show list of threads 52 tasks # attach a task(thread) and show list of threads
53 cgroup.procs # show list of processes 53 cgroup.procs # show list of processes
54 cgroup.event_control # an interface for event_fd() 54 cgroup.event_control # an interface for event_fd()
55 memory.usage_in_bytes # show current memory(RSS+Cache) usage. 55 memory.usage_in_bytes # show current res_counter usage for memory
56 memory.memsw.usage_in_bytes # show current memory+Swap usage 56 (See 5.5 for details)
57 memory.memsw.usage_in_bytes # show current res_counter usage for memory+Swap
58 (See 5.5 for details)
57 memory.limit_in_bytes # set/show limit of memory usage 59 memory.limit_in_bytes # set/show limit of memory usage
58 memory.memsw.limit_in_bytes # set/show limit of memory+Swap usage 60 memory.memsw.limit_in_bytes # set/show limit of memory+Swap usage
59 memory.failcnt # show the number of memory usage hits limits 61 memory.failcnt # show the number of memory usage hits limits
@@ -453,6 +455,15 @@ memory under it will be reclaimed.
453You can reset failcnt by writing 0 to failcnt file. 455You can reset failcnt by writing 0 to failcnt file.
454# echo 0 > .../memory.failcnt 456# echo 0 > .../memory.failcnt
455 457
4585.5 usage_in_bytes
459
460For efficiency, as other kernel components, memory cgroup uses some optimization
461to avoid unnecessary cacheline false sharing. usage_in_bytes is affected by the
462method and doesn't show 'exact' value of memory(and swap) usage, it's an fuzz
463value for efficient access. (Of course, when necessary, it's synchronized.)
464If you want to know more exact memory usage, you should use RSS+CACHE(+SWAP)
465value in memory.stat(see 5.2).
466
4566. Hierarchy support 4676. Hierarchy support
457 468
458The memory controller supports a deep hierarchy and hierarchical accounting. 469The memory controller supports a deep hierarchy and hierarchical accounting.
diff --git a/Documentation/cpu-hotplug.txt b/Documentation/cpu-hotplug.txt
index 45d5a217484f..a20bfd415e41 100644
--- a/Documentation/cpu-hotplug.txt
+++ b/Documentation/cpu-hotplug.txt
@@ -196,7 +196,7 @@ the state as 0 when a cpu if offline and 1 when its online.
196 #To display the current cpu state. 196 #To display the current cpu state.
197 #cat /sys/devices/system/cpu/cpuX/online 197 #cat /sys/devices/system/cpu/cpuX/online
198 198
199Q: Why cant i remove CPU0 on some systems? 199Q: Why can't i remove CPU0 on some systems?
200A: Some architectures may have some special dependency on a certain CPU. 200A: Some architectures may have some special dependency on a certain CPU.
201 201
202For e.g in IA64 platforms we have ability to sent platform interrupts to the 202For e.g in IA64 platforms we have ability to sent platform interrupts to the
diff --git a/Documentation/dell_rbu.txt b/Documentation/dell_rbu.txt
index 15174985ad08..d262e22bddec 100644
--- a/Documentation/dell_rbu.txt
+++ b/Documentation/dell_rbu.txt
@@ -62,7 +62,7 @@ image file and then arrange all these packets back to back in to one single
62file. 62file.
63This file is then copied to /sys/class/firmware/dell_rbu/data. 63This file is then copied to /sys/class/firmware/dell_rbu/data.
64Once this file gets to the driver, the driver extracts packet_size data from 64Once this file gets to the driver, the driver extracts packet_size data from
65the file and spreads it accross the physical memory in contiguous packet_sized 65the file and spreads it across the physical memory in contiguous packet_sized
66space. 66space.
67This method makes sure that all the packets get to the driver in a single operation. 67This method makes sure that all the packets get to the driver in a single operation.
68 68
diff --git a/Documentation/development-process/1.Intro b/Documentation/development-process/1.Intro
index 8cc2cba2b10d..9b614480aa84 100644
--- a/Documentation/development-process/1.Intro
+++ b/Documentation/development-process/1.Intro
@@ -56,13 +56,13 @@ information on kernel development.
56 56
571.2: WHAT THIS DOCUMENT IS ABOUT 571.2: WHAT THIS DOCUMENT IS ABOUT
58 58
59The Linux kernel, at over 6 million lines of code and well over 1000 active 59The Linux kernel, at over 8 million lines of code and well over 1000
60contributors, is one of the largest and most active free software projects 60contributors to each release, is one of the largest and most active free
61in existence. Since its humble beginning in 1991, this kernel has evolved 61software projects in existence. Since its humble beginning in 1991, this
62into a best-of-breed operating system component which runs on pocket-sized 62kernel has evolved into a best-of-breed operating system component which
63digital music players, desktop PCs, the largest supercomputers in 63runs on pocket-sized digital music players, desktop PCs, the largest
64existence, and all types of systems in between. It is a robust, efficient, 64supercomputers in existence, and all types of systems in between. It is a
65and scalable solution for almost any situation. 65robust, efficient, and scalable solution for almost any situation.
66 66
67With the growth of Linux has come an increase in the number of developers 67With the growth of Linux has come an increase in the number of developers
68(and companies) wishing to participate in its development. Hardware 68(and companies) wishing to participate in its development. Hardware
@@ -115,7 +115,7 @@ This document was written by Jonathan Corbet, corbet@lwn.net. It has been
115improved by comments from Johannes Berg, James Berry, Alex Chiang, Roland 115improved by comments from Johannes Berg, James Berry, Alex Chiang, Roland
116Dreier, Randy Dunlap, Jake Edge, Jiri Kosina, Matt Mackall, Arthur Marsh, 116Dreier, Randy Dunlap, Jake Edge, Jiri Kosina, Matt Mackall, Arthur Marsh,
117Amanda McPherson, Andrew Morton, Andrew Price, Tsugikazu Shibata, and 117Amanda McPherson, Andrew Morton, Andrew Price, Tsugikazu Shibata, and
118Jochen Voß. 118Jochen Voß.
119 119
120This work was supported by the Linux Foundation; thanks especially to 120This work was supported by the Linux Foundation; thanks especially to
121Amanda McPherson, who saw the value of this effort and made it all happen. 121Amanda McPherson, who saw the value of this effort and made it all happen.
@@ -221,7 +221,7 @@ include:
221- Everything that was said above about code review applies doubly to 221- Everything that was said above about code review applies doubly to
222 closed-source code. Since this code is not available at all, it cannot 222 closed-source code. Since this code is not available at all, it cannot
223 have been reviewed by the community and will, beyond doubt, have serious 223 have been reviewed by the community and will, beyond doubt, have serious
224 problems. 224 problems.
225 225
226Makers of embedded systems, in particular, may be tempted to disregard much 226Makers of embedded systems, in particular, may be tempted to disregard much
227of what has been said in this section in the belief that they are shipping 227of what has been said in this section in the belief that they are shipping
diff --git a/Documentation/development-process/2.Process b/Documentation/development-process/2.Process
index 911a45186340..4823577c6509 100644
--- a/Documentation/development-process/2.Process
+++ b/Documentation/development-process/2.Process
@@ -14,16 +14,15 @@ The kernel developers use a loosely time-based release process, with a new
14major kernel release happening every two or three months. The recent 14major kernel release happening every two or three months. The recent
15release history looks like this: 15release history looks like this:
16 16
17 2.6.26 July 13, 2008 17 2.6.38 March 14, 2011
18 2.6.25 April 16, 2008 18 2.6.37 January 4, 2011
19 2.6.24 January 24, 2008 19 2.6.36 October 20, 2010
20 2.6.23 October 9, 2007 20 2.6.35 August 1, 2010
21 2.6.22 July 8, 2007 21 2.6.34 May 15, 2010
22 2.6.21 April 25, 2007 22 2.6.33 February 24, 2010
23 2.6.20 February 4, 2007
24 23
25Every 2.6.x release is a major kernel release with new features, internal 24Every 2.6.x release is a major kernel release with new features, internal
26API changes, and more. A typical 2.6 release can contain over 10,000 25API changes, and more. A typical 2.6 release can contain nearly 10,000
27changesets with changes to several hundred thousand lines of code. 2.6 is 26changesets with changes to several hundred thousand lines of code. 2.6 is
28thus the leading edge of Linux kernel development; the kernel uses a 27thus the leading edge of Linux kernel development; the kernel uses a
29rolling development model which is continually integrating major changes. 28rolling development model which is continually integrating major changes.
@@ -42,13 +41,13 @@ merge window do not come out of thin air; they have been collected, tested,
42and staged ahead of time. How that process works will be described in 41and staged ahead of time. How that process works will be described in
43detail later on). 42detail later on).
44 43
45The merge window lasts for two weeks. At the end of this time, Linus 44The merge window lasts for approximately two weeks. At the end of this
46Torvalds will declare that the window is closed and release the first of 45time, Linus Torvalds will declare that the window is closed and release the
47the "rc" kernels. For the kernel which is destined to be 2.6.26, for 46first of the "rc" kernels. For the kernel which is destined to be 2.6.40,
48example, the release which happens at the end of the merge window will be 47for example, the release which happens at the end of the merge window will
49called 2.6.26-rc1. The -rc1 release is the signal that the time to merge 48be called 2.6.40-rc1. The -rc1 release is the signal that the time to
50new features has passed, and that the time to stabilize the next kernel has 49merge new features has passed, and that the time to stabilize the next
51begun. 50kernel has begun.
52 51
53Over the next six to ten weeks, only patches which fix problems should be 52Over the next six to ten weeks, only patches which fix problems should be
54submitted to the mainline. On occasion a more significant change will be 53submitted to the mainline. On occasion a more significant change will be
@@ -66,20 +65,19 @@ will get up to somewhere between -rc6 and -rc9 before the kernel is
66considered to be sufficiently stable and the final 2.6.x release is made. 65considered to be sufficiently stable and the final 2.6.x release is made.
67At that point the whole process starts over again. 66At that point the whole process starts over again.
68 67
69As an example, here is how the 2.6.25 development cycle went (all dates in 68As an example, here is how the 2.6.38 development cycle went (all dates in
702008): 692011):
71 70
72 January 24 2.6.24 stable release 71 January 4 2.6.37 stable release
73 February 10 2.6.25-rc1, merge window closes 72 January 18 2.6.38-rc1, merge window closes
74 February 15 2.6.25-rc2 73 January 21 2.6.38-rc2
75 February 24 2.6.25-rc3 74 February 1 2.6.38-rc3
76 March 4 2.6.25-rc4 75 February 7 2.6.38-rc4
77 March 9 2.6.25-rc5 76 February 15 2.6.38-rc5
78 March 16 2.6.25-rc6 77 February 21 2.6.38-rc6
79 March 25 2.6.25-rc7 78 March 1 2.6.38-rc7
80 April 1 2.6.25-rc8 79 March 7 2.6.38-rc8
81 April 11 2.6.25-rc9 80 March 14 2.6.38 stable release
82 April 16 2.6.25 stable release
83 81
84How do the developers decide when to close the development cycle and create 82How do the developers decide when to close the development cycle and create
85the stable release? The most significant metric used is the list of 83the stable release? The most significant metric used is the list of
@@ -87,7 +85,7 @@ regressions from previous releases. No bugs are welcome, but those which
87break systems which worked in the past are considered to be especially 85break systems which worked in the past are considered to be especially
88serious. For this reason, patches which cause regressions are looked upon 86serious. For this reason, patches which cause regressions are looked upon
89unfavorably and are quite likely to be reverted during the stabilization 87unfavorably and are quite likely to be reverted during the stabilization
90period. 88period.
91 89
92The developers' goal is to fix all known regressions before the stable 90The developers' goal is to fix all known regressions before the stable
93release is made. In the real world, this kind of perfection is hard to 91release is made. In the real world, this kind of perfection is hard to
@@ -99,26 +97,34 @@ kernels go out with a handful of known regressions though, hopefully, none
99of them are serious. 97of them are serious.
100 98
101Once a stable release is made, its ongoing maintenance is passed off to the 99Once a stable release is made, its ongoing maintenance is passed off to the
102"stable team," currently comprised of Greg Kroah-Hartman and Chris Wright. 100"stable team," currently consisting of Greg Kroah-Hartman. The stable team
103The stable team will release occasional updates to the stable release using 101will release occasional updates to the stable release using the 2.6.x.y
104the 2.6.x.y numbering scheme. To be considered for an update release, a 102numbering scheme. To be considered for an update release, a patch must (1)
105patch must (1) fix a significant bug, and (2) already be merged into the 103fix a significant bug, and (2) already be merged into the mainline for the
106mainline for the next development kernel. Continuing our 2.6.25 example, 104next development kernel. Kernels will typically receive stable updates for
107the history (as of this writing) is: 105a little more than one development cycle past their initial release. So,
108 106for example, the 2.6.36 kernel's history looked like:
109 May 1 2.6.25.1 107
110 May 6 2.6.25.2 108 October 10 2.6.36 stable release
111 May 9 2.6.25.3 109 November 22 2.6.36.1
112 May 15 2.6.25.4 110 December 9 2.6.36.2
113 June 7 2.6.25.5 111 January 7 2.6.36.3
114 June 9 2.6.25.6 112 February 17 2.6.36.4
115 June 16 2.6.25.7 113
116 June 21 2.6.25.8 1142.6.36.4 was the final stable update for the 2.6.36 release.
117 June 24 2.6.25.9 115
118 116Some kernels are designated "long term" kernels; they will receive support
119Stable updates for a given kernel are made for approximately six months; 117for a longer period. As of this writing, the current long term kernels
120after that, the maintenance of stable releases is solely the responsibility 118and their maintainers are:
121of the distributors which have shipped that particular kernel. 119
120 2.6.27 Willy Tarreau (Deep-frozen stable kernel)
121 2.6.32 Greg Kroah-Hartman
122 2.6.35 Andi Kleen (Embedded flag kernel)
123
124The selection of a kernel for long-term support is purely a matter of a
125maintainer having the need and the time to maintain that release. There
126are no known plans for long-term support for any specific upcoming
127release.
122 128
123 129
1242.2: THE LIFECYCLE OF A PATCH 1302.2: THE LIFECYCLE OF A PATCH
@@ -130,7 +136,7 @@ each patch implements a change which is desirable to have in the mainline.
130This process can happen quickly for minor fixes, or, in the case of large 136This process can happen quickly for minor fixes, or, in the case of large
131and controversial changes, go on for years. Much developer frustration 137and controversial changes, go on for years. Much developer frustration
132comes from a lack of understanding of this process or from attempts to 138comes from a lack of understanding of this process or from attempts to
133circumvent it. 139circumvent it.
134 140
135In the hopes of reducing that frustration, this document will describe how 141In the hopes of reducing that frustration, this document will describe how
136a patch gets into the kernel. What follows below is an introduction which 142a patch gets into the kernel. What follows below is an introduction which
@@ -193,8 +199,8 @@ involved.
1932.3: HOW PATCHES GET INTO THE KERNEL 1992.3: HOW PATCHES GET INTO THE KERNEL
194 200
195There is exactly one person who can merge patches into the mainline kernel 201There is exactly one person who can merge patches into the mainline kernel
196repository: Linus Torvalds. But, of the over 12,000 patches which went 202repository: Linus Torvalds. But, of the over 9,500 patches which went
197into the 2.6.25 kernel, only 250 (around 2%) were directly chosen by Linus 203into the 2.6.38 kernel, only 112 (around 1.3%) were directly chosen by Linus
198himself. The kernel project has long since grown to a size where no single 204himself. The kernel project has long since grown to a size where no single
199developer could possibly inspect and select every patch unassisted. The 205developer could possibly inspect and select every patch unassisted. The
200way the kernel developers have addressed this growth is through the use of 206way the kernel developers have addressed this growth is through the use of
@@ -229,7 +235,7 @@ first in trees dedicated to network device drivers, wireless networking,
229etc. This chain of repositories can be arbitrarily long, though it rarely 235etc. This chain of repositories can be arbitrarily long, though it rarely
230exceeds two or three links. Since each maintainer in the chain trusts 236exceeds two or three links. Since each maintainer in the chain trusts
231those managing lower-level trees, this process is known as the "chain of 237those managing lower-level trees, this process is known as the "chain of
232trust." 238trust."
233 239
234Clearly, in a system like this, getting patches into the kernel depends on 240Clearly, in a system like this, getting patches into the kernel depends on
235finding the right maintainer. Sending patches directly to Linus is not 241finding the right maintainer. Sending patches directly to Linus is not
@@ -254,7 +260,7 @@ The answer comes in the form of -next trees, where subsystem trees are
254collected for testing and review. The older of these trees, maintained by 260collected for testing and review. The older of these trees, maintained by
255Andrew Morton, is called "-mm" (for memory management, which is how it got 261Andrew Morton, is called "-mm" (for memory management, which is how it got
256started). The -mm tree integrates patches from a long list of subsystem 262started). The -mm tree integrates patches from a long list of subsystem
257trees; it also has some patches aimed at helping with debugging. 263trees; it also has some patches aimed at helping with debugging.
258 264
259Beyond that, -mm contains a significant collection of patches which have 265Beyond that, -mm contains a significant collection of patches which have
260been selected by Andrew directly. These patches may have been posted on a 266been selected by Andrew directly. These patches may have been posted on a
@@ -264,8 +270,8 @@ subsystem tree of last resort; if there is no other obvious path for a
264patch into the mainline, it is likely to end up in -mm. Miscellaneous 270patch into the mainline, it is likely to end up in -mm. Miscellaneous
265patches which accumulate in -mm will eventually either be forwarded on to 271patches which accumulate in -mm will eventually either be forwarded on to
266an appropriate subsystem tree or be sent directly to Linus. In a typical 272an appropriate subsystem tree or be sent directly to Linus. In a typical
267development cycle, approximately 10% of the patches going into the mainline 273development cycle, approximately 5-10% of the patches going into the
268get there via -mm. 274mainline get there via -mm.
269 275
270The current -mm patch is available in the "mmotm" (-mm of the moment) 276The current -mm patch is available in the "mmotm" (-mm of the moment)
271directory at: 277directory at:
@@ -275,7 +281,7 @@ directory at:
275Use of the MMOTM tree is likely to be a frustrating experience, though; 281Use of the MMOTM tree is likely to be a frustrating experience, though;
276there is a definite chance that it will not even compile. 282there is a definite chance that it will not even compile.
277 283
278The other -next tree, started more recently, is linux-next, maintained by 284The primary tree for next-cycle patch merging is linux-next, maintained by
279Stephen Rothwell. The linux-next tree is, by design, a snapshot of what 285Stephen Rothwell. The linux-next tree is, by design, a snapshot of what
280the mainline is expected to look like after the next merge window closes. 286the mainline is expected to look like after the next merge window closes.
281Linux-next trees are announced on the linux-kernel and linux-next mailing 287Linux-next trees are announced on the linux-kernel and linux-next mailing
@@ -287,25 +293,14 @@ Some information about linux-next has been gathered at:
287 293
288 http://linux.f-seidel.de/linux-next/pmwiki/ 294 http://linux.f-seidel.de/linux-next/pmwiki/
289 295
290How the linux-next tree will fit into the development process is still 296Linux-next has become an integral part of the kernel development process;
291changing. As of this writing, the first full development cycle involving 297all patches merged during a given merge window should really have found
292linux-next (2.6.26) is coming to an end; thus far, it has proved to be a 298their way into linux-next some time before the merge window opens.
293valuable resource for finding and fixing integration problems before the 299
294beginning of the merge window. See http://lwn.net/Articles/287155/ for
295more information on how linux-next has worked to set up the 2.6.27 merge
296window.
297
298Some developers have begun to suggest that linux-next should be used as the
299target for future development as well. The linux-next tree does tend to be
300far ahead of the mainline and is more representative of the tree into which
301any new work will be merged. The downside to this idea is that the
302volatility of linux-next tends to make it a difficult development target.
303See http://lwn.net/Articles/289013/ for more information on this topic, and
304stay tuned; much is still in flux where linux-next is involved.
305 300
3062.4.1: STAGING TREES 3012.4.1: STAGING TREES
307 302
308The kernel source tree now contains the drivers/staging/ directory, where 303The kernel source tree contains the drivers/staging/ directory, where
309many sub-directories for drivers or filesystems that are on their way to 304many sub-directories for drivers or filesystems that are on their way to
310being added to the kernel tree live. They remain in drivers/staging while 305being added to the kernel tree live. They remain in drivers/staging while
311they still need more work; once complete, they can be moved into the 306they still need more work; once complete, they can be moved into the
@@ -313,15 +308,23 @@ kernel proper. This is a way to keep track of drivers that aren't
313up to Linux kernel coding or quality standards, but people may want to use 308up to Linux kernel coding or quality standards, but people may want to use
314them and track development. 309them and track development.
315 310
316Greg Kroah-Hartman currently (as of 2.6.36) maintains the staging tree. 311Greg Kroah-Hartman currently maintains the staging tree. Drivers that
317Drivers that still need work are sent to him, with each driver having 312still need work are sent to him, with each driver having its own
318its own subdirectory in drivers/staging/. Along with the driver source 313subdirectory in drivers/staging/. Along with the driver source files, a
319files, a TODO file should be present in the directory as well. The TODO 314TODO file should be present in the directory as well. The TODO file lists
320file lists the pending work that the driver needs for acceptance into 315the pending work that the driver needs for acceptance into the kernel
321the kernel proper, as well as a list of people that should be Cc'd for any 316proper, as well as a list of people that should be Cc'd for any patches to
322patches to the driver. Staging drivers that don't currently build should 317the driver. Current rules require that drivers contributed to staging
323have their config entries depend upon CONFIG_BROKEN. Once they can 318must, at a minimum, compile properly.
324be successfully built without outside patches, CONFIG_BROKEN can be removed. 319
320Staging can be a relatively easy way to get new drivers into the mainline
321where, with luck, they will come to the attention of other developers and
322improve quickly. Entry into staging is not the end of the story, though;
323code in staging which is not seeing regular progress will eventually be
324removed. Distributors also tend to be relatively reluctant to enable
325staging drivers. So staging is, at best, a stop on the way toward becoming
326a proper mainline driver.
327
325 328
3262.5: TOOLS 3292.5: TOOLS
327 330
@@ -347,11 +350,7 @@ page at:
347 350
348 http://git-scm.com/ 351 http://git-scm.com/
349 352
350That page has pointers to documentation and tutorials. One should be 353That page has pointers to documentation and tutorials.
351aware, in particular, of the Kernel Hacker's Guide to git, which has
352information specific to kernel development:
353
354 http://linux.yyz.us/git-howto.html
355 354
356Among the kernel developers who do not use git, the most popular choice is 355Among the kernel developers who do not use git, the most popular choice is
357almost certainly Mercurial: 356almost certainly Mercurial:
@@ -408,7 +407,7 @@ There are a few hints which can help with linux-kernel survival:
408 important to filter on both the topic of interest (though note that 407 important to filter on both the topic of interest (though note that
409 long-running conversations can drift away from the original subject 408 long-running conversations can drift away from the original subject
410 without changing the email subject line) and the people who are 409 without changing the email subject line) and the people who are
411 participating. 410 participating.
412 411
413- Do not feed the trolls. If somebody is trying to stir up an angry 412- Do not feed the trolls. If somebody is trying to stir up an angry
414 response, ignore them. 413 response, ignore them.
diff --git a/Documentation/development-process/3.Early-stage b/Documentation/development-process/3.Early-stage
index 307a159a70ca..f87ba7b3fbac 100644
--- a/Documentation/development-process/3.Early-stage
+++ b/Documentation/development-process/3.Early-stage
@@ -110,8 +110,8 @@ the kernel community's standards. Some examples include:
110 110
111 - The AppArmor security module made use of internal virtual filesystem 111 - The AppArmor security module made use of internal virtual filesystem
112 data structures in ways which were considered to be unsafe and 112 data structures in ways which were considered to be unsafe and
113 unreliable. This code has since been significantly reworked, but 113 unreliable. This concern (among others) kept AppArmor out of the
114 remains outside of the mainline. 114 mainline for years.
115 115
116In each of these cases, a great deal of pain and extra work could have been 116In each of these cases, a great deal of pain and extra work could have been
117avoided with some early discussion with the kernel developers. 117avoided with some early discussion with the kernel developers.
@@ -138,6 +138,19 @@ patches, and who, if anybody, is attaching Signed-off-by lines to those
138patches. Those are the people who will be best placed to help with a new 138patches. Those are the people who will be best placed to help with a new
139development project. 139development project.
140 140
141The task of finding the right maintainer is sometimes challenging enough
142that the kernel developers have added a script to ease the process:
143
144 .../scripts/get_maintainer.pl
145
146This script will return the current maintainer(s) for a given file or
147directory when given the "-f" option. If passed a patch on the
148command line, it will list the maintainers who should probably receive
149copies of the patch. There are a number of options regulating how hard
150get_maintainer.pl will search for maintainers; please be careful about
151using the more aggressive options as you may end up including developers
152who have no real interest in the code you are modifying.
153
141If all else fails, talking to Andrew Morton can be an effective way to 154If all else fails, talking to Andrew Morton can be an effective way to
142track down a maintainer for a specific piece of code. 155track down a maintainer for a specific piece of code.
143 156
@@ -155,11 +168,15 @@ reaction, but, instead, little or no reaction at all. The sad truth of the
155matter is (1) kernel developers tend to be busy, (2) there is no shortage 168matter is (1) kernel developers tend to be busy, (2) there is no shortage
156of people with grand plans and little code (or even prospect of code) to 169of people with grand plans and little code (or even prospect of code) to
157back them up, and (3) nobody is obligated to review or comment on ideas 170back them up, and (3) nobody is obligated to review or comment on ideas
158posted by others. If a request-for-comments posting yields little in the 171posted by others. Beyond that, high-level designs often hide problems
159way of comments, do not assume that it means there is no interest in the 172which are only reviewed when somebody actually tries to implement those
160project. Unfortunately, you also cannot assume that there are no problems 173designs; for that reason, kernel developers would rather see the code.
161with your idea. The best thing to do in this situation is to proceed, 174
162keeping the community informed as you go. 175If a request-for-comments posting yields little in the way of comments, do
176not assume that it means there is no interest in the project.
177Unfortunately, you also cannot assume that there are no problems with your
178idea. The best thing to do in this situation is to proceed, keeping the
179community informed as you go.
163 180
164 181
1653.5: GETTING OFFICIAL BUY-IN 1823.5: GETTING OFFICIAL BUY-IN
diff --git a/Documentation/development-process/4.Coding b/Documentation/development-process/4.Coding
index 2278693c8ffa..f3f1a469443c 100644
--- a/Documentation/development-process/4.Coding
+++ b/Documentation/development-process/4.Coding
@@ -131,6 +131,11 @@ classic time/space tradeoff taught in beginning data structures classes
131often does not apply to contemporary hardware. Space *is* time, in that a 131often does not apply to contemporary hardware. Space *is* time, in that a
132larger program will run slower than one which is more compact. 132larger program will run slower than one which is more compact.
133 133
134More recent compilers take an increasingly active role in deciding whether
135a given function should actually be inlined or not. So the liberal
136placement of "inline" keywords may not just be excessive; it could also be
137irrelevant.
138
134 139
135* Locking 140* Locking
136 141
@@ -285,6 +290,13 @@ be found at https://sparse.wiki.kernel.org/index.php/Main_Page if your
285distributor does not package it); it can then be run on the code by adding 290distributor does not package it); it can then be run on the code by adding
286"C=1" to your make command. 291"C=1" to your make command.
287 292
293The "Coccinelle" tool (http://coccinelle.lip6.fr/) is able to find a wide
294variety of potential coding problems; it can also propose fixes for those
295problems. Quite a few "semantic patches" for the kernel have been packaged
296under the scripts/coccinelle directory; running "make coccicheck" will run
297through those semantic patches and report on any problems found. See
298Documentation/coccinelle.txt for more information.
299
288Other kinds of portability errors are best found by compiling your code for 300Other kinds of portability errors are best found by compiling your code for
289other architectures. If you do not happen to have an S/390 system or a 301other architectures. If you do not happen to have an S/390 system or a
290Blackfin development board handy, you can still perform the compilation 302Blackfin development board handy, you can still perform the compilation
@@ -308,7 +320,9 @@ The first piece of documentation for any patch is its associated
308changelog. Log entries should describe the problem being solved, the form 320changelog. Log entries should describe the problem being solved, the form
309of the solution, the people who worked on the patch, any relevant 321of the solution, the people who worked on the patch, any relevant
310effects on performance, and anything else that might be needed to 322effects on performance, and anything else that might be needed to
311understand the patch. 323understand the patch. Be sure that the changelog says *why* the patch is
324worth applying; a surprising number of developers fail to provide that
325information.
312 326
313Any code which adds a new user-space interface - including new sysfs or 327Any code which adds a new user-space interface - including new sysfs or
314/proc files - should include documentation of that interface which enables 328/proc files - should include documentation of that interface which enables
@@ -321,7 +335,7 @@ boot-time parameters. Any patch which adds new parameters should add the
321appropriate entries to this file. 335appropriate entries to this file.
322 336
323Any new configuration options must be accompanied by help text which 337Any new configuration options must be accompanied by help text which
324clearly explains the options and when the user might want to select them. 338clearly explains the options and when the user might want to select them.
325 339
326Internal API information for many subsystems is documented by way of 340Internal API information for many subsystems is documented by way of
327specially-formatted comments; these comments can be extracted and formatted 341specially-formatted comments; these comments can be extracted and formatted
@@ -372,7 +386,8 @@ which is broken by the change. For a widely-used function, this duty can
372lead to literally hundreds or thousands of changes - many of which are 386lead to literally hundreds or thousands of changes - many of which are
373likely to conflict with work being done by other developers. Needless to 387likely to conflict with work being done by other developers. Needless to
374say, this can be a large job, so it is best to be sure that the 388say, this can be a large job, so it is best to be sure that the
375justification is solid. 389justification is solid. Note that the Coccinelle tool can help with
390wide-ranging API changes.
376 391
377When making an incompatible API change, one should, whenever possible, 392When making an incompatible API change, one should, whenever possible,
378ensure that code which has not been updated is caught by the compiler. 393ensure that code which has not been updated is caught by the compiler.
diff --git a/Documentation/development-process/5.Posting b/Documentation/development-process/5.Posting
index f622c1e9f0f9..903a2546f138 100644
--- a/Documentation/development-process/5.Posting
+++ b/Documentation/development-process/5.Posting
@@ -60,12 +60,15 @@ even in the short term.
60 60
61Patches must be prepared against a specific version of the kernel. As a 61Patches must be prepared against a specific version of the kernel. As a
62general rule, a patch should be based on the current mainline as found in 62general rule, a patch should be based on the current mainline as found in
63Linus's git tree. It may become necessary to make versions against -mm, 63Linus's git tree. When basing on mainline, start with a well-known release
64linux-next, or a subsystem tree, though, to facilitate wider testing and 64point - a stable or -rc release - rather than branching off the mainline at
65review. Depending on the area of your patch and what is going on 65an arbitrary spot.
66elsewhere, basing a patch against these other trees can require a 66
67significant amount of work resolving conflicts and dealing with API 67It may become necessary to make versions against -mm, linux-next, or a
68changes. 68subsystem tree, though, to facilitate wider testing and review. Depending
69on the area of your patch and what is going on elsewhere, basing a patch
70against these other trees can require a significant amount of work
71resolving conflicts and dealing with API changes.
69 72
70Only the most simple changes should be formatted as a single patch; 73Only the most simple changes should be formatted as a single patch;
71everything else should be made as a logical series of changes. Splitting 74everything else should be made as a logical series of changes. Splitting
@@ -100,11 +103,11 @@ rules of thumb, however, which can help considerably:
100 result is a broken kernel, you will make life harder for developers and 103 result is a broken kernel, you will make life harder for developers and
101 users who are engaging in the noble work of tracking down problems. 104 users who are engaging in the noble work of tracking down problems.
102 105
103 - Do not overdo it, though. One developer recently posted a set of edits 106 - Do not overdo it, though. One developer once posted a set of edits
104 to a single file as 500 separate patches - an act which did not make him 107 to a single file as 500 separate patches - an act which did not make him
105 the most popular person on the kernel mailing list. A single patch can 108 the most popular person on the kernel mailing list. A single patch can
106 be reasonably large as long as it still contains a single *logical* 109 be reasonably large as long as it still contains a single *logical*
107 change. 110 change.
108 111
109 - It can be tempting to add a whole new infrastructure with a series of 112 - It can be tempting to add a whole new infrastructure with a series of
110 patches, but to leave that infrastructure unused until the final patch 113 patches, but to leave that infrastructure unused until the final patch
@@ -162,7 +165,8 @@ To that end, the summary line should describe the effects of and motivation
162for the change as well as possible given the one-line constraint. The 165for the change as well as possible given the one-line constraint. The
163detailed description can then amplify on those topics and provide any 166detailed description can then amplify on those topics and provide any
164needed additional information. If the patch fixes a bug, cite the commit 167needed additional information. If the patch fixes a bug, cite the commit
165which introduced the bug if possible. If a problem is associated with 168which introduced the bug if possible (and please provide both the commit ID
169and the title when citing commits). If a problem is associated with
166specific log or compiler output, include that output to help others 170specific log or compiler output, include that output to help others
167searching for a solution to the same problem. If the change is meant to 171searching for a solution to the same problem. If the change is meant to
168support other changes coming in later patch, say so. If internal APIs are 172support other changes coming in later patch, say so. If internal APIs are
@@ -230,7 +234,7 @@ take care of:
230 which have had gratuitous white-space changes or line wrapping performed 234 which have had gratuitous white-space changes or line wrapping performed
231 by the mail client will not apply at the other end, and often will not 235 by the mail client will not apply at the other end, and often will not
232 be examined in any detail. If there is any doubt at all, mail the patch 236 be examined in any detail. If there is any doubt at all, mail the patch
233 to yourself and convince yourself that it shows up intact. 237 to yourself and convince yourself that it shows up intact.
234 238
235 Documentation/email-clients.txt has some helpful hints on making 239 Documentation/email-clients.txt has some helpful hints on making
236 specific mail clients work for sending patches. 240 specific mail clients work for sending patches.
@@ -287,7 +291,7 @@ something like:
287 291
288where "nn" is the ordinal number of the patch, "mm" is the total number of 292where "nn" is the ordinal number of the patch, "mm" is the total number of
289patches in the series, and "subsys" is the name of the affected subsystem. 293patches in the series, and "subsys" is the name of the affected subsystem.
290Clearly, nn/mm can be omitted for a single, standalone patch. 294Clearly, nn/mm can be omitted for a single, standalone patch.
291 295
292If you have a significant series of patches, it is customary to send an 296If you have a significant series of patches, it is customary to send an
293introductory description as part zero. This convention is not universally 297introductory description as part zero. This convention is not universally
@@ -299,5 +303,5 @@ In general, the second and following parts of a multi-part patch should be
299sent as a reply to the first part so that they all thread together at the 303sent as a reply to the first part so that they all thread together at the
300receiving end. Tools like git and quilt have commands to mail out a set of 304receiving end. Tools like git and quilt have commands to mail out a set of
301patches with the proper threading. If you have a long series, though, and 305patches with the proper threading. If you have a long series, though, and
302are using git, please provide the --no-chain-reply-to option to avoid 306are using git, please stay away from the --chain-reply-to option to avoid
303creating exceptionally deep nesting. 307creating exceptionally deep nesting.
diff --git a/Documentation/development-process/6.Followthrough b/Documentation/development-process/6.Followthrough
index a8fba3d83a85..41d324a9420d 100644
--- a/Documentation/development-process/6.Followthrough
+++ b/Documentation/development-process/6.Followthrough
@@ -66,6 +66,11 @@ be easy to become blinded by your own solution to a problem to the point
66that you don't realize that something is fundamentally wrong or, perhaps, 66that you don't realize that something is fundamentally wrong or, perhaps,
67you're not even solving the right problem. 67you're not even solving the right problem.
68 68
69Andrew Morton has suggested that every review comment which does not result
70in a code change should result in an additional code comment instead; that
71can help future reviewers avoid the questions which came up the first time
72around.
73
69One fatal mistake is to ignore review comments in the hope that they will 74One fatal mistake is to ignore review comments in the hope that they will
70go away. They will not go away. If you repost code without having 75go away. They will not go away. If you repost code without having
71responded to the comments you got the time before, you're likely to find 76responded to the comments you got the time before, you're likely to find
@@ -100,7 +105,7 @@ entry into a subsystem maintainer's tree. How that works varies from one
100subsystem to the next; each maintainer has his or her own way of doing 105subsystem to the next; each maintainer has his or her own way of doing
101things. In particular, there may be more than one tree - one, perhaps, 106things. In particular, there may be more than one tree - one, perhaps,
102dedicated to patches planned for the next merge window, and another for 107dedicated to patches planned for the next merge window, and another for
103longer-term work. 108longer-term work.
104 109
105For patches applying to areas for which there is no obvious subsystem tree 110For patches applying to areas for which there is no obvious subsystem tree
106(memory management patches, for example), the default tree often ends up 111(memory management patches, for example), the default tree often ends up
@@ -109,11 +114,10 @@ through the -mm tree.
109 114
110Inclusion into a subsystem tree can bring a higher level of visibility to a 115Inclusion into a subsystem tree can bring a higher level of visibility to a
111patch. Now other developers working with that tree will get the patch by 116patch. Now other developers working with that tree will get the patch by
112default. Subsystem trees typically feed into -mm and linux-next as well, 117default. Subsystem trees typically feed linux-next as well, making their
113making their contents visible to the development community as a whole. At 118contents visible to the development community as a whole. At this point,
114this point, there's a good chance that you will get more comments from a 119there's a good chance that you will get more comments from a new set of
115new set of reviewers; these comments need to be answered as in the previous 120reviewers; these comments need to be answered as in the previous round.
116round.
117 121
118What may also happen at this point, depending on the nature of your patch, 122What may also happen at this point, depending on the nature of your patch,
119is that conflicts with work being done by others turn up. In the worst 123is that conflicts with work being done by others turn up. In the worst
diff --git a/Documentation/development-process/7.AdvancedTopics b/Documentation/development-process/7.AdvancedTopics
index 837179447e17..26dc3fa196e4 100644
--- a/Documentation/development-process/7.AdvancedTopics
+++ b/Documentation/development-process/7.AdvancedTopics
@@ -119,7 +119,7 @@ can affect your ability to get trees pulled in the future. Quoting Linus:
119 to trust things *without* then having to go and check every 119 to trust things *without* then having to go and check every
120 individual change by hand. 120 individual change by hand.
121 121
122(http://lwn.net/Articles/224135/). 122(http://lwn.net/Articles/224135/).
123 123
124To avoid this kind of situation, ensure that all patches within a given 124To avoid this kind of situation, ensure that all patches within a given
125branch stick closely to the associated topic; a "driver fixes" branch 125branch stick closely to the associated topic; a "driver fixes" branch
@@ -138,7 +138,7 @@ When requesting a pull, be sure to give all the relevant information: where
138your tree is, what branch to pull, and what changes will result from the 138your tree is, what branch to pull, and what changes will result from the
139pull. The git request-pull command can be helpful in this regard; it will 139pull. The git request-pull command can be helpful in this regard; it will
140format the request as other developers expect, and will also check to be 140format the request as other developers expect, and will also check to be
141sure that you have remembered to push those changes to the public server. 141sure that you have remembered to push those changes to the public server.
142 142
143 143
1447.2: REVIEWING PATCHES 1447.2: REVIEWING PATCHES
diff --git a/Documentation/device-mapper/dm-flakey.txt b/Documentation/device-mapper/dm-flakey.txt
new file mode 100644
index 000000000000..c8efdfd19a65
--- /dev/null
+++ b/Documentation/device-mapper/dm-flakey.txt
@@ -0,0 +1,17 @@
1dm-flakey
2=========
3
4This target is the same as the linear target except that it returns I/O
5errors periodically. It's been found useful in simulating failing
6devices for testing purposes.
7
8Starting from the time the table is loaded, the device is available for
9<up interval> seconds, then returns errors for <down interval> seconds,
10and then this cycle repeats.
11
12Parameters: <dev path> <offset> <up interval> <down interval>
13 <dev path>: Full pathname to the underlying block-device, or a
14 "major:minor" device-number.
15 <offset>: Starting sector within the device.
16 <up interval>: Number of seconds device is available.
17 <down interval>: Number of seconds device returns errors.
diff --git a/Documentation/device-mapper/dm-service-time.txt b/Documentation/device-mapper/dm-service-time.txt
index 7d00668e97bb..fb1d4a0cf122 100644
--- a/Documentation/device-mapper/dm-service-time.txt
+++ b/Documentation/device-mapper/dm-service-time.txt
@@ -37,7 +37,7 @@ Algorithm
37========= 37=========
38 38
39dm-service-time adds the I/O size to 'in-flight-size' when the I/O is 39dm-service-time adds the I/O size to 'in-flight-size' when the I/O is
40dispatched and substracts when completed. 40dispatched and subtracts when completed.
41Basically, dm-service-time selects a path having minimum service time 41Basically, dm-service-time selects a path having minimum service time
42which is calculated by: 42which is calculated by:
43 43
diff --git a/Documentation/devicetree/bindings/fb/sm501fb.txt b/Documentation/devicetree/bindings/fb/sm501fb.txt
new file mode 100644
index 000000000000..9d9f0098092b
--- /dev/null
+++ b/Documentation/devicetree/bindings/fb/sm501fb.txt
@@ -0,0 +1,34 @@
1* SM SM501
2
3The SM SM501 is a LCD controller, with proper hardware, it can also
4drive DVI monitors.
5
6Required properties:
7- compatible : should be "smi,sm501".
8- reg : contain two entries:
9 - First entry: System Configuration register
10 - Second entry: IO space (Display Controller register)
11- interrupts : SMI interrupt to the cpu should be described here.
12- interrupt-parent : the phandle for the interrupt controller that
13 services interrupts for this device.
14
15Optional properties:
16- mode : select a video mode:
17 <xres>x<yres>[-<bpp>][@<refresh>]
18- edid : verbatim EDID data block describing attached display.
19 Data from the detailed timing descriptor will be used to
20 program the display controller.
21- little-endian: available on big endian systems, to
22 set different foreign endian.
23- big-endian: available on little endian systems, to
24 set different foreign endian.
25
26Example for MPC5200:
27 display@1,0 {
28 compatible = "smi,sm501";
29 reg = <1 0x00000000 0x00800000
30 1 0x03e00000 0x00200000>;
31 interrupts = <1 1 3>;
32 mode = "640x480-32@60";
33 edid = [edid-data];
34 };
diff --git a/Documentation/devicetree/bindings/hwmon/ads1015.txt b/Documentation/devicetree/bindings/hwmon/ads1015.txt
new file mode 100644
index 000000000000..918a507d1159
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/ads1015.txt
@@ -0,0 +1,73 @@
1ADS1015 (I2C)
2
3This device is a 12-bit A-D converter with 4 inputs.
4
5The inputs can be used single ended or in certain differential combinations.
6
7For configuration all possible combinations are mapped to 8 channels:
8 0: Voltage over AIN0 and AIN1.
9 1: Voltage over AIN0 and AIN3.
10 2: Voltage over AIN1 and AIN3.
11 3: Voltage over AIN2 and AIN3.
12 4: Voltage over AIN0 and GND.
13 5: Voltage over AIN1 and GND.
14 6: Voltage over AIN2 and GND.
15 7: Voltage over AIN3 and GND.
16
17Each channel can be configured individually:
18 - pga is the programmable gain amplifier (values are full scale)
19 0: +/- 6.144 V
20 1: +/- 4.096 V
21 2: +/- 2.048 V (default)
22 3: +/- 1.024 V
23 4: +/- 0.512 V
24 5: +/- 0.256 V
25 - data_rate in samples per second
26 0: 128
27 1: 250
28 2: 490
29 3: 920
30 4: 1600 (default)
31 5: 2400
32 6: 3300
33
341) The /ads1015 node
35
36 Required properties:
37
38 - compatible : must be "ti,ads1015"
39 - reg : I2C bus address of the device
40 - #address-cells : must be <1>
41 - #size-cells : must be <0>
42
43 The node contains child nodes for each channel that the platform uses.
44
45 Example ADS1015 node:
46
47 ads1015@49 {
48 compatible = "ti,ads1015";
49 reg = <0x49>;
50 #address-cells = <1>;
51 #size-cells = <0>;
52
53 [ child node definitions... ]
54 }
55
562) channel nodes
57
58 Required properties:
59
60 - reg : the channel number
61
62 Optional properties:
63
64 - ti,gain : the programmable gain amplifier setting
65 - ti,datarate : the converter data rate
66
67 Example ADS1015 channel node:
68
69 channel@4 {
70 reg = <4>;
71 ti,gain = <3>;
72 ti,datarate = <5>;
73 };
diff --git a/Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt b/Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt
index a48b2cadc7f0..00f1f546b32e 100644
--- a/Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt
+++ b/Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt
@@ -15,7 +15,7 @@ Optional properties:
15- gpios : may specify optional GPIOs connected to the Ready-Not-Busy pins 15- gpios : may specify optional GPIOs connected to the Ready-Not-Busy pins
16 (R/B#). For multi-chip devices, "n" GPIO definitions are required 16 (R/B#). For multi-chip devices, "n" GPIO definitions are required
17 according to the number of chips. 17 according to the number of chips.
18- chip-delay : chip dependent delay for transfering data from array to 18- chip-delay : chip dependent delay for transferring data from array to
19 read registers (tR). Required if property "gpios" is not used 19 read registers (tR). Required if property "gpios" is not used
20 (R/B# pins not connected). 20 (R/B# pins not connected).
21 21
diff --git a/Documentation/devicetree/bindings/net/can/sja1000.txt b/Documentation/devicetree/bindings/net/can/sja1000.txt
index d6d209ded937..c2dbcec0ee31 100644
--- a/Documentation/devicetree/bindings/net/can/sja1000.txt
+++ b/Documentation/devicetree/bindings/net/can/sja1000.txt
@@ -39,7 +39,7 @@ Optional properties:
39 39
40- nxp,no-comparator-bypass : Allows to disable the CAN input comperator. 40- nxp,no-comparator-bypass : Allows to disable the CAN input comperator.
41 41
42For futher information, please have a look to the SJA1000 data sheet. 42For further information, please have a look to the SJA1000 data sheet.
43 43
44Examples: 44Examples:
45 45
diff --git a/Documentation/devicetree/bindings/open-pic.txt b/Documentation/devicetree/bindings/open-pic.txt
new file mode 100644
index 000000000000..909a902dff85
--- /dev/null
+++ b/Documentation/devicetree/bindings/open-pic.txt
@@ -0,0 +1,98 @@
1* Open PIC Binding
2
3This binding specifies what properties must be available in the device tree
4representation of an Open PIC compliant interrupt controller. This binding is
5based on the binding defined for Open PIC in [1] and is a superset of that
6binding.
7
8Required properties:
9
10 NOTE: Many of these descriptions were paraphrased here from [1] to aid
11 readability.
12
13 - compatible: Specifies the compatibility list for the PIC. The type
14 shall be <string> and the value shall include "open-pic".
15
16 - reg: Specifies the base physical address(s) and size(s) of this
17 PIC's addressable register space. The type shall be <prop-encoded-array>.
18
19 - interrupt-controller: The presence of this property identifies the node
20 as an Open PIC. No property value shall be defined.
21
22 - #interrupt-cells: Specifies the number of cells needed to encode an
23 interrupt source. The type shall be a <u32> and the value shall be 2.
24
25 - #address-cells: Specifies the number of cells needed to encode an
26 address. The type shall be <u32> and the value shall be 0. As such,
27 'interrupt-map' nodes do not have to specify a parent unit address.
28
29Optional properties:
30
31 - pic-no-reset: The presence of this property indicates that the PIC
32 shall not be reset during runtime initialization. No property value shall
33 be defined. The presence of this property also mandates that any
34 initialization related to interrupt sources shall be limited to sources
35 explicitly referenced in the device tree.
36
37* Interrupt Specifier Definition
38
39 Interrupt specifiers consists of 2 cells encoded as
40 follows:
41
42 - <1st-cell>: The interrupt-number that identifies the interrupt source.
43
44 - <2nd-cell>: The level-sense information, encoded as follows:
45 0 = low-to-high edge triggered
46 1 = active low level-sensitive
47 2 = active high level-sensitive
48 3 = high-to-low edge triggered
49
50* Examples
51
52Example 1:
53
54 /*
55 * An Open PIC interrupt controller
56 */
57 mpic: pic@40000 {
58 // This is an interrupt controller node.
59 interrupt-controller;
60
61 // No address cells so that 'interrupt-map' nodes which reference
62 // this Open PIC node do not need a parent address specifier.
63 #address-cells = <0>;
64
65 // Two cells to encode interrupt sources.
66 #interrupt-cells = <2>;
67
68 // Offset address of 0x40000 and size of 0x40000.
69 reg = <0x40000 0x40000>;
70
71 // Compatible with Open PIC.
72 compatible = "open-pic";
73
74 // The PIC shall not be reset.
75 pic-no-reset;
76 };
77
78Example 2:
79
80 /*
81 * An interrupt generating device that is wired to an Open PIC.
82 */
83 serial0: serial@4500 {
84 // Interrupt source '42' that is active high level-sensitive.
85 // Note that there are only two cells as specified in the interrupt
86 // parent's '#interrupt-cells' property.
87 interrupts = <42 2>;
88
89 // The interrupt controller that this device is wired to.
90 interrupt-parent = <&mpic>;
91 };
92
93* References
94
95[1] Power.org (TM) Standard for Embedded Power Architecture (TM) Platform
96 Requirements (ePAPR), Version 1.0, July 2008.
97 (http://www.power.org/resources/downloads/Power_ePAPR_APPROVED_v1.0.pdf)
98
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt b/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt
index 8aa10f45ebe6..4f6145859aab 100644
--- a/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt
+++ b/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt
@@ -199,7 +199,7 @@ EXAMPLE 4
199 199
200EXAMPLE 5 200EXAMPLE 5
201 /* 201 /*
202 * Definition of an error interrupt (interupt type 1). 202 * Definition of an error interrupt (interrupt type 1).
203 * SoC interrupt number is 16 and the specific error 203 * SoC interrupt number is 16 and the specific error
204 * interrupt bit in the error interrupt summary register 204 * interrupt bit in the error interrupt summary register
205 * is 23. 205 * is 23.
diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
index 55fd2623445b..50619a0720a8 100644
--- a/Documentation/devicetree/booting-without-of.txt
+++ b/Documentation/devicetree/booting-without-of.txt
@@ -138,7 +138,7 @@ and properties to be present. This will be described in detail in
138section III, but, for example, the kernel does not require you to 138section III, but, for example, the kernel does not require you to
139create a node for every PCI device in the system. It is a requirement 139create a node for every PCI device in the system. It is a requirement
140to have a node for PCI host bridges in order to provide interrupt 140to have a node for PCI host bridges in order to provide interrupt
141routing informations and memory/IO ranges, among others. It is also 141routing information and memory/IO ranges, among others. It is also
142recommended to define nodes for on chip devices and other buses that 142recommended to define nodes for on chip devices and other buses that
143don't specifically fit in an existing OF specification. This creates a 143don't specifically fit in an existing OF specification. This creates a
144great flexibility in the way the kernel can then probe those and match 144great flexibility in the way the kernel can then probe those and match
@@ -385,7 +385,7 @@ struct boot_param_header {
385 among others, by kexec. If you are on an SMP system, this value 385 among others, by kexec. If you are on an SMP system, this value
386 should match the content of the "reg" property of the CPU node in 386 should match the content of the "reg" property of the CPU node in
387 the device-tree corresponding to the CPU calling the kernel entry 387 the device-tree corresponding to the CPU calling the kernel entry
388 point (see further chapters for more informations on the required 388 point (see further chapters for more information on the required
389 device-tree contents) 389 device-tree contents)
390 390
391 - size_dt_strings 391 - size_dt_strings
@@ -553,7 +553,7 @@ looks like in practice.
553 553
554This tree is almost a minimal tree. It pretty much contains the 554This tree is almost a minimal tree. It pretty much contains the
555minimal set of required nodes and properties to boot a linux kernel; 555minimal set of required nodes and properties to boot a linux kernel;
556that is, some basic model informations at the root, the CPUs, and the 556that is, some basic model information at the root, the CPUs, and the
557physical memory layout. It also includes misc information passed 557physical memory layout. It also includes misc information passed
558through /chosen, like in this example, the platform type (mandatory) 558through /chosen, like in this example, the platform type (mandatory)
559and the kernel command line arguments (optional). 559and the kernel command line arguments (optional).
diff --git a/Documentation/dvb/README.dvb-usb b/Documentation/dvb/README.dvb-usb
index c8238e44ed6b..c4d963a67d6f 100644
--- a/Documentation/dvb/README.dvb-usb
+++ b/Documentation/dvb/README.dvb-usb
@@ -138,7 +138,7 @@ Hotplug is able to load the driver, when it is needed (because you plugged
138in the device). 138in the device).
139 139
140If you want to enable debug output, you have to load the driver manually and 140If you want to enable debug output, you have to load the driver manually and
141from withing the dvb-kernel cvs repository. 141from within the dvb-kernel cvs repository.
142 142
143first have a look, which debug level are available: 143first have a look, which debug level are available:
144 144
diff --git a/Documentation/dvb/ci.txt b/Documentation/dvb/ci.txt
index 4a0c2b56e690..6c3bda50f7dc 100644
--- a/Documentation/dvb/ci.txt
+++ b/Documentation/dvb/ci.txt
@@ -47,7 +47,7 @@ so on.
47 47
48* CI modules that are supported 48* CI modules that are supported
49~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 49~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
50The CI module support is largely dependant upon the firmware on the cards 50The CI module support is largely dependent upon the firmware on the cards
51Some cards do support almost all of the available CI modules. There is 51Some cards do support almost all of the available CI modules. There is
52nothing much that can be done in order to make additional CI modules 52nothing much that can be done in order to make additional CI modules
53working with these cards. 53working with these cards.
diff --git a/Documentation/dvb/faq.txt b/Documentation/dvb/faq.txt
index 121832e5d899..97b1373f2428 100644
--- a/Documentation/dvb/faq.txt
+++ b/Documentation/dvb/faq.txt
@@ -106,7 +106,7 @@ Some very frequently asked questions about linuxtv-dvb
1065. The dvb_net device doesn't give me any packets at all 1065. The dvb_net device doesn't give me any packets at all
107 107
108 Run tcpdump on the dvb0_0 interface. This sets the interface 108 Run tcpdump on the dvb0_0 interface. This sets the interface
109 into promiscous mode so it accepts any packets from the PID 109 into promiscuous mode so it accepts any packets from the PID
110 you have configured with the dvbnet utility. Check if there 110 you have configured with the dvbnet utility. Check if there
111 are any packets with the IP addr and MAC addr you have 111 are any packets with the IP addr and MAC addr you have
112 configured with ifconfig. 112 configured with ifconfig.
diff --git a/Documentation/dvb/get_dvb_firmware b/Documentation/dvb/get_dvb_firmware
index 59690de8ebfe..3348d313fbe0 100644
--- a/Documentation/dvb/get_dvb_firmware
+++ b/Documentation/dvb/get_dvb_firmware
@@ -556,6 +556,9 @@ sub ngene {
556 my $hash1 = "d798d5a757121174f0dbc5f2833c0c85"; 556 my $hash1 = "d798d5a757121174f0dbc5f2833c0c85";
557 my $file2 = "ngene_17.fw"; 557 my $file2 = "ngene_17.fw";
558 my $hash2 = "26b687136e127b8ac24b81e0eeafc20b"; 558 my $hash2 = "26b687136e127b8ac24b81e0eeafc20b";
559 my $url2 = "http://l4m-daten.de/downloads/firmware/dvb-s2/linux/all/";
560 my $file3 = "ngene_18.fw";
561 my $hash3 = "ebce3ea769a53e3e0b0197c3b3f127e3";
559 562
560 checkstandard(); 563 checkstandard();
561 564
@@ -565,7 +568,10 @@ sub ngene {
565 wgetfile($file2, $url . $file2); 568 wgetfile($file2, $url . $file2);
566 verify($file2, $hash2); 569 verify($file2, $hash2);
567 570
568 "$file1, $file2"; 571 wgetfile($file3, $url2 . $file3);
572 verify($file3, $hash3);
573
574 "$file1, $file2, $file3";
569} 575}
570 576
571sub az6027{ 577sub az6027{
diff --git a/Documentation/dvb/lmedm04.txt b/Documentation/dvb/lmedm04.txt
index 641886504201..10b5f0411386 100644
--- a/Documentation/dvb/lmedm04.txt
+++ b/Documentation/dvb/lmedm04.txt
@@ -4,7 +4,7 @@ following file(s) to this directory.
4for DM04+/QQBOX LME2510C (Sharp 7395 Tuner) 4for DM04+/QQBOX LME2510C (Sharp 7395 Tuner)
5------------------------------------------- 5-------------------------------------------
6 6
7The Sharp 7395 driver can be found in windows/system32/driver 7The Sharp 7395 driver can be found in windows/system32/drivers
8 8
9US2A0D.sys (dated 17 Mar 2009) 9US2A0D.sys (dated 17 Mar 2009)
10 10
@@ -44,7 +44,7 @@ and run
44 44
45 45
46Other LG firmware can be extracted manually from US280D.sys 46Other LG firmware can be extracted manually from US280D.sys
47only found in windows/system32/driver. 47only found in windows/system32/drivers
48 48
49dd if=US280D.sys ibs=1 skip=42360 count=3924 of=dvb-usb-lme2510-lg.fw 49dd if=US280D.sys ibs=1 skip=42360 count=3924 of=dvb-usb-lme2510-lg.fw
50 50
@@ -55,4 +55,16 @@ dd if=US280D.sys ibs=1 skip=35200 count=3850 of=dvb-usb-lme2510c-lg.fw
55 55
56--------------------------------------------------------------------- 56---------------------------------------------------------------------
57 57
58The Sharp 0194 tuner driver can be found in windows/system32/drivers
59
60US290D.sys (dated 09 Apr 2009)
61
62For LME2510
63dd if=US290D.sys ibs=1 skip=36856 count=3976 of=dvb-usb-lme2510-s0194.fw
64
65
66For LME2510C
67dd if=US290D.sys ibs=1 skip=33152 count=3697 of=dvb-usb-lme2510c-s0194.fw
68
69
58Copy the firmware file(s) to /lib/firmware 70Copy the firmware file(s) to /lib/firmware
diff --git a/Documentation/dvb/udev.txt b/Documentation/dvb/udev.txt
index 68ee224b6aae..412305b7c557 100644
--- a/Documentation/dvb/udev.txt
+++ b/Documentation/dvb/udev.txt
@@ -1,7 +1,7 @@
1The DVB subsystem currently registers to the sysfs subsystem using the 1The DVB subsystem currently registers to the sysfs subsystem using the
2"class_simple" interface. 2"class_simple" interface.
3 3
4This means that only the basic informations like module loading parameters 4This means that only the basic information like module loading parameters
5are presented through sysfs. Other things that might be interesting are 5are presented through sysfs. Other things that might be interesting are
6currently *not* available. 6currently *not* available.
7 7
diff --git a/Documentation/dynamic-debug-howto.txt b/Documentation/dynamic-debug-howto.txt
index e6c4b757025b..f959909d7154 100644
--- a/Documentation/dynamic-debug-howto.txt
+++ b/Documentation/dynamic-debug-howto.txt
@@ -6,7 +6,7 @@ This document describes how to use the dynamic debug (ddebug) feature.
6 6
7Dynamic debug is designed to allow you to dynamically enable/disable kernel 7Dynamic debug is designed to allow you to dynamically enable/disable kernel
8code to obtain additional kernel information. Currently, if 8code to obtain additional kernel information. Currently, if
9CONFIG_DYNAMIC_DEBUG is set, then all pr_debug()/dev_debug() calls can be 9CONFIG_DYNAMIC_DEBUG is set, then all pr_debug()/dev_dbg() calls can be
10dynamically enabled per-callsite. 10dynamically enabled per-callsite.
11 11
12Dynamic debug has even more useful features: 12Dynamic debug has even more useful features:
@@ -26,7 +26,7 @@ Dynamic debug has even more useful features:
26Controlling dynamic debug Behaviour 26Controlling dynamic debug Behaviour
27=================================== 27===================================
28 28
29The behaviour of pr_debug()/dev_debug()s are controlled via writing to a 29The behaviour of pr_debug()/dev_dbg()s are controlled via writing to a
30control file in the 'debugfs' filesystem. Thus, you must first mount the debugfs 30control file in the 'debugfs' filesystem. Thus, you must first mount the debugfs
31filesystem, in order to make use of this feature. Subsequently, we refer to the 31filesystem, in order to make use of this feature. Subsequently, we refer to the
32control file as: <debugfs>/dynamic_debug/control. For example, if you want to 32control file as: <debugfs>/dynamic_debug/control. For example, if you want to
diff --git a/Documentation/edac.txt b/Documentation/edac.txt
index 9ee774de57cd..249822cde82b 100644
--- a/Documentation/edac.txt
+++ b/Documentation/edac.txt
@@ -311,7 +311,7 @@ Total Correctable Errors count attribute file:
311 'ce_noinfo_count' 311 'ce_noinfo_count'
312 312
313 This attribute file displays the number of CEs that 313 This attribute file displays the number of CEs that
314 have occurred wherewith no informations as to which DIMM slot 314 have occurred wherewith no information as to which DIMM slot
315 is having errors. Memory is handicapped, but operational, 315 is having errors. Memory is handicapped, but operational,
316 yet no information is available to indicate which slot 316 yet no information is available to indicate which slot
317 the failing memory is in. This count field should be also 317 the failing memory is in. This count field should be also
@@ -741,7 +741,7 @@ were done at i7core_edac driver. This chapter will cover those differences
741 As EDAC API maps the minimum unity is csrows, the driver sequencially 741 As EDAC API maps the minimum unity is csrows, the driver sequencially
742 maps channel/dimm into different csrows. 742 maps channel/dimm into different csrows.
743 743
744 For example, suposing the following layout: 744 For example, supposing the following layout:
745 Ch0 phy rd0, wr0 (0x063f4031): 2 ranks, UDIMMs 745 Ch0 phy rd0, wr0 (0x063f4031): 2 ranks, UDIMMs
746 dimm 0 1024 Mb offset: 0, bank: 8, rank: 1, row: 0x4000, col: 0x400 746 dimm 0 1024 Mb offset: 0, bank: 8, rank: 1, row: 0x4000, col: 0x400
747 dimm 1 1024 Mb offset: 4, bank: 8, rank: 1, row: 0x4000, col: 0x400 747 dimm 1 1024 Mb offset: 4, bank: 8, rank: 1, row: 0x4000, col: 0x400
diff --git a/Documentation/eisa.txt b/Documentation/eisa.txt
index f297fc1202ae..38cf0c7b559f 100644
--- a/Documentation/eisa.txt
+++ b/Documentation/eisa.txt
@@ -84,7 +84,7 @@ struct eisa_driver {
84 84
85id_table : an array of NULL terminated EISA id strings, 85id_table : an array of NULL terminated EISA id strings,
86 followed by an empty string. Each string can 86 followed by an empty string. Each string can
87 optionally be paired with a driver-dependant value 87 optionally be paired with a driver-dependent value
88 (driver_data). 88 (driver_data).
89 89
90driver : a generic driver, such as described in 90driver : a generic driver, such as described in
diff --git a/Documentation/fb/sm501.txt b/Documentation/fb/sm501.txt
new file mode 100644
index 000000000000..8d17aebd2648
--- /dev/null
+++ b/Documentation/fb/sm501.txt
@@ -0,0 +1,10 @@
1Configuration:
2
3You can pass the following kernel command line options to sm501 videoframebuffer:
4
5 sm501fb.bpp= SM501 Display driver:
6 Specifiy bits-per-pixel if not specified by 'mode'
7
8 sm501fb.mode= SM501 Display driver:
9 Specify resolution as
10 "<xres>x<yres>[-<bpp>][@<refresh>]"
diff --git a/Documentation/fb/viafb.txt b/Documentation/fb/viafb.txt
index 1a2e8aa3fbb1..444e34b52ae1 100644
--- a/Documentation/fb/viafb.txt
+++ b/Documentation/fb/viafb.txt
@@ -204,7 +204,7 @@ Notes:
204 204
205 supported_output_devices 205 supported_output_devices
206 206
207 This read-only file contains a full ',' seperated list containing all 207 This read-only file contains a full ',' separated list containing all
208 output devices that could be available on your platform. It is likely 208 output devices that could be available on your platform. It is likely
209 that not all of those have a connector on your hardware but it should 209 that not all of those have a connector on your hardware but it should
210 provide a good starting point to figure out which of those names match 210 provide a good starting point to figure out which of those names match
@@ -225,7 +225,7 @@ Notes:
225 This can happen for example if only one (the other) iga is used. 225 This can happen for example if only one (the other) iga is used.
226 Writing to these files allows adjusting the output devices during 226 Writing to these files allows adjusting the output devices during
227 runtime. One can add new devices, remove existing ones or switch 227 runtime. One can add new devices, remove existing ones or switch
228 between igas. Essentially you can write a ',' seperated list of device 228 between igas. Essentially you can write a ',' separated list of device
229 names (or a single one) in the same format as the output to those 229 names (or a single one) in the same format as the output to those
230 files. You can add a '+' or '-' as a prefix allowing simple addition 230 files. You can add a '+' or '-' as a prefix allowing simple addition
231 and removal of devices. So a prefix '+' adds the devices from your list 231 and removal of devices. So a prefix '+' adds the devices from your list
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index f487c6918d78..492e81df2968 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -108,42 +108,6 @@ Who: Pavel Machek <pavel@ucw.cz>
108 108
109--------------------------- 109---------------------------
110 110
111What: Video4Linux obsolete drivers using V4L1 API
112When: kernel 2.6.39
113Files: drivers/staging/se401/* drivers/staging/usbvideo/*
114Check: drivers/staging/se401/se401.c drivers/staging/usbvideo/usbvideo.c
115Why: There are some drivers still using V4L1 API, despite all efforts we've done
116 to migrate. Those drivers are for obsolete hardware that the old maintainer
117 didn't care (or not have the hardware anymore), and that no other developer
118 could find any hardware to buy. They probably have no practical usage today,
119 and people with such old hardware could probably keep using an older version
120 of the kernel. Those drivers will be moved to staging on 2.6.38 and, if nobody
121 cares enough to port and test them with V4L2 API, they'll be removed on 2.6.39.
122Who: Mauro Carvalho Chehab <mchehab@infradead.org>
123
124---------------------------
125
126What: Video4Linux: Remove obsolete ioctl's
127When: kernel 2.6.39
128Files: include/media/videodev2.h
129Why: Some ioctl's were defined wrong on 2.6.2 and 2.6.6, using the wrong
130 type of R/W arguments. They were fixed, but the old ioctl names are
131 still there, maintained to avoid breaking binary compatibility:
132 #define VIDIOC_OVERLAY_OLD _IOWR('V', 14, int)
133 #define VIDIOC_S_PARM_OLD _IOW('V', 22, struct v4l2_streamparm)
134 #define VIDIOC_S_CTRL_OLD _IOW('V', 28, struct v4l2_control)
135 #define VIDIOC_G_AUDIO_OLD _IOWR('V', 33, struct v4l2_audio)
136 #define VIDIOC_G_AUDOUT_OLD _IOWR('V', 49, struct v4l2_audioout)
137 #define VIDIOC_CROPCAP_OLD _IOR('V', 58, struct v4l2_cropcap)
138 There's no sense on preserving those forever, as it is very doubtful
139 that someone would try to use a such old binary with a modern kernel.
140 Removing them will allow us to remove some magic done at the V4L ioctl
141 handler.
142
143Who: Mauro Carvalho Chehab <mchehab@infradead.org>
144
145---------------------------
146
147What: sys_sysctl 111What: sys_sysctl
148When: September 2010 112When: September 2010
149Option: CONFIG_SYSCTL_SYSCALL 113Option: CONFIG_SYSCTL_SYSCALL
@@ -270,14 +234,6 @@ Who: Zhang Rui <rui.zhang@intel.com>
270 234
271--------------------------- 235---------------------------
272 236
273What: /proc/acpi/button
274When: August 2007
275Why: /proc/acpi/button has been replaced by events to the input layer
276 since 2.6.20.
277Who: Len Brown <len.brown@intel.com>
278
279---------------------------
280
281What: /proc/acpi/event 237What: /proc/acpi/event
282When: February 2008 238When: February 2008
283Why: /proc/acpi/event has been replaced by events via the input layer 239Why: /proc/acpi/event has been replaced by events via the input layer
@@ -431,26 +387,6 @@ Who: Tejun Heo <tj@kernel.org>
431 387
432---------------------------- 388----------------------------
433 389
434What: Support for lcd_switch and display_get in asus-laptop driver
435When: March 2010
436Why: These two features use non-standard interfaces. There are the
437 only features that really need multiple path to guess what's
438 the right method name on a specific laptop.
439
440 Removing them will allow to remove a lot of code an significantly
441 clean the drivers.
442
443 This will affect the backlight code which won't be able to know
444 if the backlight is on or off. The platform display file will also be
445 write only (like the one in eeepc-laptop).
446
447 This should'nt affect a lot of user because they usually know
448 when their display is on or off.
449
450Who: Corentin Chary <corentin.chary@gmail.com>
451
452----------------------------
453
454What: sysfs-class-rfkill state file 390What: sysfs-class-rfkill state file
455When: Feb 2014 391When: Feb 2014
456Files: net/rfkill/core.c 392Files: net/rfkill/core.c
@@ -585,16 +521,6 @@ Who: NeilBrown <neilb@suse.de>
585 521
586---------------------------- 522----------------------------
587 523
588What: i2c_adapter.id
589When: June 2011
590Why: This field is deprecated. I2C device drivers shouldn't change their
591 behavior based on the underlying I2C adapter. Instead, the I2C
592 adapter driver should instantiate the I2C devices and provide the
593 needed platform-specific information.
594Who: Jean Delvare <khali@linux-fr.org>
595
596----------------------------
597
598What: cancel_rearming_delayed_work[queue]() 524What: cancel_rearming_delayed_work[queue]()
599When: 2.6.39 525When: 2.6.39
600 526
@@ -645,3 +571,12 @@ Who: Florian Westphal <fw@strlen.de>
645Files: include/linux/netfilter_ipv4/ipt_addrtype.h 571Files: include/linux/netfilter_ipv4/ipt_addrtype.h
646 572
647---------------------------- 573----------------------------
574
575What: i2c_driver.attach_adapter
576 i2c_driver.detach_adapter
577When: September 2011
578Why: These legacy callbacks should no longer be used as i2c-core offers
579 a variety of preferable alternative ways to instantiate I2C devices.
580Who: Jean Delvare <khali@linux-fr.org>
581
582----------------------------
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index 2e994efe12cb..61b31acb9176 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -128,7 +128,7 @@ alloc_inode:
128destroy_inode: 128destroy_inode:
129dirty_inode: (must not sleep) 129dirty_inode: (must not sleep)
130write_inode: 130write_inode:
131drop_inode: !!!inode_lock!!! 131drop_inode: !!!inode->i_lock!!!
132evict_inode: 132evict_inode:
133put_super: write 133put_super: write
134write_super: read 134write_super: read
diff --git a/Documentation/filesystems/adfs.txt b/Documentation/filesystems/adfs.txt
index 9e8811f92b84..5949766353f7 100644
--- a/Documentation/filesystems/adfs.txt
+++ b/Documentation/filesystems/adfs.txt
@@ -9,6 +9,9 @@ Mount options for ADFS
9 will be nnn. Default 0700. 9 will be nnn. Default 0700.
10 othmask=nnn The permission mask for ADFS 'other' permissions 10 othmask=nnn The permission mask for ADFS 'other' permissions
11 will be nnn. Default 0077. 11 will be nnn. Default 0077.
12 ftsuffix=n When ftsuffix=0, no file type suffix will be applied.
13 When ftsuffix=1, a hexadecimal suffix corresponding to
14 the RISC OS file type will be added. Default 0.
12 15
13Mapping of ADFS permissions to Linux permissions 16Mapping of ADFS permissions to Linux permissions
14------------------------------------------------ 17------------------------------------------------
@@ -55,3 +58,18 @@ Mapping of ADFS permissions to Linux permissions
55 58
56 You can therefore tailor the permission translation to whatever you 59 You can therefore tailor the permission translation to whatever you
57 desire the permissions should be under Linux. 60 desire the permissions should be under Linux.
61
62RISC OS file type suffix
63------------------------
64
65 RISC OS file types are stored in bits 19..8 of the file load address.
66
67 To enable non-RISC OS systems to be used to store files without losing
68 file type information, a file naming convention was devised (initially
69 for use with NFS) such that a hexadecimal suffix of the form ,xyz
70 denoted the file type: e.g. BasicFile,ffb is a BASIC (0xffb) file. This
71 naming convention is now also used by RISC OS emulators such as RPCEmu.
72
73 Mounting an ADFS disc with option ftsuffix=1 will cause appropriate file
74 type suffixes to be appended to file names read from a directory. If the
75 ftsuffix option is zero or omitted, no file type suffixes will be added.
diff --git a/Documentation/filesystems/autofs4-mount-control.txt b/Documentation/filesystems/autofs4-mount-control.txt
index 51986bf08a4d..4c95935cbcf4 100644
--- a/Documentation/filesystems/autofs4-mount-control.txt
+++ b/Documentation/filesystems/autofs4-mount-control.txt
@@ -309,7 +309,7 @@ ioctlfd field set to the descriptor obtained from the open call.
309AUTOFS_DEV_IOCTL_TIMEOUT_CMD 309AUTOFS_DEV_IOCTL_TIMEOUT_CMD
310---------------------------- 310----------------------------
311 311
312Set the expire timeout for mounts withing an autofs mount point. 312Set the expire timeout for mounts within an autofs mount point.
313 313
314The call requires an initialized struct autofs_dev_ioctl with the 314The call requires an initialized struct autofs_dev_ioctl with the
315ioctlfd field set to the descriptor obtained from the open call. 315ioctlfd field set to the descriptor obtained from the open call.
diff --git a/Documentation/filesystems/caching/netfs-api.txt b/Documentation/filesystems/caching/netfs-api.txt
index 1902c57b72ef..a167ab876c35 100644
--- a/Documentation/filesystems/caching/netfs-api.txt
+++ b/Documentation/filesystems/caching/netfs-api.txt
@@ -95,7 +95,7 @@ restraints as possible on how an index is structured and where it is placed in
95the tree. The netfs can even mix indices and data files at the same level, but 95the tree. The netfs can even mix indices and data files at the same level, but
96it's not recommended. 96it's not recommended.
97 97
98Each index entry consists of a key of indeterminate length plus some auxilliary 98Each index entry consists of a key of indeterminate length plus some auxiliary
99data, also of indeterminate length. 99data, also of indeterminate length.
100 100
101There are some limits on indices: 101There are some limits on indices:
@@ -203,23 +203,23 @@ This has the following fields:
203 203
204 If the function is absent, a file size of 0 is assumed. 204 If the function is absent, a file size of 0 is assumed.
205 205
206 (6) A function to retrieve auxilliary data from the netfs [optional]. 206 (6) A function to retrieve auxiliary data from the netfs [optional].
207 207
208 This function will be called with the netfs data that was passed to the 208 This function will be called with the netfs data that was passed to the
209 cookie acquisition function and the maximum length of auxilliary data that 209 cookie acquisition function and the maximum length of auxiliary data that
210 it may provide. It should write the auxilliary data into the given buffer 210 it may provide. It should write the auxiliary data into the given buffer
211 and return the quantity it wrote. 211 and return the quantity it wrote.
212 212
213 If this function is absent, the auxilliary data length will be set to 0. 213 If this function is absent, the auxiliary data length will be set to 0.
214 214
215 The length of the auxilliary data buffer may be dependent on the key 215 The length of the auxiliary data buffer may be dependent on the key
216 length. A netfs mustn't rely on being able to provide more than 400 bytes 216 length. A netfs mustn't rely on being able to provide more than 400 bytes
217 for both. 217 for both.
218 218
219 (7) A function to check the auxilliary data [optional]. 219 (7) A function to check the auxiliary data [optional].
220 220
221 This function will be called to check that a match found in the cache for 221 This function will be called to check that a match found in the cache for
222 this object is valid. For instance with AFS it could check the auxilliary 222 this object is valid. For instance with AFS it could check the auxiliary
223 data against the data version number returned by the server to determine 223 data against the data version number returned by the server to determine
224 whether the index entry in a cache is still valid. 224 whether the index entry in a cache is still valid.
225 225
@@ -232,7 +232,7 @@ This has the following fields:
232 (*) FSCACHE_CHECKAUX_NEEDS_UPDATE - the entry requires update 232 (*) FSCACHE_CHECKAUX_NEEDS_UPDATE - the entry requires update
233 (*) FSCACHE_CHECKAUX_OBSOLETE - the entry should be deleted 233 (*) FSCACHE_CHECKAUX_OBSOLETE - the entry should be deleted
234 234
235 This function can also be used to extract data from the auxilliary data in 235 This function can also be used to extract data from the auxiliary data in
236 the cache and copy it into the netfs's structures. 236 the cache and copy it into the netfs's structures.
237 237
238 (8) A pair of functions to manage contexts for the completion callback 238 (8) A pair of functions to manage contexts for the completion callback
diff --git a/Documentation/filesystems/configfs/configfs.txt b/Documentation/filesystems/configfs/configfs.txt
index fabcb0e00f25..dd57bb6bb390 100644
--- a/Documentation/filesystems/configfs/configfs.txt
+++ b/Documentation/filesystems/configfs/configfs.txt
@@ -409,7 +409,7 @@ As a consequence of this, default_groups cannot be removed directly via
409rmdir(2). They also are not considered when rmdir(2) on the parent 409rmdir(2). They also are not considered when rmdir(2) on the parent
410group is checking for children. 410group is checking for children.
411 411
412[Dependant Subsystems] 412[Dependent Subsystems]
413 413
414Sometimes other drivers depend on particular configfs items. For 414Sometimes other drivers depend on particular configfs items. For
415example, ocfs2 mounts depend on a heartbeat region item. If that 415example, ocfs2 mounts depend on a heartbeat region item. If that
diff --git a/Documentation/filesystems/exofs.txt b/Documentation/filesystems/exofs.txt
index abd2a9b5b787..23583a136975 100644
--- a/Documentation/filesystems/exofs.txt
+++ b/Documentation/filesystems/exofs.txt
@@ -104,7 +104,15 @@ Where:
104 exofs specific options: Options are separated by commas (,) 104 exofs specific options: Options are separated by commas (,)
105 pid=<integer> - The partition number to mount/create as 105 pid=<integer> - The partition number to mount/create as
106 container of the filesystem. 106 container of the filesystem.
107 This option is mandatory. 107 This option is mandatory. integer can be
108 Hex by pre-pending an 0x to the number.
109 osdname=<id> - Mount by a device's osdname.
110 osdname is usually a 36 character uuid of the
111 form "d2683732-c906-4ee1-9dbd-c10c27bb40df".
112 It is one of the device's uuid specified in the
113 mkfs.exofs format command.
114 If this option is specified then the /dev/osdX
115 above can be empty and is ignored.
108 to=<integer> - Timeout in ticks for a single command. 116 to=<integer> - Timeout in ticks for a single command.
109 default is (60 * HZ) [for debugging only] 117 default is (60 * HZ) [for debugging only]
110 118
diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt
index 6ab9442d7eeb..c79ec58fd7f6 100644
--- a/Documentation/filesystems/ext4.txt
+++ b/Documentation/filesystems/ext4.txt
@@ -97,7 +97,7 @@ Note: More extensive information for getting started with ext4 can be
97* Inode allocation using large virtual block groups via flex_bg 97* Inode allocation using large virtual block groups via flex_bg
98* delayed allocation 98* delayed allocation
99* large block (up to pagesize) support 99* large block (up to pagesize) support
100* efficent new ordered mode in JBD2 and ext4(avoid using buffer head to force 100* efficient new ordered mode in JBD2 and ext4(avoid using buffer head to force
101 the ordering) 101 the ordering)
102 102
103[1] Filesystems with a block size of 1k may see a limit imposed by the 103[1] Filesystems with a block size of 1k may see a limit imposed by the
@@ -106,7 +106,7 @@ directory hash tree having a maximum depth of two.
1062.2 Candidate features for future inclusion 1062.2 Candidate features for future inclusion
107 107
108* Online defrag (patches available but not well tested) 108* Online defrag (patches available but not well tested)
109* reduced mke2fs time via lazy itable initialization in conjuction with 109* reduced mke2fs time via lazy itable initialization in conjunction with
110 the uninit_bg feature (capability to do this is available in e2fsprogs 110 the uninit_bg feature (capability to do this is available in e2fsprogs
111 but a kernel thread to do lazy zeroing of unused inode table blocks 111 but a kernel thread to do lazy zeroing of unused inode table blocks
112 after filesystem is first mounted is required for safety) 112 after filesystem is first mounted is required for safety)
@@ -367,12 +367,47 @@ init_itable=n The lazy itable init code will wait n times the
367 minimizes the impact on the systme performance 367 minimizes the impact on the systme performance
368 while file system's inode table is being initialized. 368 while file system's inode table is being initialized.
369 369
370discard Controls whether ext4 should issue discard/TRIM 370discard Controls whether ext4 should issue discard/TRIM
371nodiscard(*) commands to the underlying block device when 371nodiscard(*) commands to the underlying block device when
372 blocks are freed. This is useful for SSD devices 372 blocks are freed. This is useful for SSD devices
373 and sparse/thinly-provisioned LUNs, but it is off 373 and sparse/thinly-provisioned LUNs, but it is off
374 by default until sufficient testing has been done. 374 by default until sufficient testing has been done.
375 375
376nouid32 Disables 32-bit UIDs and GIDs. This is for
377 interoperability with older kernels which only
378 store and expect 16-bit values.
379
380resize Allows to resize filesystem to the end of the last
381 existing block group, further resize has to be done
382 with resize2fs either online, or offline. It can be
383 used only with conjunction with remount.
384
385block_validity This options allows to enables/disables the in-kernel
386noblock_validity facility for tracking filesystem metadata blocks
387 within internal data structures. This allows multi-
388 block allocator and other routines to quickly locate
389 extents which might overlap with filesystem metadata
390 blocks. This option is intended for debugging
391 purposes and since it negatively affects the
392 performance, it is off by default.
393
394dioread_lock Controls whether or not ext4 should use the DIO read
395dioread_nolock locking. If the dioread_nolock option is specified
396 ext4 will allocate uninitialized extent before buffer
397 write and convert the extent to initialized after IO
398 completes. This approach allows ext4 code to avoid
399 using inode mutex, which improves scalability on high
400 speed storages. However this does not work with nobh
401 option and the mount will fail. Nor does it work with
402 data journaling and dioread_nolock option will be
403 ignored with kernel warning. Note that dioread_nolock
404 code path is only used for extent-based files.
405 Because of the restrictions this options comprises
406 it is off by default (e.g. dioread_lock).
407
408i_version Enable 64-bit inode version support. This option is
409 off by default.
410
376Data Mode 411Data Mode
377========= 412=========
378There are 3 different data modes: 413There are 3 different data modes:
@@ -400,6 +435,176 @@ needs to be read from and written to disk at the same time where it
400outperforms all others modes. Currently ext4 does not have delayed 435outperforms all others modes. Currently ext4 does not have delayed
401allocation support if this data journalling mode is selected. 436allocation support if this data journalling mode is selected.
402 437
438/proc entries
439=============
440
441Information about mounted ext4 file systems can be found in
442/proc/fs/ext4. Each mounted filesystem will have a directory in
443/proc/fs/ext4 based on its device name (i.e., /proc/fs/ext4/hdc or
444/proc/fs/ext4/dm-0). The files in each per-device directory are shown
445in table below.
446
447Files in /proc/fs/ext4/<devname>
448..............................................................................
449 File Content
450 mb_groups details of multiblock allocator buddy cache of free blocks
451..............................................................................
452
453/sys entries
454============
455
456Information about mounted ext4 file systems can be found in
457/sys/fs/ext4. Each mounted filesystem will have a directory in
458/sys/fs/ext4 based on its device name (i.e., /sys/fs/ext4/hdc or
459/sys/fs/ext4/dm-0). The files in each per-device directory are shown
460in table below.
461
462Files in /sys/fs/ext4/<devname>
463(see also Documentation/ABI/testing/sysfs-fs-ext4)
464..............................................................................
465 File Content
466
467 delayed_allocation_blocks This file is read-only and shows the number of
468 blocks that are dirty in the page cache, but
469 which do not have their location in the
470 filesystem allocated yet.
471
472 inode_goal Tuning parameter which (if non-zero) controls
473 the goal inode used by the inode allocator in
474 preference to all other allocation heuristics.
475 This is intended for debugging use only, and
476 should be 0 on production systems.
477
478 inode_readahead_blks Tuning parameter which controls the maximum
479 number of inode table blocks that ext4's inode
480 table readahead algorithm will pre-read into
481 the buffer cache
482
483 lifetime_write_kbytes This file is read-only and shows the number of
484 kilobytes of data that have been written to this
485 filesystem since it was created.
486
487 max_writeback_mb_bump The maximum number of megabytes the writeback
488 code will try to write out before move on to
489 another inode.
490
491 mb_group_prealloc The multiblock allocator will round up allocation
492 requests to a multiple of this tuning parameter if
493 the stripe size is not set in the ext4 superblock
494
495 mb_max_to_scan The maximum number of extents the multiblock
496 allocator will search to find the best extent
497
498 mb_min_to_scan The minimum number of extents the multiblock
499 allocator will search to find the best extent
500
501 mb_order2_req Tuning parameter which controls the minimum size
502 for requests (as a power of 2) where the buddy
503 cache is used
504
505 mb_stats Controls whether the multiblock allocator should
506 collect statistics, which are shown during the
507 unmount. 1 means to collect statistics, 0 means
508 not to collect statistics
509
510 mb_stream_req Files which have fewer blocks than this tunable
511 parameter will have their blocks allocated out
512 of a block group specific preallocation pool, so
513 that small files are packed closely together.
514 Each large file will have its blocks allocated
515 out of its own unique preallocation pool.
516
517 session_write_kbytes This file is read-only and shows the number of
518 kilobytes of data that have been written to this
519 filesystem since it was mounted.
520..............................................................................
521
522Ioctls
523======
524
525There is some Ext4 specific functionality which can be accessed by applications
526through the system call interfaces. The list of all Ext4 specific ioctls are
527shown in the table below.
528
529Table of Ext4 specific ioctls
530..............................................................................
531 Ioctl Description
532 EXT4_IOC_GETFLAGS Get additional attributes associated with inode.
533 The ioctl argument is an integer bitfield, with
534 bit values described in ext4.h. This ioctl is an
535 alias for FS_IOC_GETFLAGS.
536
537 EXT4_IOC_SETFLAGS Set additional attributes associated with inode.
538 The ioctl argument is an integer bitfield, with
539 bit values described in ext4.h. This ioctl is an
540 alias for FS_IOC_SETFLAGS.
541
542 EXT4_IOC_GETVERSION
543 EXT4_IOC_GETVERSION_OLD
544 Get the inode i_generation number stored for
545 each inode. The i_generation number is normally
546 changed only when new inode is created and it is
547 particularly useful for network filesystems. The
548 '_OLD' version of this ioctl is an alias for
549 FS_IOC_GETVERSION.
550
551 EXT4_IOC_SETVERSION
552 EXT4_IOC_SETVERSION_OLD
553 Set the inode i_generation number stored for
554 each inode. The '_OLD' version of this ioctl
555 is an alias for FS_IOC_SETVERSION.
556
557 EXT4_IOC_GROUP_EXTEND This ioctl has the same purpose as the resize
558 mount option. It allows to resize filesystem
559 to the end of the last existing block group,
560 further resize has to be done with resize2fs,
561 either online, or offline. The argument points
562 to the unsigned logn number representing the
563 filesystem new block count.
564
565 EXT4_IOC_MOVE_EXT Move the block extents from orig_fd (the one
566 this ioctl is pointing to) to the donor_fd (the
567 one specified in move_extent structure passed
568 as an argument to this ioctl). Then, exchange
569 inode metadata between orig_fd and donor_fd.
570 This is especially useful for online
571 defragmentation, because the allocator has the
572 opportunity to allocate moved blocks better,
573 ideally into one contiguous extent.
574
575 EXT4_IOC_GROUP_ADD Add a new group descriptor to an existing or
576 new group descriptor block. The new group
577 descriptor is described by ext4_new_group_input
578 structure, which is passed as an argument to
579 this ioctl. This is especially useful in
580 conjunction with EXT4_IOC_GROUP_EXTEND,
581 which allows online resize of the filesystem
582 to the end of the last existing block group.
583 Those two ioctls combined is used in userspace
584 online resize tool (e.g. resize2fs).
585
586 EXT4_IOC_MIGRATE This ioctl operates on the filesystem itself.
587 It converts (migrates) ext3 indirect block mapped
588 inode to ext4 extent mapped inode by walking
589 through indirect block mapping of the original
590 inode and converting contiguous block ranges
591 into ext4 extents of the temporary inode. Then,
592 inodes are swapped. This ioctl might help, when
593 migrating from ext3 to ext4 filesystem, however
594 suggestion is to create fresh ext4 filesystem
595 and copy data from the backup. Note, that
596 filesystem has to support extents for this ioctl
597 to work.
598
599 EXT4_IOC_ALLOC_DA_BLKS Force all of the delay allocated blocks to be
600 allocated to preserve application-expected ext3
601 behaviour. Note that this will also start
602 triggering a write of the data blocks, but this
603 behaviour may change in the future as it is
604 not necessary and has been done this way only
605 for sake of simplicity.
606..............................................................................
607
403References 608References
404========== 609==========
405 610
diff --git a/Documentation/filesystems/gfs2-uevents.txt b/Documentation/filesystems/gfs2-uevents.txt
index fd966dc9979a..d81889669293 100644
--- a/Documentation/filesystems/gfs2-uevents.txt
+++ b/Documentation/filesystems/gfs2-uevents.txt
@@ -62,7 +62,7 @@ be fixed.
62 62
63The REMOVE uevent is generated at the end of an unsuccessful mount 63The REMOVE uevent is generated at the end of an unsuccessful mount
64or at the end of a umount of the filesystem. All REMOVE uevents will 64or at the end of a umount of the filesystem. All REMOVE uevents will
65have been preceeded by at least an ADD uevent for the same fileystem, 65have been preceded by at least an ADD uevent for the same fileystem,
66and unlike the other uevents is generated automatically by the kernel's 66and unlike the other uevents is generated automatically by the kernel's
67kobject subsystem. 67kobject subsystem.
68 68
diff --git a/Documentation/filesystems/gfs2.txt b/Documentation/filesystems/gfs2.txt
index 0b59c0200912..4cda926628aa 100644
--- a/Documentation/filesystems/gfs2.txt
+++ b/Documentation/filesystems/gfs2.txt
@@ -11,7 +11,7 @@ their I/O so file system consistency is maintained. One of the nifty
11features of GFS is perfect consistency -- changes made to the file system 11features of GFS is perfect consistency -- changes made to the file system
12on one machine show up immediately on all other machines in the cluster. 12on one machine show up immediately on all other machines in the cluster.
13 13
14GFS uses interchangable inter-node locking mechanisms, the currently 14GFS uses interchangeable inter-node locking mechanisms, the currently
15supported mechanisms are: 15supported mechanisms are:
16 16
17 lock_nolock -- allows gfs to be used as a local file system 17 lock_nolock -- allows gfs to be used as a local file system
diff --git a/Documentation/filesystems/ntfs.txt b/Documentation/filesystems/ntfs.txt
index 933bc66ccff1..791af8dac065 100644
--- a/Documentation/filesystems/ntfs.txt
+++ b/Documentation/filesystems/ntfs.txt
@@ -350,7 +350,7 @@ Note the "Should sync?" parameter "nosync" means that the two mirrors are
350already in sync which will be the case on a clean shutdown of Windows. If the 350already in sync which will be the case on a clean shutdown of Windows. If the
351mirrors are not clean, you can specify the "sync" option instead of "nosync" 351mirrors are not clean, you can specify the "sync" option instead of "nosync"
352and the Device-Mapper driver will then copy the entirety of the "Source Device" 352and the Device-Mapper driver will then copy the entirety of the "Source Device"
353to the "Target Device" or if you specified multipled target devices to all of 353to the "Target Device" or if you specified multiple target devices to all of
354them. 354them.
355 355
356Once you have your table, save it in a file somewhere (e.g. /etc/ntfsvolume1), 356Once you have your table, save it in a file somewhere (e.g. /etc/ntfsvolume1),
diff --git a/Documentation/filesystems/ocfs2.txt b/Documentation/filesystems/ocfs2.txt
index 5393e6611691..9ed920a8cd79 100644
--- a/Documentation/filesystems/ocfs2.txt
+++ b/Documentation/filesystems/ocfs2.txt
@@ -80,7 +80,7 @@ user_xattr (*) Enables Extended User Attributes.
80nouser_xattr Disables Extended User Attributes. 80nouser_xattr Disables Extended User Attributes.
81acl Enables POSIX Access Control Lists support. 81acl Enables POSIX Access Control Lists support.
82noacl (*) Disables POSIX Access Control Lists support. 82noacl (*) Disables POSIX Access Control Lists support.
83resv_level=2 (*) Set how agressive allocation reservations will be. 83resv_level=2 (*) Set how aggressive allocation reservations will be.
84 Valid values are between 0 (reservations off) to 8 84 Valid values are between 0 (reservations off) to 8
85 (maximum space for reservations). 85 (maximum space for reservations).
86dir_resv_level= (*) By default, directory reservations will scale with file 86dir_resv_level= (*) By default, directory reservations will scale with file
diff --git a/Documentation/filesystems/path-lookup.txt b/Documentation/filesystems/path-lookup.txt
index eb59c8b44be9..3571667c7105 100644
--- a/Documentation/filesystems/path-lookup.txt
+++ b/Documentation/filesystems/path-lookup.txt
@@ -42,7 +42,7 @@ Path walking overview
42A name string specifies a start (root directory, cwd, fd-relative) and a 42A name string specifies a start (root directory, cwd, fd-relative) and a
43sequence of elements (directory entry names), which together refer to a path in 43sequence of elements (directory entry names), which together refer to a path in
44the namespace. A path is represented as a (dentry, vfsmount) tuple. The name 44the namespace. A path is represented as a (dentry, vfsmount) tuple. The name
45elements are sub-strings, seperated by '/'. 45elements are sub-strings, separated by '/'.
46 46
47Name lookups will want to find a particular path that a name string refers to 47Name lookups will want to find a particular path that a name string refers to
48(usually the final element, or parent of final element). This is done by taking 48(usually the final element, or parent of final element). This is done by taking
@@ -354,7 +354,7 @@ vfstest 24185492 4945 708725(2.9%) 1076136(4.4%) 0 2651
354 354
355What this shows is that failed rcu-walk lookups, ie. ones that are restarted 355What this shows is that failed rcu-walk lookups, ie. ones that are restarted
356entirely with ref-walk, are quite rare. Even the "vfstest" case which 356entirely with ref-walk, are quite rare. Even the "vfstest" case which
357specifically has concurrent renames/mkdir/rmdir/ creat/unlink/etc to excercise 357specifically has concurrent renames/mkdir/rmdir/ creat/unlink/etc to exercise
358such races is not showing a huge amount of restarts. 358such races is not showing a huge amount of restarts.
359 359
360Dropping from rcu-walk to ref-walk mean that we have encountered a dentry where 360Dropping from rcu-walk to ref-walk mean that we have encountered a dentry where
diff --git a/Documentation/filesystems/pohmelfs/network_protocol.txt b/Documentation/filesystems/pohmelfs/network_protocol.txt
index 40ea6c295afb..65e03dd44823 100644
--- a/Documentation/filesystems/pohmelfs/network_protocol.txt
+++ b/Documentation/filesystems/pohmelfs/network_protocol.txt
@@ -20,7 +20,7 @@ Commands can be embedded into transaction command (which in turn has own command
20so one can extend protocol as needed without breaking backward compatibility as long 20so one can extend protocol as needed without breaking backward compatibility as long
21as old commands are supported. All string lengths include tail 0 byte. 21as old commands are supported. All string lengths include tail 0 byte.
22 22
23All commans are transfered over the network in big-endian. CPU endianess is used at the end peers. 23All commands are transferred over the network in big-endian. CPU endianess is used at the end peers.
24 24
25@cmd - command number, which specifies command to be processed. Following 25@cmd - command number, which specifies command to be processed. Following
26 commands are used currently: 26 commands are used currently:
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting
index 0c986c9e8519..6e29954851a2 100644
--- a/Documentation/filesystems/porting
+++ b/Documentation/filesystems/porting
@@ -298,11 +298,14 @@ be used instead. It gets called whenever the inode is evicted, whether it has
298remaining links or not. Caller does *not* evict the pagecache or inode-associated 298remaining links or not. Caller does *not* evict the pagecache or inode-associated
299metadata buffers; getting rid of those is responsibility of method, as it had 299metadata buffers; getting rid of those is responsibility of method, as it had
300been for ->delete_inode(). 300been for ->delete_inode().
301 ->drop_inode() returns int now; it's called on final iput() with inode_lock 301
302held and it returns true if filesystems wants the inode to be dropped. As before, 302 ->drop_inode() returns int now; it's called on final iput() with
303generic_drop_inode() is still the default and it's been updated appropriately. 303inode->i_lock held and it returns true if filesystems wants the inode to be
304generic_delete_inode() is also alive and it consists simply of return 1. Note that 304dropped. As before, generic_drop_inode() is still the default and it's been
305all actual eviction work is done by caller after ->drop_inode() returns. 305updated appropriately. generic_delete_inode() is also alive and it consists
306simply of return 1. Note that all actual eviction work is done by caller after
307->drop_inode() returns.
308
306 clear_inode() is gone; use end_writeback() instead. As before, it must 309 clear_inode() is gone; use end_writeback() instead. As before, it must
307be called exactly once on each call of ->evict_inode() (as it used to be for 310be called exactly once on each call of ->evict_inode() (as it used to be for
308each call of ->delete_inode()). Unlike before, if you are using inode-associated 311each call of ->delete_inode()). Unlike before, if you are using inode-associated
@@ -397,6 +400,9 @@ a file off.
397 400
398-- 401--
399[mandatory] 402[mandatory]
403
404--
405[mandatory]
400 ->get_sb() is gone. Switch to use of ->mount(). Typically it's just 406 ->get_sb() is gone. Switch to use of ->mount(). Typically it's just
401a matter of switching from calling get_sb_... to mount_... and changing the 407a matter of switching from calling get_sb_... to mount_... and changing the
402function type. If you were doing it manually, just switch from setting ->mnt_root 408function type. If you were doing it manually, just switch from setting ->mnt_root
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index 23cae6548d3a..b0b814d75ca1 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -543,7 +543,7 @@ just those considered 'most important'. The new vectors are:
543 their statistics are used by kernel developers and interested users to 543 their statistics are used by kernel developers and interested users to
544 determine the occurrence of interrupts of the given type. 544 determine the occurrence of interrupts of the given type.
545 545
546The above IRQ vectors are displayed only when relevent. For example, 546The above IRQ vectors are displayed only when relevant. For example,
547the threshold vector does not exist on x86_64 platforms. Others are 547the threshold vector does not exist on x86_64 platforms. Others are
548suppressed when the system is a uniprocessor. As of this writing, only 548suppressed when the system is a uniprocessor. As of this writing, only
549i386 and x86_64 platforms support the new IRQ vector displays. 549i386 and x86_64 platforms support the new IRQ vector displays.
@@ -1202,7 +1202,7 @@ The columns are:
1202 W = can do write operations 1202 W = can do write operations
1203 U = can do unblank 1203 U = can do unblank
1204 flags E = it is enabled 1204 flags E = it is enabled
1205 C = it is prefered console 1205 C = it is preferred console
1206 B = it is primary boot console 1206 B = it is primary boot console
1207 p = it is used for printk buffer 1207 p = it is used for printk buffer
1208 b = it is not a TTY but a Braille device 1208 b = it is not a TTY but a Braille device
@@ -1331,7 +1331,7 @@ NOTICE: /proc/<pid>/oom_adj is deprecated and will be removed, please see
1331Documentation/feature-removal-schedule.txt. 1331Documentation/feature-removal-schedule.txt.
1332 1332
1333Caveat: when a parent task is selected, the oom killer will sacrifice any first 1333Caveat: when a parent task is selected, the oom killer will sacrifice any first
1334generation children with seperate address spaces instead, if possible. This 1334generation children with separate address spaces instead, if possible. This
1335avoids servers and important system daemons from being killed and loses the 1335avoids servers and important system daemons from being killed and loses the
1336minimal amount of work. 1336minimal amount of work.
1337 1337
diff --git a/Documentation/filesystems/squashfs.txt b/Documentation/filesystems/squashfs.txt
index 66699afd66ca..d4d41465a0b1 100644
--- a/Documentation/filesystems/squashfs.txt
+++ b/Documentation/filesystems/squashfs.txt
@@ -59,12 +59,15 @@ obtained from this site also.
593. SQUASHFS FILESYSTEM DESIGN 593. SQUASHFS FILESYSTEM DESIGN
60----------------------------- 60-----------------------------
61 61
62A squashfs filesystem consists of a maximum of eight parts, packed together on a byte 62A squashfs filesystem consists of a maximum of nine parts, packed together on a
63alignment: 63byte alignment:
64 64
65 --------------- 65 ---------------
66 | superblock | 66 | superblock |
67 |---------------| 67 |---------------|
68 | compression |
69 | options |
70 |---------------|
68 | datablocks | 71 | datablocks |
69 | & fragments | 72 | & fragments |
70 |---------------| 73 |---------------|
@@ -91,7 +94,14 @@ the source directory, and checked for duplicates. Once all file data has been
91written the completed inode, directory, fragment, export and uid/gid lookup 94written the completed inode, directory, fragment, export and uid/gid lookup
92tables are written. 95tables are written.
93 96
943.1 Inodes 973.1 Compression options
98-----------------------
99
100Compressors can optionally support compression specific options (e.g.
101dictionary size). If non-default compression options have been used, then
102these are stored here.
103
1043.2 Inodes
95---------- 105----------
96 106
97Metadata (inodes and directories) are compressed in 8Kbyte blocks. Each 107Metadata (inodes and directories) are compressed in 8Kbyte blocks. Each
@@ -114,7 +124,7 @@ directory inode are defined: inodes optimised for frequently occurring
114regular files and directories, and extended types where extra 124regular files and directories, and extended types where extra
115information has to be stored. 125information has to be stored.
116 126
1173.2 Directories 1273.3 Directories
118--------------- 128---------------
119 129
120Like inodes, directories are packed into compressed metadata blocks, stored 130Like inodes, directories are packed into compressed metadata blocks, stored
@@ -144,7 +154,7 @@ decompressed to do a lookup irrespective of the length of the directory.
144This scheme has the advantage that it doesn't require extra memory overhead 154This scheme has the advantage that it doesn't require extra memory overhead
145and doesn't require much extra storage on disk. 155and doesn't require much extra storage on disk.
146 156
1473.3 File data 1573.4 File data
148------------- 158-------------
149 159
150Regular files consist of a sequence of contiguous compressed blocks, and/or a 160Regular files consist of a sequence of contiguous compressed blocks, and/or a
@@ -163,7 +173,7 @@ Larger files use multiple slots, with 1.75 TiB files using all 8 slots.
163The index cache is designed to be memory efficient, and by default uses 173The index cache is designed to be memory efficient, and by default uses
16416 KiB. 17416 KiB.
165 175
1663.4 Fragment lookup table 1763.5 Fragment lookup table
167------------------------- 177-------------------------
168 178
169Regular files can contain a fragment index which is mapped to a fragment 179Regular files can contain a fragment index which is mapped to a fragment
@@ -173,7 +183,7 @@ A second index table is used to locate these. This second index table for
173speed of access (and because it is small) is read at mount time and cached 183speed of access (and because it is small) is read at mount time and cached
174in memory. 184in memory.
175 185
1763.5 Uid/gid lookup table 1863.6 Uid/gid lookup table
177------------------------ 187------------------------
178 188
179For space efficiency regular files store uid and gid indexes, which are 189For space efficiency regular files store uid and gid indexes, which are
@@ -182,7 +192,7 @@ stored compressed into metadata blocks. A second index table is used to
182locate these. This second index table for speed of access (and because it 192locate these. This second index table for speed of access (and because it
183is small) is read at mount time and cached in memory. 193is small) is read at mount time and cached in memory.
184 194
1853.6 Export table 1953.7 Export table
186---------------- 196----------------
187 197
188To enable Squashfs filesystems to be exportable (via NFS etc.) filesystems 198To enable Squashfs filesystems to be exportable (via NFS etc.) filesystems
@@ -196,7 +206,7 @@ This table is stored compressed into metadata blocks. A second index table is
196used to locate these. This second index table for speed of access (and because 206used to locate these. This second index table for speed of access (and because
197it is small) is read at mount time and cached in memory. 207it is small) is read at mount time and cached in memory.
198 208
1993.7 Xattr table 2093.8 Xattr table
200--------------- 210---------------
201 211
202The xattr table contains extended attributes for each inode. The xattrs 212The xattr table contains extended attributes for each inode. The xattrs
@@ -209,7 +219,7 @@ or if it is stored out of line (in which case the value field stores a
209reference to where the actual value is stored). This allows large values 219reference to where the actual value is stored). This allows large values
210to be stored out of line improving scanning and lookup performance and it 220to be stored out of line improving scanning and lookup performance and it
211also allows values to be de-duplicated, the value being stored once, and 221also allows values to be de-duplicated, the value being stored once, and
212all other occurences holding an out of line reference to that value. 222all other occurrences holding an out of line reference to that value.
213 223
214The xattr lists are packed into compressed 8K metadata blocks. 224The xattr lists are packed into compressed 8K metadata blocks.
215To reduce overhead in inodes, rather than storing the on-disk 225To reduce overhead in inodes, rather than storing the on-disk
diff --git a/Documentation/filesystems/sysfs.txt b/Documentation/filesystems/sysfs.txt
index f806e50aaa63..597f728e7b4e 100644
--- a/Documentation/filesystems/sysfs.txt
+++ b/Documentation/filesystems/sysfs.txt
@@ -62,7 +62,7 @@ values of the same type.
62 62
63Mixing types, expressing multiple lines of data, and doing fancy 63Mixing types, expressing multiple lines of data, and doing fancy
64formatting of data is heavily frowned upon. Doing these things may get 64formatting of data is heavily frowned upon. Doing these things may get
65you publically humiliated and your code rewritten without notice. 65you publicly humiliated and your code rewritten without notice.
66 66
67 67
68An attribute definition is simply: 68An attribute definition is simply:
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index 306f0ae8df09..21a7dc467bba 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -97,7 +97,7 @@ functions:
97The passed struct file_system_type describes your filesystem. When a 97The passed struct file_system_type describes your filesystem. When a
98request is made to mount a filesystem onto a directory in your namespace, 98request is made to mount a filesystem onto a directory in your namespace,
99the VFS will call the appropriate mount() method for the specific 99the VFS will call the appropriate mount() method for the specific
100filesystem. New vfsmount refering to the tree returned by ->mount() 100filesystem. New vfsmount referring to the tree returned by ->mount()
101will be attached to the mountpoint, so that when pathname resolution 101will be attached to the mountpoint, so that when pathname resolution
102reaches the mountpoint it will jump into the root of that vfsmount. 102reaches the mountpoint it will jump into the root of that vfsmount.
103 103
@@ -254,7 +254,7 @@ or bottom half).
254 should be synchronous or not, not all filesystems check this flag. 254 should be synchronous or not, not all filesystems check this flag.
255 255
256 drop_inode: called when the last access to the inode is dropped, 256 drop_inode: called when the last access to the inode is dropped,
257 with the inode_lock spinlock held. 257 with the inode->i_lock spinlock held.
258 258
259 This method should be either NULL (normal UNIX filesystem 259 This method should be either NULL (normal UNIX filesystem
260 semantics) or "generic_delete_inode" (for filesystems that do not 260 semantics) or "generic_delete_inode" (for filesystems that do not
diff --git a/Documentation/filesystems/xfs-delayed-logging-design.txt b/Documentation/filesystems/xfs-delayed-logging-design.txt
index 7445bf335dae..2ce36439c09f 100644
--- a/Documentation/filesystems/xfs-delayed-logging-design.txt
+++ b/Documentation/filesystems/xfs-delayed-logging-design.txt
@@ -42,7 +42,7 @@ the aggregation of all the previous changes currently held only in the log.
42This relogging technique also allows objects to be moved forward in the log so 42This relogging technique also allows objects to be moved forward in the log so
43that an object being relogged does not prevent the tail of the log from ever 43that an object being relogged does not prevent the tail of the log from ever
44moving forward. This can be seen in the table above by the changing 44moving forward. This can be seen in the table above by the changing
45(increasing) LSN of each subsquent transaction - the LSN is effectively a 45(increasing) LSN of each subsequent transaction - the LSN is effectively a
46direct encoding of the location in the log of the transaction. 46direct encoding of the location in the log of the transaction.
47 47
48This relogging is also used to implement long-running, multiple-commit 48This relogging is also used to implement long-running, multiple-commit
@@ -338,7 +338,7 @@ the same time another transaction modifies the item and inserts the log item
338into the new CIL, then checkpoint transaction commit code cannot use log items 338into the new CIL, then checkpoint transaction commit code cannot use log items
339to store the list of log vectors that need to be written into the transaction. 339to store the list of log vectors that need to be written into the transaction.
340Hence log vectors need to be able to be chained together to allow them to be 340Hence log vectors need to be able to be chained together to allow them to be
341detatched from the log items. That is, when the CIL is flushed the memory 341detached from the log items. That is, when the CIL is flushed the memory
342buffer and log vector attached to each log item needs to be attached to the 342buffer and log vector attached to each log item needs to be attached to the
343checkpoint context so that the log item can be released. In diagrammatic form, 343checkpoint context so that the log item can be released. In diagrammatic form,
344the CIL would look like this before the flush: 344the CIL would look like this before the flush:
@@ -577,7 +577,7 @@ only becomes unpinned when all the transactions complete and there are no
577pending transactions. Thus the pinning and unpinning of a log item is symmetric 577pending transactions. Thus the pinning and unpinning of a log item is symmetric
578as there is a 1:1 relationship with transaction commit and log item completion. 578as there is a 1:1 relationship with transaction commit and log item completion.
579 579
580For delayed logging, however, we have an assymetric transaction commit to 580For delayed logging, however, we have an asymmetric transaction commit to
581completion relationship. Every time an object is relogged in the CIL it goes 581completion relationship. Every time an object is relogged in the CIL it goes
582through the commit process without a corresponding completion being registered. 582through the commit process without a corresponding completion being registered.
583That is, we now have a many-to-one relationship between transaction commit and 583That is, we now have a many-to-one relationship between transaction commit and
@@ -780,7 +780,7 @@ With delayed logging, there are new steps inserted into the life cycle:
780From this, it can be seen that the only life cycle differences between the two 780From this, it can be seen that the only life cycle differences between the two
781logging methods are in the middle of the life cycle - they still have the same 781logging methods are in the middle of the life cycle - they still have the same
782beginning and end and execution constraints. The only differences are in the 782beginning and end and execution constraints. The only differences are in the
783commiting of the log items to the log itself and the completion processing. 783committing of the log items to the log itself and the completion processing.
784Hence delayed logging should not introduce any constraints on log item 784Hence delayed logging should not introduce any constraints on log item
785behaviour, allocation or freeing that don't already exist. 785behaviour, allocation or freeing that don't already exist.
786 786
@@ -791,10 +791,3 @@ mount option. Fundamentally, there is no reason why the log manager would not
791be able to swap methods automatically and transparently depending on load 791be able to swap methods automatically and transparently depending on load
792characteristics, but this should not be necessary if delayed logging works as 792characteristics, but this should not be necessary if delayed logging works as
793designed. 793designed.
794
795Roadmap:
796
7972.6.39 Switch default mount option to use delayed logging
798 => should be roughly 12 months after initial merge
799 => enough time to shake out remaining problems before next round of
800 enterprise distro kernel rebases
diff --git a/Documentation/flexible-arrays.txt b/Documentation/flexible-arrays.txt
index cb8a3a00cc92..df904aec9904 100644
--- a/Documentation/flexible-arrays.txt
+++ b/Documentation/flexible-arrays.txt
@@ -66,10 +66,10 @@ trick is to ensure that any needed memory allocations are done before
66entering atomic context, using: 66entering atomic context, using:
67 67
68 int flex_array_prealloc(struct flex_array *array, unsigned int start, 68 int flex_array_prealloc(struct flex_array *array, unsigned int start,
69 unsigned int end, gfp_t flags); 69 unsigned int nr_elements, gfp_t flags);
70 70
71This function will ensure that memory for the elements indexed in the range 71This function will ensure that memory for the elements indexed in the range
72defined by start and end has been allocated. Thereafter, a 72defined by start and nr_elements has been allocated. Thereafter, a
73flex_array_put() call on an element in that range is guaranteed not to 73flex_array_put() call on an element in that range is guaranteed not to
74block. 74block.
75 75
diff --git a/Documentation/hwmon/abituguru b/Documentation/hwmon/abituguru
index 5eb3b9d5f0d5..915f32063a26 100644
--- a/Documentation/hwmon/abituguru
+++ b/Documentation/hwmon/abituguru
@@ -78,7 +78,7 @@ motherboards (most modern Abit motherboards).
78 78
79The first and second revision of the uGuru chip in reality is a Winbond 79The first and second revision of the uGuru chip in reality is a Winbond
80W83L950D in disguise (despite Abit claiming it is "a new microprocessor 80W83L950D in disguise (despite Abit claiming it is "a new microprocessor
81designed by the ABIT Engineers"). Unfortunatly this doesn't help since the 81designed by the ABIT Engineers"). Unfortunately this doesn't help since the
82W83L950D is a generic microcontroller with a custom Abit application running 82W83L950D is a generic microcontroller with a custom Abit application running
83on it. 83on it.
84 84
diff --git a/Documentation/hwmon/abituguru-datasheet b/Documentation/hwmon/abituguru-datasheet
index d9251efdcec7..8d2be8a0b1e3 100644
--- a/Documentation/hwmon/abituguru-datasheet
+++ b/Documentation/hwmon/abituguru-datasheet
@@ -5,9 +5,9 @@ First of all, what I know about uGuru is no fact based on any help, hints or
5datasheet from Abit. The data I have got on uGuru have I assembled through 5datasheet from Abit. The data I have got on uGuru have I assembled through
6my weak knowledge in "backwards engineering". 6my weak knowledge in "backwards engineering".
7And just for the record, you may have noticed uGuru isn't a chip developed by 7And just for the record, you may have noticed uGuru isn't a chip developed by
8Abit, as they claim it to be. It's realy just an microprocessor (uC) created by 8Abit, as they claim it to be. It's really just an microprocessor (uC) created by
9Winbond (W83L950D). And no, reading the manual for this specific uC or 9Winbond (W83L950D). And no, reading the manual for this specific uC or
10mailing Windbond for help won't give any usefull data about uGuru, as it is 10mailing Windbond for help won't give any useful data about uGuru, as it is
11the program inside the uC that is responding to calls. 11the program inside the uC that is responding to calls.
12 12
13Olle Sandberg <ollebull@gmail.com>, 2005-05-25 13Olle Sandberg <ollebull@gmail.com>, 2005-05-25
@@ -41,7 +41,7 @@ later on attached again data-port will hold 0x08, more about this later.
41 41
42After wider testing of the Linux kernel driver some variants of the uGuru have 42After wider testing of the Linux kernel driver some variants of the uGuru have
43turned up which will hold 0x00 instead of 0xAC at the CMD port, thus we also 43turned up which will hold 0x00 instead of 0xAC at the CMD port, thus we also
44have to test CMD for two different values. On these uGuru's DATA will initally 44have to test CMD for two different values. On these uGuru's DATA will initially
45hold 0x09 and will only hold 0x08 after reading CMD first, so CMD must be read 45hold 0x09 and will only hold 0x08 after reading CMD first, so CMD must be read
46first! 46first!
47 47
@@ -308,5 +308,5 @@ the voltage / clock programming out, I tried reading and only reading banks
308resulted in a _permanent_ reprogramming of the voltages, luckily I had the 308resulted in a _permanent_ reprogramming of the voltages, luckily I had the
309sensors part configured so that it would shutdown my system on any out of spec 309sensors part configured so that it would shutdown my system on any out of spec
310voltages which proprably safed my computer (after a reboot I managed to 310voltages which proprably safed my computer (after a reboot I managed to
311immediatly enter the bios and reload the defaults). This probably means that 311immediately enter the bios and reload the defaults). This probably means that
312the read/write cycle for the non sensor part is different from the sensor part. 312the read/write cycle for the non sensor part is different from the sensor part.
diff --git a/Documentation/hwmon/abituguru3 b/Documentation/hwmon/abituguru3
index fa598aac22fa..a6ccfe4bb6aa 100644
--- a/Documentation/hwmon/abituguru3
+++ b/Documentation/hwmon/abituguru3
@@ -47,7 +47,7 @@ This driver supports the hardware monitoring features of the third revision of
47the Abit uGuru chip, found on recent Abit uGuru featuring motherboards. 47the Abit uGuru chip, found on recent Abit uGuru featuring motherboards.
48 48
49The 3rd revision of the uGuru chip in reality is a Winbond W83L951G. 49The 3rd revision of the uGuru chip in reality is a Winbond W83L951G.
50Unfortunatly this doesn't help since the W83L951G is a generic microcontroller 50Unfortunately this doesn't help since the W83L951G is a generic microcontroller
51with a custom Abit application running on it. 51with a custom Abit application running on it.
52 52
53Despite Abit not releasing any information regarding the uGuru revision 3, 53Despite Abit not releasing any information regarding the uGuru revision 3,
diff --git a/Documentation/hwmon/adm1021 b/Documentation/hwmon/adm1021
index 03d02bfb3df1..02ad96cf9b2b 100644
--- a/Documentation/hwmon/adm1021
+++ b/Documentation/hwmon/adm1021
@@ -14,10 +14,6 @@ Supported chips:
14 Prefix: 'gl523sm' 14 Prefix: 'gl523sm'
15 Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e 15 Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
16 Datasheet: 16 Datasheet:
17 * Intel Xeon Processor
18 Prefix: - any other - may require 'force_adm1021' parameter
19 Addresses scanned: none
20 Datasheet: Publicly available at Intel website
21 * Maxim MAX1617 17 * Maxim MAX1617
22 Prefix: 'max1617' 18 Prefix: 'max1617'
23 Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e 19 Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
@@ -91,21 +87,27 @@ will do no harm, but will return 'old' values. It is possible to make
91ADM1021-clones do faster measurements, but there is really no good reason 87ADM1021-clones do faster measurements, but there is really no good reason
92for that. 88for that.
93 89
94Xeon support
95------------
96 90
97Some Xeon processors have real max1617, adm1021, or compatible chips 91Netburst-based Xeon support
98within them, with two temperature sensors. 92---------------------------
99 93
100Other Xeons have chips with only one sensor. 94Some Xeon processors based on the Netburst (early Pentium 4, from 2001 to
952003) microarchitecture had real MAX1617, ADM1021, or compatible chips
96within them, with two temperature sensors. Other Xeon processors of this
97era (with 400 MHz FSB) had chips with only one temperature sensor.
101 98
102If you have a Xeon, and the adm1021 module loads, and both temperatures 99If you have such an old Xeon, and you get two valid temperatures when
103appear valid, then things are good. 100loading the adm1021 module, then things are good.
104 101
105If the adm1021 module doesn't load, you should try this: 102If nothing happens when loading the adm1021 module, and you are certain
106 modprobe adm1021 force_adm1021=BUS,ADDRESS 103that your specific Xeon processor model includes compatible sensors, you
107 ADDRESS can only be 0x18, 0x1a, 0x29, 0x2b, 0x4c, or 0x4e. 104will have to explicitly instantiate the sensor chips from user-space. See
105method 4 in Documentation/i2c/instantiating-devices. Possible slave
106addresses are 0x18, 0x1a, 0x29, 0x2b, 0x4c, or 0x4e. It is likely that
107only temp2 will be correct and temp1 will have to be ignored.
108 108
109If you have dual Xeons you may have appear to have two separate 109Previous generations of the Xeon processor (based on Pentium II/III)
110adm1021-compatible chips, or two single-temperature sensors, at distinct 110didn't have these sensors. Next generations of Xeon processors (533 MHz
111addresses. 111FSB and faster) lost them, until the Core-based generation which
112introduced integrated digital thermal sensors. These are supported by
113the coretemp driver.
diff --git a/Documentation/hwmon/ads1015 b/Documentation/hwmon/ads1015
new file mode 100644
index 000000000000..f6fe9c203733
--- /dev/null
+++ b/Documentation/hwmon/ads1015
@@ -0,0 +1,72 @@
1Kernel driver ads1015
2=====================
3
4Supported chips:
5 * Texas Instruments ADS1015
6 Prefix: 'ads1015'
7 Datasheet: Publicly available at the Texas Instruments website :
8 http://focus.ti.com/lit/ds/symlink/ads1015.pdf
9
10Authors:
11 Dirk Eibach, Guntermann & Drunck GmbH <eibach@gdsys.de>
12
13Description
14-----------
15
16This driver implements support for the Texas Instruments ADS1015.
17
18This device is a 12-bit A-D converter with 4 inputs.
19
20The inputs can be used single ended or in certain differential combinations.
21
22The inputs can be made available by 8 sysfs input files in0_input - in7_input:
23in0: Voltage over AIN0 and AIN1.
24in1: Voltage over AIN0 and AIN3.
25in2: Voltage over AIN1 and AIN3.
26in3: Voltage over AIN2 and AIN3.
27in4: Voltage over AIN0 and GND.
28in5: Voltage over AIN1 and GND.
29in6: Voltage over AIN2 and GND.
30in7: Voltage over AIN3 and GND.
31
32Which inputs are available can be configured using platform data or devicetree.
33
34By default all inputs are exported.
35
36Platform Data
37-------------
38
39In linux/i2c/ads1015.h platform data is defined, channel_data contains
40configuration data for the used input combinations:
41- pga is the programmable gain amplifier (values are full scale)
42 0: +/- 6.144 V
43 1: +/- 4.096 V
44 2: +/- 2.048 V
45 3: +/- 1.024 V
46 4: +/- 0.512 V
47 5: +/- 0.256 V
48- data_rate in samples per second
49 0: 128
50 1: 250
51 2: 490
52 3: 920
53 4: 1600
54 5: 2400
55 6: 3300
56
57Example:
58struct ads1015_platform_data data = {
59 .channel_data = {
60 [2] = { .enabled = true, .pga = 1, .data_rate = 0 },
61 [4] = { .enabled = true, .pga = 4, .data_rate = 5 },
62 }
63};
64
65In this case only in2_input (FS +/- 4.096 V, 128 SPS) and in4_input
66(FS +/- 0.512 V, 2400 SPS) would be created.
67
68Devicetree
69----------
70
71Configuration is also possible via devicetree:
72Documentation/devicetree/bindings/hwmon/ads1015.txt
diff --git a/Documentation/hwmon/f71882fg b/Documentation/hwmon/f71882fg
index 4d0bc70f1852..df02245d1419 100644
--- a/Documentation/hwmon/f71882fg
+++ b/Documentation/hwmon/f71882fg
@@ -2,6 +2,10 @@ Kernel driver f71882fg
2====================== 2======================
3 3
4Supported chips: 4Supported chips:
5 * Fintek F71808E
6 Prefix: 'f71808e'
7 Addresses scanned: none, address read from Super I/O config space
8 Datasheet: Not public
5 * Fintek F71858FG 9 * Fintek F71858FG
6 Prefix: 'f71858fg' 10 Prefix: 'f71858fg'
7 Addresses scanned: none, address read from Super I/O config space 11 Addresses scanned: none, address read from Super I/O config space
@@ -26,10 +30,25 @@ Supported chips:
26 Prefix: 'f71889ed' 30 Prefix: 'f71889ed'
27 Addresses scanned: none, address read from Super I/O config space 31 Addresses scanned: none, address read from Super I/O config space
28 Datasheet: Should become available on the Fintek website soon 32 Datasheet: Should become available on the Fintek website soon
33 * Fintek F71889A
34 Prefix: 'f71889a'
35 Addresses scanned: none, address read from Super I/O config space
36 Datasheet: Should become available on the Fintek website soon
29 * Fintek F8000 37 * Fintek F8000
30 Prefix: 'f8000' 38 Prefix: 'f8000'
31 Addresses scanned: none, address read from Super I/O config space 39 Addresses scanned: none, address read from Super I/O config space
32 Datasheet: Not public 40 Datasheet: Not public
41 * Fintek F81801U
42 Prefix: 'f71889fg'
43 Addresses scanned: none, address read from Super I/O config space
44 Datasheet: Not public
45 Note: This is the 64-pin variant of the F71889FG, they have the
46 same device ID and are fully compatible as far as hardware
47 monitoring is concerned.
48 * Fintek F81865F
49 Prefix: 'f81865f'
50 Addresses scanned: none, address read from Super I/O config space
51 Datasheet: Available from the Fintek website
33 52
34Author: Hans de Goede <hdegoede@redhat.com> 53Author: Hans de Goede <hdegoede@redhat.com>
35 54
diff --git a/Documentation/hwmon/lm75 b/Documentation/hwmon/lm75
index 8e6356fe05d7..a1790401fdde 100644
--- a/Documentation/hwmon/lm75
+++ b/Documentation/hwmon/lm75
@@ -7,6 +7,11 @@ Supported chips:
7 Addresses scanned: I2C 0x48 - 0x4f 7 Addresses scanned: I2C 0x48 - 0x4f
8 Datasheet: Publicly available at the National Semiconductor website 8 Datasheet: Publicly available at the National Semiconductor website
9 http://www.national.com/ 9 http://www.national.com/
10 * National Semiconductor LM75A
11 Prefix: 'lm75a'
12 Addresses scanned: I2C 0x48 - 0x4f
13 Datasheet: Publicly available at the National Semiconductor website
14 http://www.national.com/
10 * Dallas Semiconductor DS75 15 * Dallas Semiconductor DS75
11 Prefix: 'lm75' 16 Prefix: 'lm75'
12 Addresses scanned: I2C 0x48 - 0x4f 17 Addresses scanned: I2C 0x48 - 0x4f
diff --git a/Documentation/hwmon/lm90 b/Documentation/hwmon/lm90
index fa475c0a48a3..f3efd18e87f4 100644
--- a/Documentation/hwmon/lm90
+++ b/Documentation/hwmon/lm90
@@ -32,6 +32,16 @@ Supported chips:
32 Addresses scanned: I2C 0x4c and 0x4d 32 Addresses scanned: I2C 0x4c and 0x4d
33 Datasheet: Publicly available at the ON Semiconductor website 33 Datasheet: Publicly available at the ON Semiconductor website
34 http://www.onsemi.com/PowerSolutions/product.do?id=ADT7461 34 http://www.onsemi.com/PowerSolutions/product.do?id=ADT7461
35 * Analog Devices ADT7461A
36 Prefix: 'adt7461a'
37 Addresses scanned: I2C 0x4c and 0x4d
38 Datasheet: Publicly available at the ON Semiconductor website
39 http://www.onsemi.com/PowerSolutions/product.do?id=ADT7461A
40 * ON Semiconductor NCT1008
41 Prefix: 'nct1008'
42 Addresses scanned: I2C 0x4c and 0x4d
43 Datasheet: Publicly available at the ON Semiconductor website
44 http://www.onsemi.com/PowerSolutions/product.do?id=NCT1008
35 * Maxim MAX6646 45 * Maxim MAX6646
36 Prefix: 'max6646' 46 Prefix: 'max6646'
37 Addresses scanned: I2C 0x4d 47 Addresses scanned: I2C 0x4d
@@ -149,7 +159,7 @@ ADM1032:
149 * ALERT is triggered by open remote sensor. 159 * ALERT is triggered by open remote sensor.
150 * SMBus PEC support for Write Byte and Receive Byte transactions. 160 * SMBus PEC support for Write Byte and Receive Byte transactions.
151 161
152ADT7461: 162ADT7461, ADT7461A, NCT1008:
153 * Extended temperature range (breaks compatibility) 163 * Extended temperature range (breaks compatibility)
154 * Lower resolution for remote temperature 164 * Lower resolution for remote temperature
155 165
@@ -195,9 +205,9 @@ are exported, one for each channel, but these values are of course linked.
195Only the local hysteresis can be set from user-space, and the same delta 205Only the local hysteresis can be set from user-space, and the same delta
196applies to the remote hysteresis. 206applies to the remote hysteresis.
197 207
198The lm90 driver will not update its values more frequently than every 208The lm90 driver will not update its values more frequently than configured with
199other second; reading them more often will do no harm, but will return 209the update_interval attribute; reading them more often will do no harm, but will
200'old' values. 210return 'old' values.
201 211
202SMBus Alert Support 212SMBus Alert Support
203------------------- 213-------------------
@@ -205,11 +215,12 @@ SMBus Alert Support
205This driver has basic support for SMBus alert. When an alert is received, 215This driver has basic support for SMBus alert. When an alert is received,
206the status register is read and the faulty temperature channel is logged. 216the status register is read and the faulty temperature channel is logged.
207 217
208The Analog Devices chips (ADM1032 and ADT7461) do not implement the SMBus 218The Analog Devices chips (ADM1032, ADT7461 and ADT7461A) and ON
209alert protocol properly so additional care is needed: the ALERT output is 219Semiconductor chips (NCT1008) do not implement the SMBus alert protocol
210disabled when an alert is received, and is re-enabled only when the alarm 220properly so additional care is needed: the ALERT output is disabled when
211is gone. Otherwise the chip would block alerts from other chips in the bus 221an alert is received, and is re-enabled only when the alarm is gone.
212as long as the alarm is active. 222Otherwise the chip would block alerts from other chips in the bus as long
223as the alarm is active.
213 224
214PEC Support 225PEC Support
215----------- 226-----------
diff --git a/Documentation/hwmon/max16064 b/Documentation/hwmon/max16064
new file mode 100644
index 000000000000..41728999e142
--- /dev/null
+++ b/Documentation/hwmon/max16064
@@ -0,0 +1,62 @@
1Kernel driver max16064
2======================
3
4Supported chips:
5 * Maxim MAX16064
6 Prefix: 'max16064'
7 Addresses scanned: -
8 Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX16064.pdf
9
10Author: Guenter Roeck <guenter.roeck@ericsson.com>
11
12
13Description
14-----------
15
16This driver supports hardware montoring for Maxim MAX16064 Quad Power-Supply
17Controller with Active-Voltage Output Control and PMBus Interface.
18
19The driver is a client driver to the core PMBus driver.
20Please see Documentation/hwmon/pmbus for details on PMBus client drivers.
21
22
23Usage Notes
24-----------
25
26This driver does not auto-detect devices. You will have to instantiate the
27devices explicitly. Please see Documentation/i2c/instantiating-devices for
28details.
29
30
31Platform data support
32---------------------
33
34The driver supports standard PMBus driver platform data.
35
36
37Sysfs entries
38-------------
39
40The following attributes are supported. Limits are read-write; all other
41attributes are read-only.
42
43in[1-4]_label "vout[1-4]"
44in[1-4]_input Measured voltage. From READ_VOUT register.
45in[1-4]_min Minumum Voltage. From VOUT_UV_WARN_LIMIT register.
46in[1-4]_max Maximum voltage. From VOUT_OV_WARN_LIMIT register.
47in[1-4]_lcrit Critical minumum Voltage. VOUT_UV_FAULT_LIMIT register.
48in[1-4]_crit Critical maximum voltage. From VOUT_OV_FAULT_LIMIT register.
49in[1-4]_min_alarm Voltage low alarm. From VOLTAGE_UV_WARNING status.
50in[1-4]_max_alarm Voltage high alarm. From VOLTAGE_OV_WARNING status.
51in[1-4]_lcrit_alarm Voltage critical low alarm. From VOLTAGE_UV_FAULT status.
52in[1-4]_crit_alarm Voltage critical high alarm. From VOLTAGE_OV_FAULT status.
53
54temp1_input Measured temperature. From READ_TEMPERATURE_1 register.
55temp1_max Maximum temperature. From OT_WARN_LIMIT register.
56temp1_crit Critical high temperature. From OT_FAULT_LIMIT register.
57temp1_max_alarm Chip temperature high alarm. Set by comparing
58 READ_TEMPERATURE_1 with OT_WARN_LIMIT if TEMP_OT_WARNING
59 status is set.
60temp1_crit_alarm Chip temperature critical high alarm. Set by comparing
61 READ_TEMPERATURE_1 with OT_FAULT_LIMIT if TEMP_OT_FAULT
62 status is set.
diff --git a/Documentation/hwmon/max34440 b/Documentation/hwmon/max34440
new file mode 100644
index 000000000000..6c525dd07d59
--- /dev/null
+++ b/Documentation/hwmon/max34440
@@ -0,0 +1,79 @@
1Kernel driver max34440
2======================
3
4Supported chips:
5 * Maxim MAX34440
6 Prefixes: 'max34440'
7 Addresses scanned: -
8 Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX34440.pdf
9 * Maxim MAX34441
10 PMBus 5-Channel Power-Supply Manager and Intelligent Fan Controller
11 Prefixes: 'max34441'
12 Addresses scanned: -
13 Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX34441.pdf
14
15Author: Guenter Roeck <guenter.roeck@ericsson.com>
16
17
18Description
19-----------
20
21This driver supports hardware montoring for Maxim MAX34440 PMBus 6-Channel
22Power-Supply Manager and MAX34441 PMBus 5-Channel Power-Supply Manager
23and Intelligent Fan Controller.
24
25The driver is a client driver to the core PMBus driver. Please see
26Documentation/hwmon/pmbus for details on PMBus client drivers.
27
28
29Usage Notes
30-----------
31
32This driver does not auto-detect devices. You will have to instantiate the
33devices explicitly. Please see Documentation/i2c/instantiating-devices for
34details.
35
36
37Platform data support
38---------------------
39
40The driver supports standard PMBus driver platform data.
41
42
43Sysfs entries
44-------------
45
46The following attributes are supported. Limits are read-write; all other
47attributes are read-only.
48
49in[1-6]_label "vout[1-6]".
50in[1-6]_input Measured voltage. From READ_VOUT register.
51in[1-6]_min Minumum Voltage. From VOUT_UV_WARN_LIMIT register.
52in[1-6]_max Maximum voltage. From VOUT_OV_WARN_LIMIT register.
53in[1-6]_lcrit Critical minumum Voltage. VOUT_UV_FAULT_LIMIT register.
54in[1-6]_crit Critical maximum voltage. From VOUT_OV_FAULT_LIMIT register.
55in[1-6]_min_alarm Voltage low alarm. From VOLTAGE_UV_WARNING status.
56in[1-6]_max_alarm Voltage high alarm. From VOLTAGE_OV_WARNING status.
57in[1-6]_lcrit_alarm Voltage critical low alarm. From VOLTAGE_UV_FAULT status.
58in[1-6]_crit_alarm Voltage critical high alarm. From VOLTAGE_OV_FAULT status.
59
60curr[1-6]_label "iout[1-6]".
61curr[1-6]_input Measured current. From READ_IOUT register.
62curr[1-6]_max Maximum current. From IOUT_OC_WARN_LIMIT register.
63curr[1-6]_crit Critical maximum current. From IOUT_OC_FAULT_LIMIT register.
64curr[1-6]_max_alarm Current high alarm. From IOUT_OC_WARNING status.
65curr[1-6]_crit_alarm Current critical high alarm. From IOUT_OC_FAULT status.
66
67 in6 and curr6 attributes only exist for MAX34440.
68
69temp[1-8]_input Measured temperatures. From READ_TEMPERATURE_1 register.
70 temp1 is the chip's internal temperature. temp2..temp5
71 are remote I2C temperature sensors. For MAX34441, temp6
72 is a remote thermal-diode sensor. For MAX34440, temp6..8
73 are remote I2C temperature sensors.
74temp[1-8]_max Maximum temperature. From OT_WARN_LIMIT register.
75temp[1-8]_crit Critical high temperature. From OT_FAULT_LIMIT register.
76temp[1-8]_max_alarm Temperature high alarm.
77temp[1-8]_crit_alarm Temperature critical high alarm.
78
79 temp7 and temp8 attributes only exist for MAX34440.
diff --git a/Documentation/hwmon/max8688 b/Documentation/hwmon/max8688
new file mode 100644
index 000000000000..0ddd3a412030
--- /dev/null
+++ b/Documentation/hwmon/max8688
@@ -0,0 +1,69 @@
1Kernel driver max8688
2=====================
3
4Supported chips:
5 * Maxim MAX8688
6 Prefix: 'max8688'
7 Addresses scanned: -
8 Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX8688.pdf
9
10Author: Guenter Roeck <guenter.roeck@ericsson.com>
11
12
13Description
14-----------
15
16This driver supports hardware montoring for Maxim MAX8688 Digital Power-Supply
17Controller/Monitor with PMBus Interface.
18
19The driver is a client driver to the core PMBus driver. Please see
20Documentation/hwmon/pmbus for details on PMBus client drivers.
21
22
23Usage Notes
24-----------
25
26This driver does not auto-detect devices. You will have to instantiate the
27devices explicitly. Please see Documentation/i2c/instantiating-devices for
28details.
29
30
31Platform data support
32---------------------
33
34The driver supports standard PMBus driver platform data.
35
36
37Sysfs entries
38-------------
39
40The following attributes are supported. Limits are read-write; all other
41attributes are read-only.
42
43in1_label "vout1"
44in1_input Measured voltage. From READ_VOUT register.
45in1_min Minumum Voltage. From VOUT_UV_WARN_LIMIT register.
46in1_max Maximum voltage. From VOUT_OV_WARN_LIMIT register.
47in1_lcrit Critical minumum Voltage. VOUT_UV_FAULT_LIMIT register.
48in1_crit Critical maximum voltage. From VOUT_OV_FAULT_LIMIT register.
49in1_min_alarm Voltage low alarm. From VOLTAGE_UV_WARNING status.
50in1_max_alarm Voltage high alarm. From VOLTAGE_OV_WARNING status.
51in1_lcrit_alarm Voltage critical low alarm. From VOLTAGE_UV_FAULT status.
52in1_crit_alarm Voltage critical high alarm. From VOLTAGE_OV_FAULT status.
53
54curr1_label "iout1"
55curr1_input Measured current. From READ_IOUT register.
56curr1_max Maximum current. From IOUT_OC_WARN_LIMIT register.
57curr1_crit Critical maximum current. From IOUT_OC_FAULT_LIMIT register.
58curr1_max_alarm Current high alarm. From IOUT_OC_WARN_LIMIT register.
59curr1_crit_alarm Current critical high alarm. From IOUT_OC_FAULT status.
60
61temp1_input Measured temperature. From READ_TEMPERATURE_1 register.
62temp1_max Maximum temperature. From OT_WARN_LIMIT register.
63temp1_crit Critical high temperature. From OT_FAULT_LIMIT register.
64temp1_max_alarm Chip temperature high alarm. Set by comparing
65 READ_TEMPERATURE_1 with OT_WARN_LIMIT if TEMP_OT_WARNING
66 status is set.
67temp1_crit_alarm Chip temperature critical high alarm. Set by comparing
68 READ_TEMPERATURE_1 with OT_FAULT_LIMIT if TEMP_OT_FAULT
69 status is set.
diff --git a/Documentation/hwmon/pmbus b/Documentation/hwmon/pmbus
index f2d42e8bdf48..5e462fc7f99b 100644
--- a/Documentation/hwmon/pmbus
+++ b/Documentation/hwmon/pmbus
@@ -13,26 +13,6 @@ Supported chips:
13 Prefix: 'ltc2978' 13 Prefix: 'ltc2978'
14 Addresses scanned: - 14 Addresses scanned: -
15 Datasheet: http://cds.linear.com/docs/Datasheet/2978fa.pdf 15 Datasheet: http://cds.linear.com/docs/Datasheet/2978fa.pdf
16 * Maxim MAX16064
17 Quad Power-Supply Controller
18 Prefix: 'max16064'
19 Addresses scanned: -
20 Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX16064.pdf
21 * Maxim MAX34440
22 PMBus 6-Channel Power-Supply Manager
23 Prefixes: 'max34440'
24 Addresses scanned: -
25 Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX34440.pdf
26 * Maxim MAX34441
27 PMBus 5-Channel Power-Supply Manager and Intelligent Fan Controller
28 Prefixes: 'max34441'
29 Addresses scanned: -
30 Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX34441.pdf
31 * Maxim MAX8688
32 Digital Power-Supply Controller/Monitor
33 Prefix: 'max8688'
34 Addresses scanned: -
35 Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX8688.pdf
36 * Generic PMBus devices 16 * Generic PMBus devices
37 Prefix: 'pmbus' 17 Prefix: 'pmbus'
38 Addresses scanned: - 18 Addresses scanned: -
@@ -150,11 +130,11 @@ The following attributes are supported. Limits are read-write; all other
150attributes are read-only. 130attributes are read-only.
151 131
152inX_input Measured voltage. From READ_VIN or READ_VOUT register. 132inX_input Measured voltage. From READ_VIN or READ_VOUT register.
153inX_min Minumum Voltage. 133inX_min Minimum Voltage.
154 From VIN_UV_WARN_LIMIT or VOUT_UV_WARN_LIMIT register. 134 From VIN_UV_WARN_LIMIT or VOUT_UV_WARN_LIMIT register.
155inX_max Maximum voltage. 135inX_max Maximum voltage.
156 From VIN_OV_WARN_LIMIT or VOUT_OV_WARN_LIMIT register. 136 From VIN_OV_WARN_LIMIT or VOUT_OV_WARN_LIMIT register.
157inX_lcrit Critical minumum Voltage. 137inX_lcrit Critical minimum Voltage.
158 From VIN_UV_FAULT_LIMIT or VOUT_UV_FAULT_LIMIT register. 138 From VIN_UV_FAULT_LIMIT or VOUT_UV_FAULT_LIMIT register.
159inX_crit Critical maximum voltage. 139inX_crit Critical maximum voltage.
160 From VIN_OV_FAULT_LIMIT or VOUT_OV_FAULT_LIMIT register. 140 From VIN_OV_FAULT_LIMIT or VOUT_OV_FAULT_LIMIT register.
@@ -169,17 +149,19 @@ inX_label "vin", "vcap", or "voutY"
169currX_input Measured current. From READ_IIN or READ_IOUT register. 149currX_input Measured current. From READ_IIN or READ_IOUT register.
170currX_max Maximum current. 150currX_max Maximum current.
171 From IIN_OC_WARN_LIMIT or IOUT_OC_WARN_LIMIT register. 151 From IIN_OC_WARN_LIMIT or IOUT_OC_WARN_LIMIT register.
172currX_lcrit Critical minumum output current. 152currX_lcrit Critical minimum output current.
173 From IOUT_UC_FAULT_LIMIT register. 153 From IOUT_UC_FAULT_LIMIT register.
174currX_crit Critical maximum current. 154currX_crit Critical maximum current.
175 From IIN_OC_FAULT_LIMIT or IOUT_OC_FAULT_LIMIT register. 155 From IIN_OC_FAULT_LIMIT or IOUT_OC_FAULT_LIMIT register.
176currX_alarm Current high alarm. 156currX_alarm Current high alarm.
177 From IIN_OC_WARNING or IOUT_OC_WARNING status. 157 From IIN_OC_WARNING or IOUT_OC_WARNING status.
158currX_max_alarm Current high alarm.
159 From IIN_OC_WARN_LIMIT or IOUT_OC_WARN_LIMIT status.
178currX_lcrit_alarm Output current critical low alarm. 160currX_lcrit_alarm Output current critical low alarm.
179 From IOUT_UC_FAULT status. 161 From IOUT_UC_FAULT status.
180currX_crit_alarm Current critical high alarm. 162currX_crit_alarm Current critical high alarm.
181 From IIN_OC_FAULT or IOUT_OC_FAULT status. 163 From IIN_OC_FAULT or IOUT_OC_FAULT status.
182currX_label "iin" or "vinY" 164currX_label "iin" or "ioutY"
183 165
184powerX_input Measured power. From READ_PIN or READ_POUT register. 166powerX_input Measured power. From READ_PIN or READ_POUT register.
185powerX_cap Output power cap. From POUT_MAX register. 167powerX_cap Output power cap. From POUT_MAX register.
@@ -193,13 +175,13 @@ powerX_crit_alarm Output power critical high alarm.
193 From POUT_OP_FAULT status. 175 From POUT_OP_FAULT status.
194powerX_label "pin" or "poutY" 176powerX_label "pin" or "poutY"
195 177
196tempX_input Measured tempererature. 178tempX_input Measured temperature.
197 From READ_TEMPERATURE_X register. 179 From READ_TEMPERATURE_X register.
198tempX_min Mimimum tempererature. From UT_WARN_LIMIT register. 180tempX_min Mimimum temperature. From UT_WARN_LIMIT register.
199tempX_max Maximum tempererature. From OT_WARN_LIMIT register. 181tempX_max Maximum temperature. From OT_WARN_LIMIT register.
200tempX_lcrit Critical low tempererature. 182tempX_lcrit Critical low temperature.
201 From UT_FAULT_LIMIT register. 183 From UT_FAULT_LIMIT register.
202tempX_crit Critical high tempererature. 184tempX_crit Critical high temperature.
203 From OT_FAULT_LIMIT register. 185 From OT_FAULT_LIMIT register.
204tempX_min_alarm Chip temperature low alarm. Set by comparing 186tempX_min_alarm Chip temperature low alarm. Set by comparing
205 READ_TEMPERATURE_X with UT_WARN_LIMIT if 187 READ_TEMPERATURE_X with UT_WARN_LIMIT if
diff --git a/Documentation/hwmon/sch5627 b/Documentation/hwmon/sch5627
new file mode 100644
index 000000000000..446a054e4912
--- /dev/null
+++ b/Documentation/hwmon/sch5627
@@ -0,0 +1,22 @@
1Kernel driver sch5627
2=====================
3
4Supported chips:
5 * SMSC SCH5627
6 Prefix: 'sch5627'
7 Addresses scanned: none, address read from Super I/O config space
8 Datasheet: Application Note available upon request
9
10Author: Hans de Goede <hdegoede@redhat.com>
11
12
13Description
14-----------
15
16SMSC SCH5627 Super I/O chips include complete hardware monitoring
17capabilities. They can monitor up to 5 voltages, 4 fans and 8 temperatures.
18
19The hardware monitoring part of the SMSC SCH5627 is accessed by talking
20through an embedded microcontroller. An application note describing the
21protocol for communicating with the microcontroller is available upon
22request. Please mail me if you want a copy.
diff --git a/Documentation/hwmon/smm665 b/Documentation/hwmon/smm665
index 3820fc9ca52d..59e316140542 100644
--- a/Documentation/hwmon/smm665
+++ b/Documentation/hwmon/smm665
@@ -150,8 +150,8 @@ in8_crit_alarm Channel F critical alarm
150in9_crit_alarm AIN1 critical alarm 150in9_crit_alarm AIN1 critical alarm
151in10_crit_alarm AIN2 critical alarm 151in10_crit_alarm AIN2 critical alarm
152 152
153temp1_input Chip tempererature 153temp1_input Chip temperature
154temp1_min Mimimum chip tempererature 154temp1_min Mimimum chip temperature
155temp1_max Maximum chip tempererature 155temp1_max Maximum chip temperature
156temp1_crit Critical chip tempererature 156temp1_crit Critical chip temperature
157temp1_crit_alarm Temperature critical alarm 157temp1_crit_alarm Temperature critical alarm
diff --git a/Documentation/hwmon/submitting-patches b/Documentation/hwmon/submitting-patches
new file mode 100644
index 000000000000..86f42e8e9e49
--- /dev/null
+++ b/Documentation/hwmon/submitting-patches
@@ -0,0 +1,109 @@
1 How to Get Your Patch Accepted Into the Hwmon Subsystem
2 -------------------------------------------------------
3
4This text is is a collection of suggestions for people writing patches or
5drivers for the hwmon subsystem. Following these suggestions will greatly
6increase the chances of your change being accepted.
7
8
91. General
10----------
11
12* It should be unnecessary to mention, but please read and follow
13 Documentation/SubmitChecklist
14 Documentation/SubmittingDrivers
15 Documentation/SubmittingPatches
16 Documentation/CodingStyle
17
18* If your patch generates checkpatch warnings, please refrain from explanations
19 such as "I don't like that coding style". Keep in mind that each unnecessary
20 warning helps hiding a real problem. If you don't like the kernel coding
21 style, don't write kernel drivers.
22
23* Please test your patch thoroughly. We are not your test group.
24 Sometimes a patch can not or not completely be tested because of missing
25 hardware. In such cases, you should test-build the code on at least one
26 architecture. If run-time testing was not achieved, it should be written
27 explicitly below the patch header.
28
29* If your patch (or the driver) is affected by configuration options such as
30 CONFIG_SMP or CONFIG_HOTPLUG, make sure it compiles for all configuration
31 variants.
32
33
342. Adding functionality to existing drivers
35-------------------------------------------
36
37* Make sure the documentation in Documentation/hwmon/<driver_name> is up to
38 date.
39
40* Make sure the information in Kconfig is up to date.
41
42* If the added functionality requires some cleanup or structural changes, split
43 your patch into a cleanup part and the actual addition. This makes it easier
44 to review your changes, and to bisect any resulting problems.
45
46* Never mix bug fixes, cleanup, and functional enhancements in a single patch.
47
48
493. New drivers
50--------------
51
52* Running your patch or driver file(s) through checkpatch does not mean its
53 formatting is clean. If unsure about formatting in your new driver, run it
54 through Lindent. Lindent is not perfect, and you may have to do some minor
55 cleanup, but it is a good start.
56
57* Consider adding yourself to MAINTAINERS.
58
59* Document the driver in Documentation/hwmon/<driver_name>.
60
61* Add the driver to Kconfig and Makefile in alphabetical order.
62
63* Make sure that all dependencies are listed in Kconfig. For new drivers, it
64 is most likely prudent to add a dependency on EXPERIMENTAL.
65
66* Avoid forward declarations if you can. Rearrange the code if necessary.
67
68* Avoid calculations in macros and macro-generated functions. While such macros
69 may save a line or so in the source, it obfuscates the code and makes code
70 review more difficult. It may also result in code which is more complicated
71 than necessary. Use inline functions or just regular functions instead.
72
73* If the driver has a detect function, make sure it is silent. Debug messages
74 and messages printed after a successful detection are acceptable, but it
75 must not print messages such as "Chip XXX not found/supported".
76
77 Keep in mind that the detect function will run for all drivers supporting an
78 address if a chip is detected on that address. Unnecessary messages will just
79 pollute the kernel log and not provide any value.
80
81* Provide a detect function if and only if a chip can be detected reliably.
82
83* Avoid writing to chip registers in the detect function. If you have to write,
84 only do it after you have already gathered enough data to be certain that the
85 detection is going to be successful.
86
87 Keep in mind that the chip might not be what your driver believes it is, and
88 writing to it might cause a bad misconfiguration.
89
90* Make sure there are no race conditions in the probe function. Specifically,
91 completely initialize your chip first, then create sysfs entries and register
92 with the hwmon subsystem.
93
94* Do not provide support for deprecated sysfs attributes.
95
96* Do not create non-standard attributes unless really needed. If you have to use
97 non-standard attributes, or you believe you do, discuss it on the mailing list
98 first. Either case, provide a detailed explanation why you need the
99 non-standard attribute(s).
100 Standard attributes are specified in Documentation/hwmon/sysfs-interface.
101
102* When deciding which sysfs attributes to support, look at the chip's
103 capabilities. While we do not expect your driver to support everything the
104 chip may offer, it should at least support all limits and alarms.
105
106* Last but not least, please check if a driver for your chip already exists
107 before starting to write a new driver. Especially for temperature sensors,
108 new chips are often variants of previously released chips. In some cases,
109 a presumably new chip may simply have been relabeled.
diff --git a/Documentation/hwmon/sysfs-interface b/Documentation/hwmon/sysfs-interface
index 83a698773ade..8f63c244f1aa 100644
--- a/Documentation/hwmon/sysfs-interface
+++ b/Documentation/hwmon/sysfs-interface
@@ -579,7 +579,7 @@ channel should not be trusted.
579fan[1-*]_fault 579fan[1-*]_fault
580temp[1-*]_fault 580temp[1-*]_fault
581 Input fault condition 581 Input fault condition
582 0: no fault occured 582 0: no fault occurred
583 1: fault condition 583 1: fault condition
584 RO 584 RO
585 585
diff --git a/Documentation/hwmon/twl4030-madc-hwmon b/Documentation/hwmon/twl4030-madc-hwmon
new file mode 100644
index 000000000000..ef7984317cec
--- /dev/null
+++ b/Documentation/hwmon/twl4030-madc-hwmon
@@ -0,0 +1,45 @@
1Kernel driver twl4030-madc
2=========================
3
4Supported chips:
5 * Texas Instruments TWL4030
6 Prefix: 'twl4030-madc'
7
8
9Authors:
10 J Keerthy <j-keerthy@ti.com>
11
12Description
13-----------
14
15The Texas Instruments TWL4030 is a Power Management and Audio Circuit. Among
16other things it contains a 10-bit A/D converter MADC. The converter has 16
17channels which can be used in different modes.
18
19
20See this table for the meaning of the different channels
21
22Channel Signal
23------------------------------------------
240 Battery type(BTYPE)
251 BCI: Battery temperature (BTEMP)
262 GP analog input
273 GP analog input
284 GP analog input
295 GP analog input
306 GP analog input
317 GP analog input
328 BCI: VBUS voltage(VBUS)
339 Backup Battery voltage (VBKP)
3410 BCI: Battery charger current (ICHG)
3511 BCI: Battery charger voltage (VCHG)
3612 BCI: Main battery voltage (VBAT)
3713 Reserved
3814 Reserved
3915 VRUSB Supply/Speaker left/Speaker right polarization level
40
41
42The Sysfs nodes will represent the voltage in the units of mV,
43the temperature channel shows the converted temperature in
44degree celcius. The Battery charging current channel represents
45battery charging current in mA.
diff --git a/Documentation/hwmon/w83781d b/Documentation/hwmon/w83781d
index ecbc1e4574b4..129b0a3b555b 100644
--- a/Documentation/hwmon/w83781d
+++ b/Documentation/hwmon/w83781d
@@ -403,7 +403,7 @@ found out the following values do work as a form of coarse pwm:
403 403
4040x80 - seems to turn fans off after some time(1-2 minutes)... might be 4040x80 - seems to turn fans off after some time(1-2 minutes)... might be
405some form of auto-fan-control based on temp? hmm (Qfan? this mobo is an 405some form of auto-fan-control based on temp? hmm (Qfan? this mobo is an
406old ASUS, it isn't marketed as Qfan. Maybe some beta pre-attemp at Qfan 406old ASUS, it isn't marketed as Qfan. Maybe some beta pre-attempt at Qfan
407that was dropped at the BIOS) 407that was dropped at the BIOS)
4080x81 - off 4080x81 - off
4090x82 - slightly "on-ner" than off, but my fans do not get to move. I can 4090x82 - slightly "on-ner" than off, but my fans do not get to move. I can
diff --git a/Documentation/hwmon/w83791d b/Documentation/hwmon/w83791d
index 5663e491655c..90387c3540f7 100644
--- a/Documentation/hwmon/w83791d
+++ b/Documentation/hwmon/w83791d
@@ -93,7 +93,7 @@ The sysfs interface to the beep bitmask has migrated from the original legacy
93method of a single sysfs beep_mask file to a newer method using multiple 93method of a single sysfs beep_mask file to a newer method using multiple
94*_beep files as described in .../Documentation/hwmon/sysfs-interface. 94*_beep files as described in .../Documentation/hwmon/sysfs-interface.
95 95
96A similar change has occured for the bitmap corresponding to the alarms. The 96A similar change has occurred for the bitmap corresponding to the alarms. The
97original legacy method used a single sysfs alarms file containing a bitmap 97original legacy method used a single sysfs alarms file containing a bitmap
98of triggered alarms. The newer method uses multiple sysfs *_alarm files 98of triggered alarms. The newer method uses multiple sysfs *_alarm files
99(again following the pattern described in sysfs-interface). 99(again following the pattern described in sysfs-interface).
diff --git a/Documentation/hwmon/w83795 b/Documentation/hwmon/w83795
new file mode 100644
index 000000000000..9f160371f463
--- /dev/null
+++ b/Documentation/hwmon/w83795
@@ -0,0 +1,127 @@
1Kernel driver w83795
2====================
3
4Supported chips:
5 * Winbond/Nuvoton W83795G
6 Prefix: 'w83795g'
7 Addresses scanned: I2C 0x2c - 0x2f
8 Datasheet: Available for download on nuvoton.com
9 * Winbond/Nuvoton W83795ADG
10 Prefix: 'w83795adg'
11 Addresses scanned: I2C 0x2c - 0x2f
12 Datasheet: Available for download on nuvoton.com
13
14Authors:
15 Wei Song (Nuvoton)
16 Jean Delvare <khali@linux-fr.org>
17
18
19Pin mapping
20-----------
21
22Here is a summary of the pin mapping for the W83795G and W83795ADG.
23This can be useful to convert data provided by board manufacturers
24into working libsensors configuration statements.
25
26 W83795G |
27 Pin | Name | Register | Sysfs attribute
28------------------------------------------------------------------
29 13 | VSEN1 (VCORE1) | 10h | in0
30 14 | VSEN2 (VCORE2) | 11h | in1
31 15 | VSEN3 (VCORE3) | 12h | in2
32 16 | VSEN4 | 13h | in3
33 17 | VSEN5 | 14h | in4
34 18 | VSEN6 | 15h | in5
35 19 | VSEN7 | 16h | in6
36 20 | VSEN8 | 17h | in7
37 21 | VSEN9 | 18h | in8
38 22 | VSEN10 | 19h | in9
39 23 | VSEN11 | 1Ah | in10
40 28 | VTT | 1Bh | in11
41 24 | 3VDD | 1Ch | in12
42 25 | 3VSB | 1Dh | in13
43 26 | VBAT | 1Eh | in14
44 3 | VSEN12/TR5 | 1Fh | in15/temp5
45 4 | VSEN13/TR5 | 20h | in16/temp6
46 5/ 6 | VDSEN14/TR1/TD1 | 21h | in17/temp1
47 7/ 8 | VDSEN15/TR2/TD2 | 22h | in18/temp2
48 9/ 10 | VDSEN16/TR3/TD3 | 23h | in19/temp3
49 11/ 12 | VDSEN17/TR4/TD4 | 24h | in20/temp4
50 40 | FANIN1 | 2Eh | fan1
51 42 | FANIN2 | 2Fh | fan2
52 44 | FANIN3 | 30h | fan3
53 46 | FANIN4 | 31h | fan4
54 48 | FANIN5 | 32h | fan5
55 50 | FANIN6 | 33h | fan6
56 52 | FANIN7 | 34h | fan7
57 54 | FANIN8 | 35h | fan8
58 57 | FANIN9 | 36h | fan9
59 58 | FANIN10 | 37h | fan10
60 59 | FANIN11 | 38h | fan11
61 60 | FANIN12 | 39h | fan12
62 31 | FANIN13 | 3Ah | fan13
63 35 | FANIN14 | 3Bh | fan14
64 41 | FANCTL1 | 10h (bank 2) | pwm1
65 43 | FANCTL2 | 11h (bank 2) | pwm2
66 45 | FANCTL3 | 12h (bank 2) | pwm3
67 47 | FANCTL4 | 13h (bank 2) | pwm4
68 49 | FANCTL5 | 14h (bank 2) | pwm5
69 51 | FANCTL6 | 15h (bank 2) | pwm6
70 53 | FANCTL7 | 16h (bank 2) | pwm7
71 55 | FANCTL8 | 17h (bank 2) | pwm8
72 29/ 30 | PECI/TSI (DTS1) | 26h | temp7
73 29/ 30 | PECI/TSI (DTS2) | 27h | temp8
74 29/ 30 | PECI/TSI (DTS3) | 28h | temp9
75 29/ 30 | PECI/TSI (DTS4) | 29h | temp10
76 29/ 30 | PECI/TSI (DTS5) | 2Ah | temp11
77 29/ 30 | PECI/TSI (DTS6) | 2Bh | temp12
78 29/ 30 | PECI/TSI (DTS7) | 2Ch | temp13
79 29/ 30 | PECI/TSI (DTS8) | 2Dh | temp14
80 27 | CASEOPEN# | 46h | intrusion0
81
82 W83795ADG |
83 Pin | Name | Register | Sysfs attribute
84------------------------------------------------------------------
85 10 | VSEN1 (VCORE1) | 10h | in0
86 11 | VSEN2 (VCORE2) | 11h | in1
87 12 | VSEN3 (VCORE3) | 12h | in2
88 13 | VSEN4 | 13h | in3
89 14 | VSEN5 | 14h | in4
90 15 | VSEN6 | 15h | in5
91 16 | VSEN7 | 16h | in6
92 17 | VSEN8 | 17h | in7
93 22 | VTT | 1Bh | in11
94 18 | 3VDD | 1Ch | in12
95 19 | 3VSB | 1Dh | in13
96 20 | VBAT | 1Eh | in14
97 48 | VSEN12/TR5 | 1Fh | in15/temp5
98 1 | VSEN13/TR5 | 20h | in16/temp6
99 2/ 3 | VDSEN14/TR1/TD1 | 21h | in17/temp1
100 4/ 5 | VDSEN15/TR2/TD2 | 22h | in18/temp2
101 6/ 7 | VDSEN16/TR3/TD3 | 23h | in19/temp3
102 8/ 9 | VDSEN17/TR4/TD4 | 24h | in20/temp4
103 32 | FANIN1 | 2Eh | fan1
104 34 | FANIN2 | 2Fh | fan2
105 36 | FANIN3 | 30h | fan3
106 37 | FANIN4 | 31h | fan4
107 38 | FANIN5 | 32h | fan5
108 39 | FANIN6 | 33h | fan6
109 40 | FANIN7 | 34h | fan7
110 41 | FANIN8 | 35h | fan8
111 43 | FANIN9 | 36h | fan9
112 44 | FANIN10 | 37h | fan10
113 45 | FANIN11 | 38h | fan11
114 46 | FANIN12 | 39h | fan12
115 24 | FANIN13 | 3Ah | fan13
116 28 | FANIN14 | 3Bh | fan14
117 33 | FANCTL1 | 10h (bank 2) | pwm1
118 35 | FANCTL2 | 11h (bank 2) | pwm2
119 23 | PECI (DTS1) | 26h | temp7
120 23 | PECI (DTS2) | 27h | temp8
121 23 | PECI (DTS3) | 28h | temp9
122 23 | PECI (DTS4) | 29h | temp10
123 23 | PECI (DTS5) | 2Ah | temp11
124 23 | PECI (DTS6) | 2Bh | temp12
125 23 | PECI (DTS7) | 2Ch | temp13
126 23 | PECI (DTS8) | 2Dh | temp14
127 21 | CASEOPEN# | 46h | intrusion0
diff --git a/Documentation/i2c/busses/i2c-diolan-u2c b/Documentation/i2c/busses/i2c-diolan-u2c
new file mode 100644
index 000000000000..30fe4bb9a069
--- /dev/null
+++ b/Documentation/i2c/busses/i2c-diolan-u2c
@@ -0,0 +1,26 @@
1Kernel driver i2c-diolan-u2c
2
3Supported adapters:
4 * Diolan U2C-12 I2C-USB adapter
5 Documentation:
6 http://www.diolan.com/i2c/u2c12.html
7
8Author: Guenter Roeck <guenter.roeck@ericsson.com>
9
10Description
11-----------
12
13This is the driver for the Diolan U2C-12 USB-I2C adapter.
14
15The Diolan U2C-12 I2C-USB Adapter provides a low cost solution to connect
16a computer to I2C slave devices using a USB interface. It also supports
17connectivity to SPI devices.
18
19This driver only supports the I2C interface of U2C-12. The driver does not use
20interrupts.
21
22
23Module parameters
24-----------------
25
26* frequency: I2C bus frequency
diff --git a/Documentation/i2c/busses/i2c-i801 b/Documentation/i2c/busses/i2c-i801
index 93fe76e56522..6df69765ccb7 100644
--- a/Documentation/i2c/busses/i2c-i801
+++ b/Documentation/i2c/busses/i2c-i801
@@ -16,8 +16,9 @@ Supported adapters:
16 * Intel EP80579 (Tolapai) 16 * Intel EP80579 (Tolapai)
17 * Intel 82801JI (ICH10) 17 * Intel 82801JI (ICH10)
18 * Intel 5/3400 Series (PCH) 18 * Intel 5/3400 Series (PCH)
19 * Intel Cougar Point (PCH) 19 * Intel 6 Series (PCH)
20 * Intel Patsburg (PCH) 20 * Intel Patsburg (PCH)
21 * Intel DH89xxCC (PCH)
21 Datasheets: Publicly available at the Intel website 22 Datasheets: Publicly available at the Intel website
22 23
23On Intel Patsburg and later chipsets, both the normal host SMBus controller 24On Intel Patsburg and later chipsets, both the normal host SMBus controller
diff --git a/Documentation/i2c/busses/i2c-parport-light b/Documentation/i2c/busses/i2c-parport-light
index bdc9cbb2e0f2..c22ee063e1e5 100644
--- a/Documentation/i2c/busses/i2c-parport-light
+++ b/Documentation/i2c/busses/i2c-parport-light
@@ -4,7 +4,7 @@ Author: Jean Delvare <khali@linux-fr.org>
4 4
5This driver is a light version of i2c-parport. It doesn't depend 5This driver is a light version of i2c-parport. It doesn't depend
6on the parport driver, and uses direct I/O access instead. This might be 6on the parport driver, and uses direct I/O access instead. This might be
7prefered on embedded systems where wasting memory for the clean but heavy 7preferred on embedded systems where wasting memory for the clean but heavy
8parport handling is not an option. The drawback is a reduced portability 8parport handling is not an option. The drawback is a reduced portability
9and the impossibility to daisy-chain other parallel port devices. 9and the impossibility to daisy-chain other parallel port devices.
10 10
diff --git a/Documentation/i2c/busses/i2c-sis96x b/Documentation/i2c/busses/i2c-sis96x
index 70e6a0cc1e15..0b979f3252a4 100644
--- a/Documentation/i2c/busses/i2c-sis96x
+++ b/Documentation/i2c/busses/i2c-sis96x
@@ -35,7 +35,7 @@ or perhaps this...
35 35
36(kernel versions later than 2.4.18 may fill in the "Unknown"s) 36(kernel versions later than 2.4.18 may fill in the "Unknown"s)
37 37
38If you cant see it please look on quirk_sis_96x_smbus 38If you can't see it please look on quirk_sis_96x_smbus
39(drivers/pci/quirks.c) (also if southbridge detection fails) 39(drivers/pci/quirks.c) (also if southbridge detection fails)
40 40
41I suspect that this driver could be made to work for the following SiS 41I suspect that this driver could be made to work for the following SiS
diff --git a/Documentation/i2c/busses/i2c-taos-evm b/Documentation/i2c/busses/i2c-taos-evm
index 9146e33be6dd..63f62bcbf592 100644
--- a/Documentation/i2c/busses/i2c-taos-evm
+++ b/Documentation/i2c/busses/i2c-taos-evm
@@ -13,7 +13,7 @@ Currently supported devices are:
13 13
14* TAOS TSL2550 EVM 14* TAOS TSL2550 EVM
15 15
16For addtional information on TAOS products, please see 16For additional information on TAOS products, please see
17 http://www.taosinc.com/ 17 http://www.taosinc.com/
18 18
19 19
diff --git a/Documentation/i2c/instantiating-devices b/Documentation/i2c/instantiating-devices
index 87da405a8597..9edb75d8c9b9 100644
--- a/Documentation/i2c/instantiating-devices
+++ b/Documentation/i2c/instantiating-devices
@@ -100,7 +100,7 @@ static int __devinit usb_hcd_pnx4008_probe(struct platform_device *pdev)
100 (...) 100 (...)
101 i2c_adap = i2c_get_adapter(2); 101 i2c_adap = i2c_get_adapter(2);
102 memset(&i2c_info, 0, sizeof(struct i2c_board_info)); 102 memset(&i2c_info, 0, sizeof(struct i2c_board_info));
103 strlcpy(i2c_info.name, "isp1301_pnx", I2C_NAME_SIZE); 103 strlcpy(i2c_info.type, "isp1301_pnx", I2C_NAME_SIZE);
104 isp1301_i2c_client = i2c_new_probed_device(i2c_adap, &i2c_info, 104 isp1301_i2c_client = i2c_new_probed_device(i2c_adap, &i2c_info,
105 normal_i2c, NULL); 105 normal_i2c, NULL);
106 i2c_put_adapter(i2c_adap); 106 i2c_put_adapter(i2c_adap);
diff --git a/Documentation/i2c/upgrading-clients b/Documentation/i2c/upgrading-clients
index 9a45f9bb6a25..d6991625c407 100644
--- a/Documentation/i2c/upgrading-clients
+++ b/Documentation/i2c/upgrading-clients
@@ -61,7 +61,7 @@ static int example_attach(struct i2c_adapter *adap, int addr, int kind)
61 return 0; 61 return 0;
62} 62}
63 63
64static int __devexit example_detach(struct i2c_client *client) 64static int example_detach(struct i2c_client *client)
65{ 65{
66 struct example_state *state = i2c_get_clientdata(client); 66 struct example_state *state = i2c_get_clientdata(client);
67 67
@@ -81,7 +81,7 @@ static struct i2c_driver example_driver = {
81 .name = "example", 81 .name = "example",
82 }, 82 },
83 .attach_adapter = example_attach_adapter, 83 .attach_adapter = example_attach_adapter,
84 .detach_client = __devexit_p(example_detach), 84 .detach_client = example_detach,
85 .suspend = example_suspend, 85 .suspend = example_suspend,
86 .resume = example_resume, 86 .resume = example_resume,
87}; 87};
@@ -93,7 +93,7 @@ Updating the client
93The new style binding model will check against a list of supported 93The new style binding model will check against a list of supported
94devices and their associated address supplied by the code registering 94devices and their associated address supplied by the code registering
95the busses. This means that the driver .attach_adapter and 95the busses. This means that the driver .attach_adapter and
96.detach_adapter methods can be removed, along with the addr_data, 96.detach_client methods can be removed, along with the addr_data,
97as follows: 97as follows:
98 98
99- static struct i2c_driver example_driver; 99- static struct i2c_driver example_driver;
@@ -110,14 +110,14 @@ as follows:
110 110
111 static struct i2c_driver example_driver = { 111 static struct i2c_driver example_driver = {
112- .attach_adapter = example_attach_adapter, 112- .attach_adapter = example_attach_adapter,
113- .detach_client = __devexit_p(example_detach), 113- .detach_client = example_detach,
114 } 114 }
115 115
116Add the probe and remove methods to the i2c_driver, as so: 116Add the probe and remove methods to the i2c_driver, as so:
117 117
118 static struct i2c_driver example_driver = { 118 static struct i2c_driver example_driver = {
119+ .probe = example_probe, 119+ .probe = example_probe,
120+ .remove = __devexit_p(example_remove), 120+ .remove = example_remove,
121 } 121 }
122 122
123Change the example_attach method to accept the new parameters 123Change the example_attach method to accept the new parameters
@@ -199,8 +199,8 @@ to delete the i2c_detach_client call. It is possible that you
199can also remove the ret variable as it is not not needed for 199can also remove the ret variable as it is not not needed for
200any of the core functions. 200any of the core functions.
201 201
202- static int __devexit example_detach(struct i2c_client *client) 202- static int example_detach(struct i2c_client *client)
203+ static int __devexit example_remove(struct i2c_client *client) 203+ static int example_remove(struct i2c_client *client)
204{ 204{
205 struct example_state *state = i2c_get_clientdata(client); 205 struct example_state *state = i2c_get_clientdata(client);
206 206
@@ -253,7 +253,7 @@ static int example_probe(struct i2c_client *client,
253 return 0; 253 return 0;
254} 254}
255 255
256static int __devexit example_remove(struct i2c_client *client) 256static int example_remove(struct i2c_client *client)
257{ 257{
258 struct example_state *state = i2c_get_clientdata(client); 258 struct example_state *state = i2c_get_clientdata(client);
259 259
@@ -275,7 +275,7 @@ static struct i2c_driver example_driver = {
275 }, 275 },
276 .id_table = example_idtable, 276 .id_table = example_idtable,
277 .probe = example_probe, 277 .probe = example_probe,
278 .remove = __devexit_p(example_remove), 278 .remove = example_remove,
279 .suspend = example_suspend, 279 .suspend = example_suspend,
280 .resume = example_resume, 280 .resume = example_resume,
281}; 281};
diff --git a/Documentation/i2o/README b/Documentation/i2o/README
index 0ebf58c73f54..ee91e2626ff0 100644
--- a/Documentation/i2o/README
+++ b/Documentation/i2o/README
@@ -53,7 +53,7 @@ Symbios Logic (Now LSI)
53BoxHill Corporation 53BoxHill Corporation
54 Loan of initial FibreChannel disk array used for development work. 54 Loan of initial FibreChannel disk array used for development work.
55 55
56European Comission 56European Commission
57 Funding the work done by the University of Helsinki 57 Funding the work done by the University of Helsinki
58 58
59SysKonnect 59SysKonnect
diff --git a/Documentation/ia64/aliasing-test.c b/Documentation/ia64/aliasing-test.c
index 3dfb76ca6931..5caa2af33207 100644
--- a/Documentation/ia64/aliasing-test.c
+++ b/Documentation/ia64/aliasing-test.c
@@ -177,7 +177,7 @@ static int scan_rom(char *path, char *file)
177 177
178 /* 178 /*
179 * It's OK if the ROM is unreadable. Maybe there 179 * It's OK if the ROM is unreadable. Maybe there
180 * is no ROM, or some other error ocurred. The 180 * is no ROM, or some other error occurred. The
181 * important thing is that no MCA happened. 181 * important thing is that no MCA happened.
182 */ 182 */
183 if (rc > 0) 183 if (rc > 0)
diff --git a/Documentation/input/event-codes.txt b/Documentation/input/event-codes.txt
new file mode 100644
index 000000000000..23fcb05175be
--- /dev/null
+++ b/Documentation/input/event-codes.txt
@@ -0,0 +1,262 @@
1The input protocol uses a map of types and codes to express input device values
2to userspace. This document describes the types and codes and how and when they
3may be used.
4
5A single hardware event generates multiple input events. Each input event
6contains the new value of a single data item. A special event type, EV_SYN, is
7used to separate input events into packets of input data changes occurring at
8the same moment in time. In the following, the term "event" refers to a single
9input event encompassing a type, code, and value.
10
11The input protocol is a stateful protocol. Events are emitted only when values
12of event codes have changed. However, the state is maintained within the Linux
13input subsystem; drivers do not need to maintain the state and may attempt to
14emit unchanged values without harm. Userspace may obtain the current state of
15event code values using the EVIOCG* ioctls defined in linux/input.h. The event
16reports supported by a device are also provided by sysfs in
17class/input/event*/device/capabilities/, and the properties of a device are
18provided in class/input/event*/device/properties.
19
20Types:
21==========
22Types are groupings of codes under a logical input construct. Each type has a
23set of applicable codes to be used in generating events. See the Codes section
24for details on valid codes for each type.
25
26* EV_SYN:
27 - Used as markers to separate events. Events may be separated in time or in
28 space, such as with the multitouch protocol.
29
30* EV_KEY:
31 - Used to describe state changes of keyboards, buttons, or other key-like
32 devices.
33
34* EV_REL:
35 - Used to describe relative axis value changes, e.g. moving the mouse 5 units
36 to the left.
37
38* EV_ABS:
39 - Used to describe absolute axis value changes, e.g. describing the
40 coordinates of a touch on a touchscreen.
41
42* EV_MSC:
43 - Used to describe miscellaneous input data that do not fit into other types.
44
45* EV_SW:
46 - Used to describe binary state input switches.
47
48* EV_LED:
49 - Used to turn LEDs on devices on and off.
50
51* EV_SND:
52 - Used to output sound to devices.
53
54* EV_REP:
55 - Used for autorepeating devices.
56
57* EV_FF:
58 - Used to send force feedback commands to an input device.
59
60* EV_PWR:
61 - A special type for power button and switch input.
62
63* EV_FF_STATUS:
64 - Used to receive force feedback device status.
65
66Codes:
67==========
68Codes define the precise type of event.
69
70EV_SYN:
71----------
72EV_SYN event values are undefined. Their usage is defined only by when they are
73sent in the evdev event stream.
74
75* SYN_REPORT:
76 - Used to synchronize and separate events into packets of input data changes
77 occurring at the same moment in time. For example, motion of a mouse may set
78 the REL_X and REL_Y values for one motion, then emit a SYN_REPORT. The next
79 motion will emit more REL_X and REL_Y values and send another SYN_REPORT.
80
81* SYN_CONFIG:
82 - TBD
83
84* SYN_MT_REPORT:
85 - Used to synchronize and separate touch events. See the
86 multi-touch-protocol.txt document for more information.
87
88* SYN_DROPPED:
89 - Used to indicate buffer overrun in the evdev client's event queue.
90 Client should ignore all events up to and including next SYN_REPORT
91 event and query the device (using EVIOCG* ioctls) to obtain its
92 current state.
93
94EV_KEY:
95----------
96EV_KEY events take the form KEY_<name> or BTN_<name>. For example, KEY_A is used
97to represent the 'A' key on a keyboard. When a key is depressed, an event with
98the key's code is emitted with value 1. When the key is released, an event is
99emitted with value 0. Some hardware send events when a key is repeated. These
100events have a value of 2. In general, KEY_<name> is used for keyboard keys, and
101BTN_<name> is used for other types of momentary switch events.
102
103A few EV_KEY codes have special meanings:
104
105* BTN_TOOL_<name>:
106 - These codes are used in conjunction with input trackpads, tablets, and
107 touchscreens. These devices may be used with fingers, pens, or other tools.
108 When an event occurs and a tool is used, the corresponding BTN_TOOL_<name>
109 code should be set to a value of 1. When the tool is no longer interacting
110 with the input device, the BTN_TOOL_<name> code should be reset to 0. All
111 trackpads, tablets, and touchscreens should use at least one BTN_TOOL_<name>
112 code when events are generated.
113
114* BTN_TOUCH:
115 BTN_TOUCH is used for touch contact. While an input tool is determined to be
116 within meaningful physical contact, the value of this property must be set
117 to 1. Meaningful physical contact may mean any contact, or it may mean
118 contact conditioned by an implementation defined property. For example, a
119 touchpad may set the value to 1 only when the touch pressure rises above a
120 certain value. BTN_TOUCH may be combined with BTN_TOOL_<name> codes. For
121 example, a pen tablet may set BTN_TOOL_PEN to 1 and BTN_TOUCH to 0 while the
122 pen is hovering over but not touching the tablet surface.
123
124Note: For appropriate function of the legacy mousedev emulation driver,
125BTN_TOUCH must be the first evdev code emitted in a synchronization frame.
126
127Note: Historically a touch device with BTN_TOOL_FINGER and BTN_TOUCH was
128interpreted as a touchpad by userspace, while a similar device without
129BTN_TOOL_FINGER was interpreted as a touchscreen. For backwards compatibility
130with current userspace it is recommended to follow this distinction. In the
131future, this distinction will be deprecated and the device properties ioctl
132EVIOCGPROP, defined in linux/input.h, will be used to convey the device type.
133
134* BTN_TOOL_FINGER, BTN_TOOL_DOUBLETAP, BTN_TOOL_TRIPLETAP, BTN_TOOL_QUADTAP:
135 - These codes denote one, two, three, and four finger interaction on a
136 trackpad or touchscreen. For example, if the user uses two fingers and moves
137 them on the touchpad in an effort to scroll content on screen,
138 BTN_TOOL_DOUBLETAP should be set to value 1 for the duration of the motion.
139 Note that all BTN_TOOL_<name> codes and the BTN_TOUCH code are orthogonal in
140 purpose. A trackpad event generated by finger touches should generate events
141 for one code from each group. At most only one of these BTN_TOOL_<name>
142 codes should have a value of 1 during any synchronization frame.
143
144Note: Historically some drivers emitted multiple of the finger count codes with
145a value of 1 in the same synchronization frame. This usage is deprecated.
146
147Note: In multitouch drivers, the input_mt_report_finger_count() function should
148be used to emit these codes. Please see multi-touch-protocol.txt for details.
149
150EV_REL:
151----------
152EV_REL events describe relative changes in a property. For example, a mouse may
153move to the left by a certain number of units, but its absolute position in
154space is unknown. If the absolute position is known, EV_ABS codes should be used
155instead of EV_REL codes.
156
157A few EV_REL codes have special meanings:
158
159* REL_WHEEL, REL_HWHEEL:
160 - These codes are used for vertical and horizontal scroll wheels,
161 respectively.
162
163EV_ABS:
164----------
165EV_ABS events describe absolute changes in a property. For example, a touchpad
166may emit coordinates for a touch location.
167
168A few EV_ABS codes have special meanings:
169
170* ABS_DISTANCE:
171 - Used to describe the distance of a tool from an interaction surface. This
172 event should only be emitted while the tool is hovering, meaning in close
173 proximity of the device and while the value of the BTN_TOUCH code is 0. If
174 the input device may be used freely in three dimensions, consider ABS_Z
175 instead.
176
177* ABS_MT_<name>:
178 - Used to describe multitouch input events. Please see
179 multi-touch-protocol.txt for details.
180
181EV_SW:
182----------
183EV_SW events describe stateful binary switches. For example, the SW_LID code is
184used to denote when a laptop lid is closed.
185
186Upon binding to a device or resuming from suspend, a driver must report
187the current switch state. This ensures that the device, kernel, and userspace
188state is in sync.
189
190Upon resume, if the switch state is the same as before suspend, then the input
191subsystem will filter out the duplicate switch state reports. The driver does
192not need to keep the state of the switch at any time.
193
194EV_MSC:
195----------
196EV_MSC events are used for input and output events that do not fall under other
197categories.
198
199EV_LED:
200----------
201EV_LED events are used for input and output to set and query the state of
202various LEDs on devices.
203
204EV_REP:
205----------
206EV_REP events are used for specifying autorepeating events.
207
208EV_SND:
209----------
210EV_SND events are used for sending sound commands to simple sound output
211devices.
212
213EV_FF:
214----------
215EV_FF events are used to initialize a force feedback capable device and to cause
216such device to feedback.
217
218EV_PWR:
219----------
220EV_PWR events are a special type of event used specifically for power
221mangement. Its usage is not well defined. To be addressed later.
222
223Guidelines:
224==========
225The guidelines below ensure proper single-touch and multi-finger functionality.
226For multi-touch functionality, see the multi-touch-protocol.txt document for
227more information.
228
229Mice:
230----------
231REL_{X,Y} must be reported when the mouse moves. BTN_LEFT must be used to report
232the primary button press. BTN_{MIDDLE,RIGHT,4,5,etc.} should be used to report
233further buttons of the device. REL_WHEEL and REL_HWHEEL should be used to report
234scroll wheel events where available.
235
236Touchscreens:
237----------
238ABS_{X,Y} must be reported with the location of the touch. BTN_TOUCH must be
239used to report when a touch is active on the screen.
240BTN_{MOUSE,LEFT,MIDDLE,RIGHT} must not be reported as the result of touch
241contact. BTN_TOOL_<name> events should be reported where possible.
242
243Trackpads:
244----------
245Legacy trackpads that only provide relative position information must report
246events like mice described above.
247
248Trackpads that provide absolute touch position must report ABS_{X,Y} for the
249location of the touch. BTN_TOUCH should be used to report when a touch is active
250on the trackpad. Where multi-finger support is available, BTN_TOOL_<name> should
251be used to report the number of touches active on the trackpad.
252
253Tablets:
254----------
255BTN_TOOL_<name> events must be reported when a stylus or other tool is active on
256the tablet. ABS_{X,Y} must be reported with the location of the tool. BTN_TOUCH
257should be used to report when the tool is in contact with the tablet.
258BTN_{STYLUS,STYLUS2} should be used to report buttons on the tool itself. Any
259button may be used for buttons on the tablet except BTN_{MOUSE,LEFT}.
260BTN_{0,1,2,etc} are good generic codes for unlabeled buttons. Do not use
261meaningful buttons, like BTN_FORWARD, unless the button is labeled for that
262purpose on the device.
diff --git a/Documentation/input/joystick-parport.txt b/Documentation/input/joystick-parport.txt
index 1c856f32ff2c..56870c70a796 100644
--- a/Documentation/input/joystick-parport.txt
+++ b/Documentation/input/joystick-parport.txt
@@ -272,7 +272,7 @@ if you want to use gamecon.c.
272 272
273 Also, the connection is a bit more complex. You'll need a bunch of diodes, 273 Also, the connection is a bit more complex. You'll need a bunch of diodes,
274and one pullup resistor. First, you connect the Directions and the button 274and one pullup resistor. First, you connect the Directions and the button
275the same as for db9, however with the diodes inbetween. 275the same as for db9, however with the diodes between.
276 276
277 Diodes 277 Diodes
278(pin 2) -----|<|----> Up 278(pin 2) -----|<|----> Up
diff --git a/Documentation/input/rotary-encoder.txt b/Documentation/input/rotary-encoder.txt
index 8b4129de1d2d..943e8f6f2b15 100644
--- a/Documentation/input/rotary-encoder.txt
+++ b/Documentation/input/rotary-encoder.txt
@@ -46,7 +46,7 @@ c) Falling edge on channel A, channel B in high state
46 46
47d) Falling edge on channel B, channel A in low state 47d) Falling edge on channel B, channel A in low state
48 Parking position. If the encoder enters this state, a full transition 48 Parking position. If the encoder enters this state, a full transition
49 should have happend, unless it flipped back on half the way. The 49 should have happened, unless it flipped back on half the way. The
50 'armed' state tells us about that. 50 'armed' state tells us about that.
51 51
522. Platform requirements 522. Platform requirements
diff --git a/Documentation/input/walkera0701.txt b/Documentation/input/walkera0701.txt
index 8f4289efc5c4..561385d38482 100644
--- a/Documentation/input/walkera0701.txt
+++ b/Documentation/input/walkera0701.txt
@@ -77,7 +77,7 @@ pulse length:
77 77
7824 bin+oct values + 1 bin value = 24*4+1 bits = 97 bits 7824 bin+oct values + 1 bin value = 24*4+1 bits = 97 bits
79 79
80(Warning, pulses on ACK ar inverted by transistor, irq is rised up on sync 80(Warning, pulses on ACK are inverted by transistor, irq is raised up on sync
81to bin change or octal value to bin change). 81to bin change or octal value to bin change).
82 82
83Binary data representations: 83Binary data representations:
diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt
index e68543f767d5..a0a5d82b6b0b 100644
--- a/Documentation/ioctl/ioctl-number.txt
+++ b/Documentation/ioctl/ioctl-number.txt
@@ -273,6 +273,7 @@ Code Seq#(hex) Include File Comments
273'z' 40-7F CAN bus card conflict! 273'z' 40-7F CAN bus card conflict!
274 <mailto:oe@port.de> 274 <mailto:oe@port.de>
275'z' 10-4F drivers/s390/crypto/zcrypt_api.h conflict! 275'z' 10-4F drivers/s390/crypto/zcrypt_api.h conflict!
276'|' 00-7F linux/media.h
2760x80 00-1F linux/fb.h 2770x80 00-1F linux/fb.h
2770x89 00-06 arch/x86/include/asm/sockios.h 2780x89 00-06 arch/x86/include/asm/sockios.h
2780x89 0B-DF linux/sockios.h 2790x89 0B-DF linux/sockios.h
diff --git a/Documentation/iostats.txt b/Documentation/iostats.txt
index f6dece5b7014..c76c21d87e85 100644
--- a/Documentation/iostats.txt
+++ b/Documentation/iostats.txt
@@ -1,8 +1,6 @@
1I/O statistics fields 1I/O statistics fields
2--------------- 2---------------
3 3
4Last modified Sep 30, 2003
5
6Since 2.4.20 (and some versions before, with patches), and 2.5.45, 4Since 2.4.20 (and some versions before, with patches), and 2.5.45,
7more extensive disk statistics have been introduced to help measure disk 5more extensive disk statistics have been introduced to help measure disk
8activity. Tools such as sar and iostat typically interpret these and do 6activity. Tools such as sar and iostat typically interpret these and do
@@ -46,11 +44,12 @@ the above example, the first field of statistics would be 446216.
46By contrast, in 2.6 if you look at /sys/block/hda/stat, you'll 44By contrast, in 2.6 if you look at /sys/block/hda/stat, you'll
47find just the eleven fields, beginning with 446216. If you look at 45find just the eleven fields, beginning with 446216. If you look at
48/proc/diskstats, the eleven fields will be preceded by the major and 46/proc/diskstats, the eleven fields will be preceded by the major and
49minor device numbers, and device name. Each of these formats provide 47minor device numbers, and device name. Each of these formats provides
50eleven fields of statistics, each meaning exactly the same things. 48eleven fields of statistics, each meaning exactly the same things.
51All fields except field 9 are cumulative since boot. Field 9 should 49All fields except field 9 are cumulative since boot. Field 9 should
52go to zero as I/Os complete; all others only increase. Yes, these are 50go to zero as I/Os complete; all others only increase (unless they
5332 bit unsigned numbers, and on a very busy or long-lived system they 51overflow and wrap). Yes, these are (32-bit or 64-bit) unsigned long
52(native word size) numbers, and on a very busy or long-lived system they
54may wrap. Applications should be prepared to deal with that; unless 53may wrap. Applications should be prepared to deal with that; unless
55your observations are measured in large numbers of minutes or hours, 54your observations are measured in large numbers of minutes or hours,
56they should not wrap twice before you notice them. 55they should not wrap twice before you notice them.
@@ -96,11 +95,11 @@ introduced when changes collide, so (for instance) adding up all the
96read I/Os issued per partition should equal those made to the disks ... 95read I/Os issued per partition should equal those made to the disks ...
97but due to the lack of locking it may only be very close. 96but due to the lack of locking it may only be very close.
98 97
99In 2.6, there are counters for each cpu, which made the lack of locking 98In 2.6, there are counters for each CPU, which make the lack of locking
100almost a non-issue. When the statistics are read, the per-cpu counters 99almost a non-issue. When the statistics are read, the per-CPU counters
101are summed (possibly overflowing the unsigned 32-bit variable they are 100are summed (possibly overflowing the unsigned long variable they are
102summed to) and the result given to the user. There is no convenient 101summed to) and the result given to the user. There is no convenient
103user interface for accessing the per-cpu counters themselves. 102user interface for accessing the per-CPU counters themselves.
104 103
105Disks vs Partitions 104Disks vs Partitions
106------------------- 105-------------------
diff --git a/Documentation/irqflags-tracing.txt b/Documentation/irqflags-tracing.txt
index 6a444877ee0b..67aa71e73035 100644
--- a/Documentation/irqflags-tracing.txt
+++ b/Documentation/irqflags-tracing.txt
@@ -53,5 +53,5 @@ implementation in an architecture: lockdep will detect that and will
53turn itself off. I.e. the lock validator will still be reliable. There 53turn itself off. I.e. the lock validator will still be reliable. There
54should be no crashes due to irq-tracing bugs. (except if the assembly 54should be no crashes due to irq-tracing bugs. (except if the assembly
55changes break other code by modifying conditions or registers that 55changes break other code by modifying conditions or registers that
56shouldnt be) 56shouldn't be)
57 57
diff --git a/Documentation/isdn/INTERFACE.CAPI b/Documentation/isdn/INTERFACE.CAPI
index 309eb5ed942b..1688b5a1fd77 100644
--- a/Documentation/isdn/INTERFACE.CAPI
+++ b/Documentation/isdn/INTERFACE.CAPI
@@ -240,7 +240,7 @@ Functions capi_cmsg2message() and capi_message2cmsg() are provided to convert
240messages between their transport encoding described in the CAPI 2.0 standard 240messages between their transport encoding described in the CAPI 2.0 standard
241and their _cmsg structure representation. Note that capi_cmsg2message() does 241and their _cmsg structure representation. Note that capi_cmsg2message() does
242not know or check the size of its destination buffer. The caller must make 242not know or check the size of its destination buffer. The caller must make
243sure it is big enough to accomodate the resulting CAPI message. 243sure it is big enough to accommodate the resulting CAPI message.
244 244
245 245
2465. Lower Layer Interface Functions 2465. Lower Layer Interface Functions
diff --git a/Documentation/kbuild/kbuild.txt b/Documentation/kbuild/kbuild.txt
index 8f63b224ab09..7c2a89ba674c 100644
--- a/Documentation/kbuild/kbuild.txt
+++ b/Documentation/kbuild/kbuild.txt
@@ -26,11 +26,11 @@ Additional options to the assembler (for built-in and modules).
26 26
27AFLAGS_MODULE 27AFLAGS_MODULE
28-------------------------------------------------- 28--------------------------------------------------
29Addtional module specific options to use for $(AS). 29Additional module specific options to use for $(AS).
30 30
31AFLAGS_KERNEL 31AFLAGS_KERNEL
32-------------------------------------------------- 32--------------------------------------------------
33Addtional options for $(AS) when used for assembler 33Additional options for $(AS) when used for assembler
34code for code that is compiled as built-in. 34code for code that is compiled as built-in.
35 35
36KCFLAGS 36KCFLAGS
@@ -39,12 +39,12 @@ Additional options to the C compiler (for built-in and modules).
39 39
40CFLAGS_KERNEL 40CFLAGS_KERNEL
41-------------------------------------------------- 41--------------------------------------------------
42Addtional options for $(CC) when used to compile 42Additional options for $(CC) when used to compile
43code that is compiled as built-in. 43code that is compiled as built-in.
44 44
45CFLAGS_MODULE 45CFLAGS_MODULE
46-------------------------------------------------- 46--------------------------------------------------
47Addtional module specific options to use for $(CC). 47Additional module specific options to use for $(CC).
48 48
49LDFLAGS_MODULE 49LDFLAGS_MODULE
50-------------------------------------------------- 50--------------------------------------------------
@@ -196,3 +196,8 @@ to be included in the databases, separated by blank space. E.g.:
196To get all available archs you can also specify all. E.g.: 196To get all available archs you can also specify all. E.g.:
197 197
198 $ make ALLSOURCE_ARCHS=all tags 198 $ make ALLSOURCE_ARCHS=all tags
199
200KBUILD_ENABLE_EXTRA_GCC_CHECKS
201--------------------------------------------------
202If enabled over the make command line with "W=1", it turns on additional
203gcc -W... options for more extensive build-time checking.
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index d18a9e12152a..cc85a9278190 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -699,7 +699,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
699 ekgdboc= [X86,KGDB] Allow early kernel console debugging 699 ekgdboc= [X86,KGDB] Allow early kernel console debugging
700 ekgdboc=kbd 700 ekgdboc=kbd
701 701
702 This is desgined to be used in conjunction with 702 This is designed to be used in conjunction with
703 the boot argument: earlyprintk=vga 703 the boot argument: earlyprintk=vga
704 704
705 edd= [EDD] 705 edd= [EDD]
@@ -872,6 +872,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
872 If specified, z/VM IUCV HVC accepts connections 872 If specified, z/VM IUCV HVC accepts connections
873 from listed z/VM user IDs only. 873 from listed z/VM user IDs only.
874 874
875 keep_bootcon [KNL]
876 Do not unregister boot console at start. This is only
877 useful for debugging when something happens in the window
878 between unregistering the boot console and initializing
879 the real console.
880
875 i2c_bus= [HW] Override the default board specific I2C bus speed 881 i2c_bus= [HW] Override the default board specific I2C bus speed
876 or register an additional I2C bus that is not 882 or register an additional I2C bus that is not
877 registered from board initialization code. 883 registered from board initialization code.
@@ -1597,11 +1603,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1597 Format: [state][,regs][,debounce][,die] 1603 Format: [state][,regs][,debounce][,die]
1598 1604
1599 nmi_watchdog= [KNL,BUGS=X86] Debugging features for SMP kernels 1605 nmi_watchdog= [KNL,BUGS=X86] Debugging features for SMP kernels
1600 Format: [panic,][num] 1606 Format: [panic,][nopanic,][num]
1601 Valid num: 0 1607 Valid num: 0
1602 0 - turn nmi_watchdog off 1608 0 - turn nmi_watchdog off
1603 When panic is specified, panic when an NMI watchdog 1609 When panic is specified, panic when an NMI watchdog
1604 timeout occurs. 1610 timeout occurs (or 'nopanic' to override the opposite
1611 default).
1605 This is useful when you use a panic=... timeout and 1612 This is useful when you use a panic=... timeout and
1606 need the box quickly up again. 1613 need the box quickly up again.
1607 1614
@@ -1825,10 +1832,17 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1825 perfmon on Intel CPUs instead of the 1832 perfmon on Intel CPUs instead of the
1826 CPU specific event set. 1833 CPU specific event set.
1827 1834
1835 oops=panic Always panic on oopses. Default is to just kill the
1836 process, but there is a small probability of
1837 deadlocking the machine.
1838 This will also cause panics on machine check exceptions.
1839 Useful together with panic=30 to trigger a reboot.
1840
1828 OSS [HW,OSS] 1841 OSS [HW,OSS]
1829 See Documentation/sound/oss/oss-parameters.txt 1842 See Documentation/sound/oss/oss-parameters.txt
1830 1843
1831 panic= [KNL] Kernel behaviour on panic 1844 panic= [KNL] Kernel behaviour on panic: delay <timeout>
1845 seconds before rebooting
1832 Format: <timeout> 1846 Format: <timeout>
1833 1847
1834 parkbd.port= [HW] Parallel port number the keyboard adapter is 1848 parkbd.port= [HW] Parallel port number the keyboard adapter is
@@ -2331,6 +2345,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2331 2345
2332 softlockup_panic= 2346 softlockup_panic=
2333 [KNL] Should the soft-lockup detector generate panics. 2347 [KNL] Should the soft-lockup detector generate panics.
2348 Format: <integer>
2334 2349
2335 sonypi.*= [HW] Sony Programmable I/O Control Device driver 2350 sonypi.*= [HW] Sony Programmable I/O Control Device driver
2336 See Documentation/sonypi.txt 2351 See Documentation/sonypi.txt
@@ -2463,8 +2478,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2463 topology= [S390] 2478 topology= [S390]
2464 Format: {off | on} 2479 Format: {off | on}
2465 Specify if the kernel should make use of the cpu 2480 Specify if the kernel should make use of the cpu
2466 topology informations if the hardware supports these. 2481 topology information if the hardware supports this.
2467 The scheduler will make use of these informations and 2482 The scheduler will make use of this information and
2468 e.g. base its process migration decisions on it. 2483 e.g. base its process migration decisions on it.
2469 Default is on. 2484 Default is on.
2470 2485
@@ -2517,8 +2532,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2517 reported either. 2532 reported either.
2518 2533
2519 unknown_nmi_panic 2534 unknown_nmi_panic
2520 [X86] 2535 [X86] Cause panic on unknown NMI.
2521 Set unknown_nmi_panic=1 early on boot.
2522 2536
2523 usbcore.autosuspend= 2537 usbcore.autosuspend=
2524 [USB] The autosuspend time delay (in seconds) used 2538 [USB] The autosuspend time delay (in seconds) used
diff --git a/Documentation/kmemleak.txt b/Documentation/kmemleak.txt
index 34f6638aa5ac..090e6ee04536 100644
--- a/Documentation/kmemleak.txt
+++ b/Documentation/kmemleak.txt
@@ -11,6 +11,7 @@ with the difference that the orphan objects are not freed but only
11reported via /sys/kernel/debug/kmemleak. A similar method is used by the 11reported via /sys/kernel/debug/kmemleak. A similar method is used by the
12Valgrind tool (memcheck --leak-check) to detect the memory leaks in 12Valgrind tool (memcheck --leak-check) to detect the memory leaks in
13user-space applications. 13user-space applications.
14Kmemleak is supported on x86, arm, powerpc, sparc, sh, microblaze and tile.
14 15
15Usage 16Usage
16----- 17-----
@@ -178,5 +179,4 @@ block doesn't need to be freed (some cases in the init_call functions),
178the pointer is calculated by other methods than the usual container_of 179the pointer is calculated by other methods than the usual container_of
179macro or the pointer is stored in a location not scanned by kmemleak. 180macro or the pointer is stored in a location not scanned by kmemleak.
180 181
181Page allocations and ioremap are not tracked. Only the ARM and x86 182Page allocations and ioremap are not tracked.
182architectures are currently supported.
diff --git a/Documentation/kvm/mmu.txt b/Documentation/kvm/mmu.txt
index 142cc5136650..f46aa58389ca 100644
--- a/Documentation/kvm/mmu.txt
+++ b/Documentation/kvm/mmu.txt
@@ -23,7 +23,7 @@ The mmu code attempts to satisfy the following requirements:
23 and framebuffer-based displays 23 and framebuffer-based displays
24- footprint: keep the amount of pinned kernel memory low (most memory 24- footprint: keep the amount of pinned kernel memory low (most memory
25 should be shrinkable) 25 should be shrinkable)
26- reliablity: avoid multipage or GFP_ATOMIC allocations 26- reliability: avoid multipage or GFP_ATOMIC allocations
27 27
28Acronyms 28Acronyms
29======== 29========
diff --git a/Documentation/kvm/ppc-pv.txt b/Documentation/kvm/ppc-pv.txt
index a7f2244b3be9..3ab969c59046 100644
--- a/Documentation/kvm/ppc-pv.txt
+++ b/Documentation/kvm/ppc-pv.txt
@@ -136,7 +136,7 @@ Patched instructions
136==================== 136====================
137 137
138The "ld" and "std" instructions are transormed to "lwz" and "stw" instructions 138The "ld" and "std" instructions are transormed to "lwz" and "stw" instructions
139respectively on 32 bit systems with an added offset of 4 to accomodate for big 139respectively on 32 bit systems with an added offset of 4 to accommodate for big
140endianness. 140endianness.
141 141
142The following is a list of mapping the Linux kernel performs when running as 142The following is a list of mapping the Linux kernel performs when running as
diff --git a/Documentation/kvm/timekeeping.txt b/Documentation/kvm/timekeeping.txt
index 0c5033a58c9e..df8946377cb6 100644
--- a/Documentation/kvm/timekeeping.txt
+++ b/Documentation/kvm/timekeeping.txt
@@ -81,7 +81,7 @@ Mode 0: Single Timeout. This is a one-shot software timeout that counts down
81 when the gate is high (always true for timers 0 and 1). When the count 81 when the gate is high (always true for timers 0 and 1). When the count
82 reaches zero, the output goes high. 82 reaches zero, the output goes high.
83 83
84Mode 1: Triggered One-shot. The output is intially set high. When the gate 84Mode 1: Triggered One-shot. The output is initially set high. When the gate
85 line is set high, a countdown is initiated (which does not stop if the gate is 85 line is set high, a countdown is initiated (which does not stop if the gate is
86 lowered), during which the output is set low. When the count reaches zero, 86 lowered), during which the output is set low. When the count reaches zero,
87 the output goes high. 87 the output goes high.
diff --git a/Documentation/laptops/asus-laptop.txt b/Documentation/laptops/asus-laptop.txt
index c1c5be84e4b1..803e51f6768b 100644
--- a/Documentation/laptops/asus-laptop.txt
+++ b/Documentation/laptops/asus-laptop.txt
@@ -61,7 +61,7 @@ Usage
61 Hotkeys are also reported as input keys (like keyboards) you can check 61 Hotkeys are also reported as input keys (like keyboards) you can check
62 which key are supported using "xev" under X11. 62 which key are supported using "xev" under X11.
63 63
64 You can get informations on the version of your DSDT table by reading the 64 You can get information on the version of your DSDT table by reading the
65 /sys/devices/platform/asus-laptop/infos entry. If you have a question or a 65 /sys/devices/platform/asus-laptop/infos entry. If you have a question or a
66 bug report to do, please include the output of this entry. 66 bug report to do, please include the output of this entry.
67 67
@@ -178,7 +178,7 @@ LED display
178----------- 178-----------
179 179
180 Some models like the W1N have a LED display that can be used to display 180 Some models like the W1N have a LED display that can be used to display
181 several informations. 181 several items of information.
182 182
183 LED display works for the following models: 183 LED display works for the following models:
184 W1000N 184 W1000N
diff --git a/Documentation/hwmon/hpfall.c b/Documentation/laptops/hpfall.c
index a4a8fc5d05d4..a4a8fc5d05d4 100644
--- a/Documentation/hwmon/hpfall.c
+++ b/Documentation/laptops/hpfall.c
diff --git a/Documentation/laptops/sony-laptop.txt b/Documentation/laptops/sony-laptop.txt
index 23ce7d350d1a..2bd4e82e5d9f 100644
--- a/Documentation/laptops/sony-laptop.txt
+++ b/Documentation/laptops/sony-laptop.txt
@@ -14,7 +14,8 @@ Some models report hotkeys through the SNC or SPIC devices, such events are
14reported both through the ACPI subsystem as acpi events and through the INPUT 14reported both through the ACPI subsystem as acpi events and through the INPUT
15subsystem. See the logs of acpid or /proc/acpi/event and 15subsystem. See the logs of acpid or /proc/acpi/event and
16/proc/bus/input/devices to find out what those events are and which input 16/proc/bus/input/devices to find out what those events are and which input
17devices are created by the driver. 17devices are created by the driver. Additionally, loading the driver with the
18debug option will report all events in the kernel log.
18 19
19Backlight control: 20Backlight control:
20------------------ 21------------------
@@ -64,6 +65,16 @@ powers off the sound card,
64 # echo "1" > /sys/devices/platform/sony-laptop/audiopower 65 # echo "1" > /sys/devices/platform/sony-laptop/audiopower
65powers on the sound card. 66powers on the sound card.
66 67
68
69RFkill control:
70---------------
71More recent Vaio models expose a consistent set of ACPI methods to
72control radio frequency emitting devices. If you are a lucky owner of
73such a laptop you will find the necessary rfkill devices under
74/sys/class/rfkill. Check those starting with sony-* in
75 # grep . /sys/class/rfkill/*/{state,name}
76
77
67Development: 78Development:
68------------ 79------------
69 80
@@ -75,8 +86,21 @@ pass the option 'debug=1'.
75REPEAT: DON'T DO THIS IF YOU DON'T LIKE RISKY BUSINESS. 86REPEAT: DON'T DO THIS IF YOU DON'T LIKE RISKY BUSINESS.
76 87
77In your kernel logs you will find the list of all ACPI methods 88In your kernel logs you will find the list of all ACPI methods
78the SNC device has on your laptop. You can see the GCDP/GCDP methods 89the SNC device has on your laptop.
79used to pwer on/off the CD drive, but there are others. 90
91* For new models you will see a long list of meaningless method names,
92reading the DSDT table source should reveal that:
93(1) the SNC device uses an internal capability lookup table
94(2) SN00 is used to find values in the lookup table
95(3) SN06 and SN07 are used to call into the real methods based on
96 offsets you can obtain iterating the table using SN00
97(4) SN02 used to enable events.
98Some values in the capability lookup table are more or less known, see
99the code for all sony_call_snc_handle calls, others are more obscure.
100
101* For old models you can see the GCDP/GCDP methods used to pwer on/off
102the CD drive, but there are others and they are usually different from
103model to model.
80 104
81I HAVE NO IDEA WHAT THOSE METHODS DO. 105I HAVE NO IDEA WHAT THOSE METHODS DO.
82 106
@@ -108,9 +132,8 @@ Bugs/Limitations:
108 laptop, including permanent damage. 132 laptop, including permanent damage.
109 133
110* The sony-laptop and sonypi drivers do not interact at all. In the 134* The sony-laptop and sonypi drivers do not interact at all. In the
111 future, sonypi could use sony-laptop to do (part of) its business. 135 future, sonypi will be removed and replaced by sony-laptop.
112 136
113* spicctrl, which is the userspace tool used to communicate with the 137* spicctrl, which is the userspace tool used to communicate with the
114 sonypi driver (through /dev/sonypi) does not try to use the 138 sonypi driver (through /dev/sonypi) is deprecated as well since all
115 sony-laptop driver. In the future, spicctrl could try sonypi first, 139 its features are now available under the sysfs tree via sony-laptop.
116 and if it isn't present, try sony-laptop instead.
diff --git a/Documentation/leds/00-INDEX b/Documentation/leds/00-INDEX
new file mode 100644
index 000000000000..29f481df32c7
--- /dev/null
+++ b/Documentation/leds/00-INDEX
@@ -0,0 +1,8 @@
1leds-class.txt
2 - documents LED handling under Linux.
3leds-lp3944.txt
4 - notes on how to use the leds-lp3944 driver.
5leds-lp5521.txt
6 - notes on how to use the leds-lp5521 driver.
7leds-lp5523.txt
8 - notes on how to use the leds-lp5523 driver.
diff --git a/Documentation/leds-class.txt b/Documentation/leds/leds-class.txt
index 58b266bd1846..4996586e27e8 100644
--- a/Documentation/leds-class.txt
+++ b/Documentation/leds/leds-class.txt
@@ -95,4 +95,3 @@ There are a number of cases where a trigger might only be mappable to a
95particular LED (ACPI?). The addition of triggers provided by the LED driver 95particular LED (ACPI?). The addition of triggers provided by the LED driver
96should cover this option and be possible to add without breaking the 96should cover this option and be possible to add without breaking the
97current interface. 97current interface.
98
diff --git a/Documentation/leds-lp3944.txt b/Documentation/leds/leds-lp3944.txt
index c6eda18b15ef..c6eda18b15ef 100644
--- a/Documentation/leds-lp3944.txt
+++ b/Documentation/leds/leds-lp3944.txt
diff --git a/Documentation/md.txt b/Documentation/md.txt
index a81c7b4790f2..2366b1c8cf19 100644
--- a/Documentation/md.txt
+++ b/Documentation/md.txt
@@ -552,6 +552,16 @@ also have
552 within the array where IO will be blocked. This is currently 552 within the array where IO will be blocked. This is currently
553 only supported for raid4/5/6. 553 only supported for raid4/5/6.
554 554
555 sync_min
556 sync_max
557 The two values, given as numbers of sectors, indicate a range
558 withing the array where 'check'/'repair' will operate. Must be
559 a multiple of chunk_size. When it reaches "sync_max" it will
560 pause, rather than complete.
561 You can use 'select' or 'poll' on "sync_completed" to wait for
562 that number to reach sync_max. Then you can either increase
563 "sync_max", or can write 'idle' to "sync_action".
564
555 565
556Each active md device may also have attributes specific to the 566Each active md device may also have attributes specific to the
557personality module that manages it. 567personality module that manages it.
diff --git a/Documentation/media-framework.txt b/Documentation/media-framework.txt
new file mode 100644
index 000000000000..76a2087db205
--- /dev/null
+++ b/Documentation/media-framework.txt
@@ -0,0 +1,353 @@
1Linux kernel media framework
2============================
3
4This document describes the Linux kernel media framework, its data structures,
5functions and their usage.
6
7
8Introduction
9------------
10
11The media controller API is documented in DocBook format in
12Documentation/DocBook/v4l/media-controller.xml. This document will focus on
13the kernel-side implementation of the media framework.
14
15
16Abstract media device model
17---------------------------
18
19Discovering a device internal topology, and configuring it at runtime, is one
20of the goals of the media framework. To achieve this, hardware devices are
21modeled as an oriented graph of building blocks called entities connected
22through pads.
23
24An entity is a basic media hardware building block. It can correspond to
25a large variety of logical blocks such as physical hardware devices
26(CMOS sensor for instance), logical hardware devices (a building block
27in a System-on-Chip image processing pipeline), DMA channels or physical
28connectors.
29
30A pad is a connection endpoint through which an entity can interact with
31other entities. Data (not restricted to video) produced by an entity
32flows from the entity's output to one or more entity inputs. Pads should
33not be confused with physical pins at chip boundaries.
34
35A link is a point-to-point oriented connection between two pads, either
36on the same entity or on different entities. Data flows from a source
37pad to a sink pad.
38
39
40Media device
41------------
42
43A media device is represented by a struct media_device instance, defined in
44include/media/media-device.h. Allocation of the structure is handled by the
45media device driver, usually by embedding the media_device instance in a
46larger driver-specific structure.
47
48Drivers register media device instances by calling
49
50 media_device_register(struct media_device *mdev);
51
52The caller is responsible for initializing the media_device structure before
53registration. The following fields must be set:
54
55 - dev must point to the parent device (usually a pci_dev, usb_interface or
56 platform_device instance).
57
58 - model must be filled with the device model name as a NUL-terminated UTF-8
59 string. The device/model revision must not be stored in this field.
60
61The following fields are optional:
62
63 - serial is a unique serial number stored as a NUL-terminated ASCII string.
64 The field is big enough to store a GUID in text form. If the hardware
65 doesn't provide a unique serial number this field must be left empty.
66
67 - bus_info represents the location of the device in the system as a
68 NUL-terminated ASCII string. For PCI/PCIe devices bus_info must be set to
69 "PCI:" (or "PCIe:") followed by the value of pci_name(). For USB devices,
70 the usb_make_path() function must be used. This field is used by
71 applications to distinguish between otherwise identical devices that don't
72 provide a serial number.
73
74 - hw_revision is the hardware device revision in a driver-specific format.
75 When possible the revision should be formatted with the KERNEL_VERSION
76 macro.
77
78 - driver_version is formatted with the KERNEL_VERSION macro. The version
79 minor must be incremented when new features are added to the userspace API
80 without breaking binary compatibility. The version major must be
81 incremented when binary compatibility is broken.
82
83Upon successful registration a character device named media[0-9]+ is created.
84The device major and minor numbers are dynamic. The model name is exported as
85a sysfs attribute.
86
87Drivers unregister media device instances by calling
88
89 media_device_unregister(struct media_device *mdev);
90
91Unregistering a media device that hasn't been registered is *NOT* safe.
92
93
94Entities, pads and links
95------------------------
96
97- Entities
98
99Entities are represented by a struct media_entity instance, defined in
100include/media/media-entity.h. The structure is usually embedded into a
101higher-level structure, such as a v4l2_subdev or video_device instance,
102although drivers can allocate entities directly.
103
104Drivers initialize entities by calling
105
106 media_entity_init(struct media_entity *entity, u16 num_pads,
107 struct media_pad *pads, u16 extra_links);
108
109The media_entity name, type, flags, revision and group_id fields can be
110initialized before or after calling media_entity_init. Entities embedded in
111higher-level standard structures can have some of those fields set by the
112higher-level framework.
113
114As the number of pads is known in advance, the pads array is not allocated
115dynamically but is managed by the entity driver. Most drivers will embed the
116pads array in a driver-specific structure, avoiding dynamic allocation.
117
118Drivers must set the direction of every pad in the pads array before calling
119media_entity_init. The function will initialize the other pads fields.
120
121Unlike the number of pads, the total number of links isn't always known in
122advance by the entity driver. As an initial estimate, media_entity_init
123pre-allocates a number of links equal to the number of pads plus an optional
124number of extra links. The links array will be reallocated if it grows beyond
125the initial estimate.
126
127Drivers register entities with a media device by calling
128
129 media_device_register_entity(struct media_device *mdev,
130 struct media_entity *entity);
131
132Entities are identified by a unique positive integer ID. Drivers can provide an
133ID by filling the media_entity id field prior to registration, or request the
134media controller framework to assign an ID automatically. Drivers that provide
135IDs manually must ensure that all IDs are unique. IDs are not guaranteed to be
136contiguous even when they are all assigned automatically by the framework.
137
138Drivers unregister entities by calling
139
140 media_device_unregister_entity(struct media_entity *entity);
141
142Unregistering an entity will not change the IDs of the other entities, and the
143ID will never be reused for a newly registered entity.
144
145When a media device is unregistered, all its entities are unregistered
146automatically. No manual entities unregistration is then required.
147
148Drivers free resources associated with an entity by calling
149
150 media_entity_cleanup(struct media_entity *entity);
151
152This function must be called during the cleanup phase after unregistering the
153entity. Note that the media_entity instance itself must be freed explicitly by
154the driver if required.
155
156Entities have flags that describe the entity capabilities and state.
157
158 MEDIA_ENT_FL_DEFAULT indicates the default entity for a given type.
159 This can be used to report the default audio and video devices or the
160 default camera sensor.
161
162Logical entity groups can be defined by setting the group ID of all member
163entities to the same non-zero value. An entity group serves no purpose in the
164kernel, but is reported to userspace during entities enumeration. The group_id
165field belongs to the media device driver and must not by touched by entity
166drivers.
167
168Media device drivers should define groups if several entities are logically
169bound together. Example usages include reporting
170
171 - ALSA, VBI and video nodes that carry the same media stream
172 - lens and flash controllers associated with a sensor
173
174- Pads
175
176Pads are represented by a struct media_pad instance, defined in
177include/media/media-entity.h. Each entity stores its pads in a pads array
178managed by the entity driver. Drivers usually embed the array in a
179driver-specific structure.
180
181Pads are identified by their entity and their 0-based index in the pads array.
182Both information are stored in the media_pad structure, making the media_pad
183pointer the canonical way to store and pass link references.
184
185Pads have flags that describe the pad capabilities and state.
186
187 MEDIA_PAD_FL_SINK indicates that the pad supports sinking data.
188 MEDIA_PAD_FL_SOURCE indicates that the pad supports sourcing data.
189
190One and only one of MEDIA_PAD_FL_SINK and MEDIA_PAD_FL_SOURCE must be set for
191each pad.
192
193- Links
194
195Links are represented by a struct media_link instance, defined in
196include/media/media-entity.h. Each entity stores all links originating at or
197targeting any of its pads in a links array. A given link is thus stored
198twice, once in the source entity and once in the target entity. The array is
199pre-allocated and grows dynamically as needed.
200
201Drivers create links by calling
202
203 media_entity_create_link(struct media_entity *source, u16 source_pad,
204 struct media_entity *sink, u16 sink_pad,
205 u32 flags);
206
207An entry in the link array of each entity is allocated and stores pointers
208to source and sink pads.
209
210Links have flags that describe the link capabilities and state.
211
212 MEDIA_LNK_FL_ENABLED indicates that the link is enabled and can be used
213 to transfer media data. When two or more links target a sink pad, only
214 one of them can be enabled at a time.
215 MEDIA_LNK_FL_IMMUTABLE indicates that the link enabled state can't be
216 modified at runtime. If MEDIA_LNK_FL_IMMUTABLE is set, then
217 MEDIA_LNK_FL_ENABLED must also be set since an immutable link is always
218 enabled.
219
220
221Graph traversal
222---------------
223
224The media framework provides APIs to iterate over entities in a graph.
225
226To iterate over all entities belonging to a media device, drivers can use the
227media_device_for_each_entity macro, defined in include/media/media-device.h.
228
229 struct media_entity *entity;
230
231 media_device_for_each_entity(entity, mdev) {
232 /* entity will point to each entity in turn */
233 ...
234 }
235
236Drivers might also need to iterate over all entities in a graph that can be
237reached only through enabled links starting at a given entity. The media
238framework provides a depth-first graph traversal API for that purpose.
239
240Note that graphs with cycles (whether directed or undirected) are *NOT*
241supported by the graph traversal API. To prevent infinite loops, the graph
242traversal code limits the maximum depth to MEDIA_ENTITY_ENUM_MAX_DEPTH,
243currently defined as 16.
244
245Drivers initiate a graph traversal by calling
246
247 media_entity_graph_walk_start(struct media_entity_graph *graph,
248 struct media_entity *entity);
249
250The graph structure, provided by the caller, is initialized to start graph
251traversal at the given entity.
252
253Drivers can then retrieve the next entity by calling
254
255 media_entity_graph_walk_next(struct media_entity_graph *graph);
256
257When the graph traversal is complete the function will return NULL.
258
259Graph traversal can be interrupted at any moment. No cleanup function call is
260required and the graph structure can be freed normally.
261
262Helper functions can be used to find a link between two given pads, or a pad
263connected to another pad through an enabled link
264
265 media_entity_find_link(struct media_pad *source,
266 struct media_pad *sink);
267
268 media_entity_remote_source(struct media_pad *pad);
269
270Refer to the kerneldoc documentation for more information.
271
272
273Use count and power handling
274----------------------------
275
276Due to the wide differences between drivers regarding power management needs,
277the media controller does not implement power management. However, the
278media_entity structure includes a use_count field that media drivers can use to
279track the number of users of every entity for power management needs.
280
281The use_count field is owned by media drivers and must not be touched by entity
282drivers. Access to the field must be protected by the media device graph_mutex
283lock.
284
285
286Links setup
287-----------
288
289Link properties can be modified at runtime by calling
290
291 media_entity_setup_link(struct media_link *link, u32 flags);
292
293The flags argument contains the requested new link flags.
294
295The only configurable property is the ENABLED link flag to enable/disable a
296link. Links marked with the IMMUTABLE link flag can not be enabled or disabled.
297
298When a link is enabled or disabled, the media framework calls the
299link_setup operation for the two entities at the source and sink of the link,
300in that order. If the second link_setup call fails, another link_setup call is
301made on the first entity to restore the original link flags.
302
303Media device drivers can be notified of link setup operations by setting the
304media_device::link_notify pointer to a callback function. If provided, the
305notification callback will be called before enabling and after disabling
306links.
307
308Entity drivers must implement the link_setup operation if any of their links
309is non-immutable. The operation must either configure the hardware or store
310the configuration information to be applied later.
311
312Link configuration must not have any side effect on other links. If an enabled
313link at a sink pad prevents another link at the same pad from being disabled,
314the link_setup operation must return -EBUSY and can't implicitly disable the
315first enabled link.
316
317
318Pipelines and media streams
319---------------------------
320
321When starting streaming, drivers must notify all entities in the pipeline to
322prevent link states from being modified during streaming by calling
323
324 media_entity_pipeline_start(struct media_entity *entity,
325 struct media_pipeline *pipe);
326
327The function will mark all entities connected to the given entity through
328enabled links, either directly or indirectly, as streaming.
329
330The media_pipeline instance pointed to by the pipe argument will be stored in
331every entity in the pipeline. Drivers should embed the media_pipeline structure
332in higher-level pipeline structures and can then access the pipeline through
333the media_entity pipe field.
334
335Calls to media_entity_pipeline_start() can be nested. The pipeline pointer must
336be identical for all nested calls to the function.
337
338When stopping the stream, drivers must notify the entities with
339
340 media_entity_pipeline_stop(struct media_entity *entity);
341
342If multiple calls to media_entity_pipeline_start() have been made the same
343number of media_entity_pipeline_stop() calls are required to stop streaming. The
344media_entity pipe field is reset to NULL on the last nested stop call.
345
346Link configuration will fail with -EBUSY by default if either end of the link is
347a streaming entity. Links that can be modified while streaming must be marked
348with the MEDIA_LNK_FL_DYNAMIC flag.
349
350If other operations need to be disallowed on streaming entities (such as
351changing entities configuration parameters) drivers can explicitly check the
352media_entity stream_count field to find out if an entity is streaming. This
353operation must be done with the media_device graph_mutex held.
diff --git a/Documentation/mips/AU1xxx_IDE.README b/Documentation/mips/AU1xxx_IDE.README
index 8ace35ebdcd5..cc887ecfd6eb 100644
--- a/Documentation/mips/AU1xxx_IDE.README
+++ b/Documentation/mips/AU1xxx_IDE.README
@@ -39,13 +39,13 @@ Note: for more information, please refer "AMD Alchemy Au1200/Au1550 IDE
39 Interface and Linux Device Driver" Application Note. 39 Interface and Linux Device Driver" Application Note.
40 40
41 41
42FILES, CONFIGS AND COMPATABILITY 42FILES, CONFIGS AND COMPATIBILITY
43-------------------------------- 43--------------------------------
44 44
45Two files are introduced: 45Two files are introduced:
46 46
47 a) 'arch/mips/include/asm/mach-au1x00/au1xxx_ide.h' 47 a) 'arch/mips/include/asm/mach-au1x00/au1xxx_ide.h'
48 containes : struct _auide_hwif 48 contains : struct _auide_hwif
49 timing parameters for PIO mode 0/1/2/3/4 49 timing parameters for PIO mode 0/1/2/3/4
50 timing parameters for MWDMA 0/1/2 50 timing parameters for MWDMA 0/1/2
51 51
diff --git a/Documentation/misc-devices/ics932s401 b/Documentation/misc-devices/ics932s401
index 07a739f406d8..bdac67ff6e3f 100644
--- a/Documentation/misc-devices/ics932s401
+++ b/Documentation/misc-devices/ics932s401
@@ -5,7 +5,7 @@ Supported chips:
5 * IDT ICS932S401 5 * IDT ICS932S401
6 Prefix: 'ics932s401' 6 Prefix: 'ics932s401'
7 Addresses scanned: I2C 0x69 7 Addresses scanned: I2C 0x69
8 Datasheet: Publically available at the IDT website 8 Datasheet: Publicly available at the IDT website
9 9
10Author: Darrick J. Wong 10Author: Darrick J. Wong
11 11
diff --git a/Documentation/hwmon/lis3lv02d b/Documentation/misc-devices/lis3lv02d
index 06534f25e643..f1a4ec840f86 100644
--- a/Documentation/hwmon/lis3lv02d
+++ b/Documentation/misc-devices/lis3lv02d
@@ -17,8 +17,8 @@ Description
17This driver provides support for the accelerometer found in various HP laptops 17This driver provides support for the accelerometer found in various HP laptops
18sporting the feature officially called "HP Mobile Data Protection System 3D" or 18sporting the feature officially called "HP Mobile Data Protection System 3D" or
19"HP 3D DriveGuard". It detects automatically laptops with this sensor. Known 19"HP 3D DriveGuard". It detects automatically laptops with this sensor. Known
20models (full list can be found in drivers/hwmon/hp_accel.c) will have their 20models (full list can be found in drivers/platform/x86/hp_accel.c) will have
21axis automatically oriented on standard way (eg: you can directly play 21their axis automatically oriented on standard way (eg: you can directly play
22neverball). The accelerometer data is readable via 22neverball). The accelerometer data is readable via
23/sys/devices/platform/lis3lv02d. Reported values are scaled 23/sys/devices/platform/lis3lv02d. Reported values are scaled
24to mg values (1/1000th of earth gravity). 24to mg values (1/1000th of earth gravity).
diff --git a/Documentation/misc-devices/spear-pcie-gadget.txt b/Documentation/misc-devices/spear-pcie-gadget.txt
new file mode 100644
index 000000000000..02c13ef5e908
--- /dev/null
+++ b/Documentation/misc-devices/spear-pcie-gadget.txt
@@ -0,0 +1,130 @@
1Spear PCIe Gadget Driver:
2
3Author
4=============
5Pratyush Anand (pratyush.anand@st.com)
6
7Location
8============
9driver/misc/spear13xx_pcie_gadget.c
10
11Supported Chip:
12===================
13SPEAr1300
14SPEAr1310
15
16Menuconfig option:
17==========================
18Device Drivers
19 Misc devices
20 PCIe gadget support for SPEAr13XX platform
21purpose
22===========
23This driver has several nodes which can be read/written by configfs interface.
24Its main purpose is to configure selected dual mode PCIe controller as device
25and then program its various registers to configure it as a particular device
26type. This driver can be used to show spear's PCIe device capability.
27
28Description of different nodes:
29=================================
30
31read behavior of nodes:
32------------------------------
33link :gives ltssm status.
34int_type :type of supported interrupt
35no_of_msi :zero if MSI is not enabled by host. A positive value is the
36 number of MSI vector granted.
37vendor_id :returns programmed vendor id (hex)
38device_id :returns programmed device id(hex)
39bar0_size: :returns size of bar0 in hex.
40bar0_address :returns address of bar0 mapped area in hex.
41bar0_rw_offset :returns offset of bar0 for which bar0_data will return value.
42bar0_data :returns data at bar0_rw_offset.
43
44write behavior of nodes:
45------------------------------
46link :write UP to enable ltsmm DOWN to disable
47int_type :write interrupt type to be configured and (int_type could be
48 INTA, MSI or NO_INT). Select MSI only when you have programmed
49 no_of_msi node.
50no_of_msi :number of MSI vector needed.
51inta :write 1 to assert INTA and 0 to de-assert.
52send_msi :write MSI vector to be sent.
53vendor_id :write vendor id(hex) to be programmed.
54device_id :write device id(hex) to be programmed.
55bar0_size :write size of bar0 in hex. default bar0 size is 1000 (hex)
56 bytes.
57bar0_address :write address of bar0 mapped area in hex. (default mapping of
58 bar0 is SYSRAM1(E0800000). Always program bar size before bar
59 address. Kernel might modify bar size and address for alignment, so
60 read back bar size and address after writing to cross check.
61bar0_rw_offset :write offset of bar0 for which bar0_data will write value.
62bar0_data :write data to be written at bar0_rw_offset.
63
64Node programming example
65===========================
66Program all PCIe registers in such a way that when this device is connected
67to the PCIe host, then host sees this device as 1MB RAM.
68#mount -t configfs none /Config
69For nth PCIe Device Controller
70# cd /config/pcie_gadget.n/
71Now you have all the nodes in this directory.
72program vendor id as 0x104a
73# echo 104A >> vendor_id
74
75program device id as 0xCD80
76# echo CD80 >> device_id
77
78program BAR0 size as 1MB
79# echo 100000 >> bar0_size
80
81check for programmed bar0 size
82# cat bar0_size
83
84Program BAR0 Address as DDR (0x2100000). This is the physical address of
85memory, which is to be made visible to PCIe host. Similarly any other peripheral
86can also be made visible to PCIe host. E.g., if you program base address of UART
87as BAR0 address then when this device will be connected to a host, it will be
88visible as UART.
89# echo 2100000 >> bar0_address
90
91program interrupt type : INTA
92# echo INTA >> int_type
93
94go for link up now.
95# echo UP >> link
96
97It will have to be insured that, once link up is done on gadget, then only host
98is initialized and start to search PCIe devices on its port.
99
100/*wait till link is up*/
101# cat link
102wait till it returns UP.
103
104To assert INTA
105# echo 1 >> inta
106
107To de-assert INTA
108# echo 0 >> inta
109
110if MSI is to be used as interrupt, program no of msi vector needed (say4)
111# echo 4 >> no_of_msi
112
113select MSI as interrupt type
114# echo MSI >> int_type
115
116go for link up now
117# echo UP >> link
118
119wait till link is up
120# cat link
121An application can repetitively read this node till link is found UP. It can
122sleep between two read.
123
124wait till msi is enabled
125# cat no_of_msi
126Should return 4 (number of requested MSI vector)
127
128to send msi vector 2
129# echo 2 >> send_msi
130#cd -
diff --git a/Documentation/networking/3c359.txt b/Documentation/networking/3c359.txt
index 4af8071a6d18..dadfe8147ab8 100644
--- a/Documentation/networking/3c359.txt
+++ b/Documentation/networking/3c359.txt
@@ -45,7 +45,7 @@ debugging messages on, that must be done by modified the source code.
45 45
46Variable MTU size: 46Variable MTU size:
47 47
48The driver can handle a MTU size upto either 4500 or 18000 depending upon 48The driver can handle a MTU size up to either 4500 or 18000 depending upon
49ring speed. The driver also changes the size of the receive buffers as part 49ring speed. The driver also changes the size of the receive buffers as part
50of the mtu re-sizing, so if you set mtu = 18000, you will need to be able 50of the mtu re-sizing, so if you set mtu = 18000, you will need to be able
51to allocate 16 * (sk_buff with 18000 buffer size) call it 18500 bytes per ring 51to allocate 16 * (sk_buff with 18000 buffer size) call it 18500 bytes per ring
diff --git a/Documentation/networking/README.ipw2200 b/Documentation/networking/README.ipw2200
index 616a8e540b0b..b7658bed4906 100644
--- a/Documentation/networking/README.ipw2200
+++ b/Documentation/networking/README.ipw2200
@@ -256,7 +256,7 @@ You can set the debug level via:
256 256
257Where $VALUE would be a number in the case of this sysfs entry. The 257Where $VALUE would be a number in the case of this sysfs entry. The
258input to sysfs files does not have to be a number. For example, the 258input to sysfs files does not have to be a number. For example, the
259firmware loader used by hotplug utilizes sysfs entries for transfering 259firmware loader used by hotplug utilizes sysfs entries for transferring
260the firmware image from user space into the driver. 260the firmware image from user space into the driver.
261 261
262The Intel(R) PRO/Wireless 2915ABG Driver for Linux exposes sysfs entries 262The Intel(R) PRO/Wireless 2915ABG Driver for Linux exposes sysfs entries
diff --git a/Documentation/networking/batman-adv.txt b/Documentation/networking/batman-adv.txt
index 18afcd8afd51..ee496eb2f4a6 100644
--- a/Documentation/networking/batman-adv.txt
+++ b/Documentation/networking/batman-adv.txt
@@ -72,7 +72,7 @@ folder:
72# fragmentation gw_sel_class vis_mode 72# fragmentation gw_sel_class vis_mode
73 73
74 74
75There is a special folder for debugging informations: 75There is a special folder for debugging information:
76 76
77# ls /sys/kernel/debug/batman_adv/bat0/ 77# ls /sys/kernel/debug/batman_adv/bat0/
78# gateways socket transtable_global vis_data 78# gateways socket transtable_global vis_data
diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt
index b36e741e94db..e27202bb8d75 100644
--- a/Documentation/networking/bonding.txt
+++ b/Documentation/networking/bonding.txt
@@ -368,7 +368,7 @@ fail_over_mac
368 gratuitous ARP is lost, communication may be 368 gratuitous ARP is lost, communication may be
369 disrupted. 369 disrupted.
370 370
371 When this policy is used in conjuction with the mii 371 When this policy is used in conjunction with the mii
372 monitor, devices which assert link up prior to being 372 monitor, devices which assert link up prior to being
373 able to actually transmit and receive are particularly 373 able to actually transmit and receive are particularly
374 susceptible to loss of the gratuitous ARP, and an 374 susceptible to loss of the gratuitous ARP, and an
diff --git a/Documentation/networking/caif/Linux-CAIF.txt b/Documentation/networking/caif/Linux-CAIF.txt
index 7fe7a9a33a4f..e52fd62bef3a 100644
--- a/Documentation/networking/caif/Linux-CAIF.txt
+++ b/Documentation/networking/caif/Linux-CAIF.txt
@@ -136,7 +136,7 @@ The CAIF Protocol implementation contains:
136 - CFMUX CAIF Mux layer. Handles multiplexing between multiple 136 - CFMUX CAIF Mux layer. Handles multiplexing between multiple
137 physical bearers and multiple channels such as VEI, Datagram, etc. 137 physical bearers and multiple channels such as VEI, Datagram, etc.
138 The MUX keeps track of the existing CAIF Channels and 138 The MUX keeps track of the existing CAIF Channels and
139 Physical Instances and selects the apropriate instance based 139 Physical Instances and selects the appropriate instance based
140 on Channel-Id and Physical-ID. 140 on Channel-Id and Physical-ID.
141 141
142 - CFFRML CAIF Framing layer. Handles Framing i.e. Frame length 142 - CFFRML CAIF Framing layer. Handles Framing i.e. Frame length
diff --git a/Documentation/networking/caif/spi_porting.txt b/Documentation/networking/caif/spi_porting.txt
index 0cb8cb9098f4..9efd0687dc4c 100644
--- a/Documentation/networking/caif/spi_porting.txt
+++ b/Documentation/networking/caif/spi_porting.txt
@@ -150,7 +150,7 @@ static int sspi_init_xfer(struct cfspi_xfer *xfer, struct cfspi_dev *dev)
150void sspi_sig_xfer(bool xfer, struct cfspi_dev *dev) 150void sspi_sig_xfer(bool xfer, struct cfspi_dev *dev)
151{ 151{
152 /* If xfer is true then you should assert the SPI_INT to indicate to 152 /* If xfer is true then you should assert the SPI_INT to indicate to
153 * the master that you are ready to recieve the data from the master 153 * the master that you are ready to receive the data from the master
154 * SPI. If xfer is false then you should de-assert SPI_INT to indicate 154 * SPI. If xfer is false then you should de-assert SPI_INT to indicate
155 * that the transfer is done. 155 * that the transfer is done.
156 */ 156 */
diff --git a/Documentation/networking/can.txt b/Documentation/networking/can.txt
index 5b04b67ddca2..56ca3b75376e 100644
--- a/Documentation/networking/can.txt
+++ b/Documentation/networking/can.txt
@@ -240,7 +240,7 @@ solution for a couple of reasons:
240 the user application using the common CAN filter mechanisms. Inside 240 the user application using the common CAN filter mechanisms. Inside
241 this filter definition the (interested) type of errors may be 241 this filter definition the (interested) type of errors may be
242 selected. The reception of error frames is disabled by default. 242 selected. The reception of error frames is disabled by default.
243 The format of the CAN error frame is briefly decribed in the Linux 243 The format of the CAN error frame is briefly described in the Linux
244 header file "include/linux/can/error.h". 244 header file "include/linux/can/error.h".
245 245
2464. How to use Socket CAN 2464. How to use Socket CAN
diff --git a/Documentation/networking/ieee802154.txt b/Documentation/networking/ieee802154.txt
index 23c995e64032..f41ea2405220 100644
--- a/Documentation/networking/ieee802154.txt
+++ b/Documentation/networking/ieee802154.txt
@@ -9,7 +9,7 @@ The Linux-ZigBee project goal is to provide complete implementation
9of IEEE 802.15.4 / ZigBee / 6LoWPAN protocols. IEEE 802.15.4 is a stack 9of IEEE 802.15.4 / ZigBee / 6LoWPAN protocols. IEEE 802.15.4 is a stack
10of protocols for organizing Low-Rate Wireless Personal Area Networks. 10of protocols for organizing Low-Rate Wireless Personal Area Networks.
11 11
12Currently only IEEE 802.15.4 layer is implemented. We have choosen 12Currently only IEEE 802.15.4 layer is implemented. We have chosen
13to use plain Berkeley socket API, the generic Linux networking stack 13to use plain Berkeley socket API, the generic Linux networking stack
14to transfer IEEE 802.15.4 messages and a special protocol over genetlink 14to transfer IEEE 802.15.4 messages and a special protocol over genetlink
15for configuration/management 15for configuration/management
diff --git a/Documentation/networking/olympic.txt b/Documentation/networking/olympic.txt
index c65a94010ea8..b95b5bf96751 100644
--- a/Documentation/networking/olympic.txt
+++ b/Documentation/networking/olympic.txt
@@ -65,7 +65,7 @@ together.
65 65
66Variable MTU size: 66Variable MTU size:
67 67
68The driver can handle a MTU size upto either 4500 or 18000 depending upon 68The driver can handle a MTU size up to either 4500 or 18000 depending upon
69ring speed. The driver also changes the size of the receive buffers as part 69ring speed. The driver also changes the size of the receive buffers as part
70of the mtu re-sizing, so if you set mtu = 18000, you will need to be able 70of the mtu re-sizing, so if you set mtu = 18000, you will need to be able
71to allocate 16 * (sk_buff with 18000 buffer size) call it 18500 bytes per ring 71to allocate 16 * (sk_buff with 18000 buffer size) call it 18500 bytes per ring
diff --git a/Documentation/networking/packet_mmap.txt b/Documentation/networking/packet_mmap.txt
index 073894d1c093..4acea6603720 100644
--- a/Documentation/networking/packet_mmap.txt
+++ b/Documentation/networking/packet_mmap.txt
@@ -223,7 +223,7 @@ we will get the following buffer structure:
223 223
224A frame can be of any size with the only condition it can fit in a block. A block 224A frame can be of any size with the only condition it can fit in a block. A block
225can only hold an integer number of frames, or in other words, a frame cannot 225can only hold an integer number of frames, or in other words, a frame cannot
226be spawned accross two blocks, so there are some details you have to take into 226be spawned across two blocks, so there are some details you have to take into
227account when choosing the frame_size. See "Mapping and use of the circular 227account when choosing the frame_size. See "Mapping and use of the circular
228buffer (ring)". 228buffer (ring)".
229 229
diff --git a/Documentation/networking/s2io.txt b/Documentation/networking/s2io.txt
index 9d4e0f4df5a8..4be0c039edbc 100644
--- a/Documentation/networking/s2io.txt
+++ b/Documentation/networking/s2io.txt
@@ -37,7 +37,7 @@ To associate an interface with a physical adapter use "ethtool -p <ethX>".
37The corresponding adapter's LED will blink multiple times. 37The corresponding adapter's LED will blink multiple times.
38 38
393. Features supported: 393. Features supported:
40a. Jumbo frames. Xframe I/II supports MTU upto 9600 bytes, 40a. Jumbo frames. Xframe I/II supports MTU up to 9600 bytes,
41modifiable using ifconfig command. 41modifiable using ifconfig command.
42 42
43b. Offloads. Supports checksum offload(TCP/UDP/IP) on transmit 43b. Offloads. Supports checksum offload(TCP/UDP/IP) on transmit
@@ -49,7 +49,7 @@ significant performance improvement on certain platforms(SGI Altix,
49IBM xSeries). 49IBM xSeries).
50 50
51d. MSI/MSI-X. Can be enabled on platforms which support this feature 51d. MSI/MSI-X. Can be enabled on platforms which support this feature
52(IA64, Xeon) resulting in noticeable performance improvement(upto 7% 52(IA64, Xeon) resulting in noticeable performance improvement(up to 7%
53on certain platforms). 53on certain platforms).
54 54
55e. Statistics. Comprehensive MAC-level and software statistics displayed 55e. Statistics. Comprehensive MAC-level and software statistics displayed
diff --git a/Documentation/networking/tc-actions-env-rules.txt b/Documentation/networking/tc-actions-env-rules.txt
index dcadf6f88e34..70d6cf608251 100644
--- a/Documentation/networking/tc-actions-env-rules.txt
+++ b/Documentation/networking/tc-actions-env-rules.txt
@@ -1,5 +1,5 @@
1 1
2The "enviromental" rules for authors of any new tc actions are: 2The "environmental" rules for authors of any new tc actions are:
3 3
41) If you stealeth or borroweth any packet thou shalt be branching 41) If you stealeth or borroweth any packet thou shalt be branching
5from the righteous path and thou shalt cloneth. 5from the righteous path and thou shalt cloneth.
@@ -20,7 +20,7 @@ this way any action downstream can stomp on the packet.
203) Dropping packets you don't own is a no-no. You simply return 203) Dropping packets you don't own is a no-no. You simply return
21TC_ACT_SHOT to the caller and they will drop it. 21TC_ACT_SHOT to the caller and they will drop it.
22 22
23The "enviromental" rules for callers of actions (qdiscs etc) are: 23The "environmental" rules for callers of actions (qdiscs etc) are:
24 24
25*) Thou art responsible for freeing anything returned as being 25*) Thou art responsible for freeing anything returned as being
26TC_ACT_SHOT/STOLEN/QUEUED. If none of TC_ACT_SHOT/STOLEN/QUEUED is 26TC_ACT_SHOT/STOLEN/QUEUED. If none of TC_ACT_SHOT/STOLEN/QUEUED is
diff --git a/Documentation/power/devices.txt b/Documentation/power/devices.txt
index f023ba6bba62..1971bcf48a60 100644
--- a/Documentation/power/devices.txt
+++ b/Documentation/power/devices.txt
@@ -367,7 +367,7 @@ Drivers need to be able to handle hardware which has been reset since the
367suspend methods were called, for example by complete reinitialization. 367suspend methods were called, for example by complete reinitialization.
368This may be the hardest part, and the one most protected by NDA'd documents 368This may be the hardest part, and the one most protected by NDA'd documents
369and chip errata. It's simplest if the hardware state hasn't changed since 369and chip errata. It's simplest if the hardware state hasn't changed since
370the suspend was carried out, but that can't be guaranteed (in fact, it ususally 370the suspend was carried out, but that can't be guaranteed (in fact, it usually
371is not the case). 371is not the case).
372 372
373Drivers must also be prepared to notice that the device has been removed 373Drivers must also be prepared to notice that the device has been removed
diff --git a/Documentation/power/notifiers.txt b/Documentation/power/notifiers.txt
index ae1b7ec07684..cf980709122a 100644
--- a/Documentation/power/notifiers.txt
+++ b/Documentation/power/notifiers.txt
@@ -24,7 +24,7 @@ PM_HIBERNATION_PREPARE The system is going to hibernate or suspend, tasks will
24 be frozen immediately. 24 be frozen immediately.
25 25
26PM_POST_HIBERNATION The system memory state has been restored from a 26PM_POST_HIBERNATION The system memory state has been restored from a
27 hibernation image or an error occured during the 27 hibernation image or an error occurred during the
28 hibernation. Device drivers' .resume() callbacks have 28 hibernation. Device drivers' .resume() callbacks have
29 been executed and tasks have been thawed. 29 been executed and tasks have been thawed.
30 30
@@ -38,7 +38,7 @@ PM_POST_RESTORE An error occurred during the hibernation restore.
38 38
39PM_SUSPEND_PREPARE The system is preparing for a suspend. 39PM_SUSPEND_PREPARE The system is preparing for a suspend.
40 40
41PM_POST_SUSPEND The system has just resumed or an error occured during 41PM_POST_SUSPEND The system has just resumed or an error occurred during
42 the suspend. Device drivers' .resume() callbacks have 42 the suspend. Device drivers' .resume() callbacks have
43 been executed and tasks have been thawed. 43 been executed and tasks have been thawed.
44 44
diff --git a/Documentation/power/opp.txt b/Documentation/power/opp.txt
index cd445582d1f8..5ae70a12c1e2 100644
--- a/Documentation/power/opp.txt
+++ b/Documentation/power/opp.txt
@@ -178,7 +178,7 @@ opp_find_freq_ceil - Search for an available OPP which is *at least* the
178 if (!IS_ERR(opp)) 178 if (!IS_ERR(opp))
179 soc_switch_to_freq_voltage(freq); 179 soc_switch_to_freq_voltage(freq);
180 else 180 else
181 /* do something when we cant satisfy the req */ 181 /* do something when we can't satisfy the req */
182 /* do other stuff */ 182 /* do other stuff */
183 } 183 }
184 184
diff --git a/Documentation/power/swsusp.txt b/Documentation/power/swsusp.txt
index ea718891a665..ac190cf1963e 100644
--- a/Documentation/power/swsusp.txt
+++ b/Documentation/power/swsusp.txt
@@ -192,7 +192,7 @@ Q: There don't seem to be any generally useful behavioral
192distinctions between SUSPEND and FREEZE. 192distinctions between SUSPEND and FREEZE.
193 193
194A: Doing SUSPEND when you are asked to do FREEZE is always correct, 194A: Doing SUSPEND when you are asked to do FREEZE is always correct,
195but it may be unneccessarily slow. If you want your driver to stay simple, 195but it may be unnecessarily slow. If you want your driver to stay simple,
196slowness may not matter to you. It can always be fixed later. 196slowness may not matter to you. It can always be fixed later.
197 197
198For devices like disk it does matter, you do not want to spindown for 198For devices like disk it does matter, you do not want to spindown for
@@ -237,7 +237,7 @@ disk. Whole sequence goes like
237 237
238 running system, user asks for suspend-to-disk 238 running system, user asks for suspend-to-disk
239 239
240 user processes are stopped (in common case there are none, but with resume-from-initrd, noone knows) 240 user processes are stopped (in common case there are none, but with resume-from-initrd, no one knows)
241 241
242 read image from disk 242 read image from disk
243 243
diff --git a/Documentation/power/userland-swsusp.txt b/Documentation/power/userland-swsusp.txt
index 81680f9f5909..1101bee4e822 100644
--- a/Documentation/power/userland-swsusp.txt
+++ b/Documentation/power/userland-swsusp.txt
@@ -98,7 +98,7 @@ SNAPSHOT_S2RAM - suspend to RAM; using this call causes the kernel to
98The device's read() operation can be used to transfer the snapshot image from 98The device's read() operation can be used to transfer the snapshot image from
99the kernel. It has the following limitations: 99the kernel. It has the following limitations:
100- you cannot read() more than one virtual memory page at a time 100- you cannot read() more than one virtual memory page at a time
101- read()s accross page boundaries are impossible (ie. if ypu read() 1/2 of 101- read()s across page boundaries are impossible (ie. if ypu read() 1/2 of
102 a page in the previous call, you will only be able to read() 102 a page in the previous call, you will only be able to read()
103 _at_ _most_ 1/2 of the page in the next call) 103 _at_ _most_ 1/2 of the page in the next call)
104 104
@@ -137,7 +137,7 @@ mechanism and the userland utilities using the interface SHOULD use additional
137means, such as checksums, to ensure the integrity of the snapshot image. 137means, such as checksums, to ensure the integrity of the snapshot image.
138 138
139The suspending and resuming utilities MUST lock themselves in memory, 139The suspending and resuming utilities MUST lock themselves in memory,
140preferrably using mlockall(), before calling SNAPSHOT_FREEZE. 140preferably using mlockall(), before calling SNAPSHOT_FREEZE.
141 141
142The suspending utility MUST check the value stored by SNAPSHOT_CREATE_IMAGE 142The suspending utility MUST check the value stored by SNAPSHOT_CREATE_IMAGE
143in the memory location pointed to by the last argument of ioctl() and proceed 143in the memory location pointed to by the last argument of ioctl() and proceed
@@ -147,7 +147,7 @@ in accordance with it:
147 (a) The suspending utility MUST NOT close the snapshot device 147 (a) The suspending utility MUST NOT close the snapshot device
148 _unless_ the whole suspend procedure is to be cancelled, in 148 _unless_ the whole suspend procedure is to be cancelled, in
149 which case, if the snapshot image has already been saved, the 149 which case, if the snapshot image has already been saved, the
150 suspending utility SHOULD destroy it, preferrably by zapping 150 suspending utility SHOULD destroy it, preferably by zapping
151 its header. If the suspend is not to be cancelled, the 151 its header. If the suspend is not to be cancelled, the
152 system MUST be powered off or rebooted after the snapshot 152 system MUST be powered off or rebooted after the snapshot
153 image has been saved. 153 image has been saved.
diff --git a/Documentation/powerpc/hvcs.txt b/Documentation/powerpc/hvcs.txt
index 6d8be3468d7d..a730ca5a07f8 100644
--- a/Documentation/powerpc/hvcs.txt
+++ b/Documentation/powerpc/hvcs.txt
@@ -528,7 +528,7 @@ this driver assignment of hotplug added vty-servers may be in a different
528order than how they would be exposed on module load. Rebooting or 528order than how they would be exposed on module load. Rebooting or
529reloading the module after dynamic addition may result in the /dev/hvcs* 529reloading the module after dynamic addition may result in the /dev/hvcs*
530and vty-server coupling changing if a vty-server adapter was added in a 530and vty-server coupling changing if a vty-server adapter was added in a
531slot inbetween two other vty-server adapters. Refer to the section above 531slot between two other vty-server adapters. Refer to the section above
532on how to determine which vty-server goes with which /dev/hvcs* node. 532on how to determine which vty-server goes with which /dev/hvcs* node.
533Hint; look at the sysfs "index" attribute for the vty-server. 533Hint; look at the sysfs "index" attribute for the vty-server.
534 534
diff --git a/Documentation/rapidio/rapidio.txt b/Documentation/rapidio/rapidio.txt
new file mode 100644
index 000000000000..be70ee15f8ca
--- /dev/null
+++ b/Documentation/rapidio/rapidio.txt
@@ -0,0 +1,173 @@
1 The Linux RapidIO Subsystem
2
3~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4
5The RapidIO standard is a packet-based fabric interconnect standard designed for
6use in embedded systems. Development of the RapidIO standard is directed by the
7RapidIO Trade Association (RTA). The current version of the RapidIO specification
8is publicly available for download from the RTA web-site [1].
9
10This document describes the basics of the Linux RapidIO subsystem and provides
11information on its major components.
12
131 Overview
14----------
15
16Because the RapidIO subsystem follows the Linux device model it is integrated
17into the kernel similarly to other buses by defining RapidIO-specific device and
18bus types and registering them within the device model.
19
20The Linux RapidIO subsystem is architecture independent and therefore defines
21architecture-specific interfaces that provide support for common RapidIO
22subsystem operations.
23
242. Core Components
25------------------
26
27A typical RapidIO network is a combination of endpoints and switches.
28Each of these components is represented in the subsystem by an associated data
29structure. The core logical components of the RapidIO subsystem are defined
30in include/linux/rio.h file.
31
322.1 Master Port
33
34A master port (or mport) is a RapidIO interface controller that is local to the
35processor executing the Linux code. A master port generates and receives RapidIO
36packets (transactions). In the RapidIO subsystem each master port is represented
37by a rio_mport data structure. This structure contains master port specific
38resources such as mailboxes and doorbells. The rio_mport also includes a unique
39host device ID that is valid when a master port is configured as an enumerating
40host.
41
42RapidIO master ports are serviced by subsystem specific mport device drivers
43that provide functionality defined for this subsystem. To provide a hardware
44independent interface for RapidIO subsystem operations, rio_mport structure
45includes rio_ops data structure which contains pointers to hardware specific
46implementations of RapidIO functions.
47
482.2 Device
49
50A RapidIO device is any endpoint (other than mport) or switch in the network.
51All devices are presented in the RapidIO subsystem by corresponding rio_dev data
52structure. Devices form one global device list and per-network device lists
53(depending on number of available mports and networks).
54
552.3 Switch
56
57A RapidIO switch is a special class of device that routes packets between its
58ports towards their final destination. The packet destination port within a
59switch is defined by an internal routing table. A switch is presented in the
60RapidIO subsystem by rio_dev data structure expanded by additional rio_switch
61data structure, which contains switch specific information such as copy of the
62routing table and pointers to switch specific functions.
63
64The RapidIO subsystem defines the format and initialization method for subsystem
65specific switch drivers that are designed to provide hardware-specific
66implementation of common switch management routines.
67
682.4 Network
69
70A RapidIO network is a combination of interconnected endpoint and switch devices.
71Each RapidIO network known to the system is represented by corresponding rio_net
72data structure. This structure includes lists of all devices and local master
73ports that form the same network. It also contains a pointer to the default
74master port that is used to communicate with devices within the network.
75
763. Subsystem Initialization
77---------------------------
78
79In order to initialize the RapidIO subsystem, a platform must initialize and
80register at least one master port within the RapidIO network. To register mport
81within the subsystem controller driver initialization code calls function
82rio_register_mport() for each available master port. After all active master
83ports are registered with a RapidIO subsystem, the rio_init_mports() routine
84is called to perform enumeration and discovery.
85
86In the current PowerPC-based implementation a subsys_initcall() is specified to
87perform controller initialization and mport registration. At the end it directly
88calls rio_init_mports() to execute RapidIO enumeration and discovery.
89
904. Enumeration and Discovery
91----------------------------
92
93When rio_init_mports() is called it scans a list of registered master ports and
94calls an enumeration or discovery routine depending on the configured role of a
95master port: host or agent.
96
97Enumeration is performed by a master port if it is configured as a host port by
98assigning a host device ID greater than or equal to zero. A host device ID is
99assigned to a master port through the kernel command line parameter "riohdid=",
100or can be configured in a platform-specific manner. If the host device ID for
101a specific master port is set to -1, the discovery process will be performed
102for it.
103
104The enumeration and discovery routines use RapidIO maintenance transactions
105to access the configuration space of devices.
106
107The enumeration process is implemented according to the enumeration algorithm
108outlined in the RapidIO Interconnect Specification: Annex I [1].
109
110The enumeration process traverses the network using a recursive depth-first
111algorithm. When a new device is found, the enumerator takes ownership of that
112device by writing into the Host Device ID Lock CSR. It does this to ensure that
113the enumerator has exclusive right to enumerate the device. If device ownership
114is successfully acquired, the enumerator allocates a new rio_dev structure and
115initializes it according to device capabilities.
116
117If the device is an endpoint, a unique device ID is assigned to it and its value
118is written into the device's Base Device ID CSR.
119
120If the device is a switch, the enumerator allocates an additional rio_switch
121structure to store switch specific information. Then the switch's vendor ID and
122device ID are queried against a table of known RapidIO switches. Each switch
123table entry contains a pointer to a switch-specific initialization routine that
124initializes pointers to the rest of switch specific operations, and performs
125hardware initialization if necessary. A RapidIO switch does not have a unique
126device ID; it relies on hopcount and routing for device ID of an attached
127endpoint if access to its configuration registers is required. If a switch (or
128chain of switches) does not have any endpoint (except enumerator) attached to
129it, a fake device ID will be assigned to configure a route to that switch.
130In the case of a chain of switches without endpoint, one fake device ID is used
131to configure a route through the entire chain and switches are differentiated by
132their hopcount value.
133
134For both endpoints and switches the enumerator writes a unique component tag
135into device's Component Tag CSR. That unique value is used by the error
136management notification mechanism to identify a device that is reporting an
137error management event.
138
139Enumeration beyond a switch is completed by iterating over each active egress
140port of that switch. For each active link, a route to a default device ID
141(0xFF for 8-bit systems and 0xFFFF for 16-bit systems) is temporarily written
142into the routing table. The algorithm recurs by calling itself with hopcount + 1
143and the default device ID in order to access the device on the active port.
144
145After the host has completed enumeration of the entire network it releases
146devices by clearing device ID locks (calls rio_clear_locks()). For each endpoint
147in the system, it sets the Master Enable bit in the Port General Control CSR
148to indicate that enumeration is completed and agents are allowed to execute
149passive discovery of the network.
150
151The discovery process is performed by agents and is similar to the enumeration
152process that is described above. However, the discovery process is performed
153without changes to the existing routing because agents only gather information
154about RapidIO network structure and are building an internal map of discovered
155devices. This way each Linux-based component of the RapidIO subsystem has
156a complete view of the network. The discovery process can be performed
157simultaneously by several agents. After initializing its RapidIO master port
158each agent waits for enumeration completion by the host for the configured wait
159time period. If this wait time period expires before enumeration is completed,
160an agent skips RapidIO discovery and continues with remaining kernel
161initialization.
162
1635. References
164-------------
165
166[1] RapidIO Trade Association. RapidIO Interconnect Specifications.
167 http://www.rapidio.org.
168[2] Rapidio TA. Technology Comparisons.
169 http://www.rapidio.org/education/technology_comparisons/
170[3] RapidIO support for Linux.
171 http://lwn.net/Articles/139118/
172[4] Matt Porter. RapidIO for Linux. Ottawa Linux Symposium, 2005
173 http://www.kernel.org/doc/ols/2005/ols2005v2-pages-43-56.pdf
diff --git a/Documentation/rapidio/sysfs.txt b/Documentation/rapidio/sysfs.txt
new file mode 100644
index 000000000000..97f71ce575d6
--- /dev/null
+++ b/Documentation/rapidio/sysfs.txt
@@ -0,0 +1,90 @@
1 RapidIO sysfs Files
2
3~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4
51. Device Subdirectories
6------------------------
7
8For each RapidIO device, the RapidIO subsystem creates files in an individual
9subdirectory with the following name, /sys/bus/rapidio/devices/<device_name>.
10
11The format of device_name is "nn:d:iiii", where:
12
13nn - two-digit hexadecimal ID of RapidIO network where the device resides
14d - device typr: 'e' - for endpoint or 's' - for switch
15iiii - four-digit device destID for endpoints, or switchID for switches
16
17For example, below is a list of device directories that represents a typical
18RapidIO network with one switch, one host, and two agent endpoints, as it is
19seen by the enumerating host (destID = 1):
20
21/sys/bus/rapidio/devices/00:e:0000
22/sys/bus/rapidio/devices/00:e:0002
23/sys/bus/rapidio/devices/00:s:0001
24
25NOTE: An enumerating or discovering endpoint does not create a sysfs entry for
26itself, this is why an endpoint with destID=1 is not shown in the list.
27
282. Attributes Common for All Devices
29------------------------------------
30
31Each device subdirectory contains the following informational read-only files:
32
33 did - returns the device identifier
34 vid - returns the device vendor identifier
35device_rev - returns the device revision level
36 asm_did - returns identifier for the assembly containing the device
37 asm_rev - returns revision level of the assembly containing the device
38 asm_vid - returns vendor identifier of the assembly containing the device
39 destid - returns device destination ID assigned by the enumeration routine
40 (see 4.1 for switch specific details)
41 lprev - returns name of previous device (switch) on the path to the device
42 that that owns this attribute
43
44In addition to the files listed above, each device has a binary attribute file
45that allows read/write access to the device configuration registers using
46the RapidIO maintenance transactions:
47
48 config - reads from and writes to the device configuration registers.
49
50This attribute is similar in behavior to the "config" attribute of PCI devices
51and provides an access to the RapidIO device registers using standard file read
52and write operations.
53
543. Endpoint Device Attributes
55-----------------------------
56
57Currently Linux RapidIO subsystem does not create any endpoint specific sysfs
58attributes. It is possible that RapidIO master port drivers and endpoint device
59drivers will add their device-specific sysfs attributes but such attributes are
60outside the scope of this document.
61
624. Switch Device Attributes
63---------------------------
64
65RapidIO switches have additional attributes in sysfs. RapidIO subsystem supports
66common and device-specific sysfs attributes for switches. Because switches are
67integrated into the RapidIO subsystem, it offers a method to create
68device-specific sysfs attributes by specifying a callback function that may be
69set by the switch initialization routine during enumeration or discovery process.
70
714.1 Common Switch Attributes
72
73 routes - reports switch routing information in "destID port" format. This
74 attribute reports only valid routing table entries, one line for
75 each entry.
76 destid - device destination ID that defines a route to the switch
77 hopcount - number of hops on the path to the switch
78 lnext - returns names of devices linked to the switch except one of a device
79 linked to the ingress port (reported as "lprev"). This is an array
80 names with number of lines equal to number of ports in switch. If
81 a switch port has no attached device, returns "null" instead of
82 a device name.
83
844.2 Device-specific Switch Attributes
85
86Device-specific switch attributes are listed for each RapidIO switch driver
87that exports additional attributes.
88
89IDT_GEN2:
90 errlog - reads contents of device error log until it is empty.
diff --git a/Documentation/s390/Debugging390.txt b/Documentation/s390/Debugging390.txt
index 86f9f74b2b34..efe998becc5b 100644
--- a/Documentation/s390/Debugging390.txt
+++ b/Documentation/s390/Debugging390.txt
@@ -2273,7 +2273,7 @@ IP forwarding is on.
2273There is a lot of useful info in here best found by going in & having a look around, 2273There is a lot of useful info in here best found by going in & having a look around,
2274so I'll take you through some entries I consider important. 2274so I'll take you through some entries I consider important.
2275 2275
2276All the processes running on the machine have there own entry defined by 2276All the processes running on the machine have their own entry defined by
2277/proc/<pid> 2277/proc/<pid>
2278So lets have a look at the init process 2278So lets have a look at the init process
2279cd /proc/1 2279cd /proc/1
diff --git a/Documentation/scheduler/sched-design-CFS.txt b/Documentation/scheduler/sched-design-CFS.txt
index 8239ebbcddce..99961993257a 100644
--- a/Documentation/scheduler/sched-design-CFS.txt
+++ b/Documentation/scheduler/sched-design-CFS.txt
@@ -164,7 +164,7 @@ This is the (partial) list of the hooks:
164 It puts the scheduling entity (task) into the red-black tree and 164 It puts the scheduling entity (task) into the red-black tree and
165 increments the nr_running variable. 165 increments the nr_running variable.
166 166
167 - dequeue_tree(...) 167 - dequeue_task(...)
168 168
169 When a task is no longer runnable, this function is called to keep the 169 When a task is no longer runnable, this function is called to keep the
170 corresponding scheduling entity out of the red-black tree. It decrements 170 corresponding scheduling entity out of the red-black tree. It decrements
@@ -195,11 +195,6 @@ This is the (partial) list of the hooks:
195 This function is mostly called from time tick functions; it might lead to 195 This function is mostly called from time tick functions; it might lead to
196 process switch. This drives the running preemption. 196 process switch. This drives the running preemption.
197 197
198 - task_new(...)
199
200 The core scheduler gives the scheduling module an opportunity to manage new
201 task startup. The CFS scheduling module uses it for group scheduling, while
202 the scheduling module for a real-time task does not use it.
203 198
204 199
205 200
diff --git a/Documentation/scheduler/sched-domains.txt b/Documentation/scheduler/sched-domains.txt
index 373ceacc367e..b7ee379b651b 100644
--- a/Documentation/scheduler/sched-domains.txt
+++ b/Documentation/scheduler/sched-domains.txt
@@ -1,8 +1,7 @@
1Each CPU has a "base" scheduling domain (struct sched_domain). These are 1Each CPU has a "base" scheduling domain (struct sched_domain). The domain
2accessed via cpu_sched_domain(i) and this_sched_domain() macros. The domain
3hierarchy is built from these base domains via the ->parent pointer. ->parent 2hierarchy is built from these base domains via the ->parent pointer. ->parent
4MUST be NULL terminated, and domain structures should be per-CPU as they 3MUST be NULL terminated, and domain structures should be per-CPU as they are
5are locklessly updated. 4locklessly updated.
6 5
7Each scheduling domain spans a number of CPUs (stored in the ->span field). 6Each scheduling domain spans a number of CPUs (stored in the ->span field).
8A domain's span MUST be a superset of it child's span (this restriction could 7A domain's span MUST be a superset of it child's span (this restriction could
@@ -26,11 +25,26 @@ is treated as one entity. The load of a group is defined as the sum of the
26load of each of its member CPUs, and only when the load of a group becomes 25load of each of its member CPUs, and only when the load of a group becomes
27out of balance are tasks moved between groups. 26out of balance are tasks moved between groups.
28 27
29In kernel/sched.c, rebalance_tick is run periodically on each CPU. This 28In kernel/sched.c, trigger_load_balance() is run periodically on each CPU
30function takes its CPU's base sched domain and checks to see if has reached 29through scheduler_tick(). It raises a softirq after the next regularly scheduled
31its rebalance interval. If so, then it will run load_balance on that domain. 30rebalancing event for the current runqueue has arrived. The actual load
32rebalance_tick then checks the parent sched_domain (if it exists), and the 31balancing workhorse, run_rebalance_domains()->rebalance_domains(), is then run
33parent of the parent and so forth. 32in softirq context (SCHED_SOFTIRQ).
33
34The latter function takes two arguments: the current CPU and whether it was idle
35at the time the scheduler_tick() happened and iterates over all sched domains
36our CPU is on, starting from its base domain and going up the ->parent chain.
37While doing that, it checks to see if the current domain has exhausted its
38rebalance interval. If so, it runs load_balance() on that domain. It then checks
39the parent sched_domain (if it exists), and the parent of the parent and so
40forth.
41
42Initially, load_balance() finds the busiest group in the current sched domain.
43If it succeeds, it looks for the busiest runqueue of all the CPUs' runqueues in
44that group. If it manages to find such a runqueue, it locks both our initial
45CPU's runqueue and the newly found busiest one and starts moving tasks from it
46to our runqueue. The exact number of tasks amounts to an imbalance previously
47computed while iterating over this sched domain's groups.
34 48
35*** Implementing sched domains *** 49*** Implementing sched domains ***
36The "base" domain will "span" the first level of the hierarchy. In the case 50The "base" domain will "span" the first level of the hierarchy. In the case
diff --git a/Documentation/scsi/ChangeLog.lpfc b/Documentation/scsi/ChangeLog.lpfc
index 5e83769c6aa9..c56ec99d7b2f 100644
--- a/Documentation/scsi/ChangeLog.lpfc
+++ b/Documentation/scsi/ChangeLog.lpfc
@@ -352,7 +352,7 @@ Changes from 20041229 to 20050110
352 lpfc_scsiport.c 352 lpfc_scsiport.c
353 * In remote port changes: no longer nulling target->pnode when 353 * In remote port changes: no longer nulling target->pnode when
354 removing from mapped list. Pnode get nulled when the node is 354 removing from mapped list. Pnode get nulled when the node is
355 freed (after nodev tmo). This bug was causing i/o recieved in 355 freed (after nodev tmo). This bug was causing i/o received in
356 the small window while the device was blocked to be errored w/ 356 the small window while the device was blocked to be errored w/
357 did_no_connect. With the fix, it returns host_busy 357 did_no_connect. With the fix, it returns host_busy
358 (per the pre-remote port changes). 358 (per the pre-remote port changes).
@@ -530,7 +530,7 @@ Changes from 20041018 to 20041123
530 coherent mappings. Note: There are more consistent mappings 530 coherent mappings. Note: There are more consistent mappings
531 that are using pci_dma_sync calls. Probably these should be 531 that are using pci_dma_sync calls. Probably these should be
532 removed as well. 532 removed as well.
533 * Modified lpfc_free_scsi_buf to accomodate all three scsi_buf 533 * Modified lpfc_free_scsi_buf to accommodate all three scsi_buf
534 free types to alleviate miscellaneous panics with cable pull 534 free types to alleviate miscellaneous panics with cable pull
535 testing. 535 testing.
536 * Set hotplug to default 0 and lpfc_target_remove to not remove 536 * Set hotplug to default 0 and lpfc_target_remove to not remove
@@ -583,7 +583,7 @@ Changes from 20041018 to 20041123
583 included more than once. 583 included more than once.
584 * Replaced "set_current_state(TASK_UNINTERRUPTIBLE); 584 * Replaced "set_current_state(TASK_UNINTERRUPTIBLE);
585 schedule_timeout(timeout)" with "msleep(timeout)". 585 schedule_timeout(timeout)" with "msleep(timeout)".
586 * Fixnode was loosing starget when rediscovered. We saw messages 586 * Fixnode was losing starget when rediscovered. We saw messages
587 like: lpfc 0000:04:02.0: 0:0263 Cannot block scsi target as a 587 like: lpfc 0000:04:02.0: 0:0263 Cannot block scsi target as a
588 result. Moved starget field into struct lpfc_target which is 588 result. Moved starget field into struct lpfc_target which is
589 referenced from the node. 589 referenced from the node.
@@ -604,7 +604,7 @@ Changes from 20041018 to 20041123
604 * Make 3 functions static: lpfc_get_hba_sym_node_name, 604 * Make 3 functions static: lpfc_get_hba_sym_node_name,
605 lpfc_intr_prep and lpfc_setup_slim_access. Move lpfc_intr_prep 605 lpfc_intr_prep and lpfc_setup_slim_access. Move lpfc_intr_prep
606 and lpfc_setup_slim_access so they're defined before being used. 606 and lpfc_setup_slim_access so they're defined before being used.
607 * Remove an unecessary list_del() in lpfc_hbadisc.c. 607 * Remove an unnecessary list_del() in lpfc_hbadisc.c.
608 * Set nlp_state before calling lpfc_nlp_list() since this will 608 * Set nlp_state before calling lpfc_nlp_list() since this will
609 potentially call fc_target_unblock which may cause a race in 609 potentially call fc_target_unblock which may cause a race in
610 queuecommand by releasing host_lock. 610 queuecommand by releasing host_lock.
@@ -753,7 +753,7 @@ Changes from 20040908 to 20040920
753 * Changed version number to 8.0.12 753 * Changed version number to 8.0.12
754 * Removed used #defines: DEFAULT_PCI_LATENCY_CLOCKS and 754 * Removed used #defines: DEFAULT_PCI_LATENCY_CLOCKS and
755 PCI_LATENCY_VALUE from lpfc_hw.h. 755 PCI_LATENCY_VALUE from lpfc_hw.h.
756 * Changes to accomodate rnid. 756 * Changes to accommodate rnid.
757 * Fix RSCN handling so RSCN NS queries only effect NPorts found in 757 * Fix RSCN handling so RSCN NS queries only effect NPorts found in
758 RSCN data. 758 RSCN data.
759 * If we rcv a plogi on a NPort queued up for discovery, clear the 759 * If we rcv a plogi on a NPort queued up for discovery, clear the
@@ -813,7 +813,7 @@ Changes from 20040908 to 20040920
813 counter instead, brd_no isn't reused anymore. Also some tiny 813 counter instead, brd_no isn't reused anymore. Also some tiny
814 whitespace cleanups in surrounding code. 814 whitespace cleanups in surrounding code.
815 * Reorder functions in lpfc_els.c to remove need for prototypes. 815 * Reorder functions in lpfc_els.c to remove need for prototypes.
816 * Removed unsed prototypes from lpfc_crtn.h - 816 * Removed unused prototypes from lpfc_crtn.h -
817 lpfc_ip_timeout_handler, lpfc_read_pci and lpfc_revoke. 817 lpfc_ip_timeout_handler, lpfc_read_pci and lpfc_revoke.
818 * Removed some unused prototypes from lpfc_crtn.h - 818 * Removed some unused prototypes from lpfc_crtn.h -
819 lpfc_scsi_hba_reset, lpfc_scsi_issue_inqsn, 819 lpfc_scsi_hba_reset, lpfc_scsi_issue_inqsn,
@@ -863,7 +863,7 @@ Changes from 20040823 to 20040908
863 * Minimal support for SCSI flat space addressing/volume set 863 * Minimal support for SCSI flat space addressing/volume set
864 addressing. Use 16 bits of LUN address so that flat 864 addressing. Use 16 bits of LUN address so that flat
865 addressing/VSA will work. 865 addressing/VSA will work.
866 * Changed 2 occurences of if( 1 != f(x)) to if(f(x) != 1) 866 * Changed 2 occurrences of if( 1 != f(x)) to if(f(x) != 1)
867 * Drop include of lpfc_cfgparm.h. 867 * Drop include of lpfc_cfgparm.h.
868 * Reduce stack usage of lpfc_fdmi_cmd in lpfc_ct.c. 868 * Reduce stack usage of lpfc_fdmi_cmd in lpfc_ct.c.
869 * Add minimum range checking property to /sys write/store 869 * Add minimum range checking property to /sys write/store
@@ -1449,7 +1449,7 @@ Changes from 20040402 to 20040409
1449 * Removed lpfc_els_chk_latt from the lpfc_config_post function. 1449 * Removed lpfc_els_chk_latt from the lpfc_config_post function.
1450 lpfc_els_chk_latt will enable the link event interrupts when 1450 lpfc_els_chk_latt will enable the link event interrupts when
1451 flogi is pending which causes two discovery state machines 1451 flogi is pending which causes two discovery state machines
1452 running parallely. 1452 running parallelly.
1453 * Add pci_disable_device to unload path. 1453 * Add pci_disable_device to unload path.
1454 * Move lpfc_sleep_event from lpfc_fcp.c to lpfc_util_ioctl.c 1454 * Move lpfc_sleep_event from lpfc_fcp.c to lpfc_util_ioctl.c
1455 * Call dma_map_single() & pci_map_single() directly instead of via 1455 * Call dma_map_single() & pci_map_single() directly instead of via
@@ -1590,7 +1590,7 @@ Changes from 20040326 to 20040402
1590 ELX_WRITE_HS ELX_WRITE_HA ELX_WRITE_CA ELX_READ_HC 1590 ELX_WRITE_HS ELX_WRITE_HA ELX_WRITE_CA ELX_READ_HC
1591 ELX_READ_HS ELX_READ_HA ELX_READ_CA ELX_READ_MB ELX_RESET 1591 ELX_READ_HS ELX_READ_HA ELX_READ_CA ELX_READ_MB ELX_RESET
1592 ELX_READ_HBA ELX_INSTANCE ELX_LIP. Also introduced 1592 ELX_READ_HBA ELX_INSTANCE ELX_LIP. Also introduced
1593 attribute "set" to be used in conjuction with the above 1593 attribute "set" to be used in conjunction with the above
1594 attributes. 1594 attributes.
1595 * Removed DLINK, enque and deque declarations now that clock 1595 * Removed DLINK, enque and deque declarations now that clock
1596 doesn't use them anymore 1596 doesn't use them anymore
diff --git a/Documentation/scsi/ChangeLog.megaraid b/Documentation/scsi/ChangeLog.megaraid
index 5e07d320817d..d2052fdbedd2 100644
--- a/Documentation/scsi/ChangeLog.megaraid
+++ b/Documentation/scsi/ChangeLog.megaraid
@@ -168,7 +168,7 @@ Older Version : 2.20.4.6 (scsi module), 2.20.2.6 (cmm module)
168 168
1691. Sorted out PCI IDs to remove megaraid support overlaps. 1691. Sorted out PCI IDs to remove megaraid support overlaps.
170 Based on the patch from Daniel, sorted out PCI IDs along with 170 Based on the patch from Daniel, sorted out PCI IDs along with
171 charactor node name change from 'megadev' to 'megadev_legacy' to avoid 171 character node name change from 'megadev' to 'megadev_legacy' to avoid
172 conflict. 172 conflict.
173 --- 173 ---
174 Hopefully we'll be getting the build restriction zapped much sooner, 174 Hopefully we'll be getting the build restriction zapped much sooner,
diff --git a/Documentation/scsi/ChangeLog.ncr53c8xx b/Documentation/scsi/ChangeLog.ncr53c8xx
index 8b278c10edfd..9288e3d8974a 100644
--- a/Documentation/scsi/ChangeLog.ncr53c8xx
+++ b/Documentation/scsi/ChangeLog.ncr53c8xx
@@ -200,7 +200,7 @@ Sun Feb 14:00 1999 Gerard Roudier (groudier@club-internet.fr)
200 By default the driver uses both IRQF_SHARED and IRQF_DISABLED. 200 By default the driver uses both IRQF_SHARED and IRQF_DISABLED.
201 Option 'ncr53c8xx=irqm:0x20' may be used when an IRQ is shared by 201 Option 'ncr53c8xx=irqm:0x20' may be used when an IRQ is shared by
202 a 53C8XX adapter and a network board. 202 a 53C8XX adapter and a network board.
203 - Tiny mispelling fixed (ABORT instead of ABRT). Was fortunately 203 - Tiny misspelling fixed (ABORT instead of ABRT). Was fortunately
204 harmless. 204 harmless.
205 - Negotiate SYNC data transfers with CCS devices. 205 - Negotiate SYNC data transfers with CCS devices.
206 206
diff --git a/Documentation/scsi/ChangeLog.sym53c8xx b/Documentation/scsi/ChangeLog.sym53c8xx
index 02ffbc1e8a84..c1933707d0bc 100644
--- a/Documentation/scsi/ChangeLog.sym53c8xx
+++ b/Documentation/scsi/ChangeLog.sym53c8xx
@@ -457,7 +457,7 @@ Fri Jan 1 20:00 1999 Gerard Roudier (groudier@club-internet.fr)
457Sat Dec 19 21:00 1998 Gerard Roudier (groudier@club-internet.fr) 457Sat Dec 19 21:00 1998 Gerard Roudier (groudier@club-internet.fr)
458 * version sym53c8xx-1.0 458 * version sym53c8xx-1.0
459 - Define some new IO registers for the 896 (istat1, mbox0, mbox1) 459 - Define some new IO registers for the 896 (istat1, mbox0, mbox1)
460 - Revamp slighly the Symbios NVRAM lay-out based on the excerpt of 460 - Revamp slightly the Symbios NVRAM lay-out based on the excerpt of
461 the header file I received from Symbios. 461 the header file I received from Symbios.
462 - Check the PCI bus number for the boot order (Using a fast 462 - Check the PCI bus number for the boot order (Using a fast
463 PCI controller behing a PCI-PCI bridge seems sub-optimal). 463 PCI controller behing a PCI-PCI bridge seems sub-optimal).
diff --git a/Documentation/scsi/aha152x.txt b/Documentation/scsi/aha152x.txt
index 29ce6d87e451..94848734ac66 100644
--- a/Documentation/scsi/aha152x.txt
+++ b/Documentation/scsi/aha152x.txt
@@ -124,7 +124,7 @@ in the partition table and therefore every operating system has to know
124the right geometry to be able to interpret it. 124the right geometry to be able to interpret it.
125 125
126Moreover there are certain limitations to the C/H/S addressing scheme, 126Moreover there are certain limitations to the C/H/S addressing scheme,
127namely the address space is limited to upto 255 heads, upto 63 sectors 127namely the address space is limited to up to 255 heads, up to 63 sectors
128and a maximum of 1023 cylinders. 128and a maximum of 1023 cylinders.
129 129
130The AHA-1522 BIOS calculates the geometry by fixing the number of heads 130The AHA-1522 BIOS calculates the geometry by fixing the number of heads
diff --git a/Documentation/scsi/aic79xx.txt b/Documentation/scsi/aic79xx.txt
index 16e054c9c70b..64ac7093c872 100644
--- a/Documentation/scsi/aic79xx.txt
+++ b/Documentation/scsi/aic79xx.txt
@@ -267,7 +267,7 @@ The following information is available in this file:
267 Option: tag_info:{{value[,value...]}[,{value[,value...]}...]} 267 Option: tag_info:{{value[,value...]}[,{value[,value...]}...]}
268 Definition: Set the per-target tagged queue depth on a 268 Definition: Set the per-target tagged queue depth on a
269 per controller basis. Both controllers and targets 269 per controller basis. Both controllers and targets
270 may be ommitted indicating that they should retain 270 may be omitted indicating that they should retain
271 the default tag depth. 271 the default tag depth.
272 Examples: tag_info:{{16,32,32,64,8,8,,32,32,32,32,32,32,32,32,32} 272 Examples: tag_info:{{16,32,32,64,8,8,,32,32,32,32,32,32,32,32,32}
273 On Controller 0 273 On Controller 0
@@ -291,7 +291,7 @@ The following information is available in this file:
291 The rd_strm_bitmask is a 16 bit hex value in which 291 The rd_strm_bitmask is a 16 bit hex value in which
292 each bit represents a target. Setting the target's 292 each bit represents a target. Setting the target's
293 bit to '1' enables read streaming for that 293 bit to '1' enables read streaming for that
294 target. Controllers may be ommitted indicating that 294 target. Controllers may be omitted indicating that
295 they should retain the default read streaming setting. 295 they should retain the default read streaming setting.
296 Example: rd_strm:{0x0041} 296 Example: rd_strm:{0x0041}
297 On Controller 0 297 On Controller 0
@@ -313,7 +313,7 @@ The following information is available in this file:
313 ----------------------------------------------------------------- 313 -----------------------------------------------------------------
314 Option: dv: {value[,value...]} 314 Option: dv: {value[,value...]}
315 Definition: Set Domain Validation Policy on a per-controller basis. 315 Definition: Set Domain Validation Policy on a per-controller basis.
316 Controllers may be ommitted indicating that 316 Controllers may be omitted indicating that
317 they should retain the default read streaming setting. 317 they should retain the default read streaming setting.
318 Example: dv:{-1,0,,1,1,0} 318 Example: dv:{-1,0,,1,1,0}
319 On Controller 0 leave DV at its default setting. 319 On Controller 0 leave DV at its default setting.
@@ -340,7 +340,7 @@ The following information is available in this file:
340 Option: precomp: {value[,value...]} 340 Option: precomp: {value[,value...]}
341 Definition: Set IO Cell precompensation value on a per-controller 341 Definition: Set IO Cell precompensation value on a per-controller
342 basis. 342 basis.
343 Controllers may be ommitted indicating that 343 Controllers may be omitted indicating that
344 they should retain the default precompensation setting. 344 they should retain the default precompensation setting.
345 Example: precomp:{0x1} 345 Example: precomp:{0x1}
346 On Controller 0 set precompensation to 1. 346 On Controller 0 set precompensation to 1.
@@ -353,7 +353,7 @@ The following information is available in this file:
353 ----------------------------------------------------------------- 353 -----------------------------------------------------------------
354 Option: slewrate: {value[,value...]} 354 Option: slewrate: {value[,value...]}
355 Definition: Set IO Cell slew rate on a per-controller basis. 355 Definition: Set IO Cell slew rate on a per-controller basis.
356 Controllers may be ommitted indicating that 356 Controllers may be omitted indicating that
357 they should retain the default slew rate setting. 357 they should retain the default slew rate setting.
358 Example: slewrate:{0x1} 358 Example: slewrate:{0x1}
359 On Controller 0 set slew rate to 1. 359 On Controller 0 set slew rate to 1.
@@ -366,7 +366,7 @@ The following information is available in this file:
366 ----------------------------------------------------------------- 366 -----------------------------------------------------------------
367 Option: amplitude: {value[,value...]} 367 Option: amplitude: {value[,value...]}
368 Definition: Set IO Cell signal amplitude on a per-controller basis. 368 Definition: Set IO Cell signal amplitude on a per-controller basis.
369 Controllers may be ommitted indicating that 369 Controllers may be omitted indicating that
370 they should retain the default read streaming setting. 370 they should retain the default read streaming setting.
371 Example: amplitude:{0x1} 371 Example: amplitude:{0x1}
372 On Controller 0 set amplitude to 1. 372 On Controller 0 set amplitude to 1.
diff --git a/Documentation/scsi/ibmmca.txt b/Documentation/scsi/ibmmca.txt
index 45d61ad8c6f7..ac41a9fcac77 100644
--- a/Documentation/scsi/ibmmca.txt
+++ b/Documentation/scsi/ibmmca.txt
@@ -303,7 +303,7 @@
303 (scb) and calls a local function issue_cmd(), which writes a scb 303 (scb) and calls a local function issue_cmd(), which writes a scb
304 command into subsystem I/O ports. Once the scb command is carried out, 304 command into subsystem I/O ports. Once the scb command is carried out,
305 the interrupt_handler() is invoked. If a device is determined to be 305 the interrupt_handler() is invoked. If a device is determined to be
306 existant and it has not assigned any ldn, it gets one dynamically. 306 existent and it has not assigned any ldn, it gets one dynamically.
307 For this, the whole stuff is done in ibmmca_queuecommand(). 307 For this, the whole stuff is done in ibmmca_queuecommand().
308 308
309 2.6 Abort & Reset Commands 309 2.6 Abort & Reset Commands
@@ -741,7 +741,7 @@
741 some error appeared, else it is undefined. Now, this is fixed. Before 741 some error appeared, else it is undefined. Now, this is fixed. Before
742 any SCB command gets queued, the tsb.dev_status is set to 0, so the 742 any SCB command gets queued, the tsb.dev_status is set to 0, so the
743 cmd->result won't screw up Linux higher level drivers. 743 cmd->result won't screw up Linux higher level drivers.
744 2) The reset-function has slightly improved. This is still planed for 744 2) The reset-function has slightly improved. This is still planned for
745 abort. During the abort and the reset function, no interrupts are 745 abort. During the abort and the reset function, no interrupts are
746 allowed. This is however quite hard to cope with, so the INT-status 746 allowed. This is however quite hard to cope with, so the INT-status
747 register is read. When the interrupt gets queued, one can find its 747 register is read. When the interrupt gets queued, one can find its
diff --git a/Documentation/scsi/scsi-changer.txt b/Documentation/scsi/scsi-changer.txt
index 032399b16a53..ade046ea7c17 100644
--- a/Documentation/scsi/scsi-changer.txt
+++ b/Documentation/scsi/scsi-changer.txt
@@ -102,7 +102,7 @@ Trouble?
102 102
103If you insmod the driver with "insmod debug=1", it will be verbose and 103If you insmod the driver with "insmod debug=1", it will be verbose and
104prints a lot of stuff to the syslog. Compiling the kernel with 104prints a lot of stuff to the syslog. Compiling the kernel with
105CONFIG_SCSI_CONSTANTS=y improves the quality of the error messages alot 105CONFIG_SCSI_CONSTANTS=y improves the quality of the error messages a lot
106because the kernel will translate the error codes into human-readable 106because the kernel will translate the error codes into human-readable
107strings then. 107strings then.
108 108
diff --git a/Documentation/scsi/scsi_eh.txt b/Documentation/scsi/scsi_eh.txt
index 7acbebb17fa6..6ff16b620d84 100644
--- a/Documentation/scsi/scsi_eh.txt
+++ b/Documentation/scsi/scsi_eh.txt
@@ -290,7 +290,7 @@ scmd->allowed.
290 SCSI transports/LLDDs automatically acquire sense data on 290 SCSI transports/LLDDs automatically acquire sense data on
291 command failures (autosense). Autosense is recommended for 291 command failures (autosense). Autosense is recommended for
292 performance reasons and as sense information could get out of 292 performance reasons and as sense information could get out of
293 sync inbetween occurrence of CHECK CONDITION and this action. 293 sync between occurrence of CHECK CONDITION and this action.
294 294
295 Note that if autosense is not supported, scmd->sense_buffer 295 Note that if autosense is not supported, scmd->sense_buffer
296 contains invalid sense data when error-completing the scmd 296 contains invalid sense data when error-completing the scmd
diff --git a/Documentation/scsi/scsi_fc_transport.txt b/Documentation/scsi/scsi_fc_transport.txt
index e00192de4d1c..f79282fc48d7 100644
--- a/Documentation/scsi/scsi_fc_transport.txt
+++ b/Documentation/scsi/scsi_fc_transport.txt
@@ -291,7 +291,7 @@ Transport <-> LLDD Interfaces :
291Vport support by LLDD: 291Vport support by LLDD:
292 292
293 The LLDD indicates support for vports by supplying a vport_create() 293 The LLDD indicates support for vports by supplying a vport_create()
294 function in the transport template. The presense of this function will 294 function in the transport template. The presence of this function will
295 cause the creation of the new attributes on the fc_host. As part of 295 cause the creation of the new attributes on the fc_host. As part of
296 the physical port completing its initialization relative to the 296 the physical port completing its initialization relative to the
297 transport, it should set the max_npiv_vports attribute to indicate the 297 transport, it should set the max_npiv_vports attribute to indicate the
diff --git a/Documentation/scsi/sym53c8xx_2.txt b/Documentation/scsi/sym53c8xx_2.txt
index 6f63b7989679..6af8f7a7770f 100644
--- a/Documentation/scsi/sym53c8xx_2.txt
+++ b/Documentation/scsi/sym53c8xx_2.txt
@@ -285,7 +285,7 @@ from the driver.
285 285
2867. Profiling information 2867. Profiling information
287 287
288This driver does not provide profiling informations as did its predecessors. 288This driver does not provide profiling information as did its predecessors.
289This feature was not this useful and added complexity to the code. 289This feature was not this useful and added complexity to the code.
290As the driver code got more complex, I have decided to remove everything 290As the driver code got more complex, I have decided to remove everything
291that didn't seem actually useful. 291that didn't seem actually useful.
diff --git a/Documentation/serial/moxa-smartio b/Documentation/serial/moxa-smartio
index d10443918684..5d2a33be0bd8 100644
--- a/Documentation/serial/moxa-smartio
+++ b/Documentation/serial/moxa-smartio
@@ -473,7 +473,7 @@ Content
473 spd_normal Use 38.4kb when the application requests 38.4kb. 473 spd_normal Use 38.4kb when the application requests 38.4kb.
474 spd_cust Use the custom divisor to set the speed when the 474 spd_cust Use the custom divisor to set the speed when the
475 application requests 38.4kb. 475 application requests 38.4kb.
476 divisor This option set the custom divison. 476 divisor This option set the custom division.
477 baud_base This option set the base baud rate. 477 baud_base This option set the base baud rate.
478 478
479----------------------------------------------------------------------------- 479-----------------------------------------------------------------------------
diff --git a/Documentation/serial/n_gsm.txt b/Documentation/serial/n_gsm.txt
index 397f41a1f153..a5d91126a8f7 100644
--- a/Documentation/serial/n_gsm.txt
+++ b/Documentation/serial/n_gsm.txt
@@ -34,7 +34,7 @@ Major parts of the initialization program :
34 /* configure the serial port : speed, flow control ... */ 34 /* configure the serial port : speed, flow control ... */
35 35
36 /* send the AT commands to switch the modem to CMUX mode 36 /* send the AT commands to switch the modem to CMUX mode
37 and check that it's succesful (should return OK) */ 37 and check that it's successful (should return OK) */
38 write(fd, "AT+CMUX=0\r", 10); 38 write(fd, "AT+CMUX=0\r", 10);
39 39
40 /* experience showed that some modems need some time before 40 /* experience showed that some modems need some time before
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
index 3c1eddd9fcc7..9822afb6313c 100644
--- a/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -322,7 +322,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
322 "port" needs to match the BASE ADDRESS jumper on the card (0x220 or 0x240) 322 "port" needs to match the BASE ADDRESS jumper on the card (0x220 or 0x240)
323 or the value stored in the card's EEPROM for cards that have an EEPROM and 323 or the value stored in the card's EEPROM for cards that have an EEPROM and
324 their "CONFIG MODE" jumper set to "EEPROM SETTING". The other values can 324 their "CONFIG MODE" jumper set to "EEPROM SETTING". The other values can
325 be choosen freely from the options enumerated above. 325 be chosen freely from the options enumerated above.
326 326
327 If dma2 is specified and different from dma1, the card will operate in 327 If dma2 is specified and different from dma1, the card will operate in
328 full-duplex mode. When dma1=3, only dma2=0 is valid and the only way to 328 full-duplex mode. When dma1=3, only dma2=0 is valid and the only way to
@@ -356,7 +356,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
356 "port" needs to match the BASE ADDRESS jumper on the card (0x220 or 0x240) 356 "port" needs to match the BASE ADDRESS jumper on the card (0x220 or 0x240)
357 or the value stored in the card's EEPROM for cards that have an EEPROM and 357 or the value stored in the card's EEPROM for cards that have an EEPROM and
358 their "CONFIG MODE" jumper set to "EEPROM SETTING". The other values can 358 their "CONFIG MODE" jumper set to "EEPROM SETTING". The other values can
359 be choosen freely from the options enumerated above. 359 be chosen freely from the options enumerated above.
360 360
361 If dma2 is specified and different from dma1, the card will operate in 361 If dma2 is specified and different from dma1, the card will operate in
362 full-duplex mode. When dma1=3, only dma2=0 is valid and the only way to 362 full-duplex mode. When dma1=3, only dma2=0 is valid and the only way to
@@ -2229,7 +2229,7 @@ Proc interfaces (/proc/asound)
2229 2229
2230/proc/asound/card#/pcm#[cp]/oss 2230/proc/asound/card#/pcm#[cp]/oss
2231------------------------------- 2231-------------------------------
2232 String "erase" - erase all additional informations about OSS applications 2232 String "erase" - erase all additional information about OSS applications
2233 String "<app_name> <fragments> <fragment_size> [<options>]" 2233 String "<app_name> <fragments> <fragment_size> [<options>]"
2234 2234
2235 <app_name> - name of application with (higher priority) or without path 2235 <app_name> - name of application with (higher priority) or without path
diff --git a/Documentation/sound/alsa/SB-Live-mixer.txt b/Documentation/sound/alsa/SB-Live-mixer.txt
index f5639d40521d..f4b5988f450c 100644
--- a/Documentation/sound/alsa/SB-Live-mixer.txt
+++ b/Documentation/sound/alsa/SB-Live-mixer.txt
@@ -87,14 +87,14 @@ accumulator. ALSA uses accumulators 0 and 1 for left and right PCM.
87The result is forwarded to the ADC capture FIFO (thus to the standard capture 87The result is forwarded to the ADC capture FIFO (thus to the standard capture
88PCM device). 88PCM device).
89 89
90name='Music Playback Volume',index=0 90name='Synth Playback Volume',index=0
91 91
92This control is used to attenuate samples for left and right MIDI FX-bus 92This control is used to attenuate samples for left and right MIDI FX-bus
93accumulators. ALSA uses accumulators 4 and 5 for left and right MIDI samples. 93accumulators. ALSA uses accumulators 4 and 5 for left and right MIDI samples.
94The result samples are forwarded to the front DAC PCM slots of the AC97 codec. 94The result samples are forwarded to the front DAC PCM slots of the AC97 codec.
95 95
96name='Music Capture Volume',index=0 96name='Synth Capture Volume',index=0
97name='Music Capture Switch',index=0 97name='Synth Capture Switch',index=0
98 98
99These controls are used to attenuate samples for left and right MIDI FX-bus 99These controls are used to attenuate samples for left and right MIDI FX-bus
100accumulator. ALSA uses accumulators 4 and 5 for left and right PCM. 100accumulator. ALSA uses accumulators 4 and 5 for left and right PCM.
diff --git a/Documentation/sound/oss/AudioExcelDSP16 b/Documentation/sound/oss/AudioExcelDSP16
index c0f08922993b..e0dc0641b480 100644
--- a/Documentation/sound/oss/AudioExcelDSP16
+++ b/Documentation/sound/oss/AudioExcelDSP16
@@ -1,10 +1,10 @@
1Driver 1Driver
2------ 2------
3 3
4Informations about Audio Excel DSP 16 driver can be found in the source 4Information about Audio Excel DSP 16 driver can be found in the source
5file aedsp16.c 5file aedsp16.c
6Please, read the head of the source before using it. It contain useful 6Please, read the head of the source before using it. It contain useful
7informations. 7information.
8 8
9Configuration 9Configuration
10------------- 10-------------
@@ -68,7 +68,7 @@ Sound cards supported
68This driver supports the SC-6000 and SC-6600 based Gallant's sound card. 68This driver supports the SC-6000 and SC-6600 based Gallant's sound card.
69It don't support the Audio Excel DSP 16 III (try the SC-6600 code). 69It don't support the Audio Excel DSP 16 III (try the SC-6600 code).
70I'm working on the III version of the card: if someone have useful 70I'm working on the III version of the card: if someone have useful
71informations about it, please let me know. 71information about it, please let me know.
72For all the non-supported audio cards, you have to boot MS-DOS (or WIN95) 72For all the non-supported audio cards, you have to boot MS-DOS (or WIN95)
73activating the audio card with the MS-DOS device driver, then you have to 73activating the audio card with the MS-DOS device driver, then you have to
74<ctrl>-<alt>-<del> and boot Linux. 74<ctrl>-<alt>-<del> and boot Linux.
diff --git a/Documentation/sound/oss/README.OSS b/Documentation/sound/oss/README.OSS
index c615debbf08d..4be259428a1c 100644
--- a/Documentation/sound/oss/README.OSS
+++ b/Documentation/sound/oss/README.OSS
@@ -1352,7 +1352,7 @@ OSS-mixer.
1352The PCM20 contains a radio tuner, which is also controlled by 1352The PCM20 contains a radio tuner, which is also controlled by
1353ACI. This radio tuner is supported by the ACI driver together with the 1353ACI. This radio tuner is supported by the ACI driver together with the
1354miropcm20.o module. Also the 7-band equalizer is integrated 1354miropcm20.o module. Also the 7-band equalizer is integrated
1355(limited by the OSS-design). Developement has started and maybe 1355(limited by the OSS-design). Development has started and maybe
1356finished for the RDS decoder on this card, too. You will be able to 1356finished for the RDS decoder on this card, too. You will be able to
1357read RadioText, the Programme Service name, Programme TYpe and 1357read RadioText, the Programme Service name, Programme TYpe and
1358others. Even the v4l radio module benefits from it with a refined 1358others. Even the v4l radio module benefits from it with a refined
diff --git a/Documentation/sound/oss/README.ymfsb b/Documentation/sound/oss/README.ymfsb
index af8a7d3a4e8e..b6b77906b58d 100644
--- a/Documentation/sound/oss/README.ymfsb
+++ b/Documentation/sound/oss/README.ymfsb
@@ -5,7 +5,7 @@ FIRST OF ALL
5============ 5============
6 6
7 This code references YAMAHA's sample codes and data sheets. 7 This code references YAMAHA's sample codes and data sheets.
8 I respect and thank for all people they made open the informations 8 I respect and thank for all people they made open the information
9 about YMF7xx cards. 9 about YMF7xx cards.
10 10
11 And this codes heavily based on Jeff Garzik <jgarzik@pobox.com>'s 11 And this codes heavily based on Jeff Garzik <jgarzik@pobox.com>'s
diff --git a/Documentation/spi/pxa2xx b/Documentation/spi/pxa2xx
index 68a4fe3818a1..493dada57372 100644
--- a/Documentation/spi/pxa2xx
+++ b/Documentation/spi/pxa2xx
@@ -143,7 +143,7 @@ configured to use SSPFRM instead.
143NOTE: the SPI driver cannot control the chip select if SSPFRM is used, so the 143NOTE: the SPI driver cannot control the chip select if SSPFRM is used, so the
144chipselect is dropped after each spi_transfer. Most devices need chip select 144chipselect is dropped after each spi_transfer. Most devices need chip select
145asserted around the complete message. Use SSPFRM as a GPIO (through cs_control) 145asserted around the complete message. Use SSPFRM as a GPIO (through cs_control)
146to accomodate these chips. 146to accommodate these chips.
147 147
148 148
149NSSP SLAVE SAMPLE 149NSSP SLAVE SAMPLE
diff --git a/Documentation/spi/spi-lm70llp b/Documentation/spi/spi-lm70llp
index 34a9cfd746bd..463f6d01fa15 100644
--- a/Documentation/spi/spi-lm70llp
+++ b/Documentation/spi/spi-lm70llp
@@ -46,7 +46,7 @@ The hardware interfacing on the LM70 LLP eval board is as follows:
46 46
47Note that since the LM70 uses a "3-wire" variant of SPI, the SI/SO pin 47Note that since the LM70 uses a "3-wire" variant of SPI, the SI/SO pin
48is connected to both pin D7 (as Master Out) and Select (as Master In) 48is connected to both pin D7 (as Master Out) and Select (as Master In)
49using an arrangment that lets either the parport or the LM70 pull the 49using an arrangement that lets either the parport or the LM70 pull the
50pin low. This can't be shared with true SPI devices, but other 3-wire 50pin low. This can't be shared with true SPI devices, but other 3-wire
51devices might share the same SI/SO pin. 51devices might share the same SI/SO pin.
52 52
diff --git a/Documentation/target/tcm_mod_builder.py b/Documentation/target/tcm_mod_builder.py
index dbeb8a0d7175..7ef9b843d529 100755
--- a/Documentation/target/tcm_mod_builder.py
+++ b/Documentation/target/tcm_mod_builder.py
@@ -239,8 +239,8 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name):
239 buf += "#include <target/target_core_configfs.h>\n" 239 buf += "#include <target/target_core_configfs.h>\n"
240 buf += "#include <target/target_core_base.h>\n" 240 buf += "#include <target/target_core_base.h>\n"
241 buf += "#include <target/configfs_macros.h>\n\n" 241 buf += "#include <target/configfs_macros.h>\n\n"
242 buf += "#include <" + fabric_mod_name + "_base.h>\n" 242 buf += "#include \"" + fabric_mod_name + "_base.h\"\n"
243 buf += "#include <" + fabric_mod_name + "_fabric.h>\n\n" 243 buf += "#include \"" + fabric_mod_name + "_fabric.h\"\n\n"
244 244
245 buf += "/* Local pointer to allocated TCM configfs fabric module */\n" 245 buf += "/* Local pointer to allocated TCM configfs fabric module */\n"
246 buf += "struct target_fabric_configfs *" + fabric_mod_name + "_fabric_configfs;\n\n" 246 buf += "struct target_fabric_configfs *" + fabric_mod_name + "_fabric_configfs;\n\n"
@@ -289,6 +289,7 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name):
289 buf += "{\n" 289 buf += "{\n"
290 buf += " struct " + fabric_mod_name + "_nacl *nacl = container_of(se_acl,\n" 290 buf += " struct " + fabric_mod_name + "_nacl *nacl = container_of(se_acl,\n"
291 buf += " struct " + fabric_mod_name + "_nacl, se_node_acl);\n" 291 buf += " struct " + fabric_mod_name + "_nacl, se_node_acl);\n"
292 buf += " core_tpg_del_initiator_node_acl(se_acl->se_tpg, se_acl, 1);\n"
292 buf += " kfree(nacl);\n" 293 buf += " kfree(nacl);\n"
293 buf += "}\n\n" 294 buf += "}\n\n"
294 295
@@ -583,9 +584,9 @@ def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name):
583 buf += "#include <target/target_core_fabric_lib.h>\n" 584 buf += "#include <target/target_core_fabric_lib.h>\n"
584 buf += "#include <target/target_core_device.h>\n" 585 buf += "#include <target/target_core_device.h>\n"
585 buf += "#include <target/target_core_tpg.h>\n" 586 buf += "#include <target/target_core_tpg.h>\n"
586 buf += "#include <target/target_core_configfs.h>\n" 587 buf += "#include <target/target_core_configfs.h>\n\n"
587 buf += "#include <" + fabric_mod_name + "_base.h>\n" 588 buf += "#include \"" + fabric_mod_name + "_base.h\"\n"
588 buf += "#include <" + fabric_mod_name + "_fabric.h>\n\n" 589 buf += "#include \"" + fabric_mod_name + "_fabric.h\"\n\n"
589 590
590 buf += "int " + fabric_mod_name + "_check_true(struct se_portal_group *se_tpg)\n" 591 buf += "int " + fabric_mod_name + "_check_true(struct se_portal_group *se_tpg)\n"
591 buf += "{\n" 592 buf += "{\n"
@@ -973,14 +974,13 @@ def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name):
973def tcm_mod_build_kbuild(fabric_mod_dir_var, fabric_mod_name): 974def tcm_mod_build_kbuild(fabric_mod_dir_var, fabric_mod_name):
974 975
975 buf = "" 976 buf = ""
976 f = fabric_mod_dir_var + "/Kbuild" 977 f = fabric_mod_dir_var + "/Makefile"
977 print "Writing file: " + f 978 print "Writing file: " + f
978 979
979 p = open(f, 'w') 980 p = open(f, 'w')
980 if not p: 981 if not p:
981 tcm_mod_err("Unable to open file: " + f) 982 tcm_mod_err("Unable to open file: " + f)
982 983
983 buf = "EXTRA_CFLAGS += -I$(srctree)/drivers/target/ -I$(srctree)/include/ -I$(srctree)/drivers/scsi/ -I$(srctree)/include/scsi/ -I$(srctree)/drivers/target/" + fabric_mod_name + "\n\n"
984 buf += fabric_mod_name + "-objs := " + fabric_mod_name + "_fabric.o \\\n" 984 buf += fabric_mod_name + "-objs := " + fabric_mod_name + "_fabric.o \\\n"
985 buf += " " + fabric_mod_name + "_configfs.o\n" 985 buf += " " + fabric_mod_name + "_configfs.o\n"
986 buf += "obj-$(CONFIG_" + fabric_mod_name.upper() + ") += " + fabric_mod_name + ".o\n" 986 buf += "obj-$(CONFIG_" + fabric_mod_name.upper() + ") += " + fabric_mod_name + ".o\n"
@@ -1018,7 +1018,7 @@ def tcm_mod_build_kconfig(fabric_mod_dir_var, fabric_mod_name):
1018 1018
1019def tcm_mod_add_kbuild(tcm_dir, fabric_mod_name): 1019def tcm_mod_add_kbuild(tcm_dir, fabric_mod_name):
1020 buf = "obj-$(CONFIG_" + fabric_mod_name.upper() + ") += " + fabric_mod_name.lower() + "/\n" 1020 buf = "obj-$(CONFIG_" + fabric_mod_name.upper() + ") += " + fabric_mod_name.lower() + "/\n"
1021 kbuild = tcm_dir + "/drivers/target/Kbuild" 1021 kbuild = tcm_dir + "/drivers/target/Makefile"
1022 1022
1023 f = open(kbuild, 'a') 1023 f = open(kbuild, 'a')
1024 f.write(buf) 1024 f.write(buf)
@@ -1064,7 +1064,7 @@ def main(modname, proto_ident):
1064 tcm_mod_build_kbuild(fabric_mod_dir, fabric_mod_name) 1064 tcm_mod_build_kbuild(fabric_mod_dir, fabric_mod_name)
1065 tcm_mod_build_kconfig(fabric_mod_dir, fabric_mod_name) 1065 tcm_mod_build_kconfig(fabric_mod_dir, fabric_mod_name)
1066 1066
1067 input = raw_input("Would you like to add " + fabric_mod_name + "to drivers/target/Kbuild..? [yes,no]: ") 1067 input = raw_input("Would you like to add " + fabric_mod_name + "to drivers/target/Makefile..? [yes,no]: ")
1068 if input == "yes" or input == "y": 1068 if input == "yes" or input == "y":
1069 tcm_mod_add_kbuild(tcm_dir, fabric_mod_name) 1069 tcm_mod_add_kbuild(tcm_dir, fabric_mod_name)
1070 1070
diff --git a/Documentation/telephony/ixj.txt b/Documentation/telephony/ixj.txt
index 4fb314d51702..db94fb6c5678 100644
--- a/Documentation/telephony/ixj.txt
+++ b/Documentation/telephony/ixj.txt
@@ -51,7 +51,7 @@ be removed to protect the rights of others.
51Specifically, very old Internet PhoneJACK cards have non-standard 51Specifically, very old Internet PhoneJACK cards have non-standard
52G.723.1 codecs (due to the early nature of the DSPs in those days). 52G.723.1 codecs (due to the early nature of the DSPs in those days).
53The auto-conversion code to bring those cards into compliance with 53The auto-conversion code to bring those cards into compliance with
54todays standards is available as a binary only module to those people 54today's standards is available as a binary only module to those people
55needing it. If you bought your card after 1997 or so, you are OK - 55needing it. If you bought your card after 1997 or so, you are OK -
56it's only the very old cards that are affected. 56it's only the very old cards that are affected.
57 57
diff --git a/Documentation/trace/ring-buffer-design.txt b/Documentation/trace/ring-buffer-design.txt
index d299ff31df57..7d350b496585 100644
--- a/Documentation/trace/ring-buffer-design.txt
+++ b/Documentation/trace/ring-buffer-design.txt
@@ -237,7 +237,7 @@ with the previous write.
237 |written | 237 |written |
238 +---------+ 238 +---------+
239 |written | 239 |written |
240 +---------+ <--- next positon for write (current commit) 240 +---------+ <--- next position for write (current commit)
241 | empty | 241 | empty |
242 +---------+ 242 +---------+
243 243
diff --git a/Documentation/video4linux/README.ivtv b/Documentation/video4linux/README.ivtv
index 42b06686eb78..2579b5b709ed 100644
--- a/Documentation/video4linux/README.ivtv
+++ b/Documentation/video4linux/README.ivtv
@@ -36,8 +36,7 @@ Additional features for the PVR-350 (CX23415 based):
36 * Provides comprehensive OSD (On Screen Display: ie. graphics overlaying the 36 * Provides comprehensive OSD (On Screen Display: ie. graphics overlaying the
37 video signal) 37 video signal)
38 * Provides a framebuffer (allowing X applications to appear on the video 38 * Provides a framebuffer (allowing X applications to appear on the video
39 device) (this framebuffer is not yet part of the kernel. In the meantime it 39 device)
40 is available from www.ivtvdriver.org).
41 * Supports raw YUV output. 40 * Supports raw YUV output.
42 41
43IMPORTANT: In case of problems first read this page: 42IMPORTANT: In case of problems first read this page:
diff --git a/Documentation/video4linux/README.pvrusb2 b/Documentation/video4linux/README.pvrusb2
index a747200fe67c..2137b589276b 100644
--- a/Documentation/video4linux/README.pvrusb2
+++ b/Documentation/video4linux/README.pvrusb2
@@ -172,7 +172,7 @@ Source file list / functional overview:
172 to provide a streaming API usable by a read() system call style of 172 to provide a streaming API usable by a read() system call style of
173 I/O. Right now this is the only layer on top of pvrusb2-io.[ch], 173 I/O. Right now this is the only layer on top of pvrusb2-io.[ch],
174 however the underlying architecture here was intended to allow for 174 however the underlying architecture here was intended to allow for
175 other styles of I/O to be implemented with additonal modules, like 175 other styles of I/O to be implemented with additional modules, like
176 mmap()'ed buffers or something even more exotic. 176 mmap()'ed buffers or something even more exotic.
177 177
178 pvrusb2-main.c - This is the top level of the driver. Module level 178 pvrusb2-main.c - This is the top level of the driver. Module level
diff --git a/Documentation/video4linux/Zoran b/Documentation/video4linux/Zoran
index 699b60e070d2..c40e3bab08fa 100644
--- a/Documentation/video4linux/Zoran
+++ b/Documentation/video4linux/Zoran
@@ -130,7 +130,7 @@ Card number: 4
130 130
131Note: No module for the mse3000 is available yet 131Note: No module for the mse3000 is available yet
132Note: No module for the vpx3224 is available yet 132Note: No module for the vpx3224 is available yet
133Note: use encoder=X or decoder=X for non-default i2c chips (see i2c-id.h) 133Note: use encoder=X or decoder=X for non-default i2c chips
134 134
135=========================== 135===========================
136 136
diff --git a/Documentation/video4linux/bttv/Insmod-options b/Documentation/video4linux/bttv/Insmod-options
index bbe3ed667d91..14c065fa23ef 100644
--- a/Documentation/video4linux/bttv/Insmod-options
+++ b/Documentation/video4linux/bttv/Insmod-options
@@ -1,5 +1,5 @@
1 1
2Note: "modinfo <module>" prints various informations about a kernel 2Note: "modinfo <module>" prints various information about a kernel
3module, among them a complete and up-to-date list of insmod options. 3module, among them a complete and up-to-date list of insmod options.
4This list tends to be outdated because it is updated manually ... 4This list tends to be outdated because it is updated manually ...
5 5
diff --git a/Documentation/video4linux/bttv/README b/Documentation/video4linux/bttv/README
index 3a367cdb664e..7cbf4fb6cf31 100644
--- a/Documentation/video4linux/bttv/README
+++ b/Documentation/video4linux/bttv/README
@@ -70,7 +70,7 @@ If you have trouble with some specific TV card, try to ask there
70instead of mailing me directly. The chance that someone with the 70instead of mailing me directly. The chance that someone with the
71same card listens there is much higher... 71same card listens there is much higher...
72 72
73For problems with sound: There are alot of different systems used 73For problems with sound: There are a lot of different systems used
74for TV sound all over the world. And there are also different chips 74for TV sound all over the world. And there are also different chips
75which decode the audio signal. Reports about sound problems ("stereo 75which decode the audio signal. Reports about sound problems ("stereo
76does'nt work") are pretty useless unless you include some details 76does'nt work") are pretty useless unless you include some details
diff --git a/Documentation/video4linux/bttv/README.freeze b/Documentation/video4linux/bttv/README.freeze
index 4259dccc8287..5eddfa076cfb 100644
--- a/Documentation/video4linux/bttv/README.freeze
+++ b/Documentation/video4linux/bttv/README.freeze
@@ -33,7 +33,7 @@ state is stuck.
33 33
34I've seen reports that bttv 0.7.x crashes whereas 0.8.x works rock solid 34I've seen reports that bttv 0.7.x crashes whereas 0.8.x works rock solid
35for some people. Thus probably a small buglet left somewhere in bttv 35for some people. Thus probably a small buglet left somewhere in bttv
360.7.x. I have no idea where exactly, it works stable for me and alot of 360.7.x. I have no idea where exactly, it works stable for me and a lot of
37other people. But in case you have problems with the 0.7.x versions you 37other people. But in case you have problems with the 0.7.x versions you
38can give 0.8.x a try ... 38can give 0.8.x a try ...
39 39
diff --git a/Documentation/video4linux/bttv/Sound-FAQ b/Documentation/video4linux/bttv/Sound-FAQ
index 1e6328f91083..395f6c6fdd98 100644
--- a/Documentation/video4linux/bttv/Sound-FAQ
+++ b/Documentation/video4linux/bttv/Sound-FAQ
@@ -2,13 +2,13 @@
2bttv and sound mini howto 2bttv and sound mini howto
3========================= 3=========================
4 4
5There are alot of different bt848/849/878/879 based boards available. 5There are a lot of different bt848/849/878/879 based boards available.
6Making video work often is not a big deal, because this is handled 6Making video work often is not a big deal, because this is handled
7completely by the bt8xx chip, which is common on all boards. But 7completely by the bt8xx chip, which is common on all boards. But
8sound is handled in slightly different ways on each board. 8sound is handled in slightly different ways on each board.
9 9
10To handle the grabber boards correctly, there is a array tvcards[] in 10To handle the grabber boards correctly, there is a array tvcards[] in
11bttv-cards.c, which holds the informations required for each board. 11bttv-cards.c, which holds the information required for each board.
12Sound will work only, if the correct entry is used (for video it often 12Sound will work only, if the correct entry is used (for video it often
13makes no difference). The bttv driver prints a line to the kernel 13makes no difference). The bttv driver prints a line to the kernel
14log, telling which card type is used. Like this one: 14log, telling which card type is used. Like this one:
diff --git a/Documentation/video4linux/et61x251.txt b/Documentation/video4linux/et61x251.txt
index 1247566c4de3..e0cdae491858 100644
--- a/Documentation/video4linux/et61x251.txt
+++ b/Documentation/video4linux/et61x251.txt
@@ -191,10 +191,10 @@ Syntax: <n>
191Description: Debugging information level, from 0 to 3: 191Description: Debugging information level, from 0 to 3:
192 0 = none (use carefully) 192 0 = none (use carefully)
193 1 = critical errors 193 1 = critical errors
194 2 = significant informations 194 2 = significant information
195 3 = more verbose messages 195 3 = more verbose messages
196 Level 3 is useful for testing only, when only one device 196 Level 3 is useful for testing only, when only one device
197 is used at the same time. It also shows some more informations 197 is used at the same time. It also shows some more information
198 about the hardware being detected. This module parameter can be 198 about the hardware being detected. This module parameter can be
199 changed at runtime thanks to the /sys filesystem interface. 199 changed at runtime thanks to the /sys filesystem interface.
200Default: 2 200Default: 2
diff --git a/Documentation/video4linux/gspca.txt b/Documentation/video4linux/gspca.txt
index 261776e0c5e1..5c542e60f51d 100644
--- a/Documentation/video4linux/gspca.txt
+++ b/Documentation/video4linux/gspca.txt
@@ -103,6 +103,7 @@ spca561 046d:092d Logitech QC Elch2
103spca561 046d:092e Logitech QC Elch2 103spca561 046d:092e Logitech QC Elch2
104spca561 046d:092f Logitech QuickCam Express Plus 104spca561 046d:092f Logitech QuickCam Express Plus
105sunplus 046d:0960 Logitech ClickSmart 420 105sunplus 046d:0960 Logitech ClickSmart 420
106nw80x 046d:d001 Logitech QuickCam Pro (dark focus ring)
106sunplus 0471:0322 Philips DMVC1300K 107sunplus 0471:0322 Philips DMVC1300K
107zc3xx 0471:0325 Philips SPC 200 NC 108zc3xx 0471:0325 Philips SPC 200 NC
108zc3xx 0471:0326 Philips SPC 300 NC 109zc3xx 0471:0326 Philips SPC 300 NC
@@ -150,10 +151,12 @@ sunplus 04fc:5330 Digitrex 2110
150sunplus 04fc:5360 Sunplus Generic 151sunplus 04fc:5360 Sunplus Generic
151spca500 04fc:7333 PalmPixDC85 152spca500 04fc:7333 PalmPixDC85
152sunplus 04fc:ffff Pure DigitalDakota 153sunplus 04fc:ffff Pure DigitalDakota
154nw80x 0502:d001 DVC V6
153spca501 0506:00df 3Com HomeConnect Lite 155spca501 0506:00df 3Com HomeConnect Lite
154sunplus 052b:1507 Megapixel 5 Pretec DC-1007 156sunplus 052b:1507 Megapixel 5 Pretec DC-1007
155sunplus 052b:1513 Megapix V4 157sunplus 052b:1513 Megapix V4
156sunplus 052b:1803 MegaImage VI 158sunplus 052b:1803 MegaImage VI
159nw80x 052b:d001 EZCam Pro p35u
157tv8532 0545:808b Veo Stingray 160tv8532 0545:808b Veo Stingray
158tv8532 0545:8333 Veo Stingray 161tv8532 0545:8333 Veo Stingray
159sunplus 0546:3155 Polaroid PDC3070 162sunplus 0546:3155 Polaroid PDC3070
@@ -177,6 +180,7 @@ sunplus 055f:c530 Mustek Gsmart LCD 3
177sunplus 055f:c540 Gsmart D30 180sunplus 055f:c540 Gsmart D30
178sunplus 055f:c630 Mustek MDC4000 181sunplus 055f:c630 Mustek MDC4000
179sunplus 055f:c650 Mustek MDC5500Z 182sunplus 055f:c650 Mustek MDC5500Z
183nw80x 055f:d001 Mustek Wcam 300 mini
180zc3xx 055f:d003 Mustek WCam300A 184zc3xx 055f:d003 Mustek WCam300A
181zc3xx 055f:d004 Mustek WCam300 AN 185zc3xx 055f:d004 Mustek WCam300 AN
182conex 0572:0041 Creative Notebook cx11646 186conex 0572:0041 Creative Notebook cx11646
@@ -195,14 +199,20 @@ gl860 05e3:0503 Genesys Logic PC Camera
195gl860 05e3:f191 Genesys Logic PC Camera 199gl860 05e3:f191 Genesys Logic PC Camera
196spca561 060b:a001 Maxell Compact Pc PM3 200spca561 060b:a001 Maxell Compact Pc PM3
197zc3xx 0698:2003 CTX M730V built in 201zc3xx 0698:2003 CTX M730V built in
202nw80x 06a5:0000 Typhoon Webcam 100 USB
203nw80x 06a5:d001 Divio based webcams
204nw80x 06a5:d800 Divio Chicony TwinkleCam, Trust SpaceCam
198spca500 06bd:0404 Agfa CL20 205spca500 06bd:0404 Agfa CL20
199spca500 06be:0800 Optimedia 206spca500 06be:0800 Optimedia
207nw80x 06be:d001 EZCam Pro p35u
200sunplus 06d6:0031 Trust 610 LCD PowerC@m Zoom 208sunplus 06d6:0031 Trust 610 LCD PowerC@m Zoom
201spca506 06e1:a190 ADS Instant VCD 209spca506 06e1:a190 ADS Instant VCD
210ov534 06f8:3002 Hercules Blog Webcam
202ov534_9 06f8:3003 Hercules Dualpix HD Weblog 211ov534_9 06f8:3003 Hercules Dualpix HD Weblog
203sonixj 06f8:3004 Hercules Classic Silver 212sonixj 06f8:3004 Hercules Classic Silver
204sonixj 06f8:3008 Hercules Deluxe Optical Glass 213sonixj 06f8:3008 Hercules Deluxe Optical Glass
205pac7302 06f8:3009 Hercules Classic Link 214pac7302 06f8:3009 Hercules Classic Link
215nw80x 0728:d001 AVerMedia Camguard
206spca508 0733:0110 ViewQuest VQ110 216spca508 0733:0110 ViewQuest VQ110
207spca501 0733:0401 Intel Create and Share 217spca501 0733:0401 Intel Create and Share
208spca501 0733:0402 ViewQuest M318B 218spca501 0733:0402 ViewQuest M318B
diff --git a/Documentation/video4linux/omap3isp.txt b/Documentation/video4linux/omap3isp.txt
new file mode 100644
index 000000000000..69be2c782b98
--- /dev/null
+++ b/Documentation/video4linux/omap3isp.txt
@@ -0,0 +1,278 @@
1OMAP 3 Image Signal Processor (ISP) driver
2
3Copyright (C) 2010 Nokia Corporation
4Copyright (C) 2009 Texas Instruments, Inc.
5
6Contacts: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 Sakari Ailus <sakari.ailus@iki.fi>
8 David Cohen <dacohen@gmail.com>
9
10
11Introduction
12============
13
14This file documents the Texas Instruments OMAP 3 Image Signal Processor (ISP)
15driver located under drivers/media/video/omap3isp. The original driver was
16written by Texas Instruments but since that it has been rewritten (twice) at
17Nokia.
18
19The driver has been successfully used on the following versions of OMAP 3:
20
21 3430
22 3530
23 3630
24
25The driver implements V4L2, Media controller and v4l2_subdev interfaces.
26Sensor, lens and flash drivers using the v4l2_subdev interface in the kernel
27are supported.
28
29
30Split to subdevs
31================
32
33The OMAP 3 ISP is split into V4L2 subdevs, each of the blocks inside the ISP
34having one subdev to represent it. Each of the subdevs provide a V4L2 subdev
35interface to userspace.
36
37 OMAP3 ISP CCP2
38 OMAP3 ISP CSI2a
39 OMAP3 ISP CCDC
40 OMAP3 ISP preview
41 OMAP3 ISP resizer
42 OMAP3 ISP AEWB
43 OMAP3 ISP AF
44 OMAP3 ISP histogram
45
46Each possible link in the ISP is modelled by a link in the Media controller
47interface. For an example program see [2].
48
49
50Controlling the OMAP 3 ISP
51==========================
52
53In general, the settings given to the OMAP 3 ISP take effect at the beginning
54of the following frame. This is done when the module becomes idle during the
55vertical blanking period on the sensor. In memory-to-memory operation the pipe
56is run one frame at a time. Applying the settings is done between the frames.
57
58All the blocks in the ISP, excluding the CSI-2 and possibly the CCP2 receiver,
59insist on receiving complete frames. Sensors must thus never send the ISP
60partial frames.
61
62Autoidle does have issues with some ISP blocks on the 3430, at least.
63Autoidle is only enabled on 3630 when the omap3isp module parameter autoidle
64is non-zero.
65
66
67Events
68======
69
70The OMAP 3 ISP driver does support the V4L2 event interface on CCDC and
71statistics (AEWB, AF and histogram) subdevs.
72
73The CCDC subdev produces V4L2_EVENT_OMAP3ISP_HS_VS type event on HS_VS
74interrupt which is used to signal frame start. The event is triggered exactly
75when the reception of the first line of the frame starts in the CCDC module.
76The event can be subscribed on the CCDC subdev.
77
78(When using parallel interface one must pay account to correct configuration
79of the VS signal polarity. This is automatically correct when using the serial
80receivers.)
81
82Each of the statistics subdevs is able to produce events. An event is
83generated whenever a statistics buffer can be dequeued by a user space
84application using the VIDIOC_OMAP3ISP_STAT_REQ IOCTL. The events available
85are:
86
87 V4L2_EVENT_OMAP3ISP_AEWB
88 V4L2_EVENT_OMAP3ISP_AF
89 V4L2_EVENT_OMAP3ISP_HIST
90
91The type of the event data is struct omap3isp_stat_event_status for these
92ioctls. If there is an error calculating the statistics, there will be an
93event as usual, but no related statistics buffer. In this case
94omap3isp_stat_event_status.buf_err is set to non-zero.
95
96
97Private IOCTLs
98==============
99
100The OMAP 3 ISP driver supports standard V4L2 IOCTLs and controls where
101possible and practical. Much of the functions provided by the ISP, however,
102does not fall under the standard IOCTLs --- gamma tables and configuration of
103statistics collection are examples of such.
104
105In general, there is a private ioctl for configuring each of the blocks
106containing hardware-dependent functions.
107
108The following private IOCTLs are supported:
109
110 VIDIOC_OMAP3ISP_CCDC_CFG
111 VIDIOC_OMAP3ISP_PRV_CFG
112 VIDIOC_OMAP3ISP_AEWB_CFG
113 VIDIOC_OMAP3ISP_HIST_CFG
114 VIDIOC_OMAP3ISP_AF_CFG
115 VIDIOC_OMAP3ISP_STAT_REQ
116 VIDIOC_OMAP3ISP_STAT_EN
117
118The parameter structures used by these ioctls are described in
119include/linux/omap3isp.h. The detailed functions of the ISP itself related to
120a given ISP block is described in the Technical Reference Manuals (TRMs) ---
121see the end of the document for those.
122
123While it is possible to use the ISP driver without any use of these private
124IOCTLs it is not possible to obtain optimal image quality this way. The AEWB,
125AF and histogram modules cannot be used without configuring them using the
126appropriate private IOCTLs.
127
128
129CCDC and preview block IOCTLs
130=============================
131
132The VIDIOC_OMAP3ISP_CCDC_CFG and VIDIOC_OMAP3ISP_PRV_CFG IOCTLs are used to
133configure, enable and disable functions in the CCDC and preview blocks,
134respectively. Both IOCTLs control several functions in the blocks they
135control. VIDIOC_OMAP3ISP_CCDC_CFG IOCTL accepts a pointer to struct
136omap3isp_ccdc_update_config as its argument. Similarly VIDIOC_OMAP3ISP_PRV_CFG
137accepts a pointer to struct omap3isp_prev_update_config. The definition of
138both structures is available in [1].
139
140The update field in the structures tells whether to update the configuration
141for the specific function and the flag tells whether to enable or disable the
142function.
143
144The update and flag bit masks accept the following values. Each separate
145functions in the CCDC and preview blocks is associated with a flag (either
146disable or enable; part of the flag field in the structure) and a pointer to
147configuration data for the function.
148
149Valid values for the update and flag fields are listed here for
150VIDIOC_OMAP3ISP_CCDC_CFG. Values may be or'ed to configure more than one
151function in the same IOCTL call.
152
153 OMAP3ISP_CCDC_ALAW
154 OMAP3ISP_CCDC_LPF
155 OMAP3ISP_CCDC_BLCLAMP
156 OMAP3ISP_CCDC_BCOMP
157 OMAP3ISP_CCDC_FPC
158 OMAP3ISP_CCDC_CULL
159 OMAP3ISP_CCDC_CONFIG_LSC
160 OMAP3ISP_CCDC_TBL_LSC
161
162The corresponding values for the VIDIOC_OMAP3ISP_PRV_CFG are here:
163
164 OMAP3ISP_PREV_LUMAENH
165 OMAP3ISP_PREV_INVALAW
166 OMAP3ISP_PREV_HRZ_MED
167 OMAP3ISP_PREV_CFA
168 OMAP3ISP_PREV_CHROMA_SUPP
169 OMAP3ISP_PREV_WB
170 OMAP3ISP_PREV_BLKADJ
171 OMAP3ISP_PREV_RGB2RGB
172 OMAP3ISP_PREV_COLOR_CONV
173 OMAP3ISP_PREV_YC_LIMIT
174 OMAP3ISP_PREV_DEFECT_COR
175 OMAP3ISP_PREV_GAMMABYPASS
176 OMAP3ISP_PREV_DRK_FRM_CAPTURE
177 OMAP3ISP_PREV_DRK_FRM_SUBTRACT
178 OMAP3ISP_PREV_LENS_SHADING
179 OMAP3ISP_PREV_NF
180 OMAP3ISP_PREV_GAMMA
181
182The associated configuration pointer for the function may not be NULL when
183enabling the function. When disabling a function the configuration pointer is
184ignored.
185
186
187Statistic blocks IOCTLs
188=======================
189
190The statistics subdevs do offer more dynamic configuration options than the
191other subdevs. They can be enabled, disable and reconfigured when the pipeline
192is in streaming state.
193
194The statistics blocks always get the input image data from the CCDC (as the
195histogram memory read isn't implemented). The statistics are dequeueable by
196the user from the statistics subdev nodes using private IOCTLs.
197
198The private IOCTLs offered by the AEWB, AF and histogram subdevs are heavily
199reflected by the register level interface offered by the ISP hardware. There
200are aspects that are purely related to the driver implementation and these are
201discussed next.
202
203VIDIOC_OMAP3ISP_STAT_EN
204-----------------------
205
206This private IOCTL enables/disables a statistic module. If this request is
207done before streaming, it will take effect as soon as the pipeline starts to
208stream. If the pipeline is already streaming, it will take effect as soon as
209the CCDC becomes idle.
210
211VIDIOC_OMAP3ISP_AEWB_CFG, VIDIOC_OMAP3ISP_HIST_CFG and VIDIOC_OMAP3ISP_AF_CFG
212-----------------------------------------------------------------------------
213
214Those IOCTLs are used to configure the modules. They require user applications
215to have an in-depth knowledge of the hardware. Most of the fields explanation
216can be found on OMAP's TRMs. The two following fields common to all the above
217configure private IOCTLs require explanation for better understanding as they
218are not part of the TRM.
219
220omap3isp_[h3a_af/h3a_aewb/hist]_config.buf_size:
221
222The modules handle their buffers internally. The necessary buffer size for the
223module's data output depends on the requested configuration. Although the
224driver supports reconfiguration while streaming, it does not support a
225reconfiguration which requires bigger buffer size than what is already
226internally allocated if the module is enabled. It will return -EBUSY on this
227case. In order to avoid such condition, either disable/reconfigure/enable the
228module or request the necessary buffer size during the first configuration
229while the module is disabled.
230
231The internal buffer size allocation considers the requested configuration's
232minimum buffer size and the value set on buf_size field. If buf_size field is
233out of [minimum, maximum] buffer size range, it's clamped to fit in there.
234The driver then selects the biggest value. The corrected buf_size value is
235written back to user application.
236
237omap3isp_[h3a_af/h3a_aewb/hist]_config.config_counter:
238
239As the configuration doesn't take effect synchronously to the request, the
240driver must provide a way to track this information to provide more accurate
241data. After a configuration is requested, the config_counter returned to user
242space application will be an unique value associated to that request. When
243user application receives an event for buffer availability or when a new
244buffer is requested, this config_counter is used to match a buffer data and a
245configuration.
246
247VIDIOC_OMAP3ISP_STAT_REQ
248------------------------
249
250Send to user space the oldest data available in the internal buffer queue and
251discards such buffer afterwards. The field omap3isp_stat_data.frame_number
252matches with the video buffer's field_count.
253
254
255Technical reference manuals (TRMs) and other documentation
256==========================================================
257
258OMAP 3430 TRM:
259<URL:http://focus.ti.com/pdfs/wtbu/OMAP34xx_ES3.1.x_PUBLIC_TRM_vZM.zip>
260Referenced 2011-03-05.
261
262OMAP 35xx TRM:
263<URL:http://www.ti.com/litv/pdf/spruf98o> Referenced 2011-03-05.
264
265OMAP 3630 TRM:
266<URL:http://focus.ti.com/pdfs/wtbu/OMAP36xx_ES1.x_PUBLIC_TRM_vQ.zip>
267Referenced 2011-03-05.
268
269DM 3730 TRM:
270<URL:http://www.ti.com/litv/pdf/sprugn4h> Referenced 2011-03-06.
271
272
273References
274==========
275
276[1] include/linux/omap3isp.h
277
278[2] http://git.ideasonboard.org/?p=media-ctl.git;a=summary
diff --git a/Documentation/video4linux/pxa_camera.txt b/Documentation/video4linux/pxa_camera.txt
index 4f6d0ca01956..51ed1578b0e8 100644
--- a/Documentation/video4linux/pxa_camera.txt
+++ b/Documentation/video4linux/pxa_camera.txt
@@ -84,12 +84,12 @@ DMA usage
84 transfer is not started. On "End Of Frame" interrupt, the irq handler 84 transfer is not started. On "End Of Frame" interrupt, the irq handler
85 starts the DMA chain. 85 starts the DMA chain.
86 - capture of one videobuffer 86 - capture of one videobuffer
87 The DMA chain starts transfering data into videobuffer RAM pages. 87 The DMA chain starts transferring data into videobuffer RAM pages.
88 When all pages are transfered, the DMA irq is raised on "ENDINTR" status 88 When all pages are transferred, the DMA irq is raised on "ENDINTR" status
89 - finishing one videobuffer 89 - finishing one videobuffer
90 The DMA irq handler marks the videobuffer as "done", and removes it from 90 The DMA irq handler marks the videobuffer as "done", and removes it from
91 the active running queue 91 the active running queue
92 Meanwhile, the next videobuffer (if there is one), is transfered by DMA 92 Meanwhile, the next videobuffer (if there is one), is transferred by DMA
93 - finishing the last videobuffer 93 - finishing the last videobuffer
94 On the DMA irq of the last videobuffer, the QCI is stopped. 94 On the DMA irq of the last videobuffer, the QCI is stopped.
95 95
@@ -101,7 +101,7 @@ DMA usage
101 101
102 This structure is pointed by dma->sg_cpu. 102 This structure is pointed by dma->sg_cpu.
103 The descriptors are used as follows : 103 The descriptors are used as follows :
104 - desc-sg[i]: i-th descriptor, transfering the i-th sg 104 - desc-sg[i]: i-th descriptor, transferring the i-th sg
105 element to the video buffer scatter gather 105 element to the video buffer scatter gather
106 - finisher: has ddadr=DADDR_STOP, dcmd=ENDIRQEN 106 - finisher: has ddadr=DADDR_STOP, dcmd=ENDIRQEN
107 - linker: has ddadr= desc-sg[0] of next video buffer, dcmd=0 107 - linker: has ddadr= desc-sg[0] of next video buffer, dcmd=0
diff --git a/Documentation/video4linux/sh_mobile_ceu_camera.txt b/Documentation/video4linux/sh_mobile_ceu_camera.txt
index cb47e723af74..1e96ce6e2d2f 100644
--- a/Documentation/video4linux/sh_mobile_ceu_camera.txt
+++ b/Documentation/video4linux/sh_mobile_ceu_camera.txt
@@ -37,7 +37,7 @@ Generic scaling / cropping scheme
37-1'- 37-1'-
38 38
39In the above chart minuses and slashes represent "real" data amounts, points and 39In the above chart minuses and slashes represent "real" data amounts, points and
40accents represent "useful" data, basically, CEU scaled amd cropped output, 40accents represent "useful" data, basically, CEU scaled and cropped output,
41mapped back onto the client's source plane. 41mapped back onto the client's source plane.
42 42
43Such a configuration can be produced by user requests: 43Such a configuration can be produced by user requests:
@@ -65,7 +65,7 @@ Do not touch input rectangle - it is already optimal.
65 65
661. Calculate current sensor scales: 661. Calculate current sensor scales:
67 67
68 scale_s = ((3') - (3)) / ((2') - (2)) 68 scale_s = ((2') - (2)) / ((3') - (3))
69 69
702. Calculate "effective" input crop (sensor subwindow) - CEU crop scaled back at 702. Calculate "effective" input crop (sensor subwindow) - CEU crop scaled back at
71current sensor scales onto input window - this is user S_CROP: 71current sensor scales onto input window - this is user S_CROP:
@@ -80,7 +80,7 @@ window:
804. Calculate sensor output window by applying combined scales to real input 804. Calculate sensor output window by applying combined scales to real input
81window: 81window:
82 82
83 width_s_out = ((2') - (2)) / scale_comb 83 width_s_out = ((7') - (7)) = ((2') - (2)) / scale_comb
84 84
855. Apply iterative sensor S_FMT for sensor output window. 855. Apply iterative sensor S_FMT for sensor output window.
86 86
diff --git a/Documentation/video4linux/sn9c102.txt b/Documentation/video4linux/sn9c102.txt
index 73de4050d637..b4f67040403a 100644
--- a/Documentation/video4linux/sn9c102.txt
+++ b/Documentation/video4linux/sn9c102.txt
@@ -214,10 +214,10 @@ Syntax: <n>
214Description: Debugging information level, from 0 to 3: 214Description: Debugging information level, from 0 to 3:
215 0 = none (use carefully) 215 0 = none (use carefully)
216 1 = critical errors 216 1 = critical errors
217 2 = significant informations 217 2 = significant information
218 3 = more verbose messages 218 3 = more verbose messages
219 Level 3 is useful for testing only. It also shows some more 219 Level 3 is useful for testing only. It also shows some more
220 informations about the hardware being detected. 220 information about the hardware being detected.
221 This parameter can be changed at runtime thanks to the /sys 221 This parameter can be changed at runtime thanks to the /sys
222 filesystem interface. 222 filesystem interface.
223Default: 2 223Default: 2
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt
index f22f35c271f3..cf21f7aae976 100644
--- a/Documentation/video4linux/v4l2-framework.txt
+++ b/Documentation/video4linux/v4l2-framework.txt
@@ -71,6 +71,10 @@ sub-device instances, the video_device struct stores V4L2 device node data
71and in the future a v4l2_fh struct will keep track of filehandle instances 71and in the future a v4l2_fh struct will keep track of filehandle instances
72(this is not yet implemented). 72(this is not yet implemented).
73 73
74The V4L2 framework also optionally integrates with the media framework. If a
75driver sets the struct v4l2_device mdev field, sub-devices and video nodes
76will automatically appear in the media framework as entities.
77
74 78
75struct v4l2_device 79struct v4l2_device
76------------------ 80------------------
@@ -83,11 +87,20 @@ You must register the device instance:
83 87
84 v4l2_device_register(struct device *dev, struct v4l2_device *v4l2_dev); 88 v4l2_device_register(struct device *dev, struct v4l2_device *v4l2_dev);
85 89
86Registration will initialize the v4l2_device struct and link dev->driver_data 90Registration will initialize the v4l2_device struct. If the dev->driver_data
87to v4l2_dev. If v4l2_dev->name is empty then it will be set to a value derived 91field is NULL, it will be linked to v4l2_dev.
88from dev (driver name followed by the bus_id, to be precise). If you set it 92
89up before calling v4l2_device_register then it will be untouched. If dev is 93Drivers that want integration with the media device framework need to set
90NULL, then you *must* setup v4l2_dev->name before calling v4l2_device_register. 94dev->driver_data manually to point to the driver-specific device structure
95that embed the struct v4l2_device instance. This is achieved by a
96dev_set_drvdata() call before registering the V4L2 device instance. They must
97also set the struct v4l2_device mdev field to point to a properly initialized
98and registered media_device instance.
99
100If v4l2_dev->name is empty then it will be set to a value derived from dev
101(driver name followed by the bus_id, to be precise). If you set it up before
102calling v4l2_device_register then it will be untouched. If dev is NULL, then
103you *must* setup v4l2_dev->name before calling v4l2_device_register.
91 104
92You can use v4l2_device_set_name() to set the name based on a driver name and 105You can use v4l2_device_set_name() to set the name based on a driver name and
93a driver-global atomic_t instance. This will generate names like ivtv0, ivtv1, 106a driver-global atomic_t instance. This will generate names like ivtv0, ivtv1,
@@ -108,6 +121,7 @@ You unregister with:
108 121
109 v4l2_device_unregister(struct v4l2_device *v4l2_dev); 122 v4l2_device_unregister(struct v4l2_device *v4l2_dev);
110 123
124If the dev->driver_data field points to v4l2_dev, it will be reset to NULL.
111Unregistering will also automatically unregister all subdevs from the device. 125Unregistering will also automatically unregister all subdevs from the device.
112 126
113If you have a hotpluggable device (e.g. a USB device), then when a disconnect 127If you have a hotpluggable device (e.g. a USB device), then when a disconnect
@@ -167,6 +181,21 @@ static int __devinit drv_probe(struct pci_dev *pdev,
167 state->instance = atomic_inc_return(&drv_instance) - 1; 181 state->instance = atomic_inc_return(&drv_instance) - 1;
168} 182}
169 183
184If you have multiple device nodes then it can be difficult to know when it is
185safe to unregister v4l2_device. For this purpose v4l2_device has refcounting
186support. The refcount is increased whenever video_register_device is called and
187it is decreased whenever that device node is released. When the refcount reaches
188zero, then the v4l2_device release() callback is called. You can do your final
189cleanup there.
190
191If other device nodes (e.g. ALSA) are created, then you can increase and
192decrease the refcount manually as well by calling:
193
194void v4l2_device_get(struct v4l2_device *v4l2_dev);
195
196or:
197
198int v4l2_device_put(struct v4l2_device *v4l2_dev);
170 199
171struct v4l2_subdev 200struct v4l2_subdev
172------------------ 201------------------
@@ -254,6 +283,26 @@ A sub-device driver initializes the v4l2_subdev struct using:
254Afterwards you need to initialize subdev->name with a unique name and set the 283Afterwards you need to initialize subdev->name with a unique name and set the
255module owner. This is done for you if you use the i2c helper functions. 284module owner. This is done for you if you use the i2c helper functions.
256 285
286If integration with the media framework is needed, you must initialize the
287media_entity struct embedded in the v4l2_subdev struct (entity field) by
288calling media_entity_init():
289
290 struct media_pad *pads = &my_sd->pads;
291 int err;
292
293 err = media_entity_init(&sd->entity, npads, pads, 0);
294
295The pads array must have been previously initialized. There is no need to
296manually set the struct media_entity type and name fields, but the revision
297field must be initialized if needed.
298
299A reference to the entity will be automatically acquired/released when the
300subdev device node (if any) is opened/closed.
301
302Don't forget to cleanup the media entity before the sub-device is destroyed:
303
304 media_entity_cleanup(&sd->entity);
305
257A device (bridge) driver needs to register the v4l2_subdev with the 306A device (bridge) driver needs to register the v4l2_subdev with the
258v4l2_device: 307v4l2_device:
259 308
@@ -263,6 +312,9 @@ This can fail if the subdev module disappeared before it could be registered.
263After this function was called successfully the subdev->dev field points to 312After this function was called successfully the subdev->dev field points to
264the v4l2_device. 313the v4l2_device.
265 314
315If the v4l2_device parent device has a non-NULL mdev field, the sub-device
316entity will be automatically registered with the media device.
317
266You can unregister a sub-device using: 318You can unregister a sub-device using:
267 319
268 v4l2_device_unregister_subdev(sd); 320 v4l2_device_unregister_subdev(sd);
@@ -291,7 +343,7 @@ ignored. If you want to check for errors use this:
291 err = v4l2_device_call_until_err(v4l2_dev, 0, core, g_chip_ident, &chip); 343 err = v4l2_device_call_until_err(v4l2_dev, 0, core, g_chip_ident, &chip);
292 344
293Any error except -ENOIOCTLCMD will exit the loop with that error. If no 345Any error except -ENOIOCTLCMD will exit the loop with that error. If no
294errors (except -ENOIOCTLCMD) occured, then 0 is returned. 346errors (except -ENOIOCTLCMD) occurred, then 0 is returned.
295 347
296The second argument to both calls is a group ID. If 0, then all subdevs are 348The second argument to both calls is a group ID. If 0, then all subdevs are
297called. If non-zero, then only those whose group ID match that value will 349called. If non-zero, then only those whose group ID match that value will
@@ -319,6 +371,61 @@ controlled through GPIO pins. This distinction is only relevant when setting
319up the device, but once the subdev is registered it is completely transparent. 371up the device, but once the subdev is registered it is completely transparent.
320 372
321 373
374V4L2 sub-device userspace API
375-----------------------------
376
377Beside exposing a kernel API through the v4l2_subdev_ops structure, V4L2
378sub-devices can also be controlled directly by userspace applications.
379
380Device nodes named v4l-subdevX can be created in /dev to access sub-devices
381directly. If a sub-device supports direct userspace configuration it must set
382the V4L2_SUBDEV_FL_HAS_DEVNODE flag before being registered.
383
384After registering sub-devices, the v4l2_device driver can create device nodes
385for all registered sub-devices marked with V4L2_SUBDEV_FL_HAS_DEVNODE by calling
386v4l2_device_register_subdev_nodes(). Those device nodes will be automatically
387removed when sub-devices are unregistered.
388
389The device node handles a subset of the V4L2 API.
390
391VIDIOC_QUERYCTRL
392VIDIOC_QUERYMENU
393VIDIOC_G_CTRL
394VIDIOC_S_CTRL
395VIDIOC_G_EXT_CTRLS
396VIDIOC_S_EXT_CTRLS
397VIDIOC_TRY_EXT_CTRLS
398
399 The controls ioctls are identical to the ones defined in V4L2. They
400 behave identically, with the only exception that they deal only with
401 controls implemented in the sub-device. Depending on the driver, those
402 controls can be also be accessed through one (or several) V4L2 device
403 nodes.
404
405VIDIOC_DQEVENT
406VIDIOC_SUBSCRIBE_EVENT
407VIDIOC_UNSUBSCRIBE_EVENT
408
409 The events ioctls are identical to the ones defined in V4L2. They
410 behave identically, with the only exception that they deal only with
411 events generated by the sub-device. Depending on the driver, those
412 events can also be reported by one (or several) V4L2 device nodes.
413
414 Sub-device drivers that want to use events need to set the
415 V4L2_SUBDEV_USES_EVENTS v4l2_subdev::flags and initialize
416 v4l2_subdev::nevents to events queue depth before registering the
417 sub-device. After registration events can be queued as usual on the
418 v4l2_subdev::devnode device node.
419
420 To properly support events, the poll() file operation is also
421 implemented.
422
423Private ioctls
424
425 All ioctls not in the above list are passed directly to the sub-device
426 driver through the core::ioctl operation.
427
428
322I2C sub-device drivers 429I2C sub-device drivers
323---------------------- 430----------------------
324 431
@@ -457,6 +564,10 @@ You should also set these fields:
457 Otherwise you give it a pointer to a struct mutex_lock and before any 564 Otherwise you give it a pointer to a struct mutex_lock and before any
458 of the v4l2_file_operations is called this lock will be taken by the 565 of the v4l2_file_operations is called this lock will be taken by the
459 core and released afterwards. 566 core and released afterwards.
567- prio: keeps track of the priorities. Used to implement VIDIOC_G/S_PRIORITY.
568 If left to NULL, then it will use the struct v4l2_prio_state in v4l2_device.
569 If you want to have a separate priority state per (group of) device node(s),
570 then you can point it to your own struct v4l2_prio_state.
460- parent: you only set this if v4l2_device was registered with NULL as 571- parent: you only set this if v4l2_device was registered with NULL as
461 the parent device struct. This only happens in cases where one hardware 572 the parent device struct. This only happens in cases where one hardware
462 device has multiple PCI devices that all share the same v4l2_device core. 573 device has multiple PCI devices that all share the same v4l2_device core.
@@ -466,13 +577,34 @@ You should also set these fields:
466 (cx8802). Since the v4l2_device cannot be associated with a particular 577 (cx8802). Since the v4l2_device cannot be associated with a particular
467 PCI device it is setup without a parent device. But when the struct 578 PCI device it is setup without a parent device. But when the struct
468 video_device is setup you do know which parent PCI device to use. 579 video_device is setup you do know which parent PCI device to use.
580- flags: optional. Set to V4L2_FL_USE_FH_PRIO if you want to let the framework
581 handle the VIDIOC_G/S_PRIORITY ioctls. This requires that you use struct
582 v4l2_fh. Eventually this flag will disappear once all drivers use the core
583 priority handling. But for now it has to be set explicitly.
469 584
470If you use v4l2_ioctl_ops, then you should set either .unlocked_ioctl or 585If you use v4l2_ioctl_ops, then you should set .unlocked_ioctl to video_ioctl2
471.ioctl to video_ioctl2 in your v4l2_file_operations struct. 586in your v4l2_file_operations struct.
587
588Do not use .ioctl! This is deprecated and will go away in the future.
472 589
473The v4l2_file_operations struct is a subset of file_operations. The main 590The v4l2_file_operations struct is a subset of file_operations. The main
474difference is that the inode argument is omitted since it is never used. 591difference is that the inode argument is omitted since it is never used.
475 592
593If integration with the media framework is needed, you must initialize the
594media_entity struct embedded in the video_device struct (entity field) by
595calling media_entity_init():
596
597 struct media_pad *pad = &my_vdev->pad;
598 int err;
599
600 err = media_entity_init(&vdev->entity, 1, pad, 0);
601
602The pads array must have been previously initialized. There is no need to
603manually set the struct media_entity type and name fields.
604
605A reference to the entity will be automatically acquired/released when the
606video device is opened/closed.
607
476v4l2_file_operations and locking 608v4l2_file_operations and locking
477-------------------------------- 609--------------------------------
478 610
@@ -502,6 +634,9 @@ for you.
502 return err; 634 return err;
503 } 635 }
504 636
637If the v4l2_device parent device has a non-NULL mdev field, the video device
638entity will be automatically registered with the media device.
639
505Which device is registered depends on the type argument. The following 640Which device is registered depends on the type argument. The following
506types exist: 641types exist:
507 642
@@ -577,6 +712,13 @@ release, of course) will return an error as well.
577When the last user of the video device node exits, then the vdev->release() 712When the last user of the video device node exits, then the vdev->release()
578callback is called and you can do the final cleanup there. 713callback is called and you can do the final cleanup there.
579 714
715Don't forget to cleanup the media entity associated with the video device if
716it has been initialized:
717
718 media_entity_cleanup(&vdev->entity);
719
720This can be done from the release callback.
721
580 722
581video_device helper functions 723video_device helper functions
582----------------------------- 724-----------------------------
@@ -636,39 +778,25 @@ struct v4l2_fh
636-------------- 778--------------
637 779
638struct v4l2_fh provides a way to easily keep file handle specific data 780struct v4l2_fh provides a way to easily keep file handle specific data
639that is used by the V4L2 framework. Using v4l2_fh is optional for 781that is used by the V4L2 framework. New drivers must use struct v4l2_fh
640drivers. 782since it is also used to implement priority handling (VIDIOC_G/S_PRIORITY)
783if the video_device flag V4L2_FL_USE_FH_PRIO is also set.
641 784
642The users of v4l2_fh (in the V4L2 framework, not the driver) know 785The users of v4l2_fh (in the V4L2 framework, not the driver) know
643whether a driver uses v4l2_fh as its file->private_data pointer by 786whether a driver uses v4l2_fh as its file->private_data pointer by
644testing the V4L2_FL_USES_V4L2_FH bit in video_device->flags. 787testing the V4L2_FL_USES_V4L2_FH bit in video_device->flags. This bit is
645 788set whenever v4l2_fh_init() is called.
646Useful functions:
647
648- v4l2_fh_init()
649
650 Initialise the file handle. This *MUST* be performed in the driver's
651 v4l2_file_operations->open() handler.
652
653- v4l2_fh_add()
654 789
655 Add a v4l2_fh to video_device file handle list. May be called after 790struct v4l2_fh is allocated as a part of the driver's own file handle
656 initialising the file handle. 791structure and file->private_data is set to it in the driver's open
657 792function by the driver.
658- v4l2_fh_del()
659
660 Unassociate the file handle from video_device(). The file handle
661 exit function may now be called.
662 793
663- v4l2_fh_exit() 794In many cases the struct v4l2_fh will be embedded in a larger structure.
795In that case you should call v4l2_fh_init+v4l2_fh_add in open() and
796v4l2_fh_del+v4l2_fh_exit in release().
664 797
665 Uninitialise the file handle. After uninitialisation the v4l2_fh 798Drivers can extract their own file handle structure by using the container_of
666 memory can be freed. 799macro. Example:
667
668struct v4l2_fh is allocated as a part of the driver's own file handle
669structure and is set to file->private_data in the driver's open
670function by the driver. Drivers can extract their own file handle
671structure by using the container_of macro. Example:
672 800
673struct my_fh { 801struct my_fh {
674 int blah; 802 int blah;
@@ -685,15 +813,21 @@ int my_open(struct file *file)
685 813
686 ... 814 ...
687 815
816 my_fh = kzalloc(sizeof(*my_fh), GFP_KERNEL);
817
818 ...
819
688 ret = v4l2_fh_init(&my_fh->fh, vfd); 820 ret = v4l2_fh_init(&my_fh->fh, vfd);
689 if (ret) 821 if (ret) {
822 kfree(my_fh);
690 return ret; 823 return ret;
824 }
691 825
692 v4l2_fh_add(&my_fh->fh); 826 ...
693 827
694 file->private_data = &my_fh->fh; 828 file->private_data = &my_fh->fh;
695 829 v4l2_fh_add(&my_fh->fh);
696 ... 830 return 0;
697} 831}
698 832
699int my_release(struct file *file) 833int my_release(struct file *file)
@@ -702,8 +836,65 @@ int my_release(struct file *file)
702 struct my_fh *my_fh = container_of(fh, struct my_fh, fh); 836 struct my_fh *my_fh = container_of(fh, struct my_fh, fh);
703 837
704 ... 838 ...
839 v4l2_fh_del(&my_fh->fh);
840 v4l2_fh_exit(&my_fh->fh);
841 kfree(my_fh);
842 return 0;
705} 843}
706 844
845Below is a short description of the v4l2_fh functions used:
846
847int v4l2_fh_init(struct v4l2_fh *fh, struct video_device *vdev)
848
849 Initialise the file handle. This *MUST* be performed in the driver's
850 v4l2_file_operations->open() handler.
851
852void v4l2_fh_add(struct v4l2_fh *fh)
853
854 Add a v4l2_fh to video_device file handle list. Must be called once the
855 file handle is completely initialized.
856
857void v4l2_fh_del(struct v4l2_fh *fh)
858
859 Unassociate the file handle from video_device(). The file handle
860 exit function may now be called.
861
862void v4l2_fh_exit(struct v4l2_fh *fh)
863
864 Uninitialise the file handle. After uninitialisation the v4l2_fh
865 memory can be freed.
866
867
868If struct v4l2_fh is not embedded, then you can use these helper functions:
869
870int v4l2_fh_open(struct file *filp)
871
872 This allocates a struct v4l2_fh, initializes it and adds it to the struct
873 video_device associated with the file struct.
874
875int v4l2_fh_release(struct file *filp)
876
877 This deletes it from the struct video_device associated with the file
878 struct, uninitialised the v4l2_fh and frees it.
879
880These two functions can be plugged into the v4l2_file_operation's open() and
881release() ops.
882
883
884Several drivers need to do something when the first file handle is opened and
885when the last file handle closes. Two helper functions were added to check
886whether the v4l2_fh struct is the only open filehandle of the associated
887device node:
888
889int v4l2_fh_is_singular(struct v4l2_fh *fh)
890
891 Returns 1 if the file handle is the only open file handle, else 0.
892
893int v4l2_fh_is_singular_file(struct file *filp)
894
895 Same, but it calls v4l2_fh_is_singular with filp->private_data.
896
897
707V4L2 events 898V4L2 events
708----------- 899-----------
709 900
diff --git a/Documentation/video4linux/w9968cf.txt b/Documentation/video4linux/w9968cf.txt
index 05138e8aea07..9649450f3b90 100644
--- a/Documentation/video4linux/w9968cf.txt
+++ b/Documentation/video4linux/w9968cf.txt
@@ -413,7 +413,7 @@ Syntax: <n>
413Description: Debugging information level, from 0 to 6: 413Description: Debugging information level, from 0 to 6:
414 0 = none (use carefully) 414 0 = none (use carefully)
415 1 = critical errors 415 1 = critical errors
416 2 = significant informations 416 2 = significant information
417 3 = configuration or general messages 417 3 = configuration or general messages
418 4 = warnings 418 4 = warnings
419 5 = called functions 419 5 = called functions
diff --git a/Documentation/video4linux/zc0301.txt b/Documentation/video4linux/zc0301.txt
index befdfdacdc5b..b41c83cf09f4 100644
--- a/Documentation/video4linux/zc0301.txt
+++ b/Documentation/video4linux/zc0301.txt
@@ -181,10 +181,10 @@ Syntax: <n>
181Description: Debugging information level, from 0 to 3: 181Description: Debugging information level, from 0 to 3:
182 0 = none (use carefully) 182 0 = none (use carefully)
183 1 = critical errors 183 1 = critical errors
184 2 = significant informations 184 2 = significant information
185 3 = more verbose messages 185 3 = more verbose messages
186 Level 3 is useful for testing only, when only one device 186 Level 3 is useful for testing only, when only one device
187 is used at the same time. It also shows some more informations 187 is used at the same time. It also shows some information
188 about the hardware being detected. This module parameter can be 188 about the hardware being detected. This module parameter can be
189 changed at runtime thanks to the /sys filesystem interface. 189 changed at runtime thanks to the /sys filesystem interface.
190Default: 2 190Default: 2
@@ -261,7 +261,7 @@ the fingerprint is: '88E8 F32F 7244 68BA 3958 5D40 99DA 5D2A FCE6 35A4'.
261 261
26211. Credits 26211. Credits
263=========== 263===========
264- Informations about the chip internals needed to enable the I2C protocol have 264- Information about the chip internals needed to enable the I2C protocol have
265 been taken from the documentation of the ZC030x Video4Linux1 driver written 265 been taken from the documentation of the ZC030x Video4Linux1 driver written
266 by Andrew Birkett <andy@nobugs.org>; 266 by Andrew Birkett <andy@nobugs.org>;
267- The initialization values of the ZC0301 controller connected to the PAS202BCB 267- The initialization values of the ZC0301 controller connected to the PAS202BCB
diff --git a/Documentation/vm/active_mm.txt b/Documentation/vm/active_mm.txt
index 4ee1f643d897..dbf45817405f 100644
--- a/Documentation/vm/active_mm.txt
+++ b/Documentation/vm/active_mm.txt
@@ -74,7 +74,7 @@ we have a user context", and is generally done by the page fault handler
74and things like that). 74and things like that).
75 75
76Anyway, I put a pre-patch-2.3.13-1 on ftp.kernel.org just a moment ago, 76Anyway, I put a pre-patch-2.3.13-1 on ftp.kernel.org just a moment ago,
77because it slightly changes the interfaces to accomodate the alpha (who 77because it slightly changes the interfaces to accommodate the alpha (who
78would have thought it, but the alpha actually ends up having one of the 78would have thought it, but the alpha actually ends up having one of the
79ugliest context switch codes - unlike the other architectures where the MM 79ugliest context switch codes - unlike the other architectures where the MM
80and register state is separate, the alpha PALcode joins the two, and you 80and register state is separate, the alpha PALcode joins the two, and you
diff --git a/Documentation/vm/hugetlbpage.txt b/Documentation/vm/hugetlbpage.txt
index 457634c1e03e..f8551b3879f8 100644
--- a/Documentation/vm/hugetlbpage.txt
+++ b/Documentation/vm/hugetlbpage.txt
@@ -72,7 +72,7 @@ number of huge pages requested. This is the most reliable method of
72allocating huge pages as memory has not yet become fragmented. 72allocating huge pages as memory has not yet become fragmented.
73 73
74Some platforms support multiple huge page sizes. To allocate huge pages 74Some platforms support multiple huge page sizes. To allocate huge pages
75of a specific size, one must preceed the huge pages boot command parameters 75of a specific size, one must precede the huge pages boot command parameters
76with a huge page size selection parameter "hugepagesz=<size>". <size> must 76with a huge page size selection parameter "hugepagesz=<size>". <size> must
77be specified in bytes with optional scale suffix [kKmMgG]. The default huge 77be specified in bytes with optional scale suffix [kKmMgG]. The default huge
78page size may be selected with the "default_hugepagesz=<size>" boot parameter. 78page size may be selected with the "default_hugepagesz=<size>" boot parameter.
diff --git a/Documentation/vm/overcommit-accounting b/Documentation/vm/overcommit-accounting
index 21c7b1f8f32b..706d7ed9d8d2 100644
--- a/Documentation/vm/overcommit-accounting
+++ b/Documentation/vm/overcommit-accounting
@@ -4,7 +4,7 @@ The Linux kernel supports the following overcommit handling modes
4 address space are refused. Used for a typical system. It 4 address space are refused. Used for a typical system. It
5 ensures a seriously wild allocation fails while allowing 5 ensures a seriously wild allocation fails while allowing
6 overcommit to reduce swap usage. root is allowed to 6 overcommit to reduce swap usage. root is allowed to
7 allocate slighly more memory in this mode. This is the 7 allocate slightly more memory in this mode. This is the
8 default. 8 default.
9 9
101 - Always overcommit. Appropriate for some scientific 101 - Always overcommit. Appropriate for some scientific
diff --git a/Documentation/vm/page-types.c b/Documentation/vm/page-types.c
index cc96ee2666f2..7445caa26d05 100644
--- a/Documentation/vm/page-types.c
+++ b/Documentation/vm/page-types.c
@@ -32,8 +32,20 @@
32#include <sys/types.h> 32#include <sys/types.h>
33#include <sys/errno.h> 33#include <sys/errno.h>
34#include <sys/fcntl.h> 34#include <sys/fcntl.h>
35#include <sys/mount.h>
36#include <sys/statfs.h>
37#include "../../include/linux/magic.h"
35 38
36 39
40#ifndef MAX_PATH
41# define MAX_PATH 256
42#endif
43
44#ifndef STR
45# define _STR(x) #x
46# define STR(x) _STR(x)
47#endif
48
37/* 49/*
38 * pagemap kernel ABI bits 50 * pagemap kernel ABI bits
39 */ 51 */
@@ -152,6 +164,12 @@ static const char *page_flag_names[] = {
152}; 164};
153 165
154 166
167static const char *debugfs_known_mountpoints[] = {
168 "/sys/kernel/debug",
169 "/debug",
170 0,
171};
172
155/* 173/*
156 * data structures 174 * data structures
157 */ 175 */
@@ -184,7 +202,7 @@ static int kpageflags_fd;
184static int opt_hwpoison; 202static int opt_hwpoison;
185static int opt_unpoison; 203static int opt_unpoison;
186 204
187static const char hwpoison_debug_fs[] = "/debug/hwpoison"; 205static char hwpoison_debug_fs[MAX_PATH+1];
188static int hwpoison_inject_fd; 206static int hwpoison_inject_fd;
189static int hwpoison_forget_fd; 207static int hwpoison_forget_fd;
190 208
@@ -464,21 +482,100 @@ static uint64_t kpageflags_flags(uint64_t flags)
464 return flags; 482 return flags;
465} 483}
466 484
485/* verify that a mountpoint is actually a debugfs instance */
486static int debugfs_valid_mountpoint(const char *debugfs)
487{
488 struct statfs st_fs;
489
490 if (statfs(debugfs, &st_fs) < 0)
491 return -ENOENT;
492 else if (st_fs.f_type != (long) DEBUGFS_MAGIC)
493 return -ENOENT;
494
495 return 0;
496}
497
498/* find the path to the mounted debugfs */
499static const char *debugfs_find_mountpoint(void)
500{
501 const char **ptr;
502 char type[100];
503 FILE *fp;
504
505 ptr = debugfs_known_mountpoints;
506 while (*ptr) {
507 if (debugfs_valid_mountpoint(*ptr) == 0) {
508 strcpy(hwpoison_debug_fs, *ptr);
509 return hwpoison_debug_fs;
510 }
511 ptr++;
512 }
513
514 /* give up and parse /proc/mounts */
515 fp = fopen("/proc/mounts", "r");
516 if (fp == NULL)
517 perror("Can't open /proc/mounts for read");
518
519 while (fscanf(fp, "%*s %"
520 STR(MAX_PATH)
521 "s %99s %*s %*d %*d\n",
522 hwpoison_debug_fs, type) == 2) {
523 if (strcmp(type, "debugfs") == 0)
524 break;
525 }
526 fclose(fp);
527
528 if (strcmp(type, "debugfs") != 0)
529 return NULL;
530
531 return hwpoison_debug_fs;
532}
533
534/* mount the debugfs somewhere if it's not mounted */
535
536static void debugfs_mount(void)
537{
538 const char **ptr;
539
540 /* see if it's already mounted */
541 if (debugfs_find_mountpoint())
542 return;
543
544 ptr = debugfs_known_mountpoints;
545 while (*ptr) {
546 if (mount(NULL, *ptr, "debugfs", 0, NULL) == 0) {
547 /* save the mountpoint */
548 strcpy(hwpoison_debug_fs, *ptr);
549 break;
550 }
551 ptr++;
552 }
553
554 if (*ptr == NULL) {
555 perror("mount debugfs");
556 exit(EXIT_FAILURE);
557 }
558}
559
467/* 560/*
468 * page actions 561 * page actions
469 */ 562 */
470 563
471static void prepare_hwpoison_fd(void) 564static void prepare_hwpoison_fd(void)
472{ 565{
473 char buf[100]; 566 char buf[MAX_PATH + 1];
567
568 debugfs_mount();
474 569
475 if (opt_hwpoison && !hwpoison_inject_fd) { 570 if (opt_hwpoison && !hwpoison_inject_fd) {
476 sprintf(buf, "%s/corrupt-pfn", hwpoison_debug_fs); 571 snprintf(buf, MAX_PATH, "%s/hwpoison/corrupt-pfn",
572 hwpoison_debug_fs);
477 hwpoison_inject_fd = checked_open(buf, O_WRONLY); 573 hwpoison_inject_fd = checked_open(buf, O_WRONLY);
478 } 574 }
479 575
480 if (opt_unpoison && !hwpoison_forget_fd) { 576 if (opt_unpoison && !hwpoison_forget_fd) {
481 sprintf(buf, "%s/unpoison-pfn", hwpoison_debug_fs); 577 snprintf(buf, MAX_PATH, "%s/hwpoison/unpoison-pfn",
578 hwpoison_debug_fs);
482 hwpoison_forget_fd = checked_open(buf, O_WRONLY); 579 hwpoison_forget_fd = checked_open(buf, O_WRONLY);
483 } 580 }
484} 581}
diff --git a/Documentation/w1/slaves/w1_ds2423 b/Documentation/w1/slaves/w1_ds2423
index 90a65d23cf59..3f98b505a0ee 100644
--- a/Documentation/w1/slaves/w1_ds2423
+++ b/Documentation/w1/slaves/w1_ds2423
@@ -21,8 +21,8 @@ value and associated ram buffer is outpputed to own line.
21 21
22Each lines will contain the values of 42 bytes read from the counter and 22Each lines will contain the values of 42 bytes read from the counter and
23memory page along the crc=YES or NO for indicating whether the read operation 23memory page along the crc=YES or NO for indicating whether the read operation
24was successfull and CRC matched. 24was successful and CRC matched.
25If the operation was successfull, there is also in the end of each line 25If the operation was successful, there is also in the end of each line
26a counter value expressed as an integer after c= 26a counter value expressed as an integer after c=
27 27
28Meaning of 42 bytes represented is following: 28Meaning of 42 bytes represented is following:
@@ -34,7 +34,7 @@ Meaning of 42 bytes represented is following:
34 - crc=YES/NO indicating whether read was ok and crc matched 34 - crc=YES/NO indicating whether read was ok and crc matched
35 - c=<int> current counter value 35 - c=<int> current counter value
36 36
37example from the successfull read: 37example from the successful read:
3800 02 00 00 00 00 00 00 00 6d 38 00 ff ff 00 00 fe ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2 3800 02 00 00 00 00 00 00 00 6d 38 00 ff ff 00 00 fe ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2
3900 02 00 00 00 00 00 00 00 e0 1f 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2 3900 02 00 00 00 00 00 00 00 e0 1f 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2
4000 29 c6 5d 18 00 00 00 00 04 37 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=408798761 4000 29 c6 5d 18 00 00 00 00 04 37 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=408798761
diff --git a/Documentation/w1/w1.netlink b/Documentation/w1/w1.netlink
index 804445f745ed..f59a31965d50 100644
--- a/Documentation/w1/w1.netlink
+++ b/Documentation/w1/w1.netlink
@@ -81,7 +81,7 @@ which will contain list of all registered master ids in the following
81format: 81format:
82 82
83 cn_msg (CN_W1_IDX.CN_W1_VAL as id, len is equal to sizeof(struct 83 cn_msg (CN_W1_IDX.CN_W1_VAL as id, len is equal to sizeof(struct
84 w1_netlink_msg) plus number of masters multipled by 4) 84 w1_netlink_msg) plus number of masters multiplied by 4)
85 w1_netlink_msg (type: W1_LIST_MASTERS, len is equal to 85 w1_netlink_msg (type: W1_LIST_MASTERS, len is equal to
86 number of masters multiplied by 4 (u32 size)) 86 number of masters multiplied by 4 (u32 size))
87 id0 ... idN 87 id0 ... idN
diff --git a/Documentation/watchdog/hpwdt.txt b/Documentation/watchdog/hpwdt.txt
index 9c24d5ffbb06..9488078900e0 100644
--- a/Documentation/watchdog/hpwdt.txt
+++ b/Documentation/watchdog/hpwdt.txt
@@ -8,7 +8,7 @@ Last reviewed: 06/02/2009
8 The HP iLO2 NMI Watchdog driver is a kernel module that provides basic 8 The HP iLO2 NMI Watchdog driver is a kernel module that provides basic
9 watchdog functionality and the added benefit of NMI sourcing. Both the 9 watchdog functionality and the added benefit of NMI sourcing. Both the
10 watchdog functionality and the NMI sourcing capability need to be enabled 10 watchdog functionality and the NMI sourcing capability need to be enabled
11 by the user. Remember that the two modes are not dependant on one another. 11 by the user. Remember that the two modes are not dependent on one another.
12 A user can have the NMI sourcing without the watchdog timer and vice-versa. 12 A user can have the NMI sourcing without the watchdog timer and vice-versa.
13 13
14 Watchdog functionality is enabled like any other common watchdog driver. That 14 Watchdog functionality is enabled like any other common watchdog driver. That
diff --git a/Documentation/workqueue.txt b/Documentation/workqueue.txt
index 01c513fac40e..a0b577de918f 100644
--- a/Documentation/workqueue.txt
+++ b/Documentation/workqueue.txt
@@ -12,6 +12,7 @@ CONTENTS
124. Application Programming Interface (API) 124. Application Programming Interface (API)
135. Example Execution Scenarios 135. Example Execution Scenarios
146. Guidelines 146. Guidelines
157. Debugging
15 16
16 17
171. Introduction 181. Introduction
@@ -379,3 +380,42 @@ If q1 has WQ_CPU_INTENSIVE set,
379* Unless work items are expected to consume a huge amount of CPU 380* Unless work items are expected to consume a huge amount of CPU
380 cycles, using a bound wq is usually beneficial due to the increased 381 cycles, using a bound wq is usually beneficial due to the increased
381 level of locality in wq operations and work item execution. 382 level of locality in wq operations and work item execution.
383
384
3857. Debugging
386
387Because the work functions are executed by generic worker threads
388there are a few tricks needed to shed some light on misbehaving
389workqueue users.
390
391Worker threads show up in the process list as:
392
393root 5671 0.0 0.0 0 0 ? S 12:07 0:00 [kworker/0:1]
394root 5672 0.0 0.0 0 0 ? S 12:07 0:00 [kworker/1:2]
395root 5673 0.0 0.0 0 0 ? S 12:12 0:00 [kworker/0:0]
396root 5674 0.0 0.0 0 0 ? S 12:13 0:00 [kworker/1:0]
397
398If kworkers are going crazy (using too much cpu), there are two types
399of possible problems:
400
401 1. Something beeing scheduled in rapid succession
402 2. A single work item that consumes lots of cpu cycles
403
404The first one can be tracked using tracing:
405
406 $ echo workqueue:workqueue_queue_work > /sys/kernel/debug/tracing/set_event
407 $ cat /sys/kernel/debug/tracing/trace_pipe > out.txt
408 (wait a few secs)
409 ^C
410
411If something is busy looping on work queueing, it would be dominating
412the output and the offender can be determined with the work item
413function.
414
415For the second type of problems it should be possible to just check
416the stack trace of the offending worker thread.
417
418 $ cat /proc/THE_OFFENDING_KWORKER/stack
419
420The work item's function should be trivially visible in the stack
421trace.
diff --git a/Documentation/x86/x86_64/boot-options.txt b/Documentation/x86/x86_64/boot-options.txt
index 48c13b8ab90c..092e596a1301 100644
--- a/Documentation/x86/x86_64/boot-options.txt
+++ b/Documentation/x86/x86_64/boot-options.txt
@@ -293,11 +293,6 @@ IOMMU (input/output memory management unit)
293 293
294Debugging 294Debugging
295 295
296 oops=panic Always panic on oopses. Default is to just kill the process,
297 but there is a small probability of deadlocking the machine.
298 This will also cause panics on machine check exceptions.
299 Useful together with panic=30 to trigger a reboot.
300
301 kstack=N Print N words from the kernel stack in oops dumps. 296 kstack=N Print N words from the kernel stack in oops dumps.
302 297
303 pagefaulttrace Dump all page faults. Only useful for extreme debugging 298 pagefaulttrace Dump all page faults. Only useful for extreme debugging