aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/ABI/stable/sysfs-bus-usb14
-rw-r--r--Documentation/ABI/testing/ima_policy4
-rw-r--r--Documentation/ABI/testing/sysfs-bus-iio95
-rw-r--r--Documentation/ABI/testing/sysfs-bus-iio-trigger-sysfs11
-rw-r--r--Documentation/ABI/testing/sysfs-bus-platform20
-rw-r--r--Documentation/ABI/testing/sysfs-bus-usb-lvstest47
-rw-r--r--Documentation/ABI/testing/sysfs-class-iommu17
-rw-r--r--Documentation/ABI/testing/sysfs-class-iommu-amd-iommu14
-rw-r--r--Documentation/ABI/testing/sysfs-class-iommu-intel-iommu32
-rw-r--r--Documentation/ABI/testing/sysfs-class-mei16
-rw-r--r--Documentation/ABI/testing/sysfs-driver-genwqe9
-rw-r--r--Documentation/ABI/testing/sysfs-platform-ts55007
-rw-r--r--Documentation/ABI/testing/sysfs-tty16
-rw-r--r--Documentation/DocBook/device-drivers.tmpl12
-rw-r--r--Documentation/DocBook/gadget.tmpl10
-rw-r--r--Documentation/DocBook/media/Makefile2
-rw-r--r--Documentation/DocBook/media/dvb/dvbproperty.xml44
-rw-r--r--Documentation/DocBook/media/v4l/controls.xml408
-rw-r--r--Documentation/DocBook/media/v4l/dev-raw-vbi.xml12
-rw-r--r--Documentation/DocBook/media/v4l/dev-sdr.xml18
-rw-r--r--Documentation/DocBook/media/v4l/dev-sliced-vbi.xml9
-rw-r--r--Documentation/DocBook/media/v4l/io.xml9
-rw-r--r--Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml418
-rw-r--r--Documentation/DocBook/media/v4l/pixfmt-sdr-cs08.xml44
-rw-r--r--Documentation/DocBook/media/v4l/pixfmt-sdr-cs14le.xml47
-rw-r--r--Documentation/DocBook/media/v4l/pixfmt-sdr-ru12le.xml40
-rw-r--r--Documentation/DocBook/media/v4l/pixfmt-srggb12.xml2
-rw-r--r--Documentation/DocBook/media/v4l/pixfmt.xml61
-rw-r--r--Documentation/DocBook/media/v4l/selection-api.xml95
-rw-r--r--Documentation/DocBook/media/v4l/v4l2.xml8
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-dqevent.xml50
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml51
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-g-fbuf.xml12
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-g-selection.xml40
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-querycap.xml6
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-queryctrl.xml234
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml8
-rw-r--r--Documentation/RCU/RTFP.txt4
-rw-r--r--Documentation/RCU/rcuref.txt9
-rw-r--r--Documentation/arm64/booting.txt43
-rw-r--r--Documentation/arm64/memory.txt69
-rw-r--r--Documentation/cgroups/cgroups.txt14
-rw-r--r--Documentation/cgroups/unified-hierarchy.txt35
-rw-r--r--Documentation/devicetree/bindings/arm/omap/crossbar.txt36
-rw-r--r--Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt25
-rw-r--r--Documentation/devicetree/bindings/arm/samsung/pmu.txt30
-rw-r--r--Documentation/devicetree/bindings/ata/ahci-platform.txt45
-rw-r--r--Documentation/devicetree/bindings/ata/ahci-st.txt31
-rw-r--r--Documentation/devicetree/bindings/ata/imx-sata.txt36
-rw-r--r--Documentation/devicetree/bindings/ata/tegra-sata.txt30
-rw-r--r--Documentation/devicetree/bindings/clock/clk-palmas-clk32kg-clocks.txt35
-rw-r--r--Documentation/devicetree/bindings/clock/clock-bindings.txt36
-rw-r--r--Documentation/devicetree/bindings/clock/clps711x-clock.txt19
-rw-r--r--Documentation/devicetree/bindings/clock/qcom,gcc.txt2
-rw-r--r--Documentation/devicetree/bindings/clock/qcom,mmcc.txt2
-rw-r--r--Documentation/devicetree/bindings/clock/rockchip,rk3188-cru.txt61
-rw-r--r--Documentation/devicetree/bindings/clock/rockchip,rk3288-cru.txt61
-rw-r--r--Documentation/devicetree/bindings/clock/rockchip.txt3
-rw-r--r--Documentation/devicetree/bindings/clock/st/st,clkgen-divmux.txt28
-rw-r--r--Documentation/devicetree/bindings/clock/st/st,clkgen-mux.txt6
-rw-r--r--Documentation/devicetree/bindings/clock/st/st,clkgen-pll.txt17
-rw-r--r--Documentation/devicetree/bindings/clock/st/st,clkgen-prediv.txt8
-rw-r--r--Documentation/devicetree/bindings/clock/st/st,clkgen-vcc.txt34
-rw-r--r--Documentation/devicetree/bindings/clock/st/st,clkgen.txt59
-rw-r--r--Documentation/devicetree/bindings/clock/st/st,flexgen.txt119
-rw-r--r--Documentation/devicetree/bindings/clock/st/st,quadfs.txt15
-rw-r--r--Documentation/devicetree/bindings/clock/sunxi.txt7
-rw-r--r--Documentation/devicetree/bindings/crypto/amd-ccp.txt19
-rw-r--r--Documentation/devicetree/bindings/crypto/qcom-qce.txt25
-rw-r--r--Documentation/devicetree/bindings/extcon/extcon-sm5502.txt23
-rw-r--r--Documentation/devicetree/bindings/hwmon/ibmpowernv.txt23
-rw-r--r--Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt1
-rw-r--r--Documentation/devicetree/bindings/hwmon/pwm-fan.txt12
-rw-r--r--Documentation/devicetree/bindings/i2c/trivial-devices.txt2
-rw-r--r--Documentation/devicetree/bindings/iio/adc/max1027-adc.txt22
-rw-r--r--Documentation/devicetree/bindings/iio/magnetometer/hmc5843.txt4
-rw-r--r--Documentation/devicetree/bindings/iio/st-sensors.txt54
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/atmel,aic.txt (renamed from Documentation/devicetree/bindings/arm/atmel-aic.txt)0
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/opencores,or1k-pic.txt23
-rw-r--r--Documentation/devicetree/bindings/iommu/arm,smmu.txt6
-rw-r--r--Documentation/devicetree/bindings/iommu/iommu.txt182
-rw-r--r--Documentation/devicetree/bindings/media/atmel-isi.txt51
-rw-r--r--Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt12
-rw-r--r--Documentation/devicetree/bindings/media/i2c/mt9m111.txt28
-rw-r--r--Documentation/devicetree/bindings/media/pxa-camera.txt43
-rw-r--r--Documentation/devicetree/bindings/media/rcar_vin.txt86
-rw-r--r--Documentation/devicetree/bindings/media/sunxi-ir.txt23
-rw-r--r--Documentation/devicetree/bindings/mfd/palmas.txt2
-rw-r--r--Documentation/devicetree/bindings/phy/berlin-sata-phy.txt34
-rw-r--r--Documentation/devicetree/bindings/phy/hix5hd2-phy.txt22
-rw-r--r--Documentation/devicetree/bindings/phy/phy-bindings.txt4
-rw-r--r--Documentation/devicetree/bindings/phy/phy-miphy365x.txt76
-rw-r--r--Documentation/devicetree/bindings/phy/qcom-apq8064-sata-phy.txt24
-rw-r--r--Documentation/devicetree/bindings/phy/qcom-ipq806x-sata-phy.txt23
-rw-r--r--Documentation/devicetree/bindings/phy/samsung-phy.txt2
-rw-r--r--Documentation/devicetree/bindings/phy/ti-phy.txt23
-rw-r--r--Documentation/devicetree/bindings/regulator/act8865-regulator.txt7
-rw-r--r--Documentation/devicetree/bindings/regulator/palmas-pmic.txt1
-rw-r--r--Documentation/devicetree/bindings/regulator/tps65218.txt23
-rw-r--r--Documentation/devicetree/bindings/serial/efm32-uart.txt4
-rw-r--r--Documentation/devicetree/bindings/serial/fsl-lpuart.txt6
-rw-r--r--Documentation/devicetree/bindings/serial/samsung_uart.txt56
-rw-r--r--Documentation/devicetree/bindings/serial/snps-dw-apb-uart.txt32
-rw-r--r--Documentation/devicetree/bindings/spi/efm32-spi.txt13
-rw-r--r--Documentation/devicetree/bindings/spi/qcom,spi-qup.txt6
-rw-r--r--Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.txt28
-rw-r--r--Documentation/devicetree/bindings/spi/spi-davinci.txt9
-rw-r--r--Documentation/devicetree/bindings/spi/spi-rockchip.txt37
-rw-r--r--Documentation/devicetree/bindings/spi/spi-samsung.txt26
-rw-r--r--Documentation/devicetree/bindings/timer/cirrus,clps711x-timer.txt29
-rw-r--r--Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt17
-rw-r--r--Documentation/devicetree/bindings/timer/renesas,cmt.txt47
-rw-r--r--Documentation/devicetree/bindings/timer/renesas,mtu2.txt39
-rw-r--r--Documentation/devicetree/bindings/timer/renesas,tmu.txt39
-rw-r--r--Documentation/devicetree/bindings/usb/ci-hdrc-imx.txt2
-rw-r--r--Documentation/devicetree/bindings/usb/nvidia,tegra20-usb-phy.txt8
-rw-r--r--Documentation/devicetree/bindings/usb/usb-xhci.txt3
-rw-r--r--Documentation/devicetree/bindings/vendor-prefixes.txt2
-rw-r--r--Documentation/driver-model/devres.txt112
-rwxr-xr-xDocumentation/dvb/get_dvb_firmware33
-rw-r--r--Documentation/filesystems/caching/operations.txt2
-rw-r--r--Documentation/filesystems/f2fs.txt5
-rw-r--r--Documentation/filesystems/proc.txt19
-rw-r--r--Documentation/firmware_class/README6
-rw-r--r--Documentation/hwmon/ibmpowernv41
-rw-r--r--Documentation/hwmon/lm755
-rw-r--r--Documentation/hwmon/ntc_thermistor5
-rw-r--r--Documentation/hwmon/pmbus5
-rw-r--r--Documentation/hwmon/powr122045
-rw-r--r--Documentation/hwmon/pwm-fan17
-rw-r--r--Documentation/hwmon/tmp10328
-rw-r--r--Documentation/hwmon/tmp42126
-rw-r--r--Documentation/hwmon/tps4042264
-rw-r--r--Documentation/ioctl/ioctl-number.txt1
-rw-r--r--Documentation/kernel-parameters.txt39
-rw-r--r--Documentation/memory-barriers.txt27
-rw-r--r--Documentation/mic/mic_overview.txt67
-rwxr-xr-xDocumentation/mic/mpssd/mpss14
-rw-r--r--Documentation/phy.txt10
-rw-r--r--Documentation/power/regulator/consumer.txt35
-rw-r--r--Documentation/security/keys.txt14
-rw-r--r--Documentation/stable_kernel_rules.txt3
-rw-r--r--Documentation/timers/00-INDEX2
-rw-r--r--Documentation/timers/timekeeping.txt179
-rw-r--r--Documentation/trace/ftrace-design.txt26
-rw-r--r--Documentation/trace/ftrace.txt2
-rw-r--r--Documentation/usb/hotplug.txt8
-rw-r--r--Documentation/usb/power-management.txt245
-rw-r--r--Documentation/video4linux/CARDLIST.cx238852
-rw-r--r--Documentation/video4linux/CARDLIST.em28xx2
-rw-r--r--Documentation/video4linux/v4l2-controls.txt63
-rw-r--r--Documentation/video4linux/v4l2-framework.txt8
-rw-r--r--Documentation/video4linux/v4l2-pci-skeleton.c5
-rw-r--r--Documentation/virtual/kvm/api.txt345
-rw-r--r--Documentation/w1/slaves/w1_ds240625
-rw-r--r--Documentation/x86/tlb.txt75
-rw-r--r--Documentation/zh_CN/video4linux/v4l2-framework.txt7
157 files changed, 4991 insertions, 770 deletions
diff --git a/Documentation/ABI/stable/sysfs-bus-usb b/Documentation/ABI/stable/sysfs-bus-usb
index a6b685724740..e2bc700a6f9c 100644
--- a/Documentation/ABI/stable/sysfs-bus-usb
+++ b/Documentation/ABI/stable/sysfs-bus-usb
@@ -3,13 +3,13 @@ Date: May 2007
3KernelVersion: 2.6.23 3KernelVersion: 2.6.23
4Contact: Alan Stern <stern@rowland.harvard.edu> 4Contact: Alan Stern <stern@rowland.harvard.edu>
5Description: 5Description:
6 If CONFIG_USB_PERSIST is set, then each USB device directory 6 USB device directories can contain a file named power/persist.
7 will contain a file named power/persist. The file holds a 7 The file holds a boolean value (0 or 1) indicating whether or
8 boolean value (0 or 1) indicating whether or not the 8 not the "USB-Persist" facility is enabled for the device. For
9 "USB-Persist" facility is enabled for the device. Since the 9 hubs this facility is always enabled and their device
10 facility is inherently dangerous, it is disabled by default 10 directories will not contain this file.
11 for all devices except hubs. For more information, see 11
12 Documentation/usb/persist.txt. 12 For more information, see Documentation/usb/persist.txt.
13 13
14What: /sys/bus/usb/devices/.../power/autosuspend 14What: /sys/bus/usb/devices/.../power/autosuspend
15Date: March 2007 15Date: March 2007
diff --git a/Documentation/ABI/testing/ima_policy b/Documentation/ABI/testing/ima_policy
index 4c3efe434806..d0d0c578324c 100644
--- a/Documentation/ABI/testing/ima_policy
+++ b/Documentation/ABI/testing/ima_policy
@@ -26,6 +26,7 @@ Description:
26 option: [[appraise_type=]] [permit_directio] 26 option: [[appraise_type=]] [permit_directio]
27 27
28 base: func:= [BPRM_CHECK][MMAP_CHECK][FILE_CHECK][MODULE_CHECK] 28 base: func:= [BPRM_CHECK][MMAP_CHECK][FILE_CHECK][MODULE_CHECK]
29 [FIRMWARE_CHECK]
29 mask:= [MAY_READ] [MAY_WRITE] [MAY_APPEND] [MAY_EXEC] 30 mask:= [MAY_READ] [MAY_WRITE] [MAY_APPEND] [MAY_EXEC]
30 fsmagic:= hex value 31 fsmagic:= hex value
31 fsuuid:= file system UUID (e.g 8bcbe394-4f13-4144-be8e-5aa9ea2ce2f6) 32 fsuuid:= file system UUID (e.g 8bcbe394-4f13-4144-be8e-5aa9ea2ce2f6)
@@ -57,7 +58,8 @@ Description:
57 measure func=BPRM_CHECK 58 measure func=BPRM_CHECK
58 measure func=FILE_MMAP mask=MAY_EXEC 59 measure func=FILE_MMAP mask=MAY_EXEC
59 measure func=FILE_CHECK mask=MAY_READ uid=0 60 measure func=FILE_CHECK mask=MAY_READ uid=0
60 measure func=MODULE_CHECK uid=0 61 measure func=MODULE_CHECK
62 measure func=FIRMWARE_CHECK
61 appraise fowner=0 63 appraise fowner=0
62 64
63 The default policy measures all executables in bprm_check, 65 The default policy measures all executables in bprm_check,
diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
index a9757dcf2e81..d760b0224ef7 100644
--- a/Documentation/ABI/testing/sysfs-bus-iio
+++ b/Documentation/ABI/testing/sysfs-bus-iio
@@ -260,6 +260,10 @@ What: /sys/bus/iio/devices/iio:deviceX/in_magn_scale
260What: /sys/bus/iio/devices/iio:deviceX/in_magn_x_scale 260What: /sys/bus/iio/devices/iio:deviceX/in_magn_x_scale
261What: /sys/bus/iio/devices/iio:deviceX/in_magn_y_scale 261What: /sys/bus/iio/devices/iio:deviceX/in_magn_y_scale
262What: /sys/bus/iio/devices/iio:deviceX/in_magn_z_scale 262What: /sys/bus/iio/devices/iio:deviceX/in_magn_z_scale
263What: /sys/bus/iio/devices/iio:deviceX/in_rot_from_north_magnetic_scale
264What: /sys/bus/iio/devices/iio:deviceX/in_rot_from_north_true_scale
265What: /sys/bus/iio/devices/iio:deviceX/in_rot_from_north_magnetic_tilt_comp_scale
266What: /sys/bus/iio/devices/iio:deviceX/in_rot_from_north_true_tilt_comp_scale
263What: /sys/bus/iio/devices/iio:deviceX/in_pressureY_scale 267What: /sys/bus/iio/devices/iio:deviceX/in_pressureY_scale
264What: /sys/bus/iio/devices/iio:deviceX/in_pressure_scale 268What: /sys/bus/iio/devices/iio:deviceX/in_pressure_scale
265KernelVersion: 2.6.35 269KernelVersion: 2.6.35
@@ -447,6 +451,14 @@ What: /sys/.../iio:deviceX/events/in_magn_y_thresh_rising_en
447What: /sys/.../iio:deviceX/events/in_magn_y_thresh_falling_en 451What: /sys/.../iio:deviceX/events/in_magn_y_thresh_falling_en
448What: /sys/.../iio:deviceX/events/in_magn_z_thresh_rising_en 452What: /sys/.../iio:deviceX/events/in_magn_z_thresh_rising_en
449What: /sys/.../iio:deviceX/events/in_magn_z_thresh_falling_en 453What: /sys/.../iio:deviceX/events/in_magn_z_thresh_falling_en
454What: /sys/.../iio:deviceX/events/in_rot_from_north_magnetic_thresh_rising_en
455What: /sys/.../iio:deviceX/events/in_rot_from_north_magnetic_thresh_falling_en
456What: /sys/.../iio:deviceX/events/in_rot_from_north_true_thresh_rising_en
457What: /sys/.../iio:deviceX/events/in_rot_from_north_true_thresh_falling_en
458What: /sys/.../iio:deviceX/events/in_rot_from_north_magnetic_tilt_comp_thresh_rising_en
459What: /sys/.../iio:deviceX/events/in_rot_from_north_magnetic_tilt_comp_thresh_falling_en
460What: /sys/.../iio:deviceX/events/in_rot_from_north_true_tilt_comp_thresh_rising_en
461What: /sys/.../iio:deviceX/events/in_rot_from_north_true_tilt_comp_thresh_falling_en
450What: /sys/.../iio:deviceX/events/in_voltageY_supply_thresh_rising_en 462What: /sys/.../iio:deviceX/events/in_voltageY_supply_thresh_rising_en
451What: /sys/.../iio:deviceX/events/in_voltageY_supply_thresh_falling_en 463What: /sys/.../iio:deviceX/events/in_voltageY_supply_thresh_falling_en
452What: /sys/.../iio:deviceX/events/in_voltageY_thresh_rising_en 464What: /sys/.../iio:deviceX/events/in_voltageY_thresh_rising_en
@@ -492,6 +504,14 @@ What: /sys/.../iio:deviceX/events/in_magn_y_roc_rising_en
492What: /sys/.../iio:deviceX/events/in_magn_y_roc_falling_en 504What: /sys/.../iio:deviceX/events/in_magn_y_roc_falling_en
493What: /sys/.../iio:deviceX/events/in_magn_z_roc_rising_en 505What: /sys/.../iio:deviceX/events/in_magn_z_roc_rising_en
494What: /sys/.../iio:deviceX/events/in_magn_z_roc_falling_en 506What: /sys/.../iio:deviceX/events/in_magn_z_roc_falling_en
507What: /sys/.../iio:deviceX/events/in_rot_from_north_magnetic_roc_rising_en
508What: /sys/.../iio:deviceX/events/in_rot_from_north_magnetic_roc_falling_en
509What: /sys/.../iio:deviceX/events/in_rot_from_north_true_roc_rising_en
510What: /sys/.../iio:deviceX/events/in_rot_from_north_true_roc_falling_en
511What: /sys/.../iio:deviceX/events/in_rot_from_north_magnetic_tilt_comp_roc_rising_en
512What: /sys/.../iio:deviceX/events/in_rot_from_north_magnetic_tilt_comp_roc_falling_en
513What: /sys/.../iio:deviceX/events/in_rot_from_north_true_tilt_comp_roc_rising_en
514What: /sys/.../iio:deviceX/events/in_rot_from_north_true_tilt_comp_roc_falling_en
495What: /sys/.../iio:deviceX/events/in_voltageY_supply_roc_rising_en 515What: /sys/.../iio:deviceX/events/in_voltageY_supply_roc_rising_en
496What: /sys/.../iio:deviceX/events/in_voltageY_supply_roc_falling_en 516What: /sys/.../iio:deviceX/events/in_voltageY_supply_roc_falling_en
497What: /sys/.../iio:deviceX/events/in_voltageY_roc_rising_en 517What: /sys/.../iio:deviceX/events/in_voltageY_roc_rising_en
@@ -538,6 +558,14 @@ What: /sys/.../events/in_magn_y_raw_thresh_rising_value
538What: /sys/.../events/in_magn_y_raw_thresh_falling_value 558What: /sys/.../events/in_magn_y_raw_thresh_falling_value
539What: /sys/.../events/in_magn_z_raw_thresh_rising_value 559What: /sys/.../events/in_magn_z_raw_thresh_rising_value
540What: /sys/.../events/in_magn_z_raw_thresh_falling_value 560What: /sys/.../events/in_magn_z_raw_thresh_falling_value
561What: /sys/.../events/in_rot_from_north_magnetic_raw_thresh_rising_value
562What: /sys/.../events/in_rot_from_north_magnetic_raw_thresh_falling_value
563What: /sys/.../events/in_rot_from_north_true_raw_thresh_rising_value
564What: /sys/.../events/in_rot_from_north_true_raw_thresh_falling_value
565What: /sys/.../events/in_rot_from_north_magnetic_tilt_comp_raw_thresh_rising_value
566What: /sys/.../events/in_rot_from_north_magnetic_tilt_comp_raw_thresh_falling_value
567What: /sys/.../events/in_rot_from_north_true_tilt_comp_raw_thresh_rising_value
568What: /sys/.../events/in_rot_from_north_true_tilt_comp_raw_thresh_falling_value
541What: /sys/.../events/in_voltageY_supply_raw_thresh_rising_value 569What: /sys/.../events/in_voltageY_supply_raw_thresh_rising_value
542What: /sys/.../events/in_voltageY_supply_raw_thresh_falling_value 570What: /sys/.../events/in_voltageY_supply_raw_thresh_falling_value
543What: /sys/.../events/in_voltageY_raw_thresh_rising_value 571What: /sys/.../events/in_voltageY_raw_thresh_rising_value
@@ -588,6 +616,18 @@ What: /sys/.../events/in_magn_y_thresh_either_hysteresis
588What: /sys/.../events/in_magn_z_thresh_rising_hysteresis 616What: /sys/.../events/in_magn_z_thresh_rising_hysteresis
589What: /sys/.../events/in_magn_z_thresh_falling_hysteresis 617What: /sys/.../events/in_magn_z_thresh_falling_hysteresis
590What: /sys/.../events/in_magn_z_thresh_either_hysteresis 618What: /sys/.../events/in_magn_z_thresh_either_hysteresis
619What: /sys/.../events/in_rot_from_north_magnetic_thresh_rising_hysteresis
620What: /sys/.../events/in_rot_from_north_magnetic_thresh_falling_hysteresis
621What: /sys/.../events/in_rot_from_north_magnetic_thresh_either_hysteresis
622What: /sys/.../events/in_rot_from_north_true_thresh_rising_hysteresis
623What: /sys/.../events/in_rot_from_north_true_thresh_falling_hysteresis
624What: /sys/.../events/in_rot_from_north_true_thresh_either_hysteresis
625What: /sys/.../events/in_rot_from_north_magnetic_tilt_comp_thresh_rising_hysteresis
626What: /sys/.../events/in_rot_from_north_magnetic_tilt_comp_thresh_falling_hysteresis
627What: /sys/.../events/in_rot_from_north_magnetic_tilt_comp_thresh_either_hysteresis
628What: /sys/.../events/in_rot_from_north_true_tilt_comp_thresh_rising_hysteresis
629What: /sys/.../events/in_rot_from_north_true_tilt_comp_thresh_falling_hysteresis
630What: /sys/.../events/in_rot_from_north_true_tilt_comp_thresh_either_hysteresis
591What: /sys/.../events/in_voltageY_thresh_rising_hysteresis 631What: /sys/.../events/in_voltageY_thresh_rising_hysteresis
592What: /sys/.../events/in_voltageY_thresh_falling_hysteresis 632What: /sys/.../events/in_voltageY_thresh_falling_hysteresis
593What: /sys/.../events/in_voltageY_thresh_either_hysteresis 633What: /sys/.../events/in_voltageY_thresh_either_hysteresis
@@ -635,6 +675,14 @@ What: /sys/.../events/in_magn_y_raw_roc_rising_value
635What: /sys/.../events/in_magn_y_raw_roc_falling_value 675What: /sys/.../events/in_magn_y_raw_roc_falling_value
636What: /sys/.../events/in_magn_z_raw_roc_rising_value 676What: /sys/.../events/in_magn_z_raw_roc_rising_value
637What: /sys/.../events/in_magn_z_raw_roc_falling_value 677What: /sys/.../events/in_magn_z_raw_roc_falling_value
678What: /sys/.../events/in_rot_from_north_magnetic_raw_roc_rising_value
679What: /sys/.../events/in_rot_from_north_magnetic_raw_roc_falling_value
680What: /sys/.../events/in_rot_from_north_true_raw_roc_rising_value
681What: /sys/.../events/in_rot_from_north_true_raw_roc_falling_value
682What: /sys/.../events/in_rot_from_north_magnetic_tilt_comp_raw_roc_rising_value
683What: /sys/.../events/in_rot_from_north_magnetic_tilt_comp_raw_roc_falling_value
684What: /sys/.../events/in_rot_from_north_true_tilt_comp_raw_roc_rising_value
685What: /sys/.../events/in_rot_from_north_true_tilt_comp_raw_roc_falling_value
638What: /sys/.../events/in_voltageY_supply_raw_roc_rising_value 686What: /sys/.../events/in_voltageY_supply_raw_roc_rising_value
639What: /sys/.../events/in_voltageY_supply_raw_roc_falling_value 687What: /sys/.../events/in_voltageY_supply_raw_roc_falling_value
640What: /sys/.../events/in_voltageY_raw_roc_rising_value 688What: /sys/.../events/in_voltageY_raw_roc_rising_value
@@ -690,6 +738,22 @@ What: /sys/.../events/in_magn_z_thresh_rising_period
690What: /sys/.../events/in_magn_z_thresh_falling_period 738What: /sys/.../events/in_magn_z_thresh_falling_period
691What: /sys/.../events/in_magn_z_roc_rising_period 739What: /sys/.../events/in_magn_z_roc_rising_period
692What: /sys/.../events/in_magn_z_roc_falling_period 740What: /sys/.../events/in_magn_z_roc_falling_period
741What: /sys/.../events/in_rot_from_north_magnetic_thresh_rising_period
742What: /sys/.../events/in_rot_from_north_magnetic_thresh_falling_period
743What: /sys/.../events/in_rot_from_north_magnetic_roc_rising_period
744What: /sys/.../events/in_rot_from_north_magnetic_roc_falling_period
745What: /sys/.../events/in_rot_from_north_true_thresh_rising_period
746What: /sys/.../events/in_rot_from_north_true_thresh_falling_period
747What: /sys/.../events/in_rot_from_north_true_roc_rising_period
748What: /sys/.../events/in_rot_from_north_true_roc_falling_period
749What: /sys/.../events/in_rot_from_north_magnetic_tilt_comp_thresh_rising_period
750What: /sys/.../events/in_rot_from_north_magnetic_tilt_comp_thresh_falling_period
751What: /sys/.../events/in_rot_from_north_magnetic_tilt_comp_roc_rising_period
752What: /sys/.../events/in_rot_from_north_magnetic_tilt_comp_roc_falling_period
753What: /sys/.../events/in_rot_from_north_true_tilt_comp_thresh_rising_period
754What: /sys/.../events/in_rot_from_north_true_tilt_comp_thresh_falling_period
755What: /sys/.../events/in_rot_from_north_true_tilt_comp_roc_rising_period
756What: /sys/.../events/in_rot_from_north_true_tilt_comp_roc_falling_period
693What: /sys/.../events/in_voltageY_supply_thresh_rising_period 757What: /sys/.../events/in_voltageY_supply_thresh_rising_period
694What: /sys/.../events/in_voltageY_supply_thresh_falling_period 758What: /sys/.../events/in_voltageY_supply_thresh_falling_period
695What: /sys/.../events/in_voltageY_supply_roc_rising_period 759What: /sys/.../events/in_voltageY_supply_roc_rising_period
@@ -787,6 +851,10 @@ What: /sys/.../iio:deviceX/scan_elements/in_anglvel_z_en
787What: /sys/.../iio:deviceX/scan_elements/in_magn_x_en 851What: /sys/.../iio:deviceX/scan_elements/in_magn_x_en
788What: /sys/.../iio:deviceX/scan_elements/in_magn_y_en 852What: /sys/.../iio:deviceX/scan_elements/in_magn_y_en
789What: /sys/.../iio:deviceX/scan_elements/in_magn_z_en 853What: /sys/.../iio:deviceX/scan_elements/in_magn_z_en
854What: /sys/.../iio:deviceX/scan_elements/in_rot_from_north_magnetic_en
855What: /sys/.../iio:deviceX/scan_elements/in_rot_from_north_true_en
856What: /sys/.../iio:deviceX/scan_elements/in_rot_from_north_magnetic_tilt_comp_en
857What: /sys/.../iio:deviceX/scan_elements/in_rot_from_north_true_tilt_comp_en
790What: /sys/.../iio:deviceX/scan_elements/in_timestamp_en 858What: /sys/.../iio:deviceX/scan_elements/in_timestamp_en
791What: /sys/.../iio:deviceX/scan_elements/in_voltageY_supply_en 859What: /sys/.../iio:deviceX/scan_elements/in_voltageY_supply_en
792What: /sys/.../iio:deviceX/scan_elements/in_voltageY_en 860What: /sys/.../iio:deviceX/scan_elements/in_voltageY_en
@@ -853,6 +921,10 @@ What: /sys/.../iio:deviceX/scan_elements/in_anglvel_z_index
853What: /sys/.../iio:deviceX/scan_elements/in_magn_x_index 921What: /sys/.../iio:deviceX/scan_elements/in_magn_x_index
854What: /sys/.../iio:deviceX/scan_elements/in_magn_y_index 922What: /sys/.../iio:deviceX/scan_elements/in_magn_y_index
855What: /sys/.../iio:deviceX/scan_elements/in_magn_z_index 923What: /sys/.../iio:deviceX/scan_elements/in_magn_z_index
924What: /sys/.../iio:deviceX/scan_elements/in_rot_from_north_magnetic_index
925What: /sys/.../iio:deviceX/scan_elements/in_rot_from_north_true_index
926What: /sys/.../iio:deviceX/scan_elements/in_rot_from_north_magnetic_tilt_comp_index
927What: /sys/.../iio:deviceX/scan_elements/in_rot_from_north_true_tilt_comp_index
856What: /sys/.../iio:deviceX/scan_elements/in_incli_x_index 928What: /sys/.../iio:deviceX/scan_elements/in_incli_x_index
857What: /sys/.../iio:deviceX/scan_elements/in_incli_y_index 929What: /sys/.../iio:deviceX/scan_elements/in_incli_y_index
858What: /sys/.../iio:deviceX/scan_elements/in_timestamp_index 930What: /sys/.../iio:deviceX/scan_elements/in_timestamp_index
@@ -895,6 +967,19 @@ Description:
895 on-chip EEPROM. After power-up or chip reset the device will 967 on-chip EEPROM. After power-up or chip reset the device will
896 automatically load the saved configuration. 968 automatically load the saved configuration.
897 969
970What: /sys/.../iio:deviceX/in_proximity_raw
971What: /sys/.../iio:deviceX/in_proximity_input
972What: /sys/.../iio:deviceX/in_proximityY_raw
973KernelVersion: 3.4
974Contact: linux-iio@vger.kernel.org
975Description:
976 Proximity measurement indicating that some
977 object is near the sensor, usually be observing
978 reflectivity of infrared or ultrasound emitted.
979 Often these sensors are unit less and as such conversion
980 to SI units is not possible. Where it is, the units should
981 be meters.
982
898What: /sys/.../iio:deviceX/in_illuminanceY_input 983What: /sys/.../iio:deviceX/in_illuminanceY_input
899What: /sys/.../iio:deviceX/in_illuminanceY_raw 984What: /sys/.../iio:deviceX/in_illuminanceY_raw
900What: /sys/.../iio:deviceX/in_illuminanceY_mean_raw 985What: /sys/.../iio:deviceX/in_illuminanceY_mean_raw
@@ -933,3 +1018,13 @@ Description:
933 x y z w. Here x, y, and z component represents the axis about 1018 x y z w. Here x, y, and z component represents the axis about
934 which a rotation will occur and w component represents the 1019 which a rotation will occur and w component represents the
935 amount of rotation. 1020 amount of rotation.
1021
1022What: /sys/bus/iio/devices/iio:deviceX/in_rot_from_north_magnetic_tilt_comp_raw
1023What: /sys/bus/iio/devices/iio:deviceX/in_rot_from_north_true_tilt_comp_raw
1024What: /sys/bus/iio/devices/iio:deviceX/in_rot_from_north_magnetic_raw
1025What: /sys/bus/iio/devices/iio:deviceX/in_rot_from_north_true_raw
1026KernelVersion: 3.15
1027Contact: linux-iio@vger.kernel.org
1028Description:
1029 Raw value of rotation from true/magnetic north measured with
1030 or without compensation from tilt sensors.
diff --git a/Documentation/ABI/testing/sysfs-bus-iio-trigger-sysfs b/Documentation/ABI/testing/sysfs-bus-iio-trigger-sysfs
new file mode 100644
index 000000000000..5235e6c749ab
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-iio-trigger-sysfs
@@ -0,0 +1,11 @@
1What: /sys/bus/iio/devices/triggerX/trigger_now
2KernelVersion: 2.6.38
3Contact: linux-iio@vger.kernel.org
4Description:
5 This file is provided by the iio-trig-sysfs stand-alone trigger
6 driver. Writing this file with any value triggers an event
7 driven driver, associated with this trigger, to capture data
8 into an in kernel buffer. This approach can be valuable during
9 automated testing or in situations, where other trigger methods
10 are not applicable. For example no RTC or spare GPIOs.
11 X is the IIO index of the trigger.
diff --git a/Documentation/ABI/testing/sysfs-bus-platform b/Documentation/ABI/testing/sysfs-bus-platform
new file mode 100644
index 000000000000..5172a6124b27
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-platform
@@ -0,0 +1,20 @@
1What: /sys/bus/platform/devices/.../driver_override
2Date: April 2014
3Contact: Kim Phillips <kim.phillips@freescale.com>
4Description:
5 This file allows the driver for a device to be specified which
6 will override standard OF, ACPI, ID table, and name matching.
7 When specified, only a driver with a name matching the value
8 written to driver_override will have an opportunity to bind
9 to the device. The override is specified by writing a string
10 to the driver_override file (echo vfio-platform > \
11 driver_override) and may be cleared with an empty string
12 (echo > driver_override). This returns the device to standard
13 matching rules binding. Writing to driver_override does not
14 automatically unbind the device from its current driver or make
15 any attempt to automatically load the specified driver. If no
16 driver with a matching name is currently loaded in the kernel,
17 the device will not bind to any driver. This also allows
18 devices to opt-out of driver binding using a driver_override
19 name such as "none". Only a single driver may be specified in
20 the override, there is no support for parsing delimiters.
diff --git a/Documentation/ABI/testing/sysfs-bus-usb-lvstest b/Documentation/ABI/testing/sysfs-bus-usb-lvstest
new file mode 100644
index 000000000000..aae68fc2d842
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-usb-lvstest
@@ -0,0 +1,47 @@
1Link Layer Validation Device is a standard device for testing of Super
2Speed Link Layer tests. These nodes are available in sysfs only when lvs
3driver is bound with root hub device.
4
5What: /sys/bus/usb/devices/.../get_dev_desc
6Date: March 2014
7Contact: Pratyush Anand <pratyush.anand@st.com>
8Description:
9 Write to this node to issue "Get Device Descriptor"
10 for Link Layer Validation device. It is needed for TD.7.06.
11
12What: /sys/bus/usb/devices/.../u1_timeout
13Date: March 2014
14Contact: Pratyush Anand <pratyush.anand@st.com>
15Description:
16 Set "U1 timeout" for the downstream port where Link Layer
17 Validation device is connected. Timeout value must be between 0
18 and 127. It is needed for TD.7.18, TD.7.19, TD.7.20 and TD.7.21.
19
20What: /sys/bus/usb/devices/.../u2_timeout
21Date: March 2014
22Contact: Pratyush Anand <pratyush.anand@st.com>
23Description:
24 Set "U2 timeout" for the downstream port where Link Layer
25 Validation device is connected. Timeout value must be between 0
26 and 127. It is needed for TD.7.18, TD.7.19, TD.7.20 and TD.7.21.
27
28What: /sys/bus/usb/devices/.../hot_reset
29Date: March 2014
30Contact: Pratyush Anand <pratyush.anand@st.com>
31Description:
32 Write to this node to issue "Reset" for Link Layer Validation
33 device. It is needed for TD.7.29, TD.7.31, TD.7.34 and TD.7.35.
34
35What: /sys/bus/usb/devices/.../u3_entry
36Date: March 2014
37Contact: Pratyush Anand <pratyush.anand@st.com>
38Description:
39 Write to this node to issue "U3 entry" for Link Layer
40 Validation device. It is needed for TD.7.35 and TD.7.36.
41
42What: /sys/bus/usb/devices/.../u3_exit
43Date: March 2014
44Contact: Pratyush Anand <pratyush.anand@st.com>
45Description:
46 Write to this node to issue "U3 exit" for Link Layer
47 Validation device. It is needed for TD.7.36.
diff --git a/Documentation/ABI/testing/sysfs-class-iommu b/Documentation/ABI/testing/sysfs-class-iommu
new file mode 100644
index 000000000000..6d0a1b4be82d
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-iommu
@@ -0,0 +1,17 @@
1What: /sys/class/iommu/<iommu>/devices/
2Date: June 2014
3KernelVersion: 3.17
4Contact: Alex Williamson <alex.williamson@redhat.com>
5Description:
6 IOMMU drivers are able to link devices managed by a
7 given IOMMU here to allow association of IOMMU to
8 device.
9
10What: /sys/devices/.../iommu
11Date: June 2014
12KernelVersion: 3.17
13Contact: Alex Williamson <alex.williamson@redhat.com>
14Description:
15 IOMMU drivers are able to link the IOMMU for a
16 given device here to allow association of device to
17 IOMMU.
diff --git a/Documentation/ABI/testing/sysfs-class-iommu-amd-iommu b/Documentation/ABI/testing/sysfs-class-iommu-amd-iommu
new file mode 100644
index 000000000000..d6ba8e8a4a97
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-iommu-amd-iommu
@@ -0,0 +1,14 @@
1What: /sys/class/iommu/<iommu>/amd-iommu/cap
2Date: June 2014
3KernelVersion: 3.17
4Contact: Alex Williamson <alex.williamson@redhat.com>
5Description:
6 IOMMU capability header as documented in the AMD IOMMU
7 specification. Format: %x
8
9What: /sys/class/iommu/<iommu>/amd-iommu/features
10Date: June 2014
11KernelVersion: 3.17
12Contact: Alex Williamson <alex.williamson@redhat.com>
13Description:
14 Extended features of the IOMMU. Format: %llx
diff --git a/Documentation/ABI/testing/sysfs-class-iommu-intel-iommu b/Documentation/ABI/testing/sysfs-class-iommu-intel-iommu
new file mode 100644
index 000000000000..258cc246d98e
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-iommu-intel-iommu
@@ -0,0 +1,32 @@
1What: /sys/class/iommu/<iommu>/intel-iommu/address
2Date: June 2014
3KernelVersion: 3.17
4Contact: Alex Williamson <alex.williamson@redhat.com>
5Description:
6 Physical address of the VT-d DRHD for this IOMMU.
7 Format: %llx. This allows association of a sysfs
8 intel-iommu with a DMAR DRHD table entry.
9
10What: /sys/class/iommu/<iommu>/intel-iommu/cap
11Date: June 2014
12KernelVersion: 3.17
13Contact: Alex Williamson <alex.williamson@redhat.com>
14Description:
15 The cached hardware capability register value
16 of this DRHD unit. Format: %llx.
17
18What: /sys/class/iommu/<iommu>/intel-iommu/ecap
19Date: June 2014
20KernelVersion: 3.17
21Contact: Alex Williamson <alex.williamson@redhat.com>
22Description:
23 The cached hardware extended capability register
24 value of this DRHD unit. Format: %llx.
25
26What: /sys/class/iommu/<iommu>/intel-iommu/version
27Date: June 2014
28KernelVersion: 3.17
29Contact: Alex Williamson <alex.williamson@redhat.com>
30Description:
31 The architecture version as reported from the
32 VT-d VER_REG. Format: %d:%d, major:minor
diff --git a/Documentation/ABI/testing/sysfs-class-mei b/Documentation/ABI/testing/sysfs-class-mei
new file mode 100644
index 000000000000..0ec8b8178c41
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-mei
@@ -0,0 +1,16 @@
1What: /sys/class/mei/
2Date: May 2014
3KernelVersion: 3.17
4Contact: Tomas Winkler <tomas.winkler@intel.com>
5Description:
6 The mei/ class sub-directory belongs to mei device class
7
8
9What: /sys/class/mei/meiN/
10Date: May 2014
11KernelVersion: 3.17
12Contact: Tomas Winkler <tomas.winkler@intel.com>
13Description:
14 The /sys/class/mei/meiN directory is created for
15 each probed mei device
16
diff --git a/Documentation/ABI/testing/sysfs-driver-genwqe b/Documentation/ABI/testing/sysfs-driver-genwqe
index 1870737a1f5e..64ac6d567c4b 100644
--- a/Documentation/ABI/testing/sysfs-driver-genwqe
+++ b/Documentation/ABI/testing/sysfs-driver-genwqe
@@ -25,6 +25,15 @@ Date: Oct 2013
25Contact: haver@linux.vnet.ibm.com 25Contact: haver@linux.vnet.ibm.com
26Description: Interface to set the next bitstream to be used. 26Description: Interface to set the next bitstream to be used.
27 27
28What: /sys/class/genwqe/genwqe<n>_card/reload_bitstream
29Date: May 2014
30Contact: klebers@linux.vnet.ibm.com
31Description: Interface to trigger a PCIe card reset to reload the bitstream.
32 sudo sh -c 'echo 1 > \
33 /sys/class/genwqe/genwqe0_card/reload_bitstream'
34 If successfully, the card will come back with the bitstream set
35 on 'next_bitstream'.
36
28What: /sys/class/genwqe/genwqe<n>_card/tempsens 37What: /sys/class/genwqe/genwqe<n>_card/tempsens
29Date: Oct 2013 38Date: Oct 2013
30Contact: haver@linux.vnet.ibm.com 39Contact: haver@linux.vnet.ibm.com
diff --git a/Documentation/ABI/testing/sysfs-platform-ts5500 b/Documentation/ABI/testing/sysfs-platform-ts5500
index c88375a537a1..e685957caa12 100644
--- a/Documentation/ABI/testing/sysfs-platform-ts5500
+++ b/Documentation/ABI/testing/sysfs-platform-ts5500
@@ -30,6 +30,13 @@ Description:
30 the corresponding bit is set. For instance, 0x0e means jumpers 30 the corresponding bit is set. For instance, 0x0e means jumpers
31 2, 3 and 4 are set. 31 2, 3 and 4 are set.
32 32
33What: /sys/devices/platform/ts5500/name
34Date: July 2014
35KernelVersion: 3.16
36Contact: "Savoir-faire Linux Inc." <kernel@savoirfairelinux.com>
37Description:
38 Model name of the TS board, e.g. "TS-5500".
39
33What: /sys/devices/platform/ts5500/rs485 40What: /sys/devices/platform/ts5500/rs485
34Date: January 2013 41Date: January 2013
35KernelVersion: 3.7 42KernelVersion: 3.7
diff --git a/Documentation/ABI/testing/sysfs-tty b/Documentation/ABI/testing/sysfs-tty
index ad22fb0ee765..9eb3c2b6b040 100644
--- a/Documentation/ABI/testing/sysfs-tty
+++ b/Documentation/ABI/testing/sysfs-tty
@@ -138,3 +138,19 @@ Description:
138 138
139 These sysfs values expose the TIOCGSERIAL interface via 139 These sysfs values expose the TIOCGSERIAL interface via
140 sysfs rather than via ioctls. 140 sysfs rather than via ioctls.
141
142What: /sys/class/tty/ttyS0/rx_trig_bytes
143Date: May 2014
144Contact: Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>
145Description:
146 Shows current RX interrupt trigger bytes or sets the
147 user specified value to change it for the FIFO buffer.
148 Users can show or set this value regardless of opening the
149 serial device file or not.
150
151 The RX trigger can be set one of four kinds of values for UART
152 serials. When users input a meaning less value to this I/F,
153 the RX trigger is changed to the nearest lower value for the
154 device specification. For example, when user sets 7bytes on
155 16550A, which has 1/4/8/14 bytes trigger, the RX trigger is
156 automatically changed to 4 bytes.
diff --git a/Documentation/DocBook/device-drivers.tmpl b/Documentation/DocBook/device-drivers.tmpl
index cc63f30de166..f2130586ef5d 100644
--- a/Documentation/DocBook/device-drivers.tmpl
+++ b/Documentation/DocBook/device-drivers.tmpl
@@ -54,7 +54,7 @@
54!Ikernel/sched/cpupri.c 54!Ikernel/sched/cpupri.c
55!Ikernel/sched/fair.c 55!Ikernel/sched/fair.c
56!Iinclude/linux/completion.h 56!Iinclude/linux/completion.h
57!Ekernel/timer.c 57!Ekernel/time/timer.c
58 </sect1> 58 </sect1>
59 <sect1><title>Wait queues and Wake events</title> 59 <sect1><title>Wait queues and Wake events</title>
60!Iinclude/linux/wait.h 60!Iinclude/linux/wait.h
@@ -63,7 +63,7 @@
63 <sect1><title>High-resolution timers</title> 63 <sect1><title>High-resolution timers</title>
64!Iinclude/linux/ktime.h 64!Iinclude/linux/ktime.h
65!Iinclude/linux/hrtimer.h 65!Iinclude/linux/hrtimer.h
66!Ekernel/hrtimer.c 66!Ekernel/time/hrtimer.c
67 </sect1> 67 </sect1>
68 <sect1><title>Workqueues and Kevents</title> 68 <sect1><title>Workqueues and Kevents</title>
69!Ekernel/workqueue.c 69!Ekernel/workqueue.c
@@ -128,8 +128,12 @@ X!Edrivers/base/interface.c
128!Edrivers/base/bus.c 128!Edrivers/base/bus.c
129 </sect1> 129 </sect1>
130 <sect1><title>Device Drivers DMA Management</title> 130 <sect1><title>Device Drivers DMA Management</title>
131!Edrivers/base/dma-buf.c 131!Edrivers/dma-buf/dma-buf.c
132!Edrivers/base/reservation.c 132!Edrivers/dma-buf/fence.c
133!Edrivers/dma-buf/seqno-fence.c
134!Iinclude/linux/fence.h
135!Iinclude/linux/seqno-fence.h
136!Edrivers/dma-buf/reservation.c
133!Iinclude/linux/reservation.h 137!Iinclude/linux/reservation.h
134!Edrivers/base/dma-coherent.c 138!Edrivers/base/dma-coherent.c
135!Edrivers/base/dma-mapping.c 139!Edrivers/base/dma-mapping.c
diff --git a/Documentation/DocBook/gadget.tmpl b/Documentation/DocBook/gadget.tmpl
index 2c425d70f7e2..641629221176 100644
--- a/Documentation/DocBook/gadget.tmpl
+++ b/Documentation/DocBook/gadget.tmpl
@@ -556,11 +556,11 @@ been converted to this framework.
556Near-term plans include converting all of them, except for "gadgetfs". 556Near-term plans include converting all of them, except for "gadgetfs".
557</para> 557</para>
558 558
559!Edrivers/usb/gadget/f_acm.c 559!Edrivers/usb/gadget/function/f_acm.c
560!Edrivers/usb/gadget/f_ecm.c 560!Edrivers/usb/gadget/function/f_ecm.c
561!Edrivers/usb/gadget/f_subset.c 561!Edrivers/usb/gadget/function/f_subset.c
562!Edrivers/usb/gadget/f_obex.c 562!Edrivers/usb/gadget/function/f_obex.c
563!Edrivers/usb/gadget/f_serial.c 563!Edrivers/usb/gadget/function/f_serial.c
564 564
565</sect1> 565</sect1>
566 566
diff --git a/Documentation/DocBook/media/Makefile b/Documentation/DocBook/media/Makefile
index 639e74857968..df2962d9e11e 100644
--- a/Documentation/DocBook/media/Makefile
+++ b/Documentation/DocBook/media/Makefile
@@ -174,7 +174,7 @@ FILENAME = \
174DOCUMENTED = \ 174DOCUMENTED = \
175 -e "s/\(enum *\)v4l2_mpeg_cx2341x_video_\([a-z]*_spatial_filter_type\)/\1<link linkend=\"\2\">v4l2_mpeg_cx2341x_video_\2<\/link>/g" \ 175 -e "s/\(enum *\)v4l2_mpeg_cx2341x_video_\([a-z]*_spatial_filter_type\)/\1<link linkend=\"\2\">v4l2_mpeg_cx2341x_video_\2<\/link>/g" \
176 -e "s/\(\(enum\|struct\) *\)\(v4l2_[a-zA-Z0-9_]*\)/\1<link linkend=\"\3\">\3<\/link>/g" \ 176 -e "s/\(\(enum\|struct\) *\)\(v4l2_[a-zA-Z0-9_]*\)/\1<link linkend=\"\3\">\3<\/link>/g" \
177 -e "s/\(V4L2_PIX_FMT_[A-Z0-9_]\+\) /<link linkend=\"\1\">\1<\/link> /g" \ 177 -e "s/\(V4L2_PIX_FMT_[A-Z0-9_]\+\)\(\s\+v4l2_fourcc\)/<link linkend=\"\1\">\1<\/link>\2/g" \
178 -e ":a;s/\(linkend=\".*\)_\(.*\">\)/\1-\2/;ta" \ 178 -e ":a;s/\(linkend=\".*\)_\(.*\">\)/\1-\2/;ta" \
179 -e "s/v4l2\-mpeg\-vbi\-ITV0/v4l2-mpeg-vbi-itv0-1/g" 179 -e "s/v4l2\-mpeg\-vbi\-ITV0/v4l2-mpeg-vbi-itv0-1/g"
180 180
diff --git a/Documentation/DocBook/media/dvb/dvbproperty.xml b/Documentation/DocBook/media/dvb/dvbproperty.xml
index 24c22cabc668..948ddaab592e 100644
--- a/Documentation/DocBook/media/dvb/dvbproperty.xml
+++ b/Documentation/DocBook/media/dvb/dvbproperty.xml
@@ -555,10 +555,46 @@ typedef enum fe_delivery_system {
555 </section> 555 </section>
556 <section id="DTV-ISDBT-LAYER-TIME-INTERLEAVING"> 556 <section id="DTV-ISDBT-LAYER-TIME-INTERLEAVING">
557 <title><constant>DTV_ISDBT_LAYER*_TIME_INTERLEAVING</constant></title> 557 <title><constant>DTV_ISDBT_LAYER*_TIME_INTERLEAVING</constant></title>
558 <para>Possible values: 0, 1, 2, 3, -1 (AUTO)</para> 558 <para>Valid values: 0, 1, 2, 4, -1 (AUTO)</para>
559 <para>Note: The real inter-leaver depth-names depend on the mode (fft-size); the values 559 <para>when DTV_ISDBT_SOUND_BROADCASTING is active, value 8 is also valid.</para>
560 here are referring to what can be found in the TMCC-structure - 560 <para>Note: The real time interleaving length depends on the mode (fft-size). The values
561 independent of the mode.</para> 561 here are referring to what can be found in the TMCC-structure, as shown in the table below.</para>
562 <informaltable id="isdbt-layer-interleaving-table">
563 <tgroup cols="4" align="center">
564 <tbody>
565 <row>
566 <entry>DTV_ISDBT_LAYER*_TIME_INTERLEAVING</entry>
567 <entry>Mode 1 (2K FFT)</entry>
568 <entry>Mode 2 (4K FFT)</entry>
569 <entry>Mode 3 (8K FFT)</entry>
570 </row>
571 <row>
572 <entry>0</entry>
573 <entry>0</entry>
574 <entry>0</entry>
575 <entry>0</entry>
576 </row>
577 <row>
578 <entry>1</entry>
579 <entry>4</entry>
580 <entry>2</entry>
581 <entry>1</entry>
582 </row>
583 <row>
584 <entry>2</entry>
585 <entry>8</entry>
586 <entry>4</entry>
587 <entry>2</entry>
588 </row>
589 <row>
590 <entry>4</entry>
591 <entry>16</entry>
592 <entry>8</entry>
593 <entry>4</entry>
594 </row>
595 </tbody>
596 </tgroup>
597 </informaltable>
562 </section> 598 </section>
563 <section id="DTV-ATSCMH-FIC-VER"> 599 <section id="DTV-ATSCMH-FIC-VER">
564 <title><constant>DTV_ATSCMH_FIC_VER</constant></title> 600 <title><constant>DTV_ATSCMH_FIC_VER</constant></title>
diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml
index 47198eef75a4..9f5ffd85560b 100644
--- a/Documentation/DocBook/media/v4l/controls.xml
+++ b/Documentation/DocBook/media/v4l/controls.xml
@@ -13,6 +13,19 @@ correctly with any device.</para>
13 <para>All controls are accessed using an ID value. V4L2 defines 13 <para>All controls are accessed using an ID value. V4L2 defines
14several IDs for specific purposes. Drivers can also implement their 14several IDs for specific purposes. Drivers can also implement their
15own custom controls using <constant>V4L2_CID_PRIVATE_BASE</constant> 15own custom controls using <constant>V4L2_CID_PRIVATE_BASE</constant>
16<footnote><para>The use of <constant>V4L2_CID_PRIVATE_BASE</constant>
17is problematic because different drivers may use the same
18<constant>V4L2_CID_PRIVATE_BASE</constant> ID for different controls.
19This makes it hard to programatically set such controls since the meaning
20of the control with that ID is driver dependent. In order to resolve this
21drivers use unique IDs and the <constant>V4L2_CID_PRIVATE_BASE</constant>
22IDs are mapped to those unique IDs by the kernel. Consider these
23<constant>V4L2_CID_PRIVATE_BASE</constant> IDs as aliases to the real
24IDs.</para>
25<para>Many applications today still use the <constant>V4L2_CID_PRIVATE_BASE</constant>
26IDs instead of using &VIDIOC-QUERYCTRL; with the <constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant>
27flag to enumerate all IDs, so support for <constant>V4L2_CID_PRIVATE_BASE</constant>
28is still around.</para></footnote>
16and higher values. The pre-defined control IDs have the prefix 29and higher values. The pre-defined control IDs have the prefix
17<constant>V4L2_CID_</constant>, and are listed in <xref 30<constant>V4L2_CID_</constant>, and are listed in <xref
18linkend="control-id" />. The ID is used when querying the attributes of 31linkend="control-id" />. The ID is used when querying the attributes of
@@ -31,25 +44,22 @@ the current video input or output, tuner or modulator, or audio input
31or output. Different in the sense of other bounds, another default and 44or output. Different in the sense of other bounds, another default and
32current value, step size or other menu items. A control with a certain 45current value, step size or other menu items. A control with a certain
33<emphasis>custom</emphasis> ID can also change name and 46<emphasis>custom</emphasis> ID can also change name and
34type.<footnote> 47type.</para>
35 <para>It will be more convenient for applications if drivers 48
36make use of the <constant>V4L2_CTRL_FLAG_DISABLED</constant> flag, but 49 <para>If a control is not applicable to the current configuration
37that was never required.</para> 50of the device (for example, it doesn't apply to the current video input)
38 </footnote> Control values are stored globally, they do not 51drivers set the <constant>V4L2_CTRL_FLAG_INACTIVE</constant> flag.</para>
52
53 <para>Control values are stored globally, they do not
39change when switching except to stay within the reported bounds. They 54change when switching except to stay within the reported bounds. They
40also do not change &eg; when the device is opened or closed, when the 55also do not change &eg; when the device is opened or closed, when the
41tuner radio frequency is changed or generally never without 56tuner radio frequency is changed or generally never without
42application request. Since V4L2 specifies no event mechanism, panel 57application request.</para>
43applications intended to cooperate with other panel applications (be 58
44they built into a larger application, as a TV viewer) may need to 59 <para>V4L2 specifies an event mechanism to notify applications
45regularly poll control values to update their user 60when controls change value (see &VIDIOC-SUBSCRIBE-EVENT;, event
46interface.<footnote> 61<constant>V4L2_EVENT_CTRL</constant>), panel applications might want to make
47 <para>Applications could call an ioctl to request events. 62use of that in order to always reflect the correct control value.</para>
48After another process called &VIDIOC-S-CTRL; or another ioctl changing
49shared properties the &func-select; function would indicate
50readability until any ioctl (querying the properties) is
51called.</para>
52 </footnote></para>
53 63
54 <para> 64 <para>
55 All controls use machine endianness. 65 All controls use machine endianness.
@@ -398,14 +408,17 @@ to work.</entry>
398 <row id="v4l2-alpha-component"> 408 <row id="v4l2-alpha-component">
399 <entry><constant>V4L2_CID_ALPHA_COMPONENT</constant></entry> 409 <entry><constant>V4L2_CID_ALPHA_COMPONENT</constant></entry>
400 <entry>integer</entry> 410 <entry>integer</entry>
401 <entry> Sets the alpha color component on the capture device or on 411 <entry>Sets the alpha color component. When a capture device (or
402 the capture buffer queue of a mem-to-mem device. When a mem-to-mem 412 capture queue of a mem-to-mem device) produces a frame format that
403 device produces frame format that includes an alpha component 413 includes an alpha component
404 (e.g. <link linkend="rgb-formats">packed RGB image formats</link>) 414 (e.g. <link linkend="rgb-formats">packed RGB image formats</link>)
405 and the alpha value is not defined by the mem-to-mem input data 415 and the alpha value is not defined by the device or the mem-to-mem
406 this control lets you select the alpha component value of all 416 input data this control lets you select the alpha component value of
407 pixels. It is applicable to any pixel format that contains an alpha 417 all pixels. When an output device (or output queue of a mem-to-mem
408 component. 418 device) consumes a frame format that doesn't include an alpha
419 component and the device supports alpha channel processing this
420 control lets you set the alpha component value of all pixels for
421 further processing in the device.
409 </entry> 422 </entry>
410 </row> 423 </row>
411 <row> 424 <row>
@@ -434,127 +447,152 @@ Drivers must implement <constant>VIDIOC_QUERYCTRL</constant>,
434controls, <constant>VIDIOC_QUERYMENU</constant> when it has one or 447controls, <constant>VIDIOC_QUERYMENU</constant> when it has one or
435more menu type controls.</para> 448more menu type controls.</para>
436 449
437 <example> 450 <example id="enum_all_controls">
438 <title>Enumerating all controls</title> 451 <title>Enumerating all user controls</title>
439 452
440 <programlisting> 453 <programlisting>
441&v4l2-queryctrl; queryctrl; 454&v4l2-queryctrl; queryctrl;
442&v4l2-querymenu; querymenu; 455&v4l2-querymenu; querymenu;
443 456
444static void 457static void enumerate_menu(void)
445enumerate_menu (void)
446{ 458{
447 printf (" Menu items:\n"); 459 printf(" Menu items:\n");
448 460
449 memset (&amp;querymenu, 0, sizeof (querymenu)); 461 memset(&amp;querymenu, 0, sizeof(querymenu));
450 querymenu.id = queryctrl.id; 462 querymenu.id = queryctrl.id;
451 463
452 for (querymenu.index = queryctrl.minimum; 464 for (querymenu.index = queryctrl.minimum;
453 querymenu.index &lt;= queryctrl.maximum; 465 querymenu.index &lt;= queryctrl.maximum;
454 querymenu.index++) { 466 querymenu.index++) {
455 if (0 == ioctl (fd, &VIDIOC-QUERYMENU;, &amp;querymenu)) { 467 if (0 == ioctl(fd, &VIDIOC-QUERYMENU;, &amp;querymenu)) {
456 printf (" %s\n", querymenu.name); 468 printf(" %s\n", querymenu.name);
457 } 469 }
458 } 470 }
459} 471}
460 472
461memset (&amp;queryctrl, 0, sizeof (queryctrl)); 473memset(&amp;queryctrl, 0, sizeof(queryctrl));
462 474
463for (queryctrl.id = V4L2_CID_BASE; 475for (queryctrl.id = V4L2_CID_BASE;
464 queryctrl.id &lt; V4L2_CID_LASTP1; 476 queryctrl.id &lt; V4L2_CID_LASTP1;
465 queryctrl.id++) { 477 queryctrl.id++) {
466 if (0 == ioctl (fd, &VIDIOC-QUERYCTRL;, &amp;queryctrl)) { 478 if (0 == ioctl(fd, &VIDIOC-QUERYCTRL;, &amp;queryctrl)) {
467 if (queryctrl.flags &amp; V4L2_CTRL_FLAG_DISABLED) 479 if (queryctrl.flags &amp; V4L2_CTRL_FLAG_DISABLED)
468 continue; 480 continue;
469 481
470 printf ("Control %s\n", queryctrl.name); 482 printf("Control %s\n", queryctrl.name);
471 483
472 if (queryctrl.type == V4L2_CTRL_TYPE_MENU) 484 if (queryctrl.type == V4L2_CTRL_TYPE_MENU)
473 enumerate_menu (); 485 enumerate_menu();
474 } else { 486 } else {
475 if (errno == EINVAL) 487 if (errno == EINVAL)
476 continue; 488 continue;
477 489
478 perror ("VIDIOC_QUERYCTRL"); 490 perror("VIDIOC_QUERYCTRL");
479 exit (EXIT_FAILURE); 491 exit(EXIT_FAILURE);
480 } 492 }
481} 493}
482 494
483for (queryctrl.id = V4L2_CID_PRIVATE_BASE;; 495for (queryctrl.id = V4L2_CID_PRIVATE_BASE;;
484 queryctrl.id++) { 496 queryctrl.id++) {
485 if (0 == ioctl (fd, &VIDIOC-QUERYCTRL;, &amp;queryctrl)) { 497 if (0 == ioctl(fd, &VIDIOC-QUERYCTRL;, &amp;queryctrl)) {
486 if (queryctrl.flags &amp; V4L2_CTRL_FLAG_DISABLED) 498 if (queryctrl.flags &amp; V4L2_CTRL_FLAG_DISABLED)
487 continue; 499 continue;
488 500
489 printf ("Control %s\n", queryctrl.name); 501 printf("Control %s\n", queryctrl.name);
490 502
491 if (queryctrl.type == V4L2_CTRL_TYPE_MENU) 503 if (queryctrl.type == V4L2_CTRL_TYPE_MENU)
492 enumerate_menu (); 504 enumerate_menu();
493 } else { 505 } else {
494 if (errno == EINVAL) 506 if (errno == EINVAL)
495 break; 507 break;
496 508
497 perror ("VIDIOC_QUERYCTRL"); 509 perror("VIDIOC_QUERYCTRL");
498 exit (EXIT_FAILURE); 510 exit(EXIT_FAILURE);
499 } 511 }
500} 512}
501</programlisting> 513</programlisting>
502 </example> 514 </example>
503 515
504 <example> 516 <example>
517 <title>Enumerating all user controls (alternative)</title>
518 <programlisting>
519memset(&amp;queryctrl, 0, sizeof(queryctrl));
520
521queryctrl.id = V4L2_CTRL_CLASS_USER | V4L2_CTRL_FLAG_NEXT_CTRL;
522while (0 == ioctl(fd, &VIDIOC-QUERYCTRL;, &amp;queryctrl)) {
523 if (V4L2_CTRL_ID2CLASS(queryctrl.id) != V4L2_CTRL_CLASS_USER)
524 break;
525 if (queryctrl.flags &amp; V4L2_CTRL_FLAG_DISABLED)
526 continue;
527
528 printf("Control %s\n", queryctrl.name);
529
530 if (queryctrl.type == V4L2_CTRL_TYPE_MENU)
531 enumerate_menu();
532
533 queryctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL;
534}
535if (errno != EINVAL) {
536 perror("VIDIOC_QUERYCTRL");
537 exit(EXIT_FAILURE);
538}
539</programlisting>
540 </example>
541
542 <example>
505 <title>Changing controls</title> 543 <title>Changing controls</title>
506 544
507 <programlisting> 545 <programlisting>
508&v4l2-queryctrl; queryctrl; 546&v4l2-queryctrl; queryctrl;
509&v4l2-control; control; 547&v4l2-control; control;
510 548
511memset (&amp;queryctrl, 0, sizeof (queryctrl)); 549memset(&amp;queryctrl, 0, sizeof(queryctrl));
512queryctrl.id = V4L2_CID_BRIGHTNESS; 550queryctrl.id = V4L2_CID_BRIGHTNESS;
513 551
514if (-1 == ioctl (fd, &VIDIOC-QUERYCTRL;, &amp;queryctrl)) { 552if (-1 == ioctl(fd, &VIDIOC-QUERYCTRL;, &amp;queryctrl)) {
515 if (errno != EINVAL) { 553 if (errno != EINVAL) {
516 perror ("VIDIOC_QUERYCTRL"); 554 perror("VIDIOC_QUERYCTRL");
517 exit (EXIT_FAILURE); 555 exit(EXIT_FAILURE);
518 } else { 556 } else {
519 printf ("V4L2_CID_BRIGHTNESS is not supported\n"); 557 printf("V4L2_CID_BRIGHTNESS is not supported\n");
520 } 558 }
521} else if (queryctrl.flags &amp; V4L2_CTRL_FLAG_DISABLED) { 559} else if (queryctrl.flags &amp; V4L2_CTRL_FLAG_DISABLED) {
522 printf ("V4L2_CID_BRIGHTNESS is not supported\n"); 560 printf("V4L2_CID_BRIGHTNESS is not supported\n");
523} else { 561} else {
524 memset (&amp;control, 0, sizeof (control)); 562 memset(&amp;control, 0, sizeof (control));
525 control.id = V4L2_CID_BRIGHTNESS; 563 control.id = V4L2_CID_BRIGHTNESS;
526 control.value = queryctrl.default_value; 564 control.value = queryctrl.default_value;
527 565
528 if (-1 == ioctl (fd, &VIDIOC-S-CTRL;, &amp;control)) { 566 if (-1 == ioctl(fd, &VIDIOC-S-CTRL;, &amp;control)) {
529 perror ("VIDIOC_S_CTRL"); 567 perror("VIDIOC_S_CTRL");
530 exit (EXIT_FAILURE); 568 exit(EXIT_FAILURE);
531 } 569 }
532} 570}
533 571
534memset (&amp;control, 0, sizeof (control)); 572memset(&amp;control, 0, sizeof(control));
535control.id = V4L2_CID_CONTRAST; 573control.id = V4L2_CID_CONTRAST;
536 574
537if (0 == ioctl (fd, &VIDIOC-G-CTRL;, &amp;control)) { 575if (0 == ioctl(fd, &VIDIOC-G-CTRL;, &amp;control)) {
538 control.value += 1; 576 control.value += 1;
539 577
540 /* The driver may clamp the value or return ERANGE, ignored here */ 578 /* The driver may clamp the value or return ERANGE, ignored here */
541 579
542 if (-1 == ioctl (fd, &VIDIOC-S-CTRL;, &amp;control) 580 if (-1 == ioctl(fd, &VIDIOC-S-CTRL;, &amp;control)
543 &amp;&amp; errno != ERANGE) { 581 &amp;&amp; errno != ERANGE) {
544 perror ("VIDIOC_S_CTRL"); 582 perror("VIDIOC_S_CTRL");
545 exit (EXIT_FAILURE); 583 exit(EXIT_FAILURE);
546 } 584 }
547/* Ignore if V4L2_CID_CONTRAST is unsupported */ 585/* Ignore if V4L2_CID_CONTRAST is unsupported */
548} else if (errno != EINVAL) { 586} else if (errno != EINVAL) {
549 perror ("VIDIOC_G_CTRL"); 587 perror("VIDIOC_G_CTRL");
550 exit (EXIT_FAILURE); 588 exit(EXIT_FAILURE);
551} 589}
552 590
553control.id = V4L2_CID_AUDIO_MUTE; 591control.id = V4L2_CID_AUDIO_MUTE;
554control.value = TRUE; /* silence */ 592control.value = 1; /* silence */
555 593
556/* Errors ignored */ 594/* Errors ignored */
557ioctl (fd, VIDIOC_S_CTRL, &amp;control); 595ioctl(fd, VIDIOC_S_CTRL, &amp;control);
558</programlisting> 596</programlisting>
559 </example> 597 </example>
560 </section> 598 </section>
@@ -625,16 +663,29 @@ supported.</para>
625&v4l2-control;, except for the fact that it also allows for 64-bit 663&v4l2-control;, except for the fact that it also allows for 64-bit
626values and pointers to be passed.</para> 664values and pointers to be passed.</para>
627 665
666 <para>Since the &v4l2-ext-control; supports pointers it is now
667also possible to have controls with compound types such as N-dimensional arrays
668and/or structures. You need to specify the <constant>V4L2_CTRL_FLAG_NEXT_COMPOUND</constant>
669when enumerating controls to actually be able to see such compound controls.
670In other words, these controls with compound types should only be used
671programmatically.</para>
672
673 <para>Since such compound controls need to expose more information
674about themselves than is possible with &VIDIOC-QUERYCTRL; the
675&VIDIOC-QUERY-EXT-CTRL; ioctl was added. In particular, this ioctl gives
676the dimensions of the N-dimensional array if this control consists of more than
677one element.</para>
678
628 <para>It is important to realize that due to the flexibility of 679 <para>It is important to realize that due to the flexibility of
629controls it is necessary to check whether the control you want to set 680controls it is necessary to check whether the control you want to set
630actually is supported in the driver and what the valid range of values 681actually is supported in the driver and what the valid range of values
631is. So use the &VIDIOC-QUERYCTRL; and &VIDIOC-QUERYMENU; ioctls to 682is. So use the &VIDIOC-QUERYCTRL; (or &VIDIOC-QUERY-EXT-CTRL;) and
632check this. Also note that it is possible that some of the menu 683&VIDIOC-QUERYMENU; ioctls to check this. Also note that it is possible
633indices in a control of type <constant>V4L2_CTRL_TYPE_MENU</constant> 684that some of the menu indices in a control of type
634may not be supported (<constant>VIDIOC_QUERYMENU</constant> will 685<constant>V4L2_CTRL_TYPE_MENU</constant> may not be supported
635return an error). A good example is the list of supported MPEG audio 686(<constant>VIDIOC_QUERYMENU</constant> will return an error). A good
636bitrates. Some drivers only support one or two bitrates, others 687example is the list of supported MPEG audio bitrates. Some drivers only
637support a wider range.</para> 688support one or two bitrates, others support a wider range.</para>
638 689
639 <para> 690 <para>
640 All controls use machine endianness. 691 All controls use machine endianness.
@@ -675,12 +726,12 @@ control class is found:</para>
675 <informalexample> 726 <informalexample>
676 <programlisting> 727 <programlisting>
677qctrl.id = V4L2_CTRL_CLASS_MPEG | V4L2_CTRL_FLAG_NEXT_CTRL; 728qctrl.id = V4L2_CTRL_CLASS_MPEG | V4L2_CTRL_FLAG_NEXT_CTRL;
678while (0 == ioctl (fd, &VIDIOC-QUERYCTRL;, &amp;qctrl)) { 729while (0 == ioctl(fd, &VIDIOC-QUERYCTRL;, &amp;qctrl)) {
679 if (V4L2_CTRL_ID2CLASS (qctrl.id) != V4L2_CTRL_CLASS_MPEG) 730 if (V4L2_CTRL_ID2CLASS(qctrl.id) != V4L2_CTRL_CLASS_MPEG)
680 break; 731 break;
681 /* ... */ 732 /* ... */
682 qctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL; 733 qctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL;
683 } 734}
684</programlisting> 735</programlisting>
685 </informalexample> 736 </informalexample>
686 737
@@ -700,7 +751,7 @@ ID based on a control ID.</para>
700<constant>VIDIOC_QUERYCTRL</constant> will fail when used in 751<constant>VIDIOC_QUERYCTRL</constant> will fail when used in
701combination with <constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant>. In 752combination with <constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant>. In
702that case the old method of enumerating control should be used (see 753that case the old method of enumerating control should be used (see
7031.8). But if it is supported, then it is guaranteed to enumerate over 754<xref linkend="enum_all_controls" />). But if it is supported, then it is guaranteed to enumerate over
704all controls, including driver-private controls.</para> 755all controls, including driver-private controls.</para>
705 </section> 756 </section>
706 757
@@ -4000,6 +4051,68 @@ to find receivers which can scroll strings sized as 32 x N or 64 x N characters.
4000with steps of 32 or 64 characters. The result is it must always contain a string with size multiple of 32 or 64. </entry> 4051with steps of 32 or 64 characters. The result is it must always contain a string with size multiple of 32 or 64. </entry>
4001 </row> 4052 </row>
4002 <row> 4053 <row>
4054 <entry spanname="id"><constant>V4L2_CID_RDS_TX_MONO_STEREO</constant>&nbsp;</entry>
4055 <entry>boolean</entry>
4056 </row>
4057 <row><entry spanname="descr">Sets the Mono/Stereo bit of the Decoder Identification code. If set,
4058then the audio was recorded as stereo.</entry>
4059 </row>
4060 <row>
4061 <entry spanname="id"><constant>V4L2_CID_RDS_TX_ARTIFICIAL_HEAD</constant>&nbsp;</entry>
4062 <entry>boolean</entry>
4063 </row>
4064 <row><entry spanname="descr">Sets the
4065<ulink url="http://en.wikipedia.org/wiki/Artificial_head">Artificial Head</ulink> bit of the Decoder
4066Identification code. If set, then the audio was recorded using an artificial head.</entry>
4067 </row>
4068 <row>
4069 <entry spanname="id"><constant>V4L2_CID_RDS_TX_COMPRESSED</constant>&nbsp;</entry>
4070 <entry>boolean</entry>
4071 </row>
4072 <row><entry spanname="descr">Sets the Compressed bit of the Decoder Identification code. If set,
4073then the audio is compressed.</entry>
4074 </row>
4075 <row>
4076 <entry spanname="id"><constant>V4L2_CID_RDS_TX_DYNAMIC_PTY</constant>&nbsp;</entry>
4077 <entry>boolean</entry>
4078 </row>
4079 <row><entry spanname="descr">Sets the Dynamic PTY bit of the Decoder Identification code. If set,
4080then the PTY code is dynamically switched.</entry>
4081 </row>
4082 <row>
4083 <entry spanname="id"><constant>V4L2_CID_RDS_TX_TRAFFIC_ANNOUNCEMENT</constant>&nbsp;</entry>
4084 <entry>boolean</entry>
4085 </row>
4086 <row><entry spanname="descr">If set, then a traffic announcement is in progress.</entry>
4087 </row>
4088 <row>
4089 <entry spanname="id"><constant>V4L2_CID_RDS_TX_TRAFFIC_PROGRAM</constant>&nbsp;</entry>
4090 <entry>boolean</entry>
4091 </row>
4092 <row><entry spanname="descr">If set, then the tuned programme carries traffic announcements.</entry>
4093 </row>
4094 <row>
4095 <entry spanname="id"><constant>V4L2_CID_RDS_TX_MUSIC_SPEECH</constant>&nbsp;</entry>
4096 <entry>boolean</entry>
4097 </row>
4098 <row><entry spanname="descr">If set, then this channel broadcasts music. If cleared, then it
4099broadcasts speech. If the transmitter doesn't make this distinction, then it should be set.</entry>
4100 </row>
4101 <row>
4102 <entry spanname="id"><constant>V4L2_CID_RDS_TX_ALT_FREQS_ENABLE</constant>&nbsp;</entry>
4103 <entry>boolean</entry>
4104 </row>
4105 <row><entry spanname="descr">If set, then transmit alternate frequencies.</entry>
4106 </row>
4107 <row>
4108 <entry spanname="id"><constant>V4L2_CID_RDS_TX_ALT_FREQS</constant>&nbsp;</entry>
4109 <entry>__u32 array</entry>
4110 </row>
4111 <row><entry spanname="descr">The alternate frequencies in kHz units. The RDS standard allows
4112for up to 25 frequencies to be defined. Drivers may support fewer frequencies so check
4113the array size.</entry>
4114 </row>
4115 <row>
4003 <entry spanname="id"><constant>V4L2_CID_AUDIO_LIMITER_ENABLED</constant>&nbsp;</entry> 4116 <entry spanname="id"><constant>V4L2_CID_AUDIO_LIMITER_ENABLED</constant>&nbsp;</entry>
4004 <entry>boolean</entry> 4117 <entry>boolean</entry>
4005 </row> 4118 </row>
@@ -4976,6 +5089,57 @@ description of this control class.</entry>
4976 </row><row><entry spanname="descr">Enables/disables RDS 5089 </row><row><entry spanname="descr">Enables/disables RDS
4977 reception by the radio tuner</entry> 5090 reception by the radio tuner</entry>
4978 </row> 5091 </row>
5092 <row>
5093 <entry spanname="id"><constant>V4L2_CID_RDS_RX_PTY</constant>&nbsp;</entry>
5094 <entry>integer</entry>
5095 </row>
5096 <row><entry spanname="descr">Gets RDS Programme Type field.
5097This encodes up to 31 pre-defined programme types.</entry>
5098 </row>
5099 <row>
5100 <entry spanname="id"><constant>V4L2_CID_RDS_RX_PS_NAME</constant>&nbsp;</entry>
5101 <entry>string</entry>
5102 </row>
5103 <row><entry spanname="descr">Gets the Programme Service name (PS_NAME).
5104It is intended for static display on a receiver. It is the primary aid to listeners in programme service
5105identification and selection. In Annex E of <xref linkend="iec62106" />, the RDS specification,
5106there is a full description of the correct character encoding for Programme Service name strings.
5107Also from RDS specification, PS is usually a single eight character text. However, it is also possible
5108to find receivers which can scroll strings sized as 8 x N characters. So, this control must be configured
5109with steps of 8 characters. The result is it must always contain a string with size multiple of 8.</entry>
5110 </row>
5111 <row>
5112 <entry spanname="id"><constant>V4L2_CID_RDS_RX_RADIO_TEXT</constant>&nbsp;</entry>
5113 <entry>string</entry>
5114 </row>
5115 <row><entry spanname="descr">Gets the Radio Text info. It is a textual description of
5116what is being broadcasted. RDS Radio Text can be applied when broadcaster wishes to transmit longer PS names,
5117programme-related information or any other text. In these cases, RadioText can be used in addition to
5118<constant>V4L2_CID_RDS_RX_PS_NAME</constant>. The encoding for Radio Text strings is also fully described
5119in Annex E of <xref linkend="iec62106" />. The length of Radio Text strings depends on which RDS Block is being
5120used to transmit it, either 32 (2A block) or 64 (2B block). However, it is also possible
5121to find receivers which can scroll strings sized as 32 x N or 64 x N characters. So, this control must be configured
5122with steps of 32 or 64 characters. The result is it must always contain a string with size multiple of 32 or 64. </entry>
5123 </row>
5124 <row>
5125 <entry spanname="id"><constant>V4L2_CID_RDS_RX_TRAFFIC_ANNOUNCEMENT</constant>&nbsp;</entry>
5126 <entry>boolean</entry>
5127 </row>
5128 <row><entry spanname="descr">If set, then a traffic announcement is in progress.</entry>
5129 </row>
5130 <row>
5131 <entry spanname="id"><constant>V4L2_CID_RDS_RX_TRAFFIC_PROGRAM</constant>&nbsp;</entry>
5132 <entry>boolean</entry>
5133 </row>
5134 <row><entry spanname="descr">If set, then the tuned programme carries traffic announcements.</entry>
5135 </row>
5136 <row>
5137 <entry spanname="id"><constant>V4L2_CID_RDS_RX_MUSIC_SPEECH</constant>&nbsp;</entry>
5138 <entry>boolean</entry>
5139 </row>
5140 <row><entry spanname="descr">If set, then this channel broadcasts music. If cleared, then it
5141broadcasts speech. If the transmitter doesn't make this distinction, then it will be set.</entry>
5142 </row>
4979 <row> 5143 <row>
4980 <entry spanname="id"><constant>V4L2_CID_TUNE_DEEMPHASIS</constant>&nbsp;</entry> 5144 <entry spanname="id"><constant>V4L2_CID_TUNE_DEEMPHASIS</constant>&nbsp;</entry>
4981 <entry>enum v4l2_deemphasis</entry> 5145 <entry>enum v4l2_deemphasis</entry>
@@ -5007,6 +5171,102 @@ defines possible values for de-emphasis. Here they are:</entry>
5007 </tbody> 5171 </tbody>
5008 </tgroup> 5172 </tgroup>
5009 </table> 5173 </table>
5174 </section>
5175
5176 <section id="detect-controls">
5177 <title>Detect Control Reference</title>
5178
5179 <para>The Detect class includes controls for common features of
5180 various motion or object detection capable devices.</para>
5181
5182 <table pgwide="1" frame="none" id="detect-control-id">
5183 <title>Detect Control IDs</title>
5184
5185 <tgroup cols="4">
5186 <colspec colname="c1" colwidth="1*" />
5187 <colspec colname="c2" colwidth="6*" />
5188 <colspec colname="c3" colwidth="2*" />
5189 <colspec colname="c4" colwidth="6*" />
5190 <spanspec namest="c1" nameend="c2" spanname="id" />
5191 <spanspec namest="c2" nameend="c4" spanname="descr" />
5192 <thead>
5193 <row>
5194 <entry spanname="id" align="left">ID</entry>
5195 <entry align="left">Type</entry>
5196 </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry>
5197 </row>
5198 </thead>
5199 <tbody valign="top">
5200 <row><entry></entry></row>
5201 <row>
5202 <entry spanname="id"><constant>V4L2_CID_DETECT_CLASS</constant>&nbsp;</entry>
5203 <entry>class</entry>
5204 </row><row><entry spanname="descr">The Detect class
5205descriptor. Calling &VIDIOC-QUERYCTRL; for this control will return a
5206description of this control class.</entry>
5207 </row>
5208 <row>
5209 <entry spanname="id"><constant>V4L2_CID_DETECT_MD_MODE</constant>&nbsp;</entry>
5210 <entry>menu</entry>
5211 </row><row><entry spanname="descr">Sets the motion detection mode.</entry>
5212 </row>
5213 <row>
5214 <entrytbl spanname="descr" cols="2">
5215 <tbody valign="top">
5216 <row>
5217 <entry><constant>V4L2_DETECT_MD_MODE_DISABLED</constant>
5218 </entry><entry>Disable motion detection.</entry>
5219 </row>
5220 <row>
5221 <entry><constant>V4L2_DETECT_MD_MODE_GLOBAL</constant>
5222 </entry><entry>Use a single motion detection threshold.</entry>
5223 </row>
5224 <row>
5225 <entry><constant>V4L2_DETECT_MD_MODE_THRESHOLD_GRID</constant>
5226 </entry><entry>The image is divided into a grid, each cell with its own
5227 motion detection threshold. These thresholds are set through the
5228 <constant>V4L2_CID_DETECT_MD_THRESHOLD_GRID</constant> matrix control.</entry>
5229 </row>
5230 <row>
5231 <entry><constant>V4L2_DETECT_MD_MODE_REGION_GRID</constant>
5232 </entry><entry>The image is divided into a grid, each cell with its own
5233 region value that specifies which per-region motion detection thresholds
5234 should be used. Each region has its own thresholds. How these per-region
5235 thresholds are set up is driver-specific. The region values for the grid are set
5236 through the <constant>V4L2_CID_DETECT_MD_REGION_GRID</constant> matrix
5237 control.</entry>
5238 </row>
5239 </tbody>
5240 </entrytbl>
5241 </row>
5242 <row>
5243 <entry spanname="id"><constant>V4L2_CID_DETECT_MD_GLOBAL_THRESHOLD</constant>&nbsp;</entry>
5244 <entry>integer</entry>
5245 </row>
5246 <row><entry spanname="descr">Sets the global motion detection threshold to be
5247 used with the <constant>V4L2_DETECT_MD_MODE_GLOBAL</constant> motion detection mode.</entry>
5248 </row>
5249 <row>
5250 <entry spanname="id"><constant>V4L2_CID_DETECT_MD_THRESHOLD_GRID</constant>&nbsp;</entry>
5251 <entry>__u16 matrix</entry>
5252 </row>
5253 <row><entry spanname="descr">Sets the motion detection thresholds for each cell in the grid.
5254 To be used with the <constant>V4L2_DETECT_MD_MODE_THRESHOLD_GRID</constant>
5255 motion detection mode. Matrix element (0, 0) represents the cell at the top-left of the
5256 grid.</entry>
5257 </row>
5258 <row>
5259 <entry spanname="id"><constant>V4L2_CID_DETECT_MD_REGION_GRID</constant>&nbsp;</entry>
5260 <entry>__u8 matrix</entry>
5261 </row>
5262 <row><entry spanname="descr">Sets the motion detection region value for each cell in the grid.
5263 To be used with the <constant>V4L2_DETECT_MD_MODE_REGION_GRID</constant>
5264 motion detection mode. Matrix element (0, 0) represents the cell at the top-left of the
5265 grid.</entry>
5266 </row>
5267 </tbody>
5268 </tgroup>
5269 </table>
5010 5270
5011 </section> 5271 </section>
5012 5272
diff --git a/Documentation/DocBook/media/v4l/dev-raw-vbi.xml b/Documentation/DocBook/media/v4l/dev-raw-vbi.xml
index b788c72c885e..f4b61b6ce3c2 100644
--- a/Documentation/DocBook/media/v4l/dev-raw-vbi.xml
+++ b/Documentation/DocBook/media/v4l/dev-raw-vbi.xml
@@ -150,9 +150,15 @@ signal. Drivers shall not convert the sample format by software.</para></entry>
150 <entry>This is the scanning system line number 150 <entry>This is the scanning system line number
151associated with the first line of the VBI image, of the first and the 151associated with the first line of the VBI image, of the first and the
152second field respectively. See <xref linkend="vbi-525" /> and 152second field respectively. See <xref linkend="vbi-525" /> and
153<xref linkend="vbi-625" /> for valid values. VBI input drivers can 153<xref linkend="vbi-625" /> for valid values.
154return start values 0 if the hardware cannot reliable identify 154The <constant>V4L2_VBI_ITU_525_F1_START</constant>,
155scanning lines, VBI acquisition may not require this 155<constant>V4L2_VBI_ITU_525_F2_START</constant>,
156<constant>V4L2_VBI_ITU_625_F1_START</constant> and
157<constant>V4L2_VBI_ITU_625_F2_START</constant> defines give the start line
158numbers for each field for each 525 or 625 line format as a convenience.
159Don't forget that ITU line numbering starts at 1, not 0.
160VBI input drivers can return start values 0 if the hardware cannot
161reliable identify scanning lines, VBI acquisition may not require this
156information.</entry> 162information.</entry>
157 </row> 163 </row>
158 <row> 164 <row>
diff --git a/Documentation/DocBook/media/v4l/dev-sdr.xml b/Documentation/DocBook/media/v4l/dev-sdr.xml
index dc14804f5436..f8903568a243 100644
--- a/Documentation/DocBook/media/v4l/dev-sdr.xml
+++ b/Documentation/DocBook/media/v4l/dev-sdr.xml
@@ -72,9 +72,12 @@ To use the <link linkend="format">format</link> ioctls applications set the
72<constant>V4L2_BUF_TYPE_SDR_CAPTURE</constant> and use the &v4l2-sdr-format; 72<constant>V4L2_BUF_TYPE_SDR_CAPTURE</constant> and use the &v4l2-sdr-format;
73<structfield>sdr</structfield> member of the <structfield>fmt</structfield> 73<structfield>sdr</structfield> member of the <structfield>fmt</structfield>
74union as needed per the desired operation. 74union as needed per the desired operation.
75Currently only the <structfield>pixelformat</structfield> field of 75Currently there is two fields, <structfield>pixelformat</structfield> and
76&v4l2-sdr-format; is used. The content of that field is the V4L2 fourcc code 76<structfield>buffersize</structfield>, of struct &v4l2-sdr-format; which are
77of the data format. 77used. Content of the <structfield>pixelformat</structfield> is V4L2 FourCC
78code of the data format. The <structfield>buffersize</structfield> field is
79maximum buffer size in bytes required for data transfer, set by the driver in
80order to inform application.
78 </para> 81 </para>
79 82
80 <table pgwide="1" frame="none" id="v4l2-sdr-format"> 83 <table pgwide="1" frame="none" id="v4l2-sdr-format">
@@ -92,8 +95,15 @@ V4L2 defines SDR formats in <xref linkend="sdr-formats" />.
92 </entry> 95 </entry>
93 </row> 96 </row>
94 <row> 97 <row>
98 <entry>__u32</entry>
99 <entry><structfield>buffersize</structfield></entry>
100 <entry>
101Maximum size in bytes required for data. Value is set by the driver.
102 </entry>
103 </row>
104 <row>
95 <entry>__u8</entry> 105 <entry>__u8</entry>
96 <entry><structfield>reserved[28]</structfield></entry> 106 <entry><structfield>reserved[24]</structfield></entry>
97 <entry>This array is reserved for future extensions. 107 <entry>This array is reserved for future extensions.
98Drivers and applications must set it to zero.</entry> 108Drivers and applications must set it to zero.</entry>
99 </row> 109 </row>
diff --git a/Documentation/DocBook/media/v4l/dev-sliced-vbi.xml b/Documentation/DocBook/media/v4l/dev-sliced-vbi.xml
index 548f8ea28dee..7a8bf3011ee9 100644
--- a/Documentation/DocBook/media/v4l/dev-sliced-vbi.xml
+++ b/Documentation/DocBook/media/v4l/dev-sliced-vbi.xml
@@ -185,7 +185,14 @@ tables, sigh. --></para></entry>
185 <entry></entry> 185 <entry></entry>
186 <entry spanname="hspan">Drivers must set 186 <entry spanname="hspan">Drivers must set
187<structfield>service_lines</structfield>[0][0] and 187<structfield>service_lines</structfield>[0][0] and
188<structfield>service_lines</structfield>[1][0] to zero.</entry> 188<structfield>service_lines</structfield>[1][0] to zero.
189The <constant>V4L2_VBI_ITU_525_F1_START</constant>,
190<constant>V4L2_VBI_ITU_525_F2_START</constant>,
191<constant>V4L2_VBI_ITU_625_F1_START</constant> and
192<constant>V4L2_VBI_ITU_625_F2_START</constant> defines give the start
193line numbers for each field for each 525 or 625 line format as a
194convenience. Don't forget that ITU line numbering starts at 1, not 0.
195</entry>
189 </row> 196 </row>
190 <row> 197 <row>
191 <entry>__u32</entry> 198 <entry>__u32</entry>
diff --git a/Documentation/DocBook/media/v4l/io.xml b/Documentation/DocBook/media/v4l/io.xml
index a086a5db7a18..e5e8325aa3d7 100644
--- a/Documentation/DocBook/media/v4l/io.xml
+++ b/Documentation/DocBook/media/v4l/io.xml
@@ -870,7 +870,8 @@ should set this to 0.</entry>
870 If the application sets this to 0 for an output stream, then 870 If the application sets this to 0 for an output stream, then
871 <structfield>bytesused</structfield> will be set to the size of the 871 <structfield>bytesused</structfield> will be set to the size of the
872 plane (see the <structfield>length</structfield> field of this struct) 872 plane (see the <structfield>length</structfield> field of this struct)
873 by the driver.</entry> 873 by the driver. Note that the actual image data starts at
874 <structfield>data_offset</structfield> which may not be 0.</entry>
874 </row> 875 </row>
875 <row> 876 <row>
876 <entry>__u32</entry> 877 <entry>__u32</entry>
@@ -919,6 +920,10 @@ should set this to 0.</entry>
919 <entry>Offset in bytes to video data in the plane. 920 <entry>Offset in bytes to video data in the plane.
920 Drivers must set this field when <structfield>type</structfield> 921 Drivers must set this field when <structfield>type</structfield>
921 refers to an input stream, applications when it refers to an output stream. 922 refers to an input stream, applications when it refers to an output stream.
923 Note that data_offset is included in <structfield>bytesused</structfield>.
924 So the size of the image in the plane is
925 <structfield>bytesused</structfield>-<structfield>data_offset</structfield> at
926 offset <structfield>data_offset</structfield> from the start of the plane.
922 </entry> 927 </entry>
923 </row> 928 </row>
924 <row> 929 <row>
@@ -1066,7 +1071,7 @@ state, in the application domain so to say.</entry>
1066 <entry>Drivers set or clear this flag when calling the 1071 <entry>Drivers set or clear this flag when calling the
1067<constant>VIDIOC_DQBUF</constant> ioctl. It may be set by video 1072<constant>VIDIOC_DQBUF</constant> ioctl. It may be set by video
1068capture devices when the buffer contains a compressed image which is a 1073capture devices when the buffer contains a compressed image which is a
1069key frame (or field), &ie; can be decompressed on its own. Also know as 1074key frame (or field), &ie; can be decompressed on its own. Also known as
1070an I-frame. Applications can set this bit when <structfield>type</structfield> 1075an I-frame. Applications can set this bit when <structfield>type</structfield>
1071refers to an output stream.</entry> 1076refers to an output stream.</entry>
1072 </row> 1077 </row>
diff --git a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml
index e1c4f8b4c0b3..2aae8e9452a4 100644
--- a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml
+++ b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml
@@ -15,9 +15,6 @@ typical PC graphics frame buffers. They occupy 8, 16, 24 or 32 bits
15per pixel. These are all packed-pixel formats, meaning all the data 15per pixel. These are all packed-pixel formats, meaning all the data
16for a pixel lie next to each other in memory.</para> 16for a pixel lie next to each other in memory.</para>
17 17
18 <para>When one of these formats is used, drivers shall report the
19colorspace <constant>V4L2_COLORSPACE_SRGB</constant>.</para>
20
21 <table pgwide="1" frame="none" id="rgb-formats"> 18 <table pgwide="1" frame="none" id="rgb-formats">
22 <title>Packed RGB Image Formats</title> 19 <title>Packed RGB Image Formats</title>
23 <tgroup cols="37" align="center"> 20 <tgroup cols="37" align="center">
@@ -130,9 +127,9 @@ colorspace <constant>V4L2_COLORSPACE_SRGB</constant>.</para>
130 <entry>b<subscript>1</subscript></entry> 127 <entry>b<subscript>1</subscript></entry>
131 <entry>b<subscript>0</subscript></entry> 128 <entry>b<subscript>0</subscript></entry>
132 </row> 129 </row>
133 <row id="V4L2-PIX-FMT-RGB444"> 130 <row id="V4L2-PIX-FMT-ARGB444">
134 <entry><constant>V4L2_PIX_FMT_RGB444</constant></entry> 131 <entry><constant>V4L2_PIX_FMT_ARGB444</constant></entry>
135 <entry>'R444'</entry> 132 <entry>'AR12'</entry>
136 <entry></entry> 133 <entry></entry>
137 <entry>g<subscript>3</subscript></entry> 134 <entry>g<subscript>3</subscript></entry>
138 <entry>g<subscript>2</subscript></entry> 135 <entry>g<subscript>2</subscript></entry>
@@ -152,9 +149,31 @@ colorspace <constant>V4L2_COLORSPACE_SRGB</constant>.</para>
152 <entry>r<subscript>1</subscript></entry> 149 <entry>r<subscript>1</subscript></entry>
153 <entry>r<subscript>0</subscript></entry> 150 <entry>r<subscript>0</subscript></entry>
154 </row> 151 </row>
155 <row id="V4L2-PIX-FMT-RGB555"> 152 <row id="V4L2-PIX-FMT-XRGB444">
156 <entry><constant>V4L2_PIX_FMT_RGB555</constant></entry> 153 <entry><constant>V4L2_PIX_FMT_XRGB444</constant></entry>
157 <entry>'RGBO'</entry> 154 <entry>'XR12'</entry>
155 <entry></entry>
156 <entry>g<subscript>3</subscript></entry>
157 <entry>g<subscript>2</subscript></entry>
158 <entry>g<subscript>1</subscript></entry>
159 <entry>g<subscript>0</subscript></entry>
160 <entry>b<subscript>3</subscript></entry>
161 <entry>b<subscript>2</subscript></entry>
162 <entry>b<subscript>1</subscript></entry>
163 <entry>b<subscript>0</subscript></entry>
164 <entry></entry>
165 <entry>-</entry>
166 <entry>-</entry>
167 <entry>-</entry>
168 <entry>-</entry>
169 <entry>r<subscript>3</subscript></entry>
170 <entry>r<subscript>2</subscript></entry>
171 <entry>r<subscript>1</subscript></entry>
172 <entry>r<subscript>0</subscript></entry>
173 </row>
174 <row id="V4L2-PIX-FMT-ARGB555">
175 <entry><constant>V4L2_PIX_FMT_ARGB555</constant></entry>
176 <entry>'AR15'</entry>
158 <entry></entry> 177 <entry></entry>
159 <entry>g<subscript>2</subscript></entry> 178 <entry>g<subscript>2</subscript></entry>
160 <entry>g<subscript>1</subscript></entry> 179 <entry>g<subscript>1</subscript></entry>
@@ -174,6 +193,28 @@ colorspace <constant>V4L2_COLORSPACE_SRGB</constant>.</para>
174 <entry>g<subscript>4</subscript></entry> 193 <entry>g<subscript>4</subscript></entry>
175 <entry>g<subscript>3</subscript></entry> 194 <entry>g<subscript>3</subscript></entry>
176 </row> 195 </row>
196 <row id="V4L2-PIX-FMT-XRGB555">
197 <entry><constant>V4L2_PIX_FMT_XRGB555</constant></entry>
198 <entry>'XR15'</entry>
199 <entry></entry>
200 <entry>g<subscript>2</subscript></entry>
201 <entry>g<subscript>1</subscript></entry>
202 <entry>g<subscript>0</subscript></entry>
203 <entry>b<subscript>4</subscript></entry>
204 <entry>b<subscript>3</subscript></entry>
205 <entry>b<subscript>2</subscript></entry>
206 <entry>b<subscript>1</subscript></entry>
207 <entry>b<subscript>0</subscript></entry>
208 <entry></entry>
209 <entry>-</entry>
210 <entry>r<subscript>4</subscript></entry>
211 <entry>r<subscript>3</subscript></entry>
212 <entry>r<subscript>2</subscript></entry>
213 <entry>r<subscript>1</subscript></entry>
214 <entry>r<subscript>0</subscript></entry>
215 <entry>g<subscript>4</subscript></entry>
216 <entry>g<subscript>3</subscript></entry>
217 </row>
177 <row id="V4L2-PIX-FMT-RGB565"> 218 <row id="V4L2-PIX-FMT-RGB565">
178 <entry><constant>V4L2_PIX_FMT_RGB565</constant></entry> 219 <entry><constant>V4L2_PIX_FMT_RGB565</constant></entry>
179 <entry>'RGBP'</entry> 220 <entry>'RGBP'</entry>
@@ -341,9 +382,9 @@ colorspace <constant>V4L2_COLORSPACE_SRGB</constant>.</para>
341 <entry>b<subscript>1</subscript></entry> 382 <entry>b<subscript>1</subscript></entry>
342 <entry>b<subscript>0</subscript></entry> 383 <entry>b<subscript>0</subscript></entry>
343 </row> 384 </row>
344 <row id="V4L2-PIX-FMT-BGR32"> 385 <row id="V4L2-PIX-FMT-ABGR32">
345 <entry><constant>V4L2_PIX_FMT_BGR32</constant></entry> 386 <entry><constant>V4L2_PIX_FMT_ABGR32</constant></entry>
346 <entry>'BGR4'</entry> 387 <entry>'AR24'</entry>
347 <entry></entry> 388 <entry></entry>
348 <entry>b<subscript>7</subscript></entry> 389 <entry>b<subscript>7</subscript></entry>
349 <entry>b<subscript>6</subscript></entry> 390 <entry>b<subscript>6</subscript></entry>
@@ -381,9 +422,49 @@ colorspace <constant>V4L2_COLORSPACE_SRGB</constant>.</para>
381 <entry>a<subscript>1</subscript></entry> 422 <entry>a<subscript>1</subscript></entry>
382 <entry>a<subscript>0</subscript></entry> 423 <entry>a<subscript>0</subscript></entry>
383 </row> 424 </row>
384 <row id="V4L2-PIX-FMT-RGB32"> 425 <row id="V4L2-PIX-FMT-XBGR32">
385 <entry><constant>V4L2_PIX_FMT_RGB32</constant></entry> 426 <entry><constant>V4L2_PIX_FMT_XBGR32</constant></entry>
386 <entry>'RGB4'</entry> 427 <entry>'XR24'</entry>
428 <entry></entry>
429 <entry>b<subscript>7</subscript></entry>
430 <entry>b<subscript>6</subscript></entry>
431 <entry>b<subscript>5</subscript></entry>
432 <entry>b<subscript>4</subscript></entry>
433 <entry>b<subscript>3</subscript></entry>
434 <entry>b<subscript>2</subscript></entry>
435 <entry>b<subscript>1</subscript></entry>
436 <entry>b<subscript>0</subscript></entry>
437 <entry></entry>
438 <entry>g<subscript>7</subscript></entry>
439 <entry>g<subscript>6</subscript></entry>
440 <entry>g<subscript>5</subscript></entry>
441 <entry>g<subscript>4</subscript></entry>
442 <entry>g<subscript>3</subscript></entry>
443 <entry>g<subscript>2</subscript></entry>
444 <entry>g<subscript>1</subscript></entry>
445 <entry>g<subscript>0</subscript></entry>
446 <entry></entry>
447 <entry>r<subscript>7</subscript></entry>
448 <entry>r<subscript>6</subscript></entry>
449 <entry>r<subscript>5</subscript></entry>
450 <entry>r<subscript>4</subscript></entry>
451 <entry>r<subscript>3</subscript></entry>
452 <entry>r<subscript>2</subscript></entry>
453 <entry>r<subscript>1</subscript></entry>
454 <entry>r<subscript>0</subscript></entry>
455 <entry></entry>
456 <entry>-</entry>
457 <entry>-</entry>
458 <entry>-</entry>
459 <entry>-</entry>
460 <entry>-</entry>
461 <entry>-</entry>
462 <entry>-</entry>
463 <entry>-</entry>
464 </row>
465 <row id="V4L2-PIX-FMT-ARGB32">
466 <entry><constant>V4L2_PIX_FMT_ARGB32</constant></entry>
467 <entry>'AX24'</entry>
387 <entry></entry> 468 <entry></entry>
388 <entry>a<subscript>7</subscript></entry> 469 <entry>a<subscript>7</subscript></entry>
389 <entry>a<subscript>6</subscript></entry> 470 <entry>a<subscript>6</subscript></entry>
@@ -421,18 +502,76 @@ colorspace <constant>V4L2_COLORSPACE_SRGB</constant>.</para>
421 <entry>b<subscript>1</subscript></entry> 502 <entry>b<subscript>1</subscript></entry>
422 <entry>b<subscript>0</subscript></entry> 503 <entry>b<subscript>0</subscript></entry>
423 </row> 504 </row>
505 <row id="V4L2-PIX-FMT-XRGB32">
506 <entry><constant>V4L2_PIX_FMT_XRGB32</constant></entry>
507 <entry>'BX24'</entry>
508 <entry></entry>
509 <entry>-</entry>
510 <entry>-</entry>
511 <entry>-</entry>
512 <entry>-</entry>
513 <entry>-</entry>
514 <entry>-</entry>
515 <entry>-</entry>
516 <entry>-</entry>
517 <entry></entry>
518 <entry>r<subscript>7</subscript></entry>
519 <entry>r<subscript>6</subscript></entry>
520 <entry>r<subscript>5</subscript></entry>
521 <entry>r<subscript>4</subscript></entry>
522 <entry>r<subscript>3</subscript></entry>
523 <entry>r<subscript>2</subscript></entry>
524 <entry>r<subscript>1</subscript></entry>
525 <entry>r<subscript>0</subscript></entry>
526 <entry></entry>
527 <entry>g<subscript>7</subscript></entry>
528 <entry>g<subscript>6</subscript></entry>
529 <entry>g<subscript>5</subscript></entry>
530 <entry>g<subscript>4</subscript></entry>
531 <entry>g<subscript>3</subscript></entry>
532 <entry>g<subscript>2</subscript></entry>
533 <entry>g<subscript>1</subscript></entry>
534 <entry>g<subscript>0</subscript></entry>
535 <entry></entry>
536 <entry>b<subscript>7</subscript></entry>
537 <entry>b<subscript>6</subscript></entry>
538 <entry>b<subscript>5</subscript></entry>
539 <entry>b<subscript>4</subscript></entry>
540 <entry>b<subscript>3</subscript></entry>
541 <entry>b<subscript>2</subscript></entry>
542 <entry>b<subscript>1</subscript></entry>
543 <entry>b<subscript>0</subscript></entry>
544 </row>
424 </tbody> 545 </tbody>
425 </tgroup> 546 </tgroup>
426 </table> 547 </table>
427 548
428 <para>Bit 7 is the most significant bit. The value of the a = alpha 549 <para>Bit 7 is the most significant bit.</para>
429bits is undefined when reading from the driver, ignored when writing 550
430to the driver, except when alpha blending has been negotiated for a 551 <para>The usage and value of the alpha bits (a) in the ARGB and ABGR formats
431<link linkend="overlay">Video Overlay</link> or <link linkend="osd"> 552 (collectively referred to as alpha formats) depend on the device type and
432Video Output Overlay</link> or when the alpha component has been configured 553 hardware operation. <link linkend="capture">Capture</link> devices
433for a <link linkend="capture">Video Capture</link> by means of <link 554 (including capture queues of mem-to-mem devices) fill the alpha component in
434linkend="v4l2-alpha-component"> <constant>V4L2_CID_ALPHA_COMPONENT 555 memory. When the device outputs an alpha channel the alpha component will
435</constant> </link> control.</para> 556 have a meaningful value. Otherwise, when the device doesn't output an alpha
557 channel but can set the alpha bit to a user-configurable value, the <link
558 linkend="v4l2-alpha-component"><constant>V4L2_CID_ALPHA_COMPONENT</constant>
559 </link> control is used to specify that alpha value, and the alpha component
560 of all pixels will be set to the value specified by that control. Otherwise
561 a corresponding format without an alpha component (XRGB or XBGR) must be
562 used instead of an alpha format.</para>
563
564 <para><link linkend="output">Output</link> devices (including output queues
565 of mem-to-mem devices and <link linkend="osd">video output overlay</link>
566 devices) read the alpha component from memory. When the device processes the
567 alpha channel the alpha component must be filled with meaningful values by
568 applications. Otherwise a corresponding format without an alpha component
569 (XRGB or XBGR) must be used instead of an alpha format.</para>
570
571 <para>The XRGB and XBGR formats contain undefined bits (-). Applications,
572 devices and drivers must ignore those bits, for both <link
573 linkend="capture">capture</link> and <link linkend="output">output</link>
574 devices.</para>
436 575
437 <example> 576 <example>
438 <title><constant>V4L2_PIX_FMT_BGR24</constant> 4 &times; 4 pixel 577 <title><constant>V4L2_PIX_FMT_BGR24</constant> 4 &times; 4 pixel
@@ -512,6 +651,239 @@ image</title>
512 </formalpara> 651 </formalpara>
513 </example> 652 </example>
514 653
654 <para>Formats defined in <xref linkend="rgb-formats-deprecated"/> are
655 deprecated and must not be used by new drivers. They are documented here for
656 reference. The meaning of their alpha bits (a) is ill-defined and
657 interpreted as in either the corresponding ARGB or XRGB format, depending on
658 the driver.</para>
659
660 <table pgwide="1" frame="none" id="rgb-formats-deprecated">
661 <title>Deprecated Packed RGB Image Formats</title>
662 <tgroup cols="37" align="center">
663 <colspec colname="id" align="left" />
664 <colspec colname="fourcc" />
665 <colspec colname="bit" />
666
667 <colspec colnum="4" colname="b07" align="center" />
668 <colspec colnum="5" colname="b06" align="center" />
669 <colspec colnum="6" colname="b05" align="center" />
670 <colspec colnum="7" colname="b04" align="center" />
671 <colspec colnum="8" colname="b03" align="center" />
672 <colspec colnum="9" colname="b02" align="center" />
673 <colspec colnum="10" colname="b01" align="center" />
674 <colspec colnum="11" colname="b00" align="center" />
675
676 <colspec colnum="13" colname="b17" align="center" />
677 <colspec colnum="14" colname="b16" align="center" />
678 <colspec colnum="15" colname="b15" align="center" />
679 <colspec colnum="16" colname="b14" align="center" />
680 <colspec colnum="17" colname="b13" align="center" />
681 <colspec colnum="18" colname="b12" align="center" />
682 <colspec colnum="19" colname="b11" align="center" />
683 <colspec colnum="20" colname="b10" align="center" />
684
685 <colspec colnum="22" colname="b27" align="center" />
686 <colspec colnum="23" colname="b26" align="center" />
687 <colspec colnum="24" colname="b25" align="center" />
688 <colspec colnum="25" colname="b24" align="center" />
689 <colspec colnum="26" colname="b23" align="center" />
690 <colspec colnum="27" colname="b22" align="center" />
691 <colspec colnum="28" colname="b21" align="center" />
692 <colspec colnum="29" colname="b20" align="center" />
693
694 <colspec colnum="31" colname="b37" align="center" />
695 <colspec colnum="32" colname="b36" align="center" />
696 <colspec colnum="33" colname="b35" align="center" />
697 <colspec colnum="34" colname="b34" align="center" />
698 <colspec colnum="35" colname="b33" align="center" />
699 <colspec colnum="36" colname="b32" align="center" />
700 <colspec colnum="37" colname="b31" align="center" />
701 <colspec colnum="38" colname="b30" align="center" />
702
703 <spanspec namest="b07" nameend="b00" spanname="b0" />
704 <spanspec namest="b17" nameend="b10" spanname="b1" />
705 <spanspec namest="b27" nameend="b20" spanname="b2" />
706 <spanspec namest="b37" nameend="b30" spanname="b3" />
707 <thead>
708 <row>
709 <entry>Identifier</entry>
710 <entry>Code</entry>
711 <entry>&nbsp;</entry>
712 <entry spanname="b0">Byte&nbsp;0 in memory</entry>
713 <entry spanname="b1">Byte&nbsp;1</entry>
714 <entry spanname="b2">Byte&nbsp;2</entry>
715 <entry spanname="b3">Byte&nbsp;3</entry>
716 </row>
717 <row>
718 <entry>&nbsp;</entry>
719 <entry>&nbsp;</entry>
720 <entry>Bit</entry>
721 <entry>7</entry>
722 <entry>6</entry>
723 <entry>5</entry>
724 <entry>4</entry>
725 <entry>3</entry>
726 <entry>2</entry>
727 <entry>1</entry>
728 <entry>0</entry>
729 <entry>&nbsp;</entry>
730 <entry>7</entry>
731 <entry>6</entry>
732 <entry>5</entry>
733 <entry>4</entry>
734 <entry>3</entry>
735 <entry>2</entry>
736 <entry>1</entry>
737 <entry>0</entry>
738 <entry>&nbsp;</entry>
739 <entry>7</entry>
740 <entry>6</entry>
741 <entry>5</entry>
742 <entry>4</entry>
743 <entry>3</entry>
744 <entry>2</entry>
745 <entry>1</entry>
746 <entry>0</entry>
747 <entry>&nbsp;</entry>
748 <entry>7</entry>
749 <entry>6</entry>
750 <entry>5</entry>
751 <entry>4</entry>
752 <entry>3</entry>
753 <entry>2</entry>
754 <entry>1</entry>
755 <entry>0</entry>
756 </row>
757 </thead>
758 <tbody>
759 <row id="V4L2-PIX-FMT-RGB444">
760 <entry><constant>V4L2_PIX_FMT_RGB444</constant></entry>
761 <entry>'R444'</entry>
762 <entry></entry>
763 <entry>g<subscript>3</subscript></entry>
764 <entry>g<subscript>2</subscript></entry>
765 <entry>g<subscript>1</subscript></entry>
766 <entry>g<subscript>0</subscript></entry>
767 <entry>b<subscript>3</subscript></entry>
768 <entry>b<subscript>2</subscript></entry>
769 <entry>b<subscript>1</subscript></entry>
770 <entry>b<subscript>0</subscript></entry>
771 <entry></entry>
772 <entry>a<subscript>3</subscript></entry>
773 <entry>a<subscript>2</subscript></entry>
774 <entry>a<subscript>1</subscript></entry>
775 <entry>a<subscript>0</subscript></entry>
776 <entry>r<subscript>3</subscript></entry>
777 <entry>r<subscript>2</subscript></entry>
778 <entry>r<subscript>1</subscript></entry>
779 <entry>r<subscript>0</subscript></entry>
780 </row>
781 <row id="V4L2-PIX-FMT-RGB555">
782 <entry><constant>V4L2_PIX_FMT_RGB555</constant></entry>
783 <entry>'RGBO'</entry>
784 <entry></entry>
785 <entry>g<subscript>2</subscript></entry>
786 <entry>g<subscript>1</subscript></entry>
787 <entry>g<subscript>0</subscript></entry>
788 <entry>b<subscript>4</subscript></entry>
789 <entry>b<subscript>3</subscript></entry>
790 <entry>b<subscript>2</subscript></entry>
791 <entry>b<subscript>1</subscript></entry>
792 <entry>b<subscript>0</subscript></entry>
793 <entry></entry>
794 <entry>a</entry>
795 <entry>r<subscript>4</subscript></entry>
796 <entry>r<subscript>3</subscript></entry>
797 <entry>r<subscript>2</subscript></entry>
798 <entry>r<subscript>1</subscript></entry>
799 <entry>r<subscript>0</subscript></entry>
800 <entry>g<subscript>4</subscript></entry>
801 <entry>g<subscript>3</subscript></entry>
802 </row>
803 <row id="V4L2-PIX-FMT-BGR32">
804 <entry><constant>V4L2_PIX_FMT_BGR32</constant></entry>
805 <entry>'BGR4'</entry>
806 <entry></entry>
807 <entry>b<subscript>7</subscript></entry>
808 <entry>b<subscript>6</subscript></entry>
809 <entry>b<subscript>5</subscript></entry>
810 <entry>b<subscript>4</subscript></entry>
811 <entry>b<subscript>3</subscript></entry>
812 <entry>b<subscript>2</subscript></entry>
813 <entry>b<subscript>1</subscript></entry>
814 <entry>b<subscript>0</subscript></entry>
815 <entry></entry>
816 <entry>g<subscript>7</subscript></entry>
817 <entry>g<subscript>6</subscript></entry>
818 <entry>g<subscript>5</subscript></entry>
819 <entry>g<subscript>4</subscript></entry>
820 <entry>g<subscript>3</subscript></entry>
821 <entry>g<subscript>2</subscript></entry>
822 <entry>g<subscript>1</subscript></entry>
823 <entry>g<subscript>0</subscript></entry>
824 <entry></entry>
825 <entry>r<subscript>7</subscript></entry>
826 <entry>r<subscript>6</subscript></entry>
827 <entry>r<subscript>5</subscript></entry>
828 <entry>r<subscript>4</subscript></entry>
829 <entry>r<subscript>3</subscript></entry>
830 <entry>r<subscript>2</subscript></entry>
831 <entry>r<subscript>1</subscript></entry>
832 <entry>r<subscript>0</subscript></entry>
833 <entry></entry>
834 <entry>a<subscript>7</subscript></entry>
835 <entry>a<subscript>6</subscript></entry>
836 <entry>a<subscript>5</subscript></entry>
837 <entry>a<subscript>4</subscript></entry>
838 <entry>a<subscript>3</subscript></entry>
839 <entry>a<subscript>2</subscript></entry>
840 <entry>a<subscript>1</subscript></entry>
841 <entry>a<subscript>0</subscript></entry>
842 </row>
843 <row id="V4L2-PIX-FMT-RGB32">
844 <entry><constant>V4L2_PIX_FMT_RGB32</constant></entry>
845 <entry>'RGB4'</entry>
846 <entry></entry>
847 <entry>a<subscript>7</subscript></entry>
848 <entry>a<subscript>6</subscript></entry>
849 <entry>a<subscript>5</subscript></entry>
850 <entry>a<subscript>4</subscript></entry>
851 <entry>a<subscript>3</subscript></entry>
852 <entry>a<subscript>2</subscript></entry>
853 <entry>a<subscript>1</subscript></entry>
854 <entry>a<subscript>0</subscript></entry>
855 <entry></entry>
856 <entry>r<subscript>7</subscript></entry>
857 <entry>r<subscript>6</subscript></entry>
858 <entry>r<subscript>5</subscript></entry>
859 <entry>r<subscript>4</subscript></entry>
860 <entry>r<subscript>3</subscript></entry>
861 <entry>r<subscript>2</subscript></entry>
862 <entry>r<subscript>1</subscript></entry>
863 <entry>r<subscript>0</subscript></entry>
864 <entry></entry>
865 <entry>g<subscript>7</subscript></entry>
866 <entry>g<subscript>6</subscript></entry>
867 <entry>g<subscript>5</subscript></entry>
868 <entry>g<subscript>4</subscript></entry>
869 <entry>g<subscript>3</subscript></entry>
870 <entry>g<subscript>2</subscript></entry>
871 <entry>g<subscript>1</subscript></entry>
872 <entry>g<subscript>0</subscript></entry>
873 <entry></entry>
874 <entry>b<subscript>7</subscript></entry>
875 <entry>b<subscript>6</subscript></entry>
876 <entry>b<subscript>5</subscript></entry>
877 <entry>b<subscript>4</subscript></entry>
878 <entry>b<subscript>3</subscript></entry>
879 <entry>b<subscript>2</subscript></entry>
880 <entry>b<subscript>1</subscript></entry>
881 <entry>b<subscript>0</subscript></entry>
882 </row>
883 </tbody>
884 </tgroup>
885 </table>
886
515 <para>A test utility to determine which RGB formats a driver 887 <para>A test utility to determine which RGB formats a driver
516actually supports is available from the LinuxTV v4l-dvb repository. 888actually supports is available from the LinuxTV v4l-dvb repository.
517See &v4l-dvb; for access instructions.</para> 889See &v4l-dvb; for access instructions.</para>
diff --git a/Documentation/DocBook/media/v4l/pixfmt-sdr-cs08.xml b/Documentation/DocBook/media/v4l/pixfmt-sdr-cs08.xml
new file mode 100644
index 000000000000..6118d8f7a20c
--- /dev/null
+++ b/Documentation/DocBook/media/v4l/pixfmt-sdr-cs08.xml
@@ -0,0 +1,44 @@
1<refentry id="V4L2-SDR-FMT-CS08">
2 <refmeta>
3 <refentrytitle>V4L2_SDR_FMT_CS8 ('CS08')</refentrytitle>
4 &manvol;
5 </refmeta>
6 <refnamediv>
7 <refname>
8 <constant>V4L2_SDR_FMT_CS8</constant>
9 </refname>
10 <refpurpose>Complex signed 8-bit IQ sample</refpurpose>
11 </refnamediv>
12 <refsect1>
13 <title>Description</title>
14 <para>
15This format contains sequence of complex number samples. Each complex number
16consist two parts, called In-phase and Quadrature (IQ). Both I and Q are
17represented as a 8 bit signed number. I value comes first and Q value after
18that.
19 </para>
20 <example>
21 <title><constant>V4L2_SDR_FMT_CS8</constant> 1 sample</title>
22 <formalpara>
23 <title>Byte Order.</title>
24 <para>Each cell is one byte.
25 <informaltable frame="none">
26 <tgroup cols="2" align="center">
27 <colspec align="left" colwidth="2*" />
28 <tbody valign="top">
29 <row>
30 <entry>start&nbsp;+&nbsp;0:</entry>
31 <entry>I'<subscript>0</subscript></entry>
32 </row>
33 <row>
34 <entry>start&nbsp;+&nbsp;1:</entry>
35 <entry>Q'<subscript>0</subscript></entry>
36 </row>
37 </tbody>
38 </tgroup>
39 </informaltable>
40 </para>
41 </formalpara>
42 </example>
43 </refsect1>
44</refentry>
diff --git a/Documentation/DocBook/media/v4l/pixfmt-sdr-cs14le.xml b/Documentation/DocBook/media/v4l/pixfmt-sdr-cs14le.xml
new file mode 100644
index 000000000000..e4b494ce1369
--- /dev/null
+++ b/Documentation/DocBook/media/v4l/pixfmt-sdr-cs14le.xml
@@ -0,0 +1,47 @@
1<refentry id="V4L2-SDR-FMT-CS14LE">
2 <refmeta>
3 <refentrytitle>V4L2_SDR_FMT_CS14LE ('CS14')</refentrytitle>
4 &manvol;
5 </refmeta>
6 <refnamediv>
7 <refname>
8 <constant>V4L2_SDR_FMT_CS14LE</constant>
9 </refname>
10 <refpurpose>Complex signed 14-bit little endian IQ sample</refpurpose>
11 </refnamediv>
12 <refsect1>
13 <title>Description</title>
14 <para>
15This format contains sequence of complex number samples. Each complex number
16consist two parts, called In-phase and Quadrature (IQ). Both I and Q are
17represented as a 14 bit signed little endian number. I value comes first
18and Q value after that. 14 bit value is stored in 16 bit space with unused
19high bits padded with 0.
20 </para>
21 <example>
22 <title><constant>V4L2_SDR_FMT_CS14LE</constant> 1 sample</title>
23 <formalpara>
24 <title>Byte Order.</title>
25 <para>Each cell is one byte.
26 <informaltable frame="none">
27 <tgroup cols="3" align="center">
28 <colspec align="left" colwidth="2*" />
29 <tbody valign="top">
30 <row>
31 <entry>start&nbsp;+&nbsp;0:</entry>
32 <entry>I'<subscript>0[7:0]</subscript></entry>
33 <entry>I'<subscript>0[13:8]</subscript></entry>
34 </row>
35 <row>
36 <entry>start&nbsp;+&nbsp;2:</entry>
37 <entry>Q'<subscript>0[7:0]</subscript></entry>
38 <entry>Q'<subscript>0[13:8]</subscript></entry>
39 </row>
40 </tbody>
41 </tgroup>
42 </informaltable>
43 </para>
44 </formalpara>
45 </example>
46 </refsect1>
47</refentry>
diff --git a/Documentation/DocBook/media/v4l/pixfmt-sdr-ru12le.xml b/Documentation/DocBook/media/v4l/pixfmt-sdr-ru12le.xml
new file mode 100644
index 000000000000..3df076b99f94
--- /dev/null
+++ b/Documentation/DocBook/media/v4l/pixfmt-sdr-ru12le.xml
@@ -0,0 +1,40 @@
1<refentry id="V4L2-SDR-FMT-RU12LE">
2 <refmeta>
3 <refentrytitle>V4L2_SDR_FMT_RU12LE ('RU12')</refentrytitle>
4 &manvol;
5 </refmeta>
6 <refnamediv>
7 <refname>
8 <constant>V4L2_SDR_FMT_RU12LE</constant>
9 </refname>
10 <refpurpose>Real unsigned 12-bit little endian sample</refpurpose>
11 </refnamediv>
12 <refsect1>
13 <title>Description</title>
14 <para>
15This format contains sequence of real number samples. Each sample is
16represented as a 12 bit unsigned little endian number. Sample is stored
17in 16 bit space with unused high bits padded with 0.
18 </para>
19 <example>
20 <title><constant>V4L2_SDR_FMT_RU12LE</constant> 1 sample</title>
21 <formalpara>
22 <title>Byte Order.</title>
23 <para>Each cell is one byte.
24 <informaltable frame="none">
25 <tgroup cols="3" align="center">
26 <colspec align="left" colwidth="2*" />
27 <tbody valign="top">
28 <row>
29 <entry>start&nbsp;+&nbsp;0:</entry>
30 <entry>I'<subscript>0[7:0]</subscript></entry>
31 <entry>I'<subscript>0[11:8]</subscript></entry>
32 </row>
33 </tbody>
34 </tgroup>
35 </informaltable>
36 </para>
37 </formalpara>
38 </example>
39 </refsect1>
40</refentry>
diff --git a/Documentation/DocBook/media/v4l/pixfmt-srggb12.xml b/Documentation/DocBook/media/v4l/pixfmt-srggb12.xml
index 9ba4fb690bc0..96947f17fca1 100644
--- a/Documentation/DocBook/media/v4l/pixfmt-srggb12.xml
+++ b/Documentation/DocBook/media/v4l/pixfmt-srggb12.xml
@@ -18,7 +18,7 @@
18 <title>Description</title> 18 <title>Description</title>
19 19
20 <para>The following four pixel formats are raw sRGB / Bayer formats with 20 <para>The following four pixel formats are raw sRGB / Bayer formats with
2112 bits per colour. Each colour component is stored in a 16-bit word, with 6 2112 bits per colour. Each colour component is stored in a 16-bit word, with 4
22unused high bits filled with zeros. Each n-pixel row contains n/2 green samples 22unused high bits filled with zeros. Each n-pixel row contains n/2 green samples
23and n/2 blue or red samples, with alternating red and blue rows. Bytes are 23and n/2 blue or red samples, with alternating red and blue rows. Bytes are
24stored in memory in little endian order. They are conventionally described 24stored in memory in little endian order. They are conventionally described
diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml b/Documentation/DocBook/media/v4l/pixfmt.xml
index 91dcbc84f3f8..df5b23d46552 100644
--- a/Documentation/DocBook/media/v4l/pixfmt.xml
+++ b/Documentation/DocBook/media/v4l/pixfmt.xml
@@ -112,9 +112,34 @@ see <xref linkend="colorspaces" />.</entry>
112 <row> 112 <row>
113 <entry>__u32</entry> 113 <entry>__u32</entry>
114 <entry><structfield>priv</structfield></entry> 114 <entry><structfield>priv</structfield></entry>
115 <entry>Reserved for custom (driver defined) additional 115 <entry><para>This field indicates whether the remaining fields of the
116information about formats. When not used drivers and applications must 116<structname>v4l2_pix_format</structname> structure, also called the extended
117set this field to zero.</entry> 117fields, are valid. When set to <constant>V4L2_PIX_FMT_PRIV_MAGIC</constant>, it
118indicates that the extended fields have been correctly initialized. When set to
119any other value it indicates that the extended fields contain undefined values.
120</para>
121<para>Applications that wish to use the pixel format extended fields must first
122ensure that the feature is supported by querying the device for the
123<link linkend="querycap"><constant>V4L2_CAP_EXT_PIX_FORMAT</constant></link>
124capability. If the capability isn't set the pixel format extended fields are not
125supported and using the extended fields will lead to undefined results.</para>
126<para>To use the extended fields, applications must set the
127<structfield>priv</structfield> field to
128<constant>V4L2_PIX_FMT_PRIV_MAGIC</constant>, initialize all the extended fields
129and zero the unused bytes of the <structname>v4l2_format</structname>
130<structfield>raw_data</structfield> field.</para>
131<para>When the <structfield>priv</structfield> field isn't set to
132<constant>V4L2_PIX_FMT_PRIV_MAGIC</constant> drivers must act as if all the
133extended fields were set to zero. On return drivers must set the
134<structfield>priv</structfield> field to
135<constant>V4L2_PIX_FMT_PRIV_MAGIC</constant> and all the extended fields to
136applicable values.</para></entry>
137 </row>
138 <row>
139 <entry>__u32</entry>
140 <entry><structfield>flags</structfield></entry>
141 <entry>Flags set by the application or driver, see <xref
142linkend="format-flags" />.</entry>
118 </row> 143 </row>
119 </tbody> 144 </tbody>
120 </tgroup> 145 </tgroup>
@@ -201,9 +226,15 @@ codes can be used.</entry>
201 and the number of valid entries in the 226 and the number of valid entries in the
202 <structfield>plane_fmt</structfield> array.</entry> 227 <structfield>plane_fmt</structfield> array.</entry>
203 </row> 228 </row>
229 <row>
230 <entry>__u8</entry>
231 <entry><structfield>flags</structfield></entry>
232 <entry>Flags set by the application or driver, see <xref
233linkend="format-flags" />.</entry>
234 </row>
204 <row> 235 <row>
205 <entry>__u8</entry> 236 <entry>__u8</entry>
206 <entry><structfield>reserved[11]</structfield></entry> 237 <entry><structfield>reserved[10]</structfield></entry>
207 <entry>Reserved for future extensions. Should be zeroed by the 238 <entry>Reserved for future extensions. Should be zeroed by the
208 application.</entry> 239 application.</entry>
209 </row> 240 </row>
@@ -248,7 +279,7 @@ has just as many pad bytes after it as the other rows.</para>
248 279
249 <para>In V4L2 each format has an identifier which looks like 280 <para>In V4L2 each format has an identifier which looks like
250<constant>PIX_FMT_XXX</constant>, defined in the <link 281<constant>PIX_FMT_XXX</constant>, defined in the <link
251linkend="videodev">videodev.h</link> header file. These identifiers 282linkend="videodev">videodev2.h</link> header file. These identifiers
252represent <link linkend="v4l2-fourcc">four character (FourCC) codes</link> 283represent <link linkend="v4l2-fourcc">four character (FourCC) codes</link>
253which are also listed below, however they are not the same as those 284which are also listed below, however they are not the same as those
254used in the Windows world.</para> 285used in the Windows world.</para>
@@ -828,6 +859,9 @@ interface only.</para>
828 859
829 &sub-sdr-cu08; 860 &sub-sdr-cu08;
830 &sub-sdr-cu16le; 861 &sub-sdr-cu16le;
862 &sub-sdr-cs08;
863 &sub-sdr-cs14le;
864 &sub-sdr-ru12le;
831 865
832 </section> 866 </section>
833 867
@@ -1060,4 +1094,21 @@ concatenated to form the JPEG stream. </para>
1060 </tbody> 1094 </tbody>
1061 </tgroup> 1095 </tgroup>
1062 </table> 1096 </table>
1097
1098 <table frame="none" pgwide="1" id="format-flags">
1099 <title>Format Flags</title>
1100 <tgroup cols="3">
1101 &cs-def;
1102 <tbody valign="top">
1103 <row>
1104 <entry><constant>V4L2_PIX_FMT_FLAG_PREMUL_ALPHA</constant></entry>
1105 <entry>0x00000001</entry>
1106 <entry>The color values are premultiplied by the alpha channel
1107value. For example, if a light blue pixel with 50% transparency was described by
1108RGBA values (128, 192, 255, 128), the same pixel described with premultiplied
1109colors would be described by RGBA values (64, 96, 128, 128) </entry>
1110 </row>
1111 </tbody>
1112 </tgroup>
1113 </table>
1063 </section> 1114 </section>
diff --git a/Documentation/DocBook/media/v4l/selection-api.xml b/Documentation/DocBook/media/v4l/selection-api.xml
index 4c238ce068b0..28cbded766c9 100644
--- a/Documentation/DocBook/media/v4l/selection-api.xml
+++ b/Documentation/DocBook/media/v4l/selection-api.xml
@@ -86,47 +86,47 @@ selection targets available for a video capture device. It is recommended to
86configure the cropping targets before to the composing targets.</para> 86configure the cropping targets before to the composing targets.</para>
87 87
88<para>The range of coordinates of the top left corner, width and height of 88<para>The range of coordinates of the top left corner, width and height of
89areas that can be sampled is given by the <constant> V4L2_SEL_TGT_CROP_BOUNDS 89areas that can be sampled is given by the <constant>V4L2_SEL_TGT_CROP_BOUNDS</constant>
90</constant> target. It is recommended for the driver developers to put the 90target. It is recommended for the driver developers to put the
91top/left corner at position <constant> (0,0) </constant>. The rectangle's 91top/left corner at position <constant>(0,0)</constant>. The rectangle's
92coordinates are expressed in pixels.</para> 92coordinates are expressed in pixels.</para>
93 93
94<para>The top left corner, width and height of the source rectangle, that is 94<para>The top left corner, width and height of the source rectangle, that is
95the area actually sampled, is given by the <constant> V4L2_SEL_TGT_CROP 95the area actually sampled, is given by the <constant>V4L2_SEL_TGT_CROP</constant>
96</constant> target. It uses the same coordinate system as <constant> 96target. It uses the same coordinate system as <constant>V4L2_SEL_TGT_CROP_BOUNDS</constant>.
97V4L2_SEL_TGT_CROP_BOUNDS </constant>. The active cropping area must lie 97The active cropping area must lie completely inside the capture boundaries. The
98completely inside the capture boundaries. The driver may further adjust the 98driver may further adjust the requested size and/or position according to hardware
99requested size and/or position according to hardware limitations.</para> 99limitations.</para>
100 100
101<para>Each capture device has a default source rectangle, given by the 101<para>Each capture device has a default source rectangle, given by the
102<constant> V4L2_SEL_TGT_CROP_DEFAULT </constant> target. This rectangle shall 102<constant>V4L2_SEL_TGT_CROP_DEFAULT</constant> target. This rectangle shall
103over what the driver writer considers the complete picture. Drivers shall set 103over what the driver writer considers the complete picture. Drivers shall set
104the active crop rectangle to the default when the driver is first loaded, but 104the active crop rectangle to the default when the driver is first loaded, but
105not later.</para> 105not later.</para>
106 106
107<para>The composing targets refer to a memory buffer. The limits of composing 107<para>The composing targets refer to a memory buffer. The limits of composing
108coordinates are obtained using <constant> V4L2_SEL_TGT_COMPOSE_BOUNDS 108coordinates are obtained using <constant>V4L2_SEL_TGT_COMPOSE_BOUNDS</constant>.
109</constant>. All coordinates are expressed in pixels. The rectangle's top/left 109All coordinates are expressed in pixels. The rectangle's top/left
110corner must be located at position <constant> (0,0) </constant>. The width and 110corner must be located at position <constant>(0,0)</constant>. The width and
111height are equal to the image size set by <constant> VIDIOC_S_FMT </constant>. 111height are equal to the image size set by <constant>VIDIOC_S_FMT</constant>.
112</para> 112</para>
113 113
114<para>The part of a buffer into which the image is inserted by the hardware is 114<para>The part of a buffer into which the image is inserted by the hardware is
115controlled by the <constant> V4L2_SEL_TGT_COMPOSE </constant> target. 115controlled by the <constant>V4L2_SEL_TGT_COMPOSE</constant> target.
116The rectangle's coordinates are also expressed in the same coordinate system as 116The rectangle's coordinates are also expressed in the same coordinate system as
117the bounds rectangle. The composing rectangle must lie completely inside bounds 117the bounds rectangle. The composing rectangle must lie completely inside bounds
118rectangle. The driver must adjust the composing rectangle to fit to the 118rectangle. The driver must adjust the composing rectangle to fit to the
119bounding limits. Moreover, the driver can perform other adjustments according 119bounding limits. Moreover, the driver can perform other adjustments according
120to hardware limitations. The application can control rounding behaviour using 120to hardware limitations. The application can control rounding behaviour using
121<link linkend="v4l2-selection-flags"> constraint flags </link>.</para> 121<link linkend="v4l2-selection-flags"> constraint flags</link>.</para>
122 122
123<para>For capture devices the default composing rectangle is queried using 123<para>For capture devices the default composing rectangle is queried using
124<constant> V4L2_SEL_TGT_COMPOSE_DEFAULT </constant>. It is usually equal to the 124<constant>V4L2_SEL_TGT_COMPOSE_DEFAULT</constant>. It is usually equal to the
125bounding rectangle.</para> 125bounding rectangle.</para>
126 126
127<para>The part of a buffer that is modified by the hardware is given by 127<para>The part of a buffer that is modified by the hardware is given by
128<constant> V4L2_SEL_TGT_COMPOSE_PADDED </constant>. It contains all pixels 128<constant>V4L2_SEL_TGT_COMPOSE_PADDED</constant>. It contains all pixels
129defined using <constant> V4L2_SEL_TGT_COMPOSE </constant> plus all 129defined using <constant>V4L2_SEL_TGT_COMPOSE</constant> plus all
130padding data modified by hardware during insertion process. All pixels outside 130padding data modified by hardware during insertion process. All pixels outside
131this rectangle <emphasis>must not</emphasis> be changed by the hardware. The 131this rectangle <emphasis>must not</emphasis> be changed by the hardware. The
132content of pixels that lie inside the padded area but outside active area is 132content of pixels that lie inside the padded area but outside active area is
@@ -140,52 +140,51 @@ where the rubbish pixels are located and remove them if needed.</para>
140 <title>Configuration of video output</title> 140 <title>Configuration of video output</title>
141 141
142<para>For output devices targets and ioctls are used similarly to the video 142<para>For output devices targets and ioctls are used similarly to the video
143capture case. The <emphasis> composing </emphasis> rectangle refers to the 143capture case. The <emphasis>composing</emphasis> rectangle refers to the
144insertion of an image into a video signal. The cropping rectangles refer to a 144insertion of an image into a video signal. The cropping rectangles refer to a
145memory buffer. It is recommended to configure the composing targets before to 145memory buffer. It is recommended to configure the composing targets before to
146the cropping targets.</para> 146the cropping targets.</para>
147 147
148<para>The cropping targets refer to the memory buffer that contains an image to 148<para>The cropping targets refer to the memory buffer that contains an image to
149be inserted into a video signal or graphical screen. The limits of cropping 149be inserted into a video signal or graphical screen. The limits of cropping
150coordinates are obtained using <constant> V4L2_SEL_TGT_CROP_BOUNDS </constant>. 150coordinates are obtained using <constant>V4L2_SEL_TGT_CROP_BOUNDS</constant>.
151All coordinates are expressed in pixels. The top/left corner is always point 151All coordinates are expressed in pixels. The top/left corner is always point
152<constant> (0,0) </constant>. The width and height is equal to the image size 152<constant>(0,0)</constant>. The width and height is equal to the image size
153specified using <constant> VIDIOC_S_FMT </constant> ioctl.</para> 153specified using <constant>VIDIOC_S_FMT</constant> ioctl.</para>
154 154
155<para>The top left corner, width and height of the source rectangle, that is 155<para>The top left corner, width and height of the source rectangle, that is
156the area from which image date are processed by the hardware, is given by the 156the area from which image date are processed by the hardware, is given by the
157<constant> V4L2_SEL_TGT_CROP </constant>. Its coordinates are expressed 157<constant>V4L2_SEL_TGT_CROP</constant>. Its coordinates are expressed
158in in the same coordinate system as the bounds rectangle. The active cropping 158in in the same coordinate system as the bounds rectangle. The active cropping
159area must lie completely inside the crop boundaries and the driver may further 159area must lie completely inside the crop boundaries and the driver may further
160adjust the requested size and/or position according to hardware 160adjust the requested size and/or position according to hardware
161limitations.</para> 161limitations.</para>
162 162
163<para>For output devices the default cropping rectangle is queried using 163<para>For output devices the default cropping rectangle is queried using
164<constant> V4L2_SEL_TGT_CROP_DEFAULT </constant>. It is usually equal to the 164<constant>V4L2_SEL_TGT_CROP_DEFAULT</constant>. It is usually equal to the
165bounding rectangle.</para> 165bounding rectangle.</para>
166 166
167<para>The part of a video signal or graphics display where the image is 167<para>The part of a video signal or graphics display where the image is
168inserted by the hardware is controlled by <constant> 168inserted by the hardware is controlled by <constant>V4L2_SEL_TGT_COMPOSE</constant>
169V4L2_SEL_TGT_COMPOSE </constant> target. The rectangle's coordinates 169target. The rectangle's coordinates are expressed in pixels. The composing
170are expressed in pixels. The composing rectangle must lie completely inside the 170rectangle must lie completely inside the bounds rectangle. The driver must
171bounds rectangle. The driver must adjust the area to fit to the bounding 171adjust the area to fit to the bounding limits. Moreover, the driver can
172limits. Moreover, the driver can perform other adjustments according to 172perform other adjustments according to hardware limitations.</para>
173hardware limitations. </para> 173
174 174<para>The device has a default composing rectangle, given by the
175<para>The device has a default composing rectangle, given by the <constant> 175<constant>V4L2_SEL_TGT_COMPOSE_DEFAULT</constant> target. This rectangle shall cover what
176V4L2_SEL_TGT_COMPOSE_DEFAULT </constant> target. This rectangle shall cover what
177the driver writer considers the complete picture. It is recommended for the 176the driver writer considers the complete picture. It is recommended for the
178driver developers to put the top/left corner at position <constant> (0,0) 177driver developers to put the top/left corner at position <constant>(0,0)</constant>.
179</constant>. Drivers shall set the active composing rectangle to the default 178Drivers shall set the active composing rectangle to the default
180one when the driver is first loaded.</para> 179one when the driver is first loaded.</para>
181 180
182<para>The devices may introduce additional content to video signal other than 181<para>The devices may introduce additional content to video signal other than
183an image from memory buffers. It includes borders around an image. However, 182an image from memory buffers. It includes borders around an image. However,
184such a padded area is driver-dependent feature not covered by this document. 183such a padded area is driver-dependent feature not covered by this document.
185Driver developers are encouraged to keep padded rectangle equal to active one. 184Driver developers are encouraged to keep padded rectangle equal to active one.
186The padded target is accessed by the <constant> V4L2_SEL_TGT_COMPOSE_PADDED 185The padded target is accessed by the <constant>V4L2_SEL_TGT_COMPOSE_PADDED</constant>
187</constant> identifier. It must contain all pixels from the <constant> 186identifier. It must contain all pixels from the <constant>V4L2_SEL_TGT_COMPOSE</constant>
188V4L2_SEL_TGT_COMPOSE </constant> target.</para> 187target.</para>
189 188
190 </section> 189 </section>
191 190
@@ -194,8 +193,8 @@ V4L2_SEL_TGT_COMPOSE </constant> target.</para>
194 <title>Scaling control</title> 193 <title>Scaling control</title>
195 194
196<para>An application can detect if scaling is performed by comparing the width 195<para>An application can detect if scaling is performed by comparing the width
197and the height of rectangles obtained using <constant> V4L2_SEL_TGT_CROP 196and the height of rectangles obtained using <constant>V4L2_SEL_TGT_CROP</constant>
198</constant> and <constant> V4L2_SEL_TGT_COMPOSE </constant> targets. If 197and <constant>V4L2_SEL_TGT_COMPOSE</constant> targets. If
199these are not equal then the scaling is applied. The application can compute 198these are not equal then the scaling is applied. The application can compute
200the scaling ratios using these values.</para> 199the scaling ratios using these values.</para>
201 200
@@ -208,7 +207,7 @@ the scaling ratios using these values.</para>
208 <title>Comparison with old cropping API</title> 207 <title>Comparison with old cropping API</title>
209 208
210<para>The selection API was introduced to cope with deficiencies of previous 209<para>The selection API was introduced to cope with deficiencies of previous
211<link linkend="crop"> API </link>, that was designed to control simple capture 210<link linkend="crop"> API</link>, that was designed to control simple capture
212devices. Later the cropping API was adopted by video output drivers. The ioctls 211devices. Later the cropping API was adopted by video output drivers. The ioctls
213are used to select a part of the display were the video signal is inserted. It 212are used to select a part of the display were the video signal is inserted. It
214should be considered as an API abuse because the described operation is 213should be considered as an API abuse because the described operation is
@@ -220,7 +219,7 @@ part of an image by abusing V4L2 API. Cropping a smaller image from a larger
220one is achieved by setting the field 219one is achieved by setting the field
221&v4l2-pix-format;<structfield>::bytesperline</structfield>. Introducing an image offsets 220&v4l2-pix-format;<structfield>::bytesperline</structfield>. Introducing an image offsets
222could be done by modifying field &v4l2-buffer;<structfield>::m_userptr</structfield> 221could be done by modifying field &v4l2-buffer;<structfield>::m_userptr</structfield>
223before calling <constant> VIDIOC_QBUF </constant>. Those 222before calling <constant>VIDIOC_QBUF</constant>. Those
224operations should be avoided because they are not portable (endianness), and do 223operations should be avoided because they are not portable (endianness), and do
225not work for macroblock and Bayer formats and mmap buffers. The selection API 224not work for macroblock and Bayer formats and mmap buffers. The selection API
226deals with configuration of buffer cropping/composing in a clear, intuitive and 225deals with configuration of buffer cropping/composing in a clear, intuitive and
@@ -229,7 +228,7 @@ and constraints flags are introduced. Finally, &v4l2-crop; and &v4l2-cropcap;
229have no reserved fields. Therefore there is no way to extend their functionality. 228have no reserved fields. Therefore there is no way to extend their functionality.
230The new &v4l2-selection; provides a lot of place for future 229The new &v4l2-selection; provides a lot of place for future
231extensions. Driver developers are encouraged to implement only selection API. 230extensions. Driver developers are encouraged to implement only selection API.
232The former cropping API would be simulated using the new one. </para> 231The former cropping API would be simulated using the new one.</para>
233 232
234 </section> 233 </section>
235 234
@@ -238,9 +237,9 @@ The former cropping API would be simulated using the new one. </para>
238 <example> 237 <example>
239 <title>Resetting the cropping parameters</title> 238 <title>Resetting the cropping parameters</title>
240 239
241 <para>(A video capture device is assumed; change <constant> 240 <para>(A video capture device is assumed; change
242V4L2_BUF_TYPE_VIDEO_CAPTURE </constant> for other devices; change target to 241<constant>V4L2_BUF_TYPE_VIDEO_CAPTURE</constant> for other devices; change target to
243<constant> V4L2_SEL_TGT_COMPOSE_* </constant> family to configure composing 242<constant>V4L2_SEL_TGT_COMPOSE_*</constant> family to configure composing
244area)</para> 243area)</para>
245 244
246 <programlisting> 245 <programlisting>
@@ -292,8 +291,8 @@ area)</para>
292 291
293 <example> 292 <example>
294 <title>Querying for scaling factors</title> 293 <title>Querying for scaling factors</title>
295 <para>A video output device is assumed; change <constant> 294 <para>A video output device is assumed; change
296V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> for other devices</para> 295<constant>V4L2_BUF_TYPE_VIDEO_OUTPUT</constant> for other devices</para>
297 <programlisting> 296 <programlisting>
298 297
299 &v4l2-selection; compose = { 298 &v4l2-selection; compose = {
diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml
index b445161b912c..f2f81f06a17b 100644
--- a/Documentation/DocBook/media/v4l/v4l2.xml
+++ b/Documentation/DocBook/media/v4l/v4l2.xml
@@ -152,6 +152,14 @@ structs, ioctls) must be noted in more detail in the history chapter
152applications. --> 152applications. -->
153 153
154 <revision> 154 <revision>
155 <revnumber>3.16</revnumber>
156 <date>2014-05-27</date>
157 <authorinitials>lp</authorinitials>
158 <revremark>Extended &v4l2-pix-format;. Added format flags.
159 </revremark>
160 </revision>
161
162 <revision>
155 <revnumber>3.15</revnumber> 163 <revnumber>3.15</revnumber>
156 <date>2014-02-03</date> 164 <date>2014-02-03</date>
157 <authorinitials>hv, ap</authorinitials> 165 <authorinitials>hv, ap</authorinitials>
diff --git a/Documentation/DocBook/media/v4l/vidioc-dqevent.xml b/Documentation/DocBook/media/v4l/vidioc-dqevent.xml
index 820f86e8744b..cb7732582f03 100644
--- a/Documentation/DocBook/media/v4l/vidioc-dqevent.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-dqevent.xml
@@ -94,6 +94,18 @@
94 </row> 94 </row>
95 <row> 95 <row>
96 <entry></entry> 96 <entry></entry>
97 <entry>&v4l2-event-motion-det;</entry>
98 <entry><structfield>motion_det</structfield></entry>
99 <entry>Event data for event V4L2_EVENT_MOTION_DET.</entry>
100 </row>
101 <row>
102 <entry></entry>
103 <entry>&v4l2-event-src-change;</entry>
104 <entry><structfield>src_change</structfield></entry>
105 <entry>Event data for event V4L2_EVENT_SOURCE_CHANGE.</entry>
106 </row>
107 <row>
108 <entry></entry>
97 <entry>__u8</entry> 109 <entry>__u8</entry>
98 <entry><structfield>data</structfield>[64]</entry> 110 <entry><structfield>data</structfield>[64]</entry>
99 <entry>Event data. Defined by the event type. The union 111 <entry>Event data. Defined by the event type. The union
@@ -258,6 +270,44 @@
258 </tgroup> 270 </tgroup>
259 </table> 271 </table>
260 272
273 <table frame="none" pgwide="1" id="v4l2-event-motion-det">
274 <title>struct <structname>v4l2_event_motion_det</structname></title>
275 <tgroup cols="3">
276 &cs-str;
277 <tbody valign="top">
278 <row>
279 <entry>__u32</entry>
280 <entry><structfield>flags</structfield></entry>
281 <entry>
282 Currently only one flag is available: if <constant>V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ</constant>
283 is set, then the <structfield>frame_sequence</structfield> field is valid,
284 otherwise that field should be ignored.
285 </entry>
286 </row>
287 <row>
288 <entry>__u32</entry>
289 <entry><structfield>frame_sequence</structfield></entry>
290 <entry>
291 The sequence number of the frame being received. Only valid if the
292 <constant>V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ</constant> flag was set.
293 </entry>
294 </row>
295 <row>
296 <entry>__u32</entry>
297 <entry><structfield>region_mask</structfield></entry>
298 <entry>
299 The bitmask of the regions that reported motion. There is at least one
300 region. If this field is 0, then no motion was detected at all.
301 If there is no <constant>V4L2_CID_DETECT_MD_REGION_GRID</constant> control
302 (see <xref linkend="detect-controls" />) to assign a different region
303 to each cell in the motion detection grid, then that all cells
304 are automatically assigned to the default region 0.
305 </entry>
306 </row>
307 </tbody>
308 </tgroup>
309 </table>
310
261 <table pgwide="1" frame="none" id="changes-flags"> 311 <table pgwide="1" frame="none" id="changes-flags">
262 <title>Changes</title> 312 <title>Changes</title>
263 <tgroup cols="3"> 313 <tgroup cols="3">
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml b/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml
index e9f6735c0823..c5bdbfcc42b3 100644
--- a/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml
@@ -72,23 +72,30 @@ initialize the <structfield>id</structfield>,
72<structfield>size</structfield> and <structfield>reserved2</structfield> fields 72<structfield>size</structfield> and <structfield>reserved2</structfield> fields
73of each &v4l2-ext-control; and call the 73of each &v4l2-ext-control; and call the
74<constant>VIDIOC_G_EXT_CTRLS</constant> ioctl. String controls controls 74<constant>VIDIOC_G_EXT_CTRLS</constant> ioctl. String controls controls
75must also set the <structfield>string</structfield> field.</para> 75must also set the <structfield>string</structfield> field. Controls
76of compound types (<constant>V4L2_CTRL_FLAG_HAS_PAYLOAD</constant> is set)
77must set the <structfield>ptr</structfield> field.</para>
76 78
77 <para>If the <structfield>size</structfield> is too small to 79 <para>If the <structfield>size</structfield> is too small to
78receive the control result (only relevant for pointer-type controls 80receive the control result (only relevant for pointer-type controls
79like strings), then the driver will set <structfield>size</structfield> 81like strings), then the driver will set <structfield>size</structfield>
80to a valid value and return an &ENOSPC;. You should re-allocate the 82to a valid value and return an &ENOSPC;. You should re-allocate the
81string memory to this new size and try again. It is possible that the 83memory to this new size and try again. For the string type it is possible that
82same issue occurs again if the string has grown in the meantime. It is 84the same issue occurs again if the string has grown in the meantime. It is
83recommended to call &VIDIOC-QUERYCTRL; first and use 85recommended to call &VIDIOC-QUERYCTRL; first and use
84<structfield>maximum</structfield>+1 as the new <structfield>size</structfield> 86<structfield>maximum</structfield>+1 as the new <structfield>size</structfield>
85value. It is guaranteed that that is sufficient memory. 87value. It is guaranteed that that is sufficient memory.
86</para> 88</para>
87 89
90 <para>N-dimensional arrays are set and retrieved row-by-row. You cannot set a partial
91array, all elements have to be set or retrieved. The total size is calculated
92as <structfield>elems</structfield> * <structfield>elem_size</structfield>.
93These values can be obtained by calling &VIDIOC-QUERY-EXT-CTRL;.</para>
94
88 <para>To change the value of a set of controls applications 95 <para>To change the value of a set of controls applications
89initialize the <structfield>id</structfield>, <structfield>size</structfield>, 96initialize the <structfield>id</structfield>, <structfield>size</structfield>,
90<structfield>reserved2</structfield> and 97<structfield>reserved2</structfield> and
91<structfield>value/string</structfield> fields of each &v4l2-ext-control; and 98<structfield>value/value64/string/ptr</structfield> fields of each &v4l2-ext-control; and
92call the <constant>VIDIOC_S_EXT_CTRLS</constant> ioctl. The controls 99call the <constant>VIDIOC_S_EXT_CTRLS</constant> ioctl. The controls
93will only be set if <emphasis>all</emphasis> control values are 100will only be set if <emphasis>all</emphasis> control values are
94valid.</para> 101valid.</para>
@@ -96,7 +103,7 @@ valid.</para>
96 <para>To check if a set of controls have correct values applications 103 <para>To check if a set of controls have correct values applications
97initialize the <structfield>id</structfield>, <structfield>size</structfield>, 104initialize the <structfield>id</structfield>, <structfield>size</structfield>,
98<structfield>reserved2</structfield> and 105<structfield>reserved2</structfield> and
99<structfield>value/string</structfield> fields of each &v4l2-ext-control; and 106<structfield>value/value64/string/ptr</structfield> fields of each &v4l2-ext-control; and
100call the <constant>VIDIOC_TRY_EXT_CTRLS</constant> ioctl. It is up to 107call the <constant>VIDIOC_TRY_EXT_CTRLS</constant> ioctl. It is up to
101the driver whether wrong values are automatically adjusted to a valid 108the driver whether wrong values are automatically adjusted to a valid
102value or if an error is returned.</para> 109value or if an error is returned.</para>
@@ -158,19 +165,47 @@ applications must set the array to zero.</entry>
158 <entry></entry> 165 <entry></entry>
159 <entry>__s32</entry> 166 <entry>__s32</entry>
160 <entry><structfield>value</structfield></entry> 167 <entry><structfield>value</structfield></entry>
161 <entry>New value or current value.</entry> 168 <entry>New value or current value. Valid if this control is not of
169type <constant>V4L2_CTRL_TYPE_INTEGER64</constant> and
170<constant>V4L2_CTRL_FLAG_HAS_PAYLOAD</constant> is not set.</entry>
162 </row> 171 </row>
163 <row> 172 <row>
164 <entry></entry> 173 <entry></entry>
165 <entry>__s64</entry> 174 <entry>__s64</entry>
166 <entry><structfield>value64</structfield></entry> 175 <entry><structfield>value64</structfield></entry>
167 <entry>New value or current value.</entry> 176 <entry>New value or current value. Valid if this control is of
177type <constant>V4L2_CTRL_TYPE_INTEGER64</constant> and
178<constant>V4L2_CTRL_FLAG_HAS_PAYLOAD</constant> is not set.</entry>
168 </row> 179 </row>
169 <row> 180 <row>
170 <entry></entry> 181 <entry></entry>
171 <entry>char *</entry> 182 <entry>char *</entry>
172 <entry><structfield>string</structfield></entry> 183 <entry><structfield>string</structfield></entry>
173 <entry>A pointer to a string.</entry> 184 <entry>A pointer to a string. Valid if this control is of
185type <constant>V4L2_CTRL_TYPE_STRING</constant>.</entry>
186 </row>
187 <row>
188 <entry></entry>
189 <entry>__u8 *</entry>
190 <entry><structfield>p_u8</structfield></entry>
191 <entry>A pointer to a matrix control of unsigned 8-bit values.
192Valid if this control is of type <constant>V4L2_CTRL_TYPE_U8</constant>.</entry>
193 </row>
194 <row>
195 <entry></entry>
196 <entry>__u16 *</entry>
197 <entry><structfield>p_u16</structfield></entry>
198 <entry>A pointer to a matrix control of unsigned 16-bit values.
199Valid if this control is of type <constant>V4L2_CTRL_TYPE_U16</constant>.</entry>
200 </row>
201 <row>
202 <entry></entry>
203 <entry>void *</entry>
204 <entry><structfield>ptr</structfield></entry>
205 <entry>A pointer to a compound type which can be an N-dimensional array and/or a
206compound type (the control's type is >= <constant>V4L2_CTRL_COMPOUND_TYPES</constant>).
207Valid if <constant>V4L2_CTRL_FLAG_HAS_PAYLOAD</constant> is set for this control.
208</entry>
174 </row> 209 </row>
175 </tbody> 210 </tbody>
176 </tgroup> 211 </tgroup>
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-fbuf.xml b/Documentation/DocBook/media/v4l/vidioc-g-fbuf.xml
index 7c63815e7afd..20460730b02c 100644
--- a/Documentation/DocBook/media/v4l/vidioc-g-fbuf.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-g-fbuf.xml
@@ -152,13 +152,10 @@ a valid base address, so applications can find the corresponding Linux
152framebuffer device (see <xref linkend="osd" />).</entry> 152framebuffer device (see <xref linkend="osd" />).</entry>
153 </row> 153 </row>
154 <row> 154 <row>
155 <entry>&v4l2-pix-format;</entry> 155 <entry>struct</entry>
156 <entry><structfield>fmt</structfield></entry> 156 <entry><structfield>fmt</structfield></entry>
157 <entry></entry> 157 <entry></entry>
158 <entry>Layout of the frame buffer. The 158 <entry>Layout of the frame buffer.</entry>
159<structname>v4l2_pix_format</structname> structure is defined in <xref
160linkend="pixfmt" />, for clarification the fields and acceptable values
161 are listed below:</entry>
162 </row> 159 </row>
163 <row> 160 <row>
164 <entry></entry> 161 <entry></entry>
@@ -276,9 +273,8 @@ see <xref linkend="colorspaces" />.</entry>
276 <entry></entry> 273 <entry></entry>
277 <entry>__u32</entry> 274 <entry>__u32</entry>
278 <entry><structfield>priv</structfield></entry> 275 <entry><structfield>priv</structfield></entry>
279 <entry>Reserved for additional information about custom 276 <entry>Reserved. Drivers and applications must set this field to
280(driver defined) formats. When not used drivers and applications must 277zero.</entry>
281set this field to zero.</entry>
282 </row> 278 </row>
283 </tbody> 279 </tbody>
284 </tgroup> 280 </tgroup>
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-selection.xml b/Documentation/DocBook/media/v4l/vidioc-g-selection.xml
index b11ec75e21a1..9c04ac8661b1 100644
--- a/Documentation/DocBook/media/v4l/vidioc-g-selection.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-g-selection.xml
@@ -58,17 +58,16 @@
58 58
59 <para>The ioctls are used to query and configure selection rectangles.</para> 59 <para>The ioctls are used to query and configure selection rectangles.</para>
60 60
61<para> To query the cropping (composing) rectangle set &v4l2-selection; 61<para>To query the cropping (composing) rectangle set &v4l2-selection;
62<structfield> type </structfield> field to the respective buffer type. 62<structfield> type </structfield> field to the respective buffer type.
63Do not use multiplanar buffers. Use <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE 63Do not use multiplanar buffers. Use <constant>V4L2_BUF_TYPE_VIDEO_CAPTURE</constant>
64</constant> instead of <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE 64instead of <constant>V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE</constant>. Use
65</constant>. Use <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> instead of 65<constant>V4L2_BUF_TYPE_VIDEO_OUTPUT</constant> instead of
66<constant> V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE </constant>. The next step is 66<constant>V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE</constant>. The next step is
67setting the value of &v4l2-selection; <structfield>target</structfield> field 67setting the value of &v4l2-selection; <structfield>target</structfield> field
68to <constant> V4L2_SEL_TGT_CROP </constant> (<constant> 68to <constant>V4L2_SEL_TGT_CROP</constant> (<constant>V4L2_SEL_TGT_COMPOSE</constant>).
69V4L2_SEL_TGT_COMPOSE </constant>). Please refer to table <xref 69Please refer to table <xref linkend="v4l2-selections-common" /> or <xref linkend="selection-api" />
70linkend="v4l2-selections-common" /> or <xref linkend="selection-api" /> for additional 70for additional targets. The <structfield>flags</structfield> and <structfield>reserved
71targets. The <structfield>flags</structfield> and <structfield>reserved
72</structfield> fields of &v4l2-selection; are ignored and they must be filled 71</structfield> fields of &v4l2-selection; are ignored and they must be filled
73with zeros. The driver fills the rest of the structure or 72with zeros. The driver fills the rest of the structure or
74returns &EINVAL; if incorrect buffer type or target was used. If cropping 73returns &EINVAL; if incorrect buffer type or target was used. If cropping
@@ -77,19 +76,18 @@ always equal to the bounds rectangle. Finally, the &v4l2-rect;
77<structfield>r</structfield> rectangle is filled with the current cropping 76<structfield>r</structfield> rectangle is filled with the current cropping
78(composing) coordinates. The coordinates are expressed in driver-dependent 77(composing) coordinates. The coordinates are expressed in driver-dependent
79units. The only exception are rectangles for images in raw formats, whose 78units. The only exception are rectangles for images in raw formats, whose
80coordinates are always expressed in pixels. </para> 79coordinates are always expressed in pixels.</para>
81 80
82<para> To change the cropping (composing) rectangle set the &v4l2-selection; 81<para>To change the cropping (composing) rectangle set the &v4l2-selection;
83<structfield>type</structfield> field to the respective buffer type. Do not 82<structfield>type</structfield> field to the respective buffer type. Do not
84use multiplanar buffers. Use <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE 83use multiplanar buffers. Use <constant>V4L2_BUF_TYPE_VIDEO_CAPTURE</constant>
85</constant> instead of <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE 84instead of <constant>V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE</constant>. Use
86</constant>. Use <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> instead of 85<constant>V4L2_BUF_TYPE_VIDEO_OUTPUT</constant> instead of
87<constant> V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE </constant>. The next step is 86<constant>V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE</constant>. The next step is
88setting the value of &v4l2-selection; <structfield>target</structfield> to 87setting the value of &v4l2-selection; <structfield>target</structfield> to
89<constant>V4L2_SEL_TGT_CROP</constant> (<constant> 88<constant>V4L2_SEL_TGT_CROP</constant> (<constant>V4L2_SEL_TGT_COMPOSE</constant>).
90V4L2_SEL_TGT_COMPOSE </constant>). Please refer to table <xref 89Please refer to table <xref linkend="v4l2-selections-common" /> or <xref linkend="selection-api" />
91linkend="v4l2-selections-common" /> or <xref linkend="selection-api" /> for additional 90for additional targets. The &v4l2-rect; <structfield>r</structfield> rectangle need to be
92targets. The &v4l2-rect; <structfield>r</structfield> rectangle need to be
93set to the desired active area. Field &v4l2-selection; <structfield> reserved 91set to the desired active area. Field &v4l2-selection; <structfield> reserved
94</structfield> is ignored and must be filled with zeros. The driver may adjust 92</structfield> is ignored and must be filled with zeros. The driver may adjust
95coordinates of the requested rectangle. An application may 93coordinates of the requested rectangle. An application may
@@ -149,8 +147,8 @@ On success the &v4l2-rect; <structfield>r</structfield> field contains
149the adjusted rectangle. When the parameters are unsuitable the application may 147the adjusted rectangle. When the parameters are unsuitable the application may
150modify the cropping (composing) or image parameters and repeat the cycle until 148modify the cropping (composing) or image parameters and repeat the cycle until
151satisfactory parameters have been negotiated. If constraints flags have to be 149satisfactory parameters have been negotiated. If constraints flags have to be
152violated at then ERANGE is returned. The error indicates that <emphasis> there 150violated at then ERANGE is returned. The error indicates that <emphasis>there
153exist no rectangle </emphasis> that satisfies the constraints.</para> 151exist no rectangle</emphasis> that satisfies the constraints.</para>
154 152
155 <para>Selection targets and flags are documented in <xref 153 <para>Selection targets and flags are documented in <xref
156 linkend="v4l2-selections-common"/>.</para> 154 linkend="v4l2-selections-common"/>.</para>
diff --git a/Documentation/DocBook/media/v4l/vidioc-querycap.xml b/Documentation/DocBook/media/v4l/vidioc-querycap.xml
index 370d49d6fb64..d0c5e604f014 100644
--- a/Documentation/DocBook/media/v4l/vidioc-querycap.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-querycap.xml
@@ -302,6 +302,12 @@ modulator programming see
302<link linkend="sdr">SDR Capture</link> interface.</entry> 302<link linkend="sdr">SDR Capture</link> interface.</entry>
303 </row> 303 </row>
304 <row> 304 <row>
305 <entry><constant>V4L2_CAP_EXT_PIX_FORMAT</constant></entry>
306 <entry>0x00200000</entry>
307 <entry>The device supports the &v4l2-pix-format; extended
308fields.</entry>
309 </row>
310 <row>
305 <entry><constant>V4L2_CAP_READWRITE</constant></entry> 311 <entry><constant>V4L2_CAP_READWRITE</constant></entry>
306 <entry>0x01000000</entry> 312 <entry>0x01000000</entry>
307 <entry>The device supports the <link 313 <entry>The device supports the <link
diff --git a/Documentation/DocBook/media/v4l/vidioc-queryctrl.xml b/Documentation/DocBook/media/v4l/vidioc-queryctrl.xml
index e6645b996558..2bd98fd7a4e5 100644
--- a/Documentation/DocBook/media/v4l/vidioc-queryctrl.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-queryctrl.xml
@@ -1,11 +1,12 @@
1<refentry id="vidioc-queryctrl"> 1<refentry id="vidioc-queryctrl">
2 <refmeta> 2 <refmeta>
3 <refentrytitle>ioctl VIDIOC_QUERYCTRL, VIDIOC_QUERYMENU</refentrytitle> 3 <refentrytitle>ioctl VIDIOC_QUERYCTRL, VIDIOC_QUERY_EXT_CTRL, VIDIOC_QUERYMENU</refentrytitle>
4 &manvol; 4 &manvol;
5 </refmeta> 5 </refmeta>
6 6
7 <refnamediv> 7 <refnamediv>
8 <refname>VIDIOC_QUERYCTRL</refname> 8 <refname>VIDIOC_QUERYCTRL</refname>
9 <refname>VIDIOC_QUERY_EXT_CTRL</refname>
9 <refname>VIDIOC_QUERYMENU</refname> 10 <refname>VIDIOC_QUERYMENU</refname>
10 <refpurpose>Enumerate controls and menu control items</refpurpose> 11 <refpurpose>Enumerate controls and menu control items</refpurpose>
11 </refnamediv> 12 </refnamediv>
@@ -24,6 +25,14 @@
24 <funcdef>int <function>ioctl</function></funcdef> 25 <funcdef>int <function>ioctl</function></funcdef>
25 <paramdef>int <parameter>fd</parameter></paramdef> 26 <paramdef>int <parameter>fd</parameter></paramdef>
26 <paramdef>int <parameter>request</parameter></paramdef> 27 <paramdef>int <parameter>request</parameter></paramdef>
28 <paramdef>struct v4l2_query_ext_ctrl *<parameter>argp</parameter></paramdef>
29 </funcprototype>
30 </funcsynopsis>
31 <funcsynopsis>
32 <funcprototype>
33 <funcdef>int <function>ioctl</function></funcdef>
34 <paramdef>int <parameter>fd</parameter></paramdef>
35 <paramdef>int <parameter>request</parameter></paramdef>
27 <paramdef>struct v4l2_querymenu *<parameter>argp</parameter></paramdef> 36 <paramdef>struct v4l2_querymenu *<parameter>argp</parameter></paramdef>
28 </funcprototype> 37 </funcprototype>
29 </funcsynopsis> 38 </funcsynopsis>
@@ -42,7 +51,7 @@
42 <varlistentry> 51 <varlistentry>
43 <term><parameter>request</parameter></term> 52 <term><parameter>request</parameter></term>
44 <listitem> 53 <listitem>
45 <para>VIDIOC_QUERYCTRL, VIDIOC_QUERYMENU</para> 54 <para>VIDIOC_QUERYCTRL, VIDIOC_QUERY_EXT_CTRL, VIDIOC_QUERYMENU</para>
46 </listitem> 55 </listitem>
47 </varlistentry> 56 </varlistentry>
48 <varlistentry> 57 <varlistentry>
@@ -67,7 +76,7 @@ structure. The driver fills the rest of the structure or returns an
67<constant>VIDIOC_QUERYCTRL</constant> with successive 76<constant>VIDIOC_QUERYCTRL</constant> with successive
68<structfield>id</structfield> values starting from 77<structfield>id</structfield> values starting from
69<constant>V4L2_CID_BASE</constant> up to and exclusive 78<constant>V4L2_CID_BASE</constant> up to and exclusive
70<constant>V4L2_CID_BASE_LASTP1</constant>. Drivers may return 79<constant>V4L2_CID_LASTP1</constant>. Drivers may return
71<errorcode>EINVAL</errorcode> if a control in this range is not 80<errorcode>EINVAL</errorcode> if a control in this range is not
72supported. Further applications can enumerate private controls, which 81supported. Further applications can enumerate private controls, which
73are not defined in this specification, by starting at 82are not defined in this specification, by starting at
@@ -89,9 +98,23 @@ prematurely end the enumeration).</para></footnote></para>
89 98
90 <para>When the application ORs <structfield>id</structfield> with 99 <para>When the application ORs <structfield>id</structfield> with
91<constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant> the driver returns the 100<constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant> the driver returns the
92next supported control, or <errorcode>EINVAL</errorcode> if there is 101next supported non-compound control, or <errorcode>EINVAL</errorcode>
93none. Drivers which do not support this flag yet always return 102if there is none. In addition, the <constant>V4L2_CTRL_FLAG_NEXT_COMPOUND</constant>
94<errorcode>EINVAL</errorcode>.</para> 103flag can be specified to enumerate all compound controls (i.e. controls
104with type &ge; <constant>V4L2_CTRL_COMPOUND_TYPES</constant>). Specify both
105<constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant> and
106<constant>V4L2_CTRL_FLAG_NEXT_COMPOUND</constant> in order to enumerate
107all controls, compound or not. Drivers which do not support these flags yet
108always return <errorcode>EINVAL</errorcode>.</para>
109
110 <para>The <constant>VIDIOC_QUERY_EXT_CTRL</constant> ioctl was
111introduced in order to better support controls that can use compound
112types, and to expose additional control information that cannot be
113returned in &v4l2-queryctrl; since that structure is full.</para>
114
115 <para><constant>VIDIOC_QUERY_EXT_CTRL</constant> is used in the
116same way as <constant>VIDIOC_QUERYCTRL</constant>, except that the
117<structfield>reserved</structfield> array must be zeroed as well.</para>
95 118
96 <para>Additional information is required for menu controls: the 119 <para>Additional information is required for menu controls: the
97names of the menu items. To query them applications set the 120names of the menu items. To query them applications set the
@@ -142,38 +165,23 @@ string. This information is intended for the user.</entry>
142 <entry>__s32</entry> 165 <entry>__s32</entry>
143 <entry><structfield>minimum</structfield></entry> 166 <entry><structfield>minimum</structfield></entry>
144 <entry>Minimum value, inclusive. This field gives a lower 167 <entry>Minimum value, inclusive. This field gives a lower
145bound for <constant>V4L2_CTRL_TYPE_INTEGER</constant> controls and the 168bound for the control. See &v4l2-ctrl-type; how the minimum value is to
146lowest valid index for <constant>V4L2_CTRL_TYPE_MENU</constant> controls. 169be used for each possible control type. Note that this a signed 32-bit value.</entry>
147For <constant>V4L2_CTRL_TYPE_STRING</constant> controls the minimum value
148gives the minimum length of the string. This length <emphasis>does not include the terminating
149zero</emphasis>. It may not be valid for any other type of control, including
150<constant>V4L2_CTRL_TYPE_INTEGER64</constant> controls. Note that this is a
151signed value.</entry>
152 </row> 170 </row>
153 <row> 171 <row>
154 <entry>__s32</entry> 172 <entry>__s32</entry>
155 <entry><structfield>maximum</structfield></entry> 173 <entry><structfield>maximum</structfield></entry>
156 <entry>Maximum value, inclusive. This field gives an upper 174 <entry>Maximum value, inclusive. This field gives an upper
157bound for <constant>V4L2_CTRL_TYPE_INTEGER</constant> controls and the 175bound for the control. See &v4l2-ctrl-type; how the maximum value is to
158highest valid index for <constant>V4L2_CTRL_TYPE_MENU</constant> 176be used for each possible control type. Note that this a signed 32-bit value.</entry>
159controls. For <constant>V4L2_CTRL_TYPE_BITMASK</constant> controls it is the
160set of usable bits.
161For <constant>V4L2_CTRL_TYPE_STRING</constant> controls the maximum value
162gives the maximum length of the string. This length <emphasis>does not include the terminating
163zero</emphasis>. It may not be valid for any other type of control, including
164<constant>V4L2_CTRL_TYPE_INTEGER64</constant> controls. Note that this is a
165signed value.</entry>
166 </row> 177 </row>
167 <row> 178 <row>
168 <entry>__s32</entry> 179 <entry>__s32</entry>
169 <entry><structfield>step</structfield></entry> 180 <entry><structfield>step</structfield></entry>
170 <entry><para>This field gives a step size for 181 <entry><para>This field gives a step size for the control.
171<constant>V4L2_CTRL_TYPE_INTEGER</constant> controls. For 182See &v4l2-ctrl-type; how the step value is to be used for each possible
172<constant>V4L2_CTRL_TYPE_STRING</constant> controls this field refers to 183control type. Note that this an unsigned 32-bit value.
173the string length that has to be a multiple of this step size. 184</para><para>Generally drivers should not scale hardware
174It may not be valid for any other type of control, including
175<constant>V4L2_CTRL_TYPE_INTEGER64</constant>
176controls.</para><para>Generally drivers should not scale hardware
177control values. It may be necessary for example when the 185control values. It may be necessary for example when the
178<structfield>name</structfield> or <structfield>id</structfield> imply 186<structfield>name</structfield> or <structfield>id</structfield> imply
179a particular unit and the hardware actually accepts only multiples of 187a particular unit and the hardware actually accepts only multiples of
@@ -192,10 +200,11 @@ be always positive.</para></entry>
192 <entry><structfield>default_value</structfield></entry> 200 <entry><structfield>default_value</structfield></entry>
193 <entry>The default value of a 201 <entry>The default value of a
194<constant>V4L2_CTRL_TYPE_INTEGER</constant>, 202<constant>V4L2_CTRL_TYPE_INTEGER</constant>,
195<constant>_BOOLEAN</constant> or <constant>_MENU</constant> control. 203<constant>_BOOLEAN</constant>, <constant>_BITMASK</constant>,
196Not valid for other types of controls. Drivers reset controls only 204<constant>_MENU</constant> or <constant>_INTEGER_MENU</constant> control.
197when the driver is loaded, not later, in particular not when the 205Not valid for other types of controls.
198func-open; is called.</entry> 206Note that drivers reset controls to their default value only when the
207driver is first loaded, never afterwards.</entry>
199 </row> 208 </row>
200 <row> 209 <row>
201 <entry>__u32</entry> 210 <entry>__u32</entry>
@@ -213,6 +222,126 @@ the array to zero.</entry>
213 </tgroup> 222 </tgroup>
214 </table> 223 </table>
215 224
225 <table pgwide="1" frame="none" id="v4l2-query-ext-ctrl">
226 <title>struct <structname>v4l2_query_ext_ctrl</structname></title>
227 <tgroup cols="3">
228 &cs-str;
229 <tbody valign="top">
230 <row>
231 <entry>__u32</entry>
232 <entry><structfield>id</structfield></entry>
233 <entry>Identifies the control, set by the application. See
234<xref linkend="control-id" /> for predefined IDs. When the ID is ORed
235with <constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant> the driver clears the
236flag and returns the first non-compound control with a higher ID. When the
237ID is ORed with <constant>V4L2_CTRL_FLAG_NEXT_COMPOUND</constant> the driver
238clears the flag and returns the first compound control with a higher ID.
239Set both to get the first control (compound or not) with a higher ID.</entry>
240 </row>
241 <row>
242 <entry>__u32</entry>
243 <entry><structfield>type</structfield></entry>
244 <entry>Type of control, see <xref
245 linkend="v4l2-ctrl-type" />.</entry>
246 </row>
247 <row>
248 <entry>char</entry>
249 <entry><structfield>name</structfield>[32]</entry>
250 <entry>Name of the control, a NUL-terminated ASCII
251string. This information is intended for the user.</entry>
252 </row>
253 <row>
254 <entry>__s64</entry>
255 <entry><structfield>minimum</structfield></entry>
256 <entry>Minimum value, inclusive. This field gives a lower
257bound for the control. See &v4l2-ctrl-type; how the minimum value is to
258be used for each possible control type. Note that this a signed 64-bit value.</entry>
259 </row>
260 <row>
261 <entry>__s64</entry>
262 <entry><structfield>maximum</structfield></entry>
263 <entry>Maximum value, inclusive. This field gives an upper
264bound for the control. See &v4l2-ctrl-type; how the maximum value is to
265be used for each possible control type. Note that this a signed 64-bit value.</entry>
266 </row>
267 <row>
268 <entry>__u64</entry>
269 <entry><structfield>step</structfield></entry>
270 <entry><para>This field gives a step size for the control.
271See &v4l2-ctrl-type; how the step value is to be used for each possible
272control type. Note that this an unsigned 64-bit value.
273</para><para>Generally drivers should not scale hardware
274control values. It may be necessary for example when the
275<structfield>name</structfield> or <structfield>id</structfield> imply
276a particular unit and the hardware actually accepts only multiples of
277said unit. If so, drivers must take care values are properly rounded
278when scaling, such that errors will not accumulate on repeated
279read-write cycles.</para><para>This field gives the smallest change of
280an integer control actually affecting hardware. Often the information
281is needed when the user can change controls by keyboard or GUI
282buttons, rather than a slider. When for example a hardware register
283accepts values 0-511 and the driver reports 0-65535, step should be
284128.</para></entry>
285 </row>
286 <row>
287 <entry>__s64</entry>
288 <entry><structfield>default_value</structfield></entry>
289 <entry>The default value of a
290<constant>V4L2_CTRL_TYPE_INTEGER</constant>, <constant>_INTEGER64</constant>,
291<constant>_BOOLEAN</constant>, <constant>_BITMASK</constant>,
292<constant>_MENU</constant>, <constant>_INTEGER_MENU</constant>,
293<constant>_U8</constant> or <constant>_U16</constant> control.
294Not valid for other types of controls.
295Note that drivers reset controls to their default value only when the
296driver is first loaded, never afterwards.
297</entry>
298 </row>
299 <row>
300 <entry>__u32</entry>
301 <entry><structfield>flags</structfield></entry>
302 <entry>Control flags, see <xref
303 linkend="control-flags" />.</entry>
304 </row>
305 <row>
306 <entry>__u32</entry>
307 <entry><structfield>elem_size</structfield></entry>
308 <entry>The size in bytes of a single element of the array.
309Given a char pointer <constant>p</constant> to a 3-dimensional array you can find the
310position of cell <constant>(z, y, x)</constant> as follows:
311<constant>p + ((z * dims[1] + y) * dims[0] + x) * elem_size</constant>. <structfield>elem_size</structfield>
312is always valid, also when the control isn't an array. For string controls
313<structfield>elem_size</structfield> is equal to <structfield>maximum + 1</structfield>.
314</entry>
315 </row>
316 <row>
317 <entry>__u32</entry>
318 <entry><structfield>elems</structfield></entry>
319 <entry>The number of elements in the N-dimensional array. If this control
320is not an array, then <structfield>elems</structfield> is 1. The <structfield>elems</structfield>
321field can never be 0.</entry>
322 </row>
323 <row>
324 <entry>__u32</entry>
325 <entry><structfield>nr_of_dims</structfield></entry>
326 <entry>The number of dimension in the N-dimensional array. If this control
327is not an array, then this field is 0.</entry>
328 </row>
329 <row>
330 <entry>__u32</entry>
331 <entry><structfield>dims[V4L2_CTRL_MAX_DIMS]</structfield></entry>
332 <entry>The size of each dimension. The first <structfield>nr_of_dims</structfield>
333elements of this array must be non-zero, all remaining elements must be zero.</entry>
334 </row>
335 <row>
336 <entry>__u32</entry>
337 <entry><structfield>reserved</structfield>[32]</entry>
338 <entry>Reserved for future extensions. Applications and drivers
339must set the array to zero.</entry>
340 </row>
341 </tbody>
342 </tgroup>
343 </table>
344
216 <table pgwide="1" frame="none" id="v4l2-querymenu"> 345 <table pgwide="1" frame="none" id="v4l2-querymenu">
217 <title>struct <structname>v4l2_querymenu</structname></title> 346 <title>struct <structname>v4l2_querymenu</structname></title>
218 <tgroup cols="4"> 347 <tgroup cols="4">
@@ -347,11 +476,14 @@ Drivers must ignore the value passed with
347 </row> 476 </row>
348 <row> 477 <row>
349 <entry><constant>V4L2_CTRL_TYPE_INTEGER64</constant></entry> 478 <entry><constant>V4L2_CTRL_TYPE_INTEGER64</constant></entry>
350 <entry>n/a</entry> 479 <entry>any</entry>
351 <entry>n/a</entry> 480 <entry>any</entry>
352 <entry>n/a</entry> 481 <entry>any</entry>
353 <entry>A 64-bit integer valued control. Minimum, maximum 482 <entry>A 64-bit integer valued control. Minimum, maximum
354and step size cannot be queried.</entry> 483and step size cannot be queried using <constant>VIDIOC_QUERYCTRL</constant>.
484Only <constant>VIDIOC_QUERY_EXT_CTRL</constant> can retrieve the 64-bit
485min/max/step values, they should be interpreted as n/a when using
486<constant>VIDIOC_QUERYCTRL</constant>.</entry>
355 </row> 487 </row>
356 <row> 488 <row>
357 <entry><constant>V4L2_CTRL_TYPE_STRING</constant></entry> 489 <entry><constant>V4L2_CTRL_TYPE_STRING</constant></entry>
@@ -379,6 +511,26 @@ ioctl returns the name of the control class and this control type.
379Older drivers which do not support this feature return an 511Older drivers which do not support this feature return an
380&EINVAL;.</entry> 512&EINVAL;.</entry>
381 </row> 513 </row>
514 <row>
515 <entry><constant>V4L2_CTRL_TYPE_U8</constant></entry>
516 <entry>any</entry>
517 <entry>any</entry>
518 <entry>any</entry>
519 <entry>An unsigned 8-bit valued control ranging from minimum to
520maximum inclusive. The step value indicates the increment between
521values which are actually different on the hardware.
522</entry>
523 </row>
524 <row>
525 <entry><constant>V4L2_CTRL_TYPE_U16</constant></entry>
526 <entry>any</entry>
527 <entry>any</entry>
528 <entry>any</entry>
529 <entry>An unsigned 16-bit valued control ranging from minimum to
530maximum inclusive. The step value indicates the increment between
531values which are actually different on the hardware.
532</entry>
533 </row>
382 </tbody> 534 </tbody>
383 </tgroup> 535 </tgroup>
384 </table> 536 </table>
@@ -450,6 +602,14 @@ is in auto-gain mode. In such a case the hardware calculates the gain value base
450the lighting conditions which can change over time. Note that setting a new value for 602the lighting conditions which can change over time. Note that setting a new value for
451a volatile control will have no effect. The new value will just be ignored.</entry> 603a volatile control will have no effect. The new value will just be ignored.</entry>
452 </row> 604 </row>
605 <row>
606 <entry><constant>V4L2_CTRL_FLAG_HAS_PAYLOAD</constant></entry>
607 <entry>0x0100</entry>
608 <entry>This control has a pointer type, so its value has to be accessed
609using one of the pointer fields of &v4l2-ext-control;. This flag is set for controls
610that are an array, string, or have a compound type. In all cases you have to set a
611pointer to memory containing the payload of the control.</entry>
612 </row>
453 </tbody> 613 </tbody>
454 </tgroup> 614 </tgroup>
455 </table> 615 </table>
diff --git a/Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml b/Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml
index 17efa870d4d2..9f6095608837 100644
--- a/Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml
@@ -175,6 +175,14 @@
175 </entry> 175 </entry>
176 </row> 176 </row>
177 <row> 177 <row>
178 <entry><constant>V4L2_EVENT_MOTION_DET</constant></entry>
179 <entry>5</entry>
180 <entry>
181 <para>Triggered whenever the motion detection state for one or more of the regions
182 changes. This event has a &v4l2-event-motion-det; associated with it.</para>
183 </entry>
184 </row>
185 <row>
178 <entry><constant>V4L2_EVENT_PRIVATE_START</constant></entry> 186 <entry><constant>V4L2_EVENT_PRIVATE_START</constant></entry>
179 <entry>0x08000000</entry> 187 <entry>0x08000000</entry>
180 <entry>Base event number for driver-private events.</entry> 188 <entry>Base event number for driver-private events.</entry>
diff --git a/Documentation/RCU/RTFP.txt b/Documentation/RCU/RTFP.txt
index 2f0fcb2112d2..f29bcbc463e7 100644
--- a/Documentation/RCU/RTFP.txt
+++ b/Documentation/RCU/RTFP.txt
@@ -2451,8 +2451,8 @@ lot of {Linux} into your technology!!!"
2451,month="February" 2451,month="February"
2452,year="2010" 2452,year="2010"
2453,note="Available: 2453,note="Available:
2454\url{http://kerneltrap.com/mailarchive/linux-netdev/2010/2/26/6270589} 2454\url{http://thread.gmane.org/gmane.linux.network/153338}
2455[Viewed March 20, 2011]" 2455[Viewed June 9, 2014]"
2456,annotation={ 2456,annotation={
2457 Use a pair of list_head structures to support RCU-protected 2457 Use a pair of list_head structures to support RCU-protected
2458 resizable hash tables. 2458 resizable hash tables.
diff --git a/Documentation/RCU/rcuref.txt b/Documentation/RCU/rcuref.txt
index 141d531aa14b..613033ff2b9b 100644
--- a/Documentation/RCU/rcuref.txt
+++ b/Documentation/RCU/rcuref.txt
@@ -1,5 +1,14 @@
1Reference-count design for elements of lists/arrays protected by RCU. 1Reference-count design for elements of lists/arrays protected by RCU.
2 2
3
4Please note that the percpu-ref feature is likely your first
5stop if you need to combine reference counts and RCU. Please see
6include/linux/percpu-refcount.h for more information. However, in
7those unusual cases where percpu-ref would consume too much memory,
8please read on.
9
10------------------------------------------------------------------------
11
3Reference counting on elements of lists which are protected by traditional 12Reference counting on elements of lists which are protected by traditional
4reader/writer spinlocks or semaphores are straightforward: 13reader/writer spinlocks or semaphores are straightforward:
5 14
diff --git a/Documentation/arm64/booting.txt b/Documentation/arm64/booting.txt
index 37fc4f632176..85af34d55cee 100644
--- a/Documentation/arm64/booting.txt
+++ b/Documentation/arm64/booting.txt
@@ -72,27 +72,54 @@ The decompressed kernel image contains a 64-byte header as follows:
72 72
73 u32 code0; /* Executable code */ 73 u32 code0; /* Executable code */
74 u32 code1; /* Executable code */ 74 u32 code1; /* Executable code */
75 u64 text_offset; /* Image load offset */ 75 u64 text_offset; /* Image load offset, little endian */
76 u64 res0 = 0; /* reserved */ 76 u64 image_size; /* Effective Image size, little endian */
77 u64 res1 = 0; /* reserved */ 77 u64 flags; /* kernel flags, little endian */
78 u64 res2 = 0; /* reserved */ 78 u64 res2 = 0; /* reserved */
79 u64 res3 = 0; /* reserved */ 79 u64 res3 = 0; /* reserved */
80 u64 res4 = 0; /* reserved */ 80 u64 res4 = 0; /* reserved */
81 u32 magic = 0x644d5241; /* Magic number, little endian, "ARM\x64" */ 81 u32 magic = 0x644d5241; /* Magic number, little endian, "ARM\x64" */
82 u32 res5 = 0; /* reserved */ 82 u32 res5; /* reserved (used for PE COFF offset) */
83 83
84 84
85Header notes: 85Header notes:
86 86
87- As of v3.17, all fields are little endian unless stated otherwise.
88
87- code0/code1 are responsible for branching to stext. 89- code0/code1 are responsible for branching to stext.
90
88- when booting through EFI, code0/code1 are initially skipped. 91- when booting through EFI, code0/code1 are initially skipped.
89 res5 is an offset to the PE header and the PE header has the EFI 92 res5 is an offset to the PE header and the PE header has the EFI
90 entry point (efi_stub_entry). When the stub has done its work, it 93 entry point (efi_stub_entry). When the stub has done its work, it
91 jumps to code0 to resume the normal boot process. 94 jumps to code0 to resume the normal boot process.
92 95
93The image must be placed at the specified offset (currently 0x80000) 96- Prior to v3.17, the endianness of text_offset was not specified. In
94from the start of the system RAM and called there. The start of the 97 these cases image_size is zero and text_offset is 0x80000 in the
95system RAM must be aligned to 2MB. 98 endianness of the kernel. Where image_size is non-zero image_size is
99 little-endian and must be respected. Where image_size is zero,
100 text_offset can be assumed to be 0x80000.
101
102- The flags field (introduced in v3.17) is a little-endian 64-bit field
103 composed as follows:
104 Bit 0: Kernel endianness. 1 if BE, 0 if LE.
105 Bits 1-63: Reserved.
106
107- When image_size is zero, a bootloader should attempt to keep as much
108 memory as possible free for use by the kernel immediately after the
109 end of the kernel image. The amount of space required will vary
110 depending on selected features, and is effectively unbound.
111
112The Image must be placed text_offset bytes from a 2MB aligned base
113address near the start of usable system RAM and called there. Memory
114below that base address is currently unusable by Linux, and therefore it
115is strongly recommended that this location is the start of system RAM.
116At least image_size bytes from the start of the image must be free for
117use by the kernel.
118
119Any memory described to the kernel (even that below the 2MB aligned base
120address) which is not marked as reserved from the kernel e.g. with a
121memreserve region in the device tree) will be considered as available to
122the kernel.
96 123
97Before jumping into the kernel, the following conditions must be met: 124Before jumping into the kernel, the following conditions must be met:
98 125
diff --git a/Documentation/arm64/memory.txt b/Documentation/arm64/memory.txt
index d50fa618371b..344e85cc7323 100644
--- a/Documentation/arm64/memory.txt
+++ b/Documentation/arm64/memory.txt
@@ -2,18 +2,18 @@
2 ============================== 2 ==============================
3 3
4Author: Catalin Marinas <catalin.marinas@arm.com> 4Author: Catalin Marinas <catalin.marinas@arm.com>
5Date : 20 February 2012
6 5
7This document describes the virtual memory layout used by the AArch64 6This document describes the virtual memory layout used by the AArch64
8Linux kernel. The architecture allows up to 4 levels of translation 7Linux kernel. The architecture allows up to 4 levels of translation
9tables with a 4KB page size and up to 3 levels with a 64KB page size. 8tables with a 4KB page size and up to 3 levels with a 64KB page size.
10 9
11AArch64 Linux uses 3 levels of translation tables with the 4KB page 10AArch64 Linux uses either 3 levels or 4 levels of translation tables
12configuration, allowing 39-bit (512GB) virtual addresses for both user 11with the 4KB page configuration, allowing 39-bit (512GB) or 48-bit
13and kernel. With 64KB pages, only 2 levels of translation tables are 12(256TB) virtual addresses, respectively, for both user and kernel. With
14used but the memory layout is the same. 1364KB pages, only 2 levels of translation tables, allowing 42-bit (4TB)
14virtual address, are used but the memory layout is the same.
15 15
16User addresses have bits 63:39 set to 0 while the kernel addresses have 16User addresses have bits 63:48 set to 0 while the kernel addresses have
17the same bits set to 1. TTBRx selection is given by bit 63 of the 17the same bits set to 1. TTBRx selection is given by bit 63 of the
18virtual address. The swapper_pg_dir contains only kernel (global) 18virtual address. The swapper_pg_dir contains only kernel (global)
19mappings while the user pgd contains only user (non-global) mappings. 19mappings while the user pgd contains only user (non-global) mappings.
@@ -21,58 +21,40 @@ The swapper_pgd_dir address is written to TTBR1 and never written to
21TTBR0. 21TTBR0.
22 22
23 23
24AArch64 Linux memory layout with 4KB pages: 24AArch64 Linux memory layout with 4KB pages + 3 levels:
25 25
26Start End Size Use 26Start End Size Use
27----------------------------------------------------------------------- 27-----------------------------------------------------------------------
280000000000000000 0000007fffffffff 512GB user 280000000000000000 0000007fffffffff 512GB user
29ffffff8000000000 ffffffffffffffff 512GB kernel
29 30
30ffffff8000000000 ffffffbbfffeffff ~240GB vmalloc
31 31
32ffffffbbffff0000 ffffffbbffffffff 64KB [guard page] 32AArch64 Linux memory layout with 4KB pages + 4 levels:
33 33
34ffffffbc00000000 ffffffbdffffffff 8GB vmemmap 34Start End Size Use
35 35-----------------------------------------------------------------------
36ffffffbe00000000 ffffffbffbbfffff ~8GB [guard, future vmmemap] 360000000000000000 0000ffffffffffff 256TB user
37 37ffff000000000000 ffffffffffffffff 256TB kernel
38ffffffbffa000000 ffffffbffaffffff 16MB PCI I/O space
39
40ffffffbffb000000 ffffffbffbbfffff 12MB [guard]
41
42ffffffbffbc00000 ffffffbffbdfffff 2MB fixed mappings
43
44ffffffbffbe00000 ffffffbffbffffff 2MB [guard]
45
46ffffffbffc000000 ffffffbfffffffff 64MB modules
47
48ffffffc000000000 ffffffffffffffff 256GB kernel logical memory map
49 38
50 39
51AArch64 Linux memory layout with 64KB pages: 40AArch64 Linux memory layout with 64KB pages + 2 levels:
52 41
53Start End Size Use 42Start End Size Use
54----------------------------------------------------------------------- 43-----------------------------------------------------------------------
550000000000000000 000003ffffffffff 4TB user 440000000000000000 000003ffffffffff 4TB user
45fffffc0000000000 ffffffffffffffff 4TB kernel
56 46
57fffffc0000000000 fffffdfbfffeffff ~2TB vmalloc
58 47
59fffffdfbffff0000 fffffdfbffffffff 64KB [guard page] 48AArch64 Linux memory layout with 64KB pages + 3 levels:
60 49
61fffffdfc00000000 fffffdfdffffffff 8GB vmemmap 50Start End Size Use
62 51-----------------------------------------------------------------------
63fffffdfe00000000 fffffdfffbbfffff ~8GB [guard, future vmmemap] 520000000000000000 0000ffffffffffff 256TB user
64 53ffff000000000000 ffffffffffffffff 256TB kernel
65fffffdfffa000000 fffffdfffaffffff 16MB PCI I/O space
66
67fffffdfffb000000 fffffdfffbbfffff 12MB [guard]
68
69fffffdfffbc00000 fffffdfffbdfffff 2MB fixed mappings
70
71fffffdfffbe00000 fffffdfffbffffff 2MB [guard]
72 54
73fffffdfffc000000 fffffdffffffffff 64MB modules
74 55
75fffffe0000000000 ffffffffffffffff 2TB kernel logical memory map 56For details of the virtual kernel memory layout please see the kernel
57booting log.
76 58
77 59
78Translation table lookup with 4KB pages: 60Translation table lookup with 4KB pages:
@@ -86,7 +68,7 @@ Translation table lookup with 4KB pages:
86 | | | | +-> [20:12] L3 index 68 | | | | +-> [20:12] L3 index
87 | | | +-----------> [29:21] L2 index 69 | | | +-----------> [29:21] L2 index
88 | | +---------------------> [38:30] L1 index 70 | | +---------------------> [38:30] L1 index
89 | +-------------------------------> [47:39] L0 index (not used) 71 | +-------------------------------> [47:39] L0 index
90 +-------------------------------------------------> [63] TTBR0/1 72 +-------------------------------------------------> [63] TTBR0/1
91 73
92 74
@@ -99,10 +81,11 @@ Translation table lookup with 64KB pages:
99 | | | | v 81 | | | | v
100 | | | | [15:0] in-page offset 82 | | | | [15:0] in-page offset
101 | | | +----------> [28:16] L3 index 83 | | | +----------> [28:16] L3 index
102 | | +--------------------------> [41:29] L2 index (only 38:29 used) 84 | | +--------------------------> [41:29] L2 index
103 | +-------------------------------> [47:42] L1 index (not used) 85 | +-------------------------------> [47:42] L1 index
104 +-------------------------------------------------> [63] TTBR0/1 86 +-------------------------------------------------> [63] TTBR0/1
105 87
88
106When using KVM, the hypervisor maps kernel pages in EL2, at a fixed 89When using KVM, the hypervisor maps kernel pages in EL2, at a fixed
107offset from the kernel VA (top 24bits of the kernel VA set to zero): 90offset from the kernel VA (top 24bits of the kernel VA set to zero):
108 91
diff --git a/Documentation/cgroups/cgroups.txt b/Documentation/cgroups/cgroups.txt
index 821de56d1580..10c949b293e4 100644
--- a/Documentation/cgroups/cgroups.txt
+++ b/Documentation/cgroups/cgroups.txt
@@ -599,6 +599,20 @@ fork. If this method returns 0 (success) then this should remain valid
599while the caller holds cgroup_mutex and it is ensured that either 599while the caller holds cgroup_mutex and it is ensured that either
600attach() or cancel_attach() will be called in future. 600attach() or cancel_attach() will be called in future.
601 601
602void css_reset(struct cgroup_subsys_state *css)
603(cgroup_mutex held by caller)
604
605An optional operation which should restore @css's configuration to the
606initial state. This is currently only used on the unified hierarchy
607when a subsystem is disabled on a cgroup through
608"cgroup.subtree_control" but should remain enabled because other
609subsystems depend on it. cgroup core makes such a css invisible by
610removing the associated interface files and invokes this callback so
611that the hidden subsystem can return to the initial neutral state.
612This prevents unexpected resource control from a hidden css and
613ensures that the configuration is in the initial state when it is made
614visible again later.
615
602void cancel_attach(struct cgroup *cgrp, struct cgroup_taskset *tset) 616void cancel_attach(struct cgroup *cgrp, struct cgroup_taskset *tset)
603(cgroup_mutex held by caller) 617(cgroup_mutex held by caller)
604 618
diff --git a/Documentation/cgroups/unified-hierarchy.txt b/Documentation/cgroups/unified-hierarchy.txt
index 324b182e6000..4f4563277864 100644
--- a/Documentation/cgroups/unified-hierarchy.txt
+++ b/Documentation/cgroups/unified-hierarchy.txt
@@ -94,12 +94,35 @@ change soon.
94 94
95 mount -t cgroup -o __DEVEL__sane_behavior cgroup $MOUNT_POINT 95 mount -t cgroup -o __DEVEL__sane_behavior cgroup $MOUNT_POINT
96 96
97All controllers which are not bound to other hierarchies are 97All controllers which support the unified hierarchy and are not bound
98automatically bound to unified hierarchy and show up at the root of 98to other hierarchies are automatically bound to unified hierarchy and
99it. Controllers which are enabled only in the root of unified 99show up at the root of it. Controllers which are enabled only in the
100hierarchy can be bound to other hierarchies at any time. This allows 100root of unified hierarchy can be bound to other hierarchies. This
101mixing unified hierarchy with the traditional multiple hierarchies in 101allows mixing unified hierarchy with the traditional multiple
102a fully backward compatible way. 102hierarchies in a fully backward compatible way.
103
104For development purposes, the following boot parameter makes all
105controllers to appear on the unified hierarchy whether supported or
106not.
107
108 cgroup__DEVEL__legacy_files_on_dfl
109
110A controller can be moved across hierarchies only after the controller
111is no longer referenced in its current hierarchy. Because per-cgroup
112controller states are destroyed asynchronously and controllers may
113have lingering references, a controller may not show up immediately on
114the unified hierarchy after the final umount of the previous
115hierarchy. Similarly, a controller should be fully disabled to be
116moved out of the unified hierarchy and it may take some time for the
117disabled controller to become available for other hierarchies;
118furthermore, due to dependencies among controllers, other controllers
119may need to be disabled too.
120
121While useful for development and manual configurations, dynamically
122moving controllers between the unified and other hierarchies is
123strongly discouraged for production use. It is recommended to decide
124the hierarchies and controller associations before starting using the
125controllers.
103 126
104 127
1052-2. cgroup.subtree_control 1282-2. cgroup.subtree_control
diff --git a/Documentation/devicetree/bindings/arm/omap/crossbar.txt b/Documentation/devicetree/bindings/arm/omap/crossbar.txt
index fb88585cfb93..4139db353d0a 100644
--- a/Documentation/devicetree/bindings/arm/omap/crossbar.txt
+++ b/Documentation/devicetree/bindings/arm/omap/crossbar.txt
@@ -10,6 +10,7 @@ Required properties:
10- compatible : Should be "ti,irq-crossbar" 10- compatible : Should be "ti,irq-crossbar"
11- reg: Base address and the size of the crossbar registers. 11- reg: Base address and the size of the crossbar registers.
12- ti,max-irqs: Total number of irqs available at the interrupt controller. 12- ti,max-irqs: Total number of irqs available at the interrupt controller.
13- ti,max-crossbar-sources: Maximum number of crossbar sources that can be routed.
13- ti,reg-size: Size of a individual register in bytes. Every individual 14- ti,reg-size: Size of a individual register in bytes. Every individual
14 register is assumed to be of same size. Valid sizes are 1, 2, 4. 15 register is assumed to be of same size. Valid sizes are 1, 2, 4.
15- ti,irqs-reserved: List of the reserved irq lines that are not muxed using 16- ti,irqs-reserved: List of the reserved irq lines that are not muxed using
@@ -17,11 +18,46 @@ Required properties:
17 so crossbar bar driver should not consider them as free 18 so crossbar bar driver should not consider them as free
18 lines. 19 lines.
19 20
21Optional properties:
22- ti,irqs-skip: This is similar to "ti,irqs-reserved", but these are for
23 SOC-specific hard-wiring of those irqs which unexpectedly bypasses the
24 crossbar. These irqs have a crossbar register, but still cannot be used.
25
26- ti,irqs-safe-map: integer which maps to a safe configuration to use
27 when the interrupt controller irq is unused (when not provided, default is 0)
28
20Examples: 29Examples:
21 crossbar_mpu: @4a020000 { 30 crossbar_mpu: @4a020000 {
22 compatible = "ti,irq-crossbar"; 31 compatible = "ti,irq-crossbar";
23 reg = <0x4a002a48 0x130>; 32 reg = <0x4a002a48 0x130>;
24 ti,max-irqs = <160>; 33 ti,max-irqs = <160>;
34 ti,max-crossbar-sources = <400>;
25 ti,reg-size = <2>; 35 ti,reg-size = <2>;
26 ti,irqs-reserved = <0 1 2 3 5 6 131 132 139 140>; 36 ti,irqs-reserved = <0 1 2 3 5 6 131 132 139 140>;
37 ti,irqs-skip = <10 133 139 140>;
27 }; 38 };
39
40Consumer:
41========
42See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt and
43Documentation/devicetree/bindings/arm/gic.txt for further details.
44
45An interrupt consumer on an SoC using crossbar will use:
46 interrupts = <GIC_SPI request_number interrupt_level>
47When the request number is between 0 to that described by
48"ti,max-crossbar-sources", it is assumed to be a crossbar mapping. If the
49request_number is greater than "ti,max-crossbar-sources", then it is mapped as a
50quirky hardware mapping direct to GIC.
51
52Example:
53 device_x@0x4a023000 {
54 /* Crossbar 8 used */
55 interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
56 ...
57 };
58
59 device_y@0x4a033000 {
60 /* Direct mapped GIC SPI 1 used */
61 interrupts = <GIC_SPI DIRECT_IRQ(1) IRQ_TYPE_LEVEL_HIGH>;
62 ...
63 };
diff --git a/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt b/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt
index 832fe8cc24d7..adc61b095bd1 100644
--- a/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt
+++ b/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt
@@ -14,14 +14,21 @@ Required properties:
14 for exynos4412/5250 controllers. 14 for exynos4412/5250 controllers.
15 Must be "samsung,exynos-adc-v2" for 15 Must be "samsung,exynos-adc-v2" for
16 future controllers. 16 future controllers.
17 Must be "samsung,exynos3250-adc" for
18 controllers compatible with ADC of Exynos3250.
17- reg: Contains ADC register address range (base address and 19- reg: Contains ADC register address range (base address and
18 length) and the address of the phy enable register. 20 length) and the address of the phy enable register.
19- interrupts: Contains the interrupt information for the timer. The 21- interrupts: Contains the interrupt information for the timer. The
20 format is being dependent on which interrupt controller 22 format is being dependent on which interrupt controller
21 the Samsung device uses. 23 the Samsung device uses.
22- #io-channel-cells = <1>; As ADC has multiple outputs 24- #io-channel-cells = <1>; As ADC has multiple outputs
23- clocks From common clock binding: handle to adc clock. 25- clocks From common clock bindings: handles to clocks specified
24- clock-names From common clock binding: Shall be "adc". 26 in "clock-names" property, in the same order.
27- clock-names From common clock bindings: list of clock input names
28 used by ADC block:
29 - "adc" : ADC bus clock
30 - "sclk" : ADC special clock (only for Exynos3250 and
31 compatible ADC block)
25- vdd-supply VDD input supply. 32- vdd-supply VDD input supply.
26 33
27Note: child nodes can be added for auto probing from device tree. 34Note: child nodes can be added for auto probing from device tree.
@@ -41,6 +48,20 @@ adc: adc@12D10000 {
41 vdd-supply = <&buck5_reg>; 48 vdd-supply = <&buck5_reg>;
42}; 49};
43 50
51Example: adding device info in dtsi file for Exynos3250 with additional sclk
52
53adc: adc@126C0000 {
54 compatible = "samsung,exynos3250-adc", "samsung,exynos-adc-v2;
55 reg = <0x126C0000 0x100>, <0x10020718 0x4>;
56 interrupts = <0 137 0>;
57 #io-channel-cells = <1>;
58 io-channel-ranges;
59
60 clocks = <&cmu CLK_TSADC>, <&cmu CLK_SCLK_TSADC>;
61 clock-names = "adc", "sclk";
62
63 vdd-supply = <&buck5_reg>;
64};
44 65
45Example: Adding child nodes in dts file 66Example: Adding child nodes in dts file
46 67
diff --git a/Documentation/devicetree/bindings/arm/samsung/pmu.txt b/Documentation/devicetree/bindings/arm/samsung/pmu.txt
index 2a4ab046a8a1..f9865e77e0b0 100644
--- a/Documentation/devicetree/bindings/arm/samsung/pmu.txt
+++ b/Documentation/devicetree/bindings/arm/samsung/pmu.txt
@@ -12,8 +12,38 @@ Properties:
12 12
13 - reg : offset and length of the register set. 13 - reg : offset and length of the register set.
14 14
15 - #clock-cells : must be <1>, since PMU requires once cell as clock specifier.
16 The single specifier cell is used as index to list of clocks
17 provided by PMU, which is currently:
18 0 : SoC clock output (CLKOUT pin)
19
20 - clock-names : list of clock names for particular CLKOUT mux inputs in
21 following format:
22 "clkoutN", where N is a decimal number corresponding to
23 CLKOUT mux control bits value for given input, e.g.
24 "clkout0", "clkout7", "clkout15".
25
26 - clocks : list of phandles and specifiers to all input clocks listed in
27 clock-names property.
28
15Example : 29Example :
16pmu_system_controller: system-controller@10040000 { 30pmu_system_controller: system-controller@10040000 {
17 compatible = "samsung,exynos5250-pmu", "syscon"; 31 compatible = "samsung,exynos5250-pmu", "syscon";
18 reg = <0x10040000 0x5000>; 32 reg = <0x10040000 0x5000>;
33 #clock-cells = <1>;
34 clock-names = "clkout0", "clkout1", "clkout2", "clkout3",
35 "clkout4", "clkout8", "clkout9";
36 clocks = <&clock CLK_OUT_DMC>, <&clock CLK_OUT_TOP>,
37 <&clock CLK_OUT_LEFTBUS>, <&clock CLK_OUT_RIGHTBUS>,
38 <&clock CLK_OUT_CPU>, <&clock CLK_XXTI>,
39 <&clock CLK_XUSBXTI>;
40};
41
42Example of clock consumer :
43
44usb3503: usb3503@08 {
45 /* ... */
46 clock-names = "refclk";
47 clocks = <&pmu_system_controller 0>;
48 /* ... */
19}; 49};
diff --git a/Documentation/devicetree/bindings/ata/ahci-platform.txt b/Documentation/devicetree/bindings/ata/ahci-platform.txt
index c96d8dcf98fd..4ab09f2202d4 100644
--- a/Documentation/devicetree/bindings/ata/ahci-platform.txt
+++ b/Documentation/devicetree/bindings/ata/ahci-platform.txt
@@ -3,28 +3,43 @@
3SATA nodes are defined to describe on-chip Serial ATA controllers. 3SATA nodes are defined to describe on-chip Serial ATA controllers.
4Each SATA controller should have its own node. 4Each SATA controller should have its own node.
5 5
6It is possible, but not required, to represent each port as a sub-node.
7It allows to enable each port independently when dealing with multiple
8PHYs.
9
6Required properties: 10Required properties:
7- compatible : compatible string, one of: 11- compatible : compatible string, one of:
8 - "allwinner,sun4i-a10-ahci" 12 - "allwinner,sun4i-a10-ahci"
9 - "fsl,imx53-ahci"
10 - "fsl,imx6q-ahci"
11 - "hisilicon,hisi-ahci" 13 - "hisilicon,hisi-ahci"
12 - "ibm,476gtr-ahci" 14 - "ibm,476gtr-ahci"
13 - "marvell,armada-380-ahci" 15 - "marvell,armada-380-ahci"
14 - "snps,dwc-ahci" 16 - "snps,dwc-ahci"
15 - "snps,exynos5440-ahci" 17 - "snps,exynos5440-ahci"
16 - "snps,spear-ahci" 18 - "snps,spear-ahci"
19 - "generic-ahci"
17- interrupts : <interrupt mapping for SATA IRQ> 20- interrupts : <interrupt mapping for SATA IRQ>
18- reg : <registers mapping> 21- reg : <registers mapping>
19 22
23Please note that when using "generic-ahci" you must also specify a SoC specific
24compatible:
25 compatible = "manufacturer,soc-model-ahci", "generic-ahci";
26
20Optional properties: 27Optional properties:
21- dma-coherent : Present if dma operations are coherent 28- dma-coherent : Present if dma operations are coherent
22- clocks : a list of phandle + clock specifier pairs 29- clocks : a list of phandle + clock specifier pairs
23- target-supply : regulator for SATA target power 30- target-supply : regulator for SATA target power
31- phys : reference to the SATA PHY node
32- phy-names : must be "sata-phy"
33
34Required properties when using sub-nodes:
35- #address-cells : number of cells to encode an address
36- #size-cells : number of cells representing the size of an address
37
38
39Sub-nodes required properties:
40- reg : the port number
41- phys : reference to the SATA PHY node
24 42
25"fsl,imx53-ahci", "fsl,imx6q-ahci" required properties:
26- clocks : must contain the sata, sata_ref and ahb clocks
27- clock-names : must contain "ahb" for the ahb clock
28 43
29Examples: 44Examples:
30 sata@ffe08000 { 45 sata@ffe08000 {
@@ -40,3 +55,23 @@ Examples:
40 clocks = <&pll6 0>, <&ahb_gates 25>; 55 clocks = <&pll6 0>, <&ahb_gates 25>;
41 target-supply = <&reg_ahci_5v>; 56 target-supply = <&reg_ahci_5v>;
42 }; 57 };
58
59With sub-nodes:
60 sata@f7e90000 {
61 compatible = "marvell,berlin2q-achi", "generic-ahci";
62 reg = <0xe90000 0x1000>;
63 interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
64 clocks = <&chip CLKID_SATA>;
65 #address-cells = <1>;
66 #size-cells = <0>;
67
68 sata0: sata-port@0 {
69 reg = <0>;
70 phys = <&sata_phy 0>;
71 };
72
73 sata1: sata-port@1 {
74 reg = <1>;
75 phys = <&sata_phy 1>;
76 };
77 };
diff --git a/Documentation/devicetree/bindings/ata/ahci-st.txt b/Documentation/devicetree/bindings/ata/ahci-st.txt
new file mode 100644
index 000000000000..0574a77a0b9f
--- /dev/null
+++ b/Documentation/devicetree/bindings/ata/ahci-st.txt
@@ -0,0 +1,31 @@
1STMicroelectronics STi SATA controller
2
3This binding describes a SATA device.
4
5Required properties:
6 - compatible : Must be "st,sti-ahci"
7 - reg : Physical base addresses and length of register sets
8 - interrupts : Interrupt associated with the SATA device
9 - interrupt-names : Associated name must be; "hostc"
10 - resets : The power-down and soft-reset lines of SATA IP
11 - reset-names : Associated names must be; "pwr-dwn" and "sw-rst"
12 - clocks : The phandle for the clock
13 - clock-names : Associated name must be; "ahci_clk"
14 - phys : The phandle for the PHY device
15 - phy-names : Associated name must be; "ahci_phy"
16
17Example:
18
19 sata0: sata@fe380000 {
20 compatible = "st,sti-ahci";
21 reg = <0xfe380000 0x1000>;
22 interrupts = <GIC_SPI 157 IRQ_TYPE_NONE>;
23 interrupt-names = "hostc";
24 phys = <&miphy365x_phy MIPHY_PORT_0 MIPHY_TYPE_SATA>;
25 phy-names = "ahci_phy";
26 resets = <&powerdown STIH416_SATA0_POWERDOWN>,
27 <&softreset STIH416_SATA0_SOFTRESET>;
28 reset-names = "pwr-dwn", "sw-rst";
29 clocks = <&clk_s_a0_ls CLK_ICN_REG>;
30 clock-names = "ahci_clk";
31 };
diff --git a/Documentation/devicetree/bindings/ata/imx-sata.txt b/Documentation/devicetree/bindings/ata/imx-sata.txt
new file mode 100644
index 000000000000..fa511db18408
--- /dev/null
+++ b/Documentation/devicetree/bindings/ata/imx-sata.txt
@@ -0,0 +1,36 @@
1* Freescale i.MX AHCI SATA Controller
2
3The Freescale i.MX SATA controller mostly conforms to the AHCI interface
4with some special extensions at integration level.
5
6Required properties:
7- compatible : should be one of the following:
8 - "fsl,imx53-ahci" for i.MX53 SATA controller
9 - "fsl,imx6q-ahci" for i.MX6Q SATA controller
10- interrupts : interrupt mapping for SATA IRQ
11- reg : registers mapping
12- clocks : list of clock specifiers, must contain an entry for each
13 required entry in clock-names
14- clock-names : should include "sata", "sata_ref" and "ahb" entries
15
16Optional properties:
17- fsl,transmit-level-mV : transmit voltage level, in millivolts.
18- fsl,transmit-boost-mdB : transmit boost level, in milli-decibels
19- fsl,transmit-atten-16ths : transmit attenuation, in 16ths
20- fsl,receive-eq-mdB : receive equalisation, in milli-decibels
21 Please refer to the technical documentation or the driver source code
22 for the list of legal values for these options.
23- fsl,no-spread-spectrum : disable spread-spectrum clocking on the SATA
24 link.
25
26Examples:
27
28sata@02200000 {
29 compatible = "fsl,imx6q-ahci";
30 reg = <0x02200000 0x4000>;
31 interrupts = <0 39 IRQ_TYPE_LEVEL_HIGH>;
32 clocks = <&clks IMX6QDL_CLK_SATA>,
33 <&clks IMX6QDL_CLK_SATA_REF_100M>,
34 <&clks IMX6QDL_CLK_AHB>;
35 clock-names = "sata", "sata_ref", "ahb";
36};
diff --git a/Documentation/devicetree/bindings/ata/tegra-sata.txt b/Documentation/devicetree/bindings/ata/tegra-sata.txt
new file mode 100644
index 000000000000..946f2072570b
--- /dev/null
+++ b/Documentation/devicetree/bindings/ata/tegra-sata.txt
@@ -0,0 +1,30 @@
1Tegra124 SoC SATA AHCI controller
2
3Required properties :
4- compatible : "nvidia,tegra124-ahci".
5- reg : Should contain 2 entries:
6 - AHCI register set (SATA BAR5)
7 - SATA register set
8- interrupts : Defines the interrupt used by SATA
9- clocks : Must contain an entry for each entry in clock-names.
10 See ../clocks/clock-bindings.txt for details.
11- clock-names : Must include the following entries:
12 - sata
13 - sata-oob
14 - cml1
15 - pll_e
16- resets : Must contain an entry for each entry in reset-names.
17 See ../reset/reset.txt for details.
18- reset-names : Must include the following entries:
19 - sata
20 - sata-oob
21 - sata-cold
22- phys : Must contain an entry for each entry in phy-names.
23 See ../phy/phy-bindings.txt for details.
24- phy-names : Must include the following entries:
25 - sata-phy : XUSB PADCTL SATA PHY
26- hvdd-supply : Defines the SATA HVDD regulator
27- vddio-supply : Defines the SATA VDDIO regulator
28- avdd-supply : Defines the SATA AVDD regulator
29- target-5v-supply : Defines the SATA 5V power regulator
30- target-12v-supply : Defines the SATA 12V power regulator
diff --git a/Documentation/devicetree/bindings/clock/clk-palmas-clk32kg-clocks.txt b/Documentation/devicetree/bindings/clock/clk-palmas-clk32kg-clocks.txt
new file mode 100644
index 000000000000..4208886d834a
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/clk-palmas-clk32kg-clocks.txt
@@ -0,0 +1,35 @@
1* Palmas 32KHz clocks *
2
3Palmas device has two clock output pins for 32KHz, KG and KG_AUDIO.
4
5This binding uses the common clock binding ./clock-bindings.txt.
6
7Required properties:
8- compatible : "ti,palmas-clk32kg" for clk32kg clock
9 "ti,palmas-clk32kgaudio" for clk32kgaudio clock
10- #clock-cells : shall be set to 0.
11
12Optional property:
13- ti,external-sleep-control: The external enable input pins controlled the
14 enable/disable of clocks. The external enable input pins ENABLE1,
15 ENABLE2 and NSLEEP. The valid values for the external pins are:
16 PALMAS_EXT_CONTROL_PIN_ENABLE1 for ENABLE1 pin
17 PALMAS_EXT_CONTROL_PIN_ENABLE2 for ENABLE2 pin
18 PALMAS_EXT_CONTROL_PIN_NSLEEP for NSLEEP pin
19 Option 0 or missing this property means the clock is enabled/disabled
20 via register access and these pins do not have any control.
21 The macros of external control pins for DTS is defined at
22 dt-bindings/mfd/palmas.h
23
24Example:
25 #include <dt-bindings/mfd/palmas.h>
26 ...
27 palmas: tps65913@58 {
28 ...
29 clk32kg: palmas_clk32k@0 {
30 compatible = "ti,palmas-clk32kg";
31 #clock-cells = <0>;
32 ti,external-sleep-control = <PALMAS_EXT_CONTROL_PIN_NSLEEP>;
33 };
34 ...
35 };
diff --git a/Documentation/devicetree/bindings/clock/clock-bindings.txt b/Documentation/devicetree/bindings/clock/clock-bindings.txt
index f15787817d6b..06fc6d541c89 100644
--- a/Documentation/devicetree/bindings/clock/clock-bindings.txt
+++ b/Documentation/devicetree/bindings/clock/clock-bindings.txt
@@ -131,3 +131,39 @@ clock signal, and a UART.
131 ("pll" and "pll-switched"). 131 ("pll" and "pll-switched").
132* The UART has its baud clock connected the external oscillator and its 132* The UART has its baud clock connected the external oscillator and its
133 register clock connected to the PLL clock (the "pll-switched" signal) 133 register clock connected to the PLL clock (the "pll-switched" signal)
134
135==Assigned clock parents and rates==
136
137Some platforms may require initial configuration of default parent clocks
138and clock frequencies. Such a configuration can be specified in a device tree
139node through assigned-clocks, assigned-clock-parents and assigned-clock-rates
140properties. The assigned-clock-parents property should contain a list of parent
141clocks in form of phandle and clock specifier pairs, the assigned-clock-parents
142property the list of assigned clock frequency values - corresponding to clocks
143listed in the assigned-clocks property.
144
145To skip setting parent or rate of a clock its corresponding entry should be
146set to 0, or can be omitted if it is not followed by any non-zero entry.
147
148 uart@a000 {
149 compatible = "fsl,imx-uart";
150 reg = <0xa000 0x1000>;
151 ...
152 clocks = <&osc 0>, <&pll 1>;
153 clock-names = "baud", "register";
154
155 assigned-clocks = <&clkcon 0>, <&pll 2>;
156 assigned-clock-parents = <&pll 2>;
157 assigned-clock-rates = <0>, <460800>;
158 };
159
160In this example the <&pll 2> clock is set as parent of clock <&clkcon 0> and
161the <&pll 2> clock is assigned a frequency value of 460800 Hz.
162
163Configuring a clock's parent and rate through the device node that consumes
164the clock can be done only for clocks that have a single user. Specifying
165conflicting parent or rate configuration in multiple consumer nodes for
166a shared clock is forbidden.
167
168Configuration of common clocks, which affect multiple consumer devices can
169be similarly specified in the clock provider node.
diff --git a/Documentation/devicetree/bindings/clock/clps711x-clock.txt b/Documentation/devicetree/bindings/clock/clps711x-clock.txt
new file mode 100644
index 000000000000..ce5a7476f05d
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/clps711x-clock.txt
@@ -0,0 +1,19 @@
1* Clock bindings for the Cirrus Logic CLPS711X CPUs
2
3Required properties:
4- compatible : Shall contain "cirrus,clps711x-clk".
5- reg : Address of the internal register set.
6- startup-frequency: Factory set CPU startup frequency in HZ.
7- #clock-cells : Should be <1>.
8
9The clock consumer should specify the desired clock by having the clock
10ID in its "clocks" phandle cell. See include/dt-bindings/clock/clps711x-clock.h
11for the full list of CLPS711X clock IDs.
12
13Example:
14 clks: clks@80000000 {
15 #clock-cells = <1>;
16 compatible = "cirrus,ep7312-clk", "cirrus,clps711x-clk";
17 reg = <0x80000000 0xc000>;
18 startup-frequency = <73728000>;
19 };
diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc.txt b/Documentation/devicetree/bindings/clock/qcom,gcc.txt
index 9cfcb4f2bc97..aba3d254e037 100644
--- a/Documentation/devicetree/bindings/clock/qcom,gcc.txt
+++ b/Documentation/devicetree/bindings/clock/qcom,gcc.txt
@@ -5,6 +5,8 @@ Required properties :
5- compatible : shall contain only one of the following: 5- compatible : shall contain only one of the following:
6 6
7 "qcom,gcc-apq8064" 7 "qcom,gcc-apq8064"
8 "qcom,gcc-apq8084"
9 "qcom,gcc-ipq8064"
8 "qcom,gcc-msm8660" 10 "qcom,gcc-msm8660"
9 "qcom,gcc-msm8960" 11 "qcom,gcc-msm8960"
10 "qcom,gcc-msm8974" 12 "qcom,gcc-msm8974"
diff --git a/Documentation/devicetree/bindings/clock/qcom,mmcc.txt b/Documentation/devicetree/bindings/clock/qcom,mmcc.txt
index d572e9964c54..29ebf84d25af 100644
--- a/Documentation/devicetree/bindings/clock/qcom,mmcc.txt
+++ b/Documentation/devicetree/bindings/clock/qcom,mmcc.txt
@@ -4,6 +4,8 @@ Qualcomm Multimedia Clock & Reset Controller Binding
4Required properties : 4Required properties :
5- compatible : shall contain only one of the following: 5- compatible : shall contain only one of the following:
6 6
7 "qcom,mmcc-apq8064"
8 "qcom,mmcc-apq8084"
7 "qcom,mmcc-msm8660" 9 "qcom,mmcc-msm8660"
8 "qcom,mmcc-msm8960" 10 "qcom,mmcc-msm8960"
9 "qcom,mmcc-msm8974" 11 "qcom,mmcc-msm8974"
diff --git a/Documentation/devicetree/bindings/clock/rockchip,rk3188-cru.txt b/Documentation/devicetree/bindings/clock/rockchip,rk3188-cru.txt
new file mode 100644
index 000000000000..0c2bf5eba43e
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/rockchip,rk3188-cru.txt
@@ -0,0 +1,61 @@
1* Rockchip RK3188/RK3066 Clock and Reset Unit
2
3The RK3188/RK3066 clock controller generates and supplies clock to various
4controllers within the SoC and also implements a reset controller for SoC
5peripherals.
6
7Required Properties:
8
9- compatible: should be "rockchip,rk3188-cru", "rockchip,rk3188a-cru" or
10 "rockchip,rk3066a-cru"
11- reg: physical base address of the controller and length of memory mapped
12 region.
13- #clock-cells: should be 1.
14- #reset-cells: should be 1.
15
16Optional Properties:
17
18- rockchip,grf: phandle to the syscon managing the "general register files"
19 If missing pll rates are not changable, due to the missing pll lock status.
20
21Each clock is assigned an identifier and client nodes can use this identifier
22to specify the clock which they consume. All available clocks are defined as
23preprocessor macros in the dt-bindings/clock/rk3188-cru.h and
24dt-bindings/clock/rk3066-cru.h headers and can be used in device tree sources.
25Similar macros exist for the reset sources in these files.
26
27External clocks:
28
29There are several clocks that are generated outside the SoC. It is expected
30that they are defined using standard clock bindings with following
31clock-output-names:
32 - "xin24m" - crystal input - required,
33 - "xin32k" - rtc clock - optional,
34 - "xin27m" - 27mhz crystal input on rk3066 - optional,
35 - "ext_hsadc" - external HSADC clock - optional,
36 - "ext_cif0" - external camera clock - optional,
37 - "ext_rmii" - external RMII clock - optional,
38 - "ext_jtag" - externalJTAG clock - optional
39
40Example: Clock controller node:
41
42 cru: cru@20000000 {
43 compatible = "rockchip,rk3188-cru";
44 reg = <0x20000000 0x1000>;
45 rockchip,grf = <&grf>;
46
47 #clock-cells = <1>;
48 #reset-cells = <1>;
49 };
50
51Example: UART controller node that consumes the clock generated by the clock
52 controller:
53
54 uart0: serial@10124000 {
55 compatible = "snps,dw-apb-uart";
56 reg = <0x10124000 0x400>;
57 interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
58 reg-shift = <2>;
59 reg-io-width = <1>;
60 clocks = <&cru SCLK_UART0>;
61 };
diff --git a/Documentation/devicetree/bindings/clock/rockchip,rk3288-cru.txt b/Documentation/devicetree/bindings/clock/rockchip,rk3288-cru.txt
new file mode 100644
index 000000000000..c9fbb76573e1
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/rockchip,rk3288-cru.txt
@@ -0,0 +1,61 @@
1* Rockchip RK3288 Clock and Reset Unit
2
3The RK3288 clock controller generates and supplies clock to various
4controllers within the SoC and also implements a reset controller for SoC
5peripherals.
6
7Required Properties:
8
9- compatible: should be "rockchip,rk3288-cru"
10- reg: physical base address of the controller and length of memory mapped
11 region.
12- #clock-cells: should be 1.
13- #reset-cells: should be 1.
14
15Optional Properties:
16
17- rockchip,grf: phandle to the syscon managing the "general register files"
18 If missing pll rates are not changable, due to the missing pll lock status.
19
20Each clock is assigned an identifier and client nodes can use this identifier
21to specify the clock which they consume. All available clocks are defined as
22preprocessor macros in the dt-bindings/clock/rk3288-cru.h headers and can be
23used in device tree sources. Similar macros exist for the reset sources in
24these files.
25
26External clocks:
27
28There are several clocks that are generated outside the SoC. It is expected
29that they are defined using standard clock bindings with following
30clock-output-names:
31 - "xin24m" - crystal input - required,
32 - "xin32k" - rtc clock - optional,
33 - "ext_i2s" - external I2S clock - optional,
34 - "ext_hsadc" - external HSADC clock - optional,
35 - "ext_edp_24m" - external display port clock - optional,
36 - "ext_vip" - external VIP clock - optional,
37 - "ext_isp" - external ISP clock - optional,
38 - "ext_jtag" - external JTAG clock - optional
39
40Example: Clock controller node:
41
42 cru: cru@20000000 {
43 compatible = "rockchip,rk3188-cru";
44 reg = <0x20000000 0x1000>;
45 rockchip,grf = <&grf>;
46
47 #clock-cells = <1>;
48 #reset-cells = <1>;
49 };
50
51Example: UART controller node that consumes the clock generated by the clock
52 controller:
53
54 uart0: serial@10124000 {
55 compatible = "snps,dw-apb-uart";
56 reg = <0x10124000 0x400>;
57 interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
58 reg-shift = <2>;
59 reg-io-width = <1>;
60 clocks = <&cru SCLK_UART0>;
61 };
diff --git a/Documentation/devicetree/bindings/clock/rockchip.txt b/Documentation/devicetree/bindings/clock/rockchip.txt
index a891c823ed44..22f6769e5d4a 100644
--- a/Documentation/devicetree/bindings/clock/rockchip.txt
+++ b/Documentation/devicetree/bindings/clock/rockchip.txt
@@ -6,6 +6,9 @@ This binding uses the common clock binding[1].
6 6
7== Gate clocks == 7== Gate clocks ==
8 8
9These bindings are deprecated!
10Please use the soc specific CRU bindings instead.
11
9The gate registers form a continuos block which makes the dt node 12The gate registers form a continuos block which makes the dt node
10structure a matter of taste, as either all gates can be put into 13structure a matter of taste, as either all gates can be put into
11one gate clock spanning all registers or they can be divided into 14one gate clock spanning all registers or they can be divided into
diff --git a/Documentation/devicetree/bindings/clock/st/st,clkgen-divmux.txt b/Documentation/devicetree/bindings/clock/st/st,clkgen-divmux.txt
index ae56315fcec5..6247652044a0 100644
--- a/Documentation/devicetree/bindings/clock/st/st,clkgen-divmux.txt
+++ b/Documentation/devicetree/bindings/clock/st/st,clkgen-divmux.txt
@@ -24,26 +24,26 @@ Required properties:
24 24
25Example: 25Example:
26 26
27 clockgenA@fd345000 { 27 clockgen-a@fd345000 {
28 reg = <0xfd345000 0xb50>; 28 reg = <0xfd345000 0xb50>;
29 29
30 CLK_M_A1_DIV1: CLK_M_A1_DIV1 { 30 clk_m_a1_div1: clk-m-a1-div1 {
31 #clock-cells = <1>; 31 #clock-cells = <1>;
32 compatible = "st,clkgena-divmux-c32-odf1", 32 compatible = "st,clkgena-divmux-c32-odf1",
33 "st,clkgena-divmux"; 33 "st,clkgena-divmux";
34 34
35 clocks = <&CLK_M_A1_OSC_PREDIV>, 35 clocks = <&clk_m_a1_osc_prediv>,
36 <&CLK_M_A1_PLL0 1>, /* PLL0 PHI1 */ 36 <&clk_m_a1_pll0 1>, /* PLL0 PHI1 */
37 <&CLK_M_A1_PLL1 1>; /* PLL1 PHI1 */ 37 <&clk_m_a1_pll1 1>; /* PLL1 PHI1 */
38 38
39 clock-output-names = "CLK_M_RX_ICN_TS", 39 clock-output-names = "clk-m-rx-icn-ts",
40 "CLK_M_RX_ICN_VDP_0", 40 "clk-m-rx-icn-vdp-0",
41 "", /* Unused */ 41 "", /* unused */
42 "CLK_M_PRV_T1_BUS", 42 "clk-m-prv-t1-bus",
43 "CLK_M_ICN_REG_12", 43 "clk-m-icn-reg-12",
44 "CLK_M_ICN_REG_10", 44 "clk-m-icn-reg-10",
45 "", /* Unused */ 45 "", /* unused */
46 "CLK_M_ICN_ST231"; 46 "clk-m-icn-st231";
47 }; 47 };
48 }; 48 };
49 49
diff --git a/Documentation/devicetree/bindings/clock/st/st,clkgen-mux.txt b/Documentation/devicetree/bindings/clock/st/st,clkgen-mux.txt
index 943e0808e212..f1fa91c68768 100644
--- a/Documentation/devicetree/bindings/clock/st/st,clkgen-mux.txt
+++ b/Documentation/devicetree/bindings/clock/st/st,clkgen-mux.txt
@@ -17,7 +17,7 @@ Required properties:
17 "st,stih416-clkgenf-vcc-sd", "st,clkgen-mux" 17 "st,stih416-clkgenf-vcc-sd", "st,clkgen-mux"
18 "st,stih415-clkgen-a9-mux", "st,clkgen-mux" 18 "st,stih415-clkgen-a9-mux", "st,clkgen-mux"
19 "st,stih416-clkgen-a9-mux", "st,clkgen-mux" 19 "st,stih416-clkgen-a9-mux", "st,clkgen-mux"
20 20 "st,stih407-clkgen-a9-mux", "st,clkgen-mux"
21 21
22- #clock-cells : from common clock binding; shall be set to 0. 22- #clock-cells : from common clock binding; shall be set to 0.
23 23
@@ -27,10 +27,10 @@ Required properties:
27 27
28Example: 28Example:
29 29
30 CLK_M_HVA: CLK_M_HVA { 30 clk_m_hva: clk-m-hva@fd690868 {
31 #clock-cells = <0>; 31 #clock-cells = <0>;
32 compatible = "st,stih416-clkgenf-vcc-hva", "st,clkgen-mux"; 32 compatible = "st,stih416-clkgenf-vcc-hva", "st,clkgen-mux";
33 reg = <0xfd690868 4>; 33 reg = <0xfd690868 4>;
34 34
35 clocks = <&CLOCKGEN_F 1>, <&CLK_M_A1_DIV0 3>; 35 clocks = <&clockgen_f 1>, <&clk_m_a1_div0 3>;
36 }; 36 };
diff --git a/Documentation/devicetree/bindings/clock/st/st,clkgen-pll.txt b/Documentation/devicetree/bindings/clock/st/st,clkgen-pll.txt
index 81eb3855ab92..efb51cf0c845 100644
--- a/Documentation/devicetree/bindings/clock/st/st,clkgen-pll.txt
+++ b/Documentation/devicetree/bindings/clock/st/st,clkgen-pll.txt
@@ -19,11 +19,14 @@ Required properties:
19 "st,stih415-plls-c32-ddr", "st,clkgen-plls-c32" 19 "st,stih415-plls-c32-ddr", "st,clkgen-plls-c32"
20 "st,stih416-plls-c32-a9", "st,clkgen-plls-c32" 20 "st,stih416-plls-c32-a9", "st,clkgen-plls-c32"
21 "st,stih416-plls-c32-ddr", "st,clkgen-plls-c32" 21 "st,stih416-plls-c32-ddr", "st,clkgen-plls-c32"
22 "st,stih407-plls-c32-a0", "st,clkgen-plls-c32"
23 "st,stih407-plls-c32-a9", "st,clkgen-plls-c32"
24 "st,stih407-plls-c32-c0_0", "st,clkgen-plls-c32"
25 "st,stih407-plls-c32-c0_1", "st,clkgen-plls-c32"
22 26
23 "st,stih415-gpu-pll-c32", "st,clkgengpu-pll-c32" 27 "st,stih415-gpu-pll-c32", "st,clkgengpu-pll-c32"
24 "st,stih416-gpu-pll-c32", "st,clkgengpu-pll-c32" 28 "st,stih416-gpu-pll-c32", "st,clkgengpu-pll-c32"
25 29
26
27- #clock-cells : From common clock binding; shall be set to 1. 30- #clock-cells : From common clock binding; shall be set to 1.
28 31
29- clocks : From common clock binding 32- clocks : From common clock binding
@@ -32,17 +35,17 @@ Required properties:
32 35
33Example: 36Example:
34 37
35 clockgenA@fee62000 { 38 clockgen-a@fee62000 {
36 reg = <0xfee62000 0xb48>; 39 reg = <0xfee62000 0xb48>;
37 40
38 CLK_S_A0_PLL: CLK_S_A0_PLL { 41 clk_s_a0_pll: clk-s-a0-pll {
39 #clock-cells = <1>; 42 #clock-cells = <1>;
40 compatible = "st,clkgena-plls-c65"; 43 compatible = "st,clkgena-plls-c65";
41 44
42 clocks = <&CLK_SYSIN>; 45 clocks = <&clk_sysin>;
43 46
44 clock-output-names = "CLK_S_A0_PLL0_HS", 47 clock-output-names = "clk-s-a0-pll0-hs",
45 "CLK_S_A0_PLL0_LS", 48 "clk-s-a0-pll0-ls",
46 "CLK_S_A0_PLL1"; 49 "clk-s-a0-pll1";
47 }; 50 };
48 }; 51 };
diff --git a/Documentation/devicetree/bindings/clock/st/st,clkgen-prediv.txt b/Documentation/devicetree/bindings/clock/st/st,clkgen-prediv.txt
index 566c9d79ed32..604766c2619e 100644
--- a/Documentation/devicetree/bindings/clock/st/st,clkgen-prediv.txt
+++ b/Documentation/devicetree/bindings/clock/st/st,clkgen-prediv.txt
@@ -20,17 +20,17 @@ Required properties:
20 20
21Example: 21Example:
22 22
23 clockgenA@fd345000 { 23 clockgen-a@fd345000 {
24 reg = <0xfd345000 0xb50>; 24 reg = <0xfd345000 0xb50>;
25 25
26 CLK_M_A2_OSC_PREDIV: CLK_M_A2_OSC_PREDIV { 26 clk_m_a2_osc_prediv: clk-m-a2-osc-prediv {
27 #clock-cells = <0>; 27 #clock-cells = <0>;
28 compatible = "st,clkgena-prediv-c32", 28 compatible = "st,clkgena-prediv-c32",
29 "st,clkgena-prediv"; 29 "st,clkgena-prediv";
30 30
31 clocks = <&CLK_SYSIN>; 31 clocks = <&clk_sysin>;
32 32
33 clock-output-names = "CLK_M_A2_OSC_PREDIV"; 33 clock-output-names = "clk-m-a2-osc-prediv";
34 }; 34 };
35 }; 35 };
36 36
diff --git a/Documentation/devicetree/bindings/clock/st/st,clkgen-vcc.txt b/Documentation/devicetree/bindings/clock/st/st,clkgen-vcc.txt
index 4e3ff28b04c3..109b3eddcb17 100644
--- a/Documentation/devicetree/bindings/clock/st/st,clkgen-vcc.txt
+++ b/Documentation/devicetree/bindings/clock/st/st,clkgen-vcc.txt
@@ -32,22 +32,30 @@ Required properties:
32 32
33Example: 33Example:
34 34
35 CLOCKGEN_C_VCC: CLOCKGEN_C_VCC { 35 clockgen_c_vcc: clockgen-c-vcc@0xfe8308ac {
36 #clock-cells = <1>; 36 #clock-cells = <1>;
37 compatible = "st,stih416-clkgenc", "st,clkgen-vcc"; 37 compatible = "st,stih416-clkgenc", "st,clkgen-vcc";
38 reg = <0xfe8308ac 12>; 38 reg = <0xfe8308ac 12>;
39 39
40 clocks = <&CLK_S_VCC_HD>, <&CLOCKGEN_C 1>, 40 clocks = <&clk_s_vcc_hd>,
41 <&CLK_S_TMDS_FROMPHY>, <&CLOCKGEN_C 2>; 41 <&clockgen_c 1>,
42 42 <&clk_s_tmds_fromphy>,
43 clock-output-names = 43 <&clockgen_c 2>;
44 "CLK_S_PIX_HDMI", "CLK_S_PIX_DVO", 44
45 "CLK_S_OUT_DVO", "CLK_S_PIX_HD", 45 clock-output-names = "clk-s-pix-hdmi",
46 "CLK_S_HDDAC", "CLK_S_DENC", 46 "clk-s-pix-dvo",
47 "CLK_S_SDDAC", "CLK_S_PIX_MAIN", 47 "clk-s-out-dvo",
48 "CLK_S_PIX_AUX", "CLK_S_STFE_FRC_0", 48 "clk-s-pix-hd",
49 "CLK_S_REF_MCRU", "CLK_S_SLAVE_MCRU", 49 "clk-s-hddac",
50 "CLK_S_TMDS_HDMI", "CLK_S_HDMI_REJECT_PLL", 50 "clk-s-denc",
51 "CLK_S_THSENS"; 51 "clk-s-sddac",
52 "clk-s-pix-main",
53 "clk-s-pix-aux",
54 "clk-s-stfe-frc-0",
55 "clk-s-ref-mcru",
56 "clk-s-slave-mcru",
57 "clk-s-tmds-hdmi",
58 "clk-s-hdmi-reject-pll",
59 "clk-s-thsens";
52 }; 60 };
53 61
diff --git a/Documentation/devicetree/bindings/clock/st/st,clkgen.txt b/Documentation/devicetree/bindings/clock/st/st,clkgen.txt
index 49ec5ae18b5b..78978f1f5158 100644
--- a/Documentation/devicetree/bindings/clock/st/st,clkgen.txt
+++ b/Documentation/devicetree/bindings/clock/st/st,clkgen.txt
@@ -24,60 +24,77 @@ address is common of all subnode.
24 quadfs_node { 24 quadfs_node {
25 ... 25 ...
26 }; 26 };
27
28 mux_node {
29 ...
30 };
31
32 vcc_node {
33 ...
34 };
35
36 flexgen_node {
37 ...
38 };
27 ... 39 ...
28 }; 40 };
29 41
30This binding uses the common clock binding[1]. 42This binding uses the common clock binding[1].
31Each subnode should use the binding discribe in [2]..[4] 43Each subnode should use the binding discribe in [2]..[7]
32 44
33[1] Documentation/devicetree/bindings/clock/clock-bindings.txt 45[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
34[2] Documentation/devicetree/bindings/clock/st,quadfs.txt 46[2] Documentation/devicetree/bindings/clock/st,clkgen-divmux.txt
35[3] Documentation/devicetree/bindings/clock/st,quadfs.txt 47[3] Documentation/devicetree/bindings/clock/st,clkgen-mux.txt
36[4] Documentation/devicetree/bindings/clock/st,quadfs.txt 48[4] Documentation/devicetree/bindings/clock/st,clkgen-pll.txt
49[5] Documentation/devicetree/bindings/clock/st,clkgen-prediv.txt
50[6] Documentation/devicetree/bindings/clock/st,vcc.txt
51[7] Documentation/devicetree/bindings/clock/st,quadfs.txt
52[8] Documentation/devicetree/bindings/clock/st,flexgen.txt
53
37 54
38Required properties: 55Required properties:
39- reg : A Base address and length of the register set. 56- reg : A Base address and length of the register set.
40 57
41Example: 58Example:
42 59
43 clockgenA@fee62000 { 60 clockgen-a@fee62000 {
44 61
45 reg = <0xfee62000 0xb48>; 62 reg = <0xfee62000 0xb48>;
46 63
47 CLK_S_A0_PLL: CLK_S_A0_PLL { 64 clk_s_a0_pll: clk-s-a0-pll {
48 #clock-cells = <1>; 65 #clock-cells = <1>;
49 compatible = "st,clkgena-plls-c65"; 66 compatible = "st,clkgena-plls-c65";
50 67
51 clocks = <&CLK_SYSIN>; 68 clocks = <&clk-sysin>;
52 69
53 clock-output-names = "CLK_S_A0_PLL0_HS", 70 clock-output-names = "clk-s-a0-pll0-hs",
54 "CLK_S_A0_PLL0_LS", 71 "clk-s-a0-pll0-ls",
55 "CLK_S_A0_PLL1"; 72 "clk-s-a0-pll1";
56 }; 73 };
57 74
58 CLK_S_A0_OSC_PREDIV: CLK_S_A0_OSC_PREDIV { 75 clk_s_a0_osc_prediv: clk-s-a0-osc-prediv {
59 #clock-cells = <0>; 76 #clock-cells = <0>;
60 compatible = "st,clkgena-prediv-c65", 77 compatible = "st,clkgena-prediv-c65",
61 "st,clkgena-prediv"; 78 "st,clkgena-prediv";
62 79
63 clocks = <&CLK_SYSIN>; 80 clocks = <&clk_sysin>;
64 81
65 clock-output-names = "CLK_S_A0_OSC_PREDIV"; 82 clock-output-names = "clk-s-a0-osc-prediv";
66 }; 83 };
67 84
68 CLK_S_A0_HS: CLK_S_A0_HS { 85 clk_s_a0_hs: clk-s-a0-hs {
69 #clock-cells = <1>; 86 #clock-cells = <1>;
70 compatible = "st,clkgena-divmux-c65-hs", 87 compatible = "st,clkgena-divmux-c65-hs",
71 "st,clkgena-divmux"; 88 "st,clkgena-divmux";
72 89
73 clocks = <&CLK_S_A0_OSC_PREDIV>, 90 clocks = <&clk-s_a0_osc_prediv>,
74 <&CLK_S_A0_PLL 0>, /* PLL0 HS */ 91 <&clk-s_a0_pll 0>, /* pll0 hs */
75 <&CLK_S_A0_PLL 2>; /* PLL1 */ 92 <&clk-s_a0_pll 2>; /* pll1 */
76 93
77 clock-output-names = "CLK_S_FDMA_0", 94 clock-output-names = "clk-s-fdma-0",
78 "CLK_S_FDMA_1", 95 "clk-s-fdma-1",
79 ""; /* CLK_S_JIT_SENSE */ 96 ""; /* clk-s-jit-sense */
80 /* Fourth output unused */ 97 /* fourth output unused */
81 }; 98 };
82 }; 99 };
83 100
diff --git a/Documentation/devicetree/bindings/clock/st/st,flexgen.txt b/Documentation/devicetree/bindings/clock/st/st,flexgen.txt
new file mode 100644
index 000000000000..1d3ace088172
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/st/st,flexgen.txt
@@ -0,0 +1,119 @@
1Binding for a type of flexgen structure found on certain
2STMicroelectronics consumer electronics SoC devices
3
4This structure includes:
5- a clock cross bar (represented by a mux element)
6- a pre and final dividers (represented by a divider and gate elements)
7
8Flexgen structure is a part of Clockgen[1].
9
10Please find an example below:
11
12 Clockgen block diagram
13 -------------------------------------------------------------------
14 | Flexgen stucture |
15 | --------------------------------------------- |
16 | | ------- -------- -------- | |
17clk_sysin | | | | | | | | |
18---|-----------------|-->| | | | | | | |
19 | | | | | | | | | | |
20 | | ------- | | | |Pre | |Final | | |
21 | | |PLL0 | | | | |Dividers| |Dividers| | |
22 | |->| | | | | | x32 | | x32 | | |
23 | | | odf_0|----|-->| | | | | | | |
24 | | | | | | | | | | | | |
25 | | | | | | | | | | | | |
26 | | | | | | | | | | | | |
27 | | | | | | | | | | | | |
28 | | ------- | | | | | | | | |
29 | | | | | | | | | | |
30 | | ------- | | Clock | | | | | | |
31 | | |PLL1 | | | | | | | | | |
32 | |->| | | | Cross | | | | | | |
33 | | | odf_0|----|-->| | | | | | CLK_DIV[31:0]
34 | | | | | | Bar |====>| |====>| |===|=========>
35 | | | | | | | | | | | | |
36 | | | | | | | | | | | | |
37 | | | | | | | | | | | | |
38 | | ------- | | | | | | | | |
39 | | | | | | | | | | |
40 | | ------- | | | | | | | | |
41 | | |QUADFS | | | | | | | | | |
42 | |->| ch0|----|-->| | | | | | | |
43 | | | | | | | | | | | |
44 | | ch1|----|-->| | | | | | | |
45 | | | | | | | | | | | |
46 | | ch2|----|-->| | | DIV | | DIV | | |
47 | | | | | | | 1 to | | 1 to | | |
48 | | ch3|----|-->| | | 1024 | | 64 | | |
49 | ------- | | | | | | | | |
50 | | ------- -------- -------- | |
51 | -------------------------------------------- |
52 | |
53 -------------------------------------------------------------------
54
55This binding uses the common clock binding[2].
56
57[1] Documentation/devicetree/bindings/clock/st/st,clkgen.txt
58[2] Documentation/devicetree/bindings/clock/clock-bindings.txt
59
60Required properties:
61- compatible : shall be:
62 "st,flexgen"
63
64- #clock-cells : from common clock binding; shall be set to 1 (multiple clock
65 outputs).
66
67- clocks : must be set to the parent's phandle. it's could be output clocks of
68 a quadsfs or/and a pll or/and clk_sysin (up to 7 clocks)
69
70- clock-output-names : List of strings used to name the clock outputs.
71
72Example:
73
74 clk_s_c0_flexgen: clk-s-c0-flexgen {
75
76 #clock-cells = <1>;
77 compatible = "st,flexgen";
78
79 clocks = <&clk_s_c0_pll0 0>,
80 <&clk_s_c0_pll1 0>,
81 <&clk_s_c0_quadfs 0>,
82 <&clk_s_c0_quadfs 1>,
83 <&clk_s_c0_quadfs 2>,
84 <&clk_s_c0_quadfs 3>,
85 <&clk_sysin>;
86
87 clock-output-names = "clk-icn-gpu",
88 "clk-fdma",
89 "clk-nand",
90 "clk-hva",
91 "clk-proc-stfe",
92 "clk-proc-tp",
93 "clk-rx-icn-dmu",
94 "clk-rx-icn-hva",
95 "clk-icn-cpu",
96 "clk-tx-icn-dmu",
97 "clk-mmc-0",
98 "clk-mmc-1",
99 "clk-jpegdec",
100 "clk-ext2fa9",
101 "clk-ic-bdisp-0",
102 "clk-ic-bdisp-1",
103 "clk-pp-dmu",
104 "clk-vid-dmu",
105 "clk-dss-lpc",
106 "clk-st231-aud-0",
107 "clk-st231-gp-1",
108 "clk-st231-dmu",
109 "clk-icn-lmi",
110 "clk-tx-icn-disp-1",
111 "clk-icn-sbc",
112 "clk-stfe-frc2",
113 "clk-eth-phy",
114 "clk-eth-ref-phyclk",
115 "clk-flash-promip",
116 "clk-main-disp",
117 "clk-aux-disp",
118 "clk-compo-dvp";
119 };
diff --git a/Documentation/devicetree/bindings/clock/st/st,quadfs.txt b/Documentation/devicetree/bindings/clock/st/st,quadfs.txt
index ec86d62ca283..cedeb9cc8208 100644
--- a/Documentation/devicetree/bindings/clock/st/st,quadfs.txt
+++ b/Documentation/devicetree/bindings/clock/st/st,quadfs.txt
@@ -15,6 +15,9 @@ Required properties:
15 "st,stih416-quadfs432", "st,quadfs" 15 "st,stih416-quadfs432", "st,quadfs"
16 "st,stih416-quadfs660-E", "st,quadfs" 16 "st,stih416-quadfs660-E", "st,quadfs"
17 "st,stih416-quadfs660-F", "st,quadfs" 17 "st,stih416-quadfs660-F", "st,quadfs"
18 "st,stih407-quadfs660-C", "st,quadfs"
19 "st,stih407-quadfs660-D", "st,quadfs"
20
18 21
19- #clock-cells : from common clock binding; shall be set to 1. 22- #clock-cells : from common clock binding; shall be set to 1.
20 23
@@ -32,14 +35,14 @@ Required properties:
32 35
33Example: 36Example:
34 37
35 CLOCKGEN_E: CLOCKGEN_E { 38 clockgen_e: clockgen-e@fd3208bc {
36 #clock-cells = <1>; 39 #clock-cells = <1>;
37 compatible = "st,stih416-quadfs660-E", "st,quadfs"; 40 compatible = "st,stih416-quadfs660-E", "st,quadfs";
38 reg = <0xfd3208bc 0xB0>; 41 reg = <0xfd3208bc 0xB0>;
39 42
40 clocks = <&CLK_SYSIN>; 43 clocks = <&clk_sysin>;
41 clock-output-names = "CLK_M_PIX_MDTP_0", 44 clock-output-names = "clk-m-pix-mdtp-0",
42 "CLK_M_PIX_MDTP_1", 45 "clk-m-pix-mdtp-1",
43 "CLK_M_PIX_MDTP_2", 46 "clk-m-pix-mdtp-2",
44 "CLK_M_MPELPC"; 47 "clk-m-mpelpc";
45 }; 48 };
diff --git a/Documentation/devicetree/bindings/clock/sunxi.txt b/Documentation/devicetree/bindings/clock/sunxi.txt
index b9ec668bfe62..d3a5c3c6d677 100644
--- a/Documentation/devicetree/bindings/clock/sunxi.txt
+++ b/Documentation/devicetree/bindings/clock/sunxi.txt
@@ -9,11 +9,13 @@ Required properties:
9 "allwinner,sun4i-a10-osc-clk" - for a gatable oscillator 9 "allwinner,sun4i-a10-osc-clk" - for a gatable oscillator
10 "allwinner,sun4i-a10-pll1-clk" - for the main PLL clock and PLL4 10 "allwinner,sun4i-a10-pll1-clk" - for the main PLL clock and PLL4
11 "allwinner,sun6i-a31-pll1-clk" - for the main PLL clock on A31 11 "allwinner,sun6i-a31-pll1-clk" - for the main PLL clock on A31
12 "allwinner,sun8i-a23-pll1-clk" - for the main PLL clock on A23
12 "allwinner,sun4i-a10-pll5-clk" - for the PLL5 clock 13 "allwinner,sun4i-a10-pll5-clk" - for the PLL5 clock
13 "allwinner,sun4i-a10-pll6-clk" - for the PLL6 clock 14 "allwinner,sun4i-a10-pll6-clk" - for the PLL6 clock
14 "allwinner,sun6i-a31-pll6-clk" - for the PLL6 clock on A31 15 "allwinner,sun6i-a31-pll6-clk" - for the PLL6 clock on A31
15 "allwinner,sun4i-a10-cpu-clk" - for the CPU multiplexer clock 16 "allwinner,sun4i-a10-cpu-clk" - for the CPU multiplexer clock
16 "allwinner,sun4i-a10-axi-clk" - for the AXI clock 17 "allwinner,sun4i-a10-axi-clk" - for the AXI clock
18 "allwinner,sun8i-a23-axi-clk" - for the AXI clock on A23
17 "allwinner,sun4i-a10-axi-gates-clk" - for the AXI gates 19 "allwinner,sun4i-a10-axi-gates-clk" - for the AXI gates
18 "allwinner,sun4i-a10-ahb-clk" - for the AHB clock 20 "allwinner,sun4i-a10-ahb-clk" - for the AHB clock
19 "allwinner,sun4i-a10-ahb-gates-clk" - for the AHB gates on A10 21 "allwinner,sun4i-a10-ahb-gates-clk" - for the AHB gates on A10
@@ -23,13 +25,16 @@ Required properties:
23 "allwinner,sun6i-a31-ar100-clk" - for the AR100 on A31 25 "allwinner,sun6i-a31-ar100-clk" - for the AR100 on A31
24 "allwinner,sun6i-a31-ahb1-mux-clk" - for the AHB1 multiplexer on A31 26 "allwinner,sun6i-a31-ahb1-mux-clk" - for the AHB1 multiplexer on A31
25 "allwinner,sun6i-a31-ahb1-gates-clk" - for the AHB1 gates on A31 27 "allwinner,sun6i-a31-ahb1-gates-clk" - for the AHB1 gates on A31
28 "allwinner,sun8i-a23-ahb1-gates-clk" - for the AHB1 gates on A23
26 "allwinner,sun4i-a10-apb0-clk" - for the APB0 clock 29 "allwinner,sun4i-a10-apb0-clk" - for the APB0 clock
27 "allwinner,sun6i-a31-apb0-clk" - for the APB0 clock on A31 30 "allwinner,sun6i-a31-apb0-clk" - for the APB0 clock on A31
31 "allwinner,sun8i-a23-apb0-clk" - for the APB0 clock on A23
28 "allwinner,sun4i-a10-apb0-gates-clk" - for the APB0 gates on A10 32 "allwinner,sun4i-a10-apb0-gates-clk" - for the APB0 gates on A10
29 "allwinner,sun5i-a13-apb0-gates-clk" - for the APB0 gates on A13 33 "allwinner,sun5i-a13-apb0-gates-clk" - for the APB0 gates on A13
30 "allwinner,sun5i-a10s-apb0-gates-clk" - for the APB0 gates on A10s 34 "allwinner,sun5i-a10s-apb0-gates-clk" - for the APB0 gates on A10s
31 "allwinner,sun6i-a31-apb0-gates-clk" - for the APB0 gates on A31 35 "allwinner,sun6i-a31-apb0-gates-clk" - for the APB0 gates on A31
32 "allwinner,sun7i-a20-apb0-gates-clk" - for the APB0 gates on A20 36 "allwinner,sun7i-a20-apb0-gates-clk" - for the APB0 gates on A20
37 "allwinner,sun8i-a23-apb0-gates-clk" - for the APB0 gates on A23
33 "allwinner,sun4i-a10-apb1-clk" - for the APB1 clock 38 "allwinner,sun4i-a10-apb1-clk" - for the APB1 clock
34 "allwinner,sun4i-a10-apb1-mux-clk" - for the APB1 clock muxing 39 "allwinner,sun4i-a10-apb1-mux-clk" - for the APB1 clock muxing
35 "allwinner,sun4i-a10-apb1-gates-clk" - for the APB1 gates on A10 40 "allwinner,sun4i-a10-apb1-gates-clk" - for the APB1 gates on A10
@@ -37,8 +42,10 @@ Required properties:
37 "allwinner,sun5i-a10s-apb1-gates-clk" - for the APB1 gates on A10s 42 "allwinner,sun5i-a10s-apb1-gates-clk" - for the APB1 gates on A10s
38 "allwinner,sun6i-a31-apb1-gates-clk" - for the APB1 gates on A31 43 "allwinner,sun6i-a31-apb1-gates-clk" - for the APB1 gates on A31
39 "allwinner,sun7i-a20-apb1-gates-clk" - for the APB1 gates on A20 44 "allwinner,sun7i-a20-apb1-gates-clk" - for the APB1 gates on A20
45 "allwinner,sun8i-a23-apb1-gates-clk" - for the APB1 gates on A23
40 "allwinner,sun6i-a31-apb2-div-clk" - for the APB2 gates on A31 46 "allwinner,sun6i-a31-apb2-div-clk" - for the APB2 gates on A31
41 "allwinner,sun6i-a31-apb2-gates-clk" - for the APB2 gates on A31 47 "allwinner,sun6i-a31-apb2-gates-clk" - for the APB2 gates on A31
48 "allwinner,sun8i-a23-apb2-gates-clk" - for the APB2 gates on A23
42 "allwinner,sun4i-a10-mod0-clk" - for the module 0 family of clocks 49 "allwinner,sun4i-a10-mod0-clk" - for the module 0 family of clocks
43 "allwinner,sun7i-a20-out-clk" - for the external output clocks 50 "allwinner,sun7i-a20-out-clk" - for the external output clocks
44 "allwinner,sun7i-a20-gmac-clk" - for the GMAC clock module on A20/A31 51 "allwinner,sun7i-a20-gmac-clk" - for the GMAC clock module on A20/A31
diff --git a/Documentation/devicetree/bindings/crypto/amd-ccp.txt b/Documentation/devicetree/bindings/crypto/amd-ccp.txt
new file mode 100644
index 000000000000..8c61183b41e0
--- /dev/null
+++ b/Documentation/devicetree/bindings/crypto/amd-ccp.txt
@@ -0,0 +1,19 @@
1* AMD Cryptographic Coprocessor driver (ccp)
2
3Required properties:
4- compatible: Should be "amd,ccp-seattle-v1a"
5- reg: Address and length of the register set for the device
6- interrupt-parent: Should be the phandle for the interrupt controller
7 that services interrupts for this device
8- interrupts: Should contain the CCP interrupt
9
10Optional properties:
11- dma-coherent: Present if dma operations are coherent
12
13Example:
14 ccp@e0100000 {
15 compatible = "amd,ccp-seattle-v1a";
16 reg = <0 0xe0100000 0 0x10000>;
17 interrupt-parent = <&gic>;
18 interrupts = <0 3 4>;
19 };
diff --git a/Documentation/devicetree/bindings/crypto/qcom-qce.txt b/Documentation/devicetree/bindings/crypto/qcom-qce.txt
new file mode 100644
index 000000000000..fdd53b184ba8
--- /dev/null
+++ b/Documentation/devicetree/bindings/crypto/qcom-qce.txt
@@ -0,0 +1,25 @@
1Qualcomm crypto engine driver
2
3Required properties:
4
5- compatible : should be "qcom,crypto-v5.1"
6- reg : specifies base physical address and size of the registers map
7- clocks : phandle to clock-controller plus clock-specifier pair
8- clock-names : "iface" clocks register interface
9 "bus" clocks data transfer interface
10 "core" clocks rest of the crypto block
11- dmas : DMA specifiers for tx and rx dma channels. For more see
12 Documentation/devicetree/bindings/dma/dma.txt
13- dma-names : DMA request names should be "rx" and "tx"
14
15Example:
16 crypto@fd45a000 {
17 compatible = "qcom,crypto-v5.1";
18 reg = <0xfd45a000 0x6000>;
19 clocks = <&gcc GCC_CE2_AHB_CLK>,
20 <&gcc GCC_CE2_AXI_CLK>,
21 <&gcc GCC_CE2_CLK>;
22 clock-names = "iface", "bus", "core";
23 dmas = <&cryptobam 2>, <&cryptobam 3>;
24 dma-names = "rx", "tx";
25 };
diff --git a/Documentation/devicetree/bindings/extcon/extcon-sm5502.txt b/Documentation/devicetree/bindings/extcon/extcon-sm5502.txt
new file mode 100644
index 000000000000..4ecda224955f
--- /dev/null
+++ b/Documentation/devicetree/bindings/extcon/extcon-sm5502.txt
@@ -0,0 +1,23 @@
1
2* SM5502 MUIC (Micro-USB Interface Controller) device
3
4The Silicon Mitus SM5502 is a MUIC (Micro-USB Interface Controller) device
5which can detect the state of external accessory when external accessory is
6attached or detached and button is pressed or released. It is interfaced to
7the host controller using an I2C interface.
8
9Required properties:
10- compatible: Should be "siliconmitus,sm5502-muic"
11- reg: Specifies the I2C slave address of the MUIC block. It should be 0x25
12- interrupt-parent: Specifies the phandle of the interrupt controller to which
13 the interrupts from sm5502 are delivered to.
14- interrupts: Interrupt specifiers for detection interrupt sources.
15
16Example:
17
18 sm5502@25 {
19 compatible = "siliconmitus,sm5502-muic";
20 interrupt-parent = <&gpx1>;
21 interrupts = <5 0>;
22 reg = <0x25>;
23 };
diff --git a/Documentation/devicetree/bindings/hwmon/ibmpowernv.txt b/Documentation/devicetree/bindings/hwmon/ibmpowernv.txt
new file mode 100644
index 000000000000..f93242be60a1
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/ibmpowernv.txt
@@ -0,0 +1,23 @@
1IBM POWERNV platform sensors
2----------------------------
3
4Required node properties:
5- compatible: must be one of
6 "ibm,opal-sensor-cooling-fan"
7 "ibm,opal-sensor-amb-temp"
8 "ibm,opal-sensor-power-supply"
9 "ibm,opal-sensor-power"
10- sensor-id: an opaque id provided by the firmware to the kernel, identifies a
11 given sensor and its attribute data
12
13Example sensors node:
14
15cooling-fan#8-data {
16 sensor-id = <0x7052107>;
17 compatible = "ibm,opal-sensor-cooling-fan";
18};
19
20amb-temp#1-thrs {
21 sensor-id = <0x5096000>;
22 compatible = "ibm,opal-sensor-amb-temp";
23};
diff --git a/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt b/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
index b117b2e9e1a7..2391e5c41999 100644
--- a/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
+++ b/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
@@ -3,6 +3,7 @@ NTC Thermistor hwmon sensors
3 3
4Requires node properties: 4Requires node properties:
5- "compatible" value : one of 5- "compatible" value : one of
6 "epcos,b57330v2103"
6 "murata,ncp15wb473" 7 "murata,ncp15wb473"
7 "murata,ncp18wb473" 8 "murata,ncp18wb473"
8 "murata,ncp21wb473" 9 "murata,ncp21wb473"
diff --git a/Documentation/devicetree/bindings/hwmon/pwm-fan.txt b/Documentation/devicetree/bindings/hwmon/pwm-fan.txt
new file mode 100644
index 000000000000..610757ce4492
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/pwm-fan.txt
@@ -0,0 +1,12 @@
1Bindings for a fan connected to the PWM lines
2
3Required properties:
4- compatible : "pwm-fan"
5- pwms : the PWM that is used to control the PWM fan
6
7Example:
8 pwm-fan {
9 compatible = "pwm-fan";
10 status = "okay";
11 pwms = <&pwm 0 10000 0>;
12 };
diff --git a/Documentation/devicetree/bindings/i2c/trivial-devices.txt b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
index bef86e57c388..37803eb5521e 100644
--- a/Documentation/devicetree/bindings/i2c/trivial-devices.txt
+++ b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
@@ -50,6 +50,7 @@ epson,rx8581 I2C-BUS INTERFACE REAL TIME CLOCK MODULE
50fsl,mag3110 MAG3110: Xtrinsic High Accuracy, 3D Magnetometer 50fsl,mag3110 MAG3110: Xtrinsic High Accuracy, 3D Magnetometer
51fsl,mc13892 MC13892: Power Management Integrated Circuit (PMIC) for i.MX35/51 51fsl,mc13892 MC13892: Power Management Integrated Circuit (PMIC) for i.MX35/51
52fsl,mma8450 MMA8450Q: Xtrinsic Low-power, 3-axis Xtrinsic Accelerometer 52fsl,mma8450 MMA8450Q: Xtrinsic Low-power, 3-axis Xtrinsic Accelerometer
53fsl,mma8452 MMA8452Q: 3-axis 12-bit / 8-bit Digital Accelerometer
53fsl,mpr121 MPR121: Proximity Capacitive Touch Sensor Controller 54fsl,mpr121 MPR121: Proximity Capacitive Touch Sensor Controller
54fsl,sgtl5000 SGTL5000: Ultra Low-Power Audio Codec 55fsl,sgtl5000 SGTL5000: Ultra Low-Power Audio Codec
55gmt,g751 G751: Digital Temperature Sensor and Thermal Watchdog with Two-Wire Interface 56gmt,g751 G751: Digital Temperature Sensor and Thermal Watchdog with Two-Wire Interface
@@ -83,5 +84,6 @@ stm,m41t80 M41T80 - SERIAL ACCESS RTC WITH ALARMS
83taos,tsl2550 Ambient Light Sensor with SMBUS/Two Wire Serial Interface 84taos,tsl2550 Ambient Light Sensor with SMBUS/Two Wire Serial Interface
84ti,tsc2003 I2C Touch-Screen Controller 85ti,tsc2003 I2C Touch-Screen Controller
85ti,tmp102 Low Power Digital Temperature Sensor with SMBUS/Two Wire Serial Interface 86ti,tmp102 Low Power Digital Temperature Sensor with SMBUS/Two Wire Serial Interface
87ti,tmp103 Low Power Digital Temperature Sensor with SMBUS/Two Wire Serial Interface
86ti,tmp275 Digital Temperature Sensor 88ti,tmp275 Digital Temperature Sensor
87winbond,wpct301 i2c trusted platform module (TPM) 89winbond,wpct301 i2c trusted platform module (TPM)
diff --git a/Documentation/devicetree/bindings/iio/adc/max1027-adc.txt b/Documentation/devicetree/bindings/iio/adc/max1027-adc.txt
new file mode 100644
index 000000000000..a8770cc6bcad
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/max1027-adc.txt
@@ -0,0 +1,22 @@
1* Maxim 1027/1029/1031 Analog to Digital Converter (ADC)
2
3Required properties:
4 - compatible: Should be "maxim,max1027" or "maxim,max1029" or "maxim,max1031"
5 - reg: SPI chip select number for the device
6 - interrupt-parent: phandle to the parent interrupt controller
7 see: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
8 - interrupts: IRQ line for the ADC
9 see: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
10
11Recommended properties:
12- spi-max-frequency: Definition as per
13 Documentation/devicetree/bindings/spi/spi-bus.txt
14
15Example:
16adc@0 {
17 compatible = "maxim,max1027";
18 reg = <0>;
19 interrupt-parent = <&gpio5>;
20 interrupts = <15 IRQ_TYPE_EDGE_RISING>;
21 spi-max-frequency = <1000000>;
22};
diff --git a/Documentation/devicetree/bindings/iio/magnetometer/hmc5843.txt b/Documentation/devicetree/bindings/iio/magnetometer/hmc5843.txt
index 90d5f34db04e..8e191eef014e 100644
--- a/Documentation/devicetree/bindings/iio/magnetometer/hmc5843.txt
+++ b/Documentation/devicetree/bindings/iio/magnetometer/hmc5843.txt
@@ -3,6 +3,10 @@
3Required properties: 3Required properties:
4 4
5 - compatible : should be "honeywell,hmc5843" 5 - compatible : should be "honeywell,hmc5843"
6 Other models which are supported with driver are:
7 "honeywell,hmc5883"
8 "honeywell,hmc5883l"
9 "honeywell,hmc5983"
6 - reg : the I2C address of the magnetometer - typically 0x1e 10 - reg : the I2C address of the magnetometer - typically 0x1e
7 11
8Optional properties: 12Optional properties:
diff --git a/Documentation/devicetree/bindings/iio/st-sensors.txt b/Documentation/devicetree/bindings/iio/st-sensors.txt
new file mode 100644
index 000000000000..a7a0a15913ad
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/st-sensors.txt
@@ -0,0 +1,54 @@
1STMicroelectronics MEMS sensors
2
3The STMicroelectronics sensor devices are pretty straight-forward I2C or
4SPI devices, all sharing the same device tree descriptions no matter what
5type of sensor it is.
6
7Required properties:
8- compatible: see the list of valid compatible strings below
9- reg: the I2C or SPI address the device will respond to
10
11Optional properties:
12- vdd-supply: an optional regulator that needs to be on to provide VDD
13 power to the sensor.
14- vddio-supply: an optional regulator that needs to be on to provide the
15 VDD IO power to the sensor.
16- st,drdy-int-pin: the pin on the package that will be used to signal
17 "data ready" (valid values: 1 or 2). This property is not configurable
18 on all sensors.
19
20Sensors may also have applicable pin control settings, those use the
21standard bindings from pinctrl/pinctrl-bindings.txt.
22
23Valid compatible strings:
24
25Accelerometers:
26- st,lsm303dlh-accel
27- st,lsm303dlhc-accel
28- st,lis3dh-accel
29- st,lsm330d-accel
30- st,lsm330dl-accel
31- st,lsm330dlc-accel
32- st,lis331dlh-accel
33- st,lsm303dl-accel
34- st,lsm303dlm-accel
35- st,lsm330-accel
36
37Gyroscopes:
38- st,l3g4200d-gyro
39- st,lsm330d-gyro
40- st,lsm330dl-gyro
41- st,lsm330dlc-gyro
42- st,l3gd20-gyro
43- st,l3g4is-gyro
44- st,lsm330-gyro
45
46Magnetometers:
47- st,lsm303dlhc-magn
48- st,lsm303dlm-magn
49- st,lis3mdl-magn
50
51Pressure sensors:
52- st,lps001wp-press
53- st,lps25h-press
54- st,lps331ap-press
diff --git a/Documentation/devicetree/bindings/arm/atmel-aic.txt b/Documentation/devicetree/bindings/interrupt-controller/atmel,aic.txt
index 2742e9cfd6b1..2742e9cfd6b1 100644
--- a/Documentation/devicetree/bindings/arm/atmel-aic.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/atmel,aic.txt
diff --git a/Documentation/devicetree/bindings/interrupt-controller/opencores,or1k-pic.txt b/Documentation/devicetree/bindings/interrupt-controller/opencores,or1k-pic.txt
new file mode 100644
index 000000000000..55c04faa3f3f
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/opencores,or1k-pic.txt
@@ -0,0 +1,23 @@
1OpenRISC 1000 Programmable Interrupt Controller
2
3Required properties:
4
5- compatible : should be "opencores,or1k-pic-level" for variants with
6 level triggered interrupt lines, "opencores,or1k-pic-edge" for variants with
7 edge triggered interrupt lines or "opencores,or1200-pic" for machines
8 with the non-spec compliant or1200 type implementation.
9
10 "opencores,or1k-pic" is also provided as an alias to "opencores,or1200-pic",
11 but this is only for backwards compatibility.
12
13- interrupt-controller : Identifies the node as an interrupt controller
14- #interrupt-cells : Specifies the number of cells needed to encode an
15 interrupt source. The value shall be 1.
16
17Example:
18
19intc: interrupt-controller {
20 compatible = "opencores,or1k-pic-level";
21 interrupt-controller;
22 #interrupt-cells = <1>;
23};
diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu.txt b/Documentation/devicetree/bindings/iommu/arm,smmu.txt
index f284b99402bc..2d0f7cd867ea 100644
--- a/Documentation/devicetree/bindings/iommu/arm,smmu.txt
+++ b/Documentation/devicetree/bindings/iommu/arm,smmu.txt
@@ -42,12 +42,6 @@ conditions.
42 42
43** System MMU optional properties: 43** System MMU optional properties:
44 44
45- smmu-parent : When multiple SMMUs are chained together, this
46 property can be used to provide a phandle to the
47 parent SMMU (that is the next SMMU on the path going
48 from the mmu-masters towards memory) node for this
49 SMMU.
50
51- calxeda,smmu-secure-config-access : Enable proper handling of buggy 45- calxeda,smmu-secure-config-access : Enable proper handling of buggy
52 implementations that always use secure access to 46 implementations that always use secure access to
53 SMMU configuration registers. In this case non-secure 47 SMMU configuration registers. In this case non-secure
diff --git a/Documentation/devicetree/bindings/iommu/iommu.txt b/Documentation/devicetree/bindings/iommu/iommu.txt
new file mode 100644
index 000000000000..5a8b4624defc
--- /dev/null
+++ b/Documentation/devicetree/bindings/iommu/iommu.txt
@@ -0,0 +1,182 @@
1This document describes the generic device tree binding for IOMMUs and their
2master(s).
3
4
5IOMMU device node:
6==================
7
8An IOMMU can provide the following services:
9
10* Remap address space to allow devices to access physical memory ranges that
11 they otherwise wouldn't be capable of accessing.
12
13 Example: 32-bit DMA to 64-bit physical addresses
14
15* Implement scatter-gather at page level granularity so that the device does
16 not have to.
17
18* Provide system protection against "rogue" DMA by forcing all accesses to go
19 through the IOMMU and faulting when encountering accesses to unmapped
20 address regions.
21
22* Provide address space isolation between multiple contexts.
23
24 Example: Virtualization
25
26Device nodes compatible with this binding represent hardware with some of the
27above capabilities.
28
29IOMMUs can be single-master or multiple-master. Single-master IOMMU devices
30typically have a fixed association to the master device, whereas multiple-
31master IOMMU devices can translate accesses from more than one master.
32
33The device tree node of the IOMMU device's parent bus must contain a valid
34"dma-ranges" property that describes how the physical address space of the
35IOMMU maps to memory. An empty "dma-ranges" property means that there is a
361:1 mapping from IOMMU to memory.
37
38Required properties:
39--------------------
40- #iommu-cells: The number of cells in an IOMMU specifier needed to encode an
41 address.
42
43The meaning of the IOMMU specifier is defined by the device tree binding of
44the specific IOMMU. Below are a few examples of typical use-cases:
45
46- #iommu-cells = <0>: Single master IOMMU devices are not configurable and
47 therefore no additional information needs to be encoded in the specifier.
48 This may also apply to multiple master IOMMU devices that do not allow the
49 association of masters to be configured. Note that an IOMMU can by design
50 be multi-master yet only expose a single master in a given configuration.
51 In such cases the number of cells will usually be 1 as in the next case.
52- #iommu-cells = <1>: Multiple master IOMMU devices may need to be configured
53 in order to enable translation for a given master. In such cases the single
54 address cell corresponds to the master device's ID. In some cases more than
55 one cell can be required to represent a single master ID.
56- #iommu-cells = <4>: Some IOMMU devices allow the DMA window for masters to
57 be configured. The first cell of the address in this may contain the master
58 device's ID for example, while the second cell could contain the start of
59 the DMA window for the given device. The length of the DMA window is given
60 by the third and fourth cells.
61
62Note that these are merely examples and real-world use-cases may use different
63definitions to represent their individual needs. Always refer to the specific
64IOMMU binding for the exact meaning of the cells that make up the specifier.
65
66
67IOMMU master node:
68==================
69
70Devices that access memory through an IOMMU are called masters. A device can
71have multiple master interfaces (to one or more IOMMU devices).
72
73Required properties:
74--------------------
75- iommus: A list of phandle and IOMMU specifier pairs that describe the IOMMU
76 master interfaces of the device. One entry in the list describes one master
77 interface of the device.
78
79When an "iommus" property is specified in a device tree node, the IOMMU will
80be used for address translation. If a "dma-ranges" property exists in the
81device's parent node it will be ignored. An exception to this rule is if the
82referenced IOMMU is disabled, in which case the "dma-ranges" property of the
83parent shall take effect. Note that merely disabling a device tree node does
84not guarantee that the IOMMU is really disabled since the hardware may not
85have a means to turn off translation. But it is invalid in such cases to
86disable the IOMMU's device tree node in the first place because it would
87prevent any driver from properly setting up the translations.
88
89
90Notes:
91======
92
93One possible extension to the above is to use an "iommus" property along with
94a "dma-ranges" property in a bus device node (such as PCI host bridges). This
95can be useful to describe how children on the bus relate to the IOMMU if they
96are not explicitly listed in the device tree (e.g. PCI devices). However, the
97requirements of that use-case haven't been fully determined yet. Implementing
98this is therefore not recommended without further discussion and extension of
99this binding.
100
101
102Examples:
103=========
104
105Single-master IOMMU:
106--------------------
107
108 iommu {
109 #iommu-cells = <0>;
110 };
111
112 master {
113 iommus = <&{/iommu}>;
114 };
115
116Multiple-master IOMMU with fixed associations:
117----------------------------------------------
118
119 /* multiple-master IOMMU */
120 iommu {
121 /*
122 * Masters are statically associated with this IOMMU and share
123 * the same address translations because the IOMMU does not
124 * have sufficient information to distinguish between masters.
125 *
126 * Consequently address translation is always on or off for
127 * all masters at any given point in time.
128 */
129 #iommu-cells = <0>;
130 };
131
132 /* static association with IOMMU */
133 master@1 {
134 reg = <1>;
135 iommus = <&{/iommu}>;
136 };
137
138 /* static association with IOMMU */
139 master@2 {
140 reg = <2>;
141 iommus = <&{/iommu}>;
142 };
143
144Multiple-master IOMMU:
145----------------------
146
147 iommu {
148 /* the specifier represents the ID of the master */
149 #iommu-cells = <1>;
150 };
151
152 master@1 {
153 /* device has master ID 42 in the IOMMU */
154 iommus = <&{/iommu} 42>;
155 };
156
157 master@2 {
158 /* device has master IDs 23 and 24 in the IOMMU */
159 iommus = <&{/iommu} 23>, <&{/iommu} 24>;
160 };
161
162Multiple-master IOMMU with configurable DMA window:
163---------------------------------------------------
164
165 / {
166 iommu {
167 /*
168 * One cell for the master ID and one cell for the
169 * address of the DMA window. The length of the DMA
170 * window is encoded in two cells.
171 *
172 * The DMA window is the range addressable by the
173 * master (i.e. the I/O virtual address space).
174 */
175 #iommu-cells = <4>;
176 };
177
178 master {
179 /* master ID 42, 4 GiB DMA window starting at 0 */
180 iommus = <&{/iommu} 42 0 0x1 0x0>;
181 };
182 };
diff --git a/Documentation/devicetree/bindings/media/atmel-isi.txt b/Documentation/devicetree/bindings/media/atmel-isi.txt
new file mode 100644
index 000000000000..17e71b7b44c6
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/atmel-isi.txt
@@ -0,0 +1,51 @@
1Atmel Image Sensor Interface (ISI) SoC Camera Subsystem
2----------------------------------------------
3
4Required properties:
5- compatible: must be "atmel,at91sam9g45-isi"
6- reg: physical base address and length of the registers set for the device;
7- interrupts: should contain IRQ line for the ISI;
8- clocks: list of clock specifiers, corresponding to entries in
9 the clock-names property;
10- clock-names: must contain "isi_clk", which is the isi peripherial clock.
11
12ISI supports a single port node with parallel bus. It should contain one
13'port' child node with child 'endpoint' node. Please refer to the bindings
14defined in Documentation/devicetree/bindings/media/video-interfaces.txt.
15
16Example:
17 isi: isi@f0034000 {
18 compatible = "atmel,at91sam9g45-isi";
19 reg = <0xf0034000 0x4000>;
20 interrupts = <37 IRQ_TYPE_LEVEL_HIGH 5>;
21
22 clocks = <&isi_clk>;
23 clock-names = "isi_clk";
24
25 pinctrl-names = "default";
26 pinctrl-0 = <&pinctrl_isi>;
27
28 port {
29 #address-cells = <1>;
30 #size-cells = <0>;
31
32 isi_0: endpoint {
33 remote-endpoint = <&ov2640_0>;
34 bus-width = <8>;
35 };
36 };
37 };
38
39 i2c1: i2c@f0018000 {
40 ov2640: camera@0x30 {
41 compatible = "omnivision,ov2640";
42 reg = <0x30>;
43
44 port {
45 ov2640_0: endpoint {
46 remote-endpoint = <&isi_0>;
47 bus-width = <8>;
48 };
49 };
50 };
51 };
diff --git a/Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt b/Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt
index 937b755baf8f..bf52ed4a5067 100644
--- a/Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt
+++ b/Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt
@@ -3,9 +3,13 @@ Samsung S5P/EXYNOS SoC series JPEG codec
3Required properties: 3Required properties:
4 4
5- compatible : should be one of: 5- compatible : should be one of:
6 "samsung,s5pv210-jpeg", "samsung,exynos4210-jpeg"; 6 "samsung,s5pv210-jpeg", "samsung,exynos4210-jpeg",
7 "samsung,exynos3250-jpeg";
7- reg : address and length of the JPEG codec IP register set; 8- reg : address and length of the JPEG codec IP register set;
8- interrupts : specifies the JPEG codec IP interrupt; 9- interrupts : specifies the JPEG codec IP interrupt;
9- clocks : should contain the JPEG codec IP gate clock specifier, from the 10- clock-names : should contain:
10 common clock bindings; 11 - "jpeg" for the core gate clock,
11- clock-names : should contain "jpeg" entry. 12 - "sclk" for the special clock (optional).
13- clocks : should contain the clock specifier and clock ID list
14 matching entries in the clock-names property; from
15 the common clock bindings.
diff --git a/Documentation/devicetree/bindings/media/i2c/mt9m111.txt b/Documentation/devicetree/bindings/media/i2c/mt9m111.txt
new file mode 100644
index 000000000000..ed5a334b1e57
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/i2c/mt9m111.txt
@@ -0,0 +1,28 @@
1Micron 1.3Mp CMOS Digital Image Sensor
2
3The Micron MT9M111 is a CMOS active pixel digital image sensor with an active
4array size of 1280H x 1024V. It is programmable through a simple two-wire serial
5interface.
6
7Required Properties:
8- compatible: value should be "micron,mt9m111"
9
10For further reading on port node refer to
11Documentation/devicetree/bindings/media/video-interfaces.txt.
12
13Example:
14
15 i2c_master {
16 mt9m111@5d {
17 compatible = "micron,mt9m111";
18 reg = <0x5d>;
19
20 remote = <&pxa_camera>;
21 port {
22 mt9m111_1: endpoint {
23 bus-width = <8>;
24 remote-endpoint = <&pxa_camera>;
25 };
26 };
27 };
28 };
diff --git a/Documentation/devicetree/bindings/media/pxa-camera.txt b/Documentation/devicetree/bindings/media/pxa-camera.txt
new file mode 100644
index 000000000000..11f5b5d51af8
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/pxa-camera.txt
@@ -0,0 +1,43 @@
1Marvell PXA camera host interface
2
3Required properties:
4 - compatible: Should be "marvell,pxa270-qci"
5 - reg: register base and size
6 - interrupts: the interrupt number
7 - any required generic properties defined in video-interfaces.txt
8
9Optional properties:
10 - clocks: input clock (see clock-bindings.txt)
11 - clock-output-names: should contain the name of the clock driving the
12 sensor master clock MCLK
13 - clock-frequency: host interface is driving MCLK, and MCLK rate is this rate
14
15Example:
16
17 pxa_camera: pxa_camera@50000000 {
18 compatible = "marvell,pxa270-qci";
19 reg = <0x50000000 0x1000>;
20 interrupts = <33>;
21
22 clocks = <&pxa2xx_clks 24>;
23 clock-names = "ciclk";
24 clock-frequency = <50000000>;
25 clock-output-names = "qci_mclk";
26
27 status = "okay";
28
29 port {
30 #address-cells = <1>;
31 #size-cells = <0>;
32
33 /* Parallel bus endpoint */
34 qci: endpoint@0 {
35 reg = <0>; /* Local endpoint # */
36 remote-endpoint = <&mt9m111_1>;
37 bus-width = <8>; /* Used data lines */
38 hsync-active = <0>; /* Active low */
39 vsync-active = <0>; /* Active low */
40 pclk-sample = <1>; /* Rising */
41 };
42 };
43 };
diff --git a/Documentation/devicetree/bindings/media/rcar_vin.txt b/Documentation/devicetree/bindings/media/rcar_vin.txt
new file mode 100644
index 000000000000..ba61782c2af9
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/rcar_vin.txt
@@ -0,0 +1,86 @@
1Renesas RCar Video Input driver (rcar_vin)
2------------------------------------------
3
4The rcar_vin device provides video input capabilities for the Renesas R-Car
5family of devices. The current blocks are always slaves and suppot one input
6channel which can be either RGB, YUYV or BT656.
7
8 - compatible: Must be one of the following
9 - "renesas,vin-r8a7791" for the R8A7791 device
10 - "renesas,vin-r8a7790" for the R8A7790 device
11 - "renesas,vin-r8a7779" for the R8A7779 device
12 - "renesas,vin-r8a7778" for the R8A7778 device
13 - reg: the register base and size for the device registers
14 - interrupts: the interrupt for the device
15 - clocks: Reference to the parent clock
16
17Additionally, an alias named vinX will need to be created to specify
18which video input device this is.
19
20The per-board settings:
21 - port sub-node describing a single endpoint connected to the vin
22 as described in video-interfaces.txt[1]. Only the first one will
23 be considered as each vin interface has one input port.
24
25 These settings are used to work out video input format and widths
26 into the system.
27
28
29Device node example
30-------------------
31
32 aliases {
33 vin0 = &vin0;
34 };
35
36 vin0: vin@0xe6ef0000 {
37 compatible = "renesas,vin-r8a7790";
38 clocks = <&mstp8_clks R8A7790_CLK_VIN0>;
39 reg = <0 0xe6ef0000 0 0x1000>;
40 interrupts = <0 188 IRQ_TYPE_LEVEL_HIGH>;
41 status = "disabled";
42 };
43
44Board setup example (vin1 composite video input)
45------------------------------------------------
46
47&i2c2 {
48 status = "ok";
49 pinctrl-0 = <&i2c2_pins>;
50 pinctrl-names = "default";
51
52 adv7180@20 {
53 compatible = "adi,adv7180";
54 reg = <0x20>;
55 remote = <&vin1>;
56
57 port {
58 adv7180: endpoint {
59 bus-width = <8>;
60 remote-endpoint = <&vin1ep0>;
61 };
62 };
63 };
64};
65
66/* composite video input */
67&vin1 {
68 pinctrl-0 = <&vin1_pins>;
69 pinctrl-names = "default";
70
71 status = "ok";
72
73 port {
74 #address-cells = <1>;
75 #size-cells = <0>;
76
77 vin1ep0: endpoint {
78 remote-endpoint = <&adv7180>;
79 bus-width = <8>;
80 };
81 };
82};
83
84
85
86[1] video-interfaces.txt common video media interface
diff --git a/Documentation/devicetree/bindings/media/sunxi-ir.txt b/Documentation/devicetree/bindings/media/sunxi-ir.txt
new file mode 100644
index 000000000000..23dd5ad07b7c
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/sunxi-ir.txt
@@ -0,0 +1,23 @@
1Device-Tree bindings for SUNXI IR controller found in sunXi SoC family
2
3Required properties:
4- compatible : should be "allwinner,sun4i-a10-ir";
5- clocks : list of clock specifiers, corresponding to
6 entries in clock-names property;
7- clock-names : should contain "apb" and "ir" entries;
8- interrupts : should contain IR IRQ number;
9- reg : should contain IO map address for IR.
10
11Optional properties:
12- linux,rc-map-name : Remote control map name.
13
14Example:
15
16ir0: ir@01c21800 {
17 compatible = "allwinner,sun4i-a10-ir";
18 clocks = <&apb0_gates 6>, <&ir0_clk>;
19 clock-names = "apb", "ir";
20 interrupts = <0 5 1>;
21 reg = <0x01C21800 0x40>;
22 linux,rc-map-name = "rc-rc6-mce";
23};
diff --git a/Documentation/devicetree/bindings/mfd/palmas.txt b/Documentation/devicetree/bindings/mfd/palmas.txt
index e5f0f8303461..eda898978d33 100644
--- a/Documentation/devicetree/bindings/mfd/palmas.txt
+++ b/Documentation/devicetree/bindings/mfd/palmas.txt
@@ -6,6 +6,7 @@ twl6037 (palmas)
6tps65913 (palmas) 6tps65913 (palmas)
7tps65914 (palmas) 7tps65914 (palmas)
8tps659038 8tps659038
9tps65917
9 10
10Required properties: 11Required properties:
11- compatible : Should be from the list 12- compatible : Should be from the list
@@ -16,6 +17,7 @@ Required properties:
16 ti,tps65914 17 ti,tps65914
17 ti,tps80036 18 ti,tps80036
18 ti,tps659038 19 ti,tps659038
20 ti,tps65917
19and also the generic series names 21and also the generic series names
20 ti,palmas 22 ti,palmas
21- interrupt-controller : palmas has its own internal IRQs 23- interrupt-controller : palmas has its own internal IRQs
diff --git a/Documentation/devicetree/bindings/phy/berlin-sata-phy.txt b/Documentation/devicetree/bindings/phy/berlin-sata-phy.txt
new file mode 100644
index 000000000000..88f8c23384c0
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/berlin-sata-phy.txt
@@ -0,0 +1,34 @@
1Berlin SATA PHY
2---------------
3
4Required properties:
5- compatible: should be "marvell,berlin2q-sata-phy"
6- address-cells: should be 1
7- size-cells: should be 0
8- phy-cells: from the generic PHY bindings, must be 1
9- reg: address and length of the register
10- clocks: reference to the clock entry
11
12Sub-nodes:
13Each PHY should be represented as a sub-node.
14
15Sub-nodes required properties:
16- reg: the PHY number
17
18Example:
19 sata_phy: phy@f7e900a0 {
20 compatible = "marvell,berlin2q-sata-phy";
21 reg = <0xf7e900a0 0x200>;
22 clocks = <&chip CLKID_SATA>;
23 #address-cells = <1>;
24 #size-cells = <0>;
25 #phy-cells = <1>;
26
27 sata-phy@0 {
28 reg = <0>;
29 };
30
31 sata-phy@1 {
32 reg = <1>;
33 };
34 };
diff --git a/Documentation/devicetree/bindings/phy/hix5hd2-phy.txt b/Documentation/devicetree/bindings/phy/hix5hd2-phy.txt
new file mode 100644
index 000000000000..296168b74d24
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/hix5hd2-phy.txt
@@ -0,0 +1,22 @@
1Hisilicon hix5hd2 SATA PHY
2-----------------------
3
4Required properties:
5- compatible: should be "hisilicon,hix5hd2-sata-phy"
6- reg: offset and length of the PHY registers
7- #phy-cells: must be 0
8Refer to phy/phy-bindings.txt for the generic PHY binding properties
9
10Optional Properties:
11- hisilicon,peripheral-syscon: phandle of syscon used to control peripheral.
12- hisilicon,power-reg: offset and bit number within peripheral-syscon,
13 register of controlling sata power supply.
14
15Example:
16 sata_phy: phy@f9900000 {
17 compatible = "hisilicon,hix5hd2-sata-phy";
18 reg = <0xf9900000 0x10000>;
19 #phy-cells = <0>;
20 hisilicon,peripheral-syscon = <&peripheral_ctrl>;
21 hisilicon,power-reg = <0x8 10>;
22 };
diff --git a/Documentation/devicetree/bindings/phy/phy-bindings.txt b/Documentation/devicetree/bindings/phy/phy-bindings.txt
index 8ae844fc0c60..2aa1840200ed 100644
--- a/Documentation/devicetree/bindings/phy/phy-bindings.txt
+++ b/Documentation/devicetree/bindings/phy/phy-bindings.txt
@@ -10,6 +10,10 @@ Required Properties:
10 provider can use the values in cells to find the appropriate 10 provider can use the values in cells to find the appropriate
11 PHY. 11 PHY.
12 12
13Optional Properties:
14phy-supply: Phandle to a regulator that provides power to the PHY. This
15 regulator will be managed during the PHY power on/off sequence.
16
13For example: 17For example:
14 18
15phys: phy { 19phys: phy {
diff --git a/Documentation/devicetree/bindings/phy/phy-miphy365x.txt b/Documentation/devicetree/bindings/phy/phy-miphy365x.txt
new file mode 100644
index 000000000000..42c880886cf7
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/phy-miphy365x.txt
@@ -0,0 +1,76 @@
1STMicroelectronics STi MIPHY365x PHY binding
2============================================
3
4This binding describes a miphy device that is used to control PHY hardware
5for SATA and PCIe.
6
7Required properties (controller (parent) node):
8- compatible : Should be "st,miphy365x-phy"
9- st,syscfg : Should be a phandle of the system configuration register group
10 which contain the SATA, PCIe mode setting bits
11
12Required nodes : A sub-node is required for each channel the controller
13 provides. Address range information including the usual
14 'reg' and 'reg-names' properties are used inside these
15 nodes to describe the controller's topology. These nodes
16 are translated by the driver's .xlate() function.
17
18Required properties (port (child) node):
19- #phy-cells : Should be 1 (See second example)
20 Cell after port phandle is device type from:
21 - MIPHY_TYPE_SATA
22 - MIPHY_TYPE_PCI
23- reg : Address and length of register sets for each device in
24 "reg-names"
25- reg-names : The names of the register addresses corresponding to the
26 registers filled in "reg":
27 - sata: For SATA devices
28 - pcie: For PCIe devices
29 - syscfg: To specify the syscfg based config register
30
31Optional properties (port (child) node):
32- st,sata-gen : Generation of locally attached SATA IP. Expected values
33 are {1,2,3). If not supplied generation 1 hardware will
34 be expected
35- st,pcie-tx-pol-inv : Bool property to invert the polarity PCIe Tx (Txn/Txp)
36- st,sata-tx-pol-inv : Bool property to invert the polarity SATA Tx (Txn/Txp)
37
38Example:
39
40 miphy365x_phy: miphy365x@fe382000 {
41 compatible = "st,miphy365x-phy";
42 st,syscfg = <&syscfg_rear>;
43 #address-cells = <1>;
44 #size-cells = <1>;
45 ranges;
46
47 phy_port0: port@fe382000 {
48 reg = <0xfe382000 0x100>, <0xfe394000 0x100>, <0x824 0x4>;
49 reg-names = "sata", "pcie", "syscfg";
50 #phy-cells = <1>;
51 st,sata-gen = <3>;
52 };
53
54 phy_port1: port@fe38a000 {
55 reg = <0xfe38a000 0x100>, <0xfe804000 0x100>, <0x828 0x4>;;
56 reg-names = "sata", "pcie", "syscfg";
57 #phy-cells = <1>;
58 st,pcie-tx-pol-inv;
59 };
60 };
61
62Specifying phy control of devices
63=================================
64
65Device nodes should specify the configuration required in their "phys"
66property, containing a phandle to the phy port node and a device type.
67
68Example:
69
70#include <dt-bindings/phy/phy-miphy365x.h>
71
72 sata0: sata@fe380000 {
73 ...
74 phys = <&phy_port0 MIPHY_TYPE_SATA>;
75 ...
76 };
diff --git a/Documentation/devicetree/bindings/phy/qcom-apq8064-sata-phy.txt b/Documentation/devicetree/bindings/phy/qcom-apq8064-sata-phy.txt
new file mode 100644
index 000000000000..952f6c96bab9
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/qcom-apq8064-sata-phy.txt
@@ -0,0 +1,24 @@
1Qualcomm APQ8064 SATA PHY Controller
2------------------------------------
3
4SATA PHY nodes are defined to describe on-chip SATA Physical layer controllers.
5Each SATA PHY controller should have its own node.
6
7Required properties:
8- compatible: compatible list, contains "qcom,apq8064-sata-phy".
9- reg: offset and length of the SATA PHY register set;
10- #phy-cells: must be zero
11- clocks: a list of phandles and clock-specifier pairs, one for each entry in
12 clock-names.
13- clock-names: must be "cfg" for phy config clock.
14
15Example:
16 sata_phy: sata-phy@1b400000 {
17 compatible = "qcom,apq8064-sata-phy";
18 reg = <0x1b400000 0x200>;
19
20 clocks = <&gcc SATA_PHY_CFG_CLK>;
21 clock-names = "cfg";
22
23 #phy-cells = <0>;
24 };
diff --git a/Documentation/devicetree/bindings/phy/qcom-ipq806x-sata-phy.txt b/Documentation/devicetree/bindings/phy/qcom-ipq806x-sata-phy.txt
new file mode 100644
index 000000000000..76bfbd056202
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/qcom-ipq806x-sata-phy.txt
@@ -0,0 +1,23 @@
1Qualcomm IPQ806x SATA PHY Controller
2------------------------------------
3
4SATA PHY nodes are defined to describe on-chip SATA Physical layer controllers.
5Each SATA PHY controller should have its own node.
6
7Required properties:
8- compatible: compatible list, contains "qcom,ipq806x-sata-phy"
9- reg: offset and length of the SATA PHY register set;
10- #phy-cells: must be zero
11- clocks: must be exactly one entry
12- clock-names: must be "cfg"
13
14Example:
15 sata_phy: sata-phy@1b400000 {
16 compatible = "qcom,ipq806x-sata-phy";
17 reg = <0x1b400000 0x200>;
18
19 clocks = <&gcc SATA_PHY_CFG_CLK>;
20 clock-names = "cfg";
21
22 #phy-cells = <0>;
23 };
diff --git a/Documentation/devicetree/bindings/phy/samsung-phy.txt b/Documentation/devicetree/bindings/phy/samsung-phy.txt
index 2049261d8c31..6099a5c94283 100644
--- a/Documentation/devicetree/bindings/phy/samsung-phy.txt
+++ b/Documentation/devicetree/bindings/phy/samsung-phy.txt
@@ -26,6 +26,7 @@ Samsung S5P/EXYNOS SoC series USB PHY
26 26
27Required properties: 27Required properties:
28- compatible : should be one of the listed compatibles: 28- compatible : should be one of the listed compatibles:
29 - "samsung,exynos3250-usb2-phy"
29 - "samsung,exynos4210-usb2-phy" 30 - "samsung,exynos4210-usb2-phy"
30 - "samsung,exynos4x12-usb2-phy" 31 - "samsung,exynos4x12-usb2-phy"
31 - "samsung,exynos5250-usb2-phy" 32 - "samsung,exynos5250-usb2-phy"
@@ -46,6 +47,7 @@ and Exynos 4212) it is as follows:
46 1 - USB host ("host"), 47 1 - USB host ("host"),
47 2 - HSIC0 ("hsic0"), 48 2 - HSIC0 ("hsic0"),
48 3 - HSIC1 ("hsic1"), 49 3 - HSIC1 ("hsic1"),
50Exynos3250 has only USB device phy available as phy 0.
49 51
50Exynos 4210 and Exynos 4212 use mode switching and require that mode switch 52Exynos 4210 and Exynos 4212 use mode switching and require that mode switch
51register is supplied. 53register is supplied.
diff --git a/Documentation/devicetree/bindings/phy/ti-phy.txt b/Documentation/devicetree/bindings/phy/ti-phy.txt
index 9ce458f32945..305e3df3d9b1 100644
--- a/Documentation/devicetree/bindings/phy/ti-phy.txt
+++ b/Documentation/devicetree/bindings/phy/ti-phy.txt
@@ -9,15 +9,17 @@ Required properties:
9 e.g. USB2_PHY on OMAP5. 9 e.g. USB2_PHY on OMAP5.
10 "ti,control-phy-pipe3" - if it has DPLL and individual Rx & Tx power control 10 "ti,control-phy-pipe3" - if it has DPLL and individual Rx & Tx power control
11 e.g. USB3 PHY and SATA PHY on OMAP5. 11 e.g. USB3 PHY and SATA PHY on OMAP5.
12 "ti,control-phy-pcie" - for pcie to support external clock for pcie and to
13 set PCS delay value.
14 e.g. PCIE PHY in DRA7x
12 "ti,control-phy-usb2-dra7" - if it has power down register like USB2 PHY on 15 "ti,control-phy-usb2-dra7" - if it has power down register like USB2 PHY on
13 DRA7 platform. 16 DRA7 platform.
14 "ti,control-phy-usb2-am437" - if it has power down register like USB2 PHY on 17 "ti,control-phy-usb2-am437" - if it has power down register like USB2 PHY on
15 AM437 platform. 18 AM437 platform.
16 - reg : Address and length of the register set for the device. It contains 19 - reg : register ranges as listed in the reg-names property
17 the address of "otghs_control" for control-phy-otghs or "power" register 20 - reg-names: "otghs_control" for control-phy-otghs
18 for other types. 21 "power", "pcie_pcs" and "control_sma" for control-phy-pcie
19 - reg-names: should be "otghs_control" control-phy-otghs and "power" for 22 "power" for all other types
20 other types.
21 23
22omap_control_usb: omap-control-usb@4a002300 { 24omap_control_usb: omap-control-usb@4a002300 {
23 compatible = "ti,control-phy-otghs"; 25 compatible = "ti,control-phy-otghs";
@@ -56,8 +58,8 @@ usb2phy@4a0ad080 {
56TI PIPE3 PHY 58TI PIPE3 PHY
57 59
58Required properties: 60Required properties:
59 - compatible: Should be "ti,phy-usb3" or "ti,phy-pipe3-sata". 61 - compatible: Should be "ti,phy-usb3", "ti,phy-pipe3-sata" or
60 "ti,omap-usb3" is deprecated. 62 "ti,phy-pipe3-pcie. "ti,omap-usb3" is deprecated.
61 - reg : Address and length of the register set for the device. 63 - reg : Address and length of the register set for the device.
62 - reg-names: The names of the register addresses corresponding to the registers 64 - reg-names: The names of the register addresses corresponding to the registers
63 filled in "reg". 65 filled in "reg".
@@ -69,10 +71,17 @@ Required properties:
69 * "wkupclk" - wakeup clock. 71 * "wkupclk" - wakeup clock.
70 * "sysclk" - system clock. 72 * "sysclk" - system clock.
71 * "refclk" - reference clock. 73 * "refclk" - reference clock.
74 * "dpll_ref" - external dpll ref clk
75 * "dpll_ref_m2" - external dpll ref clk
76 * "phy-div" - divider for apll
77 * "div-clk" - apll clock
72 78
73Optional properties: 79Optional properties:
74 - ctrl-module : phandle of the control module used by PHY driver to power on 80 - ctrl-module : phandle of the control module used by PHY driver to power on
75 the PHY. 81 the PHY.
82 - id: If there are multiple instance of the same type, in order to
83 differentiate between each instance "id" can be used (e.g., multi-lane PCIe
84 PHY). If "id" is not provided, it is set to default value of '1'.
76 85
77This is usually a subnode of ocp2scp to which it is connected. 86This is usually a subnode of ocp2scp to which it is connected.
78 87
diff --git a/Documentation/devicetree/bindings/regulator/act8865-regulator.txt b/Documentation/devicetree/bindings/regulator/act8865-regulator.txt
index bef1fbb647ca..865614b34d6f 100644
--- a/Documentation/devicetree/bindings/regulator/act8865-regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/act8865-regulator.txt
@@ -1,13 +1,16 @@
1ACT8865 regulator 1ACT88xx regulators
2------------------- 2-------------------
3 3
4Required properties: 4Required properties:
5- compatible: "active-semi,act8865" 5- compatible: "active-semi,act8846" or "active-semi,act8865"
6- reg: I2C slave address 6- reg: I2C slave address
7 7
8Any standard regulator properties can be used to configure the single regulator. 8Any standard regulator properties can be used to configure the single regulator.
9 9
10The valid names for regulators are: 10The valid names for regulators are:
11 - for act8846:
12 REG1, REG2, REG3, REG4, REG5, REG6, REG7, REG8, REG9, REG10, REG11, REG12
13 - for act8865:
11 DCDC_REG1, DCDC_REG2, DCDC_REG3, LDO_REG1, LDO_REG2, LDO_REG3, LDO_REG4. 14 DCDC_REG1, DCDC_REG2, DCDC_REG3, LDO_REG1, LDO_REG2, LDO_REG3, LDO_REG4.
12 15
13Example: 16Example:
diff --git a/Documentation/devicetree/bindings/regulator/palmas-pmic.txt b/Documentation/devicetree/bindings/regulator/palmas-pmic.txt
index 42e6b6bc48ff..725393c8a7f2 100644
--- a/Documentation/devicetree/bindings/regulator/palmas-pmic.txt
+++ b/Documentation/devicetree/bindings/regulator/palmas-pmic.txt
@@ -7,6 +7,7 @@ Required properties:
7 ti,twl6037-pmic 7 ti,twl6037-pmic
8 ti,tps65913-pmic 8 ti,tps65913-pmic
9 ti,tps65914-pmic 9 ti,tps65914-pmic
10 ti,tps65917-pmic
10and also the generic series names 11and also the generic series names
11 ti,palmas-pmic 12 ti,palmas-pmic
12- interrupt-parent : The parent interrupt controller which is palmas. 13- interrupt-parent : The parent interrupt controller which is palmas.
diff --git a/Documentation/devicetree/bindings/regulator/tps65218.txt b/Documentation/devicetree/bindings/regulator/tps65218.txt
new file mode 100644
index 000000000000..fccc1d24af58
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/tps65218.txt
@@ -0,0 +1,23 @@
1TPS65218 family of regulators
2
3Required properties:
4For tps65218 regulators/LDOs
5- compatible:
6 - "ti,tps65218-dcdc1" for DCDC1
7 - "ti,tps65218-dcdc2" for DCDC2
8 - "ti,tps65218-dcdc3" for DCDC3
9 - "ti,tps65218-dcdc4" for DCDC4
10 - "ti,tps65218-dcdc5" for DCDC5
11 - "ti,tps65218-dcdc6" for DCDC6
12 - "ti,tps65218-ldo1" for LDO1
13
14Optional properties:
15- Any optional property defined in bindings/regulator/regulator.txt
16
17Example:
18
19 xyz: regulator@0 {
20 compatible = "ti,tps65218-dcdc1";
21 regulator-min-microvolt = <1000000>;
22 regulator-max-microvolt = <3000000>;
23 };
diff --git a/Documentation/devicetree/bindings/serial/efm32-uart.txt b/Documentation/devicetree/bindings/serial/efm32-uart.txt
index 3ca01336b837..8adbab268ca3 100644
--- a/Documentation/devicetree/bindings/serial/efm32-uart.txt
+++ b/Documentation/devicetree/bindings/serial/efm32-uart.txt
@@ -6,7 +6,7 @@ Required properties:
6- interrupts : Should contain uart interrupt 6- interrupts : Should contain uart interrupt
7 7
8Optional properties: 8Optional properties:
9- efm32,location : Decides the location of the USART I/O pins. 9- energymicro,location : Decides the location of the USART I/O pins.
10 Allowed range : [0 .. 5] 10 Allowed range : [0 .. 5]
11 Default: 0 11 Default: 0
12 12
@@ -16,5 +16,5 @@ uart@0x4000c400 {
16 compatible = "energymicro,efm32-uart"; 16 compatible = "energymicro,efm32-uart";
17 reg = <0x4000c400 0x400>; 17 reg = <0x4000c400 0x400>;
18 interrupts = <15>; 18 interrupts = <15>;
19 efm32,location = <0>; 19 energymicro,location = <0>;
20}; 20};
diff --git a/Documentation/devicetree/bindings/serial/fsl-lpuart.txt b/Documentation/devicetree/bindings/serial/fsl-lpuart.txt
index a1d1205d8185..c95005efbcb8 100644
--- a/Documentation/devicetree/bindings/serial/fsl-lpuart.txt
+++ b/Documentation/devicetree/bindings/serial/fsl-lpuart.txt
@@ -1,7 +1,11 @@
1* Freescale low power universal asynchronous receiver/transmitter (lpuart) 1* Freescale low power universal asynchronous receiver/transmitter (lpuart)
2 2
3Required properties: 3Required properties:
4- compatible : Should be "fsl,<soc>-lpuart" 4- compatible :
5 - "fsl,vf610-lpuart" for lpuart compatible with the one integrated
6 on Vybrid vf610 SoC with 8-bit register organization
7 - "fsl,ls1021a-lpuart" for lpuart compatible with the one integrated
8 on LS1021A SoC with 32-bit big-endian register organization
5- reg : Address and length of the register set for the device 9- reg : Address and length of the register set for the device
6- interrupts : Should contain uart interrupt 10- interrupts : Should contain uart interrupt
7- clocks : phandle + clock specifier pairs, one for each entry in clock-names 11- clocks : phandle + clock specifier pairs, one for each entry in clock-names
diff --git a/Documentation/devicetree/bindings/serial/samsung_uart.txt b/Documentation/devicetree/bindings/serial/samsung_uart.txt
index 2c8a17cf5cb5..e85f37ec33f0 100644
--- a/Documentation/devicetree/bindings/serial/samsung_uart.txt
+++ b/Documentation/devicetree/bindings/serial/samsung_uart.txt
@@ -1,14 +1,58 @@
1* Samsung's UART Controller 1* Samsung's UART Controller
2 2
3The Samsung's UART controller is used for interfacing SoC with serial communicaion 3The Samsung's UART controller is used for interfacing SoC with serial
4devices. 4communicaion devices.
5 5
6Required properties: 6Required properties:
7- compatible: should be 7- compatible: should be one of following:
8 - "samsung,exynos4210-uart", for UART's compatible with Exynos4210 uart ports. 8 - "samsung,exynos4210-uart" - Exynos4210 SoC,
9 - "samsung,s3c2410-uart" - compatible with ports present on S3C2410 SoC,
10 - "samsung,s3c2412-uart" - compatible with ports present on S3C2412 SoC,
11 - "samsung,s3c2440-uart" - compatible with ports present on S3C2440 SoC,
12 - "samsung,s3c6400-uart" - compatible with ports present on S3C6400 SoC,
13 - "samsung,s5pv210-uart" - compatible with ports present on S5PV210 SoC.
9 14
10- reg: base physical address of the controller and length of memory mapped 15- reg: base physical address of the controller and length of memory mapped
11 region. 16 region.
12 17
13- interrupts: interrupt number to the cpu. The interrupt specifier format depends 18- interrupts: a single interrupt signal to SoC interrupt controller,
14 on the interrupt controller parent. 19 according to interrupt bindings documentation [1].
20
21- clock-names: input names of clocks used by the controller:
22 - "uart" - controller bus clock,
23 - "clk_uart_baudN" - Nth baud base clock input (N = 0, 1, ...),
24 according to SoC User's Manual (only N = 0 is allowedfor SoCs without
25 internal baud clock mux).
26- clocks: phandles and specifiers for all clocks specified in "clock-names"
27 property, in the same order, according to clock bindings documentation [2].
28
29[1] Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
30[2] Documentation/devicetree/bindings/clock/clock-bindings.txt
31
32Optional properties:
33- samsung,uart-fifosize: The fifo size supported by the UART channel
34
35Note: Each Samsung UART should have an alias correctly numbered in the
36"aliases" node, according to serialN format, where N is the port number
37(non-negative decimal integer) as specified by User's Manual of respective
38SoC.
39
40Example:
41 aliases {
42 serial0 = &uart0;
43 serial1 = &uart1;
44 serial2 = &uart2;
45 };
46
47Example:
48 uart1: serial@7f005400 {
49 compatible = "samsung,s3c6400-uart";
50 reg = <0x7f005400 0x100>;
51 interrupt-parent = <&vic1>;
52 interrupts = <6>;
53 clock-names = "uart", "clk_uart_baud2",
54 "clk_uart_baud3";
55 clocks = <&clocks PCLK_UART1>, <&clocks PCLK_UART1>,
56 <&clocks SCLK_UART>;
57 samsung,uart-fifosize = <16>;
58 };
diff --git a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.txt b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.txt
index f13f1c5be91c..7f76214f728a 100644
--- a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.txt
+++ b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.txt
@@ -4,9 +4,18 @@ Required properties:
4- compatible : "snps,dw-apb-uart" 4- compatible : "snps,dw-apb-uart"
5- reg : offset and length of the register set for the device. 5- reg : offset and length of the register set for the device.
6- interrupts : should contain uart interrupt. 6- interrupts : should contain uart interrupt.
7
8Clock handling:
9The clock rate of the input clock needs to be supplied by one of
7- clock-frequency : the input clock frequency for the UART. 10- clock-frequency : the input clock frequency for the UART.
11- clocks : phandle to the input clock
12
13The supplying peripheral clock can also be handled, needing a second property
14- clock-names: tuple listing input clock names.
15 Required elements: "baudclk", "apb_pclk"
8 16
9Optional properties: 17Optional properties:
18- resets : phandle to the parent reset controller.
10- reg-shift : quantity to shift the register offsets by. If this property is 19- reg-shift : quantity to shift the register offsets by. If this property is
11 not present then the register offsets are not shifted. 20 not present then the register offsets are not shifted.
12- reg-io-width : the size (in bytes) of the IO accesses that should be 21- reg-io-width : the size (in bytes) of the IO accesses that should be
@@ -23,3 +32,26 @@ Example:
23 reg-shift = <2>; 32 reg-shift = <2>;
24 reg-io-width = <4>; 33 reg-io-width = <4>;
25 }; 34 };
35
36Example with one clock:
37
38 uart@80230000 {
39 compatible = "snps,dw-apb-uart";
40 reg = <0x80230000 0x100>;
41 clocks = <&baudclk>;
42 interrupts = <10>;
43 reg-shift = <2>;
44 reg-io-width = <4>;
45 };
46
47Example with two clocks:
48
49 uart@80230000 {
50 compatible = "snps,dw-apb-uart";
51 reg = <0x80230000 0x100>;
52 clocks = <&baudclk>, <&apb_pclk>;
53 clock-names = "baudclk", "apb_pclk";
54 interrupts = <10>;
55 reg-shift = <2>;
56 reg-io-width = <4>;
57 };
diff --git a/Documentation/devicetree/bindings/spi/efm32-spi.txt b/Documentation/devicetree/bindings/spi/efm32-spi.txt
index 130cd17e3680..750e29aff9bc 100644
--- a/Documentation/devicetree/bindings/spi/efm32-spi.txt
+++ b/Documentation/devicetree/bindings/spi/efm32-spi.txt
@@ -10,11 +10,12 @@ Required properties:
10- cs-gpios: see spi-bus.txt 10- cs-gpios: see spi-bus.txt
11 11
12Recommended properties : 12Recommended properties :
13- efm32,location: Value to write to the ROUTE register's LOCATION bitfield to 13- energymicro,location: Value to write to the ROUTE register's LOCATION
14 configure the pinmux for the device, see datasheet for values. 14 bitfield to configure the pinmux for the device, see
15 If "efm32,location" property is not provided, keeping what is 15 datasheet for values.
16 already configured in the hardware, so its either the reset 16 If this property is not provided, keeping what is
17 default 0 or whatever the bootloader did. 17 already configured in the hardware, so its either the
18 reset default 0 or whatever the bootloader did.
18 19
19Example: 20Example:
20 21
@@ -26,7 +27,7 @@ spi1: spi@0x4000c400 { /* USART1 */
26 interrupts = <15 16>; 27 interrupts = <15 16>;
27 clocks = <&cmu 20>; 28 clocks = <&cmu 20>;
28 cs-gpios = <&gpio 51 1>; // D3 29 cs-gpios = <&gpio 51 1>; // D3
29 efm32,location = <1>; 30 energymicro,location = <1>;
30 status = "ok"; 31 status = "ok";
31 32
32 ks8851@0 { 33 ks8851@0 {
diff --git a/Documentation/devicetree/bindings/spi/qcom,spi-qup.txt b/Documentation/devicetree/bindings/spi/qcom,spi-qup.txt
index bee6ff204baf..e2c88df2cc15 100644
--- a/Documentation/devicetree/bindings/spi/qcom,spi-qup.txt
+++ b/Documentation/devicetree/bindings/spi/qcom,spi-qup.txt
@@ -7,7 +7,11 @@ SPI in master mode supports up to 50MHz, up to four chip selects, programmable
7data path from 4 bits to 32 bits and numerous protocol variants. 7data path from 4 bits to 32 bits and numerous protocol variants.
8 8
9Required properties: 9Required properties:
10- compatible: Should contain "qcom,spi-qup-v2.1.1" or "qcom,spi-qup-v2.2.1" 10- compatible: Should contain:
11 "qcom,spi-qup-v1.1.1" for 8660, 8960 and 8064.
12 "qcom,spi-qup-v2.1.1" for 8974 and later
13 "qcom,spi-qup-v2.2.1" for 8974 v2 and later.
14
11- reg: Should contain base register location and length 15- reg: Should contain base register location and length
12- interrupts: Interrupt number used by this controller 16- interrupts: Interrupt number used by this controller
13 17
diff --git a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.txt b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.txt
new file mode 100644
index 000000000000..bd99193e87b9
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.txt
@@ -0,0 +1,28 @@
1Synopsys DesignWare AMBA 2.0 Synchronous Serial Interface.
2
3Required properties:
4- compatible : "snps,dw-apb-ssi"
5- reg : The register base for the controller.
6- interrupts : One interrupt, used by the controller.
7- #address-cells : <1>, as required by generic SPI binding.
8- #size-cells : <0>, also as required by generic SPI binding.
9
10Optional properties:
11- cs-gpios : Specifies the gpio pis to be used for chipselects.
12- num-cs : The number of chipselects. If omitted, this will default to 4.
13
14Child nodes as per the generic SPI binding.
15
16Example:
17
18 spi@fff00000 {
19 compatible = "snps,dw-apb-ssi";
20 reg = <0xfff00000 0x1000>;
21 interrupts = <0 154 4>;
22 #address-cells = <1>;
23 #size-cells = <0>;
24 num-cs = <2>;
25 cs-gpios = <&gpio0 13 0>,
26 <&gpio0 14 0>;
27 };
28
diff --git a/Documentation/devicetree/bindings/spi/spi-davinci.txt b/Documentation/devicetree/bindings/spi/spi-davinci.txt
index 6d0ac8d0ad9b..f80887bca0d6 100644
--- a/Documentation/devicetree/bindings/spi/spi-davinci.txt
+++ b/Documentation/devicetree/bindings/spi/spi-davinci.txt
@@ -8,7 +8,8 @@ Required properties:
8 - "ti,dm6441-spi" for SPI used similar to that on DM644x SoC family 8 - "ti,dm6441-spi" for SPI used similar to that on DM644x SoC family
9 - "ti,da830-spi" for SPI used similar to that on DA8xx SoC family 9 - "ti,da830-spi" for SPI used similar to that on DA8xx SoC family
10- reg: Offset and length of SPI controller register space 10- reg: Offset and length of SPI controller register space
11- num-cs: Number of chip selects 11- num-cs: Number of chip selects. This includes internal as well as
12 GPIO chip selects.
12- ti,davinci-spi-intr-line: interrupt line used to connect the SPI 13- ti,davinci-spi-intr-line: interrupt line used to connect the SPI
13 IP to the interrupt controller within the SoC. Possible values 14 IP to the interrupt controller within the SoC. Possible values
14 are 0 and 1. Manual says one of the two possible interrupt 15 are 0 and 1. Manual says one of the two possible interrupt
@@ -17,6 +18,12 @@ Required properties:
17- interrupts: interrupt number mapped to CPU. 18- interrupts: interrupt number mapped to CPU.
18- clocks: spi clk phandle 19- clocks: spi clk phandle
19 20
21Optional:
22- cs-gpios: gpio chip selects
23 For example to have 3 internal CS and 2 GPIO CS, user could define
24 cs-gpios = <0>, <0>, <0>, <&gpio1 30 0>, <&gpio1 31 0>;
25 where first three are internal CS and last two are GPIO CS.
26
20Example of a NOR flash slave device (n25q032) connected to DaVinci 27Example of a NOR flash slave device (n25q032) connected to DaVinci
21SPI controller device over the SPI bus. 28SPI controller device over the SPI bus.
22 29
diff --git a/Documentation/devicetree/bindings/spi/spi-rockchip.txt b/Documentation/devicetree/bindings/spi/spi-rockchip.txt
new file mode 100644
index 000000000000..7bab35575817
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/spi-rockchip.txt
@@ -0,0 +1,37 @@
1* Rockchip SPI Controller
2
3The Rockchip SPI controller is used to interface with various devices such as flash
4and display controllers using the SPI communication interface.
5
6Required Properties:
7
8- compatible: should be one of the following.
9 "rockchip,rk3066-spi" for rk3066.
10 "rockchip,rk3188-spi", "rockchip,rk3066-spi" for rk3188.
11 "rockchip,rk3288-spi", "rockchip,rk3066-spi" for rk3288.
12- reg: physical base address of the controller and length of memory mapped
13 region.
14- interrupts: The interrupt number to the cpu. The interrupt specifier format
15 depends on the interrupt controller.
16- clocks: Must contain an entry for each entry in clock-names.
17- clock-names: Shall be "spiclk" for the transfer-clock, and "apb_pclk" for
18 the peripheral clock.
19- dmas: DMA specifiers for tx and rx dma. See the DMA client binding,
20 Documentation/devicetree/bindings/dma/dma.txt
21- dma-names: DMA request names should include "tx" and "rx" if present.
22- #address-cells: should be 1.
23- #size-cells: should be 0.
24
25Example:
26
27 spi0: spi@ff110000 {
28 compatible = "rockchip,rk3066-spi";
29 reg = <0xff110000 0x1000>;
30 dmas = <&pdma1 11>, <&pdma1 12>;
31 dma-names = "tx", "rx";
32 #address-cells = <1>;
33 #size-cells = <0>;
34 interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
35 clocks = <&cru SCLK_SPI0>, <&cru PCLK_SPI0>;
36 clock-names = "spiclk", "apb_pclk";
37 };
diff --git a/Documentation/devicetree/bindings/spi/spi-samsung.txt b/Documentation/devicetree/bindings/spi/spi-samsung.txt
index 86aa061f069f..792efbaedc54 100644
--- a/Documentation/devicetree/bindings/spi/spi-samsung.txt
+++ b/Documentation/devicetree/bindings/spi/spi-samsung.txt
@@ -18,14 +18,11 @@ Required SoC Specific Properties:
18- interrupts: The interrupt number to the cpu. The interrupt specifier format 18- interrupts: The interrupt number to the cpu. The interrupt specifier format
19 depends on the interrupt controller. 19 depends on the interrupt controller.
20 20
21[PRELIMINARY: the dma channel allocation will change once there are 21- dmas : Two or more DMA channel specifiers following the convention outlined
22official DMA bindings] 22 in bindings/dma/dma.txt
23 23
24- tx-dma-channel: The dma channel specifier for tx operations. The format of 24- dma-names: Names for the dma channels. There must be at least one channel
25 the dma specifier depends on the dma controller. 25 named "tx" for transmit and named "rx" for receive.
26
27- rx-dma-channel: The dma channel specifier for rx operations. The format of
28 the dma specifier depends on the dma controller.
29 26
30Required Board Specific Properties: 27Required Board Specific Properties:
31 28
@@ -42,15 +39,13 @@ Optional Board Specific Properties:
42- num-cs: Specifies the number of chip select lines supported. If 39- num-cs: Specifies the number of chip select lines supported. If
43 not specified, the default number of chip select lines is set to 1. 40 not specified, the default number of chip select lines is set to 1.
44 41
42- cs-gpios: should specify GPIOs used for chipselects (see spi-bus.txt)
43
45SPI Controller specific data in SPI slave nodes: 44SPI Controller specific data in SPI slave nodes:
46 45
47- The spi slave nodes should provide the following information which is required 46- The spi slave nodes should provide the following information which is required
48 by the spi controller. 47 by the spi controller.
49 48
50 - cs-gpio: A gpio specifier that specifies the gpio line used as
51 the slave select line by the spi controller. The format of the gpio
52 specifier depends on the gpio controller.
53
54 - samsung,spi-feedback-delay: The sampling phase shift to be applied on the 49 - samsung,spi-feedback-delay: The sampling phase shift to be applied on the
55 miso line (to account for any lag in the miso line). The following are the 50 miso line (to account for any lag in the miso line). The following are the
56 valid values. 51 valid values.
@@ -74,8 +69,11 @@ Example:
74 compatible = "samsung,exynos4210-spi"; 69 compatible = "samsung,exynos4210-spi";
75 reg = <0x12d20000 0x100>; 70 reg = <0x12d20000 0x100>;
76 interrupts = <0 66 0>; 71 interrupts = <0 66 0>;
77 tx-dma-channel = <&pdma0 5>; 72 dmas = <&pdma0 5
78 rx-dma-channel = <&pdma0 4>; 73 &pdma0 4>;
74 dma-names = "tx", "rx";
75 #address-cells = <1>;
76 #size-cells = <0>;
79 }; 77 };
80 78
81- Board Specific Portion: 79- Board Specific Portion:
@@ -85,6 +83,7 @@ Example:
85 #size-cells = <0>; 83 #size-cells = <0>;
86 pinctrl-names = "default"; 84 pinctrl-names = "default";
87 pinctrl-0 = <&spi0_bus>; 85 pinctrl-0 = <&spi0_bus>;
86 cs-gpios = <&gpa2 5 0>;
88 87
89 w25q80bw@0 { 88 w25q80bw@0 {
90 #address-cells = <1>; 89 #address-cells = <1>;
@@ -94,7 +93,6 @@ Example:
94 spi-max-frequency = <10000>; 93 spi-max-frequency = <10000>;
95 94
96 controller-data { 95 controller-data {
97 cs-gpio = <&gpa2 5 1 0 3>;
98 samsung,spi-feedback-delay = <0>; 96 samsung,spi-feedback-delay = <0>;
99 }; 97 };
100 98
diff --git a/Documentation/devicetree/bindings/timer/cirrus,clps711x-timer.txt b/Documentation/devicetree/bindings/timer/cirrus,clps711x-timer.txt
new file mode 100644
index 000000000000..cd55b52548e4
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/cirrus,clps711x-timer.txt
@@ -0,0 +1,29 @@
1* Cirrus Logic CLPS711X Timer Counter
2
3Required properties:
4- compatible: Shall contain "cirrus,clps711x-timer".
5- reg : Address and length of the register set.
6- interrupts: The interrupt number of the timer.
7- clocks : phandle of timer reference clock.
8
9Note: Each timer should have an alias correctly numbered in "aliases" node.
10
11Example:
12 aliases {
13 timer0 = &timer1;
14 timer1 = &timer2;
15 };
16
17 timer1: timer@80000300 {
18 compatible = "cirrus,ep7312-timer", "cirrus,clps711x-timer";
19 reg = <0x80000300 0x4>;
20 interrupts = <8>;
21 clocks = <&clks 5>;
22 };
23
24 timer2: timer@80000340 {
25 compatible = "cirrus,ep7312-timer", "cirrus,clps711x-timer";
26 reg = <0x80000340 0x4>;
27 interrupts = <9>;
28 clocks = <&clks 6>;
29 };
diff --git a/Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt b/Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt
new file mode 100644
index 000000000000..7c4408ff4b83
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt
@@ -0,0 +1,17 @@
1Mediatek MT6577, MT6572 and MT6589 Timers
2---------------------------------------
3
4Required properties:
5- compatible: Should be "mediatek,mt6577-timer"
6- reg: Should contain location and length for timers register.
7- clocks: Clocks driving the timer hardware. This list should include two
8 clocks. The order is system clock and as second clock the RTC clock.
9
10Examples:
11
12 timer@10008000 {
13 compatible = "mediatek,mt6577-timer";
14 reg = <0x10008000 0x80>;
15 interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_LOW>;
16 clocks = <&system_clk>, <&rtc_clk>;
17 };
diff --git a/Documentation/devicetree/bindings/timer/renesas,cmt.txt b/Documentation/devicetree/bindings/timer/renesas,cmt.txt
new file mode 100644
index 000000000000..a17418b0ece3
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/renesas,cmt.txt
@@ -0,0 +1,47 @@
1* Renesas R-Car Compare Match Timer (CMT)
2
3The CMT is a multi-channel 16/32/48-bit timer/counter with configurable clock
4inputs and programmable compare match.
5
6Channels share hardware resources but their counter and compare match value
7are independent. A particular CMT instance can implement only a subset of the
8channels supported by the CMT model. Channel indices represent the hardware
9position of the channel in the CMT and don't match the channel numbers in the
10datasheets.
11
12Required Properties:
13
14 - compatible: must contain one of the following.
15 - "renesas,cmt-32" for the 32-bit CMT
16 (CMT0 on sh7372, sh73a0 and r8a7740)
17 - "renesas,cmt-32-fast" for the 32-bit CMT with fast clock support
18 (CMT[234] on sh7372, sh73a0 and r8a7740)
19 - "renesas,cmt-48" for the 48-bit CMT
20 (CMT1 on sh7372, sh73a0 and r8a7740)
21 - "renesas,cmt-48-gen2" for the second generation 48-bit CMT
22 (CMT[01] on r8a73a4, r8a7790 and r8a7791)
23
24 - reg: base address and length of the registers block for the timer module.
25 - interrupts: interrupt-specifier for the timer, one per channel.
26 - clocks: a list of phandle + clock-specifier pairs, one for each entry
27 in clock-names.
28 - clock-names: must contain "fck" for the functional clock.
29
30 - renesas,channels-mask: bitmask of the available channels.
31
32
33Example: R8A7790 (R-Car H2) CMT0 node
34
35 CMT0 on R8A7790 implements hardware channels 5 and 6 only and names
36 them channels 0 and 1 in the documentation.
37
38 cmt0: timer@ffca0000 {
39 compatible = "renesas,cmt-48-gen2";
40 reg = <0 0xffca0000 0 0x1004>;
41 interrupts = <0 142 IRQ_TYPE_LEVEL_HIGH>,
42 <0 142 IRQ_TYPE_LEVEL_HIGH>;
43 clocks = <&mstp1_clks R8A7790_CLK_CMT0>;
44 clock-names = "fck";
45
46 renesas,channels-mask = <0x60>;
47 };
diff --git a/Documentation/devicetree/bindings/timer/renesas,mtu2.txt b/Documentation/devicetree/bindings/timer/renesas,mtu2.txt
new file mode 100644
index 000000000000..917453f826bc
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/renesas,mtu2.txt
@@ -0,0 +1,39 @@
1* Renesas R-Car Multi-Function Timer Pulse Unit 2 (MTU2)
2
3The MTU2 is a multi-purpose, multi-channel timer/counter with configurable
4clock inputs and programmable compare match.
5
6Channels share hardware resources but their counter and compare match value
7are independent. The MTU2 hardware supports five channels indexed from 0 to 4.
8
9Required Properties:
10
11 - compatible: must contain "renesas,mtu2"
12
13 - reg: base address and length of the registers block for the timer module.
14
15 - interrupts: interrupt specifiers for the timer, one for each entry in
16 interrupt-names.
17 - interrupt-names: must contain one entry named "tgi?a" for each enabled
18 channel, where "?" is the channel index expressed as one digit from "0" to
19 "4".
20
21 - clocks: a list of phandle + clock-specifier pairs, one for each entry
22 in clock-names.
23 - clock-names: must contain "fck" for the functional clock.
24
25
26Example: R7S72100 (RZ/A1H) MTU2 node
27
28 mtu2: timer@fcff0000 {
29 compatible = "renesas,mtu2";
30 reg = <0xfcff0000 0x400>;
31 interrupts = <0 139 IRQ_TYPE_LEVEL_HIGH>,
32 <0 146 IRQ_TYPE_LEVEL_HIGH>,
33 <0 150 IRQ_TYPE_LEVEL_HIGH>,
34 <0 154 IRQ_TYPE_LEVEL_HIGH>,
35 <0 159 IRQ_TYPE_LEVEL_HIGH>;
36 interrupt-names = "tgi0a", "tgi1a", "tgi2a", "tgi3a", "tgi4a";
37 clocks = <&mstp3_clks R7S72100_CLK_MTU2>;
38 clock-names = "fck";
39 };
diff --git a/Documentation/devicetree/bindings/timer/renesas,tmu.txt b/Documentation/devicetree/bindings/timer/renesas,tmu.txt
new file mode 100644
index 000000000000..425d0c5f4aee
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/renesas,tmu.txt
@@ -0,0 +1,39 @@
1* Renesas R-Car Timer Unit (TMU)
2
3The TMU is a 32-bit timer/counter with configurable clock inputs and
4programmable compare match.
5
6Channels share hardware resources but their counter and compare match value
7are independent. The TMU hardware supports up to three channels.
8
9Required Properties:
10
11 - compatible: must contain "renesas,tmu"
12
13 - reg: base address and length of the registers block for the timer module.
14
15 - interrupts: interrupt-specifier for the timer, one per channel.
16
17 - clocks: a list of phandle + clock-specifier pairs, one for each entry
18 in clock-names.
19 - clock-names: must contain "fck" for the functional clock.
20
21Optional Properties:
22
23 - #renesas,channels: number of channels implemented by the timer, must be 2
24 or 3 (if not specified the value defaults to 3).
25
26
27Example: R8A7779 (R-Car H1) TMU0 node
28
29 tmu0: timer@ffd80000 {
30 compatible = "renesas,tmu";
31 reg = <0xffd80000 0x30>;
32 interrupts = <0 32 IRQ_TYPE_LEVEL_HIGH>,
33 <0 33 IRQ_TYPE_LEVEL_HIGH>,
34 <0 34 IRQ_TYPE_LEVEL_HIGH>;
35 clocks = <&mstp0_clks R8A7779_CLK_TMU0>;
36 clock-names = "fck";
37
38 #renesas,channels = <3>;
39 };
diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-imx.txt b/Documentation/devicetree/bindings/usb/ci-hdrc-imx.txt
index a6a32cb7f777..1bae71e9ad47 100644
--- a/Documentation/devicetree/bindings/usb/ci-hdrc-imx.txt
+++ b/Documentation/devicetree/bindings/usb/ci-hdrc-imx.txt
@@ -4,6 +4,7 @@ Required properties:
4- compatible: Should be "fsl,imx27-usb" 4- compatible: Should be "fsl,imx27-usb"
5- reg: Should contain registers location and length 5- reg: Should contain registers location and length
6- interrupts: Should contain controller interrupt 6- interrupts: Should contain controller interrupt
7- fsl,usbphy: phandle of usb phy that connects to the port
7 8
8Recommended properies: 9Recommended properies:
9- phy_type: the type of the phy connected to the core. Should be one 10- phy_type: the type of the phy connected to the core. Should be one
@@ -12,7 +13,6 @@ Recommended properies:
12- dr_mode: One of "host", "peripheral" or "otg". Defaults to "otg" 13- dr_mode: One of "host", "peripheral" or "otg". Defaults to "otg"
13 14
14Optional properties: 15Optional properties:
15- fsl,usbphy: phandler of usb phy that connects to the only one port
16- fsl,usbmisc: phandler of non-core register device, with one argument 16- fsl,usbmisc: phandler of non-core register device, with one argument
17 that indicate usb controller index 17 that indicate usb controller index
18- vbus-supply: regulator for vbus 18- vbus-supply: regulator for vbus
diff --git a/Documentation/devicetree/bindings/usb/nvidia,tegra20-usb-phy.txt b/Documentation/devicetree/bindings/usb/nvidia,tegra20-usb-phy.txt
index ba797d3e6326..c9205fbf26e2 100644
--- a/Documentation/devicetree/bindings/usb/nvidia,tegra20-usb-phy.txt
+++ b/Documentation/devicetree/bindings/usb/nvidia,tegra20-usb-phy.txt
@@ -20,6 +20,12 @@ Required properties :
20 Present if phy_type == utmi. 20 Present if phy_type == utmi.
21 - ulpi-link: The clock Tegra provides to the ULPI PHY (cdev2). 21 - ulpi-link: The clock Tegra provides to the ULPI PHY (cdev2).
22 Present if phy_type == ulpi, and ULPI link mode is in use. 22 Present if phy_type == ulpi, and ULPI link mode is in use.
23 - resets : Must contain an entry for each entry in reset-names.
24 See ../reset/reset.txt for details.
25 - reset-names : Must include the following entries:
26 - usb: The PHY's own reset signal.
27 - utmi-pads: The reset of the PHY containing the chip-wide UTMI pad control
28 registers. Required even if phy_type == ulpi.
23 29
24Required properties for phy_type == ulpi: 30Required properties for phy_type == ulpi:
25 - nvidia,phy-reset-gpio : The GPIO used to reset the PHY. 31 - nvidia,phy-reset-gpio : The GPIO used to reset the PHY.
@@ -56,6 +62,8 @@ Optional properties:
56 host means this is a host controller 62 host means this is a host controller
57 peripheral means it is device controller 63 peripheral means it is device controller
58 otg means it can operate as either ("on the go") 64 otg means it can operate as either ("on the go")
65 - nvidia,has-utmi-pad-registers : boolean indicates whether this controller
66 contains the UTMI pad control registers common to all USB controllers.
59 67
60VBUS control (required for dr_mode == otg, optional for dr_mode == host): 68VBUS control (required for dr_mode == otg, optional for dr_mode == host):
61 - vbus-supply: regulator for VBUS 69 - vbus-supply: regulator for VBUS
diff --git a/Documentation/devicetree/bindings/usb/usb-xhci.txt b/Documentation/devicetree/bindings/usb/usb-xhci.txt
index 5a79377c6a96..86f67f0886bc 100644
--- a/Documentation/devicetree/bindings/usb/usb-xhci.txt
+++ b/Documentation/devicetree/bindings/usb/usb-xhci.txt
@@ -9,8 +9,9 @@ Required properties:
9 register set for the device. 9 register set for the device.
10 - interrupts: one XHCI interrupt should be described here. 10 - interrupts: one XHCI interrupt should be described here.
11 11
12Optional property: 12Optional properties:
13 - clocks: reference to a clock 13 - clocks: reference to a clock
14 - usb3-lpm-capable: determines if platform is USB3 LPM capable
14 15
15Example: 16Example:
16 usb@f0931000 { 17 usb@f0931000 {
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 46a311e728a8..d415b38ec8ca 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -42,6 +42,7 @@ dmo Data Modul AG
42ebv EBV Elektronik 42ebv EBV Elektronik
43edt Emerging Display Technologies 43edt Emerging Display Technologies
44emmicro EM Microelectronic 44emmicro EM Microelectronic
45epcos EPCOS AG
45epfl Ecole Polytechnique Fédérale de Lausanne 46epfl Ecole Polytechnique Fédérale de Lausanne
46epson Seiko Epson Corp. 47epson Seiko Epson Corp.
47est ESTeem Wireless Modems 48est ESTeem Wireless Modems
@@ -77,6 +78,7 @@ lsi LSI Corp. (LSI Logic)
77lltc Linear Technology Corporation 78lltc Linear Technology Corporation
78marvell Marvell Technology Group Ltd. 79marvell Marvell Technology Group Ltd.
79maxim Maxim Integrated Products 80maxim Maxim Integrated Products
81mediatek MediaTek Inc.
80micrel Micrel Inc. 82micrel Micrel Inc.
81microchip Microchip Technology Inc. 83microchip Microchip Technology Inc.
82mosaixtech Mosaix Technologies, Inc. 84mosaixtech Mosaix Technologies, Inc.
diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver-model/devres.txt
index 1525e30483fd..d14710b04439 100644
--- a/Documentation/driver-model/devres.txt
+++ b/Documentation/driver-model/devres.txt
@@ -233,66 +233,78 @@ certainly invest a bit more effort into libata core layer).
233 6. List of managed interfaces 233 6. List of managed interfaces
234 ----------------------------- 234 -----------------------------
235 235
236MEM 236CLOCK
237 devm_kzalloc() 237 devm_clk_get()
238 devm_kfree() 238 devm_clk_put()
239 devm_kmemdup() 239
240 devm_get_free_pages() 240DMA
241 devm_free_pages() 241 dmam_alloc_coherent()
242 dmam_alloc_noncoherent()
243 dmam_declare_coherent_memory()
244 dmam_free_coherent()
245 dmam_free_noncoherent()
246 dmam_pool_create()
247 dmam_pool_destroy()
248
249GPIO
250 devm_gpiod_get()
251 devm_gpiod_get_index()
252 devm_gpiod_get_index_optional()
253 devm_gpiod_get_optional()
254 devm_gpiod_put()
242 255
243IIO 256IIO
244 devm_iio_device_alloc() 257 devm_iio_device_alloc()
245 devm_iio_device_free() 258 devm_iio_device_free()
246 devm_iio_trigger_alloc()
247 devm_iio_trigger_free()
248 devm_iio_device_register() 259 devm_iio_device_register()
249 devm_iio_device_unregister() 260 devm_iio_device_unregister()
261 devm_iio_trigger_alloc()
262 devm_iio_trigger_free()
250 263
251IO region 264IO region
252 devm_request_region()
253 devm_request_mem_region()
254 devm_release_region()
255 devm_release_mem_region() 265 devm_release_mem_region()
256 266 devm_release_region()
257IRQ 267 devm_request_mem_region()
258 devm_request_irq() 268 devm_request_region()
259 devm_free_irq()
260
261DMA
262 dmam_alloc_coherent()
263 dmam_free_coherent()
264 dmam_alloc_noncoherent()
265 dmam_free_noncoherent()
266 dmam_declare_coherent_memory()
267 dmam_pool_create()
268 dmam_pool_destroy()
269
270PCI
271 pcim_enable_device() : after success, all PCI ops become managed
272 pcim_pin_device() : keep PCI device enabled after release
273 269
274IOMAP 270IOMAP
275 devm_ioport_map() 271 devm_ioport_map()
276 devm_ioport_unmap() 272 devm_ioport_unmap()
277 devm_ioremap() 273 devm_ioremap()
278 devm_ioremap_nocache() 274 devm_ioremap_nocache()
279 devm_iounmap()
280 devm_ioremap_resource() : checks resource, requests memory region, ioremaps 275 devm_ioremap_resource() : checks resource, requests memory region, ioremaps
281 devm_request_and_ioremap() : obsoleted by devm_ioremap_resource() 276 devm_iounmap()
282 pcim_iomap() 277 pcim_iomap()
283 pcim_iounmap()
284 pcim_iomap_table() : array of mapped addresses indexed by BAR
285 pcim_iomap_regions() : do request_region() and iomap() on multiple BARs 278 pcim_iomap_regions() : do request_region() and iomap() on multiple BARs
279 pcim_iomap_table() : array of mapped addresses indexed by BAR
280 pcim_iounmap()
286 281
287REGULATOR 282IRQ
288 devm_regulator_get() 283 devm_free_irq()
289 devm_regulator_put() 284 devm_request_irq()
290 devm_regulator_bulk_get()
291 devm_regulator_register()
292 285
293CLOCK 286MDIO
294 devm_clk_get() 287 devm_mdiobus_alloc()
295 devm_clk_put() 288 devm_mdiobus_alloc_size()
289 devm_mdiobus_free()
290
291MEM
292 devm_free_pages()
293 devm_get_free_pages()
294 devm_kcalloc()
295 devm_kfree()
296 devm_kmalloc()
297 devm_kmalloc_array()
298 devm_kmemdup()
299 devm_kzalloc()
300
301PCI
302 pcim_enable_device() : after success, all PCI ops become managed
303 pcim_pin_device() : keep PCI device enabled after release
304
305PHY
306 devm_usb_get_phy()
307 devm_usb_put_phy()
296 308
297PINCTRL 309PINCTRL
298 devm_pinctrl_get() 310 devm_pinctrl_get()
@@ -302,24 +314,14 @@ PWM
302 devm_pwm_get() 314 devm_pwm_get()
303 devm_pwm_put() 315 devm_pwm_put()
304 316
305PHY 317REGULATOR
306 devm_usb_get_phy() 318 devm_regulator_bulk_get()
307 devm_usb_put_phy() 319 devm_regulator_get()
320 devm_regulator_put()
321 devm_regulator_register()
308 322
309SLAVE DMA ENGINE 323SLAVE DMA ENGINE
310 devm_acpi_dma_controller_register() 324 devm_acpi_dma_controller_register()
311 325
312SPI 326SPI
313 devm_spi_register_master() 327 devm_spi_register_master()
314
315GPIO
316 devm_gpiod_get()
317 devm_gpiod_get_index()
318 devm_gpiod_get_optional()
319 devm_gpiod_get_index_optional()
320 devm_gpiod_put()
321
322MDIO
323 devm_mdiobus_alloc()
324 devm_mdiobus_alloc_size()
325 devm_mdiobus_free()
diff --git a/Documentation/dvb/get_dvb_firmware b/Documentation/dvb/get_dvb_firmware
index d91b8be80b66..26c623dd3aa3 100755
--- a/Documentation/dvb/get_dvb_firmware
+++ b/Documentation/dvb/get_dvb_firmware
@@ -29,7 +29,7 @@ use IO::Handle;
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", "drxk_pctv", 31 "drxk_hauppauge_hvr930c", "tda10071", "it9135", "drxk_pctv",
32 "drxk_terratec_htc_stick", "sms1xxx_hcw"); 32 "drxk_terratec_htc_stick", "sms1xxx_hcw", "si2165");
33 33
34# Check args 34# Check args
35syntax() if (scalar(@ARGV) != 1); 35syntax() if (scalar(@ARGV) != 1);
@@ -783,6 +783,37 @@ sub sms1xxx_hcw {
783 $allfiles; 783 $allfiles;
784} 784}
785 785
786sub si2165 {
787 my $sourcefile = "model_111xxx_122xxx_driver_6_0_119_31191_WHQL.zip";
788 my $url = "http://www.hauppauge.de/files/drivers/";
789 my $hash = "76633e7c76b0edee47c3ba18ded99336";
790 my $fwfile = "dvb-demod-si2165.fw";
791 my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
792
793 checkstandard();
794
795 wgetfile($sourcefile, $url . $sourcefile);
796 verify($sourcefile, $hash);
797 unzip($sourcefile, $tmpdir);
798 extract("$tmpdir/Driver10/Hcw10bda.sys", 0x80788, 0x81E08-0x80788, "$tmpdir/fw1");
799
800 delzero("$tmpdir/fw1","$tmpdir/fw1-1");
801 #verify("$tmpdir/fw1","5e0909858fdf0b5b09ad48b9fe622e70");
802
803 my $CRC="\x0A\xCC";
804 my $BLOCKS_MAIN="\x27";
805 open FW,">$fwfile";
806 print FW "\x01\x00"; # just a version id for the driver itself
807 print FW "\x9A"; # fw version
808 print FW "\x00"; # padding
809 print FW "$BLOCKS_MAIN"; # number of blocks of main part
810 print FW "\x00"; # padding
811 print FW "$CRC"; # 16bit crc value of main part
812 appendfile(FW,"$tmpdir/fw1");
813
814 "$fwfile";
815}
816
786# --------------------------------------------------------------- 817# ---------------------------------------------------------------
787# Utilities 818# Utilities
788 819
diff --git a/Documentation/filesystems/caching/operations.txt b/Documentation/filesystems/caching/operations.txt
index bee2a5f93d60..a1c052cbba35 100644
--- a/Documentation/filesystems/caching/operations.txt
+++ b/Documentation/filesystems/caching/operations.txt
@@ -90,7 +90,7 @@ operations:
90 to be cleared before proceeding: 90 to be cleared before proceeding:
91 91
92 wait_on_bit(&op->flags, FSCACHE_OP_WAITING, 92 wait_on_bit(&op->flags, FSCACHE_OP_WAITING,
93 fscache_wait_bit, TASK_UNINTERRUPTIBLE); 93 TASK_UNINTERRUPTIBLE);
94 94
95 95
96 (2) The operation may be fast asynchronous (FSCACHE_OP_FAST), in which case it 96 (2) The operation may be fast asynchronous (FSCACHE_OP_FAST), in which case it
diff --git a/Documentation/filesystems/f2fs.txt b/Documentation/filesystems/f2fs.txt
index 51afba17bbae..a2046a7d0a9d 100644
--- a/Documentation/filesystems/f2fs.txt
+++ b/Documentation/filesystems/f2fs.txt
@@ -126,6 +126,11 @@ flush_merge Merge concurrent cache_flush commands as much as possible
126 to eliminate redundant command issues. If the underlying 126 to eliminate redundant command issues. If the underlying
127 device handles the cache_flush command relatively slowly, 127 device handles the cache_flush command relatively slowly,
128 recommend to enable this option. 128 recommend to enable this option.
129nobarrier This option can be used if underlying storage guarantees
130 its cached data should be written to the novolatile area.
131 If this option is set, no cache_flush commands are issued
132 but f2fs still guarantees the write ordering of all the
133 data writes.
129 134
130================================================================================ 135================================================================================
131DEBUGFS ENTRIES 136DEBUGFS ENTRIES
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index ddc531a74d04..eb8a10e22f7c 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -1743,6 +1743,25 @@ pair provide additional information particular to the objects they represent.
1743 While the first three lines are mandatory and always printed, the rest is 1743 While the first three lines are mandatory and always printed, the rest is
1744 optional and may be omitted if no marks created yet. 1744 optional and may be omitted if no marks created yet.
1745 1745
1746 Timerfd files
1747 ~~~~~~~~~~~~~
1748
1749 pos: 0
1750 flags: 02
1751 mnt_id: 9
1752 clockid: 0
1753 ticks: 0
1754 settime flags: 01
1755 it_value: (0, 49406829)
1756 it_interval: (1, 0)
1757
1758 where 'clockid' is the clock type and 'ticks' is the number of the timer expirations
1759 that have occurred [see timerfd_create(2) for details]. 'settime flags' are
1760 flags in octal form been used to setup the timer [see timerfd_settime(2) for
1761 details]. 'it_value' is remaining time until the timer exiration.
1762 'it_interval' is the interval for the timer. Note the timer might be set up
1763 with TIMER_ABSTIME option which will be shown in 'settime flags', but 'it_value'
1764 still exhibits timer's remaining time.
1746 1765
1747------------------------------------------------------------------------------ 1766------------------------------------------------------------------------------
1748Configuring procfs 1767Configuring procfs
diff --git a/Documentation/firmware_class/README b/Documentation/firmware_class/README
index 43fada989e65..71f86859d7d8 100644
--- a/Documentation/firmware_class/README
+++ b/Documentation/firmware_class/README
@@ -64,7 +64,7 @@
64 64
65 if(request_firmware(&fw_entry, $FIRMWARE, device) == 0) 65 if(request_firmware(&fw_entry, $FIRMWARE, device) == 0)
66 copy_fw_to_device(fw_entry->data, fw_entry->size); 66 copy_fw_to_device(fw_entry->data, fw_entry->size);
67 release(fw_entry); 67 release_firmware(fw_entry);
68 68
69 Sample/simple hotplug script: 69 Sample/simple hotplug script:
70 ============================ 70 ============================
@@ -74,7 +74,7 @@
74 HOTPLUG_FW_DIR=/usr/lib/hotplug/firmware/ 74 HOTPLUG_FW_DIR=/usr/lib/hotplug/firmware/
75 75
76 echo 1 > /sys/$DEVPATH/loading 76 echo 1 > /sys/$DEVPATH/loading
77 cat $HOTPLUG_FW_DIR/$FIRMWARE > /sysfs/$DEVPATH/data 77 cat $HOTPLUG_FW_DIR/$FIRMWARE > /sys/$DEVPATH/data
78 echo 0 > /sys/$DEVPATH/loading 78 echo 0 > /sys/$DEVPATH/loading
79 79
80 Random notes: 80 Random notes:
@@ -123,6 +123,6 @@
123 -------------------- 123 --------------------
124 After firmware cache mechanism is introduced during system sleep, 124 After firmware cache mechanism is introduced during system sleep,
125 request_firmware can be called safely inside device's suspend and 125 request_firmware can be called safely inside device's suspend and
126 resume callback, and callers need't cache the firmware by 126 resume callback, and callers needn't cache the firmware by
127 themselves any more for dealing with firmware loss during system 127 themselves any more for dealing with firmware loss during system
128 resume. 128 resume.
diff --git a/Documentation/hwmon/ibmpowernv b/Documentation/hwmon/ibmpowernv
new file mode 100644
index 000000000000..8826ba29db36
--- /dev/null
+++ b/Documentation/hwmon/ibmpowernv
@@ -0,0 +1,41 @@
1Kernel Driver IBMPOWERNV
2========================
3
4Supported systems:
5 * Any recent IBM P servers based on POWERNV platform
6
7Author: Neelesh Gupta
8
9Description
10-----------
11
12This driver implements reading the platform sensors data like temperature/fan/
13voltage/power for 'POWERNV' platform.
14
15The driver uses the platform device infrastructure. It probes the device tree
16for sensor devices during the __init phase and registers them with the 'hwmon'.
17'hwmon' populates the 'sysfs' tree having attribute files, each for a given
18sensor type and its attribute data.
19
20All the nodes in the DT appear under "/ibm,opal/sensors" and each valid node in
21the DT maps to an attribute file in 'sysfs'. The node exports unique 'sensor-id'
22which the driver uses to make an OPAL call to the firmware.
23
24Usage notes
25-----------
26The driver is built statically with the kernel by enabling the config
27CONFIG_SENSORS_IBMPOWERNV. It can also be built as module 'ibmpowernv'.
28
29Sysfs attributes
30----------------
31
32fanX_input Measured RPM value.
33fanX_min Threshold RPM for alert generation.
34fanX_fault 0: No fail condition
35 1: Failing fan
36tempX_input Measured ambient temperature.
37tempX_max Threshold ambient temperature for alert generation.
38inX_input Measured power supply voltage
39inX_fault 0: No fail condition.
40 1: Failing power supply.
41power1_input System power consumption (microWatt)
diff --git a/Documentation/hwmon/lm75 b/Documentation/hwmon/lm75
index 2560a9c6d445..c6a5ff1b4641 100644
--- a/Documentation/hwmon/lm75
+++ b/Documentation/hwmon/lm75
@@ -42,13 +42,14 @@ Supported chips:
42 Addresses scanned: none 42 Addresses scanned: none
43 Datasheet: Publicly available at the ST website 43 Datasheet: Publicly available at the ST website
44 http://www.st.com/internet/analog/product/121769.jsp 44 http://www.st.com/internet/analog/product/121769.jsp
45 * Texas Instruments TMP100, TMP101, TMP105, TMP75, TMP175, TMP275 45 * Texas Instruments TMP100, TMP101, TMP105, TMP112, TMP75, TMP175, TMP275
46 Prefixes: 'tmp100', 'tmp101', 'tmp105', 'tmp175', 'tmp75', 'tmp275' 46 Prefixes: 'tmp100', 'tmp101', 'tmp105', 'tmp112', 'tmp175', 'tmp75', 'tmp275'
47 Addresses scanned: none 47 Addresses scanned: none
48 Datasheet: Publicly available at the Texas Instruments website 48 Datasheet: Publicly available at the Texas Instruments website
49 http://www.ti.com/product/tmp100 49 http://www.ti.com/product/tmp100
50 http://www.ti.com/product/tmp101 50 http://www.ti.com/product/tmp101
51 http://www.ti.com/product/tmp105 51 http://www.ti.com/product/tmp105
52 http://www.ti.com/product/tmp112
52 http://www.ti.com/product/tmp75 53 http://www.ti.com/product/tmp75
53 http://www.ti.com/product/tmp175 54 http://www.ti.com/product/tmp175
54 http://www.ti.com/product/tmp275 55 http://www.ti.com/product/tmp275
diff --git a/Documentation/hwmon/ntc_thermistor b/Documentation/hwmon/ntc_thermistor
index 057b77029f26..c5e05e2900a3 100644
--- a/Documentation/hwmon/ntc_thermistor
+++ b/Documentation/hwmon/ntc_thermistor
@@ -6,6 +6,11 @@ Supported thermistors from Murata:
6 Prefixes: 'ncp15wb473', 'ncp18wb473', 'ncp21wb473', 'ncp03wb473', 'ncp15wl333' 6 Prefixes: 'ncp15wb473', 'ncp18wb473', 'ncp21wb473', 'ncp03wb473', 'ncp15wl333'
7 Datasheet: Publicly available at Murata 7 Datasheet: Publicly available at Murata
8 8
9Supported thermistors from EPCOS:
10* EPCOS NTC Thermistors B57330V2103
11 Prefixes: b57330v2103
12 Datasheet: Publicly available at EPCOS
13
9Other NTC thermistors can be supported simply by adding compensation 14Other NTC thermistors can be supported simply by adding compensation
10tables; e.g., NCP15WL333 support is added by the table ncpXXwl333. 15tables; e.g., NCP15WL333 support is added by the table ncpXXwl333.
11 16
diff --git a/Documentation/hwmon/pmbus b/Documentation/hwmon/pmbus
index cf756ed48ff9..a3557da8f5b4 100644
--- a/Documentation/hwmon/pmbus
+++ b/Documentation/hwmon/pmbus
@@ -23,12 +23,11 @@ Supported chips:
23 http://www.lineagepower.com/oem/pdf/PDT012A0X.pdf 23 http://www.lineagepower.com/oem/pdf/PDT012A0X.pdf
24 http://www.lineagepower.com/oem/pdf/UDT020A0X.pdf 24 http://www.lineagepower.com/oem/pdf/UDT020A0X.pdf
25 http://www.lineagepower.com/oem/pdf/MDT040A0X.pdf 25 http://www.lineagepower.com/oem/pdf/MDT040A0X.pdf
26 * Texas Instruments TPS40400, TPS40422 26 * Texas Instruments TPS40400
27 Prefixes: 'tps40400', 'tps40422' 27 Prefixes: 'tps40400'
28 Addresses scanned: - 28 Addresses scanned: -
29 Datasheets: 29 Datasheets:
30 http://www.ti.com/lit/gpn/tps40400 30 http://www.ti.com/lit/gpn/tps40400
31 http://www.ti.com/lit/gpn/tps40422
32 * Generic PMBus devices 31 * Generic PMBus devices
33 Prefix: 'pmbus' 32 Prefix: 'pmbus'
34 Addresses scanned: - 33 Addresses scanned: -
diff --git a/Documentation/hwmon/powr1220 b/Documentation/hwmon/powr1220
new file mode 100644
index 000000000000..21e44f71ae6e
--- /dev/null
+++ b/Documentation/hwmon/powr1220
@@ -0,0 +1,45 @@
1Kernel driver powr1220
2==================
3
4Supported chips:
5 * Lattice POWR1220AT8
6 Prefix: 'powr1220'
7 Addresses scanned: none
8 Datasheet: Publicly available at the Lattice website
9 http://www.latticesemi.com/
10
11Author: Scott Kanowitz <scott.kanowitz@gmail.com>
12
13Description
14-----------
15
16This driver supports the Lattice POWR1220AT8 chip. The POWR1220
17includes voltage monitoring for 14 inputs as well as trim settings
18for output voltages and GPIOs. This driver implements the voltage
19monitoring portion of the chip.
20
21Voltages are sampled by a 12-bit ADC with a step size of 2 mV.
22An in-line attenuator allows measurements from 0 to 6 V. The
23attenuator is enabled or disabled depending on the setting of the
24input's max value. The driver will enable the attenuator for any
25value over the low measurement range maximum of 2 V.
26
27The input naming convention is as follows:
28
29driver name pin name
30in0 VMON1
31in1 VMON2
32in2 VMON3
33in2 VMON4
34in4 VMON5
35in5 VMON6
36in6 VMON7
37in7 VMON8
38in8 VMON9
39in9 VMON10
40in10 VMON11
41in11 VMON12
42in12 VCCA
43in13 VCCINP
44
45The ADC readings are updated on request with a minimum period of 1s.
diff --git a/Documentation/hwmon/pwm-fan b/Documentation/hwmon/pwm-fan
new file mode 100644
index 000000000000..18529d2e3bcf
--- /dev/null
+++ b/Documentation/hwmon/pwm-fan
@@ -0,0 +1,17 @@
1Kernel driver pwm-fan
2=====================
3
4This driver enables the use of a PWM module to drive a fan. It uses the
5generic PWM interface thus it is hardware independent. It can be used on
6many SoCs, as long as the SoC supplies a PWM line driver that exposes
7the generic PWM API.
8
9Author: Kamil Debski <k.debski@samsung.com>
10
11Description
12-----------
13
14The driver implements a simple interface for driving a fan connected to
15a PWM output. It uses the generic PWM interface, thus it can be used with
16a range of SoCs. The driver exposes the fan to the user space through
17the hwmon's sysfs interface.
diff --git a/Documentation/hwmon/tmp103 b/Documentation/hwmon/tmp103
new file mode 100644
index 000000000000..ec00a15645ba
--- /dev/null
+++ b/Documentation/hwmon/tmp103
@@ -0,0 +1,28 @@
1Kernel driver tmp103
2====================
3
4Supported chips:
5 * Texas Instruments TMP103
6 Prefix: 'tmp103'
7 Addresses scanned: none
8 Product info and datasheet: http://www.ti.com/product/tmp103
9
10Author:
11 Heiko Schocher <hs@denx.de>
12
13Description
14-----------
15
16The TMP103 is a digital output temperature sensor in a four-ball
17wafer chip-scale package (WCSP). The TMP103 is capable of reading
18temperatures to a resolution of 1°C. The TMP103 is specified for
19operation over a temperature range of –40°C to +125°C.
20
21Resolution: 8 Bits
22Accuracy: ±1°C Typ (–10°C to +100°C)
23
24The driver provides the common sysfs-interface for temperatures (see
25Documentation/hwmon/sysfs-interface under Temperatures).
26
27Please refer how to instantiate this driver:
28Documentation/i2c/instantiating-devices
diff --git a/Documentation/hwmon/tmp421 b/Documentation/hwmon/tmp421
index 0cf07f824741..9e6fe5549ca1 100644
--- a/Documentation/hwmon/tmp421
+++ b/Documentation/hwmon/tmp421
@@ -8,12 +8,20 @@ Supported chips:
8 Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp421.html 8 Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp421.html
9 * Texas Instruments TMP422 9 * Texas Instruments TMP422
10 Prefix: 'tmp422' 10 Prefix: 'tmp422'
11 Addresses scanned: I2C 0x2a, 0x4c, 0x4d, 0x4e and 0x4f 11 Addresses scanned: I2C 0x4c, 0x4d, 0x4e and 0x4f
12 Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp421.html 12 Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp421.html
13 * Texas Instruments TMP423 13 * Texas Instruments TMP423
14 Prefix: 'tmp423' 14 Prefix: 'tmp423'
15 Addresses scanned: I2C 0x2a, 0x4c, 0x4d, 0x4e and 0x4f 15 Addresses scanned: I2C 0x4c and 0x4d
16 Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp421.html 16 Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp421.html
17 * Texas Instruments TMP441
18 Prefix: 'tmp441'
19 Addresses scanned: I2C 0x2a, 0x4c, 0x4d, 0x4e and 0x4f
20 Datasheet: http://www.ti.com/product/tmp441
21 * Texas Instruments TMP442
22 Prefix: 'tmp442'
23 Addresses scanned: I2C 0x4c and 0x4d
24 Datasheet: http://www.ti.com/product/tmp442
17 25
18Authors: 26Authors:
19 Andre Prendel <andre.prendel@gmx.de> 27 Andre Prendel <andre.prendel@gmx.de>
@@ -21,13 +29,13 @@ Authors:
21Description 29Description
22----------- 30-----------
23 31
24This driver implements support for Texas Instruments TMP421, TMP422 32This driver implements support for Texas Instruments TMP421, TMP422,
25and TMP423 temperature sensor chips. These chips implement one local 33TMP423, TMP441, and TMP442 temperature sensor chips. These chips
26and up to one (TMP421), up to two (TMP422) or up to three (TMP423) 34implement one local and up to one (TMP421, TMP441), up to two (TMP422,
27remote sensors. Temperature is measured in degrees Celsius. The chips 35TMP442) or up to three (TMP423) remote sensors. Temperature is measured
28are wired over I2C/SMBus and specified over a temperature range of -40 36in degrees Celsius. The chips are wired over I2C/SMBus and specified
29to +125 degrees Celsius. Resolution for both the local and remote 37over a temperature range of -40 to +125 degrees Celsius. Resolution
30channels is 0.0625 degree C. 38for both the local and remote channels is 0.0625 degree C.
31 39
32The chips support only temperature measurement. The driver exports 40The chips support only temperature measurement. The driver exports
33the temperature values via the following sysfs files: 41the temperature values via the following sysfs files:
diff --git a/Documentation/hwmon/tps40422 b/Documentation/hwmon/tps40422
new file mode 100644
index 000000000000..24bb0688d515
--- /dev/null
+++ b/Documentation/hwmon/tps40422
@@ -0,0 +1,64 @@
1Kernel driver tps40422
2======================
3
4Supported chips:
5 * TI TPS40422
6 Prefix: 'tps40422'
7 Addresses scanned: -
8 Datasheet: http://www.ti.com/lit/gpn/tps40422
9
10Author: Zhu Laiwen <richard.zhu@nsn.com>
11
12
13Description
14-----------
15
16This driver supports TI TPS40422 Dual-Output or Two-Phase Synchronous Buck
17Controller with PMBus
18
19The driver is a client driver to the core PMBus driver.
20Please see Documentation/hwmon/pmbus for details on PMBus client drivers.
21
22
23Usage Notes
24-----------
25
26This driver does not auto-detect devices. You will have to instantiate the
27devices explicitly. Please see Documentation/i2c/instantiating-devices for
28details.
29
30
31Platform data support
32---------------------
33
34The driver supports standard PMBus driver platform data.
35
36
37Sysfs entries
38-------------
39
40The following attributes are supported.
41
42in[1-2]_label "vout[1-2]"
43in[1-2]_input Measured voltage. From READ_VOUT register.
44in[1-2]_alarm voltage alarm.
45
46curr[1-2]_input Measured current. From READ_IOUT register.
47curr[1-2]_label "iout[1-2]"
48curr1_max Maximum current. From IOUT_OC_WARN_LIMIT register.
49curr1_crit Critical maximum current. From IOUT_OC_FAULT_LIMIT register.
50curr1_max_alarm Current high alarm. From IOUT_OC_WARN_LIMIT status.
51curr1_crit_alarm Current critical high alarm. From IOUT_OC_FAULT status.
52curr2_alarm Current high alarm. From IOUT_OC_WARNING status.
53
54temp1_input Measured temperature. From READ_TEMPERATURE_2 register on page 0.
55temp1_max Maximum temperature. From OT_WARN_LIMIT register.
56temp1_crit Critical high temperature. From OT_FAULT_LIMIT register.
57temp1_max_alarm Chip temperature high alarm. Set by comparing
58 READ_TEMPERATURE_2 on page 0 with OT_WARN_LIMIT if TEMP_OT_WARNING
59 status is set.
60temp1_crit_alarm Chip temperature critical high alarm. Set by comparing
61 READ_TEMPERATURE_2 on page 0 with OT_FAULT_LIMIT if TEMP_OT_FAULT
62 status is set.
63temp2_input Measured temperature. From READ_TEMPERATURE_2 register on page 1.
64temp2_alarm Chip temperature alarm on page 1.
diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt
index d7e43fa88575..7e240a7c9ab1 100644
--- a/Documentation/ioctl/ioctl-number.txt
+++ b/Documentation/ioctl/ioctl-number.txt
@@ -197,6 +197,7 @@ Code Seq#(hex) Include File Comments
197 <mailto:gregkh@linuxfoundation.org> 197 <mailto:gregkh@linuxfoundation.org>
198'a' all linux/atm*.h, linux/sonet.h ATM on linux 198'a' all linux/atm*.h, linux/sonet.h ATM on linux
199 <http://lrcwww.epfl.ch/> 199 <http://lrcwww.epfl.ch/>
200'a' 00-0F drivers/crypto/qat/qat_common/adf_cfg_common.h conflict! qat driver
200'b' 00-FF conflict! bit3 vme host bridge 201'b' 00-FF conflict! bit3 vme host bridge
201 <mailto:natalia@nikhefk.nikhef.nl> 202 <mailto:natalia@nikhefk.nikhef.nl>
202'c' all linux/cm4000_cs.h conflict! 203'c' all linux/cm4000_cs.h conflict!
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index b7fa2f599459..883901b9ac4f 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -566,6 +566,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
566 possible to determine what the correct size should be. 566 possible to determine what the correct size should be.
567 This option provides an override for these situations. 567 This option provides an override for these situations.
568 568
569 ca_keys= [KEYS] This parameter identifies a specific key(s) on
570 the system trusted keyring to be used for certificate
571 trust validation.
572 format: { id:<keyid> | builtin }
573
569 ccw_timeout_log [S390] 574 ccw_timeout_log [S390]
570 See Documentation/s390/CommonIO for details. 575 See Documentation/s390/CommonIO for details.
571 576
@@ -1097,6 +1102,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1097 that can be changed at run time by the 1102 that can be changed at run time by the
1098 set_graph_function file in the debugfs tracing directory. 1103 set_graph_function file in the debugfs tracing directory.
1099 1104
1105 ftrace_graph_notrace=[function-list]
1106 [FTRACE] Do not trace from the functions specified in
1107 function-list. This list is a comma separated list of
1108 functions that can be changed at run time by the
1109 set_graph_notrace file in the debugfs tracing directory.
1110
1100 gamecon.map[2|3]= 1111 gamecon.map[2|3]=
1101 [HW,JOY] Multisystem joystick and NES/SNES/PSX pad 1112 [HW,JOY] Multisystem joystick and NES/SNES/PSX pad
1102 support via parallel port (up to 5 devices per port) 1113 support via parallel port (up to 5 devices per port)
@@ -1313,6 +1324,23 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1313 Formats: { "ima" | "ima-ng" } 1324 Formats: { "ima" | "ima-ng" }
1314 Default: "ima-ng" 1325 Default: "ima-ng"
1315 1326
1327 ima.ahash_minsize= [IMA] Minimum file size for asynchronous hash usage
1328 Format: <min_file_size>
1329 Set the minimal file size for using asynchronous hash.
1330 If left unspecified, ahash usage is disabled.
1331
1332 ahash performance varies for different data sizes on
1333 different crypto accelerators. This option can be used
1334 to achieve the best performance for a particular HW.
1335
1336 ima.ahash_bufsize= [IMA] Asynchronous hash buffer size
1337 Format: <bufsize>
1338 Set hashing buffer size. Default: 4k.
1339
1340 ahash performance varies for different chunk sizes on
1341 different crypto accelerators. This option can be used
1342 to achieve best performance for particular HW.
1343
1316 init= [KNL] 1344 init= [KNL]
1317 Format: <full_path> 1345 Format: <full_path>
1318 Run specified binary instead of /sbin/init as init 1346 Run specified binary instead of /sbin/init as init
@@ -1416,10 +1444,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1416 ip= [IP_PNP] 1444 ip= [IP_PNP]
1417 See Documentation/filesystems/nfs/nfsroot.txt. 1445 See Documentation/filesystems/nfs/nfsroot.txt.
1418 1446
1419 ip2= [HW] Set IO/IRQ pairs for up to 4 IntelliPort boards
1420 See comment before ip2_setup() in
1421 drivers/char/ip2/ip2base.c.
1422
1423 irqfixup [HW] 1447 irqfixup [HW]
1424 When an interrupt is not handled search all handlers 1448 When an interrupt is not handled search all handlers
1425 for it. Intended to get systems with badly broken 1449 for it. Intended to get systems with badly broken
@@ -2807,6 +2831,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2807 quiescent states. Units are jiffies, minimum 2831 quiescent states. Units are jiffies, minimum
2808 value is one, and maximum value is HZ. 2832 value is one, and maximum value is HZ.
2809 2833
2834 rcutree.rcu_nocb_leader_stride= [KNL]
2835 Set the number of NOCB kthread groups, which
2836 defaults to the square root of the number of
2837 CPUs. Larger numbers reduces the wakeup overhead
2838 on the per-CPU grace-period kthreads, but increases
2839 that same overhead on each group's leader.
2840
2810 rcutree.qhimark= [KNL] 2841 rcutree.qhimark= [KNL]
2811 Set threshold of queued RCU callbacks beyond which 2842 Set threshold of queued RCU callbacks beyond which
2812 batch limiting is disabled. 2843 batch limiting is disabled.
diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt
index f1dc4a215593..a4de88fb55f0 100644
--- a/Documentation/memory-barriers.txt
+++ b/Documentation/memory-barriers.txt
@@ -757,10 +757,14 @@ SMP BARRIER PAIRING
757When dealing with CPU-CPU interactions, certain types of memory barrier should 757When dealing with CPU-CPU interactions, certain types of memory barrier should
758always be paired. A lack of appropriate pairing is almost certainly an error. 758always be paired. A lack of appropriate pairing is almost certainly an error.
759 759
760A write barrier should always be paired with a data dependency barrier or read 760General barriers pair with each other, though they also pair with
761barrier, though a general barrier would also be viable. Similarly a read 761most other types of barriers, albeit without transitivity. An acquire
762barrier or a data dependency barrier should always be paired with at least an 762barrier pairs with a release barrier, but both may also pair with other
763write barrier, though, again, a general barrier is viable: 763barriers, including of course general barriers. A write barrier pairs
764with a data dependency barrier, an acquire barrier, a release barrier,
765a read barrier, or a general barrier. Similarly a read barrier or a
766data dependency barrier pairs with a write barrier, an acquire barrier,
767a release barrier, or a general barrier:
764 768
765 CPU 1 CPU 2 769 CPU 1 CPU 2
766 =============== =============== 770 =============== ===============
@@ -1893,6 +1897,21 @@ between the STORE to indicate the event and the STORE to set TASK_RUNNING:
1893 <general barrier> STORE current->state 1897 <general barrier> STORE current->state
1894 LOAD event_indicated 1898 LOAD event_indicated
1895 1899
1900To repeat, this write memory barrier is present if and only if something
1901is actually awakened. To see this, consider the following sequence of
1902events, where X and Y are both initially zero:
1903
1904 CPU 1 CPU 2
1905 =============================== ===============================
1906 X = 1; STORE event_indicated
1907 smp_mb(); wake_up();
1908 Y = 1; wait_event(wq, Y == 1);
1909 wake_up(); load from Y sees 1, no memory barrier
1910 load from X might see 0
1911
1912In contrast, if a wakeup does occur, CPU 2's load from X would be guaranteed
1913to see 1.
1914
1896The available waker functions include: 1915The available waker functions include:
1897 1916
1898 complete(); 1917 complete();
diff --git a/Documentation/mic/mic_overview.txt b/Documentation/mic/mic_overview.txt
index b41929224804..77c541802ad9 100644
--- a/Documentation/mic/mic_overview.txt
+++ b/Documentation/mic/mic_overview.txt
@@ -17,35 +17,50 @@ for applications. A key benefit of our solution is that it leverages
17the standard virtio framework for network, disk and console devices, 17the standard virtio framework for network, disk and console devices,
18though in our case the virtio framework is used across a PCIe bus. 18though in our case the virtio framework is used across a PCIe bus.
19 19
20MIC PCIe card has a dma controller with 8 channels. These channels are
21shared between the host s/w and the card s/w. 0 to 3 are used by host
22and 4 to 7 by card. As the dma device doesn't show up as PCIe device,
23a virtual bus called mic bus is created and virtual dma devices are
24created on it by the host/card drivers. On host the channels are private
25and used only by the host driver to transfer data for the virtio devices.
26
20Here is a block diagram of the various components described above. The 27Here is a block diagram of the various components described above. The
21virtio backends are situated on the host rather than the card given better 28virtio backends are situated on the host rather than the card given better
22single threaded performance for the host compared to MIC, the ability of 29single threaded performance for the host compared to MIC, the ability of
23the host to initiate DMA's to/from the card using the MIC DMA engine and 30the host to initiate DMA's to/from the card using the MIC DMA engine and
24the fact that the virtio block storage backend can only be on the host. 31the fact that the virtio block storage backend can only be on the host.
25 32
26 | 33 |
27 +----------+ | +----------+ 34 +----------+ | +----------+
28 | Card OS | | | Host OS | 35 | Card OS | | | Host OS |
29 +----------+ | +----------+ 36 +----------+ | +----------+
30 | 37 |
31+-------+ +--------+ +------+ | +---------+ +--------+ +--------+ 38 +-------+ +--------+ +------+ | +---------+ +--------+ +--------+
32| Virtio| |Virtio | |Virtio| | |Virtio | |Virtio | |Virtio | 39 | Virtio| |Virtio | |Virtio| | |Virtio | |Virtio | |Virtio |
33| Net | |Console | |Block | | |Net | |Console | |Block | 40 | Net | |Console | |Block | | |Net | |Console | |Block |
34| Driver| |Driver | |Driver| | |backend | |backend | |backend | 41 | Driver| |Driver | |Driver| | |backend | |backend | |backend |
35+-------+ +--------+ +------+ | +---------+ +--------+ +--------+ 42 +-------+ +--------+ +------+ | +---------+ +--------+ +--------+
36 | | | | | | | 43 | | | | | | |
37 | | | |User | | | 44 | | | |User | | |
38 | | | |------|------------|---------|------- 45 | | | |------|------------|---------|-------
39 +-------------------+ |Kernel +--------------------------+ 46 +-------------------+ |Kernel +--------------------------+
40 | | | Virtio over PCIe IOCTLs | 47 | | | Virtio over PCIe IOCTLs |
41 | | +--------------------------+ 48 | | +--------------------------+
42 +--------------+ | | 49+-----------+ | | | +-----------+
43 |Intel MIC | | +---------------+ 50| MIC DMA | | | | | MIC DMA |
44 |Card Driver | | |Intel MIC | 51| Driver | | | | | Driver |
45 +--------------+ | |Host Driver | 52+-----------+ | | | +-----------+
46 | | +---------------+ 53 | | | | |
47 | | | 54+---------------+ | | | +----------------+
48 +-------------------------------------------------------------+ 55|MIC virtual Bus| | | | |MIC virtual Bus |
49 | | 56+---------------+ | | | +----------------+
50 | PCIe Bus | 57 | | | | |
51 +-------------------------------------------------------------+ 58 | +--------------+ | +---------------+ |
59 | |Intel MIC | | |Intel MIC | |
60 +---|Card Driver | | |Host Driver | |
61 +--------------+ | +---------------+-----+
62 | | |
63 +-------------------------------------------------------------+
64 | |
65 | PCIe Bus |
66 +-------------------------------------------------------------+
diff --git a/Documentation/mic/mpssd/mpss b/Documentation/mic/mpssd/mpss
index 3136c68dad0b..cacbdb0aefb9 100755
--- a/Documentation/mic/mpssd/mpss
+++ b/Documentation/mic/mpssd/mpss
@@ -48,18 +48,18 @@ start()
48 fi 48 fi
49 49
50 echo -e $"Starting MPSS Stack" 50 echo -e $"Starting MPSS Stack"
51 echo -e $"Loading MIC_HOST Module" 51 echo -e $"Loading MIC_X100_DMA & MIC_HOST Modules"
52 52
53 # Ensure the driver is loaded 53 for f in "mic_host" "mic_x100_dma"
54 if [ ! -d "$sysfs" ]; then 54 do
55 modprobe mic_host 55 modprobe $f
56 RETVAL=$? 56 RETVAL=$?
57 if [ $RETVAL -ne 0 ]; then 57 if [ $RETVAL -ne 0 ]; then
58 failure 58 failure
59 echo 59 echo
60 return $RETVAL 60 return $RETVAL
61 fi 61 fi
62 fi 62 done
63 63
64 # Start the daemon 64 # Start the daemon
65 echo -n $"Starting MPSSD " 65 echo -n $"Starting MPSSD "
@@ -170,8 +170,8 @@ unload()
170 stop 170 stop
171 171
172 sleep 5 172 sleep 5
173 echo -n $"Removing MIC_HOST Module: " 173 echo -n $"Removing MIC_HOST & MIC_X100_DMA Modules: "
174 modprobe -r mic_host 174 modprobe -r mic_host mic_x100_dma
175 RETVAL=$? 175 RETVAL=$?
176 [ $RETVAL -ne 0 ] && failure || success 176 [ $RETVAL -ne 0 ] && failure || success
177 echo 177 echo
diff --git a/Documentation/phy.txt b/Documentation/phy.txt
index ebff6ee52441..c6594af94d25 100644
--- a/Documentation/phy.txt
+++ b/Documentation/phy.txt
@@ -53,10 +53,12 @@ unregister the PHY.
53The PHY driver should create the PHY in order for other peripheral controllers 53The PHY driver should create the PHY in order for other peripheral controllers
54to make use of it. The PHY framework provides 2 APIs to create the PHY. 54to make use of it. The PHY framework provides 2 APIs to create the PHY.
55 55
56struct phy *phy_create(struct device *dev, const struct phy_ops *ops, 56struct phy *phy_create(struct device *dev, struct device_node *node,
57 struct phy_init_data *init_data); 57 const struct phy_ops *ops,
58struct phy *devm_phy_create(struct device *dev, const struct phy_ops *ops, 58 struct phy_init_data *init_data);
59 struct phy_init_data *init_data); 59struct phy *devm_phy_create(struct device *dev, struct device_node *node,
60 const struct phy_ops *ops,
61 struct phy_init_data *init_data);
60 62
61The PHY drivers can use one of the above 2 APIs to create the PHY by passing 63The PHY drivers can use one of the above 2 APIs to create the PHY by passing
62the device pointer, phy ops and init_data. 64the device pointer, phy ops and init_data.
diff --git a/Documentation/power/regulator/consumer.txt b/Documentation/power/regulator/consumer.txt
index 55c4175d8099..81c0e2b49cd8 100644
--- a/Documentation/power/regulator/consumer.txt
+++ b/Documentation/power/regulator/consumer.txt
@@ -180,3 +180,38 @@ int regulator_unregister_notifier(struct regulator *regulator,
180 180
181Regulators use the kernel notifier framework to send event to their interested 181Regulators use the kernel notifier framework to send event to their interested
182consumers. 182consumers.
183
1847. Regulator Direct Register Access
185===================================
186Some kinds of power management hardware or firmware are designed such that
187they need to do low-level hardware access to regulators, with no involvement
188from the kernel. Examples of such devices are:
189
190- clocksource with a voltage-controlled oscillator and control logic to change
191 the supply voltage over I2C to achieve a desired output clock rate
192- thermal management firmware that can issue an arbitrary I2C transaction to
193 perform system poweroff during overtemperature conditions
194
195To set up such a device/firmware, various parameters like I2C address of the
196regulator, addresses of various regulator registers etc. need to be configured
197to it. The regulator framework provides the following helpers for querying
198these details.
199
200Bus-specific details, like I2C addresses or transfer rates are handled by the
201regmap framework. To get the regulator's regmap (if supported), use :-
202
203struct regmap *regulator_get_regmap(struct regulator *regulator);
204
205To obtain the hardware register offset and bitmask for the regulator's voltage
206selector register, use :-
207
208int regulator_get_hardware_vsel_register(struct regulator *regulator,
209 unsigned *vsel_reg,
210 unsigned *vsel_mask);
211
212To convert a regulator framework voltage selector code (used by
213regulator_list_voltage) to a hardware-specific voltage selector that can be
214directly written to the voltage selector register, use :-
215
216int regulator_list_hardware_vsel(struct regulator *regulator,
217 unsigned selector);
diff --git a/Documentation/security/keys.txt b/Documentation/security/keys.txt
index a4c33f1a7c6d..8727c194ca16 100644
--- a/Documentation/security/keys.txt
+++ b/Documentation/security/keys.txt
@@ -1150,20 +1150,24 @@ The structure has a number of fields, some of which are mandatory:
1150 const void *data; 1150 const void *data;
1151 size_t datalen; 1151 size_t datalen;
1152 size_t quotalen; 1152 size_t quotalen;
1153 time_t expiry;
1153 }; 1154 };
1154 1155
1155 Before calling the method, the caller will fill in data and datalen with 1156 Before calling the method, the caller will fill in data and datalen with
1156 the payload blob parameters; quotalen will be filled in with the default 1157 the payload blob parameters; quotalen will be filled in with the default
1157 quota size from the key type and the rest will be cleared. 1158 quota size from the key type; expiry will be set to TIME_T_MAX and the
1159 rest will be cleared.
1158 1160
1159 If a description can be proposed from the payload contents, that should be 1161 If a description can be proposed from the payload contents, that should be
1160 attached as a string to the description field. This will be used for the 1162 attached as a string to the description field. This will be used for the
1161 key description if the caller of add_key() passes NULL or "". 1163 key description if the caller of add_key() passes NULL or "".
1162 1164
1163 The method can attach anything it likes to type_data[] and payload. These 1165 The method can attach anything it likes to type_data[] and payload. These
1164 are merely passed along to the instantiate() or update() operations. 1166 are merely passed along to the instantiate() or update() operations. If
1167 set, the expiry time will be applied to the key if it is instantiated from
1168 this data.
1165 1169
1166 The method should return 0 if success ful or a negative error code 1170 The method should return 0 if successful or a negative error code
1167 otherwise. 1171 otherwise.
1168 1172
1169 1173
@@ -1172,7 +1176,9 @@ The structure has a number of fields, some of which are mandatory:
1172 This method is only required if the preparse() method is provided, 1176 This method is only required if the preparse() method is provided,
1173 otherwise it is unused. It cleans up anything attached to the 1177 otherwise it is unused. It cleans up anything attached to the
1174 description, type_data and payload fields of the key_preparsed_payload 1178 description, type_data and payload fields of the key_preparsed_payload
1175 struct as filled in by the preparse() method. 1179 struct as filled in by the preparse() method. It will always be called
1180 after preparse() returns successfully, even if instantiate() or update()
1181 succeed.
1176 1182
1177 1183
1178 (*) int (*instantiate)(struct key *key, struct key_preparsed_payload *prep); 1184 (*) int (*instantiate)(struct key *key, struct key_preparsed_payload *prep);
diff --git a/Documentation/stable_kernel_rules.txt b/Documentation/stable_kernel_rules.txt
index cbc2f03056bd..aee73e78c7d4 100644
--- a/Documentation/stable_kernel_rules.txt
+++ b/Documentation/stable_kernel_rules.txt
@@ -29,6 +29,9 @@ Rules on what kind of patches are accepted, and which ones are not, into the
29 29
30Procedure for submitting patches to the -stable tree: 30Procedure for submitting patches to the -stable tree:
31 31
32 - If the patch covers files in net/ or drivers/net please follow netdev stable
33 submission guidelines as described in
34 Documentation/networking/netdev-FAQ.txt
32 - Send the patch, after verifying that it follows the above rules, to 35 - Send the patch, after verifying that it follows the above rules, to
33 stable@vger.kernel.org. You must note the upstream commit ID in the 36 stable@vger.kernel.org. You must note the upstream commit ID in the
34 changelog of your submission, as well as the kernel version you wish 37 changelog of your submission, as well as the kernel version you wish
diff --git a/Documentation/timers/00-INDEX b/Documentation/timers/00-INDEX
index 6d042dc1cce0..ee212a27772f 100644
--- a/Documentation/timers/00-INDEX
+++ b/Documentation/timers/00-INDEX
@@ -12,6 +12,8 @@ Makefile
12 - Build and link hpet_example 12 - Build and link hpet_example
13NO_HZ.txt 13NO_HZ.txt
14 - Summary of the different methods for the scheduler clock-interrupts management. 14 - Summary of the different methods for the scheduler clock-interrupts management.
15timekeeping.txt
16 - Clock sources, clock events, sched_clock() and delay timer notes
15timers-howto.txt 17timers-howto.txt
16 - how to insert delays in the kernel the right (tm) way. 18 - how to insert delays in the kernel the right (tm) way.
17timer_stats.txt 19timer_stats.txt
diff --git a/Documentation/timers/timekeeping.txt b/Documentation/timers/timekeeping.txt
new file mode 100644
index 000000000000..f3a8cf28f802
--- /dev/null
+++ b/Documentation/timers/timekeeping.txt
@@ -0,0 +1,179 @@
1Clock sources, Clock events, sched_clock() and delay timers
2-----------------------------------------------------------
3
4This document tries to briefly explain some basic kernel timekeeping
5abstractions. It partly pertains to the drivers usually found in
6drivers/clocksource in the kernel tree, but the code may be spread out
7across the kernel.
8
9If you grep through the kernel source you will find a number of architecture-
10specific implementations of clock sources, clockevents and several likewise
11architecture-specific overrides of the sched_clock() function and some
12delay timers.
13
14To provide timekeeping for your platform, the clock source provides
15the basic timeline, whereas clock events shoot interrupts on certain points
16on this timeline, providing facilities such as high-resolution timers.
17sched_clock() is used for scheduling and timestamping, and delay timers
18provide an accurate delay source using hardware counters.
19
20
21Clock sources
22-------------
23
24The purpose of the clock source is to provide a timeline for the system that
25tells you where you are in time. For example issuing the command 'date' on
26a Linux system will eventually read the clock source to determine exactly
27what time it is.
28
29Typically the clock source is a monotonic, atomic counter which will provide
30n bits which count from 0 to 2^(n-1) and then wraps around to 0 and start over.
31It will ideally NEVER stop ticking as long as the system is running. It
32may stop during system suspend.
33
34The clock source shall have as high resolution as possible, and the frequency
35shall be as stable and correct as possible as compared to a real-world wall
36clock. It should not move unpredictably back and forth in time or miss a few
37cycles here and there.
38
39It must be immune to the kind of effects that occur in hardware where e.g.
40the counter register is read in two phases on the bus lowest 16 bits first
41and the higher 16 bits in a second bus cycle with the counter bits
42potentially being updated in between leading to the risk of very strange
43values from the counter.
44
45When the wall-clock accuracy of the clock source isn't satisfactory, there
46are various quirks and layers in the timekeeping code for e.g. synchronizing
47the user-visible time to RTC clocks in the system or against networked time
48servers using NTP, but all they do basically is update an offset against
49the clock source, which provides the fundamental timeline for the system.
50These measures does not affect the clock source per se, they only adapt the
51system to the shortcomings of it.
52
53The clock source struct shall provide means to translate the provided counter
54into a nanosecond value as an unsigned long long (unsigned 64 bit) number.
55Since this operation may be invoked very often, doing this in a strict
56mathematical sense is not desirable: instead the number is taken as close as
57possible to a nanosecond value using only the arithmetic operations
58multiply and shift, so in clocksource_cyc2ns() you find:
59
60 ns ~= (clocksource * mult) >> shift
61
62You will find a number of helper functions in the clock source code intended
63to aid in providing these mult and shift values, such as
64clocksource_khz2mult(), clocksource_hz2mult() that help determine the
65mult factor from a fixed shift, and clocksource_register_hz() and
66clocksource_register_khz() which will help out assigning both shift and mult
67factors using the frequency of the clock source as the only input.
68
69For real simple clock sources accessed from a single I/O memory location
70there is nowadays even clocksource_mmio_init() which will take a memory
71location, bit width, a parameter telling whether the counter in the
72register counts up or down, and the timer clock rate, and then conjure all
73necessary parameters.
74
75Since a 32-bit counter at say 100 MHz will wrap around to zero after some 43
76seconds, the code handling the clock source will have to compensate for this.
77That is the reason why the clock source struct also contains a 'mask'
78member telling how many bits of the source are valid. This way the timekeeping
79code knows when the counter will wrap around and can insert the necessary
80compensation code on both sides of the wrap point so that the system timeline
81remains monotonic.
82
83
84Clock events
85------------
86
87Clock events are the conceptual reverse of clock sources: they take a
88desired time specification value and calculate the values to poke into
89hardware timer registers.
90
91Clock events are orthogonal to clock sources. The same hardware
92and register range may be used for the clock event, but it is essentially
93a different thing. The hardware driving clock events has to be able to
94fire interrupts, so as to trigger events on the system timeline. On an SMP
95system, it is ideal (and customary) to have one such event driving timer per
96CPU core, so that each core can trigger events independently of any other
97core.
98
99You will notice that the clock event device code is based on the same basic
100idea about translating counters to nanoseconds using mult and shift
101arithmetic, and you find the same family of helper functions again for
102assigning these values. The clock event driver does not need a 'mask'
103attribute however: the system will not try to plan events beyond the time
104horizon of the clock event.
105
106
107sched_clock()
108-------------
109
110In addition to the clock sources and clock events there is a special weak
111function in the kernel called sched_clock(). This function shall return the
112number of nanoseconds since the system was started. An architecture may or
113may not provide an implementation of sched_clock() on its own. If a local
114implementation is not provided, the system jiffy counter will be used as
115sched_clock().
116
117As the name suggests, sched_clock() is used for scheduling the system,
118determining the absolute timeslice for a certain process in the CFS scheduler
119for example. It is also used for printk timestamps when you have selected to
120include time information in printk for things like bootcharts.
121
122Compared to clock sources, sched_clock() has to be very fast: it is called
123much more often, especially by the scheduler. If you have to do trade-offs
124between accuracy compared to the clock source, you may sacrifice accuracy
125for speed in sched_clock(). It however requires some of the same basic
126characteristics as the clock source, i.e. it should be monotonic.
127
128The sched_clock() function may wrap only on unsigned long long boundaries,
129i.e. after 64 bits. Since this is a nanosecond value this will mean it wraps
130after circa 585 years. (For most practical systems this means "never".)
131
132If an architecture does not provide its own implementation of this function,
133it will fall back to using jiffies, making its maximum resolution 1/HZ of the
134jiffy frequency for the architecture. This will affect scheduling accuracy
135and will likely show up in system benchmarks.
136
137The clock driving sched_clock() may stop or reset to zero during system
138suspend/sleep. This does not matter to the function it serves of scheduling
139events on the system. However it may result in interesting timestamps in
140printk().
141
142The sched_clock() function should be callable in any context, IRQ- and
143NMI-safe and return a sane value in any context.
144
145Some architectures may have a limited set of time sources and lack a nice
146counter to derive a 64-bit nanosecond value, so for example on the ARM
147architecture, special helper functions have been created to provide a
148sched_clock() nanosecond base from a 16- or 32-bit counter. Sometimes the
149same counter that is also used as clock source is used for this purpose.
150
151On SMP systems, it is crucial for performance that sched_clock() can be called
152independently on each CPU without any synchronization performance hits.
153Some hardware (such as the x86 TSC) will cause the sched_clock() function to
154drift between the CPUs on the system. The kernel can work around this by
155enabling the CONFIG_HAVE_UNSTABLE_SCHED_CLOCK option. This is another aspect
156that makes sched_clock() different from the ordinary clock source.
157
158
159Delay timers (some architectures only)
160--------------------------------------
161
162On systems with variable CPU frequency, the various kernel delay() functions
163will sometimes behave strangely. Basically these delays usually use a hard
164loop to delay a certain number of jiffy fractions using a "lpj" (loops per
165jiffy) value, calibrated on boot.
166
167Let's hope that your system is running on maximum frequency when this value
168is calibrated: as an effect when the frequency is geared down to half the
169full frequency, any delay() will be twice as long. Usually this does not
170hurt, as you're commonly requesting that amount of delay *or more*. But
171basically the semantics are quite unpredictable on such systems.
172
173Enter timer-based delays. Using these, a timer read may be used instead of
174a hard-coded loop for providing the desired delay.
175
176This is done by declaring a struct delay_timer and assigning the appropriate
177function pointers and rate settings for this delay timer.
178
179This is available on some architectures like OpenRISC or ARM.
diff --git a/Documentation/trace/ftrace-design.txt b/Documentation/trace/ftrace-design.txt
index 3f669b9e8852..dd5f916b351d 100644
--- a/Documentation/trace/ftrace-design.txt
+++ b/Documentation/trace/ftrace-design.txt
@@ -102,30 +102,6 @@ extern void mcount(void);
102EXPORT_SYMBOL(mcount); 102EXPORT_SYMBOL(mcount);
103 103
104 104
105HAVE_FUNCTION_TRACE_MCOUNT_TEST
106-------------------------------
107
108This is an optional optimization for the normal case when tracing is turned off
109in the system. If you do not enable this Kconfig option, the common ftrace
110code will take care of doing the checking for you.
111
112To support this feature, you only need to check the function_trace_stop
113variable in the mcount function. If it is non-zero, there is no tracing to be
114done at all, so you can return.
115
116This additional pseudo code would simply be:
117void mcount(void)
118{
119 /* save any bare state needed in order to do initial checking */
120
121+ if (function_trace_stop)
122+ return;
123
124 extern void (*ftrace_trace_function)(unsigned long, unsigned long);
125 if (ftrace_trace_function != ftrace_stub)
126...
127
128
129HAVE_FUNCTION_GRAPH_TRACER 105HAVE_FUNCTION_GRAPH_TRACER
130-------------------------- 106--------------------------
131 107
@@ -328,8 +304,6 @@ void mcount(void)
328 304
329void ftrace_caller(void) 305void ftrace_caller(void)
330{ 306{
331 /* implement HAVE_FUNCTION_TRACE_MCOUNT_TEST if you desire */
332
333 /* save all state needed by the ABI (see paragraph above) */ 307 /* save all state needed by the ABI (see paragraph above) */
334 308
335 unsigned long frompc = ...; 309 unsigned long frompc = ...;
diff --git a/Documentation/trace/ftrace.txt b/Documentation/trace/ftrace.txt
index 2479b2a0c77c..4da42616939f 100644
--- a/Documentation/trace/ftrace.txt
+++ b/Documentation/trace/ftrace.txt
@@ -1515,7 +1515,7 @@ Doing the same with chrt -r 5 and function-trace set.
1515 <idle>-0 3d.h4 1us+: 0:120:R + [003] 2448: 94:R sleep 1515 <idle>-0 3d.h4 1us+: 0:120:R + [003] 2448: 94:R sleep
1516 <idle>-0 3d.h4 2us : ttwu_do_activate.constprop.87 <-try_to_wake_up 1516 <idle>-0 3d.h4 2us : ttwu_do_activate.constprop.87 <-try_to_wake_up
1517 <idle>-0 3d.h3 3us : check_preempt_curr <-ttwu_do_wakeup 1517 <idle>-0 3d.h3 3us : check_preempt_curr <-ttwu_do_wakeup
1518 <idle>-0 3d.h3 3us : resched_task <-check_preempt_curr 1518 <idle>-0 3d.h3 3us : resched_curr <-check_preempt_curr
1519 <idle>-0 3dNh3 4us : task_woken_rt <-ttwu_do_wakeup 1519 <idle>-0 3dNh3 4us : task_woken_rt <-ttwu_do_wakeup
1520 <idle>-0 3dNh3 4us : _raw_spin_unlock <-try_to_wake_up 1520 <idle>-0 3dNh3 4us : _raw_spin_unlock <-try_to_wake_up
1521 <idle>-0 3dNh3 4us : sub_preempt_count <-_raw_spin_unlock 1521 <idle>-0 3dNh3 4us : sub_preempt_count <-_raw_spin_unlock
diff --git a/Documentation/usb/hotplug.txt b/Documentation/usb/hotplug.txt
index 6424b130485c..a80b0e9a7a0b 100644
--- a/Documentation/usb/hotplug.txt
+++ b/Documentation/usb/hotplug.txt
@@ -105,13 +105,13 @@ macros such as these, and use driver_info to store more information.
105A short example, for a driver that supports several specific USB devices 105A short example, for a driver that supports several specific USB devices
106and their quirks, might have a MODULE_DEVICE_TABLE like this: 106and their quirks, might have a MODULE_DEVICE_TABLE like this:
107 107
108 static const struct usb_device_id mydriver_id_table = { 108 static const struct usb_device_id mydriver_id_table[] = {
109 { USB_DEVICE (0x9999, 0xaaaa), driver_info: QUIRK_X }, 109 { USB_DEVICE (0x9999, 0xaaaa), driver_info: QUIRK_X },
110 { USB_DEVICE (0xbbbb, 0x8888), driver_info: QUIRK_Y|QUIRK_Z }, 110 { USB_DEVICE (0xbbbb, 0x8888), driver_info: QUIRK_Y|QUIRK_Z },
111 ... 111 ...
112 { } /* end with an all-zeroes entry */ 112 { } /* end with an all-zeroes entry */
113 } 113 };
114 MODULE_DEVICE_TABLE (usb, mydriver_id_table); 114 MODULE_DEVICE_TABLE(usb, mydriver_id_table);
115 115
116Most USB device drivers should pass these tables to the USB subsystem as 116Most USB device drivers should pass these tables to the USB subsystem as
117well as to the module management subsystem. Not all, though: some driver 117well as to the module management subsystem. Not all, though: some driver
@@ -134,7 +134,7 @@ something like this:
134 if exposing any operations through usbdevfs: 134 if exposing any operations through usbdevfs:
135 .ioctl = my_ioctl, 135 .ioctl = my_ioctl,
136 */ 136 */
137 } 137 };
138 138
139When the USB subsystem knows about a driver's device ID table, it's used when 139When the USB subsystem knows about a driver's device ID table, it's used when
140choosing drivers to probe(). The thread doing new device processing checks 140choosing drivers to probe(). The thread doing new device processing checks
diff --git a/Documentation/usb/power-management.txt b/Documentation/usb/power-management.txt
index 1392b61d6ebe..7b90fe034c4b 100644
--- a/Documentation/usb/power-management.txt
+++ b/Documentation/usb/power-management.txt
@@ -2,8 +2,27 @@
2 2
3 Alan Stern <stern@rowland.harvard.edu> 3 Alan Stern <stern@rowland.harvard.edu>
4 4
5 October 28, 2010 5 Last-updated: February 2014
6 6
7
8 Contents:
9 ---------
10 * What is Power Management?
11 * What is Remote Wakeup?
12 * When is a USB device idle?
13 * Forms of dynamic PM
14 * The user interface for dynamic PM
15 * Changing the default idle-delay time
16 * Warnings
17 * The driver interface for Power Management
18 * The driver interface for autosuspend and autoresume
19 * Other parts of the driver interface
20 * Mutual exclusion
21 * Interaction between dynamic PM and system PM
22 * xHCI hardware link PM
23 * USB Port Power Control
24 * User Interface for Port Power Control
25 * Suggested Userspace Port Power Policy
7 26
8 27
9 What is Power Management? 28 What is Power Management?
@@ -516,3 +535,225 @@ relevant attribute files is usb2_hardware_lpm.
516 driver will enable hardware LPM for the device. You 535 driver will enable hardware LPM for the device. You
517 can write y/Y/1 or n/N/0 to the file to enable/disable 536 can write y/Y/1 or n/N/0 to the file to enable/disable
518 USB2 hardware LPM manually. This is for test purpose mainly. 537 USB2 hardware LPM manually. This is for test purpose mainly.
538
539
540 USB Port Power Control
541 ----------------------
542
543In addition to suspending endpoint devices and enabling hardware
544controlled link power management, the USB subsystem also has the
545capability to disable power to ports under some conditions. Power is
546controlled through Set/ClearPortFeature(PORT_POWER) requests to a hub.
547In the case of a root or platform-internal hub the host controller
548driver translates PORT_POWER requests into platform firmware (ACPI)
549method calls to set the port power state. For more background see the
550Linux Plumbers Conference 2012 slides [1] and video [2]:
551
552Upon receiving a ClearPortFeature(PORT_POWER) request a USB port is
553logically off, and may trigger the actual loss of VBUS to the port [3].
554VBUS may be maintained in the case where a hub gangs multiple ports into
555a shared power well causing power to remain until all ports in the gang
556are turned off. VBUS may also be maintained by hub ports configured for
557a charging application. In any event a logically off port will lose
558connection with its device, not respond to hotplug events, and not
559respond to remote wakeup events*.
560
561WARNING: turning off a port may result in the inability to hot add a device.
562Please see "User Interface for Port Power Control" for details.
563
564As far as the effect on the device itself it is similar to what a device
565goes through during system suspend, i.e. the power session is lost. Any
566USB device or driver that misbehaves with system suspend will be
567similarly affected by a port power cycle event. For this reason the
568implementation shares the same device recovery path (and honors the same
569quirks) as the system resume path for the hub.
570
571[1]: http://dl.dropbox.com/u/96820575/sarah-sharp-lpt-port-power-off2-mini.pdf
572[2]: http://linuxplumbers.ubicast.tv/videos/usb-port-power-off-kerneluserspace-api/
573[3]: USB 3.1 Section 10.12
574* wakeup note: if a device is configured to send wakeup events the port
575 power control implementation will block poweroff attempts on that
576 port.
577
578
579 User Interface for Port Power Control
580 -------------------------------------
581
582The port power control mechanism uses the PM runtime system. Poweroff is
583requested by clearing the power/pm_qos_no_power_off flag of the port device
584(defaults to 1). If the port is disconnected it will immediately receive a
585ClearPortFeature(PORT_POWER) request. Otherwise, it will honor the pm runtime
586rules and require the attached child device and all descendants to be suspended.
587This mechanism is dependent on the hub advertising port power switching in its
588hub descriptor (wHubCharacteristics logical power switching mode field).
589
590Note, some interface devices/drivers do not support autosuspend. Userspace may
591need to unbind the interface drivers before the usb_device will suspend. An
592unbound interface device is suspended by default. When unbinding, be careful
593to unbind interface drivers, not the driver of the parent usb device. Also,
594leave hub interface drivers bound. If the driver for the usb device (not
595interface) is unbound the kernel is no longer able to resume the device. If a
596hub interface driver is unbound, control of its child ports is lost and all
597attached child-devices will disconnect. A good rule of thumb is that if the
598'driver/module' link for a device points to /sys/module/usbcore then unbinding
599it will interfere with port power control.
600
601Example of the relevant files for port power control. Note, in this example
602these files are relative to a usb hub device (prefix).
603
604 prefix=/sys/devices/pci0000:00/0000:00:14.0/usb3/3-1
605
606 attached child device +
607 hub port device + |
608 hub interface device + | |
609 v v v
610 $prefix/3-1:1.0/3-1-port1/device
611
612 $prefix/3-1:1.0/3-1-port1/power/pm_qos_no_power_off
613 $prefix/3-1:1.0/3-1-port1/device/power/control
614 $prefix/3-1:1.0/3-1-port1/device/3-1.1:<intf0>/driver/unbind
615 $prefix/3-1:1.0/3-1-port1/device/3-1.1:<intf1>/driver/unbind
616 ...
617 $prefix/3-1:1.0/3-1-port1/device/3-1.1:<intfN>/driver/unbind
618
619In addition to these files some ports may have a 'peer' link to a port on
620another hub. The expectation is that all superspeed ports have a
621hi-speed peer.
622
623$prefix/3-1:1.0/3-1-port1/peer -> ../../../../usb2/2-1/2-1:1.0/2-1-port1
624../../../../usb2/2-1/2-1:1.0/2-1-port1/peer -> ../../../../usb3/3-1/3-1:1.0/3-1-port1
625
626Distinct from 'companion ports', or 'ehci/xhci shared switchover ports'
627peer ports are simply the hi-speed and superspeed interface pins that
628are combined into a single usb3 connector. Peer ports share the same
629ancestor XHCI device.
630
631While a superspeed port is powered off a device may downgrade its
632connection and attempt to connect to the hi-speed pins. The
633implementation takes steps to prevent this:
634
6351/ Port suspend is sequenced to guarantee that hi-speed ports are powered-off
636 before their superspeed peer is permitted to power-off. The implication is
637 that the setting pm_qos_no_power_off to zero on a superspeed port may not cause
638 the port to power-off until its highspeed peer has gone to its runtime suspend
639 state. Userspace must take care to order the suspensions if it wants to
640 guarantee that a superspeed port will power-off.
641
6422/ Port resume is sequenced to force a superspeed port to power-on prior to its
643 highspeed peer.
644
6453/ Port resume always triggers an attached child device to resume. After a
646 power session is lost the device may have been removed, or need reset.
647 Resuming the child device when the parent port regains power resolves those
648 states and clamps the maximum port power cycle frequency at the rate the child
649 device can suspend (autosuspend-delay) and resume (reset-resume latency).
650
651Sysfs files relevant for port power control:
652 <hubdev-portX>/power/pm_qos_no_power_off:
653 This writable flag controls the state of an idle port.
654 Once all children and descendants have suspended the
655 port may suspend/poweroff provided that
656 pm_qos_no_power_off is '0'. If pm_qos_no_power_off is
657 '1' the port will remain active/powered regardless of
658 the stats of descendants. Defaults to 1.
659
660 <hubdev-portX>/power/runtime_status:
661 This file reflects whether the port is 'active' (power is on)
662 or 'suspended' (logically off). There is no indication to
663 userspace whether VBUS is still supplied.
664
665 <hubdev-portX>/connect_type:
666 An advisory read-only flag to userspace indicating the
667 location and connection type of the port. It returns
668 one of four values 'hotplug', 'hardwired', 'not used',
669 and 'unknown'. All values, besides unknown, are set by
670 platform firmware.
671
672 "hotplug" indicates an externally connectable/visible
673 port on the platform. Typically userspace would choose
674 to keep such a port powered to handle new device
675 connection events.
676
677 "hardwired" refers to a port that is not visible but
678 connectable. Examples are internal ports for USB
679 bluetooth that can be disconnected via an external
680 switch or a port with a hardwired USB camera. It is
681 expected to be safe to allow these ports to suspend
682 provided pm_qos_no_power_off is coordinated with any
683 switch that gates connections. Userspace must arrange
684 for the device to be connected prior to the port
685 powering off, or to activate the port prior to enabling
686 connection via a switch.
687
688 "not used" refers to an internal port that is expected
689 to never have a device connected to it. These may be
690 empty internal ports, or ports that are not physically
691 exposed on a platform. Considered safe to be
692 powered-off at all times.
693
694 "unknown" means platform firmware does not provide
695 information for this port. Most commonly refers to
696 external hub ports which should be considered 'hotplug'
697 for policy decisions.
698
699 NOTE1: since we are relying on the BIOS to get this ACPI
700 information correct, the USB port descriptions may be
701 missing or wrong.
702
703 NOTE2: Take care in clearing pm_qos_no_power_off. Once
704 power is off this port will
705 not respond to new connect events.
706
707 Once a child device is attached additional constraints are
708 applied before the port is allowed to poweroff.
709
710 <child>/power/control:
711 Must be 'auto', and the port will not
712 power down until <child>/power/runtime_status
713 reflects the 'suspended' state. Default
714 value is controlled by child device driver.
715
716 <child>/power/persist:
717 This defaults to '1' for most devices and indicates if
718 kernel can persist the device's configuration across a
719 power session loss (suspend / port-power event). When
720 this value is '0' (quirky devices), port poweroff is
721 disabled.
722
723 <child>/driver/unbind:
724 Wakeup capable devices will block port poweroff. At
725 this time the only mechanism to clear the usb-internal
726 wakeup-capability for an interface device is to unbind
727 its driver.
728
729Summary of poweroff pre-requisite settings relative to a port device:
730
731 echo 0 > power/pm_qos_no_power_off
732 echo 0 > peer/power/pm_qos_no_power_off # if it exists
733 echo auto > power/control # this is the default value
734 echo auto > <child>/power/control
735 echo 1 > <child>/power/persist # this is the default value
736
737 Suggested Userspace Port Power Policy
738 -------------------------------------
739
740As noted above userspace needs to be careful and deliberate about what
741ports are enabled for poweroff.
742
743The default configuration is that all ports start with
744power/pm_qos_no_power_off set to '1' causing ports to always remain
745active.
746
747Given confidence in the platform firmware's description of the ports
748(ACPI _PLD record for a port populates 'connect_type') userspace can
749clear pm_qos_no_power_off for all 'not used' ports. The same can be
750done for 'hardwired' ports provided poweroff is coordinated with any
751connection switch for the port.
752
753A more aggressive userspace policy is to enable USB port power off for
754all ports (set <hubdev-portX>/power/pm_qos_no_power_off to '0') when
755some external factor indicates the user has stopped interacting with the
756system. For example, a distro may want to enable power off all USB
757ports when the screen blanks, and re-power them when the screen becomes
758active. Smart phones and tablets may want to power off USB ports when
759the user pushes the power button.
diff --git a/Documentation/video4linux/CARDLIST.cx23885 b/Documentation/video4linux/CARDLIST.cx23885
index fc009d0ee7d6..a74eeccfe700 100644
--- a/Documentation/video4linux/CARDLIST.cx23885
+++ b/Documentation/video4linux/CARDLIST.cx23885
@@ -41,3 +41,5 @@
41 40 -> TurboSight TBS 6981 [6981:8888] 41 40 -> TurboSight TBS 6981 [6981:8888]
42 41 -> TurboSight TBS 6980 [6980:8888] 42 41 -> TurboSight TBS 6980 [6980:8888]
43 42 -> Leadtek Winfast PxPVR2200 [107d:6f21] 43 42 -> Leadtek Winfast PxPVR2200 [107d:6f21]
44 43 -> Hauppauge ImpactVCB-e [0070:7133]
45 44 -> DViCO FusionHDTV DVB-T Dual Express2 [18ac:db98]
diff --git a/Documentation/video4linux/CARDLIST.em28xx b/Documentation/video4linux/CARDLIST.em28xx
index 5a3ddcd340d3..bc3351bb48b4 100644
--- a/Documentation/video4linux/CARDLIST.em28xx
+++ b/Documentation/video4linux/CARDLIST.em28xx
@@ -77,7 +77,7 @@
77 76 -> KWorld PlusTV 340U or UB435-Q (ATSC) (em2870) [1b80:a340] 77 76 -> KWorld PlusTV 340U or UB435-Q (ATSC) (em2870) [1b80:a340]
78 77 -> EM2874 Leadership ISDBT (em2874) 78 77 -> EM2874 Leadership ISDBT (em2874)
79 78 -> PCTV nanoStick T2 290e (em28174) 79 78 -> PCTV nanoStick T2 290e (em28174)
80 79 -> Terratec Cinergy H5 (em2884) [0ccd:10a2,0ccd:10ad,0ccd:10b6] 80 79 -> Terratec Cinergy H5 (em2884) [eb1a:2885,0ccd:10a2,0ccd:10ad,0ccd:10b6]
81 80 -> PCTV DVB-S2 Stick (460e) (em28174) 81 80 -> PCTV DVB-S2 Stick (460e) (em28174)
82 81 -> Hauppauge WinTV HVR 930C (em2884) [2040:1605] 82 81 -> Hauppauge WinTV HVR 930C (em2884) [2040:1605]
83 82 -> Terratec Cinergy HTC Stick (em2884) [0ccd:00b2] 83 82 -> Terratec Cinergy HTC Stick (em2884) [0ccd:00b2]
diff --git a/Documentation/video4linux/v4l2-controls.txt b/Documentation/video4linux/v4l2-controls.txt
index 06cf3ac83631..0f84ce8c9a7b 100644
--- a/Documentation/video4linux/v4l2-controls.txt
+++ b/Documentation/video4linux/v4l2-controls.txt
@@ -77,9 +77,9 @@ Basic usage for V4L2 and sub-device drivers
77 77
78 Where foo->v4l2_dev is of type struct v4l2_device. 78 Where foo->v4l2_dev is of type struct v4l2_device.
79 79
80 Finally, remove all control functions from your v4l2_ioctl_ops: 80 Finally, remove all control functions from your v4l2_ioctl_ops (if any):
81 vidioc_queryctrl, vidioc_querymenu, vidioc_g_ctrl, vidioc_s_ctrl, 81 vidioc_queryctrl, vidioc_query_ext_ctrl, vidioc_querymenu, vidioc_g_ctrl,
82 vidioc_g_ext_ctrls, vidioc_try_ext_ctrls and vidioc_s_ext_ctrls. 82 vidioc_s_ctrl, vidioc_g_ext_ctrls, vidioc_try_ext_ctrls and vidioc_s_ext_ctrls.
83 Those are now no longer needed. 83 Those are now no longer needed.
84 84
851.3.2) For sub-device drivers do this: 851.3.2) For sub-device drivers do this:
@@ -258,8 +258,8 @@ The new control value has already been validated, so all you need to do is
258to actually update the hardware registers. 258to actually update the hardware registers.
259 259
260You're done! And this is sufficient for most of the drivers we have. No need 260You're done! And this is sufficient for most of the drivers we have. No need
261to do any validation of control values, or implement QUERYCTRL/QUERYMENU. And 261to do any validation of control values, or implement QUERYCTRL, QUERY_EXT_CTRL
262G/S_CTRL as well as G/TRY/S_EXT_CTRLS are automatically supported. 262and QUERYMENU. And G/S_CTRL as well as G/TRY/S_EXT_CTRLS are automatically supported.
263 263
264 264
265============================================================================== 265==============================================================================
@@ -288,30 +288,45 @@ of v4l2_device.
288Accessing Control Values 288Accessing Control Values
289======================== 289========================
290 290
291The v4l2_ctrl struct contains these two unions: 291The following union is used inside the control framework to access control
292values:
292 293
293 /* The current control value. */ 294union v4l2_ctrl_ptr {
294 union { 295 s32 *p_s32;
296 s64 *p_s64;
297 char *p_char;
298 void *p;
299};
300
301The v4l2_ctrl struct contains these fields that can be used to access both
302current and new values:
303
304 s32 val;
305 struct {
295 s32 val; 306 s32 val;
296 s64 val64;
297 char *string;
298 } cur; 307 } cur;
299 308
300 /* The new control value. */
301 union {
302 s32 val;
303 s64 val64;
304 char *string;
305 };
306 309
307Within the control ops you can freely use these. The val and val64 speak for 310 union v4l2_ctrl_ptr p_new;
308themselves. The string pointers point to character buffers of length 311 union v4l2_ctrl_ptr p_cur;
312
313If the control has a simple s32 type type, then:
314
315 &ctrl->val == ctrl->p_new.p_s32
316 &ctrl->cur.val == ctrl->p_cur.p_s32
317
318For all other types use ctrl->p_cur.p<something>. Basically the val
319and cur.val fields can be considered an alias since these are used so often.
320
321Within the control ops you can freely use these. The val and cur.val speak for
322themselves. The p_char pointers point to character buffers of length
309ctrl->maximum + 1, and are always 0-terminated. 323ctrl->maximum + 1, and are always 0-terminated.
310 324
311In most cases 'cur' contains the current cached control value. When you create 325Unless the control is marked volatile the p_cur field points to the the
312a new control this value is made identical to the default value. After calling 326current cached control value. When you create a new control this value is made
313v4l2_ctrl_handler_setup() this value is passed to the hardware. It is generally 327identical to the default value. After calling v4l2_ctrl_handler_setup() this
314a good idea to call this function. 328value is passed to the hardware. It is generally a good idea to call this
329function.
315 330
316Whenever a new value is set that new value is automatically cached. This means 331Whenever a new value is set that new value is automatically cached. This means
317that most drivers do not need to implement the g_volatile_ctrl() op. The 332that most drivers do not need to implement the g_volatile_ctrl() op. The
@@ -362,8 +377,8 @@ will result in a deadlock since these helpers lock the handler as well.
362You can also take the handler lock yourself: 377You can also take the handler lock yourself:
363 378
364 mutex_lock(&state->ctrl_handler.lock); 379 mutex_lock(&state->ctrl_handler.lock);
365 printk(KERN_INFO "String value is '%s'\n", ctrl1->cur.string); 380 pr_info("String value is '%s'\n", ctrl1->p_cur.p_char);
366 printk(KERN_INFO "Integer value is '%s'\n", ctrl2->cur.val); 381 pr_info("Integer value is '%s'\n", ctrl2->cur.val);
367 mutex_unlock(&state->ctrl_handler.lock); 382 mutex_unlock(&state->ctrl_handler.lock);
368 383
369 384
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt
index 667a43361706..a11dff07ef71 100644
--- a/Documentation/video4linux/v4l2-framework.txt
+++ b/Documentation/video4linux/v4l2-framework.txt
@@ -675,11 +675,6 @@ You should also set these fields:
675 video_device is initialized you *do* know which parent PCI device to use and 675 video_device is initialized you *do* know which parent PCI device to use and
676 so you set dev_device to the correct PCI device. 676 so you set dev_device to the correct PCI device.
677 677
678- flags: optional. Set to V4L2_FL_USE_FH_PRIO if you want to let the framework
679 handle the VIDIOC_G/S_PRIORITY ioctls. This requires that you use struct
680 v4l2_fh. Eventually this flag will disappear once all drivers use the core
681 priority handling. But for now it has to be set explicitly.
682
683If you use v4l2_ioctl_ops, then you should set .unlocked_ioctl to video_ioctl2 678If you use v4l2_ioctl_ops, then you should set .unlocked_ioctl to video_ioctl2
684in your v4l2_file_operations struct. 679in your v4l2_file_operations struct.
685 680
@@ -909,8 +904,7 @@ struct v4l2_fh
909 904
910struct v4l2_fh provides a way to easily keep file handle specific data 905struct v4l2_fh provides a way to easily keep file handle specific data
911that is used by the V4L2 framework. New drivers must use struct v4l2_fh 906that is used by the V4L2 framework. New drivers must use struct v4l2_fh
912since it is also used to implement priority handling (VIDIOC_G/S_PRIORITY) 907since it is also used to implement priority handling (VIDIOC_G/S_PRIORITY).
913if the video_device flag V4L2_FL_USE_FH_PRIO is also set.
914 908
915The users of v4l2_fh (in the V4L2 framework, not the driver) know 909The users of v4l2_fh (in the V4L2 framework, not the driver) know
916whether a driver uses v4l2_fh as its file->private_data pointer by 910whether a driver uses v4l2_fh as its file->private_data pointer by
diff --git a/Documentation/video4linux/v4l2-pci-skeleton.c b/Documentation/video4linux/v4l2-pci-skeleton.c
index 46904fe49609..006721e43b2a 100644
--- a/Documentation/video4linux/v4l2-pci-skeleton.c
+++ b/Documentation/video4linux/v4l2-pci-skeleton.c
@@ -883,11 +883,6 @@ static int skeleton_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
883 vdev->v4l2_dev = &skel->v4l2_dev; 883 vdev->v4l2_dev = &skel->v4l2_dev;
884 /* Supported SDTV standards, if any */ 884 /* Supported SDTV standards, if any */
885 vdev->tvnorms = SKEL_TVNORMS; 885 vdev->tvnorms = SKEL_TVNORMS;
886 /* If this bit is set, then the v4l2 core will provide the support
887 * for the VIDIOC_G/S_PRIORITY ioctls. This flag will eventually
888 * go away once all drivers have been converted to use struct v4l2_fh.
889 */
890 set_bit(V4L2_FL_USE_FH_PRIO, &vdev->flags);
891 video_set_drvdata(vdev, skel); 886 video_set_drvdata(vdev, skel);
892 887
893 ret = video_register_device(vdev, VFL_TYPE_GRABBER, -1); 888 ret = video_register_device(vdev, VFL_TYPE_GRABBER, -1);
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index 0fe36497642c..68cda1fc3d52 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -297,6 +297,15 @@ struct kvm_regs {
297 __u64 rip, rflags; 297 __u64 rip, rflags;
298}; 298};
299 299
300/* mips */
301struct kvm_regs {
302 /* out (KVM_GET_REGS) / in (KVM_SET_REGS) */
303 __u64 gpr[32];
304 __u64 hi;
305 __u64 lo;
306 __u64 pc;
307};
308
300 309
3014.12 KVM_SET_REGS 3104.12 KVM_SET_REGS
302 311
@@ -378,7 +387,7 @@ struct kvm_translation {
3784.16 KVM_INTERRUPT 3874.16 KVM_INTERRUPT
379 388
380Capability: basic 389Capability: basic
381Architectures: x86, ppc 390Architectures: x86, ppc, mips
382Type: vcpu ioctl 391Type: vcpu ioctl
383Parameters: struct kvm_interrupt (in) 392Parameters: struct kvm_interrupt (in)
384Returns: 0 on success, -1 on error 393Returns: 0 on success, -1 on error
@@ -423,6 +432,11 @@ c) KVM_INTERRUPT_SET_LEVEL
423Note that any value for 'irq' other than the ones stated above is invalid 432Note that any value for 'irq' other than the ones stated above is invalid
424and incurs unexpected behavior. 433and incurs unexpected behavior.
425 434
435MIPS:
436
437Queues an external interrupt to be injected into the virtual CPU. A negative
438interrupt number dequeues the interrupt.
439
426 440
4274.17 KVM_DEBUG_GUEST 4414.17 KVM_DEBUG_GUEST
428 442
@@ -512,7 +526,7 @@ struct kvm_cpuid {
5124.21 KVM_SET_SIGNAL_MASK 5264.21 KVM_SET_SIGNAL_MASK
513 527
514Capability: basic 528Capability: basic
515Architectures: x86 529Architectures: all
516Type: vcpu ioctl 530Type: vcpu ioctl
517Parameters: struct kvm_signal_mask (in) 531Parameters: struct kvm_signal_mask (in)
518Returns: 0 on success, -1 on error 532Returns: 0 on success, -1 on error
@@ -974,7 +988,7 @@ for vm-wide capabilities.
9744.38 KVM_GET_MP_STATE 9884.38 KVM_GET_MP_STATE
975 989
976Capability: KVM_CAP_MP_STATE 990Capability: KVM_CAP_MP_STATE
977Architectures: x86, ia64 991Architectures: x86, ia64, s390
978Type: vcpu ioctl 992Type: vcpu ioctl
979Parameters: struct kvm_mp_state (out) 993Parameters: struct kvm_mp_state (out)
980Returns: 0 on success; -1 on error 994Returns: 0 on success; -1 on error
@@ -988,24 +1002,32 @@ uniprocessor guests).
988 1002
989Possible values are: 1003Possible values are:
990 1004
991 - KVM_MP_STATE_RUNNABLE: the vcpu is currently running 1005 - KVM_MP_STATE_RUNNABLE: the vcpu is currently running [x86, ia64]
992 - KVM_MP_STATE_UNINITIALIZED: the vcpu is an application processor (AP) 1006 - KVM_MP_STATE_UNINITIALIZED: the vcpu is an application processor (AP)
993 which has not yet received an INIT signal 1007 which has not yet received an INIT signal [x86,
1008 ia64]
994 - KVM_MP_STATE_INIT_RECEIVED: the vcpu has received an INIT signal, and is 1009 - KVM_MP_STATE_INIT_RECEIVED: the vcpu has received an INIT signal, and is
995 now ready for a SIPI 1010 now ready for a SIPI [x86, ia64]
996 - KVM_MP_STATE_HALTED: the vcpu has executed a HLT instruction and 1011 - KVM_MP_STATE_HALTED: the vcpu has executed a HLT instruction and
997 is waiting for an interrupt 1012 is waiting for an interrupt [x86, ia64]
998 - KVM_MP_STATE_SIPI_RECEIVED: the vcpu has just received a SIPI (vector 1013 - KVM_MP_STATE_SIPI_RECEIVED: the vcpu has just received a SIPI (vector
999 accessible via KVM_GET_VCPU_EVENTS) 1014 accessible via KVM_GET_VCPU_EVENTS) [x86, ia64]
1015 - KVM_MP_STATE_STOPPED: the vcpu is stopped [s390]
1016 - KVM_MP_STATE_CHECK_STOP: the vcpu is in a special error state [s390]
1017 - KVM_MP_STATE_OPERATING: the vcpu is operating (running or halted)
1018 [s390]
1019 - KVM_MP_STATE_LOAD: the vcpu is in a special load/startup state
1020 [s390]
1000 1021
1001This ioctl is only useful after KVM_CREATE_IRQCHIP. Without an in-kernel 1022On x86 and ia64, this ioctl is only useful after KVM_CREATE_IRQCHIP. Without an
1002irqchip, the multiprocessing state must be maintained by userspace. 1023in-kernel irqchip, the multiprocessing state must be maintained by userspace on
1024these architectures.
1003 1025
1004 1026
10054.39 KVM_SET_MP_STATE 10274.39 KVM_SET_MP_STATE
1006 1028
1007Capability: KVM_CAP_MP_STATE 1029Capability: KVM_CAP_MP_STATE
1008Architectures: x86, ia64 1030Architectures: x86, ia64, s390
1009Type: vcpu ioctl 1031Type: vcpu ioctl
1010Parameters: struct kvm_mp_state (in) 1032Parameters: struct kvm_mp_state (in)
1011Returns: 0 on success; -1 on error 1033Returns: 0 on success; -1 on error
@@ -1013,8 +1035,9 @@ Returns: 0 on success; -1 on error
1013Sets the vcpu's current "multiprocessing state"; see KVM_GET_MP_STATE for 1035Sets the vcpu's current "multiprocessing state"; see KVM_GET_MP_STATE for
1014arguments. 1036arguments.
1015 1037
1016This ioctl is only useful after KVM_CREATE_IRQCHIP. Without an in-kernel 1038On x86 and ia64, this ioctl is only useful after KVM_CREATE_IRQCHIP. Without an
1017irqchip, the multiprocessing state must be maintained by userspace. 1039in-kernel irqchip, the multiprocessing state must be maintained by userspace on
1040these architectures.
1018 1041
1019 1042
10204.40 KVM_SET_IDENTITY_MAP_ADDR 10434.40 KVM_SET_IDENTITY_MAP_ADDR
@@ -1774,122 +1797,151 @@ and architecture specific registers. Each have their own range of operation
1774and their own constants and width. To keep track of the implemented 1797and their own constants and width. To keep track of the implemented
1775registers, find a list below: 1798registers, find a list below:
1776 1799
1777 Arch | Register | Width (bits) 1800 Arch | Register | Width (bits)
1778 | | 1801 | |
1779 PPC | KVM_REG_PPC_HIOR | 64 1802 PPC | KVM_REG_PPC_HIOR | 64
1780 PPC | KVM_REG_PPC_IAC1 | 64 1803 PPC | KVM_REG_PPC_IAC1 | 64
1781 PPC | KVM_REG_PPC_IAC2 | 64 1804 PPC | KVM_REG_PPC_IAC2 | 64
1782 PPC | KVM_REG_PPC_IAC3 | 64 1805 PPC | KVM_REG_PPC_IAC3 | 64
1783 PPC | KVM_REG_PPC_IAC4 | 64 1806 PPC | KVM_REG_PPC_IAC4 | 64
1784 PPC | KVM_REG_PPC_DAC1 | 64 1807 PPC | KVM_REG_PPC_DAC1 | 64
1785 PPC | KVM_REG_PPC_DAC2 | 64 1808 PPC | KVM_REG_PPC_DAC2 | 64
1786 PPC | KVM_REG_PPC_DABR | 64 1809 PPC | KVM_REG_PPC_DABR | 64
1787 PPC | KVM_REG_PPC_DSCR | 64 1810 PPC | KVM_REG_PPC_DSCR | 64
1788 PPC | KVM_REG_PPC_PURR | 64 1811 PPC | KVM_REG_PPC_PURR | 64
1789 PPC | KVM_REG_PPC_SPURR | 64 1812 PPC | KVM_REG_PPC_SPURR | 64
1790 PPC | KVM_REG_PPC_DAR | 64 1813 PPC | KVM_REG_PPC_DAR | 64
1791 PPC | KVM_REG_PPC_DSISR | 32 1814 PPC | KVM_REG_PPC_DSISR | 32
1792 PPC | KVM_REG_PPC_AMR | 64 1815 PPC | KVM_REG_PPC_AMR | 64
1793 PPC | KVM_REG_PPC_UAMOR | 64 1816 PPC | KVM_REG_PPC_UAMOR | 64
1794 PPC | KVM_REG_PPC_MMCR0 | 64 1817 PPC | KVM_REG_PPC_MMCR0 | 64
1795 PPC | KVM_REG_PPC_MMCR1 | 64 1818 PPC | KVM_REG_PPC_MMCR1 | 64
1796 PPC | KVM_REG_PPC_MMCRA | 64 1819 PPC | KVM_REG_PPC_MMCRA | 64
1797 PPC | KVM_REG_PPC_MMCR2 | 64 1820 PPC | KVM_REG_PPC_MMCR2 | 64
1798 PPC | KVM_REG_PPC_MMCRS | 64 1821 PPC | KVM_REG_PPC_MMCRS | 64
1799 PPC | KVM_REG_PPC_SIAR | 64 1822 PPC | KVM_REG_PPC_SIAR | 64
1800 PPC | KVM_REG_PPC_SDAR | 64 1823 PPC | KVM_REG_PPC_SDAR | 64
1801 PPC | KVM_REG_PPC_SIER | 64 1824 PPC | KVM_REG_PPC_SIER | 64
1802 PPC | KVM_REG_PPC_PMC1 | 32 1825 PPC | KVM_REG_PPC_PMC1 | 32
1803 PPC | KVM_REG_PPC_PMC2 | 32 1826 PPC | KVM_REG_PPC_PMC2 | 32
1804 PPC | KVM_REG_PPC_PMC3 | 32 1827 PPC | KVM_REG_PPC_PMC3 | 32
1805 PPC | KVM_REG_PPC_PMC4 | 32 1828 PPC | KVM_REG_PPC_PMC4 | 32
1806 PPC | KVM_REG_PPC_PMC5 | 32 1829 PPC | KVM_REG_PPC_PMC5 | 32
1807 PPC | KVM_REG_PPC_PMC6 | 32 1830 PPC | KVM_REG_PPC_PMC6 | 32
1808 PPC | KVM_REG_PPC_PMC7 | 32 1831 PPC | KVM_REG_PPC_PMC7 | 32
1809 PPC | KVM_REG_PPC_PMC8 | 32 1832 PPC | KVM_REG_PPC_PMC8 | 32
1810 PPC | KVM_REG_PPC_FPR0 | 64 1833 PPC | KVM_REG_PPC_FPR0 | 64
1834 ...
1835 PPC | KVM_REG_PPC_FPR31 | 64
1836 PPC | KVM_REG_PPC_VR0 | 128
1811 ... 1837 ...
1812 PPC | KVM_REG_PPC_FPR31 | 64 1838 PPC | KVM_REG_PPC_VR31 | 128
1813 PPC | KVM_REG_PPC_VR0 | 128 1839 PPC | KVM_REG_PPC_VSR0 | 128
1814 ... 1840 ...
1815 PPC | KVM_REG_PPC_VR31 | 128 1841 PPC | KVM_REG_PPC_VSR31 | 128
1816 PPC | KVM_REG_PPC_VSR0 | 128 1842 PPC | KVM_REG_PPC_FPSCR | 64
1843 PPC | KVM_REG_PPC_VSCR | 32
1844 PPC | KVM_REG_PPC_VPA_ADDR | 64
1845 PPC | KVM_REG_PPC_VPA_SLB | 128
1846 PPC | KVM_REG_PPC_VPA_DTL | 128
1847 PPC | KVM_REG_PPC_EPCR | 32
1848 PPC | KVM_REG_PPC_EPR | 32
1849 PPC | KVM_REG_PPC_TCR | 32
1850 PPC | KVM_REG_PPC_TSR | 32
1851 PPC | KVM_REG_PPC_OR_TSR | 32
1852 PPC | KVM_REG_PPC_CLEAR_TSR | 32
1853 PPC | KVM_REG_PPC_MAS0 | 32
1854 PPC | KVM_REG_PPC_MAS1 | 32
1855 PPC | KVM_REG_PPC_MAS2 | 64
1856 PPC | KVM_REG_PPC_MAS7_3 | 64
1857 PPC | KVM_REG_PPC_MAS4 | 32
1858 PPC | KVM_REG_PPC_MAS6 | 32
1859 PPC | KVM_REG_PPC_MMUCFG | 32
1860 PPC | KVM_REG_PPC_TLB0CFG | 32
1861 PPC | KVM_REG_PPC_TLB1CFG | 32
1862 PPC | KVM_REG_PPC_TLB2CFG | 32
1863 PPC | KVM_REG_PPC_TLB3CFG | 32
1864 PPC | KVM_REG_PPC_TLB0PS | 32
1865 PPC | KVM_REG_PPC_TLB1PS | 32
1866 PPC | KVM_REG_PPC_TLB2PS | 32
1867 PPC | KVM_REG_PPC_TLB3PS | 32
1868 PPC | KVM_REG_PPC_EPTCFG | 32
1869 PPC | KVM_REG_PPC_ICP_STATE | 64
1870 PPC | KVM_REG_PPC_TB_OFFSET | 64
1871 PPC | KVM_REG_PPC_SPMC1 | 32
1872 PPC | KVM_REG_PPC_SPMC2 | 32
1873 PPC | KVM_REG_PPC_IAMR | 64
1874 PPC | KVM_REG_PPC_TFHAR | 64
1875 PPC | KVM_REG_PPC_TFIAR | 64
1876 PPC | KVM_REG_PPC_TEXASR | 64
1877 PPC | KVM_REG_PPC_FSCR | 64
1878 PPC | KVM_REG_PPC_PSPB | 32
1879 PPC | KVM_REG_PPC_EBBHR | 64
1880 PPC | KVM_REG_PPC_EBBRR | 64
1881 PPC | KVM_REG_PPC_BESCR | 64
1882 PPC | KVM_REG_PPC_TAR | 64
1883 PPC | KVM_REG_PPC_DPDES | 64
1884 PPC | KVM_REG_PPC_DAWR | 64
1885 PPC | KVM_REG_PPC_DAWRX | 64
1886 PPC | KVM_REG_PPC_CIABR | 64
1887 PPC | KVM_REG_PPC_IC | 64
1888 PPC | KVM_REG_PPC_VTB | 64
1889 PPC | KVM_REG_PPC_CSIGR | 64
1890 PPC | KVM_REG_PPC_TACR | 64
1891 PPC | KVM_REG_PPC_TCSCR | 64
1892 PPC | KVM_REG_PPC_PID | 64
1893 PPC | KVM_REG_PPC_ACOP | 64
1894 PPC | KVM_REG_PPC_VRSAVE | 32
1895 PPC | KVM_REG_PPC_LPCR | 64
1896 PPC | KVM_REG_PPC_PPR | 64
1897 PPC | KVM_REG_PPC_ARCH_COMPAT | 32
1898 PPC | KVM_REG_PPC_DABRX | 32
1899 PPC | KVM_REG_PPC_WORT | 64
1900 PPC | KVM_REG_PPC_TM_GPR0 | 64
1817 ... 1901 ...
1818 PPC | KVM_REG_PPC_VSR31 | 128 1902 PPC | KVM_REG_PPC_TM_GPR31 | 64
1819 PPC | KVM_REG_PPC_FPSCR | 64 1903 PPC | KVM_REG_PPC_TM_VSR0 | 128
1820 PPC | KVM_REG_PPC_VSCR | 32
1821 PPC | KVM_REG_PPC_VPA_ADDR | 64
1822 PPC | KVM_REG_PPC_VPA_SLB | 128
1823 PPC | KVM_REG_PPC_VPA_DTL | 128
1824 PPC | KVM_REG_PPC_EPCR | 32
1825 PPC | KVM_REG_PPC_EPR | 32
1826 PPC | KVM_REG_PPC_TCR | 32
1827 PPC | KVM_REG_PPC_TSR | 32
1828 PPC | KVM_REG_PPC_OR_TSR | 32
1829 PPC | KVM_REG_PPC_CLEAR_TSR | 32
1830 PPC | KVM_REG_PPC_MAS0 | 32
1831 PPC | KVM_REG_PPC_MAS1 | 32
1832 PPC | KVM_REG_PPC_MAS2 | 64
1833 PPC | KVM_REG_PPC_MAS7_3 | 64
1834 PPC | KVM_REG_PPC_MAS4 | 32
1835 PPC | KVM_REG_PPC_MAS6 | 32
1836 PPC | KVM_REG_PPC_MMUCFG | 32
1837 PPC | KVM_REG_PPC_TLB0CFG | 32
1838 PPC | KVM_REG_PPC_TLB1CFG | 32
1839 PPC | KVM_REG_PPC_TLB2CFG | 32
1840 PPC | KVM_REG_PPC_TLB3CFG | 32
1841 PPC | KVM_REG_PPC_TLB0PS | 32
1842 PPC | KVM_REG_PPC_TLB1PS | 32
1843 PPC | KVM_REG_PPC_TLB2PS | 32
1844 PPC | KVM_REG_PPC_TLB3PS | 32
1845 PPC | KVM_REG_PPC_EPTCFG | 32
1846 PPC | KVM_REG_PPC_ICP_STATE | 64
1847 PPC | KVM_REG_PPC_TB_OFFSET | 64
1848 PPC | KVM_REG_PPC_SPMC1 | 32
1849 PPC | KVM_REG_PPC_SPMC2 | 32
1850 PPC | KVM_REG_PPC_IAMR | 64
1851 PPC | KVM_REG_PPC_TFHAR | 64
1852 PPC | KVM_REG_PPC_TFIAR | 64
1853 PPC | KVM_REG_PPC_TEXASR | 64
1854 PPC | KVM_REG_PPC_FSCR | 64
1855 PPC | KVM_REG_PPC_PSPB | 32
1856 PPC | KVM_REG_PPC_EBBHR | 64
1857 PPC | KVM_REG_PPC_EBBRR | 64
1858 PPC | KVM_REG_PPC_BESCR | 64
1859 PPC | KVM_REG_PPC_TAR | 64
1860 PPC | KVM_REG_PPC_DPDES | 64
1861 PPC | KVM_REG_PPC_DAWR | 64
1862 PPC | KVM_REG_PPC_DAWRX | 64
1863 PPC | KVM_REG_PPC_CIABR | 64
1864 PPC | KVM_REG_PPC_IC | 64
1865 PPC | KVM_REG_PPC_VTB | 64
1866 PPC | KVM_REG_PPC_CSIGR | 64
1867 PPC | KVM_REG_PPC_TACR | 64
1868 PPC | KVM_REG_PPC_TCSCR | 64
1869 PPC | KVM_REG_PPC_PID | 64
1870 PPC | KVM_REG_PPC_ACOP | 64
1871 PPC | KVM_REG_PPC_VRSAVE | 32
1872 PPC | KVM_REG_PPC_LPCR | 64
1873 PPC | KVM_REG_PPC_PPR | 64
1874 PPC | KVM_REG_PPC_ARCH_COMPAT 32
1875 PPC | KVM_REG_PPC_DABRX | 32
1876 PPC | KVM_REG_PPC_WORT | 64
1877 PPC | KVM_REG_PPC_TM_GPR0 | 64
1878 ... 1904 ...
1879 PPC | KVM_REG_PPC_TM_GPR31 | 64 1905 PPC | KVM_REG_PPC_TM_VSR63 | 128
1880 PPC | KVM_REG_PPC_TM_VSR0 | 128 1906 PPC | KVM_REG_PPC_TM_CR | 64
1907 PPC | KVM_REG_PPC_TM_LR | 64
1908 PPC | KVM_REG_PPC_TM_CTR | 64
1909 PPC | KVM_REG_PPC_TM_FPSCR | 64
1910 PPC | KVM_REG_PPC_TM_AMR | 64
1911 PPC | KVM_REG_PPC_TM_PPR | 64
1912 PPC | KVM_REG_PPC_TM_VRSAVE | 64
1913 PPC | KVM_REG_PPC_TM_VSCR | 32
1914 PPC | KVM_REG_PPC_TM_DSCR | 64
1915 PPC | KVM_REG_PPC_TM_TAR | 64
1916 | |
1917 MIPS | KVM_REG_MIPS_R0 | 64
1881 ... 1918 ...
1882 PPC | KVM_REG_PPC_TM_VSR63 | 128 1919 MIPS | KVM_REG_MIPS_R31 | 64
1883 PPC | KVM_REG_PPC_TM_CR | 64 1920 MIPS | KVM_REG_MIPS_HI | 64
1884 PPC | KVM_REG_PPC_TM_LR | 64 1921 MIPS | KVM_REG_MIPS_LO | 64
1885 PPC | KVM_REG_PPC_TM_CTR | 64 1922 MIPS | KVM_REG_MIPS_PC | 64
1886 PPC | KVM_REG_PPC_TM_FPSCR | 64 1923 MIPS | KVM_REG_MIPS_CP0_INDEX | 32
1887 PPC | KVM_REG_PPC_TM_AMR | 64 1924 MIPS | KVM_REG_MIPS_CP0_CONTEXT | 64
1888 PPC | KVM_REG_PPC_TM_PPR | 64 1925 MIPS | KVM_REG_MIPS_CP0_USERLOCAL | 64
1889 PPC | KVM_REG_PPC_TM_VRSAVE | 64 1926 MIPS | KVM_REG_MIPS_CP0_PAGEMASK | 32
1890 PPC | KVM_REG_PPC_TM_VSCR | 32 1927 MIPS | KVM_REG_MIPS_CP0_WIRED | 32
1891 PPC | KVM_REG_PPC_TM_DSCR | 64 1928 MIPS | KVM_REG_MIPS_CP0_HWRENA | 32
1892 PPC | KVM_REG_PPC_TM_TAR | 64 1929 MIPS | KVM_REG_MIPS_CP0_BADVADDR | 64
1930 MIPS | KVM_REG_MIPS_CP0_COUNT | 32
1931 MIPS | KVM_REG_MIPS_CP0_ENTRYHI | 64
1932 MIPS | KVM_REG_MIPS_CP0_COMPARE | 32
1933 MIPS | KVM_REG_MIPS_CP0_STATUS | 32
1934 MIPS | KVM_REG_MIPS_CP0_CAUSE | 32
1935 MIPS | KVM_REG_MIPS_CP0_EPC | 64
1936 MIPS | KVM_REG_MIPS_CP0_CONFIG | 32
1937 MIPS | KVM_REG_MIPS_CP0_CONFIG1 | 32
1938 MIPS | KVM_REG_MIPS_CP0_CONFIG2 | 32
1939 MIPS | KVM_REG_MIPS_CP0_CONFIG3 | 32
1940 MIPS | KVM_REG_MIPS_CP0_CONFIG7 | 32
1941 MIPS | KVM_REG_MIPS_CP0_ERROREPC | 64
1942 MIPS | KVM_REG_MIPS_COUNT_CTL | 64
1943 MIPS | KVM_REG_MIPS_COUNT_RESUME | 64
1944 MIPS | KVM_REG_MIPS_COUNT_HZ | 64
1893 1945
1894ARM registers are mapped using the lower 32 bits. The upper 16 of that 1946ARM registers are mapped using the lower 32 bits. The upper 16 of that
1895is the register group type, or coprocessor number: 1947is the register group type, or coprocessor number:
@@ -1928,6 +1980,22 @@ arm64 CCSIDR registers are demultiplexed by CSSELR value:
1928arm64 system registers have the following id bit patterns: 1980arm64 system registers have the following id bit patterns:
1929 0x6030 0000 0013 <op0:2> <op1:3> <crn:4> <crm:4> <op2:3> 1981 0x6030 0000 0013 <op0:2> <op1:3> <crn:4> <crm:4> <op2:3>
1930 1982
1983
1984MIPS registers are mapped using the lower 32 bits. The upper 16 of that is
1985the register group type:
1986
1987MIPS core registers (see above) have the following id bit patterns:
1988 0x7030 0000 0000 <reg:16>
1989
1990MIPS CP0 registers (see KVM_REG_MIPS_CP0_* above) have the following id bit
1991patterns depending on whether they're 32-bit or 64-bit registers:
1992 0x7020 0000 0001 00 <reg:5> <sel:3> (32-bit)
1993 0x7030 0000 0001 00 <reg:5> <sel:3> (64-bit)
1994
1995MIPS KVM control registers (see above) have the following id bit patterns:
1996 0x7030 0000 0002 <reg:16>
1997
1998
19314.69 KVM_GET_ONE_REG 19994.69 KVM_GET_ONE_REG
1932 2000
1933Capability: KVM_CAP_ONE_REG 2001Capability: KVM_CAP_ONE_REG
@@ -2415,7 +2483,7 @@ in VCPU matching underlying host.
24154.84 KVM_GET_REG_LIST 24834.84 KVM_GET_REG_LIST
2416 2484
2417Capability: basic 2485Capability: basic
2418Architectures: arm, arm64 2486Architectures: arm, arm64, mips
2419Type: vcpu ioctl 2487Type: vcpu ioctl
2420Parameters: struct kvm_reg_list (in/out) 2488Parameters: struct kvm_reg_list (in/out)
2421Returns: 0 on success; -1 on error 2489Returns: 0 on success; -1 on error
@@ -2866,15 +2934,18 @@ The fields in each entry are defined as follows:
28666. Capabilities that can be enabled 29346. Capabilities that can be enabled
2867----------------------------------- 2935-----------------------------------
2868 2936
2869There are certain capabilities that change the behavior of the virtual CPU when 2937There are certain capabilities that change the behavior of the virtual CPU or
2870enabled. To enable them, please see section 4.37. Below you can find a list of 2938the virtual machine when enabled. To enable them, please see section 4.37.
2871capabilities and what their effect on the vCPU is when enabling them. 2939Below you can find a list of capabilities and what their effect on the vCPU or
2940the virtual machine is when enabling them.
2872 2941
2873The following information is provided along with the description: 2942The following information is provided along with the description:
2874 2943
2875 Architectures: which instruction set architectures provide this ioctl. 2944 Architectures: which instruction set architectures provide this ioctl.
2876 x86 includes both i386 and x86_64. 2945 x86 includes both i386 and x86_64.
2877 2946
2947 Target: whether this is a per-vcpu or per-vm capability.
2948
2878 Parameters: what parameters are accepted by the capability. 2949 Parameters: what parameters are accepted by the capability.
2879 2950
2880 Returns: the return value. General error numbers (EBADF, ENOMEM, EINVAL) 2951 Returns: the return value. General error numbers (EBADF, ENOMEM, EINVAL)
@@ -2884,6 +2955,7 @@ The following information is provided along with the description:
28846.1 KVM_CAP_PPC_OSI 29556.1 KVM_CAP_PPC_OSI
2885 2956
2886Architectures: ppc 2957Architectures: ppc
2958Target: vcpu
2887Parameters: none 2959Parameters: none
2888Returns: 0 on success; -1 on error 2960Returns: 0 on success; -1 on error
2889 2961
@@ -2898,6 +2970,7 @@ When this capability is enabled, KVM_EXIT_OSI can occur.
28986.2 KVM_CAP_PPC_PAPR 29706.2 KVM_CAP_PPC_PAPR
2899 2971
2900Architectures: ppc 2972Architectures: ppc
2973Target: vcpu
2901Parameters: none 2974Parameters: none
2902Returns: 0 on success; -1 on error 2975Returns: 0 on success; -1 on error
2903 2976
@@ -2917,6 +2990,7 @@ When this capability is enabled, KVM_EXIT_PAPR_HCALL can occur.
29176.3 KVM_CAP_SW_TLB 29906.3 KVM_CAP_SW_TLB
2918 2991
2919Architectures: ppc 2992Architectures: ppc
2993Target: vcpu
2920Parameters: args[0] is the address of a struct kvm_config_tlb 2994Parameters: args[0] is the address of a struct kvm_config_tlb
2921Returns: 0 on success; -1 on error 2995Returns: 0 on success; -1 on error
2922 2996
@@ -2959,6 +3033,7 @@ For mmu types KVM_MMU_FSL_BOOKE_NOHV and KVM_MMU_FSL_BOOKE_HV:
29596.4 KVM_CAP_S390_CSS_SUPPORT 30336.4 KVM_CAP_S390_CSS_SUPPORT
2960 3034
2961Architectures: s390 3035Architectures: s390
3036Target: vcpu
2962Parameters: none 3037Parameters: none
2963Returns: 0 on success; -1 on error 3038Returns: 0 on success; -1 on error
2964 3039
@@ -2970,9 +3045,13 @@ handled in-kernel, while the other I/O instructions are passed to userspace.
2970When this capability is enabled, KVM_EXIT_S390_TSCH will occur on TEST 3045When this capability is enabled, KVM_EXIT_S390_TSCH will occur on TEST
2971SUBCHANNEL intercepts. 3046SUBCHANNEL intercepts.
2972 3047
3048Note that even though this capability is enabled per-vcpu, the complete
3049virtual machine is affected.
3050
29736.5 KVM_CAP_PPC_EPR 30516.5 KVM_CAP_PPC_EPR
2974 3052
2975Architectures: ppc 3053Architectures: ppc
3054Target: vcpu
2976Parameters: args[0] defines whether the proxy facility is active 3055Parameters: args[0] defines whether the proxy facility is active
2977Returns: 0 on success; -1 on error 3056Returns: 0 on success; -1 on error
2978 3057
@@ -2998,7 +3077,17 @@ This capability connects the vcpu to an in-kernel MPIC device.
29986.7 KVM_CAP_IRQ_XICS 30776.7 KVM_CAP_IRQ_XICS
2999 3078
3000Architectures: ppc 3079Architectures: ppc
3080Target: vcpu
3001Parameters: args[0] is the XICS device fd 3081Parameters: args[0] is the XICS device fd
3002 args[1] is the XICS CPU number (server ID) for this vcpu 3082 args[1] is the XICS CPU number (server ID) for this vcpu
3003 3083
3004This capability connects the vcpu to an in-kernel XICS device. 3084This capability connects the vcpu to an in-kernel XICS device.
3085
30866.8 KVM_CAP_S390_IRQCHIP
3087
3088Architectures: s390
3089Target: vm
3090Parameters: none
3091
3092This capability enables the in-kernel irqchip for s390. Please refer to
3093"4.24 KVM_CREATE_IRQCHIP" for details.
diff --git a/Documentation/w1/slaves/w1_ds2406 b/Documentation/w1/slaves/w1_ds2406
new file mode 100644
index 000000000000..8137fe6f6c3d
--- /dev/null
+++ b/Documentation/w1/slaves/w1_ds2406
@@ -0,0 +1,25 @@
1w1_ds2406 kernel driver
2=======================
3
4Supported chips:
5 * Maxim DS2406 (and other family 0x12) addressable switches
6
7Author: Scott Alfter <scott@alfter.us>
8
9Description
10-----------
11
12The w1_ds2406 driver allows connected devices to be switched on and off.
13These chips also provide 128 bytes of OTP EPROM, but reading/writing it is
14not supported. In TSOC-6 form, the DS2406 provides two switch outputs and
15can be provided with power on a dedicated input. In TO-92 form, it provides
16one output and uses parasitic power only.
17
18The driver provides two sysfs files. state is readable; it gives the
19current state of each switch, with PIO A in bit 0 and PIO B in bit 1. The
20driver ORs this state with 0x30, so shell scripts get an ASCII 0/1/2/3 to
21work with. output is writable; bits 0 and 1 control PIO A and B,
22respectively. Bits 2-7 are ignored, so it's safe to write ASCII data.
23
24CRCs are checked on read and write. Failed checks cause an I/O error to be
25returned. On a failed write, the switch status is not changed.
diff --git a/Documentation/x86/tlb.txt b/Documentation/x86/tlb.txt
new file mode 100644
index 000000000000..2b3a82e69151
--- /dev/null
+++ b/Documentation/x86/tlb.txt
@@ -0,0 +1,75 @@
1When the kernel unmaps or modified the attributes of a range of
2memory, it has two choices:
3 1. Flush the entire TLB with a two-instruction sequence. This is
4 a quick operation, but it causes collateral damage: TLB entries
5 from areas other than the one we are trying to flush will be
6 destroyed and must be refilled later, at some cost.
7 2. Use the invlpg instruction to invalidate a single page at a
8 time. This could potentialy cost many more instructions, but
9 it is a much more precise operation, causing no collateral
10 damage to other TLB entries.
11
12Which method to do depends on a few things:
13 1. The size of the flush being performed. A flush of the entire
14 address space is obviously better performed by flushing the
15 entire TLB than doing 2^48/PAGE_SIZE individual flushes.
16 2. The contents of the TLB. If the TLB is empty, then there will
17 be no collateral damage caused by doing the global flush, and
18 all of the individual flush will have ended up being wasted
19 work.
20 3. The size of the TLB. The larger the TLB, the more collateral
21 damage we do with a full flush. So, the larger the TLB, the
22 more attrative an individual flush looks. Data and
23 instructions have separate TLBs, as do different page sizes.
24 4. The microarchitecture. The TLB has become a multi-level
25 cache on modern CPUs, and the global flushes have become more
26 expensive relative to single-page flushes.
27
28There is obviously no way the kernel can know all these things,
29especially the contents of the TLB during a given flush. The
30sizes of the flush will vary greatly depending on the workload as
31well. There is essentially no "right" point to choose.
32
33You may be doing too many individual invalidations if you see the
34invlpg instruction (or instructions _near_ it) show up high in
35profiles. If you believe that individual invalidations being
36called too often, you can lower the tunable:
37
38 /sys/debug/kernel/x86/tlb_single_page_flush_ceiling
39
40This will cause us to do the global flush for more cases.
41Lowering it to 0 will disable the use of the individual flushes.
42Setting it to 1 is a very conservative setting and it should
43never need to be 0 under normal circumstances.
44
45Despite the fact that a single individual flush on x86 is
46guaranteed to flush a full 2MB [1], hugetlbfs always uses the full
47flushes. THP is treated exactly the same as normal memory.
48
49You might see invlpg inside of flush_tlb_mm_range() show up in
50profiles, or you can use the trace_tlb_flush() tracepoints. to
51determine how long the flush operations are taking.
52
53Essentially, you are balancing the cycles you spend doing invlpg
54with the cycles that you spend refilling the TLB later.
55
56You can measure how expensive TLB refills are by using
57performance counters and 'perf stat', like this:
58
59perf stat -e
60 cpu/event=0x8,umask=0x84,name=dtlb_load_misses_walk_duration/,
61 cpu/event=0x8,umask=0x82,name=dtlb_load_misses_walk_completed/,
62 cpu/event=0x49,umask=0x4,name=dtlb_store_misses_walk_duration/,
63 cpu/event=0x49,umask=0x2,name=dtlb_store_misses_walk_completed/,
64 cpu/event=0x85,umask=0x4,name=itlb_misses_walk_duration/,
65 cpu/event=0x85,umask=0x2,name=itlb_misses_walk_completed/
66
67That works on an IvyBridge-era CPU (i5-3320M). Different CPUs
68may have differently-named counters, but they should at least
69be there in some form. You can use pmu-tools 'ocperf list'
70(https://github.com/andikleen/pmu-tools) to find the right
71counters for a given CPU.
72
731. A footnote in Intel's SDM "4.10.4.2 Recommended Invalidation"
74 says: "One execution of INVLPG is sufficient even for a page
75 with size greater than 4 KBytes."
diff --git a/Documentation/zh_CN/video4linux/v4l2-framework.txt b/Documentation/zh_CN/video4linux/v4l2-framework.txt
index 0da95dbaef34..2b828e631e31 100644
--- a/Documentation/zh_CN/video4linux/v4l2-framework.txt
+++ b/Documentation/zh_CN/video4linux/v4l2-framework.txt
@@ -580,11 +580,6 @@ release()回调必须被设置,且在最后一个 video_device 用户退出之
580 v4l2_device 无法与特定的 PCI 设备关联,所有没有设置父设备。但当 580 v4l2_device 无法与特定的 PCI 设备关联,所有没有设置父设备。但当
581 video_device 配置后,就知道使用哪个父 PCI 设备了。 581 video_device 配置后,就知道使用哪个父 PCI 设备了。
582 582
583- flags:可选。如果你要让框架处理设置 VIDIOC_G/S_PRIORITY ioctls,
584 请设置 V4L2_FL_USE_FH_PRIO。这要求你使用 v4l2_fh 结构体。
585 一旦所有驱动使用了核心的优先级处理,最终这个标志将消失。但现在它
586 必须被显式设置。
587
588如果你使用 v4l2_ioctl_ops,则应该在 v4l2_file_operations 结构体中 583如果你使用 v4l2_ioctl_ops,则应该在 v4l2_file_operations 结构体中
589设置 .unlocked_ioctl 指向 video_ioctl2。 584设置 .unlocked_ioctl 指向 video_ioctl2。
590 585
@@ -789,7 +784,7 @@ v4l2_fh 结构体
789------------- 784-------------
790 785
791v4l2_fh 结构体提供一个保存用于 V4L2 框架的文件句柄特定数据的简单方法。 786v4l2_fh 结构体提供一个保存用于 V4L2 框架的文件句柄特定数据的简单方法。
792如果 video_device 的 flag 设置了 V4L2_FL_USE_FH_PRIO 标志,新驱动 787如果 video_device 标志,新驱动
793必须使用 v4l2_fh 结构体,因为它也用于实现优先级处理(VIDIOC_G/S_PRIORITY)。 788必须使用 v4l2_fh 结构体,因为它也用于实现优先级处理(VIDIOC_G/S_PRIORITY)。
794 789
795v4l2_fh 的用户(位于 V4l2 框架中,并非驱动)可通过测试 790v4l2_fh 的用户(位于 V4l2 框架中,并非驱动)可通过测试