aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/ABI/testing/sysfs-block-rssd12
-rw-r--r--Documentation/ABI/testing/sysfs-bus-fcoe77
-rw-r--r--Documentation/ABI/testing/sysfs-bus-i2c-devices-lm353315
-rw-r--r--Documentation/ABI/testing/sysfs-bus-rbd4
-rw-r--r--Documentation/ABI/testing/sysfs-class-backlight-driver-lm353348
-rw-r--r--Documentation/ABI/testing/sysfs-class-led-driver-lm353365
-rw-r--r--Documentation/ABI/testing/sysfs-class-mtd51
-rw-r--r--Documentation/ABI/testing/sysfs-driver-wacom15
-rw-r--r--Documentation/CodingStyle16
-rw-r--r--Documentation/DocBook/media/Makefile4
-rw-r--r--Documentation/DocBook/media/dvb/dvbproperty.xml160
-rw-r--r--Documentation/DocBook/media/v4l/biblio.xml29
-rw-r--r--Documentation/DocBook/media/v4l/common.xml38
-rw-r--r--Documentation/DocBook/media/v4l/compat.xml75
-rw-r--r--Documentation/DocBook/media/v4l/controls.xml708
-rw-r--r--Documentation/DocBook/media/v4l/dev-subdev.xml202
-rw-r--r--Documentation/DocBook/media/v4l/io.xml12
-rw-r--r--Documentation/DocBook/media/v4l/pixfmt-srggb10.xml2
-rw-r--r--Documentation/DocBook/media/v4l/pixfmt-srggb10dpcm8.xml29
-rw-r--r--Documentation/DocBook/media/v4l/pixfmt.xml6
-rw-r--r--Documentation/DocBook/media/v4l/subdev-image-processing-crop.dia614
-rw-r--r--Documentation/DocBook/media/v4l/subdev-image-processing-crop.svg63
-rw-r--r--Documentation/DocBook/media/v4l/subdev-image-processing-full.dia1588
-rw-r--r--Documentation/DocBook/media/v4l/subdev-image-processing-full.svg163
-rw-r--r--Documentation/DocBook/media/v4l/subdev-image-processing-scaling-multi-source.dia1152
-rw-r--r--Documentation/DocBook/media/v4l/subdev-image-processing-scaling-multi-source.svg116
-rw-r--r--Documentation/DocBook/media/v4l/v4l2.xml44
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-create-bufs.xml16
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-cropcap.xml4
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-dv-timings-cap.xml211
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-enum-dv-presets.xml4
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-enum-dv-timings.xml119
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-enum-fmt.xml4
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-enuminput.xml2
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-enumoutput.xml2
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-g-crop.xml4
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-g-dv-preset.xml6
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-g-dv-timings.xml130
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml26
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-g-fmt.xml2
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-g-frequency.xml6
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-g-parm.xml5
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-g-sliced-vbi-cap.xml2
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-g-tuner.xml2
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-prepare-buf.xml6
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-query-dv-preset.xml4
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-query-dv-timings.xml104
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-queryctrl.xml41
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-reqbufs.xml7
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml5
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-subdev-g-crop.xml9
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml228
-rw-r--r--Documentation/DocBook/mtdnand.tmpl2
-rw-r--r--Documentation/SubmittingPatches3
-rw-r--r--Documentation/arm/OMAP/DSS46
-rw-r--r--Documentation/arm/SPEAr/overview.txt32
-rw-r--r--Documentation/cgroups/memory.txt37
-rw-r--r--Documentation/cgroups/resource_counter.txt8
-rw-r--r--Documentation/cris/README62
-rw-r--r--Documentation/device-mapper/thin-provisioning.txt11
-rw-r--r--Documentation/devicetree/bindings/arm/fsl.txt12
-rw-r--r--Documentation/devicetree/bindings/arm/gic.txt35
-rw-r--r--Documentation/devicetree/bindings/arm/samsung/interrupt-combiner.txt52
-rw-r--r--Documentation/devicetree/bindings/arm/spear-timer.txt18
-rw-r--r--Documentation/devicetree/bindings/arm/spear.txt14
-rw-r--r--Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-ahb.txt11
-rw-r--r--Documentation/devicetree/bindings/dma/fsl-mxs-dma.txt19
-rw-r--r--Documentation/devicetree/bindings/dma/snps-dma.txt17
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-mm-lantiq.txt38
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-mxs.txt87
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-stp-xway.txt42
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio_lpc32xx.txt43
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-mux-pinctrl.txt93
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-mxs.txt16
-rw-r--r--Documentation/devicetree/bindings/i2c/mux.txt60
-rw-r--r--Documentation/devicetree/bindings/i2c/samsung-i2c.txt8
-rw-r--r--Documentation/devicetree/bindings/i2c/xiic.txt22
-rw-r--r--Documentation/devicetree/bindings/input/spear-keyboard.txt20
-rw-r--r--Documentation/devicetree/bindings/input/touchscreen/lpc32xx-tsc.txt16
-rw-r--r--Documentation/devicetree/bindings/input/twl6040-vibra.txt37
-rw-r--r--Documentation/devicetree/bindings/iommu/nvidia,tegra20-gart.txt14
-rw-r--r--Documentation/devicetree/bindings/mfd/da9052-i2c.txt60
-rw-r--r--Documentation/devicetree/bindings/mfd/tps65910.txt133
-rw-r--r--Documentation/devicetree/bindings/mfd/twl6040.txt62
-rw-r--r--Documentation/devicetree/bindings/mmc/fsl-esdhc.txt6
-rw-r--r--Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt2
-rw-r--r--Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt3
-rw-r--r--Documentation/devicetree/bindings/mmc/mmc.txt27
-rw-r--r--Documentation/devicetree/bindings/mmc/mmci.txt19
-rw-r--r--Documentation/devicetree/bindings/mmc/mxs-mmc.txt25
-rw-r--r--Documentation/devicetree/bindings/mmc/nvidia-sdhci.txt4
-rw-r--r--Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt4
-rw-r--r--Documentation/devicetree/bindings/mtd/gpmi-nand.txt33
-rw-r--r--Documentation/devicetree/bindings/mtd/mxc-nand.txt19
-rw-r--r--Documentation/devicetree/bindings/net/fsl-fec.txt2
-rw-r--r--Documentation/devicetree/bindings/pinctrl/pinctrl_spear.txt47
-rw-r--r--Documentation/devicetree/bindings/rtc/lpc32xx-rtc.txt15
-rw-r--r--Documentation/devicetree/bindings/rtc/spear-rtc.txt17
-rw-r--r--Documentation/devicetree/bindings/sound/omap-dmic.txt21
-rw-r--r--Documentation/devicetree/bindings/sound/omap-mcpdm.txt21
-rw-r--r--Documentation/devicetree/bindings/tty/serial/fsl-imx-uart.txt2
-rw-r--r--Documentation/devicetree/bindings/usb/tegra-usb.txt3
-rw-r--r--Documentation/devicetree/bindings/vendor-prefixes.txt1
-rw-r--r--Documentation/devicetree/booting-without-of.txt55
-rw-r--r--Documentation/dma-buf-sharing.txt109
-rwxr-xr-xDocumentation/dvb/get_dvb_firmware20
-rw-r--r--Documentation/feature-removal-schedule.txt45
-rw-r--r--Documentation/filesystems/Locking5
-rw-r--r--Documentation/filesystems/ext3.txt6
-rw-r--r--Documentation/filesystems/porting16
-rw-r--r--Documentation/filesystems/proc.txt25
-rw-r--r--Documentation/filesystems/vfs.txt17
-rw-r--r--Documentation/gpio.txt3
-rw-r--r--Documentation/i2c/functionality9
-rw-r--r--Documentation/i2c/i2c-protocol9
-rw-r--r--Documentation/i2c/muxes/i2c-mux-gpio (renamed from Documentation/i2c/muxes/gpio-i2cmux)12
-rw-r--r--Documentation/initrd.txt4
-rw-r--r--Documentation/kbuild/kbuild.txt19
-rw-r--r--Documentation/kbuild/kconfig.txt18
-rw-r--r--Documentation/kernel-parameters.txt42
-rw-r--r--Documentation/leds/ledtrig-transient.txt152
-rw-r--r--Documentation/media-framework.txt19
-rw-r--r--Documentation/nfc/nfc-hci.txt45
-rw-r--r--Documentation/power/charger-manager.txt41
-rw-r--r--Documentation/power/power_supply_class.txt2
-rw-r--r--Documentation/sysctl/fs.txt7
-rw-r--r--Documentation/trace/uprobetracer.txt113
-rw-r--r--Documentation/video4linux/4CCs.txt32
-rw-r--r--Documentation/video4linux/gspca.txt1
-rw-r--r--Documentation/video4linux/v4l2-controls.txt21
-rw-r--r--Documentation/video4linux/v4l2-framework.txt106
-rw-r--r--Documentation/virtual/kvm/api.txt281
-rw-r--r--Documentation/virtual/kvm/cpuid.txt6
-rw-r--r--Documentation/virtual/kvm/msr.txt4
-rw-r--r--Documentation/vm/frontswap.txt278
-rw-r--r--Documentation/vm/pagemap.txt2
-rw-r--r--Documentation/vm/slub.txt2
-rw-r--r--Documentation/vm/transhuge.txt62
-rw-r--r--Documentation/watchdog/watchdog-kernel-api.txt43
-rw-r--r--Documentation/watchdog/watchdog-parameters.txt5
-rw-r--r--Documentation/x86/efi-stub.txt65
141 files changed, 9020 insertions, 339 deletions
diff --git a/Documentation/ABI/testing/sysfs-block-rssd b/Documentation/ABI/testing/sysfs-block-rssd
index d535757799fe..679ce3543122 100644
--- a/Documentation/ABI/testing/sysfs-block-rssd
+++ b/Documentation/ABI/testing/sysfs-block-rssd
@@ -6,13 +6,21 @@ Description: This is a read-only file. Dumps below driver information and
6 hardware registers. 6 hardware registers.
7 - S ACTive 7 - S ACTive
8 - Command Issue 8 - Command Issue
9 - Allocated
10 - Completed 9 - Completed
11 - PORT IRQ STAT 10 - PORT IRQ STAT
12 - HOST IRQ STAT 11 - HOST IRQ STAT
12 - Allocated
13 - Commands in Q
13 14
14What: /sys/block/rssd*/status 15What: /sys/block/rssd*/status
15Date: April 2012 16Date: April 2012
16KernelVersion: 3.4 17KernelVersion: 3.4
17Contact: Asai Thambi S P <asamymuthupa@micron.com> 18Contact: Asai Thambi S P <asamymuthupa@micron.com>
18Description: This is a read-only file. Indicates the status of the device. 19Description: This is a read-only file. Indicates the status of the device.
20
21What: /sys/block/rssd*/flags
22Date: May 2012
23KernelVersion: 3.5
24Contact: Asai Thambi S P <asamymuthupa@micron.com>
25Description: This is a read-only file. Dumps the flags in port and driver
26 data structure
diff --git a/Documentation/ABI/testing/sysfs-bus-fcoe b/Documentation/ABI/testing/sysfs-bus-fcoe
new file mode 100644
index 000000000000..469d09c02f6b
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-fcoe
@@ -0,0 +1,77 @@
1What: /sys/bus/fcoe/ctlr_X
2Date: March 2012
3KernelVersion: TBD
4Contact: Robert Love <robert.w.love@intel.com>, devel@open-fcoe.org
5Description: 'FCoE Controller' instances on the fcoe bus
6Attributes:
7
8 fcf_dev_loss_tmo: Device loss timeout peroid (see below). Changing
9 this value will change the dev_loss_tmo for all
10 FCFs discovered by this controller.
11
12 lesb_link_fail: Link Error Status Block (LESB) link failure count.
13
14 lesb_vlink_fail: Link Error Status Block (LESB) virtual link
15 failure count.
16
17 lesb_miss_fka: Link Error Status Block (LESB) missed FCoE
18 Initialization Protocol (FIP) Keep-Alives (FKA).
19
20 lesb_symb_err: Link Error Status Block (LESB) symbolic error count.
21
22 lesb_err_block: Link Error Status Block (LESB) block error count.
23
24 lesb_fcs_error: Link Error Status Block (LESB) Fibre Channel
25 Serivces error count.
26
27Notes: ctlr_X (global increment starting at 0)
28
29What: /sys/bus/fcoe/fcf_X
30Date: March 2012
31KernelVersion: TBD
32Contact: Robert Love <robert.w.love@intel.com>, devel@open-fcoe.org
33Description: 'FCoE FCF' instances on the fcoe bus. A FCF is a Fibre Channel
34 Forwarder, which is a FCoE switch that can accept FCoE
35 (Ethernet) packets, unpack them, and forward the embedded
36 Fibre Channel frames into a FC fabric. It can also take
37 outbound FC frames and pack them in Ethernet packets to
38 be sent to their destination on the Ethernet segment.
39Attributes:
40
41 fabric_name: Identifies the fabric that the FCF services.
42
43 switch_name: Identifies the FCF.
44
45 priority: The switch's priority amongst other FCFs on the same
46 fabric.
47
48 selected: 1 indicates that the switch has been selected for use;
49 0 indicates that the swich will not be used.
50
51 fc_map: The Fibre Channel MAP
52
53 vfid: The Virtual Fabric ID
54
55 mac: The FCF's MAC address
56
57 fka_peroid: The FIP Keep-Alive peroid
58
59 fabric_state: The internal kernel state
60 "Unknown" - Initialization value
61 "Disconnected" - No link to the FCF/fabric
62 "Connected" - Host is connected to the FCF
63 "Deleted" - FCF is being removed from the system
64
65 dev_loss_tmo: The device loss timeout peroid for this FCF.
66
67Notes: A device loss infrastructre similar to the FC Transport's
68 is present in fcoe_sysfs. It is nice to have so that a
69 link flapping adapter doesn't continually advance the count
70 used to identify the discovered FCF. FCFs will exist in a
71 "Disconnected" state until either the timer expires and the
72 FCF becomes "Deleted" or the FCF is rediscovered and becomes
73 "Connected."
74
75
76Users: The first user of this interface will be the fcoeadm application,
77 which is commonly packaged in the fcoe-utils package.
diff --git a/Documentation/ABI/testing/sysfs-bus-i2c-devices-lm3533 b/Documentation/ABI/testing/sysfs-bus-i2c-devices-lm3533
new file mode 100644
index 000000000000..1b62230b33b9
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-i2c-devices-lm3533
@@ -0,0 +1,15 @@
1What: /sys/bus/i2c/devices/.../output_hvled[n]
2Date: April 2012
3KernelVersion: 3.5
4Contact: Johan Hovold <jhovold@gmail.com>
5Description:
6 Set the controlling backlight device for high-voltage current
7 sink HVLED[n] (n = 1, 2) (0, 1).
8
9What: /sys/bus/i2c/devices/.../output_lvled[n]
10Date: April 2012
11KernelVersion: 3.5
12Contact: Johan Hovold <jhovold@gmail.com>
13Description:
14 Set the controlling led device for low-voltage current sink
15 LVLED[n] (n = 1..5) (0..3).
diff --git a/Documentation/ABI/testing/sysfs-bus-rbd b/Documentation/ABI/testing/sysfs-bus-rbd
index dbedafb095e2..bcd88eb7ebcd 100644
--- a/Documentation/ABI/testing/sysfs-bus-rbd
+++ b/Documentation/ABI/testing/sysfs-bus-rbd
@@ -65,11 +65,11 @@ snap_*
65Entries under /sys/bus/rbd/devices/<dev-id>/snap_<snap-name> 65Entries under /sys/bus/rbd/devices/<dev-id>/snap_<snap-name>
66------------------------------------------------------------- 66-------------------------------------------------------------
67 67
68id 68snap_id
69 69
70 The rados internal snapshot id assigned for this snapshot 70 The rados internal snapshot id assigned for this snapshot
71 71
72size 72snap_size
73 73
74 The size of the image when this snapshot was taken. 74 The size of the image when this snapshot was taken.
75 75
diff --git a/Documentation/ABI/testing/sysfs-class-backlight-driver-lm3533 b/Documentation/ABI/testing/sysfs-class-backlight-driver-lm3533
new file mode 100644
index 000000000000..77cf7ac949af
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-backlight-driver-lm3533
@@ -0,0 +1,48 @@
1What: /sys/class/backlight/<backlight>/als_channel
2Date: May 2012
3KernelVersion: 3.5
4Contact: Johan Hovold <jhovold@gmail.com>
5Description:
6 Get the ALS output channel used as input in
7 ALS-current-control mode (0, 1), where
8
9 0 - out_current0 (backlight 0)
10 1 - out_current1 (backlight 1)
11
12What: /sys/class/backlight/<backlight>/als_en
13Date: May 2012
14KernelVersion: 3.5
15Contact: Johan Hovold <jhovold@gmail.com>
16Description:
17 Enable ALS-current-control mode (0, 1).
18
19What: /sys/class/backlight/<backlight>/id
20Date: April 2012
21KernelVersion: 3.5
22Contact: Johan Hovold <jhovold@gmail.com>
23Description:
24 Get the id of this backlight (0, 1).
25
26What: /sys/class/backlight/<backlight>/linear
27Date: April 2012
28KernelVersion: 3.5
29Contact: Johan Hovold <jhovold@gmail.com>
30Description:
31 Set the brightness-mapping mode (0, 1), where
32
33 0 - exponential mode
34 1 - linear mode
35
36What: /sys/class/backlight/<backlight>/pwm
37Date: April 2012
38KernelVersion: 3.5
39Contact: Johan Hovold <jhovold@gmail.com>
40Description:
41 Set the PWM-input control mask (5 bits), where
42
43 bit 5 - PWM-input enabled in Zone 4
44 bit 4 - PWM-input enabled in Zone 3
45 bit 3 - PWM-input enabled in Zone 2
46 bit 2 - PWM-input enabled in Zone 1
47 bit 1 - PWM-input enabled in Zone 0
48 bit 0 - PWM-input enabled
diff --git a/Documentation/ABI/testing/sysfs-class-led-driver-lm3533 b/Documentation/ABI/testing/sysfs-class-led-driver-lm3533
new file mode 100644
index 000000000000..620ebb3b9baa
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-led-driver-lm3533
@@ -0,0 +1,65 @@
1What: /sys/class/leds/<led>/als_channel
2Date: May 2012
3KernelVersion: 3.5
4Contact: Johan Hovold <jhovold@gmail.com>
5Description:
6 Set the ALS output channel to use as input in
7 ALS-current-control mode (1, 2), where
8
9 1 - out_current1
10 2 - out_current2
11
12What: /sys/class/leds/<led>/als_en
13Date: May 2012
14KernelVersion: 3.5
15Contact: Johan Hovold <jhovold@gmail.com>
16Description:
17 Enable ALS-current-control mode (0, 1).
18
19What: /sys/class/leds/<led>/falltime
20What: /sys/class/leds/<led>/risetime
21Date: April 2012
22KernelVersion: 3.5
23Contact: Johan Hovold <jhovold@gmail.com>
24Description:
25 Set the pattern generator fall and rise times (0..7), where
26
27 0 - 2048 us
28 1 - 262 ms
29 2 - 524 ms
30 3 - 1.049 s
31 4 - 2.097 s
32 5 - 4.194 s
33 6 - 8.389 s
34 7 - 16.78 s
35
36What: /sys/class/leds/<led>/id
37Date: April 2012
38KernelVersion: 3.5
39Contact: Johan Hovold <jhovold@gmail.com>
40Description:
41 Get the id of this led (0..3).
42
43What: /sys/class/leds/<led>/linear
44Date: April 2012
45KernelVersion: 3.5
46Contact: Johan Hovold <jhovold@gmail.com>
47Description:
48 Set the brightness-mapping mode (0, 1), where
49
50 0 - exponential mode
51 1 - linear mode
52
53What: /sys/class/leds/<led>/pwm
54Date: April 2012
55KernelVersion: 3.5
56Contact: Johan Hovold <jhovold@gmail.com>
57Description:
58 Set the PWM-input control mask (5 bits), where
59
60 bit 5 - PWM-input enabled in Zone 4
61 bit 4 - PWM-input enabled in Zone 3
62 bit 3 - PWM-input enabled in Zone 2
63 bit 2 - PWM-input enabled in Zone 1
64 bit 1 - PWM-input enabled in Zone 0
65 bit 0 - PWM-input enabled
diff --git a/Documentation/ABI/testing/sysfs-class-mtd b/Documentation/ABI/testing/sysfs-class-mtd
index 4d55a1888981..db1ad7e34fc3 100644
--- a/Documentation/ABI/testing/sysfs-class-mtd
+++ b/Documentation/ABI/testing/sysfs-class-mtd
@@ -123,3 +123,54 @@ Description:
123 half page, or a quarter page). 123 half page, or a quarter page).
124 124
125 In the case of ECC NOR, it is the ECC block size. 125 In the case of ECC NOR, it is the ECC block size.
126
127What: /sys/class/mtd/mtdX/ecc_strength
128Date: April 2012
129KernelVersion: 3.4
130Contact: linux-mtd@lists.infradead.org
131Description:
132 Maximum number of bit errors that the device is capable of
133 correcting within each region covering an ecc step. This will
134 always be a non-negative integer. Note that some devices will
135 have multiple ecc steps within each writesize region.
136
137 In the case of devices lacking any ECC capability, it is 0.
138
139What: /sys/class/mtd/mtdX/bitflip_threshold
140Date: April 2012
141KernelVersion: 3.4
142Contact: linux-mtd@lists.infradead.org
143Description:
144 This allows the user to examine and adjust the criteria by which
145 mtd returns -EUCLEAN from mtd_read(). If the maximum number of
146 bit errors that were corrected on any single region comprising
147 an ecc step (as reported by the driver) equals or exceeds this
148 value, -EUCLEAN is returned. Otherwise, absent an error, 0 is
149 returned. Higher layers (e.g., UBI) use this return code as an
150 indication that an erase block may be degrading and should be
151 scrutinized as a candidate for being marked as bad.
152
153 The initial value may be specified by the flash device driver.
154 If not, then the default value is ecc_strength.
155
156 The introduction of this feature brings a subtle change to the
157 meaning of the -EUCLEAN return code. Previously, it was
158 interpreted to mean simply "one or more bit errors were
159 corrected". Its new interpretation can be phrased as "a
160 dangerously high number of bit errors were corrected on one or
161 more regions comprising an ecc step". The precise definition of
162 "dangerously high" can be adjusted by the user with
163 bitflip_threshold. Users are discouraged from doing this,
164 however, unless they know what they are doing and have intimate
165 knowledge of the properties of their device. Broadly speaking,
166 bitflip_threshold should be low enough to detect genuine erase
167 block degradation, but high enough to avoid the consequences of
168 a persistent return value of -EUCLEAN on devices where sticky
169 bitflips occur. Note that if bitflip_threshold exceeds
170 ecc_strength, -EUCLEAN is never returned by mtd_read().
171 Conversely, if bitflip_threshold is zero, -EUCLEAN is always
172 returned, absent a hard error.
173
174 This is generally applicable only to NAND flash devices with ECC
175 capability. It is ignored on devices lacking ECC capability;
176 i.e., devices for which ecc_strength is zero.
diff --git a/Documentation/ABI/testing/sysfs-driver-wacom b/Documentation/ABI/testing/sysfs-driver-wacom
index 56c54558c8a4..8d55a83d6921 100644
--- a/Documentation/ABI/testing/sysfs-driver-wacom
+++ b/Documentation/ABI/testing/sysfs-driver-wacom
@@ -23,9 +23,10 @@ Contact: linux-input@vger.kernel.org
23Description: 23Description:
24 Attribute group for control of the status LEDs and the OLEDs. 24 Attribute group for control of the status LEDs and the OLEDs.
25 This attribute group is only available for Intuos 4 M, L, 25 This attribute group is only available for Intuos 4 M, L,
26 and XL (with LEDs and OLEDs) and Cintiq 21UX2 and Cintiq 24HD 26 and XL (with LEDs and OLEDs), Intuos 5 (LEDs only), and Cintiq
27 (LEDs only). Therefore its presence implicitly signifies the 27 21UX2 and Cintiq 24HD (LEDs only). Therefore its presence
28 presence of said LEDs and OLEDs on the tablet device. 28 implicitly signifies the presence of said LEDs and OLEDs on the
29 tablet device.
29 30
30What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/status0_luminance 31What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/status0_luminance
31Date: August 2011 32Date: August 2011
@@ -48,10 +49,10 @@ What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/status_led0
48Date: August 2011 49Date: August 2011
49Contact: linux-input@vger.kernel.org 50Contact: linux-input@vger.kernel.org
50Description: 51Description:
51 Writing to this file sets which one of the four (for Intuos 4) 52 Writing to this file sets which one of the four (for Intuos 4
52 or of the right four (for Cintiq 21UX2 and Cintiq 24HD) status 53 and Intuos 5) or of the right four (for Cintiq 21UX2 and Cintiq
53 LEDs is active (0..3). The other three LEDs on the same side are 54 24HD) status LEDs is active (0..3). The other three LEDs on the
54 always inactive. 55 same side are always inactive.
55 56
56What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/status_led1_select 57What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/status_led1_select
57Date: September 2011 58Date: September 2011
diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle
index c58b236bbe04..cb9258b8fd35 100644
--- a/Documentation/CodingStyle
+++ b/Documentation/CodingStyle
@@ -671,8 +671,9 @@ ones already enabled by DEBUG.
671 Chapter 14: Allocating memory 671 Chapter 14: Allocating memory
672 672
673The kernel provides the following general purpose memory allocators: 673The kernel provides the following general purpose memory allocators:
674kmalloc(), kzalloc(), kcalloc(), vmalloc(), and vzalloc(). Please refer to 674kmalloc(), kzalloc(), kmalloc_array(), kcalloc(), vmalloc(), and
675the API documentation for further information about them. 675vzalloc(). Please refer to the API documentation for further information
676about them.
676 677
677The preferred form for passing a size of a struct is the following: 678The preferred form for passing a size of a struct is the following:
678 679
@@ -686,6 +687,17 @@ Casting the return value which is a void pointer is redundant. The conversion
686from void pointer to any other pointer type is guaranteed by the C programming 687from void pointer to any other pointer type is guaranteed by the C programming
687language. 688language.
688 689
690The preferred form for allocating an array is the following:
691
692 p = kmalloc_array(n, sizeof(...), ...);
693
694The preferred form for allocating a zeroed array is the following:
695
696 p = kcalloc(n, sizeof(...), ...);
697
698Both forms check for overflow on the allocation size n * sizeof(...),
699and return NULL if that occurred.
700
689 701
690 Chapter 15: The inline disease 702 Chapter 15: The inline disease
691 703
diff --git a/Documentation/DocBook/media/Makefile b/Documentation/DocBook/media/Makefile
index 6628b4b9cac4..362520992ced 100644
--- a/Documentation/DocBook/media/Makefile
+++ b/Documentation/DocBook/media/Makefile
@@ -70,6 +70,8 @@ IOCTLS = \
70 VIDIOC_SUBDEV_ENUM_MBUS_CODE \ 70 VIDIOC_SUBDEV_ENUM_MBUS_CODE \
71 VIDIOC_SUBDEV_ENUM_FRAME_SIZE \ 71 VIDIOC_SUBDEV_ENUM_FRAME_SIZE \
72 VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL \ 72 VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL \
73 VIDIOC_SUBDEV_G_SELECTION \
74 VIDIOC_SUBDEV_S_SELECTION \
73 75
74TYPES = \ 76TYPES = \
75 $(shell perl -ne 'print "$$1 " if /^typedef\s+[^\s]+\s+([^\s]+)\;/' $(srctree)/include/linux/videodev2.h) \ 77 $(shell perl -ne 'print "$$1 " if /^typedef\s+[^\s]+\s+([^\s]+)\;/' $(srctree)/include/linux/videodev2.h) \
@@ -193,7 +195,7 @@ DVB_DOCUMENTED = \
193# 195#
194 196
195install_media_images = \ 197install_media_images = \
196 $(Q)cp $(OBJIMGFILES) $(MEDIA_OBJ_DIR)/media_api 198 $(Q)cp $(OBJIMGFILES) $(MEDIA_SRC_DIR)/v4l/*.svg $(MEDIA_OBJ_DIR)/media_api
197 199
198$(MEDIA_OBJ_DIR)/%: $(MEDIA_SRC_DIR)/%.b64 200$(MEDIA_OBJ_DIR)/%: $(MEDIA_SRC_DIR)/%.b64
199 $(Q)base64 -d $< >$@ 201 $(Q)base64 -d $< >$@
diff --git a/Documentation/DocBook/media/dvb/dvbproperty.xml b/Documentation/DocBook/media/dvb/dvbproperty.xml
index c7a4ca517859..e633c097a8d1 100644
--- a/Documentation/DocBook/media/dvb/dvbproperty.xml
+++ b/Documentation/DocBook/media/dvb/dvbproperty.xml
@@ -531,6 +531,139 @@ typedef enum fe_delivery_system {
531 here are referring to what can be found in the TMCC-structure - 531 here are referring to what can be found in the TMCC-structure -
532 independent of the mode.</para> 532 independent of the mode.</para>
533 </section> 533 </section>
534 <section id="DTV-ATSCMH-FIC-VER">
535 <title><constant>DTV_ATSCMH_FIC_VER</constant></title>
536 <para>Version number of the FIC (Fast Information Channel) signaling data.</para>
537 <para>FIC is used for relaying information to allow rapid service acquisition by the receiver.</para>
538 <para>Possible values: 0, 1, 2, 3, ..., 30, 31</para>
539 </section>
540 <section id="DTV-ATSCMH-PARADE-ID">
541 <title><constant>DTV_ATSCMH_PARADE_ID</constant></title>
542 <para>Parade identification number</para>
543 <para>A parade is a collection of up to eight MH groups, conveying one or two ensembles.</para>
544 <para>Possible values: 0, 1, 2, 3, ..., 126, 127</para>
545 </section>
546 <section id="DTV-ATSCMH-NOG">
547 <title><constant>DTV_ATSCMH_NOG</constant></title>
548 <para>Number of MH groups per MH subframe for a designated parade.</para>
549 <para>Possible values: 1, 2, 3, 4, 5, 6, 7, 8</para>
550 </section>
551 <section id="DTV-ATSCMH-TNOG">
552 <title><constant>DTV_ATSCMH_TNOG</constant></title>
553 <para>Total number of MH groups including all MH groups belonging to all MH parades in one MH subframe.</para>
554 <para>Possible values: 0, 1, 2, 3, ..., 30, 31</para>
555 </section>
556 <section id="DTV-ATSCMH-SGN">
557 <title><constant>DTV_ATSCMH_SGN</constant></title>
558 <para>Start group number.</para>
559 <para>Possible values: 0, 1, 2, 3, ..., 14, 15</para>
560 </section>
561 <section id="DTV-ATSCMH-PRC">
562 <title><constant>DTV_ATSCMH_PRC</constant></title>
563 <para>Parade repetition cycle.</para>
564 <para>Possible values: 1, 2, 3, 4, 5, 6, 7, 8</para>
565 </section>
566 <section id="DTV-ATSCMH-RS-FRAME-MODE">
567 <title><constant>DTV_ATSCMH_RS_FRAME_MODE</constant></title>
568 <para>RS frame mode.</para>
569 <para>Possible values are:</para>
570<programlisting>
571typedef enum atscmh_rs_frame_mode {
572 ATSCMH_RSFRAME_PRI_ONLY = 0,
573 ATSCMH_RSFRAME_PRI_SEC = 1,
574} atscmh_rs_frame_mode_t;
575</programlisting>
576 </section>
577 <section id="DTV-ATSCMH-RS-FRAME-ENSEMBLE">
578 <title><constant>DTV_ATSCMH_RS_FRAME_ENSEMBLE</constant></title>
579 <para>RS frame ensemble.</para>
580 <para>Possible values are:</para>
581<programlisting>
582typedef enum atscmh_rs_frame_ensemble {
583 ATSCMH_RSFRAME_ENS_PRI = 0,
584 ATSCMH_RSFRAME_ENS_SEC = 1,
585} atscmh_rs_frame_ensemble_t;
586</programlisting>
587 </section>
588 <section id="DTV-ATSCMH-RS-CODE-MODE-PRI">
589 <title><constant>DTV_ATSCMH_RS_CODE_MODE_PRI</constant></title>
590 <para>RS code mode (primary).</para>
591 <para>Possible values are:</para>
592<programlisting>
593typedef enum atscmh_rs_code_mode {
594 ATSCMH_RSCODE_211_187 = 0,
595 ATSCMH_RSCODE_223_187 = 1,
596 ATSCMH_RSCODE_235_187 = 2,
597} atscmh_rs_code_mode_t;
598</programlisting>
599 </section>
600 <section id="DTV-ATSCMH-RS-CODE-MODE-SEC">
601 <title><constant>DTV_ATSCMH_RS_CODE_MODE_SEC</constant></title>
602 <para>RS code mode (secondary).</para>
603 <para>Possible values are:</para>
604<programlisting>
605typedef enum atscmh_rs_code_mode {
606 ATSCMH_RSCODE_211_187 = 0,
607 ATSCMH_RSCODE_223_187 = 1,
608 ATSCMH_RSCODE_235_187 = 2,
609} atscmh_rs_code_mode_t;
610</programlisting>
611 </section>
612 <section id="DTV-ATSCMH-SCCC-BLOCK-MODE">
613 <title><constant>DTV_ATSCMH_SCCC_BLOCK_MODE</constant></title>
614 <para>Series Concatenated Convolutional Code Block Mode.</para>
615 <para>Possible values are:</para>
616<programlisting>
617typedef enum atscmh_sccc_block_mode {
618 ATSCMH_SCCC_BLK_SEP = 0,
619 ATSCMH_SCCC_BLK_COMB = 1,
620} atscmh_sccc_block_mode_t;
621</programlisting>
622 </section>
623 <section id="DTV-ATSCMH-SCCC-CODE-MODE-A">
624 <title><constant>DTV_ATSCMH_SCCC_CODE_MODE_A</constant></title>
625 <para>Series Concatenated Convolutional Code Rate.</para>
626 <para>Possible values are:</para>
627<programlisting>
628typedef enum atscmh_sccc_code_mode {
629 ATSCMH_SCCC_CODE_HLF = 0,
630 ATSCMH_SCCC_CODE_QTR = 1,
631} atscmh_sccc_code_mode_t;
632</programlisting>
633 </section>
634 <section id="DTV-ATSCMH-SCCC-CODE-MODE-B">
635 <title><constant>DTV_ATSCMH_SCCC_CODE_MODE_B</constant></title>
636 <para>Series Concatenated Convolutional Code Rate.</para>
637 <para>Possible values are:</para>
638<programlisting>
639typedef enum atscmh_sccc_code_mode {
640 ATSCMH_SCCC_CODE_HLF = 0,
641 ATSCMH_SCCC_CODE_QTR = 1,
642} atscmh_sccc_code_mode_t;
643</programlisting>
644 </section>
645 <section id="DTV-ATSCMH-SCCC-CODE-MODE-C">
646 <title><constant>DTV_ATSCMH_SCCC_CODE_MODE_C</constant></title>
647 <para>Series Concatenated Convolutional Code Rate.</para>
648 <para>Possible values are:</para>
649<programlisting>
650typedef enum atscmh_sccc_code_mode {
651 ATSCMH_SCCC_CODE_HLF = 0,
652 ATSCMH_SCCC_CODE_QTR = 1,
653} atscmh_sccc_code_mode_t;
654</programlisting>
655 </section>
656 <section id="DTV-ATSCMH-SCCC-CODE-MODE-D">
657 <title><constant>DTV_ATSCMH_SCCC_CODE_MODE_D</constant></title>
658 <para>Series Concatenated Convolutional Code Rate.</para>
659 <para>Possible values are:</para>
660<programlisting>
661typedef enum atscmh_sccc_code_mode {
662 ATSCMH_SCCC_CODE_HLF = 0,
663 ATSCMH_SCCC_CODE_QTR = 1,
664} atscmh_sccc_code_mode_t;
665</programlisting>
666 </section>
534 </section> 667 </section>
535 <section id="DTV-API-VERSION"> 668 <section id="DTV-API-VERSION">
536 <title><constant>DTV_API_VERSION</constant></title> 669 <title><constant>DTV_API_VERSION</constant></title>
@@ -774,6 +907,33 @@ typedef enum fe_hierarchy {
774 <listitem><para><link linkend="DTV-BANDWIDTH-HZ"><constant>DTV_BANDWIDTH_HZ</constant></link></para></listitem> 907 <listitem><para><link linkend="DTV-BANDWIDTH-HZ"><constant>DTV_BANDWIDTH_HZ</constant></link></para></listitem>
775 </itemizedlist> 908 </itemizedlist>
776 </section> 909 </section>
910 <section id="atscmh-params">
911 <title>ATSC-MH delivery system</title>
912 <para>The following parameters are valid for ATSC-MH:</para>
913 <itemizedlist mark='opencircle'>
914 <listitem><para><link linkend="DTV-API-VERSION"><constant>DTV_API_VERSION</constant></link></para></listitem>
915 <listitem><para><link linkend="DTV-DELIVERY-SYSTEM"><constant>DTV_DELIVERY_SYSTEM</constant></link></para></listitem>
916 <listitem><para><link linkend="DTV-TUNE"><constant>DTV_TUNE</constant></link></para></listitem>
917 <listitem><para><link linkend="DTV-CLEAR"><constant>DTV_CLEAR</constant></link></para></listitem>
918 <listitem><para><link linkend="DTV-FREQUENCY"><constant>DTV_FREQUENCY</constant></link></para></listitem>
919 <listitem><para><link linkend="DTV-BANDWIDTH-HZ"><constant>DTV_BANDWIDTH_HZ</constant></link></para></listitem>
920 <listitem><para><link linkend="DTV-ATSCMH-FIC-VER"><constant>DTV_ATSCMH_FIC_VER</constant></link></para></listitem>
921 <listitem><para><link linkend="DTV-ATSCMH-PARADE-ID"><constant>DTV_ATSCMH_PARADE_ID</constant></link></para></listitem>
922 <listitem><para><link linkend="DTV-ATSCMH-NOG"><constant>DTV_ATSCMH_NOG</constant></link></para></listitem>
923 <listitem><para><link linkend="DTV-ATSCMH-TNOG"><constant>DTV_ATSCMH_TNOG</constant></link></para></listitem>
924 <listitem><para><link linkend="DTV-ATSCMH-SGN"><constant>DTV_ATSCMH_SGN</constant></link></para></listitem>
925 <listitem><para><link linkend="DTV-ATSCMH-PRC"><constant>DTV_ATSCMH_PRC</constant></link></para></listitem>
926 <listitem><para><link linkend="DTV-ATSCMH-RS-FRAME-MODE"><constant>DTV_ATSCMH_RS_FRAME_MODE</constant></link></para></listitem>
927 <listitem><para><link linkend="DTV-ATSCMH-RS-FRAME-ENSEMBLE"><constant>DTV_ATSCMH_RS_FRAME_ENSEMBLE</constant></link></para></listitem>
928 <listitem><para><link linkend="DTV-ATSCMH-CODE-MODE-PRI"><constant>DTV_ATSCMH_CODE_MODE_PRI</constant></link></para></listitem>
929 <listitem><para><link linkend="DTV-ATSCMH-CODE-MODE-SEC"><constant>DTV_ATSCMH_CODE_MODE_SEC</constant></link></para></listitem>
930 <listitem><para><link linkend="DTV-ATSCMH-SCCC-BLOCK-MODE"><constant>DTV_ATSCMH_SCCC_BLOCK_MODE</constant></link></para></listitem>
931 <listitem><para><link linkend="DTV-ATSCMH-SCCC-CODE_MODE-A"><constant>DTV_ATSCMH_SCCC_CODE_MODE_A</constant></link></para></listitem>
932 <listitem><para><link linkend="DTV-ATSCMH-SCCC-CODE_MODE-B"><constant>DTV_ATSCMH_SCCC_CODE_MODE_B</constant></link></para></listitem>
933 <listitem><para><link linkend="DTV-ATSCMH-SCCC-CODE_MODE-C"><constant>DTV_ATSCMH_SCCC_CODE_MODE_C</constant></link></para></listitem>
934 <listitem><para><link linkend="DTV-ATSCMH-SCCC-CODE_MODE-D"><constant>DTV_ATSCMH_SCCC_CODE_MODE_D</constant></link></para></listitem>
935 </itemizedlist>
936 </section>
777 </section> 937 </section>
778 <section id="frontend-property-cable-systems"> 938 <section id="frontend-property-cable-systems">
779 <title>Properties used on cable delivery systems</title> 939 <title>Properties used on cable delivery systems</title>
diff --git a/Documentation/DocBook/media/v4l/biblio.xml b/Documentation/DocBook/media/v4l/biblio.xml
index 7dc65c592a87..7c49facecd25 100644
--- a/Documentation/DocBook/media/v4l/biblio.xml
+++ b/Documentation/DocBook/media/v4l/biblio.xml
@@ -197,4 +197,33 @@ in the frequency range from 87,5 to 108,0 MHz</title>
197 <title>NTSC-4: United States RBDS Standard</title> 197 <title>NTSC-4: United States RBDS Standard</title>
198 </biblioentry> 198 </biblioentry>
199 199
200 <biblioentry id="iso12232">
201 <abbrev>ISO&nbsp;12232:2006</abbrev>
202 <authorgroup>
203 <corpauthor>International Organization for Standardization
204(<ulink url="http://www.iso.org">http://www.iso.org</ulink>)</corpauthor>
205 </authorgroup>
206 <title>Photography &mdash; Digital still cameras &mdash; Determination
207 of exposure index, ISO speed ratings, standard output sensitivity, and
208 recommended exposure index</title>
209 </biblioentry>
210
211 <biblioentry id="cea861">
212 <abbrev>CEA-861-E</abbrev>
213 <authorgroup>
214 <corpauthor>Consumer Electronics Association
215(<ulink url="http://www.ce.org">http://www.ce.org</ulink>)</corpauthor>
216 </authorgroup>
217 <title>A DTV Profile for Uncompressed High Speed Digital Interfaces</title>
218 </biblioentry>
219
220 <biblioentry id="vesadmt">
221 <abbrev>VESA&nbsp;DMT</abbrev>
222 <authorgroup>
223 <corpauthor>Video Electronics Standards Association
224(<ulink url="http://www.vesa.org">http://www.vesa.org</ulink>)</corpauthor>
225 </authorgroup>
226 <title>VESA and Industry Standards and Guidelines for Computer Display Monitor Timing (DMT)</title>
227 </biblioentry>
228
200 </bibliography> 229 </bibliography>
diff --git a/Documentation/DocBook/media/v4l/common.xml b/Documentation/DocBook/media/v4l/common.xml
index c79278acfb0e..4101aeb56540 100644
--- a/Documentation/DocBook/media/v4l/common.xml
+++ b/Documentation/DocBook/media/v4l/common.xml
@@ -724,41 +724,49 @@ if (-1 == ioctl (fd, &VIDIOC-S-STD;, &amp;std_id)) {
724} 724}
725 </programlisting> 725 </programlisting>
726 </example> 726 </example>
727 </section>
727 <section id="dv-timings"> 728 <section id="dv-timings">
728 <title>Digital Video (DV) Timings</title> 729 <title>Digital Video (DV) Timings</title>
729 <para> 730 <para>
730 The video standards discussed so far has been dealing with Analog TV and the 731 The video standards discussed so far have been dealing with Analog TV and the
731corresponding video timings. Today there are many more different hardware interfaces 732corresponding video timings. Today there are many more different hardware interfaces
732such as High Definition TV interfaces (HDMI), VGA, DVI connectors etc., that carry 733such as High Definition TV interfaces (HDMI), VGA, DVI connectors etc., that carry
733video signals and there is a need to extend the API to select the video timings 734video signals and there is a need to extend the API to select the video timings
734for these interfaces. Since it is not possible to extend the &v4l2-std-id; due to 735for these interfaces. Since it is not possible to extend the &v4l2-std-id; due to
735the limited bits available, a new set of IOCTLs is added to set/get video timings at 736the limited bits available, a new set of IOCTLs was added to set/get video timings at
736the input and output: </para><itemizedlist> 737the input and output: </para><itemizedlist>
737 <listitem> 738 <listitem>
738 <para>DV Presets: Digital Video (DV) presets. These are IDs representing a 739 <para>DV Timings: This will allow applications to define detailed
740video timings for the interface. This includes parameters such as width, height,
741polarities, frontporch, backporch etc. The <filename>linux/v4l2-dv-timings.h</filename>
742header can be used to get the timings of the formats in the <xref linkend="cea861" /> and
743<xref linkend="vesadmt" /> standards.
744 </para>
745 </listitem>
746 <listitem>
747 <para>DV Presets: Digital Video (DV) presets (<emphasis role="bold">deprecated</emphasis>).
748 These are IDs representing a
739video timing at the input/output. Presets are pre-defined timings implemented 749video timing at the input/output. Presets are pre-defined timings implemented
740by the hardware according to video standards. A __u32 data type is used to represent 750by the hardware according to video standards. A __u32 data type is used to represent
741a preset unlike the bit mask that is used in &v4l2-std-id; allowing future extensions 751a preset unlike the bit mask that is used in &v4l2-std-id; allowing future extensions
742to support as many different presets as needed.</para> 752to support as many different presets as needed. This API is deprecated in favor of the DV Timings
743 </listitem> 753API.</para>
744 <listitem>
745 <para>Custom DV Timings: This will allow applications to define more detailed
746custom video timings for the interface. This includes parameters such as width, height,
747polarities, frontporch, backporch etc.
748 </para>
749 </listitem> 754 </listitem>
750 </itemizedlist> 755 </itemizedlist>
756 <para>To enumerate and query the attributes of the DV timings supported by a device,
757 applications use the &VIDIOC-ENUM-DV-TIMINGS; and &VIDIOC-DV-TIMINGS-CAP; ioctls.
758 To set DV timings for the device, applications use the
759&VIDIOC-S-DV-TIMINGS; ioctl and to get current DV timings they use the
760&VIDIOC-G-DV-TIMINGS; ioctl. To detect the DV timings as seen by the video receiver applications
761use the &VIDIOC-QUERY-DV-TIMINGS; ioctl.</para>
751 <para>To enumerate and query the attributes of DV presets supported by a device, 762 <para>To enumerate and query the attributes of DV presets supported by a device,
752applications use the &VIDIOC-ENUM-DV-PRESETS; ioctl. To get the current DV preset, 763applications use the &VIDIOC-ENUM-DV-PRESETS; ioctl. To get the current DV preset,
753applications use the &VIDIOC-G-DV-PRESET; ioctl and to set a preset they use the 764applications use the &VIDIOC-G-DV-PRESET; ioctl and to set a preset they use the
754&VIDIOC-S-DV-PRESET; ioctl.</para> 765&VIDIOC-S-DV-PRESET; ioctl. To detect the preset as seen by the video receiver applications
755 <para>To set custom DV timings for the device, applications use the 766use the &VIDIOC-QUERY-DV-PRESET; ioctl.</para>
756&VIDIOC-S-DV-TIMINGS; ioctl and to get current custom DV timings they use the
757&VIDIOC-G-DV-TIMINGS; ioctl.</para>
758 <para>Applications can make use of the <xref linkend="input-capabilities" /> and 767 <para>Applications can make use of the <xref linkend="input-capabilities" /> and
759<xref linkend="output-capabilities"/> flags to decide what ioctls are available to set the 768<xref linkend="output-capabilities"/> flags to decide what ioctls are available to set the
760video timings for the device.</para> 769video timings for the device.</para>
761 </section>
762 </section> 770 </section>
763 771
764 &sub-controls; 772 &sub-controls;
diff --git a/Documentation/DocBook/media/v4l/compat.xml b/Documentation/DocBook/media/v4l/compat.xml
index bce97c50391b..ea42ef824948 100644
--- a/Documentation/DocBook/media/v4l/compat.xml
+++ b/Documentation/DocBook/media/v4l/compat.xml
@@ -2407,6 +2407,54 @@ details.</para>
2407 <para>Added <link linkend="jpeg-controls">JPEG compression control 2407 <para>Added <link linkend="jpeg-controls">JPEG compression control
2408 class</link>.</para> 2408 class</link>.</para>
2409 </listitem> 2409 </listitem>
2410 <listitem>
2411 <para>Extended the DV Timings API:
2412 &VIDIOC-ENUM-DV-TIMINGS;, &VIDIOC-QUERY-DV-TIMINGS; and
2413 &VIDIOC-DV-TIMINGS-CAP;.</para>
2414 </listitem>
2415 </orderedlist>
2416 </section>
2417
2418 <section>
2419 <title>V4L2 in Linux 3.5</title>
2420 <orderedlist>
2421 <listitem>
2422 <para>Added integer menus, the new type will be
2423 V4L2_CTRL_TYPE_INTEGER_MENU.</para>
2424 </listitem>
2425 <listitem>
2426 <para>Added selection API for V4L2 subdev interface:
2427 &VIDIOC-SUBDEV-G-SELECTION; and
2428 &VIDIOC-SUBDEV-S-SELECTION;.</para>
2429 </listitem>
2430 <listitem>
2431 <para> Added <constant>V4L2_COLORFX_ANTIQUE</constant>,
2432 <constant>V4L2_COLORFX_ART_FREEZE</constant>,
2433 <constant>V4L2_COLORFX_AQUA</constant>,
2434 <constant>V4L2_COLORFX_SILHOUETTE</constant>,
2435 <constant>V4L2_COLORFX_SOLARIZATION</constant>,
2436 <constant>V4L2_COLORFX_VIVID</constant> and
2437 <constant>V4L2_COLORFX_ARBITRARY_CBCR</constant> menu items
2438 to the <constant>V4L2_CID_COLORFX</constant> control.</para>
2439 </listitem>
2440 <listitem>
2441 <para> Added <constant>V4L2_CID_COLORFX_CBCR</constant> control.</para>
2442 </listitem>
2443 <listitem>
2444 <para> Added camera controls <constant>V4L2_CID_AUTO_EXPOSURE_BIAS</constant>,
2445 <constant>V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE</constant>,
2446 <constant>V4L2_CID_IMAGE_STABILIZATION</constant>,
2447 <constant>V4L2_CID_ISO_SENSITIVITY</constant>,
2448 <constant>V4L2_CID_ISO_SENSITIVITY_AUTO</constant>,
2449 <constant>V4L2_CID_EXPOSURE_METERING</constant>,
2450 <constant>V4L2_CID_SCENE_MODE</constant>,
2451 <constant>V4L2_CID_3A_LOCK</constant>,
2452 <constant>V4L2_CID_AUTO_FOCUS_START</constant>,
2453 <constant>V4L2_CID_AUTO_FOCUS_STOP</constant>,
2454 <constant>V4L2_CID_AUTO_FOCUS_STATUS</constant> and
2455 <constant>V4L2_CID_AUTO_FOCUS_RANGE</constant>.
2456 </para>
2457 </listitem>
2410 </orderedlist> 2458 </orderedlist>
2411 </section> 2459 </section>
2412 2460
@@ -2508,6 +2556,10 @@ and may change in the future.</para>
2508ioctls.</para> 2556ioctls.</para>
2509 </listitem> 2557 </listitem>
2510 <listitem> 2558 <listitem>
2559 <para>&VIDIOC-DECODER-CMD; and &VIDIOC-TRY-DECODER-CMD;
2560ioctls.</para>
2561 </listitem>
2562 <listitem>
2511 <para>&VIDIOC-DBG-G-REGISTER; and &VIDIOC-DBG-S-REGISTER; 2563 <para>&VIDIOC-DBG-G-REGISTER; and &VIDIOC-DBG-S-REGISTER;
2512ioctls.</para> 2564ioctls.</para>
2513 </listitem> 2565 </listitem>
@@ -2515,6 +2567,10 @@ ioctls.</para>
2515 <para>&VIDIOC-DBG-G-CHIP-IDENT; ioctl.</para> 2567 <para>&VIDIOC-DBG-G-CHIP-IDENT; ioctl.</para>
2516 </listitem> 2568 </listitem>
2517 <listitem> 2569 <listitem>
2570 <para>&VIDIOC-ENUM-DV-TIMINGS;, &VIDIOC-QUERY-DV-TIMINGS; and
2571 &VIDIOC-DV-TIMINGS-CAP; ioctls.</para>
2572 </listitem>
2573 <listitem>
2518 <para>Flash API. <xref linkend="flash-controls" /></para> 2574 <para>Flash API. <xref linkend="flash-controls" /></para>
2519 </listitem> 2575 </listitem>
2520 <listitem> 2576 <listitem>
@@ -2523,6 +2579,14 @@ ioctls.</para>
2523 <listitem> 2579 <listitem>
2524 <para>Selection API. <xref linkend="selection-api" /></para> 2580 <para>Selection API. <xref linkend="selection-api" /></para>
2525 </listitem> 2581 </listitem>
2582 <listitem>
2583 <para>Sub-device selection API: &VIDIOC-SUBDEV-G-SELECTION;
2584 and &VIDIOC-SUBDEV-S-SELECTION; ioctls.</para>
2585 </listitem>
2586 <listitem>
2587 <para><link linkend="v4l2-auto-focus-area"><constant>
2588 V4L2_CID_AUTO_FOCUS_AREA</constant></link> control.</para>
2589 </listitem>
2526 </itemizedlist> 2590 </itemizedlist>
2527 </section> 2591 </section>
2528 2592
@@ -2538,6 +2602,17 @@ interfaces and should not be implemented in new drivers.</para>
2538<constant>VIDIOC_S_MPEGCOMP</constant> ioctls. Use Extended Controls, 2602<constant>VIDIOC_S_MPEGCOMP</constant> ioctls. Use Extended Controls,
2539<xref linkend="extended-controls" />.</para> 2603<xref linkend="extended-controls" />.</para>
2540 </listitem> 2604 </listitem>
2605 <listitem>
2606 <para>&VIDIOC-G-DV-PRESET;, &VIDIOC-S-DV-PRESET;, &VIDIOC-ENUM-DV-PRESETS; and
2607 &VIDIOC-QUERY-DV-PRESET; ioctls. Use the DV Timings API (<xref linkend="dv-timings" />).</para>
2608 </listitem>
2609 <listitem>
2610 <para><constant>VIDIOC_SUBDEV_G_CROP</constant> and
2611 <constant>VIDIOC_SUBDEV_S_CROP</constant> ioctls. Use
2612 <constant>VIDIOC_SUBDEV_G_SELECTION</constant> and
2613 <constant>VIDIOC_SUBDEV_S_SELECTION</constant>, <xref
2614 linkend="vidioc-subdev-g-selection" />.</para>
2615 </listitem>
2541 </itemizedlist> 2616 </itemizedlist>
2542 </section> 2617 </section>
2543 </section> 2618 </section>
diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml
index dd03cf4a6539..676bc46f9c52 100644
--- a/Documentation/DocBook/media/v4l/controls.xml
+++ b/Documentation/DocBook/media/v4l/controls.xml
@@ -285,18 +285,92 @@ minimum value disables backlight compensation.</entry>
285 <row id="v4l2-colorfx"> 285 <row id="v4l2-colorfx">
286 <entry><constant>V4L2_CID_COLORFX</constant></entry> 286 <entry><constant>V4L2_CID_COLORFX</constant></entry>
287 <entry>enum</entry> 287 <entry>enum</entry>
288 <entry>Selects a color effect. Possible values for 288 <entry>Selects a color effect. The following values are defined:
289<constant>enum v4l2_colorfx</constant> are: 289 </entry>
290<constant>V4L2_COLORFX_NONE</constant> (0), 290 </row><row>
291<constant>V4L2_COLORFX_BW</constant> (1), 291 <entry></entry>
292<constant>V4L2_COLORFX_SEPIA</constant> (2), 292 <entry></entry>
293<constant>V4L2_COLORFX_NEGATIVE</constant> (3), 293 <entrytbl spanname="descr" cols="2">
294<constant>V4L2_COLORFX_EMBOSS</constant> (4), 294 <tbody valign="top">
295<constant>V4L2_COLORFX_SKETCH</constant> (5), 295 <row>
296<constant>V4L2_COLORFX_SKY_BLUE</constant> (6), 296 <entry><constant>V4L2_COLORFX_NONE</constant>&nbsp;</entry>
297<constant>V4L2_COLORFX_GRASS_GREEN</constant> (7), 297 <entry>Color effect is disabled.</entry>
298<constant>V4L2_COLORFX_SKIN_WHITEN</constant> (8) and 298 </row>
299<constant>V4L2_COLORFX_VIVID</constant> (9).</entry> 299 <row>
300 <entry><constant>V4L2_COLORFX_ANTIQUE</constant>&nbsp;</entry>
301 <entry>An aging (old photo) effect.</entry>
302 </row>
303 <row>
304 <entry><constant>V4L2_COLORFX_ART_FREEZE</constant>&nbsp;</entry>
305 <entry>Frost color effect.</entry>
306 </row>
307 <row>
308 <entry><constant>V4L2_COLORFX_AQUA</constant>&nbsp;</entry>
309 <entry>Water color, cool tone.</entry>
310 </row>
311 <row>
312 <entry><constant>V4L2_COLORFX_BW</constant>&nbsp;</entry>
313 <entry>Black and white.</entry>
314 </row>
315 <row>
316 <entry><constant>V4L2_COLORFX_EMBOSS</constant>&nbsp;</entry>
317 <entry>Emboss, the highlights and shadows replace light/dark boundaries
318 and low contrast areas are set to a gray background.</entry>
319 </row>
320 <row>
321 <entry><constant>V4L2_COLORFX_GRASS_GREEN</constant>&nbsp;</entry>
322 <entry>Grass green.</entry>
323 </row>
324 <row>
325 <entry><constant>V4L2_COLORFX_NEGATIVE</constant>&nbsp;</entry>
326 <entry>Negative.</entry>
327 </row>
328 <row>
329 <entry><constant>V4L2_COLORFX_SEPIA</constant>&nbsp;</entry>
330 <entry>Sepia tone.</entry>
331 </row>
332 <row>
333 <entry><constant>V4L2_COLORFX_SKETCH</constant>&nbsp;</entry>
334 <entry>Sketch.</entry>
335 </row>
336 <row>
337 <entry><constant>V4L2_COLORFX_SKIN_WHITEN</constant>&nbsp;</entry>
338 <entry>Skin whiten.</entry>
339 </row>
340 <row>
341 <entry><constant>V4L2_COLORFX_SKY_BLUE</constant>&nbsp;</entry>
342 <entry>Sky blue.</entry>
343 </row>
344 <row>
345 <entry><constant>V4L2_COLORFX_SOLARIZATION</constant>&nbsp;</entry>
346 <entry>Solarization, the image is partially reversed in tone,
347 only color values above or below a certain threshold are inverted.
348 </entry>
349 </row>
350 <row>
351 <entry><constant>V4L2_COLORFX_SILHOUETTE</constant>&nbsp;</entry>
352 <entry>Silhouette (outline).</entry>
353 </row>
354 <row>
355 <entry><constant>V4L2_COLORFX_VIVID</constant>&nbsp;</entry>
356 <entry>Vivid colors.</entry>
357 </row>
358 <row>
359 <entry><constant>V4L2_COLORFX_SET_CBCR</constant>&nbsp;</entry>
360 <entry>The Cb and Cr chroma components are replaced by fixed
361 coefficients determined by <constant>V4L2_CID_COLORFX_CBCR</constant>
362 control.</entry>
363 </row>
364 </tbody>
365 </entrytbl>
366 </row>
367 <row>
368 <entry><constant>V4L2_CID_COLORFX_CBCR</constant></entry>
369 <entry>integer</entry>
370 <entry>Determines the Cb and Cr coefficients for <constant>V4L2_COLORFX_SET_CBCR</constant>
371 color effect. Bits [7:0] of the supplied 32 bit value are interpreted as
372 Cr component, bits [15:8] as Cb component and bits [31:16] must be zero.
373 </entry>
300 </row> 374 </row>
301 <row> 375 <row>
302 <entry><constant>V4L2_CID_ROTATE</constant></entry> 376 <entry><constant>V4L2_CID_ROTATE</constant></entry>
@@ -2775,6 +2849,51 @@ remain constant.</entry>
2775 <row><entry></entry></row> 2849 <row><entry></entry></row>
2776 2850
2777 <row> 2851 <row>
2852 <entry spanname="id"><constant>V4L2_CID_EXPOSURE_BIAS</constant>&nbsp;</entry>
2853 <entry>integer menu</entry>
2854 </row><row><entry spanname="descr"> Determines the automatic
2855exposure compensation, it is effective only when <constant>V4L2_CID_EXPOSURE_AUTO</constant>
2856control is set to <constant>AUTO</constant>, <constant>SHUTTER_PRIORITY </constant>
2857or <constant>APERTURE_PRIORITY</constant>.
2858It is expressed in terms of EV, drivers should interpret the values as 0.001 EV
2859units, where the value 1000 stands for +1 EV.
2860<para>Increasing the exposure compensation value is equivalent to decreasing
2861the exposure value (EV) and will increase the amount of light at the image
2862sensor. The camera performs the exposure compensation by adjusting absolute
2863exposure time and/or aperture.</para></entry>
2864 </row>
2865 <row><entry></entry></row>
2866
2867 <row id="v4l2-exposure-metering">
2868 <entry spanname="id"><constant>V4L2_CID_EXPOSURE_METERING</constant>&nbsp;</entry>
2869 <entry>enum&nbsp;v4l2_exposure_metering</entry>
2870 </row><row><entry spanname="descr">Determines how the camera measures
2871the amount of light available for the frame exposure. Possible values are:</entry>
2872 </row>
2873 <row>
2874 <entrytbl spanname="descr" cols="2">
2875 <tbody valign="top">
2876 <row>
2877 <entry><constant>V4L2_EXPOSURE_METERING_AVERAGE</constant>&nbsp;</entry>
2878 <entry>Use the light information coming from the entire frame
2879and average giving no weighting to any particular portion of the metered area.
2880 </entry>
2881 </row>
2882 <row>
2883 <entry><constant>V4L2_EXPOSURE_METERING_CENTER_WEIGHTED</constant>&nbsp;</entry>
2884 <entry>Average the light information coming from the entire frame
2885giving priority to the center of the metered area.</entry>
2886 </row>
2887 <row>
2888 <entry><constant>V4L2_EXPOSURE_METERING_SPOT</constant>&nbsp;</entry>
2889 <entry>Measure only very small area at the center of the frame.</entry>
2890 </row>
2891 </tbody>
2892 </entrytbl>
2893 </row>
2894 <row><entry></entry></row>
2895
2896 <row>
2778 <entry spanname="id"><constant>V4L2_CID_PAN_RELATIVE</constant>&nbsp;</entry> 2897 <entry spanname="id"><constant>V4L2_CID_PAN_RELATIVE</constant>&nbsp;</entry>
2779 <entry>integer</entry> 2898 <entry>integer</entry>
2780 </row><row><entry spanname="descr">This control turns the 2899 </row><row><entry spanname="descr">This control turns the
@@ -2857,13 +2976,107 @@ negative values towards infinity. This is a write-only control.</entry>
2857 <row> 2976 <row>
2858 <entry spanname="id"><constant>V4L2_CID_FOCUS_AUTO</constant>&nbsp;</entry> 2977 <entry spanname="id"><constant>V4L2_CID_FOCUS_AUTO</constant>&nbsp;</entry>
2859 <entry>boolean</entry> 2978 <entry>boolean</entry>
2860 </row><row><entry spanname="descr">Enables automatic focus 2979 </row><row><entry spanname="descr">Enables continuous automatic
2861adjustments. The effect of manual focus adjustments while this feature 2980focus adjustments. The effect of manual focus adjustments while this feature
2862is enabled is undefined, drivers should ignore such requests.</entry> 2981is enabled is undefined, drivers should ignore such requests.</entry>
2863 </row> 2982 </row>
2864 <row><entry></entry></row> 2983 <row><entry></entry></row>
2865 2984
2866 <row> 2985 <row>
2986 <entry spanname="id"><constant>V4L2_CID_AUTO_FOCUS_START</constant>&nbsp;</entry>
2987 <entry>button</entry>
2988 </row><row><entry spanname="descr">Starts single auto focus process.
2989The effect of setting this control when <constant>V4L2_CID_FOCUS_AUTO</constant>
2990is set to <constant>TRUE</constant> (1) is undefined, drivers should ignore
2991such requests.</entry>
2992 </row>
2993 <row><entry></entry></row>
2994
2995 <row>
2996 <entry spanname="id"><constant>V4L2_CID_AUTO_FOCUS_STOP</constant>&nbsp;</entry>
2997 <entry>button</entry>
2998 </row><row><entry spanname="descr">Aborts automatic focusing
2999started with <constant>V4L2_CID_AUTO_FOCUS_START</constant> control. It is
3000effective only when the continuous autofocus is disabled, that is when
3001<constant>V4L2_CID_FOCUS_AUTO</constant> control is set to <constant>FALSE
3002</constant> (0).</entry>
3003 </row>
3004 <row><entry></entry></row>
3005
3006 <row id="v4l2-auto-focus-status">
3007 <entry spanname="id">
3008 <constant>V4L2_CID_AUTO_FOCUS_STATUS</constant>&nbsp;</entry>
3009 <entry>bitmask</entry>
3010 </row>
3011 <row><entry spanname="descr">The automatic focus status. This is a read-only
3012 control.</entry>
3013 </row>
3014 <row>
3015 <entrytbl spanname="descr" cols="2">
3016 <tbody valign="top">
3017 <row>
3018 <entry><constant>V4L2_AUTO_FOCUS_STATUS_IDLE</constant>&nbsp;</entry>
3019 <entry>Automatic focus is not active.</entry>
3020 </row>
3021 <row>
3022 <entry><constant>V4L2_AUTO_FOCUS_STATUS_BUSY</constant>&nbsp;</entry>
3023 <entry>Automatic focusing is in progress.</entry>
3024 </row>
3025 <row>
3026 <entry><constant>V4L2_AUTO_FOCUS_STATUS_REACHED</constant>&nbsp;</entry>
3027 <entry>Focus has been reached.</entry>
3028 </row>
3029 <row>
3030 <entry><constant>V4L2_AUTO_FOCUS_STATUS_FAILED</constant>&nbsp;</entry>
3031 <entry>Automatic focus has failed, the driver will not
3032 transition from this state until another action is
3033 performed by an application.</entry>
3034 </row>
3035 </tbody>
3036 </entrytbl>
3037 </row>
3038 <row><entry spanname="descr">
3039Setting <constant>V4L2_LOCK_FOCUS</constant> lock bit of the <constant>V4L2_CID_3A_LOCK
3040</constant> control may stop updates of the <constant>V4L2_CID_AUTO_FOCUS_STATUS</constant>
3041control value.</entry>
3042 </row>
3043 <row><entry></entry></row>
3044
3045 <row id="v4l2-auto-focus-range">
3046 <entry spanname="id">
3047 <constant>V4L2_CID_AUTO_FOCUS_RANGE</constant>&nbsp;</entry>
3048 <entry>enum&nbsp;v4l2_auto_focus_range</entry>
3049 </row>
3050 <row><entry spanname="descr">Determines auto focus distance range
3051for which lens may be adjusted. </entry>
3052 </row>
3053 <row>
3054 <entrytbl spanname="descr" cols="2">
3055 <tbody valign="top">
3056 <row>
3057 <entry><constant>V4L2_AUTO_FOCUS_RANGE_AUTO</constant>&nbsp;</entry>
3058 <entry>The camera automatically selects the focus range.</entry>
3059 </row>
3060 <row>
3061 <entry><constant>V4L2_AUTO_FOCUS_RANGE_NORMAL</constant>&nbsp;</entry>
3062 <entry>Normal distance range, limited for best automatic focus
3063performance.</entry>
3064 </row>
3065 <row>
3066 <entry><constant>V4L2_AUTO_FOCUS_RANGE_MACRO</constant>&nbsp;</entry>
3067 <entry>Macro (close-up) auto focus. The camera will
3068use its minimum possible distance for auto focus.</entry>
3069 </row>
3070 <row>
3071 <entry><constant>V4L2_AUTO_FOCUS_RANGE_INFINITY</constant>&nbsp;</entry>
3072 <entry>The lens is set to focus on an object at infinite distance.</entry>
3073 </row>
3074 </tbody>
3075 </entrytbl>
3076 </row>
3077 <row><entry></entry></row>
3078
3079 <row>
2867 <entry spanname="id"><constant>V4L2_CID_ZOOM_ABSOLUTE</constant>&nbsp;</entry> 3080 <entry spanname="id"><constant>V4L2_CID_ZOOM_ABSOLUTE</constant>&nbsp;</entry>
2868 <entry>integer</entry> 3081 <entry>integer</entry>
2869 </row><row><entry spanname="descr">Specify the objective lens 3082 </row><row><entry spanname="descr">Specify the objective lens
@@ -2932,6 +3145,295 @@ camera sensor on or off, or specify its strength. Such band-stop filters can
2932be used, for example, to filter out the fluorescent light component.</entry> 3145be used, for example, to filter out the fluorescent light component.</entry>
2933 </row> 3146 </row>
2934 <row><entry></entry></row> 3147 <row><entry></entry></row>
3148
3149 <row id="v4l2-auto-n-preset-white-balance">
3150 <entry spanname="id"><constant>V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE</constant>&nbsp;</entry>
3151 <entry>enum&nbsp;v4l2_auto_n_preset_white_balance</entry>
3152 </row><row><entry spanname="descr">Sets white balance to automatic,
3153manual or a preset. The presets determine color temperature of the light as
3154a hint to the camera for white balance adjustments resulting in most accurate
3155color representation. The following white balance presets are listed in order
3156of increasing color temperature.</entry>
3157 </row>
3158 <row>
3159 <entrytbl spanname="descr" cols="2">
3160 <tbody valign="top">
3161 <row>
3162 <entry><constant>V4L2_WHITE_BALANCE_MANUAL</constant>&nbsp;</entry>
3163 <entry>Manual white balance.</entry>
3164 </row>
3165 <row>
3166 <entry><constant>V4L2_WHITE_BALANCE_AUTO</constant>&nbsp;</entry>
3167 <entry>Automatic white balance adjustments.</entry>
3168 </row>
3169 <row>
3170 <entry><constant>V4L2_WHITE_BALANCE_INCANDESCENT</constant>&nbsp;</entry>
3171 <entry>White balance setting for incandescent (tungsten) lighting.
3172It generally cools down the colors and corresponds approximately to 2500...3500 K
3173color temperature range.</entry>
3174 </row>
3175 <row>
3176 <entry><constant>V4L2_WHITE_BALANCE_FLUORESCENT</constant>&nbsp;</entry>
3177 <entry>White balance preset for fluorescent lighting.
3178It corresponds approximately to 4000...5000 K color temperature.</entry>
3179 </row>
3180 <row>
3181 <entry><constant>V4L2_WHITE_BALANCE_FLUORESCENT_H</constant>&nbsp;</entry>
3182 <entry>With this setting the camera will compensate for
3183fluorescent H lighting.</entry>
3184 </row>
3185 <row>
3186 <entry><constant>V4L2_WHITE_BALANCE_HORIZON</constant>&nbsp;</entry>
3187 <entry>White balance setting for horizon daylight.
3188It corresponds approximately to 5000 K color temperature.</entry>
3189 </row>
3190 <row>
3191 <entry><constant>V4L2_WHITE_BALANCE_DAYLIGHT</constant>&nbsp;</entry>
3192 <entry>White balance preset for daylight (with clear sky).
3193It corresponds approximately to 5000...6500 K color temperature.</entry>
3194 </row>
3195 <row>
3196 <entry><constant>V4L2_WHITE_BALANCE_FLASH</constant>&nbsp;</entry>
3197 <entry>With this setting the camera will compensate for the flash
3198light. It slightly warms up the colors and corresponds roughly to 5000...5500 K
3199color temperature.</entry>
3200 </row>
3201 <row>
3202 <entry><constant>V4L2_WHITE_BALANCE_CLOUDY</constant>&nbsp;</entry>
3203 <entry>White balance preset for moderately overcast sky.
3204This option corresponds approximately to 6500...8000 K color temperature
3205range.</entry>
3206 </row>
3207 <row>
3208 <entry><constant>V4L2_WHITE_BALANCE_SHADE</constant>&nbsp;</entry>
3209 <entry>White balance preset for shade or heavily overcast
3210sky. It corresponds approximately to 9000...10000 K color temperature.
3211</entry>
3212 </row>
3213 </tbody>
3214 </entrytbl>
3215 </row>
3216 <row><entry></entry></row>
3217
3218 <row id="v4l2-wide-dynamic-range">
3219 <entry spanname="id"><constant>V4L2_CID_WIDE_DYNAMIC_RANGE</constant></entry>
3220 <entry>boolean</entry>
3221 </row>
3222 <row>
3223 <entry spanname="descr">Enables or disables the camera's wide dynamic
3224range feature. This feature allows to obtain clear images in situations where
3225intensity of the illumination varies significantly throughout the scene, i.e.
3226there are simultaneously very dark and very bright areas. It is most commonly
3227realized in cameras by combining two subsequent frames with different exposure
3228times. <footnote id="ctypeconv"><para> This control may be changed to a menu
3229control in the future, if more options are required.</para></footnote></entry>
3230 </row>
3231 <row><entry></entry></row>
3232
3233 <row id="v4l2-image-stabilization">
3234 <entry spanname="id"><constant>V4L2_CID_IMAGE_STABILIZATION</constant></entry>
3235 <entry>boolean</entry>
3236 </row>
3237 <row>
3238 <entry spanname="descr">Enables or disables image stabilization.
3239 <footnoteref linkend="ctypeconv"/></entry>
3240 </row>
3241 <row><entry></entry></row>
3242
3243 <row>
3244 <entry spanname="id"><constant>V4L2_CID_ISO_SENSITIVITY</constant>&nbsp;</entry>
3245 <entry>integer menu</entry>
3246 </row><row><entry spanname="descr">Determines ISO equivalent of an
3247image sensor indicating the sensor's sensitivity to light. The numbers are
3248expressed in arithmetic scale, as per <xref linkend="iso12232" /> standard,
3249where doubling the sensor sensitivity is represented by doubling the numerical
3250ISO value. Applications should interpret the values as standard ISO values
3251multiplied by 1000, e.g. control value 800 stands for ISO 0.8. Drivers will
3252usually support only a subset of standard ISO values. The effect of setting
3253this control while the <constant>V4L2_CID_ISO_SENSITIVITY_AUTO</constant>
3254control is set to a value other than <constant>V4L2_CID_ISO_SENSITIVITY_MANUAL
3255</constant> is undefined, drivers should ignore such requests.</entry>
3256 </row>
3257 <row><entry></entry></row>
3258
3259 <row id="v4l2-iso-sensitivity-auto-type">
3260 <entry spanname="id"><constant>V4L2_CID_ISO_SENSITIVITY_AUTO</constant>&nbsp;</entry>
3261 <entry>enum&nbsp;v4l2_iso_sensitivity_type</entry>
3262 </row><row><entry spanname="descr">Enables or disables automatic ISO
3263sensitivity adjustments.</entry>
3264 </row>
3265 <row>
3266 <entrytbl spanname="descr" cols="2">
3267 <tbody valign="top">
3268 <row>
3269 <entry><constant>V4L2_CID_ISO_SENSITIVITY_MANUAL</constant>&nbsp;</entry>
3270 <entry>Manual ISO sensitivity.</entry>
3271 </row>
3272 <row>
3273 <entry><constant>V4L2_CID_ISO_SENSITIVITY_AUTO</constant>&nbsp;</entry>
3274 <entry>Automatic ISO sensitivity adjustments.</entry>
3275 </row>
3276 </tbody>
3277 </entrytbl>
3278 </row>
3279 <row><entry></entry></row>
3280
3281 <row id="v4l2-scene-mode">
3282 <entry spanname="id"><constant>V4L2_CID_SCENE_MODE</constant>&nbsp;</entry>
3283 <entry>enum&nbsp;v4l2_scene_mode</entry>
3284 </row><row><entry spanname="descr">This control allows to select
3285scene programs as the camera automatic modes optimized for common shooting
3286scenes. Within these modes the camera determines best exposure, aperture,
3287focusing, light metering, white balance and equivalent sensitivity. The
3288controls of those parameters are influenced by the scene mode control.
3289An exact behavior in each mode is subject to the camera specification.
3290
3291<para>When the scene mode feature is not used, this control should be set to
3292<constant>V4L2_SCENE_MODE_NONE</constant> to make sure the other possibly
3293related controls are accessible. The following scene programs are defined:
3294</para>
3295</entry>
3296 </row>
3297 <row>
3298 <entrytbl spanname="descr" cols="2">
3299 <tbody valign="top">
3300 <row>
3301 <entry><constant>V4L2_SCENE_MODE_NONE</constant>&nbsp;</entry>
3302 <entry>The scene mode feature is disabled.</entry>
3303 </row>
3304 <row>
3305 <entry><constant>V4L2_SCENE_MODE_BACKLIGHT</constant>&nbsp;</entry>
3306 <entry>Backlight. Compensates for dark shadows when light is
3307 coming from behind a subject, also by automatically turning
3308 on the flash.</entry>
3309 </row>
3310 <row>
3311 <entry><constant>V4L2_SCENE_MODE_BEACH_SNOW</constant>&nbsp;</entry>
3312 <entry>Beach and snow. This mode compensates for all-white or
3313bright scenes, which tend to look gray and low contrast, when camera's automatic
3314exposure is based on an average scene brightness. To compensate, this mode
3315automatically slightly overexposes the frames. The white balance may also be
3316adjusted to compensate for the fact that reflected snow looks bluish rather
3317than white.</entry>
3318 </row>
3319 <row>
3320 <entry><constant>V4L2_SCENE_MODE_CANDLELIGHT</constant>&nbsp;</entry>
3321 <entry>Candle light. The camera generally raises the ISO
3322sensitivity and lowers the shutter speed. This mode compensates for relatively
3323close subject in the scene. The flash is disabled in order to preserve the
3324ambiance of the light.</entry>
3325 </row>
3326 <row>
3327 <entry><constant>V4L2_SCENE_MODE_DAWN_DUSK</constant>&nbsp;</entry>
3328 <entry>Dawn and dusk. Preserves the colors seen in low
3329natural light before dusk and after down. The camera may turn off the flash,
3330and automatically focus at infinity. It will usually boost saturation and
3331lower the shutter speed.</entry>
3332 </row>
3333 <row>
3334 <entry><constant>V4L2_SCENE_MODE_FALL_COLORS</constant>&nbsp;</entry>
3335 <entry>Fall colors. Increases saturation and adjusts white
3336balance for color enhancement. Pictures of autumn leaves get saturated reds
3337and yellows.</entry>
3338 </row>
3339 <row>
3340 <entry><constant>V4L2_SCENE_MODE_FIREWORKS</constant>&nbsp;</entry>
3341 <entry>Fireworks. Long exposure times are used to capture
3342the expanding burst of light from a firework. The camera may invoke image
3343stabilization.</entry>
3344 </row>
3345 <row>
3346 <entry><constant>V4L2_SCENE_MODE_LANDSCAPE</constant>&nbsp;</entry>
3347 <entry>Landscape. The camera may choose a small aperture to
3348provide deep depth of field and long exposure duration to help capture detail
3349in dim light conditions. The focus is fixed at infinity. Suitable for distant
3350and wide scenery.</entry>
3351 </row>
3352 <row>
3353 <entry><constant>V4L2_SCENE_MODE_NIGHT</constant>&nbsp;</entry>
3354 <entry>Night, also known as Night Landscape. Designed for low
3355light conditions, it preserves detail in the dark areas without blowing out bright
3356objects. The camera generally sets itself to a medium-to-high ISO sensitivity,
3357with a relatively long exposure time, and turns flash off. As such, there will be
3358increased image noise and the possibility of blurred image.</entry>
3359 </row>
3360 <row>
3361 <entry><constant>V4L2_SCENE_MODE_PARTY_INDOOR</constant>&nbsp;</entry>
3362 <entry>Party and indoor. Designed to capture indoor scenes
3363that are lit by indoor background lighting as well as the flash. The camera
3364usually increases ISO sensitivity, and adjusts exposure for the low light
3365conditions.</entry>
3366 </row>
3367 <row>
3368 <entry><constant>V4L2_SCENE_MODE_PORTRAIT</constant>&nbsp;</entry>
3369 <entry>Portrait. The camera adjusts the aperture so that the
3370depth of field is reduced, which helps to isolate the subject against a smooth
3371background. Most cameras recognize the presence of faces in the scene and focus
3372on them. The color hue is adjusted to enhance skin tones. The intensity of the
3373flash is often reduced.</entry>
3374 </row>
3375 <row>
3376 <entry><constant>V4L2_SCENE_MODE_SPORTS</constant>&nbsp;</entry>
3377 <entry>Sports. Significantly increases ISO and uses a fast
3378shutter speed to freeze motion of rapidly-moving subjects. Increased image
3379noise may be seen in this mode.</entry>
3380 </row>
3381 <row>
3382 <entry><constant>V4L2_SCENE_MODE_SUNSET</constant>&nbsp;</entry>
3383 <entry>Sunset. Preserves deep hues seen in sunsets and
3384sunrises. It bumps up the saturation.</entry>
3385 </row>
3386 <row>
3387 <entry><constant>V4L2_SCENE_MODE_TEXT</constant>&nbsp;</entry>
3388 <entry>Text. It applies extra contrast and sharpness, it is
3389typically a black-and-white mode optimized for readability. Automatic focus
3390may be switched to close-up mode and this setting may also involve some
3391lens-distortion correction.</entry>
3392 </row>
3393 </tbody>
3394 </entrytbl>
3395 </row>
3396 <row><entry></entry></row>
3397
3398 <row>
3399 <entry spanname="id"><constant>V4L2_CID_3A_LOCK</constant></entry>
3400 <entry>bitmask</entry>
3401 </row>
3402 <row>
3403 <entry spanname="descr">This control locks or unlocks the automatic
3404focus, exposure and white balance. The automatic adjustments can be paused
3405independently by setting the corresponding lock bit to 1. The camera then retains
3406the settings until the lock bit is cleared. The following lock bits are defined:
3407</entry>
3408 </row>
3409 <row>
3410 <entrytbl spanname="descr" cols="2">
3411 <tbody valign="top">
3412 <row>
3413 <entry><constant>V4L2_LOCK_EXPOSURE</constant></entry>
3414 <entry>Automatic exposure adjustments lock.</entry>
3415 </row>
3416 <row>
3417 <entry><constant>V4L2_LOCK_WHITE_BALANCE</constant></entry>
3418 <entry>Automatic white balance adjustments lock.</entry>
3419 </row>
3420 <row>
3421 <entry><constant>V4L2_LOCK_FOCUS</constant></entry>
3422 <entry>Automatic focus lock.</entry>
3423 </row>
3424 </tbody>
3425 </entrytbl>
3426 </row>
3427 <row><entry spanname="descr">
3428When a given algorithm is not enabled, drivers should ignore requests
3429to lock it and should return no error. An example might be an application
3430setting bit <constant>V4L2_LOCK_WHITE_BALANCE</constant> when the
3431<constant>V4L2_CID_AUTO_WHITE_BALANCE</constant> control is set to
3432<constant>FALSE</constant>. The value of this control may be changed
3433by exposure, white balance or focus controls.</entry>
3434 </row>
3435 <row><entry></entry></row>
3436
2935 </tbody> 3437 </tbody>
2936 </tgroup> 3438 </tgroup>
2937 </table> 3439 </table>
@@ -3476,7 +3978,7 @@ interface and may change in the future.</para>
3476 <entry spanname="id"><constant>V4L2_CID_JPEG_CHROMA_SUBSAMPLING</constant></entry> 3978 <entry spanname="id"><constant>V4L2_CID_JPEG_CHROMA_SUBSAMPLING</constant></entry>
3477 <entry>menu</entry> 3979 <entry>menu</entry>
3478 </row> 3980 </row>
3479 <row id="jpeg-chroma-subsampling-control"> 3981 <row id="v4l2-jpeg-chroma-subsampling">
3480 <entry spanname="descr">The chroma subsampling factors describe how 3982 <entry spanname="descr">The chroma subsampling factors describe how
3481 each component of an input image is sampled, in respect to maximum 3983 each component of an input image is sampled, in respect to maximum
3482 sample rate in each spatial dimension. See <xref linkend="itu-t81"/>, 3984 sample rate in each spatial dimension. See <xref linkend="itu-t81"/>,
@@ -3486,7 +3988,7 @@ interface and may change in the future.</para>
3486 from RGB to Y'CbCr color space. 3988 from RGB to Y'CbCr color space.
3487 </entry> 3989 </entry>
3488 </row> 3990 </row>
3489 <row> 3991 <row id = "v4l2-jpeg-chroma-subsampling">
3490 <entrytbl spanname="descr" cols="2"> 3992 <entrytbl spanname="descr" cols="2">
3491 <tbody valign="top"> 3993 <tbody valign="top">
3492 <row> 3994 <row>
@@ -3538,12 +4040,12 @@ interface and may change in the future.</para>
3538 </entry> 4040 </entry>
3539 </row> 4041 </row>
3540 <row id="jpeg-quality-control"> 4042 <row id="jpeg-quality-control">
3541 <entry spanname="id"><constant>V4L2_CID_JPEG_COMPRESION_QUALITY</constant></entry> 4043 <entry spanname="id"><constant>V4L2_CID_JPEG_COMPRESSION_QUALITY</constant></entry>
3542 <entry>integer</entry> 4044 <entry>integer</entry>
3543 </row> 4045 </row>
3544 <row> 4046 <row>
3545 <entry spanname="descr"> 4047 <entry spanname="descr">
3546 <constant>V4L2_CID_JPEG_COMPRESION_QUALITY</constant> control 4048 <constant>V4L2_CID_JPEG_COMPRESSION_QUALITY</constant> control
3547 determines trade-off between image quality and size. 4049 determines trade-off between image quality and size.
3548 It provides simpler method for applications to control image quality, 4050 It provides simpler method for applications to control image quality,
3549 without a need for direct reconfiguration of luminance and chrominance 4051 without a need for direct reconfiguration of luminance and chrominance
@@ -3551,7 +4053,7 @@ interface and may change in the future.</para>
3551 4053
3552 In cases where a driver uses quantization tables configured directly 4054 In cases where a driver uses quantization tables configured directly
3553 by an application, using interfaces defined elsewhere, <constant> 4055 by an application, using interfaces defined elsewhere, <constant>
3554 V4L2_CID_JPEG_COMPRESION_QUALITY</constant> control should be set 4056 V4L2_CID_JPEG_COMPRESSION_QUALITY</constant> control should be set
3555 by driver to 0. 4057 by driver to 0.
3556 4058
3557 <para>The value range of this control is driver-specific. Only 4059 <para>The value range of this control is driver-specific. Only
@@ -3599,4 +4101,172 @@ interface and may change in the future.</para>
3599 to <xref linkend="itu-t81"/>, <xref linkend="jfif"/>, 4101 to <xref linkend="itu-t81"/>, <xref linkend="jfif"/>,
3600 <xref linkend="w3c-jpeg-jfif"/>.</para> 4102 <xref linkend="w3c-jpeg-jfif"/>.</para>
3601 </section> 4103 </section>
4104
4105 <section id="image-source-controls">
4106 <title>Image Source Control Reference</title>
4107
4108 <note>
4109 <title>Experimental</title>
4110
4111 <para>This is an <link
4112 linkend="experimental">experimental</link> interface and may
4113 change in the future.</para>
4114 </note>
4115
4116 <para>
4117 The Image Source control class is intended for low-level
4118 control of image source devices such as image sensors. The
4119 devices feature an analogue to digital converter and a bus
4120 transmitter to transmit the image data out of the device.
4121 </para>
4122
4123 <table pgwide="1" frame="none" id="image-source-control-id">
4124 <title>Image Source Control IDs</title>
4125
4126 <tgroup cols="4">
4127 <colspec colname="c1" colwidth="1*" />
4128 <colspec colname="c2" colwidth="6*" />
4129 <colspec colname="c3" colwidth="2*" />
4130 <colspec colname="c4" colwidth="6*" />
4131 <spanspec namest="c1" nameend="c2" spanname="id" />
4132 <spanspec namest="c2" nameend="c4" spanname="descr" />
4133 <thead>
4134 <row>
4135 <entry spanname="id" align="left">ID</entry>
4136 <entry align="left">Type</entry>
4137 </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry>
4138 </row>
4139 </thead>
4140 <tbody valign="top">
4141 <row><entry></entry></row>
4142 <row>
4143 <entry spanname="id"><constant>V4L2_CID_IMAGE_SOURCE_CLASS</constant></entry>
4144 <entry>class</entry>
4145 </row>
4146 <row>
4147 <entry spanname="descr">The IMAGE_SOURCE class descriptor.</entry>
4148 </row>
4149 <row>
4150 <entry spanname="id"><constant>V4L2_CID_VBLANK</constant></entry>
4151 <entry>integer</entry>
4152 </row>
4153 <row>
4154 <entry spanname="descr">Vertical blanking. The idle period
4155 after every frame during which no image data is produced.
4156 The unit of vertical blanking is a line. Every line has
4157 length of the image width plus horizontal blanking at the
4158 pixel rate defined by
4159 <constant>V4L2_CID_PIXEL_RATE</constant> control in the
4160 same sub-device.</entry>
4161 </row>
4162 <row>
4163 <entry spanname="id"><constant>V4L2_CID_HBLANK</constant></entry>
4164 <entry>integer</entry>
4165 </row>
4166 <row>
4167 <entry spanname="descr">Horizontal blanking. The idle
4168 period after every line of image data during which no
4169 image data is produced. The unit of horizontal blanking is
4170 pixels.</entry>
4171 </row>
4172 <row>
4173 <entry spanname="id"><constant>V4L2_CID_ANALOGUE_GAIN</constant></entry>
4174 <entry>integer</entry>
4175 </row>
4176 <row>
4177 <entry spanname="descr">Analogue gain is gain affecting
4178 all colour components in the pixel matrix. The gain
4179 operation is performed in the analogue domain before A/D
4180 conversion.
4181 </entry>
4182 </row>
4183 <row><entry></entry></row>
4184 </tbody>
4185 </tgroup>
4186 </table>
4187
4188 </section>
4189
4190 <section id="image-process-controls">
4191 <title>Image Process Control Reference</title>
4192
4193 <note>
4194 <title>Experimental</title>
4195
4196 <para>This is an <link
4197 linkend="experimental">experimental</link> interface and may
4198 change in the future.</para>
4199 </note>
4200
4201 <para>
4202 The Image Source control class is intended for low-level control of
4203 image processing functions. Unlike
4204 <constant>V4L2_CID_IMAGE_SOURCE_CLASS</constant>, the controls in
4205 this class affect processing the image, and do not control capturing
4206 of it.
4207 </para>
4208
4209 <table pgwide="1" frame="none" id="image-process-control-id">
4210 <title>Image Source Control IDs</title>
4211
4212 <tgroup cols="4">
4213 <colspec colname="c1" colwidth="1*" />
4214 <colspec colname="c2" colwidth="6*" />
4215 <colspec colname="c3" colwidth="2*" />
4216 <colspec colname="c4" colwidth="6*" />
4217 <spanspec namest="c1" nameend="c2" spanname="id" />
4218 <spanspec namest="c2" nameend="c4" spanname="descr" />
4219 <thead>
4220 <row>
4221 <entry spanname="id" align="left">ID</entry>
4222 <entry align="left">Type</entry>
4223 </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry>
4224 </row>
4225 </thead>
4226 <tbody valign="top">
4227 <row><entry></entry></row>
4228 <row>
4229 <entry spanname="id"><constant>V4L2_CID_IMAGE_PROC_CLASS</constant></entry>
4230 <entry>class</entry>
4231 </row>
4232 <row>
4233 <entry spanname="descr">The IMAGE_PROC class descriptor.</entry>
4234 </row>
4235 <row>
4236 <entry spanname="id"><constant>V4L2_CID_LINK_FREQ</constant></entry>
4237 <entry>integer menu</entry>
4238 </row>
4239 <row>
4240 <entry spanname="descr">Data bus frequency. Together with the
4241 media bus pixel code, bus type (clock cycles per sample), the
4242 data bus frequency defines the pixel rate
4243 (<constant>V4L2_CID_PIXEL_RATE</constant>) in the
4244 pixel array (or possibly elsewhere, if the device is not an
4245 image sensor). The frame rate can be calculated from the pixel
4246 clock, image width and height and horizontal and vertical
4247 blanking. While the pixel rate control may be defined elsewhere
4248 than in the subdev containing the pixel array, the frame rate
4249 cannot be obtained from that information. This is because only
4250 on the pixel array it can be assumed that the vertical and
4251 horizontal blanking information is exact: no other blanking is
4252 allowed in the pixel array. The selection of frame rate is
4253 performed by selecting the desired horizontal and vertical
4254 blanking. The unit of this control is Hz. </entry>
4255 </row>
4256 <row>
4257 <entry spanname="id"><constant>V4L2_CID_PIXEL_RATE</constant></entry>
4258 <entry>64-bit integer</entry>
4259 </row>
4260 <row>
4261 <entry spanname="descr">Pixel rate in the source pads of
4262 the subdev. This control is read-only and its unit is
4263 pixels / second.
4264 </entry>
4265 </row>
4266 <row><entry></entry></row>
4267 </tbody>
4268 </tgroup>
4269 </table>
4270
4271 </section>
3602</section> 4272</section>
diff --git a/Documentation/DocBook/media/v4l/dev-subdev.xml b/Documentation/DocBook/media/v4l/dev-subdev.xml
index 0916a7343a16..4afcbbec5eda 100644
--- a/Documentation/DocBook/media/v4l/dev-subdev.xml
+++ b/Documentation/DocBook/media/v4l/dev-subdev.xml
@@ -76,11 +76,12 @@
76 <wordasword>format</wordasword> means the combination of media bus data 76 <wordasword>format</wordasword> means the combination of media bus data
77 format, frame width and frame height.</para></note> 77 format, frame width and frame height.</para></note>
78 78
79 <para>Image formats are typically negotiated on video capture and output 79 <para>Image formats are typically negotiated on video capture and
80 devices using the <link linkend="crop">cropping and scaling</link> ioctls. 80 output devices using the format and <link
81 The driver is responsible for configuring every block in the video pipeline 81 linkend="vidioc-subdev-g-selection">selection</link> ioctls. The
82 according to the requested format at the pipeline input and/or 82 driver is responsible for configuring every block in the video
83 output.</para> 83 pipeline according to the requested format at the pipeline input
84 and/or output.</para>
84 85
85 <para>For complex devices, such as often found in embedded systems, 86 <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 identical image sizes at the output of a pipeline can be achieved using
@@ -276,11 +277,11 @@
276 </section> 277 </section>
277 278
278 <section> 279 <section>
279 <title>Cropping and scaling</title> 280 <title>Selections: cropping, scaling and composition</title>
280 281
281 <para>Many sub-devices support cropping frames on their input or output 282 <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 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 interest in an image, typically on an image sensor or a video decoder. It can
284 also be used as part of digital zoom implementations to select the area of 285 also be used as part of digital zoom implementations to select the area of
285 the image that will be scaled up.</para> 286 the image that will be scaled up.</para>
286 287
@@ -288,26 +289,179 @@
288 &v4l2-rect; by the coordinates of the top left corner and the rectangle 289 &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 size. Both the coordinates and sizes are expressed in pixels.</para>
290 291
291 <para>The crop rectangle is retrieved and set using the 292 <para>As for pad formats, drivers store try and active
292 &VIDIOC-SUBDEV-G-CROP; and &VIDIOC-SUBDEV-S-CROP; ioctls. Like for pad 293 rectangles for the selection targets of ACTUAL type <xref
293 formats, drivers store try and active crop rectangles. The format 294 linkend="v4l2-subdev-selection-targets">.</xref></para>
294 negotiation mechanism applies to crop settings as well.</para> 295
295 296 <para>On sink pads, cropping is applied relative to the
296 <para>On input pads, cropping is applied relatively to the current pad 297 current pad format. The pad format represents the image size as
297 format. The pad format represents the image size as received by the 298 received by the sub-device from the previous block in the
298 sub-device from the previous block in the pipeline, and the crop rectangle 299 pipeline, and the crop rectangle represents the sub-image that
299 represents the sub-image that will be transmitted further inside the 300 will be transmitted further inside the sub-device for
300 sub-device for processing. The crop rectangle be entirely containted 301 processing.</para>
301 inside the input image size.</para> 302
302 303 <para>The scaling operation changes the size of the image by
303 <para>Input crop rectangle are reset to their default value when the input 304 scaling it to new dimensions. The scaling ratio isn't specified
304 image format is modified. Drivers should use the input image size as the 305 explicitly, but is implied from the original and scaled image
305 crop rectangle default value, but hardware requirements may prevent this. 306 sizes. Both sizes are represented by &v4l2-rect;.</para>
306 </para> 307
308 <para>Scaling support is optional. When supported by a subdev,
309 the crop rectangle on the subdev's sink pad is scaled to the
310 size configured using the &VIDIOC-SUBDEV-S-SELECTION; IOCTL
311 using <constant>V4L2_SUBDEV_SEL_COMPOSE_ACTUAL</constant>
312 selection target on the same pad. If the subdev supports scaling
313 but not composing, the top and left values are not used and must
314 always be set to zero.</para>
315
316 <para>On source pads, cropping is similar to sink pads, with the
317 exception that the source size from which the cropping is
318 performed, is the COMPOSE rectangle on the sink pad. In both
319 sink and source pads, the crop rectangle must be entirely
320 contained inside the source image size for the crop
321 operation.</para>
322
323 <para>The drivers should always use the closest possible
324 rectangle the user requests on all selection targets, unless
325 specifically told otherwise.
326 <constant>V4L2_SUBDEV_SEL_FLAG_SIZE_GE</constant> and
327 <constant>V4L2_SUBDEV_SEL_FLAG_SIZE_LE</constant> flags may be
328 used to round the image size either up or down. <xref
329 linkend="v4l2-subdev-selection-flags"></xref></para>
330 </section>
331
332 <section>
333 <title>Types of selection targets</title>
334
335 <section>
336 <title>ACTUAL targets</title>
337
338 <para>ACTUAL targets reflect the actual hardware configuration
339 at any point of time. There is a BOUNDS target
340 corresponding to every ACTUAL.</para>
341 </section>
342
343 <section>
344 <title>BOUNDS targets</title>
345
346 <para>BOUNDS targets is the smallest rectangle that contains
347 all valid ACTUAL rectangles. It may not be possible to set the
348 ACTUAL rectangle as large as the BOUNDS rectangle, however.
349 This may be because e.g. a sensor's pixel array is not
350 rectangular but cross-shaped or round. The maximum size may
351 also be smaller than the BOUNDS rectangle.</para>
352 </section>
307 353
308 <para>Cropping behaviour on output pads is not defined.</para> 354 </section>
355
356 <section>
357 <title>Order of configuration and format propagation</title>
358
359 <para>Inside subdevs, the order of image processing steps will
360 always be from the sink pad towards the source pad. This is also
361 reflected in the order in which the configuration must be
362 performed by the user: the changes made will be propagated to
363 any subsequent stages. If this behaviour is not desired, the
364 user must set
365 <constant>V4L2_SUBDEV_SEL_FLAG_KEEP_CONFIG</constant> flag. This
366 flag causes no propagation of the changes are allowed in any
367 circumstances. This may also cause the accessed rectangle to be
368 adjusted by the driver, depending on the properties of the
369 underlying hardware.</para>
370
371 <para>The coordinates to a step always refer to the actual size
372 of the previous step. The exception to this rule is the source
373 compose rectangle, which refers to the sink compose bounds
374 rectangle --- if it is supported by the hardware.</para>
375
376 <orderedlist>
377 <listitem>Sink pad format. The user configures the sink pad
378 format. This format defines the parameters of the image the
379 entity receives through the pad for further processing.</listitem>
380
381 <listitem>Sink pad actual crop selection. The sink pad crop
382 defines the crop performed to the sink pad format.</listitem>
383
384 <listitem>Sink pad actual compose selection. The size of the
385 sink pad compose rectangle defines the scaling ratio compared
386 to the size of the sink pad crop rectangle. The location of
387 the compose rectangle specifies the location of the actual
388 sink compose rectangle in the sink compose bounds
389 rectangle.</listitem>
390
391 <listitem>Source pad actual crop selection. Crop on the source
392 pad defines crop performed to the image in the sink compose
393 bounds rectangle.</listitem>
394
395 <listitem>Source pad format. The source pad format defines the
396 output pixel format of the subdev, as well as the other
397 parameters with the exception of the image width and height.
398 Width and height are defined by the size of the source pad
399 actual crop selection.</listitem>
400 </orderedlist>
401
402 <para>Accessing any of the above rectangles not supported by the
403 subdev will return <constant>EINVAL</constant>. Any rectangle
404 referring to a previous unsupported rectangle coordinates will
405 instead refer to the previous supported rectangle. For example,
406 if sink crop is not supported, the compose selection will refer
407 to the sink pad format dimensions instead.</para>
408
409 <figure id="subdev-image-processing-crop">
410 <title>Image processing in subdevs: simple crop example</title>
411 <mediaobject>
412 <imageobject>
413 <imagedata fileref="subdev-image-processing-crop.svg"
414 format="SVG" scale="200" />
415 </imageobject>
416 </mediaobject>
417 </figure>
418
419 <para>In the above example, the subdev supports cropping on its
420 sink pad. To configure it, the user sets the media bus format on
421 the subdev's sink pad. Now the actual crop rectangle can be set
422 on the sink pad --- the location and size of this rectangle
423 reflect the location and size of a rectangle to be cropped from
424 the sink format. The size of the sink crop rectangle will also
425 be the size of the format of the subdev's source pad.</para>
426
427 <figure id="subdev-image-processing-scaling-multi-source">
428 <title>Image processing in subdevs: scaling with multiple sources</title>
429 <mediaobject>
430 <imageobject>
431 <imagedata fileref="subdev-image-processing-scaling-multi-source.svg"
432 format="SVG" scale="200" />
433 </imageobject>
434 </mediaobject>
435 </figure>
436
437 <para>In this example, the subdev is capable of first cropping,
438 then scaling and finally cropping for two source pads
439 individually from the resulting scaled image. The location of
440 the scaled image in the cropped image is ignored in sink compose
441 target. Both of the locations of the source crop rectangles
442 refer to the sink scaling rectangle, independently cropping an
443 area at location specified by the source crop rectangle from
444 it.</para>
445
446 <figure id="subdev-image-processing-full">
447 <title>Image processing in subdevs: scaling and composition
448 with multiple sinks and sources</title>
449 <mediaobject>
450 <imageobject>
451 <imagedata fileref="subdev-image-processing-full.svg"
452 format="SVG" scale="200" />
453 </imageobject>
454 </mediaobject>
455 </figure>
456
457 <para>The subdev driver supports two sink pads and two source
458 pads. The images from both of the sink pads are individually
459 cropped, then scaled and further composed on the composition
460 bounds rectangle. From that, two independent streams are cropped
461 and sent out of the subdev from the source pads.</para>
309 462
310 </section> 463 </section>
464
311 </section> 465 </section>
312 466
313 &sub-subdev-formats; 467 &sub-subdev-formats;
diff --git a/Documentation/DocBook/media/v4l/io.xml b/Documentation/DocBook/media/v4l/io.xml
index b815929b5bba..fd6aca2922b6 100644
--- a/Documentation/DocBook/media/v4l/io.xml
+++ b/Documentation/DocBook/media/v4l/io.xml
@@ -543,12 +543,13 @@ and can range from zero to the number of buffers allocated
543with the &VIDIOC-REQBUFS; ioctl (&v4l2-requestbuffers; <structfield>count</structfield>) minus one.</entry> 543with the &VIDIOC-REQBUFS; ioctl (&v4l2-requestbuffers; <structfield>count</structfield>) minus one.</entry>
544 </row> 544 </row>
545 <row> 545 <row>
546 <entry>&v4l2-buf-type;</entry> 546 <entry>__u32</entry>
547 <entry><structfield>type</structfield></entry> 547 <entry><structfield>type</structfield></entry>
548 <entry></entry> 548 <entry></entry>
549 <entry>Type of the buffer, same as &v4l2-format; 549 <entry>Type of the buffer, same as &v4l2-format;
550<structfield>type</structfield> or &v4l2-requestbuffers; 550<structfield>type</structfield> or &v4l2-requestbuffers;
551<structfield>type</structfield>, set by the application.</entry> 551<structfield>type</structfield>, set by the application. See <xref
552linkend="v4l2-buf-type" /></entry>
552 </row> 553 </row>
553 <row> 554 <row>
554 <entry>__u32</entry> 555 <entry>__u32</entry>
@@ -568,7 +569,7 @@ refers to an input stream, applications when an output stream.</entry>
568linkend="buffer-flags" />.</entry> 569linkend="buffer-flags" />.</entry>
569 </row> 570 </row>
570 <row> 571 <row>
571 <entry>&v4l2-field;</entry> 572 <entry>__u32</entry>
572 <entry><structfield>field</structfield></entry> 573 <entry><structfield>field</structfield></entry>
573 <entry></entry> 574 <entry></entry>
574 <entry>Indicates the field order of the image in the 575 <entry>Indicates the field order of the image in the
@@ -630,11 +631,12 @@ bandwidth. These devices identify by not enumerating any video
630standards, see <xref linkend="standard" />.</para></entry> 631standards, see <xref linkend="standard" />.</para></entry>
631 </row> 632 </row>
632 <row> 633 <row>
633 <entry>&v4l2-memory;</entry> 634 <entry>__u32</entry>
634 <entry><structfield>memory</structfield></entry> 635 <entry><structfield>memory</structfield></entry>
635 <entry></entry> 636 <entry></entry>
636 <entry>This field must be set by applications and/or drivers 637 <entry>This field must be set by applications and/or drivers
637in accordance with the selected I/O method.</entry> 638in accordance with the selected I/O method. See <xref linkend="v4l2-memory"
639 /></entry>
638 </row> 640 </row>
639 <row> 641 <row>
640 <entry>union</entry> 642 <entry>union</entry>
diff --git a/Documentation/DocBook/media/v4l/pixfmt-srggb10.xml b/Documentation/DocBook/media/v4l/pixfmt-srggb10.xml
index 7b274092e60c..c1c62a9acc2a 100644
--- a/Documentation/DocBook/media/v4l/pixfmt-srggb10.xml
+++ b/Documentation/DocBook/media/v4l/pixfmt-srggb10.xml
@@ -1,4 +1,4 @@
1 <refentry> 1 <refentry id="pixfmt-srggb10">
2 <refmeta> 2 <refmeta>
3 <refentrytitle>V4L2_PIX_FMT_SRGGB10 ('RG10'), 3 <refentrytitle>V4L2_PIX_FMT_SRGGB10 ('RG10'),
4 V4L2_PIX_FMT_SGRBG10 ('BA10'), 4 V4L2_PIX_FMT_SGRBG10 ('BA10'),
diff --git a/Documentation/DocBook/media/v4l/pixfmt-srggb10dpcm8.xml b/Documentation/DocBook/media/v4l/pixfmt-srggb10dpcm8.xml
new file mode 100644
index 000000000000..8eace3e2e7d4
--- /dev/null
+++ b/Documentation/DocBook/media/v4l/pixfmt-srggb10dpcm8.xml
@@ -0,0 +1,29 @@
1 <refentry id="pixfmt-srggb10dpcm8">
2 <refmeta>
3 <refentrytitle>
4 V4L2_PIX_FMT_SBGGR10DPCM8 ('bBA8'),
5 V4L2_PIX_FMT_SGBRG10DPCM8 ('bGA8'),
6 V4L2_PIX_FMT_SGRBG10DPCM8 ('BD10'),
7 V4L2_PIX_FMT_SRGGB10DPCM8 ('bRA8'),
8 </refentrytitle>
9 &manvol;
10 </refmeta>
11 <refnamediv>
12 <refname id="V4L2-PIX-FMT-SBGGR10DPCM8"><constant>V4L2_PIX_FMT_SBGGR10DPCM8</constant></refname>
13 <refname id="V4L2-PIX-FMT-SGBRG10DPCM8"><constant>V4L2_PIX_FMT_SGBRG10DPCM8</constant></refname>
14 <refname id="V4L2-PIX-FMT-SGRBG10DPCM8"><constant>V4L2_PIX_FMT_SGRBG10DPCM8</constant></refname>
15 <refname id="V4L2-PIX-FMT-SRGGB10DPCM8"><constant>V4L2_PIX_FMT_SRGGB10DPCM8</constant></refname>
16 <refpurpose>10-bit Bayer formats compressed to 8 bits</refpurpose>
17 </refnamediv>
18 <refsect1>
19 <title>Description</title>
20
21 <para>The following four pixel formats are raw sRGB / Bayer formats
22 with 10 bits per colour compressed to 8 bits each, using DPCM
23 compression. DPCM, differential pulse-code modulation, is lossy.
24 Each colour component consumes 8 bits of memory. In other respects
25 this format is similar to <xref
26 linkend="pixfmt-srggb10">.</xref></para>
27
28 </refsect1>
29 </refentry>
diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml b/Documentation/DocBook/media/v4l/pixfmt.xml
index 31eaae2469f9..f5ac15ed0549 100644
--- a/Documentation/DocBook/media/v4l/pixfmt.xml
+++ b/Documentation/DocBook/media/v4l/pixfmt.xml
@@ -673,6 +673,7 @@ access the palette, this must be done with ioctls of the Linux framebuffer API.<
673 &sub-srggb8; 673 &sub-srggb8;
674 &sub-sbggr16; 674 &sub-sbggr16;
675 &sub-srggb10; 675 &sub-srggb10;
676 &sub-srggb10dpcm8;
676 &sub-srggb12; 677 &sub-srggb12;
677 </section> 678 </section>
678 679
@@ -876,11 +877,6 @@ kernel sources in the file <filename>Documentation/video4linux/cx2341x/README.hm
876 <entry>'S561'</entry> 877 <entry>'S561'</entry>
877 <entry>Compressed GBRG Bayer format used by the gspca driver.</entry> 878 <entry>Compressed GBRG Bayer format used by the gspca driver.</entry>
878 </row> 879 </row>
879 <row id="V4L2-PIX-FMT-SGRBG10DPCM8">
880 <entry><constant>V4L2_PIX_FMT_SGRBG10DPCM8</constant></entry>
881 <entry>'DB10'</entry>
882 <entry>10 bit raw Bayer DPCM compressed to 8 bits.</entry>
883 </row>
884 <row id="V4L2-PIX-FMT-PAC207"> 880 <row id="V4L2-PIX-FMT-PAC207">
885 <entry><constant>V4L2_PIX_FMT_PAC207</constant></entry> 881 <entry><constant>V4L2_PIX_FMT_PAC207</constant></entry>
886 <entry>'P207'</entry> 882 <entry>'P207'</entry>
diff --git a/Documentation/DocBook/media/v4l/subdev-image-processing-crop.dia b/Documentation/DocBook/media/v4l/subdev-image-processing-crop.dia
new file mode 100644
index 000000000000..e32ba5362e1d
--- /dev/null
+++ b/Documentation/DocBook/media/v4l/subdev-image-processing-crop.dia
@@ -0,0 +1,614 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
3 <dia:diagramdata>
4 <dia:attribute name="background">
5 <dia:color val="#ffffff"/>
6 </dia:attribute>
7 <dia:attribute name="pagebreak">
8 <dia:color val="#000099"/>
9 </dia:attribute>
10 <dia:attribute name="paper">
11 <dia:composite type="paper">
12 <dia:attribute name="name">
13 <dia:string>#A4#</dia:string>
14 </dia:attribute>
15 <dia:attribute name="tmargin">
16 <dia:real val="2.8222000598907471"/>
17 </dia:attribute>
18 <dia:attribute name="bmargin">
19 <dia:real val="2.8222000598907471"/>
20 </dia:attribute>
21 <dia:attribute name="lmargin">
22 <dia:real val="2.8222000598907471"/>
23 </dia:attribute>
24 <dia:attribute name="rmargin">
25 <dia:real val="2.8222000598907471"/>
26 </dia:attribute>
27 <dia:attribute name="is_portrait">
28 <dia:boolean val="false"/>
29 </dia:attribute>
30 <dia:attribute name="scaling">
31 <dia:real val="0.49000000953674316"/>
32 </dia:attribute>
33 <dia:attribute name="fitto">
34 <dia:boolean val="false"/>
35 </dia:attribute>
36 </dia:composite>
37 </dia:attribute>
38 <dia:attribute name="grid">
39 <dia:composite type="grid">
40 <dia:attribute name="width_x">
41 <dia:real val="1"/>
42 </dia:attribute>
43 <dia:attribute name="width_y">
44 <dia:real val="1"/>
45 </dia:attribute>
46 <dia:attribute name="visible_x">
47 <dia:int val="1"/>
48 </dia:attribute>
49 <dia:attribute name="visible_y">
50 <dia:int val="1"/>
51 </dia:attribute>
52 <dia:composite type="color"/>
53 </dia:composite>
54 </dia:attribute>
55 <dia:attribute name="color">
56 <dia:color val="#d8e5e5"/>
57 </dia:attribute>
58 <dia:attribute name="guides">
59 <dia:composite type="guides">
60 <dia:attribute name="hguides"/>
61 <dia:attribute name="vguides"/>
62 </dia:composite>
63 </dia:attribute>
64 </dia:diagramdata>
65 <dia:layer name="Background" visible="true" active="true">
66 <dia:object type="Standard - Box" version="0" id="O0">
67 <dia:attribute name="obj_pos">
68 <dia:point val="-0.4,6.5"/>
69 </dia:attribute>
70 <dia:attribute name="obj_bb">
71 <dia:rectangle val="-0.45,6.45;23.1387,16.2"/>
72 </dia:attribute>
73 <dia:attribute name="elem_corner">
74 <dia:point val="-0.4,6.5"/>
75 </dia:attribute>
76 <dia:attribute name="elem_width">
77 <dia:real val="23.48871579904775"/>
78 </dia:attribute>
79 <dia:attribute name="elem_height">
80 <dia:real val="9.6500000000000004"/>
81 </dia:attribute>
82 <dia:attribute name="border_width">
83 <dia:real val="0.10000000149011612"/>
84 </dia:attribute>
85 <dia:attribute name="show_background">
86 <dia:boolean val="false"/>
87 </dia:attribute>
88 </dia:object>
89 <dia:object type="Standard - Box" version="0" id="O1">
90 <dia:attribute name="obj_pos">
91 <dia:point val="0.225,9.45"/>
92 </dia:attribute>
93 <dia:attribute name="obj_bb">
94 <dia:rectangle val="0.175,9.4;8.225,14.7"/>
95 </dia:attribute>
96 <dia:attribute name="elem_corner">
97 <dia:point val="0.225,9.45"/>
98 </dia:attribute>
99 <dia:attribute name="elem_width">
100 <dia:real val="7.9499999999999975"/>
101 </dia:attribute>
102 <dia:attribute name="elem_height">
103 <dia:real val="5.1999999999999975"/>
104 </dia:attribute>
105 <dia:attribute name="border_width">
106 <dia:real val="0.10000000149011612"/>
107 </dia:attribute>
108 <dia:attribute name="border_color">
109 <dia:color val="#a52a2a"/>
110 </dia:attribute>
111 <dia:attribute name="show_background">
112 <dia:boolean val="true"/>
113 </dia:attribute>
114 </dia:object>
115 <dia:object type="Standard - Box" version="0" id="O2">
116 <dia:attribute name="obj_pos">
117 <dia:point val="3.175,10.55"/>
118 </dia:attribute>
119 <dia:attribute name="obj_bb">
120 <dia:rectangle val="3.125,10.5;7.925,14.45"/>
121 </dia:attribute>
122 <dia:attribute name="elem_corner">
123 <dia:point val="3.175,10.55"/>
124 </dia:attribute>
125 <dia:attribute name="elem_width">
126 <dia:real val="4.6999999999999975"/>
127 </dia:attribute>
128 <dia:attribute name="elem_height">
129 <dia:real val="3.8499999999999979"/>
130 </dia:attribute>
131 <dia:attribute name="border_width">
132 <dia:real val="0.10000000149011612"/>
133 </dia:attribute>
134 <dia:attribute name="border_color">
135 <dia:color val="#0000ff"/>
136 </dia:attribute>
137 <dia:attribute name="show_background">
138 <dia:boolean val="true"/>
139 </dia:attribute>
140 </dia:object>
141 <dia:object type="Standard - Text" version="1" id="O3">
142 <dia:attribute name="obj_pos">
143 <dia:point val="3.725,11.3875"/>
144 </dia:attribute>
145 <dia:attribute name="obj_bb">
146 <dia:rectangle val="3.725,10.7925;6.6025,13.14"/>
147 </dia:attribute>
148 <dia:attribute name="text">
149 <dia:composite type="text">
150 <dia:attribute name="string">
151 <dia:string>#sink
152crop
153selection#</dia:string>
154 </dia:attribute>
155 <dia:attribute name="font">
156 <dia:font family="sans" style="0" name="Helvetica"/>
157 </dia:attribute>
158 <dia:attribute name="height">
159 <dia:real val="0.80000000000000004"/>
160 </dia:attribute>
161 <dia:attribute name="pos">
162 <dia:point val="3.725,11.3875"/>
163 </dia:attribute>
164 <dia:attribute name="color">
165 <dia:color val="#0000ff"/>
166 </dia:attribute>
167 <dia:attribute name="alignment">
168 <dia:enum val="0"/>
169 </dia:attribute>
170 </dia:composite>
171 </dia:attribute>
172 <dia:attribute name="valign">
173 <dia:enum val="3"/>
174 </dia:attribute>
175 </dia:object>
176 <dia:object type="Standard - Text" version="1" id="O4">
177 <dia:attribute name="obj_pos">
178 <dia:point val="1.475,7.9"/>
179 </dia:attribute>
180 <dia:attribute name="obj_bb">
181 <dia:rectangle val="1.475,7.305;1.475,8.0525"/>
182 </dia:attribute>
183 <dia:attribute name="text">
184 <dia:composite type="text">
185 <dia:attribute name="string">
186 <dia:string>##</dia:string>
187 </dia:attribute>
188 <dia:attribute name="font">
189 <dia:font family="sans" style="0" name="Helvetica"/>
190 </dia:attribute>
191 <dia:attribute name="height">
192 <dia:real val="0.80000000000000004"/>
193 </dia:attribute>
194 <dia:attribute name="pos">
195 <dia:point val="1.475,7.9"/>
196 </dia:attribute>
197 <dia:attribute name="color">
198 <dia:color val="#000000"/>
199 </dia:attribute>
200 <dia:attribute name="alignment">
201 <dia:enum val="0"/>
202 </dia:attribute>
203 </dia:composite>
204 </dia:attribute>
205 <dia:attribute name="valign">
206 <dia:enum val="3"/>
207 </dia:attribute>
208 </dia:object>
209 <dia:object type="Standard - Text" version="1" id="O5">
210 <dia:attribute name="obj_pos">
211 <dia:point val="0.426918,7.89569"/>
212 </dia:attribute>
213 <dia:attribute name="obj_bb">
214 <dia:rectangle val="0.426918,7.30069;3.90942,8.84819"/>
215 </dia:attribute>
216 <dia:attribute name="text">
217 <dia:composite type="text">
218 <dia:attribute name="string">
219 <dia:string>#sink media
220bus format#</dia:string>
221 </dia:attribute>
222 <dia:attribute name="font">
223 <dia:font family="sans" style="0" name="Helvetica"/>
224 </dia:attribute>
225 <dia:attribute name="height">
226 <dia:real val="0.80000000000000004"/>
227 </dia:attribute>
228 <dia:attribute name="pos">
229 <dia:point val="0.426918,7.89569"/>
230 </dia:attribute>
231 <dia:attribute name="color">
232 <dia:color val="#a52a2a"/>
233 </dia:attribute>
234 <dia:attribute name="alignment">
235 <dia:enum val="0"/>
236 </dia:attribute>
237 </dia:composite>
238 </dia:attribute>
239 <dia:attribute name="valign">
240 <dia:enum val="3"/>
241 </dia:attribute>
242 </dia:object>
243 <dia:object type="Standard - Text" version="1" id="O6">
244 <dia:attribute name="obj_pos">
245 <dia:point val="17.4887,7.75"/>
246 </dia:attribute>
247 <dia:attribute name="obj_bb">
248 <dia:rectangle val="17.4887,7.155;21.8112,8.7025"/>
249 </dia:attribute>
250 <dia:attribute name="text">
251 <dia:composite type="text">
252 <dia:attribute name="string">
253 <dia:string>#source media
254bus format#</dia:string>
255 </dia:attribute>
256 <dia:attribute name="font">
257 <dia:font family="sans" style="0" name="Helvetica"/>
258 </dia:attribute>
259 <dia:attribute name="height">
260 <dia:real val="0.80000000000000004"/>
261 </dia:attribute>
262 <dia:attribute name="pos">
263 <dia:point val="17.4887,7.75"/>
264 </dia:attribute>
265 <dia:attribute name="color">
266 <dia:color val="#8b6914"/>
267 </dia:attribute>
268 <dia:attribute name="alignment">
269 <dia:enum val="0"/>
270 </dia:attribute>
271 </dia:composite>
272 </dia:attribute>
273 <dia:attribute name="valign">
274 <dia:enum val="3"/>
275 </dia:attribute>
276 </dia:object>
277 <dia:object type="Standard - Box" version="0" id="O7">
278 <dia:attribute name="obj_pos">
279 <dia:point val="17.5244,9.5417"/>
280 </dia:attribute>
281 <dia:attribute name="obj_bb">
282 <dia:rectangle val="17.4744,9.4917;22.2387,13.35"/>
283 </dia:attribute>
284 <dia:attribute name="elem_corner">
285 <dia:point val="17.5244,9.5417"/>
286 </dia:attribute>
287 <dia:attribute name="elem_width">
288 <dia:real val="4.6643157990477508"/>
289 </dia:attribute>
290 <dia:attribute name="elem_height">
291 <dia:real val="3.758300000000002"/>
292 </dia:attribute>
293 <dia:attribute name="border_width">
294 <dia:real val="0.10000000149011612"/>
295 </dia:attribute>
296 <dia:attribute name="border_color">
297 <dia:color val="#8b6914"/>
298 </dia:attribute>
299 <dia:attribute name="show_background">
300 <dia:boolean val="true"/>
301 </dia:attribute>
302 </dia:object>
303 <dia:object type="Standard - Line" version="0" id="O8">
304 <dia:attribute name="obj_pos">
305 <dia:point val="17.5244,13.3"/>
306 </dia:attribute>
307 <dia:attribute name="obj_bb">
308 <dia:rectangle val="3.12132,13.2463;17.5781,14.4537"/>
309 </dia:attribute>
310 <dia:attribute name="conn_endpoints">
311 <dia:point val="17.5244,13.3"/>
312 <dia:point val="3.175,14.4"/>
313 </dia:attribute>
314 <dia:attribute name="numcp">
315 <dia:int val="1"/>
316 </dia:attribute>
317 <dia:attribute name="line_color">
318 <dia:color val="#e60505"/>
319 </dia:attribute>
320 <dia:attribute name="line_style">
321 <dia:enum val="4"/>
322 </dia:attribute>
323 <dia:connections>
324 <dia:connection handle="0" to="O7" connection="5"/>
325 <dia:connection handle="1" to="O2" connection="5"/>
326 </dia:connections>
327 </dia:object>
328 <dia:object type="Standard - Line" version="0" id="O9">
329 <dia:attribute name="obj_pos">
330 <dia:point val="17.5244,9.5417"/>
331 </dia:attribute>
332 <dia:attribute name="obj_bb">
333 <dia:rectangle val="3.12162,9.48832;17.5778,10.6034"/>
334 </dia:attribute>
335 <dia:attribute name="conn_endpoints">
336 <dia:point val="17.5244,9.5417"/>
337 <dia:point val="3.175,10.55"/>
338 </dia:attribute>
339 <dia:attribute name="numcp">
340 <dia:int val="1"/>
341 </dia:attribute>
342 <dia:attribute name="line_color">
343 <dia:color val="#e60505"/>
344 </dia:attribute>
345 <dia:attribute name="line_style">
346 <dia:enum val="4"/>
347 </dia:attribute>
348 <dia:connections>
349 <dia:connection handle="0" to="O7" connection="0"/>
350 <dia:connection handle="1" to="O2" connection="0"/>
351 </dia:connections>
352 </dia:object>
353 <dia:object type="Standard - Line" version="0" id="O10">
354 <dia:attribute name="obj_pos">
355 <dia:point val="22.1887,13.3"/>
356 </dia:attribute>
357 <dia:attribute name="obj_bb">
358 <dia:rectangle val="7.82132,13.2463;22.2424,14.4537"/>
359 </dia:attribute>
360 <dia:attribute name="conn_endpoints">
361 <dia:point val="22.1887,13.3"/>
362 <dia:point val="7.875,14.4"/>
363 </dia:attribute>
364 <dia:attribute name="numcp">
365 <dia:int val="1"/>
366 </dia:attribute>
367 <dia:attribute name="line_color">
368 <dia:color val="#e60505"/>
369 </dia:attribute>
370 <dia:attribute name="line_style">
371 <dia:enum val="4"/>
372 </dia:attribute>
373 <dia:connections>
374 <dia:connection handle="0" to="O7" connection="7"/>
375 <dia:connection handle="1" to="O2" connection="7"/>
376 </dia:connections>
377 </dia:object>
378 <dia:object type="Standard - Line" version="0" id="O11">
379 <dia:attribute name="obj_pos">
380 <dia:point val="22.1887,9.5417"/>
381 </dia:attribute>
382 <dia:attribute name="obj_bb">
383 <dia:rectangle val="7.82161,9.48831;22.2421,10.6034"/>
384 </dia:attribute>
385 <dia:attribute name="conn_endpoints">
386 <dia:point val="22.1887,9.5417"/>
387 <dia:point val="7.875,10.55"/>
388 </dia:attribute>
389 <dia:attribute name="numcp">
390 <dia:int val="1"/>
391 </dia:attribute>
392 <dia:attribute name="line_color">
393 <dia:color val="#e60505"/>
394 </dia:attribute>
395 <dia:attribute name="line_style">
396 <dia:enum val="4"/>
397 </dia:attribute>
398 <dia:connections>
399 <dia:connection handle="0" to="O7" connection="2"/>
400 <dia:connection handle="1" to="O2" connection="2"/>
401 </dia:connections>
402 </dia:object>
403 <dia:object type="Geometric - Perfect Circle" version="1" id="O12">
404 <dia:attribute name="obj_pos">
405 <dia:point val="23.23,10.5742"/>
406 </dia:attribute>
407 <dia:attribute name="obj_bb">
408 <dia:rectangle val="23.18,10.5242;24.13,11.4742"/>
409 </dia:attribute>
410 <dia:attribute name="meta">
411 <dia:composite type="dict"/>
412 </dia:attribute>
413 <dia:attribute name="elem_corner">
414 <dia:point val="23.23,10.5742"/>
415 </dia:attribute>
416 <dia:attribute name="elem_width">
417 <dia:real val="0.84999999999999787"/>
418 </dia:attribute>
419 <dia:attribute name="elem_height">
420 <dia:real val="0.84999999999999787"/>
421 </dia:attribute>
422 <dia:attribute name="line_width">
423 <dia:real val="0.10000000000000001"/>
424 </dia:attribute>
425 <dia:attribute name="line_colour">
426 <dia:color val="#000000"/>
427 </dia:attribute>
428 <dia:attribute name="fill_colour">
429 <dia:color val="#ffffff"/>
430 </dia:attribute>
431 <dia:attribute name="show_background">
432 <dia:boolean val="true"/>
433 </dia:attribute>
434 <dia:attribute name="line_style">
435 <dia:enum val="0"/>
436 <dia:real val="1"/>
437 </dia:attribute>
438 <dia:attribute name="flip_horizontal">
439 <dia:boolean val="false"/>
440 </dia:attribute>
441 <dia:attribute name="flip_vertical">
442 <dia:boolean val="false"/>
443 </dia:attribute>
444 <dia:attribute name="subscale">
445 <dia:real val="1"/>
446 </dia:attribute>
447 </dia:object>
448 <dia:object type="Standard - Line" version="0" id="O13">
449 <dia:attribute name="obj_pos">
450 <dia:point val="24.08,10.9992"/>
451 </dia:attribute>
452 <dia:attribute name="obj_bb">
453 <dia:rectangle val="24.03,10.6388;32.4953,11.3624"/>
454 </dia:attribute>
455 <dia:attribute name="conn_endpoints">
456 <dia:point val="24.08,10.9992"/>
457 <dia:point val="32.3835,11.0007"/>
458 </dia:attribute>
459 <dia:attribute name="numcp">
460 <dia:int val="1"/>
461 </dia:attribute>
462 <dia:attribute name="end_arrow">
463 <dia:enum val="22"/>
464 </dia:attribute>
465 <dia:attribute name="end_arrow_length">
466 <dia:real val="0.5"/>
467 </dia:attribute>
468 <dia:attribute name="end_arrow_width">
469 <dia:real val="0.5"/>
470 </dia:attribute>
471 <dia:connections>
472 <dia:connection handle="0" to="O12" connection="3"/>
473 </dia:connections>
474 </dia:object>
475 <dia:object type="Standard - Text" version="1" id="O14">
476 <dia:attribute name="obj_pos">
477 <dia:point val="25.3454,10.49"/>
478 </dia:attribute>
479 <dia:attribute name="obj_bb">
480 <dia:rectangle val="25.3454,9.895;29.9904,10.6425"/>
481 </dia:attribute>
482 <dia:attribute name="text">
483 <dia:composite type="text">
484 <dia:attribute name="string">
485 <dia:string>#pad 1 (source)#</dia:string>
486 </dia:attribute>
487 <dia:attribute name="font">
488 <dia:font family="sans" style="0" name="Helvetica"/>
489 </dia:attribute>
490 <dia:attribute name="height">
491 <dia:real val="0.80000000000000004"/>
492 </dia:attribute>
493 <dia:attribute name="pos">
494 <dia:point val="25.3454,10.49"/>
495 </dia:attribute>
496 <dia:attribute name="color">
497 <dia:color val="#000000"/>
498 </dia:attribute>
499 <dia:attribute name="alignment">
500 <dia:enum val="0"/>
501 </dia:attribute>
502 </dia:composite>
503 </dia:attribute>
504 <dia:attribute name="valign">
505 <dia:enum val="3"/>
506 </dia:attribute>
507 </dia:object>
508 <dia:object type="Geometric - Perfect Circle" version="1" id="O15">
509 <dia:attribute name="obj_pos">
510 <dia:point val="-1.44491,11.6506"/>
511 </dia:attribute>
512 <dia:attribute name="obj_bb">
513 <dia:rectangle val="-1.49491,11.6006;-0.54491,12.5506"/>
514 </dia:attribute>
515 <dia:attribute name="meta">
516 <dia:composite type="dict"/>
517 </dia:attribute>
518 <dia:attribute name="elem_corner">
519 <dia:point val="-1.44491,11.6506"/>
520 </dia:attribute>
521 <dia:attribute name="elem_width">
522 <dia:real val="0.84999999999999787"/>
523 </dia:attribute>
524 <dia:attribute name="elem_height">
525 <dia:real val="0.84999999999999787"/>
526 </dia:attribute>
527 <dia:attribute name="line_width">
528 <dia:real val="0.10000000000000001"/>
529 </dia:attribute>
530 <dia:attribute name="line_colour">
531 <dia:color val="#000000"/>
532 </dia:attribute>
533 <dia:attribute name="fill_colour">
534 <dia:color val="#ffffff"/>
535 </dia:attribute>
536 <dia:attribute name="show_background">
537 <dia:boolean val="true"/>
538 </dia:attribute>
539 <dia:attribute name="line_style">
540 <dia:enum val="0"/>
541 <dia:real val="1"/>
542 </dia:attribute>
543 <dia:attribute name="flip_horizontal">
544 <dia:boolean val="false"/>
545 </dia:attribute>
546 <dia:attribute name="flip_vertical">
547 <dia:boolean val="false"/>
548 </dia:attribute>
549 <dia:attribute name="subscale">
550 <dia:real val="1"/>
551 </dia:attribute>
552 </dia:object>
553 <dia:object type="Standard - Line" version="0" id="O16">
554 <dia:attribute name="obj_pos">
555 <dia:point val="-9.61991,12.09"/>
556 </dia:attribute>
557 <dia:attribute name="obj_bb">
558 <dia:rectangle val="-9.67,11.7149;-1.33311,12.4385"/>
559 </dia:attribute>
560 <dia:attribute name="conn_endpoints">
561 <dia:point val="-9.61991,12.09"/>
562 <dia:point val="-1.44491,12.0756"/>
563 </dia:attribute>
564 <dia:attribute name="numcp">
565 <dia:int val="1"/>
566 </dia:attribute>
567 <dia:attribute name="end_arrow">
568 <dia:enum val="22"/>
569 </dia:attribute>
570 <dia:attribute name="end_arrow_length">
571 <dia:real val="0.5"/>
572 </dia:attribute>
573 <dia:attribute name="end_arrow_width">
574 <dia:real val="0.5"/>
575 </dia:attribute>
576 <dia:connections>
577 <dia:connection handle="1" to="O15" connection="2"/>
578 </dia:connections>
579 </dia:object>
580 <dia:object type="Standard - Text" version="1" id="O17">
581 <dia:attribute name="obj_pos">
582 <dia:point val="-7.39291,11.49"/>
583 </dia:attribute>
584 <dia:attribute name="obj_bb">
585 <dia:rectangle val="-7.39291,10.895;-3.58791,11.6425"/>
586 </dia:attribute>
587 <dia:attribute name="text">
588 <dia:composite type="text">
589 <dia:attribute name="string">
590 <dia:string>#pad 0 (sink)#</dia:string>
591 </dia:attribute>
592 <dia:attribute name="font">
593 <dia:font family="sans" style="0" name="Helvetica"/>
594 </dia:attribute>
595 <dia:attribute name="height">
596 <dia:real val="0.80000000000000004"/>
597 </dia:attribute>
598 <dia:attribute name="pos">
599 <dia:point val="-7.39291,11.49"/>
600 </dia:attribute>
601 <dia:attribute name="color">
602 <dia:color val="#000000"/>
603 </dia:attribute>
604 <dia:attribute name="alignment">
605 <dia:enum val="0"/>
606 </dia:attribute>
607 </dia:composite>
608 </dia:attribute>
609 <dia:attribute name="valign">
610 <dia:enum val="3"/>
611 </dia:attribute>
612 </dia:object>
613 </dia:layer>
614</dia:diagram>
diff --git a/Documentation/DocBook/media/v4l/subdev-image-processing-crop.svg b/Documentation/DocBook/media/v4l/subdev-image-processing-crop.svg
new file mode 100644
index 000000000000..18b0f5de9ed2
--- /dev/null
+++ b/Documentation/DocBook/media/v4l/subdev-image-processing-crop.svg
@@ -0,0 +1,63 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/PR-SVG-20010719/DTD/svg10.dtd">
3<svg width="43cm" height="10cm" viewBox="-194 128 844 196" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
4 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="-8" y="130" width="469.774" height="193"/>
5 <g>
6 <rect style="fill: #ffffff" x="4.5" y="189" width="159" height="104"/>
7 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #a52a2a" x="4.5" y="189" width="159" height="104"/>
8 </g>
9 <g>
10 <rect style="fill: #ffffff" x="63.5" y="211" width="94" height="77"/>
11 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #0000ff" x="63.5" y="211" width="94" height="77"/>
12 </g>
13 <text style="fill: #0000ff;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="74.5" y="227.75">
14 <tspan x="74.5" y="227.75">sink</tspan>
15 <tspan x="74.5" y="243.75">crop</tspan>
16 <tspan x="74.5" y="259.75">selection</tspan>
17 </text>
18 <text style="fill: #000000;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="29.5" y="158">
19 <tspan x="29.5" y="158"></tspan>
20 </text>
21 <text style="fill: #a52a2a;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="8.53836" y="157.914">
22 <tspan x="8.53836" y="157.914">sink media</tspan>
23 <tspan x="8.53836" y="173.914">bus format</tspan>
24 </text>
25 <text style="fill: #8b6914;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="349.774" y="155">
26 <tspan x="349.774" y="155">source media</tspan>
27 <tspan x="349.774" y="171">bus format</tspan>
28 </text>
29 <g>
30 <rect style="fill: #ffffff" x="350.488" y="190.834" width="93.2863" height="75.166"/>
31 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #8b6914" x="350.488" y="190.834" width="93.2863" height="75.166"/>
32 </g>
33 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="350.488" y1="266" x2="63.5" y2="288"/>
34 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="350.488" y1="190.834" x2="63.5" y2="211"/>
35 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="443.774" y1="266" x2="157.5" y2="288"/>
36 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="443.774" y1="190.834" x2="157.5" y2="211"/>
37 <g>
38 <ellipse style="fill: #ffffff" cx="473.1" cy="219.984" rx="8.5" ry="8.5"/>
39 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="473.1" cy="219.984" rx="8.5" ry="8.5"/>
40 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="473.1" cy="219.984" rx="8.5" ry="8.5"/>
41 </g>
42 <g>
43 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="481.6" y1="219.984" x2="637.934" y2="220.012"/>
44 <polygon style="fill: #000000" points="645.434,220.014 635.433,225.012 637.934,220.012 635.435,215.012 "/>
45 <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="645.434,220.014 635.433,225.012 637.934,220.012 635.435,215.012 "/>
46 </g>
47 <text style="fill: #000000;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="506.908" y="209.8">
48 <tspan x="506.908" y="209.8">pad 1 (source)</tspan>
49 </text>
50 <g>
51 <ellipse style="fill: #ffffff" cx="-20.3982" cy="241.512" rx="8.5" ry="8.5"/>
52 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="-20.3982" cy="241.512" rx="8.5" ry="8.5"/>
53 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="-20.3982" cy="241.512" rx="8.5" ry="8.5"/>
54 </g>
55 <g>
56 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="-192.398" y1="241.8" x2="-38.6343" y2="241.529"/>
57 <polygon style="fill: #000000" points="-31.1343,241.516 -41.1254,246.534 -38.6343,241.529 -41.1431,236.534 "/>
58 <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="-31.1343,241.516 -41.1254,246.534 -38.6343,241.529 -41.1431,236.534 "/>
59 </g>
60 <text style="fill: #000000;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="-147.858" y="229.8">
61 <tspan x="-147.858" y="229.8">pad 0 (sink)</tspan>
62 </text>
63</svg>
diff --git a/Documentation/DocBook/media/v4l/subdev-image-processing-full.dia b/Documentation/DocBook/media/v4l/subdev-image-processing-full.dia
new file mode 100644
index 000000000000..a0d782927840
--- /dev/null
+++ b/Documentation/DocBook/media/v4l/subdev-image-processing-full.dia
@@ -0,0 +1,1588 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
3 <dia:diagramdata>
4 <dia:attribute name="background">
5 <dia:color val="#ffffff"/>
6 </dia:attribute>
7 <dia:attribute name="pagebreak">
8 <dia:color val="#000099"/>
9 </dia:attribute>
10 <dia:attribute name="paper">
11 <dia:composite type="paper">
12 <dia:attribute name="name">
13 <dia:string>#A4#</dia:string>
14 </dia:attribute>
15 <dia:attribute name="tmargin">
16 <dia:real val="2.8222000598907471"/>
17 </dia:attribute>
18 <dia:attribute name="bmargin">
19 <dia:real val="2.8222000598907471"/>
20 </dia:attribute>
21 <dia:attribute name="lmargin">
22 <dia:real val="2.8222000598907471"/>
23 </dia:attribute>
24 <dia:attribute name="rmargin">
25 <dia:real val="2.8222000598907471"/>
26 </dia:attribute>
27 <dia:attribute name="is_portrait">
28 <dia:boolean val="false"/>
29 </dia:attribute>
30 <dia:attribute name="scaling">
31 <dia:real val="0.49000000953674316"/>
32 </dia:attribute>
33 <dia:attribute name="fitto">
34 <dia:boolean val="false"/>
35 </dia:attribute>
36 </dia:composite>
37 </dia:attribute>
38 <dia:attribute name="grid">
39 <dia:composite type="grid">
40 <dia:attribute name="width_x">
41 <dia:real val="1"/>
42 </dia:attribute>
43 <dia:attribute name="width_y">
44 <dia:real val="1"/>
45 </dia:attribute>
46 <dia:attribute name="visible_x">
47 <dia:int val="1"/>
48 </dia:attribute>
49 <dia:attribute name="visible_y">
50 <dia:int val="1"/>
51 </dia:attribute>
52 <dia:composite type="color"/>
53 </dia:composite>
54 </dia:attribute>
55 <dia:attribute name="color">
56 <dia:color val="#d8e5e5"/>
57 </dia:attribute>
58 <dia:attribute name="guides">
59 <dia:composite type="guides">
60 <dia:attribute name="hguides"/>
61 <dia:attribute name="vguides"/>
62 </dia:composite>
63 </dia:attribute>
64 </dia:diagramdata>
65 <dia:layer name="Background" visible="true" active="true">
66 <dia:object type="Standard - Box" version="0" id="O0">
67 <dia:attribute name="obj_pos">
68 <dia:point val="15.945,6.45"/>
69 </dia:attribute>
70 <dia:attribute name="obj_bb">
71 <dia:rectangle val="15.895,6.4;26.4,18.95"/>
72 </dia:attribute>
73 <dia:attribute name="elem_corner">
74 <dia:point val="15.945,6.45"/>
75 </dia:attribute>
76 <dia:attribute name="elem_width">
77 <dia:real val="10.404999999254942"/>
78 </dia:attribute>
79 <dia:attribute name="elem_height">
80 <dia:real val="12.449999999999992"/>
81 </dia:attribute>
82 <dia:attribute name="border_width">
83 <dia:real val="0.10000000149011612"/>
84 </dia:attribute>
85 <dia:attribute name="border_color">
86 <dia:color val="#ff765a"/>
87 </dia:attribute>
88 <dia:attribute name="show_background">
89 <dia:boolean val="true"/>
90 </dia:attribute>
91 </dia:object>
92 <dia:object type="Standard - Box" version="0" id="O1">
93 <dia:attribute name="obj_pos">
94 <dia:point val="-0.1,3.65"/>
95 </dia:attribute>
96 <dia:attribute name="obj_bb">
97 <dia:rectangle val="-0.15,3.6;40.25,20.85"/>
98 </dia:attribute>
99 <dia:attribute name="elem_corner">
100 <dia:point val="-0.1,3.65"/>
101 </dia:attribute>
102 <dia:attribute name="elem_width">
103 <dia:real val="40.300000000000004"/>
104 </dia:attribute>
105 <dia:attribute name="elem_height">
106 <dia:real val="17.149999999999999"/>
107 </dia:attribute>
108 <dia:attribute name="border_width">
109 <dia:real val="0.10000000149011612"/>
110 </dia:attribute>
111 <dia:attribute name="show_background">
112 <dia:boolean val="false"/>
113 </dia:attribute>
114 </dia:object>
115 <dia:object type="Geometric - Perfect Circle" version="1" id="O2">
116 <dia:attribute name="obj_pos">
117 <dia:point val="-1.05,7.9106"/>
118 </dia:attribute>
119 <dia:attribute name="obj_bb">
120 <dia:rectangle val="-1.1,7.8606;-0.15,8.8106"/>
121 </dia:attribute>
122 <dia:attribute name="meta">
123 <dia:composite type="dict"/>
124 </dia:attribute>
125 <dia:attribute name="elem_corner">
126 <dia:point val="-1.05,7.9106"/>
127 </dia:attribute>
128 <dia:attribute name="elem_width">
129 <dia:real val="0.84999999999999787"/>
130 </dia:attribute>
131 <dia:attribute name="elem_height">
132 <dia:real val="0.84999999999999787"/>
133 </dia:attribute>
134 <dia:attribute name="line_width">
135 <dia:real val="0.10000000000000001"/>
136 </dia:attribute>
137 <dia:attribute name="line_colour">
138 <dia:color val="#000000"/>
139 </dia:attribute>
140 <dia:attribute name="fill_colour">
141 <dia:color val="#ffffff"/>
142 </dia:attribute>
143 <dia:attribute name="show_background">
144 <dia:boolean val="true"/>
145 </dia:attribute>
146 <dia:attribute name="line_style">
147 <dia:enum val="0"/>
148 <dia:real val="1"/>
149 </dia:attribute>
150 <dia:attribute name="flip_horizontal">
151 <dia:boolean val="false"/>
152 </dia:attribute>
153 <dia:attribute name="flip_vertical">
154 <dia:boolean val="false"/>
155 </dia:attribute>
156 <dia:attribute name="subscale">
157 <dia:real val="1"/>
158 </dia:attribute>
159 </dia:object>
160 <dia:object type="Geometric - Perfect Circle" version="1" id="O3">
161 <dia:attribute name="obj_pos">
162 <dia:point val="40.3366,9.8342"/>
163 </dia:attribute>
164 <dia:attribute name="obj_bb">
165 <dia:rectangle val="40.2866,9.7842;41.2366,10.7342"/>
166 </dia:attribute>
167 <dia:attribute name="meta">
168 <dia:composite type="dict"/>
169 </dia:attribute>
170 <dia:attribute name="elem_corner">
171 <dia:point val="40.3366,9.8342"/>
172 </dia:attribute>
173 <dia:attribute name="elem_width">
174 <dia:real val="0.84999999999999787"/>
175 </dia:attribute>
176 <dia:attribute name="elem_height">
177 <dia:real val="0.84999999999999787"/>
178 </dia:attribute>
179 <dia:attribute name="line_width">
180 <dia:real val="0.10000000000000001"/>
181 </dia:attribute>
182 <dia:attribute name="line_colour">
183 <dia:color val="#000000"/>
184 </dia:attribute>
185 <dia:attribute name="fill_colour">
186 <dia:color val="#ffffff"/>
187 </dia:attribute>
188 <dia:attribute name="show_background">
189 <dia:boolean val="true"/>
190 </dia:attribute>
191 <dia:attribute name="line_style">
192 <dia:enum val="0"/>
193 <dia:real val="1"/>
194 </dia:attribute>
195 <dia:attribute name="flip_horizontal">
196 <dia:boolean val="false"/>
197 </dia:attribute>
198 <dia:attribute name="flip_vertical">
199 <dia:boolean val="false"/>
200 </dia:attribute>
201 <dia:attribute name="subscale">
202 <dia:real val="1"/>
203 </dia:attribute>
204 </dia:object>
205 <dia:object type="Standard - Line" version="0" id="O4">
206 <dia:attribute name="obj_pos">
207 <dia:point val="-9.225,8.35"/>
208 </dia:attribute>
209 <dia:attribute name="obj_bb">
210 <dia:rectangle val="-9.27509,7.97487;-0.938197,8.69848"/>
211 </dia:attribute>
212 <dia:attribute name="conn_endpoints">
213 <dia:point val="-9.225,8.35"/>
214 <dia:point val="-1.05,8.3356"/>
215 </dia:attribute>
216 <dia:attribute name="numcp">
217 <dia:int val="1"/>
218 </dia:attribute>
219 <dia:attribute name="end_arrow">
220 <dia:enum val="22"/>
221 </dia:attribute>
222 <dia:attribute name="end_arrow_length">
223 <dia:real val="0.5"/>
224 </dia:attribute>
225 <dia:attribute name="end_arrow_width">
226 <dia:real val="0.5"/>
227 </dia:attribute>
228 <dia:connections>
229 <dia:connection handle="1" to="O2" connection="2"/>
230 </dia:connections>
231 </dia:object>
232 <dia:object type="Standard - Line" version="0" id="O5">
233 <dia:attribute name="obj_pos">
234 <dia:point val="41.1866,10.2592"/>
235 </dia:attribute>
236 <dia:attribute name="obj_bb">
237 <dia:rectangle val="41.1366,9.89879;49.6019,10.6224"/>
238 </dia:attribute>
239 <dia:attribute name="conn_endpoints">
240 <dia:point val="41.1866,10.2592"/>
241 <dia:point val="49.4901,10.2607"/>
242 </dia:attribute>
243 <dia:attribute name="numcp">
244 <dia:int val="1"/>
245 </dia:attribute>
246 <dia:attribute name="end_arrow">
247 <dia:enum val="22"/>
248 </dia:attribute>
249 <dia:attribute name="end_arrow_length">
250 <dia:real val="0.5"/>
251 </dia:attribute>
252 <dia:attribute name="end_arrow_width">
253 <dia:real val="0.5"/>
254 </dia:attribute>
255 <dia:connections>
256 <dia:connection handle="0" to="O3" connection="3"/>
257 </dia:connections>
258 </dia:object>
259 <dia:object type="Standard - Text" version="1" id="O6">
260 <dia:attribute name="obj_pos">
261 <dia:point val="-6.998,7.75"/>
262 </dia:attribute>
263 <dia:attribute name="obj_bb">
264 <dia:rectangle val="-6.998,7.155;-3.193,7.9025"/>
265 </dia:attribute>
266 <dia:attribute name="text">
267 <dia:composite type="text">
268 <dia:attribute name="string">
269 <dia:string>#pad 0 (sink)#</dia:string>
270 </dia:attribute>
271 <dia:attribute name="font">
272 <dia:font family="sans" style="0" name="Helvetica"/>
273 </dia:attribute>
274 <dia:attribute name="height">
275 <dia:real val="0.80000000000000004"/>
276 </dia:attribute>
277 <dia:attribute name="pos">
278 <dia:point val="-6.998,7.75"/>
279 </dia:attribute>
280 <dia:attribute name="color">
281 <dia:color val="#000000"/>
282 </dia:attribute>
283 <dia:attribute name="alignment">
284 <dia:enum val="0"/>
285 </dia:attribute>
286 </dia:composite>
287 </dia:attribute>
288 <dia:attribute name="valign">
289 <dia:enum val="3"/>
290 </dia:attribute>
291 </dia:object>
292 <dia:object type="Standard - Text" version="1" id="O7">
293 <dia:attribute name="obj_pos">
294 <dia:point val="42.452,9.75"/>
295 </dia:attribute>
296 <dia:attribute name="obj_bb">
297 <dia:rectangle val="42.452,9.155;47.097,9.9025"/>
298 </dia:attribute>
299 <dia:attribute name="text">
300 <dia:composite type="text">
301 <dia:attribute name="string">
302 <dia:string>#pad 2 (source)#</dia:string>
303 </dia:attribute>
304 <dia:attribute name="font">
305 <dia:font family="sans" style="0" name="Helvetica"/>
306 </dia:attribute>
307 <dia:attribute name="height">
308 <dia:real val="0.80000000000000004"/>
309 </dia:attribute>
310 <dia:attribute name="pos">
311 <dia:point val="42.452,9.75"/>
312 </dia:attribute>
313 <dia:attribute name="color">
314 <dia:color val="#000000"/>
315 </dia:attribute>
316 <dia:attribute name="alignment">
317 <dia:enum val="0"/>
318 </dia:attribute>
319 </dia:composite>
320 </dia:attribute>
321 <dia:attribute name="valign">
322 <dia:enum val="3"/>
323 </dia:attribute>
324 </dia:object>
325 <dia:object type="Standard - Box" version="0" id="O8">
326 <dia:attribute name="obj_pos">
327 <dia:point val="0.275,6"/>
328 </dia:attribute>
329 <dia:attribute name="obj_bb">
330 <dia:rectangle val="0.225,5.95;8.275,11.25"/>
331 </dia:attribute>
332 <dia:attribute name="elem_corner">
333 <dia:point val="0.275,6"/>
334 </dia:attribute>
335 <dia:attribute name="elem_width">
336 <dia:real val="7.9499999999999975"/>
337 </dia:attribute>
338 <dia:attribute name="elem_height">
339 <dia:real val="5.1999999999999975"/>
340 </dia:attribute>
341 <dia:attribute name="border_width">
342 <dia:real val="0.10000000149011612"/>
343 </dia:attribute>
344 <dia:attribute name="border_color">
345 <dia:color val="#a52a2a"/>
346 </dia:attribute>
347 <dia:attribute name="show_background">
348 <dia:boolean val="true"/>
349 </dia:attribute>
350 </dia:object>
351 <dia:object type="Standard - Box" version="0" id="O9">
352 <dia:attribute name="obj_pos">
353 <dia:point val="3.125,6.8"/>
354 </dia:attribute>
355 <dia:attribute name="obj_bb">
356 <dia:rectangle val="3.075,6.75;7.875,10.7"/>
357 </dia:attribute>
358 <dia:attribute name="elem_corner">
359 <dia:point val="3.125,6.8"/>
360 </dia:attribute>
361 <dia:attribute name="elem_width">
362 <dia:real val="4.6999999999999975"/>
363 </dia:attribute>
364 <dia:attribute name="elem_height">
365 <dia:real val="3.8499999999999979"/>
366 </dia:attribute>
367 <dia:attribute name="border_width">
368 <dia:real val="0.10000000149011612"/>
369 </dia:attribute>
370 <dia:attribute name="border_color">
371 <dia:color val="#0000ff"/>
372 </dia:attribute>
373 <dia:attribute name="show_background">
374 <dia:boolean val="true"/>
375 </dia:attribute>
376 </dia:object>
377 <dia:object type="Standard - Text" version="1" id="O10">
378 <dia:attribute name="obj_pos">
379 <dia:point val="1.525,4.45"/>
380 </dia:attribute>
381 <dia:attribute name="obj_bb">
382 <dia:rectangle val="1.525,3.855;1.525,4.6025"/>
383 </dia:attribute>
384 <dia:attribute name="text">
385 <dia:composite type="text">
386 <dia:attribute name="string">
387 <dia:string>##</dia:string>
388 </dia:attribute>
389 <dia:attribute name="font">
390 <dia:font family="sans" style="0" name="Helvetica"/>
391 </dia:attribute>
392 <dia:attribute name="height">
393 <dia:real val="0.80000000000000004"/>
394 </dia:attribute>
395 <dia:attribute name="pos">
396 <dia:point val="1.525,4.45"/>
397 </dia:attribute>
398 <dia:attribute name="color">
399 <dia:color val="#000000"/>
400 </dia:attribute>
401 <dia:attribute name="alignment">
402 <dia:enum val="0"/>
403 </dia:attribute>
404 </dia:composite>
405 </dia:attribute>
406 <dia:attribute name="valign">
407 <dia:enum val="3"/>
408 </dia:attribute>
409 </dia:object>
410 <dia:object type="Standard - Text" version="1" id="O11">
411 <dia:attribute name="obj_pos">
412 <dia:point val="0.476918,4.44569"/>
413 </dia:attribute>
414 <dia:attribute name="obj_bb">
415 <dia:rectangle val="0.476918,3.85069;3.95942,5.39819"/>
416 </dia:attribute>
417 <dia:attribute name="text">
418 <dia:composite type="text">
419 <dia:attribute name="string">
420 <dia:string>#sink media
421bus format#</dia:string>
422 </dia:attribute>
423 <dia:attribute name="font">
424 <dia:font family="sans" style="0" name="Helvetica"/>
425 </dia:attribute>
426 <dia:attribute name="height">
427 <dia:real val="0.80000000000000004"/>
428 </dia:attribute>
429 <dia:attribute name="pos">
430 <dia:point val="0.476918,4.44569"/>
431 </dia:attribute>
432 <dia:attribute name="color">
433 <dia:color val="#a52a2a"/>
434 </dia:attribute>
435 <dia:attribute name="alignment">
436 <dia:enum val="0"/>
437 </dia:attribute>
438 </dia:composite>
439 </dia:attribute>
440 <dia:attribute name="valign">
441 <dia:enum val="3"/>
442 </dia:attribute>
443 </dia:object>
444 <dia:object type="Standard - Box" version="0" id="O12">
445 <dia:attribute name="obj_pos">
446 <dia:point val="16.6822,9.28251"/>
447 </dia:attribute>
448 <dia:attribute name="obj_bb">
449 <dia:rectangle val="16.6322,9.23251;24.9922,17.9564"/>
450 </dia:attribute>
451 <dia:attribute name="elem_corner">
452 <dia:point val="16.6822,9.28251"/>
453 </dia:attribute>
454 <dia:attribute name="elem_width">
455 <dia:real val="8.2600228398861297"/>
456 </dia:attribute>
457 <dia:attribute name="elem_height">
458 <dia:real val="8.6238900617957164"/>
459 </dia:attribute>
460 <dia:attribute name="border_width">
461 <dia:real val="0.10000000149011612"/>
462 </dia:attribute>
463 <dia:attribute name="border_color">
464 <dia:color val="#00ff00"/>
465 </dia:attribute>
466 <dia:attribute name="show_background">
467 <dia:boolean val="true"/>
468 </dia:attribute>
469 </dia:object>
470 <dia:object type="Standard - Line" version="0" id="O13">
471 <dia:attribute name="obj_pos">
472 <dia:point val="16.6822,17.9064"/>
473 </dia:attribute>
474 <dia:attribute name="obj_bb">
475 <dia:rectangle val="3.05732,10.5823;16.7499,17.9741"/>
476 </dia:attribute>
477 <dia:attribute name="conn_endpoints">
478 <dia:point val="16.6822,17.9064"/>
479 <dia:point val="3.125,10.65"/>
480 </dia:attribute>
481 <dia:attribute name="numcp">
482 <dia:int val="1"/>
483 </dia:attribute>
484 <dia:attribute name="line_color">
485 <dia:color val="#e60505"/>
486 </dia:attribute>
487 <dia:attribute name="line_style">
488 <dia:enum val="4"/>
489 </dia:attribute>
490 <dia:connections>
491 <dia:connection handle="0" to="O12" connection="5"/>
492 <dia:connection handle="1" to="O9" connection="5"/>
493 </dia:connections>
494 </dia:object>
495 <dia:object type="Standard - Line" version="0" id="O14">
496 <dia:attribute name="obj_pos">
497 <dia:point val="16.6822,9.28251"/>
498 </dia:attribute>
499 <dia:attribute name="obj_bb">
500 <dia:rectangle val="3.06681,6.74181;16.7404,9.3407"/>
501 </dia:attribute>
502 <dia:attribute name="conn_endpoints">
503 <dia:point val="16.6822,9.28251"/>
504 <dia:point val="3.125,6.8"/>
505 </dia:attribute>
506 <dia:attribute name="numcp">
507 <dia:int val="1"/>
508 </dia:attribute>
509 <dia:attribute name="line_color">
510 <dia:color val="#e60505"/>
511 </dia:attribute>
512 <dia:attribute name="line_style">
513 <dia:enum val="4"/>
514 </dia:attribute>
515 <dia:connections>
516 <dia:connection handle="0" to="O12" connection="0"/>
517 <dia:connection handle="1" to="O9" connection="0"/>
518 </dia:connections>
519 </dia:object>
520 <dia:object type="Standard - Line" version="0" id="O15">
521 <dia:attribute name="obj_pos">
522 <dia:point val="24.9422,17.9064"/>
523 </dia:attribute>
524 <dia:attribute name="obj_bb">
525 <dia:rectangle val="7.75945,10.5845;25.0077,17.9719"/>
526 </dia:attribute>
527 <dia:attribute name="conn_endpoints">
528 <dia:point val="24.9422,17.9064"/>
529 <dia:point val="7.825,10.65"/>
530 </dia:attribute>
531 <dia:attribute name="numcp">
532 <dia:int val="1"/>
533 </dia:attribute>
534 <dia:attribute name="line_color">
535 <dia:color val="#e60505"/>
536 </dia:attribute>
537 <dia:attribute name="line_style">
538 <dia:enum val="4"/>
539 </dia:attribute>
540 <dia:connections>
541 <dia:connection handle="0" to="O12" connection="7"/>
542 <dia:connection handle="1" to="O9" connection="7"/>
543 </dia:connections>
544 </dia:object>
545 <dia:object type="Standard - Line" version="0" id="O16">
546 <dia:attribute name="obj_pos">
547 <dia:point val="24.9422,9.28251"/>
548 </dia:attribute>
549 <dia:attribute name="obj_bb">
550 <dia:rectangle val="7.76834,6.74334;24.9989,9.33917"/>
551 </dia:attribute>
552 <dia:attribute name="conn_endpoints">
553 <dia:point val="24.9422,9.28251"/>
554 <dia:point val="7.825,6.8"/>
555 </dia:attribute>
556 <dia:attribute name="numcp">
557 <dia:int val="1"/>
558 </dia:attribute>
559 <dia:attribute name="line_color">
560 <dia:color val="#e60505"/>
561 </dia:attribute>
562 <dia:attribute name="line_style">
563 <dia:enum val="4"/>
564 </dia:attribute>
565 <dia:connections>
566 <dia:connection handle="0" to="O12" connection="2"/>
567 <dia:connection handle="1" to="O9" connection="2"/>
568 </dia:connections>
569 </dia:object>
570 <dia:object type="Standard - Text" version="1" id="O17">
571 <dia:attribute name="obj_pos">
572 <dia:point val="16.7352,7.47209"/>
573 </dia:attribute>
574 <dia:attribute name="obj_bb">
575 <dia:rectangle val="16.7352,6.87709;22.5602,8.42459"/>
576 </dia:attribute>
577 <dia:attribute name="text">
578 <dia:composite type="text">
579 <dia:attribute name="string">
580 <dia:string>#sink compose
581selection (scaling)#</dia:string>
582 </dia:attribute>
583 <dia:attribute name="font">
584 <dia:font family="sans" style="0" name="Helvetica"/>
585 </dia:attribute>
586 <dia:attribute name="height">
587 <dia:real val="0.80000000000000004"/>
588 </dia:attribute>
589 <dia:attribute name="pos">
590 <dia:point val="16.7352,7.47209"/>
591 </dia:attribute>
592 <dia:attribute name="color">
593 <dia:color val="#00ff00"/>
594 </dia:attribute>
595 <dia:attribute name="alignment">
596 <dia:enum val="0"/>
597 </dia:attribute>
598 </dia:composite>
599 </dia:attribute>
600 <dia:attribute name="valign">
601 <dia:enum val="3"/>
602 </dia:attribute>
603 </dia:object>
604 <dia:object type="Standard - Box" version="0" id="O18">
605 <dia:attribute name="obj_pos">
606 <dia:point val="20.4661,9.72825"/>
607 </dia:attribute>
608 <dia:attribute name="obj_bb">
609 <dia:rectangle val="20.4161,9.67825;25.5254,13.3509"/>
610 </dia:attribute>
611 <dia:attribute name="elem_corner">
612 <dia:point val="20.4661,9.72825"/>
613 </dia:attribute>
614 <dia:attribute name="elem_width">
615 <dia:real val="5.009308462554376"/>
616 </dia:attribute>
617 <dia:attribute name="elem_height">
618 <dia:real val="3.5726155970598077"/>
619 </dia:attribute>
620 <dia:attribute name="border_width">
621 <dia:real val="0.10000000149011612"/>
622 </dia:attribute>
623 <dia:attribute name="border_color">
624 <dia:color val="#a020f0"/>
625 </dia:attribute>
626 <dia:attribute name="show_background">
627 <dia:boolean val="true"/>
628 </dia:attribute>
629 </dia:object>
630 <dia:object type="Standard - Text" version="1" id="O19">
631 <dia:attribute name="obj_pos">
632 <dia:point val="34.475,5.2564"/>
633 </dia:attribute>
634 <dia:attribute name="obj_bb">
635 <dia:rectangle val="34.475,4.6614;38.7975,6.2089"/>
636 </dia:attribute>
637 <dia:attribute name="text">
638 <dia:composite type="text">
639 <dia:attribute name="string">
640 <dia:string>#source media
641bus format#</dia:string>
642 </dia:attribute>
643 <dia:attribute name="font">
644 <dia:font family="sans" style="0" name="Helvetica"/>
645 </dia:attribute>
646 <dia:attribute name="height">
647 <dia:real val="0.80000000000000004"/>
648 </dia:attribute>
649 <dia:attribute name="pos">
650 <dia:point val="34.475,5.2564"/>
651 </dia:attribute>
652 <dia:attribute name="color">
653 <dia:color val="#8b6914"/>
654 </dia:attribute>
655 <dia:attribute name="alignment">
656 <dia:enum val="0"/>
657 </dia:attribute>
658 </dia:composite>
659 </dia:attribute>
660 <dia:attribute name="valign">
661 <dia:enum val="3"/>
662 </dia:attribute>
663 </dia:object>
664 <dia:object type="Standard - Box" version="0" id="O20">
665 <dia:attribute name="obj_pos">
666 <dia:point val="34.4244,8.6917"/>
667 </dia:attribute>
668 <dia:attribute name="obj_bb">
669 <dia:rectangle val="34.3744,8.6417;39.4837,12.3143"/>
670 </dia:attribute>
671 <dia:attribute name="elem_corner">
672 <dia:point val="34.4244,8.6917"/>
673 </dia:attribute>
674 <dia:attribute name="elem_width">
675 <dia:real val="5.009308462554376"/>
676 </dia:attribute>
677 <dia:attribute name="elem_height">
678 <dia:real val="3.5726155970598077"/>
679 </dia:attribute>
680 <dia:attribute name="border_width">
681 <dia:real val="0.10000000149011612"/>
682 </dia:attribute>
683 <dia:attribute name="border_color">
684 <dia:color val="#8b6914"/>
685 </dia:attribute>
686 <dia:attribute name="show_background">
687 <dia:boolean val="true"/>
688 </dia:attribute>
689 </dia:object>
690 <dia:object type="Standard - Line" version="0" id="O21">
691 <dia:attribute name="obj_pos">
692 <dia:point val="34.4244,12.2643"/>
693 </dia:attribute>
694 <dia:attribute name="obj_bb">
695 <dia:rectangle val="20.4125,12.2107;34.478,13.3545"/>
696 </dia:attribute>
697 <dia:attribute name="conn_endpoints">
698 <dia:point val="34.4244,12.2643"/>
699 <dia:point val="20.4661,13.3009"/>
700 </dia:attribute>
701 <dia:attribute name="numcp">
702 <dia:int val="1"/>
703 </dia:attribute>
704 <dia:attribute name="line_color">
705 <dia:color val="#e60505"/>
706 </dia:attribute>
707 <dia:attribute name="line_style">
708 <dia:enum val="4"/>
709 </dia:attribute>
710 <dia:connections>
711 <dia:connection handle="0" to="O20" connection="5"/>
712 <dia:connection handle="1" to="O18" connection="5"/>
713 </dia:connections>
714 </dia:object>
715 <dia:object type="Standard - Line" version="0" id="O22">
716 <dia:attribute name="obj_pos">
717 <dia:point val="34.4244,8.6917"/>
718 </dia:attribute>
719 <dia:attribute name="obj_bb">
720 <dia:rectangle val="20.4125,8.63813;34.478,9.78182"/>
721 </dia:attribute>
722 <dia:attribute name="conn_endpoints">
723 <dia:point val="34.4244,8.6917"/>
724 <dia:point val="20.4661,9.72825"/>
725 </dia:attribute>
726 <dia:attribute name="numcp">
727 <dia:int val="1"/>
728 </dia:attribute>
729 <dia:attribute name="line_color">
730 <dia:color val="#e60505"/>
731 </dia:attribute>
732 <dia:attribute name="line_style">
733 <dia:enum val="4"/>
734 </dia:attribute>
735 <dia:connections>
736 <dia:connection handle="0" to="O20" connection="0"/>
737 <dia:connection handle="1" to="O18" connection="0"/>
738 </dia:connections>
739 </dia:object>
740 <dia:object type="Standard - Line" version="0" id="O23">
741 <dia:attribute name="obj_pos">
742 <dia:point val="39.4337,12.2643"/>
743 </dia:attribute>
744 <dia:attribute name="obj_bb">
745 <dia:rectangle val="25.4218,12.2107;39.4873,13.3545"/>
746 </dia:attribute>
747 <dia:attribute name="conn_endpoints">
748 <dia:point val="39.4337,12.2643"/>
749 <dia:point val="25.4754,13.3009"/>
750 </dia:attribute>
751 <dia:attribute name="numcp">
752 <dia:int val="1"/>
753 </dia:attribute>
754 <dia:attribute name="line_color">
755 <dia:color val="#e60505"/>
756 </dia:attribute>
757 <dia:attribute name="line_style">
758 <dia:enum val="4"/>
759 </dia:attribute>
760 <dia:connections>
761 <dia:connection handle="0" to="O20" connection="7"/>
762 <dia:connection handle="1" to="O18" connection="7"/>
763 </dia:connections>
764 </dia:object>
765 <dia:object type="Standard - Line" version="0" id="O24">
766 <dia:attribute name="obj_pos">
767 <dia:point val="39.4337,8.6917"/>
768 </dia:attribute>
769 <dia:attribute name="obj_bb">
770 <dia:rectangle val="25.4218,8.63813;39.4873,9.78182"/>
771 </dia:attribute>
772 <dia:attribute name="conn_endpoints">
773 <dia:point val="39.4337,8.6917"/>
774 <dia:point val="25.4754,9.72825"/>
775 </dia:attribute>
776 <dia:attribute name="numcp">
777 <dia:int val="1"/>
778 </dia:attribute>
779 <dia:attribute name="line_color">
780 <dia:color val="#e60505"/>
781 </dia:attribute>
782 <dia:attribute name="line_style">
783 <dia:enum val="4"/>
784 </dia:attribute>
785 <dia:connections>
786 <dia:connection handle="0" to="O20" connection="2"/>
787 <dia:connection handle="1" to="O18" connection="2"/>
788 </dia:connections>
789 </dia:object>
790 <dia:object type="Standard - Text" version="1" id="O25">
791 <dia:attribute name="obj_pos">
792 <dia:point val="16.25,5.15"/>
793 </dia:attribute>
794 <dia:attribute name="obj_bb">
795 <dia:rectangle val="16.25,4.555;21.68,6.1025"/>
796 </dia:attribute>
797 <dia:attribute name="text">
798 <dia:composite type="text">
799 <dia:attribute name="string">
800 <dia:string>#sink compose
801bounds selection#</dia:string>
802 </dia:attribute>
803 <dia:attribute name="font">
804 <dia:font family="sans" style="0" name="Helvetica"/>
805 </dia:attribute>
806 <dia:attribute name="height">
807 <dia:real val="0.80000000000000004"/>
808 </dia:attribute>
809 <dia:attribute name="pos">
810 <dia:point val="16.25,5.15"/>
811 </dia:attribute>
812 <dia:attribute name="color">
813 <dia:color val="#ff765a"/>
814 </dia:attribute>
815 <dia:attribute name="alignment">
816 <dia:enum val="0"/>
817 </dia:attribute>
818 </dia:composite>
819 </dia:attribute>
820 <dia:attribute name="valign">
821 <dia:enum val="3"/>
822 </dia:attribute>
823 </dia:object>
824 <dia:object type="Geometric - Perfect Circle" version="1" id="O26">
825 <dia:attribute name="obj_pos">
826 <dia:point val="-1.02991,16.6506"/>
827 </dia:attribute>
828 <dia:attribute name="obj_bb">
829 <dia:rectangle val="-1.07991,16.6006;-0.12991,17.5506"/>
830 </dia:attribute>
831 <dia:attribute name="meta">
832 <dia:composite type="dict"/>
833 </dia:attribute>
834 <dia:attribute name="elem_corner">
835 <dia:point val="-1.02991,16.6506"/>
836 </dia:attribute>
837 <dia:attribute name="elem_width">
838 <dia:real val="0.84999999999999787"/>
839 </dia:attribute>
840 <dia:attribute name="elem_height">
841 <dia:real val="0.84999999999999787"/>
842 </dia:attribute>
843 <dia:attribute name="line_width">
844 <dia:real val="0.10000000000000001"/>
845 </dia:attribute>
846 <dia:attribute name="line_colour">
847 <dia:color val="#000000"/>
848 </dia:attribute>
849 <dia:attribute name="fill_colour">
850 <dia:color val="#ffffff"/>
851 </dia:attribute>
852 <dia:attribute name="show_background">
853 <dia:boolean val="true"/>
854 </dia:attribute>
855 <dia:attribute name="line_style">
856 <dia:enum val="0"/>
857 <dia:real val="1"/>
858 </dia:attribute>
859 <dia:attribute name="flip_horizontal">
860 <dia:boolean val="false"/>
861 </dia:attribute>
862 <dia:attribute name="flip_vertical">
863 <dia:boolean val="false"/>
864 </dia:attribute>
865 <dia:attribute name="subscale">
866 <dia:real val="1"/>
867 </dia:attribute>
868 </dia:object>
869 <dia:object type="Standard - Line" version="0" id="O27">
870 <dia:attribute name="obj_pos">
871 <dia:point val="-9.20491,17.09"/>
872 </dia:attribute>
873 <dia:attribute name="obj_bb">
874 <dia:rectangle val="-9.255,16.7149;-0.918107,17.4385"/>
875 </dia:attribute>
876 <dia:attribute name="conn_endpoints">
877 <dia:point val="-9.20491,17.09"/>
878 <dia:point val="-1.02991,17.0756"/>
879 </dia:attribute>
880 <dia:attribute name="numcp">
881 <dia:int val="1"/>
882 </dia:attribute>
883 <dia:attribute name="end_arrow">
884 <dia:enum val="22"/>
885 </dia:attribute>
886 <dia:attribute name="end_arrow_length">
887 <dia:real val="0.5"/>
888 </dia:attribute>
889 <dia:attribute name="end_arrow_width">
890 <dia:real val="0.5"/>
891 </dia:attribute>
892 <dia:connections>
893 <dia:connection handle="1" to="O26" connection="2"/>
894 </dia:connections>
895 </dia:object>
896 <dia:object type="Standard - Text" version="1" id="O28">
897 <dia:attribute name="obj_pos">
898 <dia:point val="-6.95,16.45"/>
899 </dia:attribute>
900 <dia:attribute name="obj_bb">
901 <dia:rectangle val="-6.95,15.855;-3.145,16.6025"/>
902 </dia:attribute>
903 <dia:attribute name="text">
904 <dia:composite type="text">
905 <dia:attribute name="string">
906 <dia:string>#pad 1 (sink)#</dia:string>
907 </dia:attribute>
908 <dia:attribute name="font">
909 <dia:font family="sans" style="0" name="Helvetica"/>
910 </dia:attribute>
911 <dia:attribute name="height">
912 <dia:real val="0.80000000000000004"/>
913 </dia:attribute>
914 <dia:attribute name="pos">
915 <dia:point val="-6.95,16.45"/>
916 </dia:attribute>
917 <dia:attribute name="color">
918 <dia:color val="#000000"/>
919 </dia:attribute>
920 <dia:attribute name="alignment">
921 <dia:enum val="0"/>
922 </dia:attribute>
923 </dia:composite>
924 </dia:attribute>
925 <dia:attribute name="valign">
926 <dia:enum val="3"/>
927 </dia:attribute>
928 </dia:object>
929 <dia:object type="Standard - Box" version="0" id="O29">
930 <dia:attribute name="obj_pos">
931 <dia:point val="0.390412,14.64"/>
932 </dia:attribute>
933 <dia:attribute name="obj_bb">
934 <dia:rectangle val="0.340412,14.59;6.045,18.8"/>
935 </dia:attribute>
936 <dia:attribute name="elem_corner">
937 <dia:point val="0.390412,14.64"/>
938 </dia:attribute>
939 <dia:attribute name="elem_width">
940 <dia:real val="5.604587512785236"/>
941 </dia:attribute>
942 <dia:attribute name="elem_height">
943 <dia:real val="4.1099999999999994"/>
944 </dia:attribute>
945 <dia:attribute name="border_width">
946 <dia:real val="0.10000000149011612"/>
947 </dia:attribute>
948 <dia:attribute name="border_color">
949 <dia:color val="#a52a2a"/>
950 </dia:attribute>
951 <dia:attribute name="show_background">
952 <dia:boolean val="true"/>
953 </dia:attribute>
954 </dia:object>
955 <dia:object type="Standard - Box" version="0" id="O30">
956 <dia:attribute name="obj_pos">
957 <dia:point val="2.645,15.74"/>
958 </dia:attribute>
959 <dia:attribute name="obj_bb">
960 <dia:rectangle val="2.595,15.69;5.6,18.3"/>
961 </dia:attribute>
962 <dia:attribute name="elem_corner">
963 <dia:point val="2.645,15.74"/>
964 </dia:attribute>
965 <dia:attribute name="elem_width">
966 <dia:real val="2.904999999254942"/>
967 </dia:attribute>
968 <dia:attribute name="elem_height">
969 <dia:real val="2.5100000000000016"/>
970 </dia:attribute>
971 <dia:attribute name="border_width">
972 <dia:real val="0.10000000149011612"/>
973 </dia:attribute>
974 <dia:attribute name="border_color">
975 <dia:color val="#0000ff"/>
976 </dia:attribute>
977 <dia:attribute name="show_background">
978 <dia:boolean val="true"/>
979 </dia:attribute>
980 </dia:object>
981 <dia:object type="Standard - Text" version="1" id="O31">
982 <dia:attribute name="obj_pos">
983 <dia:point val="1.595,12.99"/>
984 </dia:attribute>
985 <dia:attribute name="obj_bb">
986 <dia:rectangle val="1.595,12.395;1.595,13.1425"/>
987 </dia:attribute>
988 <dia:attribute name="text">
989 <dia:composite type="text">
990 <dia:attribute name="string">
991 <dia:string>##</dia:string>
992 </dia:attribute>
993 <dia:attribute name="font">
994 <dia:font family="sans" style="0" name="Helvetica"/>
995 </dia:attribute>
996 <dia:attribute name="height">
997 <dia:real val="0.80000000000000004"/>
998 </dia:attribute>
999 <dia:attribute name="pos">
1000 <dia:point val="1.595,12.99"/>
1001 </dia:attribute>
1002 <dia:attribute name="color">
1003 <dia:color val="#000000"/>
1004 </dia:attribute>
1005 <dia:attribute name="alignment">
1006 <dia:enum val="0"/>
1007 </dia:attribute>
1008 </dia:composite>
1009 </dia:attribute>
1010 <dia:attribute name="valign">
1011 <dia:enum val="3"/>
1012 </dia:attribute>
1013 </dia:object>
1014 <dia:object type="Standard - Line" version="0" id="O32">
1015 <dia:attribute name="obj_pos">
1016 <dia:point val="17.945,12.595"/>
1017 </dia:attribute>
1018 <dia:attribute name="obj_bb">
1019 <dia:rectangle val="2.58596,12.536;18.004,15.799"/>
1020 </dia:attribute>
1021 <dia:attribute name="conn_endpoints">
1022 <dia:point val="17.945,12.595"/>
1023 <dia:point val="2.645,15.74"/>
1024 </dia:attribute>
1025 <dia:attribute name="numcp">
1026 <dia:int val="1"/>
1027 </dia:attribute>
1028 <dia:attribute name="line_color">
1029 <dia:color val="#e60505"/>
1030 </dia:attribute>
1031 <dia:attribute name="line_style">
1032 <dia:enum val="4"/>
1033 </dia:attribute>
1034 <dia:connections>
1035 <dia:connection handle="0" to="O36" connection="0"/>
1036 <dia:connection handle="1" to="O30" connection="0"/>
1037 </dia:connections>
1038 </dia:object>
1039 <dia:object type="Standard - Line" version="0" id="O33">
1040 <dia:attribute name="obj_pos">
1041 <dia:point val="17.945,15.8"/>
1042 </dia:attribute>
1043 <dia:attribute name="obj_bb">
1044 <dia:rectangle val="2.58772,15.7427;18.0023,18.3073"/>
1045 </dia:attribute>
1046 <dia:attribute name="conn_endpoints">
1047 <dia:point val="17.945,15.8"/>
1048 <dia:point val="2.645,18.25"/>
1049 </dia:attribute>
1050 <dia:attribute name="numcp">
1051 <dia:int val="1"/>
1052 </dia:attribute>
1053 <dia:attribute name="line_color">
1054 <dia:color val="#e60505"/>
1055 </dia:attribute>
1056 <dia:attribute name="line_style">
1057 <dia:enum val="4"/>
1058 </dia:attribute>
1059 <dia:connections>
1060 <dia:connection handle="0" to="O36" connection="5"/>
1061 <dia:connection handle="1" to="O30" connection="5"/>
1062 </dia:connections>
1063 </dia:object>
1064 <dia:object type="Standard - Line" version="0" id="O34">
1065 <dia:attribute name="obj_pos">
1066 <dia:point val="21.7,15.8"/>
1067 </dia:attribute>
1068 <dia:attribute name="obj_bb">
1069 <dia:rectangle val="5.49307,15.7431;21.7569,18.3069"/>
1070 </dia:attribute>
1071 <dia:attribute name="conn_endpoints">
1072 <dia:point val="21.7,15.8"/>
1073 <dia:point val="5.55,18.25"/>
1074 </dia:attribute>
1075 <dia:attribute name="numcp">
1076 <dia:int val="1"/>
1077 </dia:attribute>
1078 <dia:attribute name="line_color">
1079 <dia:color val="#e60505"/>
1080 </dia:attribute>
1081 <dia:attribute name="line_style">
1082 <dia:enum val="4"/>
1083 </dia:attribute>
1084 <dia:connections>
1085 <dia:connection handle="0" to="O36" connection="7"/>
1086 <dia:connection handle="1" to="O30" connection="7"/>
1087 </dia:connections>
1088 </dia:object>
1089 <dia:object type="Standard - Line" version="0" id="O35">
1090 <dia:attribute name="obj_pos">
1091 <dia:point val="21.7,12.595"/>
1092 </dia:attribute>
1093 <dia:attribute name="obj_bb">
1094 <dia:rectangle val="5.49136,12.5364;21.7586,15.7986"/>
1095 </dia:attribute>
1096 <dia:attribute name="conn_endpoints">
1097 <dia:point val="21.7,12.595"/>
1098 <dia:point val="5.55,15.74"/>
1099 </dia:attribute>
1100 <dia:attribute name="numcp">
1101 <dia:int val="1"/>
1102 </dia:attribute>
1103 <dia:attribute name="line_color">
1104 <dia:color val="#e60505"/>
1105 </dia:attribute>
1106 <dia:attribute name="line_style">
1107 <dia:enum val="4"/>
1108 </dia:attribute>
1109 <dia:connections>
1110 <dia:connection handle="0" to="O36" connection="2"/>
1111 <dia:connection handle="1" to="O30" connection="2"/>
1112 </dia:connections>
1113 </dia:object>
1114 <dia:object type="Standard - Box" version="0" id="O36">
1115 <dia:attribute name="obj_pos">
1116 <dia:point val="17.945,12.595"/>
1117 </dia:attribute>
1118 <dia:attribute name="obj_bb">
1119 <dia:rectangle val="17.895,12.545;21.75,15.85"/>
1120 </dia:attribute>
1121 <dia:attribute name="elem_corner">
1122 <dia:point val="17.945,12.595"/>
1123 </dia:attribute>
1124 <dia:attribute name="elem_width">
1125 <dia:real val="3.7549999992549452"/>
1126 </dia:attribute>
1127 <dia:attribute name="elem_height">
1128 <dia:real val="3.2049999992549427"/>
1129 </dia:attribute>
1130 <dia:attribute name="border_width">
1131 <dia:real val="0.10000000149011612"/>
1132 </dia:attribute>
1133 <dia:attribute name="border_color">
1134 <dia:color val="#00ff00"/>
1135 </dia:attribute>
1136 <dia:attribute name="show_background">
1137 <dia:boolean val="false"/>
1138 </dia:attribute>
1139 </dia:object>
1140 <dia:object type="Standard - Box" version="0" id="O37">
1141 <dia:attribute name="obj_pos">
1142 <dia:point val="22.1631,14.2233"/>
1143 </dia:attribute>
1144 <dia:attribute name="obj_bb">
1145 <dia:rectangle val="22.1131,14.1733;25.45,16.7"/>
1146 </dia:attribute>
1147 <dia:attribute name="elem_corner">
1148 <dia:point val="22.1631,14.2233"/>
1149 </dia:attribute>
1150 <dia:attribute name="elem_width">
1151 <dia:real val="3.2369000000000021"/>
1152 </dia:attribute>
1153 <dia:attribute name="elem_height">
1154 <dia:real val="2.4267000000000003"/>
1155 </dia:attribute>
1156 <dia:attribute name="border_width">
1157 <dia:real val="0.10000000149011612"/>
1158 </dia:attribute>
1159 <dia:attribute name="border_color">
1160 <dia:color val="#a020f0"/>
1161 </dia:attribute>
1162 <dia:attribute name="show_background">
1163 <dia:boolean val="false"/>
1164 </dia:attribute>
1165 </dia:object>
1166 <dia:object type="Standard - Box" version="0" id="O38">
1167 <dia:attribute name="obj_pos">
1168 <dia:point val="34.6714,16.2367"/>
1169 </dia:attribute>
1170 <dia:attribute name="obj_bb">
1171 <dia:rectangle val="34.6214,16.1867;37.9,18.75"/>
1172 </dia:attribute>
1173 <dia:attribute name="elem_corner">
1174 <dia:point val="34.6714,16.2367"/>
1175 </dia:attribute>
1176 <dia:attribute name="elem_width">
1177 <dia:real val="3.178600000000003"/>
1178 </dia:attribute>
1179 <dia:attribute name="elem_height">
1180 <dia:real val="2.4632999999999967"/>
1181 </dia:attribute>
1182 <dia:attribute name="border_width">
1183 <dia:real val="0.10000000149011612"/>
1184 </dia:attribute>
1185 <dia:attribute name="border_color">
1186 <dia:color val="#8b6914"/>
1187 </dia:attribute>
1188 <dia:attribute name="show_background">
1189 <dia:boolean val="true"/>
1190 </dia:attribute>
1191 </dia:object>
1192 <dia:object type="Standard - Line" version="0" id="O39">
1193 <dia:attribute name="obj_pos">
1194 <dia:point val="34.6714,18.7"/>
1195 </dia:attribute>
1196 <dia:attribute name="obj_bb">
1197 <dia:rectangle val="22.1057,16.5926;34.7288,18.7574"/>
1198 </dia:attribute>
1199 <dia:attribute name="conn_endpoints">
1200 <dia:point val="34.6714,18.7"/>
1201 <dia:point val="22.1631,16.65"/>
1202 </dia:attribute>
1203 <dia:attribute name="numcp">
1204 <dia:int val="1"/>
1205 </dia:attribute>
1206 <dia:attribute name="line_color">
1207 <dia:color val="#e60505"/>
1208 </dia:attribute>
1209 <dia:attribute name="line_style">
1210 <dia:enum val="4"/>
1211 </dia:attribute>
1212 <dia:connections>
1213 <dia:connection handle="0" to="O38" connection="5"/>
1214 <dia:connection handle="1" to="O37" connection="5"/>
1215 </dia:connections>
1216 </dia:object>
1217 <dia:object type="Standard - Line" version="0" id="O40">
1218 <dia:attribute name="obj_pos">
1219 <dia:point val="34.6714,16.2367"/>
1220 </dia:attribute>
1221 <dia:attribute name="obj_bb">
1222 <dia:rectangle val="22.1058,14.166;34.7287,16.294"/>
1223 </dia:attribute>
1224 <dia:attribute name="conn_endpoints">
1225 <dia:point val="34.6714,16.2367"/>
1226 <dia:point val="22.1631,14.2233"/>
1227 </dia:attribute>
1228 <dia:attribute name="numcp">
1229 <dia:int val="1"/>
1230 </dia:attribute>
1231 <dia:attribute name="line_color">
1232 <dia:color val="#e60505"/>
1233 </dia:attribute>
1234 <dia:attribute name="line_style">
1235 <dia:enum val="4"/>
1236 </dia:attribute>
1237 <dia:connections>
1238 <dia:connection handle="0" to="O38" connection="0"/>
1239 <dia:connection handle="1" to="O37" connection="0"/>
1240 </dia:connections>
1241 </dia:object>
1242 <dia:object type="Standard - Line" version="0" id="O41">
1243 <dia:attribute name="obj_pos">
1244 <dia:point val="37.85,18.7"/>
1245 </dia:attribute>
1246 <dia:attribute name="obj_bb">
1247 <dia:rectangle val="25.3425,16.5925;37.9075,18.7575"/>
1248 </dia:attribute>
1249 <dia:attribute name="conn_endpoints">
1250 <dia:point val="37.85,18.7"/>
1251 <dia:point val="25.4,16.65"/>
1252 </dia:attribute>
1253 <dia:attribute name="numcp">
1254 <dia:int val="1"/>
1255 </dia:attribute>
1256 <dia:attribute name="line_color">
1257 <dia:color val="#e60505"/>
1258 </dia:attribute>
1259 <dia:attribute name="line_style">
1260 <dia:enum val="4"/>
1261 </dia:attribute>
1262 <dia:connections>
1263 <dia:connection handle="0" to="O38" connection="7"/>
1264 <dia:connection handle="1" to="O37" connection="7"/>
1265 </dia:connections>
1266 </dia:object>
1267 <dia:object type="Standard - Line" version="0" id="O42">
1268 <dia:attribute name="obj_pos">
1269 <dia:point val="37.85,16.2367"/>
1270 </dia:attribute>
1271 <dia:attribute name="obj_bb">
1272 <dia:rectangle val="25.3427,14.166;37.9073,16.294"/>
1273 </dia:attribute>
1274 <dia:attribute name="conn_endpoints">
1275 <dia:point val="37.85,16.2367"/>
1276 <dia:point val="25.4,14.2233"/>
1277 </dia:attribute>
1278 <dia:attribute name="numcp">
1279 <dia:int val="1"/>
1280 </dia:attribute>
1281 <dia:attribute name="line_color">
1282 <dia:color val="#e60505"/>
1283 </dia:attribute>
1284 <dia:attribute name="line_style">
1285 <dia:enum val="4"/>
1286 </dia:attribute>
1287 <dia:connections>
1288 <dia:connection handle="0" to="O38" connection="2"/>
1289 <dia:connection handle="1" to="O37" connection="2"/>
1290 </dia:connections>
1291 </dia:object>
1292 <dia:object type="Geometric - Perfect Circle" version="1" id="O43">
1293 <dia:attribute name="obj_pos">
1294 <dia:point val="40.347,16.7742"/>
1295 </dia:attribute>
1296 <dia:attribute name="obj_bb">
1297 <dia:rectangle val="40.297,16.7242;41.247,17.6742"/>
1298 </dia:attribute>
1299 <dia:attribute name="meta">
1300 <dia:composite type="dict"/>
1301 </dia:attribute>
1302 <dia:attribute name="elem_corner">
1303 <dia:point val="40.347,16.7742"/>
1304 </dia:attribute>
1305 <dia:attribute name="elem_width">
1306 <dia:real val="0.84999999999999787"/>
1307 </dia:attribute>
1308 <dia:attribute name="elem_height">
1309 <dia:real val="0.84999999999999787"/>
1310 </dia:attribute>
1311 <dia:attribute name="line_width">
1312 <dia:real val="0.10000000000000001"/>
1313 </dia:attribute>
1314 <dia:attribute name="line_colour">
1315 <dia:color val="#000000"/>
1316 </dia:attribute>
1317 <dia:attribute name="fill_colour">
1318 <dia:color val="#ffffff"/>
1319 </dia:attribute>
1320 <dia:attribute name="show_background">
1321 <dia:boolean val="true"/>
1322 </dia:attribute>
1323 <dia:attribute name="line_style">
1324 <dia:enum val="0"/>
1325 <dia:real val="1"/>
1326 </dia:attribute>
1327 <dia:attribute name="flip_horizontal">
1328 <dia:boolean val="false"/>
1329 </dia:attribute>
1330 <dia:attribute name="flip_vertical">
1331 <dia:boolean val="false"/>
1332 </dia:attribute>
1333 <dia:attribute name="subscale">
1334 <dia:real val="1"/>
1335 </dia:attribute>
1336 </dia:object>
1337 <dia:object type="Standard - Line" version="0" id="O44">
1338 <dia:attribute name="obj_pos">
1339 <dia:point val="41.197,17.1992"/>
1340 </dia:attribute>
1341 <dia:attribute name="obj_bb">
1342 <dia:rectangle val="41.147,16.8388;49.6123,17.5624"/>
1343 </dia:attribute>
1344 <dia:attribute name="conn_endpoints">
1345 <dia:point val="41.197,17.1992"/>
1346 <dia:point val="49.5005,17.2007"/>
1347 </dia:attribute>
1348 <dia:attribute name="numcp">
1349 <dia:int val="1"/>
1350 </dia:attribute>
1351 <dia:attribute name="end_arrow">
1352 <dia:enum val="22"/>
1353 </dia:attribute>
1354 <dia:attribute name="end_arrow_length">
1355 <dia:real val="0.5"/>
1356 </dia:attribute>
1357 <dia:attribute name="end_arrow_width">
1358 <dia:real val="0.5"/>
1359 </dia:attribute>
1360 <dia:connections>
1361 <dia:connection handle="0" to="O43" connection="3"/>
1362 </dia:connections>
1363 </dia:object>
1364 <dia:object type="Standard - Text" version="1" id="O45">
1365 <dia:attribute name="obj_pos">
1366 <dia:point val="42.4624,16.69"/>
1367 </dia:attribute>
1368 <dia:attribute name="obj_bb">
1369 <dia:rectangle val="42.4624,16.095;47.1074,16.8425"/>
1370 </dia:attribute>
1371 <dia:attribute name="text">
1372 <dia:composite type="text">
1373 <dia:attribute name="string">
1374 <dia:string>#pad 3 (source)#</dia:string>
1375 </dia:attribute>
1376 <dia:attribute name="font">
1377 <dia:font family="sans" style="0" name="Helvetica"/>
1378 </dia:attribute>
1379 <dia:attribute name="height">
1380 <dia:real val="0.80000000000000004"/>
1381 </dia:attribute>
1382 <dia:attribute name="pos">
1383 <dia:point val="42.4624,16.69"/>
1384 </dia:attribute>
1385 <dia:attribute name="color">
1386 <dia:color val="#000000"/>
1387 </dia:attribute>
1388 <dia:attribute name="alignment">
1389 <dia:enum val="0"/>
1390 </dia:attribute>
1391 </dia:composite>
1392 </dia:attribute>
1393 <dia:attribute name="valign">
1394 <dia:enum val="3"/>
1395 </dia:attribute>
1396 </dia:object>
1397 <dia:object type="Standard - Text" version="1" id="O46">
1398 <dia:attribute name="obj_pos">
1399 <dia:point val="9.85,4.55"/>
1400 </dia:attribute>
1401 <dia:attribute name="obj_bb">
1402 <dia:rectangle val="9.85,3.955;12.7275,6.3025"/>
1403 </dia:attribute>
1404 <dia:attribute name="text">
1405 <dia:composite type="text">
1406 <dia:attribute name="string">
1407 <dia:string>#sink
1408crop
1409selection#</dia:string>
1410 </dia:attribute>
1411 <dia:attribute name="font">
1412 <dia:font family="sans" style="0" name="Helvetica"/>
1413 </dia:attribute>
1414 <dia:attribute name="height">
1415 <dia:real val="0.80000000000000004"/>
1416 </dia:attribute>
1417 <dia:attribute name="pos">
1418 <dia:point val="9.85,4.55"/>
1419 </dia:attribute>
1420 <dia:attribute name="color">
1421 <dia:color val="#0000ff"/>
1422 </dia:attribute>
1423 <dia:attribute name="alignment">
1424 <dia:enum val="0"/>
1425 </dia:attribute>
1426 </dia:composite>
1427 </dia:attribute>
1428 <dia:attribute name="valign">
1429 <dia:enum val="3"/>
1430 </dia:attribute>
1431 </dia:object>
1432 <dia:object type="Standard - Text" version="1" id="O47">
1433 <dia:attribute name="obj_pos">
1434 <dia:point val="27.65,4.75"/>
1435 </dia:attribute>
1436 <dia:attribute name="obj_bb">
1437 <dia:rectangle val="27.65,4.155;30.5275,6.5025"/>
1438 </dia:attribute>
1439 <dia:attribute name="text">
1440 <dia:composite type="text">
1441 <dia:attribute name="string">
1442 <dia:string>#source
1443crop
1444selection#</dia:string>
1445 </dia:attribute>
1446 <dia:attribute name="font">
1447 <dia:font family="sans" style="0" name="Helvetica"/>
1448 </dia:attribute>
1449 <dia:attribute name="height">
1450 <dia:real val="0.80000000000000004"/>
1451 </dia:attribute>
1452 <dia:attribute name="pos">
1453 <dia:point val="27.65,4.75"/>
1454 </dia:attribute>
1455 <dia:attribute name="color">
1456 <dia:color val="#a020f0"/>
1457 </dia:attribute>
1458 <dia:attribute name="alignment">
1459 <dia:enum val="0"/>
1460 </dia:attribute>
1461 </dia:composite>
1462 </dia:attribute>
1463 <dia:attribute name="valign">
1464 <dia:enum val="3"/>
1465 </dia:attribute>
1466 </dia:object>
1467 <dia:object type="Standard - Line" version="0" id="O48">
1468 <dia:attribute name="obj_pos">
1469 <dia:point val="10.55,6.6"/>
1470 </dia:attribute>
1471 <dia:attribute name="obj_bb">
1472 <dia:rectangle val="7.7135,6.39438;10.6035,7.11605"/>
1473 </dia:attribute>
1474 <dia:attribute name="conn_endpoints">
1475 <dia:point val="10.55,6.6"/>
1476 <dia:point val="7.825,6.8"/>
1477 </dia:attribute>
1478 <dia:attribute name="numcp">
1479 <dia:int val="1"/>
1480 </dia:attribute>
1481 <dia:attribute name="line_color">
1482 <dia:color val="#0000ff"/>
1483 </dia:attribute>
1484 <dia:attribute name="end_arrow">
1485 <dia:enum val="22"/>
1486 </dia:attribute>
1487 <dia:attribute name="end_arrow_length">
1488 <dia:real val="0.5"/>
1489 </dia:attribute>
1490 <dia:attribute name="end_arrow_width">
1491 <dia:real val="0.5"/>
1492 </dia:attribute>
1493 <dia:connections>
1494 <dia:connection handle="1" to="O9" connection="2"/>
1495 </dia:connections>
1496 </dia:object>
1497 <dia:object type="Standard - Line" version="0" id="O49">
1498 <dia:attribute name="obj_pos">
1499 <dia:point val="10.45,6.55"/>
1500 </dia:attribute>
1501 <dia:attribute name="obj_bb">
1502 <dia:rectangle val="5.48029,6.48236;10.5176,15.8387"/>
1503 </dia:attribute>
1504 <dia:attribute name="conn_endpoints">
1505 <dia:point val="10.45,6.55"/>
1506 <dia:point val="5.55,15.74"/>
1507 </dia:attribute>
1508 <dia:attribute name="numcp">
1509 <dia:int val="1"/>
1510 </dia:attribute>
1511 <dia:attribute name="line_color">
1512 <dia:color val="#0000ff"/>
1513 </dia:attribute>
1514 <dia:attribute name="end_arrow">
1515 <dia:enum val="22"/>
1516 </dia:attribute>
1517 <dia:attribute name="end_arrow_length">
1518 <dia:real val="0.5"/>
1519 </dia:attribute>
1520 <dia:attribute name="end_arrow_width">
1521 <dia:real val="0.5"/>
1522 </dia:attribute>
1523 <dia:connections>
1524 <dia:connection handle="1" to="O30" connection="2"/>
1525 </dia:connections>
1526 </dia:object>
1527 <dia:object type="Standard - Line" version="0" id="O50">
1528 <dia:attribute name="obj_pos">
1529 <dia:point val="27.5246,6.66071"/>
1530 </dia:attribute>
1531 <dia:attribute name="obj_bb">
1532 <dia:rectangle val="25.406,6.59136;27.594,9.82122"/>
1533 </dia:attribute>
1534 <dia:attribute name="conn_endpoints">
1535 <dia:point val="27.5246,6.66071"/>
1536 <dia:point val="25.4754,9.72825"/>
1537 </dia:attribute>
1538 <dia:attribute name="numcp">
1539 <dia:int val="1"/>
1540 </dia:attribute>
1541 <dia:attribute name="line_color">
1542 <dia:color val="#a020f0"/>
1543 </dia:attribute>
1544 <dia:attribute name="end_arrow">
1545 <dia:enum val="22"/>
1546 </dia:attribute>
1547 <dia:attribute name="end_arrow_length">
1548 <dia:real val="0.5"/>
1549 </dia:attribute>
1550 <dia:attribute name="end_arrow_width">
1551 <dia:real val="0.5"/>
1552 </dia:attribute>
1553 <dia:connections>
1554 <dia:connection handle="1" to="O18" connection="2"/>
1555 </dia:connections>
1556 </dia:object>
1557 <dia:object type="Standard - Line" version="0" id="O51">
1558 <dia:attribute name="obj_pos">
1559 <dia:point val="27.5036,6.68935"/>
1560 </dia:attribute>
1561 <dia:attribute name="obj_bb">
1562 <dia:rectangle val="25.2161,6.62775;27.5652,14.331"/>
1563 </dia:attribute>
1564 <dia:attribute name="conn_endpoints">
1565 <dia:point val="27.5036,6.68935"/>
1566 <dia:point val="25.4,14.2233"/>
1567 </dia:attribute>
1568 <dia:attribute name="numcp">
1569 <dia:int val="1"/>
1570 </dia:attribute>
1571 <dia:attribute name="line_color">
1572 <dia:color val="#a020f0"/>
1573 </dia:attribute>
1574 <dia:attribute name="end_arrow">
1575 <dia:enum val="22"/>
1576 </dia:attribute>
1577 <dia:attribute name="end_arrow_length">
1578 <dia:real val="0.5"/>
1579 </dia:attribute>
1580 <dia:attribute name="end_arrow_width">
1581 <dia:real val="0.5"/>
1582 </dia:attribute>
1583 <dia:connections>
1584 <dia:connection handle="1" to="O37" connection="2"/>
1585 </dia:connections>
1586 </dia:object>
1587 </dia:layer>
1588</dia:diagram>
diff --git a/Documentation/DocBook/media/v4l/subdev-image-processing-full.svg b/Documentation/DocBook/media/v4l/subdev-image-processing-full.svg
new file mode 100644
index 000000000000..3322cf4c0093
--- /dev/null
+++ b/Documentation/DocBook/media/v4l/subdev-image-processing-full.svg
@@ -0,0 +1,163 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/PR-SVG-20010719/DTD/svg10.dtd">
3<svg width="59cm" height="18cm" viewBox="-186 71 1178 346" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
4 <g>
5 <rect style="fill: #ffffff" x="318.9" y="129" width="208.1" height="249"/>
6 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #ff765a" x="318.9" y="129" width="208.1" height="249"/>
7 </g>
8 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="-2" y="73" width="806" height="343"/>
9 <g>
10 <ellipse style="fill: #ffffff" cx="-12.5" cy="166.712" rx="8.5" ry="8.5"/>
11 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="-12.5" cy="166.712" rx="8.5" ry="8.5"/>
12 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="-12.5" cy="166.712" rx="8.5" ry="8.5"/>
13 </g>
14 <g>
15 <ellipse style="fill: #ffffff" cx="815.232" cy="205.184" rx="8.5" ry="8.5"/>
16 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="815.232" cy="205.184" rx="8.5" ry="8.5"/>
17 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="815.232" cy="205.184" rx="8.5" ry="8.5"/>
18 </g>
19 <g>
20 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="-184.5" y1="167" x2="-30.7361" y2="166.729"/>
21 <polygon style="fill: #000000" points="-23.2361,166.716 -33.2272,171.734 -30.7361,166.729 -33.2449,161.734 "/>
22 <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="-23.2361,166.716 -33.2272,171.734 -30.7361,166.729 -33.2449,161.734 "/>
23 </g>
24 <g>
25 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="823.732" y1="205.184" x2="980.066" y2="205.212"/>
26 <polygon style="fill: #000000" points="987.566,205.214 977.565,210.212 980.066,205.212 977.567,200.212 "/>
27 <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="987.566,205.214 977.565,210.212 980.066,205.212 977.567,200.212 "/>
28 </g>
29 <text style="fill: #000000;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="-139.96" y="155">
30 <tspan x="-139.96" y="155">pad 0 (sink)</tspan>
31 </text>
32 <text style="fill: #000000;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="849.04" y="195">
33 <tspan x="849.04" y="195">pad 2 (source)</tspan>
34 </text>
35 <g>
36 <rect style="fill: #ffffff" x="5.5" y="120" width="159" height="104"/>
37 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #a52a2a" x="5.5" y="120" width="159" height="104"/>
38 </g>
39 <g>
40 <rect style="fill: #ffffff" x="62.5" y="136" width="94" height="77"/>
41 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #0000ff" x="62.5" y="136" width="94" height="77"/>
42 </g>
43 <text style="fill: #000000;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="30.5" y="89">
44 <tspan x="30.5" y="89"></tspan>
45 </text>
46 <text style="fill: #a52a2a;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="9.53836" y="88.9138">
47 <tspan x="9.53836" y="88.9138">sink media</tspan>
48 <tspan x="9.53836" y="104.914">bus format</tspan>
49 </text>
50 <g>
51 <rect style="fill: #ffffff" x="333.644" y="185.65" width="165.2" height="172.478"/>
52 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #00ff00" x="333.644" y="185.65" width="165.2" height="172.478"/>
53 </g>
54 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="333.644" y1="358.128" x2="62.5" y2="213"/>
55 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="333.644" y1="185.65" x2="62.5" y2="136"/>
56 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="498.844" y1="358.128" x2="156.5" y2="213"/>
57 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="498.844" y1="185.65" x2="156.5" y2="136"/>
58 <text style="fill: #00ff00;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="334.704" y="149.442">
59 <tspan x="334.704" y="149.442">sink compose</tspan>
60 <tspan x="334.704" y="165.442">selection (scaling)</tspan>
61 </text>
62 <g>
63 <rect style="fill: #ffffff" x="409.322" y="194.565" width="100.186" height="71.4523"/>
64 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #a020f0" x="409.322" y="194.565" width="100.186" height="71.4523"/>
65 </g>
66 <text style="fill: #8b6914;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="689.5" y="105.128">
67 <tspan x="689.5" y="105.128">source media</tspan>
68 <tspan x="689.5" y="121.128">bus format</tspan>
69 </text>
70 <g>
71 <rect style="fill: #ffffff" x="688.488" y="173.834" width="100.186" height="71.4523"/>
72 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #8b6914" x="688.488" y="173.834" width="100.186" height="71.4523"/>
73 </g>
74 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="688.488" y1="245.286" x2="409.322" y2="266.018"/>
75 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="688.488" y1="173.834" x2="409.322" y2="194.565"/>
76 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="788.674" y1="245.286" x2="509.508" y2="266.018"/>
77 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="788.674" y1="173.834" x2="509.508" y2="194.565"/>
78 <text style="fill: #ff765a;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="325" y="103">
79 <tspan x="325" y="103">sink compose</tspan>
80 <tspan x="325" y="119">bounds selection</tspan>
81 </text>
82 <g>
83 <ellipse style="fill: #ffffff" cx="-12.0982" cy="341.512" rx="8.5" ry="8.5"/>
84 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="-12.0982" cy="341.512" rx="8.5" ry="8.5"/>
85 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="-12.0982" cy="341.512" rx="8.5" ry="8.5"/>
86 </g>
87 <g>
88 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="-184.098" y1="341.8" x2="-30.3343" y2="341.529"/>
89 <polygon style="fill: #000000" points="-22.8343,341.516 -32.8254,346.534 -30.3343,341.529 -32.8431,336.534 "/>
90 <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="-22.8343,341.516 -32.8254,346.534 -30.3343,341.529 -32.8431,336.534 "/>
91 </g>
92 <text style="fill: #000000;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="-139" y="329">
93 <tspan x="-139" y="329">pad 1 (sink)</tspan>
94 </text>
95 <g>
96 <rect style="fill: #ffffff" x="7.80824" y="292.8" width="112.092" height="82.2"/>
97 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #a52a2a" x="7.80824" y="292.8" width="112.092" height="82.2"/>
98 </g>
99 <g>
100 <rect style="fill: #ffffff" x="52.9" y="314.8" width="58.1" height="50.2"/>
101 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #0000ff" x="52.9" y="314.8" width="58.1" height="50.2"/>
102 </g>
103 <text style="fill: #000000;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="31.9" y="259.8">
104 <tspan x="31.9" y="259.8"></tspan>
105 </text>
106 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="358.9" y1="251.9" x2="52.9" y2="314.8"/>
107 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="358.9" y1="316" x2="52.9" y2="365"/>
108 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="434" y1="316" x2="111" y2="365"/>
109 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="434" y1="251.9" x2="111" y2="314.8"/>
110 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #00ff00" x="358.9" y="251.9" width="75.1" height="64.1"/>
111 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #a020f0" x="443.262" y="284.466" width="64.738" height="48.534"/>
112 <g>
113 <rect style="fill: #ffffff" x="693.428" y="324.734" width="63.572" height="49.266"/>
114 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #8b6914" x="693.428" y="324.734" width="63.572" height="49.266"/>
115 </g>
116 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="693.428" y1="374" x2="443.262" y2="333"/>
117 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="693.428" y1="324.734" x2="443.262" y2="284.466"/>
118 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="757" y1="374" x2="508" y2="333"/>
119 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="757" y1="324.734" x2="508" y2="284.466"/>
120 <g>
121 <ellipse style="fill: #ffffff" cx="815.44" cy="343.984" rx="8.5" ry="8.5"/>
122 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="815.44" cy="343.984" rx="8.5" ry="8.5"/>
123 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="815.44" cy="343.984" rx="8.5" ry="8.5"/>
124 </g>
125 <g>
126 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="823.94" y1="343.984" x2="980.274" y2="344.012"/>
127 <polygon style="fill: #000000" points="987.774,344.014 977.773,349.012 980.274,344.012 977.775,339.012 "/>
128 <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="987.774,344.014 977.773,349.012 980.274,344.012 977.775,339.012 "/>
129 </g>
130 <text style="fill: #000000;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="849.248" y="333.8">
131 <tspan x="849.248" y="333.8">pad 3 (source)</tspan>
132 </text>
133 <text style="fill: #0000ff;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="197" y="91">
134 <tspan x="197" y="91">sink</tspan>
135 <tspan x="197" y="107">crop</tspan>
136 <tspan x="197" y="123">selection</tspan>
137 </text>
138 <text style="fill: #a020f0;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="553" y="95">
139 <tspan x="553" y="95">source</tspan>
140 <tspan x="553" y="111">crop</tspan>
141 <tspan x="553" y="127">selection</tspan>
142 </text>
143 <g>
144 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #0000ff" x1="211" y1="132" x2="166.21" y2="135.287"/>
145 <polygon style="fill: #0000ff" points="158.73,135.836 168.337,130.118 166.21,135.287 169.069,140.091 "/>
146 <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #0000ff" points="158.73,135.836 168.337,130.118 166.21,135.287 169.069,140.091 "/>
147 </g>
148 <g>
149 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #0000ff" x1="209" y1="131" x2="115.581" y2="306.209"/>
150 <polygon style="fill: #0000ff" points="112.052,312.827 112.345,301.65 115.581,306.209 121.169,306.355 "/>
151 <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #0000ff" points="112.052,312.827 112.345,301.65 115.581,306.209 121.169,306.355 "/>
152 </g>
153 <g>
154 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #a020f0" x1="550.492" y1="133.214" x2="514.916" y2="186.469"/>
155 <polygon style="fill: #a020f0" points="510.75,192.706 512.147,181.613 514.916,186.469 520.463,187.168 "/>
156 <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #a020f0" points="510.75,192.706 512.147,181.613 514.916,186.469 520.463,187.168 "/>
157 </g>
158 <g>
159 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #a020f0" x1="550.072" y1="133.787" x2="510.618" y2="275.089"/>
160 <polygon style="fill: #a020f0" points="508.601,282.312 506.475,271.336 510.618,275.089 516.106,274.025 "/>
161 <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #a020f0" points="508.601,282.312 506.475,271.336 510.618,275.089 516.106,274.025 "/>
162 </g>
163</svg>
diff --git a/Documentation/DocBook/media/v4l/subdev-image-processing-scaling-multi-source.dia b/Documentation/DocBook/media/v4l/subdev-image-processing-scaling-multi-source.dia
new file mode 100644
index 000000000000..0cd50a7bda80
--- /dev/null
+++ b/Documentation/DocBook/media/v4l/subdev-image-processing-scaling-multi-source.dia
@@ -0,0 +1,1152 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
3 <dia:diagramdata>
4 <dia:attribute name="background">
5 <dia:color val="#ffffff"/>
6 </dia:attribute>
7 <dia:attribute name="pagebreak">
8 <dia:color val="#000099"/>
9 </dia:attribute>
10 <dia:attribute name="paper">
11 <dia:composite type="paper">
12 <dia:attribute name="name">
13 <dia:string>#A4#</dia:string>
14 </dia:attribute>
15 <dia:attribute name="tmargin">
16 <dia:real val="2.8222000598907471"/>
17 </dia:attribute>
18 <dia:attribute name="bmargin">
19 <dia:real val="2.8222000598907471"/>
20 </dia:attribute>
21 <dia:attribute name="lmargin">
22 <dia:real val="2.8222000598907471"/>
23 </dia:attribute>
24 <dia:attribute name="rmargin">
25 <dia:real val="2.8222000598907471"/>
26 </dia:attribute>
27 <dia:attribute name="is_portrait">
28 <dia:boolean val="false"/>
29 </dia:attribute>
30 <dia:attribute name="scaling">
31 <dia:real val="0.49000000953674316"/>
32 </dia:attribute>
33 <dia:attribute name="fitto">
34 <dia:boolean val="false"/>
35 </dia:attribute>
36 </dia:composite>
37 </dia:attribute>
38 <dia:attribute name="grid">
39 <dia:composite type="grid">
40 <dia:attribute name="width_x">
41 <dia:real val="1"/>
42 </dia:attribute>
43 <dia:attribute name="width_y">
44 <dia:real val="1"/>
45 </dia:attribute>
46 <dia:attribute name="visible_x">
47 <dia:int val="1"/>
48 </dia:attribute>
49 <dia:attribute name="visible_y">
50 <dia:int val="1"/>
51 </dia:attribute>
52 <dia:composite type="color"/>
53 </dia:composite>
54 </dia:attribute>
55 <dia:attribute name="color">
56 <dia:color val="#d8e5e5"/>
57 </dia:attribute>
58 <dia:attribute name="guides">
59 <dia:composite type="guides">
60 <dia:attribute name="hguides"/>
61 <dia:attribute name="vguides"/>
62 </dia:composite>
63 </dia:attribute>
64 </dia:diagramdata>
65 <dia:layer name="Background" visible="true" active="true">
66 <dia:object type="Standard - Box" version="0" id="O0">
67 <dia:attribute name="obj_pos">
68 <dia:point val="-0.4,6.5"/>
69 </dia:attribute>
70 <dia:attribute name="obj_bb">
71 <dia:rectangle val="-0.45,6.45;39.95,22.9"/>
72 </dia:attribute>
73 <dia:attribute name="elem_corner">
74 <dia:point val="-0.4,6.5"/>
75 </dia:attribute>
76 <dia:attribute name="elem_width">
77 <dia:real val="40.299999999999997"/>
78 </dia:attribute>
79 <dia:attribute name="elem_height">
80 <dia:real val="16.349999999999998"/>
81 </dia:attribute>
82 <dia:attribute name="border_width">
83 <dia:real val="0.10000000149011612"/>
84 </dia:attribute>
85 <dia:attribute name="show_background">
86 <dia:boolean val="false"/>
87 </dia:attribute>
88 </dia:object>
89 <dia:object type="Standard - Box" version="0" id="O1">
90 <dia:attribute name="obj_pos">
91 <dia:point val="0.225,9.45"/>
92 </dia:attribute>
93 <dia:attribute name="obj_bb">
94 <dia:rectangle val="0.175,9.4;8.225,14.7"/>
95 </dia:attribute>
96 <dia:attribute name="elem_corner">
97 <dia:point val="0.225,9.45"/>
98 </dia:attribute>
99 <dia:attribute name="elem_width">
100 <dia:real val="7.9499999999999975"/>
101 </dia:attribute>
102 <dia:attribute name="elem_height">
103 <dia:real val="5.1999999999999975"/>
104 </dia:attribute>
105 <dia:attribute name="border_width">
106 <dia:real val="0.10000000149011612"/>
107 </dia:attribute>
108 <dia:attribute name="border_color">
109 <dia:color val="#a52a2a"/>
110 </dia:attribute>
111 <dia:attribute name="show_background">
112 <dia:boolean val="true"/>
113 </dia:attribute>
114 </dia:object>
115 <dia:object type="Standard - Box" version="0" id="O2">
116 <dia:attribute name="obj_pos">
117 <dia:point val="2.475,10.2"/>
118 </dia:attribute>
119 <dia:attribute name="obj_bb">
120 <dia:rectangle val="2.425,10.15;7.225,14.1"/>
121 </dia:attribute>
122 <dia:attribute name="elem_corner">
123 <dia:point val="2.475,10.2"/>
124 </dia:attribute>
125 <dia:attribute name="elem_width">
126 <dia:real val="4.6999999999999975"/>
127 </dia:attribute>
128 <dia:attribute name="elem_height">
129 <dia:real val="3.8499999999999979"/>
130 </dia:attribute>
131 <dia:attribute name="border_width">
132 <dia:real val="0.10000000149011612"/>
133 </dia:attribute>
134 <dia:attribute name="border_color">
135 <dia:color val="#0000ff"/>
136 </dia:attribute>
137 <dia:attribute name="show_background">
138 <dia:boolean val="true"/>
139 </dia:attribute>
140 </dia:object>
141 <dia:object type="Standard - Text" version="1" id="O3">
142 <dia:attribute name="obj_pos">
143 <dia:point val="3,11.2"/>
144 </dia:attribute>
145 <dia:attribute name="obj_bb">
146 <dia:rectangle val="3,10.605;5.8775,12.9525"/>
147 </dia:attribute>
148 <dia:attribute name="text">
149 <dia:composite type="text">
150 <dia:attribute name="string">
151 <dia:string>#sink
152crop
153selection#</dia:string>
154 </dia:attribute>
155 <dia:attribute name="font">
156 <dia:font family="sans" style="0" name="Helvetica"/>
157 </dia:attribute>
158 <dia:attribute name="height">
159 <dia:real val="0.80000000000000004"/>
160 </dia:attribute>
161 <dia:attribute name="pos">
162 <dia:point val="3,11.2"/>
163 </dia:attribute>
164 <dia:attribute name="color">
165 <dia:color val="#0000ff"/>
166 </dia:attribute>
167 <dia:attribute name="alignment">
168 <dia:enum val="0"/>
169 </dia:attribute>
170 </dia:composite>
171 </dia:attribute>
172 <dia:attribute name="valign">
173 <dia:enum val="3"/>
174 </dia:attribute>
175 </dia:object>
176 <dia:object type="Standard - Text" version="1" id="O4">
177 <dia:attribute name="obj_pos">
178 <dia:point val="1.475,7.9"/>
179 </dia:attribute>
180 <dia:attribute name="obj_bb">
181 <dia:rectangle val="1.475,7.305;1.475,8.0525"/>
182 </dia:attribute>
183 <dia:attribute name="text">
184 <dia:composite type="text">
185 <dia:attribute name="string">
186 <dia:string>##</dia:string>
187 </dia:attribute>
188 <dia:attribute name="font">
189 <dia:font family="sans" style="0" name="Helvetica"/>
190 </dia:attribute>
191 <dia:attribute name="height">
192 <dia:real val="0.80000000000000004"/>
193 </dia:attribute>
194 <dia:attribute name="pos">
195 <dia:point val="1.475,7.9"/>
196 </dia:attribute>
197 <dia:attribute name="color">
198 <dia:color val="#000000"/>
199 </dia:attribute>
200 <dia:attribute name="alignment">
201 <dia:enum val="0"/>
202 </dia:attribute>
203 </dia:composite>
204 </dia:attribute>
205 <dia:attribute name="valign">
206 <dia:enum val="3"/>
207 </dia:attribute>
208 </dia:object>
209 <dia:object type="Standard - Text" version="1" id="O5">
210 <dia:attribute name="obj_pos">
211 <dia:point val="0.426918,7.89569"/>
212 </dia:attribute>
213 <dia:attribute name="obj_bb">
214 <dia:rectangle val="0.426918,7.30069;3.90942,8.84819"/>
215 </dia:attribute>
216 <dia:attribute name="text">
217 <dia:composite type="text">
218 <dia:attribute name="string">
219 <dia:string>#sink media
220bus format#</dia:string>
221 </dia:attribute>
222 <dia:attribute name="font">
223 <dia:font family="sans" style="0" name="Helvetica"/>
224 </dia:attribute>
225 <dia:attribute name="height">
226 <dia:real val="0.80000000000000004"/>
227 </dia:attribute>
228 <dia:attribute name="pos">
229 <dia:point val="0.426918,7.89569"/>
230 </dia:attribute>
231 <dia:attribute name="color">
232 <dia:color val="#a52a2a"/>
233 </dia:attribute>
234 <dia:attribute name="alignment">
235 <dia:enum val="0"/>
236 </dia:attribute>
237 </dia:composite>
238 </dia:attribute>
239 <dia:attribute name="valign">
240 <dia:enum val="3"/>
241 </dia:attribute>
242 </dia:object>
243 <dia:object type="Standard - Box" version="0" id="O6">
244 <dia:attribute name="obj_pos">
245 <dia:point val="16.6822,9.28251"/>
246 </dia:attribute>
247 <dia:attribute name="obj_bb">
248 <dia:rectangle val="16.6322,9.23251;24.9922,17.9564"/>
249 </dia:attribute>
250 <dia:attribute name="elem_corner">
251 <dia:point val="16.6822,9.28251"/>
252 </dia:attribute>
253 <dia:attribute name="elem_width">
254 <dia:real val="8.2600228398861297"/>
255 </dia:attribute>
256 <dia:attribute name="elem_height">
257 <dia:real val="8.6238900617957164"/>
258 </dia:attribute>
259 <dia:attribute name="border_width">
260 <dia:real val="0.10000000149011612"/>
261 </dia:attribute>
262 <dia:attribute name="border_color">
263 <dia:color val="#00ff00"/>
264 </dia:attribute>
265 <dia:attribute name="show_background">
266 <dia:boolean val="true"/>
267 </dia:attribute>
268 </dia:object>
269 <dia:object type="Standard - Line" version="0" id="O7">
270 <dia:attribute name="obj_pos">
271 <dia:point val="16.6822,17.9064"/>
272 </dia:attribute>
273 <dia:attribute name="obj_bb">
274 <dia:rectangle val="2.41365,13.9886;16.7436,17.9678"/>
275 </dia:attribute>
276 <dia:attribute name="conn_endpoints">
277 <dia:point val="16.6822,17.9064"/>
278 <dia:point val="2.475,14.05"/>
279 </dia:attribute>
280 <dia:attribute name="numcp">
281 <dia:int val="1"/>
282 </dia:attribute>
283 <dia:attribute name="line_color">
284 <dia:color val="#e60505"/>
285 </dia:attribute>
286 <dia:attribute name="line_style">
287 <dia:enum val="4"/>
288 </dia:attribute>
289 <dia:connections>
290 <dia:connection handle="0" to="O6" connection="5"/>
291 <dia:connection handle="1" to="O2" connection="5"/>
292 </dia:connections>
293 </dia:object>
294 <dia:object type="Standard - Line" version="0" id="O8">
295 <dia:attribute name="obj_pos">
296 <dia:point val="16.6822,9.28251"/>
297 </dia:attribute>
298 <dia:attribute name="obj_bb">
299 <dia:rectangle val="2.42188,9.22939;16.7353,10.2531"/>
300 </dia:attribute>
301 <dia:attribute name="conn_endpoints">
302 <dia:point val="16.6822,9.28251"/>
303 <dia:point val="2.475,10.2"/>
304 </dia:attribute>
305 <dia:attribute name="numcp">
306 <dia:int val="1"/>
307 </dia:attribute>
308 <dia:attribute name="line_color">
309 <dia:color val="#e60505"/>
310 </dia:attribute>
311 <dia:attribute name="line_style">
312 <dia:enum val="4"/>
313 </dia:attribute>
314 <dia:connections>
315 <dia:connection handle="0" to="O6" connection="0"/>
316 <dia:connection handle="1" to="O2" connection="0"/>
317 </dia:connections>
318 </dia:object>
319 <dia:object type="Standard - Line" version="0" id="O9">
320 <dia:attribute name="obj_pos">
321 <dia:point val="24.9422,17.9064"/>
322 </dia:attribute>
323 <dia:attribute name="obj_bb">
324 <dia:rectangle val="7.11553,13.9905;25.0017,17.9659"/>
325 </dia:attribute>
326 <dia:attribute name="conn_endpoints">
327 <dia:point val="24.9422,17.9064"/>
328 <dia:point val="7.175,14.05"/>
329 </dia:attribute>
330 <dia:attribute name="numcp">
331 <dia:int val="1"/>
332 </dia:attribute>
333 <dia:attribute name="line_color">
334 <dia:color val="#e60505"/>
335 </dia:attribute>
336 <dia:attribute name="line_style">
337 <dia:enum val="4"/>
338 </dia:attribute>
339 <dia:connections>
340 <dia:connection handle="0" to="O6" connection="7"/>
341 <dia:connection handle="1" to="O2" connection="7"/>
342 </dia:connections>
343 </dia:object>
344 <dia:object type="Standard - Line" version="0" id="O10">
345 <dia:attribute name="obj_pos">
346 <dia:point val="24.9422,9.28251"/>
347 </dia:attribute>
348 <dia:attribute name="obj_bb">
349 <dia:rectangle val="7.12249,9.23;24.9947,10.2525"/>
350 </dia:attribute>
351 <dia:attribute name="conn_endpoints">
352 <dia:point val="24.9422,9.28251"/>
353 <dia:point val="7.175,10.2"/>
354 </dia:attribute>
355 <dia:attribute name="numcp">
356 <dia:int val="1"/>
357 </dia:attribute>
358 <dia:attribute name="line_color">
359 <dia:color val="#e60505"/>
360 </dia:attribute>
361 <dia:attribute name="line_style">
362 <dia:enum val="4"/>
363 </dia:attribute>
364 <dia:connections>
365 <dia:connection handle="0" to="O6" connection="2"/>
366 <dia:connection handle="1" to="O2" connection="2"/>
367 </dia:connections>
368 </dia:object>
369 <dia:object type="Standard - Text" version="1" id="O11">
370 <dia:attribute name="obj_pos">
371 <dia:point val="16.7352,7.47209"/>
372 </dia:attribute>
373 <dia:attribute name="obj_bb">
374 <dia:rectangle val="16.7352,6.87709;22.5602,8.42459"/>
375 </dia:attribute>
376 <dia:attribute name="text">
377 <dia:composite type="text">
378 <dia:attribute name="string">
379 <dia:string>#sink compose
380selection (scaling)#</dia:string>
381 </dia:attribute>
382 <dia:attribute name="font">
383 <dia:font family="sans" style="0" name="Helvetica"/>
384 </dia:attribute>
385 <dia:attribute name="height">
386 <dia:real val="0.80000000000000004"/>
387 </dia:attribute>
388 <dia:attribute name="pos">
389 <dia:point val="16.7352,7.47209"/>
390 </dia:attribute>
391 <dia:attribute name="color">
392 <dia:color val="#00ff00"/>
393 </dia:attribute>
394 <dia:attribute name="alignment">
395 <dia:enum val="0"/>
396 </dia:attribute>
397 </dia:composite>
398 </dia:attribute>
399 <dia:attribute name="valign">
400 <dia:enum val="3"/>
401 </dia:attribute>
402 </dia:object>
403 <dia:object type="Standard - Box" version="0" id="O12">
404 <dia:attribute name="obj_pos">
405 <dia:point val="19.1161,9.97825"/>
406 </dia:attribute>
407 <dia:attribute name="obj_bb">
408 <dia:rectangle val="19.0661,9.92825;24.1754,13.6009"/>
409 </dia:attribute>
410 <dia:attribute name="elem_corner">
411 <dia:point val="19.1161,9.97825"/>
412 </dia:attribute>
413 <dia:attribute name="elem_width">
414 <dia:real val="5.009308462554376"/>
415 </dia:attribute>
416 <dia:attribute name="elem_height">
417 <dia:real val="3.5726155970598077"/>
418 </dia:attribute>
419 <dia:attribute name="border_width">
420 <dia:real val="0.10000000149011612"/>
421 </dia:attribute>
422 <dia:attribute name="border_color">
423 <dia:color val="#a020f0"/>
424 </dia:attribute>
425 <dia:attribute name="show_background">
426 <dia:boolean val="true"/>
427 </dia:attribute>
428 </dia:object>
429 <dia:object type="Standard - Text" version="1" id="O13">
430 <dia:attribute name="obj_pos">
431 <dia:point val="27.1661,7.47209"/>
432 </dia:attribute>
433 <dia:attribute name="obj_bb">
434 <dia:rectangle val="27.1661,6.87709;30.0436,9.22459"/>
435 </dia:attribute>
436 <dia:attribute name="text">
437 <dia:composite type="text">
438 <dia:attribute name="string">
439 <dia:string>#source
440crop
441selection#</dia:string>
442 </dia:attribute>
443 <dia:attribute name="font">
444 <dia:font family="sans" style="0" name="Helvetica"/>
445 </dia:attribute>
446 <dia:attribute name="height">
447 <dia:real val="0.80000000000000004"/>
448 </dia:attribute>
449 <dia:attribute name="pos">
450 <dia:point val="27.1661,7.47209"/>
451 </dia:attribute>
452 <dia:attribute name="color">
453 <dia:color val="#a020f0"/>
454 </dia:attribute>
455 <dia:attribute name="alignment">
456 <dia:enum val="0"/>
457 </dia:attribute>
458 </dia:composite>
459 </dia:attribute>
460 <dia:attribute name="valign">
461 <dia:enum val="3"/>
462 </dia:attribute>
463 </dia:object>
464 <dia:object type="Standard - Text" version="1" id="O14">
465 <dia:attribute name="obj_pos">
466 <dia:point val="34.575,7.8564"/>
467 </dia:attribute>
468 <dia:attribute name="obj_bb">
469 <dia:rectangle val="34.575,7.2614;38.8975,8.8089"/>
470 </dia:attribute>
471 <dia:attribute name="text">
472 <dia:composite type="text">
473 <dia:attribute name="string">
474 <dia:string>#source media
475bus format#</dia:string>
476 </dia:attribute>
477 <dia:attribute name="font">
478 <dia:font family="sans" style="0" name="Helvetica"/>
479 </dia:attribute>
480 <dia:attribute name="height">
481 <dia:real val="0.80000000000000004"/>
482 </dia:attribute>
483 <dia:attribute name="pos">
484 <dia:point val="34.575,7.8564"/>
485 </dia:attribute>
486 <dia:attribute name="color">
487 <dia:color val="#8b6914"/>
488 </dia:attribute>
489 <dia:attribute name="alignment">
490 <dia:enum val="0"/>
491 </dia:attribute>
492 </dia:composite>
493 </dia:attribute>
494 <dia:attribute name="valign">
495 <dia:enum val="3"/>
496 </dia:attribute>
497 </dia:object>
498 <dia:object type="Standard - Box" version="0" id="O15">
499 <dia:attribute name="obj_pos">
500 <dia:point val="34.5244,11.2917"/>
501 </dia:attribute>
502 <dia:attribute name="obj_bb">
503 <dia:rectangle val="34.4744,11.2417;39.5837,14.9143"/>
504 </dia:attribute>
505 <dia:attribute name="elem_corner">
506 <dia:point val="34.5244,11.2917"/>
507 </dia:attribute>
508 <dia:attribute name="elem_width">
509 <dia:real val="5.009308462554376"/>
510 </dia:attribute>
511 <dia:attribute name="elem_height">
512 <dia:real val="3.5726155970598077"/>
513 </dia:attribute>
514 <dia:attribute name="border_width">
515 <dia:real val="0.10000000149011612"/>
516 </dia:attribute>
517 <dia:attribute name="border_color">
518 <dia:color val="#8b6914"/>
519 </dia:attribute>
520 <dia:attribute name="show_background">
521 <dia:boolean val="true"/>
522 </dia:attribute>
523 </dia:object>
524 <dia:object type="Standard - Line" version="0" id="O16">
525 <dia:attribute name="obj_pos">
526 <dia:point val="34.5244,14.8643"/>
527 </dia:attribute>
528 <dia:attribute name="obj_bb">
529 <dia:rectangle val="19.062,13.4968;34.5785,14.9184"/>
530 </dia:attribute>
531 <dia:attribute name="conn_endpoints">
532 <dia:point val="34.5244,14.8643"/>
533 <dia:point val="19.1161,13.5509"/>
534 </dia:attribute>
535 <dia:attribute name="numcp">
536 <dia:int val="1"/>
537 </dia:attribute>
538 <dia:attribute name="line_color">
539 <dia:color val="#e60505"/>
540 </dia:attribute>
541 <dia:attribute name="line_style">
542 <dia:enum val="4"/>
543 </dia:attribute>
544 <dia:connections>
545 <dia:connection handle="0" to="O15" connection="5"/>
546 <dia:connection handle="1" to="O12" connection="5"/>
547 </dia:connections>
548 </dia:object>
549 <dia:object type="Standard - Line" version="0" id="O17">
550 <dia:attribute name="obj_pos">
551 <dia:point val="34.5244,11.2917"/>
552 </dia:attribute>
553 <dia:attribute name="obj_bb">
554 <dia:rectangle val="19.062,9.92418;34.5785,11.3458"/>
555 </dia:attribute>
556 <dia:attribute name="conn_endpoints">
557 <dia:point val="34.5244,11.2917"/>
558 <dia:point val="19.1161,9.97825"/>
559 </dia:attribute>
560 <dia:attribute name="numcp">
561 <dia:int val="1"/>
562 </dia:attribute>
563 <dia:attribute name="line_color">
564 <dia:color val="#e60505"/>
565 </dia:attribute>
566 <dia:attribute name="line_style">
567 <dia:enum val="4"/>
568 </dia:attribute>
569 <dia:connections>
570 <dia:connection handle="0" to="O15" connection="0"/>
571 <dia:connection handle="1" to="O12" connection="0"/>
572 </dia:connections>
573 </dia:object>
574 <dia:object type="Standard - Line" version="0" id="O18">
575 <dia:attribute name="obj_pos">
576 <dia:point val="39.5337,14.8643"/>
577 </dia:attribute>
578 <dia:attribute name="obj_bb">
579 <dia:rectangle val="24.0713,13.4968;39.5878,14.9184"/>
580 </dia:attribute>
581 <dia:attribute name="conn_endpoints">
582 <dia:point val="39.5337,14.8643"/>
583 <dia:point val="24.1254,13.5509"/>
584 </dia:attribute>
585 <dia:attribute name="numcp">
586 <dia:int val="1"/>
587 </dia:attribute>
588 <dia:attribute name="line_color">
589 <dia:color val="#e60505"/>
590 </dia:attribute>
591 <dia:attribute name="line_style">
592 <dia:enum val="4"/>
593 </dia:attribute>
594 <dia:connections>
595 <dia:connection handle="0" to="O15" connection="7"/>
596 <dia:connection handle="1" to="O12" connection="7"/>
597 </dia:connections>
598 </dia:object>
599 <dia:object type="Standard - Line" version="0" id="O19">
600 <dia:attribute name="obj_pos">
601 <dia:point val="39.5337,11.2917"/>
602 </dia:attribute>
603 <dia:attribute name="obj_bb">
604 <dia:rectangle val="24.0713,9.92418;39.5878,11.3458"/>
605 </dia:attribute>
606 <dia:attribute name="conn_endpoints">
607 <dia:point val="39.5337,11.2917"/>
608 <dia:point val="24.1254,9.97825"/>
609 </dia:attribute>
610 <dia:attribute name="numcp">
611 <dia:int val="1"/>
612 </dia:attribute>
613 <dia:attribute name="line_color">
614 <dia:color val="#e60505"/>
615 </dia:attribute>
616 <dia:attribute name="line_style">
617 <dia:enum val="4"/>
618 </dia:attribute>
619 <dia:connections>
620 <dia:connection handle="0" to="O15" connection="2"/>
621 <dia:connection handle="1" to="O12" connection="2"/>
622 </dia:connections>
623 </dia:object>
624 <dia:object type="Geometric - Perfect Circle" version="1" id="O20">
625 <dia:attribute name="obj_pos">
626 <dia:point val="39.98,12.0742"/>
627 </dia:attribute>
628 <dia:attribute name="obj_bb">
629 <dia:rectangle val="39.93,12.0242;40.88,12.9742"/>
630 </dia:attribute>
631 <dia:attribute name="meta">
632 <dia:composite type="dict"/>
633 </dia:attribute>
634 <dia:attribute name="elem_corner">
635 <dia:point val="39.98,12.0742"/>
636 </dia:attribute>
637 <dia:attribute name="elem_width">
638 <dia:real val="0.84999999999999787"/>
639 </dia:attribute>
640 <dia:attribute name="elem_height">
641 <dia:real val="0.84999999999999787"/>
642 </dia:attribute>
643 <dia:attribute name="line_width">
644 <dia:real val="0.10000000000000001"/>
645 </dia:attribute>
646 <dia:attribute name="line_colour">
647 <dia:color val="#000000"/>
648 </dia:attribute>
649 <dia:attribute name="fill_colour">
650 <dia:color val="#ffffff"/>
651 </dia:attribute>
652 <dia:attribute name="show_background">
653 <dia:boolean val="true"/>
654 </dia:attribute>
655 <dia:attribute name="line_style">
656 <dia:enum val="0"/>
657 <dia:real val="1"/>
658 </dia:attribute>
659 <dia:attribute name="flip_horizontal">
660 <dia:boolean val="false"/>
661 </dia:attribute>
662 <dia:attribute name="flip_vertical">
663 <dia:boolean val="false"/>
664 </dia:attribute>
665 <dia:attribute name="subscale">
666 <dia:real val="1"/>
667 </dia:attribute>
668 </dia:object>
669 <dia:object type="Standard - Line" version="0" id="O21">
670 <dia:attribute name="obj_pos">
671 <dia:point val="40.83,12.4992"/>
672 </dia:attribute>
673 <dia:attribute name="obj_bb">
674 <dia:rectangle val="40.78,12.1388;49.2453,12.8624"/>
675 </dia:attribute>
676 <dia:attribute name="conn_endpoints">
677 <dia:point val="40.83,12.4992"/>
678 <dia:point val="49.1335,12.5007"/>
679 </dia:attribute>
680 <dia:attribute name="numcp">
681 <dia:int val="1"/>
682 </dia:attribute>
683 <dia:attribute name="end_arrow">
684 <dia:enum val="22"/>
685 </dia:attribute>
686 <dia:attribute name="end_arrow_length">
687 <dia:real val="0.5"/>
688 </dia:attribute>
689 <dia:attribute name="end_arrow_width">
690 <dia:real val="0.5"/>
691 </dia:attribute>
692 <dia:connections>
693 <dia:connection handle="0" to="O20" connection="3"/>
694 </dia:connections>
695 </dia:object>
696 <dia:object type="Standard - Text" version="1" id="O22">
697 <dia:attribute name="obj_pos">
698 <dia:point val="42.0954,11.99"/>
699 </dia:attribute>
700 <dia:attribute name="obj_bb">
701 <dia:rectangle val="42.0954,11.395;46.7404,12.1425"/>
702 </dia:attribute>
703 <dia:attribute name="text">
704 <dia:composite type="text">
705 <dia:attribute name="string">
706 <dia:string>#pad 1 (source)#</dia:string>
707 </dia:attribute>
708 <dia:attribute name="font">
709 <dia:font family="sans" style="0" name="Helvetica"/>
710 </dia:attribute>
711 <dia:attribute name="height">
712 <dia:real val="0.80000000000000004"/>
713 </dia:attribute>
714 <dia:attribute name="pos">
715 <dia:point val="42.0954,11.99"/>
716 </dia:attribute>
717 <dia:attribute name="color">
718 <dia:color val="#000000"/>
719 </dia:attribute>
720 <dia:attribute name="alignment">
721 <dia:enum val="0"/>
722 </dia:attribute>
723 </dia:composite>
724 </dia:attribute>
725 <dia:attribute name="valign">
726 <dia:enum val="3"/>
727 </dia:attribute>
728 </dia:object>
729 <dia:object type="Geometric - Perfect Circle" version="1" id="O23">
730 <dia:attribute name="obj_pos">
731 <dia:point val="-1.44491,11.6506"/>
732 </dia:attribute>
733 <dia:attribute name="obj_bb">
734 <dia:rectangle val="-1.49491,11.6006;-0.54491,12.5506"/>
735 </dia:attribute>
736 <dia:attribute name="meta">
737 <dia:composite type="dict"/>
738 </dia:attribute>
739 <dia:attribute name="elem_corner">
740 <dia:point val="-1.44491,11.6506"/>
741 </dia:attribute>
742 <dia:attribute name="elem_width">
743 <dia:real val="0.84999999999999787"/>
744 </dia:attribute>
745 <dia:attribute name="elem_height">
746 <dia:real val="0.84999999999999787"/>
747 </dia:attribute>
748 <dia:attribute name="line_width">
749 <dia:real val="0.10000000000000001"/>
750 </dia:attribute>
751 <dia:attribute name="line_colour">
752 <dia:color val="#000000"/>
753 </dia:attribute>
754 <dia:attribute name="fill_colour">
755 <dia:color val="#ffffff"/>
756 </dia:attribute>
757 <dia:attribute name="show_background">
758 <dia:boolean val="true"/>
759 </dia:attribute>
760 <dia:attribute name="line_style">
761 <dia:enum val="0"/>
762 <dia:real val="1"/>
763 </dia:attribute>
764 <dia:attribute name="flip_horizontal">
765 <dia:boolean val="false"/>
766 </dia:attribute>
767 <dia:attribute name="flip_vertical">
768 <dia:boolean val="false"/>
769 </dia:attribute>
770 <dia:attribute name="subscale">
771 <dia:real val="1"/>
772 </dia:attribute>
773 </dia:object>
774 <dia:object type="Standard - Line" version="0" id="O24">
775 <dia:attribute name="obj_pos">
776 <dia:point val="-9.61991,12.09"/>
777 </dia:attribute>
778 <dia:attribute name="obj_bb">
779 <dia:rectangle val="-9.67,11.7149;-1.33311,12.4385"/>
780 </dia:attribute>
781 <dia:attribute name="conn_endpoints">
782 <dia:point val="-9.61991,12.09"/>
783 <dia:point val="-1.44491,12.0756"/>
784 </dia:attribute>
785 <dia:attribute name="numcp">
786 <dia:int val="1"/>
787 </dia:attribute>
788 <dia:attribute name="end_arrow">
789 <dia:enum val="22"/>
790 </dia:attribute>
791 <dia:attribute name="end_arrow_length">
792 <dia:real val="0.5"/>
793 </dia:attribute>
794 <dia:attribute name="end_arrow_width">
795 <dia:real val="0.5"/>
796 </dia:attribute>
797 <dia:connections>
798 <dia:connection handle="1" to="O23" connection="2"/>
799 </dia:connections>
800 </dia:object>
801 <dia:object type="Standard - Text" version="1" id="O25">
802 <dia:attribute name="obj_pos">
803 <dia:point val="-7.39291,11.49"/>
804 </dia:attribute>
805 <dia:attribute name="obj_bb">
806 <dia:rectangle val="-7.39291,10.895;-3.58791,11.6425"/>
807 </dia:attribute>
808 <dia:attribute name="text">
809 <dia:composite type="text">
810 <dia:attribute name="string">
811 <dia:string>#pad 0 (sink)#</dia:string>
812 </dia:attribute>
813 <dia:attribute name="font">
814 <dia:font family="sans" style="0" name="Helvetica"/>
815 </dia:attribute>
816 <dia:attribute name="height">
817 <dia:real val="0.80000000000000004"/>
818 </dia:attribute>
819 <dia:attribute name="pos">
820 <dia:point val="-7.39291,11.49"/>
821 </dia:attribute>
822 <dia:attribute name="color">
823 <dia:color val="#000000"/>
824 </dia:attribute>
825 <dia:attribute name="alignment">
826 <dia:enum val="0"/>
827 </dia:attribute>
828 </dia:composite>
829 </dia:attribute>
830 <dia:attribute name="valign">
831 <dia:enum val="3"/>
832 </dia:attribute>
833 </dia:object>
834 <dia:object type="Standard - Box" version="0" id="O26">
835 <dia:attribute name="obj_pos">
836 <dia:point val="19.4911,13.8333"/>
837 </dia:attribute>
838 <dia:attribute name="obj_bb">
839 <dia:rectangle val="19.4411,13.7833;24.5504,17.4559"/>
840 </dia:attribute>
841 <dia:attribute name="elem_corner">
842 <dia:point val="19.4911,13.8333"/>
843 </dia:attribute>
844 <dia:attribute name="elem_width">
845 <dia:real val="5.009308462554376"/>
846 </dia:attribute>
847 <dia:attribute name="elem_height">
848 <dia:real val="3.5726155970598077"/>
849 </dia:attribute>
850 <dia:attribute name="border_width">
851 <dia:real val="0.10000000149011612"/>
852 </dia:attribute>
853 <dia:attribute name="border_color">
854 <dia:color val="#a020f0"/>
855 </dia:attribute>
856 <dia:attribute name="show_background">
857 <dia:boolean val="false"/>
858 </dia:attribute>
859 </dia:object>
860 <dia:object type="Standard - Box" version="0" id="O27">
861 <dia:attribute name="obj_pos">
862 <dia:point val="34.4994,17.2967"/>
863 </dia:attribute>
864 <dia:attribute name="obj_bb">
865 <dia:rectangle val="34.4494,17.2467;39.5587,20.9193"/>
866 </dia:attribute>
867 <dia:attribute name="elem_corner">
868 <dia:point val="34.4994,17.2967"/>
869 </dia:attribute>
870 <dia:attribute name="elem_width">
871 <dia:real val="5.009308462554376"/>
872 </dia:attribute>
873 <dia:attribute name="elem_height">
874 <dia:real val="3.5726155970598077"/>
875 </dia:attribute>
876 <dia:attribute name="border_width">
877 <dia:real val="0.10000000149011612"/>
878 </dia:attribute>
879 <dia:attribute name="border_color">
880 <dia:color val="#8b6914"/>
881 </dia:attribute>
882 <dia:attribute name="show_background">
883 <dia:boolean val="true"/>
884 </dia:attribute>
885 </dia:object>
886 <dia:object type="Standard - Line" version="0" id="O28">
887 <dia:attribute name="obj_pos">
888 <dia:point val="34.4994,20.8693"/>
889 </dia:attribute>
890 <dia:attribute name="obj_bb">
891 <dia:rectangle val="19.4311,17.3459;34.5594,20.9293"/>
892 </dia:attribute>
893 <dia:attribute name="conn_endpoints">
894 <dia:point val="34.4994,20.8693"/>
895 <dia:point val="19.4911,17.4059"/>
896 </dia:attribute>
897 <dia:attribute name="numcp">
898 <dia:int val="1"/>
899 </dia:attribute>
900 <dia:attribute name="line_color">
901 <dia:color val="#e60505"/>
902 </dia:attribute>
903 <dia:attribute name="line_style">
904 <dia:enum val="4"/>
905 </dia:attribute>
906 <dia:connections>
907 <dia:connection handle="0" to="O27" connection="5"/>
908 <dia:connection handle="1" to="O26" connection="5"/>
909 </dia:connections>
910 </dia:object>
911 <dia:object type="Standard - Line" version="0" id="O29">
912 <dia:attribute name="obj_pos">
913 <dia:point val="34.4994,17.2967"/>
914 </dia:attribute>
915 <dia:attribute name="obj_bb">
916 <dia:rectangle val="19.4311,13.7733;34.5594,17.3567"/>
917 </dia:attribute>
918 <dia:attribute name="conn_endpoints">
919 <dia:point val="34.4994,17.2967"/>
920 <dia:point val="19.4911,13.8333"/>
921 </dia:attribute>
922 <dia:attribute name="numcp">
923 <dia:int val="1"/>
924 </dia:attribute>
925 <dia:attribute name="line_color">
926 <dia:color val="#e60505"/>
927 </dia:attribute>
928 <dia:attribute name="line_style">
929 <dia:enum val="4"/>
930 </dia:attribute>
931 <dia:connections>
932 <dia:connection handle="0" to="O27" connection="0"/>
933 <dia:connection handle="1" to="O26" connection="0"/>
934 </dia:connections>
935 </dia:object>
936 <dia:object type="Standard - Line" version="0" id="O30">
937 <dia:attribute name="obj_pos">
938 <dia:point val="39.5087,20.8693"/>
939 </dia:attribute>
940 <dia:attribute name="obj_bb">
941 <dia:rectangle val="24.4404,17.3459;39.5687,20.9293"/>
942 </dia:attribute>
943 <dia:attribute name="conn_endpoints">
944 <dia:point val="39.5087,20.8693"/>
945 <dia:point val="24.5004,17.4059"/>
946 </dia:attribute>
947 <dia:attribute name="numcp">
948 <dia:int val="1"/>
949 </dia:attribute>
950 <dia:attribute name="line_color">
951 <dia:color val="#e60505"/>
952 </dia:attribute>
953 <dia:attribute name="line_style">
954 <dia:enum val="4"/>
955 </dia:attribute>
956 <dia:connections>
957 <dia:connection handle="0" to="O27" connection="7"/>
958 <dia:connection handle="1" to="O26" connection="7"/>
959 </dia:connections>
960 </dia:object>
961 <dia:object type="Standard - Line" version="0" id="O31">
962 <dia:attribute name="obj_pos">
963 <dia:point val="39.5087,17.2967"/>
964 </dia:attribute>
965 <dia:attribute name="obj_bb">
966 <dia:rectangle val="24.4404,13.7733;39.5687,17.3567"/>
967 </dia:attribute>
968 <dia:attribute name="conn_endpoints">
969 <dia:point val="39.5087,17.2967"/>
970 <dia:point val="24.5004,13.8333"/>
971 </dia:attribute>
972 <dia:attribute name="numcp">
973 <dia:int val="1"/>
974 </dia:attribute>
975 <dia:attribute name="line_color">
976 <dia:color val="#e60505"/>
977 </dia:attribute>
978 <dia:attribute name="line_style">
979 <dia:enum val="4"/>
980 </dia:attribute>
981 <dia:connections>
982 <dia:connection handle="0" to="O27" connection="2"/>
983 <dia:connection handle="1" to="O26" connection="2"/>
984 </dia:connections>
985 </dia:object>
986 <dia:object type="Geometric - Perfect Circle" version="1" id="O32">
987 <dia:attribute name="obj_pos">
988 <dia:point val="39.855,18.7792"/>
989 </dia:attribute>
990 <dia:attribute name="obj_bb">
991 <dia:rectangle val="39.805,18.7292;40.755,19.6792"/>
992 </dia:attribute>
993 <dia:attribute name="meta">
994 <dia:composite type="dict"/>
995 </dia:attribute>
996 <dia:attribute name="elem_corner">
997 <dia:point val="39.855,18.7792"/>
998 </dia:attribute>
999 <dia:attribute name="elem_width">
1000 <dia:real val="0.84999999999999787"/>
1001 </dia:attribute>
1002 <dia:attribute name="elem_height">
1003 <dia:real val="0.84999999999999787"/>
1004 </dia:attribute>
1005 <dia:attribute name="line_width">
1006 <dia:real val="0.10000000000000001"/>
1007 </dia:attribute>
1008 <dia:attribute name="line_colour">
1009 <dia:color val="#000000"/>
1010 </dia:attribute>
1011 <dia:attribute name="fill_colour">
1012 <dia:color val="#ffffff"/>
1013 </dia:attribute>
1014 <dia:attribute name="show_background">
1015 <dia:boolean val="true"/>
1016 </dia:attribute>
1017 <dia:attribute name="line_style">
1018 <dia:enum val="0"/>
1019 <dia:real val="1"/>
1020 </dia:attribute>
1021 <dia:attribute name="flip_horizontal">
1022 <dia:boolean val="false"/>
1023 </dia:attribute>
1024 <dia:attribute name="flip_vertical">
1025 <dia:boolean val="false"/>
1026 </dia:attribute>
1027 <dia:attribute name="subscale">
1028 <dia:real val="1"/>
1029 </dia:attribute>
1030 </dia:object>
1031 <dia:object type="Standard - Line" version="0" id="O33">
1032 <dia:attribute name="obj_pos">
1033 <dia:point val="40.705,19.2042"/>
1034 </dia:attribute>
1035 <dia:attribute name="obj_bb">
1036 <dia:rectangle val="40.655,18.8438;49.1203,19.5674"/>
1037 </dia:attribute>
1038 <dia:attribute name="conn_endpoints">
1039 <dia:point val="40.705,19.2042"/>
1040 <dia:point val="49.0085,19.2057"/>
1041 </dia:attribute>
1042 <dia:attribute name="numcp">
1043 <dia:int val="1"/>
1044 </dia:attribute>
1045 <dia:attribute name="end_arrow">
1046 <dia:enum val="22"/>
1047 </dia:attribute>
1048 <dia:attribute name="end_arrow_length">
1049 <dia:real val="0.5"/>
1050 </dia:attribute>
1051 <dia:attribute name="end_arrow_width">
1052 <dia:real val="0.5"/>
1053 </dia:attribute>
1054 <dia:connections>
1055 <dia:connection handle="0" to="O32" connection="3"/>
1056 </dia:connections>
1057 </dia:object>
1058 <dia:object type="Standard - Text" version="1" id="O34">
1059 <dia:attribute name="obj_pos">
1060 <dia:point val="41.9704,18.695"/>
1061 </dia:attribute>
1062 <dia:attribute name="obj_bb">
1063 <dia:rectangle val="41.9704,18.1;46.6154,18.8475"/>
1064 </dia:attribute>
1065 <dia:attribute name="text">
1066 <dia:composite type="text">
1067 <dia:attribute name="string">
1068 <dia:string>#pad 2 (source)#</dia:string>
1069 </dia:attribute>
1070 <dia:attribute name="font">
1071 <dia:font family="sans" style="0" name="Helvetica"/>
1072 </dia:attribute>
1073 <dia:attribute name="height">
1074 <dia:real val="0.80000000000000004"/>
1075 </dia:attribute>
1076 <dia:attribute name="pos">
1077 <dia:point val="41.9704,18.695"/>
1078 </dia:attribute>
1079 <dia:attribute name="color">
1080 <dia:color val="#000000"/>
1081 </dia:attribute>
1082 <dia:attribute name="alignment">
1083 <dia:enum val="0"/>
1084 </dia:attribute>
1085 </dia:composite>
1086 </dia:attribute>
1087 <dia:attribute name="valign">
1088 <dia:enum val="3"/>
1089 </dia:attribute>
1090 </dia:object>
1091 <dia:object type="Standard - Line" version="0" id="O35">
1092 <dia:attribute name="obj_pos">
1093 <dia:point val="27.3,9.55"/>
1094 </dia:attribute>
1095 <dia:attribute name="obj_bb">
1096 <dia:rectangle val="24.0146,9.49376;27.3562,10.255"/>
1097 </dia:attribute>
1098 <dia:attribute name="conn_endpoints">
1099 <dia:point val="27.3,9.55"/>
1100 <dia:point val="24.1254,9.97825"/>
1101 </dia:attribute>
1102 <dia:attribute name="numcp">
1103 <dia:int val="1"/>
1104 </dia:attribute>
1105 <dia:attribute name="line_color">
1106 <dia:color val="#a020f0"/>
1107 </dia:attribute>
1108 <dia:attribute name="end_arrow">
1109 <dia:enum val="22"/>
1110 </dia:attribute>
1111 <dia:attribute name="end_arrow_length">
1112 <dia:real val="0.5"/>
1113 </dia:attribute>
1114 <dia:attribute name="end_arrow_width">
1115 <dia:real val="0.5"/>
1116 </dia:attribute>
1117 <dia:connections>
1118 <dia:connection handle="1" to="O12" connection="2"/>
1119 </dia:connections>
1120 </dia:object>
1121 <dia:object type="Standard - Line" version="0" id="O36">
1122 <dia:attribute name="obj_pos">
1123 <dia:point val="27.3454,9.53624"/>
1124 </dia:attribute>
1125 <dia:attribute name="obj_bb">
1126 <dia:rectangle val="24.4311,9.46695;27.4147,13.9265"/>
1127 </dia:attribute>
1128 <dia:attribute name="conn_endpoints">
1129 <dia:point val="27.3454,9.53624"/>
1130 <dia:point val="24.5004,13.8333"/>
1131 </dia:attribute>
1132 <dia:attribute name="numcp">
1133 <dia:int val="1"/>
1134 </dia:attribute>
1135 <dia:attribute name="line_color">
1136 <dia:color val="#a020f0"/>
1137 </dia:attribute>
1138 <dia:attribute name="end_arrow">
1139 <dia:enum val="22"/>
1140 </dia:attribute>
1141 <dia:attribute name="end_arrow_length">
1142 <dia:real val="0.5"/>
1143 </dia:attribute>
1144 <dia:attribute name="end_arrow_width">
1145 <dia:real val="0.5"/>
1146 </dia:attribute>
1147 <dia:connections>
1148 <dia:connection handle="1" to="O26" connection="2"/>
1149 </dia:connections>
1150 </dia:object>
1151 </dia:layer>
1152</dia:diagram>
diff --git a/Documentation/DocBook/media/v4l/subdev-image-processing-scaling-multi-source.svg b/Documentation/DocBook/media/v4l/subdev-image-processing-scaling-multi-source.svg
new file mode 100644
index 000000000000..2340c0f8bc92
--- /dev/null
+++ b/Documentation/DocBook/media/v4l/subdev-image-processing-scaling-multi-source.svg
@@ -0,0 +1,116 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/PR-SVG-20010719/DTD/svg10.dtd">
3<svg width="59cm" height="17cm" viewBox="-194 128 1179 330" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
4 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="-8" y="130" width="806" height="327"/>
5 <g>
6 <rect style="fill: #ffffff" x="4.5" y="189" width="159" height="104"/>
7 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #a52a2a" x="4.5" y="189" width="159" height="104"/>
8 </g>
9 <g>
10 <rect style="fill: #ffffff" x="49.5" y="204" width="94" height="77"/>
11 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #0000ff" x="49.5" y="204" width="94" height="77"/>
12 </g>
13 <text style="fill: #0000ff;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="60" y="224">
14 <tspan x="60" y="224">sink</tspan>
15 <tspan x="60" y="240">crop</tspan>
16 <tspan x="60" y="256">selection</tspan>
17 </text>
18 <text style="fill: #000000;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="29.5" y="158">
19 <tspan x="29.5" y="158"></tspan>
20 </text>
21 <text style="fill: #a52a2a;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="8.53836" y="157.914">
22 <tspan x="8.53836" y="157.914">sink media</tspan>
23 <tspan x="8.53836" y="173.914">bus format</tspan>
24 </text>
25 <g>
26 <rect style="fill: #ffffff" x="333.644" y="185.65" width="165.2" height="172.478"/>
27 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #00ff00" x="333.644" y="185.65" width="165.2" height="172.478"/>
28 </g>
29 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="333.644" y1="358.128" x2="49.5" y2="281"/>
30 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="333.644" y1="185.65" x2="49.5" y2="204"/>
31 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="498.844" y1="358.128" x2="143.5" y2="281"/>
32 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="498.844" y1="185.65" x2="143.5" y2="204"/>
33 <text style="fill: #00ff00;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="334.704" y="149.442">
34 <tspan x="334.704" y="149.442">sink compose</tspan>
35 <tspan x="334.704" y="165.442">selection (scaling)</tspan>
36 </text>
37 <g>
38 <rect style="fill: #ffffff" x="382.322" y="199.565" width="100.186" height="71.4523"/>
39 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #a020f0" x="382.322" y="199.565" width="100.186" height="71.4523"/>
40 </g>
41 <text style="fill: #a020f0;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="543.322" y="149.442">
42 <tspan x="543.322" y="149.442">source</tspan>
43 <tspan x="543.322" y="165.442">crop</tspan>
44 <tspan x="543.322" y="181.442">selection</tspan>
45 </text>
46 <text style="fill: #8b6914;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="691.5" y="157.128">
47 <tspan x="691.5" y="157.128">source media</tspan>
48 <tspan x="691.5" y="173.128">bus format</tspan>
49 </text>
50 <g>
51 <rect style="fill: #ffffff" x="690.488" y="225.834" width="100.186" height="71.4523"/>
52 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #8b6914" x="690.488" y="225.834" width="100.186" height="71.4523"/>
53 </g>
54 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="690.488" y1="297.286" x2="382.322" y2="271.018"/>
55 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="690.488" y1="225.834" x2="382.322" y2="199.565"/>
56 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="790.674" y1="297.286" x2="482.508" y2="271.018"/>
57 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="790.674" y1="225.834" x2="482.508" y2="199.565"/>
58 <g>
59 <ellipse style="fill: #ffffff" cx="808.1" cy="249.984" rx="8.5" ry="8.5"/>
60 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="808.1" cy="249.984" rx="8.5" ry="8.5"/>
61 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="808.1" cy="249.984" rx="8.5" ry="8.5"/>
62 </g>
63 <g>
64 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="816.6" y1="249.984" x2="972.934" y2="250.012"/>
65 <polygon style="fill: #000000" points="980.434,250.014 970.433,255.012 972.934,250.012 970.435,245.012 "/>
66 <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="980.434,250.014 970.433,255.012 972.934,250.012 970.435,245.012 "/>
67 </g>
68 <text style="fill: #000000;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="841.908" y="239.8">
69 <tspan x="841.908" y="239.8">pad 1 (source)</tspan>
70 </text>
71 <g>
72 <ellipse style="fill: #ffffff" cx="-20.3982" cy="241.512" rx="8.5" ry="8.5"/>
73 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="-20.3982" cy="241.512" rx="8.5" ry="8.5"/>
74 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="-20.3982" cy="241.512" rx="8.5" ry="8.5"/>
75 </g>
76 <g>
77 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="-192.398" y1="241.8" x2="-38.6343" y2="241.529"/>
78 <polygon style="fill: #000000" points="-31.1343,241.516 -41.1254,246.534 -38.6343,241.529 -41.1431,236.534 "/>
79 <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="-31.1343,241.516 -41.1254,246.534 -38.6343,241.529 -41.1431,236.534 "/>
80 </g>
81 <text style="fill: #000000;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="-147.858" y="229.8">
82 <tspan x="-147.858" y="229.8">pad 0 (sink)</tspan>
83 </text>
84 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #a020f0" x="389.822" y="276.666" width="100.186" height="71.4523"/>
85 <g>
86 <rect style="fill: #ffffff" x="689.988" y="345.934" width="100.186" height="71.4523"/>
87 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #8b6914" x="689.988" y="345.934" width="100.186" height="71.4523"/>
88 </g>
89 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="689.988" y1="417.386" x2="389.822" y2="348.118"/>
90 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="689.988" y1="345.934" x2="389.822" y2="276.666"/>
91 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="790.174" y1="417.386" x2="490.008" y2="348.118"/>
92 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="790.174" y1="345.934" x2="490.008" y2="276.666"/>
93 <g>
94 <ellipse style="fill: #ffffff" cx="805.6" cy="384.084" rx="8.5" ry="8.5"/>
95 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="805.6" cy="384.084" rx="8.5" ry="8.5"/>
96 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="805.6" cy="384.084" rx="8.5" ry="8.5"/>
97 </g>
98 <g>
99 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="814.1" y1="384.084" x2="970.434" y2="384.112"/>
100 <polygon style="fill: #000000" points="977.934,384.114 967.933,389.112 970.434,384.112 967.935,379.112 "/>
101 <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="977.934,384.114 967.933,389.112 970.434,384.112 967.935,379.112 "/>
102 </g>
103 <text style="fill: #000000;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="839.408" y="373.9">
104 <tspan x="839.408" y="373.9">pad 2 (source)</tspan>
105 </text>
106 <g>
107 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #a020f0" x1="546" y1="191" x2="492.157" y2="198.263"/>
108 <polygon style="fill: #a020f0" points="484.724,199.266 493.966,192.974 492.157,198.263 495.303,202.884 "/>
109 <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #a020f0" points="484.724,199.266 493.966,192.974 492.157,198.263 495.303,202.884 "/>
110 </g>
111 <g>
112 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #a020f0" x1="546.908" y1="190.725" x2="495.383" y2="268.548"/>
113 <polygon style="fill: #a020f0" points="491.242,274.802 492.594,263.703 495.383,268.548 500.932,269.224 "/>
114 <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #a020f0" points="491.242,274.802 492.594,263.703 495.383,268.548 500.932,269.224 "/>
115 </g>
116</svg>
diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml
index 8ae38876172e..015c561754b7 100644
--- a/Documentation/DocBook/media/v4l/v4l2.xml
+++ b/Documentation/DocBook/media/v4l/v4l2.xml
@@ -28,8 +28,8 @@ documentation.</contrib>
28 <firstname>Hans</firstname> 28 <firstname>Hans</firstname>
29 <surname>Verkuil</surname> 29 <surname>Verkuil</surname>
30 <contrib>Designed and documented the VIDIOC_LOG_STATUS ioctl, 30 <contrib>Designed and documented the VIDIOC_LOG_STATUS ioctl,
31the extended control ioctls and major parts of the sliced VBI 31the extended control ioctls, major parts of the sliced VBI API, the
32API.</contrib> 32MPEG encoder and decoder APIs and the DV Timings API.</contrib>
33 <affiliation> 33 <affiliation>
34 <address> 34 <address>
35 <email>hverkuil@xs4all.nl</email> 35 <email>hverkuil@xs4all.nl</email>
@@ -96,6 +96,17 @@ Remote Controller chapter.</contrib>
96 </address> 96 </address>
97 </affiliation> 97 </affiliation>
98 </author> 98 </author>
99
100 <author>
101 <firstname>Sakari</firstname>
102 <surname>Ailus</surname>
103 <contrib>Subdev selections API.</contrib>
104 <affiliation>
105 <address>
106 <email>sakari.ailus@iki.fi</email>
107 </address>
108 </affiliation>
109 </author>
99 </authorgroup> 110 </authorgroup>
100 111
101 <copyright> 112 <copyright>
@@ -112,6 +123,7 @@ Remote Controller chapter.</contrib>
112 <year>2009</year> 123 <year>2009</year>
113 <year>2010</year> 124 <year>2010</year>
114 <year>2011</year> 125 <year>2011</year>
126 <year>2012</year>
115 <holder>Bill Dirks, Michael H. Schimek, Hans Verkuil, Martin 127 <holder>Bill Dirks, Michael H. Schimek, Hans Verkuil, Martin
116Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab, 128Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab,
117 Pawel Osciak</holder> 129 Pawel Osciak</holder>
@@ -128,6 +140,28 @@ structs, ioctls) must be noted in more detail in the history chapter
128applications. --> 140applications. -->
129 141
130 <revision> 142 <revision>
143 <revnumber>3.5</revnumber>
144 <date>2012-05-07</date>
145 <authorinitials>sa, sn</authorinitials>
146 <revremark>Added V4L2_CTRL_TYPE_INTEGER_MENU and V4L2 subdev
147 selections API. Improved the description of V4L2_CID_COLORFX
148 control, added V4L2_CID_COLORFX_CBCR control.
149 Added camera controls V4L2_CID_AUTO_EXPOSURE_BIAS,
150 V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE, V4L2_CID_IMAGE_STABILIZATION,
151 V4L2_CID_ISO_SENSITIVITY, V4L2_CID_ISO_SENSITIVITY_AUTO,
152 V4L2_CID_EXPOSURE_METERING, V4L2_CID_SCENE_MODE,
153 V4L2_CID_3A_LOCK, V4L2_CID_AUTO_FOCUS_START,
154 V4L2_CID_AUTO_FOCUS_STOP, V4L2_CID_AUTO_FOCUS_STATUS
155 and V4L2_CID_AUTO_FOCUS_RANGE.
156 </revremark>
157 <date>2012-05-01</date>
158 <authorinitials>hv</authorinitials>
159 <revremark>Added VIDIOC_ENUM_DV_TIMINGS, VIDIOC_QUERY_DV_TIMINGS and
160 VIDIOC_DV_TIMINGS_CAP.
161 </revremark>
162 </revision>
163
164 <revision>
131 <revnumber>3.4</revnumber> 165 <revnumber>3.4</revnumber>
132 <date>2012-01-25</date> 166 <date>2012-01-25</date>
133 <authorinitials>sn</authorinitials> 167 <authorinitials>sn</authorinitials>
@@ -433,7 +467,7 @@ and discussions on the V4L mailing list.</revremark>
433</partinfo> 467</partinfo>
434 468
435<title>Video for Linux Two API Specification</title> 469<title>Video for Linux Two API Specification</title>
436 <subtitle>Revision 3.3</subtitle> 470 <subtitle>Revision 3.5</subtitle>
437 471
438 <chapter id="common"> 472 <chapter id="common">
439 &sub-common; 473 &sub-common;
@@ -491,10 +525,12 @@ and discussions on the V4L mailing list.</revremark>
491 &sub-dbg-g-register; 525 &sub-dbg-g-register;
492 &sub-decoder-cmd; 526 &sub-decoder-cmd;
493 &sub-dqevent; 527 &sub-dqevent;
528 &sub-dv-timings-cap;
494 &sub-encoder-cmd; 529 &sub-encoder-cmd;
495 &sub-enumaudio; 530 &sub-enumaudio;
496 &sub-enumaudioout; 531 &sub-enumaudioout;
497 &sub-enum-dv-presets; 532 &sub-enum-dv-presets;
533 &sub-enum-dv-timings;
498 &sub-enum-fmt; 534 &sub-enum-fmt;
499 &sub-enum-framesizes; 535 &sub-enum-framesizes;
500 &sub-enum-frameintervals; 536 &sub-enum-frameintervals;
@@ -529,6 +565,7 @@ and discussions on the V4L mailing list.</revremark>
529 &sub-querycap; 565 &sub-querycap;
530 &sub-queryctrl; 566 &sub-queryctrl;
531 &sub-query-dv-preset; 567 &sub-query-dv-preset;
568 &sub-query-dv-timings;
532 &sub-querystd; 569 &sub-querystd;
533 &sub-prepare-buf; 570 &sub-prepare-buf;
534 &sub-reqbufs; 571 &sub-reqbufs;
@@ -540,6 +577,7 @@ and discussions on the V4L mailing list.</revremark>
540 &sub-subdev-g-crop; 577 &sub-subdev-g-crop;
541 &sub-subdev-g-fmt; 578 &sub-subdev-g-fmt;
542 &sub-subdev-g-frame-interval; 579 &sub-subdev-g-frame-interval;
580 &sub-subdev-g-selection;
543 &sub-subscribe-event; 581 &sub-subscribe-event;
544 <!-- End of ioctls. --> 582 <!-- End of ioctls. -->
545 &sub-mmap; 583 &sub-mmap;
diff --git a/Documentation/DocBook/media/v4l/vidioc-create-bufs.xml b/Documentation/DocBook/media/v4l/vidioc-create-bufs.xml
index 73ae8a6cd004..765549ff8a71 100644
--- a/Documentation/DocBook/media/v4l/vidioc-create-bufs.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-create-bufs.xml
@@ -48,6 +48,12 @@
48 <refsect1> 48 <refsect1>
49 <title>Description</title> 49 <title>Description</title>
50 50
51 <note>
52 <title>Experimental</title>
53 <para>This is an <link linkend="experimental"> experimental </link>
54 interface and may change in the future.</para>
55 </note>
56
51 <para>This ioctl is used to create buffers for <link linkend="mmap">memory 57 <para>This ioctl is used to create buffers for <link linkend="mmap">memory
52mapped</link> or <link linkend="userp">user pointer</link> 58mapped</link> or <link linkend="userp">user pointer</link>
53I/O. It can be used as an alternative or in addition to the 59I/O. It can be used as an alternative or in addition to the
@@ -94,16 +100,18 @@ information.</para>
94 <entry>The number of buffers requested or granted.</entry> 100 <entry>The number of buffers requested or granted.</entry>
95 </row> 101 </row>
96 <row> 102 <row>
97 <entry>&v4l2-memory;</entry> 103 <entry>__u32</entry>
98 <entry><structfield>memory</structfield></entry> 104 <entry><structfield>memory</structfield></entry>
99 <entry>Applications set this field to 105 <entry>Applications set this field to
100<constant>V4L2_MEMORY_MMAP</constant> or 106<constant>V4L2_MEMORY_MMAP</constant> or
101<constant>V4L2_MEMORY_USERPTR</constant>.</entry> 107<constant>V4L2_MEMORY_USERPTR</constant>. See <xref linkend="v4l2-memory"
108/></entry>
102 </row> 109 </row>
103 <row> 110 <row>
104 <entry>&v4l2-format;</entry> 111 <entry>__u32</entry>
105 <entry><structfield>format</structfield></entry> 112 <entry><structfield>format</structfield></entry>
106 <entry>Filled in by the application, preserved by the driver.</entry> 113 <entry>Filled in by the application, preserved by the driver.
114 See <xref linkend="v4l2-format" />.</entry>
107 </row> 115 </row>
108 <row> 116 <row>
109 <entry>__u32</entry> 117 <entry>__u32</entry>
diff --git a/Documentation/DocBook/media/v4l/vidioc-cropcap.xml b/Documentation/DocBook/media/v4l/vidioc-cropcap.xml
index b4f2f255211e..f1bac2c6e978 100644
--- a/Documentation/DocBook/media/v4l/vidioc-cropcap.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-cropcap.xml
@@ -65,7 +65,7 @@ output.</para>
65 &cs-str; 65 &cs-str;
66 <tbody valign="top"> 66 <tbody valign="top">
67 <row> 67 <row>
68 <entry>&v4l2-buf-type;</entry> 68 <entry>__u32</entry>
69 <entry><structfield>type</structfield></entry> 69 <entry><structfield>type</structfield></entry>
70 <entry>Type of the data stream, set by the application. 70 <entry>Type of the data stream, set by the application.
71Only these types are valid here: 71Only these types are valid here:
@@ -73,7 +73,7 @@ Only these types are valid here:
73<constant>V4L2_BUF_TYPE_VIDEO_OUTPUT</constant>, 73<constant>V4L2_BUF_TYPE_VIDEO_OUTPUT</constant>,
74<constant>V4L2_BUF_TYPE_VIDEO_OVERLAY</constant>, and custom (driver 74<constant>V4L2_BUF_TYPE_VIDEO_OVERLAY</constant>, and custom (driver
75defined) types with code <constant>V4L2_BUF_TYPE_PRIVATE</constant> 75defined) types with code <constant>V4L2_BUF_TYPE_PRIVATE</constant>
76and higher.</entry> 76and higher. See <xref linkend="v4l2-buf-type" />.</entry>
77 </row> 77 </row>
78 <row> 78 <row>
79 <entry>struct <link linkend="v4l2-rect-crop">v4l2_rect</link></entry> 79 <entry>struct <link linkend="v4l2-rect-crop">v4l2_rect</link></entry>
diff --git a/Documentation/DocBook/media/v4l/vidioc-dv-timings-cap.xml b/Documentation/DocBook/media/v4l/vidioc-dv-timings-cap.xml
new file mode 100644
index 000000000000..6673ce582050
--- /dev/null
+++ b/Documentation/DocBook/media/v4l/vidioc-dv-timings-cap.xml
@@ -0,0 +1,211 @@
1<refentry id="vidioc-dv-timings-cap">
2 <refmeta>
3 <refentrytitle>ioctl VIDIOC_DV_TIMINGS_CAP</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>VIDIOC_DV_TIMINGS_CAP</refname>
9 <refpurpose>The capabilities of the Digital Video receiver/transmitter</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_dv_timings_cap *<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>&fd;</para>
31 </listitem>
32 </varlistentry>
33 <varlistentry>
34 <term><parameter>request</parameter></term>
35 <listitem>
36 <para>VIDIOC_DV_TIMINGS_CAP</para>
37 </listitem>
38 </varlistentry>
39 <varlistentry>
40 <term><parameter>argp</parameter></term>
41 <listitem>
42 <para></para>
43 </listitem>
44 </varlistentry>
45 </variablelist>
46 </refsect1>
47
48 <refsect1>
49 <title>Description</title>
50
51 <note>
52 <title>Experimental</title>
53 <para>This is an <link linkend="experimental"> experimental </link>
54 interface and may change in the future.</para>
55 </note>
56
57 <para>To query the available timings, applications initialize the
58<structfield>index</structfield> field and zero the reserved array of &v4l2-dv-timings-cap;
59and call the <constant>VIDIOC_DV_TIMINGS_CAP</constant> ioctl with a pointer to this
60structure. Drivers fill the rest of the structure or return an
61&EINVAL; when the index is out of bounds. To enumerate all supported DV timings,
62applications shall begin at index zero, incrementing by one until the
63driver returns <errorcode>EINVAL</errorcode>. Note that drivers may enumerate a
64different set of DV timings after switching the video input or
65output.</para>
66
67 <table pgwide="1" frame="none" id="v4l2-bt-timings-cap">
68 <title>struct <structname>v4l2_bt_timings_cap</structname></title>
69 <tgroup cols="3">
70 &cs-str;
71 <tbody valign="top">
72 <row>
73 <entry>__u32</entry>
74 <entry><structfield>min_width</structfield></entry>
75 <entry>Minimum width of the active video in pixels.</entry>
76 </row>
77 <row>
78 <entry>__u32</entry>
79 <entry><structfield>max_width</structfield></entry>
80 <entry>Maximum width of the active video in pixels.</entry>
81 </row>
82 <row>
83 <entry>__u32</entry>
84 <entry><structfield>min_height</structfield></entry>
85 <entry>Minimum height of the active video in lines.</entry>
86 </row>
87 <row>
88 <entry>__u32</entry>
89 <entry><structfield>max_height</structfield></entry>
90 <entry>Maximum height of the active video in lines.</entry>
91 </row>
92 <row>
93 <entry>__u64</entry>
94 <entry><structfield>min_pixelclock</structfield></entry>
95 <entry>Minimum pixelclock frequency in Hz.</entry>
96 </row>
97 <row>
98 <entry>__u64</entry>
99 <entry><structfield>max_pixelclock</structfield></entry>
100 <entry>Maximum pixelclock frequency in Hz.</entry>
101 </row>
102 <row>
103 <entry>__u32</entry>
104 <entry><structfield>standards</structfield></entry>
105 <entry>The video standard(s) supported by the hardware.
106 See <xref linkend="dv-bt-standards"/> for a list of standards.</entry>
107 </row>
108 <row>
109 <entry>__u32</entry>
110 <entry><structfield>capabilities</structfield></entry>
111 <entry>Several flags giving more information about the capabilities.
112 See <xref linkend="dv-bt-cap-capabilities"/> for a description of the flags.
113 </entry>
114 </row>
115 <row>
116 <entry>__u32</entry>
117 <entry><structfield>reserved</structfield>[16]</entry>
118 <entry></entry>
119 </row>
120 </tbody>
121 </tgroup>
122 </table>
123
124 <table pgwide="1" frame="none" id="v4l2-dv-timings-cap">
125 <title>struct <structname>v4l2_dv_timings_cap</structname></title>
126 <tgroup cols="4">
127 &cs-str;
128 <tbody valign="top">
129 <row>
130 <entry>__u32</entry>
131 <entry><structfield>type</structfield></entry>
132 <entry>Type of DV timings as listed in <xref linkend="dv-timing-types"/>.</entry>
133 </row>
134 <row>
135 <entry>__u32</entry>
136 <entry><structfield>reserved</structfield>[3]</entry>
137 <entry>Reserved for future extensions. Drivers must set the array to zero.</entry>
138 </row>
139 <row>
140 <entry>union</entry>
141 <entry><structfield></structfield></entry>
142 <entry></entry>
143 </row>
144 <row>
145 <entry></entry>
146 <entry>&v4l2-bt-timings-cap;</entry>
147 <entry><structfield>bt</structfield></entry>
148 <entry>BT.656/1120 timings capabilities of the hardware.</entry>
149 </row>
150 <row>
151 <entry></entry>
152 <entry>__u32</entry>
153 <entry><structfield>raw_data</structfield>[32]</entry>
154 <entry></entry>
155 </row>
156 </tbody>
157 </tgroup>
158 </table>
159
160 <table pgwide="1" frame="none" id="dv-bt-cap-capabilities">
161 <title>DV BT Timing capabilities</title>
162 <tgroup cols="2">
163 &cs-str;
164 <tbody valign="top">
165 <row>
166 <entry>Flag</entry>
167 <entry>Description</entry>
168 </row>
169 <row>
170 <entry></entry>
171 <entry></entry>
172 </row>
173 <row>
174 <entry>V4L2_DV_BT_CAP_INTERLACED</entry>
175 <entry>Interlaced formats are supported.
176 </entry>
177 </row>
178 <row>
179 <entry>V4L2_DV_BT_CAP_PROGRESSIVE</entry>
180 <entry>Progressive formats are supported.
181 </entry>
182 </row>
183 <row>
184 <entry>V4L2_DV_BT_CAP_REDUCED_BLANKING</entry>
185 <entry>CVT/GTF specific: the timings can make use of reduced blanking (CVT)
186or the 'Secondary GTF' curve (GTF).
187 </entry>
188 </row>
189 <row>
190 <entry>V4L2_DV_BT_CAP_CUSTOM</entry>
191 <entry>Can support non-standard timings, i.e. timings not belonging to the
192standards set in the <structfield>standards</structfield> field.
193 </entry>
194 </row>
195 </tbody>
196 </tgroup>
197 </table>
198 </refsect1>
199
200 <refsect1>
201 &return-value;
202 </refsect1>
203</refentry>
204
205<!--
206Local Variables:
207mode: sgml
208sgml-parent-document: "v4l2.sgml"
209indent-tabs-mode: nil
210End:
211-->
diff --git a/Documentation/DocBook/media/v4l/vidioc-enum-dv-presets.xml b/Documentation/DocBook/media/v4l/vidioc-enum-dv-presets.xml
index 0be17c232d3a..509f0012d2a6 100644
--- a/Documentation/DocBook/media/v4l/vidioc-enum-dv-presets.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-enum-dv-presets.xml
@@ -48,6 +48,10 @@
48 <refsect1> 48 <refsect1>
49 <title>Description</title> 49 <title>Description</title>
50 50
51 <para>This ioctl is <emphasis role="bold">deprecated</emphasis>.
52 New drivers and applications should use &VIDIOC-ENUM-DV-TIMINGS; instead.
53 </para>
54
51 <para>To query the attributes of a DV preset, applications initialize the 55 <para>To query the attributes of a DV preset, applications initialize the
52<structfield>index</structfield> field and zero the reserved array of &v4l2-dv-enum-preset; 56<structfield>index</structfield> field and zero the reserved array of &v4l2-dv-enum-preset;
53and call the <constant>VIDIOC_ENUM_DV_PRESETS</constant> ioctl with a pointer to this 57and call the <constant>VIDIOC_ENUM_DV_PRESETS</constant> ioctl with a pointer to this
diff --git a/Documentation/DocBook/media/v4l/vidioc-enum-dv-timings.xml b/Documentation/DocBook/media/v4l/vidioc-enum-dv-timings.xml
new file mode 100644
index 000000000000..24c3bf4fd29a
--- /dev/null
+++ b/Documentation/DocBook/media/v4l/vidioc-enum-dv-timings.xml
@@ -0,0 +1,119 @@
1<refentry id="vidioc-enum-dv-timings">
2 <refmeta>
3 <refentrytitle>ioctl VIDIOC_ENUM_DV_TIMINGS</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>VIDIOC_ENUM_DV_TIMINGS</refname>
9 <refpurpose>Enumerate supported Digital Video timings</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_enum_dv_timings *<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>&fd;</para>
31 </listitem>
32 </varlistentry>
33 <varlistentry>
34 <term><parameter>request</parameter></term>
35 <listitem>
36 <para>VIDIOC_ENUM_DV_TIMINGS</para>
37 </listitem>
38 </varlistentry>
39 <varlistentry>
40 <term><parameter>argp</parameter></term>
41 <listitem>
42 <para></para>
43 </listitem>
44 </varlistentry>
45 </variablelist>
46 </refsect1>
47
48 <refsect1>
49 <title>Description</title>
50
51 <note>
52 <title>Experimental</title>
53 <para>This is an <link linkend="experimental"> experimental </link>
54 interface and may change in the future.</para>
55 </note>
56
57 <para>While some DV receivers or transmitters support a wide range of timings, others
58support only a limited number of timings. With this ioctl applications can enumerate a list
59of known supported timings. Call &VIDIOC-DV-TIMINGS-CAP; to check if it also supports other
60standards or even custom timings that are not in this list.</para>
61
62 <para>To query the available timings, applications initialize the
63<structfield>index</structfield> field and zero the reserved array of &v4l2-enum-dv-timings;
64and call the <constant>VIDIOC_ENUM_DV_TIMINGS</constant> ioctl with a pointer to this
65structure. Drivers fill the rest of the structure or return an
66&EINVAL; when the index is out of bounds. To enumerate all supported DV timings,
67applications shall begin at index zero, incrementing by one until the
68driver returns <errorcode>EINVAL</errorcode>. Note that drivers may enumerate a
69different set of DV timings after switching the video input or
70output.</para>
71
72 <table pgwide="1" frame="none" id="v4l2-enum-dv-timings">
73 <title>struct <structname>v4l2_enum_dv_timings</structname></title>
74 <tgroup cols="3">
75 &cs-str;
76 <tbody valign="top">
77 <row>
78 <entry>__u32</entry>
79 <entry><structfield>index</structfield></entry>
80 <entry>Number of the DV timings, set by the
81application.</entry>
82 </row>
83 <row>
84 <entry>__u32</entry>
85 <entry><structfield>reserved</structfield>[3]</entry>
86 <entry>Reserved for future extensions. Drivers must set the array to zero.</entry>
87 </row>
88 <row>
89 <entry>&v4l2-dv-timings;</entry>
90 <entry><structfield>timings</structfield></entry>
91 <entry>The timings.</entry>
92 </row>
93 </tbody>
94 </tgroup>
95 </table>
96 </refsect1>
97
98 <refsect1>
99 &return-value;
100
101 <variablelist>
102 <varlistentry>
103 <term><errorcode>EINVAL</errorcode></term>
104 <listitem>
105 <para>The &v4l2-enum-dv-timings; <structfield>index</structfield>
106is out of bounds.</para>
107 </listitem>
108 </varlistentry>
109 </variablelist>
110 </refsect1>
111</refentry>
112
113<!--
114Local Variables:
115mode: sgml
116sgml-parent-document: "v4l2.sgml"
117indent-tabs-mode: nil
118End:
119-->
diff --git a/Documentation/DocBook/media/v4l/vidioc-enum-fmt.xml b/Documentation/DocBook/media/v4l/vidioc-enum-fmt.xml
index 347d142e7431..81ebe48317fe 100644
--- a/Documentation/DocBook/media/v4l/vidioc-enum-fmt.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-enum-fmt.xml
@@ -71,7 +71,7 @@ the application. This is in no way related to the <structfield>
71pixelformat</structfield> field.</entry> 71pixelformat</structfield> field.</entry>
72 </row> 72 </row>
73 <row> 73 <row>
74 <entry>&v4l2-buf-type;</entry> 74 <entry>__u32</entry>
75 <entry><structfield>type</structfield></entry> 75 <entry><structfield>type</structfield></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:
@@ -81,7 +81,7 @@ Only these types are valid here:
81<constant>V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE</constant>, 81<constant>V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE</constant>,
82<constant>V4L2_BUF_TYPE_VIDEO_OVERLAY</constant>, and custom (driver 82<constant>V4L2_BUF_TYPE_VIDEO_OVERLAY</constant>, and custom (driver
83defined) types with code <constant>V4L2_BUF_TYPE_PRIVATE</constant> 83defined) types with code <constant>V4L2_BUF_TYPE_PRIVATE</constant>
84and higher.</entry> 84and higher. See <xref linkend="v4l2-buf-type" />.</entry>
85 </row> 85 </row>
86 <row> 86 <row>
87 <entry>__u32</entry> 87 <entry>__u32</entry>
diff --git a/Documentation/DocBook/media/v4l/vidioc-enuminput.xml b/Documentation/DocBook/media/v4l/vidioc-enuminput.xml
index 9b8efcd6e947..46d5a044a537 100644
--- a/Documentation/DocBook/media/v4l/vidioc-enuminput.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-enuminput.xml
@@ -285,7 +285,7 @@ input/output interface to linux-media@vger.kernel.org on 19 Oct 2009.
285 <row> 285 <row>
286 <entry><constant>V4L2_IN_CAP_CUSTOM_TIMINGS</constant></entry> 286 <entry><constant>V4L2_IN_CAP_CUSTOM_TIMINGS</constant></entry>
287 <entry>0x00000002</entry> 287 <entry>0x00000002</entry>
288 <entry>This input supports setting custom video timings by using VIDIOC_S_DV_TIMINGS.</entry> 288 <entry>This input supports setting video timings by using VIDIOC_S_DV_TIMINGS.</entry>
289 </row> 289 </row>
290 <row> 290 <row>
291 <entry><constant>V4L2_IN_CAP_STD</constant></entry> 291 <entry><constant>V4L2_IN_CAP_STD</constant></entry>
diff --git a/Documentation/DocBook/media/v4l/vidioc-enumoutput.xml b/Documentation/DocBook/media/v4l/vidioc-enumoutput.xml
index a64d5ef103fa..428020000ef0 100644
--- a/Documentation/DocBook/media/v4l/vidioc-enumoutput.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-enumoutput.xml
@@ -170,7 +170,7 @@ input/output interface to linux-media@vger.kernel.org on 19 Oct 2009.
170 <row> 170 <row>
171 <entry><constant>V4L2_OUT_CAP_CUSTOM_TIMINGS</constant></entry> 171 <entry><constant>V4L2_OUT_CAP_CUSTOM_TIMINGS</constant></entry>
172 <entry>0x00000002</entry> 172 <entry>0x00000002</entry>
173 <entry>This output supports setting custom video timings by using VIDIOC_S_DV_TIMINGS.</entry> 173 <entry>This output supports setting video timings by using VIDIOC_S_DV_TIMINGS.</entry>
174 </row> 174 </row>
175 <row> 175 <row>
176 <entry><constant>V4L2_OUT_CAP_STD</constant></entry> 176 <entry><constant>V4L2_OUT_CAP_STD</constant></entry>
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-crop.xml b/Documentation/DocBook/media/v4l/vidioc-g-crop.xml
index 01a50640dce0..c4ff3b1887fb 100644
--- a/Documentation/DocBook/media/v4l/vidioc-g-crop.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-g-crop.xml
@@ -100,14 +100,14 @@ changed and <constant>VIDIOC_S_CROP</constant> returns the
100 &cs-str; 100 &cs-str;
101 <tbody valign="top"> 101 <tbody valign="top">
102 <row> 102 <row>
103 <entry>&v4l2-buf-type;</entry> 103 <entry>__u32</entry>
104 <entry><structfield>type</structfield></entry> 104 <entry><structfield>type</structfield></entry>
105 <entry>Type of the data stream, set by the application. 105 <entry>Type of the data stream, set by the application.
106Only these types are valid here: <constant>V4L2_BUF_TYPE_VIDEO_CAPTURE</constant>, 106Only these types are valid here: <constant>V4L2_BUF_TYPE_VIDEO_CAPTURE</constant>,
107<constant>V4L2_BUF_TYPE_VIDEO_OUTPUT</constant>, 107<constant>V4L2_BUF_TYPE_VIDEO_OUTPUT</constant>,
108<constant>V4L2_BUF_TYPE_VIDEO_OVERLAY</constant>, and custom (driver 108<constant>V4L2_BUF_TYPE_VIDEO_OVERLAY</constant>, and custom (driver
109defined) types with code <constant>V4L2_BUF_TYPE_PRIVATE</constant> 109defined) types with code <constant>V4L2_BUF_TYPE_PRIVATE</constant>
110and higher.</entry> 110and higher. See <xref linkend="v4l2-buf-type" />.</entry>
111 </row> 111 </row>
112 <row> 112 <row>
113 <entry>&v4l2-rect;</entry> 113 <entry>&v4l2-rect;</entry>
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-dv-preset.xml b/Documentation/DocBook/media/v4l/vidioc-g-dv-preset.xml
index 7940c1149393..61be9fa3803a 100644
--- a/Documentation/DocBook/media/v4l/vidioc-g-dv-preset.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-g-dv-preset.xml
@@ -48,6 +48,12 @@
48 48
49 <refsect1> 49 <refsect1>
50 <title>Description</title> 50 <title>Description</title>
51
52 <para>These ioctls are <emphasis role="bold">deprecated</emphasis>.
53 New drivers and applications should use &VIDIOC-G-DV-TIMINGS; and &VIDIOC-S-DV-TIMINGS;
54 instead.
55 </para>
56
51 <para>To query and select the current DV preset, applications 57 <para>To query and select the current DV preset, applications
52use the <constant>VIDIOC_G_DV_PRESET</constant> and <constant>VIDIOC_S_DV_PRESET</constant> 58use the <constant>VIDIOC_G_DV_PRESET</constant> and <constant>VIDIOC_S_DV_PRESET</constant>
53ioctls which take a pointer to a &v4l2-dv-preset; type as argument. 59ioctls which take a pointer to a &v4l2-dv-preset; type as argument.
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-dv-timings.xml b/Documentation/DocBook/media/v4l/vidioc-g-dv-timings.xml
index 4a8648ae9a63..eda1a2991bbe 100644
--- a/Documentation/DocBook/media/v4l/vidioc-g-dv-timings.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-g-dv-timings.xml
@@ -7,7 +7,7 @@
7 <refnamediv> 7 <refnamediv>
8 <refname>VIDIOC_G_DV_TIMINGS</refname> 8 <refname>VIDIOC_G_DV_TIMINGS</refname>
9 <refname>VIDIOC_S_DV_TIMINGS</refname> 9 <refname>VIDIOC_S_DV_TIMINGS</refname>
10 <refpurpose>Get or set custom DV timings for input or output</refpurpose> 10 <refpurpose>Get or set DV timings for input or output</refpurpose>
11 </refnamediv> 11 </refnamediv>
12 12
13 <refsynopsisdiv> 13 <refsynopsisdiv>
@@ -48,12 +48,15 @@
48 48
49 <refsect1> 49 <refsect1>
50 <title>Description</title> 50 <title>Description</title>
51 <para>To set custom DV timings for the input or output, applications use the 51 <para>To set DV timings for the input or output, applications use the
52<constant>VIDIOC_S_DV_TIMINGS</constant> ioctl and to get the current custom timings, 52<constant>VIDIOC_S_DV_TIMINGS</constant> ioctl and to get the current timings,
53applications use the <constant>VIDIOC_G_DV_TIMINGS</constant> ioctl. The detailed timing 53applications use the <constant>VIDIOC_G_DV_TIMINGS</constant> ioctl. The detailed timing
54information is filled in using the structure &v4l2-dv-timings;. These ioctls take 54information is filled in using the structure &v4l2-dv-timings;. These ioctls take
55a pointer to the &v4l2-dv-timings; structure as argument. If the ioctl is not supported 55a pointer to the &v4l2-dv-timings; structure as argument. If the ioctl is not supported
56or the timing values are not correct, the driver returns &EINVAL;.</para> 56or the timing values are not correct, the driver returns &EINVAL;.</para>
57<para>The <filename>linux/v4l2-dv-timings.h</filename> header can be used to get the
58timings of the formats in the <xref linkend="cea861" /> and <xref linkend="vesadmt" />
59standards.</para>
57 </refsect1> 60 </refsect1>
58 61
59 <refsect1> 62 <refsect1>
@@ -83,12 +86,13 @@ or the timing values are not correct, the driver returns &EINVAL;.</para>
83 <row> 86 <row>
84 <entry>__u32</entry> 87 <entry>__u32</entry>
85 <entry><structfield>width</structfield></entry> 88 <entry><structfield>width</structfield></entry>
86 <entry>Width of the active video in pixels</entry> 89 <entry>Width of the active video in pixels.</entry>
87 </row> 90 </row>
88 <row> 91 <row>
89 <entry>__u32</entry> 92 <entry>__u32</entry>
90 <entry><structfield>height</structfield></entry> 93 <entry><structfield>height</structfield></entry>
91 <entry>Height of the active video in lines</entry> 94 <entry>Height of the active video frame in lines. So for interlaced formats the
95 height of the active video in each field is <structfield>height</structfield>/2.</entry>
92 </row> 96 </row>
93 <row> 97 <row>
94 <entry>__u32</entry> 98 <entry>__u32</entry>
@@ -125,32 +129,52 @@ bit 0 (V4L2_DV_VSYNC_POS_POL) is for vertical sync polarity and bit 1 (V4L2_DV_H
125 <row> 129 <row>
126 <entry>__u32</entry> 130 <entry>__u32</entry>
127 <entry><structfield>vfrontporch</structfield></entry> 131 <entry><structfield>vfrontporch</structfield></entry>
128 <entry>Vertical front porch in lines</entry> 132 <entry>Vertical front porch in lines. For interlaced formats this refers to the
133 odd field (aka field 1).</entry>
129 </row> 134 </row>
130 <row> 135 <row>
131 <entry>__u32</entry> 136 <entry>__u32</entry>
132 <entry><structfield>vsync</structfield></entry> 137 <entry><structfield>vsync</structfield></entry>
133 <entry>Vertical sync length in lines</entry> 138 <entry>Vertical sync length in lines. For interlaced formats this refers to the
139 odd field (aka field 1).</entry>
134 </row> 140 </row>
135 <row> 141 <row>
136 <entry>__u32</entry> 142 <entry>__u32</entry>
137 <entry><structfield>vbackporch</structfield></entry> 143 <entry><structfield>vbackporch</structfield></entry>
138 <entry>Vertical back porch in lines</entry> 144 <entry>Vertical back porch in lines. For interlaced formats this refers to the
145 odd field (aka field 1).</entry>
139 </row> 146 </row>
140 <row> 147 <row>
141 <entry>__u32</entry> 148 <entry>__u32</entry>
142 <entry><structfield>il_vfrontporch</structfield></entry> 149 <entry><structfield>il_vfrontporch</structfield></entry>
143 <entry>Vertical front porch in lines for bottom field of interlaced field formats</entry> 150 <entry>Vertical front porch in lines for the even field (aka field 2) of
151 interlaced field formats.</entry>
144 </row> 152 </row>
145 <row> 153 <row>
146 <entry>__u32</entry> 154 <entry>__u32</entry>
147 <entry><structfield>il_vsync</structfield></entry> 155 <entry><structfield>il_vsync</structfield></entry>
148 <entry>Vertical sync length in lines for bottom field of interlaced field formats</entry> 156 <entry>Vertical sync length in lines for the even field (aka field 2) of
157 interlaced field formats.</entry>
149 </row> 158 </row>
150 <row> 159 <row>
151 <entry>__u32</entry> 160 <entry>__u32</entry>
152 <entry><structfield>il_vbackporch</structfield></entry> 161 <entry><structfield>il_vbackporch</structfield></entry>
153 <entry>Vertical back porch in lines for bottom field of interlaced field formats</entry> 162 <entry>Vertical back porch in lines for the even field (aka field 2) of
163 interlaced field formats.</entry>
164 </row>
165 <row>
166 <entry>__u32</entry>
167 <entry><structfield>standards</structfield></entry>
168 <entry>The video standard(s) this format belongs to. This will be filled in by
169 the driver. Applications must set this to 0. See <xref linkend="dv-bt-standards"/>
170 for a list of standards.</entry>
171 </row>
172 <row>
173 <entry>__u32</entry>
174 <entry><structfield>flags</structfield></entry>
175 <entry>Several flags giving more information about the format.
176 See <xref linkend="dv-bt-flags"/> for a description of the flags.
177 </entry>
154 </row> 178 </row>
155 </tbody> 179 </tbody>
156 </tgroup> 180 </tgroup>
@@ -211,6 +235,90 @@ bit 0 (V4L2_DV_VSYNC_POS_POL) is for vertical sync polarity and bit 1 (V4L2_DV_H
211 </tbody> 235 </tbody>
212 </tgroup> 236 </tgroup>
213 </table> 237 </table>
238 <table pgwide="1" frame="none" id="dv-bt-standards">
239 <title>DV BT Timing standards</title>
240 <tgroup cols="2">
241 &cs-str;
242 <tbody valign="top">
243 <row>
244 <entry>Timing standard</entry>
245 <entry>Description</entry>
246 </row>
247 <row>
248 <entry></entry>
249 <entry></entry>
250 </row>
251 <row>
252 <entry>V4L2_DV_BT_STD_CEA861</entry>
253 <entry>The timings follow the CEA-861 Digital TV Profile standard</entry>
254 </row>
255 <row>
256 <entry>V4L2_DV_BT_STD_DMT</entry>
257 <entry>The timings follow the VESA Discrete Monitor Timings standard</entry>
258 </row>
259 <row>
260 <entry>V4L2_DV_BT_STD_CVT</entry>
261 <entry>The timings follow the VESA Coordinated Video Timings standard</entry>
262 </row>
263 <row>
264 <entry>V4L2_DV_BT_STD_GTF</entry>
265 <entry>The timings follow the VESA Generalized Timings Formula standard</entry>
266 </row>
267 </tbody>
268 </tgroup>
269 </table>
270 <table pgwide="1" frame="none" id="dv-bt-flags">
271 <title>DV BT Timing flags</title>
272 <tgroup cols="2">
273 &cs-str;
274 <tbody valign="top">
275 <row>
276 <entry>Flag</entry>
277 <entry>Description</entry>
278 </row>
279 <row>
280 <entry></entry>
281 <entry></entry>
282 </row>
283 <row>
284 <entry>V4L2_DV_FL_REDUCED_BLANKING</entry>
285 <entry>CVT/GTF specific: the timings use reduced blanking (CVT) or the 'Secondary
286GTF' curve (GTF). In both cases the horizontal and/or vertical blanking
287intervals are reduced, allowing a higher resolution over the same
288bandwidth. This is a read-only flag, applications must not set this.
289 </entry>
290 </row>
291 <row>
292 <entry>V4L2_DV_FL_CAN_REDUCE_FPS</entry>
293 <entry>CEA-861 specific: set for CEA-861 formats with a framerate that is a multiple
294of six. These formats can be optionally played at 1 / 1.001 speed to
295be compatible with 60 Hz based standards such as NTSC and PAL-M that use a framerate of
29629.97 frames per second. If the transmitter can't generate such frequencies, then the
297flag will also be cleared. This is a read-only flag, applications must not set this.
298 </entry>
299 </row>
300 <row>
301 <entry>V4L2_DV_FL_REDUCED_FPS</entry>
302 <entry>CEA-861 specific: only valid for video transmitters, the flag is cleared
303by receivers. It is also only valid for formats with the V4L2_DV_FL_CAN_REDUCE_FPS flag
304set, for other formats the flag will be cleared by the driver.
305
306If the application sets this flag, then the pixelclock used to set up the transmitter is
307divided by 1.001 to make it compatible with NTSC framerates. If the transmitter
308can't generate such frequencies, then the flag will also be cleared.
309 </entry>
310 </row>
311 <row>
312 <entry>V4L2_DV_FL_HALF_LINE</entry>
313 <entry>Specific to interlaced formats: if set, then field 1 (aka the odd field)
314is really one half-line longer and field 2 (aka the even field) is really one half-line
315shorter, so each field has exactly the same number of half-lines. Whether half-lines can be
316detected or used depends on the hardware.
317 </entry>
318 </row>
319 </tbody>
320 </tgroup>
321 </table>
214 </refsect1> 322 </refsect1>
215 <refsect1> 323 <refsect1>
216 &return-value; 324 &return-value;
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml b/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml
index b17a7aac6997..e3d5afcdafbb 100644
--- a/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml
@@ -265,6 +265,32 @@ These controls are described in <xref
265These controls are described in <xref 265These controls are described in <xref
266 linkend="flash-controls" />.</entry> 266 linkend="flash-controls" />.</entry>
267 </row> 267 </row>
268 <row>
269 <entry><constant>V4L2_CTRL_CLASS_JPEG</constant></entry>
270 <entry>0x9d0000</entry>
271 <entry>The class containing JPEG compression controls.
272These controls are described in <xref
273 linkend="jpeg-controls" />.</entry>
274 </row>
275 <row>
276 <entry><constant>V4L2_CTRL_CLASS_IMAGE_SOURCE</constant></entry>
277 <entry>0x9e0000</entry> <entry>The class containing image
278 source controls. These controls are described in <xref
279 linkend="image-source-controls" />.</entry>
280 </row>
281 <row>
282 <entry><constant>V4L2_CTRL_CLASS_IMAGE_PROC</constant></entry>
283 <entry>0x9f0000</entry> <entry>The class containing image
284 processing controls. These controls are described in <xref
285 linkend="image-process-controls" />.</entry>
286 </row>
287 <row>
288 <entry><constant>V4L2_CTRL_CLASS_JPEG</constant></entry>
289 <entry>0x9d0000</entry>
290 <entry>The class containing JPEG compression controls.
291These controls are described in <xref
292 linkend="jpeg-controls" />.</entry>
293 </row>
268 </tbody> 294 </tbody>
269 </tgroup> 295 </tgroup>
270 </table> 296 </table>
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-fmt.xml b/Documentation/DocBook/media/v4l/vidioc-g-fmt.xml
index 17fbda15137b..52acff193a6f 100644
--- a/Documentation/DocBook/media/v4l/vidioc-g-fmt.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-g-fmt.xml
@@ -116,7 +116,7 @@ this ioctl.</para>
116 <colspec colname="c4" /> 116 <colspec colname="c4" />
117 <tbody valign="top"> 117 <tbody valign="top">
118 <row> 118 <row>
119 <entry>&v4l2-buf-type;</entry> 119 <entry>__u32</entry>
120 <entry><structfield>type</structfield></entry> 120 <entry><structfield>type</structfield></entry>
121 <entry></entry> 121 <entry></entry>
122 <entry>Type of the data stream, see <xref 122 <entry>Type of the data stream, see <xref
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-frequency.xml b/Documentation/DocBook/media/v4l/vidioc-g-frequency.xml
index 66e9a5257861..69c178a4d205 100644
--- a/Documentation/DocBook/media/v4l/vidioc-g-frequency.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-g-frequency.xml
@@ -95,14 +95,14 @@ the &v4l2-output; <structfield>modulator</structfield> field and the
95&v4l2-modulator; <structfield>index</structfield> field.</entry> 95&v4l2-modulator; <structfield>index</structfield> field.</entry>
96 </row> 96 </row>
97 <row> 97 <row>
98 <entry>&v4l2-tuner-type;</entry> 98 <entry>__u32</entry>
99 <entry><structfield>type</structfield></entry> 99 <entry><structfield>type</structfield></entry>
100 <entry>The tuner type. This is the same value as in the 100 <entry>The tuner type. This is the same value as in the
101&v4l2-tuner; <structfield>type</structfield> field. The type must be set 101&v4l2-tuner; <structfield>type</structfield> field. See The type must be set
102to <constant>V4L2_TUNER_RADIO</constant> for <filename>/dev/radioX</filename> 102to <constant>V4L2_TUNER_RADIO</constant> for <filename>/dev/radioX</filename>
103device nodes, and to <constant>V4L2_TUNER_ANALOG_TV</constant> 103device nodes, and to <constant>V4L2_TUNER_ANALOG_TV</constant>
104for all others. The field is not applicable to modulators, &ie; ignored 104for all others. The field is not applicable to modulators, &ie; ignored
105by drivers.</entry> 105by drivers. See <xref linkend="v4l2-tuner-type" /></entry>
106 </row> 106 </row>
107 <row> 107 <row>
108 <entry>__u32</entry> 108 <entry>__u32</entry>
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-parm.xml b/Documentation/DocBook/media/v4l/vidioc-g-parm.xml
index 19b1d85dd668..f83d2cdd1185 100644
--- a/Documentation/DocBook/media/v4l/vidioc-g-parm.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-g-parm.xml
@@ -75,11 +75,12 @@ devices.</para>
75 &cs-ustr; 75 &cs-ustr;
76 <tbody valign="top"> 76 <tbody valign="top">
77 <row> 77 <row>
78 <entry>&v4l2-buf-type;</entry> 78 <entry>__u32</entry>
79 <entry><structfield>type</structfield></entry> 79 <entry><structfield>type</structfield></entry>
80 <entry></entry> 80 <entry></entry>
81 <entry>The buffer (stream) type, same as &v4l2-format; 81 <entry>The buffer (stream) type, same as &v4l2-format;
82<structfield>type</structfield>, set by the application.</entry> 82<structfield>type</structfield>, set by the application. See <xref
83 linkend="v4l2-buf-type" /></entry>
83 </row> 84 </row>
84 <row> 85 <row>
85 <entry>union</entry> 86 <entry>union</entry>
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-sliced-vbi-cap.xml b/Documentation/DocBook/media/v4l/vidioc-g-sliced-vbi-cap.xml
index 71741daaf725..bd015d1563ff 100644
--- a/Documentation/DocBook/media/v4l/vidioc-g-sliced-vbi-cap.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-g-sliced-vbi-cap.xml
@@ -148,7 +148,7 @@ using the &VIDIOC-S-FMT; ioctl as described in <xref
148<structfield>service_lines</structfield>[1][0] to zero.</entry> 148<structfield>service_lines</structfield>[1][0] to zero.</entry>
149 </row> 149 </row>
150 <row> 150 <row>
151 <entry>&v4l2-buf-type;</entry> 151 <entry>__u32</entry>
152 <entry><structfield>type</structfield></entry> 152 <entry><structfield>type</structfield></entry>
153 <entry>Type of the data stream, see <xref 153 <entry>Type of the data stream, see <xref
154 linkend="v4l2-buf-type" />. Should be 154 linkend="v4l2-buf-type" />. Should be
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml b/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml
index 91ec2fb658f8..62a1aa200a36 100644
--- a/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml
@@ -107,7 +107,7 @@ user.<!-- FIXME Video inputs already have a name, the purpose of this
107field is not quite clear.--></para></entry> 107field is not quite clear.--></para></entry>
108 </row> 108 </row>
109 <row> 109 <row>
110 <entry>&v4l2-tuner-type;</entry> 110 <entry>__u32</entry>
111 <entry><structfield>type</structfield></entry> 111 <entry><structfield>type</structfield></entry>
112 <entry spanname="hspan">Type of the tuner, see <xref 112 <entry spanname="hspan">Type of the tuner, see <xref
113 linkend="v4l2-tuner-type" />.</entry> 113 linkend="v4l2-tuner-type" />.</entry>
diff --git a/Documentation/DocBook/media/v4l/vidioc-prepare-buf.xml b/Documentation/DocBook/media/v4l/vidioc-prepare-buf.xml
index 7bde698760e4..fa7ad7e33228 100644
--- a/Documentation/DocBook/media/v4l/vidioc-prepare-buf.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-prepare-buf.xml
@@ -48,6 +48,12 @@
48 <refsect1> 48 <refsect1>
49 <title>Description</title> 49 <title>Description</title>
50 50
51 <note>
52 <title>Experimental</title>
53 <para>This is an <link linkend="experimental"> experimental </link>
54 interface and may change in the future.</para>
55 </note>
56
51 <para>Applications can optionally call the 57 <para>Applications can optionally call the
52<constant>VIDIOC_PREPARE_BUF</constant> ioctl to pass ownership of the buffer 58<constant>VIDIOC_PREPARE_BUF</constant> ioctl to pass ownership of the buffer
53to the driver before actually enqueuing it, using the 59to the driver before actually enqueuing it, using the
diff --git a/Documentation/DocBook/media/v4l/vidioc-query-dv-preset.xml b/Documentation/DocBook/media/v4l/vidioc-query-dv-preset.xml
index 23b17f604211..1bc8aeb3ff1f 100644
--- a/Documentation/DocBook/media/v4l/vidioc-query-dv-preset.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-query-dv-preset.xml
@@ -49,6 +49,10 @@ input</refpurpose>
49 <refsect1> 49 <refsect1>
50 <title>Description</title> 50 <title>Description</title>
51 51
52 <para>This ioctl is <emphasis role="bold">deprecated</emphasis>.
53 New drivers and applications should use &VIDIOC-QUERY-DV-TIMINGS; instead.
54 </para>
55
52 <para>The hardware may be able to detect the current DV preset 56 <para>The hardware may be able to detect the current DV preset
53automatically, similar to sensing the video standard. To do so, applications 57automatically, similar to sensing the video standard. To do so, applications
54call <constant> VIDIOC_QUERY_DV_PRESET</constant> with a pointer to a 58call <constant> VIDIOC_QUERY_DV_PRESET</constant> with a pointer to a
diff --git a/Documentation/DocBook/media/v4l/vidioc-query-dv-timings.xml b/Documentation/DocBook/media/v4l/vidioc-query-dv-timings.xml
new file mode 100644
index 000000000000..44935a0ffcf0
--- /dev/null
+++ b/Documentation/DocBook/media/v4l/vidioc-query-dv-timings.xml
@@ -0,0 +1,104 @@
1<refentry id="vidioc-query-dv-timings">
2 <refmeta>
3 <refentrytitle>ioctl VIDIOC_QUERY_DV_TIMINGS</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>VIDIOC_QUERY_DV_TIMINGS</refname>
9 <refpurpose>Sense the DV preset received by the current
10input</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_dv_timings *<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_QUERY_DV_TIMINGS</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>The hardware may be able to detect the current DV timings
59automatically, similar to sensing the video standard. To do so, applications
60call <constant>VIDIOC_QUERY_DV_TIMINGS</constant> with a pointer to a
61&v4l2-dv-timings;. Once the hardware detects the timings, it will fill in the
62timings structure.
63
64If the timings could not be detected because there was no signal, then
65<errorcode>ENOLINK</errorcode> is returned. If a signal was detected, but
66it was unstable and the receiver could not lock to the signal, then
67<errorcode>ENOLCK</errorcode> is returned. If the receiver could lock to the signal,
68but the format is unsupported (e.g. because the pixelclock is out of range
69of the hardware capabilities), then the driver fills in whatever timings it
70could find and returns <errorcode>ERANGE</errorcode>. In that case the application
71can call &VIDIOC-DV-TIMINGS-CAP; to compare the found timings with the hardware's
72capabilities in order to give more precise feedback to the user.
73</para>
74 </refsect1>
75
76 <refsect1>
77 &return-value;
78
79 <variablelist>
80 <varlistentry>
81 <term><errorcode>ENOLINK</errorcode></term>
82 <listitem>
83 <para>No timings could be detected because no signal was found.
84</para>
85 </listitem>
86 </varlistentry>
87 <varlistentry>
88 <term><errorcode>ENOLCK</errorcode></term>
89 <listitem>
90 <para>The signal was unstable and the hardware could not lock on to it.
91</para>
92 </listitem>
93 </varlistentry>
94 <varlistentry>
95 <term><errorcode>ERANGE</errorcode></term>
96 <listitem>
97 <para>Timings were found, but they are out of range of the hardware
98capabilities.
99</para>
100 </listitem>
101 </varlistentry>
102 </variablelist>
103 </refsect1>
104</refentry>
diff --git a/Documentation/DocBook/media/v4l/vidioc-queryctrl.xml b/Documentation/DocBook/media/v4l/vidioc-queryctrl.xml
index 36660d311b51..e6645b996558 100644
--- a/Documentation/DocBook/media/v4l/vidioc-queryctrl.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-queryctrl.xml
@@ -127,7 +127,7 @@ the first control with a higher ID. Drivers which do not support this
127flag yet always return an &EINVAL;.</entry> 127flag yet always return an &EINVAL;.</entry>
128 </row> 128 </row>
129 <row> 129 <row>
130 <entry>&v4l2-ctrl-type;</entry> 130 <entry>__u32</entry>
131 <entry><structfield>type</structfield></entry> 131 <entry><structfield>type</structfield></entry>
132 <entry>Type of control, see <xref 132 <entry>Type of control, see <xref
133 linkend="v4l2-ctrl-type" />.</entry> 133 linkend="v4l2-ctrl-type" />.</entry>
@@ -215,11 +215,12 @@ the array to zero.</entry>
215 215
216 <table pgwide="1" frame="none" id="v4l2-querymenu"> 216 <table pgwide="1" frame="none" id="v4l2-querymenu">
217 <title>struct <structname>v4l2_querymenu</structname></title> 217 <title>struct <structname>v4l2_querymenu</structname></title>
218 <tgroup cols="3"> 218 <tgroup cols="4">
219 &cs-str; 219 &cs-str;
220 <tbody valign="top"> 220 <tbody valign="top">
221 <row> 221 <row>
222 <entry>__u32</entry> 222 <entry>__u32</entry>
223 <entry></entry>
223 <entry><structfield>id</structfield></entry> 224 <entry><structfield>id</structfield></entry>
224 <entry>Identifies the control, set by the application 225 <entry>Identifies the control, set by the application
225from the respective &v4l2-queryctrl; 226from the respective &v4l2-queryctrl;
@@ -227,18 +228,38 @@ from the respective &v4l2-queryctrl;
227 </row> 228 </row>
228 <row> 229 <row>
229 <entry>__u32</entry> 230 <entry>__u32</entry>
231 <entry></entry>
230 <entry><structfield>index</structfield></entry> 232 <entry><structfield>index</structfield></entry>
231 <entry>Index of the menu item, starting at zero, set by 233 <entry>Index of the menu item, starting at zero, set by
232 the application.</entry> 234 the application.</entry>
233 </row> 235 </row>
234 <row> 236 <row>
237 <entry>union</entry>
238 <entry></entry>
239 <entry></entry>
240 <entry></entry>
241 </row>
242 <row>
243 <entry></entry>
235 <entry>__u8</entry> 244 <entry>__u8</entry>
236 <entry><structfield>name</structfield>[32]</entry> 245 <entry><structfield>name</structfield>[32]</entry>
237 <entry>Name of the menu item, a NUL-terminated ASCII 246 <entry>Name of the menu item, a NUL-terminated ASCII
238string. This information is intended for the user.</entry> 247string. This information is intended for the user. This field is valid
248for <constant>V4L2_CTRL_FLAG_MENU</constant> type controls.</entry>
249 </row>
250 <row>
251 <entry></entry>
252 <entry>__s64</entry>
253 <entry><structfield>value</structfield></entry>
254 <entry>
255 Value of the integer menu item. This field is valid for
256 <constant>V4L2_CTRL_FLAG_INTEGER_MENU</constant> type
257 controls.
258 </entry>
239 </row> 259 </row>
240 <row> 260 <row>
241 <entry>__u32</entry> 261 <entry>__u32</entry>
262 <entry></entry>
242 <entry><structfield>reserved</structfield></entry> 263 <entry><structfield>reserved</structfield></entry>
243 <entry>Reserved for future extensions. Drivers must set 264 <entry>Reserved for future extensions. Drivers must set
244the array to zero.</entry> 265the array to zero.</entry>
@@ -292,6 +313,20 @@ the menu items can be enumerated with the
292<constant>VIDIOC_QUERYMENU</constant> ioctl.</entry> 313<constant>VIDIOC_QUERYMENU</constant> ioctl.</entry>
293 </row> 314 </row>
294 <row> 315 <row>
316 <entry><constant>V4L2_CTRL_TYPE_INTEGER_MENU</constant></entry>
317 <entry>&ge; 0</entry>
318 <entry>1</entry>
319 <entry>N-1</entry>
320 <entry>
321 The control has a menu of N choices. The values of the
322 menu items can be enumerated with the
323 <constant>VIDIOC_QUERYMENU</constant> ioctl. This is
324 similar to <constant>V4L2_CTRL_TYPE_MENU</constant>
325 except that instead of strings, the menu items are
326 signed 64-bit integers.
327 </entry>
328 </row>
329 <row>
295 <entry><constant>V4L2_CTRL_TYPE_BITMASK</constant></entry> 330 <entry><constant>V4L2_CTRL_TYPE_BITMASK</constant></entry>
296 <entry>0</entry> 331 <entry>0</entry>
297 <entry>n/a</entry> 332 <entry>n/a</entry>
diff --git a/Documentation/DocBook/media/v4l/vidioc-reqbufs.xml b/Documentation/DocBook/media/v4l/vidioc-reqbufs.xml
index 7be4b1d29b90..d7c95057bc51 100644
--- a/Documentation/DocBook/media/v4l/vidioc-reqbufs.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-reqbufs.xml
@@ -92,18 +92,19 @@ streamoff.--></para>
92 <entry>The number of buffers requested or granted.</entry> 92 <entry>The number of buffers requested or granted.</entry>
93 </row> 93 </row>
94 <row> 94 <row>
95 <entry>&v4l2-buf-type;</entry> 95 <entry>__u32</entry>
96 <entry><structfield>type</structfield></entry> 96 <entry><structfield>type</structfield></entry>
97 <entry>Type of the stream or buffers, this is the same 97 <entry>Type of the stream or buffers, this is the same
98as the &v4l2-format; <structfield>type</structfield> field. See <xref 98as the &v4l2-format; <structfield>type</structfield> field. See <xref
99 linkend="v4l2-buf-type" /> for valid values.</entry> 99 linkend="v4l2-buf-type" /> for valid values.</entry>
100 </row> 100 </row>
101 <row> 101 <row>
102 <entry>&v4l2-memory;</entry> 102 <entry>__u32</entry>
103 <entry><structfield>memory</structfield></entry> 103 <entry><structfield>memory</structfield></entry>
104 <entry>Applications set this field to 104 <entry>Applications set this field to
105<constant>V4L2_MEMORY_MMAP</constant> or 105<constant>V4L2_MEMORY_MMAP</constant> or
106<constant>V4L2_MEMORY_USERPTR</constant>.</entry> 106<constant>V4L2_MEMORY_USERPTR</constant>. See <xref linkend="v4l2-memory"
107/>.</entry>
107 </row> 108 </row>
108 <row> 109 <row>
109 <entry>__u32</entry> 110 <entry>__u32</entry>
diff --git a/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml b/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml
index 18b1a8266f7c..407dfceb71f0 100644
--- a/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml
@@ -73,10 +73,11 @@ same value as in the &v4l2-input; <structfield>tuner</structfield>
73field and the &v4l2-tuner; <structfield>index</structfield> field.</entry> 73field and the &v4l2-tuner; <structfield>index</structfield> field.</entry>
74 </row> 74 </row>
75 <row> 75 <row>
76 <entry>&v4l2-tuner-type;</entry> 76 <entry>__u32</entry>
77 <entry><structfield>type</structfield></entry> 77 <entry><structfield>type</structfield></entry>
78 <entry>The tuner type. This is the same value as in the 78 <entry>The tuner type. This is the same value as in the
79&v4l2-tuner; <structfield>type</structfield> field.</entry> 79&v4l2-tuner; <structfield>type</structfield> field. See <xref
80 linkend="v4l2-tuner-type" /></entry>
80 </row> 81 </row>
81 <row> 82 <row>
82 <entry>__u32</entry> 83 <entry>__u32</entry>
diff --git a/Documentation/DocBook/media/v4l/vidioc-subdev-g-crop.xml b/Documentation/DocBook/media/v4l/vidioc-subdev-g-crop.xml
index 06197323a8cc..4cddd788c589 100644
--- a/Documentation/DocBook/media/v4l/vidioc-subdev-g-crop.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-subdev-g-crop.xml
@@ -58,9 +58,12 @@
58 <title>Description</title> 58 <title>Description</title>
59 59
60 <note> 60 <note>
61 <title>Experimental</title> 61 <title>Obsolete</title>
62 <para>This is an <link linkend="experimental">experimental</link> 62
63 interface and may change in the future.</para> 63 <para>This is an <link linkend="obsolete">obsolete</link>
64 interface and may be removed in the future. It is superseded by
65 <link linkend="vidioc-subdev-g-selection">the selection
66 API</link>.</para>
64 </note> 67 </note>
65 68
66 <para>To retrieve the current crop rectangle applications set the 69 <para>To retrieve the current crop rectangle applications set the
diff --git a/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml b/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml
new file mode 100644
index 000000000000..208e9f0da3f3
--- /dev/null
+++ b/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml
@@ -0,0 +1,228 @@
1<refentry id="vidioc-subdev-g-selection">
2 <refmeta>
3 <refentrytitle>ioctl VIDIOC_SUBDEV_G_SELECTION, VIDIOC_SUBDEV_S_SELECTION</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>VIDIOC_SUBDEV_G_SELECTION</refname>
9 <refname>VIDIOC_SUBDEV_S_SELECTION</refname>
10 <refpurpose>Get or set selection rectangles 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_selection *<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_G_SELECTION, VIDIOC_SUBDEV_S_SELECTION</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>The selections are used to configure various image
59 processing functionality performed by the subdevs which affect the
60 image size. This currently includes cropping, scaling and
61 composition.</para>
62
63 <para>The selection API replaces <link
64 linkend="vidioc-subdev-g-crop">the old subdev crop API</link>. All
65 the function of the crop API, and more, are supported by the
66 selections API.</para>
67
68 <para>See <xref linkend="subdev"></xref> for
69 more information on how each selection target affects the image
70 processing pipeline inside the subdevice.</para>
71
72 <section>
73 <title>Types of selection targets</title>
74
75 <para>There are two types of selection targets: actual and bounds.
76 The ACTUAL targets are the targets which configure the hardware.
77 The BOUNDS target will return a rectangle that contain all
78 possible ACTUAL rectangles.</para>
79 </section>
80
81 <section>
82 <title>Discovering supported features</title>
83
84 <para>To discover which targets are supported, the user can
85 perform <constant>VIDIOC_SUBDEV_G_SELECTION</constant> on them.
86 Any unsupported target will return
87 <constant>EINVAL</constant>.</para>
88 </section>
89
90 <table pgwide="1" frame="none" id="v4l2-subdev-selection-targets">
91 <title>V4L2 subdev selection targets</title>
92 <tgroup cols="3">
93 &cs-def;
94 <tbody valign="top">
95 <row>
96 <entry><constant>V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL</constant></entry>
97 <entry>0x0000</entry>
98 <entry>Actual crop. Defines the cropping
99 performed by the processing step.</entry>
100 </row>
101 <row>
102 <entry><constant>V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS</constant></entry>
103 <entry>0x0002</entry>
104 <entry>Bounds of the crop rectangle.</entry>
105 </row>
106 <row>
107 <entry><constant>V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL</constant></entry>
108 <entry>0x0100</entry>
109 <entry>Actual compose rectangle. Used to configure scaling
110 on sink pads and composition on source pads.</entry>
111 </row>
112 <row>
113 <entry><constant>V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS</constant></entry>
114 <entry>0x0102</entry>
115 <entry>Bounds of the compose rectangle.</entry>
116 </row>
117 </tbody>
118 </tgroup>
119 </table>
120
121 <table pgwide="1" frame="none" id="v4l2-subdev-selection-flags">
122 <title>V4L2 subdev selection flags</title>
123 <tgroup cols="3">
124 &cs-def;
125 <tbody valign="top">
126 <row>
127 <entry><constant>V4L2_SUBDEV_SEL_FLAG_SIZE_GE</constant></entry>
128 <entry>(1 &lt;&lt; 0)</entry> <entry>Suggest the driver it
129 should choose greater or equal rectangle (in size) than
130 was requested. Albeit the driver may choose a lesser size,
131 it will only do so due to hardware limitations. Without
132 this flag (and
133 <constant>V4L2_SUBDEV_SEL_FLAG_SIZE_LE</constant>) the
134 behaviour is to choose the closest possible
135 rectangle.</entry>
136 </row>
137 <row>
138 <entry><constant>V4L2_SUBDEV_SEL_FLAG_SIZE_LE</constant></entry>
139 <entry>(1 &lt;&lt; 1)</entry> <entry>Suggest the driver it
140 should choose lesser or equal rectangle (in size) than was
141 requested. Albeit the driver may choose a greater size, it
142 will only do so due to hardware limitations.</entry>
143 </row>
144 <row>
145 <entry><constant>V4L2_SUBDEV_SEL_FLAG_KEEP_CONFIG</constant></entry>
146 <entry>(1 &lt;&lt; 2)</entry>
147 <entry>The configuration should not be propagated to any
148 further processing steps. If this flag is not given, the
149 configuration is propagated inside the subdevice to all
150 further processing steps.</entry>
151 </row>
152 </tbody>
153 </tgroup>
154 </table>
155
156 <table pgwide="1" frame="none" id="v4l2-subdev-selection">
157 <title>struct <structname>v4l2_subdev_selection</structname></title>
158 <tgroup cols="3">
159 &cs-str;
160 <tbody valign="top">
161 <row>
162 <entry>__u32</entry>
163 <entry><structfield>which</structfield></entry>
164 <entry>Active or try selection, from
165 &v4l2-subdev-format-whence;.</entry>
166 </row>
167 <row>
168 <entry>__u32</entry>
169 <entry><structfield>pad</structfield></entry>
170 <entry>Pad number as reported by the media framework.</entry>
171 </row>
172 <row>
173 <entry>__u32</entry>
174 <entry><structfield>target</structfield></entry>
175 <entry>Target selection rectangle. See
176 <xref linkend="v4l2-subdev-selection-targets">.</xref>.</entry>
177 </row>
178 <row>
179 <entry>__u32</entry>
180 <entry><structfield>flags</structfield></entry>
181 <entry>Flags. See
182 <xref linkend="v4l2-subdev-selection-flags">.</xref></entry>
183 </row>
184 <row>
185 <entry>&v4l2-rect;</entry>
186 <entry><structfield>rect</structfield></entry>
187 <entry>Selection rectangle, in pixels.</entry>
188 </row>
189 <row>
190 <entry>__u32</entry>
191 <entry><structfield>reserved</structfield>[8]</entry>
192 <entry>Reserved for future extensions. Applications and drivers must
193 set the array to zero.</entry>
194 </row>
195 </tbody>
196 </tgroup>
197 </table>
198
199 </refsect1>
200
201 <refsect1>
202 &return-value;
203
204 <variablelist>
205 <varlistentry>
206 <term><errorcode>EBUSY</errorcode></term>
207 <listitem>
208 <para>The selection rectangle can't be changed because the
209 pad is currently busy. This can be caused, for instance, by
210 an active video stream on the pad. The ioctl must not be
211 retried without performing another action to fix the problem
212 first. Only returned by
213 <constant>VIDIOC_SUBDEV_S_SELECTION</constant></para>
214 </listitem>
215 </varlistentry>
216 <varlistentry>
217 <term><errorcode>EINVAL</errorcode></term>
218 <listitem>
219 <para>The &v4l2-subdev-selection;
220 <structfield>pad</structfield> references a non-existing
221 pad, the <structfield>which</structfield> field references a
222 non-existing format, or the selection target is not
223 supported on the given subdev pad.</para>
224 </listitem>
225 </varlistentry>
226 </variablelist>
227 </refsect1>
228</refentry>
diff --git a/Documentation/DocBook/mtdnand.tmpl b/Documentation/DocBook/mtdnand.tmpl
index 0c674be0d3c6..e0aedb7a7827 100644
--- a/Documentation/DocBook/mtdnand.tmpl
+++ b/Documentation/DocBook/mtdnand.tmpl
@@ -1119,8 +1119,6 @@ in this page</entry>
1119 These constants are defined in nand.h. They are ored together to describe 1119 These constants are defined in nand.h. They are ored together to describe
1120 the chip functionality. 1120 the chip functionality.
1121 <programlisting> 1121 <programlisting>
1122/* Chip can not auto increment pages */
1123#define NAND_NO_AUTOINCR 0x00000001
1124/* Buswitdh is 16 bit */ 1122/* Buswitdh is 16 bit */
1125#define NAND_BUSWIDTH_16 0x00000002 1123#define NAND_BUSWIDTH_16 0x00000002
1126/* Device supports partial programming without padding */ 1124/* Device supports partial programming without padding */
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index 4468ce24427c..c379a2a6949f 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -150,7 +150,8 @@ be able to justify all violations that remain in your patch.
150 150
151Look through the MAINTAINERS file and the source code, and determine 151Look through the MAINTAINERS file and the source code, and determine
152if your change applies to a specific subsystem of the kernel, with 152if your change applies to a specific subsystem of the kernel, with
153an assigned maintainer. If so, e-mail that person. 153an assigned maintainer. If so, e-mail that person. The script
154scripts/get_maintainer.pl can be very useful at this step.
154 155
155If no maintainer is listed, or the maintainer does not respond, send 156If no maintainer is listed, or the maintainer does not respond, send
156your patch to the primary Linux kernel developer's mailing list, 157your patch to the primary Linux kernel developer's mailing list,
diff --git a/Documentation/arm/OMAP/DSS b/Documentation/arm/OMAP/DSS
index 888ae7b83ae4..a564ceea9e98 100644
--- a/Documentation/arm/OMAP/DSS
+++ b/Documentation/arm/OMAP/DSS
@@ -47,6 +47,51 @@ flexible way to enable non-common multi-display configuration. In addition to
47modelling the hardware overlays, omapdss supports virtual overlays and overlay 47modelling the hardware overlays, omapdss supports virtual overlays and overlay
48managers. These can be used when updating a display with CPU or system DMA. 48managers. These can be used when updating a display with CPU or system DMA.
49 49
50omapdss driver support for audio
51--------------------------------
52There exist several display technologies and standards that support audio as
53well. Hence, it is relevant to update the DSS device driver to provide an audio
54interface that may be used by an audio driver or any other driver interested in
55the functionality.
56
57The audio_enable function is intended to prepare the relevant
58IP for playback (e.g., enabling an audio FIFO, taking in/out of reset
59some IP, enabling companion chips, etc). It is intended to be called before
60audio_start. The audio_disable function performs the reverse operation and is
61intended to be called after audio_stop.
62
63While a given DSS device driver may support audio, it is possible that for
64certain configurations audio is not supported (e.g., an HDMI display using a
65VESA video timing). The audio_supported function is intended to query whether
66the current configuration of the display supports audio.
67
68The audio_config function is intended to configure all the relevant audio
69parameters of the display. In order to make the function independent of any
70specific DSS device driver, a struct omap_dss_audio is defined. Its purpose
71is to contain all the required parameters for audio configuration. At the
72moment, such structure contains pointers to IEC-60958 channel status word
73and CEA-861 audio infoframe structures. This should be enough to support
74HDMI and DisplayPort, as both are based on CEA-861 and IEC-60958.
75
76The audio_enable/disable, audio_config and audio_supported functions could be
77implemented as functions that may sleep. Hence, they should not be called
78while holding a spinlock or a readlock.
79
80The audio_start/audio_stop function is intended to effectively start/stop audio
81playback after the configuration has taken place. These functions are designed
82to be used in an atomic context. Hence, audio_start should return quickly and be
83called only after all the needed resources for audio playback (audio FIFOs,
84DMA channels, companion chips, etc) have been enabled to begin data transfers.
85audio_stop is designed to only stop the audio transfers. The resources used
86for playback are released using audio_disable.
87
88The enum omap_dss_audio_state may be used to help the implementations of
89the interface to keep track of the audio state. The initial state is _DISABLED;
90then, the state transitions to _CONFIGURED, and then, when it is ready to
91play audio, to _ENABLED. The state _PLAYING is used when the audio is being
92rendered.
93
94
50Panel and controller drivers 95Panel and controller drivers
51---------------------------- 96----------------------------
52 97
@@ -156,6 +201,7 @@ timings Display timings (pixclock,xres/hfp/hbp/hsw,yres/vfp/vbp/vsw)
156 "pal" and "ntsc" 201 "pal" and "ntsc"
157panel_name 202panel_name
158tear_elim Tearing elimination 0=off, 1=on 203tear_elim Tearing elimination 0=off, 1=on
204output_type Output type (video encoder only): "composite" or "svideo"
159 205
160There are also some debugfs files at <debugfs>/omapdss/ which show information 206There are also some debugfs files at <debugfs>/omapdss/ which show information
161about clocks and registers. 207about clocks and registers.
diff --git a/Documentation/arm/SPEAr/overview.txt b/Documentation/arm/SPEAr/overview.txt
index 28a9af953b9d..57aae7765c74 100644
--- a/Documentation/arm/SPEAr/overview.txt
+++ b/Documentation/arm/SPEAr/overview.txt
@@ -8,9 +8,8 @@ Introduction
8 weblink : http://www.st.com/spear 8 weblink : http://www.st.com/spear
9 9
10 The ST Microelectronics SPEAr range of ARM9/CortexA9 System-on-Chip CPUs are 10 The ST Microelectronics SPEAr range of ARM9/CortexA9 System-on-Chip CPUs are
11 supported by the 'spear' platform of ARM Linux. Currently SPEAr300, 11 supported by the 'spear' platform of ARM Linux. Currently SPEAr1310,
12 SPEAr310, SPEAr320 and SPEAr600 SOCs are supported. Support for the SPEAr13XX 12 SPEAr1340, SPEAr300, SPEAr310, SPEAr320 and SPEAr600 SOCs are supported.
13 series is in progress.
14 13
15 Hierarchy in SPEAr is as follows: 14 Hierarchy in SPEAr is as follows:
16 15
@@ -26,33 +25,36 @@ Introduction
26 - SPEAr600 (SOC) 25 - SPEAr600 (SOC)
27 - SPEAr600 Evaluation Board 26 - SPEAr600 Evaluation Board
28 - SPEAr13XX (13XX SOC series, based on ARM CORTEXA9) 27 - SPEAr13XX (13XX SOC series, based on ARM CORTEXA9)
29 - SPEAr1300 (SOC) 28 - SPEAr1310 (SOC)
29 - SPEAr1310 Evaluation Board
30 - SPEAr1340 (SOC)
31 - SPEAr1340 Evaluation Board
30 32
31 Configuration 33 Configuration
32 ------------- 34 -------------
33 35
34 A generic configuration is provided for each machine, and can be used as the 36 A generic configuration is provided for each machine, and can be used as the
35 default by 37 default by
36 make spear600_defconfig 38 make spear13xx_defconfig
37 make spear300_defconfig 39 make spear3xx_defconfig
38 make spear310_defconfig 40 make spear6xx_defconfig
39 make spear320_defconfig
40 41
41 Layout 42 Layout
42 ------ 43 ------
43 44
44 The common files for multiple machine families (SPEAr3XX, SPEAr6XX and 45 The common files for multiple machine families (SPEAr3xx, SPEAr6xx and
45 SPEAr13XX) are located in the platform code contained in arch/arm/plat-spear 46 SPEAr13xx) are located in the platform code contained in arch/arm/plat-spear
46 with headers in plat/. 47 with headers in plat/.
47 48
48 Each machine series have a directory with name arch/arm/mach-spear followed by 49 Each machine series have a directory with name arch/arm/mach-spear followed by
49 series name. Like mach-spear3xx, mach-spear6xx and mach-spear13xx. 50 series name. Like mach-spear3xx, mach-spear6xx and mach-spear13xx.
50 51
51 Common file for machines of spear3xx family is mach-spear3xx/spear3xx.c and for 52 Common file for machines of spear3xx family is mach-spear3xx/spear3xx.c, for
52 spear6xx is mach-spear6xx/spear6xx.c. mach-spear* also contain soc/machine 53 spear6xx is mach-spear6xx/spear6xx.c and for spear13xx family is
53 specific files, like spear300.c, spear310.c, spear320.c and spear600.c. 54 mach-spear13xx/spear13xx.c. mach-spear* also contain soc/machine specific
54 mach-spear* doesn't contains board specific files as they fully support 55 files, like spear1310.c, spear1340.c spear300.c, spear310.c, spear320.c and
55 Flattened Device Tree. 56 spear600.c. mach-spear* doesn't contains board specific files as they fully
57 support Flattened Device Tree.
56 58
57 59
58 Document Author 60 Document Author
diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt
index 9b1067afb224..dd88540bb995 100644
--- a/Documentation/cgroups/memory.txt
+++ b/Documentation/cgroups/memory.txt
@@ -184,12 +184,14 @@ behind this approach is that a cgroup that aggressively uses a shared
184page will eventually get charged for it (once it is uncharged from 184page will eventually get charged for it (once it is uncharged from
185the cgroup that brought it in -- this will happen on memory pressure). 185the cgroup that brought it in -- this will happen on memory pressure).
186 186
187But see section 8.2: when moving a task to another cgroup, its pages may
188be recharged to the new cgroup, if move_charge_at_immigrate has been chosen.
189
187Exception: If CONFIG_CGROUP_CGROUP_MEM_RES_CTLR_SWAP is not used. 190Exception: If CONFIG_CGROUP_CGROUP_MEM_RES_CTLR_SWAP is not used.
188When you do swapoff and make swapped-out pages of shmem(tmpfs) to 191When you do swapoff and make swapped-out pages of shmem(tmpfs) to
189be backed into memory in force, charges for pages are accounted against the 192be backed into memory in force, charges for pages are accounted against the
190caller of swapoff rather than the users of shmem. 193caller of swapoff rather than the users of shmem.
191 194
192
1932.4 Swap Extension (CONFIG_CGROUP_MEM_RES_CTLR_SWAP) 1952.4 Swap Extension (CONFIG_CGROUP_MEM_RES_CTLR_SWAP)
194 196
195Swap Extension allows you to record charge for swap. A swapped-in page is 197Swap Extension allows you to record charge for swap. A swapped-in page is
@@ -374,14 +376,15 @@ cgroup might have some charge associated with it, even though all
374tasks have migrated away from it. (because we charge against pages, not 376tasks have migrated away from it. (because we charge against pages, not
375against tasks.) 377against tasks.)
376 378
377Such charges are freed or moved to their parent. At moving, both of RSS 379We move the stats to root (if use_hierarchy==0) or parent (if
378and CACHES are moved to parent. 380use_hierarchy==1), and no change on the charge except uncharging
379rmdir() may return -EBUSY if freeing/moving fails. See 5.1 also. 381from the child.
380 382
381Charges recorded in swap information is not updated at removal of cgroup. 383Charges recorded in swap information is not updated at removal of cgroup.
382Recorded information is discarded and a cgroup which uses swap (swapcache) 384Recorded information is discarded and a cgroup which uses swap (swapcache)
383will be charged as a new owner of it. 385will be charged as a new owner of it.
384 386
387About use_hierarchy, see Section 6.
385 388
3865. Misc. interfaces. 3895. Misc. interfaces.
387 390
@@ -394,13 +397,15 @@ will be charged as a new owner of it.
394 397
395 Almost all pages tracked by this memory cgroup will be unmapped and freed. 398 Almost all pages tracked by this memory cgroup will be unmapped and freed.
396 Some pages cannot be freed because they are locked or in-use. Such pages are 399 Some pages cannot be freed because they are locked or in-use. Such pages are
397 moved to parent and this cgroup will be empty. This may return -EBUSY if 400 moved to parent(if use_hierarchy==1) or root (if use_hierarchy==0) and this
398 VM is too busy to free/move all pages immediately. 401 cgroup will be empty.
399 402
400 Typical use case of this interface is that calling this before rmdir(). 403 Typical use case of this interface is that calling this before rmdir().
401 Because rmdir() moves all pages to parent, some out-of-use page caches can be 404 Because rmdir() moves all pages to parent, some out-of-use page caches can be
402 moved to the parent. If you want to avoid that, force_empty will be useful. 405 moved to the parent. If you want to avoid that, force_empty will be useful.
403 406
407 About use_hierarchy, see Section 6.
408
4045.2 stat file 4095.2 stat file
405 410
406memory.stat file includes following statistics 411memory.stat file includes following statistics
@@ -430,17 +435,10 @@ hierarchical_memory_limit - # of bytes of memory limit with regard to hierarchy
430hierarchical_memsw_limit - # of bytes of memory+swap limit with regard to 435hierarchical_memsw_limit - # of bytes of memory+swap limit with regard to
431 hierarchy under which memory cgroup is. 436 hierarchy under which memory cgroup is.
432 437
433total_cache - sum of all children's "cache" 438total_<counter> - # hierarchical version of <counter>, which in
434total_rss - sum of all children's "rss" 439 addition to the cgroup's own value includes the
435total_mapped_file - sum of all children's "cache" 440 sum of all hierarchical children's values of
436total_pgpgin - sum of all children's "pgpgin" 441 <counter>, i.e. total_cache
437total_pgpgout - sum of all children's "pgpgout"
438total_swap - sum of all children's "swap"
439total_inactive_anon - sum of all children's "inactive_anon"
440total_active_anon - sum of all children's "active_anon"
441total_inactive_file - sum of all children's "inactive_file"
442total_active_file - sum of all children's "active_file"
443total_unevictable - sum of all children's "unevictable"
444 442
445# The following additional stats are dependent on CONFIG_DEBUG_VM. 443# The following additional stats are dependent on CONFIG_DEBUG_VM.
446 444
@@ -622,8 +620,7 @@ memory cgroup.
622 bit | what type of charges would be moved ? 620 bit | what type of charges would be moved ?
623 -----+------------------------------------------------------------------------ 621 -----+------------------------------------------------------------------------
624 0 | A charge of an anonymous page(or swap of it) used by the target task. 622 0 | A charge of an anonymous page(or swap of it) used by the target task.
625 | Those pages and swaps must be used only by the target task. You must 623 | You must enable Swap Extension(see 2.4) to enable move of swap charges.
626 | enable Swap Extension(see 2.4) to enable move of swap charges.
627 -----+------------------------------------------------------------------------ 624 -----+------------------------------------------------------------------------
628 1 | A charge of file pages(normal file, tmpfs file(e.g. ipc shared memory) 625 1 | A charge of file pages(normal file, tmpfs file(e.g. ipc shared memory)
629 | and swaps of tmpfs file) mmapped by the target task. Unlike the case of 626 | and swaps of tmpfs file) mmapped by the target task. Unlike the case of
@@ -636,8 +633,6 @@ memory cgroup.
636 633
6378.3 TODO 6348.3 TODO
638 635
639- Implement madvise(2) to let users decide the vma to be moved or not to be
640 moved.
641- All of moving charge operations are done under cgroup_mutex. It's not good 636- All of moving charge operations are done under cgroup_mutex. It's not good
642 behavior to hold the mutex too long, so we may need some trick. 637 behavior to hold the mutex too long, so we may need some trick.
643 638
diff --git a/Documentation/cgroups/resource_counter.txt b/Documentation/cgroups/resource_counter.txt
index f3c4ec3626a2..0c4a344e78fa 100644
--- a/Documentation/cgroups/resource_counter.txt
+++ b/Documentation/cgroups/resource_counter.txt
@@ -92,6 +92,14 @@ to work with it.
92 92
93 The _locked routines imply that the res_counter->lock is taken. 93 The _locked routines imply that the res_counter->lock is taken.
94 94
95 f. void res_counter_uncharge_until
96 (struct res_counter *rc, struct res_counter *top,
97 unsinged long val)
98
99 Almost same as res_cunter_uncharge() but propagation of uncharge
100 stops when rc == top. This is useful when kill a res_coutner in
101 child cgroup.
102
95 2.1 Other accounting routines 103 2.1 Other accounting routines
96 104
97 There are more routines that may help you with common needs, like 105 There are more routines that may help you with common needs, like
diff --git a/Documentation/cris/README b/Documentation/cris/README
index d9b086869a60..8dbdb1a44429 100644
--- a/Documentation/cris/README
+++ b/Documentation/cris/README
@@ -1,38 +1,34 @@
1Linux 2.4 on the CRIS architecture 1Linux on the CRIS architecture
2================================== 2==============================
3$Id: README,v 1.7 2001/04/19 12:38:32 bjornw Exp $
4 3
5This is a port of Linux 2.4 to Axis Communications ETRAX 100LX embedded 4This is a port of Linux to Axis Communications ETRAX 100LX,
6network CPU. For more information about CRIS and ETRAX please see further 5ETRAX FS and ARTPEC-3 embedded network CPUs.
7below. 6
7For more information about CRIS and ETRAX please see further below.
8 8
9In order to compile this you need a version of gcc with support for the 9In order to compile this you need a version of gcc with support for the
10ETRAX chip family. Please see this link for more information on how to 10ETRAX chip family. Please see this link for more information on how to
11download the compiler and other tools useful when building and booting 11download the compiler and other tools useful when building and booting
12software for the ETRAX platform: 12software for the ETRAX platform:
13 13
14http://developer.axis.com/doc/software/devboard_lx/install-howto.html 14http://developer.axis.com/wiki/doku.php?id=axis:install-howto-2_20
15
16<more specific information should come in this document later>
17 15
18What is CRIS ? 16What is CRIS ?
19-------------- 17--------------
20 18
21CRIS is an acronym for 'Code Reduced Instruction Set'. It is the CPU 19CRIS is an acronym for 'Code Reduced Instruction Set'. It is the CPU
22architecture in Axis Communication AB's range of embedded network CPU's, 20architecture in Axis Communication AB's range of embedded network CPU's,
23called ETRAX. The latest CPU is called ETRAX 100LX, where LX stands for 21called ETRAX.
24'Linux' because the chip was designed to be a good host for the Linux
25operating system.
26 22
27The ETRAX 100LX chip 23The ETRAX 100LX chip
28-------------------- 24--------------------
29 25
30For reference, please see the press-release: 26For reference, please see the following link:
31 27
32http://www.axis.com/news/us/001101_etrax.htm 28http://www.axis.com/products/dev_etrax_100lx/index.htm
33 29
34The ETRAX 100LX is a 100 MIPS processor with 8kB cache, MMU, and a very broad 30The ETRAX 100LX is a 100 MIPS processor with 8kB cache, MMU, and a very broad
35range of built-in interfaces, all with modern scatter/gather DMA. 31range of built-in interfaces, all with modern scatter/gather DMA.
36 32
37Memory interfaces: 33Memory interfaces:
38 34
@@ -51,20 +47,28 @@ I/O interfaces:
51 * SCSI 47 * SCSI
52 * two parallel-ports 48 * two parallel-ports
53 * two generic 8-bit ports 49 * two generic 8-bit ports
54 50
55 (not all interfaces are available at the same time due to chip pin 51 (not all interfaces are available at the same time due to chip pin
56 multiplexing) 52 multiplexing)
57 53
58The previous version of the ETRAX, the ETRAX 100, sits in almost all of 54ETRAX 100LX is CRISv10 architecture.
59Axis shipping thin-servers like the Axis 2100 web camera or the ETRAX 100 55
60developer-board. It lacks an MMU so the Linux we run on that is a version 56
61of uClinux (Linux 2.0 without MM-support) ported to the CRIS architecture. 57The ETRAX FS and ARTPEC-3 chips
62The new Linux 2.4 port has full MM and needs a CPU with an MMU, so it will 58-------------------------------
63not run on the ETRAX 100.
64 59
65A version of the Axis developer-board with ETRAX 100LX (running Linux 60The ETRAX FS is a 200MHz 32-bit RISC processor with on-chip 16kB
662.4) is now available. For more information please see developer.axis.com. 61I-cache and 16kB D-cache and with a wide range of device interfaces
62including multiple high speed serial ports and an integrated USB 1.1 PHY.
67 63
64The ARTPEC-3 is a variant of the ETRAX FS with additional IO-units
65used by the Axis Communications network cameras.
66
67See below link for more information:
68
69http://www.axis.com/products/dev_etrax_fs/index.htm
70
71ETRAX FS and ARTPEC-3 are both CRISv32 architectures.
68 72
69Bootlog 73Bootlog
70------- 74-------
@@ -182,10 +186,6 @@ SwapFree: 0 kB
182-rwxr-xr-x 1 342 100 16252 Jan 01 00:00 telnetd 186-rwxr-xr-x 1 342 100 16252 Jan 01 00:00 telnetd
183 187
184 188
185(All programs are statically linked to the libc at this point - we have not ported the
186 shared libraries yet)
187
188
189 189
190 190
191 191
diff --git a/Documentation/device-mapper/thin-provisioning.txt b/Documentation/device-mapper/thin-provisioning.txt
index 3370bc4d7b98..f5cfc62b7ad3 100644
--- a/Documentation/device-mapper/thin-provisioning.txt
+++ b/Documentation/device-mapper/thin-provisioning.txt
@@ -287,6 +287,17 @@ iii) Messages
287 the current transaction id is when you change it with this 287 the current transaction id is when you change it with this
288 compare-and-swap message. 288 compare-and-swap message.
289 289
290 reserve_metadata_snap
291
292 Reserve a copy of the data mapping btree for use by userland.
293 This allows userland to inspect the mappings as they were when
294 this message was executed. Use the pool's status command to
295 get the root block associated with the metadata snapshot.
296
297 release_metadata_snap
298
299 Release a previously reserved copy of the data mapping btree.
300
290'thin' target 301'thin' target
291------------- 302-------------
292 303
diff --git a/Documentation/devicetree/bindings/arm/fsl.txt b/Documentation/devicetree/bindings/arm/fsl.txt
index bfbc771a65f8..ac9e7516756e 100644
--- a/Documentation/devicetree/bindings/arm/fsl.txt
+++ b/Documentation/devicetree/bindings/arm/fsl.txt
@@ -1,6 +1,14 @@
1Freescale i.MX Platforms Device Tree Bindings 1Freescale i.MX Platforms Device Tree Bindings
2----------------------------------------------- 2-----------------------------------------------
3 3
4i.MX23 Evaluation Kit
5Required root node properties:
6 - compatible = "fsl,imx23-evk", "fsl,imx23";
7
8i.MX28 Evaluation Kit
9Required root node properties:
10 - compatible = "fsl,imx28-evk", "fsl,imx28";
11
4i.MX51 Babbage Board 12i.MX51 Babbage Board
5Required root node properties: 13Required root node properties:
6 - compatible = "fsl,imx51-babbage", "fsl,imx51"; 14 - compatible = "fsl,imx51-babbage", "fsl,imx51";
@@ -29,6 +37,10 @@ i.MX6 Quad SABRE Lite Board
29Required root node properties: 37Required root node properties:
30 - compatible = "fsl,imx6q-sabrelite", "fsl,imx6q"; 38 - compatible = "fsl,imx6q-sabrelite", "fsl,imx6q";
31 39
40i.MX6 Quad SABRE Smart Device Board
41Required root node properties:
42 - compatible = "fsl,imx6q-sabresd", "fsl,imx6q";
43
32Generic i.MX boards 44Generic i.MX boards
33------------------- 45-------------------
34 46
diff --git a/Documentation/devicetree/bindings/arm/gic.txt b/Documentation/devicetree/bindings/arm/gic.txt
index 9b4b82a721b6..62eb8df1e08d 100644
--- a/Documentation/devicetree/bindings/arm/gic.txt
+++ b/Documentation/devicetree/bindings/arm/gic.txt
@@ -11,7 +11,9 @@ have PPIs or SGIs.
11Main node required properties: 11Main node required properties:
12 12
13- compatible : should be one of: 13- compatible : should be one of:
14 "arm,cortex-a15-gic"
14 "arm,cortex-a9-gic" 15 "arm,cortex-a9-gic"
16 "arm,cortex-a7-gic"
15 "arm,arm11mp-gic" 17 "arm,arm11mp-gic"
16- interrupt-controller : Identifies the node as an interrupt controller 18- interrupt-controller : Identifies the node as an interrupt controller
17- #interrupt-cells : Specifies the number of cells needed to encode an 19- #interrupt-cells : Specifies the number of cells needed to encode an
@@ -39,8 +41,9 @@ Main node required properties:
39 the GIC cpu interface register base and size. 41 the GIC cpu interface register base and size.
40 42
41Optional 43Optional
42- interrupts : Interrupt source of the parent interrupt controller. Only 44- interrupts : Interrupt source of the parent interrupt controller on
43 present on secondary GICs. 45 secondary GICs, or VGIC maintainance interrupt on primary GIC (see
46 below).
44 47
45- cpu-offset : per-cpu offset within the distributor and cpu interface 48- cpu-offset : per-cpu offset within the distributor and cpu interface
46 regions, used when the GIC doesn't have banked registers. The offset is 49 regions, used when the GIC doesn't have banked registers. The offset is
@@ -57,3 +60,31 @@ Example:
57 <0xfff10100 0x100>; 60 <0xfff10100 0x100>;
58 }; 61 };
59 62
63
64* GIC virtualization extensions (VGIC)
65
66For ARM cores that support the virtualization extensions, additional
67properties must be described (they only exist if the GIC is the
68primary interrupt controller).
69
70Required properties:
71
72- reg : Additional regions specifying the base physical address and
73 size of the VGIC registers. The first additional region is the GIC
74 virtual interface control register base and size. The 2nd additional
75 region is the GIC virtual cpu interface register base and size.
76
77- interrupts : VGIC maintainance interrupt.
78
79Example:
80
81 interrupt-controller@2c001000 {
82 compatible = "arm,cortex-a15-gic";
83 #interrupt-cells = <3>;
84 interrupt-controller;
85 reg = <0x2c001000 0x1000>,
86 <0x2c002000 0x1000>,
87 <0x2c004000 0x2000>,
88 <0x2c006000 0x2000>;
89 interrupts = <1 9 0xf04>;
90 };
diff --git a/Documentation/devicetree/bindings/arm/samsung/interrupt-combiner.txt b/Documentation/devicetree/bindings/arm/samsung/interrupt-combiner.txt
new file mode 100644
index 000000000000..f2f2171e530e
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/samsung/interrupt-combiner.txt
@@ -0,0 +1,52 @@
1* Samsung Exynos Interrupt Combiner Controller
2
3Samsung's Exynos4 architecture includes a interrupt combiner controller which
4can combine interrupt sources as a group and provide a single interrupt request
5for the group. The interrupt request from each group are connected to a parent
6interrupt controller, such as GIC in case of Exynos4210.
7
8The interrupt combiner controller consists of multiple combiners. Upto eight
9interrupt sources can be connected to a combiner. The combiner outputs one
10combined interrupt for its eight interrupt sources. The combined interrupt
11is usually connected to a parent interrupt controller.
12
13A single node in the device tree is used to describe the interrupt combiner
14controller module (which includes multiple combiners). A combiner in the
15interrupt controller module shares config/control registers with other
16combiners. For example, a 32-bit interrupt enable/disable config register
17can accommodate upto 4 interrupt combiners (with each combiner supporting
18upto 8 interrupt sources).
19
20Required properties:
21- compatible: should be "samsung,exynos4210-combiner".
22- interrupt-controller: Identifies the node as an interrupt controller.
23- #interrupt-cells: should be <2>. The meaning of the cells are
24 * First Cell: Combiner Group Number.
25 * Second Cell: Interrupt number within the group.
26- reg: Base address and size of interrupt combiner registers.
27- interrupts: The list of interrupts generated by the combiners which are then
28 connected to a parent interrupt controller. The format of the interrupt
29 specifier depends in the interrupt parent controller.
30
31Optional properties:
32- samsung,combiner-nr: The number of interrupt combiners supported. If this
33 property is not specified, the default number of combiners is assumed
34 to be 16.
35- interrupt-parent: pHandle of the parent interrupt controller, if not
36 inherited from the parent node.
37
38
39Example:
40
41 The following is a an example from the Exynos4210 SoC dtsi file.
42
43 combiner:interrupt-controller@10440000 {
44 compatible = "samsung,exynos4210-combiner";
45 interrupt-controller;
46 #interrupt-cells = <2>;
47 reg = <0x10440000 0x1000>;
48 interrupts = <0 0 0>, <0 1 0>, <0 2 0>, <0 3 0>,
49 <0 4 0>, <0 5 0>, <0 6 0>, <0 7 0>,
50 <0 8 0>, <0 9 0>, <0 10 0>, <0 11 0>,
51 <0 12 0>, <0 13 0>, <0 14 0>, <0 15 0>;
52 };
diff --git a/Documentation/devicetree/bindings/arm/spear-timer.txt b/Documentation/devicetree/bindings/arm/spear-timer.txt
new file mode 100644
index 000000000000..c0017221cf55
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/spear-timer.txt
@@ -0,0 +1,18 @@
1* SPEAr ARM Timer
2
3** Timer node required properties:
4
5- compatible : Should be:
6 "st,spear-timer"
7- reg: Address range of the timer registers
8- interrupt-parent: Should be the phandle for the interrupt controller
9 that services interrupts for this device
10- interrupt: Should contain the timer interrupt number
11
12Example:
13
14 timer@f0000000 {
15 compatible = "st,spear-timer";
16 reg = <0xf0000000 0x400>;
17 interrupts = <2>;
18 };
diff --git a/Documentation/devicetree/bindings/arm/spear.txt b/Documentation/devicetree/bindings/arm/spear.txt
index aa5f355cc947..0d42949df6c2 100644
--- a/Documentation/devicetree/bindings/arm/spear.txt
+++ b/Documentation/devicetree/bindings/arm/spear.txt
@@ -2,25 +2,25 @@ ST SPEAr Platforms Device Tree Bindings
2--------------------------------------- 2---------------------------------------
3 3
4Boards with the ST SPEAr600 SoC shall have the following properties: 4Boards with the ST SPEAr600 SoC shall have the following properties:
5
6Required root node property: 5Required root node property:
7
8compatible = "st,spear600"; 6compatible = "st,spear600";
9 7
10Boards with the ST SPEAr300 SoC shall have the following properties: 8Boards with the ST SPEAr300 SoC shall have the following properties:
11
12Required root node property: 9Required root node property:
13
14compatible = "st,spear300"; 10compatible = "st,spear300";
15 11
16Boards with the ST SPEAr310 SoC shall have the following properties: 12Boards with the ST SPEAr310 SoC shall have the following properties:
17
18Required root node property: 13Required root node property:
19
20compatible = "st,spear310"; 14compatible = "st,spear310";
21 15
22Boards with the ST SPEAr320 SoC shall have the following properties: 16Boards with the ST SPEAr320 SoC shall have the following properties:
17Required root node property:
18compatible = "st,spear320";
23 19
20Boards with the ST SPEAr1310 SoC shall have the following properties:
24Required root node property: 21Required root node property:
22compatible = "st,spear1310";
25 23
26compatible = "st,spear320"; 24Boards with the ST SPEAr1340 SoC shall have the following properties:
25Required root node property:
26compatible = "st,spear1340";
diff --git a/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-ahb.txt b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-ahb.txt
new file mode 100644
index 000000000000..234406d41c12
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-ahb.txt
@@ -0,0 +1,11 @@
1NVIDIA Tegra AHB
2
3Required properties:
4- compatible : "nvidia,tegra20-ahb" or "nvidia,tegra30-ahb"
5- reg : Should contain 1 register ranges(address and length)
6
7Example:
8 ahb: ahb@6000c004 {
9 compatible = "nvidia,tegra20-ahb";
10 reg = <0x6000c004 0x10c>; /* AHB Arbitration + Gizmo Controller */
11 };
diff --git a/Documentation/devicetree/bindings/dma/fsl-mxs-dma.txt b/Documentation/devicetree/bindings/dma/fsl-mxs-dma.txt
new file mode 100644
index 000000000000..ded0398d3bdc
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/fsl-mxs-dma.txt
@@ -0,0 +1,19 @@
1* Freescale MXS DMA
2
3Required properties:
4- compatible : Should be "fsl,<chip>-dma-apbh" or "fsl,<chip>-dma-apbx"
5- reg : Should contain registers location and length
6
7Supported chips:
8imx23, imx28.
9
10Examples:
11dma-apbh@80004000 {
12 compatible = "fsl,imx28-dma-apbh";
13 reg = <0x80004000 2000>;
14};
15
16dma-apbx@80024000 {
17 compatible = "fsl,imx28-dma-apbx";
18 reg = <0x80024000 2000>;
19};
diff --git a/Documentation/devicetree/bindings/dma/snps-dma.txt b/Documentation/devicetree/bindings/dma/snps-dma.txt
new file mode 100644
index 000000000000..c0d85dbcada5
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/snps-dma.txt
@@ -0,0 +1,17 @@
1* Synopsys Designware DMA Controller
2
3Required properties:
4- compatible: "snps,dma-spear1340"
5- reg: Address range of the DMAC registers
6- interrupt-parent: Should be the phandle for the interrupt controller
7 that services interrupts for this device
8- interrupt: Should contain the DMAC interrupt number
9
10Example:
11
12 dma@fc000000 {
13 compatible = "snps,dma-spear1340";
14 reg = <0xfc000000 0x1000>;
15 interrupt-parent = <&vic1>;
16 interrupts = <12>;
17 };
diff --git a/Documentation/devicetree/bindings/gpio/gpio-mm-lantiq.txt b/Documentation/devicetree/bindings/gpio/gpio-mm-lantiq.txt
new file mode 100644
index 000000000000..f93d51478d5a
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-mm-lantiq.txt
@@ -0,0 +1,38 @@
1Lantiq SoC External Bus memory mapped GPIO controller
2
3By attaching hardware latches to the EBU it is possible to create output
4only gpios. This driver configures a special memory address, which when
5written to outputs 16 bit to the latches.
6
7The node describing the memory mapped GPIOs needs to be a child of the node
8describing the "lantiq,localbus".
9
10Required properties:
11- compatible : Should be "lantiq,gpio-mm-lantiq"
12- reg : Address and length of the register set for the device
13- #gpio-cells : Should be two. The first cell is the pin number and
14 the second cell is used to specify optional parameters (currently
15 unused).
16- gpio-controller : Marks the device node as a gpio controller.
17
18Optional properties:
19- lantiq,shadow : The default value that we shall assume as already set on the
20 shift register cascade.
21
22Example:
23
24localbus@0 {
25 #address-cells = <2>;
26 #size-cells = <1>;
27 ranges = <0 0 0x0 0x3ffffff /* addrsel0 */
28 1 0 0x4000000 0x4000010>; /* addsel1 */
29 compatible = "lantiq,localbus", "simple-bus";
30
31 gpio_mm0: gpio@4000000 {
32 compatible = "lantiq,gpio-mm";
33 reg = <1 0x0 0x10>;
34 gpio-controller;
35 #gpio-cells = <2>;
36 lantiq,shadow = <0x77f>
37 };
38}
diff --git a/Documentation/devicetree/bindings/gpio/gpio-mxs.txt b/Documentation/devicetree/bindings/gpio/gpio-mxs.txt
new file mode 100644
index 000000000000..0c35673f7a3e
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-mxs.txt
@@ -0,0 +1,87 @@
1* Freescale MXS GPIO controller
2
3The Freescale MXS GPIO controller is part of MXS PIN controller. The
4GPIOs are organized in port/bank. Each port consists of 32 GPIOs.
5
6As the GPIO controller is embedded in the PIN controller and all the
7GPIO ports share the same IO space with PIN controller, the GPIO node
8will be represented as sub-nodes of MXS pinctrl node.
9
10Required properties for GPIO node:
11- compatible : Should be "fsl,<soc>-gpio". The supported SoCs include
12 imx23 and imx28.
13- interrupts : Should be the port interrupt shared by all 32 pins.
14- gpio-controller : Marks the device node as a gpio controller.
15- #gpio-cells : Should be two. The first cell is the pin number and
16 the second cell is used to specify optional parameters (currently
17 unused).
18- interrupt-controller: Marks the device node as an interrupt controller.
19- #interrupt-cells : Should be 2. The first cell is the GPIO number.
20 The second cell bits[3:0] is used to specify trigger type and level flags:
21 1 = low-to-high edge triggered.
22 2 = high-to-low edge triggered.
23 4 = active high level-sensitive.
24 8 = active low level-sensitive.
25
26Note: Each GPIO port should have an alias correctly numbered in "aliases"
27node.
28
29Examples:
30
31aliases {
32 gpio0 = &gpio0;
33 gpio1 = &gpio1;
34 gpio2 = &gpio2;
35 gpio3 = &gpio3;
36 gpio4 = &gpio4;
37};
38
39pinctrl@80018000 {
40 compatible = "fsl,imx28-pinctrl", "simple-bus";
41 reg = <0x80018000 2000>;
42
43 gpio0: gpio@0 {
44 compatible = "fsl,imx28-gpio";
45 interrupts = <127>;
46 gpio-controller;
47 #gpio-cells = <2>;
48 interrupt-controller;
49 #interrupt-cells = <2>;
50 };
51
52 gpio1: gpio@1 {
53 compatible = "fsl,imx28-gpio";
54 interrupts = <126>;
55 gpio-controller;
56 #gpio-cells = <2>;
57 interrupt-controller;
58 #interrupt-cells = <2>;
59 };
60
61 gpio2: gpio@2 {
62 compatible = "fsl,imx28-gpio";
63 interrupts = <125>;
64 gpio-controller;
65 #gpio-cells = <2>;
66 interrupt-controller;
67 #interrupt-cells = <2>;
68 };
69
70 gpio3: gpio@3 {
71 compatible = "fsl,imx28-gpio";
72 interrupts = <124>;
73 gpio-controller;
74 #gpio-cells = <2>;
75 interrupt-controller;
76 #interrupt-cells = <2>;
77 };
78
79 gpio4: gpio@4 {
80 compatible = "fsl,imx28-gpio";
81 interrupts = <123>;
82 gpio-controller;
83 #gpio-cells = <2>;
84 interrupt-controller;
85 #interrupt-cells = <2>;
86 };
87};
diff --git a/Documentation/devicetree/bindings/gpio/gpio-stp-xway.txt b/Documentation/devicetree/bindings/gpio/gpio-stp-xway.txt
new file mode 100644
index 000000000000..854de130a971
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-stp-xway.txt
@@ -0,0 +1,42 @@
1Lantiq SoC Serial To Parallel (STP) GPIO controller
2
3The Serial To Parallel (STP) is found on MIPS based Lantiq socs. It is a
4peripheral controller used to drive external shift register cascades. At most
53 groups of 8 bits can be driven. The hardware is able to allow the DSL modem
6to drive the 2 LSBs of the cascade automatically.
7
8
9Required properties:
10- compatible : Should be "lantiq,gpio-stp-xway"
11- reg : Address and length of the register set for the device
12- #gpio-cells : Should be two. The first cell is the pin number and
13 the second cell is used to specify optional parameters (currently
14 unused).
15- gpio-controller : Marks the device node as a gpio controller.
16
17Optional properties:
18- lantiq,shadow : The default value that we shall assume as already set on the
19 shift register cascade.
20- lantiq,groups : Set the 3 bit mask to select which of the 3 groups are enabled
21 in the shift register cascade.
22- lantiq,dsl : The dsl core can control the 2 LSBs of the gpio cascade. This 2 bit
23 property can enable this feature.
24- lantiq,phy1 : The gphy1 core can control 3 bits of the gpio cascade.
25- lantiq,phy2 : The gphy2 core can control 3 bits of the gpio cascade.
26- lantiq,rising : use rising instead of falling edge for the shift register
27
28Example:
29
30gpio1: stp@E100BB0 {
31 compatible = "lantiq,gpio-stp-xway";
32 reg = <0xE100BB0 0x40>;
33 #gpio-cells = <2>;
34 gpio-controller;
35
36 lantiq,shadow = <0xffff>;
37 lantiq,groups = <0x7>;
38 lantiq,dsl = <0x3>;
39 lantiq,phy1 = <0x7>;
40 lantiq,phy2 = <0x7>;
41 /* lantiq,rising; */
42};
diff --git a/Documentation/devicetree/bindings/gpio/gpio_lpc32xx.txt b/Documentation/devicetree/bindings/gpio/gpio_lpc32xx.txt
new file mode 100644
index 000000000000..49819367a011
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio_lpc32xx.txt
@@ -0,0 +1,43 @@
1NXP LPC32xx SoC GPIO controller
2
3Required properties:
4- compatible: must be "nxp,lpc3220-gpio"
5- reg: Physical base address and length of the controller's registers.
6- gpio-controller: Marks the device node as a GPIO controller.
7- #gpio-cells: Should be 3:
8 1) bank:
9 0: GPIO P0
10 1: GPIO P1
11 2: GPIO P2
12 3: GPIO P3
13 4: GPI P3
14 5: GPO P3
15 2) pin number
16 3) optional parameters:
17 - bit 0 specifies polarity (0 for normal, 1 for inverted)
18- reg: Index of the GPIO group
19
20Example:
21
22 gpio: gpio@40028000 {
23 compatible = "nxp,lpc3220-gpio";
24 reg = <0x40028000 0x1000>;
25 gpio-controller;
26 #gpio-cells = <3>; /* bank, pin, flags */
27 };
28
29 leds {
30 compatible = "gpio-leds";
31
32 led0 {
33 gpios = <&gpio 5 1 1>; /* GPO_P3 1, active low */
34 linux,default-trigger = "heartbeat";
35 default-state = "off";
36 };
37
38 led1 {
39 gpios = <&gpio 5 14 1>; /* GPO_P3 14, active low */
40 linux,default-trigger = "timer";
41 default-state = "off";
42 };
43 };
diff --git a/Documentation/devicetree/bindings/i2c/i2c-mux-pinctrl.txt b/Documentation/devicetree/bindings/i2c/i2c-mux-pinctrl.txt
new file mode 100644
index 000000000000..ae8af1694e95
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-mux-pinctrl.txt
@@ -0,0 +1,93 @@
1Pinctrl-based I2C Bus Mux
2
3This binding describes an I2C bus multiplexer that uses pin multiplexing to
4route the I2C signals, and represents the pin multiplexing configuration
5using the pinctrl device tree bindings.
6
7 +-----+ +-----+
8 | dev | | dev |
9 +------------------------+ +-----+ +-----+
10 | SoC | | |
11 | /----|------+--------+
12 | +---+ +------+ | child bus A, on first set of pins
13 | |I2C|---|Pinmux| |
14 | +---+ +------+ | child bus B, on second set of pins
15 | \----|------+--------+--------+
16 | | | | |
17 +------------------------+ +-----+ +-----+ +-----+
18 | dev | | dev | | dev |
19 +-----+ +-----+ +-----+
20
21Required properties:
22- compatible: i2c-mux-pinctrl
23- i2c-parent: The phandle of the I2C bus that this multiplexer's master-side
24 port is connected to.
25
26Also required are:
27
28* Standard pinctrl properties that specify the pin mux state for each child
29 bus. See ../pinctrl/pinctrl-bindings.txt.
30
31* Standard I2C mux properties. See mux.txt in this directory.
32
33* I2C child bus nodes. See mux.txt in this directory.
34
35For each named state defined in the pinctrl-names property, an I2C child bus
36will be created. I2C child bus numbers are assigned based on the index into
37the pinctrl-names property.
38
39The only exception is that no bus will be created for a state named "idle". If
40such a state is defined, it must be the last entry in pinctrl-names. For
41example:
42
43 pinctrl-names = "ddc", "pta", "idle" -> ddc = bus 0, pta = bus 1
44 pinctrl-names = "ddc", "idle", "pta" -> Invalid ("idle" not last)
45 pinctrl-names = "idle", "ddc", "pta" -> Invalid ("idle" not last)
46
47Whenever an access is made to a device on a child bus, the relevant pinctrl
48state will be programmed into hardware.
49
50If an idle state is defined, whenever an access is not being made to a device
51on a child bus, the idle pinctrl state will be programmed into hardware.
52
53If an idle state is not defined, the most recently used pinctrl state will be
54left programmed into hardware whenever no access is being made of a device on
55a child bus.
56
57Example:
58
59 i2cmux {
60 compatible = "i2c-mux-pinctrl";
61 #address-cells = <1>;
62 #size-cells = <0>;
63
64 i2c-parent = <&i2c1>;
65
66 pinctrl-names = "ddc", "pta", "idle";
67 pinctrl-0 = <&state_i2cmux_ddc>;
68 pinctrl-1 = <&state_i2cmux_pta>;
69 pinctrl-2 = <&state_i2cmux_idle>;
70
71 i2c@0 {
72 reg = <0>;
73 #address-cells = <1>;
74 #size-cells = <0>;
75
76 eeprom {
77 compatible = "eeprom";
78 reg = <0x50>;
79 };
80 };
81
82 i2c@1 {
83 reg = <1>;
84 #address-cells = <1>;
85 #size-cells = <0>;
86
87 eeprom {
88 compatible = "eeprom";
89 reg = <0x50>;
90 };
91 };
92 };
93
diff --git a/Documentation/devicetree/bindings/i2c/i2c-mxs.txt b/Documentation/devicetree/bindings/i2c/i2c-mxs.txt
new file mode 100644
index 000000000000..1bfc02de1b0c
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-mxs.txt
@@ -0,0 +1,16 @@
1* Freescale MXS Inter IC (I2C) Controller
2
3Required properties:
4- compatible: Should be "fsl,<chip>-i2c"
5- reg: Should contain registers location and length
6- interrupts: Should contain ERROR and DMA interrupts
7
8Examples:
9
10i2c0: i2c@80058000 {
11 #address-cells = <1>;
12 #size-cells = <0>;
13 compatible = "fsl,imx28-i2c";
14 reg = <0x80058000 2000>;
15 interrupts = <111 68>;
16};
diff --git a/Documentation/devicetree/bindings/i2c/mux.txt b/Documentation/devicetree/bindings/i2c/mux.txt
new file mode 100644
index 000000000000..af84cce5cd7b
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/mux.txt
@@ -0,0 +1,60 @@
1Common i2c bus multiplexer/switch properties.
2
3An i2c bus multiplexer/switch will have several child busses that are
4numbered uniquely in a device dependent manner. The nodes for an i2c bus
5multiplexer/switch will have one child node for each child
6bus.
7
8Required properties:
9- #address-cells = <1>;
10- #size-cells = <0>;
11
12Required properties for child nodes:
13- #address-cells = <1>;
14- #size-cells = <0>;
15- reg : The sub-bus number.
16
17Optional properties for child nodes:
18- Other properties specific to the multiplexer/switch hardware.
19- Child nodes conforming to i2c bus binding
20
21
22Example :
23
24 /*
25 An NXP pca9548 8 channel I2C multiplexer at address 0x70
26 with two NXP pca8574 GPIO expanders attached, one each to
27 ports 3 and 4.
28 */
29
30 mux@70 {
31 compatible = "nxp,pca9548";
32 reg = <0x70>;
33 #address-cells = <1>;
34 #size-cells = <0>;
35
36 i2c@3 {
37 #address-cells = <1>;
38 #size-cells = <0>;
39 reg = <3>;
40
41 gpio1: gpio@38 {
42 compatible = "nxp,pca8574";
43 reg = <0x38>;
44 #gpio-cells = <2>;
45 gpio-controller;
46 };
47 };
48 i2c@4 {
49 #address-cells = <1>;
50 #size-cells = <0>;
51 reg = <4>;
52
53 gpio2: gpio@38 {
54 compatible = "nxp,pca8574";
55 reg = <0x38>;
56 #gpio-cells = <2>;
57 gpio-controller;
58 };
59 };
60 };
diff --git a/Documentation/devicetree/bindings/i2c/samsung-i2c.txt b/Documentation/devicetree/bindings/i2c/samsung-i2c.txt
index 38832c712919..b6cb5a12c672 100644
--- a/Documentation/devicetree/bindings/i2c/samsung-i2c.txt
+++ b/Documentation/devicetree/bindings/i2c/samsung-i2c.txt
@@ -6,14 +6,18 @@ Required properties:
6 - compatible: value should be either of the following. 6 - compatible: value should be either of the following.
7 (a) "samsung, s3c2410-i2c", for i2c compatible with s3c2410 i2c. 7 (a) "samsung, s3c2410-i2c", for i2c compatible with s3c2410 i2c.
8 (b) "samsung, s3c2440-i2c", for i2c compatible with s3c2440 i2c. 8 (b) "samsung, s3c2440-i2c", for i2c compatible with s3c2440 i2c.
9 (c) "samsung, s3c2440-hdmiphy-i2c", for s3c2440-like i2c used
10 inside HDMIPHY block found on several samsung SoCs
9 - reg: physical base address of the controller and length of memory mapped 11 - reg: physical base address of the controller and length of memory mapped
10 region. 12 region.
11 - interrupts: interrupt number to the cpu. 13 - interrupts: interrupt number to the cpu.
12 - samsung,i2c-sda-delay: Delay (in ns) applied to data line (SDA) edges. 14 - samsung,i2c-sda-delay: Delay (in ns) applied to data line (SDA) edges.
13 - gpios: The order of the gpios should be the following: <SDA, SCL>.
14 The gpio specifier depends on the gpio controller.
15 15
16Optional properties: 16Optional properties:
17 - gpios: The order of the gpios should be the following: <SDA, SCL>.
18 The gpio specifier depends on the gpio controller. Required in all
19 cases except for "samsung,s3c2440-hdmiphy-i2c" whose input/output
20 lines are permanently wired to the respective client
17 - samsung,i2c-slave-addr: Slave address in multi-master enviroment. If not 21 - samsung,i2c-slave-addr: Slave address in multi-master enviroment. If not
18 specified, default value is 0. 22 specified, default value is 0.
19 - samsung,i2c-max-bus-freq: Desired frequency in Hz of the bus. If not 23 - samsung,i2c-max-bus-freq: Desired frequency in Hz of the bus. If not
diff --git a/Documentation/devicetree/bindings/i2c/xiic.txt b/Documentation/devicetree/bindings/i2c/xiic.txt
new file mode 100644
index 000000000000..ceabbe91ae44
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/xiic.txt
@@ -0,0 +1,22 @@
1Xilinx IIC controller:
2
3Required properties:
4- compatible : Must be "xlnx,xps-iic-2.00.a"
5- reg : IIC register location and length
6- interrupts : IIC controller unterrupt
7- #address-cells = <1>
8- #size-cells = <0>
9
10Optional properties:
11- Child nodes conforming to i2c bus binding
12
13Example:
14
15 axi_iic_0: i2c@40800000 {
16 compatible = "xlnx,xps-iic-2.00.a";
17 interrupts = < 1 2 >;
18 reg = < 0x40800000 0x10000 >;
19
20 #size-cells = <0>;
21 #address-cells = <1>;
22 };
diff --git a/Documentation/devicetree/bindings/input/spear-keyboard.txt b/Documentation/devicetree/bindings/input/spear-keyboard.txt
new file mode 100644
index 000000000000..4a846d26da23
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/spear-keyboard.txt
@@ -0,0 +1,20 @@
1* SPEAr keyboard controller
2
3Required properties:
4- compatible: "st,spear300-kbd"
5
6Optional properties, in addition to those specified by the shared
7matrix-keyboard bindings:
8- autorepeat: bool: enables key autorepeat
9- st,mode: keyboard mode: 0 - 9x9, 1 - 6x6, 2 - 2x2
10
11Example:
12
13kbd@fc400000 {
14 compatible = "st,spear300-kbd";
15 reg = <0xfc400000 0x100>;
16 linux,keymap = < 0x00030012
17 0x0102003a >;
18 autorepeat;
19 st,mode = <0>;
20};
diff --git a/Documentation/devicetree/bindings/input/touchscreen/lpc32xx-tsc.txt b/Documentation/devicetree/bindings/input/touchscreen/lpc32xx-tsc.txt
new file mode 100644
index 000000000000..41cbf4b7a670
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/touchscreen/lpc32xx-tsc.txt
@@ -0,0 +1,16 @@
1* NXP LPC32xx SoC Touchscreen Controller (TSC)
2
3Required properties:
4- compatible: must be "nxp,lpc3220-tsc"
5- reg: physical base address of the controller and length of memory mapped
6 region.
7- interrupts: The TSC/ADC interrupt
8
9Example:
10
11 tsc@40048000 {
12 compatible = "nxp,lpc3220-tsc";
13 reg = <0x40048000 0x1000>;
14 interrupt-parent = <&mic>;
15 interrupts = <39 0>;
16 };
diff --git a/Documentation/devicetree/bindings/input/twl6040-vibra.txt b/Documentation/devicetree/bindings/input/twl6040-vibra.txt
new file mode 100644
index 000000000000..5b1918b818fb
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/twl6040-vibra.txt
@@ -0,0 +1,37 @@
1Vibra driver for the twl6040 family
2
3The vibra driver is a child of the twl6040 MFD dirver.
4Documentation/devicetree/bindings/mfd/twl6040.txt
5
6Required properties:
7- compatible : Must be "ti,twl6040-vibra";
8- interrupts: 4, Vibra overcurrent interrupt
9- vddvibl-supply: Regulator supplying the left vibra motor
10- vddvibr-supply: Regulator supplying the right vibra motor
11- vibldrv_res: Board specific left driver resistance
12- vibrdrv_res: Board specific right driver resistance
13- viblmotor_res: Board specific left motor resistance
14- vibrmotor_res: Board specific right motor resistance
15
16Optional properties:
17- vddvibl_uV: If the vddvibl default voltage need to be changed
18- vddvibr_uV: If the vddvibr default voltage need to be changed
19
20Example:
21/*
22 * 8-channel high quality low-power audio codec
23 * http://www.ti.com/lit/ds/symlink/twl6040.pdf
24 */
25twl6040: twl6040@4b {
26 ...
27 twl6040_vibra: twl6040@1 {
28 compatible = "ti,twl6040-vibra";
29 interrupts = <4>;
30 vddvibl-supply = <&vbat>;
31 vddvibr-supply = <&vbat>;
32 vibldrv_res = <8>;
33 vibrdrv_res = <3>;
34 viblmotor_res = <10>;
35 vibrmotor_res = <10>;
36 };
37};
diff --git a/Documentation/devicetree/bindings/iommu/nvidia,tegra20-gart.txt b/Documentation/devicetree/bindings/iommu/nvidia,tegra20-gart.txt
new file mode 100644
index 000000000000..099d9362ebc1
--- /dev/null
+++ b/Documentation/devicetree/bindings/iommu/nvidia,tegra20-gart.txt
@@ -0,0 +1,14 @@
1NVIDIA Tegra 20 GART
2
3Required properties:
4- compatible: "nvidia,tegra20-gart"
5- reg: Two pairs of cells specifying the physical address and size of
6 the memory controller registers and the GART aperture respectively.
7
8Example:
9
10 gart {
11 compatible = "nvidia,tegra20-gart";
12 reg = <0x7000f024 0x00000018 /* controller registers */
13 0x58000000 0x02000000>; /* GART aperture */
14 };
diff --git a/Documentation/devicetree/bindings/mfd/da9052-i2c.txt b/Documentation/devicetree/bindings/mfd/da9052-i2c.txt
new file mode 100644
index 000000000000..1857f4a6b9a9
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/da9052-i2c.txt
@@ -0,0 +1,60 @@
1* Dialog DA9052/53 Power Management Integrated Circuit (PMIC)
2
3Required properties:
4- compatible : Should be "dlg,da9052", "dlg,da9053-aa",
5 "dlg,da9053-ab", or "dlg,da9053-bb"
6
7Sub-nodes:
8- regulators : Contain the regulator nodes. The DA9052/53 regulators are
9 bound using their names as listed below:
10
11 buck0 : regulator BUCK0
12 buck1 : regulator BUCK1
13 buck2 : regulator BUCK2
14 buck3 : regulator BUCK3
15 ldo4 : regulator LDO4
16 ldo5 : regulator LDO5
17 ldo6 : regulator LDO6
18 ldo7 : regulator LDO7
19 ldo8 : regulator LDO8
20 ldo9 : regulator LDO9
21 ldo10 : regulator LDO10
22 ldo11 : regulator LDO11
23 ldo12 : regulator LDO12
24 ldo13 : regulator LDO13
25
26 The bindings details of individual regulator device can be found in:
27 Documentation/devicetree/bindings/regulator/regulator.txt
28
29Examples:
30
31i2c@63fc8000 { /* I2C1 */
32 status = "okay";
33
34 pmic: dialog@48 {
35 compatible = "dlg,da9053-aa";
36 reg = <0x48>;
37
38 regulators {
39 buck0 {
40 regulator-min-microvolt = <500000>;
41 regulator-max-microvolt = <2075000>;
42 };
43
44 buck1 {
45 regulator-min-microvolt = <500000>;
46 regulator-max-microvolt = <2075000>;
47 };
48
49 buck2 {
50 regulator-min-microvolt = <925000>;
51 regulator-max-microvolt = <2500000>;
52 };
53
54 buck3 {
55 regulator-min-microvolt = <925000>;
56 regulator-max-microvolt = <2500000>;
57 };
58 };
59 };
60};
diff --git a/Documentation/devicetree/bindings/mfd/tps65910.txt b/Documentation/devicetree/bindings/mfd/tps65910.txt
new file mode 100644
index 000000000000..645f5eaadb3f
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/tps65910.txt
@@ -0,0 +1,133 @@
1TPS65910 Power Management Integrated Circuit
2
3Required properties:
4- compatible: "ti,tps65910" or "ti,tps65911"
5- reg: I2C slave address
6- interrupts: the interrupt outputs of the controller
7- #gpio-cells: number of cells to describe a GPIO, this should be 2.
8 The first cell is the GPIO number.
9 The second cell is used to specify additional options <unused>.
10- gpio-controller: mark the device as a GPIO controller
11- #interrupt-cells: the number of cells to describe an IRQ, this should be 2.
12 The first cell is the IRQ number.
13 The second cell is the flags, encoded as the trigger masks from
14 Documentation/devicetree/bindings/interrupts.txt
15- regulators: This is the list of child nodes that specify the regulator
16 initialization data for defined regulators. Not all regulators for the given
17 device need to be present. The definition for each of these nodes is defined
18 using the standard binding for regulators found at
19 Documentation/devicetree/bindings/regulator/regulator.txt.
20
21 The valid names for regulators are:
22 tps65910: vrtc, vio, vdd1, vdd2, vdd3, vdig1, vdig2, vpll, vdac, vaux1,
23 vaux2, vaux33, vmmc
24 tps65911: vrtc, vio, vdd1, vdd3, vddctrl, ldo1, ldo2, ldo3, ldo4, ldo5,
25 ldo6, ldo7, ldo8
26
27Optional properties:
28- ti,vmbch-threshold: (tps65911) main battery charged threshold
29 comparator. (see VMBCH_VSEL in TPS65910 datasheet)
30- ti,vmbch2-threshold: (tps65911) main battery discharged threshold
31 comparator. (see VMBCH_VSEL in TPS65910 datasheet)
32- ti,en-gpio-sleep: enable sleep control for gpios
33 There should be 9 entries here, one for each gpio.
34
35Regulator Optional properties:
36- ti,regulator-ext-sleep-control: enable external sleep
37 control through external inputs [0 (not enabled), 1 (EN1), 2 (EN2) or 4(EN3)]
38 If this property is not defined, it defaults to 0 (not enabled).
39
40Example:
41
42 pmu: tps65910@d2 {
43 compatible = "ti,tps65910";
44 reg = <0xd2>;
45 interrupt-parent = <&intc>;
46 interrupts = < 0 118 0x04 >;
47
48 #gpio-cells = <2>;
49 gpio-controller;
50
51 #interrupt-cells = <2>;
52 interrupt-controller;
53
54 ti,vmbch-threshold = 0;
55 ti,vmbch2-threshold = 0;
56
57 ti,en-gpio-sleep = <0 0 1 0 0 0 0 0 0>;
58
59 regulators {
60 vdd1_reg: vdd1 {
61 regulator-min-microvolt = < 600000>;
62 regulator-max-microvolt = <1500000>;
63 regulator-always-on;
64 regulator-boot-on;
65 ti,regulator-ext-sleep-control = <0>;
66 };
67 vdd2_reg: vdd2 {
68 regulator-min-microvolt = < 600000>;
69 regulator-max-microvolt = <1500000>;
70 regulator-always-on;
71 regulator-boot-on;
72 ti,regulator-ext-sleep-control = <4>;
73 };
74 vddctrl_reg: vddctrl {
75 regulator-min-microvolt = < 600000>;
76 regulator-max-microvolt = <1400000>;
77 regulator-always-on;
78 regulator-boot-on;
79 ti,regulator-ext-sleep-control = <0>;
80 };
81 vio_reg: vio {
82 regulator-min-microvolt = <1500000>;
83 regulator-max-microvolt = <1800000>;
84 regulator-always-on;
85 regulator-boot-on;
86 ti,regulator-ext-sleep-control = <1>;
87 };
88 ldo1_reg: ldo1 {
89 regulator-min-microvolt = <1000000>;
90 regulator-max-microvolt = <3300000>;
91 ti,regulator-ext-sleep-control = <0>;
92 };
93 ldo2_reg: ldo2 {
94 regulator-min-microvolt = <1050000>;
95 regulator-max-microvolt = <1050000>;
96 ti,regulator-ext-sleep-control = <0>;
97 };
98 ldo3_reg: ldo3 {
99 regulator-min-microvolt = <1000000>;
100 regulator-max-microvolt = <3300000>;
101 ti,regulator-ext-sleep-control = <0>;
102 };
103 ldo4_reg: ldo4 {
104 regulator-min-microvolt = <1000000>;
105 regulator-max-microvolt = <3300000>;
106 regulator-always-on;
107 ti,regulator-ext-sleep-control = <0>;
108 };
109 ldo5_reg: ldo5 {
110 regulator-min-microvolt = <1000000>;
111 regulator-max-microvolt = <3300000>;
112 ti,regulator-ext-sleep-control = <0>;
113 };
114 ldo6_reg: ldo6 {
115 regulator-min-microvolt = <1200000>;
116 regulator-max-microvolt = <1200000>;
117 ti,regulator-ext-sleep-control = <0>;
118 };
119 ldo7_reg: ldo7 {
120 regulator-min-microvolt = <1200000>;
121 regulator-max-microvolt = <1200000>;
122 regulator-always-on;
123 regulator-boot-on;
124 ti,regulator-ext-sleep-control = <1>;
125 };
126 ldo8_reg: ldo8 {
127 regulator-min-microvolt = <1000000>;
128 regulator-max-microvolt = <3300000>;
129 regulator-always-on;
130 ti,regulator-ext-sleep-control = <1>;
131 };
132 };
133 };
diff --git a/Documentation/devicetree/bindings/mfd/twl6040.txt b/Documentation/devicetree/bindings/mfd/twl6040.txt
new file mode 100644
index 000000000000..bc67c6f424aa
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/twl6040.txt
@@ -0,0 +1,62 @@
1Texas Instruments TWL6040 family
2
3The TWL6040s are 8-channel high quality low-power audio codecs providing audio
4and vibra functionality on OMAP4+ platforms.
5They are connected ot the host processor via i2c for commands, McPDM for audio
6data and commands.
7
8Required properties:
9- compatible : Must be "ti,twl6040";
10- reg: must be 0x4b for i2c address
11- interrupts: twl6040 has one interrupt line connecteded to the main SoC
12- interrupt-parent: The parent interrupt controller
13- twl6040,audpwron-gpio: Power on GPIO line for the twl6040
14
15- vio-supply: Regulator for the twl6040 VIO supply
16- v2v1-supply: Regulator for the twl6040 V2V1 supply
17
18Optional properties, nodes:
19- enable-active-high: To power on the twl6040 during boot.
20
21Vibra functionality
22Required properties:
23- vddvibl-supply: Regulator for the left vibra motor
24- vddvibr-supply: Regulator for the right vibra motor
25- vibra { }: Configuration section for vibra parameters containing the following
26 properties:
27- ti,vibldrv-res: Resistance parameter for left driver
28- ti,vibrdrv-res: Resistance parameter for right driver
29- ti,viblmotor-res: Resistance parameter for left motor
30- ti,viblmotor-res: Resistance parameter for right motor
31
32Optional properties within vibra { } section:
33- vddvibl_uV: If the vddvibl default voltage need to be changed
34- vddvibr_uV: If the vddvibr default voltage need to be changed
35
36Example:
37&i2c1 {
38 twl6040: twl@4b {
39 compatible = "ti,twl6040";
40 reg = <0x4b>;
41
42 interrupts = <0 119 4>;
43 interrupt-parent = <&gic>;
44 twl6040,audpwron-gpio = <&gpio4 31 0>;
45
46 vio-supply = <&v1v8>;
47 v2v1-supply = <&v2v1>;
48 enable-active-high;
49
50 /* regulators for vibra motor */
51 vddvibl-supply = <&vbat>;
52 vddvibr-supply = <&vbat>;
53
54 vibra {
55 /* Vibra driver, motor resistance parameters */
56 ti,vibldrv-res = <8>;
57 ti,vibrdrv-res = <3>;
58 ti,viblmotor-res = <10>;
59 ti,vibrmotor-res = <10>;
60 };
61 };
62};
diff --git a/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt b/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt
index 64bcb8be973c..0d93b4b0e0e3 100644
--- a/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt
+++ b/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt
@@ -11,9 +11,11 @@ Required properties:
11 - interrupt-parent : interrupt source phandle. 11 - interrupt-parent : interrupt source phandle.
12 - clock-frequency : specifies eSDHC base clock frequency. 12 - clock-frequency : specifies eSDHC base clock frequency.
13 - sdhci,wp-inverted : (optional) specifies that eSDHC controller 13 - sdhci,wp-inverted : (optional) specifies that eSDHC controller
14 reports inverted write-protect state; 14 reports inverted write-protect state; New devices should use
15 the generic "wp-inverted" property.
15 - sdhci,1-bit-only : (optional) specifies that a controller can 16 - sdhci,1-bit-only : (optional) specifies that a controller can
16 only handle 1-bit data transfers. 17 only handle 1-bit data transfers. New devices should use the
18 generic "bus-width = <1>" property.
17 - sdhci,auto-cmd12: (optional) specifies that a controller can 19 - sdhci,auto-cmd12: (optional) specifies that a controller can
18 only handle auto CMD12. 20 only handle auto CMD12.
19 21
diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
index ab22fe6e73ab..c7e404b3ef05 100644
--- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
+++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
@@ -9,7 +9,7 @@ Required properties:
9- interrupts : Should contain eSDHC interrupt 9- interrupts : Should contain eSDHC interrupt
10 10
11Optional properties: 11Optional properties:
12- fsl,card-wired : Indicate the card is wired to host permanently 12- non-removable : Indicate the card is wired to host permanently
13- fsl,cd-internal : Indicate to use controller internal card detection 13- fsl,cd-internal : Indicate to use controller internal card detection
14- fsl,wp-internal : Indicate to use controller internal write protection 14- fsl,wp-internal : Indicate to use controller internal write protection
15- cd-gpios : Specify GPIOs for card detection 15- cd-gpios : Specify GPIOs for card detection
diff --git a/Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt b/Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt
index 89a0084df2f7..d64aea5a4203 100644
--- a/Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt
+++ b/Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt
@@ -10,7 +10,8 @@ Required properties:
10 10
11Optional properties: 11Optional properties:
12- gpios : may specify GPIOs in this order: Card-Detect GPIO, 12- gpios : may specify GPIOs in this order: Card-Detect GPIO,
13 Write-Protect GPIO. 13 Write-Protect GPIO. Note that this does not follow the
14 binding from mmc.txt, for historic reasons.
14- interrupts : the interrupt of a card detect interrupt. 15- interrupts : the interrupt of a card detect interrupt.
15- interrupt-parent : the phandle for the interrupt controller that 16- interrupt-parent : the phandle for the interrupt controller that
16 services interrupts for this device. 17 services interrupts for this device.
diff --git a/Documentation/devicetree/bindings/mmc/mmc.txt b/Documentation/devicetree/bindings/mmc/mmc.txt
new file mode 100644
index 000000000000..6e70dcde0a71
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/mmc.txt
@@ -0,0 +1,27 @@
1These properties are common to multiple MMC host controllers. Any host
2that requires the respective functionality should implement them using
3these definitions.
4
5Required properties:
6- bus-width: Number of data lines, can be <1>, <4>, or <8>
7
8Optional properties:
9- cd-gpios : Specify GPIOs for card detection, see gpio binding
10- wp-gpios : Specify GPIOs for write protection, see gpio binding
11- cd-inverted: when present, polarity on the wp gpio line is inverted
12- wp-inverted: when present, polarity on the wp gpio line is inverted
13- non-removable: non-removable slot (like eMMC)
14- max-frequency: maximum operating clock frequency
15
16Example:
17
18sdhci@ab000000 {
19 compatible = "sdhci";
20 reg = <0xab000000 0x200>;
21 interrupts = <23>;
22 bus-width = <4>;
23 cd-gpios = <&gpio 69 0>;
24 cd-inverted;
25 wp-gpios = <&gpio 70 0>;
26 max-frequency = <50000000>;
27}
diff --git a/Documentation/devicetree/bindings/mmc/mmci.txt b/Documentation/devicetree/bindings/mmc/mmci.txt
new file mode 100644
index 000000000000..14a81d526118
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/mmci.txt
@@ -0,0 +1,19 @@
1* ARM PrimeCell MultiMedia Card Interface (MMCI) PL180/1
2
3The ARM PrimeCell MMCI PL180 and PL181 provides and interface for
4reading and writing to MultiMedia and SD cards alike.
5
6Required properties:
7- compatible : contains "arm,pl18x", "arm,primecell".
8- reg : contains pl18x registers and length.
9- interrupts : contains the device IRQ(s).
10- arm,primecell-periphid : contains the PrimeCell Peripheral ID.
11
12Optional properties:
13- wp-gpios : contains any write protect (ro) gpios
14- cd-gpios : contains any card detection gpios
15- cd-inverted : indicates whether the cd gpio is inverted
16- max-frequency : contains the maximum operating frequency
17- bus-width : number of data lines, can be <1>, <4>, or <8>
18- mmc-cap-mmc-highspeed : indicates whether MMC is high speed capable
19- mmc-cap-sd-highspeed : indicates whether SD is high speed capable
diff --git a/Documentation/devicetree/bindings/mmc/mxs-mmc.txt b/Documentation/devicetree/bindings/mmc/mxs-mmc.txt
new file mode 100644
index 000000000000..14d870a9e3db
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/mxs-mmc.txt
@@ -0,0 +1,25 @@
1* Freescale MXS MMC controller
2
3The Freescale MXS Synchronous Serial Ports (SSP) can act as a MMC controller
4to support MMC, SD, and SDIO types of memory cards.
5
6Required properties:
7- compatible: Should be "fsl,<chip>-mmc". The supported chips include
8 imx23 and imx28.
9- reg: Should contain registers location and length
10- interrupts: Should contain ERROR and DMA interrupts
11- fsl,ssp-dma-channel: APBH DMA channel for the SSP
12- bus-width: Number of data lines, can be <1>, <4>, or <8>
13
14Optional properties:
15- wp-gpios: Specify GPIOs for write protection
16
17Examples:
18
19ssp0: ssp@80010000 {
20 compatible = "fsl,imx28-mmc";
21 reg = <0x80010000 2000>;
22 interrupts = <96 82>;
23 fsl,ssp-dma-channel = <0>;
24 bus-width = <8>;
25};
diff --git a/Documentation/devicetree/bindings/mmc/nvidia-sdhci.txt b/Documentation/devicetree/bindings/mmc/nvidia-sdhci.txt
index 7e51154679a6..f77c3031607f 100644
--- a/Documentation/devicetree/bindings/mmc/nvidia-sdhci.txt
+++ b/Documentation/devicetree/bindings/mmc/nvidia-sdhci.txt
@@ -7,12 +7,12 @@ Required properties:
7- compatible : Should be "nvidia,<chip>-sdhci" 7- compatible : Should be "nvidia,<chip>-sdhci"
8- reg : Should contain SD/MMC registers location and length 8- reg : Should contain SD/MMC registers location and length
9- interrupts : Should contain SD/MMC interrupt 9- interrupts : Should contain SD/MMC interrupt
10- bus-width : Number of data lines, can be <1>, <4>, or <8>
10 11
11Optional properties: 12Optional properties:
12- cd-gpios : Specify GPIOs for card detection 13- cd-gpios : Specify GPIOs for card detection
13- wp-gpios : Specify GPIOs for write protection 14- wp-gpios : Specify GPIOs for write protection
14- power-gpios : Specify GPIOs for power control 15- power-gpios : Specify GPIOs for power control
15- support-8bit : Boolean, indicates if 8-bit mode should be used.
16 16
17Example: 17Example:
18 18
@@ -23,5 +23,5 @@ sdhci@c8000200 {
23 cd-gpios = <&gpio 69 0>; /* gpio PI5 */ 23 cd-gpios = <&gpio 69 0>; /* gpio PI5 */
24 wp-gpios = <&gpio 57 0>; /* gpio PH1 */ 24 wp-gpios = <&gpio 57 0>; /* gpio PH1 */
25 power-gpios = <&gpio 155 0>; /* gpio PT3 */ 25 power-gpios = <&gpio 155 0>; /* gpio PT3 */
26 support-8bit; 26 bus-width = <8>;
27}; 27};
diff --git a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
index dbd4368ab8cc..8a53958c9a9f 100644
--- a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
+++ b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
@@ -15,7 +15,7 @@ Optional properties:
15ti,dual-volt: boolean, supports dual voltage cards 15ti,dual-volt: boolean, supports dual voltage cards
16<supply-name>-supply: phandle to the regulator device tree node 16<supply-name>-supply: phandle to the regulator device tree node
17"supply-name" examples are "vmmc", "vmmc_aux" etc 17"supply-name" examples are "vmmc", "vmmc_aux" etc
18ti,bus-width: Number of data lines, default assumed is 1 if the property is missing. 18bus-width: Number of data lines, default assumed is 1 if the property is missing.
19cd-gpios: GPIOs for card detection 19cd-gpios: GPIOs for card detection
20wp-gpios: GPIOs for write protection 20wp-gpios: GPIOs for write protection
21ti,non-removable: non-removable slot (like eMMC) 21ti,non-removable: non-removable slot (like eMMC)
@@ -27,7 +27,7 @@ Example:
27 reg = <0x4809c000 0x400>; 27 reg = <0x4809c000 0x400>;
28 ti,hwmods = "mmc1"; 28 ti,hwmods = "mmc1";
29 ti,dual-volt; 29 ti,dual-volt;
30 ti,bus-width = <4>; 30 bus-width = <4>;
31 vmmc-supply = <&vmmc>; /* phandle to regulator node */ 31 vmmc-supply = <&vmmc>; /* phandle to regulator node */
32 ti,non-removable; 32 ti,non-removable;
33 }; 33 };
diff --git a/Documentation/devicetree/bindings/mtd/gpmi-nand.txt b/Documentation/devicetree/bindings/mtd/gpmi-nand.txt
new file mode 100644
index 000000000000..1a5bbd346d22
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/gpmi-nand.txt
@@ -0,0 +1,33 @@
1* Freescale General-Purpose Media Interface (GPMI)
2
3The GPMI nand controller provides an interface to control the
4NAND flash chips. We support only one NAND chip now.
5
6Required properties:
7 - compatible : should be "fsl,<chip>-gpmi-nand"
8 - reg : should contain registers location and length for gpmi and bch.
9 - reg-names: Should contain the reg names "gpmi-nand" and "bch"
10 - interrupts : The first is the DMA interrupt number for GPMI.
11 The second is the BCH interrupt number.
12 - interrupt-names : The interrupt names "gpmi-dma", "bch";
13 - fsl,gpmi-dma-channel : Should contain the dma channel it uses.
14
15The device tree may optionally contain sub-nodes describing partitions of the
16address space. See partition.txt for more detail.
17
18Examples:
19
20gpmi-nand@8000c000 {
21 compatible = "fsl,imx28-gpmi-nand";
22 #address-cells = <1>;
23 #size-cells = <1>;
24 reg = <0x8000c000 2000>, <0x8000a000 2000>;
25 reg-names = "gpmi-nand", "bch";
26 interrupts = <88>, <41>;
27 interrupt-names = "gpmi-dma", "bch";
28 fsl,gpmi-dma-channel = <4>;
29
30 partition@0 {
31 ...
32 };
33};
diff --git a/Documentation/devicetree/bindings/mtd/mxc-nand.txt b/Documentation/devicetree/bindings/mtd/mxc-nand.txt
new file mode 100644
index 000000000000..b5833d11c7be
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/mxc-nand.txt
@@ -0,0 +1,19 @@
1* Freescale's mxc_nand
2
3Required properties:
4- compatible: "fsl,imxXX-nand"
5- reg: address range of the nfc block
6- interrupts: irq to be used
7- nand-bus-width: see nand.txt
8- nand-ecc-mode: see nand.txt
9- nand-on-flash-bbt: see nand.txt
10
11Example:
12
13 nand@d8000000 {
14 compatible = "fsl,imx27-nand";
15 reg = <0xd8000000 0x1000>;
16 interrupts = <29>;
17 nand-bus-width = <8>;
18 nand-ecc-mode = "hw";
19 };
diff --git a/Documentation/devicetree/bindings/net/fsl-fec.txt b/Documentation/devicetree/bindings/net/fsl-fec.txt
index de439517dff0..7ab9e1a2d8be 100644
--- a/Documentation/devicetree/bindings/net/fsl-fec.txt
+++ b/Documentation/devicetree/bindings/net/fsl-fec.txt
@@ -14,7 +14,7 @@ Optional properties:
14 14
15Example: 15Example:
16 16
17fec@83fec000 { 17ethernet@83fec000 {
18 compatible = "fsl,imx51-fec", "fsl,imx27-fec"; 18 compatible = "fsl,imx51-fec", "fsl,imx27-fec";
19 reg = <0x83fec000 0x4000>; 19 reg = <0x83fec000 0x4000>;
20 interrupts = <87>; 20 interrupts = <87>;
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl_spear.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl_spear.txt
index 3664d37e6799..b4480d5c3aca 100644
--- a/Documentation/devicetree/bindings/pinctrl/pinctrl_spear.txt
+++ b/Documentation/devicetree/bindings/pinctrl/pinctrl_spear.txt
@@ -4,6 +4,8 @@ Required properties:
4- compatible : "st,spear300-pinmux" 4- compatible : "st,spear300-pinmux"
5 : "st,spear310-pinmux" 5 : "st,spear310-pinmux"
6 : "st,spear320-pinmux" 6 : "st,spear320-pinmux"
7 : "st,spear1310-pinmux"
8 : "st,spear1340-pinmux"
7- reg : Address range of the pinctrl registers 9- reg : Address range of the pinctrl registers
8- st,pinmux-mode: Mandatory for SPEAr300 and SPEAr320 and invalid for others. 10- st,pinmux-mode: Mandatory for SPEAr300 and SPEAr320 and invalid for others.
9 - Its values for SPEAr300: 11 - Its values for SPEAr300:
@@ -89,6 +91,37 @@ For SPEAr320 machines:
89 "rmii0_1_grp", "i2c1_8_9_grp", "i2c1_98_99_grp", "i2c2_0_1_grp", 91 "rmii0_1_grp", "i2c1_8_9_grp", "i2c1_98_99_grp", "i2c2_0_1_grp",
90 "i2c2_2_3_grp", "i2c2_19_20_grp", "i2c2_75_76_grp", "i2c2_96_97_grp" 92 "i2c2_2_3_grp", "i2c2_19_20_grp", "i2c2_75_76_grp", "i2c2_96_97_grp"
91 93
94For SPEAr1310 machines:
95 "i2c0_grp", "ssp0_grp", "ssp0_cs0_grp", "ssp0_cs1_2_grp", "i2s0_grp",
96 "i2s1_grp", "clcd_grp", "clcd_high_res_grp", "arm_gpio_grp",
97 "smi_2_chips_grp", "smi_4_chips_grp", "gmii_grp", "rgmii_grp",
98 "smii_0_1_2_grp", "ras_mii_txclk_grp", "nand_8bit_grp",
99 "nand_16bit_grp", "nand_4_chips_grp", "keyboard_6x6_grp",
100 "keyboard_rowcol6_8_grp", "uart0_grp", "uart0_modem_grp",
101 "gpt0_tmr0_grp", "gpt0_tmr1_grp", "gpt1_tmr0_grp", "gpt1_tmr1_grp",
102 "sdhci_grp", "cf_grp", "xd_grp", "touch_xy_grp",
103 "uart1_disable_i2c_grp", "uart1_disable_sd_grp", "uart2_3_grp",
104 "uart4_grp", "uart5_grp", "rs485_0_1_tdm_0_1_grp", "i2c_1_2_grp",
105 "i2c3_dis_smi_clcd_grp", "i2c3_dis_sd_i2s0_grp", "i2c_4_5_dis_smi_grp",
106 "i2c4_dis_sd_grp", "i2c5_dis_sd_grp", "i2c_6_7_dis_kbd_grp",
107 "i2c6_dis_sd_grp", "i2c7_dis_sd_grp", "can0_dis_nor_grp",
108 "can0_dis_sd_grp", "can1_dis_sd_grp", "can1_dis_kbd_grp", "pcie0_grp",
109 "pcie1_grp", "pcie2_grp", "sata0_grp", "sata1_grp", "sata2_grp",
110 "ssp1_dis_kbd_grp", "ssp1_dis_sd_grp", "gpt64_grp"
111
112For SPEAr1340 machines:
113 "pads_as_gpio_grp", "fsmc_8bit_grp", "fsmc_16bit_grp", "fsmc_pnor_grp",
114 "keyboard_row_col_grp", "keyboard_col5_grp", "spdif_in_grp",
115 "spdif_out_grp", "gpt_0_1_grp", "pwm0_grp", "pwm1_grp", "pwm2_grp",
116 "pwm3_grp", "vip_mux_grp", "vip_mux_cam0_grp", "vip_mux_cam1_grp",
117 "vip_mux_cam2_grp", "vip_mux_cam3_grp", "cam0_grp", "cam1_grp",
118 "cam2_grp", "cam3_grp", "smi_grp", "ssp0_grp", "ssp0_cs1_grp",
119 "ssp0_cs2_grp", "ssp0_cs3_grp", "uart0_grp", "uart0_enh_grp",
120 "uart1_grp", "i2s_in_grp", "i2s_out_grp", "gmii_grp", "rgmii_grp",
121 "rmii_grp", "sgmii_grp", "i2c0_grp", "i2c1_grp", "cec0_grp", "cec1_grp",
122 "sdhci_grp", "cf_grp", "xd_grp", "clcd_grp", "arm_trace_grp",
123 "miphy_dbg_grp", "pcie_grp", "sata_grp"
124
92Valid values for function names are: 125Valid values for function names are:
93For All SPEAr3xx machines: 126For All SPEAr3xx machines:
94 "firda", "i2c0", "ssp_cs", "ssp0", "mii0", "gpio0", "uart0_ext", 127 "firda", "i2c0", "ssp_cs", "ssp0", "mii0", "gpio0", "uart0_ext",
@@ -106,3 +139,17 @@ For SPEAr320 machines:
106 "uart2", "uart3", "uart4", "uart5", "uart6", "rs485", "touchscreen", 139 "uart2", "uart3", "uart4", "uart5", "uart6", "rs485", "touchscreen",
107 "can0", "can1", "pwm0_1", "pwm2", "pwm3", "ssp1", "ssp2", "mii2", 140 "can0", "can1", "pwm0_1", "pwm2", "pwm3", "ssp1", "ssp2", "mii2",
108 "mii0_1", "i2c1", "i2c2" 141 "mii0_1", "i2c1", "i2c2"
142
143
144For SPEAr1310 machines:
145 "i2c0", "ssp0", "i2s0", "i2s1", "clcd", "arm_gpio", "smi", "gmii",
146 "rgmii", "smii_0_1_2", "ras_mii_txclk", "nand", "keyboard", "uart0",
147 "gpt0", "gpt1", "sdhci", "cf", "xd", "touchscreen", "uart1", "uart2_3",
148 "uart4", "uart5", "rs485_0_1_tdm_0_1", "i2c_1_2", "i2c3_i2s1",
149 "i2c_4_5", "i2c_6_7", "can0", "can1", "pci", "sata", "ssp1", "gpt64"
150
151For SPEAr1340 machines:
152 "pads_as_gpio", "fsmc", "keyboard", "spdif_in", "spdif_out", "gpt_0_1",
153 "pwm", "vip", "cam0", "cam1", "cam2", "cam3", "smi", "ssp0", "uart0",
154 "uart1", "i2s", "gmac", "i2c0", "i2c1", "cec0", "cec1", "sdhci", "cf",
155 "xd", "clcd", "arm_trace", "miphy_dbg", "pcie", "sata"
diff --git a/Documentation/devicetree/bindings/rtc/lpc32xx-rtc.txt b/Documentation/devicetree/bindings/rtc/lpc32xx-rtc.txt
new file mode 100644
index 000000000000..a87a1e9bc060
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/lpc32xx-rtc.txt
@@ -0,0 +1,15 @@
1* NXP LPC32xx SoC Real Time Clock controller
2
3Required properties:
4- compatible: must be "nxp,lpc3220-rtc"
5- reg: physical base address of the controller and length of memory mapped
6 region.
7- interrupts: The RTC interrupt
8
9Example:
10
11 rtc@40024000 {
12 compatible = "nxp,lpc3220-rtc";
13 reg = <0x40024000 0x1000>;
14 interrupts = <52 0>;
15 };
diff --git a/Documentation/devicetree/bindings/rtc/spear-rtc.txt b/Documentation/devicetree/bindings/rtc/spear-rtc.txt
new file mode 100644
index 000000000000..ca67ac62108e
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/spear-rtc.txt
@@ -0,0 +1,17 @@
1* SPEAr RTC
2
3Required properties:
4- compatible : "st,spear600-rtc"
5- reg : Address range of the rtc registers
6- interrupt-parent: Should be the phandle for the interrupt controller
7 that services interrupts for this device
8- interrupt: Should contain the rtc interrupt number
9
10Example:
11
12 rtc@fc000000 {
13 compatible = "st,spear600-rtc";
14 reg = <0xfc000000 0x1000>;
15 interrupt-parent = <&vic1>;
16 interrupts = <12>;
17 };
diff --git a/Documentation/devicetree/bindings/sound/omap-dmic.txt b/Documentation/devicetree/bindings/sound/omap-dmic.txt
new file mode 100644
index 000000000000..fd8105f18978
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/omap-dmic.txt
@@ -0,0 +1,21 @@
1* Texas Instruments OMAP4+ Digital Microphone Module
2
3Required properties:
4- compatible: "ti,omap4-dmic"
5- reg: Register location and size as an array:
6 <MPU access base address, size>,
7 <L3 interconnect address, size>;
8- interrupts: Interrupt number for DMIC
9- interrupt-parent: The parent interrupt controller
10- ti,hwmods: Name of the hwmod associated with OMAP dmic IP
11
12Example:
13
14dmic: dmic@4012e000 {
15 compatible = "ti,omap4-dmic";
16 reg = <0x4012e000 0x7f>, /* MPU private access */
17 <0x4902e000 0x7f>; /* L3 Interconnect */
18 interrupts = <0 114 0x4>;
19 interrupt-parent = <&gic>;
20 ti,hwmods = "dmic";
21};
diff --git a/Documentation/devicetree/bindings/sound/omap-mcpdm.txt b/Documentation/devicetree/bindings/sound/omap-mcpdm.txt
new file mode 100644
index 000000000000..0741dff048dd
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/omap-mcpdm.txt
@@ -0,0 +1,21 @@
1* Texas Instruments OMAP4+ McPDM
2
3Required properties:
4- compatible: "ti,omap4-mcpdm"
5- reg: Register location and size as an array:
6 <MPU access base address, size>,
7 <L3 interconnect address, size>;
8- interrupts: Interrupt number for McPDM
9- interrupt-parent: The parent interrupt controller
10- ti,hwmods: Name of the hwmod associated to the McPDM
11
12Example:
13
14mcpdm: mcpdm@40132000 {
15 compatible = "ti,omap4-mcpdm";
16 reg = <0x40132000 0x7f>, /* MPU private access */
17 <0x49032000 0x7f>; /* L3 Interconnect */
18 interrupts = <0 112 0x4>;
19 interrupt-parent = <&gic>;
20 ti,hwmods = "mcpdm";
21};
diff --git a/Documentation/devicetree/bindings/tty/serial/fsl-imx-uart.txt b/Documentation/devicetree/bindings/tty/serial/fsl-imx-uart.txt
index a9c0406280e8..b462d0c54823 100644
--- a/Documentation/devicetree/bindings/tty/serial/fsl-imx-uart.txt
+++ b/Documentation/devicetree/bindings/tty/serial/fsl-imx-uart.txt
@@ -11,7 +11,7 @@ Optional properties:
11 11
12Example: 12Example:
13 13
14uart@73fbc000 { 14serial@73fbc000 {
15 compatible = "fsl,imx51-uart", "fsl,imx21-uart"; 15 compatible = "fsl,imx51-uart", "fsl,imx21-uart";
16 reg = <0x73fbc000 0x4000>; 16 reg = <0x73fbc000 0x4000>;
17 interrupts = <31>; 17 interrupts = <31>;
diff --git a/Documentation/devicetree/bindings/usb/tegra-usb.txt b/Documentation/devicetree/bindings/usb/tegra-usb.txt
index 007005ddbe12..e9b005dc7625 100644
--- a/Documentation/devicetree/bindings/usb/tegra-usb.txt
+++ b/Documentation/devicetree/bindings/usb/tegra-usb.txt
@@ -12,6 +12,9 @@ Required properties :
12 - nvidia,vbus-gpio : If present, specifies a gpio that needs to be 12 - nvidia,vbus-gpio : If present, specifies a gpio that needs to be
13 activated for the bus to be powered. 13 activated for the bus to be powered.
14 14
15Required properties for phy_type == ulpi:
16 - nvidia,phy-reset-gpio : The GPIO used to reset the PHY.
17
15Optional properties: 18Optional properties:
16 - dr_mode : dual role mode. Indicates the working mode for 19 - dr_mode : dual role mode. Indicates the working mode for
17 nvidia,tegra20-ehci compatible controllers. Can be "host", "peripheral", 20 nvidia,tegra20-ehci compatible controllers. Can be "host", "peripheral",
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 107d8addf0e4..6eab91747a86 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -14,6 +14,7 @@ chrp Common Hardware Reference Platform
14cortina Cortina Systems, Inc. 14cortina Cortina Systems, Inc.
15dallas Maxim Integrated Products (formerly Dallas Semiconductor) 15dallas Maxim Integrated Products (formerly Dallas Semiconductor)
16denx Denx Software Engineering 16denx Denx Software Engineering
17emmicro EM Microelectronic
17epson Seiko Epson Corp. 18epson Seiko Epson Corp.
18est ESTeem Wireless Modems 19est ESTeem Wireless Modems
19fsl Freescale Semiconductor 20fsl Freescale Semiconductor
diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
index da0bfeb4253d..d4d66757354e 100644
--- a/Documentation/devicetree/booting-without-of.txt
+++ b/Documentation/devicetree/booting-without-of.txt
@@ -551,12 +551,13 @@ Here is an example of a simple device-tree. In this example, an "o"
551designates a node followed by the node unit name. Properties are 551designates a node followed by the node unit name. Properties are
552presented with their name followed by their content. "content" 552presented with their name followed by their content. "content"
553represents an ASCII string (zero terminated) value, while <content> 553represents an ASCII string (zero terminated) value, while <content>
554represents a 32-bit hexadecimal value. The various nodes in this 554represents a 32-bit value, specified in decimal or hexadecimal (the
555example will be discussed in a later chapter. At this point, it is 555latter prefixed 0x). The various nodes in this example will be
556only meant to give you a idea of what a device-tree looks like. I have 556discussed in a later chapter. At this point, it is only meant to give
557purposefully kept the "name" and "linux,phandle" properties which 557you a idea of what a device-tree looks like. I have purposefully kept
558aren't necessary in order to give you a better idea of what the tree 558the "name" and "linux,phandle" properties which aren't necessary in
559looks like in practice. 559order to give you a better idea of what the tree looks like in
560practice.
560 561
561 / o device-tree 562 / o device-tree
562 |- name = "device-tree" 563 |- name = "device-tree"
@@ -576,14 +577,14 @@ looks like in practice.
576 | |- name = "PowerPC,970" 577 | |- name = "PowerPC,970"
577 | |- device_type = "cpu" 578 | |- device_type = "cpu"
578 | |- reg = <0> 579 | |- reg = <0>
579 | |- clock-frequency = <5f5e1000> 580 | |- clock-frequency = <0x5f5e1000>
580 | |- 64-bit 581 | |- 64-bit
581 | |- linux,phandle = <2> 582 | |- linux,phandle = <2>
582 | 583 |
583 o memory@0 584 o memory@0
584 | |- name = "memory" 585 | |- name = "memory"
585 | |- device_type = "memory" 586 | |- device_type = "memory"
586 | |- reg = <00000000 00000000 00000000 20000000> 587 | |- reg = <0x00000000 0x00000000 0x00000000 0x20000000>
587 | |- linux,phandle = <3> 588 | |- linux,phandle = <3>
588 | 589 |
589 o chosen 590 o chosen
@@ -1010,8 +1011,8 @@ compatibility.
1010 #size-cells = <1>; 1011 #size-cells = <1>;
1011 #interrupt-cells = <2>; 1012 #interrupt-cells = <2>;
1012 device_type = "soc"; 1013 device_type = "soc";
1013 ranges = <00000000 e0000000 00100000> 1014 ranges = <0x00000000 0xe0000000 0x00100000>
1014 reg = <e0000000 00003000>; 1015 reg = <0xe0000000 0x00003000>;
1015 bus-frequency = <0>; 1016 bus-frequency = <0>;
1016 } 1017 }
1017 1018
@@ -1085,16 +1086,16 @@ supported currently at the toplevel.
1085 * terminated string 1086 * terminated string
1086 */ 1087 */
1087 1088
1088 property2 = <1234abcd>; /* define a property containing a 1089 property2 = <0x1234abcd>; /* define a property containing a
1089 * numerical 32-bit value (hexadecimal) 1090 * numerical 32-bit value (hexadecimal)
1090 */ 1091 */
1091 1092
1092 property3 = <12345678 12345678 deadbeef>; 1093 property3 = <0x12345678 0x12345678 0xdeadbeef>;
1093 /* define a property containing 3 1094 /* define a property containing 3
1094 * numerical 32-bit values (cells) in 1095 * numerical 32-bit values (cells) in
1095 * hexadecimal 1096 * hexadecimal
1096 */ 1097 */
1097 property4 = [0a 0b 0c 0d de ea ad be ef]; 1098 property4 = [0x0a 0x0b 0x0c 0x0d 0xde 0xea 0xad 0xbe 0xef];
1098 /* define a property whose content is 1099 /* define a property whose content is
1099 * an arbitrary array of bytes 1100 * an arbitrary array of bytes
1100 */ 1101 */
@@ -1350,10 +1351,10 @@ Appendix A - Sample SOC node for MPC8540
1350 model = "TSEC"; 1351 model = "TSEC";
1351 compatible = "gianfar", "simple-bus"; 1352 compatible = "gianfar", "simple-bus";
1352 reg = <0x24000 0x1000>; 1353 reg = <0x24000 0x1000>;
1353 local-mac-address = [ 00 E0 0C 00 73 00 ]; 1354 local-mac-address = [ 0x00 0xE0 0x0C 0x00 0x73 0x00 ];
1354 interrupts = <29 2 30 2 34 2>; 1355 interrupts = <0x29 2 0x30 2 0x34 2>;
1355 phy-handle = <&phy0>; 1356 phy-handle = <&phy0>;
1356 sleep = <&pmc 00000080>; 1357 sleep = <&pmc 0x00000080>;
1357 ranges; 1358 ranges;
1358 1359
1359 mdio@24520 { 1360 mdio@24520 {
@@ -1385,10 +1386,10 @@ Appendix A - Sample SOC node for MPC8540
1385 model = "TSEC"; 1386 model = "TSEC";
1386 compatible = "gianfar"; 1387 compatible = "gianfar";
1387 reg = <0x25000 0x1000>; 1388 reg = <0x25000 0x1000>;
1388 local-mac-address = [ 00 E0 0C 00 73 01 ]; 1389 local-mac-address = [ 0x00 0xE0 0x0C 0x00 0x73 0x01 ];
1389 interrupts = <13 2 14 2 18 2>; 1390 interrupts = <0x13 2 0x14 2 0x18 2>;
1390 phy-handle = <&phy1>; 1391 phy-handle = <&phy1>;
1391 sleep = <&pmc 00000040>; 1392 sleep = <&pmc 0x00000040>;
1392 }; 1393 };
1393 1394
1394 ethernet@26000 { 1395 ethernet@26000 {
@@ -1396,17 +1397,17 @@ Appendix A - Sample SOC node for MPC8540
1396 model = "FEC"; 1397 model = "FEC";
1397 compatible = "gianfar"; 1398 compatible = "gianfar";
1398 reg = <0x26000 0x1000>; 1399 reg = <0x26000 0x1000>;
1399 local-mac-address = [ 00 E0 0C 00 73 02 ]; 1400 local-mac-address = [ 0x00 0xE0 0x0C 0x00 0x73 0x02 ];
1400 interrupts = <41 2>; 1401 interrupts = <0x41 2>;
1401 phy-handle = <&phy3>; 1402 phy-handle = <&phy3>;
1402 sleep = <&pmc 00000020>; 1403 sleep = <&pmc 0x00000020>;
1403 }; 1404 };
1404 1405
1405 serial@4500 { 1406 serial@4500 {
1406 #address-cells = <1>; 1407 #address-cells = <1>;
1407 #size-cells = <1>; 1408 #size-cells = <1>;
1408 compatible = "fsl,mpc8540-duart", "simple-bus"; 1409 compatible = "fsl,mpc8540-duart", "simple-bus";
1409 sleep = <&pmc 00000002>; 1410 sleep = <&pmc 0x00000002>;
1410 ranges; 1411 ranges;
1411 1412
1412 serial@4500 { 1413 serial@4500 {
@@ -1414,7 +1415,7 @@ Appendix A - Sample SOC node for MPC8540
1414 compatible = "ns16550"; 1415 compatible = "ns16550";
1415 reg = <0x4500 0x100>; 1416 reg = <0x4500 0x100>;
1416 clock-frequency = <0>; 1417 clock-frequency = <0>;
1417 interrupts = <42 2>; 1418 interrupts = <0x42 2>;
1418 }; 1419 };
1419 1420
1420 serial@4600 { 1421 serial@4600 {
@@ -1422,7 +1423,7 @@ Appendix A - Sample SOC node for MPC8540
1422 compatible = "ns16550"; 1423 compatible = "ns16550";
1423 reg = <0x4600 0x100>; 1424 reg = <0x4600 0x100>;
1424 clock-frequency = <0>; 1425 clock-frequency = <0>;
1425 interrupts = <42 2>; 1426 interrupts = <0x42 2>;
1426 }; 1427 };
1427 }; 1428 };
1428 1429
@@ -1436,11 +1437,11 @@ Appendix A - Sample SOC node for MPC8540
1436 }; 1437 };
1437 1438
1438 i2c@3000 { 1439 i2c@3000 {
1439 interrupts = <43 2>; 1440 interrupts = <0x43 2>;
1440 reg = <0x3000 0x100>; 1441 reg = <0x3000 0x100>;
1441 compatible = "fsl-i2c"; 1442 compatible = "fsl-i2c";
1442 dfsrr; 1443 dfsrr;
1443 sleep = <&pmc 00000004>; 1444 sleep = <&pmc 0x00000004>;
1444 }; 1445 };
1445 1446
1446 pmc: power@e0070 { 1447 pmc: power@e0070 {
diff --git a/Documentation/dma-buf-sharing.txt b/Documentation/dma-buf-sharing.txt
index 3bbd5c51605a..ad86fb86c9a0 100644
--- a/Documentation/dma-buf-sharing.txt
+++ b/Documentation/dma-buf-sharing.txt
@@ -29,13 +29,6 @@ The buffer-user
29 in memory, mapped into its own address space, so it can access the same area 29 in memory, mapped into its own address space, so it can access the same area
30 of memory. 30 of memory.
31 31
32*IMPORTANT*: [see https://lkml.org/lkml/2011/12/20/211 for more details]
33For this first version, A buffer shared using the dma_buf sharing API:
34- *may* be exported to user space using "mmap" *ONLY* by exporter, outside of
35 this framework.
36- with this new iteration of the dma-buf api cpu access from the kernel has been
37 enable, see below for the details.
38
39dma-buf operations for device dma only 32dma-buf operations for device dma only
40-------------------------------------- 33--------------------------------------
41 34
@@ -300,6 +293,17 @@ Access to a dma_buf from the kernel context involves three steps:
300 Note that these calls need to always succeed. The exporter needs to complete 293 Note that these calls need to always succeed. The exporter needs to complete
301 any preparations that might fail in begin_cpu_access. 294 any preparations that might fail in begin_cpu_access.
302 295
296 For some cases the overhead of kmap can be too high, a vmap interface
297 is introduced. This interface should be used very carefully, as vmalloc
298 space is a limited resources on many architectures.
299
300 Interfaces:
301 void *dma_buf_vmap(struct dma_buf *dmabuf)
302 void dma_buf_vunmap(struct dma_buf *dmabuf, void *vaddr)
303
304 The vmap call can fail if there is no vmap support in the exporter, or if it
305 runs out of vmalloc space. Fallback to kmap should be implemented.
306
3033. Finish access 3073. Finish access
304 308
305 When the importer is done accessing the range specified in begin_cpu_access, 309 When the importer is done accessing the range specified in begin_cpu_access,
@@ -313,6 +317,83 @@ Access to a dma_buf from the kernel context involves three steps:
313 enum dma_data_direction dir); 317 enum dma_data_direction dir);
314 318
315 319
320Direct Userspace Access/mmap Support
321------------------------------------
322
323Being able to mmap an export dma-buf buffer object has 2 main use-cases:
324- CPU fallback processing in a pipeline and
325- supporting existing mmap interfaces in importers.
326
3271. CPU fallback processing in a pipeline
328
329 In many processing pipelines it is sometimes required that the cpu can access
330 the data in a dma-buf (e.g. for thumbnail creation, snapshots, ...). To avoid
331 the need to handle this specially in userspace frameworks for buffer sharing
332 it's ideal if the dma_buf fd itself can be used to access the backing storage
333 from userspace using mmap.
334
335 Furthermore Android's ION framework already supports this (and is otherwise
336 rather similar to dma-buf from a userspace consumer side with using fds as
337 handles, too). So it's beneficial to support this in a similar fashion on
338 dma-buf to have a good transition path for existing Android userspace.
339
340 No special interfaces, userspace simply calls mmap on the dma-buf fd.
341
3422. Supporting existing mmap interfaces in exporters
343
344 Similar to the motivation for kernel cpu access it is again important that
345 the userspace code of a given importing subsystem can use the same interfaces
346 with a imported dma-buf buffer object as with a native buffer object. This is
347 especially important for drm where the userspace part of contemporary OpenGL,
348 X, and other drivers is huge, and reworking them to use a different way to
349 mmap a buffer rather invasive.
350
351 The assumption in the current dma-buf interfaces is that redirecting the
352 initial mmap is all that's needed. A survey of some of the existing
353 subsystems shows that no driver seems to do any nefarious thing like syncing
354 up with outstanding asynchronous processing on the device or allocating
355 special resources at fault time. So hopefully this is good enough, since
356 adding interfaces to intercept pagefaults and allow pte shootdowns would
357 increase the complexity quite a bit.
358
359 Interface:
360 int dma_buf_mmap(struct dma_buf *, struct vm_area_struct *,
361 unsigned long);
362
363 If the importing subsystem simply provides a special-purpose mmap call to set
364 up a mapping in userspace, calling do_mmap with dma_buf->file will equally
365 achieve that for a dma-buf object.
366
3673. Implementation notes for exporters
368
369 Because dma-buf buffers have invariant size over their lifetime, the dma-buf
370 core checks whether a vma is too large and rejects such mappings. The
371 exporter hence does not need to duplicate this check.
372
373 Because existing importing subsystems might presume coherent mappings for
374 userspace, the exporter needs to set up a coherent mapping. If that's not
375 possible, it needs to fake coherency by manually shooting down ptes when
376 leaving the cpu domain and flushing caches at fault time. Note that all the
377 dma_buf files share the same anon inode, hence the exporter needs to replace
378 the dma_buf file stored in vma->vm_file with it's own if pte shootdown is
379 requred. This is because the kernel uses the underlying inode's address_space
380 for vma tracking (and hence pte tracking at shootdown time with
381 unmap_mapping_range).
382
383 If the above shootdown dance turns out to be too expensive in certain
384 scenarios, we can extend dma-buf with a more explicit cache tracking scheme
385 for userspace mappings. But the current assumption is that using mmap is
386 always a slower path, so some inefficiencies should be acceptable.
387
388 Exporters that shoot down mappings (for any reasons) shall not do any
389 synchronization at fault time with outstanding device operations.
390 Synchronization is an orthogonal issue to sharing the backing storage of a
391 buffer and hence should not be handled by dma-buf itself. This is explictly
392 mentioned here because many people seem to want something like this, but if
393 different exporters handle this differently, buffer sharing can fail in
394 interesting ways depending upong the exporter (if userspace starts depending
395 upon this implicit synchronization).
396
316Miscellaneous notes 397Miscellaneous notes
317------------------- 398-------------------
318 399
@@ -336,6 +417,20 @@ Miscellaneous notes
336 the exporting driver to create a dmabuf fd must provide a way to let 417 the exporting driver to create a dmabuf fd must provide a way to let
337 userspace control setting of O_CLOEXEC flag passed in to dma_buf_fd(). 418 userspace control setting of O_CLOEXEC flag passed in to dma_buf_fd().
338 419
420- If an exporter needs to manually flush caches and hence needs to fake
421 coherency for mmap support, it needs to be able to zap all the ptes pointing
422 at the backing storage. Now linux mm needs a struct address_space associated
423 with the struct file stored in vma->vm_file to do that with the function
424 unmap_mapping_range. But the dma_buf framework only backs every dma_buf fd
425 with the anon_file struct file, i.e. all dma_bufs share the same file.
426
427 Hence exporters need to setup their own file (and address_space) association
428 by setting vma->vm_file and adjusting vma->vm_pgoff in the dma_buf mmap
429 callback. In the specific case of a gem driver the exporter could use the
430 shmem file already provided by gem (and set vm_pgoff = 0). Exporters can then
431 zap ptes by unmapping the corresponding range of the struct address_space
432 associated with their own file.
433
339References: 434References:
340[1] struct dma_buf_ops in include/linux/dma-buf.h 435[1] struct dma_buf_ops in include/linux/dma-buf.h
341[2] All interfaces mentioned above defined in include/linux/dma-buf.h 436[2] All interfaces mentioned above defined in include/linux/dma-buf.h
diff --git a/Documentation/dvb/get_dvb_firmware b/Documentation/dvb/get_dvb_firmware
index d1d4a179a382..fbb241174486 100755
--- a/Documentation/dvb/get_dvb_firmware
+++ b/Documentation/dvb/get_dvb_firmware
@@ -28,7 +28,8 @@ use IO::Handle;
28 "opera1", "cx231xx", "cx18", "cx23885", "pvrusb2", "mpc718", 28 "opera1", "cx231xx", "cx18", "cx23885", "pvrusb2", "mpc718",
29 "af9015", "ngene", "az6027", "lme2510_lg", "lme2510c_s7395", 29 "af9015", "ngene", "az6027", "lme2510_lg", "lme2510c_s7395",
30 "lme2510c_s7395_old", "drxk", "drxk_terratec_h5", 30 "lme2510c_s7395_old", "drxk", "drxk_terratec_h5",
31 "drxk_hauppauge_hvr930c", "tda10071", "it9135", "it9137"); 31 "drxk_hauppauge_hvr930c", "tda10071", "it9135", "it9137",
32 "drxk_pctv");
32 33
33# Check args 34# Check args
34syntax() if (scalar(@ARGV) != 1); 35syntax() if (scalar(@ARGV) != 1);
@@ -730,6 +731,23 @@ sub tda10071 {
730 "$fwfile"; 731 "$fwfile";
731} 732}
732 733
734sub drxk_pctv {
735 my $sourcefile = "PCTV_460e_reference.zip";
736 my $url = "ftp://ftp.pctvsystems.com/TV/driver/PCTV%2070e%2080e%20100e%20320e%20330e%20800e/";
737 my $hash = "4403de903bf2593464c8d74bbc200a57";
738 my $fwfile = "dvb-demod-drxk-pctv.fw";
739 my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
740
741 checkstandard();
742
743 wgetfile($sourcefile, $url . $sourcefile);
744 verify($sourcefile, $hash);
745 unzip($sourcefile, $tmpdir);
746 extract("$tmpdir/PCTV\ 70e\ 80e\ 100e\ 320e\ 330e\ 800e/32\ bit/emOEM.sys", 0x72b80, 42692, $fwfile);
747
748 "$fwfile";
749}
750
733# --------------------------------------------------------------- 751# ---------------------------------------------------------------
734# Utilities 752# Utilities
735 753
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 1e69a81e99d4..56000b33340b 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -541,6 +541,18 @@ Who: Kees Cook <keescook@chromium.org>
541 541
542---------------------------- 542----------------------------
543 543
544What: Removing the pn544 raw driver.
545When: 3.6
546Why: With the introduction of the NFC HCI and SHDL kernel layers, pn544.c
547 is being replaced by pn544_hci.c which is accessible through the netlink
548 and socket NFC APIs. Moreover, pn544.c is outdated and does not seem to
549 work properly with the latest Android stacks.
550 Having 2 drivers for the same hardware is confusing and as such we
551 should only keep the one following the kernel NFC APIs.
552Who: Samuel Ortiz <sameo@linux.intel.com>
553
554----------------------------
555
544What: setitimer accepts user NULL pointer (value) 556What: setitimer accepts user NULL pointer (value)
545When: 3.6 557When: 3.6
546Why: setitimer is not returning -EFAULT if user pointer is NULL. This 558Why: setitimer is not returning -EFAULT if user pointer is NULL. This
@@ -549,6 +561,15 @@ Who: Sasikantha Babu <sasikanth.v19@gmail.com>
549 561
550---------------------------- 562----------------------------
551 563
564What: remove bogus DV presets V4L2_DV_1080I29_97, V4L2_DV_1080I30 and
565 V4L2_DV_1080I25
566When: 3.6
567Why: These HDTV formats do not exist and were added by a confused mind
568 (that was me, to be precise...)
569Who: Hans Verkuil <hans.verkuil@cisco.com>
570
571----------------------------
572
552What: V4L2_CID_HCENTER, V4L2_CID_VCENTER V4L2 controls 573What: V4L2_CID_HCENTER, V4L2_CID_VCENTER V4L2 controls
553When: 3.7 574When: 3.7
554Why: The V4L2_CID_VCENTER, V4L2_CID_HCENTER controls have been deprecated 575Why: The V4L2_CID_VCENTER, V4L2_CID_HCENTER controls have been deprecated
@@ -567,3 +588,27 @@ Why: Remount currently allows changing bound subsystems and
567 replaced with conventional fsnotify. 588 replaced with conventional fsnotify.
568 589
569---------------------------- 590----------------------------
591
592What: KVM debugfs statistics
593When: 2013
594Why: KVM tracepoints provide mostly equivalent information in a much more
595 flexible fashion.
596
597----------------------------
598
599What: at91-mci driver ("CONFIG_MMC_AT91")
600When: 3.7
601Why: There are two mci drivers: at91-mci and atmel-mci. The PDC support
602 was added to atmel-mci as a first step to support more chips.
603 Then at91-mci was kept only for old IP versions (on at91rm9200 and
604 at91sam9261). The support of these IP versions has just been added
605 to atmel-mci, so atmel-mci can be used for all chips.
606Who: Ludovic Desroches <ludovic.desroches@atmel.com>
607
608----------------------------
609
610What: net/wanrouter/
611When: June 2013
612Why: Unsupported/unmaintained/unused since 2.6
613
614----------------------------
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index 4fca82e5276e..8e2da1e06e3b 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -60,8 +60,8 @@ ata *);
60 ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); 60 ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
61 ssize_t (*listxattr) (struct dentry *, char *, size_t); 61 ssize_t (*listxattr) (struct dentry *, char *, size_t);
62 int (*removexattr) (struct dentry *, const char *); 62 int (*removexattr) (struct dentry *, const char *);
63 void (*truncate_range)(struct inode *, loff_t, loff_t);
64 int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len); 63 int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len);
64 void (*update_time)(struct inode *, struct timespec *, int);
65 65
66locking rules: 66locking rules:
67 all may block 67 all may block
@@ -87,8 +87,9 @@ setxattr: yes
87getxattr: no 87getxattr: no
88listxattr: no 88listxattr: no
89removexattr: yes 89removexattr: yes
90truncate_range: yes
91fiemap: no 90fiemap: no
91update_time: no
92
92 Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on 93 Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on
93victim. 94victim.
94 cross-directory ->rename() has (per-superblock) ->s_vfs_rename_sem. 95 cross-directory ->rename() has (per-superblock) ->s_vfs_rename_sem.
diff --git a/Documentation/filesystems/ext3.txt b/Documentation/filesystems/ext3.txt
index b100adc38adb..293855e95000 100644
--- a/Documentation/filesystems/ext3.txt
+++ b/Documentation/filesystems/ext3.txt
@@ -59,9 +59,9 @@ commit=nrsec (*) Ext3 can be told to sync all its data and metadata
59 Setting it to very large values will improve 59 Setting it to very large values will improve
60 performance. 60 performance.
61 61
62barrier=<0(*)|1> This enables/disables the use of write barriers in 62barrier=<0|1(*)> This enables/disables the use of write barriers in
63barrier the jbd code. barrier=0 disables, barrier=1 enables. 63barrier (*) the jbd code. barrier=0 disables, barrier=1 enables.
64nobarrier (*) This also requires an IO stack which can support 64nobarrier This also requires an IO stack which can support
65 barriers, and if jbd gets an error on a barrier 65 barriers, and if jbd gets an error on a barrier
66 write, it will disable again with a warning. 66 write, it will disable again with a warning.
67 Write barriers enforce proper on-disk ordering 67 Write barriers enforce proper on-disk ordering
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting
index 74acd9618819..8c91d1057d9a 100644
--- a/Documentation/filesystems/porting
+++ b/Documentation/filesystems/porting
@@ -297,7 +297,8 @@ in the beginning of ->setattr unconditionally.
297be used instead. It gets called whenever the inode is evicted, whether it has 297be 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(). Caller makes sure async writeback cannot be running
301for the inode while (or after) ->evict_inode() is called.
301 302
302 ->drop_inode() returns int now; it's called on final iput() with 303 ->drop_inode() returns int now; it's called on final iput() with
303inode->i_lock held and it returns true if filesystems wants the inode to be 304inode->i_lock held and it returns true if filesystems wants the inode to be
@@ -306,14 +307,11 @@ updated 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 307simply of return 1. Note that all actual eviction work is done by caller after
307->drop_inode() returns. 308->drop_inode() returns.
308 309
309 clear_inode() is gone; use end_writeback() instead. As before, it must 310 As before, clear_inode() must be called exactly once on each call of
310be called exactly once on each call of ->evict_inode() (as it used to be for 311->evict_inode() (as it used to be for each call of ->delete_inode()). Unlike
311each call of ->delete_inode()). Unlike before, if you are using inode-associated 312before, if you are using inode-associated metadata buffers (i.e.
312metadata buffers (i.e. mark_buffer_dirty_inode()), it's your responsibility to 313mark_buffer_dirty_inode()), it's your responsibility to call
313call invalidate_inode_buffers() before end_writeback(). 314invalidate_inode_buffers() before clear_inode().
314 No async writeback (and thus no calls of ->write_inode()) will happen
315after end_writeback() returns, so actions that should not overlap with ->write_inode()
316(e.g. freeing on-disk inode if i_nlink is 0) ought to be done after that call.
317 315
318 NOTE: checking i_nlink in the beginning of ->write_inode() and bailing out 316 NOTE: checking i_nlink in the beginning of ->write_inode() and bailing out
319if it's zero is not *and* *never* *had* *been* enough. Final unlink() and iput() 317if it's zero is not *and* *never* *had* *been* enough. Final unlink() and iput()
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index ef088e55ab2e..fb0a6aeb936c 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -40,6 +40,7 @@ Table of Contents
40 3.4 /proc/<pid>/coredump_filter - Core dump filtering settings 40 3.4 /proc/<pid>/coredump_filter - Core dump filtering settings
41 3.5 /proc/<pid>/mountinfo - Information about mounts 41 3.5 /proc/<pid>/mountinfo - Information about mounts
42 3.6 /proc/<pid>/comm & /proc/<pid>/task/<tid>/comm 42 3.6 /proc/<pid>/comm & /proc/<pid>/task/<tid>/comm
43 3.7 /proc/<pid>/task/<tid>/children - Information about task children
43 44
44 4 Configuring procfs 45 4 Configuring procfs
45 4.1 Mount options 46 4.1 Mount options
@@ -310,6 +311,11 @@ Table 1-4: Contents of the stat files (as of 2.6.30-rc7)
310 start_data address above which program data+bss is placed 311 start_data address above which program data+bss is placed
311 end_data address below which program data+bss is placed 312 end_data address below which program data+bss is placed
312 start_brk address above which program heap can be expanded with brk() 313 start_brk address above which program heap can be expanded with brk()
314 arg_start address above which program command line is placed
315 arg_end address below which program command line is placed
316 env_start address above which program environment is placed
317 env_end address below which program environment is placed
318 exit_code the thread's exit_code in the form reported by the waitpid system call
313.............................................................................. 319..............................................................................
314 320
315The /proc/PID/maps file containing the currently mapped memory regions and 321The /proc/PID/maps file containing the currently mapped memory regions and
@@ -743,6 +749,7 @@ Committed_AS: 100056 kB
743VmallocTotal: 112216 kB 749VmallocTotal: 112216 kB
744VmallocUsed: 428 kB 750VmallocUsed: 428 kB
745VmallocChunk: 111088 kB 751VmallocChunk: 111088 kB
752AnonHugePages: 49152 kB
746 753
747 MemTotal: Total usable ram (i.e. physical ram minus a few reserved 754 MemTotal: Total usable ram (i.e. physical ram minus a few reserved
748 bits and the kernel binary code) 755 bits and the kernel binary code)
@@ -776,6 +783,7 @@ VmallocChunk: 111088 kB
776 Dirty: Memory which is waiting to get written back to the disk 783 Dirty: Memory which is waiting to get written back to the disk
777 Writeback: Memory which is actively being written back to the disk 784 Writeback: Memory which is actively being written back to the disk
778 AnonPages: Non-file backed pages mapped into userspace page tables 785 AnonPages: Non-file backed pages mapped into userspace page tables
786AnonHugePages: Non-file backed huge pages mapped into userspace page tables
779 Mapped: files which have been mmaped, such as libraries 787 Mapped: files which have been mmaped, such as libraries
780 Slab: in-kernel data structures cache 788 Slab: in-kernel data structures cache
781SReclaimable: Part of Slab, that might be reclaimed, such as caches 789SReclaimable: Part of Slab, that might be reclaimed, such as caches
@@ -1576,6 +1584,23 @@ then the kernel's TASK_COMM_LEN (currently 16 chars) will result in a truncated
1576comm value. 1584comm value.
1577 1585
1578 1586
15873.7 /proc/<pid>/task/<tid>/children - Information about task children
1588-------------------------------------------------------------------------
1589This file provides a fast way to retrieve first level children pids
1590of a task pointed by <pid>/<tid> pair. The format is a space separated
1591stream of pids.
1592
1593Note the "first level" here -- if a child has own children they will
1594not be listed here, one needs to read /proc/<children-pid>/task/<tid>/children
1595to obtain the descendants.
1596
1597Since this interface is intended to be fast and cheap it doesn't
1598guarantee to provide precise results and some children might be
1599skipped, especially if they've exited right after we printed their
1600pids, so one need to either stop or freeze processes being inspected
1601if precise results are needed.
1602
1603
1579------------------------------------------------------------------------------ 1604------------------------------------------------------------------------------
1580Configuring procfs 1605Configuring procfs
1581------------------------------------------------------------------------------ 1606------------------------------------------------------------------------------
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index 0d0492028082..efd23f481704 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -363,7 +363,7 @@ struct inode_operations {
363 ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); 363 ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
364 ssize_t (*listxattr) (struct dentry *, char *, size_t); 364 ssize_t (*listxattr) (struct dentry *, char *, size_t);
365 int (*removexattr) (struct dentry *, const char *); 365 int (*removexattr) (struct dentry *, const char *);
366 void (*truncate_range)(struct inode *, loff_t, loff_t); 366 void (*update_time)(struct inode *, struct timespec *, int);
367}; 367};
368 368
369Again, all methods are called without any locks being held, unless 369Again, all methods are called without any locks being held, unless
@@ -472,9 +472,9 @@ otherwise noted.
472 removexattr: called by the VFS to remove an extended attribute from 472 removexattr: called by the VFS to remove an extended attribute from
473 a file. This method is called by removexattr(2) system call. 473 a file. This method is called by removexattr(2) system call.
474 474
475 truncate_range: a method provided by the underlying filesystem to truncate a 475 update_time: called by the VFS to update a specific time or the i_version of
476 range of blocks , i.e. punch a hole somewhere in a file. 476 an inode. If this is not defined the VFS will update the inode itself
477 477 and call mark_inode_dirty_sync.
478 478
479The Address Space Object 479The Address Space Object
480======================== 480========================
@@ -760,7 +760,7 @@ struct file_operations
760---------------------- 760----------------------
761 761
762This describes how the VFS can manipulate an open file. As of kernel 762This describes how the VFS can manipulate an open file. As of kernel
7632.6.22, the following members are defined: 7633.5, the following members are defined:
764 764
765struct file_operations { 765struct file_operations {
766 struct module *owner; 766 struct module *owner;
@@ -790,6 +790,8 @@ struct file_operations {
790 int (*flock) (struct file *, int, struct file_lock *); 790 int (*flock) (struct file *, int, struct file_lock *);
791 ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, size_t, unsigned int); 791 ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, size_t, unsigned int);
792 ssize_t (*splice_read)(struct file *, struct pipe_inode_info *, size_t, unsigned int); 792 ssize_t (*splice_read)(struct file *, struct pipe_inode_info *, size_t, unsigned int);
793 int (*setlease)(struct file *, long arg, struct file_lock **);
794 long (*fallocate)(struct file *, int mode, loff_t offset, loff_t len);
793}; 795};
794 796
795Again, all methods are called without any locks being held, unless 797Again, all methods are called without any locks being held, unless
@@ -858,6 +860,11 @@ otherwise noted.
858 splice_read: called by the VFS to splice data from file to a pipe. This 860 splice_read: called by the VFS to splice data from file to a pipe. This
859 method is used by the splice(2) system call 861 method is used by the splice(2) system call
860 862
863 setlease: called by the VFS to set or release a file lock lease.
864 setlease has the file_lock_lock held and must not sleep.
865
866 fallocate: called by the VFS to preallocate blocks or punch a hole.
867
861Note that the file operations are implemented by the specific 868Note that the file operations are implemented by the specific
862filesystem in which the inode resides. When opening a device node 869filesystem in which the inode resides. When opening a device node
863(character or block special) most filesystems will call special 870(character or block special) most filesystems will call special
diff --git a/Documentation/gpio.txt b/Documentation/gpio.txt
index 620a07844e8c..e08a883de36e 100644
--- a/Documentation/gpio.txt
+++ b/Documentation/gpio.txt
@@ -322,6 +322,9 @@ where 'flags' is currently defined to specify the following properties:
322 * GPIOF_OPEN_DRAIN - gpio pin is open drain type. 322 * GPIOF_OPEN_DRAIN - gpio pin is open drain type.
323 * GPIOF_OPEN_SOURCE - gpio pin is open source type. 323 * GPIOF_OPEN_SOURCE - gpio pin is open source type.
324 324
325 * GPIOF_EXPORT_DIR_FIXED - export gpio to sysfs, keep direction
326 * GPIOF_EXPORT_DIR_CHANGEABLE - also export, allow changing direction
327
325since GPIOF_INIT_* are only valid when configured as output, so group valid 328since GPIOF_INIT_* are only valid when configured as output, so group valid
326combinations as: 329combinations as:
327 330
diff --git a/Documentation/i2c/functionality b/Documentation/i2c/functionality
index 42c17c1fb3cd..b0ff2ab596ce 100644
--- a/Documentation/i2c/functionality
+++ b/Documentation/i2c/functionality
@@ -18,9 +18,9 @@ For the most up-to-date list of functionality constants, please check
18 adapters typically can not do these) 18 adapters typically can not do these)
19 I2C_FUNC_10BIT_ADDR Handles the 10-bit address extensions 19 I2C_FUNC_10BIT_ADDR Handles the 10-bit address extensions
20 I2C_FUNC_PROTOCOL_MANGLING Knows about the I2C_M_IGNORE_NAK, 20 I2C_FUNC_PROTOCOL_MANGLING Knows about the I2C_M_IGNORE_NAK,
21 I2C_M_REV_DIR_ADDR, I2C_M_NOSTART and 21 I2C_M_REV_DIR_ADDR and I2C_M_NO_RD_ACK
22 I2C_M_NO_RD_ACK flags (which modify the 22 flags (which modify the I2C protocol!)
23 I2C protocol!) 23 I2C_FUNC_NOSTART Can skip repeated start sequence
24 I2C_FUNC_SMBUS_QUICK Handles the SMBus write_quick command 24 I2C_FUNC_SMBUS_QUICK Handles the SMBus write_quick command
25 I2C_FUNC_SMBUS_READ_BYTE Handles the SMBus read_byte command 25 I2C_FUNC_SMBUS_READ_BYTE Handles the SMBus read_byte command
26 I2C_FUNC_SMBUS_WRITE_BYTE Handles the SMBus write_byte command 26 I2C_FUNC_SMBUS_WRITE_BYTE Handles the SMBus write_byte command
@@ -50,6 +50,9 @@ A few combinations of the above flags are also defined for your convenience:
50 emulated by a real I2C adapter (using 50 emulated by a real I2C adapter (using
51 the transparent emulation layer) 51 the transparent emulation layer)
52 52
53In kernel versions prior to 3.5 I2C_FUNC_NOSTART was implemented as
54part of I2C_FUNC_PROTOCOL_MANGLING.
55
53 56
54ADAPTER IMPLEMENTATION 57ADAPTER IMPLEMENTATION
55---------------------- 58----------------------
diff --git a/Documentation/i2c/i2c-protocol b/Documentation/i2c/i2c-protocol
index 10518dd58814..0b3e62d1f77a 100644
--- a/Documentation/i2c/i2c-protocol
+++ b/Documentation/i2c/i2c-protocol
@@ -49,7 +49,9 @@ a byte read, followed by a byte write:
49Modified transactions 49Modified transactions
50===================== 50=====================
51 51
52We have found some I2C devices that needs the following modifications: 52The following modifications to the I2C protocol can also be generated,
53with the exception of I2C_M_NOSTART these are usually only needed to
54work around device issues:
53 55
54 Flag I2C_M_NOSTART: 56 Flag I2C_M_NOSTART:
55 In a combined transaction, no 'S Addr Wr/Rd [A]' is generated at some 57 In a combined transaction, no 'S Addr Wr/Rd [A]' is generated at some
@@ -60,6 +62,11 @@ We have found some I2C devices that needs the following modifications:
60 we do not generate Addr, but we do generate the startbit S. This will 62 we do not generate Addr, but we do generate the startbit S. This will
61 probably confuse all other clients on your bus, so don't try this. 63 probably confuse all other clients on your bus, so don't try this.
62 64
65 This is often used to gather transmits from multiple data buffers in
66 system memory into something that appears as a single transfer to the
67 I2C device but may also be used between direction changes by some
68 rare devices.
69
63 Flags I2C_M_REV_DIR_ADDR 70 Flags I2C_M_REV_DIR_ADDR
64 This toggles the Rd/Wr flag. That is, if you want to do a write, but 71 This toggles the Rd/Wr flag. That is, if you want to do a write, but
65 need to emit an Rd instead of a Wr, or vice versa, you set this 72 need to emit an Rd instead of a Wr, or vice versa, you set this
diff --git a/Documentation/i2c/muxes/gpio-i2cmux b/Documentation/i2c/muxes/i2c-mux-gpio
index 811cd78d4cdc..bd9b2299b739 100644
--- a/Documentation/i2c/muxes/gpio-i2cmux
+++ b/Documentation/i2c/muxes/i2c-mux-gpio
@@ -1,11 +1,11 @@
1Kernel driver gpio-i2cmux 1Kernel driver i2c-gpio-mux
2 2
3Author: Peter Korsgaard <peter.korsgaard@barco.com> 3Author: Peter Korsgaard <peter.korsgaard@barco.com>
4 4
5Description 5Description
6----------- 6-----------
7 7
8gpio-i2cmux is an i2c mux driver providing access to I2C bus segments 8i2c-gpio-mux is an i2c mux driver providing access to I2C bus segments
9from a master I2C bus and a hardware MUX controlled through GPIO pins. 9from a master I2C bus and a hardware MUX controlled through GPIO pins.
10 10
11E.G.: 11E.G.:
@@ -26,16 +26,16 @@ according to the settings of the GPIO pins 1..N.
26Usage 26Usage
27----- 27-----
28 28
29gpio-i2cmux uses the platform bus, so you need to provide a struct 29i2c-gpio-mux uses the platform bus, so you need to provide a struct
30platform_device with the platform_data pointing to a struct 30platform_device with the platform_data pointing to a struct
31gpio_i2cmux_platform_data with the I2C adapter number of the master 31gpio_i2cmux_platform_data with the I2C adapter number of the master
32bus, the number of bus segments to create and the GPIO pins used 32bus, the number of bus segments to create and the GPIO pins used
33to control it. See include/linux/gpio-i2cmux.h for details. 33to control it. See include/linux/i2c-gpio-mux.h for details.
34 34
35E.G. something like this for a MUX providing 4 bus segments 35E.G. something like this for a MUX providing 4 bus segments
36controlled through 3 GPIO pins: 36controlled through 3 GPIO pins:
37 37
38#include <linux/gpio-i2cmux.h> 38#include <linux/i2c-gpio-mux.h>
39#include <linux/platform_device.h> 39#include <linux/platform_device.h>
40 40
41static const unsigned myboard_gpiomux_gpios[] = { 41static const unsigned myboard_gpiomux_gpios[] = {
@@ -57,7 +57,7 @@ static struct gpio_i2cmux_platform_data myboard_i2cmux_data = {
57}; 57};
58 58
59static struct platform_device myboard_i2cmux = { 59static struct platform_device myboard_i2cmux = {
60 .name = "gpio-i2cmux", 60 .name = "i2c-gpio-mux",
61 .id = 0, 61 .id = 0,
62 .dev = { 62 .dev = {
63 .platform_data = &myboard_i2cmux_data, 63 .platform_data = &myboard_i2cmux_data,
diff --git a/Documentation/initrd.txt b/Documentation/initrd.txt
index 1ba84f3584e3..4e1839ccb555 100644
--- a/Documentation/initrd.txt
+++ b/Documentation/initrd.txt
@@ -362,5 +362,5 @@ Resources
362 http://www.almesberger.net/cv/papers/ols2k-9.ps.gz 362 http://www.almesberger.net/cv/papers/ols2k-9.ps.gz
363[2] newlib package (experimental), with initrd example 363[2] newlib package (experimental), with initrd example
364 http://sources.redhat.com/newlib/ 364 http://sources.redhat.com/newlib/
365[3] Brouwer, Andries; "util-linux: Miscellaneous utilities for Linux" 365[3] util-linux: Miscellaneous utilities for Linux
366 ftp://ftp.win.tue.nl/pub/linux-local/utils/util-linux/ 366 http://www.kernel.org/pub/linux/utils/util-linux/
diff --git a/Documentation/kbuild/kbuild.txt b/Documentation/kbuild/kbuild.txt
index 68e32bb6bd80..6466704d47b5 100644
--- a/Documentation/kbuild/kbuild.txt
+++ b/Documentation/kbuild/kbuild.txt
@@ -50,6 +50,10 @@ LDFLAGS_MODULE
50-------------------------------------------------- 50--------------------------------------------------
51Additional options used for $(LD) when linking modules. 51Additional options used for $(LD) when linking modules.
52 52
53LDFLAGS_vmlinux
54--------------------------------------------------
55Additional options passed to final link of vmlinux.
56
53KBUILD_VERBOSE 57KBUILD_VERBOSE
54-------------------------------------------------- 58--------------------------------------------------
55Set the kbuild verbosity. Can be assigned same values as "V=...". 59Set the kbuild verbosity. Can be assigned same values as "V=...".
@@ -214,3 +218,18 @@ KBUILD_BUILD_USER, KBUILD_BUILD_HOST
214These two variables allow to override the user@host string displayed during 218These two variables allow to override the user@host string displayed during
215boot and in /proc/version. The default value is the output of the commands 219boot and in /proc/version. The default value is the output of the commands
216whoami and host, respectively. 220whoami and host, respectively.
221
222KBUILD_LDS
223--------------------------------------------------
224The linker script with full path. Assigned by the top-level Makefile.
225
226KBUILD_VMLINUX_INIT
227--------------------------------------------------
228All object files for the init (first) part of vmlinux.
229Files specified with KBUILD_VMLINUX_INIT are linked first.
230
231KBUILD_VMLINUX_MAIN
232--------------------------------------------------
233All object files for the main part of vmlinux.
234KBUILD_VMLINUX_INIT and KBUILD_VMLINUX_MAIN together specify
235all the object files used to link vmlinux.
diff --git a/Documentation/kbuild/kconfig.txt b/Documentation/kbuild/kconfig.txt
index 9d5f2a90dca9..a09f1a6a830c 100644
--- a/Documentation/kbuild/kconfig.txt
+++ b/Documentation/kbuild/kconfig.txt
@@ -53,15 +53,15 @@ KCONFIG_ALLCONFIG
53-------------------------------------------------- 53--------------------------------------------------
54(partially based on lkml email from/by Rob Landley, re: miniconfig) 54(partially based on lkml email from/by Rob Landley, re: miniconfig)
55-------------------------------------------------- 55--------------------------------------------------
56The allyesconfig/allmodconfig/allnoconfig/randconfig variants can 56The allyesconfig/allmodconfig/allnoconfig/randconfig variants can also
57also use the environment variable KCONFIG_ALLCONFIG as a flag or a 57use the environment variable KCONFIG_ALLCONFIG as a flag or a filename
58filename that contains config symbols that the user requires to be 58that contains config symbols that the user requires to be set to a
59set to a specific value. If KCONFIG_ALLCONFIG is used without a 59specific value. If KCONFIG_ALLCONFIG is used without a filename where
60filename, "make *config" checks for a file named 60KCONFIG_ALLCONFIG == "" or KCONFIG_ALLCONFIG == "1", "make *config"
61"all{yes/mod/no/def/random}.config" (corresponding to the *config command 61checks for a file named "all{yes/mod/no/def/random}.config"
62that was used) for symbol values that are to be forced. If this file 62(corresponding to the *config command that was used) for symbol values
63is not found, it checks for a file named "all.config" to contain forced 63that are to be forced. If this file is not found, it checks for a
64values. 64file named "all.config" to contain forced values.
65 65
66This enables you to create "miniature" config (miniconfig) or custom 66This enables you to create "miniature" config (miniconfig) or custom
67config files containing just the config symbols that you are interested 67config files containing just the config symbols that you are interested
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 5b6e58492229..a92c5ebf373e 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -335,6 +335,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
335 requirements as needed. This option 335 requirements as needed. This option
336 does not override iommu=pt 336 does not override iommu=pt
337 337
338 amd_iommu_dump= [HW,X86-64]
339 Enable AMD IOMMU driver option to dump the ACPI table
340 for AMD IOMMU. With this option enabled, AMD IOMMU
341 driver will print ACPI tables for AMD IOMMU during
342 IOMMU initialization.
343
338 amijoy.map= [HW,JOY] Amiga joystick support 344 amijoy.map= [HW,JOY] Amiga joystick support
339 Map of devices attached to JOY0DAT and JOY1DAT 345 Map of devices attached to JOY0DAT and JOY1DAT
340 Format: <a>,<b> 346 Format: <a>,<b>
@@ -397,8 +403,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
397 atkbd.softrepeat= [HW] 403 atkbd.softrepeat= [HW]
398 Use software keyboard repeat 404 Use software keyboard repeat
399 405
400 autotest [IA-64]
401
402 baycom_epp= [HW,AX25] 406 baycom_epp= [HW,AX25]
403 Format: <io>,<mode> 407 Format: <io>,<mode>
404 408
@@ -508,6 +512,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
508 Also note the kernel might malfunction if you disable 512 Also note the kernel might malfunction if you disable
509 some critical bits. 513 some critical bits.
510 514
515 cma=nn[MG] [ARM,KNL]
516 Sets the size of kernel global memory area for contiguous
517 memory allocations. For more information, see
518 include/linux/dma-contiguous.h
519
511 cmo_free_hint= [PPC] Format: { yes | no } 520 cmo_free_hint= [PPC] Format: { yes | no }
512 Specify whether pages are marked as being inactive 521 Specify whether pages are marked as being inactive
513 when they are freed. This is used in CMO environments 522 when they are freed. This is used in CMO environments
@@ -515,6 +524,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
515 a hypervisor. 524 a hypervisor.
516 Default: yes 525 Default: yes
517 526
527 coherent_pool=nn[KMG] [ARM,KNL]
528 Sets the size of memory pool for coherent, atomic dma
529 allocations if Contiguous Memory Allocator (CMA) is used.
530
518 code_bytes [X86] How many bytes of object code to print 531 code_bytes [X86] How many bytes of object code to print
519 in an oops report. 532 in an oops report.
520 Range: 0 - 8192 533 Range: 0 - 8192
@@ -987,6 +1000,20 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
987 i8k.restricted [HW] Allow controlling fans only if SYS_ADMIN 1000 i8k.restricted [HW] Allow controlling fans only if SYS_ADMIN
988 capability is set. 1001 capability is set.
989 1002
1003 i915.invert_brightness=
1004 [DRM] Invert the sense of the variable that is used to
1005 set the brightness of the panel backlight. Normally a
1006 brightness value of 0 indicates backlight switched off,
1007 and the maximum of the brightness value sets the backlight
1008 to maximum brightness. If this parameter is set to 0
1009 (default) and the machine requires it, or this parameter
1010 is set to 1, a brightness value of 0 sets the backlight
1011 to maximum brightness, and the maximum of the brightness
1012 value switches the backlight off.
1013 -1 -- never invert brightness
1014 0 -- machine default
1015 1 -- force brightness inversion
1016
990 icn= [HW,ISDN] 1017 icn= [HW,ISDN]
991 Format: <io>[,<membase>[,<icn_id>[,<icn_id2>]]] 1018 Format: <io>[,<membase>[,<icn_id>[,<icn_id2>]]]
992 1019
@@ -1430,8 +1457,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1430 devices can be requested on-demand with the 1457 devices can be requested on-demand with the
1431 /dev/loop-control interface. 1458 /dev/loop-control interface.
1432 1459
1433 mcatest= [IA-64]
1434
1435 mce [X86-32] Machine Check Exception 1460 mce [X86-32] Machine Check Exception
1436 1461
1437 mce=option [X86-64] See Documentation/x86/x86_64/boot-options.txt 1462 mce=option [X86-64] See Documentation/x86/x86_64/boot-options.txt
@@ -2518,6 +2543,15 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2518 2543
2519 sched_debug [KNL] Enables verbose scheduler debug messages. 2544 sched_debug [KNL] Enables verbose scheduler debug messages.
2520 2545
2546 skew_tick= [KNL] Offset the periodic timer tick per cpu to mitigate
2547 xtime_lock contention on larger systems, and/or RCU lock
2548 contention on all systems with CONFIG_MAXSMP set.
2549 Format: { "0" | "1" }
2550 0 -- disable. (may be 1 via CONFIG_CMDLINE="skew_tick=1"
2551 1 -- enable.
2552 Note: increases power consumption, thus should only be
2553 enabled if running jitter sensitive (HPC/RT) workloads.
2554
2521 security= [SECURITY] Choose a security module to enable at boot. 2555 security= [SECURITY] Choose a security module to enable at boot.
2522 If this boot parameter is not specified, only the first 2556 If this boot parameter is not specified, only the first
2523 security module asking for security registration will be 2557 security module asking for security registration will be
diff --git a/Documentation/leds/ledtrig-transient.txt b/Documentation/leds/ledtrig-transient.txt
new file mode 100644
index 000000000000..3bd38b487df1
--- /dev/null
+++ b/Documentation/leds/ledtrig-transient.txt
@@ -0,0 +1,152 @@
1LED Transient Trigger
2=====================
3
4The leds timer trigger does not currently have an interface to activate
5a one shot timer. The current support allows for setting two timers, one for
6specifying how long a state to be on, and the second for how long the state
7to be off. The delay_on value specifies the time period an LED should stay
8in on state, followed by a delay_off value that specifies how long the LED
9should stay in off state. The on and off cycle repeats until the trigger
10gets deactivated. There is no provision for one time activation to implement
11features that require an on or off state to be held just once and then stay in
12the original state forever.
13
14Without one shot timer interface, user space can still use timer trigger to
15set a timer to hold a state, however when user space application crashes or
16goes away without deactivating the timer, the hardware will be left in that
17state permanently.
18
19As a specific example of this use-case, let's look at vibrate feature on
20phones. Vibrate function on phones is implemented using PWM pins on SoC or
21PMIC. There is a need to activate one shot timer to control the vibrate
22feature, to prevent user space crashes leaving the phone in vibrate mode
23permanently causing the battery to drain.
24
25Transient trigger addresses the need for one shot timer activation. The
26transient trigger can be enabled and disabled just like the other leds
27triggers.
28
29When an led class device driver registers itself, it can specify all leds
30triggers it supports and a default trigger. During registration, activation
31routine for the default trigger gets called. During registration of an led
32class device, the LED state does not change.
33
34When the driver unregisters, deactivation routine for the currently active
35trigger will be called, and LED state is changed to LED_OFF.
36
37Driver suspend changes the LED state to LED_OFF and resume doesn't change
38the state. Please note that there is no explicit interaction between the
39suspend and resume actions and the currently enabled trigger. LED state
40changes are suspended while the driver is in suspend state. Any timers
41that are active at the time driver gets suspended, continue to run, without
42being able to actually change the LED state. Once driver is resumed, triggers
43start functioning again.
44
45LED state changes are controlled using brightness which is a common led
46class device property. When brightness is set to 0 from user space via
47echo 0 > brightness, it will result in deactivating the current trigger.
48
49Transient trigger uses standard register and unregister interfaces. During
50trigger registration, for each led class device that specifies this trigger
51as its default trigger, trigger activation routine will get called. During
52registration, the LED state does not change, unless there is another trigger
53active, in which case LED state changes to LED_OFF.
54
55During trigger unregistration, LED state gets changed to LED_OFF.
56
57Transient trigger activation routine doesn't change the LED state. It
58creates its properties and does its initialization. Transient trigger
59deactivation routine, will cancel any timer that is active before it cleans
60up and removes the properties it created. It will restore the LED state to
61non-transient state. When driver gets suspended, irrespective of the transient
62state, the LED state changes to LED_OFF.
63
64Transient trigger can be enabled and disabled from user space on led class
65devices, that support this trigger as shown below:
66
67echo transient > trigger
68echo none > trigger
69
70NOTE: Add a new property trigger state to control the state.
71
72This trigger exports three properties, activate, state, and duration. When
73transient trigger is activated these properties are set to default values.
74
75- duration allows setting timer value in msecs. The initial value is 0.
76- activate allows activating and deactivating the timer specified by
77 duration as needed. The initial and default value is 0. This will allow
78 duration to be set after trigger activation.
79- state allows user to specify a transient state to be held for the specified
80 duration.
81
82 activate - one shot timer activate mechanism.
83 1 when activated, 0 when deactivated.
84 default value is zero when transient trigger is enabled,
85 to allow duration to be set.
86
87 activate state indicates a timer with a value of specified
88 duration running.
89 deactivated state indicates that there is no active timer
90 running.
91
92 duration - one shot timer value. When activate is set, duration value
93 is used to start a timer that runs once. This value doesn't
94 get changed by the trigger unless user does a set via
95 echo new_value > duration
96
97 state - transient state to be held. It has two values 0 or 1. 0 maps
98 to LED_OFF and 1 maps to LED_FULL. The specified state is
99 held for the duration of the one shot timer and then the
100 state gets changed to the non-transient state which is the
101 inverse of transient state.
102 If state = LED_FULL, when the timer runs out the state will
103 go back to LED_OFF.
104 If state = LED_OFF, when the timer runs out the state will
105 go back to LED_FULL.
106 Please note that current LED state is not checked prior to
107 changing the state to the specified state.
108 Driver could map these values to inverted depending on the
109 default states it defines for the LED in its brightness_set()
110 interface which is called from the led brightness_set()
111 interfaces to control the LED state.
112
113When timer expires activate goes back to deactivated state, duration is left
114at the set value to be used when activate is set at a future time. This will
115allow user app to set the time once and activate it to run it once for the
116specified value as needed. When timer expires, state is restored to the
117non-transient state which is the inverse of the transient state.
118
119 echo 1 > activate - starts timer = duration when duration is not 0.
120 echo 0 > activate - cancels currently running timer.
121 echo n > duration - stores timer value to be used upon next
122 activate. Currently active timer if
123 any, continues to run for the specified time.
124 echo 0 > duration - stores timer value to be used upon next
125 activate. Currently active timer if any,
126 continues to run for the specified time.
127 echo 1 > state - stores desired transient state LED_FULL to be
128 held for the specified duration.
129 echo 0 > state - stores desired transient state LED_OFF to be
130 held for the specified duration.
131
132What is not supported:
133======================
134- Timer activation is one shot and extending and/or shortening the timer
135 is not supported.
136
137Example use-case 1:
138 echo transient > trigger
139 echo n > duration
140 echo 1 > state
141repeat the following step as needed:
142 echo 1 > activate - start timer = duration to run once
143 echo 1 > activate - start timer = duration to run once
144 echo none > trigger
145
146This trigger is intended to be used for for the following example use cases:
147 - Control of vibrate (phones, tablets etc.) hardware by user space app.
148 - Use of LED by user space app as activity indicator.
149 - Use of LED by user space app as a kind of watchdog indicator -- as
150 long as the app is alive, it can keep the LED illuminated, if it dies
151 the LED will be extinguished automatically.
152 - Use by any user space app that needs a transient GPIO output.
diff --git a/Documentation/media-framework.txt b/Documentation/media-framework.txt
index 3a0f879533ce..802875413873 100644
--- a/Documentation/media-framework.txt
+++ b/Documentation/media-framework.txt
@@ -335,6 +335,9 @@ the media_entity pipe field.
335Calls to media_entity_pipeline_start() can be nested. The pipeline pointer must 335Calls to media_entity_pipeline_start() can be nested. The pipeline pointer must
336be identical for all nested calls to the function. 336be identical for all nested calls to the function.
337 337
338media_entity_pipeline_start() may return an error. In that case, it will
339clean up any the changes it did by itself.
340
338When stopping the stream, drivers must notify the entities with 341When stopping the stream, drivers must notify the entities with
339 342
340 media_entity_pipeline_stop(struct media_entity *entity); 343 media_entity_pipeline_stop(struct media_entity *entity);
@@ -351,3 +354,19 @@ If other operations need to be disallowed on streaming entities (such as
351changing entities configuration parameters) drivers can explicitly check the 354changing entities configuration parameters) drivers can explicitly check the
352media_entity stream_count field to find out if an entity is streaming. This 355media_entity stream_count field to find out if an entity is streaming. This
353operation must be done with the media_device graph_mutex held. 356operation must be done with the media_device graph_mutex held.
357
358
359Link validation
360---------------
361
362Link validation is performed by media_entity_pipeline_start() for any
363entity which has sink pads in the pipeline. The
364media_entity::link_validate() callback is used for that purpose. In
365link_validate() callback, entity driver should check that the properties of
366the source pad of the connected entity and its own sink pad match. It is up
367to the type of the entity (and in the end, the properties of the hardware)
368what matching actually means.
369
370Subsystems should facilitate link validation by providing subsystem specific
371helper functions to provide easy access for commonly needed information, and
372in the end provide a way to use driver-specific callbacks.
diff --git a/Documentation/nfc/nfc-hci.txt b/Documentation/nfc/nfc-hci.txt
index 216b7254fcc3..320f9336c781 100644
--- a/Documentation/nfc/nfc-hci.txt
+++ b/Documentation/nfc/nfc-hci.txt
@@ -22,9 +22,9 @@ response to arrive.
22HCI events can also be received from the host controller. They will be handled 22HCI events can also be received from the host controller. They will be handled
23and a translation will be forwarded to NFC Core as needed. 23and a translation will be forwarded to NFC Core as needed.
24HCI uses 2 execution contexts: 24HCI uses 2 execution contexts:
25- one if for executing commands : nfc_hci_msg_tx_work(). Only one command 25- one for executing commands : nfc_hci_msg_tx_work(). Only one command
26can be executing at any given moment. 26can be executing at any given moment.
27- one if for dispatching received events and responses : nfc_hci_msg_rx_work() 27- one for dispatching received events and commands : nfc_hci_msg_rx_work().
28 28
29HCI Session initialization: 29HCI Session initialization:
30--------------------------- 30---------------------------
@@ -52,18 +52,42 @@ entry points:
52struct nfc_hci_ops { 52struct nfc_hci_ops {
53 int (*open)(struct nfc_hci_dev *hdev); 53 int (*open)(struct nfc_hci_dev *hdev);
54 void (*close)(struct nfc_hci_dev *hdev); 54 void (*close)(struct nfc_hci_dev *hdev);
55 int (*hci_ready) (struct nfc_hci_dev *hdev);
55 int (*xmit)(struct nfc_hci_dev *hdev, struct sk_buff *skb); 56 int (*xmit)(struct nfc_hci_dev *hdev, struct sk_buff *skb);
56 int (*start_poll)(struct nfc_hci_dev *hdev, u32 protocols); 57 int (*start_poll)(struct nfc_hci_dev *hdev, u32 protocols);
57 int (*target_from_gate)(struct nfc_hci_dev *hdev, u8 gate, 58 int (*target_from_gate)(struct nfc_hci_dev *hdev, u8 gate,
58 struct nfc_target *target); 59 struct nfc_target *target);
60 int (*complete_target_discovered) (struct nfc_hci_dev *hdev, u8 gate,
61 struct nfc_target *target);
62 int (*data_exchange) (struct nfc_hci_dev *hdev,
63 struct nfc_target *target,
64 struct sk_buff *skb, struct sk_buff **res_skb);
65 int (*check_presence)(struct nfc_hci_dev *hdev,
66 struct nfc_target *target);
59}; 67};
60 68
61open() and close() shall turn the hardware on and off. xmit() shall simply 69- open() and close() shall turn the hardware on and off.
62write a frame to the chip. start_poll() is an optional entrypoint that shall 70- hci_ready() is an optional entry point that is called right after the hci
63set the hardware in polling mode. This must be implemented only if the hardware 71session has been set up. The driver can use it to do additional initialization
64uses proprietary gates or a mechanism slightly different from the HCI standard. 72that must be performed using HCI commands.
65target_from_gate() is another optional entrypoint to return the protocols 73- xmit() shall simply write a frame to the chip.
74- start_poll() is an optional entrypoint that shall set the hardware in polling
75mode. This must be implemented only if the hardware uses proprietary gates or a
76mechanism slightly different from the HCI standard.
77- target_from_gate() is an optional entrypoint to return the nfc protocols
66corresponding to a proprietary gate. 78corresponding to a proprietary gate.
79- complete_target_discovered() is an optional entry point to let the driver
80perform additional proprietary processing necessary to auto activate the
81discovered target.
82- data_exchange() must be implemented by the driver if proprietary HCI commands
83are required to send data to the tag. Some tag types will require custom
84commands, others can be written to using the standard HCI commands. The driver
85can check the tag type and either do proprietary processing, or return 1 to ask
86for standard processing.
87- check_presence() is an optional entry point that will be called regularly
88by the core to check that an activated tag is still in the field. If this is
89not implemented, the core will not be able to push tag_lost events to the user
90space
67 91
68On the rx path, the driver is responsible to push incoming HCP frames to HCI 92On the rx path, the driver is responsible to push incoming HCP frames to HCI
69using nfc_hci_recv_frame(). HCI will take care of re-aggregation and handling 93using nfc_hci_recv_frame(). HCI will take care of re-aggregation and handling
@@ -99,7 +123,8 @@ fast, cannot sleep. stores incoming frames into an shdlc rx queue
99handles shdlc rx & tx queues. Dispatches HCI cmd responses. 123handles shdlc rx & tx queues. Dispatches HCI cmd responses.
100 124
101- HCI Tx Cmd worker (MSGTXWQ) 125- HCI Tx Cmd worker (MSGTXWQ)
102Serialize execution of HCI commands. Complete execution in case of resp timeout. 126Serializes execution of HCI commands. Completes execution in case of response
127timeout.
103 128
104- HCI Rx worker (MSGRXWQ) 129- HCI Rx worker (MSGRXWQ)
105Dispatches incoming HCI commands or events. 130Dispatches incoming HCI commands or events.
@@ -133,11 +158,11 @@ able to complete the command with a timeout error if no response arrive.
133SMW context gets scheduled and invokes nfc_shdlc_sm_work(). This function 158SMW context gets scheduled and invokes nfc_shdlc_sm_work(). This function
134handles shdlc framing in and out. It uses the driver xmit to send frames and 159handles shdlc framing in and out. It uses the driver xmit to send frames and
135receives incoming frames in an skb queue filled from the driver IRQ handler. 160receives incoming frames in an skb queue filled from the driver IRQ handler.
136SHDLC I(nformation) frames payload are HCP fragments. They are agregated to 161SHDLC I(nformation) frames payload are HCP fragments. They are aggregated to
137form complete HCI frames, which can be a response, command, or event. 162form complete HCI frames, which can be a response, command, or event.
138 163
139HCI Responses are dispatched immediately from this context to unblock 164HCI Responses are dispatched immediately from this context to unblock
140waiting command execution. Reponse processing involves invoking the completion 165waiting command execution. Response processing involves invoking the completion
141callback that was provided by nfc_hci_msg_tx_work() when it sent the command. 166callback that was provided by nfc_hci_msg_tx_work() when it sent the command.
142The completion callback will then wake the syscall context. 167The completion callback will then wake the syscall context.
143 168
diff --git a/Documentation/power/charger-manager.txt b/Documentation/power/charger-manager.txt
index fdcca991df30..b4f7f4b23f64 100644
--- a/Documentation/power/charger-manager.txt
+++ b/Documentation/power/charger-manager.txt
@@ -44,6 +44,16 @@ Charger Manager supports the following:
44 Normally, the platform will need to resume and suspend some devices 44 Normally, the platform will need to resume and suspend some devices
45 that are used by Charger Manager. 45 that are used by Charger Manager.
46 46
47* Support for premature full-battery event handling
48 If the battery voltage drops by "fullbatt_vchkdrop_uV" after
49 "fullbatt_vchkdrop_ms" from the full-battery event, the framework
50 restarts charging. This check is also performed while suspended by
51 setting wakeup time accordingly and using suspend_again.
52
53* Support for uevent-notify
54 With the charger-related events, the device sends
55 notification to users with UEVENT.
56
472. Global Charger-Manager Data related with suspend_again 572. Global Charger-Manager Data related with suspend_again
48======================================================== 58========================================================
49In order to setup Charger Manager with suspend-again feature 59In order to setup Charger Manager with suspend-again feature
@@ -55,7 +65,7 @@ if there are multiple batteries. If there are multiple batteries, the
55multiple instances of Charger Manager share the same charger_global_desc 65multiple instances of Charger Manager share the same charger_global_desc
56and it will manage in-suspend monitoring for all instances of Charger Manager. 66and it will manage in-suspend monitoring for all instances of Charger Manager.
57 67
58The user needs to provide all the two entries properly in order to activate 68The user needs to provide all the three entries properly in order to activate
59in-suspend monitoring: 69in-suspend monitoring:
60 70
61struct charger_global_desc { 71struct charger_global_desc {
@@ -74,6 +84,11 @@ bool (*rtc_only_wakeup)(void);
74 same struct. If there is any other wakeup source triggered the 84 same struct. If there is any other wakeup source triggered the
75 wakeup, it should return false. If the "rtc" is the only wakeup 85 wakeup, it should return false. If the "rtc" is the only wakeup
76 reason, it should return true. 86 reason, it should return true.
87
88bool assume_timer_stops_in_suspend;
89 : if true, Charger Manager assumes that
90 the timer (CM uses jiffies as timer) stops during suspend. Then, CM
91 assumes that the suspend-duration is same as the alarm length.
77}; 92};
78 93
793. How to setup suspend_again 943. How to setup suspend_again
@@ -111,6 +126,16 @@ enum polling_modes polling_mode;
111 CM_POLL_CHARGING_ONLY: poll this battery if and only if the 126 CM_POLL_CHARGING_ONLY: poll this battery if and only if the
112 battery is being charged. 127 battery is being charged.
113 128
129unsigned int fullbatt_vchkdrop_ms;
130unsigned int fullbatt_vchkdrop_uV;
131 : If both have non-zero values, Charger Manager will check the
132 battery voltage drop fullbatt_vchkdrop_ms after the battery is fully
133 charged. If the voltage drop is over fullbatt_vchkdrop_uV, Charger
134 Manager will try to recharge the battery by disabling and enabling
135 chargers. Recharge with voltage drop condition only (without delay
136 condition) is needed to be implemented with hardware interrupts from
137 fuel gauges or charger devices/chips.
138
114unsigned int fullbatt_uV; 139unsigned int fullbatt_uV;
115 : If specified with a non-zero value, Charger Manager assumes 140 : If specified with a non-zero value, Charger Manager assumes
116 that the battery is full (capacity = 100) if the battery is not being 141 that the battery is full (capacity = 100) if the battery is not being
@@ -122,6 +147,8 @@ unsigned int polling_interval_ms;
122 this battery every polling_interval_ms or more frequently. 147 this battery every polling_interval_ms or more frequently.
123 148
124enum data_source battery_present; 149enum data_source battery_present;
150 : CM_BATTERY_PRESENT: assume that the battery exists.
151 CM_NO_BATTERY: assume that the battery does not exists.
125 CM_FUEL_GAUGE: get battery presence information from fuel gauge. 152 CM_FUEL_GAUGE: get battery presence information from fuel gauge.
126 CM_CHARGER_STAT: get battery presence from chargers. 153 CM_CHARGER_STAT: get battery presence from chargers.
127 154
@@ -151,7 +178,17 @@ bool measure_battery_temp;
151 the value of measure_battery_temp. 178 the value of measure_battery_temp.
152}; 179};
153 180
1545. Other Considerations 1815. Notify Charger-Manager of charger events: cm_notify_event()
182=========================================================
183If there is an charger event is required to notify
184Charger Manager, a charger device driver that triggers the event can call
185cm_notify_event(psy, type, msg) to notify the corresponding Charger Manager.
186In the function, psy is the charger driver's power_supply pointer, which is
187associated with Charger-Manager. The parameter "type"
188is the same as irq's type (enum cm_event_types). The event message "msg" is
189optional and is effective only if the event type is "UNDESCRIBED" or "OTHERS".
190
1916. Other Considerations
155======================= 192=======================
156 193
157At the charger/battery-related events such as battery-pulled-out, 194At the charger/battery-related events such as battery-pulled-out,
diff --git a/Documentation/power/power_supply_class.txt b/Documentation/power/power_supply_class.txt
index 9f16c5178b66..211831d4095f 100644
--- a/Documentation/power/power_supply_class.txt
+++ b/Documentation/power/power_supply_class.txt
@@ -84,6 +84,8 @@ are already charged or discharging, 'n/a' can be displayed (or
84HEALTH - represents health of the battery, values corresponds to 84HEALTH - represents health of the battery, values corresponds to
85POWER_SUPPLY_HEALTH_*, defined in battery.h. 85POWER_SUPPLY_HEALTH_*, defined in battery.h.
86 86
87VOLTAGE_OCV - open circuit voltage of the battery.
88
87VOLTAGE_MAX_DESIGN, VOLTAGE_MIN_DESIGN - design values for maximal and 89VOLTAGE_MAX_DESIGN, VOLTAGE_MIN_DESIGN - design values for maximal and
88minimal power supply voltages. Maximal/minimal means values of voltages 90minimal power supply voltages. Maximal/minimal means values of voltages
89when battery considered "full"/"empty" at normal conditions. Yes, there is 91when battery considered "full"/"empty" at normal conditions. Yes, there is
diff --git a/Documentation/sysctl/fs.txt b/Documentation/sysctl/fs.txt
index 88fd7f5c8dcd..13d6166d7a27 100644
--- a/Documentation/sysctl/fs.txt
+++ b/Documentation/sysctl/fs.txt
@@ -225,6 +225,13 @@ a queue must be less or equal then msg_max.
225maximum message size value (it is every message queue's attribute set during 225maximum message size value (it is every message queue's attribute set during
226its creation). 226its creation).
227 227
228/proc/sys/fs/mqueue/msg_default is a read/write file for setting/getting the
229default number of messages in a queue value if attr parameter of mq_open(2) is
230NULL. If it exceed msg_max, the default value is initialized msg_max.
231
232/proc/sys/fs/mqueue/msgsize_default is a read/write file for setting/getting
233the default message size value if attr parameter of mq_open(2) is NULL. If it
234exceed msgsize_max, the default value is initialized msgsize_max.
228 235
2294. /proc/sys/fs/epoll - Configuration options for the epoll interface 2364. /proc/sys/fs/epoll - Configuration options for the epoll interface
230-------------------------------------------------------- 237--------------------------------------------------------
diff --git a/Documentation/trace/uprobetracer.txt b/Documentation/trace/uprobetracer.txt
new file mode 100644
index 000000000000..24ce6823a09e
--- /dev/null
+++ b/Documentation/trace/uprobetracer.txt
@@ -0,0 +1,113 @@
1 Uprobe-tracer: Uprobe-based Event Tracing
2 =========================================
3 Documentation written by Srikar Dronamraju
4
5Overview
6--------
7Uprobe based trace events are similar to kprobe based trace events.
8To enable this feature, build your kernel with CONFIG_UPROBE_EVENT=y.
9
10Similar to the kprobe-event tracer, this doesn't need to be activated via
11current_tracer. Instead of that, add probe points via
12/sys/kernel/debug/tracing/uprobe_events, and enable it via
13/sys/kernel/debug/tracing/events/uprobes/<EVENT>/enabled.
14
15However unlike kprobe-event tracer, the uprobe event interface expects the
16user to calculate the offset of the probepoint in the object
17
18Synopsis of uprobe_tracer
19-------------------------
20 p[:[GRP/]EVENT] PATH:SYMBOL[+offs] [FETCHARGS] : Set a probe
21
22 GRP : Group name. If omitted, use "uprobes" for it.
23 EVENT : Event name. If omitted, the event name is generated
24 based on SYMBOL+offs.
25 PATH : path to an executable or a library.
26 SYMBOL[+offs] : Symbol+offset where the probe is inserted.
27
28 FETCHARGS : Arguments. Each probe can have up to 128 args.
29 %REG : Fetch register REG
30
31Event Profiling
32---------------
33 You can check the total number of probe hits and probe miss-hits via
34/sys/kernel/debug/tracing/uprobe_profile.
35 The first column is event name, the second is the number of probe hits,
36the third is the number of probe miss-hits.
37
38Usage examples
39--------------
40To add a probe as a new event, write a new definition to uprobe_events
41as below.
42
43 echo 'p: /bin/bash:0x4245c0' > /sys/kernel/debug/tracing/uprobe_events
44
45 This sets a uprobe at an offset of 0x4245c0 in the executable /bin/bash
46
47 echo > /sys/kernel/debug/tracing/uprobe_events
48
49 This clears all probe points.
50
51The following example shows how to dump the instruction pointer and %ax
52a register at the probed text address. Here we are trying to probe
53function zfree in /bin/zsh
54
55 # cd /sys/kernel/debug/tracing/
56 # cat /proc/`pgrep zsh`/maps | grep /bin/zsh | grep r-xp
57 00400000-0048a000 r-xp 00000000 08:03 130904 /bin/zsh
58 # objdump -T /bin/zsh | grep -w zfree
59 0000000000446420 g DF .text 0000000000000012 Base zfree
60
610x46420 is the offset of zfree in object /bin/zsh that is loaded at
620x00400000. Hence the command to probe would be :
63
64 # echo 'p /bin/zsh:0x46420 %ip %ax' > uprobe_events
65
66Please note: User has to explicitly calculate the offset of the probepoint
67in the object. We can see the events that are registered by looking at the
68uprobe_events file.
69
70 # cat uprobe_events
71 p:uprobes/p_zsh_0x46420 /bin/zsh:0x00046420 arg1=%ip arg2=%ax
72
73The format of events can be seen by viewing the file events/uprobes/p_zsh_0x46420/format
74
75 # cat events/uprobes/p_zsh_0x46420/format
76 name: p_zsh_0x46420
77 ID: 922
78 format:
79 field:unsigned short common_type; offset:0; size:2; signed:0;
80 field:unsigned char common_flags; offset:2; size:1; signed:0;
81 field:unsigned char common_preempt_count; offset:3; size:1; signed:0;
82 field:int common_pid; offset:4; size:4; signed:1;
83 field:int common_padding; offset:8; size:4; signed:1;
84
85 field:unsigned long __probe_ip; offset:12; size:4; signed:0;
86 field:u32 arg1; offset:16; size:4; signed:0;
87 field:u32 arg2; offset:20; size:4; signed:0;
88
89 print fmt: "(%lx) arg1=%lx arg2=%lx", REC->__probe_ip, REC->arg1, REC->arg2
90
91Right after definition, each event is disabled by default. For tracing these
92events, you need to enable it by:
93
94 # echo 1 > events/uprobes/enable
95
96Lets disable the event after sleeping for some time.
97 # sleep 20
98 # echo 0 > events/uprobes/enable
99
100And you can see the traced information via /sys/kernel/debug/tracing/trace.
101
102 # cat trace
103 # tracer: nop
104 #
105 # TASK-PID CPU# TIMESTAMP FUNCTION
106 # | | | | |
107 zsh-24842 [006] 258544.995456: p_zsh_0x46420: (0x446420) arg1=446421 arg2=79
108 zsh-24842 [007] 258545.000270: p_zsh_0x46420: (0x446420) arg1=446421 arg2=79
109 zsh-24842 [002] 258545.043929: p_zsh_0x46420: (0x446420) arg1=446421 arg2=79
110 zsh-24842 [004] 258547.046129: p_zsh_0x46420: (0x446420) arg1=446421 arg2=79
111
112Each line shows us probes were triggered for a pid 24842 with ip being
1130x446421 and contents of ax register being 79.
diff --git a/Documentation/video4linux/4CCs.txt b/Documentation/video4linux/4CCs.txt
new file mode 100644
index 000000000000..41241af1ebfe
--- /dev/null
+++ b/Documentation/video4linux/4CCs.txt
@@ -0,0 +1,32 @@
1Guidelines for Linux4Linux pixel format 4CCs
2============================================
3
4Guidelines for Video4Linux 4CC codes defined using v4l2_fourcc() are
5specified in this document. First of the characters defines the nature of
6the pixel format, compression and colour space. The interpretation of the
7other three characters depends on the first one.
8
9Existing 4CCs may not obey these guidelines.
10
11Formats
12=======
13
14Raw bayer
15---------
16
17The following first characters are used by raw bayer formats:
18
19 B: raw bayer, uncompressed
20 b: raw bayer, DPCM compressed
21 a: A-law compressed
22 u: u-law compressed
23
242nd character: pixel order
25 B: BGGR
26 G: GBRG
27 g: GRBG
28 R: RGGB
29
303rd character: uncompressed bits-per-pixel 0--9, A--
31
324th character: compressed bits-per-pixel 0--9, A--
diff --git a/Documentation/video4linux/gspca.txt b/Documentation/video4linux/gspca.txt
index e6c2842407a4..1e6b6531bbcc 100644
--- a/Documentation/video4linux/gspca.txt
+++ b/Documentation/video4linux/gspca.txt
@@ -276,6 +276,7 @@ pac7302 093a:2622 Genius Eye 312
276pac7302 093a:2624 PAC7302 276pac7302 093a:2624 PAC7302
277pac7302 093a:2625 Genius iSlim 310 277pac7302 093a:2625 Genius iSlim 310
278pac7302 093a:2626 Labtec 2200 278pac7302 093a:2626 Labtec 2200
279pac7302 093a:2627 Genius FaceCam 300
279pac7302 093a:2628 Genius iLook 300 280pac7302 093a:2628 Genius iLook 300
280pac7302 093a:2629 Genious iSlim 300 281pac7302 093a:2629 Genious iSlim 300
281pac7302 093a:262a Webcam 300k 282pac7302 093a:262a Webcam 300k
diff --git a/Documentation/video4linux/v4l2-controls.txt b/Documentation/video4linux/v4l2-controls.txt
index e2492a9d1027..43da22b89728 100644
--- a/Documentation/video4linux/v4l2-controls.txt
+++ b/Documentation/video4linux/v4l2-controls.txt
@@ -130,8 +130,18 @@ Menu controls are added by calling v4l2_ctrl_new_std_menu:
130 const struct v4l2_ctrl_ops *ops, 130 const struct v4l2_ctrl_ops *ops,
131 u32 id, s32 max, s32 skip_mask, s32 def); 131 u32 id, s32 max, s32 skip_mask, s32 def);
132 132
133Or alternatively for integer menu controls, by calling v4l2_ctrl_new_int_menu:
134
135 struct v4l2_ctrl *v4l2_ctrl_new_int_menu(struct v4l2_ctrl_handler *hdl,
136 const struct v4l2_ctrl_ops *ops,
137 u32 id, s32 max, s32 def, const s64 *qmenu_int);
138
133These functions are typically called right after the v4l2_ctrl_handler_init: 139These functions are typically called right after the v4l2_ctrl_handler_init:
134 140
141 static const s64 exp_bias_qmenu[] = {
142 -2, -1, 0, 1, 2
143 };
144
135 v4l2_ctrl_handler_init(&foo->ctrl_handler, nr_of_controls); 145 v4l2_ctrl_handler_init(&foo->ctrl_handler, nr_of_controls);
136 v4l2_ctrl_new_std(&foo->ctrl_handler, &foo_ctrl_ops, 146 v4l2_ctrl_new_std(&foo->ctrl_handler, &foo_ctrl_ops,
137 V4L2_CID_BRIGHTNESS, 0, 255, 1, 128); 147 V4L2_CID_BRIGHTNESS, 0, 255, 1, 128);
@@ -141,6 +151,11 @@ These functions are typically called right after the v4l2_ctrl_handler_init:
141 V4L2_CID_POWER_LINE_FREQUENCY, 151 V4L2_CID_POWER_LINE_FREQUENCY,
142 V4L2_CID_POWER_LINE_FREQUENCY_60HZ, 0, 152 V4L2_CID_POWER_LINE_FREQUENCY_60HZ, 0,
143 V4L2_CID_POWER_LINE_FREQUENCY_DISABLED); 153 V4L2_CID_POWER_LINE_FREQUENCY_DISABLED);
154 v4l2_ctrl_new_int_menu(&foo->ctrl_handler, &foo_ctrl_ops,
155 V4L2_CID_EXPOSURE_BIAS,
156 ARRAY_SIZE(exp_bias_qmenu) - 1,
157 ARRAY_SIZE(exp_bias_qmenu) / 2 - 1,
158 exp_bias_qmenu);
144 ... 159 ...
145 if (foo->ctrl_handler.error) { 160 if (foo->ctrl_handler.error) {
146 int err = foo->ctrl_handler.error; 161 int err = foo->ctrl_handler.error;
@@ -164,6 +179,12 @@ controls. There is no min argument since that is always 0 for menu controls,
164and instead of a step there is a skip_mask argument: if bit X is 1, then menu 179and instead of a step there is a skip_mask argument: if bit X is 1, then menu
165item X is skipped. 180item X is skipped.
166 181
182The v4l2_ctrl_new_int_menu function creates a new standard integer menu
183control with driver-specific items in the menu. It differs from
184v4l2_ctrl_new_std_menu in that it doesn't have the mask argument and takes
185as the last argument an array of signed 64-bit integers that form an exact
186menu item list.
187
167Note that if something fails, the function will return NULL or an error and 188Note that if something fails, the function will return NULL or an error and
168set ctrl_handler->error to the error code. If ctrl_handler->error was already 189set ctrl_handler->error to the error code. If ctrl_handler->error was already
169set, then it will just return and do nothing. This is also true for 190set, then it will just return and do nothing. This is also true for
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt
index 659b2ba12a4f..1f5905270050 100644
--- a/Documentation/video4linux/v4l2-framework.txt
+++ b/Documentation/video4linux/v4l2-framework.txt
@@ -182,11 +182,11 @@ static int __devinit drv_probe(struct pci_dev *pdev,
182} 182}
183 183
184If you have multiple device nodes then it can be difficult to know when it is 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 185safe to unregister v4l2_device for hotpluggable devices. For this purpose
186support. The refcount is increased whenever video_register_device is called and 186v4l2_device has refcounting support. The refcount is increased whenever
187it is decreased whenever that device node is released. When the refcount reaches 187video_register_device is called and it is decreased whenever that device node
188zero, then the v4l2_device release() callback is called. You can do your final 188is released. When the refcount reaches zero, then the v4l2_device release()
189cleanup there. 189callback is called. You can do your final cleanup there.
190 190
191If other device nodes (e.g. ALSA) are created, then you can increase and 191If other device nodes (e.g. ALSA) are created, then you can increase and
192decrease the refcount manually as well by calling: 192decrease the refcount manually as well by calling:
@@ -197,6 +197,10 @@ or:
197 197
198int v4l2_device_put(struct v4l2_device *v4l2_dev); 198int v4l2_device_put(struct v4l2_device *v4l2_dev);
199 199
200Since the initial refcount is 1 you also need to call v4l2_device_put in the
201disconnect() callback (for USB devices) or in the remove() callback (for e.g.
202PCI devices), otherwise the refcount will never reach 0.
203
200struct v4l2_subdev 204struct v4l2_subdev
201------------------ 205------------------
202 206
@@ -262,11 +266,16 @@ struct v4l2_subdev_video_ops {
262 ... 266 ...
263}; 267};
264 268
269struct v4l2_subdev_pad_ops {
270 ...
271};
272
265struct v4l2_subdev_ops { 273struct v4l2_subdev_ops {
266 const struct v4l2_subdev_core_ops *core; 274 const struct v4l2_subdev_core_ops *core;
267 const struct v4l2_subdev_tuner_ops *tuner; 275 const struct v4l2_subdev_tuner_ops *tuner;
268 const struct v4l2_subdev_audio_ops *audio; 276 const struct v4l2_subdev_audio_ops *audio;
269 const struct v4l2_subdev_video_ops *video; 277 const struct v4l2_subdev_video_ops *video;
278 const struct v4l2_subdev_pad_ops *video;
270}; 279};
271 280
272The core ops are common to all subdevs, the other categories are implemented 281The core ops are common to all subdevs, the other categories are implemented
@@ -303,6 +312,22 @@ Don't forget to cleanup the media entity before the sub-device is destroyed:
303 312
304 media_entity_cleanup(&sd->entity); 313 media_entity_cleanup(&sd->entity);
305 314
315If the subdev driver intends to process video and integrate with the media
316framework, it must implement format related functionality using
317v4l2_subdev_pad_ops instead of v4l2_subdev_video_ops.
318
319In that case, the subdev driver may set the link_validate field to provide
320its own link validation function. The link validation function is called for
321every link in the pipeline where both of the ends of the links are V4L2
322sub-devices. The driver is still responsible for validating the correctness
323of the format configuration between sub-devices and video nodes.
324
325If link_validate op is not set, the default function
326v4l2_subdev_link_validate_default() is used instead. This function ensures
327that width, height and the media bus pixel code are equal on both source and
328sink of the link. Subdev drivers are also free to use this function to
329perform the checks mentioned above in addition to their own checks.
330
306A device (bridge) driver needs to register the v4l2_subdev with the 331A device (bridge) driver needs to register the v4l2_subdev with the
307v4l2_device: 332v4l2_device:
308 333
@@ -555,19 +580,25 @@ allocated memory.
555You should also set these fields: 580You should also set these fields:
556 581
557- v4l2_dev: set to the v4l2_device parent device. 582- v4l2_dev: set to the v4l2_device parent device.
583
558- name: set to something descriptive and unique. 584- name: set to something descriptive and unique.
585
559- fops: set to the v4l2_file_operations struct. 586- fops: set to the v4l2_file_operations struct.
587
560- ioctl_ops: if you use the v4l2_ioctl_ops to simplify ioctl maintenance 588- ioctl_ops: if you use the v4l2_ioctl_ops to simplify ioctl maintenance
561 (highly recommended to use this and it might become compulsory in the 589 (highly recommended to use this and it might become compulsory in the
562 future!), then set this to your v4l2_ioctl_ops struct. 590 future!), then set this to your v4l2_ioctl_ops struct.
591
563- lock: leave to NULL if you want to do all the locking in the driver. 592- lock: leave to NULL if you want to do all the locking in the driver.
564 Otherwise you give it a pointer to a struct mutex_lock and before any 593 Otherwise you give it a pointer to a struct mutex_lock and before the
565 of the v4l2_file_operations is called this lock will be taken by the 594 unlocked_ioctl file operation is called this lock will be taken by the
566 core and released afterwards. 595 core and released afterwards. See the next section for more details.
596
567- prio: keeps track of the priorities. Used to implement VIDIOC_G/S_PRIORITY. 597- 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. 598 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), 599 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. 600 then you can point it to your own struct v4l2_prio_state.
601
571- parent: you only set this if v4l2_device was registered with NULL as 602- parent: you only set this if v4l2_device was registered with NULL as
572 the parent device struct. This only happens in cases where one hardware 603 the parent device struct. This only happens in cases where one hardware
573 device has multiple PCI devices that all share the same v4l2_device core. 604 device has multiple PCI devices that all share the same v4l2_device core.
@@ -577,6 +608,7 @@ You should also set these fields:
577 (cx8802). Since the v4l2_device cannot be associated with a particular 608 (cx8802). Since the v4l2_device cannot be associated with a particular
578 PCI device it is setup without a parent device. But when the struct 609 PCI device it is setup without a parent device. But when the struct
579 video_device is setup you do know which parent PCI device to use. 610 video_device is setup you do know which parent PCI device to use.
611
580- flags: optional. Set to V4L2_FL_USE_FH_PRIO if you want to let the framework 612- 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 613 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 614 v4l2_fh. Eventually this flag will disappear once all drivers use the core
@@ -587,6 +619,16 @@ in your v4l2_file_operations struct.
587 619
588Do not use .ioctl! This is deprecated and will go away in the future. 620Do not use .ioctl! This is deprecated and will go away in the future.
589 621
622In some cases you want to tell the core that a function you had specified in
623your v4l2_ioctl_ops should be ignored. You can mark such ioctls by calling this
624function before video_device_register is called:
625
626void v4l2_disable_ioctl(struct video_device *vdev, unsigned int cmd);
627
628This tends to be needed if based on external factors (e.g. which card is
629being used) you want to turns off certain features in v4l2_ioctl_ops without
630having to make a new struct.
631
590The v4l2_file_operations struct is a subset of file_operations. The main 632The v4l2_file_operations struct is a subset of file_operations. The main
591difference is that the inode argument is omitted since it is never used. 633difference is that the inode argument is omitted since it is never used.
592 634
@@ -609,8 +651,22 @@ v4l2_file_operations and locking
609-------------------------------- 651--------------------------------
610 652
611You can set a pointer to a mutex_lock in struct video_device. Usually this 653You can set a pointer to a mutex_lock in struct video_device. Usually this
612will be either a top-level mutex or a mutex per device node. If you want 654will be either a top-level mutex or a mutex per device node. By default this
613finer-grained locking then you have to set it to NULL and do you own locking. 655lock will be used for unlocked_ioctl, but you can disable locking for
656selected ioctls by calling:
657
658 void v4l2_disable_ioctl_locking(struct video_device *vdev, unsigned int cmd);
659
660E.g.: v4l2_disable_ioctl_locking(vdev, VIDIOC_DQBUF);
661
662You have to call this before you register the video_device.
663
664Particularly with USB drivers where certain commands such as setting controls
665can take a long time you may want to do your own locking for the buffer queuing
666ioctls.
667
668If you want still finer-grained locking then you have to set mutex_lock to NULL
669and do you own locking completely.
614 670
615It is up to the driver developer to decide which method to use. However, if 671It is up to the driver developer to decide which method to use. However, if
616your driver has high-latency operations (for example, changing the exposure 672your driver has high-latency operations (for example, changing the exposure
@@ -618,7 +674,7 @@ of a USB webcam might take a long time), then you might be better off with
618doing your own locking if you want to allow the user to do other things with 674doing your own locking if you want to allow the user to do other things with
619the device while waiting for the high-latency command to finish. 675the device while waiting for the high-latency command to finish.
620 676
621If a lock is specified then all file operations will be serialized on that 677If a lock is specified then all ioctl commands will be serialized on that
622lock. If you use videobuf then you must pass the same lock to the videobuf 678lock. If you use videobuf then you must pass the same lock to the videobuf
623queue initialize function: if videobuf has to wait for a frame to arrive, then 679queue initialize function: if videobuf has to wait for a frame to arrive, then
624it will temporarily unlock the lock and relock it afterwards. If your driver 680it will temporarily unlock the lock and relock it afterwards. If your driver
@@ -941,21 +997,35 @@ fast.
941 997
942Useful functions: 998Useful functions:
943 999
944- v4l2_event_queue() 1000void v4l2_event_queue(struct video_device *vdev, const struct v4l2_event *ev)
945 1001
946 Queue events to video device. The driver's only responsibility is to fill 1002 Queue events to video device. The driver's only responsibility is to fill
947 in the type and the data fields. The other fields will be filled in by 1003 in the type and the data fields. The other fields will be filled in by
948 V4L2. 1004 V4L2.
949 1005
950- v4l2_event_subscribe() 1006int v4l2_event_subscribe(struct v4l2_fh *fh,
1007 struct v4l2_event_subscription *sub, unsigned elems,
1008 const struct v4l2_subscribed_event_ops *ops)
951 1009
952 The video_device->ioctl_ops->vidioc_subscribe_event must check the driver 1010 The video_device->ioctl_ops->vidioc_subscribe_event must check the driver
953 is able to produce events with specified event id. Then it calls 1011 is able to produce events with specified event id. Then it calls
954 v4l2_event_subscribe() to subscribe the event. The last argument is the 1012 v4l2_event_subscribe() to subscribe the event.
955 size of the event queue for this event. If it is 0, then the framework 1013
956 will fill in a default value (this depends on the event type). 1014 The elems argument is the size of the event queue for this event. If it is 0,
1015 then the framework will fill in a default value (this depends on the event
1016 type).
1017
1018 The ops argument allows the driver to specify a number of callbacks:
1019 * add: called when a new listener gets added (subscribing to the same
1020 event twice will only cause this callback to get called once)
1021 * del: called when a listener stops listening
1022 * replace: replace event 'old' with event 'new'.
1023 * merge: merge event 'old' into event 'new'.
1024 All 4 callbacks are optional, if you don't want to specify any callbacks
1025 the ops argument itself maybe NULL.
957 1026
958- v4l2_event_unsubscribe() 1027int v4l2_event_unsubscribe(struct v4l2_fh *fh,
1028 struct v4l2_event_subscription *sub)
959 1029
960 vidioc_unsubscribe_event in struct v4l2_ioctl_ops. A driver may use 1030 vidioc_unsubscribe_event in struct v4l2_ioctl_ops. A driver may use
961 v4l2_event_unsubscribe() directly unless it wants to be involved in 1031 v4l2_event_unsubscribe() directly unless it wants to be involved in
@@ -964,7 +1034,7 @@ Useful functions:
964 The special type V4L2_EVENT_ALL may be used to unsubscribe all events. The 1034 The special type V4L2_EVENT_ALL may be used to unsubscribe all events. The
965 drivers may want to handle this in a special way. 1035 drivers may want to handle this in a special way.
966 1036
967- v4l2_event_pending() 1037int v4l2_event_pending(struct v4l2_fh *fh)
968 1038
969 Returns the number of pending events. Useful when implementing poll. 1039 Returns the number of pending events. Useful when implementing poll.
970 1040
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index 6386f8c0482e..930126698a0f 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -2,6 +2,7 @@ The Definitive KVM (Kernel-based Virtual Machine) API Documentation
2=================================================================== 2===================================================================
3 3
41. General description 41. General description
5----------------------
5 6
6The kvm API is a set of ioctls that are issued to control various aspects 7The kvm API is a set of ioctls that are issued to control various aspects
7of a virtual machine. The ioctls belong to three classes 8of a virtual machine. The ioctls belong to three classes
@@ -23,7 +24,9 @@ of a virtual machine. The ioctls belong to three classes
23 Only run vcpu ioctls from the same thread that was used to create the 24 Only run vcpu ioctls from the same thread that was used to create the
24 vcpu. 25 vcpu.
25 26
27
262. File descriptors 282. File descriptors
29-------------------
27 30
28The kvm API is centered around file descriptors. An initial 31The kvm API is centered around file descriptors. An initial
29open("/dev/kvm") obtains a handle to the kvm subsystem; this handle 32open("/dev/kvm") obtains a handle to the kvm subsystem; this handle
@@ -41,7 +44,9 @@ not cause harm to the host, their actual behavior is not guaranteed by
41the API. The only supported use is one virtual machine per process, 44the API. The only supported use is one virtual machine per process,
42and one vcpu per thread. 45and one vcpu per thread.
43 46
47
443. Extensions 483. Extensions
49-------------
45 50
46As of Linux 2.6.22, the KVM ABI has been stabilized: no backward 51As of Linux 2.6.22, the KVM ABI has been stabilized: no backward
47incompatible change are allowed. However, there is an extension 52incompatible change are allowed. However, there is an extension
@@ -53,7 +58,9 @@ Instead, kvm defines extension identifiers and a facility to query
53whether a particular extension identifier is available. If it is, a 58whether a particular extension identifier is available. If it is, a
54set of ioctls is available for application use. 59set of ioctls is available for application use.
55 60
61
564. API description 624. API description
63------------------
57 64
58This section describes ioctls that can be used to control kvm guests. 65This section describes ioctls that can be used to control kvm guests.
59For each ioctl, the following information is provided along with a 66For each ioctl, the following information is provided along with a
@@ -75,6 +82,7 @@ description:
75 Returns: the return value. General error numbers (EBADF, ENOMEM, EINVAL) 82 Returns: the return value. General error numbers (EBADF, ENOMEM, EINVAL)
76 are not detailed, but errors with specific meanings are. 83 are not detailed, but errors with specific meanings are.
77 84
85
784.1 KVM_GET_API_VERSION 864.1 KVM_GET_API_VERSION
79 87
80Capability: basic 88Capability: basic
@@ -90,6 +98,7 @@ supported. Applications should refuse to run if KVM_GET_API_VERSION
90returns a value other than 12. If this check passes, all ioctls 98returns a value other than 12. If this check passes, all ioctls
91described as 'basic' will be available. 99described as 'basic' will be available.
92 100
101
934.2 KVM_CREATE_VM 1024.2 KVM_CREATE_VM
94 103
95Capability: basic 104Capability: basic
@@ -109,6 +118,7 @@ In order to create user controlled virtual machines on S390, check
109KVM_CAP_S390_UCONTROL and use the flag KVM_VM_S390_UCONTROL as 118KVM_CAP_S390_UCONTROL and use the flag KVM_VM_S390_UCONTROL as
110privileged user (CAP_SYS_ADMIN). 119privileged user (CAP_SYS_ADMIN).
111 120
121
1124.3 KVM_GET_MSR_INDEX_LIST 1224.3 KVM_GET_MSR_INDEX_LIST
113 123
114Capability: basic 124Capability: basic
@@ -135,6 +145,7 @@ Note: if kvm indicates supports MCE (KVM_CAP_MCE), then the MCE bank MSRs are
135not returned in the MSR list, as different vcpus can have a different number 145not returned in the MSR list, as different vcpus can have a different number
136of banks, as set via the KVM_X86_SETUP_MCE ioctl. 146of banks, as set via the KVM_X86_SETUP_MCE ioctl.
137 147
148
1384.4 KVM_CHECK_EXTENSION 1494.4 KVM_CHECK_EXTENSION
139 150
140Capability: basic 151Capability: basic
@@ -149,6 +160,7 @@ receives an integer that describes the extension availability.
149Generally 0 means no and 1 means yes, but some extensions may report 160Generally 0 means no and 1 means yes, but some extensions may report
150additional information in the integer return value. 161additional information in the integer return value.
151 162
163
1524.5 KVM_GET_VCPU_MMAP_SIZE 1644.5 KVM_GET_VCPU_MMAP_SIZE
153 165
154Capability: basic 166Capability: basic
@@ -161,6 +173,7 @@ The KVM_RUN ioctl (cf.) communicates with userspace via a shared
161memory region. This ioctl returns the size of that region. See the 173memory region. This ioctl returns the size of that region. See the
162KVM_RUN documentation for details. 174KVM_RUN documentation for details.
163 175
176
1644.6 KVM_SET_MEMORY_REGION 1774.6 KVM_SET_MEMORY_REGION
165 178
166Capability: basic 179Capability: basic
@@ -171,6 +184,7 @@ Returns: 0 on success, -1 on error
171 184
172This ioctl is obsolete and has been removed. 185This ioctl is obsolete and has been removed.
173 186
187
1744.7 KVM_CREATE_VCPU 1884.7 KVM_CREATE_VCPU
175 189
176Capability: basic 190Capability: basic
@@ -223,6 +237,7 @@ machines, the resulting vcpu fd can be memory mapped at page offset
223KVM_S390_SIE_PAGE_OFFSET in order to obtain a memory map of the virtual 237KVM_S390_SIE_PAGE_OFFSET in order to obtain a memory map of the virtual
224cpu's hardware control block. 238cpu's hardware control block.
225 239
240
2264.8 KVM_GET_DIRTY_LOG (vm ioctl) 2414.8 KVM_GET_DIRTY_LOG (vm ioctl)
227 242
228Capability: basic 243Capability: basic
@@ -246,6 +261,7 @@ since the last call to this ioctl. Bit 0 is the first page in the
246memory slot. Ensure the entire structure is cleared to avoid padding 261memory slot. Ensure the entire structure is cleared to avoid padding
247issues. 262issues.
248 263
264
2494.9 KVM_SET_MEMORY_ALIAS 2654.9 KVM_SET_MEMORY_ALIAS
250 266
251Capability: basic 267Capability: basic
@@ -256,6 +272,7 @@ Returns: 0 (success), -1 (error)
256 272
257This ioctl is obsolete and has been removed. 273This ioctl is obsolete and has been removed.
258 274
275
2594.10 KVM_RUN 2764.10 KVM_RUN
260 277
261Capability: basic 278Capability: basic
@@ -272,6 +289,7 @@ obtained by mmap()ing the vcpu fd at offset 0, with the size given by
272KVM_GET_VCPU_MMAP_SIZE. The parameter block is formatted as a 'struct 289KVM_GET_VCPU_MMAP_SIZE. The parameter block is formatted as a 'struct
273kvm_run' (see below). 290kvm_run' (see below).
274 291
292
2754.11 KVM_GET_REGS 2934.11 KVM_GET_REGS
276 294
277Capability: basic 295Capability: basic
@@ -292,6 +310,7 @@ struct kvm_regs {
292 __u64 rip, rflags; 310 __u64 rip, rflags;
293}; 311};
294 312
313
2954.12 KVM_SET_REGS 3144.12 KVM_SET_REGS
296 315
297Capability: basic 316Capability: basic
@@ -304,6 +323,7 @@ Writes the general purpose registers into the vcpu.
304 323
305See KVM_GET_REGS for the data structure. 324See KVM_GET_REGS for the data structure.
306 325
326
3074.13 KVM_GET_SREGS 3274.13 KVM_GET_SREGS
308 328
309Capability: basic 329Capability: basic
@@ -331,6 +351,7 @@ interrupt_bitmap is a bitmap of pending external interrupts. At most
331one bit may be set. This interrupt has been acknowledged by the APIC 351one bit may be set. This interrupt has been acknowledged by the APIC
332but not yet injected into the cpu core. 352but not yet injected into the cpu core.
333 353
354
3344.14 KVM_SET_SREGS 3554.14 KVM_SET_SREGS
335 356
336Capability: basic 357Capability: basic
@@ -342,6 +363,7 @@ Returns: 0 on success, -1 on error
342Writes special registers into the vcpu. See KVM_GET_SREGS for the 363Writes special registers into the vcpu. See KVM_GET_SREGS for the
343data structures. 364data structures.
344 365
366
3454.15 KVM_TRANSLATE 3674.15 KVM_TRANSLATE
346 368
347Capability: basic 369Capability: basic
@@ -365,6 +387,7 @@ struct kvm_translation {
365 __u8 pad[5]; 387 __u8 pad[5];
366}; 388};
367 389
390
3684.16 KVM_INTERRUPT 3914.16 KVM_INTERRUPT
369 392
370Capability: basic 393Capability: basic
@@ -413,6 +436,7 @@ c) KVM_INTERRUPT_SET_LEVEL
413Note that any value for 'irq' other than the ones stated above is invalid 436Note that any value for 'irq' other than the ones stated above is invalid
414and incurs unexpected behavior. 437and incurs unexpected behavior.
415 438
439
4164.17 KVM_DEBUG_GUEST 4404.17 KVM_DEBUG_GUEST
417 441
418Capability: basic 442Capability: basic
@@ -423,6 +447,7 @@ Returns: -1 on error
423 447
424Support for this has been removed. Use KVM_SET_GUEST_DEBUG instead. 448Support for this has been removed. Use KVM_SET_GUEST_DEBUG instead.
425 449
450
4264.18 KVM_GET_MSRS 4514.18 KVM_GET_MSRS
427 452
428Capability: basic 453Capability: basic
@@ -451,6 +476,7 @@ Application code should set the 'nmsrs' member (which indicates the
451size of the entries array) and the 'index' member of each array entry. 476size of the entries array) and the 'index' member of each array entry.
452kvm will fill in the 'data' member. 477kvm will fill in the 'data' member.
453 478
479
4544.19 KVM_SET_MSRS 4804.19 KVM_SET_MSRS
455 481
456Capability: basic 482Capability: basic
@@ -466,6 +492,7 @@ Application code should set the 'nmsrs' member (which indicates the
466size of the entries array), and the 'index' and 'data' members of each 492size of the entries array), and the 'index' and 'data' members of each
467array entry. 493array entry.
468 494
495
4694.20 KVM_SET_CPUID 4964.20 KVM_SET_CPUID
470 497
471Capability: basic 498Capability: basic
@@ -494,6 +521,7 @@ struct kvm_cpuid {
494 struct kvm_cpuid_entry entries[0]; 521 struct kvm_cpuid_entry entries[0];
495}; 522};
496 523
524
4974.21 KVM_SET_SIGNAL_MASK 5254.21 KVM_SET_SIGNAL_MASK
498 526
499Capability: basic 527Capability: basic
@@ -516,6 +544,7 @@ struct kvm_signal_mask {
516 __u8 sigset[0]; 544 __u8 sigset[0];
517}; 545};
518 546
547
5194.22 KVM_GET_FPU 5484.22 KVM_GET_FPU
520 549
521Capability: basic 550Capability: basic
@@ -541,6 +570,7 @@ struct kvm_fpu {
541 __u32 pad2; 570 __u32 pad2;
542}; 571};
543 572
573
5444.23 KVM_SET_FPU 5744.23 KVM_SET_FPU
545 575
546Capability: basic 576Capability: basic
@@ -566,6 +596,7 @@ struct kvm_fpu {
566 __u32 pad2; 596 __u32 pad2;
567}; 597};
568 598
599
5694.24 KVM_CREATE_IRQCHIP 6004.24 KVM_CREATE_IRQCHIP
570 601
571Capability: KVM_CAP_IRQCHIP 602Capability: KVM_CAP_IRQCHIP
@@ -579,6 +610,7 @@ ioapic, a virtual PIC (two PICs, nested), and sets up future vcpus to have a
579local APIC. IRQ routing for GSIs 0-15 is set to both PIC and IOAPIC; GSI 16-23 610local APIC. IRQ routing for GSIs 0-15 is set to both PIC and IOAPIC; GSI 16-23
580only go to the IOAPIC. On ia64, a IOSAPIC is created. 611only go to the IOAPIC. On ia64, a IOSAPIC is created.
581 612
613
5824.25 KVM_IRQ_LINE 6144.25 KVM_IRQ_LINE
583 615
584Capability: KVM_CAP_IRQCHIP 616Capability: KVM_CAP_IRQCHIP
@@ -600,6 +632,7 @@ struct kvm_irq_level {
600 __u32 level; /* 0 or 1 */ 632 __u32 level; /* 0 or 1 */
601}; 633};
602 634
635
6034.26 KVM_GET_IRQCHIP 6364.26 KVM_GET_IRQCHIP
604 637
605Capability: KVM_CAP_IRQCHIP 638Capability: KVM_CAP_IRQCHIP
@@ -621,6 +654,7 @@ struct kvm_irqchip {
621 } chip; 654 } chip;
622}; 655};
623 656
657
6244.27 KVM_SET_IRQCHIP 6584.27 KVM_SET_IRQCHIP
625 659
626Capability: KVM_CAP_IRQCHIP 660Capability: KVM_CAP_IRQCHIP
@@ -642,6 +676,7 @@ struct kvm_irqchip {
642 } chip; 676 } chip;
643}; 677};
644 678
679
6454.28 KVM_XEN_HVM_CONFIG 6804.28 KVM_XEN_HVM_CONFIG
646 681
647Capability: KVM_CAP_XEN_HVM 682Capability: KVM_CAP_XEN_HVM
@@ -666,6 +701,7 @@ struct kvm_xen_hvm_config {
666 __u8 pad2[30]; 701 __u8 pad2[30];
667}; 702};
668 703
704
6694.29 KVM_GET_CLOCK 7054.29 KVM_GET_CLOCK
670 706
671Capability: KVM_CAP_ADJUST_CLOCK 707Capability: KVM_CAP_ADJUST_CLOCK
@@ -684,6 +720,7 @@ struct kvm_clock_data {
684 __u32 pad[9]; 720 __u32 pad[9];
685}; 721};
686 722
723
6874.30 KVM_SET_CLOCK 7244.30 KVM_SET_CLOCK
688 725
689Capability: KVM_CAP_ADJUST_CLOCK 726Capability: KVM_CAP_ADJUST_CLOCK
@@ -702,6 +739,7 @@ struct kvm_clock_data {
702 __u32 pad[9]; 739 __u32 pad[9];
703}; 740};
704 741
742
7054.31 KVM_GET_VCPU_EVENTS 7434.31 KVM_GET_VCPU_EVENTS
706 744
707Capability: KVM_CAP_VCPU_EVENTS 745Capability: KVM_CAP_VCPU_EVENTS
@@ -741,6 +779,7 @@ struct kvm_vcpu_events {
741KVM_VCPUEVENT_VALID_SHADOW may be set in the flags field to signal that 779KVM_VCPUEVENT_VALID_SHADOW may be set in the flags field to signal that
742interrupt.shadow contains a valid state. Otherwise, this field is undefined. 780interrupt.shadow contains a valid state. Otherwise, this field is undefined.
743 781
782
7444.32 KVM_SET_VCPU_EVENTS 7834.32 KVM_SET_VCPU_EVENTS
745 784
746Capability: KVM_CAP_VCPU_EVENTS 785Capability: KVM_CAP_VCPU_EVENTS
@@ -767,6 +806,7 @@ If KVM_CAP_INTR_SHADOW is available, KVM_VCPUEVENT_VALID_SHADOW can be set in
767the flags field to signal that interrupt.shadow contains a valid state and 806the flags field to signal that interrupt.shadow contains a valid state and
768shall be written into the VCPU. 807shall be written into the VCPU.
769 808
809
7704.33 KVM_GET_DEBUGREGS 8104.33 KVM_GET_DEBUGREGS
771 811
772Capability: KVM_CAP_DEBUGREGS 812Capability: KVM_CAP_DEBUGREGS
@@ -785,6 +825,7 @@ struct kvm_debugregs {
785 __u64 reserved[9]; 825 __u64 reserved[9];
786}; 826};
787 827
828
7884.34 KVM_SET_DEBUGREGS 8294.34 KVM_SET_DEBUGREGS
789 830
790Capability: KVM_CAP_DEBUGREGS 831Capability: KVM_CAP_DEBUGREGS
@@ -798,6 +839,7 @@ Writes debug registers into the vcpu.
798See KVM_GET_DEBUGREGS for the data structure. The flags field is unused 839See KVM_GET_DEBUGREGS for the data structure. The flags field is unused
799yet and must be cleared on entry. 840yet and must be cleared on entry.
800 841
842
8014.35 KVM_SET_USER_MEMORY_REGION 8434.35 KVM_SET_USER_MEMORY_REGION
802 844
803Capability: KVM_CAP_USER_MEM 845Capability: KVM_CAP_USER_MEM
@@ -844,6 +886,7 @@ It is recommended to use this API instead of the KVM_SET_MEMORY_REGION ioctl.
844The KVM_SET_MEMORY_REGION does not allow fine grained control over memory 886The KVM_SET_MEMORY_REGION does not allow fine grained control over memory
845allocation and is deprecated. 887allocation and is deprecated.
846 888
889
8474.36 KVM_SET_TSS_ADDR 8904.36 KVM_SET_TSS_ADDR
848 891
849Capability: KVM_CAP_SET_TSS_ADDR 892Capability: KVM_CAP_SET_TSS_ADDR
@@ -862,6 +905,7 @@ This ioctl is required on Intel-based hosts. This is needed on Intel hardware
862because of a quirk in the virtualization implementation (see the internals 905because of a quirk in the virtualization implementation (see the internals
863documentation when it pops into existence). 906documentation when it pops into existence).
864 907
908
8654.37 KVM_ENABLE_CAP 9094.37 KVM_ENABLE_CAP
866 910
867Capability: KVM_CAP_ENABLE_CAP 911Capability: KVM_CAP_ENABLE_CAP
@@ -897,6 +941,7 @@ function properly, this is the place to put them.
897 __u8 pad[64]; 941 __u8 pad[64];
898}; 942};
899 943
944
9004.38 KVM_GET_MP_STATE 9454.38 KVM_GET_MP_STATE
901 946
902Capability: KVM_CAP_MP_STATE 947Capability: KVM_CAP_MP_STATE
@@ -927,6 +972,7 @@ Possible values are:
927This ioctl is only useful after KVM_CREATE_IRQCHIP. Without an in-kernel 972This ioctl is only useful after KVM_CREATE_IRQCHIP. Without an in-kernel
928irqchip, the multiprocessing state must be maintained by userspace. 973irqchip, the multiprocessing state must be maintained by userspace.
929 974
975
9304.39 KVM_SET_MP_STATE 9764.39 KVM_SET_MP_STATE
931 977
932Capability: KVM_CAP_MP_STATE 978Capability: KVM_CAP_MP_STATE
@@ -941,6 +987,7 @@ arguments.
941This ioctl is only useful after KVM_CREATE_IRQCHIP. Without an in-kernel 987This ioctl is only useful after KVM_CREATE_IRQCHIP. Without an in-kernel
942irqchip, the multiprocessing state must be maintained by userspace. 988irqchip, the multiprocessing state must be maintained by userspace.
943 989
990
9444.40 KVM_SET_IDENTITY_MAP_ADDR 9914.40 KVM_SET_IDENTITY_MAP_ADDR
945 992
946Capability: KVM_CAP_SET_IDENTITY_MAP_ADDR 993Capability: KVM_CAP_SET_IDENTITY_MAP_ADDR
@@ -959,6 +1006,7 @@ This ioctl is required on Intel-based hosts. This is needed on Intel hardware
959because of a quirk in the virtualization implementation (see the internals 1006because of a quirk in the virtualization implementation (see the internals
960documentation when it pops into existence). 1007documentation when it pops into existence).
961 1008
1009
9624.41 KVM_SET_BOOT_CPU_ID 10104.41 KVM_SET_BOOT_CPU_ID
963 1011
964Capability: KVM_CAP_SET_BOOT_CPU_ID 1012Capability: KVM_CAP_SET_BOOT_CPU_ID
@@ -971,6 +1019,7 @@ Define which vcpu is the Bootstrap Processor (BSP). Values are the same
971as the vcpu id in KVM_CREATE_VCPU. If this ioctl is not called, the default 1019as the vcpu id in KVM_CREATE_VCPU. If this ioctl is not called, the default
972is vcpu 0. 1020is vcpu 0.
973 1021
1022
9744.42 KVM_GET_XSAVE 10234.42 KVM_GET_XSAVE
975 1024
976Capability: KVM_CAP_XSAVE 1025Capability: KVM_CAP_XSAVE
@@ -985,6 +1034,7 @@ struct kvm_xsave {
985 1034
986This ioctl would copy current vcpu's xsave struct to the userspace. 1035This ioctl would copy current vcpu's xsave struct to the userspace.
987 1036
1037
9884.43 KVM_SET_XSAVE 10384.43 KVM_SET_XSAVE
989 1039
990Capability: KVM_CAP_XSAVE 1040Capability: KVM_CAP_XSAVE
@@ -999,6 +1049,7 @@ struct kvm_xsave {
999 1049
1000This ioctl would copy userspace's xsave struct to the kernel. 1050This ioctl would copy userspace's xsave struct to the kernel.
1001 1051
1052
10024.44 KVM_GET_XCRS 10534.44 KVM_GET_XCRS
1003 1054
1004Capability: KVM_CAP_XCRS 1055Capability: KVM_CAP_XCRS
@@ -1022,6 +1073,7 @@ struct kvm_xcrs {
1022 1073
1023This ioctl would copy current vcpu's xcrs to the userspace. 1074This ioctl would copy current vcpu's xcrs to the userspace.
1024 1075
1076
10254.45 KVM_SET_XCRS 10774.45 KVM_SET_XCRS
1026 1078
1027Capability: KVM_CAP_XCRS 1079Capability: KVM_CAP_XCRS
@@ -1045,6 +1097,7 @@ struct kvm_xcrs {
1045 1097
1046This ioctl would set vcpu's xcr to the value userspace specified. 1098This ioctl would set vcpu's xcr to the value userspace specified.
1047 1099
1100
10484.46 KVM_GET_SUPPORTED_CPUID 11014.46 KVM_GET_SUPPORTED_CPUID
1049 1102
1050Capability: KVM_CAP_EXT_CPUID 1103Capability: KVM_CAP_EXT_CPUID
@@ -1119,6 +1172,7 @@ support. Instead it is reported via
1119if that returns true and you use KVM_CREATE_IRQCHIP, or if you emulate the 1172if that returns true and you use KVM_CREATE_IRQCHIP, or if you emulate the
1120feature in userspace, then you can enable the feature for KVM_SET_CPUID2. 1173feature in userspace, then you can enable the feature for KVM_SET_CPUID2.
1121 1174
1175
11224.47 KVM_PPC_GET_PVINFO 11764.47 KVM_PPC_GET_PVINFO
1123 1177
1124Capability: KVM_CAP_PPC_GET_PVINFO 1178Capability: KVM_CAP_PPC_GET_PVINFO
@@ -1142,6 +1196,7 @@ of 4 instructions that make up a hypercall.
1142If any additional field gets added to this structure later on, a bit for that 1196If any additional field gets added to this structure later on, a bit for that
1143additional piece of information will be set in the flags bitmap. 1197additional piece of information will be set in the flags bitmap.
1144 1198
1199
11454.48 KVM_ASSIGN_PCI_DEVICE 12004.48 KVM_ASSIGN_PCI_DEVICE
1146 1201
1147Capability: KVM_CAP_DEVICE_ASSIGNMENT 1202Capability: KVM_CAP_DEVICE_ASSIGNMENT
@@ -1185,6 +1240,7 @@ Only PCI header type 0 devices with PCI BAR resources are supported by
1185device assignment. The user requesting this ioctl must have read/write 1240device assignment. The user requesting this ioctl must have read/write
1186access to the PCI sysfs resource files associated with the device. 1241access to the PCI sysfs resource files associated with the device.
1187 1242
1243
11884.49 KVM_DEASSIGN_PCI_DEVICE 12444.49 KVM_DEASSIGN_PCI_DEVICE
1189 1245
1190Capability: KVM_CAP_DEVICE_DEASSIGNMENT 1246Capability: KVM_CAP_DEVICE_DEASSIGNMENT
@@ -1198,6 +1254,7 @@ Ends PCI device assignment, releasing all associated resources.
1198See KVM_CAP_DEVICE_ASSIGNMENT for the data structure. Only assigned_dev_id is 1254See KVM_CAP_DEVICE_ASSIGNMENT for the data structure. Only assigned_dev_id is
1199used in kvm_assigned_pci_dev to identify the device. 1255used in kvm_assigned_pci_dev to identify the device.
1200 1256
1257
12014.50 KVM_ASSIGN_DEV_IRQ 12584.50 KVM_ASSIGN_DEV_IRQ
1202 1259
1203Capability: KVM_CAP_ASSIGN_DEV_IRQ 1260Capability: KVM_CAP_ASSIGN_DEV_IRQ
@@ -1231,6 +1288,7 @@ The following flags are defined:
1231It is not valid to specify multiple types per host or guest IRQ. However, the 1288It is not valid to specify multiple types per host or guest IRQ. However, the
1232IRQ type of host and guest can differ or can even be null. 1289IRQ type of host and guest can differ or can even be null.
1233 1290
1291
12344.51 KVM_DEASSIGN_DEV_IRQ 12924.51 KVM_DEASSIGN_DEV_IRQ
1235 1293
1236Capability: KVM_CAP_ASSIGN_DEV_IRQ 1294Capability: KVM_CAP_ASSIGN_DEV_IRQ
@@ -1245,6 +1303,7 @@ See KVM_ASSIGN_DEV_IRQ for the data structure. The target device is specified
1245by assigned_dev_id, flags must correspond to the IRQ type specified on 1303by assigned_dev_id, flags must correspond to the IRQ type specified on
1246KVM_ASSIGN_DEV_IRQ. Partial deassignment of host or guest IRQ is allowed. 1304KVM_ASSIGN_DEV_IRQ. Partial deassignment of host or guest IRQ is allowed.
1247 1305
1306
12484.52 KVM_SET_GSI_ROUTING 13074.52 KVM_SET_GSI_ROUTING
1249 1308
1250Capability: KVM_CAP_IRQ_ROUTING 1309Capability: KVM_CAP_IRQ_ROUTING
@@ -1293,6 +1352,7 @@ struct kvm_irq_routing_msi {
1293 __u32 pad; 1352 __u32 pad;
1294}; 1353};
1295 1354
1355
12964.53 KVM_ASSIGN_SET_MSIX_NR 13564.53 KVM_ASSIGN_SET_MSIX_NR
1297 1357
1298Capability: KVM_CAP_DEVICE_MSIX 1358Capability: KVM_CAP_DEVICE_MSIX
@@ -1314,6 +1374,7 @@ struct kvm_assigned_msix_nr {
1314 1374
1315#define KVM_MAX_MSIX_PER_DEV 256 1375#define KVM_MAX_MSIX_PER_DEV 256
1316 1376
1377
13174.54 KVM_ASSIGN_SET_MSIX_ENTRY 13784.54 KVM_ASSIGN_SET_MSIX_ENTRY
1318 1379
1319Capability: KVM_CAP_DEVICE_MSIX 1380Capability: KVM_CAP_DEVICE_MSIX
@@ -1332,7 +1393,8 @@ struct kvm_assigned_msix_entry {
1332 __u16 padding[3]; 1393 __u16 padding[3];
1333}; 1394};
1334 1395
13354.54 KVM_SET_TSC_KHZ 1396
13974.55 KVM_SET_TSC_KHZ
1336 1398
1337Capability: KVM_CAP_TSC_CONTROL 1399Capability: KVM_CAP_TSC_CONTROL
1338Architectures: x86 1400Architectures: x86
@@ -1343,7 +1405,8 @@ Returns: 0 on success, -1 on error
1343Specifies the tsc frequency for the virtual machine. The unit of the 1405Specifies the tsc frequency for the virtual machine. The unit of the
1344frequency is KHz. 1406frequency is KHz.
1345 1407
13464.55 KVM_GET_TSC_KHZ 1408
14094.56 KVM_GET_TSC_KHZ
1347 1410
1348Capability: KVM_CAP_GET_TSC_KHZ 1411Capability: KVM_CAP_GET_TSC_KHZ
1349Architectures: x86 1412Architectures: x86
@@ -1355,7 +1418,8 @@ Returns the tsc frequency of the guest. The unit of the return value is
1355KHz. If the host has unstable tsc this ioctl returns -EIO instead as an 1418KHz. If the host has unstable tsc this ioctl returns -EIO instead as an
1356error. 1419error.
1357 1420
13584.56 KVM_GET_LAPIC 1421
14224.57 KVM_GET_LAPIC
1359 1423
1360Capability: KVM_CAP_IRQCHIP 1424Capability: KVM_CAP_IRQCHIP
1361Architectures: x86 1425Architectures: x86
@@ -1371,7 +1435,8 @@ struct kvm_lapic_state {
1371Reads the Local APIC registers and copies them into the input argument. The 1435Reads the Local APIC registers and copies them into the input argument. The
1372data format and layout are the same as documented in the architecture manual. 1436data format and layout are the same as documented in the architecture manual.
1373 1437
13744.57 KVM_SET_LAPIC 1438
14394.58 KVM_SET_LAPIC
1375 1440
1376Capability: KVM_CAP_IRQCHIP 1441Capability: KVM_CAP_IRQCHIP
1377Architectures: x86 1442Architectures: x86
@@ -1387,7 +1452,8 @@ struct kvm_lapic_state {
1387Copies the input argument into the the Local APIC registers. The data format 1452Copies the input argument into the the Local APIC registers. The data format
1388and layout are the same as documented in the architecture manual. 1453and layout are the same as documented in the architecture manual.
1389 1454
13904.58 KVM_IOEVENTFD 1455
14564.59 KVM_IOEVENTFD
1391 1457
1392Capability: KVM_CAP_IOEVENTFD 1458Capability: KVM_CAP_IOEVENTFD
1393Architectures: all 1459Architectures: all
@@ -1417,7 +1483,8 @@ The following flags are defined:
1417If datamatch flag is set, the event will be signaled only if the written value 1483If datamatch flag is set, the event will be signaled only if the written value
1418to the registered address is equal to datamatch in struct kvm_ioeventfd. 1484to the registered address is equal to datamatch in struct kvm_ioeventfd.
1419 1485
14204.59 KVM_DIRTY_TLB 1486
14874.60 KVM_DIRTY_TLB
1421 1488
1422Capability: KVM_CAP_SW_TLB 1489Capability: KVM_CAP_SW_TLB
1423Architectures: ppc 1490Architectures: ppc
@@ -1449,7 +1516,8 @@ The "num_dirty" field is a performance hint for KVM to determine whether it
1449should skip processing the bitmap and just invalidate everything. It must 1516should skip processing the bitmap and just invalidate everything. It must
1450be set to the number of set bits in the bitmap. 1517be set to the number of set bits in the bitmap.
1451 1518
14524.60 KVM_ASSIGN_SET_INTX_MASK 1519
15204.61 KVM_ASSIGN_SET_INTX_MASK
1453 1521
1454Capability: KVM_CAP_PCI_2_3 1522Capability: KVM_CAP_PCI_2_3
1455Architectures: x86 1523Architectures: x86
@@ -1482,6 +1550,7 @@ See KVM_ASSIGN_DEV_IRQ for the data structure. The target device is specified
1482by assigned_dev_id. In the flags field, only KVM_DEV_ASSIGN_MASK_INTX is 1550by assigned_dev_id. In the flags field, only KVM_DEV_ASSIGN_MASK_INTX is
1483evaluated. 1551evaluated.
1484 1552
1553
14854.62 KVM_CREATE_SPAPR_TCE 15544.62 KVM_CREATE_SPAPR_TCE
1486 1555
1487Capability: KVM_CAP_SPAPR_TCE 1556Capability: KVM_CAP_SPAPR_TCE
@@ -1517,6 +1586,7 @@ the entries written by kernel-handled H_PUT_TCE calls, and also lets
1517userspace update the TCE table directly which is useful in some 1586userspace update the TCE table directly which is useful in some
1518circumstances. 1587circumstances.
1519 1588
1589
15204.63 KVM_ALLOCATE_RMA 15904.63 KVM_ALLOCATE_RMA
1521 1591
1522Capability: KVM_CAP_PPC_RMA 1592Capability: KVM_CAP_PPC_RMA
@@ -1549,6 +1619,7 @@ is supported; 2 if the processor requires all virtual machines to have
1549an RMA, or 1 if the processor can use an RMA but doesn't require it, 1619an RMA, or 1 if the processor can use an RMA but doesn't require it,
1550because it supports the Virtual RMA (VRMA) facility. 1620because it supports the Virtual RMA (VRMA) facility.
1551 1621
1622
15524.64 KVM_NMI 16234.64 KVM_NMI
1553 1624
1554Capability: KVM_CAP_USER_NMI 1625Capability: KVM_CAP_USER_NMI
@@ -1574,6 +1645,7 @@ following algorithm:
1574Some guests configure the LINT1 NMI input to cause a panic, aiding in 1645Some guests configure the LINT1 NMI input to cause a panic, aiding in
1575debugging. 1646debugging.
1576 1647
1648
15774.65 KVM_S390_UCAS_MAP 16494.65 KVM_S390_UCAS_MAP
1578 1650
1579Capability: KVM_CAP_S390_UCONTROL 1651Capability: KVM_CAP_S390_UCONTROL
@@ -1593,6 +1665,7 @@ This ioctl maps the memory at "user_addr" with the length "length" to
1593the vcpu's address space starting at "vcpu_addr". All parameters need to 1665the vcpu's address space starting at "vcpu_addr". All parameters need to
1594be alligned by 1 megabyte. 1666be alligned by 1 megabyte.
1595 1667
1668
15964.66 KVM_S390_UCAS_UNMAP 16694.66 KVM_S390_UCAS_UNMAP
1597 1670
1598Capability: KVM_CAP_S390_UCONTROL 1671Capability: KVM_CAP_S390_UCONTROL
@@ -1612,6 +1685,7 @@ This ioctl unmaps the memory in the vcpu's address space starting at
1612"vcpu_addr" with the length "length". The field "user_addr" is ignored. 1685"vcpu_addr" with the length "length". The field "user_addr" is ignored.
1613All parameters need to be alligned by 1 megabyte. 1686All parameters need to be alligned by 1 megabyte.
1614 1687
1688
16154.67 KVM_S390_VCPU_FAULT 16894.67 KVM_S390_VCPU_FAULT
1616 1690
1617Capability: KVM_CAP_S390_UCONTROL 1691Capability: KVM_CAP_S390_UCONTROL
@@ -1628,6 +1702,7 @@ table upfront. This is useful to handle validity intercepts for user
1628controlled virtual machines to fault in the virtual cpu's lowcore pages 1702controlled virtual machines to fault in the virtual cpu's lowcore pages
1629prior to calling the KVM_RUN ioctl. 1703prior to calling the KVM_RUN ioctl.
1630 1704
1705
16314.68 KVM_SET_ONE_REG 17064.68 KVM_SET_ONE_REG
1632 1707
1633Capability: KVM_CAP_ONE_REG 1708Capability: KVM_CAP_ONE_REG
@@ -1653,6 +1728,7 @@ registers, find a list below:
1653 | | 1728 | |
1654 PPC | KVM_REG_PPC_HIOR | 64 1729 PPC | KVM_REG_PPC_HIOR | 64
1655 1730
1731
16564.69 KVM_GET_ONE_REG 17324.69 KVM_GET_ONE_REG
1657 1733
1658Capability: KVM_CAP_ONE_REG 1734Capability: KVM_CAP_ONE_REG
@@ -1669,7 +1745,193 @@ at the memory location pointed to by "addr".
1669The list of registers accessible using this interface is identical to the 1745The list of registers accessible using this interface is identical to the
1670list in 4.64. 1746list in 4.64.
1671 1747
1748
17494.70 KVM_KVMCLOCK_CTRL
1750
1751Capability: KVM_CAP_KVMCLOCK_CTRL
1752Architectures: Any that implement pvclocks (currently x86 only)
1753Type: vcpu ioctl
1754Parameters: None
1755Returns: 0 on success, -1 on error
1756
1757This signals to the host kernel that the specified guest is being paused by
1758userspace. The host will set a flag in the pvclock structure that is checked
1759from the soft lockup watchdog. The flag is part of the pvclock structure that
1760is shared between guest and host, specifically the second bit of the flags
1761field of the pvclock_vcpu_time_info structure. It will be set exclusively by
1762the host and read/cleared exclusively by the guest. The guest operation of
1763checking and clearing the flag must an atomic operation so
1764load-link/store-conditional, or equivalent must be used. There are two cases
1765where the guest will clear the flag: when the soft lockup watchdog timer resets
1766itself or when a soft lockup is detected. This ioctl can be called any time
1767after pausing the vcpu, but before it is resumed.
1768
1769
17704.71 KVM_SIGNAL_MSI
1771
1772Capability: KVM_CAP_SIGNAL_MSI
1773Architectures: x86
1774Type: vm ioctl
1775Parameters: struct kvm_msi (in)
1776Returns: >0 on delivery, 0 if guest blocked the MSI, and -1 on error
1777
1778Directly inject a MSI message. Only valid with in-kernel irqchip that handles
1779MSI messages.
1780
1781struct kvm_msi {
1782 __u32 address_lo;
1783 __u32 address_hi;
1784 __u32 data;
1785 __u32 flags;
1786 __u8 pad[16];
1787};
1788
1789No flags are defined so far. The corresponding field must be 0.
1790
1791
17924.71 KVM_CREATE_PIT2
1793
1794Capability: KVM_CAP_PIT2
1795Architectures: x86
1796Type: vm ioctl
1797Parameters: struct kvm_pit_config (in)
1798Returns: 0 on success, -1 on error
1799
1800Creates an in-kernel device model for the i8254 PIT. This call is only valid
1801after enabling in-kernel irqchip support via KVM_CREATE_IRQCHIP. The following
1802parameters have to be passed:
1803
1804struct kvm_pit_config {
1805 __u32 flags;
1806 __u32 pad[15];
1807};
1808
1809Valid flags are:
1810
1811#define KVM_PIT_SPEAKER_DUMMY 1 /* emulate speaker port stub */
1812
1813PIT timer interrupts may use a per-VM kernel thread for injection. If it
1814exists, this thread will have a name of the following pattern:
1815
1816kvm-pit/<owner-process-pid>
1817
1818When running a guest with elevated priorities, the scheduling parameters of
1819this thread may have to be adjusted accordingly.
1820
1821This IOCTL replaces the obsolete KVM_CREATE_PIT.
1822
1823
18244.72 KVM_GET_PIT2
1825
1826Capability: KVM_CAP_PIT_STATE2
1827Architectures: x86
1828Type: vm ioctl
1829Parameters: struct kvm_pit_state2 (out)
1830Returns: 0 on success, -1 on error
1831
1832Retrieves the state of the in-kernel PIT model. Only valid after
1833KVM_CREATE_PIT2. The state is returned in the following structure:
1834
1835struct kvm_pit_state2 {
1836 struct kvm_pit_channel_state channels[3];
1837 __u32 flags;
1838 __u32 reserved[9];
1839};
1840
1841Valid flags are:
1842
1843/* disable PIT in HPET legacy mode */
1844#define KVM_PIT_FLAGS_HPET_LEGACY 0x00000001
1845
1846This IOCTL replaces the obsolete KVM_GET_PIT.
1847
1848
18494.73 KVM_SET_PIT2
1850
1851Capability: KVM_CAP_PIT_STATE2
1852Architectures: x86
1853Type: vm ioctl
1854Parameters: struct kvm_pit_state2 (in)
1855Returns: 0 on success, -1 on error
1856
1857Sets the state of the in-kernel PIT model. Only valid after KVM_CREATE_PIT2.
1858See KVM_GET_PIT2 for details on struct kvm_pit_state2.
1859
1860This IOCTL replaces the obsolete KVM_SET_PIT.
1861
1862
18634.74 KVM_PPC_GET_SMMU_INFO
1864
1865Capability: KVM_CAP_PPC_GET_SMMU_INFO
1866Architectures: powerpc
1867Type: vm ioctl
1868Parameters: None
1869Returns: 0 on success, -1 on error
1870
1871This populates and returns a structure describing the features of
1872the "Server" class MMU emulation supported by KVM.
1873This can in turn be used by userspace to generate the appropariate
1874device-tree properties for the guest operating system.
1875
1876The structure contains some global informations, followed by an
1877array of supported segment page sizes:
1878
1879 struct kvm_ppc_smmu_info {
1880 __u64 flags;
1881 __u32 slb_size;
1882 __u32 pad;
1883 struct kvm_ppc_one_seg_page_size sps[KVM_PPC_PAGE_SIZES_MAX_SZ];
1884 };
1885
1886The supported flags are:
1887
1888 - KVM_PPC_PAGE_SIZES_REAL:
1889 When that flag is set, guest page sizes must "fit" the backing
1890 store page sizes. When not set, any page size in the list can
1891 be used regardless of how they are backed by userspace.
1892
1893 - KVM_PPC_1T_SEGMENTS
1894 The emulated MMU supports 1T segments in addition to the
1895 standard 256M ones.
1896
1897The "slb_size" field indicates how many SLB entries are supported
1898
1899The "sps" array contains 8 entries indicating the supported base
1900page sizes for a segment in increasing order. Each entry is defined
1901as follow:
1902
1903 struct kvm_ppc_one_seg_page_size {
1904 __u32 page_shift; /* Base page shift of segment (or 0) */
1905 __u32 slb_enc; /* SLB encoding for BookS */
1906 struct kvm_ppc_one_page_size enc[KVM_PPC_PAGE_SIZES_MAX_SZ];
1907 };
1908
1909An entry with a "page_shift" of 0 is unused. Because the array is
1910organized in increasing order, a lookup can stop when encoutering
1911such an entry.
1912
1913The "slb_enc" field provides the encoding to use in the SLB for the
1914page size. The bits are in positions such as the value can directly
1915be OR'ed into the "vsid" argument of the slbmte instruction.
1916
1917The "enc" array is a list which for each of those segment base page
1918size provides the list of supported actual page sizes (which can be
1919only larger or equal to the base page size), along with the
1920corresponding encoding in the hash PTE. Similarily, the array is
19218 entries sorted by increasing sizes and an entry with a "0" shift
1922is an empty entry and a terminator:
1923
1924 struct kvm_ppc_one_page_size {
1925 __u32 page_shift; /* Page shift (or 0) */
1926 __u32 pte_enc; /* Encoding in the HPTE (>>12) */
1927 };
1928
1929The "pte_enc" field provides a value that can OR'ed into the hash
1930PTE's RPN field (ie, it needs to be shifted left by 12 to OR it
1931into the hash PTE second double word).
1932
16725. The kvm_run structure 19335. The kvm_run structure
1934------------------------
1673 1935
1674Application code obtains a pointer to the kvm_run structure by 1936Application code obtains a pointer to the kvm_run structure by
1675mmap()ing a vcpu fd. From that point, application code can control 1937mmap()ing a vcpu fd. From that point, application code can control
@@ -1910,7 +2172,9 @@ and usually define the validity of a groups of registers. (e.g. one bit
1910 2172
1911}; 2173};
1912 2174
2175
19136. Capabilities that can be enabled 21766. Capabilities that can be enabled
2177-----------------------------------
1914 2178
1915There are certain capabilities that change the behavior of the virtual CPU when 2179There are certain capabilities that change the behavior of the virtual CPU when
1916enabled. To enable them, please see section 4.37. Below you can find a list of 2180enabled. To enable them, please see section 4.37. Below you can find a list of
@@ -1926,6 +2190,7 @@ The following information is provided along with the description:
1926 Returns: the return value. General error numbers (EBADF, ENOMEM, EINVAL) 2190 Returns: the return value. General error numbers (EBADF, ENOMEM, EINVAL)
1927 are not detailed, but errors with specific meanings are. 2191 are not detailed, but errors with specific meanings are.
1928 2192
2193
19296.1 KVM_CAP_PPC_OSI 21946.1 KVM_CAP_PPC_OSI
1930 2195
1931Architectures: ppc 2196Architectures: ppc
@@ -1939,6 +2204,7 @@ between the guest and the host.
1939 2204
1940When this capability is enabled, KVM_EXIT_OSI can occur. 2205When this capability is enabled, KVM_EXIT_OSI can occur.
1941 2206
2207
19426.2 KVM_CAP_PPC_PAPR 22086.2 KVM_CAP_PPC_PAPR
1943 2209
1944Architectures: ppc 2210Architectures: ppc
@@ -1957,6 +2223,7 @@ HTAB invisible to the guest.
1957 2223
1958When this capability is enabled, KVM_EXIT_PAPR_HCALL can occur. 2224When this capability is enabled, KVM_EXIT_PAPR_HCALL can occur.
1959 2225
2226
19606.3 KVM_CAP_SW_TLB 22276.3 KVM_CAP_SW_TLB
1961 2228
1962Architectures: ppc 2229Architectures: ppc
diff --git a/Documentation/virtual/kvm/cpuid.txt b/Documentation/virtual/kvm/cpuid.txt
index 882068538c9c..83afe65d4966 100644
--- a/Documentation/virtual/kvm/cpuid.txt
+++ b/Documentation/virtual/kvm/cpuid.txt
@@ -10,11 +10,15 @@ a guest.
10KVM cpuid functions are: 10KVM cpuid functions are:
11 11
12function: KVM_CPUID_SIGNATURE (0x40000000) 12function: KVM_CPUID_SIGNATURE (0x40000000)
13returns : eax = 0, 13returns : eax = 0x40000001,
14 ebx = 0x4b4d564b, 14 ebx = 0x4b4d564b,
15 ecx = 0x564b4d56, 15 ecx = 0x564b4d56,
16 edx = 0x4d. 16 edx = 0x4d.
17Note that this value in ebx, ecx and edx corresponds to the string "KVMKVMKVM". 17Note that this value in ebx, ecx and edx corresponds to the string "KVMKVMKVM".
18The value in eax corresponds to the maximum cpuid function present in this leaf,
19and will be updated if more functions are added in the future.
20Note also that old hosts set eax value to 0x0. This should
21be interpreted as if the value was 0x40000001.
18This function queries the presence of KVM cpuid leafs. 22This function queries the presence of KVM cpuid leafs.
19 23
20 24
diff --git a/Documentation/virtual/kvm/msr.txt b/Documentation/virtual/kvm/msr.txt
index 50317809113d..96b41bd97523 100644
--- a/Documentation/virtual/kvm/msr.txt
+++ b/Documentation/virtual/kvm/msr.txt
@@ -109,6 +109,10 @@ MSR_KVM_SYSTEM_TIME_NEW: 0x4b564d01
109 0 | 24 | multiple cpus are guaranteed to 109 0 | 24 | multiple cpus are guaranteed to
110 | | be monotonic 110 | | be monotonic
111 ------------------------------------------------------------- 111 -------------------------------------------------------------
112 | | guest vcpu has been paused by
113 1 | N/A | the host
114 | | See 4.70 in api.txt
115 -------------------------------------------------------------
112 116
113 Availability of this MSR must be checked via bit 3 in 0x4000001 cpuid 117 Availability of this MSR must be checked via bit 3 in 0x4000001 cpuid
114 leaf prior to usage. 118 leaf prior to usage.
diff --git a/Documentation/vm/frontswap.txt b/Documentation/vm/frontswap.txt
new file mode 100644
index 000000000000..37067cf455f4
--- /dev/null
+++ b/Documentation/vm/frontswap.txt
@@ -0,0 +1,278 @@
1Frontswap provides a "transcendent memory" interface for swap pages.
2In some environments, dramatic performance savings may be obtained because
3swapped pages are saved in RAM (or a RAM-like device) instead of a swap disk.
4
5(Note, frontswap -- and cleancache (merged at 3.0) -- are the "frontends"
6and the only necessary changes to the core kernel for transcendent memory;
7all other supporting code -- the "backends" -- is implemented as drivers.
8See the LWN.net article "Transcendent memory in a nutshell" for a detailed
9overview of frontswap and related kernel parts:
10https://lwn.net/Articles/454795/ )
11
12Frontswap is so named because it can be thought of as the opposite of
13a "backing" store for a swap device. The storage is assumed to be
14a synchronous concurrency-safe page-oriented "pseudo-RAM device" conforming
15to the requirements of transcendent memory (such as Xen's "tmem", or
16in-kernel compressed memory, aka "zcache", or future RAM-like devices);
17this pseudo-RAM device is not directly accessible or addressable by the
18kernel and is of unknown and possibly time-varying size. The driver
19links itself to frontswap by calling frontswap_register_ops to set the
20frontswap_ops funcs appropriately and the functions it provides must
21conform to certain policies as follows:
22
23An "init" prepares the device to receive frontswap pages associated
24with the specified swap device number (aka "type"). A "store" will
25copy the page to transcendent memory and associate it with the type and
26offset associated with the page. A "load" will copy the page, if found,
27from transcendent memory into kernel memory, but will NOT remove the page
28from from transcendent memory. An "invalidate_page" will remove the page
29from transcendent memory and an "invalidate_area" will remove ALL pages
30associated with the swap type (e.g., like swapoff) and notify the "device"
31to refuse further stores with that swap type.
32
33Once a page is successfully stored, a matching load on the page will normally
34succeed. So when the kernel finds itself in a situation where it needs
35to swap out a page, it first attempts to use frontswap. If the store returns
36success, the data has been successfully saved to transcendent memory and
37a disk write and, if the data is later read back, a disk read are avoided.
38If a store returns failure, transcendent memory has rejected the data, and the
39page can be written to swap as usual.
40
41If a backend chooses, frontswap can be configured as a "writethrough
42cache" by calling frontswap_writethrough(). In this mode, the reduction
43in swap device writes is lost (and also a non-trivial performance advantage)
44in order to allow the backend to arbitrarily "reclaim" space used to
45store frontswap pages to more completely manage its memory usage.
46
47Note that if a page is stored and the page already exists in transcendent memory
48(a "duplicate" store), either the store succeeds and the data is overwritten,
49or the store fails AND the page is invalidated. This ensures stale data may
50never be obtained from frontswap.
51
52If properly configured, monitoring of frontswap is done via debugfs in
53the /sys/kernel/debug/frontswap directory. The effectiveness of
54frontswap can be measured (across all swap devices) with:
55
56failed_stores - how many store attempts have failed
57loads - how many loads were attempted (all should succeed)
58succ_stores - how many store attempts have succeeded
59invalidates - how many invalidates were attempted
60
61A backend implementation may provide additional metrics.
62
63FAQ
64
651) Where's the value?
66
67When a workload starts swapping, performance falls through the floor.
68Frontswap significantly increases performance in many such workloads by
69providing a clean, dynamic interface to read and write swap pages to
70"transcendent memory" that is otherwise not directly addressable to the kernel.
71This interface is ideal when data is transformed to a different form
72and size (such as with compression) or secretly moved (as might be
73useful for write-balancing for some RAM-like devices). Swap pages (and
74evicted page-cache pages) are a great use for this kind of slower-than-RAM-
75but-much-faster-than-disk "pseudo-RAM device" and the frontswap (and
76cleancache) interface to transcendent memory provides a nice way to read
77and write -- and indirectly "name" -- the pages.
78
79Frontswap -- and cleancache -- with a fairly small impact on the kernel,
80provides a huge amount of flexibility for more dynamic, flexible RAM
81utilization in various system configurations:
82
83In the single kernel case, aka "zcache", pages are compressed and
84stored in local memory, thus increasing the total anonymous pages
85that can be safely kept in RAM. Zcache essentially trades off CPU
86cycles used in compression/decompression for better memory utilization.
87Benchmarks have shown little or no impact when memory pressure is
88low while providing a significant performance improvement (25%+)
89on some workloads under high memory pressure.
90
91"RAMster" builds on zcache by adding "peer-to-peer" transcendent memory
92support for clustered systems. Frontswap pages are locally compressed
93as in zcache, but then "remotified" to another system's RAM. This
94allows RAM to be dynamically load-balanced back-and-forth as needed,
95i.e. when system A is overcommitted, it can swap to system B, and
96vice versa. RAMster can also be configured as a memory server so
97many servers in a cluster can swap, dynamically as needed, to a single
98server configured with a large amount of RAM... without pre-configuring
99how much of the RAM is available for each of the clients!
100
101In the virtual case, the whole point of virtualization is to statistically
102multiplex physical resources acrosst the varying demands of multiple
103virtual machines. This is really hard to do with RAM and efforts to do
104it well with no kernel changes have essentially failed (except in some
105well-publicized special-case workloads).
106Specifically, the Xen Transcendent Memory backend allows otherwise
107"fallow" hypervisor-owned RAM to not only be "time-shared" between multiple
108virtual machines, but the pages can be compressed and deduplicated to
109optimize RAM utilization. And when guest OS's are induced to surrender
110underutilized RAM (e.g. with "selfballooning"), sudden unexpected
111memory pressure may result in swapping; frontswap allows those pages
112to be swapped to and from hypervisor RAM (if overall host system memory
113conditions allow), thus mitigating the potentially awful performance impact
114of unplanned swapping.
115
116A KVM implementation is underway and has been RFC'ed to lkml. And,
117using frontswap, investigation is also underway on the use of NVM as
118a memory extension technology.
119
1202) Sure there may be performance advantages in some situations, but
121 what's the space/time overhead of frontswap?
122
123If CONFIG_FRONTSWAP is disabled, every frontswap hook compiles into
124nothingness and the only overhead is a few extra bytes per swapon'ed
125swap device. If CONFIG_FRONTSWAP is enabled but no frontswap "backend"
126registers, there is one extra global variable compared to zero for
127every swap page read or written. If CONFIG_FRONTSWAP is enabled
128AND a frontswap backend registers AND the backend fails every "store"
129request (i.e. provides no memory despite claiming it might),
130CPU overhead is still negligible -- and since every frontswap fail
131precedes a swap page write-to-disk, the system is highly likely
132to be I/O bound and using a small fraction of a percent of a CPU
133will be irrelevant anyway.
134
135As for space, if CONFIG_FRONTSWAP is enabled AND a frontswap backend
136registers, one bit is allocated for every swap page for every swap
137device that is swapon'd. This is added to the EIGHT bits (which
138was sixteen until about 2.6.34) that the kernel already allocates
139for every swap page for every swap device that is swapon'd. (Hugh
140Dickins has observed that frontswap could probably steal one of
141the existing eight bits, but let's worry about that minor optimization
142later.) For very large swap disks (which are rare) on a standard
1434K pagesize, this is 1MB per 32GB swap.
144
145When swap pages are stored in transcendent memory instead of written
146out to disk, there is a side effect that this may create more memory
147pressure that can potentially outweigh the other advantages. A
148backend, such as zcache, must implement policies to carefully (but
149dynamically) manage memory limits to ensure this doesn't happen.
150
1513) OK, how about a quick overview of what this frontswap patch does
152 in terms that a kernel hacker can grok?
153
154Let's assume that a frontswap "backend" has registered during
155kernel initialization; this registration indicates that this
156frontswap backend has access to some "memory" that is not directly
157accessible by the kernel. Exactly how much memory it provides is
158entirely dynamic and random.
159
160Whenever a swap-device is swapon'd frontswap_init() is called,
161passing the swap device number (aka "type") as a parameter.
162This notifies frontswap to expect attempts to "store" swap pages
163associated with that number.
164
165Whenever the swap subsystem is readying a page to write to a swap
166device (c.f swap_writepage()), frontswap_store is called. Frontswap
167consults with the frontswap backend and if the backend says it does NOT
168have room, frontswap_store returns -1 and the kernel swaps the page
169to the swap device as normal. Note that the response from the frontswap
170backend is unpredictable to the kernel; it may choose to never accept a
171page, it could accept every ninth page, or it might accept every
172page. But if the backend does accept a page, the data from the page
173has already been copied and associated with the type and offset,
174and the backend guarantees the persistence of the data. In this case,
175frontswap sets a bit in the "frontswap_map" for the swap device
176corresponding to the page offset on the swap device to which it would
177otherwise have written the data.
178
179When the swap subsystem needs to swap-in a page (swap_readpage()),
180it first calls frontswap_load() which checks the frontswap_map to
181see if the page was earlier accepted by the frontswap backend. If
182it was, the page of data is filled from the frontswap backend and
183the swap-in is complete. If not, the normal swap-in code is
184executed to obtain the page of data from the real swap device.
185
186So every time the frontswap backend accepts a page, a swap device read
187and (potentially) a swap device write are replaced by a "frontswap backend
188store" and (possibly) a "frontswap backend loads", which are presumably much
189faster.
190
1914) Can't frontswap be configured as a "special" swap device that is
192 just higher priority than any real swap device (e.g. like zswap,
193 or maybe swap-over-nbd/NFS)?
194
195No. First, the existing swap subsystem doesn't allow for any kind of
196swap hierarchy. Perhaps it could be rewritten to accomodate a hierarchy,
197but this would require fairly drastic changes. Even if it were
198rewritten, the existing swap subsystem uses the block I/O layer which
199assumes a swap device is fixed size and any page in it is linearly
200addressable. Frontswap barely touches the existing swap subsystem,
201and works around the constraints of the block I/O subsystem to provide
202a great deal of flexibility and dynamicity.
203
204For example, the acceptance of any swap page by the frontswap backend is
205entirely unpredictable. This is critical to the definition of frontswap
206backends because it grants completely dynamic discretion to the
207backend. In zcache, one cannot know a priori how compressible a page is.
208"Poorly" compressible pages can be rejected, and "poorly" can itself be
209defined dynamically depending on current memory constraints.
210
211Further, frontswap is entirely synchronous whereas a real swap
212device is, by definition, asynchronous and uses block I/O. The
213block I/O layer is not only unnecessary, but may perform "optimizations"
214that are inappropriate for a RAM-oriented device including delaying
215the write of some pages for a significant amount of time. Synchrony is
216required to ensure the dynamicity of the backend and to avoid thorny race
217conditions that would unnecessarily and greatly complicate frontswap
218and/or the block I/O subsystem. That said, only the initial "store"
219and "load" operations need be synchronous. A separate asynchronous thread
220is free to manipulate the pages stored by frontswap. For example,
221the "remotification" thread in RAMster uses standard asynchronous
222kernel sockets to move compressed frontswap pages to a remote machine.
223Similarly, a KVM guest-side implementation could do in-guest compression
224and use "batched" hypercalls.
225
226In a virtualized environment, the dynamicity allows the hypervisor
227(or host OS) to do "intelligent overcommit". For example, it can
228choose to accept pages only until host-swapping might be imminent,
229then force guests to do their own swapping.
230
231There is a downside to the transcendent memory specifications for
232frontswap: Since any "store" might fail, there must always be a real
233slot on a real swap device to swap the page. Thus frontswap must be
234implemented as a "shadow" to every swapon'd device with the potential
235capability of holding every page that the swap device might have held
236and the possibility that it might hold no pages at all. This means
237that frontswap cannot contain more pages than the total of swapon'd
238swap devices. For example, if NO swap device is configured on some
239installation, frontswap is useless. Swapless portable devices
240can still use frontswap but a backend for such devices must configure
241some kind of "ghost" swap device and ensure that it is never used.
242
2435) Why this weird definition about "duplicate stores"? If a page
244 has been previously successfully stored, can't it always be
245 successfully overwritten?
246
247Nearly always it can, but no, sometimes it cannot. Consider an example
248where data is compressed and the original 4K page has been compressed
249to 1K. Now an attempt is made to overwrite the page with data that
250is non-compressible and so would take the entire 4K. But the backend
251has no more space. In this case, the store must be rejected. Whenever
252frontswap rejects a store that would overwrite, it also must invalidate
253the old data and ensure that it is no longer accessible. Since the
254swap subsystem then writes the new data to the read swap device,
255this is the correct course of action to ensure coherency.
256
2576) What is frontswap_shrink for?
258
259When the (non-frontswap) swap subsystem swaps out a page to a real
260swap device, that page is only taking up low-value pre-allocated disk
261space. But if frontswap has placed a page in transcendent memory, that
262page may be taking up valuable real estate. The frontswap_shrink
263routine allows code outside of the swap subsystem to force pages out
264of the memory managed by frontswap and back into kernel-addressable memory.
265For example, in RAMster, a "suction driver" thread will attempt
266to "repatriate" pages sent to a remote machine back to the local machine;
267this is driven using the frontswap_shrink mechanism when memory pressure
268subsides.
269
2707) Why does the frontswap patch create the new include file swapfile.h?
271
272The frontswap code depends on some swap-subsystem-internal data
273structures that have, over the years, moved back and forth between
274static and global. This seemed a reasonable compromise: Define
275them as global but declare them in a new include file that isn't
276included by the large number of source files that include swap.h.
277
278Dan Magenheimer, last updated April 9, 2012
diff --git a/Documentation/vm/pagemap.txt b/Documentation/vm/pagemap.txt
index 4600cbe3d6be..7587493c67f1 100644
--- a/Documentation/vm/pagemap.txt
+++ b/Documentation/vm/pagemap.txt
@@ -16,7 +16,7 @@ There are three components to pagemap:
16 * Bits 0-4 swap type if swapped 16 * Bits 0-4 swap type if swapped
17 * Bits 5-54 swap offset if swapped 17 * Bits 5-54 swap offset if swapped
18 * Bits 55-60 page shift (page size = 1<<page shift) 18 * Bits 55-60 page shift (page size = 1<<page shift)
19 * Bit 61 reserved for future use 19 * Bit 61 page is file-page or shared-anon
20 * Bit 62 page swapped 20 * Bit 62 page swapped
21 * Bit 63 page present 21 * Bit 63 page present
22 22
diff --git a/Documentation/vm/slub.txt b/Documentation/vm/slub.txt
index 6752870c4970..b0c6d1bbb434 100644
--- a/Documentation/vm/slub.txt
+++ b/Documentation/vm/slub.txt
@@ -17,7 +17,7 @@ data and perform operation on the slabs. By default slabinfo only lists
17slabs that have data in them. See "slabinfo -h" for more options when 17slabs that have data in them. See "slabinfo -h" for more options when
18running the command. slabinfo can be compiled with 18running the command. slabinfo can be compiled with
19 19
20gcc -o slabinfo tools/slub/slabinfo.c 20gcc -o slabinfo tools/vm/slabinfo.c
21 21
22Some of the modes of operation of slabinfo require that slub debugging 22Some of the modes of operation of slabinfo require that slub debugging
23be enabled on the command line. F.e. no tracking information will be 23be enabled on the command line. F.e. no tracking information will be
diff --git a/Documentation/vm/transhuge.txt b/Documentation/vm/transhuge.txt
index 29bdf62aac09..f734bb2a78dc 100644
--- a/Documentation/vm/transhuge.txt
+++ b/Documentation/vm/transhuge.txt
@@ -166,6 +166,68 @@ behavior. So to make them effective you need to restart any
166application that could have been using hugepages. This also applies to 166application that could have been using hugepages. This also applies to
167the regions registered in khugepaged. 167the regions registered in khugepaged.
168 168
169== Monitoring usage ==
170
171The number of transparent huge pages currently used by the system is
172available by reading the AnonHugePages field in /proc/meminfo. To
173identify what applications are using transparent huge pages, it is
174necessary to read /proc/PID/smaps and count the AnonHugePages fields
175for each mapping. Note that reading the smaps file is expensive and
176reading it frequently will incur overhead.
177
178There are a number of counters in /proc/vmstat that may be used to
179monitor how successfully the system is providing huge pages for use.
180
181thp_fault_alloc is incremented every time a huge page is successfully
182 allocated to handle a page fault. This applies to both the
183 first time a page is faulted and for COW faults.
184
185thp_collapse_alloc is incremented by khugepaged when it has found
186 a range of pages to collapse into one huge page and has
187 successfully allocated a new huge page to store the data.
188
189thp_fault_fallback is incremented if a page fault fails to allocate
190 a huge page and instead falls back to using small pages.
191
192thp_collapse_alloc_failed is incremented if khugepaged found a range
193 of pages that should be collapsed into one huge page but failed
194 the allocation.
195
196thp_split is incremented every time a huge page is split into base
197 pages. This can happen for a variety of reasons but a common
198 reason is that a huge page is old and is being reclaimed.
199
200As the system ages, allocating huge pages may be expensive as the
201system uses memory compaction to copy data around memory to free a
202huge page for use. There are some counters in /proc/vmstat to help
203monitor this overhead.
204
205compact_stall is incremented every time a process stalls to run
206 memory compaction so that a huge page is free for use.
207
208compact_success is incremented if the system compacted memory and
209 freed a huge page for use.
210
211compact_fail is incremented if the system tries to compact memory
212 but failed.
213
214compact_pages_moved is incremented each time a page is moved. If
215 this value is increasing rapidly, it implies that the system
216 is copying a lot of data to satisfy the huge page allocation.
217 It is possible that the cost of copying exceeds any savings
218 from reduced TLB misses.
219
220compact_pagemigrate_failed is incremented when the underlying mechanism
221 for moving a page failed.
222
223compact_blocks_moved is incremented each time memory compaction examines
224 a huge page aligned range of pages.
225
226It is possible to establish how long the stalls were using the function
227tracer to record how long was spent in __alloc_pages_nodemask and
228using the mm_page_alloc tracepoint to identify which allocations were
229for huge pages.
230
169== get_user_pages and follow_page == 231== get_user_pages and follow_page ==
170 232
171get_user_pages and follow_page if run on a hugepage, will return the 233get_user_pages and follow_page if run on a hugepage, will return the
diff --git a/Documentation/watchdog/watchdog-kernel-api.txt b/Documentation/watchdog/watchdog-kernel-api.txt
index 25fe4304f2fc..086638f6c82d 100644
--- a/Documentation/watchdog/watchdog-kernel-api.txt
+++ b/Documentation/watchdog/watchdog-kernel-api.txt
@@ -1,6 +1,6 @@
1The Linux WatchDog Timer Driver Core kernel API. 1The Linux WatchDog Timer Driver Core kernel API.
2=============================================== 2===============================================
3Last reviewed: 16-Mar-2012 3Last reviewed: 22-May-2012
4 4
5Wim Van Sebroeck <wim@iguana.be> 5Wim Van Sebroeck <wim@iguana.be>
6 6
@@ -39,6 +39,10 @@ watchdog_device structure.
39The watchdog device structure looks like this: 39The watchdog device structure looks like this:
40 40
41struct watchdog_device { 41struct watchdog_device {
42 int id;
43 struct cdev cdev;
44 struct device *dev;
45 struct device *parent;
42 const struct watchdog_info *info; 46 const struct watchdog_info *info;
43 const struct watchdog_ops *ops; 47 const struct watchdog_ops *ops;
44 unsigned int bootstatus; 48 unsigned int bootstatus;
@@ -46,10 +50,20 @@ struct watchdog_device {
46 unsigned int min_timeout; 50 unsigned int min_timeout;
47 unsigned int max_timeout; 51 unsigned int max_timeout;
48 void *driver_data; 52 void *driver_data;
53 struct mutex lock;
49 unsigned long status; 54 unsigned long status;
50}; 55};
51 56
52It contains following fields: 57It contains following fields:
58* id: set by watchdog_register_device, id 0 is special. It has both a
59 /dev/watchdog0 cdev (dynamic major, minor 0) as well as the old
60 /dev/watchdog miscdev. The id is set automatically when calling
61 watchdog_register_device.
62* cdev: cdev for the dynamic /dev/watchdog<id> device nodes. This
63 field is also populated by watchdog_register_device.
64* dev: device under the watchdog class (created by watchdog_register_device).
65* parent: set this to the parent device (or NULL) before calling
66 watchdog_register_device.
53* info: a pointer to a watchdog_info structure. This structure gives some 67* info: a pointer to a watchdog_info structure. This structure gives some
54 additional information about the watchdog timer itself. (Like it's unique name) 68 additional information about the watchdog timer itself. (Like it's unique name)
55* ops: a pointer to the list of watchdog operations that the watchdog supports. 69* ops: a pointer to the list of watchdog operations that the watchdog supports.
@@ -61,6 +75,7 @@ It contains following fields:
61* driver_data: a pointer to the drivers private data of a watchdog device. 75* driver_data: a pointer to the drivers private data of a watchdog device.
62 This data should only be accessed via the watchdog_set_drvdata and 76 This data should only be accessed via the watchdog_set_drvdata and
63 watchdog_get_drvdata routines. 77 watchdog_get_drvdata routines.
78* lock: Mutex for WatchDog Timer Driver Core internal use only.
64* status: this field contains a number of status bits that give extra 79* status: this field contains a number of status bits that give extra
65 information about the status of the device (Like: is the watchdog timer 80 information about the status of the device (Like: is the watchdog timer
66 running/active, is the nowayout bit set, is the device opened via 81 running/active, is the nowayout bit set, is the device opened via
@@ -78,6 +93,8 @@ struct watchdog_ops {
78 unsigned int (*status)(struct watchdog_device *); 93 unsigned int (*status)(struct watchdog_device *);
79 int (*set_timeout)(struct watchdog_device *, unsigned int); 94 int (*set_timeout)(struct watchdog_device *, unsigned int);
80 unsigned int (*get_timeleft)(struct watchdog_device *); 95 unsigned int (*get_timeleft)(struct watchdog_device *);
96 void (*ref)(struct watchdog_device *);
97 void (*unref)(struct watchdog_device *);
81 long (*ioctl)(struct watchdog_device *, unsigned int, unsigned long); 98 long (*ioctl)(struct watchdog_device *, unsigned int, unsigned long);
82}; 99};
83 100
@@ -85,6 +102,21 @@ It is important that you first define the module owner of the watchdog timer
85driver's operations. This module owner will be used to lock the module when 102driver's operations. This module owner will be used to lock the module when
86the watchdog is active. (This to avoid a system crash when you unload the 103the watchdog is active. (This to avoid a system crash when you unload the
87module and /dev/watchdog is still open). 104module and /dev/watchdog is still open).
105
106If the watchdog_device struct is dynamically allocated, just locking the module
107is not enough and a driver also needs to define the ref and unref operations to
108ensure the structure holding the watchdog_device does not go away.
109
110The simplest (and usually sufficient) implementation of this is to:
1111) Add a kref struct to the same structure which is holding the watchdog_device
1122) Define a release callback for the kref which frees the struct holding both
1133) Call kref_init on this kref *before* calling watchdog_register_device()
1144) Define a ref operation calling kref_get on this kref
1155) Define a unref operation calling kref_put on this kref
1166) When it is time to cleanup:
117 * Do not kfree() the struct holding both, the last kref_put will do this!
118 * *After* calling watchdog_unregister_device() call kref_put on the kref
119
88Some operations are mandatory and some are optional. The mandatory operations 120Some operations are mandatory and some are optional. The mandatory operations
89are: 121are:
90* start: this is a pointer to the routine that starts the watchdog timer 122* start: this is a pointer to the routine that starts the watchdog timer
@@ -125,6 +157,10 @@ they are supported. These optional routines/operations are:
125 (Note: the WDIOF_SETTIMEOUT needs to be set in the options field of the 157 (Note: the WDIOF_SETTIMEOUT needs to be set in the options field of the
126 watchdog's info structure). 158 watchdog's info structure).
127* get_timeleft: this routines returns the time that's left before a reset. 159* get_timeleft: this routines returns the time that's left before a reset.
160* ref: the operation that calls kref_get on the kref of a dynamically
161 allocated watchdog_device struct.
162* unref: the operation that calls kref_put on the kref of a dynamically
163 allocated watchdog_device struct.
128* ioctl: if this routine is present then it will be called first before we do 164* ioctl: if this routine is present then it will be called first before we do
129 our own internal ioctl call handling. This routine should return -ENOIOCTLCMD 165 our own internal ioctl call handling. This routine should return -ENOIOCTLCMD
130 if a command is not supported. The parameters that are passed to the ioctl 166 if a command is not supported. The parameters that are passed to the ioctl
@@ -144,6 +180,11 @@ bit-operations. The status bits that are defined are:
144 (This bit should only be used by the WatchDog Timer Driver Core). 180 (This bit should only be used by the WatchDog Timer Driver Core).
145* WDOG_NO_WAY_OUT: this bit stores the nowayout setting for the watchdog. 181* WDOG_NO_WAY_OUT: this bit stores the nowayout setting for the watchdog.
146 If this bit is set then the watchdog timer will not be able to stop. 182 If this bit is set then the watchdog timer will not be able to stop.
183* WDOG_UNREGISTERED: this bit gets set by the WatchDog Timer Driver Core
184 after calling watchdog_unregister_device, and then checked before calling
185 any watchdog_ops, so that you can be sure that no operations (other then
186 unref) will get called after unregister, even if userspace still holds a
187 reference to /dev/watchdog
147 188
148 To set the WDOG_NO_WAY_OUT status bit (before registering your watchdog 189 To set the WDOG_NO_WAY_OUT status bit (before registering your watchdog
149 timer device) you can either: 190 timer device) you can either:
diff --git a/Documentation/watchdog/watchdog-parameters.txt b/Documentation/watchdog/watchdog-parameters.txt
index 17ddd822b456..04fddbacdbde 100644
--- a/Documentation/watchdog/watchdog-parameters.txt
+++ b/Documentation/watchdog/watchdog-parameters.txt
@@ -78,6 +78,11 @@ wd0_timeout: Default watchdog0 timeout in 1/10secs
78wd1_timeout: Default watchdog1 timeout in 1/10secs 78wd1_timeout: Default watchdog1 timeout in 1/10secs
79wd2_timeout: Default watchdog2 timeout in 1/10secs 79wd2_timeout: Default watchdog2 timeout in 1/10secs
80------------------------------------------------- 80-------------------------------------------------
81da9052wdt:
82timeout: Watchdog timeout in seconds. 2<= timeout <=131, default=2.048s
83nowayout: Watchdog cannot be stopped once started
84 (default=kernel config parameter)
85-------------------------------------------------
81davinci_wdt: 86davinci_wdt:
82heartbeat: Watchdog heartbeat period in seconds from 1 to 600, default 60 87heartbeat: Watchdog heartbeat period in seconds from 1 to 600, default 60
83------------------------------------------------- 88-------------------------------------------------
diff --git a/Documentation/x86/efi-stub.txt b/Documentation/x86/efi-stub.txt
new file mode 100644
index 000000000000..44e6bb6ead10
--- /dev/null
+++ b/Documentation/x86/efi-stub.txt
@@ -0,0 +1,65 @@
1 The EFI Boot Stub
2 ---------------------------
3
4On the x86 platform, a bzImage can masquerade as a PE/COFF image,
5thereby convincing EFI firmware loaders to load it as an EFI
6executable. The code that modifies the bzImage header, along with the
7EFI-specific entry point that the firmware loader jumps to are
8collectively known as the "EFI boot stub", and live in
9arch/x86/boot/header.S and arch/x86/boot/compressed/eboot.c,
10respectively.
11
12By using the EFI boot stub it's possible to boot a Linux kernel
13without the use of a conventional EFI boot loader, such as grub or
14elilo. Since the EFI boot stub performs the jobs of a boot loader, in
15a certain sense it *IS* the boot loader.
16
17The EFI boot stub is enabled with the CONFIG_EFI_STUB kernel option.
18
19
20**** How to install bzImage.efi
21
22The bzImage located in arch/x86/boot/bzImage must be copied to the EFI
23System Partiion (ESP) and renamed with the extension ".efi". Without
24the extension the EFI firmware loader will refuse to execute it. It's
25not possible to execute bzImage.efi from the usual Linux file systems
26because EFI firmware doesn't have support for them.
27
28
29**** Passing kernel parameters from the EFI shell
30
31Arguments to the kernel can be passed after bzImage.efi, e.g.
32
33 fs0:> bzImage.efi console=ttyS0 root=/dev/sda4
34
35
36**** The "initrd=" option
37
38Like most boot loaders, the EFI stub allows the user to specify
39multiple initrd files using the "initrd=" option. This is the only EFI
40stub-specific command line parameter, everything else is passed to the
41kernel when it boots.
42
43The path to the initrd file must be an absolute path from the
44beginning of the ESP, relative path names do not work. Also, the path
45is an EFI-style path and directory elements must be separated with
46backslashes (\). For example, given the following directory layout,
47
48fs0:>
49 Kernels\
50 bzImage.efi
51 initrd-large.img
52
53 Ramdisks\
54 initrd-small.img
55 initrd-medium.img
56
57to boot with the initrd-large.img file if the current working
58directory is fs0:\Kernels, the following command must be used,
59
60 fs0:\Kernels> bzImage.efi initrd=\Kernels\initrd-large.img
61
62Notice how bzImage.efi can be specified with a relative path. That's
63because the image we're executing is interpreted by the EFI shell,
64which understands relative paths, whereas the rest of the command line
65is passed to bzImage.efi.