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-rbd4
-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-leds-gt683r16
-rw-r--r--Documentation/ABI/testing/sysfs-class-mei16
-rw-r--r--Documentation/ABI/testing/sysfs-class-mtd38
-rw-r--r--Documentation/ABI/testing/sysfs-class-net11
-rw-r--r--Documentation/ABI/testing/sysfs-driver-genwqe9
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid-lenovo (renamed from Documentation/ABI/testing/sysfs-driver-hid-lenovo-tpkbd)12
-rw-r--r--Documentation/ABI/testing/sysfs-driver-pciback13
-rw-r--r--Documentation/ABI/testing/sysfs-driver-tegra-fuse11
-rw-r--r--Documentation/ABI/testing/sysfs-driver-wacom70
-rw-r--r--Documentation/ABI/testing/sysfs-fs-nilfs2269
-rw-r--r--Documentation/ABI/testing/sysfs-fs-xfs39
-rw-r--r--Documentation/ABI/testing/sysfs-platform-ts55007
-rw-r--r--Documentation/ABI/testing/sysfs-tty16
-rw-r--r--Documentation/Changes9
-rw-r--r--Documentation/DocBook/device-drivers.tmpl12
-rw-r--r--Documentation/DocBook/drm.tmpl89
-rw-r--r--Documentation/DocBook/gadget.tmpl12
-rw-r--r--Documentation/DocBook/genericirq.tmpl4
-rw-r--r--Documentation/DocBook/kernel-locking.tmpl2
-rw-r--r--Documentation/DocBook/libata.tmpl6
-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/DocBook/media_api.tmpl2
-rw-r--r--Documentation/DocBook/mtdnand.tmpl30
-rw-r--r--Documentation/DocBook/regulator.tmpl2
-rw-r--r--Documentation/DocBook/uio-howto.tmpl4
-rw-r--r--Documentation/DocBook/usb.tmpl2
-rw-r--r--Documentation/DocBook/writing-an-alsa-driver.tmpl2
-rw-r--r--Documentation/PCI/MSI-HOWTO.txt2
-rw-r--r--Documentation/RCU/RTFP.txt4
-rw-r--r--Documentation/RCU/rcuref.txt9
-rw-r--r--Documentation/RCU/whatisRCU.txt2
-rw-r--r--Documentation/SubmittingDrivers4
-rw-r--r--Documentation/SubmittingPatches42
-rw-r--r--Documentation/acpi/enumeration.txt6
-rw-r--r--Documentation/arm/CCN.txt52
-rw-r--r--Documentation/arm/Marvell/README23
-rw-r--r--Documentation/arm/Samsung/Overview.txt11
-rwxr-xr-xDocumentation/arm/Samsung/clksrc-change-registers.awk1
-rw-r--r--Documentation/arm64/booting.txt51
-rw-r--r--Documentation/arm64/memory.txt69
-rw-r--r--Documentation/cgroups/cgroups.txt14
-rw-r--r--Documentation/cgroups/memcg_test.txt160
-rw-r--r--Documentation/cgroups/unified-hierarchy.txt35
-rw-r--r--Documentation/cpu-freq/intel-pstate.txt7
-rw-r--r--Documentation/device-mapper/switch.txt12
-rw-r--r--Documentation/devicetree/bindings/arm/adapteva.txt7
-rw-r--r--Documentation/devicetree/bindings/arm/arm-boards6
-rw-r--r--Documentation/devicetree/bindings/arm/armada-380-mpcore-soc-ctrl.txt14
-rw-r--r--Documentation/devicetree/bindings/arm/atmel-pmc.txt5
-rw-r--r--Documentation/devicetree/bindings/arm/bcm/brcm,bcm11351-cpu-method36
-rw-r--r--Documentation/devicetree/bindings/arm/brcm-brcmstb.txt95
-rw-r--r--Documentation/devicetree/bindings/arm/ccn.txt21
-rw-r--r--Documentation/devicetree/bindings/arm/cpu-enable-method/marvell,berlin-smp41
-rw-r--r--Documentation/devicetree/bindings/arm/cpus.txt4
-rw-r--r--Documentation/devicetree/bindings/arm/exynos/power_domain.txt20
-rw-r--r--Documentation/devicetree/bindings/arm/gic-v3.txt79
-rw-r--r--Documentation/devicetree/bindings/arm/gic.txt1
-rw-r--r--Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt11
-rw-r--r--Documentation/devicetree/bindings/arm/marvell,berlin.txt16
-rw-r--r--Documentation/devicetree/bindings/arm/mediatek.txt8
-rw-r--r--Documentation/devicetree/bindings/arm/omap/crossbar.txt36
-rw-r--r--Documentation/devicetree/bindings/arm/omap/omap.txt3
-rw-r--r--Documentation/devicetree/bindings/arm/omap/prcm.txt65
-rw-r--r--Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt25
-rw-r--r--Documentation/devicetree/bindings/arm/samsung/pmu.txt32
-rw-r--r--Documentation/devicetree/bindings/arm/spear-misc.txt9
-rw-r--r--Documentation/devicetree/bindings/arm/tegra.txt2
-rw-r--r--Documentation/devicetree/bindings/arm/xilinx.txt8
-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/arm-integrator.txt4
-rw-r--r--Documentation/devicetree/bindings/clock/clk-palmas-clk32kg-clocks.txt35
-rw-r--r--Documentation/devicetree/bindings/clock/clk-s5pv210-audss.txt53
-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/imx1-clock.txt26
-rw-r--r--Documentation/devicetree/bindings/clock/imx21-clock.txt28
-rw-r--r--Documentation/devicetree/bindings/clock/imx27-clock.txt127
-rw-r--r--Documentation/devicetree/bindings/clock/imx6q-clock.txt220
-rw-r--r--Documentation/devicetree/bindings/clock/mvebu-cpu-clock.txt5
-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/samsung,s5pv210-clock.txt78
-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/cpufreq/cpufreq-cpu0.txt6
-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/dma/fsl-imx-sdma.txt1
-rw-r--r--Documentation/devicetree/bindings/dma/mpc512x-dma.txt29
-rw-r--r--Documentation/devicetree/bindings/dma/nbpfaxi.txt61
-rw-r--r--Documentation/devicetree/bindings/dma/rcar-audmapp.txt29
-rw-r--r--Documentation/devicetree/bindings/dma/renesas,rcar-dmac.txt98
-rw-r--r--Documentation/devicetree/bindings/dma/ste-dma40.txt74
-rw-r--r--Documentation/devicetree/bindings/dma/sun6i-dma.txt45
-rw-r--r--Documentation/devicetree/bindings/drm/armada/marvell,dove-lcd.txt30
-rw-r--r--Documentation/devicetree/bindings/drm/i2c/tda998x.txt2
-rw-r--r--Documentation/devicetree/bindings/drm/msm/gpu.txt52
-rw-r--r--Documentation/devicetree/bindings/drm/msm/hdmi.txt46
-rw-r--r--Documentation/devicetree/bindings/drm/msm/mdp.txt48
-rw-r--r--Documentation/devicetree/bindings/extcon/extcon-sm5502.txt23
-rw-r--r--Documentation/devicetree/bindings/fuse/nvidia,tegra20-fuse.txt40
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-zynq.txt26
-rw-r--r--Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt43
-rw-r--r--Documentation/devicetree/bindings/gpu/st,stih4xx.txt189
-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/i2c-efm32.txt4
-rw-r--r--Documentation/devicetree/bindings/i2c/trivial-devices.txt3
-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/input/atmel,maxtouch.txt25
-rw-r--r--Documentation/devicetree/bindings/input/cap1106.txt53
-rw-r--r--Documentation/devicetree/bindings/input/touchscreen/pixcir_i2c_ts.txt26
-rw-r--r--Documentation/devicetree/bindings/input/touchscreen/zforce_ts.txt4
-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/leds/pca963x.txt9
-rw-r--r--Documentation/devicetree/bindings/leds/tca6507.txt2
-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/arizona.txt10
-rw-r--r--Documentation/devicetree/bindings/mfd/as3722.txt8
-rw-r--r--Documentation/devicetree/bindings/mfd/palmas.txt2
-rw-r--r--Documentation/devicetree/bindings/mfd/s2mps11.txt11
-rw-r--r--Documentation/devicetree/bindings/mfd/sun6i-prcm.txt2
-rw-r--r--Documentation/devicetree/bindings/misc/nvidia,tegra20-apbmisc.txt13
-rw-r--r--Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt17
-rw-r--r--Documentation/devicetree/bindings/mmc/k3-dw-mshc.txt12
-rw-r--r--Documentation/devicetree/bindings/mmc/mmc.txt4
-rw-r--r--Documentation/devicetree/bindings/mmc/renesas,mmcif.txt32
-rw-r--r--Documentation/devicetree/bindings/mmc/sdhci-msm.txt8
-rw-r--r--Documentation/devicetree/bindings/mmc/sdhci-st.txt33
-rw-r--r--Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt12
-rw-r--r--Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt54
-rw-r--r--Documentation/devicetree/bindings/mmc/tmio_mmc.txt1
-rw-r--r--Documentation/devicetree/bindings/mtd/gpmi-nand.txt10
-rw-r--r--Documentation/devicetree/bindings/net/amd-xgbe-phy.txt6
-rw-r--r--Documentation/devicetree/bindings/net/amd-xgbe.txt17
-rw-r--r--Documentation/devicetree/bindings/net/apm-xgene-enet.txt66
-rw-r--r--Documentation/devicetree/bindings/net/broadcom-systemport.txt3
-rw-r--r--Documentation/devicetree/bindings/net/davinci-mdio.txt8
-rw-r--r--Documentation/devicetree/bindings/net/fsl-fec.txt29
-rw-r--r--Documentation/devicetree/bindings/net/ieee802154/cc2520.txt29
-rw-r--r--Documentation/devicetree/bindings/net/marvell-pp2.txt61
-rw-r--r--Documentation/devicetree/bindings/net/nfc/st21nfcb.txt33
-rw-r--r--Documentation/devicetree/bindings/net/sh_eth.txt1
-rw-r--r--Documentation/devicetree/bindings/net/stmmac.txt6
-rw-r--r--Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt41
-rw-r--r--Documentation/devicetree/bindings/panel/auo,b133htn01.txt7
-rw-r--r--Documentation/devicetree/bindings/panel/foxlink,fl500wvr00-a0t.txt7
-rw-r--r--Documentation/devicetree/bindings/panel/innolux,n116bge.txt7
-rw-r--r--Documentation/devicetree/bindings/panel/innolux,n156bge-l21.txt7
-rw-r--r--Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt30
-rw-r--r--Documentation/devicetree/bindings/pci/spear13xx-pcie.txt14
-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.txt3
-rw-r--r--Documentation/devicetree/bindings/phy/st-spear-miphy.txt15
-rw-r--r--Documentation/devicetree/bindings/phy/ti-phy.txt23
-rw-r--r--Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt2
-rw-r--r--Documentation/devicetree/bindings/pinctrl/nvidia,tegra124-xusb-padctl.txt127
-rw-r--r--Documentation/devicetree/bindings/pinctrl/qcom,apq8064-pinctrl.txt2
-rw-r--r--Documentation/devicetree/bindings/pinctrl/qcom,ipq8064-pinctrl.txt2
-rw-r--r--Documentation/devicetree/bindings/pinctrl/qcom,msm8960-pinctrl.txt181
-rw-r--r--Documentation/devicetree/bindings/pinctrl/qcom,msm8974-pinctrl.txt2
-rw-r--r--Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt1
-rw-r--r--Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt4
-rw-r--r--Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt24
-rw-r--r--Documentation/devicetree/bindings/power/rx51-battery.txt25
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/board.txt16
-rw-r--r--Documentation/devicetree/bindings/pwm/pwm-rockchip.txt20
-rw-r--r--Documentation/devicetree/bindings/pwm/pwm-st.txt41
-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/s5m8767-regulator.txt2
-rw-r--r--Documentation/devicetree/bindings/regulator/tps65218.txt23
-rw-r--r--Documentation/devicetree/bindings/serial/cdns,uart.txt20
-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/renesas,sci-serial.txt7
-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/sound/ak5386.txt4
-rw-r--r--Documentation/devicetree/bindings/sound/cs4265.txt29
-rw-r--r--Documentation/devicetree/bindings/sound/fsl,asrc.txt60
-rw-r--r--Documentation/devicetree/bindings/sound/max98090.txt2
-rw-r--r--Documentation/devicetree/bindings/sound/renesas,rsnd.txt9
-rw-r--r--Documentation/devicetree/bindings/sound/rockchip-i2s.txt37
-rw-r--r--Documentation/devicetree/bindings/sound/samsung,odroidx2-max98090.txt35
-rw-r--r--Documentation/devicetree/bindings/sound/sirf-usp.txt27
-rw-r--r--Documentation/devicetree/bindings/sound/snow.txt5
-rw-r--r--Documentation/devicetree/bindings/sound/tas2552.txt26
-rw-r--r--Documentation/devicetree/bindings/sound/ti,tas5086.txt5
-rw-r--r--Documentation/devicetree/bindings/sound/wm8904.txt33
-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.txt27
-rw-r--r--Documentation/devicetree/bindings/thermal/exynos-thermal.txt1
-rw-r--r--Documentation/devicetree/bindings/thermal/rcar-thermal.txt18
-rw-r--r--Documentation/devicetree/bindings/thermal/st-thermal.txt42
-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.txt6
-rw-r--r--Documentation/devicetree/bindings/video/arm,pl11x.txt109
-rw-r--r--Documentation/devicetree/bindings/video/atmel,lcdc.txt1
-rw-r--r--Documentation/devicetree/bindings/video/cirrus,clps711x-fb.txt47
-rw-r--r--Documentation/devicetree/bindings/video/exynos_dsim.txt4
-rw-r--r--Documentation/devicetree/bindings/video/exynos_mixer.txt5
-rw-r--r--Documentation/devicetree/bindings/video/samsung-fimd.txt30
-rw-r--r--Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.txt5
-rw-r--r--Documentation/dmaengine.txt17
-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/cifs/AUTHORS1
-rw-r--r--Documentation/filesystems/cifs/TODO97
-rw-r--r--Documentation/filesystems/f2fs.txt5
-rw-r--r--Documentation/filesystems/nfs/Exporting38
-rw-r--r--Documentation/filesystems/proc.txt19
-rw-r--r--Documentation/filesystems/vfs.txt3
-rw-r--r--Documentation/firmware_class/README6
-rw-r--r--Documentation/gpio/board.txt2
-rw-r--r--Documentation/gpio/consumer.txt26
-rw-r--r--Documentation/gpio/driver.txt25
-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/i2c/busses/i2c-i8011
-rw-r--r--Documentation/i2c/i2c-stub23
-rw-r--r--Documentation/input/event-codes.txt13
-rw-r--r--Documentation/ioctl/00-INDEX2
-rw-r--r--Documentation/ioctl/botching-up-ioctls.txt219
-rw-r--r--Documentation/ioctl/ioctl-number.txt1
-rw-r--r--Documentation/kernel-parameters.txt87
-rw-r--r--Documentation/laptops/00-INDEX4
-rw-r--r--Documentation/laptops/freefall.c (renamed from Documentation/laptops/hpfall.c)62
-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/networking/bonding.txt31
-rw-r--r--Documentation/networking/filter.txt12
-rw-r--r--Documentation/networking/i40e.txt7
-rw-r--r--Documentation/networking/ip-sysctl.txt38
-rw-r--r--Documentation/networking/packet_mmap.txt18
-rw-r--r--Documentation/networking/phy.txt18
-rw-r--r--Documentation/networking/pktgen.txt28
-rw-r--r--Documentation/networking/timestamping.txt16
-rw-r--r--Documentation/networking/timestamping/timestamping.c7
-rw-r--r--Documentation/oops-tracing.txt2
-rw-r--r--Documentation/phy.txt10
-rw-r--r--Documentation/power/opp.txt3
-rw-r--r--Documentation/power/power_supply_class.txt6
-rw-r--r--Documentation/power/regulator/consumer.txt35
-rw-r--r--Documentation/powerpc/00-INDEX2
-rw-r--r--Documentation/powerpc/kvm_440.txt41
-rw-r--r--Documentation/rapidio/tsi721.txt19
-rw-r--r--Documentation/scsi/ncr53c8xx.txt2
-rw-r--r--Documentation/scsi/tmscsim.txt2
-rw-r--r--Documentation/security/LSM.txt2
-rw-r--r--Documentation/security/keys.txt14
-rw-r--r--Documentation/sound/alsa/ALSA-Configuration.txt4
-rw-r--r--Documentation/sound/alsa/HD-Audio-Models.txt5
-rw-r--r--Documentation/stable_kernel_rules.txt3
-rw-r--r--Documentation/sysctl/kernel.txt1
-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/trace/postprocess/trace-vmscan-postprocess.pl53
-rw-r--r--Documentation/usb/hotplug.txt8
-rw-r--r--Documentation/usb/power-management.txt245
-rw-r--r--Documentation/vfio.txt87
-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.txt403
-rw-r--r--Documentation/w1/slaves/w1_ds240625
-rw-r--r--Documentation/watchdog/watchdog-api.txt2
-rw-r--r--Documentation/x86/tlb.txt75
-rw-r--r--Documentation/zh_CN/SubmittingDrivers4
-rw-r--r--Documentation/zh_CN/video4linux/v4l2-framework.txt7
354 files changed, 9574 insertions, 1770 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-rbd b/Documentation/ABI/testing/sysfs-bus-rbd
index 501adc2a9ec7..2ddd680929d8 100644
--- a/Documentation/ABI/testing/sysfs-bus-rbd
+++ b/Documentation/ABI/testing/sysfs-bus-rbd
@@ -94,5 +94,5 @@ current_snap
94 94
95parent 95parent
96 96
97 Information identifying the pool, image, and snapshot id for 97 Information identifying the chain of parent images in a layered rbd
98 the parent image in a layered rbd image (format 2 only). 98 image. Entries are separated by empty lines.
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-leds-gt683r b/Documentation/ABI/testing/sysfs-class-leds-gt683r
new file mode 100644
index 000000000000..e4fae6026e79
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-leds-gt683r
@@ -0,0 +1,16 @@
1What: /sys/class/leds/<led>/gt683r/mode
2Date: Jun 2014
3KernelVersion: 3.17
4Contact: Janne Kanniainen <janne.kanniainen@gmail.com>
5Description:
6 Set the mode of LEDs. You should notice that changing the mode
7 of one LED will update the mode of its two sibling devices as
8 well.
9
10 0 - normal
11 1 - audio
12 2 - breathing
13
14 Normal: LEDs are fully on when enabled
15 Audio: LEDs brightness depends on sound level
16 Breathing: LEDs brightness varies at human breathing rate \ No newline at end of file
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-class-mtd b/Documentation/ABI/testing/sysfs-class-mtd
index 1399bb2da3eb..76ee192f80a0 100644
--- a/Documentation/ABI/testing/sysfs-class-mtd
+++ b/Documentation/ABI/testing/sysfs-class-mtd
@@ -184,3 +184,41 @@ Description:
184 184
185 It will always be a non-negative integer. In the case of 185 It will always be a non-negative integer. In the case of
186 devices lacking any ECC capability, it is 0. 186 devices lacking any ECC capability, it is 0.
187
188What: /sys/class/mtd/mtdX/ecc_failures
189Date: June 2014
190KernelVersion: 3.17
191Contact: linux-mtd@lists.infradead.org
192Description:
193 The number of failures reported by this device's ECC. Typically,
194 these failures are associated with failed read operations.
195
196 It will always be a non-negative integer. In the case of
197 devices lacking any ECC capability, it is 0.
198
199What: /sys/class/mtd/mtdX/corrected_bits
200Date: June 2014
201KernelVersion: 3.17
202Contact: linux-mtd@lists.infradead.org
203Description:
204 The number of bits that have been corrected by means of the
205 device's ECC.
206
207 It will always be a non-negative integer. In the case of
208 devices lacking any ECC capability, it is 0.
209
210What: /sys/class/mtd/mtdX/bad_blocks
211Date: June 2014
212KernelVersion: 3.17
213Contact: linux-mtd@lists.infradead.org
214Description:
215 The number of blocks marked as bad, if any, in this partition.
216
217What: /sys/class/mtd/mtdX/bbt_blocks
218Date: June 2014
219KernelVersion: 3.17
220Contact: linux-mtd@lists.infradead.org
221Description:
222 The number of blocks that are marked as reserved, if any, in
223 this partition. These are typically used to store the in-flash
224 bad block table (BBT).
diff --git a/Documentation/ABI/testing/sysfs-class-net b/Documentation/ABI/testing/sysfs-class-net
index 416c5d59f52e..d322b0581194 100644
--- a/Documentation/ABI/testing/sysfs-class-net
+++ b/Documentation/ABI/testing/sysfs-class-net
@@ -1,3 +1,14 @@
1What: /sys/class/net/<iface>/name_assign_type
2Date: July 2014
3KernelVersion: 3.17
4Contact: netdev@vger.kernel.org
5Description:
6 Indicates the name assignment type. Possible values are:
7 1: enumerated by the kernel, possibly in an unpredictable way
8 2: predictably named by the kernel
9 3: named by userspace
10 4: renamed
11
1What: /sys/class/net/<iface>/addr_assign_type 12What: /sys/class/net/<iface>/addr_assign_type
2Date: July 2010 13Date: July 2010
3KernelVersion: 3.2 14KernelVersion: 3.2
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-driver-hid-lenovo-tpkbd b/Documentation/ABI/testing/sysfs-driver-hid-lenovo
index 57b92cbdceae..53a0725962e1 100644
--- a/Documentation/ABI/testing/sysfs-driver-hid-lenovo-tpkbd
+++ b/Documentation/ABI/testing/sysfs-driver-hid-lenovo
@@ -4,18 +4,21 @@ Contact: linux-input@vger.kernel.org
4Description: This controls if mouse clicks should be generated if the trackpoint is quickly pressed. How fast this press has to be 4Description: This controls if mouse clicks should be generated if the trackpoint is quickly pressed. How fast this press has to be
5 is being controlled by press_speed. 5 is being controlled by press_speed.
6 Values are 0 or 1. 6 Values are 0 or 1.
7 Applies to Thinkpad USB Keyboard with TrackPoint.
7 8
8What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/dragging 9What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/dragging
9Date: July 2011 10Date: July 2011
10Contact: linux-input@vger.kernel.org 11Contact: linux-input@vger.kernel.org
11Description: If this setting is enabled, it is possible to do dragging by pressing the trackpoint. This requires press_to_select to be enabled. 12Description: If this setting is enabled, it is possible to do dragging by pressing the trackpoint. This requires press_to_select to be enabled.
12 Values are 0 or 1. 13 Values are 0 or 1.
14 Applies to Thinkpad USB Keyboard with TrackPoint.
13 15
14What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/release_to_select 16What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/release_to_select
15Date: July 2011 17Date: July 2011
16Contact: linux-input@vger.kernel.org 18Contact: linux-input@vger.kernel.org
17Description: For details regarding this setting please refer to http://www.pc.ibm.com/ww/healthycomputing/trkpntb.html 19Description: For details regarding this setting please refer to http://www.pc.ibm.com/ww/healthycomputing/trkpntb.html
18 Values are 0 or 1. 20 Values are 0 or 1.
21 Applies to Thinkpad USB Keyboard with TrackPoint.
19 22
20What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/select_right 23What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/select_right
21Date: July 2011 24Date: July 2011
@@ -23,16 +26,25 @@ Contact: linux-input@vger.kernel.org
23Description: This setting controls if the mouse click events generated by pressing the trackpoint (if press_to_select is enabled) generate 26Description: This setting controls if the mouse click events generated by pressing the trackpoint (if press_to_select is enabled) generate
24 a left or right mouse button click. 27 a left or right mouse button click.
25 Values are 0 or 1. 28 Values are 0 or 1.
29 Applies to Thinkpad USB Keyboard with TrackPoint.
26 30
27What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/sensitivity 31What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/sensitivity
28Date: July 2011 32Date: July 2011
29Contact: linux-input@vger.kernel.org 33Contact: linux-input@vger.kernel.org
30Description: This file contains the trackpoint sensitivity. 34Description: This file contains the trackpoint sensitivity.
31 Values are decimal integers from 1 (lowest sensitivity) to 255 (highest sensitivity). 35 Values are decimal integers from 1 (lowest sensitivity) to 255 (highest sensitivity).
36 Applies to Thinkpad USB Keyboard with TrackPoint.
32 37
33What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/press_speed 38What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/press_speed
34Date: July 2011 39Date: July 2011
35Contact: linux-input@vger.kernel.org 40Contact: linux-input@vger.kernel.org
36Description: This setting controls how fast the trackpoint needs to be pressed to generate a mouse click if press_to_select is enabled. 41Description: This setting controls how fast the trackpoint needs to be pressed to generate a mouse click if press_to_select is enabled.
37 Values are decimal integers from 1 (slowest) to 255 (fastest). 42 Values are decimal integers from 1 (slowest) to 255 (fastest).
43 Applies to Thinkpad USB Keyboard with TrackPoint.
38 44
45What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/fn_lock
46Date: July 2014
47Contact: linux-input@vger.kernel.org
48Description: This setting controls whether Fn Lock is enabled on the keyboard (i.e. if F1 is Mute or F1)
49 Values are 0 or 1
50 Applies to ThinkPad Compact (USB|Bluetooth) Keyboard with TrackPoint.
diff --git a/Documentation/ABI/testing/sysfs-driver-pciback b/Documentation/ABI/testing/sysfs-driver-pciback
new file mode 100644
index 000000000000..6a733bfa37e6
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-driver-pciback
@@ -0,0 +1,13 @@
1What: /sys/bus/pci/drivers/pciback/quirks
2Date: Oct 2011
3KernelVersion: 3.1
4Contact: xen-devel@lists.xenproject.org
5Description:
6 If the permissive attribute is set, then writing a string in
7 the format of DDDD:BB:DD.F-REG:SIZE:MASK will allow the guest
8 to write and read from the PCI device. That is Domain:Bus:
9 Device.Function-Register:Size:Mask (Domain is optional).
10 For example:
11 #echo 00:19.0-E0:2:FF > /sys/bus/pci/drivers/pciback/quirks
12 will allow the guest to read and write to the configuration
13 register 0x0E.
diff --git a/Documentation/ABI/testing/sysfs-driver-tegra-fuse b/Documentation/ABI/testing/sysfs-driver-tegra-fuse
new file mode 100644
index 000000000000..69f5af632657
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-driver-tegra-fuse
@@ -0,0 +1,11 @@
1What: /sys/devices/*/<our-device>/fuse
2Date: February 2014
3Contact: Peter De Schrijver <pdeschrijver@nvidia.com>
4Description: read-only access to the efuses on Tegra20, Tegra30, Tegra114
5 and Tegra124 SoC's from NVIDIA. The efuses contain write once
6 data programmed at the factory. The data is layed out in 32bit
7 words in LSB first format. Each bit represents a single value
8 as decoded from the fuse registers. Bits order/assignment
9 exactly matches the HW registers, including any unused bits.
10Users: any user space application which wants to read the efuses on
11 Tegra SoC's
diff --git a/Documentation/ABI/testing/sysfs-driver-wacom b/Documentation/ABI/testing/sysfs-driver-wacom
index 7fc781048b79..c4f0fed64a6e 100644
--- a/Documentation/ABI/testing/sysfs-driver-wacom
+++ b/Documentation/ABI/testing/sysfs-driver-wacom
@@ -1,48 +1,27 @@
1WWhat: /sys/class/hidraw/hidraw*/device/oled*_img 1What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/speed
2Date: June 2012
3Contact: linux-bluetooth@vger.kernel.org
4Description:
5 The /sys/class/hidraw/hidraw*/device/oled*_img files control
6 OLED mocro displays on Intuos4 Wireless tablet. Accepted image
7 has to contain 256 bytes (64x32 px 1 bit colour). The format
8 is the same as PBM image 62x32px without header (64 bits per
9 horizontal line, 32 lines). An example of setting OLED No. 0:
10 dd bs=256 count=1 if=img_file of=[path to oled0_img]/oled0_img
11 The attribute is read only and no local copy of the image is
12 stored.
13
14What: /sys/class/hidraw/hidraw*/device/speed
15Date: April 2010 2Date: April 2010
16Kernel Version: 2.6.35 3Kernel Version: 2.6.35
17Contact: linux-bluetooth@vger.kernel.org 4Contact: linux-bluetooth@vger.kernel.org
18Description: 5Description:
19 The /sys/class/hidraw/hidraw*/device/speed file controls 6 The /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/speed file
20 reporting speed of Wacom bluetooth tablet. Reading from 7 controls reporting speed of Wacom bluetooth tablet. Reading
21 this file returns 1 if tablet reports in high speed mode 8 from this file returns 1 if tablet reports in high speed mode
22 or 0 otherwise. Writing to this file one of these values 9 or 0 otherwise. Writing to this file one of these values
23 switches reporting speed. 10 switches reporting speed.
24 11
25What: /sys/class/leds/0005\:056A\:00BD.0001\:selector\:*/ 12What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/led
26Date: May 2012 13Date: August 2014
27Kernel Version: 3.5
28Contact: linux-bluetooth@vger.kernel.org
29Description:
30 LED selector for Intuos4 WL. There are 4 leds, but only one LED
31 can be lit at a time. Max brightness is 127.
32
33What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/led
34Date: August 2011
35Contact: linux-input@vger.kernel.org 14Contact: linux-input@vger.kernel.org
36Description: 15Description:
37 Attribute group for control of the status LEDs and the OLEDs. 16 Attribute group for control of the status LEDs and the OLEDs.
38 This attribute group is only available for Intuos 4 M, L, 17 This attribute group is only available for Intuos 4 M, L,
39 and XL (with LEDs and OLEDs), Intuos 5 (LEDs only), and Cintiq 18 and XL (with LEDs and OLEDs), Intuos 4 WL, Intuos 5 (LEDs only),
40 21UX2 and Cintiq 24HD (LEDs only). Therefore its presence 19 Intuos Pro (LEDs only) and Cintiq 21UX2 and Cintiq 24HD
41 implicitly signifies the presence of said LEDs and OLEDs on the 20 (LEDs only). Therefore its presence implicitly signifies the
42 tablet device. 21 presence of said LEDs and OLEDs on the tablet device.
43 22
44What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/status0_luminance 23What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/status0_luminance
45Date: August 2011 24Date: August 2014
46Contact: linux-input@vger.kernel.org 25Contact: linux-input@vger.kernel.org
47Description: 26Description:
48 Writing to this file sets the status LED luminance (1..127) 27 Writing to this file sets the status LED luminance (1..127)
@@ -50,16 +29,16 @@ Description:
50 button is pressed on the stylus. This luminance level is 29 button is pressed on the stylus. This luminance level is
51 normally lower than the level when a button is pressed. 30 normally lower than the level when a button is pressed.
52 31
53What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/status1_luminance 32What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/status1_luminance
54Date: August 2011 33Date: August 2014
55Contact: linux-input@vger.kernel.org 34Contact: linux-input@vger.kernel.org
56Description: 35Description:
57 Writing to this file sets the status LED luminance (1..127) 36 Writing to this file sets the status LED luminance (1..127)
58 when the stylus touches the tablet surface, or any button is 37 when the stylus touches the tablet surface, or any button is
59 pressed on the stylus. 38 pressed on the stylus.
60 39
61What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/status_led0_select 40What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/status_led0_select
62Date: August 2011 41Date: August 2014
63Contact: linux-input@vger.kernel.org 42Contact: linux-input@vger.kernel.org
64Description: 43Description:
65 Writing to this file sets which one of the four (for Intuos 4 44 Writing to this file sets which one of the four (for Intuos 4
@@ -67,23 +46,23 @@ Description:
67 24HD) status LEDs is active (0..3). The other three LEDs on the 46 24HD) status LEDs is active (0..3). The other three LEDs on the
68 same side are always inactive. 47 same side are always inactive.
69 48
70What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/status_led1_select 49What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/status_led1_select
71Date: September 2011 50Date: August 2014
72Contact: linux-input@vger.kernel.org 51Contact: linux-input@vger.kernel.org
73Description: 52Description:
74 Writing to this file sets which one of the left four (for Cintiq 21UX2 53 Writing to this file sets which one of the left four (for Cintiq 21UX2
75 and Cintiq 24HD) status LEDs is active (0..3). The other three LEDs on 54 and Cintiq 24HD) status LEDs is active (0..3). The other three LEDs on
76 the left are always inactive. 55 the left are always inactive.
77 56
78What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/buttons_luminance 57What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/buttons_luminance
79Date: August 2011 58Date: August 2014
80Contact: linux-input@vger.kernel.org 59Contact: linux-input@vger.kernel.org
81Description: 60Description:
82 Writing to this file sets the overall luminance level (0..15) 61 Writing to this file sets the overall luminance level (0..15)
83 of all eight button OLED displays. 62 of all eight button OLED displays.
84 63
85What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/button<n>_rawimg 64What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/button<n>_rawimg
86Date: August 2011 65Date: August 2014
87Contact: linux-input@vger.kernel.org 66Contact: linux-input@vger.kernel.org
88Description: 67Description:
89 When writing a 1024 byte raw image in Wacom Intuos 4 68 When writing a 1024 byte raw image in Wacom Intuos 4
@@ -93,3 +72,8 @@ Description:
93 byte chunk encodes the image data for two consecutive lines on 72 byte chunk encodes the image data for two consecutive lines on
94 the display. The low nibble of each byte contains the first 73 the display. The low nibble of each byte contains the first
95 line, and the high nibble contains the second line. 74 line, and the high nibble contains the second line.
75 When the Wacom Intuos 4 is connected over Bluetooth, the
76 image has to contain 256 bytes (64x32 px 1 bit colour).
77 The format is also scrambled, like in the USB mode, and it can
78 be summarized by converting 76543210 into GECA6420.
79 HGFEDCBA HFDB7531
diff --git a/Documentation/ABI/testing/sysfs-fs-nilfs2 b/Documentation/ABI/testing/sysfs-fs-nilfs2
new file mode 100644
index 000000000000..304ba84a973a
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-fs-nilfs2
@@ -0,0 +1,269 @@
1
2What: /sys/fs/nilfs2/features/revision
3Date: April 2014
4Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
5Description:
6 Show current revision of NILFS file system driver.
7 This value informs about file system revision that
8 driver is ready to support.
9
10What: /sys/fs/nilfs2/features/README
11Date: April 2014
12Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
13Description:
14 Describe attributes of /sys/fs/nilfs2/features group.
15
16What: /sys/fs/nilfs2/<device>/revision
17Date: April 2014
18Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
19Description:
20 Show NILFS file system revision on volume.
21 This value informs about metadata structures'
22 revision on mounted volume.
23
24What: /sys/fs/nilfs2/<device>/blocksize
25Date: April 2014
26Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
27Description:
28 Show volume's block size in bytes.
29
30What: /sys/fs/nilfs2/<device>/device_size
31Date: April 2014
32Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
33Description:
34 Show volume size in bytes.
35
36What: /sys/fs/nilfs2/<device>/free_blocks
37Date: April 2014
38Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
39Description:
40 Show count of free blocks on volume.
41
42What: /sys/fs/nilfs2/<device>/uuid
43Date: April 2014
44Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
45Description:
46 Show volume's UUID (Universally Unique Identifier).
47
48What: /sys/fs/nilfs2/<device>/volume_name
49Date: April 2014
50Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
51Description:
52 Show volume's label.
53
54What: /sys/fs/nilfs2/<device>/README
55Date: April 2014
56Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
57Description:
58 Describe attributes of /sys/fs/nilfs2/<device> group.
59
60What: /sys/fs/nilfs2/<device>/superblock/sb_write_time
61Date: April 2014
62Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
63Description:
64 Show last write time of super block in human-readable
65 format.
66
67What: /sys/fs/nilfs2/<device>/superblock/sb_write_time_secs
68Date: April 2014
69Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
70Description:
71 Show last write time of super block in seconds.
72
73What: /sys/fs/nilfs2/<device>/superblock/sb_write_count
74Date: April 2014
75Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
76Description:
77 Show current write count of super block.
78
79What: /sys/fs/nilfs2/<device>/superblock/sb_update_frequency
80Date: April 2014
81Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
82Description:
83 Show/Set interval of periodical update of superblock
84 (in seconds).
85
86What: /sys/fs/nilfs2/<device>/superblock/README
87Date: April 2014
88Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
89Description:
90 Describe attributes of /sys/fs/nilfs2/<device>/superblock
91 group.
92
93What: /sys/fs/nilfs2/<device>/segctor/last_pseg_block
94Date: April 2014
95Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
96Description:
97 Show start block number of the latest segment.
98
99What: /sys/fs/nilfs2/<device>/segctor/last_seg_sequence
100Date: April 2014
101Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
102Description:
103 Show sequence value of the latest segment.
104
105What: /sys/fs/nilfs2/<device>/segctor/last_seg_checkpoint
106Date: April 2014
107Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
108Description:
109 Show checkpoint number of the latest segment.
110
111What: /sys/fs/nilfs2/<device>/segctor/current_seg_sequence
112Date: April 2014
113Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
114Description:
115 Show segment sequence counter.
116
117What: /sys/fs/nilfs2/<device>/segctor/current_last_full_seg
118Date: April 2014
119Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
120Description:
121 Show index number of the latest full segment.
122
123What: /sys/fs/nilfs2/<device>/segctor/next_full_seg
124Date: April 2014
125Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
126Description:
127 Show index number of the full segment index
128 to be used next.
129
130What: /sys/fs/nilfs2/<device>/segctor/next_pseg_offset
131Date: April 2014
132Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
133Description:
134 Show offset of next partial segment in the current
135 full segment.
136
137What: /sys/fs/nilfs2/<device>/segctor/next_checkpoint
138Date: April 2014
139Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
140Description:
141 Show next checkpoint number.
142
143What: /sys/fs/nilfs2/<device>/segctor/last_seg_write_time
144Date: April 2014
145Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
146Description:
147 Show write time of the last segment in
148 human-readable format.
149
150What: /sys/fs/nilfs2/<device>/segctor/last_seg_write_time_secs
151Date: April 2014
152Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
153Description:
154 Show write time of the last segment in seconds.
155
156What: /sys/fs/nilfs2/<device>/segctor/last_nongc_write_time
157Date: April 2014
158Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
159Description:
160 Show write time of the last segment not for cleaner
161 operation in human-readable format.
162
163What: /sys/fs/nilfs2/<device>/segctor/last_nongc_write_time_secs
164Date: April 2014
165Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
166Description:
167 Show write time of the last segment not for cleaner
168 operation in seconds.
169
170What: /sys/fs/nilfs2/<device>/segctor/dirty_data_blocks_count
171Date: April 2014
172Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
173Description:
174 Show number of dirty data blocks.
175
176What: /sys/fs/nilfs2/<device>/segctor/README
177Date: April 2014
178Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
179Description:
180 Describe attributes of /sys/fs/nilfs2/<device>/segctor
181 group.
182
183What: /sys/fs/nilfs2/<device>/segments/segments_number
184Date: April 2014
185Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
186Description:
187 Show number of segments on a volume.
188
189What: /sys/fs/nilfs2/<device>/segments/blocks_per_segment
190Date: April 2014
191Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
192Description:
193 Show number of blocks in segment.
194
195What: /sys/fs/nilfs2/<device>/segments/clean_segments
196Date: April 2014
197Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
198Description:
199 Show count of clean segments.
200
201What: /sys/fs/nilfs2/<device>/segments/dirty_segments
202Date: April 2014
203Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
204Description:
205 Show count of dirty segments.
206
207What: /sys/fs/nilfs2/<device>/segments/README
208Date: April 2014
209Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
210Description:
211 Describe attributes of /sys/fs/nilfs2/<device>/segments
212 group.
213
214What: /sys/fs/nilfs2/<device>/checkpoints/checkpoints_number
215Date: April 2014
216Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
217Description:
218 Show number of checkpoints on volume.
219
220What: /sys/fs/nilfs2/<device>/checkpoints/snapshots_number
221Date: April 2014
222Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
223Description:
224 Show number of snapshots on volume.
225
226What: /sys/fs/nilfs2/<device>/checkpoints/last_seg_checkpoint
227Date: April 2014
228Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
229Description:
230 Show checkpoint number of the latest segment.
231
232What: /sys/fs/nilfs2/<device>/checkpoints/next_checkpoint
233Date: April 2014
234Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
235Description:
236 Show next checkpoint number.
237
238What: /sys/fs/nilfs2/<device>/checkpoints/README
239Date: April 2014
240Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
241Description:
242 Describe attributes of /sys/fs/nilfs2/<device>/checkpoints
243 group.
244
245What: /sys/fs/nilfs2/<device>/mounted_snapshots/README
246Date: April 2014
247Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
248Description:
249 Describe content of /sys/fs/nilfs2/<device>/mounted_snapshots
250 group.
251
252What: /sys/fs/nilfs2/<device>/mounted_snapshots/<id>/inodes_count
253Date: April 2014
254Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
255Description:
256 Show number of inodes for snapshot.
257
258What: /sys/fs/nilfs2/<device>/mounted_snapshots/<id>/blocks_count
259Date: April 2014
260Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
261Description:
262 Show number of blocks for snapshot.
263
264What: /sys/fs/nilfs2/<device>/mounted_snapshots/<id>/README
265Date: April 2014
266Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com>
267Description:
268 Describe attributes of /sys/fs/nilfs2/<device>/mounted_snapshots/<id>
269 group.
diff --git a/Documentation/ABI/testing/sysfs-fs-xfs b/Documentation/ABI/testing/sysfs-fs-xfs
new file mode 100644
index 000000000000..ea0cc8c42093
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-fs-xfs
@@ -0,0 +1,39 @@
1What: /sys/fs/xfs/<disk>/log/log_head_lsn
2Date: July 2014
3KernelVersion: 3.17
4Contact: xfs@oss.sgi.com
5Description:
6 The log sequence number (LSN) of the current head of the
7 log. The LSN is exported in "cycle:basic block" format.
8Users: xfstests
9
10What: /sys/fs/xfs/<disk>/log/log_tail_lsn
11Date: July 2014
12KernelVersion: 3.17
13Contact: xfs@oss.sgi.com
14Description:
15 The log sequence number (LSN) of the current tail of the
16 log. The LSN is exported in "cycle:basic block" format.
17
18What: /sys/fs/xfs/<disk>/log/reserve_grant_head
19Date: July 2014
20KernelVersion: 3.17
21Contact: xfs@oss.sgi.com
22Description:
23 The current state of the log reserve grant head. It
24 represents the total log reservation of all currently
25 outstanding transactions. The grant head is exported in
26 "cycle:bytes" format.
27Users: xfstests
28
29What: /sys/fs/xfs/<disk>/log/write_grant_head
30Date: July 2014
31KernelVersion: 3.17
32Contact: xfs@oss.sgi.com
33Description:
34 The current state of the log write grant head. It
35 represents the total log reservation of all currently
36 oustanding transactions, including regrants due to
37 rolling transactions. The grant head is exported in
38 "cycle:bytes" format.
39Users: xfstests
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/Changes b/Documentation/Changes
index 2254db0f00a5..227bec88021e 100644
--- a/Documentation/Changes
+++ b/Documentation/Changes
@@ -280,12 +280,9 @@ that is possible.
280mcelog 280mcelog
281------ 281------
282 282
283In Linux 2.6.31+ the i386 kernel needs to run the mcelog utility 283On x86 kernels the mcelog utility is needed to process and log machine check
284as a regular cronjob similar to the x86-64 kernel to process and log 284events when CONFIG_X86_MCE is enabled. Machine check events are errors reported
285machine check events when CONFIG_X86_NEW_MCE is enabled. Machine check 285by the CPU. Processing them is strongly encouraged.
286events are errors reported by the CPU. Processing them is strongly encouraged.
287All x86-64 kernels since 2.6.4 require the mcelog utility to
288process machine checks.
289 286
290Getting updated software 287Getting updated software
291======================== 288========================
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/drm.tmpl b/Documentation/DocBook/drm.tmpl
index 7df3134ebc0e..1d3756d3176c 100644
--- a/Documentation/DocBook/drm.tmpl
+++ b/Documentation/DocBook/drm.tmpl
@@ -1610,7 +1610,7 @@ int max_width, max_height;</synopsis>
1610 The connector is then registered with a call to 1610 The connector is then registered with a call to
1611 <function>drm_connector_init</function> with a pointer to the connector 1611 <function>drm_connector_init</function> with a pointer to the connector
1612 functions and a connector type, and exposed through sysfs with a call to 1612 functions and a connector type, and exposed through sysfs with a call to
1613 <function>drm_sysfs_connector_add</function>. 1613 <function>drm_connector_register</function>.
1614 </para> 1614 </para>
1615 <para> 1615 <para>
1616 Supported connector types are 1616 Supported connector types are
@@ -1768,7 +1768,7 @@ int max_width, max_height;</synopsis>
1768 (<function>drm_encoder_cleanup</function>) and connectors 1768 (<function>drm_encoder_cleanup</function>) and connectors
1769 (<function>drm_connector_cleanup</function>). Furthermore, connectors 1769 (<function>drm_connector_cleanup</function>). Furthermore, connectors
1770 that have been added to sysfs must be removed by a call to 1770 that have been added to sysfs must be removed by a call to
1771 <function>drm_sysfs_connector_remove</function> before calling 1771 <function>drm_connector_unregister</function> before calling
1772 <function>drm_connector_cleanup</function>. 1772 <function>drm_connector_cleanup</function>.
1773 </para> 1773 </para>
1774 <para> 1774 <para>
@@ -1813,7 +1813,7 @@ void intel_crt_init(struct drm_device *dev)
1813 drm_encoder_helper_add(&intel_output->enc, &intel_crt_helper_funcs); 1813 drm_encoder_helper_add(&intel_output->enc, &intel_crt_helper_funcs);
1814 drm_connector_helper_add(connector, &intel_crt_connector_helper_funcs); 1814 drm_connector_helper_add(connector, &intel_crt_connector_helper_funcs);
1815 1815
1816 drm_sysfs_connector_add(connector); 1816 drm_connector_register(connector);
1817}]]></programlisting> 1817}]]></programlisting>
1818 <para> 1818 <para>
1819 In the example above (taken from the i915 driver), a CRTC, connector and 1819 In the example above (taken from the i915 driver), a CRTC, connector and
@@ -2338,6 +2338,12 @@ void intel_crt_init(struct drm_device *dev)
2338!Edrivers/gpu/drm/drm_dp_helper.c 2338!Edrivers/gpu/drm/drm_dp_helper.c
2339 </sect2> 2339 </sect2>
2340 <sect2> 2340 <sect2>
2341 <title>Display Port MST Helper Functions Reference</title>
2342!Pdrivers/gpu/drm/drm_dp_mst_topology.c dp mst helper
2343!Iinclude/drm/drm_dp_mst_helper.h
2344!Edrivers/gpu/drm/drm_dp_mst_topology.c
2345 </sect2>
2346 <sect2>
2341 <title>EDID Helper Functions Reference</title> 2347 <title>EDID Helper Functions Reference</title>
2342!Edrivers/gpu/drm/drm_edid.c 2348!Edrivers/gpu/drm/drm_edid.c
2343 </sect2> 2349 </sect2>
@@ -2502,7 +2508,7 @@ void intel_crt_init(struct drm_device *dev)
2502 <td valign="top" >Description/Restrictions</td> 2508 <td valign="top" >Description/Restrictions</td>
2503 </tr> 2509 </tr>
2504 <tr> 2510 <tr>
2505 <td rowspan="20" valign="top" >DRM</td> 2511 <td rowspan="21" valign="top" >DRM</td>
2506 <td rowspan="2" valign="top" >Generic</td> 2512 <td rowspan="2" valign="top" >Generic</td>
2507 <td valign="top" >“EDID”</td> 2513 <td valign="top" >“EDID”</td>
2508 <td valign="top" >BLOB | IMMUTABLE</td> 2514 <td valign="top" >BLOB | IMMUTABLE</td>
@@ -2633,7 +2639,7 @@ void intel_crt_init(struct drm_device *dev)
2633 <td valign="top" >TBD</td> 2639 <td valign="top" >TBD</td>
2634 </tr> 2640 </tr>
2635 <tr> 2641 <tr>
2636 <td rowspan="2" valign="top" >Optional</td> 2642 <td rowspan="3" valign="top" >Optional</td>
2637 <td valign="top" >“scaling mode”</td> 2643 <td valign="top" >“scaling mode”</td>
2638 <td valign="top" >ENUM</td> 2644 <td valign="top" >ENUM</td>
2639 <td valign="top" >{ "None", "Full", "Center", "Full aspect" }</td> 2645 <td valign="top" >{ "None", "Full", "Center", "Full aspect" }</td>
@@ -2641,6 +2647,15 @@ void intel_crt_init(struct drm_device *dev)
2641 <td valign="top" >TBD</td> 2647 <td valign="top" >TBD</td>
2642 </tr> 2648 </tr>
2643 <tr> 2649 <tr>
2650 <td valign="top" >"aspect ratio"</td>
2651 <td valign="top" >ENUM</td>
2652 <td valign="top" >{ "None", "4:3", "16:9" }</td>
2653 <td valign="top" >Connector</td>
2654 <td valign="top" >DRM property to set aspect ratio from user space app.
2655 This enum is made generic to allow addition of custom aspect
2656 ratios.</td>
2657 </tr>
2658 <tr>
2644 <td valign="top" >“dirty”</td> 2659 <td valign="top" >“dirty”</td>
2645 <td valign="top" >ENUM | IMMUTABLE</td> 2660 <td valign="top" >ENUM | IMMUTABLE</td>
2646 <td valign="top" >{ "Off", "On", "Annotate" }</td> 2661 <td valign="top" >{ "Off", "On", "Annotate" }</td>
@@ -2649,7 +2664,7 @@ void intel_crt_init(struct drm_device *dev)
2649 </tr> 2664 </tr>
2650 <tr> 2665 <tr>
2651 <td rowspan="21" valign="top" >i915</td> 2666 <td rowspan="21" valign="top" >i915</td>
2652 <td rowspan="3" valign="top" >Generic</td> 2667 <td rowspan="2" valign="top" >Generic</td>
2653 <td valign="top" >"Broadcast RGB"</td> 2668 <td valign="top" >"Broadcast RGB"</td>
2654 <td valign="top" >ENUM</td> 2669 <td valign="top" >ENUM</td>
2655 <td valign="top" >{ "Automatic", "Full", "Limited 16:235" }</td> 2670 <td valign="top" >{ "Automatic", "Full", "Limited 16:235" }</td>
@@ -2664,10 +2679,11 @@ void intel_crt_init(struct drm_device *dev)
2664 <td valign="top" >TBD</td> 2679 <td valign="top" >TBD</td>
2665 </tr> 2680 </tr>
2666 <tr> 2681 <tr>
2667 <td valign="top" >Standard name as in DRM</td> 2682 <td rowspan="1" valign="top" >Plane</td>
2668 <td valign="top" >Standard type as in DRM</td> 2683 <td valign="top" >“rotation”</td>
2669 <td valign="top" >Standard value as in DRM</td> 2684 <td valign="top" >BITMASK</td>
2670 <td valign="top" >Standard Object as in DRM</td> 2685 <td valign="top" >{ 0, "rotate-0" }, { 2, "rotate-180" }</td>
2686 <td valign="top" >Plane</td>
2671 <td valign="top" >TBD</td> 2687 <td valign="top" >TBD</td>
2672 </tr> 2688 </tr>
2673 <tr> 2689 <tr>
@@ -2799,8 +2815,8 @@ void intel_crt_init(struct drm_device *dev)
2799 <td valign="top" >TBD</td> 2815 <td valign="top" >TBD</td>
2800 </tr> 2816 </tr>
2801 <tr> 2817 <tr>
2802 <td rowspan="3" valign="top" >CDV gma-500</td> 2818 <td rowspan="2" valign="top" >CDV gma-500</td>
2803 <td rowspan="3" valign="top" >Generic</td> 2819 <td rowspan="2" valign="top" >Generic</td>
2804 <td valign="top" >"Broadcast RGB"</td> 2820 <td valign="top" >"Broadcast RGB"</td>
2805 <td valign="top" >ENUM</td> 2821 <td valign="top" >ENUM</td>
2806 <td valign="top" >{ “Full”, “Limited 16:235” }</td> 2822 <td valign="top" >{ “Full”, “Limited 16:235” }</td>
@@ -2815,15 +2831,8 @@ void intel_crt_init(struct drm_device *dev)
2815 <td valign="top" >TBD</td> 2831 <td valign="top" >TBD</td>
2816 </tr> 2832 </tr>
2817 <tr> 2833 <tr>
2818 <td valign="top" >Standard name as in DRM</td> 2834 <td rowspan="19" valign="top" >Poulsbo</td>
2819 <td valign="top" >Standard type as in DRM</td> 2835 <td rowspan="1" valign="top" >Generic</td>
2820 <td valign="top" >Standard value as in DRM</td>
2821 <td valign="top" >Standard Object as in DRM</td>
2822 <td valign="top" >TBD</td>
2823 </tr>
2824 <tr>
2825 <td rowspan="20" valign="top" >Poulsbo</td>
2826 <td rowspan="2" valign="top" >Generic</td>
2827 <td valign="top" >“backlight”</td> 2836 <td valign="top" >“backlight”</td>
2828 <td valign="top" >RANGE</td> 2837 <td valign="top" >RANGE</td>
2829 <td valign="top" >Min=0, Max=100</td> 2838 <td valign="top" >Min=0, Max=100</td>
@@ -2831,13 +2840,6 @@ void intel_crt_init(struct drm_device *dev)
2831 <td valign="top" >TBD</td> 2840 <td valign="top" >TBD</td>
2832 </tr> 2841 </tr>
2833 <tr> 2842 <tr>
2834 <td valign="top" >Standard name as in DRM</td>
2835 <td valign="top" >Standard type as in DRM</td>
2836 <td valign="top" >Standard value as in DRM</td>
2837 <td valign="top" >Standard Object as in DRM</td>
2838 <td valign="top" >TBD</td>
2839 </tr>
2840 <tr>
2841 <td rowspan="17" valign="top" >SDVO-TV</td> 2843 <td rowspan="17" valign="top" >SDVO-TV</td>
2842 <td valign="top" >“mode”</td> 2844 <td valign="top" >“mode”</td>
2843 <td valign="top" >ENUM</td> 2845 <td valign="top" >ENUM</td>
@@ -3064,7 +3066,7 @@ void intel_crt_init(struct drm_device *dev)
3064 <td valign="top" >TBD</td> 3066 <td valign="top" >TBD</td>
3065 </tr> 3067 </tr>
3066 <tr> 3068 <tr>
3067 <td rowspan="3" valign="top" >i2c/ch7006_drv</td> 3069 <td rowspan="2" valign="top" >i2c/ch7006_drv</td>
3068 <td valign="top" >Generic</td> 3070 <td valign="top" >Generic</td>
3069 <td valign="top" >“scale”</td> 3071 <td valign="top" >“scale”</td>
3070 <td valign="top" >RANGE</td> 3072 <td valign="top" >RANGE</td>
@@ -3073,14 +3075,7 @@ void intel_crt_init(struct drm_device *dev)
3073 <td valign="top" >TBD</td> 3075 <td valign="top" >TBD</td>
3074 </tr> 3076 </tr>
3075 <tr> 3077 <tr>
3076 <td rowspan="2" valign="top" >TV</td> 3078 <td rowspan="1" valign="top" >TV</td>
3077 <td valign="top" >Standard names as in DRM</td>
3078 <td valign="top" >Standard types as in DRM</td>
3079 <td valign="top" >Standard Values as in DRM</td>
3080 <td valign="top" >Standard object as in DRM</td>
3081 <td valign="top" >TBD</td>
3082 </tr>
3083 <tr>
3084 <td valign="top" >“mode”</td> 3079 <td valign="top" >“mode”</td>
3085 <td valign="top" >ENUM</td> 3080 <td valign="top" >ENUM</td>
3086 <td valign="top" >{ "PAL", "PAL-M","PAL-N"}, ”PAL-Nc" 3081 <td valign="top" >{ "PAL", "PAL-M","PAL-N"}, ”PAL-Nc"
@@ -3089,7 +3084,7 @@ void intel_crt_init(struct drm_device *dev)
3089 <td valign="top" >TBD</td> 3084 <td valign="top" >TBD</td>
3090 </tr> 3085 </tr>
3091 <tr> 3086 <tr>
3092 <td rowspan="16" valign="top" >nouveau</td> 3087 <td rowspan="15" valign="top" >nouveau</td>
3093 <td rowspan="6" valign="top" >NV10 Overlay</td> 3088 <td rowspan="6" valign="top" >NV10 Overlay</td>
3094 <td valign="top" >"colorkey"</td> 3089 <td valign="top" >"colorkey"</td>
3095 <td valign="top" >RANGE</td> 3090 <td valign="top" >RANGE</td>
@@ -3198,14 +3193,6 @@ void intel_crt_init(struct drm_device *dev)
3198 <td valign="top" >TBD</td> 3193 <td valign="top" >TBD</td>
3199 </tr> 3194 </tr>
3200 <tr> 3195 <tr>
3201 <td valign="top" >Generic</td>
3202 <td valign="top" >Standard name as in DRM</td>
3203 <td valign="top" >Standard type as in DRM</td>
3204 <td valign="top" >Standard value as in DRM</td>
3205 <td valign="top" >Standard Object as in DRM</td>
3206 <td valign="top" >TBD</td>
3207 </tr>
3208 <tr>
3209 <td rowspan="2" valign="top" >omap</td> 3196 <td rowspan="2" valign="top" >omap</td>
3210 <td rowspan="2" valign="top" >Generic</td> 3197 <td rowspan="2" valign="top" >Generic</td>
3211 <td valign="top" >“rotation”</td> 3198 <td valign="top" >“rotation”</td>
@@ -3236,7 +3223,7 @@ void intel_crt_init(struct drm_device *dev)
3236 <td valign="top" >TBD</td> 3223 <td valign="top" >TBD</td>
3237 </tr> 3224 </tr>
3238 <tr> 3225 <tr>
3239 <td rowspan="10" valign="top" >radeon</td> 3226 <td rowspan="9" valign="top" >radeon</td>
3240 <td valign="top" >DVI-I</td> 3227 <td valign="top" >DVI-I</td>
3241 <td valign="top" >“coherent”</td> 3228 <td valign="top" >“coherent”</td>
3242 <td valign="top" >RANGE</td> 3229 <td valign="top" >RANGE</td>
@@ -3308,14 +3295,6 @@ void intel_crt_init(struct drm_device *dev)
3308 <td valign="top" >TBD</td> 3295 <td valign="top" >TBD</td>
3309 </tr> 3296 </tr>
3310 <tr> 3297 <tr>
3311 <td valign="top" >Generic</td>
3312 <td valign="top" >Standard name as in DRM</td>
3313 <td valign="top" >Standard type as in DRM</td>
3314 <td valign="top" >Standard value as in DRM</td>
3315 <td valign="top" >Standard Object as in DRM</td>
3316 <td valign="top" >TBD</td>
3317 </tr>
3318 <tr>
3319 <td rowspan="3" valign="top" >rcar-du</td> 3298 <td rowspan="3" valign="top" >rcar-du</td>
3320 <td rowspan="3" valign="top" >Generic</td> 3299 <td rowspan="3" valign="top" >Generic</td>
3321 <td valign="top" >"alpha"</td> 3300 <td valign="top" >"alpha"</td>
diff --git a/Documentation/DocBook/gadget.tmpl b/Documentation/DocBook/gadget.tmpl
index 4017f147ba2f..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
@@ -708,7 +708,7 @@ hardware level details could be very different.
708 708
709<para>Systems need specialized hardware support to implement OTG, 709<para>Systems need specialized hardware support to implement OTG,
710notably including a special <emphasis>Mini-AB</emphasis> jack 710notably including a special <emphasis>Mini-AB</emphasis> jack
711and associated transciever to support <emphasis>Dual-Role</emphasis> 711and associated transceiver to support <emphasis>Dual-Role</emphasis>
712operation: 712operation:
713they can act either as a host, using the standard 713they can act either as a host, using the standard
714Linux-USB host side driver stack, 714Linux-USB host side driver stack,
diff --git a/Documentation/DocBook/genericirq.tmpl b/Documentation/DocBook/genericirq.tmpl
index 46347f603353..59fb5c077541 100644
--- a/Documentation/DocBook/genericirq.tmpl
+++ b/Documentation/DocBook/genericirq.tmpl
@@ -182,7 +182,7 @@
182 <para> 182 <para>
183 Each interrupt is described by an interrupt descriptor structure 183 Each interrupt is described by an interrupt descriptor structure
184 irq_desc. The interrupt is referenced by an 'unsigned int' numeric 184 irq_desc. The interrupt is referenced by an 'unsigned int' numeric
185 value which selects the corresponding interrupt decription structure 185 value which selects the corresponding interrupt description structure
186 in the descriptor structures array. 186 in the descriptor structures array.
187 The descriptor structure contains status information and pointers 187 The descriptor structure contains status information and pointers
188 to the interrupt flow method and the interrupt chip structure 188 to the interrupt flow method and the interrupt chip structure
@@ -470,7 +470,7 @@ if (desc->irq_data.chip->irq_eoi)
470 <para> 470 <para>
471 To avoid copies of identical implementations of IRQ chips the 471 To avoid copies of identical implementations of IRQ chips the
472 core provides a configurable generic interrupt chip 472 core provides a configurable generic interrupt chip
473 implementation. Developers should check carefuly whether the 473 implementation. Developers should check carefully whether the
474 generic chip fits their needs before implementing the same 474 generic chip fits their needs before implementing the same
475 functionality slightly differently themselves. 475 functionality slightly differently themselves.
476 </para> 476 </para>
diff --git a/Documentation/DocBook/kernel-locking.tmpl b/Documentation/DocBook/kernel-locking.tmpl
index 19f2a5a5a5b4..e584ee12a1e7 100644
--- a/Documentation/DocBook/kernel-locking.tmpl
+++ b/Documentation/DocBook/kernel-locking.tmpl
@@ -1760,7 +1760,7 @@ as it would be on UP.
1760</para> 1760</para>
1761 1761
1762<para> 1762<para>
1763There is a furthur optimization possible here: remember our original 1763There is a further optimization possible here: remember our original
1764cache code, where there were no reference counts and the caller simply 1764cache code, where there were no reference counts and the caller simply
1765held the lock whenever using the object? This is still possible: if 1765held the lock whenever using the object? This is still possible: if
1766you hold the lock, no one can delete the object, so you don't need to 1766you hold the lock, no one can delete the object, so you don't need to
diff --git a/Documentation/DocBook/libata.tmpl b/Documentation/DocBook/libata.tmpl
index deb71baed328..d7fcdc5a4379 100644
--- a/Documentation/DocBook/libata.tmpl
+++ b/Documentation/DocBook/libata.tmpl
@@ -677,7 +677,7 @@ and other resources, etc.
677 677
678 <listitem> 678 <listitem>
679 <para> 679 <para>
680 ATA_QCFLAG_ACTIVE is clared from qc->flags. 680 ATA_QCFLAG_ACTIVE is cleared from qc->flags.
681 </para> 681 </para>
682 </listitem> 682 </listitem>
683 683
@@ -708,7 +708,7 @@ and other resources, etc.
708 708
709 <listitem> 709 <listitem>
710 <para> 710 <para>
711 qc->waiting is claread &amp; completed (in that order). 711 qc->waiting is cleared &amp; completed (in that order).
712 </para> 712 </para>
713 </listitem> 713 </listitem>
714 714
@@ -1163,7 +1163,7 @@ and other resources, etc.
1163 1163
1164 <para> 1164 <para>
1165 Once sense data is acquired, this type of errors can be 1165 Once sense data is acquired, this type of errors can be
1166 handled similary to other SCSI errors. Note that sense data 1166 handled similarly to other SCSI errors. Note that sense data
1167 may indicate ATA bus error (e.g. Sense Key 04h HARDWARE ERROR 1167 may indicate ATA bus error (e.g. Sense Key 04h HARDWARE ERROR
1168 &amp;&amp; ASC/ASCQ 47h/00h SCSI PARITY ERROR). In such 1168 &amp;&amp; ASC/ASCQ 47h/00h SCSI PARITY ERROR). In such
1169 cases, the error should be considered as an ATA bus error and 1169 cases, the error should be considered as an ATA bus error and
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/DocBook/media_api.tmpl b/Documentation/DocBook/media_api.tmpl
index 4decb46bfa76..03f9a1f8d413 100644
--- a/Documentation/DocBook/media_api.tmpl
+++ b/Documentation/DocBook/media_api.tmpl
@@ -68,7 +68,7 @@
68 several digital tv standards. While it is called as DVB API, 68 several digital tv standards. While it is called as DVB API,
69 in fact it covers several different video standards including 69 in fact it covers several different video standards including
70 DVB-T, DVB-S, DVB-C and ATSC. The API is currently being updated 70 DVB-T, DVB-S, DVB-C and ATSC. The API is currently being updated
71 to documment support also for DVB-S2, ISDB-T and ISDB-S.</para> 71 to document support also for DVB-S2, ISDB-T and ISDB-S.</para>
72 <para>The third part covers the Remote Controller API.</para> 72 <para>The third part covers the Remote Controller API.</para>
73 <para>The fourth part covers the Media Controller API.</para> 73 <para>The fourth part covers the Media Controller API.</para>
74 <para>For additional information and for the latest development code, 74 <para>For additional information and for the latest development code,
diff --git a/Documentation/DocBook/mtdnand.tmpl b/Documentation/DocBook/mtdnand.tmpl
index cd11926e07c7..7da8f0402af5 100644
--- a/Documentation/DocBook/mtdnand.tmpl
+++ b/Documentation/DocBook/mtdnand.tmpl
@@ -91,7 +91,7 @@
91 <listitem><para> 91 <listitem><para>
92 [MTD Interface]</para><para> 92 [MTD Interface]</para><para>
93 These functions provide the interface to the MTD kernel API. 93 These functions provide the interface to the MTD kernel API.
94 They are not replacable and provide functionality 94 They are not replaceable and provide functionality
95 which is complete hardware independent. 95 which is complete hardware independent.
96 </para></listitem> 96 </para></listitem>
97 <listitem><para> 97 <listitem><para>
@@ -100,14 +100,14 @@
100 </para></listitem> 100 </para></listitem>
101 <listitem><para> 101 <listitem><para>
102 [GENERIC]</para><para> 102 [GENERIC]</para><para>
103 Generic functions are not replacable and provide functionality 103 Generic functions are not replaceable and provide functionality
104 which is complete hardware independent. 104 which is complete hardware independent.
105 </para></listitem> 105 </para></listitem>
106 <listitem><para> 106 <listitem><para>
107 [DEFAULT]</para><para> 107 [DEFAULT]</para><para>
108 Default functions provide hardware related functionality which is suitable 108 Default functions provide hardware related functionality which is suitable
109 for most of the implementations. These functions can be replaced by the 109 for most of the implementations. These functions can be replaced by the
110 board driver if neccecary. Those functions are called via pointers in the 110 board driver if necessary. Those functions are called via pointers in the
111 NAND chip description structure. The board driver can set the functions which 111 NAND chip description structure. The board driver can set the functions which
112 should be replaced by board dependent functions before calling nand_scan(). 112 should be replaced by board dependent functions before calling nand_scan().
113 If the function pointer is NULL on entry to nand_scan() then the pointer 113 If the function pointer is NULL on entry to nand_scan() then the pointer
@@ -264,7 +264,7 @@ static void board_hwcontrol(struct mtd_info *mtd, int cmd)
264 is set up nand_scan() is called. This function tries to 264 is set up nand_scan() is called. This function tries to
265 detect and identify then chip. If a chip is found all the 265 detect and identify then chip. If a chip is found all the
266 internal data fields are initialized accordingly. 266 internal data fields are initialized accordingly.
267 The structure(s) have to be zeroed out first and then filled with the neccecary 267 The structure(s) have to be zeroed out first and then filled with the necessary
268 information about the device. 268 information about the device.
269 </para> 269 </para>
270 <programlisting> 270 <programlisting>
@@ -327,7 +327,7 @@ module_init(board_init);
327 <sect1 id="Exit_function"> 327 <sect1 id="Exit_function">
328 <title>Exit function</title> 328 <title>Exit function</title>
329 <para> 329 <para>
330 The exit function is only neccecary if the driver is 330 The exit function is only necessary if the driver is
331 compiled as a module. It releases all resources which 331 compiled as a module. It releases all resources which
332 are held by the chip driver and unregisters the partitions 332 are held by the chip driver and unregisters the partitions
333 in the MTD layer. 333 in the MTD layer.
@@ -494,7 +494,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
494 in this case. See rts_from4.c and diskonchip.c for 494 in this case. See rts_from4.c and diskonchip.c for
495 implementation reference. In those cases we must also 495 implementation reference. In those cases we must also
496 use bad block tables on FLASH, because the ECC layout is 496 use bad block tables on FLASH, because the ECC layout is
497 interferring with the bad block marker positions. 497 interfering with the bad block marker positions.
498 See bad block table support for details. 498 See bad block table support for details.
499 </para> 499 </para>
500 </sect2> 500 </sect2>
@@ -542,7 +542,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
542 <para> 542 <para>
543 nand_scan() calls the function nand_default_bbt(). 543 nand_scan() calls the function nand_default_bbt().
544 nand_default_bbt() selects appropriate default 544 nand_default_bbt() selects appropriate default
545 bad block table desriptors depending on the chip information 545 bad block table descriptors depending on the chip information
546 which was retrieved by nand_scan(). 546 which was retrieved by nand_scan().
547 </para> 547 </para>
548 <para> 548 <para>
@@ -554,7 +554,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
554 <sect2 id="Flash_based_tables"> 554 <sect2 id="Flash_based_tables">
555 <title>Flash based tables</title> 555 <title>Flash based tables</title>
556 <para> 556 <para>
557 It may be desired or neccecary to keep a bad block table in FLASH. 557 It may be desired or necessary to keep a bad block table in FLASH.
558 For AG-AND chips this is mandatory, as they have no factory marked 558 For AG-AND chips this is mandatory, as they have no factory marked
559 bad blocks. They have factory marked good blocks. The marker pattern 559 bad blocks. They have factory marked good blocks. The marker pattern
560 is erased when the block is erased to be reused. So in case of 560 is erased when the block is erased to be reused. So in case of
@@ -565,10 +565,10 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
565 of the blocks. 565 of the blocks.
566 </para> 566 </para>
567 <para> 567 <para>
568 The blocks in which the tables are stored are procteted against 568 The blocks in which the tables are stored are protected against
569 accidental access by marking them bad in the memory bad block 569 accidental access by marking them bad in the memory bad block
570 table. The bad block table management functions are allowed 570 table. The bad block table management functions are allowed
571 to circumvernt this protection. 571 to circumvent this protection.
572 </para> 572 </para>
573 <para> 573 <para>
574 The simplest way to activate the FLASH based bad block table support 574 The simplest way to activate the FLASH based bad block table support
@@ -592,7 +592,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
592 User defined tables are created by filling out a 592 User defined tables are created by filling out a
593 nand_bbt_descr structure and storing the pointer in the 593 nand_bbt_descr structure and storing the pointer in the
594 nand_chip structure member bbt_td before calling nand_scan(). 594 nand_chip structure member bbt_td before calling nand_scan().
595 If a mirror table is neccecary a second structure must be 595 If a mirror table is necessary a second structure must be
596 created and a pointer to this structure must be stored 596 created and a pointer to this structure must be stored
597 in bbt_md inside the nand_chip structure. If the bbt_md 597 in bbt_md inside the nand_chip structure. If the bbt_md
598 member is set to NULL then only the main table is used 598 member is set to NULL then only the main table is used
@@ -666,7 +666,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
666 <para> 666 <para>
667 For automatic placement some blocks must be reserved for 667 For automatic placement some blocks must be reserved for
668 bad block table storage. The number of reserved blocks is defined 668 bad block table storage. The number of reserved blocks is defined
669 in the maxblocks member of the babd block table description structure. 669 in the maxblocks member of the bad block table description structure.
670 Reserving 4 blocks for mirrored tables should be a reasonable number. 670 Reserving 4 blocks for mirrored tables should be a reasonable number.
671 This also limits the number of blocks which are scanned for the bad 671 This also limits the number of blocks which are scanned for the bad
672 block table ident pattern. 672 block table ident pattern.
@@ -1068,11 +1068,11 @@ in this page</entry>
1068 <chapter id="filesystems"> 1068 <chapter id="filesystems">
1069 <title>Filesystem support</title> 1069 <title>Filesystem support</title>
1070 <para> 1070 <para>
1071 The NAND driver provides all neccecary functions for a 1071 The NAND driver provides all necessary functions for a
1072 filesystem via the MTD interface. 1072 filesystem via the MTD interface.
1073 </para> 1073 </para>
1074 <para> 1074 <para>
1075 Filesystems must be aware of the NAND pecularities and 1075 Filesystems must be aware of the NAND peculiarities and
1076 restrictions. One major restrictions of NAND Flash is, that you cannot 1076 restrictions. One major restrictions of NAND Flash is, that you cannot
1077 write as often as you want to a page. The consecutive writes to a page, 1077 write as often as you want to a page. The consecutive writes to a page,
1078 before erasing it again, are restricted to 1-3 writes, depending on the 1078 before erasing it again, are restricted to 1-3 writes, depending on the
@@ -1222,7 +1222,7 @@ in this page</entry>
1222#define NAND_BBT_VERSION 0x00000100 1222#define NAND_BBT_VERSION 0x00000100
1223/* Create a bbt if none axists */ 1223/* Create a bbt if none axists */
1224#define NAND_BBT_CREATE 0x00000200 1224#define NAND_BBT_CREATE 0x00000200
1225/* Write bbt if neccecary */ 1225/* Write bbt if necessary */
1226#define NAND_BBT_WRITE 0x00001000 1226#define NAND_BBT_WRITE 0x00001000
1227/* Read and write back block contents when writing bbt */ 1227/* Read and write back block contents when writing bbt */
1228#define NAND_BBT_SAVECONTENT 0x00002000 1228#define NAND_BBT_SAVECONTENT 0x00002000
diff --git a/Documentation/DocBook/regulator.tmpl b/Documentation/DocBook/regulator.tmpl
index 346e552fa2cc..3b08a085d2c7 100644
--- a/Documentation/DocBook/regulator.tmpl
+++ b/Documentation/DocBook/regulator.tmpl
@@ -155,7 +155,7 @@
155 release regulators. Functions are 155 release regulators. Functions are
156 provided to <link linkend='API-regulator-enable'>enable</link> 156 provided to <link linkend='API-regulator-enable'>enable</link>
157 and <link linkend='API-regulator-disable'>disable</link> the 157 and <link linkend='API-regulator-disable'>disable</link> the
158 reguator and to get and set the runtime parameters of the 158 regulator and to get and set the runtime parameters of the
159 regulator. 159 regulator.
160 </para> 160 </para>
161 <para> 161 <para>
diff --git a/Documentation/DocBook/uio-howto.tmpl b/Documentation/DocBook/uio-howto.tmpl
index 95618159e29b..bbe9c1fd5cef 100644
--- a/Documentation/DocBook/uio-howto.tmpl
+++ b/Documentation/DocBook/uio-howto.tmpl
@@ -766,10 +766,10 @@ framework to set up sysfs files for this region. Simply leave it alone.
766 <para> 766 <para>
767 The dynamic memory regions will be allocated when the UIO device file, 767 The dynamic memory regions will be allocated when the UIO device file,
768 <varname>/dev/uioX</varname> is opened. 768 <varname>/dev/uioX</varname> is opened.
769 Simiar to static memory resources, the memory region information for 769 Similar to static memory resources, the memory region information for
770 dynamic regions is then visible via sysfs at 770 dynamic regions is then visible via sysfs at
771 <varname>/sys/class/uio/uioX/maps/mapY/*</varname>. 771 <varname>/sys/class/uio/uioX/maps/mapY/*</varname>.
772 The dynmaic memory regions will be freed when the UIO device file is 772 The dynamic memory regions will be freed when the UIO device file is
773 closed. When no processes are holding the device file open, the address 773 closed. When no processes are holding the device file open, the address
774 returned to userspace is ~0. 774 returned to userspace is ~0.
775 </para> 775 </para>
diff --git a/Documentation/DocBook/usb.tmpl b/Documentation/DocBook/usb.tmpl
index 8d57c1888dca..85fc0e28576f 100644
--- a/Documentation/DocBook/usb.tmpl
+++ b/Documentation/DocBook/usb.tmpl
@@ -153,7 +153,7 @@
153 153
154 <listitem><para>The Linux USB API supports synchronous calls for 154 <listitem><para>The Linux USB API supports synchronous calls for
155 control and bulk messages. 155 control and bulk messages.
156 It also supports asynchnous calls for all kinds of data transfer, 156 It also supports asynchronous calls for all kinds of data transfer,
157 using request structures called "URBs" (USB Request Blocks). 157 using request structures called "URBs" (USB Request Blocks).
158 </para></listitem> 158 </para></listitem>
159 159
diff --git a/Documentation/DocBook/writing-an-alsa-driver.tmpl b/Documentation/DocBook/writing-an-alsa-driver.tmpl
index d0056a4e9c53..6f639d9530b5 100644
--- a/Documentation/DocBook/writing-an-alsa-driver.tmpl
+++ b/Documentation/DocBook/writing-an-alsa-driver.tmpl
@@ -5696,7 +5696,7 @@ struct _snd_pcm_runtime {
5696 suspending the PCM operations via 5696 suspending the PCM operations via
5697 <function>snd_pcm_suspend_all()</function> or 5697 <function>snd_pcm_suspend_all()</function> or
5698 <function>snd_pcm_suspend()</function>. It means that the PCM 5698 <function>snd_pcm_suspend()</function>. It means that the PCM
5699 streams are already stoppped when the register snapshot is 5699 streams are already stopped when the register snapshot is
5700 taken. But, remember that you don't have to restart the PCM 5700 taken. But, remember that you don't have to restart the PCM
5701 stream in the resume callback. It'll be restarted via 5701 stream in the resume callback. It'll be restarted via
5702 trigger call with <constant>SNDRV_PCM_TRIGGER_RESUME</constant> 5702 trigger call with <constant>SNDRV_PCM_TRIGGER_RESUME</constant>
diff --git a/Documentation/PCI/MSI-HOWTO.txt b/Documentation/PCI/MSI-HOWTO.txt
index 10a93696e55a..0d920d54536d 100644
--- a/Documentation/PCI/MSI-HOWTO.txt
+++ b/Documentation/PCI/MSI-HOWTO.txt
@@ -576,7 +576,7 @@ Some devices are known to have faulty MSI implementations. Usually this
576is handled in the individual device driver, but occasionally it's necessary 576is handled in the individual device driver, but occasionally it's necessary
577to handle this with a quirk. Some drivers have an option to disable use 577to handle this with a quirk. Some drivers have an option to disable use
578of MSI. While this is a convenient workaround for the driver author, 578of MSI. While this is a convenient workaround for the driver author,
579it is not good practise, and should not be emulated. 579it is not good practice, and should not be emulated.
580 580
5815.4. Finding why MSIs are disabled on a device 5815.4. Finding why MSIs are disabled on a device
582 582
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/RCU/whatisRCU.txt b/Documentation/RCU/whatisRCU.txt
index 49b8551a3b68..e48c57f1943b 100644
--- a/Documentation/RCU/whatisRCU.txt
+++ b/Documentation/RCU/whatisRCU.txt
@@ -818,7 +818,7 @@ RCU pointer/list update:
818 list_add_tail_rcu 818 list_add_tail_rcu
819 list_del_rcu 819 list_del_rcu
820 list_replace_rcu 820 list_replace_rcu
821 hlist_add_after_rcu 821 hlist_add_behind_rcu
822 hlist_add_before_rcu 822 hlist_add_before_rcu
823 hlist_add_head_rcu 823 hlist_add_head_rcu
824 hlist_del_rcu 824 hlist_del_rcu
diff --git a/Documentation/SubmittingDrivers b/Documentation/SubmittingDrivers
index 36d16bbf72c6..31d372609ac0 100644
--- a/Documentation/SubmittingDrivers
+++ b/Documentation/SubmittingDrivers
@@ -146,10 +146,6 @@ LWN.net:
146 Porting drivers from prior kernels to 2.6: 146 Porting drivers from prior kernels to 2.6:
147 http://lwn.net/Articles/driver-porting/ 147 http://lwn.net/Articles/driver-porting/
148 148
149KernelTrap:
150 Occasional Linux kernel articles and developer interviews
151 http://kerneltrap.org/
152
153KernelNewbies: 149KernelNewbies:
154 Documentation and assistance for new kernel programmers 150 Documentation and assistance for new kernel programmers
155 http://kernelnewbies.org/ 151 http://kernelnewbies.org/
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index 7e9abb8a276b..0a523c9a5ff4 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -84,18 +84,42 @@ is another popular alternative.
84 84
852) Describe your changes. 852) Describe your changes.
86 86
87Describe the technical detail of the change(s) your patch includes. 87Describe your problem. Whether your patch is a one-line bug fix or
88 885000 lines of a new feature, there must be an underlying problem that
89Be as specific as possible. The WORST descriptions possible include 89motivated you to do this work. Convince the reviewer that there is a
90things like "update driver X", "bug fix for driver X", or "this patch 90problem worth fixing and that it makes sense for them to read past the
91includes updates for subsystem X. Please apply." 91first paragraph.
92
93Describe user-visible impact. Straight up crashes and lockups are
94pretty convincing, but not all bugs are that blatant. Even if the
95problem was spotted during code review, describe the impact you think
96it can have on users. Keep in mind that the majority of Linux
97installations run kernels from secondary stable trees or
98vendor/product-specific trees that cherry-pick only specific patches
99from upstream, so include anything that could help route your change
100downstream: provoking circumstances, excerpts from dmesg, crash
101descriptions, performance regressions, latency spikes, lockups, etc.
102
103Quantify optimizations and trade-offs. If you claim improvements in
104performance, memory consumption, stack footprint, or binary size,
105include numbers that back them up. But also describe non-obvious
106costs. Optimizations usually aren't free but trade-offs between CPU,
107memory, and readability; or, when it comes to heuristics, between
108different workloads. Describe the expected downsides of your
109optimization so that the reviewer can weigh costs against benefits.
110
111Once the problem is established, describe what you are actually doing
112about it in technical detail. It's important to describe the change
113in plain English for the reviewer to verify that the code is behaving
114as you intend it to.
92 115
93The maintainer will thank you if you write your patch description in a 116The maintainer will thank you if you write your patch description in a
94form which can be easily pulled into Linux's source code management 117form which can be easily pulled into Linux's source code management
95system, git, as a "commit log". See #15, below. 118system, git, as a "commit log". See #15, below.
96 119
97If your description starts to get long, that's a sign that you probably 120Solve only one problem per patch. If your description starts to get
98need to split up your patch. See #3, next. 121long, that's a sign that you probably need to split up your patch.
122See #3, next.
99 123
100When you submit or resubmit a patch or patch series, include the 124When you submit or resubmit a patch or patch series, include the
101complete patch description and justification for it. Don't just 125complete patch description and justification for it. Don't just
@@ -396,13 +420,13 @@ you are responsible for last-minute changes. Example :
396 [lucky@maintainer.example.org: struct foo moved from foo.c to foo.h] 420 [lucky@maintainer.example.org: struct foo moved from foo.c to foo.h]
397 Signed-off-by: Lucky K Maintainer <lucky@maintainer.example.org> 421 Signed-off-by: Lucky K Maintainer <lucky@maintainer.example.org>
398 422
399This practise is particularly helpful if you maintain a stable branch and 423This practice is particularly helpful if you maintain a stable branch and
400want at the same time to credit the author, track changes, merge the fix, 424want at the same time to credit the author, track changes, merge the fix,
401and protect the submitter from complaints. Note that under no circumstances 425and protect the submitter from complaints. Note that under no circumstances
402can you change the author's identity (the From header), as it is the one 426can you change the author's identity (the From header), as it is the one
403which appears in the changelog. 427which appears in the changelog.
404 428
405Special note to back-porters: It seems to be a common and useful practise 429Special note to back-porters: It seems to be a common and useful practice
406to insert an indication of the origin of a patch at the top of the commit 430to insert an indication of the origin of a patch at the top of the commit
407message (just after the subject line) to facilitate tracking. For instance, 431message (just after the subject line) to facilitate tracking. For instance,
408here's what we see in 2.6-stable : 432here's what we see in 2.6-stable :
diff --git a/Documentation/acpi/enumeration.txt b/Documentation/acpi/enumeration.txt
index fd786ea13a1f..e182be5e3c83 100644
--- a/Documentation/acpi/enumeration.txt
+++ b/Documentation/acpi/enumeration.txt
@@ -60,12 +60,6 @@ If the driver needs to perform more complex initialization like getting and
60configuring GPIOs it can get its ACPI handle and extract this information 60configuring GPIOs it can get its ACPI handle and extract this information
61from ACPI tables. 61from ACPI tables.
62 62
63Currently the kernel is not able to automatically determine from which ACPI
64device it should make the corresponding platform device so we need to add
65the ACPI device explicitly to acpi_platform_device_ids list defined in
66drivers/acpi/acpi_platform.c. This limitation is only for the platform
67devices, SPI and I2C devices are created automatically as described below.
68
69DMA support 63DMA support
70~~~~~~~~~~~ 64~~~~~~~~~~~
71DMA controllers enumerated via ACPI should be registered in the system to 65DMA controllers enumerated via ACPI should be registered in the system to
diff --git a/Documentation/arm/CCN.txt b/Documentation/arm/CCN.txt
new file mode 100644
index 000000000000..0632b3aad83e
--- /dev/null
+++ b/Documentation/arm/CCN.txt
@@ -0,0 +1,52 @@
1ARM Cache Coherent Network
2==========================
3
4CCN-504 is a ring-bus interconnect consisting of 11 crosspoints
5(XPs), with each crosspoint supporting up to two device ports,
6so nodes (devices) 0 and 1 are connected to crosspoint 0,
7nodes 2 and 3 to crosspoint 1 etc.
8
9PMU (perf) driver
10-----------------
11
12The CCN driver registers a perf PMU driver, which provides
13description of available events and configuration options
14in sysfs, see /sys/bus/event_source/devices/ccn*.
15
16The "format" directory describes format of the config, config1
17and config2 fields of the perf_event_attr structure. The "events"
18directory provides configuration templates for all documented
19events, that can be used with perf tool. For example "xp_valid_flit"
20is an equivalent of "type=0x8,event=0x4". Other parameters must be
21explicitly specified. For events originating from device, "node"
22defines its index. All crosspoint events require "xp" (index),
23"port" (device port number) and "vc" (virtual channel ID) and
24"dir" (direction). Watchpoints (special "event" value 0xfe) also
25require comparator values ("cmp_l" and "cmp_h") and "mask", being
26index of the comparator mask.
27
28Masks are defined separately from the event description
29(due to limited number of the config values) in the "cmp_mask"
30directory, with first 8 configurable by user and additional
314 hardcoded for the most frequent use cases.
32
33Cycle counter is described by a "type" value 0xff and does
34not require any other settings.
35
36Example of perf tool use:
37
38/ # perf list | grep ccn
39 ccn/cycles/ [Kernel PMU event]
40<...>
41 ccn/xp_valid_flit/ [Kernel PMU event]
42<...>
43
44/ # perf stat -C 0 -e ccn/cycles/,ccn/xp_valid_flit,xp=1,port=0,vc=1,dir=1/ \
45 sleep 1
46
47The driver does not support sampling, therefore "perf record" will
48not work. Also notice that only single cpu is being selected
49("-C 0") - this is because perf framework does not support
50"non-CPU related" counters (yet?) so system-wide session ("-a")
51would try (and in most cases fail) to set up the same event
52per each CPU.
diff --git a/Documentation/arm/Marvell/README b/Documentation/arm/Marvell/README
index 2cce5401e323..4dc66c173e10 100644
--- a/Documentation/arm/Marvell/README
+++ b/Documentation/arm/Marvell/README
@@ -53,8 +53,8 @@ Kirkwood family
53 Functional Spec: http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf 53 Functional Spec: http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf
54 Homepage: http://www.marvell.com/embedded-processors/kirkwood/ 54 Homepage: http://www.marvell.com/embedded-processors/kirkwood/
55 Core: Feroceon ARMv5 compatible 55 Core: Feroceon ARMv5 compatible
56 Linux kernel mach directory: arch/arm/mach-kirkwood 56 Linux kernel mach directory: arch/arm/mach-mvebu
57 Linux kernel plat directory: arch/arm/plat-orion 57 Linux kernel plat directory: none
58 58
59Discovery family 59Discovery family
60---------------- 60----------------
@@ -83,7 +83,9 @@ EBU Armada family
83 88F6710 83 88F6710
84 88F6707 84 88F6707
85 88F6W11 85 88F6W11
86 Product Brief: http://www.marvell.com/embedded-processors/armada-300/assets/Marvell_ARMADA_370_SoC.pdf 86 Product Brief: http://www.marvell.com/embedded-processors/armada-300/assets/Marvell_ARMADA_370_SoC.pdf
87 Hardware Spec: http://www.marvell.com/embedded-processors/armada-300/assets/ARMADA370-datasheet.pdf
88 Functional Spec: http://www.marvell.com/embedded-processors/armada-300/assets/ARMADA370-FunctionalSpec-datasheet.pdf
87 89
88 Armada 375 Flavors: 90 Armada 375 Flavors:
89 88F6720 91 88F6720
@@ -100,8 +102,7 @@ EBU Armada family
100 MV78460 102 MV78460
101 NOTE: not to be confused with the non-SMP 78xx0 SoCs 103 NOTE: not to be confused with the non-SMP 78xx0 SoCs
102 Product Brief: http://www.marvell.com/embedded-processors/armada-xp/assets/Marvell-ArmadaXP-SoC-product%20brief.pdf 104 Product Brief: http://www.marvell.com/embedded-processors/armada-xp/assets/Marvell-ArmadaXP-SoC-product%20brief.pdf
103 105 Functional Spec: http://www.marvell.com/embedded-processors/armada-xp/assets/ARMADA-XP-Functional-SpecDatasheet.pdf
104 No public datasheet available.
105 106
106 Core: Sheeva ARMv7 compatible 107 Core: Sheeva ARMv7 compatible
107 108
@@ -135,7 +136,9 @@ Dove family (application processor)
135 Functional Spec : http://www.marvell.com/application-processors/armada-500/assets/Armada-510-Functional-Spec.pdf 136 Functional Spec : http://www.marvell.com/application-processors/armada-500/assets/Armada-510-Functional-Spec.pdf
136 Homepage: http://www.marvell.com/application-processors/armada-500/ 137 Homepage: http://www.marvell.com/application-processors/armada-500/
137 Core: ARMv7 compatible 138 Core: ARMv7 compatible
138 Directory: arch/arm/mach-dove 139
140 Directory: arch/arm/mach-mvebu (DT enabled platforms)
141 arch/arm/mach-dove (non-DT enabled platforms)
139 142
140PXA 2xx/3xx/93x/95x family 143PXA 2xx/3xx/93x/95x family
141-------------------------- 144--------------------------
@@ -253,10 +256,10 @@ Berlin family (Digital Entertainment)
253Long-term plans 256Long-term plans
254--------------- 257---------------
255 258
256 * Unify the mach-dove/, mach-mv78xx0/, mach-orion5x/ and 259 * Unify the mach-dove/, mach-mv78xx0/, mach-orion5x/ into the
257 mach-kirkwood/ into the mach-mvebu/ to support all SoCs from the 260 mach-mvebu/ to support all SoCs from the Marvell EBU (Engineering
258 Marvell EBU (Engineering Business Unit) in a single mach-<foo> 261 Business Unit) in a single mach-<foo> directory. The plat-orion/
259 directory. The plat-orion/ would therefore disappear. 262 would therefore disappear.
260 263
261 * Unify the mach-mmp/ and mach-pxa/ into the same mach-pxa 264 * Unify the mach-mmp/ and mach-pxa/ into the same mach-pxa
262 directory. The plat-pxa/ would therefore disappear. 265 directory. The plat-pxa/ would therefore disappear.
diff --git a/Documentation/arm/Samsung/Overview.txt b/Documentation/arm/Samsung/Overview.txt
index 658abb258cef..8f7309bad460 100644
--- a/Documentation/arm/Samsung/Overview.txt
+++ b/Documentation/arm/Samsung/Overview.txt
@@ -13,8 +13,6 @@ Introduction
13 13
14 - S3C24XX: See Documentation/arm/Samsung-S3C24XX/Overview.txt for full list 14 - S3C24XX: See Documentation/arm/Samsung-S3C24XX/Overview.txt for full list
15 - S3C64XX: S3C6400 and S3C6410 15 - S3C64XX: S3C6400 and S3C6410
16 - S5P6440
17 - S5PC100
18 - S5PC110 / S5PV210 16 - S5PC110 / S5PV210
19 17
20 18
@@ -34,8 +32,6 @@ Configuration
34 A number of configurations are supplied, as there is no current way of 32 A number of configurations are supplied, as there is no current way of
35 unifying all the SoCs into one kernel. 33 unifying all the SoCs into one kernel.
36 34
37 s5p6440_defconfig - S5P6440 specific default configuration
38 s5pc100_defconfig - S5PC100 specific default configuration
39 s5pc110_defconfig - S5PC110 specific default configuration 35 s5pc110_defconfig - S5PC110 specific default configuration
40 s5pv210_defconfig - S5PV210 specific default configuration 36 s5pv210_defconfig - S5PV210 specific default configuration
41 37
@@ -67,13 +63,6 @@ Layout changes
67 where to simplify the include and dependency issues involved with having 63 where to simplify the include and dependency issues involved with having
68 so many different platform directories. 64 so many different platform directories.
69 65
70 It was decided to remove plat-s5pc1xx as some of the support was already
71 in plat-s5p or plat-samsung, with the S5PC110 support added with S5PV210
72 the only user was the S5PC100. The S5PC100 specific items where moved to
73 arch/arm/mach-s5pc100.
74
75
76
77 66
78Port Contributors 67Port Contributors
79----------------- 68-----------------
diff --git a/Documentation/arm/Samsung/clksrc-change-registers.awk b/Documentation/arm/Samsung/clksrc-change-registers.awk
index 0c50220851fb..d9174fabe37e 100755
--- a/Documentation/arm/Samsung/clksrc-change-registers.awk
+++ b/Documentation/arm/Samsung/clksrc-change-registers.awk
@@ -68,7 +68,6 @@ BEGIN {
68 68
69 while (getline line < ARGV[1] > 0) { 69 while (getline line < ARGV[1] > 0) {
70 if (line ~ /\#define.*_MASK/ && 70 if (line ~ /\#define.*_MASK/ &&
71 !(line ~ /S5PC100_EPLL_MASK/) &&
72 !(line ~ /USB_SIG_MASK/)) { 71 !(line ~ /USB_SIG_MASK/)) {
73 splitdefine(line, fields) 72 splitdefine(line, fields)
74 name = fields[0] 73 name = fields[0]
diff --git a/Documentation/arm64/booting.txt b/Documentation/arm64/booting.txt
index 37fc4f632176..f3c05b5f9f08 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
@@ -141,6 +168,14 @@ Before jumping into the kernel, the following conditions must be met:
141 the kernel image will be entered must be initialised by software at a 168 the kernel image will be entered must be initialised by software at a
142 higher exception level to prevent execution in an UNKNOWN state. 169 higher exception level to prevent execution in an UNKNOWN state.
143 170
171 For systems with a GICv3 interrupt controller:
172 - If EL3 is present:
173 ICC_SRE_EL3.Enable (bit 3) must be initialiased to 0b1.
174 ICC_SRE_EL3.SRE (bit 0) must be initialised to 0b1.
175 - If the kernel is entered at EL1:
176 ICC.SRE_EL2.Enable (bit 3) must be initialised to 0b1
177 ICC_SRE_EL2.SRE (bit 0) must be initialised to 0b1.
178
144The requirements described above for CPU mode, caches, MMUs, architected 179The requirements described above for CPU mode, caches, MMUs, architected
145timers, coherency and system registers apply to all CPUs. All CPUs must 180timers, coherency and system registers apply to all CPUs. All CPUs must
146enter the kernel in the same exception level. 181enter the kernel in the same exception level.
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/memcg_test.txt b/Documentation/cgroups/memcg_test.txt
index 80ac454704b8..8870b0212150 100644
--- a/Documentation/cgroups/memcg_test.txt
+++ b/Documentation/cgroups/memcg_test.txt
@@ -24,64 +24,27 @@ Please note that implementation details can be changed.
24 24
25 a page/swp_entry may be charged (usage += PAGE_SIZE) at 25 a page/swp_entry may be charged (usage += PAGE_SIZE) at
26 26
27 mem_cgroup_charge_anon() 27 mem_cgroup_try_charge()
28 Called at new page fault and Copy-On-Write.
29
30 mem_cgroup_try_charge_swapin()
31 Called at do_swap_page() (page fault on swap entry) and swapoff.
32 Followed by charge-commit-cancel protocol. (With swap accounting)
33 At commit, a charge recorded in swap_cgroup is removed.
34
35 mem_cgroup_charge_file()
36 Called at add_to_page_cache()
37
38 mem_cgroup_cache_charge_swapin()
39 Called at shmem's swapin.
40
41 mem_cgroup_prepare_migration()
42 Called before migration. "extra" charge is done and followed by
43 charge-commit-cancel protocol.
44 At commit, charge against oldpage or newpage will be committed.
45 28
462. Uncharge 292. Uncharge
47 a page/swp_entry may be uncharged (usage -= PAGE_SIZE) by 30 a page/swp_entry may be uncharged (usage -= PAGE_SIZE) by
48 31
49 mem_cgroup_uncharge_page() 32 mem_cgroup_uncharge()
50 Called when an anonymous page is fully unmapped. I.e., mapcount goes 33 Called when a page's refcount goes down to 0.
51 to 0. If the page is SwapCache, uncharge is delayed until
52 mem_cgroup_uncharge_swapcache().
53
54 mem_cgroup_uncharge_cache_page()
55 Called when a page-cache is deleted from radix-tree. If the page is
56 SwapCache, uncharge is delayed until mem_cgroup_uncharge_swapcache().
57
58 mem_cgroup_uncharge_swapcache()
59 Called when SwapCache is removed from radix-tree. The charge itself
60 is moved to swap_cgroup. (If mem+swap controller is disabled, no
61 charge to swap occurs.)
62 34
63 mem_cgroup_uncharge_swap() 35 mem_cgroup_uncharge_swap()
64 Called when swp_entry's refcnt goes down to 0. A charge against swap 36 Called when swp_entry's refcnt goes down to 0. A charge against swap
65 disappears. 37 disappears.
66 38
67 mem_cgroup_end_migration(old, new)
68 At success of migration old is uncharged (if necessary), a charge
69 to new page is committed. At failure, charge to old page is committed.
70
713. charge-commit-cancel 393. charge-commit-cancel
72 In some case, we can't know this "charge" is valid or not at charging 40 Memcg pages are charged in two steps:
73 (because of races). 41 mem_cgroup_try_charge()
74 To handle such case, there are charge-commit-cancel functions. 42 mem_cgroup_commit_charge() or mem_cgroup_cancel_charge()
75 mem_cgroup_try_charge_XXX
76 mem_cgroup_commit_charge_XXX
77 mem_cgroup_cancel_charge_XXX
78 these are used in swap-in and migration.
79 43
80 At try_charge(), there are no flags to say "this page is charged". 44 At try_charge(), there are no flags to say "this page is charged".
81 at this point, usage += PAGE_SIZE. 45 at this point, usage += PAGE_SIZE.
82 46
83 At commit(), the function checks the page should be charged or not 47 At commit(), the page is associated with the memcg.
84 and set flags or avoid charging.(usage -= PAGE_SIZE)
85 48
86 At cancel(), simply usage -= PAGE_SIZE. 49 At cancel(), simply usage -= PAGE_SIZE.
87 50
@@ -91,18 +54,6 @@ Under below explanation, we assume CONFIG_MEM_RES_CTRL_SWAP=y.
91 Anonymous page is newly allocated at 54 Anonymous page is newly allocated at
92 - page fault into MAP_ANONYMOUS mapping. 55 - page fault into MAP_ANONYMOUS mapping.
93 - Copy-On-Write. 56 - Copy-On-Write.
94 It is charged right after it's allocated before doing any page table
95 related operations. Of course, it's uncharged when another page is used
96 for the fault address.
97
98 At freeing anonymous page (by exit() or munmap()), zap_pte() is called
99 and pages for ptes are freed one by one.(see mm/memory.c). Uncharges
100 are done at page_remove_rmap() when page_mapcount() goes down to 0.
101
102 Another page freeing is by page-reclaim (vmscan.c) and anonymous
103 pages are swapped out. In this case, the page is marked as
104 PageSwapCache(). uncharge() routine doesn't uncharge the page marked
105 as SwapCache(). It's delayed until __delete_from_swap_cache().
106 57
107 4.1 Swap-in. 58 4.1 Swap-in.
108 At swap-in, the page is taken from swap-cache. There are 2 cases. 59 At swap-in, the page is taken from swap-cache. There are 2 cases.
@@ -111,41 +62,6 @@ Under below explanation, we assume CONFIG_MEM_RES_CTRL_SWAP=y.
111 (b) If the SwapCache has been mapped by processes, it has been 62 (b) If the SwapCache has been mapped by processes, it has been
112 charged already. 63 charged already.
113 64
114 This swap-in is one of the most complicated work. In do_swap_page(),
115 following events occur when pte is unchanged.
116
117 (1) the page (SwapCache) is looked up.
118 (2) lock_page()
119 (3) try_charge_swapin()
120 (4) reuse_swap_page() (may call delete_swap_cache())
121 (5) commit_charge_swapin()
122 (6) swap_free().
123
124 Considering following situation for example.
125
126 (A) The page has not been charged before (2) and reuse_swap_page()
127 doesn't call delete_from_swap_cache().
128 (B) The page has not been charged before (2) and reuse_swap_page()
129 calls delete_from_swap_cache().
130 (C) The page has been charged before (2) and reuse_swap_page() doesn't
131 call delete_from_swap_cache().
132 (D) The page has been charged before (2) and reuse_swap_page() calls
133 delete_from_swap_cache().
134
135 memory.usage/memsw.usage changes to this page/swp_entry will be
136 Case (A) (B) (C) (D)
137 Event
138 Before (2) 0/ 1 0/ 1 1/ 1 1/ 1
139 ===========================================
140 (3) +1/+1 +1/+1 +1/+1 +1/+1
141 (4) - 0/ 0 - -1/ 0
142 (5) 0/-1 0/ 0 -1/-1 0/ 0
143 (6) - 0/-1 - 0/-1
144 ===========================================
145 Result 1/ 1 1/ 1 1/ 1 1/ 1
146
147 In any cases, charges to this page should be 1/ 1.
148
149 4.2 Swap-out. 65 4.2 Swap-out.
150 At swap-out, typical state transition is below. 66 At swap-out, typical state transition is below.
151 67
@@ -158,28 +74,20 @@ Under below explanation, we assume CONFIG_MEM_RES_CTRL_SWAP=y.
158 swp_entry's refcnt -= 1. 74 swp_entry's refcnt -= 1.
159 75
160 76
161 At (b), the page is marked as SwapCache and not uncharged.
162 At (d), the page is removed from SwapCache and a charge in page_cgroup
163 is moved to swap_cgroup.
164
165 Finally, at task exit, 77 Finally, at task exit,
166 (e) zap_pte() is called and swp_entry's refcnt -=1 -> 0. 78 (e) zap_pte() is called and swp_entry's refcnt -=1 -> 0.
167 Here, a charge in swap_cgroup disappears.
168 79
1695. Page Cache 805. Page Cache
170 Page Cache is charged at 81 Page Cache is charged at
171 - add_to_page_cache_locked(). 82 - add_to_page_cache_locked().
172 83
173 uncharged at
174 - __remove_from_page_cache().
175
176 The logic is very clear. (About migration, see below) 84 The logic is very clear. (About migration, see below)
177 Note: __remove_from_page_cache() is called by remove_from_page_cache() 85 Note: __remove_from_page_cache() is called by remove_from_page_cache()
178 and __remove_mapping(). 86 and __remove_mapping().
179 87
1806. Shmem(tmpfs) Page Cache 886. Shmem(tmpfs) Page Cache
181 Memcg's charge/uncharge have special handlers of shmem. The best way 89 The best way to understand shmem's page state transition is to read
182 to understand shmem's page state transition is to read mm/shmem.c. 90 mm/shmem.c.
183 But brief explanation of the behavior of memcg around shmem will be 91 But brief explanation of the behavior of memcg around shmem will be
184 helpful to understand the logic. 92 helpful to understand the logic.
185 93
@@ -192,56 +100,10 @@ Under below explanation, we assume CONFIG_MEM_RES_CTRL_SWAP=y.
192 It's charged when... 100 It's charged when...
193 - A new page is added to shmem's radix-tree. 101 - A new page is added to shmem's radix-tree.
194 - A swp page is read. (move a charge from swap_cgroup to page_cgroup) 102 - A swp page is read. (move a charge from swap_cgroup to page_cgroup)
195 It's uncharged when
196 - A page is removed from radix-tree and not SwapCache.
197 - When SwapCache is removed, a charge is moved to swap_cgroup.
198 - When swp_entry's refcnt goes down to 0, a charge in swap_cgroup
199 disappears.
200 103
2017. Page Migration 1047. Page Migration
202 One of the most complicated functions is page-migration-handler. 105
203 Memcg has 2 routines. Assume that we are migrating a page's contents 106 mem_cgroup_migrate()
204 from OLDPAGE to NEWPAGE.
205
206 Usual migration logic is..
207 (a) remove the page from LRU.
208 (b) allocate NEWPAGE (migration target)
209 (c) lock by lock_page().
210 (d) unmap all mappings.
211 (e-1) If necessary, replace entry in radix-tree.
212 (e-2) move contents of a page.
213 (f) map all mappings again.
214 (g) pushback the page to LRU.
215 (-) OLDPAGE will be freed.
216
217 Before (g), memcg should complete all necessary charge/uncharge to
218 NEWPAGE/OLDPAGE.
219
220 The point is....
221 - If OLDPAGE is anonymous, all charges will be dropped at (d) because
222 try_to_unmap() drops all mapcount and the page will not be
223 SwapCache.
224
225 - If OLDPAGE is SwapCache, charges will be kept at (g) because
226 __delete_from_swap_cache() isn't called at (e-1)
227
228 - If OLDPAGE is page-cache, charges will be kept at (g) because
229 remove_from_swap_cache() isn't called at (e-1)
230
231 memcg provides following hooks.
232
233 - mem_cgroup_prepare_migration(OLDPAGE)
234 Called after (b) to account a charge (usage += PAGE_SIZE) against
235 memcg which OLDPAGE belongs to.
236
237 - mem_cgroup_end_migration(OLDPAGE, NEWPAGE)
238 Called after (f) before (g).
239 If OLDPAGE is used, commit OLDPAGE again. If OLDPAGE is already
240 charged, a charge by prepare_migration() is automatically canceled.
241 If NEWPAGE is used, commit NEWPAGE and uncharge OLDPAGE.
242
243 But zap_pte() (by exit or munmap) can be called while migration,
244 we have to check if OLDPAGE/NEWPAGE is a valid page after commit().
245 107
2468. LRU 1088. LRU
247 Each memcg has its own private LRU. Now, its handling is under global 109 Each memcg has its own private LRU. Now, its handling is under global
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/cpu-freq/intel-pstate.txt b/Documentation/cpu-freq/intel-pstate.txt
index e742d21dbd96..a69ffe1d54d5 100644
--- a/Documentation/cpu-freq/intel-pstate.txt
+++ b/Documentation/cpu-freq/intel-pstate.txt
@@ -15,10 +15,13 @@ New sysfs files for controlling P state selection have been added to
15/sys/devices/system/cpu/intel_pstate/ 15/sys/devices/system/cpu/intel_pstate/
16 16
17 max_perf_pct: limits the maximum P state that will be requested by 17 max_perf_pct: limits the maximum P state that will be requested by
18 the driver stated as a percentage of the available performance. 18 the driver stated as a percentage of the available performance. The
19 available (P states) performance may be reduced by the no_turbo
20 setting described below.
19 21
20 min_perf_pct: limits the minimum P state that will be requested by 22 min_perf_pct: limits the minimum P state that will be requested by
21 the driver stated as a percentage of the available performance. 23 the driver stated as a percentage of the max (non-turbo)
24 performance level.
22 25
23 no_turbo: limits the driver to selecting P states below the turbo 26 no_turbo: limits the driver to selecting P states below the turbo
24 frequency range. 27 frequency range.
diff --git a/Documentation/device-mapper/switch.txt b/Documentation/device-mapper/switch.txt
index 2fa749387be8..8897d0494838 100644
--- a/Documentation/device-mapper/switch.txt
+++ b/Documentation/device-mapper/switch.txt
@@ -106,6 +106,11 @@ which paths.
106 The path number in the range 0 ... (<num_paths> - 1). 106 The path number in the range 0 ... (<num_paths> - 1).
107 Expressed in hexadecimal (WITHOUT any prefix like 0x). 107 Expressed in hexadecimal (WITHOUT any prefix like 0x).
108 108
109R<n>,<m>
110 This parameter allows repetitive patterns to be loaded quickly. <n> and <m>
111 are hexadecimal numbers. The last <n> mappings are repeated in the next <m>
112 slots.
113
109Status 114Status
110====== 115======
111 116
@@ -124,3 +129,10 @@ Create a switch device with 64kB region size:
124Set mappings for the first 7 entries to point to devices switch0, switch1, 129Set mappings for the first 7 entries to point to devices switch0, switch1,
125switch2, switch0, switch1, switch2, switch1: 130switch2, switch0, switch1, switch2, switch1:
126 dmsetup message switch 0 set_region_mappings 0:0 :1 :2 :0 :1 :2 :1 131 dmsetup message switch 0 set_region_mappings 0:0 :1 :2 :0 :1 :2 :1
132
133Set repetitive mapping. This command:
134 dmsetup message switch 0 set_region_mappings 1000:1 :2 R2,10
135is equivalent to:
136 dmsetup message switch 0 set_region_mappings 1000:1 :2 :1 :2 :1 :2 :1 :2 \
137 :1 :2 :1 :2 :1 :2 :1 :2 :1 :2
138
diff --git a/Documentation/devicetree/bindings/arm/adapteva.txt b/Documentation/devicetree/bindings/arm/adapteva.txt
new file mode 100644
index 000000000000..1d8af9e36065
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/adapteva.txt
@@ -0,0 +1,7 @@
1Adapteva Platforms Device Tree Bindings
2---------------------------------------
3
4Parallella board
5
6Required root node properties:
7 - compatible = "adapteva,parallella";
diff --git a/Documentation/devicetree/bindings/arm/arm-boards b/Documentation/devicetree/bindings/arm/arm-boards
index 3509707f9320..c554ed3d44fb 100644
--- a/Documentation/devicetree/bindings/arm/arm-boards
+++ b/Documentation/devicetree/bindings/arm/arm-boards
@@ -86,3 +86,9 @@ Interrupt controllers:
86 compatible = "arm,versatile-sic"; 86 compatible = "arm,versatile-sic";
87 interrupt-controller; 87 interrupt-controller;
88 #interrupt-cells = <1>; 88 #interrupt-cells = <1>;
89
90Required nodes:
91
92- core-module: the root node to the Versatile platforms must have
93 a core-module with regs and the compatible strings
94 "arm,core-module-versatile", "syscon"
diff --git a/Documentation/devicetree/bindings/arm/armada-380-mpcore-soc-ctrl.txt b/Documentation/devicetree/bindings/arm/armada-380-mpcore-soc-ctrl.txt
new file mode 100644
index 000000000000..8781073029e9
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/armada-380-mpcore-soc-ctrl.txt
@@ -0,0 +1,14 @@
1Marvell Armada 38x CA9 MPcore SoC Controller
2============================================
3
4Required properties:
5
6- compatible: Should be "marvell,armada-380-mpcore-soc-ctrl".
7
8- reg: should be the register base and length as documented in the
9 datasheet for the CA9 MPcore SoC Control registers
10
11mpcore-soc-ctrl@20d20 {
12 compatible = "marvell,armada-380-mpcore-soc-ctrl";
13 reg = <0x20d20 0x6c>;
14};
diff --git a/Documentation/devicetree/bindings/arm/atmel-pmc.txt b/Documentation/devicetree/bindings/arm/atmel-pmc.txt
index 389bed5056e8..795cc78543fe 100644
--- a/Documentation/devicetree/bindings/arm/atmel-pmc.txt
+++ b/Documentation/devicetree/bindings/arm/atmel-pmc.txt
@@ -1,7 +1,10 @@
1* Power Management Controller (PMC) 1* Power Management Controller (PMC)
2 2
3Required properties: 3Required properties:
4- compatible: Should be "atmel,at91rm9200-pmc" 4- compatible: Should be "atmel,<chip>-pmc".
5 <chip> can be: at91rm9200, at91sam9260, at91sam9g45, at91sam9n12,
6 at91sam9x5, sama5d3
7
5- reg: Should contain PMC registers location and length 8- reg: Should contain PMC registers location and length
6 9
7Examples: 10Examples:
diff --git a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm11351-cpu-method b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm11351-cpu-method
new file mode 100644
index 000000000000..8240c023e202
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm11351-cpu-method
@@ -0,0 +1,36 @@
1Broadcom Kona Family CPU Enable Method
2--------------------------------------
3This binding defines the enable method used for starting secondary
4CPUs in the following Broadcom SoCs:
5 BCM11130, BCM11140, BCM11351, BCM28145, BCM28155, BCM21664
6
7The enable method is specified by defining the following required
8properties in the "cpus" device tree node:
9 - enable-method = "brcm,bcm11351-cpu-method";
10 - secondary-boot-reg = <...>;
11
12The secondary-boot-reg property is a u32 value that specifies the
13physical address of the register used to request the ROM holding pen
14code release a secondary CPU. The value written to the register is
15formed by encoding the target CPU id into the low bits of the
16physical start address it should jump to.
17
18Example:
19 cpus {
20 #address-cells = <1>;
21 #size-cells = <0>;
22 enable-method = "brcm,bcm11351-cpu-method";
23 secondary-boot-reg = <0x3500417c>;
24
25 cpu0: cpu@0 {
26 device_type = "cpu";
27 compatible = "arm,cortex-a9";
28 reg = <0>;
29 };
30
31 cpu1: cpu@1 {
32 device_type = "cpu";
33 compatible = "arm,cortex-a9";
34 reg = <1>;
35 };
36 };
diff --git a/Documentation/devicetree/bindings/arm/brcm-brcmstb.txt b/Documentation/devicetree/bindings/arm/brcm-brcmstb.txt
new file mode 100644
index 000000000000..3c436cc4f35d
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/brcm-brcmstb.txt
@@ -0,0 +1,95 @@
1ARM Broadcom STB platforms Device Tree Bindings
2-----------------------------------------------
3Boards with Broadcom Brahma15 ARM-based BCMxxxx (generally BCM7xxx variants)
4SoC shall have the following DT organization:
5
6Required root node properties:
7 - compatible: "brcm,bcm<chip_id>", "brcm,brcmstb"
8
9example:
10/ {
11 #address-cells = <2>;
12 #size-cells = <2>;
13 model = "Broadcom STB (bcm7445)";
14 compatible = "brcm,bcm7445", "brcm,brcmstb";
15
16Further, syscon nodes that map platform-specific registers used for general
17system control is required:
18
19 - compatible: "brcm,bcm<chip_id>-sun-top-ctrl", "syscon"
20 - compatible: "brcm,bcm<chip_id>-hif-cpubiuctrl", "syscon"
21 - compatible: "brcm,bcm<chip_id>-hif-continuation", "syscon"
22
23example:
24 rdb {
25 #address-cells = <1>;
26 #size-cells = <1>;
27 compatible = "simple-bus";
28 ranges = <0 0x00 0xf0000000 0x1000000>;
29
30 sun_top_ctrl: syscon@404000 {
31 compatible = "brcm,bcm7445-sun-top-ctrl", "syscon";
32 reg = <0x404000 0x51c>;
33 };
34
35 hif_cpubiuctrl: syscon@3e2400 {
36 compatible = "brcm,bcm7445-hif-cpubiuctrl", "syscon";
37 reg = <0x3e2400 0x5b4>;
38 };
39
40 hif_continuation: syscon@452000 {
41 compatible = "brcm,bcm7445-hif-continuation", "syscon";
42 reg = <0x452000 0x100>;
43 };
44 };
45
46Lastly, nodes that allow for support of SMP initialization and reboot are
47required:
48
49smpboot
50-------
51Required properties:
52
53 - compatible
54 The string "brcm,brcmstb-smpboot".
55
56 - syscon-cpu
57 A phandle / integer array property which lets the BSP know the location
58 of certain CPU power-on registers.
59
60 The layout of the property is as follows:
61 o a phandle to the "hif_cpubiuctrl" syscon node
62 o offset to the base CPU power zone register
63 o offset to the base CPU reset register
64
65 - syscon-cont
66 A phandle pointing to the syscon node which describes the CPU boot
67 continuation registers.
68 o a phandle to the "hif_continuation" syscon node
69
70example:
71 smpboot {
72 compatible = "brcm,brcmstb-smpboot";
73 syscon-cpu = <&hif_cpubiuctrl 0x88 0x178>;
74 syscon-cont = <&hif_continuation>;
75 };
76
77reboot
78-------
79Required properties
80
81 - compatible
82 The string property "brcm,brcmstb-reboot".
83
84 - syscon
85 A phandle / integer array that points to the syscon node which describes
86 the general system reset registers.
87 o a phandle to "sun_top_ctrl"
88 o offset to the "reset source enable" register
89 o offset to the "software master reset" register
90
91example:
92 reboot {
93 compatible = "brcm,brcmstb-reboot";
94 syscon = <&sun_top_ctrl 0x304 0x308>;
95 };
diff --git a/Documentation/devicetree/bindings/arm/ccn.txt b/Documentation/devicetree/bindings/arm/ccn.txt
new file mode 100644
index 000000000000..b100d3847d88
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/ccn.txt
@@ -0,0 +1,21 @@
1* ARM CCN (Cache Coherent Network)
2
3Required properties:
4
5- compatible: (standard compatible string) should be one of:
6 "arm,ccn-504"
7 "arm,ccn-508"
8
9- reg: (standard registers property) physical address and size
10 (16MB) of the configuration registers block
11
12- interrupts: (standard interrupt property) single interrupt
13 generated by the control block
14
15Example:
16
17 ccn@0x2000000000 {
18 compatible = "arm,ccn-504";
19 reg = <0x20 0x00000000 0 0x1000000>;
20 interrupts = <0 181 4>;
21 };
diff --git a/Documentation/devicetree/bindings/arm/cpu-enable-method/marvell,berlin-smp b/Documentation/devicetree/bindings/arm/cpu-enable-method/marvell,berlin-smp
new file mode 100644
index 000000000000..cd236b727e2a
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/cpu-enable-method/marvell,berlin-smp
@@ -0,0 +1,41 @@
1========================================================
2Secondary CPU enable-method "marvell,berlin-smp" binding
3========================================================
4
5This document describes the "marvell,berlin-smp" method for enabling secondary
6CPUs. To apply to all CPUs, a single "marvell,berlin-smp" enable method should
7be defined in the "cpus" node.
8
9Enable method name: "marvell,berlin-smp"
10Compatible machines: "marvell,berlin2" and "marvell,berlin2q"
11Compatible CPUs: "marvell,pj4b" and "arm,cortex-a9"
12Related properties: (none)
13
14Note:
15This enable method needs valid nodes compatible with "arm,cortex-a9-scu" and
16"marvell,berlin-cpu-ctrl"[1].
17
18Example:
19
20 cpus {
21 #address-cells = <1>;
22 #size-cells = <0>;
23 enable-method = "marvell,berlin-smp";
24
25 cpu@0 {
26 compatible = "marvell,pj4b";
27 device_type = "cpu";
28 next-level-cache = <&l2>;
29 reg = <0>;
30 };
31
32 cpu@1 {
33 compatible = "marvell,pj4b";
34 device_type = "cpu";
35 next-level-cache = <&l2>;
36 reg = <1>;
37 };
38 };
39
40--
41[1] arm/marvell,berlin.txt
diff --git a/Documentation/devicetree/bindings/arm/cpus.txt b/Documentation/devicetree/bindings/arm/cpus.txt
index 1fe72a0778cd..298e2f6b33c6 100644
--- a/Documentation/devicetree/bindings/arm/cpus.txt
+++ b/Documentation/devicetree/bindings/arm/cpus.txt
@@ -152,7 +152,9 @@ nodes to be present and contain the properties described below.
152 "arm,cortex-a7" 152 "arm,cortex-a7"
153 "arm,cortex-a8" 153 "arm,cortex-a8"
154 "arm,cortex-a9" 154 "arm,cortex-a9"
155 "arm,cortex-a12"
155 "arm,cortex-a15" 156 "arm,cortex-a15"
157 "arm,cortex-a17"
156 "arm,cortex-a53" 158 "arm,cortex-a53"
157 "arm,cortex-a57" 159 "arm,cortex-a57"
158 "arm,cortex-m0" 160 "arm,cortex-m0"
@@ -163,6 +165,7 @@ nodes to be present and contain the properties described below.
163 "arm,cortex-r4" 165 "arm,cortex-r4"
164 "arm,cortex-r5" 166 "arm,cortex-r5"
165 "arm,cortex-r7" 167 "arm,cortex-r7"
168 "brcm,brahma-b15"
166 "faraday,fa526" 169 "faraday,fa526"
167 "intel,sa110" 170 "intel,sa110"
168 "intel,sa1100" 171 "intel,sa1100"
@@ -184,6 +187,7 @@ nodes to be present and contain the properties described below.
184 can be one of: 187 can be one of:
185 "allwinner,sun6i-a31" 188 "allwinner,sun6i-a31"
186 "arm,psci" 189 "arm,psci"
190 "brcm,brahma-b15"
187 "marvell,armada-375-smp" 191 "marvell,armada-375-smp"
188 "marvell,armada-380-smp" 192 "marvell,armada-380-smp"
189 "marvell,armada-xp-smp" 193 "marvell,armada-xp-smp"
diff --git a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
index 5216b419016a..8b4f7b7fe88b 100644
--- a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
+++ b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
@@ -9,6 +9,18 @@ Required Properties:
9- reg: physical base address of the controller and length of memory mapped 9- reg: physical base address of the controller and length of memory mapped
10 region. 10 region.
11 11
12Optional Properties:
13- clocks: List of clock handles. The parent clocks of the input clocks to the
14 devices in this power domain are set to oscclk before power gating
15 and restored back after powering on a domain. This is required for
16 all domains which are powered on and off and not required for unused
17 domains.
18- clock-names: The following clocks can be specified:
19 - oscclk: Oscillator clock.
20 - pclkN, clkN: Pairs of parent of input clock and input clock to the
21 devices in this power domain. Maximum of 4 pairs (N = 0 to 3)
22 are supported currently.
23
12Node of a device using power domains must have a samsung,power-domain property 24Node of a device using power domains must have a samsung,power-domain property
13defined with a phandle to respective power domain. 25defined with a phandle to respective power domain.
14 26
@@ -19,6 +31,14 @@ Example:
19 reg = <0x10023C00 0x10>; 31 reg = <0x10023C00 0x10>;
20 }; 32 };
21 33
34 mfc_pd: power-domain@10044060 {
35 compatible = "samsung,exynos4210-pd";
36 reg = <0x10044060 0x20>;
37 clocks = <&clock CLK_FIN_PLL>, <&clock CLK_MOUT_SW_ACLK333>,
38 <&clock CLK_MOUT_USER_ACLK333>;
39 clock-names = "oscclk", "pclk0", "clk0";
40 };
41
22Example of the node using power domain: 42Example of the node using power domain:
23 43
24 node { 44 node {
diff --git a/Documentation/devicetree/bindings/arm/gic-v3.txt b/Documentation/devicetree/bindings/arm/gic-v3.txt
new file mode 100644
index 000000000000..33cd05e6c125
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/gic-v3.txt
@@ -0,0 +1,79 @@
1* ARM Generic Interrupt Controller, version 3
2
3AArch64 SMP cores are often associated with a GICv3, providing Private
4Peripheral Interrupts (PPI), Shared Peripheral Interrupts (SPI),
5Software Generated Interrupts (SGI), and Locality-specific Peripheral
6Interrupts (LPI).
7
8Main node required properties:
9
10- compatible : should at least contain "arm,gic-v3".
11- interrupt-controller : Identifies the node as an interrupt controller
12- #interrupt-cells : Specifies the number of cells needed to encode an
13 interrupt source. Must be a single cell with a value of at least 3.
14
15 The 1st cell is the interrupt type; 0 for SPI interrupts, 1 for PPI
16 interrupts. Other values are reserved for future use.
17
18 The 2nd cell contains the interrupt number for the interrupt type.
19 SPI interrupts are in the range [0-987]. PPI interrupts are in the
20 range [0-15].
21
22 The 3rd cell is the flags, encoded as follows:
23 bits[3:0] trigger type and level flags.
24 1 = edge triggered
25 4 = level triggered
26
27 Cells 4 and beyond are reserved for future use. When the 1st cell
28 has a value of 0 or 1, cells 4 and beyond act as padding, and may be
29 ignored. It is recommended that padding cells have a value of 0.
30
31- reg : Specifies base physical address(s) and size of the GIC
32 registers, in the following order:
33 - GIC Distributor interface (GICD)
34 - GIC Redistributors (GICR), one range per redistributor region
35 - GIC CPU interface (GICC)
36 - GIC Hypervisor interface (GICH)
37 - GIC Virtual CPU interface (GICV)
38
39 GICC, GICH and GICV are optional.
40
41- interrupts : Interrupt source of the VGIC maintenance interrupt.
42
43Optional
44
45- redistributor-stride : If using padding pages, specifies the stride
46 of consecutive redistributors. Must be a multiple of 64kB.
47
48- #redistributor-regions: The number of independent contiguous regions
49 occupied by the redistributors. Required if more than one such
50 region is present.
51
52Examples:
53
54 gic: interrupt-controller@2cf00000 {
55 compatible = "arm,gic-v3";
56 #interrupt-cells = <3>;
57 interrupt-controller;
58 reg = <0x0 0x2f000000 0 0x10000>, // GICD
59 <0x0 0x2f100000 0 0x200000>, // GICR
60 <0x0 0x2c000000 0 0x2000>, // GICC
61 <0x0 0x2c010000 0 0x2000>, // GICH
62 <0x0 0x2c020000 0 0x2000>; // GICV
63 interrupts = <1 9 4>;
64 };
65
66 gic: interrupt-controller@2c010000 {
67 compatible = "arm,gic-v3";
68 #interrupt-cells = <3>;
69 interrupt-controller;
70 redistributor-stride = <0x0 0x40000>; // 256kB stride
71 #redistributor-regions = <2>;
72 reg = <0x0 0x2c010000 0 0x10000>, // GICD
73 <0x0 0x2d000000 0 0x800000>, // GICR 1: CPUs 0-31
74 <0x0 0x2e000000 0 0x800000>; // GICR 2: CPUs 32-63
75 <0x0 0x2c040000 0 0x2000>, // GICC
76 <0x0 0x2c060000 0 0x2000>, // GICH
77 <0x0 0x2c080000 0 0x2000>; // GICV
78 interrupts = <1 9 4>;
79 };
diff --git a/Documentation/devicetree/bindings/arm/gic.txt b/Documentation/devicetree/bindings/arm/gic.txt
index 5573c08d3180..c7d2fa156678 100644
--- a/Documentation/devicetree/bindings/arm/gic.txt
+++ b/Documentation/devicetree/bindings/arm/gic.txt
@@ -16,6 +16,7 @@ Main node required properties:
16 "arm,cortex-a9-gic" 16 "arm,cortex-a9-gic"
17 "arm,cortex-a7-gic" 17 "arm,cortex-a7-gic"
18 "arm,arm11mp-gic" 18 "arm,arm11mp-gic"
19 "brcm,brahma-b15-gic"
19- interrupt-controller : Identifies the node as an interrupt controller 20- interrupt-controller : Identifies the node as an interrupt controller
20- #interrupt-cells : Specifies the number of cells needed to encode an 21- #interrupt-cells : Specifies the number of cells needed to encode an
21 interrupt source. The type shall be a <u32> and the value shall be 3. 22 interrupt source. The type shall be a <u32> and the value shall be 3.
diff --git a/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt b/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt
index df0a452b8526..934f00025cc4 100644
--- a/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt
+++ b/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt
@@ -31,6 +31,17 @@ Example:
31 reboot-offset = <0x4>; 31 reboot-offset = <0x4>;
32 }; 32 };
33 33
34-----------------------------------------------------------------------
35Hisilicon CPU controller
36
37Required properties:
38- compatible : "hisilicon,cpuctrl"
39- reg : Register address and size
40
41The clock registers and power registers of secondary cores are defined
42in CPU controller, especially in HIX5HD2 SoC.
43
44-----------------------------------------------------------------------
34PCTRL: Peripheral misc control register 45PCTRL: Peripheral misc control register
35 46
36Required Properties: 47Required Properties:
diff --git a/Documentation/devicetree/bindings/arm/marvell,berlin.txt b/Documentation/devicetree/bindings/arm/marvell,berlin.txt
index 94013a9a8769..904de5781f44 100644
--- a/Documentation/devicetree/bindings/arm/marvell,berlin.txt
+++ b/Documentation/devicetree/bindings/arm/marvell,berlin.txt
@@ -24,6 +24,22 @@ SoC and board used. Currently known SoC compatibles are:
24 ... 24 ...
25} 25}
26 26
27* Marvell Berlin CPU control bindings
28
29CPU control register allows various operations on CPUs, like resetting them
30independently.
31
32Required properties:
33- compatible: should be "marvell,berlin-cpu-ctrl"
34- reg: address and length of the register set
35
36Example:
37
38cpu-ctrl@f7dd0000 {
39 compatible = "marvell,berlin-cpu-ctrl";
40 reg = <0xf7dd0000 0x10000>;
41};
42
27* Marvell Berlin2 chip control binding 43* Marvell Berlin2 chip control binding
28 44
29Marvell Berlin SoCs have a chip control register set providing several 45Marvell Berlin SoCs have a chip control register set providing several
diff --git a/Documentation/devicetree/bindings/arm/mediatek.txt b/Documentation/devicetree/bindings/arm/mediatek.txt
new file mode 100644
index 000000000000..d6ac71f37314
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek.txt
@@ -0,0 +1,8 @@
1Mediatek MT6589 Platforms Device Tree Bindings
2
3Boards with a SoC of the Mediatek MT6589 shall have the following property:
4
5Required root node property:
6
7compatible: must contain "mediatek,mt6589"
8
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/omap/omap.txt b/Documentation/devicetree/bindings/arm/omap/omap.txt
index d22b216f5d23..0edc90305dfe 100644
--- a/Documentation/devicetree/bindings/arm/omap/omap.txt
+++ b/Documentation/devicetree/bindings/arm/omap/omap.txt
@@ -129,6 +129,9 @@ Boards:
129- AM437x GP EVM 129- AM437x GP EVM
130 compatible = "ti,am437x-gp-evm", "ti,am4372", "ti,am43" 130 compatible = "ti,am437x-gp-evm", "ti,am4372", "ti,am43"
131 131
132- AM437x SK EVM: AM437x StarterKit Evaluation Module
133 compatible = "ti,am437x-sk-evm", "ti,am4372", "ti,am43"
134
132- DRA742 EVM: Software Development Board for DRA742 135- DRA742 EVM: Software Development Board for DRA742
133 compatible = "ti,dra7-evm", "ti,dra742", "ti,dra74", "ti,dra7" 136 compatible = "ti,dra7-evm", "ti,dra742", "ti,dra74", "ti,dra7"
134 137
diff --git a/Documentation/devicetree/bindings/arm/omap/prcm.txt b/Documentation/devicetree/bindings/arm/omap/prcm.txt
new file mode 100644
index 000000000000..79074dac684a
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/omap/prcm.txt
@@ -0,0 +1,65 @@
1OMAP PRCM bindings
2
3Power Reset and Clock Manager lists the device clocks and clockdomains under
4a DT hierarchy. Each TI SoC can have multiple PRCM entities listed for it,
5each describing one module and the clock hierarchy under it. see [1] for
6documentation about the individual clock/clockdomain nodes.
7
8[1] Documentation/devicetree/bindings/clock/ti/*
9
10Required properties:
11- compatible: Must be one of:
12 "ti,am3-prcm"
13 "ti,am3-scrm"
14 "ti,am4-prcm"
15 "ti,am4-scrm"
16 "ti,omap2-prcm"
17 "ti,omap2-scrm"
18 "ti,omap3-prm"
19 "ti,omap3-cm"
20 "ti,omap3-scrm"
21 "ti,omap4-cm1"
22 "ti,omap4-prm"
23 "ti,omap4-cm2"
24 "ti,omap4-scrm"
25 "ti,omap5-prm"
26 "ti,omap5-cm-core-aon"
27 "ti,omap5-scrm"
28 "ti,omap5-cm-core"
29 "ti,dra7-prm"
30 "ti,dra7-cm-core-aon"
31 "ti,dra7-cm-core"
32- reg: Contains PRCM module register address range
33 (base address and length)
34- clocks: clocks for this module
35- clockdomains: clockdomains for this module
36
37Example:
38
39cm: cm@48004000 {
40 compatible = "ti,omap3-cm";
41 reg = <0x48004000 0x4000>;
42
43 cm_clocks: clocks {
44 #address-cells = <1>;
45 #size-cells = <0>;
46 };
47
48 cm_clockdomains: clockdomains {
49 };
50}
51
52&cm_clocks {
53 omap2_32k_fck: omap_32k_fck {
54 #clock-cells = <0>;
55 compatible = "fixed-clock";
56 clock-frequency = <32768>;
57 };
58};
59
60&cm_clockdomains {
61 core_l3_clkdm: core_l3_clkdm {
62 compatible = "ti,clockdomain";
63 clocks = <&sdrc_ick>;
64 };
65};
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..1e1979b229ff 100644
--- a/Documentation/devicetree/bindings/arm/samsung/pmu.txt
+++ b/Documentation/devicetree/bindings/arm/samsung/pmu.txt
@@ -7,13 +7,45 @@ Properties:
7 - "samsung,exynos4212-pmu" - for Exynos4212 SoC, 7 - "samsung,exynos4212-pmu" - for Exynos4212 SoC,
8 - "samsung,exynos4412-pmu" - for Exynos4412 SoC, 8 - "samsung,exynos4412-pmu" - for Exynos4412 SoC,
9 - "samsung,exynos5250-pmu" - for Exynos5250 SoC, 9 - "samsung,exynos5250-pmu" - for Exynos5250 SoC,
10 - "samsung,exynos5260-pmu" - for Exynos5260 SoC.
11 - "samsung,exynos5410-pmu" - for Exynos5410 SoC,
10 - "samsung,exynos5420-pmu" - for Exynos5420 SoC. 12 - "samsung,exynos5420-pmu" - for Exynos5420 SoC.
11 second value must be always "syscon". 13 second value must be always "syscon".
12 14
13 - reg : offset and length of the register set. 15 - reg : offset and length of the register set.
14 16
17 - #clock-cells : must be <1>, since PMU requires once cell as clock specifier.
18 The single specifier cell is used as index to list of clocks
19 provided by PMU, which is currently:
20 0 : SoC clock output (CLKOUT pin)
21
22 - clock-names : list of clock names for particular CLKOUT mux inputs in
23 following format:
24 "clkoutN", where N is a decimal number corresponding to
25 CLKOUT mux control bits value for given input, e.g.
26 "clkout0", "clkout7", "clkout15".
27
28 - clocks : list of phandles and specifiers to all input clocks listed in
29 clock-names property.
30
15Example : 31Example :
16pmu_system_controller: system-controller@10040000 { 32pmu_system_controller: system-controller@10040000 {
17 compatible = "samsung,exynos5250-pmu", "syscon"; 33 compatible = "samsung,exynos5250-pmu", "syscon";
18 reg = <0x10040000 0x5000>; 34 reg = <0x10040000 0x5000>;
35 #clock-cells = <1>;
36 clock-names = "clkout0", "clkout1", "clkout2", "clkout3",
37 "clkout4", "clkout8", "clkout9";
38 clocks = <&clock CLK_OUT_DMC>, <&clock CLK_OUT_TOP>,
39 <&clock CLK_OUT_LEFTBUS>, <&clock CLK_OUT_RIGHTBUS>,
40 <&clock CLK_OUT_CPU>, <&clock CLK_XXTI>,
41 <&clock CLK_XUSBXTI>;
42};
43
44Example of clock consumer :
45
46usb3503: usb3503@08 {
47 /* ... */
48 clock-names = "refclk";
49 clocks = <&pmu_system_controller 0>;
50 /* ... */
19}; 51};
diff --git a/Documentation/devicetree/bindings/arm/spear-misc.txt b/Documentation/devicetree/bindings/arm/spear-misc.txt
new file mode 100644
index 000000000000..cf649827ffcd
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/spear-misc.txt
@@ -0,0 +1,9 @@
1SPEAr Misc configuration
2===========================
3SPEAr SOCs have some miscellaneous registers which are used to configure
4few properties of different peripheral controllers.
5
6misc node required properties:
7
8- compatible Should be "st,spear1340-misc", "syscon".
9- reg: Address range of misc space upto 8K
diff --git a/Documentation/devicetree/bindings/arm/tegra.txt b/Documentation/devicetree/bindings/arm/tegra.txt
index 558ed4b4ef39..73278c6d2dc3 100644
--- a/Documentation/devicetree/bindings/arm/tegra.txt
+++ b/Documentation/devicetree/bindings/arm/tegra.txt
@@ -30,6 +30,8 @@ board-specific compatible values:
30 nvidia,seaboard 30 nvidia,seaboard
31 nvidia,ventana 31 nvidia,ventana
32 nvidia,whistler 32 nvidia,whistler
33 toradex,apalis_t30
34 toradex,apalis_t30-eval
33 toradex,colibri_t20-512 35 toradex,colibri_t20-512
34 toradex,iris 36 toradex,iris
35 37
diff --git a/Documentation/devicetree/bindings/arm/xilinx.txt b/Documentation/devicetree/bindings/arm/xilinx.txt
index 6f1ed830b4f7..1f7995357888 100644
--- a/Documentation/devicetree/bindings/arm/xilinx.txt
+++ b/Documentation/devicetree/bindings/arm/xilinx.txt
@@ -1,7 +1,7 @@
1Xilinx Zynq EP107 Emulation Platform board 1Xilinx Zynq Platforms Device Tree Bindings
2 2
3This board is an emulation platform for the Zynq product which is 3Boards with Zynq-7000 SOC based on an ARM Cortex A9 processor
4based on an ARM Cortex A9 processor. 4shall have the following properties.
5 5
6Required root node properties: 6Required root node properties:
7 - compatible = "xlnx,zynq-ep107"; 7 - compatible = "xlnx,zynq-7000";
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/arm-integrator.txt b/Documentation/devicetree/bindings/clock/arm-integrator.txt
index 652914b17b95..ecc69520bcea 100644
--- a/Documentation/devicetree/bindings/clock/arm-integrator.txt
+++ b/Documentation/devicetree/bindings/clock/arm-integrator.txt
@@ -1,4 +1,4 @@
1Clock bindings for ARM Integrator Core Module clocks 1Clock bindings for ARM Integrator and Versatile Core Module clocks
2 2
3Auxilary Oscillator Clock 3Auxilary Oscillator Clock
4 4
@@ -12,7 +12,7 @@ parent node.
12 12
13 13
14Required properties: 14Required properties:
15- compatible: must be "arm,integrator-cm-auxosc" 15- compatible: must be "arm,integrator-cm-auxosc" or "arm,versatile-cm-auxosc"
16- #clock-cells: must be <0> 16- #clock-cells: must be <0>
17 17
18Optional properties: 18Optional properties:
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/clk-s5pv210-audss.txt b/Documentation/devicetree/bindings/clock/clk-s5pv210-audss.txt
new file mode 100644
index 000000000000..4fc869b69d4a
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/clk-s5pv210-audss.txt
@@ -0,0 +1,53 @@
1* Samsung Audio Subsystem Clock Controller
2
3The Samsung Audio Subsystem clock controller generates and supplies clocks
4to Audio Subsystem block available in the S5PV210 and compatible SoCs.
5
6Required Properties:
7
8- compatible: should be "samsung,s5pv210-audss-clock".
9- reg: physical base address and length of the controller's register set.
10
11- #clock-cells: should be 1.
12
13- clocks:
14 - hclk: AHB bus clock of the Audio Subsystem.
15 - xxti: Optional fixed rate PLL reference clock, parent of mout_audss. If
16 not specified (i.e. xusbxti is used for PLL reference), it is fixed to
17 a clock named "xxti".
18 - fout_epll: Input PLL to the AudioSS block, parent of mout_audss.
19 - iiscdclk0: Optional external i2s clock, parent of mout_i2s. If not
20 specified, it is fixed to a clock named "iiscdclk0".
21 - sclk_audio0: Audio bus clock, parent of mout_i2s.
22
23- clock-names: Aliases for the above clocks. They should be "hclk",
24 "xxti", "fout_epll", "iiscdclk0", and "sclk_audio0" respectively.
25
26All available clocks are defined as preprocessor macros in
27dt-bindings/clock/s5pv210-audss-clk.h header and can be used in device
28tree sources.
29
30Example: Clock controller node.
31
32 clk_audss: clock-controller@c0900000 {
33 compatible = "samsung,s5pv210-audss-clock";
34 reg = <0xc0900000 0x1000>;
35 #clock-cells = <1>;
36 clock-names = "hclk", "xxti",
37 "fout_epll", "sclk_audio0";
38 clocks = <&clocks DOUT_HCLKP>, <&xxti>,
39 <&clocks FOUT_EPLL>, <&clocks SCLK_AUDIO0>;
40 };
41
42Example: I2S controller node that consumes the clock generated by the clock
43 controller. Refer to the standard clock bindings for information
44 about 'clocks' and 'clock-names' property.
45
46 i2s0: i2s@03830000 {
47 /* ... */
48 clock-names = "iis", "i2s_opclk0",
49 "i2s_opclk1";
50 clocks = <&clk_audss CLK_I2S>, <&clk_audss CLK_I2S>,
51 <&clk_audss CLK_DOUT_AUD_BUS>;
52 /* ... */
53 };
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/imx1-clock.txt b/Documentation/devicetree/bindings/clock/imx1-clock.txt
new file mode 100644
index 000000000000..b7adf4e3ea98
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/imx1-clock.txt
@@ -0,0 +1,26 @@
1* Clock bindings for Freescale i.MX1 CPUs
2
3Required properties:
4- compatible: Should be "fsl,imx1-ccm".
5- reg: Address and length of the register set.
6- #clock-cells: Should be <1>.
7
8The clock consumer should specify the desired clock by having the clock
9ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx1-clock.h
10for the full list of i.MX1 clock IDs.
11
12Examples:
13 clks: ccm@0021b000 {
14 #clock-cells = <1>;
15 compatible = "fsl,imx1-ccm";
16 reg = <0x0021b000 0x1000>;
17 };
18
19 pwm: pwm@00208000 {
20 #pwm-cells = <2>;
21 compatible = "fsl,imx1-pwm";
22 reg = <0x00208000 0x1000>;
23 interrupts = <34>;
24 clocks = <&clks IMX1_CLK_DUMMY>, <&clks IMX1_CLK_PER1>;
25 clock-names = "ipg", "per";
26 };
diff --git a/Documentation/devicetree/bindings/clock/imx21-clock.txt b/Documentation/devicetree/bindings/clock/imx21-clock.txt
new file mode 100644
index 000000000000..c3b0db437c48
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/imx21-clock.txt
@@ -0,0 +1,28 @@
1* Clock bindings for Freescale i.MX21
2
3Required properties:
4- compatible : Should be "fsl,imx21-ccm".
5- reg : Address and length of the register set.
6- interrupts : Should contain CCM interrupt.
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/imx21-clock.h
11for the full list of i.MX21 clock IDs.
12
13Examples:
14 clks: ccm@10027000{
15 compatible = "fsl,imx21-ccm";
16 reg = <0x10027000 0x800>;
17 #clock-cells = <1>;
18 };
19
20 uart1: serial@1000a000 {
21 compatible = "fsl,imx21-uart";
22 reg = <0x1000a000 0x1000>;
23 interrupts = <20>;
24 clocks = <&clks IMX21_CLK_UART1_IPG_GATE>,
25 <&clks IMX21_CLK_PER1>;
26 clock-names = "ipg", "per";
27 status = "disabled";
28 };
diff --git a/Documentation/devicetree/bindings/clock/imx27-clock.txt b/Documentation/devicetree/bindings/clock/imx27-clock.txt
index 6bc9fd2c6631..cc05de9ec393 100644
--- a/Documentation/devicetree/bindings/clock/imx27-clock.txt
+++ b/Documentation/devicetree/bindings/clock/imx27-clock.txt
@@ -7,117 +7,22 @@ Required properties:
7- #clock-cells: Should be <1> 7- #clock-cells: Should be <1>
8 8
9The clock consumer should specify the desired clock by having the clock 9The clock consumer should specify the desired clock by having the clock
10ID in its "clocks" phandle cell. The following is a full list of i.MX27 10ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx27-clock.h
11clocks and IDs. 11for the full list of i.MX27 clock IDs.
12
13 Clock ID
14 -----------------------
15 dummy 0
16 ckih 1
17 ckil 2
18 mpll 3
19 spll 4
20 mpll_main2 5
21 ahb 6
22 ipg 7
23 nfc_div 8
24 per1_div 9
25 per2_div 10
26 per3_div 11
27 per4_div 12
28 vpu_sel 13
29 vpu_div 14
30 usb_div 15
31 cpu_sel 16
32 clko_sel 17
33 cpu_div 18
34 clko_div 19
35 ssi1_sel 20
36 ssi2_sel 21
37 ssi1_div 22
38 ssi2_div 23
39 clko_en 24
40 ssi2_ipg_gate 25
41 ssi1_ipg_gate 26
42 slcdc_ipg_gate 27
43 sdhc3_ipg_gate 28
44 sdhc2_ipg_gate 29
45 sdhc1_ipg_gate 30
46 scc_ipg_gate 31
47 sahara_ipg_gate 32
48 rtc_ipg_gate 33
49 pwm_ipg_gate 34
50 owire_ipg_gate 35
51 lcdc_ipg_gate 36
52 kpp_ipg_gate 37
53 iim_ipg_gate 38
54 i2c2_ipg_gate 39
55 i2c1_ipg_gate 40
56 gpt6_ipg_gate 41
57 gpt5_ipg_gate 42
58 gpt4_ipg_gate 43
59 gpt3_ipg_gate 44
60 gpt2_ipg_gate 45
61 gpt1_ipg_gate 46
62 gpio_ipg_gate 47
63 fec_ipg_gate 48
64 emma_ipg_gate 49
65 dma_ipg_gate 50
66 cspi3_ipg_gate 51
67 cspi2_ipg_gate 52
68 cspi1_ipg_gate 53
69 nfc_baud_gate 54
70 ssi2_baud_gate 55
71 ssi1_baud_gate 56
72 vpu_baud_gate 57
73 per4_gate 58
74 per3_gate 59
75 per2_gate 60
76 per1_gate 61
77 usb_ahb_gate 62
78 slcdc_ahb_gate 63
79 sahara_ahb_gate 64
80 lcdc_ahb_gate 65
81 vpu_ahb_gate 66
82 fec_ahb_gate 67
83 emma_ahb_gate 68
84 emi_ahb_gate 69
85 dma_ahb_gate 70
86 csi_ahb_gate 71
87 brom_ahb_gate 72
88 ata_ahb_gate 73
89 wdog_ipg_gate 74
90 usb_ipg_gate 75
91 uart6_ipg_gate 76
92 uart5_ipg_gate 77
93 uart4_ipg_gate 78
94 uart3_ipg_gate 79
95 uart2_ipg_gate 80
96 uart1_ipg_gate 81
97 ckih_div1p5 82
98 fpm 83
99 mpll_osc_sel 84
100 mpll_sel 85
101 spll_gate 86
102 mshc_div 87
103 rtic_ipg_gate 88
104 mshc_ipg_gate 89
105 rtic_ahb_gate 90
106 mshc_baud_gate 91
107 12
108Examples: 13Examples:
14 clks: ccm@10027000{
15 compatible = "fsl,imx27-ccm";
16 reg = <0x10027000 0x1000>;
17 #clock-cells = <1>;
18 };
109 19
110clks: ccm@10027000{ 20 uart1: serial@1000a000 {
111 compatible = "fsl,imx27-ccm"; 21 compatible = "fsl,imx27-uart", "fsl,imx21-uart";
112 reg = <0x10027000 0x1000>; 22 reg = <0x1000a000 0x1000>;
113 #clock-cells = <1>; 23 interrupts = <20>;
114}; 24 clocks = <&clks IMX27_CLK_UART1_IPG_GATE>,
115 25 <&clks IMX27_CLK_PER1_GATE>;
116uart1: serial@1000a000 { 26 clock-names = "ipg", "per";
117 compatible = "fsl,imx27-uart", "fsl,imx21-uart"; 27 status = "disabled";
118 reg = <0x1000a000 0x1000>; 28 };
119 interrupts = <20>;
120 clocks = <&clks 81>, <&clks 61>;
121 clock-names = "ipg", "per";
122 status = "disabled";
123};
diff --git a/Documentation/devicetree/bindings/clock/imx6q-clock.txt b/Documentation/devicetree/bindings/clock/imx6q-clock.txt
index 90ec91fe5ce0..9252912a5b0e 100644
--- a/Documentation/devicetree/bindings/clock/imx6q-clock.txt
+++ b/Documentation/devicetree/bindings/clock/imx6q-clock.txt
@@ -7,223 +7,13 @@ Required properties:
7- #clock-cells: Should be <1> 7- #clock-cells: Should be <1>
8 8
9The clock consumer should specify the desired clock by having the clock 9The clock consumer should specify the desired clock by having the clock
10ID in its "clocks" phandle cell. The following is a full list of i.MX6Q 10ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx6qdl-clock.h
11clocks and IDs. 11for the full list of i.MX6 Quad and DualLite clock IDs.
12
13 Clock ID
14 ---------------------------
15 dummy 0
16 ckil 1
17 ckih 2
18 osc 3
19 pll2_pfd0_352m 4
20 pll2_pfd1_594m 5
21 pll2_pfd2_396m 6
22 pll3_pfd0_720m 7
23 pll3_pfd1_540m 8
24 pll3_pfd2_508m 9
25 pll3_pfd3_454m 10
26 pll2_198m 11
27 pll3_120m 12
28 pll3_80m 13
29 pll3_60m 14
30 twd 15
31 step 16
32 pll1_sw 17
33 periph_pre 18
34 periph2_pre 19
35 periph_clk2_sel 20
36 periph2_clk2_sel 21
37 axi_sel 22
38 esai_sel 23
39 asrc_sel 24
40 spdif_sel 25
41 gpu2d_axi 26
42 gpu3d_axi 27
43 gpu2d_core_sel 28
44 gpu3d_core_sel 29
45 gpu3d_shader_sel 30
46 ipu1_sel 31
47 ipu2_sel 32
48 ldb_di0_sel 33
49 ldb_di1_sel 34
50 ipu1_di0_pre_sel 35
51 ipu1_di1_pre_sel 36
52 ipu2_di0_pre_sel 37
53 ipu2_di1_pre_sel 38
54 ipu1_di0_sel 39
55 ipu1_di1_sel 40
56 ipu2_di0_sel 41
57 ipu2_di1_sel 42
58 hsi_tx_sel 43
59 pcie_axi_sel 44
60 ssi1_sel 45
61 ssi2_sel 46
62 ssi3_sel 47
63 usdhc1_sel 48
64 usdhc2_sel 49
65 usdhc3_sel 50
66 usdhc4_sel 51
67 enfc_sel 52
68 emi_sel 53
69 emi_slow_sel 54
70 vdo_axi_sel 55
71 vpu_axi_sel 56
72 cko1_sel 57
73 periph 58
74 periph2 59
75 periph_clk2 60
76 periph2_clk2 61
77 ipg 62
78 ipg_per 63
79 esai_pred 64
80 esai_podf 65
81 asrc_pred 66
82 asrc_podf 67
83 spdif_pred 68
84 spdif_podf 69
85 can_root 70
86 ecspi_root 71
87 gpu2d_core_podf 72
88 gpu3d_core_podf 73
89 gpu3d_shader 74
90 ipu1_podf 75
91 ipu2_podf 76
92 ldb_di0_podf 77
93 ldb_di1_podf 78
94 ipu1_di0_pre 79
95 ipu1_di1_pre 80
96 ipu2_di0_pre 81
97 ipu2_di1_pre 82
98 hsi_tx_podf 83
99 ssi1_pred 84
100 ssi1_podf 85
101 ssi2_pred 86
102 ssi2_podf 87
103 ssi3_pred 88
104 ssi3_podf 89
105 uart_serial_podf 90
106 usdhc1_podf 91
107 usdhc2_podf 92
108 usdhc3_podf 93
109 usdhc4_podf 94
110 enfc_pred 95
111 enfc_podf 96
112 emi_podf 97
113 emi_slow_podf 98
114 vpu_axi_podf 99
115 cko1_podf 100
116 axi 101
117 mmdc_ch0_axi_podf 102
118 mmdc_ch1_axi_podf 103
119 arm 104
120 ahb 105
121 apbh_dma 106
122 asrc 107
123 can1_ipg 108
124 can1_serial 109
125 can2_ipg 110
126 can2_serial 111
127 ecspi1 112
128 ecspi2 113
129 ecspi3 114
130 ecspi4 115
131 ecspi5 116
132 enet 117
133 esai 118
134 gpt_ipg 119
135 gpt_ipg_per 120
136 gpu2d_core 121
137 gpu3d_core 122
138 hdmi_iahb 123
139 hdmi_isfr 124
140 i2c1 125
141 i2c2 126
142 i2c3 127
143 iim 128
144 enfc 129
145 ipu1 130
146 ipu1_di0 131
147 ipu1_di1 132
148 ipu2 133
149 ipu2_di0 134
150 ldb_di0 135
151 ldb_di1 136
152 ipu2_di1 137
153 hsi_tx 138
154 mlb 139
155 mmdc_ch0_axi 140
156 mmdc_ch1_axi 141
157 ocram 142
158 openvg_axi 143
159 pcie_axi 144
160 pwm1 145
161 pwm2 146
162 pwm3 147
163 pwm4 148
164 per1_bch 149
165 gpmi_bch_apb 150
166 gpmi_bch 151
167 gpmi_io 152
168 gpmi_apb 153
169 sata 154
170 sdma 155
171 spba 156
172 ssi1 157
173 ssi2 158
174 ssi3 159
175 uart_ipg 160
176 uart_serial 161
177 usboh3 162
178 usdhc1 163
179 usdhc2 164
180 usdhc3 165
181 usdhc4 166
182 vdo_axi 167
183 vpu_axi 168
184 cko1 169
185 pll1_sys 170
186 pll2_bus 171
187 pll3_usb_otg 172
188 pll4_audio 173
189 pll5_video 174
190 pll8_mlb 175
191 pll7_usb_host 176
192 pll6_enet 177
193 ssi1_ipg 178
194 ssi2_ipg 179
195 ssi3_ipg 180
196 rom 181
197 usbphy1 182
198 usbphy2 183
199 ldb_di0_div_3_5 184
200 ldb_di1_div_3_5 185
201 sata_ref 186
202 sata_ref_100m 187
203 pcie_ref 188
204 pcie_ref_125m 189
205 enet_ref 190
206 usbphy1_gate 191
207 usbphy2_gate 192
208 pll4_post_div 193
209 pll5_post_div 194
210 pll5_video_div 195
211 eim_slow 196
212 spdif 197
213 cko2_sel 198
214 cko2_podf 199
215 cko2 200
216 cko 201
217 vdoa 202
218 pll4_audio_div 203
219 lvds1_sel 204
220 lvds2_sel 205
221 lvds1_gate 206
222 lvds2_gate 207
223 esai_ahb 208
224 12
225Examples: 13Examples:
226 14
15#include <dt-bindings/clock/imx6qdl-clock.h>
16
227clks: ccm@020c4000 { 17clks: ccm@020c4000 {
228 compatible = "fsl,imx6q-ccm"; 18 compatible = "fsl,imx6q-ccm";
229 reg = <0x020c4000 0x4000>; 19 reg = <0x020c4000 0x4000>;
@@ -235,7 +25,7 @@ uart1: serial@02020000 {
235 compatible = "fsl,imx6q-uart", "fsl,imx21-uart"; 25 compatible = "fsl,imx6q-uart", "fsl,imx21-uart";
236 reg = <0x02020000 0x4000>; 26 reg = <0x02020000 0x4000>;
237 interrupts = <0 26 0x04>; 27 interrupts = <0 26 0x04>;
238 clocks = <&clks 160>, <&clks 161>; 28 clocks = <&clks IMX6QDL_CLK_UART_IPG>, <&clks IMX6QDL_CLK_UART_SERIAL>;
239 clock-names = "ipg", "per"; 29 clock-names = "ipg", "per";
240 status = "disabled"; 30 status = "disabled";
241}; 31};
diff --git a/Documentation/devicetree/bindings/clock/mvebu-cpu-clock.txt b/Documentation/devicetree/bindings/clock/mvebu-cpu-clock.txt
index feb830130714..99c214660bdc 100644
--- a/Documentation/devicetree/bindings/clock/mvebu-cpu-clock.txt
+++ b/Documentation/devicetree/bindings/clock/mvebu-cpu-clock.txt
@@ -3,14 +3,15 @@ Device Tree Clock bindings for cpu clock of Marvell EBU platforms
3Required properties: 3Required properties:
4- compatible : shall be one of the following: 4- compatible : shall be one of the following:
5 "marvell,armada-xp-cpu-clock" - cpu clocks for Armada XP 5 "marvell,armada-xp-cpu-clock" - cpu clocks for Armada XP
6- reg : Address and length of the clock complex register set 6- reg : Address and length of the clock complex register set, followed
7 by address and length of the PMU DFS registers
7- #clock-cells : should be set to 1. 8- #clock-cells : should be set to 1.
8- clocks : shall be the input parent clock phandle for the clock. 9- clocks : shall be the input parent clock phandle for the clock.
9 10
10cpuclk: clock-complex@d0018700 { 11cpuclk: clock-complex@d0018700 {
11 #clock-cells = <1>; 12 #clock-cells = <1>;
12 compatible = "marvell,armada-xp-cpu-clock"; 13 compatible = "marvell,armada-xp-cpu-clock";
13 reg = <0xd0018700 0xA0>; 14 reg = <0xd0018700 0xA0>, <0x1c054 0x10>;
14 clocks = <&coreclk 1>; 15 clocks = <&coreclk 1>;
15} 16}
16 17
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/samsung,s5pv210-clock.txt b/Documentation/devicetree/bindings/clock/samsung,s5pv210-clock.txt
new file mode 100644
index 000000000000..effd9401c133
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/samsung,s5pv210-clock.txt
@@ -0,0 +1,78 @@
1* Samsung S5P6442/S5PC110/S5PV210 Clock Controller
2
3Samsung S5P6442, S5PC110 and S5PV210 SoCs contain integrated clock
4controller, which generates and supplies clock to various controllers
5within the SoC.
6
7Required Properties:
8
9- compatible: should be one of following:
10 - "samsung,s5pv210-clock" : for clock controller of Samsung
11 S5PC110/S5PV210 SoCs,
12 - "samsung,s5p6442-clock" : for clock controller of Samsung
13 S5P6442 SoC.
14
15- reg: physical base address of the controller and length of memory mapped
16 region.
17
18- #clock-cells: should be 1.
19
20All available clocks are defined as preprocessor macros in
21dt-bindings/clock/s5pv210.h header and can be used in device tree sources.
22
23External clocks:
24
25There are several clocks that are generated outside the SoC. It is expected
26that they are defined using standard clock bindings with following
27clock-output-names:
28 - "xxti": external crystal oscillator connected to XXTI and XXTO pins of
29the SoC,
30 - "xusbxti": external crystal oscillator connected to XUSBXTI and XUSBXTO
31pins of the SoC,
32
33A subset of above clocks available on given board shall be specified in
34board device tree, including the system base clock, as selected by XOM[0]
35pin of the SoC. Refer to generic fixed rate clock bindings
36documentation[1] for more information how to specify these clocks.
37
38[1] Documentation/devicetree/bindings/clock/fixed-clock.txt
39
40Example: Clock controller node:
41
42 clock: clock-controller@7e00f000 {
43 compatible = "samsung,s5pv210-clock";
44 reg = <0x7e00f000 0x1000>;
45 #clock-cells = <1>;
46 };
47
48Example: Required external clocks:
49
50 xxti: clock-xxti {
51 compatible = "fixed-clock";
52 clock-output-names = "xxti";
53 clock-frequency = <24000000>;
54 #clock-cells = <0>;
55 };
56
57 xusbxti: clock-xusbxti {
58 compatible = "fixed-clock";
59 clock-output-names = "xusbxti";
60 clock-frequency = <24000000>;
61 #clock-cells = <0>;
62 };
63
64Example: UART controller node that consumes the clock generated by the clock
65 controller (refer to the standard clock bindings for information about
66 "clocks" and "clock-names" properties):
67
68 uart0: serial@e2900000 {
69 compatible = "samsung,s5pv210-uart";
70 reg = <0xe2900000 0x400>;
71 interrupt-parent = <&vic1>;
72 interrupts = <10>;
73 clock-names = "uart", "clk_uart_baud0",
74 "clk_uart_baud1";
75 clocks = <&clocks UART0>, <&clocks UART0>,
76 <&clocks SCLK_UART0>;
77 status = "disabled";
78 };
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/cpufreq/cpufreq-cpu0.txt b/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt
index f055515d2b62..366690cb86a3 100644
--- a/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt
+++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt
@@ -8,10 +8,12 @@ Both required and optional properties listed below must be defined
8under node /cpus/cpu@0. 8under node /cpus/cpu@0.
9 9
10Required properties: 10Required properties:
11- operating-points: Refer to Documentation/devicetree/bindings/power/opp.txt 11- None
12 for details
13 12
14Optional properties: 13Optional properties:
14- operating-points: Refer to Documentation/devicetree/bindings/power/opp.txt for
15 details. OPPs *must* be supplied either via DT, i.e. this property, or
16 populated at runtime.
15- clock-latency: Specify the possible maximum transition latency for clock, 17- clock-latency: Specify the possible maximum transition latency for clock,
16 in unit of nanoseconds. 18 in unit of nanoseconds.
17- voltage-tolerance: Specify the CPU voltage tolerance in percentage. 19- voltage-tolerance: Specify the CPU voltage tolerance in percentage.
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/dma/fsl-imx-sdma.txt b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt
index e577196a12c0..4659fd952301 100644
--- a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt
+++ b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt
@@ -47,6 +47,7 @@ The full ID of peripheral types can be found below.
47 20 ASRC 47 20 ASRC
48 21 ESAI 48 21 ESAI
49 22 SSI Dual FIFO (needs firmware ver >= 2) 49 22 SSI Dual FIFO (needs firmware ver >= 2)
50 23 Shared ASRC
50 51
51The third cell specifies the transfer priority as below. 52The third cell specifies the transfer priority as below.
52 53
diff --git a/Documentation/devicetree/bindings/dma/mpc512x-dma.txt b/Documentation/devicetree/bindings/dma/mpc512x-dma.txt
new file mode 100644
index 000000000000..a6511df165c5
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/mpc512x-dma.txt
@@ -0,0 +1,29 @@
1* Freescale MPC512x and MPC8308 DMA Controller
2
3The DMA controller in Freescale MPC512x and MPC8308 SoCs can move
4blocks of memory contents between memory and peripherals or
5from memory to memory.
6
7Refer to "Generic DMA Controller and DMA request bindings" in
8the dma/dma.txt file for a more detailed description of binding.
9
10Required properties:
11- compatible: should be "fsl,mpc5121-dma" or "fsl,mpc8308-dma";
12- reg: should contain the DMA controller registers location and length;
13- interrupt for the DMA controller: syntax of interrupt client node
14 is described in interrupt-controller/interrupts.txt file.
15- #dma-cells: the length of the DMA specifier, must be <1>.
16 Each channel of this DMA controller has a peripheral request line,
17 the assignment is fixed in hardware. This one cell
18 in dmas property of a client device represents the channel number.
19
20Example:
21
22 dma0: dma@14000 {
23 compatible = "fsl,mpc5121-dma";
24 reg = <0x14000 0x1800>;
25 interrupts = <65 0x8>;
26 #dma-cells = <1>;
27 };
28
29DMA clients must use the format described in dma/dma.txt file.
diff --git a/Documentation/devicetree/bindings/dma/nbpfaxi.txt b/Documentation/devicetree/bindings/dma/nbpfaxi.txt
new file mode 100644
index 000000000000..d5e2522b9ec1
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/nbpfaxi.txt
@@ -0,0 +1,61 @@
1* Renesas "Type-AXI" NBPFAXI* DMA controllers
2
3* DMA controller
4
5Required properties
6
7- compatible: must be one of
8 "renesas,nbpfaxi64dmac1b4"
9 "renesas,nbpfaxi64dmac1b8"
10 "renesas,nbpfaxi64dmac1b16"
11 "renesas,nbpfaxi64dmac4b4"
12 "renesas,nbpfaxi64dmac4b8"
13 "renesas,nbpfaxi64dmac4b16"
14 "renesas,nbpfaxi64dmac8b4"
15 "renesas,nbpfaxi64dmac8b8"
16 "renesas,nbpfaxi64dmac8b16"
17- #dma-cells: must be 2: the first integer is a terminal number, to which this
18 slave is connected, the second one is flags. Flags is a bitmask
19 with the following bits defined:
20
21#define NBPF_SLAVE_RQ_HIGH 1
22#define NBPF_SLAVE_RQ_LOW 2
23#define NBPF_SLAVE_RQ_LEVEL 4
24
25Optional properties:
26
27You can use dma-channels and dma-requests as described in dma.txt, although they
28won't be used, this information is derived from the compatibility string.
29
30Example:
31
32 dma: dma-controller@48000000 {
33 compatible = "renesas,nbpfaxi64dmac8b4";
34 reg = <0x48000000 0x400>;
35 interrupts = <0 12 0x4
36 0 13 0x4
37 0 14 0x4
38 0 15 0x4
39 0 16 0x4
40 0 17 0x4
41 0 18 0x4
42 0 19 0x4>;
43 #dma-cells = <2>;
44 dma-channels = <8>;
45 dma-requests = <8>;
46 };
47
48* DMA client
49
50Required properties:
51
52dmas and dma-names are required, as described in dma.txt.
53
54Example:
55
56#include <dt-bindings/dma/nbpfaxi.h>
57
58...
59 dmas = <&dma 0 (NBPF_SLAVE_RQ_HIGH | NBPF_SLAVE_RQ_LEVEL)
60 &dma 1 (NBPF_SLAVE_RQ_HIGH | NBPF_SLAVE_RQ_LEVEL)>;
61 dma-names = "rx", "tx";
diff --git a/Documentation/devicetree/bindings/dma/rcar-audmapp.txt b/Documentation/devicetree/bindings/dma/rcar-audmapp.txt
new file mode 100644
index 000000000000..9f1d750d76de
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/rcar-audmapp.txt
@@ -0,0 +1,29 @@
1* R-Car Audio DMAC peri peri Device Tree bindings
2
3Required properties:
4- compatible: should be "renesas,rcar-audmapp"
5- #dma-cells: should be <1>, see "dmas" property below
6
7Example:
8 audmapp: audio-dma-pp@0xec740000 {
9 compatible = "renesas,rcar-audmapp";
10 #dma-cells = <1>;
11
12 reg = <0 0xec740000 0 0x200>;
13 };
14
15
16* DMA client
17
18Required properties:
19- dmas: a list of <[DMA multiplexer phandle] [SRS/DRS value]> pairs,
20 where SRS/DRS values are fixed handles, specified in the SoC
21 manual as the value that would be written into the PDMACHCR.
22- dma-names: a list of DMA channel names, one per "dmas" entry
23
24Example:
25
26 dmas = <&audmapp 0x2d00
27 &audmapp 0x3700>;
28 dma-names = "src0_ssiu0",
29 "dvc0_ssiu0";
diff --git a/Documentation/devicetree/bindings/dma/renesas,rcar-dmac.txt b/Documentation/devicetree/bindings/dma/renesas,rcar-dmac.txt
new file mode 100644
index 000000000000..df0f48bcf75a
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/renesas,rcar-dmac.txt
@@ -0,0 +1,98 @@
1* Renesas R-Car DMA Controller Device Tree bindings
2
3Renesas R-Car Generation 2 SoCs have have multiple multi-channel DMA
4controller instances named DMAC capable of serving multiple clients. Channels
5can be dedicated to specific clients or shared between a large number of
6clients.
7
8DMA clients are connected to the DMAC ports referenced by an 8-bit identifier
9called MID/RID.
10
11Each DMA client is connected to one dedicated port of the DMAC, identified by
12an 8-bit port number called the MID/RID. A DMA controller can thus serve up to
13256 clients in total. When the number of hardware channels is lower than the
14number of clients to be served, channels must be shared between multiple DMA
15clients. The association of DMA clients to DMAC channels is fully dynamic and
16not described in these device tree bindings.
17
18Required Properties:
19
20- compatible: must contain "renesas,rcar-dmac"
21
22- reg: base address and length of the registers block for the DMAC
23
24- interrupts: interrupt specifiers for the DMAC, one for each entry in
25 interrupt-names.
26- interrupt-names: one entry per channel, named "ch%u", where %u is the
27 channel number ranging from zero to the number of channels minus one.
28
29- clock-names: "fck" for the functional clock
30- clocks: a list of phandle + clock-specifier pairs, one for each entry
31 in clock-names.
32- clock-names: must contain "fck" for the functional clock.
33
34- #dma-cells: must be <1>, the cell specifies the MID/RID of the DMAC port
35 connected to the DMA client
36- dma-channels: number of DMA channels
37
38Example: R8A7790 (R-Car H2) SYS-DMACs
39
40 dmac0: dma-controller@e6700000 {
41 compatible = "renesas,rcar-dmac";
42 reg = <0 0xe6700000 0 0x20000>;
43 interrupts = <0 197 IRQ_TYPE_LEVEL_HIGH
44 0 200 IRQ_TYPE_LEVEL_HIGH
45 0 201 IRQ_TYPE_LEVEL_HIGH
46 0 202 IRQ_TYPE_LEVEL_HIGH
47 0 203 IRQ_TYPE_LEVEL_HIGH
48 0 204 IRQ_TYPE_LEVEL_HIGH
49 0 205 IRQ_TYPE_LEVEL_HIGH
50 0 206 IRQ_TYPE_LEVEL_HIGH
51 0 207 IRQ_TYPE_LEVEL_HIGH
52 0 208 IRQ_TYPE_LEVEL_HIGH
53 0 209 IRQ_TYPE_LEVEL_HIGH
54 0 210 IRQ_TYPE_LEVEL_HIGH
55 0 211 IRQ_TYPE_LEVEL_HIGH
56 0 212 IRQ_TYPE_LEVEL_HIGH
57 0 213 IRQ_TYPE_LEVEL_HIGH
58 0 214 IRQ_TYPE_LEVEL_HIGH>;
59 interrupt-names = "error",
60 "ch0", "ch1", "ch2", "ch3",
61 "ch4", "ch5", "ch6", "ch7",
62 "ch8", "ch9", "ch10", "ch11",
63 "ch12", "ch13", "ch14";
64 clocks = <&mstp2_clks R8A7790_CLK_SYS_DMAC0>;
65 clock-names = "fck";
66 #dma-cells = <1>;
67 dma-channels = <15>;
68 };
69
70 dmac1: dma-controller@e6720000 {
71 compatible = "renesas,rcar-dmac";
72 reg = <0 0xe6720000 0 0x20000>;
73 interrupts = <0 220 IRQ_TYPE_LEVEL_HIGH
74 0 216 IRQ_TYPE_LEVEL_HIGH
75 0 217 IRQ_TYPE_LEVEL_HIGH
76 0 218 IRQ_TYPE_LEVEL_HIGH
77 0 219 IRQ_TYPE_LEVEL_HIGH
78 0 308 IRQ_TYPE_LEVEL_HIGH
79 0 309 IRQ_TYPE_LEVEL_HIGH
80 0 310 IRQ_TYPE_LEVEL_HIGH
81 0 311 IRQ_TYPE_LEVEL_HIGH
82 0 312 IRQ_TYPE_LEVEL_HIGH
83 0 313 IRQ_TYPE_LEVEL_HIGH
84 0 314 IRQ_TYPE_LEVEL_HIGH
85 0 315 IRQ_TYPE_LEVEL_HIGH
86 0 316 IRQ_TYPE_LEVEL_HIGH
87 0 317 IRQ_TYPE_LEVEL_HIGH
88 0 318 IRQ_TYPE_LEVEL_HIGH>;
89 interrupt-names = "error",
90 "ch0", "ch1", "ch2", "ch3",
91 "ch4", "ch5", "ch6", "ch7",
92 "ch8", "ch9", "ch10", "ch11",
93 "ch12", "ch13", "ch14";
94 clocks = <&mstp2_clks R8A7790_CLK_SYS_DMAC1>;
95 clock-names = "fck";
96 #dma-cells = <1>;
97 dma-channels = <15>;
98 };
diff --git a/Documentation/devicetree/bindings/dma/ste-dma40.txt b/Documentation/devicetree/bindings/dma/ste-dma40.txt
index 1f5729f10621..95800ab37bb0 100644
--- a/Documentation/devicetree/bindings/dma/ste-dma40.txt
+++ b/Documentation/devicetree/bindings/dma/ste-dma40.txt
@@ -35,9 +35,11 @@ Required properties:
35 35
36Each dmas request consists of 4 cells: 36Each dmas request consists of 4 cells:
37 1. A phandle pointing to the DMA controller 37 1. A phandle pointing to the DMA controller
38 2. Device Type 38 2. Device signal number, the signal line for single and burst requests
39 connected from the device to the DMA40 engine
39 3. The DMA request line number (only when 'use fixed channel' is set) 40 3. The DMA request line number (only when 'use fixed channel' is set)
40 4. A 32bit mask specifying; mode, direction and endianness [NB: This list will grow] 41 4. A 32bit mask specifying; mode, direction and endianness
42 [NB: This list will grow]
41 0x00000001: Mode: 43 0x00000001: Mode:
42 Logical channel when unset 44 Logical channel when unset
43 Physical channel when set 45 Physical channel when set
@@ -54,6 +56,74 @@ Each dmas request consists of 4 cells:
54 Normal priority when unset 56 Normal priority when unset
55 High priority when set 57 High priority when set
56 58
59Existing signal numbers for the DB8500 ASIC. Unless specified, the signals are
60bidirectional, i.e. the same for RX and TX operations:
61
620: SPI controller 0
631: SD/MMC controller 0 (unused)
642: SD/MMC controller 1 (unused)
653: SD/MMC controller 2 (unused)
664: I2C port 1
675: I2C port 3
686: I2C port 2
697: I2C port 4
708: Synchronous Serial Port SSP0
719: Synchronous Serial Port SSP1
7210: Multi-Channel Display Engine MCDE RX
7311: UART port 2
7412: UART port 1
7513: UART port 0
7614: Multirate Serial Port MSP2
7715: I2C port 0
7816: USB OTG in/out endpoints 7 & 15
7917: USB OTG in/out endpoints 6 & 14
8018: USB OTG in/out endpoints 5 & 13
8119: USB OTG in/out endpoints 4 & 12
8220: SLIMbus or HSI channel 0
8321: SLIMbus or HSI channel 1
8422: SLIMbus or HSI channel 2
8523: SLIMbus or HSI channel 3
8624: Multimedia DSP SXA0
8725: Multimedia DSP SXA1
8826: Multimedia DSP SXA2
8927: Multimedia DSP SXA3
9028: SD/MM controller 2
9129: SD/MM controller 0
9230: MSP port 1 on DB8500 v1, MSP port 3 on DB8500 v2
9331: MSP port 0 or SLIMbus channel 0
9432: SD/MM controller 1
9533: SPI controller 2
9634: i2c3 RX2 TX2
9735: SPI controller 1
9836: USB OTG in/out endpoints 3 & 11
9937: USB OTG in/out endpoints 2 & 10
10038: USB OTG in/out endpoints 1 & 9
10139: USB OTG in/out endpoints 8
10240: SPI controller 3
10341: SD/MM controller 3
10442: SD/MM controller 4
10543: SD/MM controller 5
10644: Multimedia DSP SXA4
10745: Multimedia DSP SXA5
10846: SLIMbus channel 8 or Multimedia DSP SXA6
10947: SLIMbus channel 9 or Multimedia DSP SXA7
11048: Crypto Accelerator 1
11149: Crypto Accelerator 1 TX or Hash Accelerator 1 TX
11250: Hash Accelerator 1 TX
11351: memcpy TX (to be used by the DMA driver for memcpy operations)
11452: SLIMbus or HSI channel 4
11553: SLIMbus or HSI channel 5
11654: SLIMbus or HSI channel 6
11755: SLIMbus or HSI channel 7
11856: memcpy (to be used by the DMA driver for memcpy operations)
11957: memcpy (to be used by the DMA driver for memcpy operations)
12058: memcpy (to be used by the DMA driver for memcpy operations)
12159: memcpy (to be used by the DMA driver for memcpy operations)
12260: memcpy (to be used by the DMA driver for memcpy operations)
12361: Crypto Accelerator 0
12462: Crypto Accelerator 0 TX or Hash Accelerator 0 TX
12563: Hash Accelerator 0 TX
126
57Example: 127Example:
58 128
59 uart@80120000 { 129 uart@80120000 {
diff --git a/Documentation/devicetree/bindings/dma/sun6i-dma.txt b/Documentation/devicetree/bindings/dma/sun6i-dma.txt
new file mode 100644
index 000000000000..3e145c1675b1
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/sun6i-dma.txt
@@ -0,0 +1,45 @@
1Allwinner A31 DMA Controller
2
3This driver follows the generic DMA bindings defined in dma.txt.
4
5Required properties:
6
7- compatible: Must be "allwinner,sun6i-a31-dma"
8- reg: Should contain the registers base address and length
9- interrupts: Should contain a reference to the interrupt used by this device
10- clocks: Should contain a reference to the parent AHB clock
11- resets: Should contain a reference to the reset controller asserting
12 this device in reset
13- #dma-cells : Should be 1, a single cell holding a line request number
14
15Example:
16 dma: dma-controller@01c02000 {
17 compatible = "allwinner,sun6i-a31-dma";
18 reg = <0x01c02000 0x1000>;
19 interrupts = <0 50 4>;
20 clocks = <&ahb1_gates 6>;
21 resets = <&ahb1_rst 6>;
22 #dma-cells = <1>;
23 };
24
25Clients:
26
27DMA clients connected to the A31 DMA controller must use the format
28described in the dma.txt file, using a two-cell specifier for each
29channel: a phandle plus one integer cells.
30The two cells in order are:
31
321. A phandle pointing to the DMA controller.
332. The port ID as specified in the datasheet
34
35Example:
36spi2: spi@01c6a000 {
37 compatible = "allwinner,sun6i-a31-spi";
38 reg = <0x01c6a000 0x1000>;
39 interrupts = <0 67 4>;
40 clocks = <&ahb1_gates 22>, <&spi2_clk>;
41 clock-names = "ahb", "mod";
42 dmas = <&dma 25>, <&dma 25>;
43 dma-names = "rx", "tx";
44 resets = <&ahb1_rst 22>;
45};
diff --git a/Documentation/devicetree/bindings/drm/armada/marvell,dove-lcd.txt b/Documentation/devicetree/bindings/drm/armada/marvell,dove-lcd.txt
new file mode 100644
index 000000000000..46525ea3e646
--- /dev/null
+++ b/Documentation/devicetree/bindings/drm/armada/marvell,dove-lcd.txt
@@ -0,0 +1,30 @@
1Device Tree bindings for Armada DRM CRTC driver
2
3Required properties:
4 - compatible: value should be "marvell,dove-lcd".
5 - reg: base address and size of the LCD controller
6 - interrupts: single interrupt number for the LCD controller
7 - port: video output port with endpoints, as described by graph.txt
8
9Optional properties:
10
11 - clocks: as described by clock-bindings.txt
12 - clock-names: as described by clock-bindings.txt
13 "axiclk" - axi bus clock for pixel clock
14 "plldivider" - pll divider clock for pixel clock
15 "ext_ref_clk0" - external clock 0 for pixel clock
16 "ext_ref_clk1" - external clock 1 for pixel clock
17
18Note: all clocks are optional but at least one must be specified.
19Further clocks may be added in the future according to requirements of
20different SoCs.
21
22Example:
23
24 lcd0: lcd-controller@820000 {
25 compatible = "marvell,dove-lcd";
26 reg = <0x820000 0x1000>;
27 interrupts = <47>;
28 clocks = <&si5351 0>;
29 clock-names = "ext_ref_clk_1";
30 };
diff --git a/Documentation/devicetree/bindings/drm/i2c/tda998x.txt b/Documentation/devicetree/bindings/drm/i2c/tda998x.txt
index d7df01c5bb3a..e9e4bce40760 100644
--- a/Documentation/devicetree/bindings/drm/i2c/tda998x.txt
+++ b/Documentation/devicetree/bindings/drm/i2c/tda998x.txt
@@ -3,6 +3,8 @@ Device-Tree bindings for the NXP TDA998x HDMI transmitter
3Required properties; 3Required properties;
4 - compatible: must be "nxp,tda998x" 4 - compatible: must be "nxp,tda998x"
5 5
6 - reg: I2C address
7
6Optional properties: 8Optional properties:
7 - interrupts: interrupt number and trigger type 9 - interrupts: interrupt number and trigger type
8 default: polling 10 default: polling
diff --git a/Documentation/devicetree/bindings/drm/msm/gpu.txt b/Documentation/devicetree/bindings/drm/msm/gpu.txt
new file mode 100644
index 000000000000..67d0a58dbb77
--- /dev/null
+++ b/Documentation/devicetree/bindings/drm/msm/gpu.txt
@@ -0,0 +1,52 @@
1Qualcomm adreno/snapdragon GPU
2
3Required properties:
4- compatible: "qcom,adreno-3xx"
5- reg: Physical base address and length of the controller's registers.
6- interrupts: The interrupt signal from the gpu.
7- clocks: device clocks
8 See ../clocks/clock-bindings.txt for details.
9- clock-names: the following clocks are required:
10 * "core_clk"
11 * "iface_clk"
12 * "mem_iface_clk"
13- qcom,chipid: gpu chip-id. Note this may become optional for future
14 devices if we can reliably read the chipid from hw
15- qcom,gpu-pwrlevels: list of operating points
16 - compatible: "qcom,gpu-pwrlevels"
17 - for each qcom,gpu-pwrlevel:
18 - qcom,gpu-freq: requested gpu clock speed
19 - NOTE: downstream android driver defines additional parameters to
20 configure memory bandwidth scaling per OPP.
21
22Example:
23
24/ {
25 ...
26
27 gpu: qcom,kgsl-3d0@4300000 {
28 compatible = "qcom,adreno-3xx";
29 reg = <0x04300000 0x20000>;
30 reg-names = "kgsl_3d0_reg_memory";
31 interrupts = <GIC_SPI 80 0>;
32 interrupt-names = "kgsl_3d0_irq";
33 clock-names =
34 "core_clk",
35 "iface_clk",
36 "mem_iface_clk";
37 clocks =
38 <&mmcc GFX3D_CLK>,
39 <&mmcc GFX3D_AHB_CLK>,
40 <&mmcc MMSS_IMEM_AHB_CLK>;
41 qcom,chipid = <0x03020100>;
42 qcom,gpu-pwrlevels {
43 compatible = "qcom,gpu-pwrlevels";
44 qcom,gpu-pwrlevel@0 {
45 qcom,gpu-freq = <450000000>;
46 };
47 qcom,gpu-pwrlevel@1 {
48 qcom,gpu-freq = <27000000>;
49 };
50 };
51 };
52};
diff --git a/Documentation/devicetree/bindings/drm/msm/hdmi.txt b/Documentation/devicetree/bindings/drm/msm/hdmi.txt
new file mode 100644
index 000000000000..aca917fe2ba7
--- /dev/null
+++ b/Documentation/devicetree/bindings/drm/msm/hdmi.txt
@@ -0,0 +1,46 @@
1Qualcomm adreno/snapdragon hdmi output
2
3Required properties:
4- compatible: one of the following
5 * "qcom,hdmi-tx-8660"
6 * "qcom,hdmi-tx-8960"
7- reg: Physical base address and length of the controller's registers
8- reg-names: "core_physical"
9- interrupts: The interrupt signal from the hdmi block.
10- clocks: device clocks
11 See ../clocks/clock-bindings.txt for details.
12- qcom,hdmi-tx-ddc-clk-gpio: ddc clk pin
13- qcom,hdmi-tx-ddc-data-gpio: ddc data pin
14- qcom,hdmi-tx-hpd-gpio: hpd pin
15- core-vdda-supply: phandle to supply regulator
16- hdmi-mux-supply: phandle to mux regulator
17
18Optional properties:
19- qcom,hdmi-tx-mux-en-gpio: hdmi mux enable pin
20- qcom,hdmi-tx-mux-sel-gpio: hdmi mux select pin
21
22Example:
23
24/ {
25 ...
26
27 hdmi: qcom,hdmi-tx-8960@4a00000 {
28 compatible = "qcom,hdmi-tx-8960";
29 reg-names = "core_physical";
30 reg = <0x04a00000 0x1000>;
31 interrupts = <GIC_SPI 79 0>;
32 clock-names =
33 "core_clk",
34 "master_iface_clk",
35 "slave_iface_clk";
36 clocks =
37 <&mmcc HDMI_APP_CLK>,
38 <&mmcc HDMI_M_AHB_CLK>,
39 <&mmcc HDMI_S_AHB_CLK>;
40 qcom,hdmi-tx-ddc-clk = <&msmgpio 70 GPIO_ACTIVE_HIGH>;
41 qcom,hdmi-tx-ddc-data = <&msmgpio 71 GPIO_ACTIVE_HIGH>;
42 qcom,hdmi-tx-hpd = <&msmgpio 72 GPIO_ACTIVE_HIGH>;
43 core-vdda-supply = <&pm8921_hdmi_mvs>;
44 hdmi-mux-supply = <&ext_3p3v>;
45 };
46};
diff --git a/Documentation/devicetree/bindings/drm/msm/mdp.txt b/Documentation/devicetree/bindings/drm/msm/mdp.txt
new file mode 100644
index 000000000000..1a0598e5279d
--- /dev/null
+++ b/Documentation/devicetree/bindings/drm/msm/mdp.txt
@@ -0,0 +1,48 @@
1Qualcomm adreno/snapdragon display controller
2
3Required properties:
4- compatible:
5 * "qcom,mdp" - mdp4
6- reg: Physical base address and length of the controller's registers.
7- interrupts: The interrupt signal from the display controller.
8- connectors: array of phandles for output device(s)
9- clocks: device clocks
10 See ../clocks/clock-bindings.txt for details.
11- clock-names: the following clocks are required:
12 * "core_clk"
13 * "iface_clk"
14 * "lut_clk"
15 * "src_clk"
16 * "hdmi_clk"
17 * "mpd_clk"
18
19Optional properties:
20- gpus: phandle for gpu device
21
22Example:
23
24/ {
25 ...
26
27 mdp: qcom,mdp@5100000 {
28 compatible = "qcom,mdp";
29 reg = <0x05100000 0xf0000>;
30 interrupts = <GIC_SPI 75 0>;
31 connectors = <&hdmi>;
32 gpus = <&gpu>;
33 clock-names =
34 "core_clk",
35 "iface_clk",
36 "lut_clk",
37 "src_clk",
38 "hdmi_clk",
39 "mdp_clk";
40 clocks =
41 <&mmcc MDP_SRC>,
42 <&mmcc MDP_AHB_CLK>,
43 <&mmcc MDP_LUT_CLK>,
44 <&mmcc TV_SRC>,
45 <&mmcc HDMI_TV_CLK>,
46 <&mmcc MDP_TV_CLK>;
47 };
48};
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/fuse/nvidia,tegra20-fuse.txt b/Documentation/devicetree/bindings/fuse/nvidia,tegra20-fuse.txt
new file mode 100644
index 000000000000..d8c98c7614d0
--- /dev/null
+++ b/Documentation/devicetree/bindings/fuse/nvidia,tegra20-fuse.txt
@@ -0,0 +1,40 @@
1NVIDIA Tegra20/Tegra30/Tegr114/Tegra124 fuse block.
2
3Required properties:
4- compatible : should be:
5 "nvidia,tegra20-efuse"
6 "nvidia,tegra30-efuse"
7 "nvidia,tegra114-efuse"
8 "nvidia,tegra124-efuse"
9 Details:
10 nvidia,tegra20-efuse: Tegra20 requires using APB DMA to read the fuse data
11 due to a hardware bug. Tegra20 also lacks certain information which is
12 available in later generations such as fab code, lot code, wafer id,..
13 nvidia,tegra30-efuse, nvidia,tegra114-efuse and nvidia,tegra124-efuse:
14 The differences between these SoCs are the size of the efuse array,
15 the location of the spare (OEM programmable) bits and the location of
16 the speedo data.
17- reg: Should contain 1 entry: the entry gives the physical address and length
18 of the fuse registers.
19- clocks: Must contain an entry for each entry in clock-names.
20 See ../clocks/clock-bindings.txt for details.
21- clock-names: Must include the following entries:
22 - fuse
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 - fuse
27
28Example:
29
30 fuse@7000f800 {
31 compatible = "nvidia,tegra20-efuse";
32 reg = <0x7000F800 0x400>,
33 <0x70000000 0x400>;
34 clocks = <&tegra_car TEGRA20_CLK_FUSE>;
35 clock-names = "fuse";
36 resets = <&tegra_car 39>;
37 reset-names = "fuse";
38 };
39
40
diff --git a/Documentation/devicetree/bindings/gpio/gpio-zynq.txt b/Documentation/devicetree/bindings/gpio/gpio-zynq.txt
new file mode 100644
index 000000000000..986371a4be2c
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-zynq.txt
@@ -0,0 +1,26 @@
1Xilinx Zynq GPIO controller Device Tree Bindings
2-------------------------------------------
3
4Required properties:
5- #gpio-cells : Should be two
6 - First cell is the GPIO line number
7 - Second cell is used to specify optional
8 parameters (unused)
9- compatible : Should be "xlnx,zynq-gpio-1.0"
10- clocks : Clock specifier (see clock bindings for details)
11- gpio-controller : Marks the device node as a GPIO controller.
12- interrupts : Interrupt specifier (see interrupt bindings for
13 details)
14- interrupt-parent : Must be core interrupt controller
15- reg : Address and length of the register set for the device
16
17Example:
18 gpio@e000a000 {
19 #gpio-cells = <2>;
20 compatible = "xlnx,zynq-gpio-1.0";
21 clocks = <&clkc 42>;
22 gpio-controller;
23 interrupt-parent = <&intc>;
24 interrupts = <0 20 4>;
25 reg = <0xe000a000 0x1000>;
26 };
diff --git a/Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt b/Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt
new file mode 100644
index 000000000000..23bfe8e1f7cc
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt
@@ -0,0 +1,43 @@
1NVIDIA GK20A Graphics Processing Unit
2
3Required properties:
4- compatible: "nvidia,<chip>-<gpu>"
5 Currently recognized values:
6 - nvidia,tegra124-gk20a
7- reg: Physical base address and length of the controller's registers.
8 Must contain two entries:
9 - first entry for bar0
10 - second entry for bar1
11- interrupts: Must contain an entry for each entry in interrupt-names.
12 See ../interrupt-controller/interrupts.txt for details.
13- interrupt-names: Must include the following entries:
14 - stall
15 - nonstall
16- vdd-supply: regulator for supply voltage.
17- clocks: Must contain an entry for each entry in clock-names.
18 See ../clocks/clock-bindings.txt for details.
19- clock-names: Must include the following entries:
20 - gpu
21 - pwr
22- resets: Must contain an entry for each entry in reset-names.
23 See ../reset/reset.txt for details.
24- reset-names: Must include the following entries:
25 - gpu
26
27Example:
28
29 gpu@0,57000000 {
30 compatible = "nvidia,gk20a";
31 reg = <0x0 0x57000000 0x0 0x01000000>,
32 <0x0 0x58000000 0x0 0x01000000>;
33 interrupts = <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>,
34 <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>;
35 interrupt-names = "stall", "nonstall";
36 vdd-supply = <&vdd_gpu>;
37 clocks = <&tegra_car TEGRA124_CLK_GPU>,
38 <&tegra_car TEGRA124_CLK_PLL_P_OUT5>;
39 clock-names = "gpu", "pwr";
40 resets = <&tegra_car 184>;
41 reset-names = "gpu";
42 status = "disabled";
43 };
diff --git a/Documentation/devicetree/bindings/gpu/st,stih4xx.txt b/Documentation/devicetree/bindings/gpu/st,stih4xx.txt
new file mode 100644
index 000000000000..2d150c311a05
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpu/st,stih4xx.txt
@@ -0,0 +1,189 @@
1STMicroelectronics stih4xx platforms
2
3- sti-vtg: video timing generator
4 Required properties:
5 - compatible: "st,vtg"
6 - reg: Physical base address of the IP registers and length of memory mapped region.
7 Optional properties:
8 - interrupts : VTG interrupt number to the CPU.
9 - st,slave: phandle on a slave vtg
10
11- sti-vtac: video timing advanced inter dye communication Rx and TX
12 Required properties:
13 - compatible: "st,vtac-main" or "st,vtac-aux"
14 - reg: Physical base address of the IP registers and length of memory mapped region.
15 - clocks: from common clock binding: handle hardware IP needed clocks, the
16 number of clocks may depend of the SoC type.
17 See ../clocks/clock-bindings.txt for details.
18 - clock-names: names of the clocks listed in clocks property in the same
19 order.
20
21- sti-display-subsystem: Master device for DRM sub-components
22 This device must be the parent of all the sub-components and is responsible
23 of bind them.
24 Required properties:
25 - compatible: "st,sti-display-subsystem"
26 - ranges: to allow probing of subdevices
27
28- sti-compositor: frame compositor engine
29 must be a child of sti-display-subsystem
30 Required properties:
31 - compatible: "st,stih<chip>-compositor"
32 - reg: Physical base address of the IP registers and length of memory mapped region.
33 - clocks: from common clock binding: handle hardware IP needed clocks, the
34 number of clocks may depend of the SoC type.
35 See ../clocks/clock-bindings.txt for details.
36 - clock-names: names of the clocks listed in clocks property in the same
37 order.
38 - resets: resets to be used by the device
39 See ../reset/reset.txt for details.
40 - reset-names: names of the resets listed in resets property in the same
41 order.
42 - st,vtg: phandle(s) on vtg device (main and aux) nodes.
43
44- sti-tvout: video out hardware block
45 must be a child of sti-display-subsystem
46 Required properties:
47 - compatible: "st,stih<chip>-tvout"
48 - reg: Physical base address of the IP registers and length of memory mapped region.
49 - reg-names: names of the mapped memory regions listed in regs property in
50 the same order.
51 - resets: resets to be used by the device
52 See ../reset/reset.txt for details.
53 - reset-names: names of the resets listed in resets property in the same
54 order.
55 - ranges: to allow probing of subdevices
56
57- sti-hdmi: hdmi output block
58 must be a child of sti-tvout
59 Required properties:
60 - compatible: "st,stih<chip>-hdmi";
61 - reg: Physical base address of the IP registers and length of memory mapped region.
62 - reg-names: names of the mapped memory regions listed in regs property in
63 the same order.
64 - interrupts : HDMI interrupt number to the CPU.
65 - interrupt-names: name of the interrupts listed in interrupts property in
66 the same order
67 - clocks: from common clock binding: handle hardware IP needed clocks, the
68 number of clocks may depend of the SoC type.
69 - clock-names: names of the clocks listed in clocks property in the same
70 order.
71 - hdmi,hpd-gpio: gpio id to detect if an hdmi cable is plugged or not.
72
73sti-hda:
74 Required properties:
75 must be a child of sti-tvout
76 - compatible: "st,stih<chip>-hda"
77 - reg: Physical base address of the IP registers and length of memory mapped region.
78 - reg-names: names of the mapped memory regions listed in regs property in
79 the same order.
80 - clocks: from common clock binding: handle hardware IP needed clocks, the
81 number of clocks may depend of the SoC type.
82 See ../clocks/clock-bindings.txt for details.
83 - clock-names: names of the clocks listed in clocks property in the same
84 order.
85
86Example:
87
88/ {
89 ...
90
91 vtg_main_slave: sti-vtg-main-slave@fe85A800 {
92 compatible = "st,vtg";
93 reg = <0xfe85A800 0x300>;
94 interrupts = <GIC_SPI 175 IRQ_TYPE_NONE>;
95 };
96
97 vtg_main: sti-vtg-main-master@fd348000 {
98 compatible = "st,vtg";
99 reg = <0xfd348000 0x400>;
100 st,slave = <&vtg_main_slave>;
101 };
102
103 vtg_aux_slave: sti-vtg-aux-slave@fd348400 {
104 compatible = "st,vtg";
105 reg = <0xfe858200 0x300>;
106 interrupts = <GIC_SPI 176 IRQ_TYPE_NONE>;
107 };
108
109 vtg_aux: sti-vtg-aux-master@fd348400 {
110 compatible = "st,vtg";
111 reg = <0xfd348400 0x400>;
112 st,slave = <&vtg_aux_slave>;
113 };
114
115
116 sti-vtac-rx-main@fee82800 {
117 compatible = "st,vtac-main";
118 reg = <0xfee82800 0x200>;
119 clock-names = "vtac";
120 clocks = <&clk_m_a2_div0 CLK_M_VTAC_MAIN_PHY>;
121 };
122
123 sti-vtac-rx-aux@fee82a00 {
124 compatible = "st,vtac-aux";
125 reg = <0xfee82a00 0x200>;
126 clock-names = "vtac";
127 clocks = <&clk_m_a2_div0 CLK_M_VTAC_AUX_PHY>;
128 };
129
130 sti-vtac-tx-main@fd349000 {
131 compatible = "st,vtac-main";
132 reg = <0xfd349000 0x200>, <0xfd320000 0x10000>;
133 clock-names = "vtac";
134 clocks = <&clk_s_a1_hs CLK_S_VTAC_TX_PHY>;
135 };
136
137 sti-vtac-tx-aux@fd349200 {
138 compatible = "st,vtac-aux";
139 reg = <0xfd349200 0x200>, <0xfd320000 0x10000>;
140 clock-names = "vtac";
141 clocks = <&clk_s_a1_hs CLK_S_VTAC_TX_PHY>;
142 };
143
144 sti-display-subsystem {
145 compatible = "st,sti-display-subsystem";
146 ranges;
147
148 sti-compositor@fd340000 {
149 compatible = "st,stih416-compositor";
150 reg = <0xfd340000 0x1000>;
151 clock-names = "compo_main", "compo_aux",
152 "pix_main", "pix_aux";
153 clocks = <&clk_m_a2_div1 CLK_M_COMPO_MAIN>, <&clk_m_a2_div1 CLK_M_COMPO_AUX>,
154 <&clockgen_c_vcc CLK_S_PIX_MAIN>, <&clockgen_c_vcc CLK_S_PIX_AUX>;
155 reset-names = "compo-main", "compo-aux";
156 resets = <&softreset STIH416_COMPO_M_SOFTRESET>, <&softreset STIH416_COMPO_A_SOFTRESET>;
157 st,vtg = <&vtg_main>, <&vtg_aux>;
158 };
159
160 sti-tvout@fe000000 {
161 compatible = "st,stih416-tvout";
162 reg = <0xfe000000 0x1000>, <0xfe85a000 0x400>, <0xfe830000 0x10000>;
163 reg-names = "tvout-reg", "hda-reg", "syscfg";
164 reset-names = "tvout";
165 resets = <&softreset STIH416_HDTVOUT_SOFTRESET>;
166 ranges;
167
168 sti-hdmi@fe85c000 {
169 compatible = "st,stih416-hdmi";
170 reg = <0xfe85c000 0x1000>, <0xfe830000 0x10000>;
171 reg-names = "hdmi-reg", "syscfg";
172 interrupts = <GIC_SPI 173 IRQ_TYPE_NONE>;
173 interrupt-names = "irq";
174 clock-names = "pix", "tmds", "phy", "audio";
175 clocks = <&clockgen_c_vcc CLK_S_PIX_HDMI>, <&clockgen_c_vcc CLK_S_TMDS_HDMI>, <&clockgen_c_vcc CLK_S_HDMI_REJECT_PLL>, <&clockgen_b1 CLK_S_PCM_0>;
176 hdmi,hpd-gpio = <&PIO2 5>;
177 };
178
179 sti-hda@fe85a000 {
180 compatible = "st,stih416-hda";
181 reg = <0xfe85a000 0x400>, <0xfe83085c 0x4>;
182 reg-names = "hda-reg", "video-dacs-ctrl";
183 clock-names = "pix", "hddac";
184 clocks = <&clockgen_c_vcc CLK_S_PIX_HD>, <&clockgen_c_vcc CLK_S_HDDAC>;
185 };
186 };
187 };
188 ...
189};
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/i2c-efm32.txt b/Documentation/devicetree/bindings/i2c/i2c-efm32.txt
index fc15ac519437..50b25c3da186 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-efm32.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-efm32.txt
@@ -10,7 +10,7 @@ Required properties :
10Recommended properties : 10Recommended properties :
11 11
12 - clock-frequency : maximal I2C bus clock frequency in Hz. 12 - clock-frequency : maximal I2C bus clock frequency in Hz.
13 - efm32,location : Decides the location of the USART I/O pins. 13 - energymicro,location : Decides the location of the USART I/O pins.
14 Allowed range : [0 .. 6] 14 Allowed range : [0 .. 6]
15 15
16Example: 16Example:
@@ -23,7 +23,7 @@ Example:
23 clocks = <&cmu clk_HFPERCLKI2C0>; 23 clocks = <&cmu clk_HFPERCLKI2C0>;
24 clock-frequency = <100000>; 24 clock-frequency = <100000>;
25 status = "ok"; 25 status = "ok";
26 efm32,location = <3>; 26 energymicro,location = <3>;
27 27
28 eeprom@50 { 28 eeprom@50 {
29 compatible = "microchip,24c02"; 29 compatible = "microchip,24c02";
diff --git a/Documentation/devicetree/bindings/i2c/trivial-devices.txt b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
index bef86e57c388..6af570ec53b4 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
@@ -69,6 +70,7 @@ nuvoton,npct501 i2c trusted platform module (TPM)
69nxp,pca9556 Octal SMBus and I2C registered interface 70nxp,pca9556 Octal SMBus and I2C registered interface
70nxp,pca9557 8-bit I2C-bus and SMBus I/O port with reset 71nxp,pca9557 8-bit I2C-bus and SMBus I/O port with reset
71nxp,pcf8563 Real-time clock/calendar 72nxp,pcf8563 Real-time clock/calendar
73nxp,pcf85063 Tiny Real-Time Clock
72ovti,ov5642 OV5642: Color CMOS QSXGA (5-megapixel) Image Sensor with OmniBSI and Embedded TrueFocus 74ovti,ov5642 OV5642: Color CMOS QSXGA (5-megapixel) Image Sensor with OmniBSI and Embedded TrueFocus
73pericom,pt7c4338 Real-time Clock Module 75pericom,pt7c4338 Real-time Clock Module
74plx,pex8648 48-Lane, 12-Port PCI Express Gen 2 (5.0 GT/s) Switch 76plx,pex8648 48-Lane, 12-Port PCI Express Gen 2 (5.0 GT/s) Switch
@@ -83,5 +85,6 @@ stm,m41t80 M41T80 - SERIAL ACCESS RTC WITH ALARMS
83taos,tsl2550 Ambient Light Sensor with SMBUS/Two Wire Serial Interface 85taos,tsl2550 Ambient Light Sensor with SMBUS/Two Wire Serial Interface
84ti,tsc2003 I2C Touch-Screen Controller 86ti,tsc2003 I2C Touch-Screen Controller
85ti,tmp102 Low Power Digital Temperature Sensor with SMBUS/Two Wire Serial Interface 87ti,tmp102 Low Power Digital Temperature Sensor with SMBUS/Two Wire Serial Interface
88ti,tmp103 Low Power Digital Temperature Sensor with SMBUS/Two Wire Serial Interface
86ti,tmp275 Digital Temperature Sensor 89ti,tmp275 Digital Temperature Sensor
87winbond,wpct301 i2c trusted platform module (TPM) 90winbond,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/input/atmel,maxtouch.txt b/Documentation/devicetree/bindings/input/atmel,maxtouch.txt
new file mode 100644
index 000000000000..baef432e8369
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/atmel,maxtouch.txt
@@ -0,0 +1,25 @@
1Atmel maXTouch touchscreen/touchpad
2
3Required properties:
4- compatible:
5 atmel,maxtouch
6
7- reg: The I2C address of the device
8
9- interrupts: The sink for the touchpad's IRQ output
10 See ../interrupt-controller/interrupts.txt
11
12Optional properties for main touchpad device:
13
14- linux,gpio-keymap: An array of up to 4 entries indicating the Linux
15 keycode generated by each GPIO. Linux keycodes are defined in
16 <dt-bindings/input/input.h>.
17
18Example:
19
20 touch@4b {
21 compatible = "atmel,maxtouch";
22 reg = <0x4b>;
23 interrupt-parent = <&gpio>;
24 interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_LEVEL_LOW>;
25 };
diff --git a/Documentation/devicetree/bindings/input/cap1106.txt b/Documentation/devicetree/bindings/input/cap1106.txt
new file mode 100644
index 000000000000..4b463904cba0
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/cap1106.txt
@@ -0,0 +1,53 @@
1Device tree bindings for Microchip CAP1106, 6 channel capacitive touch sensor
2
3The node for this driver must be a child of a I2C controller node, as the
4device communication via I2C only.
5
6Required properties:
7
8 compatible: Must be "microchip,cap1106"
9
10 reg: The I2C slave address of the device.
11 Only 0x28 is valid.
12
13 interrupts: Property describing the interrupt line the
14 device's ALERT#/CM_IRQ# pin is connected to.
15 The device only has one interrupt source.
16
17Optional properties:
18
19 autorepeat: Enables the Linux input system's autorepeat
20 feature on the input device.
21
22 microchip,sensor-gain: Defines the gain of the sensor circuitry. This
23 effectively controls the sensitivity, as a
24 smaller delta capacitance is required to
25 generate the same delta count values.
26 Valid values are 1, 2, 4, and 8.
27 By default, a gain of 1 is set.
28
29 linux,keycodes: Specifies an array of numeric keycode values to
30 be used for the channels. If this property is
31 omitted, KEY_A, KEY_B, etc are used as
32 defaults. The array must have exactly six
33 entries.
34
35Example:
36
37i2c_controller {
38 cap1106@28 {
39 compatible = "microchip,cap1106";
40 interrupt-parent = <&gpio1>;
41 interrupts = <0 0>;
42 reg = <0x28>;
43 autorepeat;
44 microchip,sensor-gain = <2>;
45
46 linux,keycodes = <103 /* KEY_UP */
47 106 /* KEY_RIGHT */
48 108 /* KEY_DOWN */
49 105 /* KEY_LEFT */
50 109 /* KEY_PAGEDOWN */
51 104>; /* KEY_PAGEUP */
52 };
53}
diff --git a/Documentation/devicetree/bindings/input/touchscreen/pixcir_i2c_ts.txt b/Documentation/devicetree/bindings/input/touchscreen/pixcir_i2c_ts.txt
new file mode 100644
index 000000000000..6e551090f465
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/touchscreen/pixcir_i2c_ts.txt
@@ -0,0 +1,26 @@
1* Pixcir I2C touchscreen controllers
2
3Required properties:
4- compatible: must be "pixcir,pixcir_ts" or "pixcir,pixcir_tangoc"
5- reg: I2C address of the chip
6- interrupts: interrupt to which the chip is connected
7- attb-gpio: GPIO connected to the ATTB line of the chip
8- touchscreen-size-x: horizontal resolution of touchscreen (in pixels)
9- touchscreen-size-y: vertical resolution of touchscreen (in pixels)
10
11Example:
12
13 i2c@00000000 {
14 /* ... */
15
16 pixcir_ts@5c {
17 compatible = "pixcir,pixcir_ts";
18 reg = <0x5c>;
19 interrupts = <2 0>;
20 attb-gpio = <&gpf 2 0 2>;
21 touchscreen-size-x = <800>;
22 touchscreen-size-y = <600>;
23 };
24
25 /* ... */
26 };
diff --git a/Documentation/devicetree/bindings/input/touchscreen/zforce_ts.txt b/Documentation/devicetree/bindings/input/touchscreen/zforce_ts.txt
index 2faf1f1fa39e..80c37df940a7 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/zforce_ts.txt
+++ b/Documentation/devicetree/bindings/input/touchscreen/zforce_ts.txt
@@ -9,6 +9,9 @@ Required properties:
9- x-size: horizontal resolution of touchscreen 9- x-size: horizontal resolution of touchscreen
10- y-size: vertical resolution of touchscreen 10- y-size: vertical resolution of touchscreen
11 11
12Optional properties:
13- vdd-supply: Regulator controlling the controller supply
14
12Example: 15Example:
13 16
14 i2c@00000000 { 17 i2c@00000000 {
@@ -18,6 +21,7 @@ Example:
18 compatible = "neonode,zforce"; 21 compatible = "neonode,zforce";
19 reg = <0x50>; 22 reg = <0x50>;
20 interrupts = <2 0>; 23 interrupts = <2 0>;
24 vdd-supply = <&reg_zforce_vdd>;
21 25
22 gpios = <&gpio5 6 0>, /* INT */ 26 gpios = <&gpio5 6 0>, /* INT */
23 <&gpio5 9 0>; /* RST */ 27 <&gpio5 9 0>; /* RST */
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/leds/pca963x.txt b/Documentation/devicetree/bindings/leds/pca963x.txt
index aece3eac1b63..dafbe9931c2b 100644
--- a/Documentation/devicetree/bindings/leds/pca963x.txt
+++ b/Documentation/devicetree/bindings/leds/pca963x.txt
@@ -1,18 +1,19 @@
1LEDs connected to pca9632, pca9633 or pca9634 1LEDs connected to pca9632, pca9633 or pca9634
2 2
3Required properties: 3Required properties:
4- compatible : should be : "nxp,pca9632", "nxp,pca9633" or "nxp,pca9634" 4- compatible : should be : "nxp,pca9632", "nxp,pca9633", "nxp,pca9634" or "nxp,pca9635"
5 5
6Optional properties: 6Optional properties:
7- nxp,totem-pole : use totem pole (push-pull) instead of default open-drain 7- nxp,totem-pole : use totem pole (push-pull) instead of open-drain (pca9632 defaults
8 to open-drain, newer chips to totem pole)
8- nxp,hw-blink : use hardware blinking instead of software blinking 9- nxp,hw-blink : use hardware blinking instead of software blinking
9 10
10Each led is represented as a sub-node of the nxp,pca963x device. 11Each led is represented as a sub-node of the nxp,pca963x device.
11 12
12LED sub-node properties: 13LED sub-node properties:
13- label : (optional) see Documentation/devicetree/bindings/leds/common.txt 14- label : (optional) see Documentation/devicetree/bindings/leds/common.txt
14- reg : number of LED line (could be from 0 to 3 in pca9632 or pca9633 15- reg : number of LED line (could be from 0 to 3 in pca9632 or pca9633,
15 or 0 to 7 in pca9634) 16 0 to 7 in pca9634, or 0 to 15 in pca9635)
16- linux,default-trigger : (optional) 17- linux,default-trigger : (optional)
17 see Documentation/devicetree/bindings/leds/common.txt 18 see Documentation/devicetree/bindings/leds/common.txt
18 19
diff --git a/Documentation/devicetree/bindings/leds/tca6507.txt b/Documentation/devicetree/bindings/leds/tca6507.txt
index d7221b84987c..bad9102796f3 100644
--- a/Documentation/devicetree/bindings/leds/tca6507.txt
+++ b/Documentation/devicetree/bindings/leds/tca6507.txt
@@ -8,7 +8,7 @@ Required properties:
8 8
9Optional properties: 9Optional properties:
10- gpio-controller: allows lines to be used as output-only GPIOs. 10- gpio-controller: allows lines to be used as output-only GPIOs.
11- #gpio-cells: if present, must be 0. 11- #gpio-cells: if present, must not be 0.
12 12
13Each led is represented as a sub-node of the ti,tca6507 device. 13Each led is represented as a sub-node of the ti,tca6507 device.
14 14
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/arizona.txt b/Documentation/devicetree/bindings/mfd/arizona.txt
index 36a0c3d8c726..5c7e7230984a 100644
--- a/Documentation/devicetree/bindings/mfd/arizona.txt
+++ b/Documentation/devicetree/bindings/mfd/arizona.txt
@@ -42,6 +42,16 @@ Optional properties:
42 the chip default will be used. If present exactly five values must 42 the chip default will be used. If present exactly five values must
43 be specified. 43 be specified.
44 44
45 - DCVDD-supply, MICVDD-supply : Power supplies, only need to be specified if
46 they are being externally supplied. As covered in
47 Documentation/devicetree/bindings/regulator/regulator.txt
48
49Optional subnodes:
50 - ldo1 : Initial data for the LDO1 regulator, as covered in
51 Documentation/devicetree/bindings/regulator/regulator.txt
52 - micvdd : Initial data for the MICVDD regulator, as covered in
53 Documentation/devicetree/bindings/regulator/regulator.txt
54
45Example: 55Example:
46 56
47codec: wm5102@1a { 57codec: wm5102@1a {
diff --git a/Documentation/devicetree/bindings/mfd/as3722.txt b/Documentation/devicetree/bindings/mfd/as3722.txt
index 8edcb9bd873b..4f64b2a73169 100644
--- a/Documentation/devicetree/bindings/mfd/as3722.txt
+++ b/Documentation/devicetree/bindings/mfd/as3722.txt
@@ -13,6 +13,14 @@ Required properties:
13 The second cell is the flags, encoded as the trigger masks from binding document 13 The second cell is the flags, encoded as the trigger masks from binding document
14 interrupts.txt, using dt-bindings/irq. 14 interrupts.txt, using dt-bindings/irq.
15 15
16Optional properties:
17--------------------
18- ams,enable-internal-int-pullup: Boolean property, to enable internal pullup on
19 interrupt pin. Missing this will disable internal pullup on INT pin.
20- ams,enable-internal-i2c-pullup: Boolean property, to enable internal pullup on
21 i2c scl/sda pins. Missing this will disable internal pullup on i2c
22 scl/sda lines.
23
16Optional submodule and their properties: 24Optional submodule and their properties:
17======================================= 25=======================================
18 26
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/mfd/s2mps11.txt b/Documentation/devicetree/bindings/mfd/s2mps11.txt
index d81ba30c0d8b..ba2d7f0f9c5f 100644
--- a/Documentation/devicetree/bindings/mfd/s2mps11.txt
+++ b/Documentation/devicetree/bindings/mfd/s2mps11.txt
@@ -1,5 +1,5 @@
1 1
2* Samsung S2MPS11 and S2MPS14 Voltage and Current Regulator 2* Samsung S2MPS11, S2MPS14 and S2MPU02 Voltage and Current Regulator
3 3
4The Samsung S2MPS11 is a multi-function device which includes voltage and 4The Samsung S2MPS11 is a multi-function device which includes voltage and
5current regulators, RTC, charger controller and other sub-blocks. It is 5current regulators, RTC, charger controller and other sub-blocks. It is
@@ -7,7 +7,8 @@ interfaced to the host controller using an I2C interface. Each sub-block is
7addressed by the host system using different I2C slave addresses. 7addressed by the host system using different I2C slave addresses.
8 8
9Required properties: 9Required properties:
10- compatible: Should be "samsung,s2mps11-pmic" or "samsung,s2mps14-pmic". 10- compatible: Should be "samsung,s2mps11-pmic" or "samsung,s2mps14-pmic"
11 or "samsung,s2mpu02-pmic".
11- reg: Specifies the I2C slave address of the pmic block. It should be 0x66. 12- reg: Specifies the I2C slave address of the pmic block. It should be 0x66.
12 13
13Optional properties: 14Optional properties:
@@ -81,11 +82,13 @@ as per the datasheet of s2mps11.
81 - valid values for n are: 82 - valid values for n are:
82 - S2MPS11: 1 to 38 83 - S2MPS11: 1 to 38
83 - S2MPS14: 1 to 25 84 - S2MPS14: 1 to 25
84 - Example: LDO1, LD02, LDO28 85 - S2MPU02: 1 to 28
86 - Example: LDO1, LDO2, LDO28
85 - BUCKn 87 - BUCKn
86 - valid values for n are: 88 - valid values for n are:
87 - S2MPS11: 1 to 10 89 - S2MPS11: 1 to 10
88 - S2MPS14: 1 to 5 90 - S2MPS14: 1 to 5
91 - S2MPU02: 1 to 7
89 - Example: BUCK1, BUCK2, BUCK9 92 - Example: BUCK1, BUCK2, BUCK9
90 93
91Example: 94Example:
@@ -96,7 +99,7 @@ Example:
96 99
97 s2m_osc: clocks { 100 s2m_osc: clocks {
98 compatible = "samsung,s2mps11-clk"; 101 compatible = "samsung,s2mps11-clk";
99 #clock-cells = 1; 102 #clock-cells = <1>;
100 clock-output-names = "xx", "yy", "zz"; 103 clock-output-names = "xx", "yy", "zz";
101 }; 104 };
102 105
diff --git a/Documentation/devicetree/bindings/mfd/sun6i-prcm.txt b/Documentation/devicetree/bindings/mfd/sun6i-prcm.txt
index 1f5a31fef907..03c5a551da55 100644
--- a/Documentation/devicetree/bindings/mfd/sun6i-prcm.txt
+++ b/Documentation/devicetree/bindings/mfd/sun6i-prcm.txt
@@ -4,7 +4,7 @@ PRCM is an MFD device exposing several Power Management related devices
4(like clks and reset controllers). 4(like clks and reset controllers).
5 5
6Required properties: 6Required properties:
7 - compatible: "allwinner,sun6i-a31-prcm" 7 - compatible: "allwinner,sun6i-a31-prcm" or "allwinner,sun8i-a23-prcm"
8 - reg: The PRCM registers range 8 - reg: The PRCM registers range
9 9
10The prcm node may contain several subdevices definitions: 10The prcm node may contain several subdevices definitions:
diff --git a/Documentation/devicetree/bindings/misc/nvidia,tegra20-apbmisc.txt b/Documentation/devicetree/bindings/misc/nvidia,tegra20-apbmisc.txt
new file mode 100644
index 000000000000..b97b8bef1fe5
--- /dev/null
+++ b/Documentation/devicetree/bindings/misc/nvidia,tegra20-apbmisc.txt
@@ -0,0 +1,13 @@
1NVIDIA Tegra20/Tegra30/Tegr114/Tegra124 apbmisc block
2
3Required properties:
4- compatible : should be:
5 "nvidia,tegra20-apbmisc"
6 "nvidia,tegra30-apbmisc"
7 "nvidia,tegra114-apbmisc"
8 "nvidia,tegra124-apbmisc"
9- reg: Should contain 2 entries: the first entry gives the physical address
10 and length of the registers which contain revision and debug features.
11 The second entry gives the physical address and length of the
12 registers indicating the strapping options.
13
diff --git a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
index 532b1d440abc..6cd3525d0e09 100644
--- a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
+++ b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
@@ -46,13 +46,14 @@ Required Properties:
46 - if CIU clock divider value is 0 (that is divide by 1), both tx and rx 46 - if CIU clock divider value is 0 (that is divide by 1), both tx and rx
47 phase shift clocks should be 0. 47 phase shift clocks should be 0.
48 48
49Required properties for a slot: 49Required properties for a slot (Deprecated - Recommend to use one slot per host):
50 50
51* gpios: specifies a list of gpios used for command, clock and data bus. The 51* gpios: specifies a list of gpios used for command, clock and data bus. The
52 first gpio is the command line and the second gpio is the clock line. The 52 first gpio is the command line and the second gpio is the clock line. The
53 rest of the gpios (depending on the bus-width property) are the data lines in 53 rest of the gpios (depending on the bus-width property) are the data lines in
54 no particular order. The format of the gpio specifier depends on the gpio 54 no particular order. The format of the gpio specifier depends on the gpio
55 controller. 55 controller.
56(Deprecated - Refer to Documentation/devicetree/binding/pinctrl/samsung-pinctrl.txt)
56 57
57Example: 58Example:
58 59
@@ -69,21 +70,13 @@ Example:
69 70
70 dwmmc0@12200000 { 71 dwmmc0@12200000 {
71 num-slots = <1>; 72 num-slots = <1>;
72 supports-highspeed; 73 cap-mmc-highspeed;
74 cap-sd-highspeed;
73 broken-cd; 75 broken-cd;
74 fifo-depth = <0x80>; 76 fifo-depth = <0x80>;
75 card-detect-delay = <200>; 77 card-detect-delay = <200>;
76 samsung,dw-mshc-ciu-div = <3>; 78 samsung,dw-mshc-ciu-div = <3>;
77 samsung,dw-mshc-sdr-timing = <2 3>; 79 samsung,dw-mshc-sdr-timing = <2 3>;
78 samsung,dw-mshc-ddr-timing = <1 2>; 80 samsung,dw-mshc-ddr-timing = <1 2>;
79 81 bus-width = <8>;
80 slot@0 {
81 reg = <0>;
82 bus-width = <8>;
83 gpios = <&gpc0 0 2 0 3>, <&gpc0 1 2 0 3>,
84 <&gpc1 0 2 3 3>, <&gpc1 1 2 3 3>,
85 <&gpc1 2 2 3 3>, <&gpc1 3 2 3 3>,
86 <&gpc0 3 2 3 3>, <&gpc0 4 2 3 3>,
87 <&gpc0 5 2 3 3>, <&gpc0 6 2 3 3>;
88 };
89 }; 82 };
diff --git a/Documentation/devicetree/bindings/mmc/k3-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/k3-dw-mshc.txt
index e5bc49f764d1..3b3544931437 100644
--- a/Documentation/devicetree/bindings/mmc/k3-dw-mshc.txt
+++ b/Documentation/devicetree/bindings/mmc/k3-dw-mshc.txt
@@ -34,13 +34,11 @@ Example:
34 num-slots = <1>; 34 num-slots = <1>;
35 vmmc-supply = <&ldo12>; 35 vmmc-supply = <&ldo12>;
36 fifo-depth = <0x100>; 36 fifo-depth = <0x100>;
37 supports-highspeed;
38 pinctrl-names = "default"; 37 pinctrl-names = "default";
39 pinctrl-0 = <&sd_pmx_pins &sd_cfg_func1 &sd_cfg_func2>; 38 pinctrl-0 = <&sd_pmx_pins &sd_cfg_func1 &sd_cfg_func2>;
40 slot@0 { 39 bus-width = <4>;
41 reg = <0>; 40 disable-wp;
42 bus-width = <4>; 41 cd-gpios = <&gpio10 3 0>;
43 disable-wp; 42 cap-mmc-highspeed;
44 cd-gpios = <&gpio10 3 0>; 43 cap-sd-highspeed;
45 };
46 }; 44 };
diff --git a/Documentation/devicetree/bindings/mmc/mmc.txt b/Documentation/devicetree/bindings/mmc/mmc.txt
index 3c18001dfd5d..431716e37a39 100644
--- a/Documentation/devicetree/bindings/mmc/mmc.txt
+++ b/Documentation/devicetree/bindings/mmc/mmc.txt
@@ -34,8 +34,8 @@ Optional properties:
34- cap-power-off-card: powering off the card is safe 34- cap-power-off-card: powering off the card is safe
35- cap-sdio-irq: enable SDIO IRQ signalling on this interface 35- cap-sdio-irq: enable SDIO IRQ signalling on this interface
36- full-pwr-cycle: full power cycle of the card is supported 36- full-pwr-cycle: full power cycle of the card is supported
37- mmc-highspeed-ddr-1_8v: eMMC high-speed DDR mode(1.8V I/O) is supported 37- mmc-ddr-1_8v: eMMC high-speed DDR mode(1.8V I/O) is supported
38- mmc-highspeed-ddr-1_2v: eMMC high-speed DDR mode(1.2V I/O) is supported 38- mmc-ddr-1_2v: eMMC high-speed DDR mode(1.2V I/O) is supported
39- mmc-hs200-1_8v: eMMC HS200 mode(1.8V I/O) is supported 39- mmc-hs200-1_8v: eMMC HS200 mode(1.8V I/O) is supported
40- mmc-hs200-1_2v: eMMC HS200 mode(1.2V I/O) is supported 40- mmc-hs200-1_2v: eMMC HS200 mode(1.2V I/O) is supported
41- mmc-hs400-1_8v: eMMC HS400 mode(1.8V I/O) is supported 41- mmc-hs400-1_8v: eMMC HS400 mode(1.8V I/O) is supported
diff --git a/Documentation/devicetree/bindings/mmc/renesas,mmcif.txt b/Documentation/devicetree/bindings/mmc/renesas,mmcif.txt
new file mode 100644
index 000000000000..299081f94abd
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/renesas,mmcif.txt
@@ -0,0 +1,32 @@
1* Renesas Multi Media Card Interface (MMCIF) Controller
2
3This file documents differences between the core properties in mmc.txt
4and the properties used by the MMCIF device.
5
6
7Required properties:
8
9- compatible: must contain one of the following
10 - "renesas,mmcif-r8a7740" for the MMCIF found in r8a7740 SoCs
11 - "renesas,mmcif-r8a7790" for the MMCIF found in r8a7790 SoCs
12 - "renesas,mmcif-r8a7791" for the MMCIF found in r8a7791 SoCs
13 - "renesas,sh-mmcif" for the generic MMCIF
14
15- clocks: reference to the functional clock
16
17- dmas: reference to the DMA channels, one per channel name listed in the
18 dma-names property.
19- dma-names: must contain "tx" for the transmit DMA channel and "rx" for the
20 receive DMA channel.
21
22
23Example: R8A7790 (R-Car H2) MMCIF0
24
25 mmcif0: mmc@ee200000 {
26 compatible = "renesas,mmcif-r8a7790", "renesas,sh-mmcif";
27 reg = <0 0xee200000 0 0x80>;
28 interrupts = <0 169 IRQ_TYPE_LEVEL_HIGH>;
29 clocks = <&mstp3_clks R8A7790_CLK_MMCIF0>;
30 dmas = <&dmac0 0xd1>, <&dmac0 0xd2>;
31 dma-names = "tx", "rx";
32 };
diff --git a/Documentation/devicetree/bindings/mmc/sdhci-msm.txt b/Documentation/devicetree/bindings/mmc/sdhci-msm.txt
index 81b33b5b20fc..485483a63d8c 100644
--- a/Documentation/devicetree/bindings/mmc/sdhci-msm.txt
+++ b/Documentation/devicetree/bindings/mmc/sdhci-msm.txt
@@ -27,8 +27,8 @@ Example:
27 bus-width = <8>; 27 bus-width = <8>;
28 non-removable; 28 non-removable;
29 29
30 vmmc = <&pm8941_l20>; 30 vmmc-supply = <&pm8941_l20>;
31 vqmmc = <&pm8941_s3>; 31 vqmmc-supply = <&pm8941_s3>;
32 32
33 pinctrl-names = "default"; 33 pinctrl-names = "default";
34 pinctrl-0 = <&sdc1_clk &sdc1_cmd &sdc1_data>; 34 pinctrl-0 = <&sdc1_clk &sdc1_cmd &sdc1_data>;
@@ -44,8 +44,8 @@ Example:
44 bus-width = <4>; 44 bus-width = <4>;
45 cd-gpios = <&msmgpio 62 0x1>; 45 cd-gpios = <&msmgpio 62 0x1>;
46 46
47 vmmc = <&pm8941_l21>; 47 vmmc-supply = <&pm8941_l21>;
48 vqmmc = <&pm8941_l13>; 48 vqmmc-supply = <&pm8941_l13>;
49 49
50 pinctrl-names = "default"; 50 pinctrl-names = "default";
51 pinctrl-0 = <&sdc2_clk &sdc2_cmd &sdc2_data>; 51 pinctrl-0 = <&sdc2_clk &sdc2_cmd &sdc2_data>;
diff --git a/Documentation/devicetree/bindings/mmc/sdhci-st.txt b/Documentation/devicetree/bindings/mmc/sdhci-st.txt
new file mode 100644
index 000000000000..7527db447a35
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/sdhci-st.txt
@@ -0,0 +1,33 @@
1* STMicroelectronics sdhci-st MMC/SD controller
2
3This file documents the differences between the core properties in
4Documentation/devicetree/bindings/mmc/mmc.txt and the properties
5used by the sdhci-st driver.
6
7Required properties:
8- compatible : Must be "st,sdhci"
9- clock-names : Should be "mmc"
10 See: Documentation/devicetree/bindings/resource-names.txt
11- clocks : Phandle of the clock used by the sdhci controler
12 See: Documentation/devicetree/bindings/clock/clock-bindings.txt
13
14Optional properties:
15- non-removable: non-removable slot
16 See: Documentation/devicetree/bindings/mmc/mmc.txt
17- bus-width: Number of data lines
18 See: Documentation/devicetree/bindings/mmc/mmc.txt
19
20Example:
21
22mmc0: sdhci@fe81e000 {
23 compatible = "st,sdhci";
24 status = "disabled";
25 reg = <0xfe81e000 0x1000>;
26 interrupts = <GIC_SPI 127 IRQ_TYPE_NONE>;
27 interrupt-names = "mmcirq";
28 pinctrl-names = "default";
29 pinctrl-0 = <&pinctrl_mmc0>;
30 clock-names = "mmc";
31 clocks = <&clk_s_a1_ls 1>;
32 bus-width = <8>
33};
diff --git a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt
index 2d4a7258a10d..346c6095a615 100644
--- a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt
+++ b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt
@@ -67,7 +67,8 @@ Optional properties:
67* card-detect-delay: Delay in milli-seconds before detecting card after card 67* card-detect-delay: Delay in milli-seconds before detecting card after card
68 insert event. The default value is 0. 68 insert event. The default value is 0.
69 69
70* supports-highspeed: Enables support for high speed cards (up to 50MHz) 70* supports-highspeed (DEPRECATED): Enables support for high speed cards (up to 50MHz)
71 (use "cap-mmc-highspeed" or "cap-sd-highspeed" instead)
71 72
72* broken-cd: as documented in mmc core bindings. 73* broken-cd: as documented in mmc core bindings.
73 74
@@ -98,14 +99,11 @@ board specific portions as listed below.
98 clock-frequency = <400000000>; 99 clock-frequency = <400000000>;
99 clock-freq-min-max = <400000 200000000>; 100 clock-freq-min-max = <400000 200000000>;
100 num-slots = <1>; 101 num-slots = <1>;
101 supports-highspeed;
102 broken-cd; 102 broken-cd;
103 fifo-depth = <0x80>; 103 fifo-depth = <0x80>;
104 card-detect-delay = <200>; 104 card-detect-delay = <200>;
105 vmmc-supply = <&buck8>; 105 vmmc-supply = <&buck8>;
106 106 bus-width = <8>;
107 slot@0 { 107 cap-mmc-highspeed;
108 reg = <0>; 108 cap-sd-highspeed;
109 bus-width = <8>;
110 };
111 }; 109 };
diff --git a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
index ce8056116fb0..76bf087bc889 100644
--- a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
+++ b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
@@ -12,6 +12,7 @@ Required properties:
12 Should be "ti,omap3-hsmmc", for OMAP3 controllers 12 Should be "ti,omap3-hsmmc", for OMAP3 controllers
13 Should be "ti,omap3-pre-es3-hsmmc" for OMAP3 controllers pre ES3.0 13 Should be "ti,omap3-pre-es3-hsmmc" for OMAP3 controllers pre ES3.0
14 Should be "ti,omap4-hsmmc", for OMAP4 controllers 14 Should be "ti,omap4-hsmmc", for OMAP4 controllers
15 Should be "ti,am33xx-hsmmc", for AM335x controllers
15- ti,hwmods: Must be "mmc<n>", n is controller instance starting 1 16- ti,hwmods: Must be "mmc<n>", n is controller instance starting 1
16 17
17Optional properties: 18Optional properties:
@@ -56,3 +57,56 @@ Examples:
56 &edma 25>; 57 &edma 25>;
57 dma-names = "tx", "rx"; 58 dma-names = "tx", "rx";
58 }; 59 };
60
61[workaround for missing swakeup on am33xx]
62
63This SOC is missing the swakeup line, it will not detect SDIO irq
64while in suspend.
65
66 ------
67 | PRCM |
68 ------
69 ^ |
70 swakeup | | fclk
71 | v
72 ------ ------- -----
73 | card | -- CIRQ --> | hsmmc | -- IRQ --> | CPU |
74 ------ ------- -----
75
76In suspend the fclk is off and the module is disfunctional. Even register reads
77will fail. A small logic in the host will request fclk restore, when an
78external event is detected. Once the clock is restored, the host detects the
79event normally. Since am33xx doesn't have this line it never wakes from
80suspend.
81
82The workaround is to reconfigure the dat1 line as a GPIO upon suspend. To make
83this work, we need to set the named pinctrl states "default" and "idle".
84Prepare idle to remux dat1 as a gpio, and default to remux it back as sdio
85dat1. The MMC driver will then toggle between idle and default state during
86runtime.
87
88In summary:
891. select matching 'compatible' section, see example below.
902. specify pinctrl states "default" and "idle", "sleep" is optional.
913. specify the gpio irq used for detecting sdio irq in suspend
92
93If configuration is incomplete, a warning message is emitted "falling back to
94polling". Also check the "sdio irq mode" in /sys/kernel/debug/mmc0/regs. Mind
95not every application needs SDIO irq, e.g. MMC cards.
96
97 mmc1: mmc@48060100 {
98 compatible = "ti,am33xx-hsmmc";
99 ...
100 pinctrl-names = "default", "idle", "sleep"
101 pinctrl-0 = <&mmc1_pins>;
102 pinctrl-1 = <&mmc1_idle>;
103 pinctrl-2 = <&mmc1_sleep>;
104 ...
105 interrupts-extended = <&intc 64 &gpio2 28 0>;
106 };
107
108 mmc1_idle : pinmux_cirq_pin {
109 pinctrl-single,pins = <
110 0x0f8 0x3f /* GPIO2_28 */
111 >;
112 };
diff --git a/Documentation/devicetree/bindings/mmc/tmio_mmc.txt b/Documentation/devicetree/bindings/mmc/tmio_mmc.txt
index 6a2a1160a70d..fa0f327cde01 100644
--- a/Documentation/devicetree/bindings/mmc/tmio_mmc.txt
+++ b/Documentation/devicetree/bindings/mmc/tmio_mmc.txt
@@ -18,6 +18,7 @@ Required properties:
18 "renesas,sdhi-r8a7778" - SDHI IP on R8A7778 SoC 18 "renesas,sdhi-r8a7778" - SDHI IP on R8A7778 SoC
19 "renesas,sdhi-r8a7779" - SDHI IP on R8A7779 SoC 19 "renesas,sdhi-r8a7779" - SDHI IP on R8A7779 SoC
20 "renesas,sdhi-r8a7790" - SDHI IP on R8A7790 SoC 20 "renesas,sdhi-r8a7790" - SDHI IP on R8A7790 SoC
21 "renesas,sdhi-r8a7791" - SDHI IP on R8A7791 SoC
21 22
22Optional properties: 23Optional properties:
23- toshiba,mmc-wrprotect-disable: write-protect detection is unavailable 24- toshiba,mmc-wrprotect-disable: write-protect detection is unavailable
diff --git a/Documentation/devicetree/bindings/mtd/gpmi-nand.txt b/Documentation/devicetree/bindings/mtd/gpmi-nand.txt
index 458d59634688..a011fdf61dbf 100644
--- a/Documentation/devicetree/bindings/mtd/gpmi-nand.txt
+++ b/Documentation/devicetree/bindings/mtd/gpmi-nand.txt
@@ -25,6 +25,16 @@ Optional properties:
25 discoverable or this property is not enabled, 25 discoverable or this property is not enabled,
26 the software may chooses an implementation-defined 26 the software may chooses an implementation-defined
27 ECC scheme. 27 ECC scheme.
28 - fsl,no-blockmark-swap: Don't swap the bad block marker from the OOB
29 area with the byte in the data area but rely on the
30 flash based BBT for identifying bad blocks.
31 NOTE: this is only valid in conjunction with
32 'nand-on-flash-bbt'.
33 WARNING: on i.MX28 blockmark swapping cannot be
34 disabled for the BootROM in the FCB. Thus,
35 partitions written from Linux with this feature
36 turned on may not be accessible by the BootROM
37 code.
28 38
29The device tree may optionally contain sub-nodes describing partitions of the 39The device tree may optionally contain sub-nodes describing partitions of the
30address space. See partition.txt for more detail. 40address space. See partition.txt for more detail.
diff --git a/Documentation/devicetree/bindings/net/amd-xgbe-phy.txt b/Documentation/devicetree/bindings/net/amd-xgbe-phy.txt
index d01ed63d3ebb..42409bfe04c4 100644
--- a/Documentation/devicetree/bindings/net/amd-xgbe-phy.txt
+++ b/Documentation/devicetree/bindings/net/amd-xgbe-phy.txt
@@ -8,10 +8,16 @@ Required properties:
8 - SerDes integration registers (1/2) 8 - SerDes integration registers (1/2)
9 - SerDes integration registers (2/2) 9 - SerDes integration registers (2/2)
10 10
11Optional properties:
12- amd,speed-set: Speed capabilities of the device
13 0 - 1GbE and 10GbE (default)
14 1 - 2.5GbE and 10GbE
15
11Example: 16Example:
12 xgbe_phy@e1240800 { 17 xgbe_phy@e1240800 {
13 compatible = "amd,xgbe-phy-seattle-v1a", "ethernet-phy-ieee802.3-c45"; 18 compatible = "amd,xgbe-phy-seattle-v1a", "ethernet-phy-ieee802.3-c45";
14 reg = <0 0xe1240800 0 0x00400>, 19 reg = <0 0xe1240800 0 0x00400>,
15 <0 0xe1250000 0 0x00060>, 20 <0 0xe1250000 0 0x00060>,
16 <0 0xe1250080 0 0x00004>; 21 <0 0xe1250080 0 0x00004>;
22 amd,speed-set = <0>;
17 }; 23 };
diff --git a/Documentation/devicetree/bindings/net/amd-xgbe.txt b/Documentation/devicetree/bindings/net/amd-xgbe.txt
index ea0c7908a3b8..41354f730beb 100644
--- a/Documentation/devicetree/bindings/net/amd-xgbe.txt
+++ b/Documentation/devicetree/bindings/net/amd-xgbe.txt
@@ -8,16 +8,21 @@ Required properties:
8- interrupt-parent: Should be the phandle for the interrupt controller 8- interrupt-parent: Should be the phandle for the interrupt controller
9 that services interrupts for this device 9 that services interrupts for this device
10- interrupts: Should contain the amd-xgbe interrupt 10- interrupts: Should contain the amd-xgbe interrupt
11- clocks: Should be the DMA clock for the amd-xgbe device (used for 11- clocks:
12 calculating the correct Rx interrupt watchdog timer value on a DMA 12 - DMA clock for the amd-xgbe device (used for calculating the
13 channel for coalescing) 13 correct Rx interrupt watchdog timer value on a DMA channel
14- clock-names: Should be the name of the DMA clock, "dma_clk" 14 for coalescing)
15 - PTP clock for the amd-xgbe device
16- clock-names: Should be the names of the clocks
17 - "dma_clk" for the DMA clock
18 - "ptp_clk" for the PTP clock
15- phy-handle: See ethernet.txt file in the same directory 19- phy-handle: See ethernet.txt file in the same directory
16- phy-mode: See ethernet.txt file in the same directory 20- phy-mode: See ethernet.txt file in the same directory
17 21
18Optional properties: 22Optional properties:
19- mac-address: mac address to be assigned to the device. Can be overridden 23- mac-address: mac address to be assigned to the device. Can be overridden
20 by UEFI. 24 by UEFI.
25- dma-coherent: Present if dma operations are coherent
21 26
22Example: 27Example:
23 xgbe@e0700000 { 28 xgbe@e0700000 {
@@ -26,8 +31,8 @@ Example:
26 <0 0xe0780000 0 0x80000>; 31 <0 0xe0780000 0 0x80000>;
27 interrupt-parent = <&gic>; 32 interrupt-parent = <&gic>;
28 interrupts = <0 325 4>; 33 interrupts = <0 325 4>;
29 clocks = <&xgbe_clk>; 34 clocks = <&xgbe_dma_clk>, <&xgbe_ptp_clk>;
30 clock-names = "dma_clk"; 35 clock-names = "dma_clk", "ptp_clk";
31 phy-handle = <&phy>; 36 phy-handle = <&phy>;
32 phy-mode = "xgmii"; 37 phy-mode = "xgmii";
33 mac-address = [ 02 a1 a2 a3 a4 a5 ]; 38 mac-address = [ 02 a1 a2 a3 a4 a5 ];
diff --git a/Documentation/devicetree/bindings/net/apm-xgene-enet.txt b/Documentation/devicetree/bindings/net/apm-xgene-enet.txt
new file mode 100644
index 000000000000..ebcad25efd0a
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/apm-xgene-enet.txt
@@ -0,0 +1,66 @@
1APM X-Gene SoC Ethernet nodes
2
3Ethernet nodes are defined to describe on-chip ethernet interfaces in
4APM X-Gene SoC.
5
6Required properties:
7- compatible: Should be "apm,xgene-enet"
8- reg: Address and length of the register set for the device. It contains the
9 information of registers in the same order as described by reg-names
10- reg-names: Should contain the register set names
11 - "enet_csr": Ethernet control and status register address space
12 - "ring_csr": Descriptor ring control and status register address space
13 - "ring_cmd": Descriptor ring command register address space
14- interrupts: Ethernet main interrupt
15- clocks: Reference to the clock entry.
16- local-mac-address: MAC address assigned to this device
17- phy-connection-type: Interface type between ethernet device and PHY device
18- phy-handle: Reference to a PHY node connected to this device
19
20- mdio: Device tree subnode with the following required properties:
21 - compatible: Must be "apm,xgene-mdio".
22 - #address-cells: Must be <1>.
23 - #size-cells: Must be <0>.
24
25 For the phy on the mdio bus, there must be a node with the following fields:
26 - compatible: PHY identifier. Please refer ./phy.txt for the format.
27 - reg: The ID number for the phy.
28
29Optional properties:
30- status: Should be "ok" or "disabled" for enabled/disabled. Default is "ok".
31
32Example:
33 menetclk: menetclk {
34 compatible = "apm,xgene-device-clock";
35 clock-output-names = "menetclk";
36 status = "ok";
37 };
38
39 menet: ethernet@17020000 {
40 compatible = "apm,xgene-enet";
41 status = "disabled";
42 reg = <0x0 0x17020000 0x0 0xd100>,
43 <0x0 0X17030000 0x0 0X400>,
44 <0x0 0X10000000 0x0 0X200>;
45 reg-names = "enet_csr", "ring_csr", "ring_cmd";
46 interrupts = <0x0 0x3c 0x4>;
47 clocks = <&menetclk 0>;
48 local-mac-address = [00 01 73 00 00 01];
49 phy-connection-type = "rgmii";
50 phy-handle = <&menetphy>;
51 mdio {
52 compatible = "apm,xgene-mdio";
53 #address-cells = <1>;
54 #size-cells = <0>;
55 menetphy: menetphy@3 {
56 compatible = "ethernet-phy-id001c.c915";
57 reg = <0x3>;
58 };
59
60 };
61 };
62
63/* Board-specific peripheral configurations */
64&menet {
65 status = "ok";
66};
diff --git a/Documentation/devicetree/bindings/net/broadcom-systemport.txt b/Documentation/devicetree/bindings/net/broadcom-systemport.txt
index c183ea90d9bc..aa7ad622259d 100644
--- a/Documentation/devicetree/bindings/net/broadcom-systemport.txt
+++ b/Documentation/devicetree/bindings/net/broadcom-systemport.txt
@@ -4,7 +4,8 @@ Required properties:
4- compatible: should be one of "brcm,systemport-v1.00" or "brcm,systemport" 4- compatible: should be one of "brcm,systemport-v1.00" or "brcm,systemport"
5- reg: address and length of the register set for the device. 5- reg: address and length of the register set for the device.
6- interrupts: interrupts for the device, first cell must be for the the rx 6- interrupts: interrupts for the device, first cell must be for the the rx
7 interrupts, and the second cell should be for the transmit queues 7 interrupts, and the second cell should be for the transmit queues. An
8 optional third interrupt cell for Wake-on-LAN can be specified
8- local-mac-address: Ethernet MAC address (48 bits) of this adapter 9- local-mac-address: Ethernet MAC address (48 bits) of this adapter
9- phy-mode: Should be a string describing the PHY interface to the 10- phy-mode: Should be a string describing the PHY interface to the
10 Ethernet switch/PHY, see Documentation/devicetree/bindings/net/ethernet.txt 11 Ethernet switch/PHY, see Documentation/devicetree/bindings/net/ethernet.txt
diff --git a/Documentation/devicetree/bindings/net/davinci-mdio.txt b/Documentation/devicetree/bindings/net/davinci-mdio.txt
index 72efaaf764f7..0369e25aabd2 100644
--- a/Documentation/devicetree/bindings/net/davinci-mdio.txt
+++ b/Documentation/devicetree/bindings/net/davinci-mdio.txt
@@ -1,8 +1,8 @@
1TI SoC Davinci MDIO Controller Device Tree Bindings 1TI SoC Davinci/Keystone2 MDIO Controller Device Tree Bindings
2--------------------------------------------------- 2---------------------------------------------------
3 3
4Required properties: 4Required properties:
5- compatible : Should be "ti,davinci_mdio" 5- compatible : Should be "ti,davinci_mdio" or "ti,keystone_mdio"
6- reg : physical base address and size of the davinci mdio 6- reg : physical base address and size of the davinci mdio
7 registers map 7 registers map
8- bus_freq : Mdio Bus frequency 8- bus_freq : Mdio Bus frequency
@@ -19,7 +19,7 @@ file.
19Examples: 19Examples:
20 20
21 mdio: davinci_mdio@4A101000 { 21 mdio: davinci_mdio@4A101000 {
22 compatible = "ti,cpsw"; 22 compatible = "ti,davinci_mdio";
23 reg = <0x4A101000 0x1000>; 23 reg = <0x4A101000 0x1000>;
24 bus_freq = <1000000>; 24 bus_freq = <1000000>;
25 }; 25 };
@@ -27,7 +27,7 @@ Examples:
27(or) 27(or)
28 28
29 mdio: davinci_mdio@4A101000 { 29 mdio: davinci_mdio@4A101000 {
30 compatible = "ti,cpsw"; 30 compatible = "ti,davinci_mdio";
31 ti,hwmods = "davinci_mdio"; 31 ti,hwmods = "davinci_mdio";
32 bus_freq = <1000000>; 32 bus_freq = <1000000>;
33 }; 33 };
diff --git a/Documentation/devicetree/bindings/net/fsl-fec.txt b/Documentation/devicetree/bindings/net/fsl-fec.txt
index 6bc84adb10c0..8a2c7b55ec16 100644
--- a/Documentation/devicetree/bindings/net/fsl-fec.txt
+++ b/Documentation/devicetree/bindings/net/fsl-fec.txt
@@ -12,7 +12,14 @@ Optional properties:
12 only if property "phy-reset-gpios" is available. Missing the property 12 only if property "phy-reset-gpios" is available. Missing the property
13 will have the duration be 1 millisecond. Numbers greater than 1000 are 13 will have the duration be 1 millisecond. Numbers greater than 1000 are
14 invalid and 1 millisecond will be used instead. 14 invalid and 1 millisecond will be used instead.
15- phy-supply: regulator that powers the Ethernet PHY. 15- phy-supply : regulator that powers the Ethernet PHY.
16- phy-handle : phandle to the PHY device connected to this device.
17- fixed-link : Assume a fixed link. See fixed-link.txt in the same directory.
18 Use instead of phy-handle.
19
20Optional subnodes:
21- mdio : specifies the mdio bus in the FEC, used as a container for phy nodes
22 according to phy.txt in the same directory
16 23
17Example: 24Example:
18 25
@@ -25,3 +32,23 @@ ethernet@83fec000 {
25 local-mac-address = [00 04 9F 01 1B B9]; 32 local-mac-address = [00 04 9F 01 1B B9];
26 phy-supply = <&reg_fec_supply>; 33 phy-supply = <&reg_fec_supply>;
27}; 34};
35
36Example with phy specified:
37
38ethernet@83fec000 {
39 compatible = "fsl,imx51-fec", "fsl,imx27-fec";
40 reg = <0x83fec000 0x4000>;
41 interrupts = <87>;
42 phy-mode = "mii";
43 phy-reset-gpios = <&gpio2 14 0>; /* GPIO2_14 */
44 local-mac-address = [00 04 9F 01 1B B9];
45 phy-supply = <&reg_fec_supply>;
46 phy-handle = <&ethphy>;
47 mdio {
48 ethphy: ethernet-phy@6 {
49 compatible = "ethernet-phy-ieee802.3-c22";
50 reg = <6>;
51 max-speed = <100>;
52 };
53 };
54};
diff --git a/Documentation/devicetree/bindings/net/ieee802154/cc2520.txt b/Documentation/devicetree/bindings/net/ieee802154/cc2520.txt
new file mode 100644
index 000000000000..0071883c08d8
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/ieee802154/cc2520.txt
@@ -0,0 +1,29 @@
1*CC2520 IEEE 802.15.4 Compatible Radio*
2
3Required properties:
4 - compatible: should be "ti,cc2520"
5 - spi-max-frequency: maximal bus speed (8000000), should be set to 4000000 depends
6 sync or async operation mode
7 - reg: the chipselect index
8 - pinctrl-0: pin control group to be used for this controller.
9 - pinctrl-names: must contain a "default" entry.
10 - fifo-gpio: GPIO spec for the FIFO pin
11 - fifop-gpio: GPIO spec for the FIFOP pin
12 - sfd-gpio: GPIO spec for the SFD pin
13 - cca-gpio: GPIO spec for the CCA pin
14 - vreg-gpio: GPIO spec for the VREG pin
15 - reset-gpio: GPIO spec for the RESET pin
16Example:
17 cc2520@0 {
18 compatible = "ti,cc2520";
19 reg = <0>;
20 spi-max-frequency = <4000000>;
21 pinctrl-names = "default";
22 pinctrl-0 = <&cc2520_cape_pins>;
23 fifo-gpio = <&gpio1 18 0>;
24 fifop-gpio = <&gpio1 19 0>;
25 sfd-gpio = <&gpio1 13 0>;
26 cca-gpio = <&gpio1 16 0>;
27 vreg-gpio = <&gpio0 31 0>;
28 reset-gpio = <&gpio1 12 0>;
29 };
diff --git a/Documentation/devicetree/bindings/net/marvell-pp2.txt b/Documentation/devicetree/bindings/net/marvell-pp2.txt
new file mode 100644
index 000000000000..aa4f4230bfd7
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/marvell-pp2.txt
@@ -0,0 +1,61 @@
1* Marvell Armada 375 Ethernet Controller (PPv2)
2
3Required properties:
4
5- compatible: should be "marvell,armada-375-pp2"
6- reg: addresses and length of the register sets for the device.
7 Must contain the following register sets:
8 - common controller registers
9 - LMS registers
10 In addition, at least one port register set is required.
11- clocks: a pointer to the reference clocks for this device, consequently:
12 - main controller clock
13 - GOP clock
14- clock-names: names of used clocks, must be "pp_clk" and "gop_clk".
15
16The ethernet ports are represented by subnodes. At least one port is
17required.
18
19Required properties (port):
20
21- interrupts: interrupt for the port
22- port-id: should be '0' or '1' for ethernet ports, and '2' for the
23 loopback port
24- phy-mode: See ethernet.txt file in the same directory
25
26Optional properties (port):
27
28- marvell,loopback: port is loopback mode
29- phy: a phandle to a phy node defining the PHY address (as the reg
30 property, a single integer). Note: if this property isn't present,
31 then fixed link is assumed, and the 'fixed-link' property is
32 mandatory.
33
34Example:
35
36ethernet@f0000 {
37 compatible = "marvell,armada-375-pp2";
38 reg = <0xf0000 0xa000>,
39 <0xc0000 0x3060>,
40 <0xc4000 0x100>,
41 <0xc5000 0x100>;
42 clocks = <&gateclk 3>, <&gateclk 19>;
43 clock-names = "pp_clk", "gop_clk";
44 status = "okay";
45
46 eth0: eth0@c4000 {
47 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
48 port-id = <0>;
49 status = "okay";
50 phy = <&phy0>;
51 phy-mode = "gmii";
52 };
53
54 eth1: eth1@c5000 {
55 interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
56 port-id = <1>;
57 status = "okay";
58 phy = <&phy3>;
59 phy-mode = "gmii";
60 };
61};
diff --git a/Documentation/devicetree/bindings/net/nfc/st21nfcb.txt b/Documentation/devicetree/bindings/net/nfc/st21nfcb.txt
new file mode 100644
index 000000000000..3b58ae480344
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/nfc/st21nfcb.txt
@@ -0,0 +1,33 @@
1* STMicroelectronics SAS. ST21NFCB NFC Controller
2
3Required properties:
4- compatible: Should be "st,st21nfcb_i2c".
5- clock-frequency: I²C work frequency.
6- reg: address on the bus
7- interrupt-parent: phandle for the interrupt gpio controller
8- interrupts: GPIO interrupt to which the chip is connected
9- reset-gpios: Output GPIO pin used to reset the ST21NFCB
10
11Optional SoC Specific Properties:
12- pinctrl-names: Contains only one value - "default".
13- pintctrl-0: Specifies the pin control groups used for this controller.
14
15Example (for ARM-based BeagleBoard xM with ST21NFCB on I2C2):
16
17&i2c2 {
18
19 status = "okay";
20
21 st21nfcb: st21nfcb@8 {
22
23 compatible = "st,st21nfcb_i2c";
24
25 reg = <0x08>;
26 clock-frequency = <400000>;
27
28 interrupt-parent = <&gpio5>;
29 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
30
31 reset-gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>;
32 };
33};
diff --git a/Documentation/devicetree/bindings/net/sh_eth.txt b/Documentation/devicetree/bindings/net/sh_eth.txt
index e7106b50dbdc..34d4db1a4e25 100644
--- a/Documentation/devicetree/bindings/net/sh_eth.txt
+++ b/Documentation/devicetree/bindings/net/sh_eth.txt
@@ -9,6 +9,7 @@ Required properties:
9 "renesas,ether-r8a7779" if the device is a part of R8A7779 SoC. 9 "renesas,ether-r8a7779" if the device is a part of R8A7779 SoC.
10 "renesas,ether-r8a7790" if the device is a part of R8A7790 SoC. 10 "renesas,ether-r8a7790" if the device is a part of R8A7790 SoC.
11 "renesas,ether-r8a7791" if the device is a part of R8A7791 SoC. 11 "renesas,ether-r8a7791" if the device is a part of R8A7791 SoC.
12 "renesas,ether-r8a7794" if the device is a part of R8A7794 SoC.
12 "renesas,ether-r7s72100" if the device is a part of R7S72100 SoC. 13 "renesas,ether-r7s72100" if the device is a part of R7S72100 SoC.
13- reg: offset and length of (1) the E-DMAC/feLic register block (required), 14- reg: offset and length of (1) the E-DMAC/feLic register block (required),
14 (2) the TSU register block (optional). 15 (2) the TSU register block (optional).
diff --git a/Documentation/devicetree/bindings/net/stmmac.txt b/Documentation/devicetree/bindings/net/stmmac.txt
index a2acd2b26baf..9b03c57563a4 100644
--- a/Documentation/devicetree/bindings/net/stmmac.txt
+++ b/Documentation/devicetree/bindings/net/stmmac.txt
@@ -25,6 +25,10 @@ Required properties:
25- snps,force_sf_dma_mode Force DMA to use the Store and Forward 25- snps,force_sf_dma_mode Force DMA to use the Store and Forward
26 mode for both tx and rx. This flag is 26 mode for both tx and rx. This flag is
27 ignored if force_thresh_dma_mode is set. 27 ignored if force_thresh_dma_mode is set.
28- snps,multicast-filter-bins: Number of multicast filter hash bins
29 supported by this device instance
30- snps,perfect-filter-entries: Number of perfect filter entries supported
31 by this device instance
28 32
29Optional properties: 33Optional properties:
30- resets: Should contain a phandle to the STMMAC reset signal, if any 34- resets: Should contain a phandle to the STMMAC reset signal, if any
@@ -47,6 +51,8 @@ Examples:
47 mac-address = [000000000000]; /* Filled in by U-Boot */ 51 mac-address = [000000000000]; /* Filled in by U-Boot */
48 max-frame-size = <3800>; 52 max-frame-size = <3800>;
49 phy-mode = "gmii"; 53 phy-mode = "gmii";
54 snps,multicast-filter-bins = <256>;
55 snps,perfect-filter-entries = <128>;
50 clocks = <&clock>; 56 clocks = <&clock>;
51 clock-names = "stmmaceth">; 57 clock-names = "stmmaceth">;
52 }; 58 };
diff --git a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
new file mode 100644
index 000000000000..5dbf169cd81c
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
@@ -0,0 +1,41 @@
1Broadcom BCM43xx Fullmac wireless SDIO devices
2
3This node provides properties for controlling the Broadcom wireless device. The
4node is expected to be specified as a child node to the SDIO controller that
5connects the device to the system.
6
7Required properties:
8
9 - compatible : Should be "brcm,bcm4329-fmac".
10
11Optional properties:
12 - brcm,drive-strength : drive strength used for SDIO pins on device in mA
13 (default = 6).
14 - interrupt-parent : the phandle for the interrupt controller to which the
15 device interrupts are connected.
16 - interrupts : specifies attributes for the out-of-band interrupt (host-wake).
17 When not specified the device will use in-band SDIO interrupts.
18 - interrupt-names : name of the out-of-band interrupt, which must be set
19 to "host-wake".
20
21Example:
22
23mmc3: mmc@01c12000 {
24 #address-cells = <1>;
25 #size-cells = <0>;
26
27 pinctrl-names = "default";
28 pinctrl-0 = <&mmc3_pins_a>;
29 vmmc-supply = <&reg_vmmc3>;
30 bus-width = <4>;
31 non-removable;
32 status = "okay";
33
34 brcmf: bcrmf@1 {
35 reg = <1>;
36 compatible = "brcm,bcm4329-fmac";
37 interrupt-parent = <&pio>;
38 interrupts = <10 8>; /* PH10 / EINT10 */
39 interrupt-names = "host-wake";
40 };
41};
diff --git a/Documentation/devicetree/bindings/panel/auo,b133htn01.txt b/Documentation/devicetree/bindings/panel/auo,b133htn01.txt
new file mode 100644
index 000000000000..302226b5bb55
--- /dev/null
+++ b/Documentation/devicetree/bindings/panel/auo,b133htn01.txt
@@ -0,0 +1,7 @@
1AU Optronics Corporation 13.3" FHD (1920x1080) color TFT-LCD panel
2
3Required properties:
4- compatible: should be "auo,b133htn01"
5
6This binding is compatible with the simple-panel binding, which is specified
7in simple-panel.txt in this directory.
diff --git a/Documentation/devicetree/bindings/panel/foxlink,fl500wvr00-a0t.txt b/Documentation/devicetree/bindings/panel/foxlink,fl500wvr00-a0t.txt
new file mode 100644
index 000000000000..b47f9d87bc19
--- /dev/null
+++ b/Documentation/devicetree/bindings/panel/foxlink,fl500wvr00-a0t.txt
@@ -0,0 +1,7 @@
1Foxlink Group 5" WVGA TFT LCD panel
2
3Required properties:
4- compatible: should be "foxlink,fl500wvr00-a0t"
5
6This binding is compatible with the simple-panel binding, which is specified
7in simple-panel.txt in this directory.
diff --git a/Documentation/devicetree/bindings/panel/innolux,n116bge.txt b/Documentation/devicetree/bindings/panel/innolux,n116bge.txt
new file mode 100644
index 000000000000..081bb939ed31
--- /dev/null
+++ b/Documentation/devicetree/bindings/panel/innolux,n116bge.txt
@@ -0,0 +1,7 @@
1Innolux Corporation 11.6" WXGA (1366x768) TFT LCD panel
2
3Required properties:
4- compatible: should be "innolux,n116bge"
5
6This binding is compatible with the simple-panel binding, which is specified
7in simple-panel.txt in this directory.
diff --git a/Documentation/devicetree/bindings/panel/innolux,n156bge-l21.txt b/Documentation/devicetree/bindings/panel/innolux,n156bge-l21.txt
new file mode 100644
index 000000000000..7825844aafdf
--- /dev/null
+++ b/Documentation/devicetree/bindings/panel/innolux,n156bge-l21.txt
@@ -0,0 +1,7 @@
1InnoLux 15.6" WXGA TFT LCD panel
2
3Required properties:
4- compatible: should be "innolux,n156bge-l21"
5
6This binding is compatible with the simple-panel binding, which is specified
7in simple-panel.txt in this directory.
diff --git a/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt b/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt
index c300391e8d3e..0823362548dc 100644
--- a/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt
+++ b/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt
@@ -14,9 +14,6 @@ Required properties:
14- interrupt-names: Must include the following entries: 14- interrupt-names: Must include the following entries:
15 "intr": The Tegra interrupt that is asserted for controller interrupts 15 "intr": The Tegra interrupt that is asserted for controller interrupts
16 "msi": The Tegra interrupt that is asserted when an MSI is received 16 "msi": The Tegra interrupt that is asserted when an MSI is received
17- pex-clk-supply: Supply voltage for internal reference clock
18- vdd-supply: Power supply for controller (1.05V)
19- avdd-supply: Power supply for controller (1.05V) (not required for Tegra20)
20- bus-range: Range of bus numbers associated with this controller 17- bus-range: Range of bus numbers associated with this controller
21- #address-cells: Address representation for root ports (must be 3) 18- #address-cells: Address representation for root ports (must be 3)
22 - cell 0 specifies the bus and device numbers of the root port: 19 - cell 0 specifies the bus and device numbers of the root port:
@@ -60,6 +57,33 @@ Required properties:
60 - afi 57 - afi
61 - pcie_x 58 - pcie_x
62 59
60Power supplies for Tegra20:
61- avdd-pex-supply: Power supply for analog PCIe logic. Must supply 1.05 V.
62- vdd-pex-supply: Power supply for digital PCIe I/O. Must supply 1.05 V.
63- avdd-pex-pll-supply: Power supply for dedicated (internal) PCIe PLL. Must
64 supply 1.05 V.
65- avdd-plle-supply: Power supply for PLLE, which is shared with SATA. Must
66 supply 1.05 V.
67- vddio-pex-clk-supply: Power supply for PCIe clock. Must supply 3.3 V.
68
69Power supplies for Tegra30:
70- Required:
71 - avdd-pex-pll-supply: Power supply for dedicated (internal) PCIe PLL. Must
72 supply 1.05 V.
73 - avdd-plle-supply: Power supply for PLLE, which is shared with SATA. Must
74 supply 1.05 V.
75 - vddio-pex-ctl-supply: Power supply for PCIe control I/O partition. Must
76 supply 1.8 V.
77 - hvdd-pex-supply: High-voltage supply for PCIe I/O and PCIe output clocks.
78 Must supply 3.3 V.
79- Optional:
80 - If lanes 0 to 3 are used:
81 - avdd-pexa-supply: Power supply for analog PCIe logic. Must supply 1.05 V.
82 - vdd-pexa-supply: Power supply for digital PCIe I/O. Must supply 1.05 V.
83 - If lanes 4 or 5 are used:
84 - avdd-pexb-supply: Power supply for analog PCIe logic. Must supply 1.05 V.
85 - vdd-pexb-supply: Power supply for digital PCIe I/O. Must supply 1.05 V.
86
63Root ports are defined as subnodes of the PCIe controller node. 87Root ports are defined as subnodes of the PCIe controller node.
64 88
65Required properties: 89Required properties:
diff --git a/Documentation/devicetree/bindings/pci/spear13xx-pcie.txt b/Documentation/devicetree/bindings/pci/spear13xx-pcie.txt
new file mode 100644
index 000000000000..49ea76da7718
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/spear13xx-pcie.txt
@@ -0,0 +1,14 @@
1SPEAr13XX PCIe DT detail:
2================================
3
4SPEAr13XX uses synopsis designware PCIe controller and ST MiPHY as phy
5controller.
6
7Required properties:
8- compatible : should be "st,spear1340-pcie", "snps,dw-pcie".
9- phys : phandle to phy node associated with pcie controller
10- phy-names : must be "pcie-phy"
11- All other definitions as per generic PCI bindings
12
13 Optional properties:
14- st,pcie-is-gen1 indicates that forced gen1 initialization is needed.
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..7a6feea2a48b 100644
--- a/Documentation/devicetree/bindings/phy/samsung-phy.txt
+++ b/Documentation/devicetree/bindings/phy/samsung-phy.txt
@@ -26,9 +26,11 @@ 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"
33 - "samsung,s5pv210-usb2-phy"
32- reg : a list of registers used by phy driver 34- reg : a list of registers used by phy driver
33 - first and obligatory is the location of phy modules registers 35 - first and obligatory is the location of phy modules registers
34- samsung,sysreg-phandle - handle to syscon used to control the system registers 36- samsung,sysreg-phandle - handle to syscon used to control the system registers
@@ -46,6 +48,7 @@ and Exynos 4212) it is as follows:
46 1 - USB host ("host"), 48 1 - USB host ("host"),
47 2 - HSIC0 ("hsic0"), 49 2 - HSIC0 ("hsic0"),
48 3 - HSIC1 ("hsic1"), 50 3 - HSIC1 ("hsic1"),
51Exynos3250 has only USB device phy available as phy 0.
49 52
50Exynos 4210 and Exynos 4212 use mode switching and require that mode switch 53Exynos 4210 and Exynos 4212 use mode switching and require that mode switch
51register is supplied. 54register is supplied.
diff --git a/Documentation/devicetree/bindings/phy/st-spear-miphy.txt b/Documentation/devicetree/bindings/phy/st-spear-miphy.txt
new file mode 100644
index 000000000000..2a6bfdcc09b3
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/st-spear-miphy.txt
@@ -0,0 +1,15 @@
1ST SPEAr miphy DT details
2=========================
3
4ST Microelectronics SPEAr miphy is a phy controller supporting PCIe and SATA.
5
6Required properties:
7- compatible : should be "st,spear1310-miphy" or "st,spear1340-miphy"
8- reg : offset and length of the PHY register set.
9- misc: phandle for the syscon node to access misc registers
10- #phy-cells : from the generic PHY bindings, must be 1.
11 - cell[1]: 0 if phy used for SATA, 1 for PCIe.
12
13Optional properties:
14- phy-id: Instance id of the phy. Only required when there are multiple phys
15 present on a implementation.
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/pinctrl/allwinner,sunxi-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt
index d8d065608ec0..93ce12eb422a 100644
--- a/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt
@@ -13,6 +13,8 @@ Required properties:
13 "allwinner,sun6i-a31-pinctrl" 13 "allwinner,sun6i-a31-pinctrl"
14 "allwinner,sun6i-a31-r-pinctrl" 14 "allwinner,sun6i-a31-r-pinctrl"
15 "allwinner,sun7i-a20-pinctrl" 15 "allwinner,sun7i-a20-pinctrl"
16 "allwinner,sun8i-a23-pinctrl"
17 "allwinner,sun8i-a23-r-pinctrl"
16- reg: Should contain the register physical address and length for the 18- reg: Should contain the register physical address and length for the
17 pin controller. 19 pin controller.
18 20
diff --git a/Documentation/devicetree/bindings/pinctrl/nvidia,tegra124-xusb-padctl.txt b/Documentation/devicetree/bindings/pinctrl/nvidia,tegra124-xusb-padctl.txt
new file mode 100644
index 000000000000..2f9c0bd66457
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/nvidia,tegra124-xusb-padctl.txt
@@ -0,0 +1,127 @@
1Device tree binding for NVIDIA Tegra XUSB pad controller
2========================================================
3
4The Tegra XUSB pad controller manages a set of lanes, each of which can be
5assigned to one out of a set of different pads. Some of these pads have an
6associated PHY that must be powered up before the pad can be used.
7
8This document defines the device-specific binding for the XUSB pad controller.
9
10Refer to pinctrl-bindings.txt in this directory for generic information about
11pin controller device tree bindings and ../phy/phy-bindings.txt for details on
12how to describe and reference PHYs in device trees.
13
14Required properties:
15--------------------
16- compatible: should be "nvidia,tegra124-xusb-padctl"
17- reg: Physical base address and length of the controller's registers.
18- resets: Must contain an entry for each entry in reset-names.
19 See ../reset/reset.txt for details.
20- reset-names: Must include the following entries:
21 - padctl
22- #phy-cells: Should be 1. The specifier is the index of the PHY to reference.
23 See <dt-bindings/pinctrl/pinctrl-tegra-xusb.h> for the list of valid values.
24
25Lane muxing:
26------------
27
28Child nodes contain the pinmux configurations following the conventions from
29the pinctrl-bindings.txt document. Typically a single, static configuration is
30given and applied at boot time.
31
32Each subnode describes groups of lanes along with parameters and pads that
33they should be assigned to. The name of these subnodes is not important. All
34subnodes should be parsed solely based on their content.
35
36Each subnode only applies the parameters that are explicitly listed. In other
37words, if a subnode that lists a function but no pin configuration parameters
38implies no information about any pin configuration parameters. Similarly, a
39subnode that describes only an IDDQ parameter implies no information about
40what function the pins are assigned to. For this reason even seemingly boolean
41values are actually tristates in this binding: unspecified, off or on.
42Unspecified is represented as an absent property, and off/on are represented
43as integer values 0 and 1.
44
45Required properties:
46- nvidia,lanes: An array of strings. Each string is the name of a lane.
47
48Optional properties:
49- nvidia,function: A string that is the name of the function (pad) that the
50 pin or group should be assigned to. Valid values for function names are
51 listed below.
52- nvidia,iddq: Enables IDDQ mode of the lane. (0: no, 1: yes)
53
54Note that not all of these properties are valid for all lanes. Lanes can be
55divided into three groups:
56
57 - otg-0, otg-1, otg-2:
58
59 Valid functions for this group are: "snps", "xusb", "uart", "rsvd".
60
61 The nvidia,iddq property does not apply to this group.
62
63 - ulpi-0, hsic-0, hsic-1:
64
65 Valid functions for this group are: "snps", "xusb".
66
67 The nvidia,iddq property does not apply to this group.
68
69 - pcie-0, pcie-1, pcie-2, pcie-3, pcie-4, sata-0:
70
71 Valid functions for this group are: "pcie", "usb3", "sata", "rsvd".
72
73
74Example:
75========
76
77SoC file extract:
78-----------------
79
80 padctl@0,7009f000 {
81 compatible = "nvidia,tegra124-xusb-padctl";
82 reg = <0x0 0x7009f000 0x0 0x1000>;
83 resets = <&tegra_car 142>;
84 reset-names = "padctl";
85
86 #phy-cells = <1>;
87 };
88
89Board file extract:
90-------------------
91
92 pcie-controller@0,01003000 {
93 ...
94
95 phys = <&padctl 0>;
96 phy-names = "pcie";
97
98 ...
99 };
100
101 ...
102
103 padctl: padctl@0,7009f000 {
104 pinctrl-0 = <&padctl_default>;
105 pinctrl-names = "default";
106
107 padctl_default: pinmux {
108 usb3 {
109 nvidia,lanes = "pcie-0", "pcie-1";
110 nvidia,function = "usb3";
111 nvidia,iddq = <0>;
112 };
113
114 pcie {
115 nvidia,lanes = "pcie-2", "pcie-3",
116 "pcie-4";
117 nvidia,function = "pcie";
118 nvidia,iddq = <0>;
119 };
120
121 sata {
122 nvidia,lanes = "sata-0";
123 nvidia,function = "sata";
124 nvidia,iddq = <0>;
125 };
126 };
127 };
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,apq8064-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/qcom,apq8064-pinctrl.txt
index 7181f925acaa..0211c6d8a522 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,apq8064-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,apq8064-pinctrl.txt
@@ -46,7 +46,7 @@ Valid values for pins are:
46 gpio0-gpio89 46 gpio0-gpio89
47 47
48Valid values for function are: 48Valid values for function are:
49 cam_mclk, codec_mic_i2s, codec_spkr_i2s, gsbi1, gsbi2, gsbi3, gsbi4, 49 cam_mclk, codec_mic_i2s, codec_spkr_i2s, gpio, gsbi1, gsbi2, gsbi3, gsbi4,
50 gsbi4_cam_i2c, gsbi5, gsbi5_spi_cs1, gsbi5_spi_cs2, gsbi5_spi_cs3, gsbi6, 50 gsbi4_cam_i2c, gsbi5, gsbi5_spi_cs1, gsbi5_spi_cs2, gsbi5_spi_cs3, gsbi6,
51 gsbi6_spi_cs1, gsbi6_spi_cs2, gsbi6_spi_cs3, gsbi7, gsbi7_spi_cs1, 51 gsbi6_spi_cs1, gsbi6_spi_cs2, gsbi6_spi_cs3, gsbi7, gsbi7_spi_cs1,
52 gsbi7_spi_cs2, gsbi7_spi_cs3, gsbi_cam_i2c, hdmi, mi2s, riva_bt, riva_fm, 52 gsbi7_spi_cs2, gsbi7_spi_cs3, gsbi_cam_i2c, hdmi, mi2s, riva_bt, riva_fm,
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,ipq8064-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/qcom,ipq8064-pinctrl.txt
index e0d35a40981b..e33e4dcdce79 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,ipq8064-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,ipq8064-pinctrl.txt
@@ -51,7 +51,7 @@ Valid values for qcom,pins are:
51 51
52 52
53Valid values for function are: 53Valid values for function are:
54 mdio, mi2s, pdm, ssbi, spmi, audio_pcm, gsbi1, gsbi2, gsbi4, gsbi5, 54 mdio, mi2s, pdm, ssbi, spmi, audio_pcm, gpio, gsbi1, gsbi2, gsbi4, gsbi5,
55 gsbi5_spi_cs1, gsbi5_spi_cs2, gsbi5_spi_cs3, gsbi6, gsbi7, nss_spi, sdc1, 55 gsbi5_spi_cs1, gsbi5_spi_cs2, gsbi5_spi_cs3, gsbi6, gsbi7, nss_spi, sdc1,
56 spdif, nand, tsif1, tsif2, usb_fs_n, usb_fs, usb2_hsic, rgmii2, sata, 56 spdif, nand, tsif1, tsif2, usb_fs_n, usb_fs, usb2_hsic, rgmii2, sata,
57 pcie1_rst, pcie1_prsnt, pcie1_pwren_n, pcie1_pwren, pcie1_pwrflt, 57 pcie1_rst, pcie1_prsnt, pcie1_pwren_n, pcie1_pwren, pcie1_pwrflt,
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,msm8960-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/qcom,msm8960-pinctrl.txt
new file mode 100644
index 000000000000..93b7de91b9f6
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,msm8960-pinctrl.txt
@@ -0,0 +1,181 @@
1Qualcomm MSM8960 TLMM block
2
3This binding describes the Top Level Mode Multiplexer block found in the
4MSM8960 platform.
5
6- compatible:
7 Usage: required
8 Value type: <string>
9 Definition: must be "qcom,msm8960-pinctrl"
10
11- reg:
12 Usage: required
13 Value type: <prop-encoded-array>
14 Definition: the base address and size of the TLMM register space.
15
16- interrupts:
17 Usage: required
18 Value type: <prop-encoded-array>
19 Definition: should specify the TLMM summary IRQ.
20
21- interrupt-controller:
22 Usage: required
23 Value type: <none>
24 Definition: identifies this node as an interrupt controller
25
26- #interrupt-cells:
27 Usage: required
28 Value type: <u32>
29 Definition: must be 2. Specifying the pin number and flags, as defined
30 in <dt-bindings/interrupt-controller/irq.h>
31
32- gpio-controller:
33 Usage: required
34 Value type: <none>
35 Definition: identifies this node as a gpio controller
36
37- #gpio-cells:
38 Usage: required
39 Value type: <u32>
40 Definition: must be 2. Specifying the pin number and flags, as defined
41 in <dt-bindings/gpio/gpio.h>
42
43Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
44a general description of GPIO and interrupt bindings.
45
46Please refer to pinctrl-bindings.txt in this directory for details of the
47common pinctrl bindings used by client devices, including the meaning of the
48phrase "pin configuration node".
49
50The pin configuration nodes act as a container for an abitrary number of
51subnodes. Each of these subnodes represents some desired configuration for a
52pin, a group, or a list of pins or groups. This configuration can include the
53mux function to select on those pin(s)/group(s), and various pin configuration
54parameters, such as pull-up, drive strength, etc.
55
56
57PIN CONFIGURATION NODES:
58
59The name of each subnode is not important; all subnodes should be enumerated
60and processed purely based on their content.
61
62Each subnode only affects those parameters that are explicitly listed. In
63other words, a subnode that lists a mux function but no pin configuration
64parameters implies no information about any pin configuration parameters.
65Similarly, a pin subnode that describes a pullup parameter implies no
66information about e.g. the mux function.
67
68
69The following generic properties as defined in pinctrl-bindings.txt are valid
70to specify in a pin configuration subnode:
71
72- pins:
73 Usage: required
74 Value type: <string-array>
75 Definition: List of gpio pins affected by the properties specified in
76 this subnode. Valid pins are:
77 gpio0-gpio151,
78 sdc1_clk,
79 sdc1_cmd,
80 sdc1_data
81 sdc3_clk,
82 sdc3_cmd,
83 sdc3_data
84
85- function:
86 Usage: required
87 Value type: <string>
88 Definition: Specify the alternative function to be configured for the
89 specified pins. Functions are only valid for gpio pins.
90 Valid values are:
91 audio_pcm, bt, cam_mclk0, cam_mclk1, cam_mclk2,
92 codec_mic_i2s, codec_spkr_i2s, ext_gps, fm, gps_blanking,
93 gps_pps_in, gps_pps_out, gp_clk_0a, gp_clk_0b, gp_clk_1a,
94 gp_clk_1b, gp_clk_2a, gp_clk_2b, gp_mn, gp_pdm_0a,
95 gp_pdm_0b, gp_pdm_1a, gp_pdm_1b, gp_pdm_2a, gp_pdm_2b, gpio,
96 gsbi1, gsbi1_spi_cs1_n, gsbi1_spi_cs2a_n, gsbi1_spi_cs2b_n,
97 gsbi1_spi_cs3_n, gsbi2, gsbi2_spi_cs1_n, gsbi2_spi_cs2_n,
98 gsbi2_spi_cs3_n, gsbi3, gsbi4, gsbi4_3d_cam_i2c_l,
99 gsbi4_3d_cam_i2c_r, gsbi5, gsbi5_3d_cam_i2c_l,
100 gsbi5_3d_cam_i2c_r, gsbi6, gsbi7, gsbi8, gsbi9, gsbi10,
101 gsbi11, gsbi11_spi_cs1a_n, gsbi11_spi_cs1b_n,
102 gsbi11_spi_cs2a_n, gsbi11_spi_cs2b_n, gsbi11_spi_cs3_n,
103 gsbi12, hdmi_cec, hdmi_ddc_clock, hdmi_ddc_data,
104 hdmi_hot_plug_detect, hsic, mdp_vsync, mi2s, mic_i2s,
105 pmb_clk, pmb_ext_ctrl, ps_hold, rpm_wdog, sdc2, sdc4, sdc5,
106 slimbus1, slimbus2, spkr_i2s, ssbi1, ssbi2, ssbi_ext_gps,
107 ssbi_pmic2, ssbi_qpa1, ssbi_ts, tsif1, tsif2, ts_eoc,
108 usb_fs1, usb_fs1_oe, usb_fs1_oe_n, usb_fs2, usb_fs2_oe,
109 usb_fs2_oe_n, vfe_camif_timer1_a, vfe_camif_timer1_b,
110 vfe_camif_timer2, vfe_camif_timer3_a, vfe_camif_timer3_b,
111 vfe_camif_timer4_a, vfe_camif_timer4_b, vfe_camif_timer4_c,
112 vfe_camif_timer5_a, vfe_camif_timer5_b, vfe_camif_timer6_a,
113 vfe_camif_timer6_b, vfe_camif_timer6_c, vfe_camif_timer7_a,
114 vfe_camif_timer7_b, vfe_camif_timer7_c, wlan
115
116- bias-disable:
117 Usage: optional
118 Value type: <none>
119 Definition: The specified pins should be configued as no pull.
120
121- bias-pull-down:
122 Usage: optional
123 Value type: <none>
124 Definition: The specified pins should be configued as pull down.
125
126- bias-pull-up:
127 Usage: optional
128 Value type: <none>
129 Definition: The specified pins should be configued as pull up.
130
131- output-high:
132 Usage: optional
133 Value type: <none>
134 Definition: The specified pins are configured in output mode, driven
135 high.
136 Not valid for sdc pins.
137
138- output-low:
139 Usage: optional
140 Value type: <none>
141 Definition: The specified pins are configured in output mode, driven
142 low.
143 Not valid for sdc pins.
144
145- drive-strength:
146 Usage: optional
147 Value type: <u32>
148 Definition: Selects the drive strength for the specified pins, in mA.
149 Valid values are: 2, 4, 6, 8, 10, 12, 14 and 16
150
151Example:
152
153 msmgpio: pinctrl@800000 {
154 compatible = "qcom,msm8960-pinctrl";
155 reg = <0x800000 0x4000>;
156
157 gpio-controller;
158 #gpio-cells = <2>;
159 interrupt-controller;
160 #interrupt-cells = <2>;
161 interrupts = <0 16 0x4>;
162
163 gsbi8_uart: gsbi8-uart {
164 mux {
165 pins = "gpio34", "gpio35";
166 function = "gsbi8";
167 };
168
169 tx {
170 pins = "gpio34";
171 drive-strength = <4>;
172 bias-disable;
173 };
174
175 rx {
176 pins = "gpio35";
177 drive-strength = <2>;
178 bias-pull-up;
179 };
180 };
181 };
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,msm8974-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/qcom,msm8974-pinctrl.txt
index 73262b575dfc..d2ea80dc43eb 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,msm8974-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,msm8974-pinctrl.txt
@@ -70,7 +70,7 @@ Valid values for function are:
70 cam_mckl0, cam_mclk1, cam_mclk2, cam_mclk3, mdp_vsync, hdmi_cec, hdmi_ddc, 70 cam_mckl0, cam_mclk1, cam_mclk2, cam_mclk3, mdp_vsync, hdmi_cec, hdmi_ddc,
71 hdmi_hpd, edp_hpd, gp_pdm0, gp_pdm1, gp_pdm2, gp_pdm3, gp0_clk, gp1_clk, 71 hdmi_hpd, edp_hpd, gp_pdm0, gp_pdm1, gp_pdm2, gp_pdm3, gp0_clk, gp1_clk,
72 gp_mn, tsif1, tsif2, hsic, grfc, audio_ref_clk, qua_mi2s, pri_mi2s, spkr_mi2s, 72 gp_mn, tsif1, tsif2, hsic, grfc, audio_ref_clk, qua_mi2s, pri_mi2s, spkr_mi2s,
73 ter_mi2s, sec_mi2s, bt, fm, wlan, slimbus 73 ter_mi2s, sec_mi2s, bt, fm, wlan, slimbus, gpio
74 74
75 (Note that this is not yet the complete list of functions) 75 (Note that this is not yet the complete list of functions)
76 76
diff --git a/Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt
index 35d2e1f186f0..daef6fad6a5f 100644
--- a/Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt
@@ -15,6 +15,7 @@ Required Properties:
15 - "renesas,pfc-r8a7778": for R8A7778 (R-Mobile M1) compatible pin-controller. 15 - "renesas,pfc-r8a7778": for R8A7778 (R-Mobile M1) compatible pin-controller.
16 - "renesas,pfc-r8a7779": for R8A7779 (R-Car H1) compatible pin-controller. 16 - "renesas,pfc-r8a7779": for R8A7779 (R-Car H1) compatible pin-controller.
17 - "renesas,pfc-r8a7790": for R8A7790 (R-Car H2) compatible pin-controller. 17 - "renesas,pfc-r8a7790": for R8A7790 (R-Car H2) compatible pin-controller.
18 - "renesas,pfc-r8a7791": for R8A7791 (R-Car M2) compatible pin-controller.
18 - "renesas,pfc-sh7372": for SH7372 (SH-Mobile AP4) compatible pin-controller. 19 - "renesas,pfc-sh7372": for SH7372 (SH-Mobile AP4) compatible pin-controller.
19 - "renesas,pfc-sh73a0": for SH73A0 (SH-Mobile AG5) compatible pin-controller. 20 - "renesas,pfc-sh73a0": for SH73A0 (SH-Mobile AG5) compatible pin-controller.
20 21
diff --git a/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt
index cefef741a40b..4658b69d4f4d 100644
--- a/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt
@@ -21,6 +21,7 @@ defined as gpio sub-nodes of the pinmux controller.
21Required properties for iomux controller: 21Required properties for iomux controller:
22 - compatible: one of "rockchip,rk2928-pinctrl", "rockchip,rk3066a-pinctrl" 22 - compatible: one of "rockchip,rk2928-pinctrl", "rockchip,rk3066a-pinctrl"
23 "rockchip,rk3066b-pinctrl", "rockchip,rk3188-pinctrl" 23 "rockchip,rk3066b-pinctrl", "rockchip,rk3188-pinctrl"
24 "rockchip,rk3288-pinctrl"
24 - rockchip,grf: phandle referencing a syscon providing the 25 - rockchip,grf: phandle referencing a syscon providing the
25 "general register files" 26 "general register files"
26 27
@@ -36,7 +37,7 @@ Deprecated properties for iomux controller:
36 Use rockchip,grf and rockchip,pmu described above instead. 37 Use rockchip,grf and rockchip,pmu described above instead.
37 38
38Required properties for gpio sub nodes: 39Required properties for gpio sub nodes:
39 - compatible: "rockchip,gpio-bank", "rockchip,rk3188-gpio-bank0" 40 - compatible: "rockchip,gpio-bank"
40 - reg: register of the gpio bank (different than the iomux registerset) 41 - reg: register of the gpio bank (different than the iomux registerset)
41 - interrupts: base interrupt of the gpio bank in the interrupt controller 42 - interrupts: base interrupt of the gpio bank in the interrupt controller
42 - clocks: clock that drives this bank 43 - clocks: clock that drives this bank
@@ -50,6 +51,7 @@ Required properties for gpio sub nodes:
50 bindings/interrupt-controller/interrupts.txt 51 bindings/interrupt-controller/interrupts.txt
51 52
52Deprecated properties for gpio sub nodes: 53Deprecated properties for gpio sub nodes:
54 - compatible: "rockchip,rk3188-gpio-bank0"
53 - reg: second element: separate pull register for rk3188 bank0, use 55 - reg: second element: separate pull register for rk3188 bank0, use
54 rockchip,pmu described above instead 56 rockchip,pmu described above instead
55 57
diff --git a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
index 2b32783ba821..e82aaf492517 100644
--- a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
@@ -44,7 +44,11 @@ Required Properties:
44- Pin mux/config groups as child nodes: The pin mux (selecting pin function 44- Pin mux/config groups as child nodes: The pin mux (selecting pin function
45 mode) and pin config (pull up/down, driver strength) settings are represented 45 mode) and pin config (pull up/down, driver strength) settings are represented
46 as child nodes of the pin-controller node. There should be atleast one 46 as child nodes of the pin-controller node. There should be atleast one
47 child node and there is no limit on the count of these child nodes. 47 child node and there is no limit on the count of these child nodes. It is
48 also possible for a child node to consist of several further child nodes
49 to allow grouping multiple pinctrl groups into one. The format of second
50 level child nodes is exactly the same as for first level ones and is
51 described below.
48 52
49 The child node should contain a list of pin(s) on which a particular pin 53 The child node should contain a list of pin(s) on which a particular pin
50 function selection or pin configuration (or both) have to applied. This 54 function selection or pin configuration (or both) have to applied. This
@@ -71,6 +75,7 @@ Required Properties:
71 "samsung,pins" property of the child node. The following pin configuration 75 "samsung,pins" property of the child node. The following pin configuration
72 properties are supported. 76 properties are supported.
73 77
78 - samsung,pin-val: Initial value of pin output buffer.
74 - samsung,pin-pud: Pull up/down configuration. 79 - samsung,pin-pud: Pull up/down configuration.
75 - samsung,pin-drv: Drive strength configuration. 80 - samsung,pin-drv: Drive strength configuration.
76 - samsung,pin-pud-pdn: Pull up/down configuration in power down mode. 81 - samsung,pin-pud-pdn: Pull up/down configuration in power down mode.
@@ -249,6 +254,23 @@ Example 1: A pin-controller node with pin groups.
249 samsung,pin-pud = <3>; 254 samsung,pin-pud = <3>;
250 samsung,pin-drv = <0>; 255 samsung,pin-drv = <0>;
251 }; 256 };
257
258 sd4_bus8: sd4-bus-width8 {
259 part-1 {
260 samsung,pins = "gpk0-3", "gpk0-4",
261 "gpk0-5", "gpk0-6";
262 samsung,pin-function = <3>;
263 samsung,pin-pud = <3>;
264 samsung,pin-drv = <3>;
265 };
266 part-2 {
267 samsung,pins = "gpk1-3", "gpk1-4",
268 "gpk1-5", "gpk1-6";
269 samsung,pin-function = <4>;
270 samsung,pin-pud = <4>;
271 samsung,pin-drv = <3>;
272 };
273 };
252 }; 274 };
253 275
254Example 2: A pin-controller node with external wakeup interrupt controller node. 276Example 2: A pin-controller node with external wakeup interrupt controller node.
diff --git a/Documentation/devicetree/bindings/power/rx51-battery.txt b/Documentation/devicetree/bindings/power/rx51-battery.txt
new file mode 100644
index 000000000000..90438453db58
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/rx51-battery.txt
@@ -0,0 +1,25 @@
1Binding for Nokia N900 battery
2
3The Nokia N900 battery status can be read via the TWL4030's A/D converter.
4
5Required properties:
6- compatible: Should contain one of the following:
7 * "nokia,n900-battery"
8- io-channels: Should contain IIO channel specifiers
9 for each element in io-channel-names.
10- io-channel-names: Should contain the following values:
11 * "temp" - The ADC channel for temperature reading
12 * "bsi" - The ADC channel for battery size identification
13 * "vbat" - The ADC channel to measure the battery voltage
14
15Example from Nokia N900:
16
17battery: n900-battery {
18 compatible = "nokia,n900-battery";
19 io-channels = <&twl4030_madc 0>,
20 <&twl4030_madc 4>,
21 <&twl4030_madc 12>;
22 io-channel-names = "temp",
23 "bsi",
24 "vbat";
25};
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/board.txt b/Documentation/devicetree/bindings/powerpc/fsl/board.txt
index 700dec4774fa..cff38bdbc0e4 100644
--- a/Documentation/devicetree/bindings/powerpc/fsl/board.txt
+++ b/Documentation/devicetree/bindings/powerpc/fsl/board.txt
@@ -84,3 +84,19 @@ Example:
84 compatible = "fsl,bsc9132qds-fpga", "fsl,fpga-qixis-i2c"; 84 compatible = "fsl,bsc9132qds-fpga", "fsl,fpga-qixis-i2c";
85 reg = <0x66>; 85 reg = <0x66>;
86 }; 86 };
87
88* Freescale on-board CPLD
89
90Some Freescale boards like T1040RDB have an on board CPLD connected.
91
92Required properties:
93- compatible: Should be a board-specific string like "fsl,<board>-cpld"
94 Example:
95 "fsl,t1040rdb-cpld", "fsl,t1042rdb-cpld", "fsl,t1042rdb_pi-cpld"
96- reg: should describe CPLD registers
97
98Example:
99 cpld@3,0 {
100 compatible = "fsl,t1040rdb-cpld";
101 reg = <3 0 0x300>;
102 };
diff --git a/Documentation/devicetree/bindings/pwm/pwm-rockchip.txt b/Documentation/devicetree/bindings/pwm/pwm-rockchip.txt
new file mode 100644
index 000000000000..d47d15a6a298
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/pwm-rockchip.txt
@@ -0,0 +1,20 @@
1Rockchip PWM controller
2
3Required properties:
4 - compatible: should be "rockchip,<name>-pwm"
5 "rockchip,rk2928-pwm": found on RK29XX,RK3066 and RK3188 SoCs
6 "rockchip,rk3288-pwm": found on RK3288 SoC
7 "rockchip,vop-pwm": found integrated in VOP on RK3288 SoC
8 - reg: physical base address and length of the controller's registers
9 - clocks: phandle and clock specifier of the PWM reference clock
10 - #pwm-cells: should be 2. See pwm.txt in this directory for a
11 description of the cell format.
12
13Example:
14
15 pwm0: pwm@20030000 {
16 compatible = "rockchip,rk2928-pwm";
17 reg = <0x20030000 0x10>;
18 clocks = <&cru PCLK_PWM01>;
19 #pwm-cells = <2>;
20 };
diff --git a/Documentation/devicetree/bindings/pwm/pwm-st.txt b/Documentation/devicetree/bindings/pwm/pwm-st.txt
new file mode 100644
index 000000000000..84d2fb807d3c
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/pwm-st.txt
@@ -0,0 +1,41 @@
1STMicroelectronics PWM driver bindings
2--------------------------------------
3
4Required parameters:
5- compatible : "st,pwm"
6- #pwm-cells : Number of cells used to specify a PWM. First cell
7 specifies the per-chip index of the PWM to use and the
8 second cell is the period in nanoseconds - fixed to 2
9 for STiH41x.
10- reg : Physical base address and length of the controller's
11 registers.
12- pinctrl-names: Set to "default".
13- pinctrl-0: List of phandles pointing to pin configuration nodes
14 for PWM module.
15 For Pinctrl properties, please refer to [1].
16- clock-names: Set to "pwm".
17- clocks: phandle of the clock used by the PWM module.
18 For Clk properties, please refer to [2].
19
20Optional properties:
21- st,pwm-num-chan: Number of available channels. If not passed, the driver
22 will consider single channel by default.
23
24[1] Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
25[2] Documentation/devicetree/bindings/clock/clock-bindings.txt
26
27Example:
28
29pwm1: pwm@fe510000 {
30 compatible = "st,pwm";
31 reg = <0xfe510000 0x68>;
32 #pwm-cells = <2>;
33 pinctrl-names = "default";
34 pinctrl-0 = <&pinctrl_pwm1_chan0_default
35 &pinctrl_pwm1_chan1_default
36 &pinctrl_pwm1_chan2_default
37 &pinctrl_pwm1_chan3_default>;
38 clocks = <&clk_sysin>;
39 clock-names = "pwm";
40 st,pwm-num-chan = <4>;
41};
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/s5m8767-regulator.txt b/Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt
index d290988ed975..20191315e444 100644
--- a/Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt
@@ -86,7 +86,7 @@ as per the datasheet of s5m8767.
86 86
87 - LDOn 87 - LDOn
88 - valid values for n are 1 to 28 88 - valid values for n are 1 to 28
89 - Example: LDO1, LD02, LDO28 89 - Example: LDO1, LDO2, LDO28
90 - BUCKn 90 - BUCKn
91 - valid values for n are 1 to 9. 91 - valid values for n are 1 to 9.
92 - Example: BUCK1, BUCK2, BUCK9 92 - Example: BUCK1, BUCK2, BUCK9
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/cdns,uart.txt b/Documentation/devicetree/bindings/serial/cdns,uart.txt
new file mode 100644
index 000000000000..a3eb154c32ca
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/cdns,uart.txt
@@ -0,0 +1,20 @@
1Binding for Cadence UART Controller
2
3Required properties:
4- compatible : should be "cdns,uart-r1p8", or "xlnx,xuartps"
5- reg: Should contain UART controller registers location and length.
6- interrupts: Should contain UART controller interrupts.
7- clocks: Must contain phandles to the UART clocks
8 See ../clocks/clock-bindings.txt for details.
9- clock-names: Tuple to identify input clocks, must contain "uart_clk" and "pclk"
10 See ../clocks/clock-bindings.txt for details.
11
12
13Example:
14 uart@e0000000 {
15 compatible = "cdns,uart-r1p8";
16 clocks = <&clkc 23>, <&clkc 40>;
17 clock-names = "uart_clk", "pclk";
18 reg = <0xE0000000 0x1000>;
19 interrupts = <0 27 4>;
20 };
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/renesas,sci-serial.txt b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
index 64fd7dec1bbc..b3556609a06f 100644
--- a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
+++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
@@ -4,6 +4,13 @@ Required properties:
4 4
5 - compatible: Must contain one of the following: 5 - compatible: Must contain one of the following:
6 6
7 - "renesas,scifa-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFA compatible UART.
8 - "renesas,scifb-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFB compatible UART.
9 - "renesas,scifa-r8a73a4" for R8A73A4 (R-Mobile APE6) SCIFA compatible UART.
10 - "renesas,scifb-r8a73a4" for R8A73A4 (R-Mobile APE6) SCIFB compatible UART.
11 - "renesas,scifa-r8a7740" for R8A7740 (R-Mobile A1) SCIFA compatible UART.
12 - "renesas,scifb-r8a7740" for R8A7740 (R-Mobile A1) SCIFB compatible UART.
13 - "renesas,scif-r8a7778" for R8A7778 (R-Car M1) SCIF compatible UART.
7 - "renesas,scif-r8a7779" for R8A7779 (R-Car H1) SCIF compatible UART. 14 - "renesas,scif-r8a7779" for R8A7779 (R-Car H1) SCIF compatible UART.
8 - "renesas,scif-r8a7790" for R8A7790 (R-Car H2) SCIF compatible UART. 15 - "renesas,scif-r8a7790" for R8A7790 (R-Car H2) SCIF compatible UART.
9 - "renesas,scifa-r8a7790" for R8A7790 (R-Car H2) SCIFA compatible UART. 16 - "renesas,scifa-r8a7790" for R8A7790 (R-Car H2) SCIFA compatible UART.
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/sound/ak5386.txt b/Documentation/devicetree/bindings/sound/ak5386.txt
index dc3914fe6ce8..ec3df3abba0c 100644
--- a/Documentation/devicetree/bindings/sound/ak5386.txt
+++ b/Documentation/devicetree/bindings/sound/ak5386.txt
@@ -10,10 +10,14 @@ Optional properties:
10 10
11 - reset-gpio : a GPIO spec for the reset/power down pin. 11 - reset-gpio : a GPIO spec for the reset/power down pin.
12 If specified, it will be deasserted at probe time. 12 If specified, it will be deasserted at probe time.
13 - va-supply : a regulator spec, providing 5.0V
14 - vd-supply : a regulator spec, providing 3.3V
13 15
14Example: 16Example:
15 17
16spdif: ak5386@0 { 18spdif: ak5386@0 {
17 compatible = "asahi-kasei,ak5386"; 19 compatible = "asahi-kasei,ak5386";
18 reset-gpio = <&gpio0 23>; 20 reset-gpio = <&gpio0 23>;
21 va-supply = <&vdd_5v0_reg>;
22 vd-supply = <&vdd_3v3_reg>;
19}; 23};
diff --git a/Documentation/devicetree/bindings/sound/cs4265.txt b/Documentation/devicetree/bindings/sound/cs4265.txt
new file mode 100644
index 000000000000..380fff8e4e83
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/cs4265.txt
@@ -0,0 +1,29 @@
1CS4265 audio CODEC
2
3This device supports I2C only.
4
5Required properties:
6
7 - compatible : "cirrus,cs4265"
8
9 - reg : the I2C address of the device for I2C. The I2C address depends on
10 the state of the AD0 pin. If AD0 is high, the i2c address is 0x4f.
11 If it is low, the i2c address is 0x4e.
12
13Optional properties:
14
15 - reset-gpios : a GPIO spec for the reset pin. If specified, it will be
16 deasserted before communication to the codec starts.
17
18Examples:
19
20codec_ad0_high: cs4265@4f { /* AD0 Pin is high */
21 compatible = "cirrus,cs4265";
22 reg = <0x4f>;
23};
24
25
26codec_ad0_low: cs4265@4e { /* AD0 Pin is low */
27 compatible = "cirrus,cs4265";
28 reg = <0x4e>;
29};
diff --git a/Documentation/devicetree/bindings/sound/fsl,asrc.txt b/Documentation/devicetree/bindings/sound/fsl,asrc.txt
new file mode 100644
index 000000000000..b93362a570be
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/fsl,asrc.txt
@@ -0,0 +1,60 @@
1Freescale Asynchronous Sample Rate Converter (ASRC) Controller
2
3The Asynchronous Sample Rate Converter (ASRC) converts the sampling rate of a
4signal associated with an input clock into a signal associated with a different
5output clock. The driver currently works as a Front End of DPCM with other Back
6Ends Audio controller such as ESAI, SSI and SAI. It has three pairs to support
7three substreams within totally 10 channels.
8
9Required properties:
10
11 - compatible : Contains "fsl,imx35-asrc" or "fsl,imx53-asrc".
12
13 - reg : Offset and length of the register set for the device.
14
15 - interrupts : Contains the spdif interrupt.
16
17 - dmas : Generic dma devicetree binding as described in
18 Documentation/devicetree/bindings/dma/dma.txt.
19
20 - dma-names : Contains "rxa", "rxb", "rxc", "txa", "txb" and "txc".
21
22 - clocks : Contains an entry for each entry in clock-names.
23
24 - clock-names : Contains the following entries
25 "mem" Peripheral access clock to access registers.
26 "ipg" Peripheral clock to driver module.
27 "asrck_<0-f>" Clock sources for input and output clock.
28
29 - big-endian : If this property is absent, the little endian mode
30 will be in use as default. Otherwise, the big endian
31 mode will be in use for all the device registers.
32
33 - fsl,asrc-rate : Defines a mutual sample rate used by DPCM Back Ends.
34
35 - fsl,asrc-width : Defines a mutual sample width used by DPCM Back Ends.
36
37Example:
38
39asrc: asrc@02034000 {
40 compatible = "fsl,imx53-asrc";
41 reg = <0x02034000 0x4000>;
42 interrupts = <0 50 IRQ_TYPE_LEVEL_HIGH>;
43 clocks = <&clks 107>, <&clks 107>, <&clks 0>,
44 <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>,
45 <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>,
46 <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>,
47 <&clks 107>, <&clks 0>, <&clks 0>;
48 clock-names = "mem", "ipg", "asrck0",
49 "asrck_1", "asrck_2", "asrck_3", "asrck_4",
50 "asrck_5", "asrck_6", "asrck_7", "asrck_8",
51 "asrck_9", "asrck_a", "asrck_b", "asrck_c",
52 "asrck_d", "asrck_e", "asrck_f";
53 dmas = <&sdma 17 23 1>, <&sdma 18 23 1>, <&sdma 19 23 1>,
54 <&sdma 20 23 1>, <&sdma 21 23 1>, <&sdma 22 23 1>;
55 dma-names = "rxa", "rxb", "rxc",
56 "txa", "txb", "txc";
57 fsl,asrc-rate = <48000>;
58 fsl,asrc-width = <16>;
59 status = "okay";
60};
diff --git a/Documentation/devicetree/bindings/sound/max98090.txt b/Documentation/devicetree/bindings/sound/max98090.txt
index a5e63fa47dc5..c454e67f54bb 100644
--- a/Documentation/devicetree/bindings/sound/max98090.txt
+++ b/Documentation/devicetree/bindings/sound/max98090.txt
@@ -4,7 +4,7 @@ This device supports I2C only.
4 4
5Required properties: 5Required properties:
6 6
7- compatible : "maxim,max98090". 7- compatible : "maxim,max98090" or "maxim,max98091".
8 8
9- reg : The I2C address of the device. 9- reg : The I2C address of the device.
10 10
diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
index 8346cab046cd..aa697abf337e 100644
--- a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
+++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
@@ -13,6 +13,9 @@ Required properties:
13- rcar_sound,src : Should contain SRC feature. 13- rcar_sound,src : Should contain SRC feature.
14 The number of SRC subnode should be same as HW. 14 The number of SRC subnode should be same as HW.
15 see below for detail. 15 see below for detail.
16- rcar_sound,dvc : Should contain DVC feature.
17 The number of DVC subnode should be same as HW.
18 see below for detail.
16- rcar_sound,dai : DAI contents. 19- rcar_sound,dai : DAI contents.
17 The number of DAI subnode should be same as HW. 20 The number of DAI subnode should be same as HW.
18 see below for detail. 21 see below for detail.
@@ -21,6 +24,7 @@ SSI subnode properties:
21- interrupts : Should contain SSI interrupt for PIO transfer 24- interrupts : Should contain SSI interrupt for PIO transfer
22- shared-pin : if shared clock pin 25- shared-pin : if shared clock pin
23- pio-transfer : use PIO transfer mode 26- pio-transfer : use PIO transfer mode
27- no-busif : BUSIF is not ussed when [mem -> SSI] via DMA case
24 28
25SRC subnode properties: 29SRC subnode properties:
26no properties at this point 30no properties at this point
@@ -39,6 +43,11 @@ rcar_sound: rcar_sound@0xffd90000 {
39 <0 0xec540000 0 0x1000>, /* SSIU */ 43 <0 0xec540000 0 0x1000>, /* SSIU */
40 <0 0xec541000 0 0x1280>; /* SSI */ 44 <0 0xec541000 0 0x1280>; /* SSI */
41 45
46 rcar_sound,dvc {
47 dvc0: dvc@0 { };
48 dvc1: dvc@1 { };
49 };
50
42 rcar_sound,src { 51 rcar_sound,src {
43 src0: src@0 { }; 52 src0: src@0 { };
44 src1: src@1 { }; 53 src1: src@1 { };
diff --git a/Documentation/devicetree/bindings/sound/rockchip-i2s.txt b/Documentation/devicetree/bindings/sound/rockchip-i2s.txt
new file mode 100644
index 000000000000..6c55fcfe5e1d
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/rockchip-i2s.txt
@@ -0,0 +1,37 @@
1* Rockchip I2S controller
2
3The I2S bus (Inter-IC sound bus) is a serial link for digital
4audio data transfer between devices in the system.
5
6Required properties:
7
8- compatible: should be one of the followings
9 - "rockchip,rk3066-i2s": for rk3066
10 - "rockchip,rk3188-i2s", "rockchip,rk3066-i2s": for rk3188
11 - "rockchip,rk3288-i2s", "rockchip,rk3066-i2s": for rk3288
12- reg: physical base address of the controller and length of memory mapped
13 region.
14- interrupts: should contain the I2S interrupt.
15- #address-cells: should be 1.
16- #size-cells: should be 0.
17- dmas: DMA specifiers for tx and rx dma. See the DMA client binding,
18 Documentation/devicetree/bindings/dma/dma.txt
19- dma-names: should include "tx" and "rx".
20- clocks: a list of phandle + clock-specifer pairs, one for each entry in clock-names.
21- clock-names: should contain followings:
22 - "i2s_hclk": clock for I2S BUS
23 - "i2s_clk" : clock for I2S controller
24
25Example for rk3288 I2S controller:
26
27i2s@ff890000 {
28 compatible = "rockchip,rk3288-i2s", "rockchip,rk3066-i2s";
29 reg = <0xff890000 0x10000>;
30 interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
31 #address-cells = <1>;
32 #size-cells = <0>;
33 dmas = <&pdma1 0>, <&pdma1 1>;
34 dma-names = "rx", "tx";
35 clock-names = "i2s_hclk", "i2s_clk";
36 clocks = <&cru HCLK_I2S0>, <&cru SCLK_I2S0>;
37};
diff --git a/Documentation/devicetree/bindings/sound/samsung,odroidx2-max98090.txt b/Documentation/devicetree/bindings/sound/samsung,odroidx2-max98090.txt
new file mode 100644
index 000000000000..9148f72319e1
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/samsung,odroidx2-max98090.txt
@@ -0,0 +1,35 @@
1Samsung Exynos Odroid X2/U3 audio complex with MAX98090 codec
2
3Required properties:
4 - compatible : "samsung,odroidx2-audio" - for Odroid X2 board,
5 "samsung,odroidu3-audio" - for Odroid U3 board
6 - samsung,model : the user-visible name of this sound complex
7 - samsung,i2s-controller : the phandle of the I2S controller
8 - samsung,audio-codec : the phandle of the MAX98090 audio codec
9 - samsung,audio-routing : a list of the connections between audio
10 components; each entry is a pair of strings, the first being the
11 connection's sink, the second being the connection's source;
12 valid names for sources and sinks are the MAX98090's pins (as
13 documented in its binding), and the jacks on the board
14 For Odroid X2:
15 * Headphone Jack
16 * Mic Jack
17 * DMIC
18
19 For Odroid U3:
20 * Headphone Jack
21 * Speakers
22
23Example:
24
25sound {
26 compatible = "samsung,odroidu3-audio";
27 samsung,i2s-controller = <&i2s0>;
28 samsung,audio-codec = <&max98090>;
29 samsung,model = "Odroid-X2";
30 samsung,audio-routing =
31 "Headphone Jack", "HPL",
32 "Headphone Jack", "HPR",
33 "IN1", "Mic Jack",
34 "Mic Jack", "MICBIAS";
35};
diff --git a/Documentation/devicetree/bindings/sound/sirf-usp.txt b/Documentation/devicetree/bindings/sound/sirf-usp.txt
new file mode 100644
index 000000000000..02f85b32d359
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/sirf-usp.txt
@@ -0,0 +1,27 @@
1* SiRF SoC USP module
2
3Required properties:
4- compatible: "sirf,prima2-usp-pcm"
5- reg: Base address and size entries:
6- dmas: List of DMA controller phandle and DMA request line ordered pairs.
7- dma-names: Identifier string for each DMA request line in the dmas property.
8 These strings correspond 1:1 with the ordered pairs in dmas.
9
10 One of the DMA channels will be responsible for transmission (should be
11 named "tx") and one for reception (should be named "rx").
12
13- clocks: USP controller clock source
14- pinctrl-names: Must contain a "default" entry.
15- pinctrl-NNN: One property must exist for each entry in pinctrl-names.
16
17Example:
18usp0: usp@b0080000 {
19 compatible = "sirf,prima2-usp-pcm";
20 reg = <0xb0080000 0x10000>;
21 clocks = <&clks 28>;
22 dmas = <&dmac1 1>, <&dmac1 2>;
23 dma-names = "rx", "tx";
24 pinctrl-names = "default";
25 pinctrl-0 = <&usp0_only_utfs_pins_a>;
26};
27
diff --git a/Documentation/devicetree/bindings/sound/snow.txt b/Documentation/devicetree/bindings/sound/snow.txt
index 678b191c37b8..6df74f15687f 100644
--- a/Documentation/devicetree/bindings/sound/snow.txt
+++ b/Documentation/devicetree/bindings/sound/snow.txt
@@ -3,15 +3,20 @@ Audio Binding for Snow boards
3Required properties: 3Required properties:
4- compatible : Can be one of the following, 4- compatible : Can be one of the following,
5 "google,snow-audio-max98090" or 5 "google,snow-audio-max98090" or
6 "google,snow-audio-max98091" or
6 "google,snow-audio-max98095" 7 "google,snow-audio-max98095"
7- samsung,i2s-controller: The phandle of the Samsung I2S controller 8- samsung,i2s-controller: The phandle of the Samsung I2S controller
8- samsung,audio-codec: The phandle of the audio codec 9- samsung,audio-codec: The phandle of the audio codec
9 10
11Optional:
12- samsung,model: The name of the sound-card
13
10Example: 14Example:
11 15
12sound { 16sound {
13 compatible = "google,snow-audio-max98095"; 17 compatible = "google,snow-audio-max98095";
14 18
19 samsung,model = "Snow-I2S-MAX98095";
15 samsung,i2s-controller = <&i2s0>; 20 samsung,i2s-controller = <&i2s0>;
16 samsung,audio-codec = <&max98095>; 21 samsung,audio-codec = <&max98095>;
17}; 22};
diff --git a/Documentation/devicetree/bindings/sound/tas2552.txt b/Documentation/devicetree/bindings/sound/tas2552.txt
new file mode 100644
index 000000000000..55e2a0af5645
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/tas2552.txt
@@ -0,0 +1,26 @@
1Texas Instruments - tas2552 Codec module
2
3The tas2552 serial control bus communicates through I2C protocols
4
5Required properties:
6 - compatible - One of:
7 "ti,tas2552" - TAS2552
8 - reg - I2C slave address
9 - supply-*: Required supply regulators are:
10 "vbat" battery voltage
11 "iovdd" I/O Voltage
12 "avdd" Analog DAC Voltage
13
14Optional properties:
15 - enable-gpio - gpio pin to enable/disable the device
16
17Example:
18
19tas2552: tas2552@41 {
20 compatible = "ti,tas2552";
21 reg = <0x41>;
22 enable-gpio = <&gpio4 2 GPIO_ACTIVE_HIGH>;
23};
24
25For more product information please see the link below:
26http://www.ti.com/product/TAS2552
diff --git a/Documentation/devicetree/bindings/sound/ti,tas5086.txt b/Documentation/devicetree/bindings/sound/ti,tas5086.txt
index d2866a0d6a26..234dad296da7 100644
--- a/Documentation/devicetree/bindings/sound/ti,tas5086.txt
+++ b/Documentation/devicetree/bindings/sound/ti,tas5086.txt
@@ -31,6 +31,9 @@ Optional properties:
31 31
32 Most systems should not set any of these properties. 32 Most systems should not set any of these properties.
33 33
34 - avdd-supply: Power supply for AVDD, providing 3.3V
35 - dvdd-supply: Power supply for DVDD, providing 3.3V
36
34Examples: 37Examples:
35 38
36 i2c_bus { 39 i2c_bus {
@@ -39,5 +42,7 @@ Examples:
39 reg = <0x1b>; 42 reg = <0x1b>;
40 reset-gpio = <&gpio 23 0>; 43 reset-gpio = <&gpio 23 0>;
41 ti,charge-period = <156000>; 44 ti,charge-period = <156000>;
45 avdd-supply = <&vdd_3v3_reg>;
46 dvdd-supply = <&vdd_3v3_reg>;
42 }; 47 };
43 }; 48 };
diff --git a/Documentation/devicetree/bindings/sound/wm8904.txt b/Documentation/devicetree/bindings/sound/wm8904.txt
new file mode 100644
index 000000000000..e99f4097c83c
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/wm8904.txt
@@ -0,0 +1,33 @@
1WM8904 audio CODEC
2
3This device supports I2C only.
4
5Required properties:
6 - compatible: "wlf,wm8904"
7 - reg: the I2C address of the device.
8 - clock-names: "mclk"
9 - clocks: reference to
10 <Documentation/devicetree/bindings/clock/clock-bindings.txt>
11
12Pins on the device (for linking into audio routes):
13
14 * IN1L
15 * IN1R
16 * IN2L
17 * IN2R
18 * IN3L
19 * IN3R
20 * HPOUTL
21 * HPOUTR
22 * LINEOUTL
23 * LINEOUTR
24 * MICBIAS
25
26Examples:
27
28codec: wm8904@1a {
29 compatible = "wlf,wm8904";
30 reg = <0x1a>;
31 clocks = <&pck0>;
32 clock-names = "mclk";
33};
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..1e8a8578148f 100644
--- a/Documentation/devicetree/bindings/spi/spi-samsung.txt
+++ b/Documentation/devicetree/bindings/spi/spi-samsung.txt
@@ -8,7 +8,6 @@ Required SoC Specific Properties:
8- compatible: should be one of the following. 8- compatible: should be one of the following.
9 - samsung,s3c2443-spi: for s3c2443, s3c2416 and s3c2450 platforms 9 - samsung,s3c2443-spi: for s3c2443, s3c2416 and s3c2450 platforms
10 - samsung,s3c6410-spi: for s3c6410 platforms 10 - samsung,s3c6410-spi: for s3c6410 platforms
11 - samsung,s5p6440-spi: for s5p6440 and s5p6450 platforms
12 - samsung,s5pv210-spi: for s5pv210 and s5pc110 platforms 11 - samsung,s5pv210-spi: for s5pv210 and s5pc110 platforms
13 - samsung,exynos4210-spi: for exynos4 and exynos5 platforms 12 - samsung,exynos4210-spi: for exynos4 and exynos5 platforms
14 13
@@ -18,14 +17,11 @@ Required SoC Specific Properties:
18- interrupts: The interrupt number to the cpu. The interrupt specifier format 17- interrupts: The interrupt number to the cpu. The interrupt specifier format
19 depends on the interrupt controller. 18 depends on the interrupt controller.
20 19
21[PRELIMINARY: the dma channel allocation will change once there are 20- dmas : Two or more DMA channel specifiers following the convention outlined
22official DMA bindings] 21 in bindings/dma/dma.txt
23 22
24- tx-dma-channel: The dma channel specifier for tx operations. The format of 23- dma-names: Names for the dma channels. There must be at least one channel
25 the dma specifier depends on the dma controller. 24 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 25
30Required Board Specific Properties: 26Required Board Specific Properties:
31 27
@@ -42,15 +38,13 @@ Optional Board Specific Properties:
42- num-cs: Specifies the number of chip select lines supported. If 38- 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. 39 not specified, the default number of chip select lines is set to 1.
44 40
41- cs-gpios: should specify GPIOs used for chipselects (see spi-bus.txt)
42
45SPI Controller specific data in SPI slave nodes: 43SPI Controller specific data in SPI slave nodes:
46 44
47- The spi slave nodes should provide the following information which is required 45- The spi slave nodes should provide the following information which is required
48 by the spi controller. 46 by the spi controller.
49 47
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 48 - 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 49 miso line (to account for any lag in the miso line). The following are the
56 valid values. 50 valid values.
@@ -74,8 +68,11 @@ Example:
74 compatible = "samsung,exynos4210-spi"; 68 compatible = "samsung,exynos4210-spi";
75 reg = <0x12d20000 0x100>; 69 reg = <0x12d20000 0x100>;
76 interrupts = <0 66 0>; 70 interrupts = <0 66 0>;
77 tx-dma-channel = <&pdma0 5>; 71 dmas = <&pdma0 5
78 rx-dma-channel = <&pdma0 4>; 72 &pdma0 4>;
73 dma-names = "tx", "rx";
74 #address-cells = <1>;
75 #size-cells = <0>;
79 }; 76 };
80 77
81- Board Specific Portion: 78- Board Specific Portion:
@@ -85,6 +82,7 @@ Example:
85 #size-cells = <0>; 82 #size-cells = <0>;
86 pinctrl-names = "default"; 83 pinctrl-names = "default";
87 pinctrl-0 = <&spi0_bus>; 84 pinctrl-0 = <&spi0_bus>;
85 cs-gpios = <&gpa2 5 0>;
88 86
89 w25q80bw@0 { 87 w25q80bw@0 {
90 #address-cells = <1>; 88 #address-cells = <1>;
@@ -94,7 +92,6 @@ Example:
94 spi-max-frequency = <10000>; 92 spi-max-frequency = <10000>;
95 93
96 controller-data { 94 controller-data {
97 cs-gpio = <&gpa2 5 1 0 3>;
98 samsung,spi-feedback-delay = <0>; 95 samsung,spi-feedback-delay = <0>;
99 }; 96 };
100 97
diff --git a/Documentation/devicetree/bindings/thermal/exynos-thermal.txt b/Documentation/devicetree/bindings/thermal/exynos-thermal.txt
index c94909215c07..ae738f562acc 100644
--- a/Documentation/devicetree/bindings/thermal/exynos-thermal.txt
+++ b/Documentation/devicetree/bindings/thermal/exynos-thermal.txt
@@ -3,6 +3,7 @@
3** Required properties: 3** Required properties:
4 4
5- compatible : One of the following: 5- compatible : One of the following:
6 "samsung,exynos3250-tmu"
6 "samsung,exynos4412-tmu" 7 "samsung,exynos4412-tmu"
7 "samsung,exynos4210-tmu" 8 "samsung,exynos4210-tmu"
8 "samsung,exynos5250-tmu" 9 "samsung,exynos5250-tmu"
diff --git a/Documentation/devicetree/bindings/thermal/rcar-thermal.txt b/Documentation/devicetree/bindings/thermal/rcar-thermal.txt
index 28ef498a66e5..0ef00be44b01 100644
--- a/Documentation/devicetree/bindings/thermal/rcar-thermal.txt
+++ b/Documentation/devicetree/bindings/thermal/rcar-thermal.txt
@@ -1,7 +1,13 @@
1* Renesas R-Car Thermal 1* Renesas R-Car Thermal
2 2
3Required properties: 3Required properties:
4- compatible : "renesas,rcar-thermal" 4- compatible : "renesas,thermal-<soctype>", "renesas,rcar-thermal"
5 as fallback.
6 Examples with soctypes are:
7 - "renesas,thermal-r8a73a4" (R-Mobile AP6)
8 - "renesas,thermal-r8a7779" (R-Car H1)
9 - "renesas,thermal-r8a7790" (R-Car H2)
10 - "renesas,thermal-r8a7791" (R-Car M2)
5- reg : Address range of the thermal registers. 11- reg : Address range of the thermal registers.
6 The 1st reg will be recognized as common register 12 The 1st reg will be recognized as common register
7 if it has "interrupts". 13 if it has "interrupts".
@@ -12,18 +18,18 @@ Option properties:
12 18
13Example (non interrupt support): 19Example (non interrupt support):
14 20
15thermal@e61f0100 { 21thermal@ffc48000 {
16 compatible = "renesas,rcar-thermal"; 22 compatible = "renesas,thermal-r8a7779", "renesas,rcar-thermal";
17 reg = <0xe61f0100 0x38>; 23 reg = <0xffc48000 0x38>;
18}; 24};
19 25
20Example (interrupt support): 26Example (interrupt support):
21 27
22thermal@e61f0000 { 28thermal@e61f0000 {
23 compatible = "renesas,rcar-thermal"; 29 compatible = "renesas,thermal-r8a73a4", "renesas,rcar-thermal";
24 reg = <0xe61f0000 0x14 30 reg = <0xe61f0000 0x14
25 0xe61f0100 0x38 31 0xe61f0100 0x38
26 0xe61f0200 0x38 32 0xe61f0200 0x38
27 0xe61f0300 0x38>; 33 0xe61f0300 0x38>;
28 interrupts = <0 69 4>; 34 interrupts = <0 69 IRQ_TYPE_LEVEL_HIGH>;
29}; 35};
diff --git a/Documentation/devicetree/bindings/thermal/st-thermal.txt b/Documentation/devicetree/bindings/thermal/st-thermal.txt
new file mode 100644
index 000000000000..3b9251b4a145
--- /dev/null
+++ b/Documentation/devicetree/bindings/thermal/st-thermal.txt
@@ -0,0 +1,42 @@
1Binding for Thermal Sensor driver for STMicroelectronics STi series of SoCs.
2
3Required parameters:
4-------------------
5
6compatible : st,<SoC>-<module>-thermal; should be one of:
7 "st,stih415-sas-thermal",
8 "st,stih415-mpe-thermal",
9 "st,stih416-sas-thermal"
10 "st,stih416-mpe-thermal"
11 "st,stid127-thermal" or
12 "st,stih407-thermal"
13 according to the SoC type (stih415, stih416, stid127, stih407)
14 and module type (sas or mpe). On stid127 & stih407 there is only
15 one die/module, so there is no module type in the compatible
16 string.
17clock-names : Should be "thermal".
18 See: Documentation/devicetree/bindings/resource-names.txt
19clocks : Phandle of the clock used by the thermal sensor.
20 See: Documentation/devicetree/bindings/clock/clock-bindings.txt
21
22Optional parameters:
23-------------------
24
25reg : For non-sysconf based sensors, this should be the physical base
26 address and length of the sensor's registers.
27interrupts : Standard way to define interrupt number.
28 Interrupt is mandatory to be defined when compatible is
29 "stih416-mpe-thermal".
30 NB: For thermal sensor's for which no interrupt has been
31 defined, a polling delay of 1000ms will be used to read the
32 temperature from device.
33
34Example:
35
36 temp1@fdfe8000 {
37 compatible = "st,stih416-mpe-thermal";
38 reg = <0xfdfe8000 0x10>;
39 clock-names = "thermal";
40 clocks = <&clk_m_mpethsens>;
41 interrupts = <GIC_SPI 23 IRQ_TYPE_NONE>;
42 };
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..ac7269f90764 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -6,6 +6,7 @@ using them to avoid name-space collisions.
6abilis Abilis Systems 6abilis Abilis Systems
7active-semi Active-Semi International Inc 7active-semi Active-Semi International Inc
8ad Avionic Design GmbH 8ad Avionic Design GmbH
9adapteva Adapteva, Inc.
9adi Analog Devices, Inc. 10adi Analog Devices, Inc.
10aeroflexgaisler Aeroflex Gaisler AB 11aeroflexgaisler Aeroflex Gaisler AB
11ak Asahi Kasei Corp. 12ak Asahi Kasei Corp.
@@ -42,6 +43,7 @@ dmo Data Modul AG
42ebv EBV Elektronik 43ebv EBV Elektronik
43edt Emerging Display Technologies 44edt Emerging Display Technologies
44emmicro EM Microelectronic 45emmicro EM Microelectronic
46epcos EPCOS AG
45epfl Ecole Polytechnique Fédérale de Lausanne 47epfl Ecole Polytechnique Fédérale de Lausanne
46epson Seiko Epson Corp. 48epson Seiko Epson Corp.
47est ESTeem Wireless Modems 49est ESTeem Wireless Modems
@@ -71,12 +73,14 @@ karo Ka-Ro electronics GmbH
71keymile Keymile GmbH 73keymile Keymile GmbH
72lacie LaCie 74lacie LaCie
73lantiq Lantiq Semiconductor 75lantiq Lantiq Semiconductor
76lenovo Lenovo Group Ltd.
74lg LG Corporation 77lg LG Corporation
75linux Linux-specific binding 78linux Linux-specific binding
76lsi LSI Corp. (LSI Logic) 79lsi LSI Corp. (LSI Logic)
77lltc Linear Technology Corporation 80lltc Linear Technology Corporation
78marvell Marvell Technology Group Ltd. 81marvell Marvell Technology Group Ltd.
79maxim Maxim Integrated Products 82maxim Maxim Integrated Products
83mediatek MediaTek Inc.
80micrel Micrel Inc. 84micrel Micrel Inc.
81microchip Microchip Technology Inc. 85microchip Microchip Technology Inc.
82mosaixtech Mosaix Technologies, Inc. 86mosaixtech Mosaix Technologies, Inc.
@@ -99,6 +103,7 @@ panasonic Panasonic Corporation
99phytec PHYTEC Messtechnik GmbH 103phytec PHYTEC Messtechnik GmbH
100picochip Picochip Ltd 104picochip Picochip Ltd
101plathome Plat'Home Co., Ltd. 105plathome Plat'Home Co., Ltd.
106pixcir PIXCIR MICROELECTRONICS Co., Ltd
102powervr PowerVR (deprecated, use img) 107powervr PowerVR (deprecated, use img)
103qca Qualcomm Atheros, Inc. 108qca Qualcomm Atheros, Inc.
104qcom Qualcomm Technologies, Inc 109qcom Qualcomm Technologies, Inc
@@ -122,6 +127,7 @@ sii Seiko Instruments, Inc.
122sirf SiRF Technology, Inc. 127sirf SiRF Technology, Inc.
123smsc Standard Microsystems Corporation 128smsc Standard Microsystems Corporation
124snps Synopsys, Inc. 129snps Synopsys, Inc.
130solidrun SolidRun
125spansion Spansion Inc. 131spansion Spansion Inc.
126st STMicroelectronics 132st STMicroelectronics
127ste ST-Ericsson 133ste ST-Ericsson
diff --git a/Documentation/devicetree/bindings/video/arm,pl11x.txt b/Documentation/devicetree/bindings/video/arm,pl11x.txt
new file mode 100644
index 000000000000..3e3039a8a253
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/arm,pl11x.txt
@@ -0,0 +1,109 @@
1* ARM PrimeCell Color LCD Controller PL110/PL111
2
3See also Documentation/devicetree/bindings/arm/primecell.txt
4
5Required properties:
6
7- compatible: must be one of:
8 "arm,pl110", "arm,primecell"
9 "arm,pl111", "arm,primecell"
10
11- reg: base address and size of the control registers block
12
13- interrupt-names: either the single entry "combined" representing a
14 combined interrupt output (CLCDINTR), or the four entries
15 "mbe", "vcomp", "lnbu", "fuf" representing the individual
16 CLCDMBEINTR, CLCDVCOMPINTR, CLCDLNBUINTR, CLCDFUFINTR interrupts
17
18- interrupts: contains an interrupt specifier for each entry in
19 interrupt-names
20
21- clock-names: should contain "clcdclk" and "apb_pclk"
22
23- clocks: contains phandle and clock specifier pairs for the entries
24 in the clock-names property. See
25 Documentation/devicetree/binding/clock/clock-bindings.txt
26
27Optional properties:
28
29- memory-region: phandle to a node describing memory (see
30 Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt)
31 to be used for the framebuffer; if not present, the framebuffer
32 may be located anywhere in the memory
33
34- max-memory-bandwidth: maximum bandwidth in bytes per second that the
35 cell's memory interface can handle; if not present, the memory
36 interface is fast enough to handle all possible video modes
37
38Required sub-nodes:
39
40- port: describes LCD panel signals, following the common binding
41 for video transmitter interfaces; see
42 Documentation/devicetree/bindings/media/video-interfaces.txt;
43 when it is a TFT panel, the port's endpoint must define the
44 following property:
45
46 - arm,pl11x,tft-r0g0b0-pads: an array of three 32-bit values,
47 defining the way CLD pads are wired up; first value
48 contains index of the "CLD" external pin (pad) used
49 as R0 (first bit of the red component), second value
50 index of the pad used as G0, third value index of the
51 pad used as B0, see also "LCD panel signal multiplexing
52 details" paragraphs in the PL110/PL111 Technical
53 Reference Manuals; this implicitly defines available
54 color modes, for example:
55 - PL111 TFT 4:4:4 panel:
56 arm,pl11x,tft-r0g0b0-pads = <4 15 20>;
57 - PL110 TFT (1:)5:5:5 panel:
58 arm,pl11x,tft-r0g0b0-pads = <1 7 13>;
59 - PL111 TFT (1:)5:5:5 panel:
60 arm,pl11x,tft-r0g0b0-pads = <3 11 19>;
61 - PL111 TFT 5:6:5 panel:
62 arm,pl11x,tft-r0g0b0-pads = <3 10 19>;
63 - PL110 and PL111 TFT 8:8:8 panel:
64 arm,pl11x,tft-r0g0b0-pads = <0 8 16>;
65 - PL110 and PL111 TFT 8:8:8 panel, R & B components swapped:
66 arm,pl11x,tft-r0g0b0-pads = <16 8 0>;
67
68
69Example:
70
71 clcd@10020000 {
72 compatible = "arm,pl111", "arm,primecell";
73 reg = <0x10020000 0x1000>;
74 interrupt-names = "combined";
75 interrupts = <0 44 4>;
76 clocks = <&oscclk1>, <&oscclk2>;
77 clock-names = "clcdclk", "apb_pclk";
78 max-memory-bandwidth = <94371840>; /* Bps, 1024x768@60 16bpp */
79
80 port {
81 clcd_pads: endpoint {
82 remote-endpoint = <&clcd_panel>;
83 arm,pl11x,tft-r0g0b0-pads = <0 8 16>;
84 };
85 };
86
87 };
88
89 panel {
90 compatible = "panel-dpi";
91
92 port {
93 clcd_panel: endpoint {
94 remote-endpoint = <&clcd_pads>;
95 };
96 };
97
98 panel-timing {
99 clock-frequency = <25175000>;
100 hactive = <640>;
101 hback-porch = <40>;
102 hfront-porch = <24>;
103 hsync-len = <96>;
104 vactive = <480>;
105 vback-porch = <32>;
106 vfront-porch = <11>;
107 vsync-len = <2>;
108 };
109 };
diff --git a/Documentation/devicetree/bindings/video/atmel,lcdc.txt b/Documentation/devicetree/bindings/video/atmel,lcdc.txt
index 1ec175eddca8..b75af94a5e52 100644
--- a/Documentation/devicetree/bindings/video/atmel,lcdc.txt
+++ b/Documentation/devicetree/bindings/video/atmel,lcdc.txt
@@ -46,6 +46,7 @@ Required properties (as per of_videomode_helper):
46 46
47Optional properties (as per of_videomode_helper): 47Optional properties (as per of_videomode_helper):
48 - atmel,lcdcon-backlight: enable backlight 48 - atmel,lcdcon-backlight: enable backlight
49 - atmel,lcdcon-backlight-inverted: invert backlight PWM polarity
49 - atmel,lcd-wiring-mode: lcd wiring mode "RGB" or "BRG" 50 - atmel,lcd-wiring-mode: lcd wiring mode "RGB" or "BRG"
50 - atmel,power-control-gpio: gpio to power on or off the LCD (as many as needed) 51 - atmel,power-control-gpio: gpio to power on or off the LCD (as many as needed)
51 52
diff --git a/Documentation/devicetree/bindings/video/cirrus,clps711x-fb.txt b/Documentation/devicetree/bindings/video/cirrus,clps711x-fb.txt
new file mode 100644
index 000000000000..6fc3c6adeefa
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/cirrus,clps711x-fb.txt
@@ -0,0 +1,47 @@
1* Currus Logic CLPS711X Framebuffer
2
3Required properties:
4- compatible: Shall contain "cirrus,clps711x-fb".
5- reg : Physical base address and length of the controller's registers +
6 location and size of the framebuffer memory.
7- clocks : phandle + clock specifier pair of the FB reference clock.
8- display : phandle to a display node as described in
9 Documentation/devicetree/bindings/video/display-timing.txt.
10 Additionally, the display node has to define properties:
11 - bits-per-pixel: Bits per pixel.
12 - ac-prescale : LCD AC bias frequency. This frequency is the required
13 AC bias frequency for a given manufacturer's LCD plate.
14 - cmap-invert : Invert the color levels (Optional).
15
16Optional properties:
17- lcd-supply: Regulator for LCD supply voltage.
18
19Example:
20 fb: fb@800002c0 {
21 compatible = "cirrus,ep7312-fb", "cirrus,clps711x-fb";
22 reg = <0x800002c0 0xd44>, <0x60000000 0xc000>;
23 clocks = <&clks 2>;
24 lcd-supply = <&reg5v0>;
25 display = <&display>;
26 };
27
28 display: display {
29 model = "320x240x4";
30 native-mode = <&timing0>;
31 bits-per-pixel = <4>;
32 ac-prescale = <17>;
33
34 display-timings {
35 timing0: 320x240 {
36 hactive = <320>;
37 hback-porch = <0>;
38 hfront-porch = <0>;
39 hsync-len = <0>;
40 vactive = <240>;
41 vback-porch = <0>;
42 vfront-porch = <0>;
43 vsync-len = <0>;
44 clock-frequency = <6500000>;
45 };
46 };
47 };
diff --git a/Documentation/devicetree/bindings/video/exynos_dsim.txt b/Documentation/devicetree/bindings/video/exynos_dsim.txt
index 33b5730d07ba..31036c667d54 100644
--- a/Documentation/devicetree/bindings/video/exynos_dsim.txt
+++ b/Documentation/devicetree/bindings/video/exynos_dsim.txt
@@ -1,7 +1,9 @@
1Exynos MIPI DSI Master 1Exynos MIPI DSI Master
2 2
3Required properties: 3Required properties:
4 - compatible: "samsung,exynos4210-mipi-dsi" 4 - compatible: value should be one of the following
5 "samsung,exynos4210-mipi-dsi" /* for Exynos4 SoCs */
6 "samsung,exynos5410-mipi-dsi" /* for Exynos5410/5420/5440 SoCs */
5 - reg: physical base address and length of the registers set for the device 7 - reg: physical base address and length of the registers set for the device
6 - interrupts: should contain DSI interrupt 8 - interrupts: should contain DSI interrupt
7 - clocks: list of clock specifiers, must contain an entry for each required 9 - clocks: list of clock specifiers, must contain an entry for each required
diff --git a/Documentation/devicetree/bindings/video/exynos_mixer.txt b/Documentation/devicetree/bindings/video/exynos_mixer.txt
index 7bfde9c9d658..08b394b1edbf 100644
--- a/Documentation/devicetree/bindings/video/exynos_mixer.txt
+++ b/Documentation/devicetree/bindings/video/exynos_mixer.txt
@@ -4,8 +4,9 @@ Required properties:
4- compatible: value should be one of the following: 4- compatible: value should be one of the following:
5 1) "samsung,exynos5-mixer" <DEPRECATED> 5 1) "samsung,exynos5-mixer" <DEPRECATED>
6 2) "samsung,exynos4210-mixer" 6 2) "samsung,exynos4210-mixer"
7 3) "samsung,exynos5250-mixer" 7 3) "samsung,exynos4212-mixer"
8 4) "samsung,exynos5420-mixer" 8 4) "samsung,exynos5250-mixer"
9 5) "samsung,exynos5420-mixer"
9 10
10- reg: physical base address of the mixer and length of memory mapped 11- reg: physical base address of the mixer and length of memory mapped
11 region. 12 region.
diff --git a/Documentation/devicetree/bindings/video/samsung-fimd.txt b/Documentation/devicetree/bindings/video/samsung-fimd.txt
index 2dad41b689af..ecc899b9817b 100644
--- a/Documentation/devicetree/bindings/video/samsung-fimd.txt
+++ b/Documentation/devicetree/bindings/video/samsung-fimd.txt
@@ -8,8 +8,6 @@ Required properties:
8- compatible: value should be one of the following 8- compatible: value should be one of the following
9 "samsung,s3c2443-fimd"; /* for S3C24XX SoCs */ 9 "samsung,s3c2443-fimd"; /* for S3C24XX SoCs */
10 "samsung,s3c6400-fimd"; /* for S3C64XX SoCs */ 10 "samsung,s3c6400-fimd"; /* for S3C64XX SoCs */
11 "samsung,s5p6440-fimd"; /* for S5P64X0 SoCs */
12 "samsung,s5pc100-fimd"; /* for S5PC100 SoC */
13 "samsung,s5pv210-fimd"; /* for S5PV210 SoC */ 11 "samsung,s5pv210-fimd"; /* for S5PV210 SoC */
14 "samsung,exynos4210-fimd"; /* for Exynos4 SoCs */ 12 "samsung,exynos4210-fimd"; /* for Exynos4 SoCs */
15 "samsung,exynos5250-fimd"; /* for Exynos5 SoCs */ 13 "samsung,exynos5250-fimd"; /* for Exynos5 SoCs */
@@ -44,6 +42,34 @@ Optional Properties:
44- display-timings: timing settings for FIMD, as described in document [1]. 42- display-timings: timing settings for FIMD, as described in document [1].
45 Can be used in case timings cannot be provided otherwise 43 Can be used in case timings cannot be provided otherwise
46 or to override timings provided by the panel. 44 or to override timings provided by the panel.
45- samsung,sysreg: handle to syscon used to control the system registers
46- i80-if-timings: timing configuration for lcd i80 interface support.
47 - cs-setup: clock cycles for the active period of address signal is enabled
48 until chip select is enabled.
49 If not specified, the default value(0) will be used.
50 - wr-setup: clock cycles for the active period of CS signal is enabled until
51 write signal is enabled.
52 If not specified, the default value(0) will be used.
53 - wr-active: clock cycles for the active period of CS is enabled.
54 If not specified, the default value(1) will be used.
55 - wr-hold: clock cycles for the active period of CS is disabled until write
56 signal is disabled.
57 If not specified, the default value(0) will be used.
58
59 The parameters are defined as:
60
61 VCLK(internal) __|??????|_____|??????|_____|??????|_____|??????|_____|??
62 : : : : :
63 Address Output --:<XXXXXXXXXXX:XXXXXXXXXXXX:XXXXXXXXXXXX:XXXXXXXXXXXX:XX
64 | cs-setup+1 | : : :
65 |<---------->| : : :
66 Chip Select ???????????????|____________:____________:____________|??
67 | wr-setup+1 | | wr-hold+1 |
68 |<---------->| |<---------->|
69 Write Enable ????????????????????????????|____________|???????????????
70 | wr-active+1|
71 |<---------->|
72 Video Data ----------------------------<XXXXXXXXXXXXXXXXXXXXXXXXX>--
47 73
48The device node can contain 'port' child nodes according to the bindings defined 74The device node can contain 'port' child nodes according to the bindings defined
49in [2]. The following are properties specific to those nodes: 75in [2]. The following are properties specific to those nodes:
diff --git a/Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.txt b/Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.txt
index 2144af1a5264..e52ba2da868c 100644
--- a/Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.txt
@@ -5,10 +5,15 @@ Required properties:
5- reg : Should contain WDT registers location and length 5- reg : Should contain WDT registers location and length
6- interrupts : Should contain WDT interrupt 6- interrupts : Should contain WDT interrupt
7 7
8Optional property:
9- big-endian: If present the watchdog device's registers are implemented
10 in big endian mode, otherwise in little mode.
11
8Examples: 12Examples:
9 13
10wdt@73f98000 { 14wdt@73f98000 {
11 compatible = "fsl,imx51-wdt", "fsl,imx21-wdt"; 15 compatible = "fsl,imx51-wdt", "fsl,imx21-wdt";
12 reg = <0x73f98000 0x4000>; 16 reg = <0x73f98000 0x4000>;
13 interrupts = <58>; 17 interrupts = <58>;
18 big-endian;
14}; 19};
diff --git a/Documentation/dmaengine.txt b/Documentation/dmaengine.txt
index 879b6e31e2da..573e28ce9751 100644
--- a/Documentation/dmaengine.txt
+++ b/Documentation/dmaengine.txt
@@ -84,31 +84,32 @@ The slave DMA usage consists of following steps:
84 the given transaction. 84 the given transaction.
85 85
86 Interface: 86 Interface:
87 struct dma_async_tx_descriptor *(*chan->device->device_prep_slave_sg)( 87 struct dma_async_tx_descriptor *dmaengine_prep_slave_sg(
88 struct dma_chan *chan, struct scatterlist *sgl, 88 struct dma_chan *chan, struct scatterlist *sgl,
89 unsigned int sg_len, enum dma_data_direction direction, 89 unsigned int sg_len, enum dma_data_direction direction,
90 unsigned long flags); 90 unsigned long flags);
91 91
92 struct dma_async_tx_descriptor *(*chan->device->device_prep_dma_cyclic)( 92 struct dma_async_tx_descriptor *dmaengine_prep_dma_cyclic(
93 struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len, 93 struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
94 size_t period_len, enum dma_data_direction direction); 94 size_t period_len, enum dma_data_direction direction);
95 95
96 struct dma_async_tx_descriptor *(*device_prep_interleaved_dma)( 96 struct dma_async_tx_descriptor *dmaengine_prep_interleaved_dma(
97 struct dma_chan *chan, struct dma_interleaved_template *xt, 97 struct dma_chan *chan, struct dma_interleaved_template *xt,
98 unsigned long flags); 98 unsigned long flags);
99 99
100 The peripheral driver is expected to have mapped the scatterlist for 100 The peripheral driver is expected to have mapped the scatterlist for
101 the DMA operation prior to calling device_prep_slave_sg, and must 101 the DMA operation prior to calling device_prep_slave_sg, and must
102 keep the scatterlist mapped until the DMA operation has completed. 102 keep the scatterlist mapped until the DMA operation has completed.
103 The scatterlist must be mapped using the DMA struct device. So, 103 The scatterlist must be mapped using the DMA struct device.
104 normal setup should look like this: 104 If a mapping needs to be synchronized later, dma_sync_*_for_*() must be
105 called using the DMA struct device, too.
106 So, normal setup should look like this:
105 107
106 nr_sg = dma_map_sg(chan->device->dev, sgl, sg_len); 108 nr_sg = dma_map_sg(chan->device->dev, sgl, sg_len);
107 if (nr_sg == 0) 109 if (nr_sg == 0)
108 /* error */ 110 /* error */
109 111
110 desc = chan->device->device_prep_slave_sg(chan, sgl, nr_sg, 112 desc = dmaengine_prep_slave_sg(chan, sgl, nr_sg, direction, flags);
111 direction, flags);
112 113
113 Once a descriptor has been obtained, the callback information can be 114 Once a descriptor has been obtained, the callback information can be
114 added and the descriptor must then be submitted. Some DMA engine 115 added and the descriptor must then be submitted. Some DMA engine
@@ -188,7 +189,7 @@ Further APIs:
188 description of this API. 189 description of this API.
189 190
190 This can be used in conjunction with dma_async_is_complete() and 191 This can be used in conjunction with dma_async_is_complete() and
191 the cookie returned from 'descriptor->submit()' to check for 192 the cookie returned from dmaengine_submit() to check for
192 completion of a specific DMA transaction. 193 completion of a specific DMA transaction.
193 194
194 Note: 195 Note:
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/cifs/AUTHORS b/Documentation/filesystems/cifs/AUTHORS
index ca4a67a0bb1e..c98800df677f 100644
--- a/Documentation/filesystems/cifs/AUTHORS
+++ b/Documentation/filesystems/cifs/AUTHORS
@@ -40,6 +40,7 @@ Gunter Kukkukk (testing and suggestions for support of old servers)
40Igor Mammedov (DFS support) 40Igor Mammedov (DFS support)
41Jeff Layton (many, many fixes, as well as great work on the cifs Kerberos code) 41Jeff Layton (many, many fixes, as well as great work on the cifs Kerberos code)
42Scott Lovenberg 42Scott Lovenberg
43Pavel Shilovsky (for great work adding SMB2 support, and various SMB3 features)
43 44
44Test case and Bug Report contributors 45Test case and Bug Report contributors
45------------------------------------- 46-------------------------------------
diff --git a/Documentation/filesystems/cifs/TODO b/Documentation/filesystems/cifs/TODO
index 355abcdcda98..066ffddc3964 100644
--- a/Documentation/filesystems/cifs/TODO
+++ b/Documentation/filesystems/cifs/TODO
@@ -1,4 +1,4 @@
1Version 1.53 May 20, 2008 1Version 2.03 August 1, 2014
2 2
3A Partial List of Missing Features 3A Partial List of Missing Features
4================================== 4==================================
@@ -7,63 +7,49 @@ Contributions are welcome. There are plenty of opportunities
7for visible, important contributions to this module. Here 7for visible, important contributions to this module. Here
8is a partial list of the known problems and missing features: 8is a partial list of the known problems and missing features:
9 9
10a) Support for SecurityDescriptors(Windows/CIFS ACLs) for chmod/chgrp/chown 10a) SMB3 (and SMB3.02) missing optional features:
11so that these operations can be supported to Windows servers 11 - RDMA
12 - multichannel (started)
13 - directory leases (improved metadata caching)
14 - T10 copy offload (copy chunk is only mechanism supported)
15 - encrypted shares
12 16
13b) Mapping POSIX ACLs (and eventually NFSv4 ACLs) to CIFS 17b) improved sparse file support
14SecurityDescriptors
15 18
16c) Better pam/winbind integration (e.g. to handle uid mapping 19c) Directory entry caching relies on a 1 second timer, rather than
17better)
18
19d) Cleanup now unneeded SessSetup code in
20fs/cifs/connect.c and add back in NTLMSSP code if any servers
21need it
22
23e) fix NTLMv2 signing when two mounts with different users to same
24server.
25
26f) Directory entry caching relies on a 1 second timer, rather than
27using FindNotify or equivalent. - (started) 20using FindNotify or equivalent. - (started)
28 21
29g) quota support (needs minor kernel change since quota calls 22d) quota support (needs minor kernel change since quota calls
30to make it to network filesystems or deviceless filesystems) 23to make it to network filesystems or deviceless filesystems)
31 24
32h) investigate sync behavior (including syncpage) and check 25e) improve support for very old servers (OS/2 and Win9x for example)
33for proper behavior of intr/nointr
34
35i) improve support for very old servers (OS/2 and Win9x for example)
36Including support for changing the time remotely (utimes command). 26Including support for changing the time remotely (utimes command).
37 27
38j) hook lower into the sockets api (as NFS/SunRPC does) to avoid the 28f) hook lower into the sockets api (as NFS/SunRPC does) to avoid the
39extra copy in/out of the socket buffers in some cases. 29extra copy in/out of the socket buffers in some cases.
40 30
41k) Better optimize open (and pathbased setfilesize) to reduce the 31g) Better optimize open (and pathbased setfilesize) to reduce the
42oplock breaks coming from windows srv. Piggyback identical file 32oplock breaks coming from windows srv. Piggyback identical file
43opens on top of each other by incrementing reference count rather 33opens on top of each other by incrementing reference count rather
44than resending (helps reduce server resource utilization and avoid 34than resending (helps reduce server resource utilization and avoid
45spurious oplock breaks). 35spurious oplock breaks).
46 36
47l) Improve performance of readpages by sending more than one read 37h) Add support for storing symlink info to Windows servers
48at a time when 8 pages or more are requested. In conjuntion
49add support for async_cifs_readpages.
50
51m) Add support for storing symlink info to Windows servers
52in the Extended Attribute format their SFU clients would recognize. 38in the Extended Attribute format their SFU clients would recognize.
53 39
54n) Finish fcntl D_NOTIFY support so kde and gnome file list windows 40i) Finish inotify support so kde and gnome file list windows
55will autorefresh (partially complete by Asser). Needs minor kernel 41will autorefresh (partially complete by Asser). Needs minor kernel
56vfs change to support removing D_NOTIFY on a file. 42vfs change to support removing D_NOTIFY on a file.
57 43
58o) Add GUI tool to configure /proc/fs/cifs settings and for display of 44j) Add GUI tool to configure /proc/fs/cifs settings and for display of
59the CIFS statistics (started) 45the CIFS statistics (started)
60 46
61p) implement support for security and trusted categories of xattrs 47k) implement support for security and trusted categories of xattrs
62(requires minor protocol extension) to enable better support for SELINUX 48(requires minor protocol extension) to enable better support for SELINUX
63 49
64q) Implement O_DIRECT flag on open (already supported on mount) 50l) Implement O_DIRECT flag on open (already supported on mount)
65 51
66r) Create UID mapping facility so server UIDs can be mapped on a per 52m) Create UID mapping facility so server UIDs can be mapped on a per
67mount or a per server basis to client UIDs or nobody if no mapping 53mount or a per server basis to client UIDs or nobody if no mapping
68exists. This is helpful when Unix extensions are negotiated to 54exists. This is helpful when Unix extensions are negotiated to
69allow better permission checking when UIDs differ on the server 55allow better permission checking when UIDs differ on the server
@@ -71,28 +57,29 @@ and client. Add new protocol request to the CIFS protocol
71standard for asking the server for the corresponding name of a 57standard for asking the server for the corresponding name of a
72particular uid. 58particular uid.
73 59
74s) Add support for CIFS Unix and also the newer POSIX extensions to the 60n) DOS attrs - returned as pseudo-xattr in Samba format (check VFAT and NTFS for this too)
75server side for Samba 4. 61
62o) mount check for unmatched uids
76 63
77t) In support for OS/2 (LANMAN 1.2 and LANMAN2.1 based SMB servers) 64p) Add support for new vfs entry point for fallocate
78need to add ability to set time to server (utimes command)
79 65
80u) DOS attrs - returned as pseudo-xattr in Samba format (check VFAT and NTFS for this too) 66q) Add tools to take advantage of cifs/smb3 specific ioctls and features
67such as "CopyChunk" (fast server side file copy)
81 68
82v) mount check for unmatched uids 69r) encrypted file support
83 70
84w) Add support for new vfs entry point for fallocate 71s) improved stats gathering, tools (perhaps integration with nfsometer?)
85 72
86x) Fix Samba 3 server to handle Linux kernel aio so dbench with lots of 73t) allow setting more NTFS/SMB3 file attributes remotely (currently limited to compressed
87processes can proceed better in parallel (on the server) 74file attribute via chflags)
88 75
89y) Fix Samba 3 to handle reads/writes over 127K (and remove the cifs mount 76u) mount helper GUI (to simplify the various configuration options on mount)
90restriction of wsize max being 127K)
91 77
92KNOWN BUGS (updated April 24, 2007) 78
79KNOWN BUGS
93==================================== 80====================================
94See http://bugzilla.samba.org - search on product "CifsVFS" for 81See http://bugzilla.samba.org - search on product "CifsVFS" for
95current bug list. 82current bug list. Also check http://bugzilla.kernel.org (Product = File System, Component = CIFS)
96 83
971) existing symbolic links (Windows reparse points) are recognized but 841) existing symbolic links (Windows reparse points) are recognized but
98can not be created remotely. They are implemented for Samba and those that 85can not be created remotely. They are implemented for Samba and those that
@@ -100,30 +87,18 @@ support the CIFS Unix extensions, although earlier versions of Samba
100overly restrict the pathnames. 87overly restrict the pathnames.
1012) follow_link and readdir code does not follow dfs junctions 882) follow_link and readdir code does not follow dfs junctions
102but recognizes them 89but recognizes them
1033) create of new files to FAT partitions on Windows servers can
104succeed but still return access denied (appears to be Windows
105server not cifs client problem) and has not been reproduced recently.
106NTFS partitions do not have this problem.
1074) Unix/POSIX capabilities are reset after reconnection, and affect
108a few fields in the tree connection but we do do not know which
109superblocks to apply these changes to. We should probably walk
110the list of superblocks to set these. Also need to check the
111flags on the second mount to the same share, and see if we
112can do the same trick that NFS does to remount duplicate shares.
113 90
114Misc testing to do 91Misc testing to do
115================== 92==================
1161) check out max path names and max path name components against various server 931) check out max path names and max path name components against various server
117types. Try nested symlinks (8 deep). Return max path name in stat -f information 94types. Try nested symlinks (8 deep). Return max path name in stat -f information
118 95
1192) Modify file portion of ltp so it can run against a mounted network 962) Improve xfstest's cifs enablement and adapt xfstests where needed to test
120share and run it against cifs vfs in automated fashion. 97cifs better
121 98
1223) Additional performance testing and optimization using iozone and similar - 993) Additional performance testing and optimization using iozone and similar -
123there are some easy changes that can be done to parallelize sequential writes, 100there are some easy changes that can be done to parallelize sequential writes,
124and when signing is disabled to request larger read sizes (larger than 101and when signing is disabled to request larger read sizes (larger than
125negotiated size) and send larger write sizes to modern servers. 102negotiated size) and send larger write sizes to modern servers.
126 103
1274) More exhaustively test against less common servers. More testing 1044) More exhaustively test against less common servers
128against Windows 9x, Windows ME servers.
129
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/nfs/Exporting b/Documentation/filesystems/nfs/Exporting
index e543b1a619cc..c8f036a9b13f 100644
--- a/Documentation/filesystems/nfs/Exporting
+++ b/Documentation/filesystems/nfs/Exporting
@@ -66,23 +66,31 @@ b/ A per-superblock list "s_anon" of dentries which are the roots of
66 66
67c/ Helper routines to allocate anonymous dentries, and to help attach 67c/ Helper routines to allocate anonymous dentries, and to help attach
68 loose directory dentries at lookup time. They are: 68 loose directory dentries at lookup time. They are:
69 d_alloc_anon(inode) will return a dentry for the given inode. 69 d_obtain_alias(inode) will return a dentry for the given inode.
70 If the inode already has a dentry, one of those is returned. 70 If the inode already has a dentry, one of those is returned.
71 If it doesn't, a new anonymous (IS_ROOT and 71 If it doesn't, a new anonymous (IS_ROOT and
72 DCACHE_DISCONNECTED) dentry is allocated and attached. 72 DCACHE_DISCONNECTED) dentry is allocated and attached.
73 In the case of a directory, care is taken that only one dentry 73 In the case of a directory, care is taken that only one dentry
74 can ever be attached. 74 can ever be attached.
75 d_splice_alias(inode, dentry) will make sure that there is a 75 d_splice_alias(inode, dentry) or d_materialise_unique(dentry, inode)
76 dentry with the same name and parent as the given dentry, and 76 will introduce a new dentry into the tree; either the passed-in
77 which refers to the given inode. 77 dentry or a preexisting alias for the given inode (such as an
78 If the inode is a directory and already has a dentry, then that 78 anonymous one created by d_obtain_alias), if appropriate. The two
79 dentry is d_moved over the given dentry. 79 functions differ in their handling of directories with preexisting
80 If the passed dentry gets attached, care is taken that this is 80 aliases:
81 mutually exclusive to a d_alloc_anon operation. 81 d_splice_alias will use any existing IS_ROOT dentry, but it will
82 If the passed dentry is used, NULL is returned, else the used 82 return -EIO rather than try to move a dentry with a different
83 dentry is returned. This corresponds to the calling pattern of 83 parent. This is appropriate for local filesystems, which
84 ->lookup. 84 should never see such an alias unless the filesystem is
85 85 corrupted somehow (for example, if two on-disk directory
86 entries refer to the same directory.)
87 d_materialise_unique will attempt to move any dentry. This is
88 appropriate for distributed filesystems, where finding a
89 directory other than where we last cached it may be a normal
90 consequence of concurrent operations on other hosts.
91 Both functions return NULL when the passed-in dentry is used,
92 following the calling convention of ->lookup.
93
86 94
87Filesystem Issues 95Filesystem Issues
88----------------- 96-----------------
@@ -120,12 +128,12 @@ struct which has the following members:
120 128
121 fh_to_dentry (mandatory) 129 fh_to_dentry (mandatory)
122 Given a filehandle fragment, this should find the implied object and 130 Given a filehandle fragment, this should find the implied object and
123 create a dentry for it (possibly with d_alloc_anon). 131 create a dentry for it (possibly with d_obtain_alias).
124 132
125 fh_to_parent (optional but strongly recommended) 133 fh_to_parent (optional but strongly recommended)
126 Given a filehandle fragment, this should find the parent of the 134 Given a filehandle fragment, this should find the parent of the
127 implied object and create a dentry for it (possibly with d_alloc_anon). 135 implied object and create a dentry for it (possibly with
128 May fail if the filehandle fragment is too small. 136 d_obtain_alias). May fail if the filehandle fragment is too small.
129 137
130 get_parent (optional but strongly recommended) 138 get_parent (optional but strongly recommended)
131 When given a dentry for a directory, this should return a dentry for 139 When given a dentry for a directory, this should return a dentry for
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/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index a1d0d7a30165..61d65cc65c54 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -1053,7 +1053,8 @@ struct dentry_operations {
1053 If the 'rcu_walk' parameter is true, then the caller is doing a 1053 If the 'rcu_walk' parameter is true, then the caller is doing a
1054 pathwalk in RCU-walk mode. Sleeping is not permitted in this mode, 1054 pathwalk in RCU-walk mode. Sleeping is not permitted in this mode,
1055 and the caller can be asked to leave it and call again by returning 1055 and the caller can be asked to leave it and call again by returning
1056 -ECHILD. 1056 -ECHILD. -EISDIR may also be returned to tell pathwalk to
1057 ignore d_automount or any mounts.
1057 1058
1058 This function is only used if DCACHE_MANAGE_TRANSIT is set on the 1059 This function is only used if DCACHE_MANAGE_TRANSIT is set on the
1059 dentry being transited from. 1060 dentry being transited from.
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/gpio/board.txt b/Documentation/gpio/board.txt
index ba169faad5c6..4452786225b8 100644
--- a/Documentation/gpio/board.txt
+++ b/Documentation/gpio/board.txt
@@ -60,7 +60,7 @@ Platform Data
60Finally, GPIOs can be bound to devices and functions using platform data. Board 60Finally, GPIOs can be bound to devices and functions using platform data. Board
61files that desire to do so need to include the following header: 61files that desire to do so need to include the following header:
62 62
63 #include <linux/gpio/driver.h> 63 #include <linux/gpio/machine.h>
64 64
65GPIOs are mapped by the means of tables of lookups, containing instances of the 65GPIOs are mapped by the means of tables of lookups, containing instances of the
66gpiod_lookup structure. Two macros are defined to help declaring such mappings: 66gpiod_lookup structure. Two macros are defined to help declaring such mappings:
diff --git a/Documentation/gpio/consumer.txt b/Documentation/gpio/consumer.txt
index d8abfc31abbe..76546324e968 100644
--- a/Documentation/gpio/consumer.txt
+++ b/Documentation/gpio/consumer.txt
@@ -29,13 +29,24 @@ gpiod_get() functions. Like many other kernel subsystems, gpiod_get() takes the
29device that will use the GPIO and the function the requested GPIO is supposed to 29device that will use the GPIO and the function the requested GPIO is supposed to
30fulfill: 30fulfill:
31 31
32 struct gpio_desc *gpiod_get(struct device *dev, const char *con_id) 32 struct gpio_desc *gpiod_get(struct device *dev, const char *con_id,
33 enum gpiod_flags flags)
33 34
34If a function is implemented by using several GPIOs together (e.g. a simple LED 35If a function is implemented by using several GPIOs together (e.g. a simple LED
35device that displays digits), an additional index argument can be specified: 36device that displays digits), an additional index argument can be specified:
36 37
37 struct gpio_desc *gpiod_get_index(struct device *dev, 38 struct gpio_desc *gpiod_get_index(struct device *dev,
38 const char *con_id, unsigned int idx) 39 const char *con_id, unsigned int idx,
40 enum gpiod_flags flags)
41
42The flags parameter is used to optionally specify a direction and initial value
43for the GPIO. Values can be:
44
45* GPIOD_ASIS or 0 to not initialize the GPIO at all. The direction must be set
46 later with one of the dedicated functions.
47* GPIOD_IN to initialize the GPIO as input.
48* GPIOD_OUT_LOW to initialize the GPIO as output with a value of 0.
49* GPIOD_OUT_HIGH to initialize the GPIO as output with a value of 1.
39 50
40Both functions return either a valid GPIO descriptor, or an error code checkable 51Both functions return either a valid GPIO descriptor, or an error code checkable
41with IS_ERR() (they will never return a NULL pointer). -ENOENT will be returned 52with IS_ERR() (they will never return a NULL pointer). -ENOENT will be returned
@@ -46,11 +57,13 @@ errors and an absence of GPIO for optional GPIO parameters.
46 57
47Device-managed variants of these functions are also defined: 58Device-managed variants of these functions are also defined:
48 59
49 struct gpio_desc *devm_gpiod_get(struct device *dev, const char *con_id) 60 struct gpio_desc *devm_gpiod_get(struct device *dev, const char *con_id,
61 enum gpiod_flags flags)
50 62
51 struct gpio_desc *devm_gpiod_get_index(struct device *dev, 63 struct gpio_desc *devm_gpiod_get_index(struct device *dev,
52 const char *con_id, 64 const char *con_id,
53 unsigned int idx) 65 unsigned int idx,
66 enum gpiod_flags flags)
54 67
55A GPIO descriptor can be disposed of using the gpiod_put() function: 68A GPIO descriptor can be disposed of using the gpiod_put() function:
56 69
@@ -67,8 +80,9 @@ Using GPIOs
67 80
68Setting Direction 81Setting Direction
69----------------- 82-----------------
70The first thing a driver must do with a GPIO is setting its direction. This is 83The first thing a driver must do with a GPIO is setting its direction. If no
71done by invoking one of the gpiod_direction_*() functions: 84direction-setting flags have been given to gpiod_get*(), this is done by
85invoking one of the gpiod_direction_*() functions:
72 86
73 int gpiod_direction_input(struct gpio_desc *desc) 87 int gpiod_direction_input(struct gpio_desc *desc)
74 int gpiod_direction_output(struct gpio_desc *desc, int value) 88 int gpiod_direction_output(struct gpio_desc *desc, int value)
diff --git a/Documentation/gpio/driver.txt b/Documentation/gpio/driver.txt
index fa9a0a8b3734..18790c237977 100644
--- a/Documentation/gpio/driver.txt
+++ b/Documentation/gpio/driver.txt
@@ -157,13 +157,34 @@ Locking IRQ usage
157Input GPIOs can be used as IRQ signals. When this happens, a driver is requested 157Input GPIOs can be used as IRQ signals. When this happens, a driver is requested
158to mark the GPIO as being used as an IRQ: 158to mark the GPIO as being used as an IRQ:
159 159
160 int gpiod_lock_as_irq(struct gpio_desc *desc) 160 int gpio_lock_as_irq(struct gpio_chip *chip, unsigned int offset)
161 161
162This will prevent the use of non-irq related GPIO APIs until the GPIO IRQ lock 162This will prevent the use of non-irq related GPIO APIs until the GPIO IRQ lock
163is released: 163is released:
164 164
165 void gpiod_unlock_as_irq(struct gpio_desc *desc) 165 void gpio_unlock_as_irq(struct gpio_chip *chip, unsigned int offset)
166 166
167When implementing an irqchip inside a GPIO driver, these two functions should 167When implementing an irqchip inside a GPIO driver, these two functions should
168typically be called in the .startup() and .shutdown() callbacks from the 168typically be called in the .startup() and .shutdown() callbacks from the
169irqchip. 169irqchip.
170
171
172Requesting self-owned GPIO pins
173-------------------------------
174
175Sometimes it is useful to allow a GPIO chip driver to request its own GPIO
176descriptors through the gpiolib API. Using gpio_request() for this purpose
177does not help since it pins the module to the kernel forever (it calls
178try_module_get()). A GPIO driver can use the following functions instead
179to request and free descriptors without being pinned to the kernel forever.
180
181 int gpiochip_request_own_desc(struct gpio_desc *desc, const char *label)
182
183 void gpiochip_free_own_desc(struct gpio_desc *desc)
184
185Descriptors requested with gpiochip_request_own_desc() must be released with
186gpiochip_free_own_desc().
187
188These functions must be used with care since they do not affect module use
189count. Do not use the functions to request gpio descriptors not owned by the
190calling driver.
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/i2c/busses/i2c-i801 b/Documentation/i2c/busses/i2c-i801
index adf5e33e8312..e9c803ea306d 100644
--- a/Documentation/i2c/busses/i2c-i801
+++ b/Documentation/i2c/busses/i2c-i801
@@ -25,6 +25,7 @@ Supported adapters:
25 * Intel Avoton (SOC) 25 * Intel Avoton (SOC)
26 * Intel Wellsburg (PCH) 26 * Intel Wellsburg (PCH)
27 * Intel Coleto Creek (PCH) 27 * Intel Coleto Creek (PCH)
28 * Intel Wildcat Point (PCH)
28 * Intel Wildcat Point-LP (PCH) 29 * Intel Wildcat Point-LP (PCH)
29 * Intel BayTrail (SOC) 30 * Intel BayTrail (SOC)
30 Datasheets: Publicly available at the Intel website 31 Datasheets: Publicly available at the Intel website
diff --git a/Documentation/i2c/i2c-stub b/Documentation/i2c/i2c-stub
index fa4b669c166b..a16924fbd289 100644
--- a/Documentation/i2c/i2c-stub
+++ b/Documentation/i2c/i2c-stub
@@ -2,9 +2,9 @@ MODULE: i2c-stub
2 2
3DESCRIPTION: 3DESCRIPTION:
4 4
5This module is a very simple fake I2C/SMBus driver. It implements five 5This module is a very simple fake I2C/SMBus driver. It implements six
6types of SMBus commands: write quick, (r/w) byte, (r/w) byte data, (r/w) 6types of SMBus commands: write quick, (r/w) byte, (r/w) byte data, (r/w)
7word data, and (r/w) I2C block data. 7word data, (r/w) I2C block data, and (r/w) SMBus block data.
8 8
9You need to provide chip addresses as a module parameter when loading this 9You need to provide chip addresses as a module parameter when loading this
10driver, which will then only react to SMBus commands to these addresses. 10driver, which will then only react to SMBus commands to these addresses.
@@ -19,6 +19,14 @@ A pointer register with auto-increment is implemented for all byte
19operations. This allows for continuous byte reads like those supported by 19operations. This allows for continuous byte reads like those supported by
20EEPROMs, among others. 20EEPROMs, among others.
21 21
22SMBus block command support is disabled by default, and must be enabled
23explicitly by setting the respective bits (0x03000000) in the functionality
24module parameter.
25
26SMBus block commands must be written to configure an SMBus command for
27SMBus block operations. Writes can be partial. Block read commands always
28return the number of bytes selected with the largest write so far.
29
22The typical use-case is like this: 30The typical use-case is like this:
23 1. load this module 31 1. load this module
24 2. use i2cset (from the i2c-tools project) to pre-load some data 32 2. use i2cset (from the i2c-tools project) to pre-load some data
@@ -39,15 +47,18 @@ unsigned long functionality:
39 value 0x1f0000 would only enable the quick, byte and byte data 47 value 0x1f0000 would only enable the quick, byte and byte data
40 commands. 48 commands.
41 49
50u8 bank_reg[10]
51u8 bank_mask[10]
52u8 bank_start[10]
53u8 bank_end[10]:
54 Optional bank settings. They tell which bits in which register
55 select the active bank, as well as the range of banked registers.
56
42CAVEATS: 57CAVEATS:
43 58
44If your target driver polls some byte or word waiting for it to change, the 59If your target driver polls some byte or word waiting for it to change, the
45stub could lock it up. Use i2cset to unlock it. 60stub could lock it up. Use i2cset to unlock it.
46 61
47If the hardware for your driver has banked registers (e.g. Winbond sensors
48chips) this module will not work well - although it could be extended to
49support that pretty easily.
50
51If you spam it hard enough, printk can be lossy. This module really wants 62If you spam it hard enough, printk can be lossy. This module really wants
52something like relayfs. 63something like relayfs.
53 64
diff --git a/Documentation/input/event-codes.txt b/Documentation/input/event-codes.txt
index f1ea2c69648d..c587a966413e 100644
--- a/Documentation/input/event-codes.txt
+++ b/Documentation/input/event-codes.txt
@@ -281,6 +281,19 @@ gestures can normally be extracted from it.
281If INPUT_PROP_SEMI_MT is not set, the device is assumed to be a true MT 281If INPUT_PROP_SEMI_MT is not set, the device is assumed to be a true MT
282device. 282device.
283 283
284INPUT_PROP_TOPBUTTONPAD:
285-----------------------
286Some laptops, most notably the Lenovo *40 series provide a trackstick
287device but do not have physical buttons associated with the trackstick
288device. Instead, the top area of the touchpad is marked to show
289visual/haptic areas for left, middle, right buttons intended to be used
290with the trackstick.
291
292If INPUT_PROP_TOPBUTTONPAD is set, userspace should emulate buttons
293accordingly. This property does not affect kernel behavior.
294The kernel does not provide button emulation for such devices but treats
295them as any other INPUT_PROP_BUTTONPAD device.
296
284Guidelines: 297Guidelines:
285========== 298==========
286The guidelines below ensure proper single-touch and multi-finger functionality. 299The guidelines below ensure proper single-touch and multi-finger functionality.
diff --git a/Documentation/ioctl/00-INDEX b/Documentation/ioctl/00-INDEX
index d2fe4d4729ef..c1a925787950 100644
--- a/Documentation/ioctl/00-INDEX
+++ b/Documentation/ioctl/00-INDEX
@@ -1,5 +1,7 @@
100-INDEX 100-INDEX
2 - this file 2 - this file
3botching-up-ioctls.txt
4 - how to avoid botching up ioctls
3cdrom.txt 5cdrom.txt
4 - summary of CDROM ioctl calls 6 - summary of CDROM ioctl calls
5hdio.txt 7hdio.txt
diff --git a/Documentation/ioctl/botching-up-ioctls.txt b/Documentation/ioctl/botching-up-ioctls.txt
new file mode 100644
index 000000000000..45fe78c58019
--- /dev/null
+++ b/Documentation/ioctl/botching-up-ioctls.txt
@@ -0,0 +1,219 @@
1(How to avoid) Botching up ioctls
2=================================
3
4From: http://blog.ffwll.ch/2013/11/botching-up-ioctls.html
5
6By: Daniel Vetter, Copyright © 2013 Intel Corporation
7
8One clear insight kernel graphics hackers gained in the past few years is that
9trying to come up with a unified interface to manage the execution units and
10memory on completely different GPUs is a futile effort. So nowadays every
11driver has its own set of ioctls to allocate memory and submit work to the GPU.
12Which is nice, since there's no more insanity in the form of fake-generic, but
13actually only used once interfaces. But the clear downside is that there's much
14more potential to screw things up.
15
16To avoid repeating all the same mistakes again I've written up some of the
17lessons learned while botching the job for the drm/i915 driver. Most of these
18only cover technicalities and not the big-picture issues like what the command
19submission ioctl exactly should look like. Learning these lessons is probably
20something every GPU driver has to do on its own.
21
22
23Prerequisites
24-------------
25
26First the prerequisites. Without these you have already failed, because you
27will need to add a a 32-bit compat layer:
28
29 * Only use fixed sized integers. To avoid conflicts with typedefs in userspace
30 the kernel has special types like __u32, __s64. Use them.
31
32 * Align everything to the natural size and use explicit padding. 32-bit
33 platforms don't necessarily align 64-bit values to 64-bit boundaries, but
34 64-bit platforms do. So we always need padding to the natural size to get
35 this right.
36
37 * Pad the entire struct to a multiple of 64-bits - the structure size will
38 otherwise differ on 32-bit versus 64-bit. Having a different structure size
39 hurts when passing arrays of structures to the kernel, or if the kernel
40 checks the structure size, which e.g. the drm core does.
41
42 * Pointers are __u64, cast from/to a uintprt_t on the userspace side and
43 from/to a void __user * in the kernel. Try really hard not to delay this
44 conversion or worse, fiddle the raw __u64 through your code since that
45 diminishes the checking tools like sparse can provide.
46
47
48Basics
49------
50
51With the joys of writing a compat layer avoided we can take a look at the basic
52fumbles. Neglecting these will make backward and forward compatibility a real
53pain. And since getting things wrong on the first attempt is guaranteed you
54will have a second iteration or at least an extension for any given interface.
55
56 * Have a clear way for userspace to figure out whether your new ioctl or ioctl
57 extension is supported on a given kernel. If you can't rely on old kernels
58 rejecting the new flags/modes or ioctls (since doing that was botched in the
59 past) then you need a driver feature flag or revision number somewhere.
60
61 * Have a plan for extending ioctls with new flags or new fields at the end of
62 the structure. The drm core checks the passed-in size for each ioctl call
63 and zero-extends any mismatches between kernel and userspace. That helps,
64 but isn't a complete solution since newer userspace on older kernels won't
65 notice that the newly added fields at the end get ignored. So this still
66 needs a new driver feature flags.
67
68 * Check all unused fields and flags and all the padding for whether it's 0,
69 and reject the ioctl if that's not the case. Otherwise your nice plan for
70 future extensions is going right down the gutters since someone will submit
71 an ioctl struct with random stack garbage in the yet unused parts. Which
72 then bakes in the ABI that those fields can never be used for anything else
73 but garbage.
74
75 * Have simple testcases for all of the above.
76
77
78Fun with Error Paths
79--------------------
80
81Nowadays we don't have any excuse left any more for drm drivers being neat
82little root exploits. This means we both need full input validation and solid
83error handling paths - GPUs will die eventually in the oddmost corner cases
84anyway:
85
86 * The ioctl must check for array overflows. Also it needs to check for
87 over/underflows and clamping issues of integer values in general. The usual
88 example is sprite positioning values fed directly into the hardware with the
89 hardware just having 12 bits or so. Works nicely until some odd display
90 server doesn't bother with clamping itself and the cursor wraps around the
91 screen.
92
93 * Have simple testcases for every input validation failure case in your ioctl.
94 Check that the error code matches your expectations. And finally make sure
95 that you only test for one single error path in each subtest by submitting
96 otherwise perfectly valid data. Without this an earlier check might reject
97 the ioctl already and shadow the codepath you actually want to test, hiding
98 bugs and regressions.
99
100 * Make all your ioctls restartable. First X really loves signals and second
101 this will allow you to test 90% of all error handling paths by just
102 interrupting your main test suite constantly with signals. Thanks to X's
103 love for signal you'll get an excellent base coverage of all your error
104 paths pretty much for free for graphics drivers. Also, be consistent with
105 how you handle ioctl restarting - e.g. drm has a tiny drmIoctl helper in its
106 userspace library. The i915 driver botched this with the set_tiling ioctl,
107 now we're stuck forever with some arcane semantics in both the kernel and
108 userspace.
109
110 * If you can't make a given codepath restartable make a stuck task at least
111 killable. GPUs just die and your users won't like you more if you hang their
112 entire box (by means of an unkillable X process). If the state recovery is
113 still too tricky have a timeout or hangcheck safety net as a last-ditch
114 effort in case the hardware has gone bananas.
115
116 * Have testcases for the really tricky corner cases in your error recovery code
117 - it's way too easy to create a deadlock between your hangcheck code and
118 waiters.
119
120
121Time, Waiting and Missing it
122----------------------------
123
124GPUs do most everything asynchronously, so we have a need to time operations and
125wait for oustanding ones. This is really tricky business; at the moment none of
126the ioctls supported by the drm/i915 get this fully right, which means there's
127still tons more lessons to learn here.
128
129 * Use CLOCK_MONOTONIC as your reference time, always. It's what alsa, drm and
130 v4l use by default nowadays. But let userspace know which timestamps are
131 derived from different clock domains like your main system clock (provided
132 by the kernel) or some independent hardware counter somewhere else. Clocks
133 will mismatch if you look close enough, but if performance measuring tools
134 have this information they can at least compensate. If your userspace can
135 get at the raw values of some clocks (e.g. through in-command-stream
136 performance counter sampling instructions) consider exposing those also.
137
138 * Use __s64 seconds plus __u64 nanoseconds to specify time. It's not the most
139 convenient time specification, but it's mostly the standard.
140
141 * Check that input time values are normalized and reject them if not. Note
142 that the kernel native struct ktime has a signed integer for both seconds
143 and nanoseconds, so beware here.
144
145 * For timeouts, use absolute times. If you're a good fellow and made your
146 ioctl restartable relative timeouts tend to be too coarse and can
147 indefinitely extend your wait time due to rounding on each restart.
148 Especially if your reference clock is something really slow like the display
149 frame counter. With a spec laywer hat on this isn't a bug since timeouts can
150 always be extended - but users will surely hate you if their neat animations
151 starts to stutter due to this.
152
153 * Consider ditching any synchronous wait ioctls with timeouts and just deliver
154 an asynchronous event on a pollable file descriptor. It fits much better
155 into event driven applications' main loop.
156
157 * Have testcases for corner-cases, especially whether the return values for
158 already-completed events, successful waits and timed-out waits are all sane
159 and suiting to your needs.
160
161
162Leaking Resources, Not
163----------------------
164
165A full-blown drm driver essentially implements a little OS, but specialized to
166the given GPU platforms. This means a driver needs to expose tons of handles
167for different objects and other resources to userspace. Doing that right
168entails its own little set of pitfalls:
169
170 * Always attach the lifetime of your dynamically created resources to the
171 lifetime of a file descriptor. Consider using a 1:1 mapping if your resource
172 needs to be shared across processes - fd-passing over unix domain sockets
173 also simplifies lifetime management for userspace.
174
175 * Always have O_CLOEXEC support.
176
177 * Ensure that you have sufficient insulation between different clients. By
178 default pick a private per-fd namespace which forces any sharing to be done
179 explictly. Only go with a more global per-device namespace if the objects
180 are truly device-unique. One counterexample in the drm modeset interfaces is
181 that the per-device modeset objects like connectors share a namespace with
182 framebuffer objects, which mostly are not shared at all. A separate
183 namespace, private by default, for framebuffers would have been more
184 suitable.
185
186 * Think about uniqueness requirements for userspace handles. E.g. for most drm
187 drivers it's a userspace bug to submit the same object twice in the same
188 command submission ioctl. But then if objects are shareable userspace needs
189 to know whether it has seen an imported object from a different process
190 already or not. I haven't tried this myself yet due to lack of a new class
191 of objects, but consider using inode numbers on your shared file descriptors
192 as unique identifiers - it's how real files are told apart, too.
193 Unfortunately this requires a full-blown virtual filesystem in the kernel.
194
195
196Last, but not Least
197-------------------
198
199Not every problem needs a new ioctl:
200
201 * Think hard whether you really want a driver-private interface. Of course
202 it's much quicker to push a driver-private interface than engaging in
203 lengthy discussions for a more generic solution. And occasionally doing a
204 private interface to spearhead a new concept is what's required. But in the
205 end, once the generic interface comes around you'll end up maintainer two
206 interfaces. Indefinitely.
207
208 * Consider other interfaces than ioctls. A sysfs attribute is much better for
209 per-device settings, or for child objects with fairly static lifetimes (like
210 output connectors in drm with all the detection override attributes). Or
211 maybe only your testsuite needs this interface, and then debugfs with its
212 disclaimer of not having a stable ABI would be better.
213
214Finally, the name of the game is to get it right on the first attempt, since if
215your driver proves popular and your hardware platforms long-lived then you'll
216be stuck with a given ioctl essentially forever. You can try to deprecate
217horrible ioctls on newer iterations of your hardware, but generally it takes
218years to accomplish this. And then again years until the last user able to
219complain about regressions disappears, too.
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 c1b9aa8c5a52..5ae8608ca9f5 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -566,6 +566,17 @@ 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
574 cca= [MIPS] Override the kernel pages' cache coherency
575 algorithm. Accepted values range from 0 to 7
576 inclusive. See arch/mips/include/asm/pgtable-bits.h
577 for platform specific values (SB1, Loongson3 and
578 others).
579
569 ccw_timeout_log [S390] 580 ccw_timeout_log [S390]
570 See Documentation/s390/CommonIO for details. 581 See Documentation/s390/CommonIO for details.
571 582
@@ -1097,6 +1108,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1097 that can be changed at run time by the 1108 that can be changed at run time by the
1098 set_graph_function file in the debugfs tracing directory. 1109 set_graph_function file in the debugfs tracing directory.
1099 1110
1111 ftrace_graph_notrace=[function-list]
1112 [FTRACE] Do not trace from the functions specified in
1113 function-list. This list is a comma separated list of
1114 functions that can be changed at run time by the
1115 set_graph_notrace file in the debugfs tracing directory.
1116
1100 gamecon.map[2|3]= 1117 gamecon.map[2|3]=
1101 [HW,JOY] Multisystem joystick and NES/SNES/PSX pad 1118 [HW,JOY] Multisystem joystick and NES/SNES/PSX pad
1102 support via parallel port (up to 5 devices per port) 1119 support via parallel port (up to 5 devices per port)
@@ -1313,6 +1330,23 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1313 Formats: { "ima" | "ima-ng" } 1330 Formats: { "ima" | "ima-ng" }
1314 Default: "ima-ng" 1331 Default: "ima-ng"
1315 1332
1333 ima.ahash_minsize= [IMA] Minimum file size for asynchronous hash usage
1334 Format: <min_file_size>
1335 Set the minimal file size for using asynchronous hash.
1336 If left unspecified, ahash usage is disabled.
1337
1338 ahash performance varies for different data sizes on
1339 different crypto accelerators. This option can be used
1340 to achieve the best performance for a particular HW.
1341
1342 ima.ahash_bufsize= [IMA] Asynchronous hash buffer size
1343 Format: <bufsize>
1344 Set hashing buffer size. Default: 4k.
1345
1346 ahash performance varies for different chunk sizes on
1347 different crypto accelerators. This option can be used
1348 to achieve best performance for particular HW.
1349
1316 init= [KNL] 1350 init= [KNL]
1317 Format: <full_path> 1351 Format: <full_path>
1318 Run specified binary instead of /sbin/init as init 1352 Run specified binary instead of /sbin/init as init
@@ -1416,10 +1450,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1416 ip= [IP_PNP] 1450 ip= [IP_PNP]
1417 See Documentation/filesystems/nfs/nfsroot.txt. 1451 See Documentation/filesystems/nfs/nfsroot.txt.
1418 1452
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] 1453 irqfixup [HW]
1424 When an interrupt is not handled search all handlers 1454 When an interrupt is not handled search all handlers
1425 for it. Intended to get systems with badly broken 1455 for it. Intended to get systems with badly broken
@@ -1692,8 +1722,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1692 7 (KERN_DEBUG) debug-level messages 1722 7 (KERN_DEBUG) debug-level messages
1693 1723
1694 log_buf_len=n[KMG] Sets the size of the printk ring buffer, 1724 log_buf_len=n[KMG] Sets the size of the printk ring buffer,
1695 in bytes. n must be a power of two. The default 1725 in bytes. n must be a power of two and greater
1696 size is set in the kernel config file. 1726 than the minimal size. The minimal size is defined
1727 by LOG_BUF_SHIFT kernel config parameter. There is
1728 also CONFIG_LOG_CPU_MAX_BUF_SHIFT config parameter
1729 that allows to increase the default size depending on
1730 the number of CPUs. See init/Kconfig for more details.
1697 1731
1698 logo.nologo [FB] Disables display of the built-in Linux logo. 1732 logo.nologo [FB] Disables display of the built-in Linux logo.
1699 This may be used to provide more screen space for 1733 This may be used to provide more screen space for
@@ -2166,6 +2200,21 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2166 and restore using xsave. The kernel will fallback to 2200 and restore using xsave. The kernel will fallback to
2167 enabling legacy floating-point and sse state. 2201 enabling legacy floating-point and sse state.
2168 2202
2203 noxsaveopt [X86] Disables xsaveopt used in saving x86 extended
2204 register states. The kernel will fall back to use
2205 xsave to save the states. By using this parameter,
2206 performance of saving the states is degraded because
2207 xsave doesn't support modified optimization while
2208 xsaveopt supports it on xsaveopt enabled systems.
2209
2210 noxsaves [X86] Disables xsaves and xrstors used in saving and
2211 restoring x86 extended register state in compacted
2212 form of xsave area. The kernel will fall back to use
2213 xsaveopt and xrstor to save and restore the states
2214 in standard form of xsave area. By using this
2215 parameter, xsave area per process might occupy more
2216 memory on xsaves enabled systems.
2217
2169 eagerfpu= [X86] 2218 eagerfpu= [X86]
2170 on enable eager fpu restore 2219 on enable eager fpu restore
2171 off disable eager fpu restore 2220 off disable eager fpu restore
@@ -2790,6 +2839,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2790 leaf rcu_node structure. Useful for very large 2839 leaf rcu_node structure. Useful for very large
2791 systems. 2840 systems.
2792 2841
2842 rcutree.jiffies_till_sched_qs= [KNL]
2843 Set required age in jiffies for a
2844 given grace period before RCU starts
2845 soliciting quiescent-state help from
2846 rcu_note_context_switch().
2847
2793 rcutree.jiffies_till_first_fqs= [KNL] 2848 rcutree.jiffies_till_first_fqs= [KNL]
2794 Set delay from grace-period initialization to 2849 Set delay from grace-period initialization to
2795 first attempt to force quiescent states. 2850 first attempt to force quiescent states.
@@ -2801,6 +2856,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2801 quiescent states. Units are jiffies, minimum 2856 quiescent states. Units are jiffies, minimum
2802 value is one, and maximum value is HZ. 2857 value is one, and maximum value is HZ.
2803 2858
2859 rcutree.rcu_nocb_leader_stride= [KNL]
2860 Set the number of NOCB kthread groups, which
2861 defaults to the square root of the number of
2862 CPUs. Larger numbers reduces the wakeup overhead
2863 on the per-CPU grace-period kthreads, but increases
2864 that same overhead on each group's leader.
2865
2804 rcutree.qhimark= [KNL] 2866 rcutree.qhimark= [KNL]
2805 Set threshold of queued RCU callbacks beyond which 2867 Set threshold of queued RCU callbacks beyond which
2806 batch limiting is disabled. 2868 batch limiting is disabled.
@@ -3017,6 +3079,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
3017 3079
3018 S [KNL] Run init in single mode 3080 S [KNL] Run init in single mode
3019 3081
3082 s390_iommu= [HW,S390]
3083 Set s390 IOTLB flushing mode
3084 strict
3085 With strict flushing every unmap operation will result in
3086 an IOTLB flush. Default is lazy flushing before reuse,
3087 which is faster.
3088
3020 sa1100ir [NET] 3089 sa1100ir [NET]
3021 See drivers/net/irda/sa1100_ir.c. 3090 See drivers/net/irda/sa1100_ir.c.
3022 3091
@@ -3526,7 +3595,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
3526 the allocated input device; If set to 0, video driver 3595 the allocated input device; If set to 0, video driver
3527 will only send out the event without touching backlight 3596 will only send out the event without touching backlight
3528 brightness level. 3597 brightness level.
3529 default: 0 3598 default: 1
3530 3599
3531 virtio_mmio.device= 3600 virtio_mmio.device=
3532 [VMMIO] Memory mapped virtio (platform) device. 3601 [VMMIO] Memory mapped virtio (platform) device.
@@ -3691,6 +3760,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
3691 Disables the ticketlock slowpath using Xen PV 3760 Disables the ticketlock slowpath using Xen PV
3692 optimizations. 3761 optimizations.
3693 3762
3763 xen_nopv [X86]
3764 Disables the PV optimizations forcing the HVM guest to
3765 run as generic HVM guest with no PV drivers.
3766
3694 xirc2ps_cs= [NET,PCMCIA] 3767 xirc2ps_cs= [NET,PCMCIA]
3695 Format: 3768 Format:
3696 <irq>,<irq_mask>,<io>,<full_duplex>,<do_sound>,<lockup_hack>[,<irq2>[,<irq3>[,<irq4>]]] 3769 <irq>,<irq_mask>,<io>,<full_duplex>,<do_sound>,<lockup_hack>[,<irq2>[,<irq3>[,<irq4>]]]
diff --git a/Documentation/laptops/00-INDEX b/Documentation/laptops/00-INDEX
index d13b9a9a9e00..d399ae1fc724 100644
--- a/Documentation/laptops/00-INDEX
+++ b/Documentation/laptops/00-INDEX
@@ -8,8 +8,8 @@ disk-shock-protection.txt
8 - information on hard disk shock protection. 8 - information on hard disk shock protection.
9dslm.c 9dslm.c
10 - Simple Disk Sleep Monitor program 10 - Simple Disk Sleep Monitor program
11hpfall.c 11freefall.c
12 - (HP) laptop accelerometer program for disk protection. 12 - (HP/DELL) laptop accelerometer program for disk protection.
13laptop-mode.txt 13laptop-mode.txt
14 - how to conserve battery power using laptop-mode. 14 - how to conserve battery power using laptop-mode.
15sony-laptop.txt 15sony-laptop.txt
diff --git a/Documentation/laptops/hpfall.c b/Documentation/laptops/freefall.c
index b85dbbac0499..5e44b20b1848 100644
--- a/Documentation/laptops/hpfall.c
+++ b/Documentation/laptops/freefall.c
@@ -1,7 +1,9 @@
1/* Disk protection for HP machines. 1/* Disk protection for HP/DELL machines.
2 * 2 *
3 * Copyright 2008 Eric Piel 3 * Copyright 2008 Eric Piel
4 * Copyright 2009 Pavel Machek <pavel@ucw.cz> 4 * Copyright 2009 Pavel Machek <pavel@ucw.cz>
5 * Copyright 2012 Sonal Santan
6 * Copyright 2014 Pali Rohár <pali.rohar@gmail.com>
5 * 7 *
6 * GPLv2. 8 * GPLv2.
7 */ 9 */
@@ -18,24 +20,28 @@
18#include <signal.h> 20#include <signal.h>
19#include <sys/mman.h> 21#include <sys/mman.h>
20#include <sched.h> 22#include <sched.h>
23#include <syslog.h>
21 24
22char unload_heads_path[64]; 25static int noled;
26static char unload_heads_path[64];
27static char device_path[32];
28static const char app_name[] = "FREE FALL";
23 29
24int set_unload_heads_path(char *device) 30static int set_unload_heads_path(char *device)
25{ 31{
26 char devname[64];
27
28 if (strlen(device) <= 5 || strncmp(device, "/dev/", 5) != 0) 32 if (strlen(device) <= 5 || strncmp(device, "/dev/", 5) != 0)
29 return -EINVAL; 33 return -EINVAL;
30 strncpy(devname, device + 5, sizeof(devname)); 34 strncpy(device_path, device, sizeof(device_path) - 1);
31 35
32 snprintf(unload_heads_path, sizeof(unload_heads_path) - 1, 36 snprintf(unload_heads_path, sizeof(unload_heads_path) - 1,
33 "/sys/block/%s/device/unload_heads", devname); 37 "/sys/block/%s/device/unload_heads", device+5);
34 return 0; 38 return 0;
35} 39}
36int valid_disk(void) 40
41static int valid_disk(void)
37{ 42{
38 int fd = open(unload_heads_path, O_RDONLY); 43 int fd = open(unload_heads_path, O_RDONLY);
44
39 if (fd < 0) { 45 if (fd < 0) {
40 perror(unload_heads_path); 46 perror(unload_heads_path);
41 return 0; 47 return 0;
@@ -45,43 +51,54 @@ int valid_disk(void)
45 return 1; 51 return 1;
46} 52}
47 53
48void write_int(char *path, int i) 54static void write_int(char *path, int i)
49{ 55{
50 char buf[1024]; 56 char buf[1024];
51 int fd = open(path, O_RDWR); 57 int fd = open(path, O_RDWR);
58
52 if (fd < 0) { 59 if (fd < 0) {
53 perror("open"); 60 perror("open");
54 exit(1); 61 exit(1);
55 } 62 }
63
56 sprintf(buf, "%d", i); 64 sprintf(buf, "%d", i);
65
57 if (write(fd, buf, strlen(buf)) != strlen(buf)) { 66 if (write(fd, buf, strlen(buf)) != strlen(buf)) {
58 perror("write"); 67 perror("write");
59 exit(1); 68 exit(1);
60 } 69 }
70
61 close(fd); 71 close(fd);
62} 72}
63 73
64void set_led(int on) 74static void set_led(int on)
65{ 75{
76 if (noled)
77 return;
66 write_int("/sys/class/leds/hp::hddprotect/brightness", on); 78 write_int("/sys/class/leds/hp::hddprotect/brightness", on);
67} 79}
68 80
69void protect(int seconds) 81static void protect(int seconds)
70{ 82{
83 const char *str = (seconds == 0) ? "Unparked" : "Parked";
84
71 write_int(unload_heads_path, seconds*1000); 85 write_int(unload_heads_path, seconds*1000);
86 syslog(LOG_INFO, "%s %s disk head\n", str, device_path);
72} 87}
73 88
74int on_ac(void) 89static int on_ac(void)
75{ 90{
76// /sys/class/power_supply/AC0/online 91 /* /sys/class/power_supply/AC0/online */
92 return 1;
77} 93}
78 94
79int lid_open(void) 95static int lid_open(void)
80{ 96{
81// /proc/acpi/button/lid/LID/state 97 /* /proc/acpi/button/lid/LID/state */
98 return 1;
82} 99}
83 100
84void ignore_me(void) 101static void ignore_me(int signum)
85{ 102{
86 protect(0); 103 protect(0);
87 set_led(0); 104 set_led(0);
@@ -90,6 +107,7 @@ void ignore_me(void)
90int main(int argc, char **argv) 107int main(int argc, char **argv)
91{ 108{
92 int fd, ret; 109 int fd, ret;
110 struct stat st;
93 struct sched_param param; 111 struct sched_param param;
94 112
95 if (argc == 1) 113 if (argc == 1)
@@ -111,7 +129,16 @@ int main(int argc, char **argv)
111 return EXIT_FAILURE; 129 return EXIT_FAILURE;
112 } 130 }
113 131
114 daemon(0, 0); 132 if (stat("/sys/class/leds/hp::hddprotect/brightness", &st))
133 noled = 1;
134
135 if (daemon(0, 0) != 0) {
136 perror("daemon");
137 return EXIT_FAILURE;
138 }
139
140 openlog(app_name, LOG_CONS | LOG_PID | LOG_NDELAY, LOG_LOCAL1);
141
115 param.sched_priority = sched_get_priority_max(SCHED_FIFO); 142 param.sched_priority = sched_get_priority_max(SCHED_FIFO);
116 sched_setscheduler(0, SCHED_FIFO, &param); 143 sched_setscheduler(0, SCHED_FIFO, &param);
117 mlockall(MCL_CURRENT|MCL_FUTURE); 144 mlockall(MCL_CURRENT|MCL_FUTURE);
@@ -141,6 +168,7 @@ int main(int argc, char **argv)
141 alarm(20); 168 alarm(20);
142 } 169 }
143 170
171 closelog();
144 close(fd); 172 close(fd);
145 return EXIT_SUCCESS; 173 return EXIT_SUCCESS;
146} 174}
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/networking/bonding.txt b/Documentation/networking/bonding.txt
index 9c723ecd0025..eeb5b2e97bed 100644
--- a/Documentation/networking/bonding.txt
+++ b/Documentation/networking/bonding.txt
@@ -542,10 +542,10 @@ mode
542 542
543 XOR policy: Transmit based on the selected transmit 543 XOR policy: Transmit based on the selected transmit
544 hash policy. The default policy is a simple [(source 544 hash policy. The default policy is a simple [(source
545 MAC address XOR'd with destination MAC address) modulo 545 MAC address XOR'd with destination MAC address XOR
546 slave count]. Alternate transmit policies may be 546 packet type ID) modulo slave count]. Alternate transmit
547 selected via the xmit_hash_policy option, described 547 policies may be selected via the xmit_hash_policy option,
548 below. 548 described below.
549 549
550 This mode provides load balancing and fault tolerance. 550 This mode provides load balancing and fault tolerance.
551 551
@@ -801,10 +801,11 @@ xmit_hash_policy
801 801
802 layer2 802 layer2
803 803
804 Uses XOR of hardware MAC addresses to generate the 804 Uses XOR of hardware MAC addresses and packet type ID
805 hash. The formula is 805 field to generate the hash. The formula is
806 806
807 (source MAC XOR destination MAC) modulo slave count 807 hash = source MAC XOR destination MAC XOR packet type ID
808 slave number = hash modulo slave count
808 809
809 This algorithm will place all traffic to a particular 810 This algorithm will place all traffic to a particular
810 network peer on the same slave. 811 network peer on the same slave.
@@ -819,7 +820,7 @@ xmit_hash_policy
819 Uses XOR of hardware MAC addresses and IP addresses to 820 Uses XOR of hardware MAC addresses and IP addresses to
820 generate the hash. The formula is 821 generate the hash. The formula is
821 822
822 hash = source MAC XOR destination MAC 823 hash = source MAC XOR destination MAC XOR packet type ID
823 hash = hash XOR source IP XOR destination IP 824 hash = hash XOR source IP XOR destination IP
824 hash = hash XOR (hash RSHIFT 16) 825 hash = hash XOR (hash RSHIFT 16)
825 hash = hash XOR (hash RSHIFT 8) 826 hash = hash XOR (hash RSHIFT 8)
@@ -2301,13 +2302,13 @@ broadcast: Like active-backup, there is not much advantage to this
2301 bandwidth. 2302 bandwidth.
2302 2303
2303 Additionally, the linux bonding 802.3ad implementation 2304 Additionally, the linux bonding 802.3ad implementation
2304 distributes traffic by peer (using an XOR of MAC addresses), 2305 distributes traffic by peer (using an XOR of MAC addresses
2305 so in a "gatewayed" configuration, all outgoing traffic will 2306 and packet type ID), so in a "gatewayed" configuration, all
2306 generally use the same device. Incoming traffic may also end 2307 outgoing traffic will generally use the same device. Incoming
2307 up on a single device, but that is dependent upon the 2308 traffic may also end up on a single device, but that is
2308 balancing policy of the peer's 8023.ad implementation. In a 2309 dependent upon the balancing policy of the peer's 8023.ad
2309 "local" configuration, traffic will be distributed across the 2310 implementation. In a "local" configuration, traffic will be
2310 devices in the bond. 2311 distributed across the devices in the bond.
2311 2312
2312 Finally, the 802.3ad mode mandates the use of the MII monitor, 2313 Finally, the 802.3ad mode mandates the use of the MII monitor,
2313 therefore, the ARP monitor is not available in this mode. 2314 therefore, the ARP monitor is not available in this mode.
diff --git a/Documentation/networking/filter.txt b/Documentation/networking/filter.txt
index ee78eba78a9d..c48a9704bda8 100644
--- a/Documentation/networking/filter.txt
+++ b/Documentation/networking/filter.txt
@@ -586,12 +586,12 @@ team driver's classifier for its load-balancing mode, netfilter's xt_bpf
586extension, PTP dissector/classifier, and much more. They are all internally 586extension, PTP dissector/classifier, and much more. They are all internally
587converted by the kernel into the new instruction set representation and run 587converted by the kernel into the new instruction set representation and run
588in the eBPF interpreter. For in-kernel handlers, this all works transparently 588in the eBPF interpreter. For in-kernel handlers, this all works transparently
589by using sk_unattached_filter_create() for setting up the filter, resp. 589by using bpf_prog_create() for setting up the filter, resp.
590sk_unattached_filter_destroy() for destroying it. The macro 590bpf_prog_destroy() for destroying it. The macro
591SK_RUN_FILTER(filter, ctx) transparently invokes eBPF interpreter or JITed 591BPF_PROG_RUN(filter, ctx) transparently invokes eBPF interpreter or JITed
592code to run the filter. 'filter' is a pointer to struct sk_filter that we 592code to run the filter. 'filter' is a pointer to struct bpf_prog that we
593got from sk_unattached_filter_create(), and 'ctx' the given context (e.g. 593got from bpf_prog_create(), and 'ctx' the given context (e.g.
594skb pointer). All constraints and restrictions from sk_chk_filter() apply 594skb pointer). All constraints and restrictions from bpf_check_classic() apply
595before a conversion to the new layout is being done behind the scenes! 595before a conversion to the new layout is being done behind the scenes!
596 596
597Currently, the classic BPF format is being used for JITing on most of the 597Currently, the classic BPF format is being used for JITing on most of the
diff --git a/Documentation/networking/i40e.txt b/Documentation/networking/i40e.txt
index f737273c6dc1..a251bf4fe9c9 100644
--- a/Documentation/networking/i40e.txt
+++ b/Documentation/networking/i40e.txt
@@ -69,8 +69,11 @@ Additional Configurations
69 69
70 FCoE 70 FCoE
71 ---- 71 ----
72 Fiber Channel over Ethernet (FCoE) hardware offload is not currently 72 The driver supports Fiber Channel over Ethernet (FCoE) and Data Center
73 supported. 73 Bridging (DCB) functionality. Configuring DCB and FCoE is outside the scope
74 of this driver doc. Refer to http://www.open-fcoe.org/ for FCoE project
75 information and http://www.open-lldp.org/ or email list
76 e1000-eedc@lists.sourceforge.net for DCB information.
74 77
75 MAC and VLAN anti-spoofing feature 78 MAC and VLAN anti-spoofing feature
76 ---------------------------------- 79 ----------------------------------
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index ab42c95f9985..29a93518bf18 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -101,19 +101,17 @@ ipfrag_high_thresh - INTEGER
101 Maximum memory used to reassemble IP fragments. When 101 Maximum memory used to reassemble IP fragments. When
102 ipfrag_high_thresh bytes of memory is allocated for this purpose, 102 ipfrag_high_thresh bytes of memory is allocated for this purpose,
103 the fragment handler will toss packets until ipfrag_low_thresh 103 the fragment handler will toss packets until ipfrag_low_thresh
104 is reached. 104 is reached. This also serves as a maximum limit to namespaces
105 different from the initial one.
105 106
106ipfrag_low_thresh - INTEGER 107ipfrag_low_thresh - INTEGER
107 See ipfrag_high_thresh 108 Maximum memory used to reassemble IP fragments before the kernel
109 begins to remove incomplete fragment queues to free up resources.
110 The kernel still accepts new fragments for defragmentation.
108 111
109ipfrag_time - INTEGER 112ipfrag_time - INTEGER
110 Time in seconds to keep an IP fragment in memory. 113 Time in seconds to keep an IP fragment in memory.
111 114
112ipfrag_secret_interval - INTEGER
113 Regeneration interval (in seconds) of the hash secret (or lifetime
114 for the hash secret) for IP fragments.
115 Default: 600
116
117ipfrag_max_dist - INTEGER 115ipfrag_max_dist - INTEGER
118 ipfrag_max_dist is a non-negative integer value which defines the 116 ipfrag_max_dist is a non-negative integer value which defines the
119 maximum "disorder" which is allowed among fragments which share a 117 maximum "disorder" which is allowed among fragments which share a
@@ -1132,6 +1130,15 @@ flowlabel_consistency - BOOLEAN
1132 FALSE: disabled 1130 FALSE: disabled
1133 Default: TRUE 1131 Default: TRUE
1134 1132
1133auto_flowlabels - BOOLEAN
1134 Automatically generate flow labels based based on a flow hash
1135 of the packet. This allows intermediate devices, such as routers,
1136 to idenfify packet flows for mechanisms like Equal Cost Multipath
1137 Routing (see RFC 6438).
1138 TRUE: enabled
1139 FALSE: disabled
1140 Default: false
1141
1135anycast_src_echo_reply - BOOLEAN 1142anycast_src_echo_reply - BOOLEAN
1136 Controls the use of anycast addresses as source addresses for ICMPv6 1143 Controls the use of anycast addresses as source addresses for ICMPv6
1137 echo reply 1144 echo reply
@@ -1153,11 +1160,6 @@ ip6frag_low_thresh - INTEGER
1153ip6frag_time - INTEGER 1160ip6frag_time - INTEGER
1154 Time in seconds to keep an IPv6 fragment in memory. 1161 Time in seconds to keep an IPv6 fragment in memory.
1155 1162
1156ip6frag_secret_interval - INTEGER
1157 Regeneration interval (in seconds) of the hash secret (or lifetime
1158 for the hash secret) for IPv6 fragments.
1159 Default: 600
1160
1161conf/default/*: 1163conf/default/*:
1162 Change the interface-specific default settings. 1164 Change the interface-specific default settings.
1163 1165
@@ -1210,6 +1212,18 @@ accept_ra_defrtr - BOOLEAN
1210 Functional default: enabled if accept_ra is enabled. 1212 Functional default: enabled if accept_ra is enabled.
1211 disabled if accept_ra is disabled. 1213 disabled if accept_ra is disabled.
1212 1214
1215accept_ra_from_local - BOOLEAN
1216 Accept RA with source-address that is found on local machine
1217 if the RA is otherwise proper and able to be accepted.
1218 Default is to NOT accept these as it may be an un-intended
1219 network loop.
1220
1221 Functional default:
1222 enabled if accept_ra_from_local is enabled
1223 on a specific interface.
1224 disabled if accept_ra_from_local is disabled
1225 on a specific interface.
1226
1213accept_ra_pinfo - BOOLEAN 1227accept_ra_pinfo - BOOLEAN
1214 Learn Prefix Information in Router Advertisement. 1228 Learn Prefix Information in Router Advertisement.
1215 1229
diff --git a/Documentation/networking/packet_mmap.txt b/Documentation/networking/packet_mmap.txt
index 38112d512f47..a6d7cb91069e 100644
--- a/Documentation/networking/packet_mmap.txt
+++ b/Documentation/networking/packet_mmap.txt
@@ -1008,14 +1008,9 @@ hardware timestamps to be used. Note: you may need to enable the generation
1008of hardware timestamps with SIOCSHWTSTAMP (see related information from 1008of hardware timestamps with SIOCSHWTSTAMP (see related information from
1009Documentation/networking/timestamping.txt). 1009Documentation/networking/timestamping.txt).
1010 1010
1011PACKET_TIMESTAMP accepts the same integer bit field as 1011PACKET_TIMESTAMP accepts the same integer bit field as SO_TIMESTAMPING:
1012SO_TIMESTAMPING. However, only the SOF_TIMESTAMPING_SYS_HARDWARE 1012
1013and SOF_TIMESTAMPING_RAW_HARDWARE values are recognized by 1013 int req = SOF_TIMESTAMPING_RAW_HARDWARE;
1014PACKET_TIMESTAMP. SOF_TIMESTAMPING_SYS_HARDWARE takes precedence over
1015SOF_TIMESTAMPING_RAW_HARDWARE if both bits are set.
1016
1017 int req = 0;
1018 req |= SOF_TIMESTAMPING_SYS_HARDWARE;
1019 setsockopt(fd, SOL_PACKET, PACKET_TIMESTAMP, (void *) &req, sizeof(req)) 1014 setsockopt(fd, SOL_PACKET, PACKET_TIMESTAMP, (void *) &req, sizeof(req))
1020 1015
1021For the mmap(2)ed ring buffers, such timestamps are stored in the 1016For the mmap(2)ed ring buffers, such timestamps are stored in the
@@ -1023,14 +1018,13 @@ tpacket{,2,3}_hdr structure's tp_sec and tp_{n,u}sec members. To determine
1023what kind of timestamp has been reported, the tp_status field is binary |'ed 1018what kind of timestamp has been reported, the tp_status field is binary |'ed
1024with the following possible bits ... 1019with the following possible bits ...
1025 1020
1026 TP_STATUS_TS_SYS_HARDWARE
1027 TP_STATUS_TS_RAW_HARDWARE 1021 TP_STATUS_TS_RAW_HARDWARE
1028 TP_STATUS_TS_SOFTWARE 1022 TP_STATUS_TS_SOFTWARE
1029 1023
1030... that are equivalent to its SOF_TIMESTAMPING_* counterparts. For the 1024... that are equivalent to its SOF_TIMESTAMPING_* counterparts. For the
1031RX_RING, if none of those 3 are set (i.e. PACKET_TIMESTAMP is not set), 1025RX_RING, if neither is set (i.e. PACKET_TIMESTAMP is not set), then a
1032then this means that a software fallback was invoked *within* PF_PACKET's 1026software fallback was invoked *within* PF_PACKET's processing code (less
1033processing code (less precise). 1027precise).
1034 1028
1035Getting timestamps for the TX_RING works as follows: i) fill the ring frames, 1029Getting timestamps for the TX_RING works as follows: i) fill the ring frames,
1036ii) call sendto() e.g. in blocking mode, iii) wait for status of relevant 1030ii) call sendto() e.g. in blocking mode, iii) wait for status of relevant
diff --git a/Documentation/networking/phy.txt b/Documentation/networking/phy.txt
index 3544c98401fd..e839e7efc835 100644
--- a/Documentation/networking/phy.txt
+++ b/Documentation/networking/phy.txt
@@ -272,6 +272,8 @@ Writing a PHY driver
272 txtsamp: Requests a transmit timestamp at the PHY level for a 'skb' 272 txtsamp: Requests a transmit timestamp at the PHY level for a 'skb'
273 set_wol: Enable Wake-on-LAN at the PHY level 273 set_wol: Enable Wake-on-LAN at the PHY level
274 get_wol: Get the Wake-on-LAN status at the PHY level 274 get_wol: Get the Wake-on-LAN status at the PHY level
275 read_mmd_indirect: Read PHY MMD indirect register
276 write_mmd_indirect: Write PHY MMD indirect register
275 277
276 Of these, only config_aneg and read_status are required to be 278 Of these, only config_aneg and read_status are required to be
277 assigned by the driver code. The rest are optional. Also, it is 279 assigned by the driver code. The rest are optional. Also, it is
@@ -284,7 +286,21 @@ Writing a PHY driver
284 286
285 Feel free to look at the Marvell, Cicada, and Davicom drivers in 287 Feel free to look at the Marvell, Cicada, and Davicom drivers in
286 drivers/net/phy/ for examples (the lxt and qsemi drivers have 288 drivers/net/phy/ for examples (the lxt and qsemi drivers have
287 not been tested as of this writing) 289 not been tested as of this writing).
290
291 The PHY's MMD register accesses are handled by the PAL framework
292 by default, but can be overridden by a specific PHY driver if
293 required. This could be the case if a PHY was released for
294 manufacturing before the MMD PHY register definitions were
295 standardized by the IEEE. Most modern PHYs will be able to use
296 the generic PAL framework for accessing the PHY's MMD registers.
297 An example of such usage is for Energy Efficient Ethernet support,
298 implemented in the PAL. This support uses the PAL to access MMD
299 registers for EEE query and configuration if the PHY supports
300 the IEEE standard access mechanisms, or can use the PHY's specific
301 access interfaces if overridden by the specific PHY driver. See
302 the Micrel driver in drivers/net/phy/ for an example of how this
303 can be implemented.
288 304
289Board Fixups 305Board Fixups
290 306
diff --git a/Documentation/networking/pktgen.txt b/Documentation/networking/pktgen.txt
index 0e30c7845b2b..0dffc6e37902 100644
--- a/Documentation/networking/pktgen.txt
+++ b/Documentation/networking/pktgen.txt
@@ -24,6 +24,34 @@ For monitoring and control pktgen creates:
24 /proc/net/pktgen/ethX 24 /proc/net/pktgen/ethX
25 25
26 26
27Tuning NIC for max performance
28==============================
29
30The default NIC setting are (likely) not tuned for pktgen's artificial
31overload type of benchmarking, as this could hurt the normal use-case.
32
33Specifically increasing the TX ring buffer in the NIC:
34 # ethtool -G ethX tx 1024
35
36A larger TX ring can improve pktgen's performance, while it can hurt
37in the general case, 1) because the TX ring buffer might get larger
38than the CPUs L1/L2 cache, 2) because it allow more queueing in the
39NIC HW layer (which is bad for bufferbloat).
40
41One should be careful to conclude, that packets/descriptors in the HW
42TX ring cause delay. Drivers usually delay cleaning up the
43ring-buffers (for various performance reasons), thus packets stalling
44the TX ring, might just be waiting for cleanup.
45
46This cleanup issues is specifically the case, for the driver ixgbe
47(Intel 82599 chip). This driver (ixgbe) combine TX+RX ring cleanups,
48and the cleanup interval is affected by the ethtool --coalesce setting
49of parameter "rx-usecs".
50
51For ixgbe use e.g "30" resulting in approx 33K interrupts/sec (1/30*10^6):
52 # ethtool -C ethX rx-usecs 30
53
54
27Viewing threads 55Viewing threads
28=============== 56===============
29/proc/net/pktgen/kpktgend_0 57/proc/net/pktgen/kpktgend_0
diff --git a/Documentation/networking/timestamping.txt b/Documentation/networking/timestamping.txt
index bc3554124903..897f942b976b 100644
--- a/Documentation/networking/timestamping.txt
+++ b/Documentation/networking/timestamping.txt
@@ -40,7 +40,7 @@ the set bits correspond to data that is available, then the control
40message will not be generated: 40message will not be generated:
41 41
42SOF_TIMESTAMPING_SOFTWARE: report systime if available 42SOF_TIMESTAMPING_SOFTWARE: report systime if available
43SOF_TIMESTAMPING_SYS_HARDWARE: report hwtimetrans if available 43SOF_TIMESTAMPING_SYS_HARDWARE: report hwtimetrans if available (deprecated)
44SOF_TIMESTAMPING_RAW_HARDWARE: report hwtimeraw if available 44SOF_TIMESTAMPING_RAW_HARDWARE: report hwtimeraw if available
45 45
46It is worth noting that timestamps may be collected for reasons other 46It is worth noting that timestamps may be collected for reasons other
@@ -88,13 +88,12 @@ hwtimeraw is the original hardware time stamp. Filled in if
88SOF_TIMESTAMPING_RAW_HARDWARE is set. No assumptions about its 88SOF_TIMESTAMPING_RAW_HARDWARE is set. No assumptions about its
89relation to system time should be made. 89relation to system time should be made.
90 90
91hwtimetrans is the hardware time stamp transformed so that it 91hwtimetrans is always zero. This field is deprecated. It used to hold
92corresponds as good as possible to system time. This correlation is 92hw timestamps converted to system time. Instead, expose the hardware
93not perfect; as a consequence, sorting packets received via different 93clock device on the NIC directly as a HW PTP clock source, to allow
94NICs by their hwtimetrans may differ from the order in which they were 94time conversion in userspace and optionally synchronize system time
95received. hwtimetrans may be non-monotonic even for the same NIC. 95with a userspace PTP stack such as linuxptp. For the PTP clock API,
96Filled in if SOF_TIMESTAMPING_SYS_HARDWARE is set. Requires support 96see Documentation/ptp/ptp.txt.
97by the network device and will be empty without that support.
98 97
99 98
100SIOCSHWTSTAMP, SIOCGHWTSTAMP: 99SIOCSHWTSTAMP, SIOCGHWTSTAMP:
@@ -185,7 +184,6 @@ struct skb_shared_hwtstamps {
185 * since arbitrary point in time 184 * since arbitrary point in time
186 */ 185 */
187 ktime_t hwtstamp; 186 ktime_t hwtstamp;
188 ktime_t syststamp; /* hwtstamp transformed to system time base */
189}; 187};
190 188
191Time stamps for outgoing packets are to be generated as follows: 189Time stamps for outgoing packets are to be generated as follows:
diff --git a/Documentation/networking/timestamping/timestamping.c b/Documentation/networking/timestamping/timestamping.c
index 8ba82bfe6a33..5cdfd743447b 100644
--- a/Documentation/networking/timestamping/timestamping.c
+++ b/Documentation/networking/timestamping/timestamping.c
@@ -76,7 +76,6 @@ static void usage(const char *error)
76 " SOF_TIMESTAMPING_RX_HARDWARE - hardware time stamping of incoming packets\n" 76 " SOF_TIMESTAMPING_RX_HARDWARE - hardware time stamping of incoming packets\n"
77 " SOF_TIMESTAMPING_RX_SOFTWARE - software fallback for incoming packets\n" 77 " SOF_TIMESTAMPING_RX_SOFTWARE - software fallback for incoming packets\n"
78 " SOF_TIMESTAMPING_SOFTWARE - request reporting of software time stamps\n" 78 " SOF_TIMESTAMPING_SOFTWARE - request reporting of software time stamps\n"
79 " SOF_TIMESTAMPING_SYS_HARDWARE - request reporting of transformed HW time stamps\n"
80 " SOF_TIMESTAMPING_RAW_HARDWARE - request reporting of raw HW time stamps\n" 79 " SOF_TIMESTAMPING_RAW_HARDWARE - request reporting of raw HW time stamps\n"
81 " SIOCGSTAMP - check last socket time stamp\n" 80 " SIOCGSTAMP - check last socket time stamp\n"
82 " SIOCGSTAMPNS - more accurate socket time stamp\n"); 81 " SIOCGSTAMPNS - more accurate socket time stamp\n");
@@ -202,9 +201,7 @@ static void printpacket(struct msghdr *msg, int res,
202 (long)stamp->tv_sec, 201 (long)stamp->tv_sec,
203 (long)stamp->tv_nsec); 202 (long)stamp->tv_nsec);
204 stamp++; 203 stamp++;
205 printf("HW transformed %ld.%09ld ", 204 /* skip deprecated HW transformed */
206 (long)stamp->tv_sec,
207 (long)stamp->tv_nsec);
208 stamp++; 205 stamp++;
209 printf("HW raw %ld.%09ld", 206 printf("HW raw %ld.%09ld",
210 (long)stamp->tv_sec, 207 (long)stamp->tv_sec,
@@ -361,8 +358,6 @@ int main(int argc, char **argv)
361 so_timestamping_flags |= SOF_TIMESTAMPING_RX_SOFTWARE; 358 so_timestamping_flags |= SOF_TIMESTAMPING_RX_SOFTWARE;
362 else if (!strcasecmp(argv[i], "SOF_TIMESTAMPING_SOFTWARE")) 359 else if (!strcasecmp(argv[i], "SOF_TIMESTAMPING_SOFTWARE"))
363 so_timestamping_flags |= SOF_TIMESTAMPING_SOFTWARE; 360 so_timestamping_flags |= SOF_TIMESTAMPING_SOFTWARE;
364 else if (!strcasecmp(argv[i], "SOF_TIMESTAMPING_SYS_HARDWARE"))
365 so_timestamping_flags |= SOF_TIMESTAMPING_SYS_HARDWARE;
366 else if (!strcasecmp(argv[i], "SOF_TIMESTAMPING_RAW_HARDWARE")) 361 else if (!strcasecmp(argv[i], "SOF_TIMESTAMPING_RAW_HARDWARE"))
367 so_timestamping_flags |= SOF_TIMESTAMPING_RAW_HARDWARE; 362 so_timestamping_flags |= SOF_TIMESTAMPING_RAW_HARDWARE;
368 else 363 else
diff --git a/Documentation/oops-tracing.txt b/Documentation/oops-tracing.txt
index e3155995ddd8..beefb9f82902 100644
--- a/Documentation/oops-tracing.txt
+++ b/Documentation/oops-tracing.txt
@@ -268,6 +268,8 @@ characters, each representing a particular tainted value.
268 14: 'E' if an unsigned module has been loaded in a kernel supporting 268 14: 'E' if an unsigned module has been loaded in a kernel supporting
269 module signature. 269 module signature.
270 270
271 15: 'L' if a soft lockup has previously occurred on the system.
272
271The primary reason for the 'Tainted: ' string is to tell kernel 273The primary reason for the 'Tainted: ' string is to tell kernel
272debuggers if this is a clean kernel or if anything unusual has 274debuggers if this is a clean kernel or if anything unusual has
273occurred. Tainting is permanent: even if an offending module is 275occurred. Tainting is permanent: even if an offending module is
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/opp.txt b/Documentation/power/opp.txt
index a9adad828cdc..c6279c2be47c 100644
--- a/Documentation/power/opp.txt
+++ b/Documentation/power/opp.txt
@@ -51,9 +51,6 @@ Typical usage of the OPP library is as follows:
51SoC framework -> modifies on required cases certain OPPs -> OPP layer 51SoC framework -> modifies on required cases certain OPPs -> OPP layer
52 -> queries to search/retrieve information -> 52 -> queries to search/retrieve information ->
53 53
54Architectures that provide a SoC framework for OPP should select ARCH_HAS_OPP
55to make the OPP layer available.
56
57OPP layer expects each domain to be represented by a unique device pointer. SoC 54OPP layer expects each domain to be represented by a unique device pointer. SoC
58framework registers a set of initial OPPs per device with the OPP layer. This 55framework registers a set of initial OPPs per device with the OPP layer. This
59list is expected to be an optimally small number typically around 5 per device. 56list is expected to be an optimally small number typically around 5 per device.
diff --git a/Documentation/power/power_supply_class.txt b/Documentation/power/power_supply_class.txt
index 89a8816990ff..48cff881cb8a 100644
--- a/Documentation/power/power_supply_class.txt
+++ b/Documentation/power/power_supply_class.txt
@@ -118,6 +118,10 @@ relative, time-based measurements.
118CONSTANT_CHARGE_CURRENT - constant charge current programmed by charger. 118CONSTANT_CHARGE_CURRENT - constant charge current programmed by charger.
119CONSTANT_CHARGE_CURRENT_MAX - maximum charge current supported by the 119CONSTANT_CHARGE_CURRENT_MAX - maximum charge current supported by the
120power supply object. 120power supply object.
121INPUT_CURRENT_LIMIT - input current limit programmed by charger. Indicates
122the current drawn from a charging source.
123CHARGE_TERM_CURRENT - Charge termination current used to detect the end of charge
124condition.
121 125
122CONSTANT_CHARGE_VOLTAGE - constant charge voltage programmed by charger. 126CONSTANT_CHARGE_VOLTAGE - constant charge voltage programmed by charger.
123CONSTANT_CHARGE_VOLTAGE_MAX - maximum charge voltage supported by the 127CONSTANT_CHARGE_VOLTAGE_MAX - maximum charge voltage supported by the
@@ -140,6 +144,8 @@ TEMP_ALERT_MAX - maximum battery temperature alert.
140TEMP_AMBIENT - ambient temperature. 144TEMP_AMBIENT - ambient temperature.
141TEMP_AMBIENT_ALERT_MIN - minimum ambient temperature alert. 145TEMP_AMBIENT_ALERT_MIN - minimum ambient temperature alert.
142TEMP_AMBIENT_ALERT_MAX - maximum ambient temperature alert. 146TEMP_AMBIENT_ALERT_MAX - maximum ambient temperature alert.
147TEMP_MIN - minimum operatable temperature
148TEMP_MAX - maximum operatable temperature
143 149
144TIME_TO_EMPTY - seconds left for battery to be considered empty (i.e. 150TIME_TO_EMPTY - seconds left for battery to be considered empty (i.e.
145while battery powers a load) 151while battery powers a load)
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/powerpc/00-INDEX b/Documentation/powerpc/00-INDEX
index 6db73df04278..a68784d0a1ee 100644
--- a/Documentation/powerpc/00-INDEX
+++ b/Documentation/powerpc/00-INDEX
@@ -17,8 +17,6 @@ firmware-assisted-dump.txt
17 - Documentation on the firmware assisted dump mechanism "fadump". 17 - Documentation on the firmware assisted dump mechanism "fadump".
18hvcs.txt 18hvcs.txt
19 - IBM "Hypervisor Virtual Console Server" Installation Guide 19 - IBM "Hypervisor Virtual Console Server" Installation Guide
20kvm_440.txt
21 - Various notes on the implementation of KVM for PowerPC 440.
22mpc52xx.txt 20mpc52xx.txt
23 - Linux 2.6.x on MPC52xx family 21 - Linux 2.6.x on MPC52xx family
24pmu-ebb.txt 22pmu-ebb.txt
diff --git a/Documentation/powerpc/kvm_440.txt b/Documentation/powerpc/kvm_440.txt
deleted file mode 100644
index c02a003fa03a..000000000000
--- a/Documentation/powerpc/kvm_440.txt
+++ /dev/null
@@ -1,41 +0,0 @@
1Hollis Blanchard <hollisb@us.ibm.com>
215 Apr 2008
3
4Various notes on the implementation of KVM for PowerPC 440:
5
6To enforce isolation, host userspace, guest kernel, and guest userspace all
7run at user privilege level. Only the host kernel runs in supervisor mode.
8Executing privileged instructions in the guest traps into KVM (in the host
9kernel), where we decode and emulate them. Through this technique, unmodified
10440 Linux kernels can be run (slowly) as guests. Future performance work will
11focus on reducing the overhead and frequency of these traps.
12
13The usual code flow is started from userspace invoking an "run" ioctl, which
14causes KVM to switch into guest context. We use IVPR to hijack the host
15interrupt vectors while running the guest, which allows us to direct all
16interrupts to kvmppc_handle_interrupt(). At this point, we could either
17- handle the interrupt completely (e.g. emulate "mtspr SPRG0"), or
18- let the host interrupt handler run (e.g. when the decrementer fires), or
19- return to host userspace (e.g. when the guest performs device MMIO)
20
21Address spaces: We take advantage of the fact that Linux doesn't use the AS=1
22address space (in host or guest), which gives us virtual address space to use
23for guest mappings. While the guest is running, the host kernel remains mapped
24in AS=0, but the guest can only use AS=1 mappings.
25
26TLB entries: The TLB entries covering the host linear mapping remain
27present while running the guest. This reduces the overhead of lightweight
28exits, which are handled by KVM running in the host kernel. We keep three
29copies of the TLB:
30 - guest TLB: contents of the TLB as the guest sees it
31 - shadow TLB: the TLB that is actually in hardware while guest is running
32 - host TLB: to restore TLB state when context switching guest -> host
33When a TLB miss occurs because a mapping was not present in the shadow TLB,
34but was present in the guest TLB, KVM handles the fault without invoking the
35guest. Large guest pages are backed by multiple 4KB shadow pages through this
36mechanism.
37
38IO: MMIO and DCR accesses are emulated by userspace. We use virtio for network
39and block IO, so those drivers must be enabled in the guest. It's possible
40that some qemu device emulation (e.g. e1000 or rtl8139) may also work with
41little effort.
diff --git a/Documentation/rapidio/tsi721.txt b/Documentation/rapidio/tsi721.txt
index 335f3c6087dc..626052f403bb 100644
--- a/Documentation/rapidio/tsi721.txt
+++ b/Documentation/rapidio/tsi721.txt
@@ -20,13 +20,26 @@ II. Known problems
20 20
21 None. 21 None.
22 22
23III. To do 23III. DMA Engine Support
24 24
25 Add DMA data transfers (non-messaging). 25Tsi721 mport driver supports DMA data transfers between local system memory and
26 Add inbound region (SRIO-to-PCIe) mapping. 26remote RapidIO devices. This functionality is implemented according to SLAVE
27mode API defined by common Linux kernel DMA Engine framework.
28
29Depending on system requirements RapidIO DMA operations can be included/excluded
30by setting CONFIG_RAPIDIO_DMA_ENGINE option. Tsi721 miniport driver uses seven
31out of eight available BDMA channels to support DMA data transfers.
32One BDMA channel is reserved for generation of maintenance read/write requests.
33
34If Tsi721 mport driver have been built with RAPIDIO_DMA_ENGINE support included,
35this driver will accept DMA-specific module parameter:
36 "dma_desc_per_channel" - defines number of hardware buffer descriptors used by
37 each BDMA channel of Tsi721 (by default - 128).
27 38
28IV. Version History 39IV. Version History
29 40
41 1.1.0 - DMA operations re-worked to support data scatter/gather lists larger
42 than hardware buffer descriptors ring.
30 1.0.0 - Initial driver release. 43 1.0.0 - Initial driver release.
31 44
32V. License 45V. License
diff --git a/Documentation/scsi/ncr53c8xx.txt b/Documentation/scsi/ncr53c8xx.txt
index cda5f8fa2c66..1d508dcbf859 100644
--- a/Documentation/scsi/ncr53c8xx.txt
+++ b/Documentation/scsi/ncr53c8xx.txt
@@ -1095,7 +1095,7 @@ SCSI_NCR_SETUP_FORCE_SYNC_NEGO (default: not defined)
1095SCSI_NCR_SETUP_MASTER_PARITY (default: defined) 1095SCSI_NCR_SETUP_MASTER_PARITY (default: defined)
1096 If defined, master parity checking is enabled. 1096 If defined, master parity checking is enabled.
1097 1097
1098SCSI_NCR_SETUP_MASTER_PARITY (default: defined) 1098SCSI_NCR_SETUP_SCSI_PARITY (default: defined)
1099 If defined, SCSI parity checking is enabled. 1099 If defined, SCSI parity checking is enabled.
1100 1100
1101SCSI_NCR_PROFILE_SUPPORT (default: not defined) 1101SCSI_NCR_PROFILE_SUPPORT (default: not defined)
diff --git a/Documentation/scsi/tmscsim.txt b/Documentation/scsi/tmscsim.txt
index 3303d218b32e..0810132772a8 100644
--- a/Documentation/scsi/tmscsim.txt
+++ b/Documentation/scsi/tmscsim.txt
@@ -317,8 +317,6 @@ Each of the parameters is a number, containing the described information:
317 4 0x10 16 Immediate return on BIOS seek command. (Not used) 317 4 0x10 16 Immediate return on BIOS seek command. (Not used)
318 (*)5 0x20 32 Check for LUNs >= 1. 318 (*)5 0x20 32 Check for LUNs >= 1.
319 319
320 The default for LUN Check depends on CONFIG_SCSI_MULTI_LUN.
321
322* TaggedCmnds is a number indicating the maximum number of Tagged Commands. 320* TaggedCmnds is a number indicating the maximum number of Tagged Commands.
323 It is the binary logarithm - 1 of the actual number. Max is 4 (32). 321 It is the binary logarithm - 1 of the actual number. Max is 4 (32).
324 Value Number of Tagged Commands 322 Value Number of Tagged Commands
diff --git a/Documentation/security/LSM.txt b/Documentation/security/LSM.txt
index c335a763a2ed..3db7e671c440 100644
--- a/Documentation/security/LSM.txt
+++ b/Documentation/security/LSM.txt
@@ -22,7 +22,7 @@ system, building their checks on top of the defined capability hooks.
22For more details on capabilities, see capabilities(7) in the Linux 22For more details on capabilities, see capabilities(7) in the Linux
23man-pages project. 23man-pages project.
24 24
25Based on http://kerneltrap.org/Linux/Documenting_Security_Module_Intent, 25Based on https://lkml.org/lkml/2007/10/26/215,
26a new LSM is accepted into the kernel when its intent (a description of 26a new LSM is accepted into the kernel when its intent (a description of
27what it tries to protect against and in what cases one would expect to 27what it tries to protect against and in what cases one would expect to
28use it) has been appropriately documented in Documentation/security/. 28use it) has been appropriately documented in Documentation/security/.
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/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
index 7ccf933bfbe0..48148d6d9307 100644
--- a/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -2026,8 +2026,8 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
2026 ------------------- 2026 -------------------
2027 2027
2028 Module for sound cards based on the Asus AV66/AV100/AV200 chips, 2028 Module for sound cards based on the Asus AV66/AV100/AV200 chips,
2029 i.e., Xonar D1, DX, D2, D2X, DS, Essence ST (Deluxe), Essence STX, 2029 i.e., Xonar D1, DX, D2, D2X, DS, DSX, Essence ST (Deluxe),
2030 HDAV1.3 (Deluxe), and HDAV1.3 Slim. 2030 Essence STX (II), HDAV1.3 (Deluxe), and HDAV1.3 Slim.
2031 2031
2032 This module supports autoprobe and multiple cards. 2032 This module supports autoprobe and multiple cards.
2033 2033
diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt
index d1ab5e17eb13..a5e754714344 100644
--- a/Documentation/sound/alsa/HD-Audio-Models.txt
+++ b/Documentation/sound/alsa/HD-Audio-Models.txt
@@ -284,6 +284,11 @@ STAC92HD83*
284 hp-zephyr HP Zephyr 284 hp-zephyr HP Zephyr
285 hp-led HP with broken BIOS for mute LED 285 hp-led HP with broken BIOS for mute LED
286 hp-inv-led HP with broken BIOS for inverted mute LED 286 hp-inv-led HP with broken BIOS for inverted mute LED
287 hp-mic-led HP with mic-mute LED
288 headset-jack Dell Latitude with a 4-pin headset jack
289 hp-envy-bass Pin fixup for HP Envy bass speaker (NID 0x0f)
290 hp-envy-ts-bass Pin fixup for HP Envy TS bass speaker (NID 0x10)
291 hp-bnb13-eq Hardware equalizer setup for HP laptops
287 auto BIOS setup (default) 292 auto BIOS setup (default)
288 293
289STAC92HD95 294STAC92HD95
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/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt
index c14374e71775..f79eb9666379 100644
--- a/Documentation/sysctl/kernel.txt
+++ b/Documentation/sysctl/kernel.txt
@@ -826,6 +826,7 @@ can be ORed together:
8264096 - An out-of-tree module has been loaded. 8264096 - An out-of-tree module has been loaded.
8278192 - An unsigned module has been loaded in a kernel supporting module 8278192 - An unsigned module has been loaded in a kernel supporting module
828 signature. 828 signature.
82916384 - A soft lockup has previously occurred on the system.
829 830
830============================================================== 831==============================================================
831 832
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/trace/postprocess/trace-vmscan-postprocess.pl b/Documentation/trace/postprocess/trace-vmscan-postprocess.pl
index 78c9a7b2b58f..8f961ef2b457 100644
--- a/Documentation/trace/postprocess/trace-vmscan-postprocess.pl
+++ b/Documentation/trace/postprocess/trace-vmscan-postprocess.pl
@@ -47,6 +47,10 @@ use constant HIGH_KSWAPD_REWAKEUP => 21;
47use constant HIGH_NR_SCANNED => 22; 47use constant HIGH_NR_SCANNED => 22;
48use constant HIGH_NR_TAKEN => 23; 48use constant HIGH_NR_TAKEN => 23;
49use constant HIGH_NR_RECLAIMED => 24; 49use constant HIGH_NR_RECLAIMED => 24;
50use constant HIGH_NR_FILE_SCANNED => 25;
51use constant HIGH_NR_ANON_SCANNED => 26;
52use constant HIGH_NR_FILE_RECLAIMED => 27;
53use constant HIGH_NR_ANON_RECLAIMED => 28;
50 54
51my %perprocesspid; 55my %perprocesspid;
52my %perprocess; 56my %perprocess;
@@ -56,14 +60,18 @@ my $opt_read_procstat;
56 60
57my $total_wakeup_kswapd; 61my $total_wakeup_kswapd;
58my ($total_direct_reclaim, $total_direct_nr_scanned); 62my ($total_direct_reclaim, $total_direct_nr_scanned);
63my ($total_direct_nr_file_scanned, $total_direct_nr_anon_scanned);
59my ($total_direct_latency, $total_kswapd_latency); 64my ($total_direct_latency, $total_kswapd_latency);
60my ($total_direct_nr_reclaimed); 65my ($total_direct_nr_reclaimed);
66my ($total_direct_nr_file_reclaimed, $total_direct_nr_anon_reclaimed);
61my ($total_direct_writepage_file_sync, $total_direct_writepage_file_async); 67my ($total_direct_writepage_file_sync, $total_direct_writepage_file_async);
62my ($total_direct_writepage_anon_sync, $total_direct_writepage_anon_async); 68my ($total_direct_writepage_anon_sync, $total_direct_writepage_anon_async);
63my ($total_kswapd_nr_scanned, $total_kswapd_wake); 69my ($total_kswapd_nr_scanned, $total_kswapd_wake);
70my ($total_kswapd_nr_file_scanned, $total_kswapd_nr_anon_scanned);
64my ($total_kswapd_writepage_file_sync, $total_kswapd_writepage_file_async); 71my ($total_kswapd_writepage_file_sync, $total_kswapd_writepage_file_async);
65my ($total_kswapd_writepage_anon_sync, $total_kswapd_writepage_anon_async); 72my ($total_kswapd_writepage_anon_sync, $total_kswapd_writepage_anon_async);
66my ($total_kswapd_nr_reclaimed); 73my ($total_kswapd_nr_reclaimed);
74my ($total_kswapd_nr_file_reclaimed, $total_kswapd_nr_anon_reclaimed);
67 75
68# Catch sigint and exit on request 76# Catch sigint and exit on request
69my $sigint_report = 0; 77my $sigint_report = 0;
@@ -374,6 +382,7 @@ EVENT_PROCESS:
374 } 382 }
375 my $isolate_mode = $1; 383 my $isolate_mode = $1;
376 my $nr_scanned = $4; 384 my $nr_scanned = $4;
385 my $file = $6;
377 386
378 # To closer match vmstat scanning statistics, only count isolate_both 387 # To closer match vmstat scanning statistics, only count isolate_both
379 # and isolate_inactive as scanning. isolate_active is rotation 388 # and isolate_inactive as scanning. isolate_active is rotation
@@ -382,6 +391,11 @@ EVENT_PROCESS:
382 # isolate_both == 3 391 # isolate_both == 3
383 if ($isolate_mode != 2) { 392 if ($isolate_mode != 2) {
384 $perprocesspid{$process_pid}->{HIGH_NR_SCANNED} += $nr_scanned; 393 $perprocesspid{$process_pid}->{HIGH_NR_SCANNED} += $nr_scanned;
394 if ($file == 1) {
395 $perprocesspid{$process_pid}->{HIGH_NR_FILE_SCANNED} += $nr_scanned;
396 } else {
397 $perprocesspid{$process_pid}->{HIGH_NR_ANON_SCANNED} += $nr_scanned;
398 }
385 } 399 }
386 } elsif ($tracepoint eq "mm_vmscan_lru_shrink_inactive") { 400 } elsif ($tracepoint eq "mm_vmscan_lru_shrink_inactive") {
387 $details = $6; 401 $details = $6;
@@ -391,8 +405,19 @@ EVENT_PROCESS:
391 print " $regex_lru_shrink_inactive/o\n"; 405 print " $regex_lru_shrink_inactive/o\n";
392 next; 406 next;
393 } 407 }
408
394 my $nr_reclaimed = $4; 409 my $nr_reclaimed = $4;
410 my $flags = $6;
411 my $file = 0;
412 if ($flags =~ /RECLAIM_WB_FILE/) {
413 $file = 1;
414 }
395 $perprocesspid{$process_pid}->{HIGH_NR_RECLAIMED} += $nr_reclaimed; 415 $perprocesspid{$process_pid}->{HIGH_NR_RECLAIMED} += $nr_reclaimed;
416 if ($file) {
417 $perprocesspid{$process_pid}->{HIGH_NR_FILE_RECLAIMED} += $nr_reclaimed;
418 } else {
419 $perprocesspid{$process_pid}->{HIGH_NR_ANON_RECLAIMED} += $nr_reclaimed;
420 }
396 } elsif ($tracepoint eq "mm_vmscan_writepage") { 421 } elsif ($tracepoint eq "mm_vmscan_writepage") {
397 $details = $6; 422 $details = $6;
398 if ($details !~ /$regex_writepage/o) { 423 if ($details !~ /$regex_writepage/o) {
@@ -493,7 +518,11 @@ sub dump_stats {
493 $total_direct_reclaim += $stats{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN}; 518 $total_direct_reclaim += $stats{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN};
494 $total_wakeup_kswapd += $stats{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD}; 519 $total_wakeup_kswapd += $stats{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD};
495 $total_direct_nr_scanned += $stats{$process_pid}->{HIGH_NR_SCANNED}; 520 $total_direct_nr_scanned += $stats{$process_pid}->{HIGH_NR_SCANNED};
521 $total_direct_nr_file_scanned += $stats{$process_pid}->{HIGH_NR_FILE_SCANNED};
522 $total_direct_nr_anon_scanned += $stats{$process_pid}->{HIGH_NR_ANON_SCANNED};
496 $total_direct_nr_reclaimed += $stats{$process_pid}->{HIGH_NR_RECLAIMED}; 523 $total_direct_nr_reclaimed += $stats{$process_pid}->{HIGH_NR_RECLAIMED};
524 $total_direct_nr_file_reclaimed += $stats{$process_pid}->{HIGH_NR_FILE_RECLAIMED};
525 $total_direct_nr_anon_reclaimed += $stats{$process_pid}->{HIGH_NR_ANON_RECLAIMED};
497 $total_direct_writepage_file_sync += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC}; 526 $total_direct_writepage_file_sync += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC};
498 $total_direct_writepage_anon_sync += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC}; 527 $total_direct_writepage_anon_sync += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC};
499 $total_direct_writepage_file_async += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC}; 528 $total_direct_writepage_file_async += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC};
@@ -513,7 +542,11 @@ sub dump_stats {
513 $stats{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN}, 542 $stats{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN},
514 $stats{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD}, 543 $stats{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD},
515 $stats{$process_pid}->{HIGH_NR_SCANNED}, 544 $stats{$process_pid}->{HIGH_NR_SCANNED},
545 $stats{$process_pid}->{HIGH_NR_FILE_SCANNED},
546 $stats{$process_pid}->{HIGH_NR_ANON_SCANNED},
516 $stats{$process_pid}->{HIGH_NR_RECLAIMED}, 547 $stats{$process_pid}->{HIGH_NR_RECLAIMED},
548 $stats{$process_pid}->{HIGH_NR_FILE_RECLAIMED},
549 $stats{$process_pid}->{HIGH_NR_ANON_RECLAIMED},
517 $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC} + $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC}, 550 $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC} + $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC},
518 $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC} + $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_ASYNC}, 551 $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC} + $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_ASYNC},
519 $this_reclaim_delay / 1000); 552 $this_reclaim_delay / 1000);
@@ -552,7 +585,11 @@ sub dump_stats {
552 585
553 $total_kswapd_wake += $stats{$process_pid}->{MM_VMSCAN_KSWAPD_WAKE}; 586 $total_kswapd_wake += $stats{$process_pid}->{MM_VMSCAN_KSWAPD_WAKE};
554 $total_kswapd_nr_scanned += $stats{$process_pid}->{HIGH_NR_SCANNED}; 587 $total_kswapd_nr_scanned += $stats{$process_pid}->{HIGH_NR_SCANNED};
588 $total_kswapd_nr_file_scanned += $stats{$process_pid}->{HIGH_NR_FILE_SCANNED};
589 $total_kswapd_nr_anon_scanned += $stats{$process_pid}->{HIGH_NR_ANON_SCANNED};
555 $total_kswapd_nr_reclaimed += $stats{$process_pid}->{HIGH_NR_RECLAIMED}; 590 $total_kswapd_nr_reclaimed += $stats{$process_pid}->{HIGH_NR_RECLAIMED};
591 $total_kswapd_nr_file_reclaimed += $stats{$process_pid}->{HIGH_NR_FILE_RECLAIMED};
592 $total_kswapd_nr_anon_reclaimed += $stats{$process_pid}->{HIGH_NR_ANON_RECLAIMED};
556 $total_kswapd_writepage_file_sync += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC}; 593 $total_kswapd_writepage_file_sync += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC};
557 $total_kswapd_writepage_anon_sync += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC}; 594 $total_kswapd_writepage_anon_sync += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC};
558 $total_kswapd_writepage_file_async += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC}; 595 $total_kswapd_writepage_file_async += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC};
@@ -563,7 +600,11 @@ sub dump_stats {
563 $stats{$process_pid}->{MM_VMSCAN_KSWAPD_WAKE}, 600 $stats{$process_pid}->{MM_VMSCAN_KSWAPD_WAKE},
564 $stats{$process_pid}->{HIGH_KSWAPD_REWAKEUP}, 601 $stats{$process_pid}->{HIGH_KSWAPD_REWAKEUP},
565 $stats{$process_pid}->{HIGH_NR_SCANNED}, 602 $stats{$process_pid}->{HIGH_NR_SCANNED},
603 $stats{$process_pid}->{HIGH_NR_FILE_SCANNED},
604 $stats{$process_pid}->{HIGH_NR_ANON_SCANNED},
566 $stats{$process_pid}->{HIGH_NR_RECLAIMED}, 605 $stats{$process_pid}->{HIGH_NR_RECLAIMED},
606 $stats{$process_pid}->{HIGH_NR_FILE_RECLAIMED},
607 $stats{$process_pid}->{HIGH_NR_ANON_RECLAIMED},
567 $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC} + $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC}, 608 $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC} + $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC},
568 $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC} + $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_ASYNC}); 609 $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC} + $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_ASYNC});
569 610
@@ -594,7 +635,11 @@ sub dump_stats {
594 print "\nSummary\n"; 635 print "\nSummary\n";
595 print "Direct reclaims: $total_direct_reclaim\n"; 636 print "Direct reclaims: $total_direct_reclaim\n";
596 print "Direct reclaim pages scanned: $total_direct_nr_scanned\n"; 637 print "Direct reclaim pages scanned: $total_direct_nr_scanned\n";
638 print "Direct reclaim file pages scanned: $total_direct_nr_file_scanned\n";
639 print "Direct reclaim anon pages scanned: $total_direct_nr_anon_scanned\n";
597 print "Direct reclaim pages reclaimed: $total_direct_nr_reclaimed\n"; 640 print "Direct reclaim pages reclaimed: $total_direct_nr_reclaimed\n";
641 print "Direct reclaim file pages reclaimed: $total_direct_nr_file_reclaimed\n";
642 print "Direct reclaim anon pages reclaimed: $total_direct_nr_anon_reclaimed\n";
598 print "Direct reclaim write file sync I/O: $total_direct_writepage_file_sync\n"; 643 print "Direct reclaim write file sync I/O: $total_direct_writepage_file_sync\n";
599 print "Direct reclaim write anon sync I/O: $total_direct_writepage_anon_sync\n"; 644 print "Direct reclaim write anon sync I/O: $total_direct_writepage_anon_sync\n";
600 print "Direct reclaim write file async I/O: $total_direct_writepage_file_async\n"; 645 print "Direct reclaim write file async I/O: $total_direct_writepage_file_async\n";
@@ -604,7 +649,11 @@ sub dump_stats {
604 print "\n"; 649 print "\n";
605 print "Kswapd wakeups: $total_kswapd_wake\n"; 650 print "Kswapd wakeups: $total_kswapd_wake\n";
606 print "Kswapd pages scanned: $total_kswapd_nr_scanned\n"; 651 print "Kswapd pages scanned: $total_kswapd_nr_scanned\n";
652 print "Kswapd file pages scanned: $total_kswapd_nr_file_scanned\n";
653 print "Kswapd anon pages scanned: $total_kswapd_nr_anon_scanned\n";
607 print "Kswapd pages reclaimed: $total_kswapd_nr_reclaimed\n"; 654 print "Kswapd pages reclaimed: $total_kswapd_nr_reclaimed\n";
655 print "Kswapd file pages reclaimed: $total_kswapd_nr_file_reclaimed\n";
656 print "Kswapd anon pages reclaimed: $total_kswapd_nr_anon_reclaimed\n";
608 print "Kswapd reclaim write file sync I/O: $total_kswapd_writepage_file_sync\n"; 657 print "Kswapd reclaim write file sync I/O: $total_kswapd_writepage_file_sync\n";
609 print "Kswapd reclaim write anon sync I/O: $total_kswapd_writepage_anon_sync\n"; 658 print "Kswapd reclaim write anon sync I/O: $total_kswapd_writepage_anon_sync\n";
610 print "Kswapd reclaim write file async I/O: $total_kswapd_writepage_file_async\n"; 659 print "Kswapd reclaim write file async I/O: $total_kswapd_writepage_file_async\n";
@@ -629,7 +678,11 @@ sub aggregate_perprocesspid() {
629 $perprocess{$process}->{MM_VMSCAN_WAKEUP_KSWAPD} += $perprocesspid{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD}; 678 $perprocess{$process}->{MM_VMSCAN_WAKEUP_KSWAPD} += $perprocesspid{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD};
630 $perprocess{$process}->{HIGH_KSWAPD_REWAKEUP} += $perprocesspid{$process_pid}->{HIGH_KSWAPD_REWAKEUP}; 679 $perprocess{$process}->{HIGH_KSWAPD_REWAKEUP} += $perprocesspid{$process_pid}->{HIGH_KSWAPD_REWAKEUP};
631 $perprocess{$process}->{HIGH_NR_SCANNED} += $perprocesspid{$process_pid}->{HIGH_NR_SCANNED}; 680 $perprocess{$process}->{HIGH_NR_SCANNED} += $perprocesspid{$process_pid}->{HIGH_NR_SCANNED};
681 $perprocess{$process}->{HIGH_NR_FILE_SCANNED} += $perprocesspid{$process_pid}->{HIGH_NR_FILE_SCANNED};
682 $perprocess{$process}->{HIGH_NR_ANON_SCANNED} += $perprocesspid{$process_pid}->{HIGH_NR_ANON_SCANNED};
632 $perprocess{$process}->{HIGH_NR_RECLAIMED} += $perprocesspid{$process_pid}->{HIGH_NR_RECLAIMED}; 683 $perprocess{$process}->{HIGH_NR_RECLAIMED} += $perprocesspid{$process_pid}->{HIGH_NR_RECLAIMED};
684 $perprocess{$process}->{HIGH_NR_FILE_RECLAIMED} += $perprocesspid{$process_pid}->{HIGH_NR_FILE_RECLAIMED};
685 $perprocess{$process}->{HIGH_NR_ANON_RECLAIMED} += $perprocesspid{$process_pid}->{HIGH_NR_ANON_RECLAIMED};
633 $perprocess{$process}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC} += $perprocesspid{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC}; 686 $perprocess{$process}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC} += $perprocesspid{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC};
634 $perprocess{$process}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC} += $perprocesspid{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC}; 687 $perprocess{$process}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC} += $perprocesspid{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC};
635 $perprocess{$process}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC} += $perprocesspid{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC}; 688 $perprocess{$process}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC} += $perprocesspid{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC};
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/vfio.txt b/Documentation/vfio.txt
index b9ca02370d46..96978eced341 100644
--- a/Documentation/vfio.txt
+++ b/Documentation/vfio.txt
@@ -305,7 +305,15 @@ faster, the map/unmap handling has been implemented in real mode which provides
305an excellent performance which has limitations such as inability to do 305an excellent performance which has limitations such as inability to do
306locked pages accounting in real time. 306locked pages accounting in real time.
307 307
308So 3 additional ioctls have been added: 3084) According to sPAPR specification, A Partitionable Endpoint (PE) is an I/O
309subtree that can be treated as a unit for the purposes of partitioning and
310error recovery. A PE may be a single or multi-function IOA (IO Adapter), a
311function of a multi-function IOA, or multiple IOAs (possibly including switch
312and bridge structures above the multiple IOAs). PPC64 guests detect PCI errors
313and recover from them via EEH RTAS services, which works on the basis of
314additional ioctl commands.
315
316So 4 additional ioctls have been added:
309 317
310 VFIO_IOMMU_SPAPR_TCE_GET_INFO - returns the size and the start 318 VFIO_IOMMU_SPAPR_TCE_GET_INFO - returns the size and the start
311 of the DMA window on the PCI bus. 319 of the DMA window on the PCI bus.
@@ -316,9 +324,12 @@ So 3 additional ioctls have been added:
316 324
317 VFIO_IOMMU_DISABLE - disables the container. 325 VFIO_IOMMU_DISABLE - disables the container.
318 326
327 VFIO_EEH_PE_OP - provides an API for EEH setup, error detection and recovery.
319 328
320The code flow from the example above should be slightly changed: 329The code flow from the example above should be slightly changed:
321 330
331 struct vfio_eeh_pe_op pe_op = { .argsz = sizeof(pe_op), .flags = 0 };
332
322 ..... 333 .....
323 /* Add the group to the container */ 334 /* Add the group to the container */
324 ioctl(group, VFIO_GROUP_SET_CONTAINER, &container); 335 ioctl(group, VFIO_GROUP_SET_CONTAINER, &container);
@@ -342,9 +353,79 @@ The code flow from the example above should be slightly changed:
342 dma_map.flags = VFIO_DMA_MAP_FLAG_READ | VFIO_DMA_MAP_FLAG_WRITE; 353 dma_map.flags = VFIO_DMA_MAP_FLAG_READ | VFIO_DMA_MAP_FLAG_WRITE;
343 354
344 /* Check here is .iova/.size are within DMA window from spapr_iommu_info */ 355 /* Check here is .iova/.size are within DMA window from spapr_iommu_info */
345
346 ioctl(container, VFIO_IOMMU_MAP_DMA, &dma_map); 356 ioctl(container, VFIO_IOMMU_MAP_DMA, &dma_map);
347 ..... 357
358 /* Get a file descriptor for the device */
359 device = ioctl(group, VFIO_GROUP_GET_DEVICE_FD, "0000:06:0d.0");
360
361 ....
362
363 /* Gratuitous device reset and go... */
364 ioctl(device, VFIO_DEVICE_RESET);
365
366 /* Make sure EEH is supported */
367 ioctl(container, VFIO_CHECK_EXTENSION, VFIO_EEH);
368
369 /* Enable the EEH functionality on the device */
370 pe_op.op = VFIO_EEH_PE_ENABLE;
371 ioctl(container, VFIO_EEH_PE_OP, &pe_op);
372
373 /* You're suggested to create additional data struct to represent
374 * PE, and put child devices belonging to same IOMMU group to the
375 * PE instance for later reference.
376 */
377
378 /* Check the PE's state and make sure it's in functional state */
379 pe_op.op = VFIO_EEH_PE_GET_STATE;
380 ioctl(container, VFIO_EEH_PE_OP, &pe_op);
381
382 /* Save device state using pci_save_state().
383 * EEH should be enabled on the specified device.
384 */
385
386 ....
387
388 /* When 0xFF's returned from reading PCI config space or IO BARs
389 * of the PCI device. Check the PE's state to see if that has been
390 * frozen.
391 */
392 ioctl(container, VFIO_EEH_PE_OP, &pe_op);
393
394 /* Waiting for pending PCI transactions to be completed and don't
395 * produce any more PCI traffic from/to the affected PE until
396 * recovery is finished.
397 */
398
399 /* Enable IO for the affected PE and collect logs. Usually, the
400 * standard part of PCI config space, AER registers are dumped
401 * as logs for further analysis.
402 */
403 pe_op.op = VFIO_EEH_PE_UNFREEZE_IO;
404 ioctl(container, VFIO_EEH_PE_OP, &pe_op);
405
406 /*
407 * Issue PE reset: hot or fundamental reset. Usually, hot reset
408 * is enough. However, the firmware of some PCI adapters would
409 * require fundamental reset.
410 */
411 pe_op.op = VFIO_EEH_PE_RESET_HOT;
412 ioctl(container, VFIO_EEH_PE_OP, &pe_op);
413 pe_op.op = VFIO_EEH_PE_RESET_DEACTIVATE;
414 ioctl(container, VFIO_EEH_PE_OP, &pe_op);
415
416 /* Configure the PCI bridges for the affected PE */
417 pe_op.op = VFIO_EEH_PE_CONFIGURE;
418 ioctl(container, VFIO_EEH_PE_OP, &pe_op);
419
420 /* Restored state we saved at initialization time. pci_restore_state()
421 * is good enough as an example.
422 */
423
424 /* Hopefully, error is recovered successfully. Now, you can resume to
425 * start PCI traffic to/from the affected PE.
426 */
427
428 ....
348 429
349------------------------------------------------------------------------------- 430-------------------------------------------------------------------------------
350 431
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..beae3fde075e 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -148,9 +148,9 @@ of banks, as set via the KVM_X86_SETUP_MCE ioctl.
148 148
1494.4 KVM_CHECK_EXTENSION 1494.4 KVM_CHECK_EXTENSION
150 150
151Capability: basic 151Capability: basic, KVM_CAP_CHECK_EXTENSION_VM for vm ioctl
152Architectures: all 152Architectures: all
153Type: system ioctl 153Type: system ioctl, vm ioctl
154Parameters: extension identifier (KVM_CAP_*) 154Parameters: extension identifier (KVM_CAP_*)
155Returns: 0 if unsupported; 1 (or some other positive integer) if supported 155Returns: 0 if unsupported; 1 (or some other positive integer) if supported
156 156
@@ -160,6 +160,9 @@ receives an integer that describes the extension availability.
160Generally 0 means no and 1 means yes, but some extensions may report 160Generally 0 means no and 1 means yes, but some extensions may report
161additional information in the integer return value. 161additional information in the integer return value.
162 162
163Based on their initialization different VMs may have different capabilities.
164It is thus encouraged to use the vm ioctl to query for capabilities (available
165with KVM_CAP_CHECK_EXTENSION_VM on the vm fd)
163 166
1644.5 KVM_GET_VCPU_MMAP_SIZE 1674.5 KVM_GET_VCPU_MMAP_SIZE
165 168
@@ -297,6 +300,15 @@ struct kvm_regs {
297 __u64 rip, rflags; 300 __u64 rip, rflags;
298}; 301};
299 302
303/* mips */
304struct kvm_regs {
305 /* out (KVM_GET_REGS) / in (KVM_SET_REGS) */
306 __u64 gpr[32];
307 __u64 hi;
308 __u64 lo;
309 __u64 pc;
310};
311
300 312
3014.12 KVM_SET_REGS 3134.12 KVM_SET_REGS
302 314
@@ -378,7 +390,7 @@ struct kvm_translation {
3784.16 KVM_INTERRUPT 3904.16 KVM_INTERRUPT
379 391
380Capability: basic 392Capability: basic
381Architectures: x86, ppc 393Architectures: x86, ppc, mips
382Type: vcpu ioctl 394Type: vcpu ioctl
383Parameters: struct kvm_interrupt (in) 395Parameters: struct kvm_interrupt (in)
384Returns: 0 on success, -1 on error 396Returns: 0 on success, -1 on error
@@ -423,6 +435,11 @@ c) KVM_INTERRUPT_SET_LEVEL
423Note that any value for 'irq' other than the ones stated above is invalid 435Note that any value for 'irq' other than the ones stated above is invalid
424and incurs unexpected behavior. 436and incurs unexpected behavior.
425 437
438MIPS:
439
440Queues an external interrupt to be injected into the virtual CPU. A negative
441interrupt number dequeues the interrupt.
442
426 443
4274.17 KVM_DEBUG_GUEST 4444.17 KVM_DEBUG_GUEST
428 445
@@ -512,7 +529,7 @@ struct kvm_cpuid {
5124.21 KVM_SET_SIGNAL_MASK 5294.21 KVM_SET_SIGNAL_MASK
513 530
514Capability: basic 531Capability: basic
515Architectures: x86 532Architectures: all
516Type: vcpu ioctl 533Type: vcpu ioctl
517Parameters: struct kvm_signal_mask (in) 534Parameters: struct kvm_signal_mask (in)
518Returns: 0 on success, -1 on error 535Returns: 0 on success, -1 on error
@@ -974,7 +991,7 @@ for vm-wide capabilities.
9744.38 KVM_GET_MP_STATE 9914.38 KVM_GET_MP_STATE
975 992
976Capability: KVM_CAP_MP_STATE 993Capability: KVM_CAP_MP_STATE
977Architectures: x86, ia64 994Architectures: x86, ia64, s390
978Type: vcpu ioctl 995Type: vcpu ioctl
979Parameters: struct kvm_mp_state (out) 996Parameters: struct kvm_mp_state (out)
980Returns: 0 on success; -1 on error 997Returns: 0 on success; -1 on error
@@ -988,24 +1005,32 @@ uniprocessor guests).
988 1005
989Possible values are: 1006Possible values are:
990 1007
991 - KVM_MP_STATE_RUNNABLE: the vcpu is currently running 1008 - KVM_MP_STATE_RUNNABLE: the vcpu is currently running [x86, ia64]
992 - KVM_MP_STATE_UNINITIALIZED: the vcpu is an application processor (AP) 1009 - KVM_MP_STATE_UNINITIALIZED: the vcpu is an application processor (AP)
993 which has not yet received an INIT signal 1010 which has not yet received an INIT signal [x86,
1011 ia64]
994 - KVM_MP_STATE_INIT_RECEIVED: the vcpu has received an INIT signal, and is 1012 - KVM_MP_STATE_INIT_RECEIVED: the vcpu has received an INIT signal, and is
995 now ready for a SIPI 1013 now ready for a SIPI [x86, ia64]
996 - KVM_MP_STATE_HALTED: the vcpu has executed a HLT instruction and 1014 - KVM_MP_STATE_HALTED: the vcpu has executed a HLT instruction and
997 is waiting for an interrupt 1015 is waiting for an interrupt [x86, ia64]
998 - KVM_MP_STATE_SIPI_RECEIVED: the vcpu has just received a SIPI (vector 1016 - KVM_MP_STATE_SIPI_RECEIVED: the vcpu has just received a SIPI (vector
999 accessible via KVM_GET_VCPU_EVENTS) 1017 accessible via KVM_GET_VCPU_EVENTS) [x86, ia64]
1018 - KVM_MP_STATE_STOPPED: the vcpu is stopped [s390]
1019 - KVM_MP_STATE_CHECK_STOP: the vcpu is in a special error state [s390]
1020 - KVM_MP_STATE_OPERATING: the vcpu is operating (running or halted)
1021 [s390]
1022 - KVM_MP_STATE_LOAD: the vcpu is in a special load/startup state
1023 [s390]
1000 1024
1001This ioctl is only useful after KVM_CREATE_IRQCHIP. Without an in-kernel 1025On x86 and ia64, this ioctl is only useful after KVM_CREATE_IRQCHIP. Without an
1002irqchip, the multiprocessing state must be maintained by userspace. 1026in-kernel irqchip, the multiprocessing state must be maintained by userspace on
1027these architectures.
1003 1028
1004 1029
10054.39 KVM_SET_MP_STATE 10304.39 KVM_SET_MP_STATE
1006 1031
1007Capability: KVM_CAP_MP_STATE 1032Capability: KVM_CAP_MP_STATE
1008Architectures: x86, ia64 1033Architectures: x86, ia64, s390
1009Type: vcpu ioctl 1034Type: vcpu ioctl
1010Parameters: struct kvm_mp_state (in) 1035Parameters: struct kvm_mp_state (in)
1011Returns: 0 on success; -1 on error 1036Returns: 0 on success; -1 on error
@@ -1013,8 +1038,9 @@ Returns: 0 on success; -1 on error
1013Sets the vcpu's current "multiprocessing state"; see KVM_GET_MP_STATE for 1038Sets the vcpu's current "multiprocessing state"; see KVM_GET_MP_STATE for
1014arguments. 1039arguments.
1015 1040
1016This ioctl is only useful after KVM_CREATE_IRQCHIP. Without an in-kernel 1041On x86 and ia64, this ioctl is only useful after KVM_CREATE_IRQCHIP. Without an
1017irqchip, the multiprocessing state must be maintained by userspace. 1042in-kernel irqchip, the multiprocessing state must be maintained by userspace on
1043these architectures.
1018 1044
1019 1045
10204.40 KVM_SET_IDENTITY_MAP_ADDR 10464.40 KVM_SET_IDENTITY_MAP_ADDR
@@ -1774,122 +1800,152 @@ and architecture specific registers. Each have their own range of operation
1774and their own constants and width. To keep track of the implemented 1800and their own constants and width. To keep track of the implemented
1775registers, find a list below: 1801registers, find a list below:
1776 1802
1777 Arch | Register | Width (bits) 1803 Arch | Register | Width (bits)
1778 | | 1804 | |
1779 PPC | KVM_REG_PPC_HIOR | 64 1805 PPC | KVM_REG_PPC_HIOR | 64
1780 PPC | KVM_REG_PPC_IAC1 | 64 1806 PPC | KVM_REG_PPC_IAC1 | 64
1781 PPC | KVM_REG_PPC_IAC2 | 64 1807 PPC | KVM_REG_PPC_IAC2 | 64
1782 PPC | KVM_REG_PPC_IAC3 | 64 1808 PPC | KVM_REG_PPC_IAC3 | 64
1783 PPC | KVM_REG_PPC_IAC4 | 64 1809 PPC | KVM_REG_PPC_IAC4 | 64
1784 PPC | KVM_REG_PPC_DAC1 | 64 1810 PPC | KVM_REG_PPC_DAC1 | 64
1785 PPC | KVM_REG_PPC_DAC2 | 64 1811 PPC | KVM_REG_PPC_DAC2 | 64
1786 PPC | KVM_REG_PPC_DABR | 64 1812 PPC | KVM_REG_PPC_DABR | 64
1787 PPC | KVM_REG_PPC_DSCR | 64 1813 PPC | KVM_REG_PPC_DSCR | 64
1788 PPC | KVM_REG_PPC_PURR | 64 1814 PPC | KVM_REG_PPC_PURR | 64
1789 PPC | KVM_REG_PPC_SPURR | 64 1815 PPC | KVM_REG_PPC_SPURR | 64
1790 PPC | KVM_REG_PPC_DAR | 64 1816 PPC | KVM_REG_PPC_DAR | 64
1791 PPC | KVM_REG_PPC_DSISR | 32 1817 PPC | KVM_REG_PPC_DSISR | 32
1792 PPC | KVM_REG_PPC_AMR | 64 1818 PPC | KVM_REG_PPC_AMR | 64
1793 PPC | KVM_REG_PPC_UAMOR | 64 1819 PPC | KVM_REG_PPC_UAMOR | 64
1794 PPC | KVM_REG_PPC_MMCR0 | 64 1820 PPC | KVM_REG_PPC_MMCR0 | 64
1795 PPC | KVM_REG_PPC_MMCR1 | 64 1821 PPC | KVM_REG_PPC_MMCR1 | 64
1796 PPC | KVM_REG_PPC_MMCRA | 64 1822 PPC | KVM_REG_PPC_MMCRA | 64
1797 PPC | KVM_REG_PPC_MMCR2 | 64 1823 PPC | KVM_REG_PPC_MMCR2 | 64
1798 PPC | KVM_REG_PPC_MMCRS | 64 1824 PPC | KVM_REG_PPC_MMCRS | 64
1799 PPC | KVM_REG_PPC_SIAR | 64 1825 PPC | KVM_REG_PPC_SIAR | 64
1800 PPC | KVM_REG_PPC_SDAR | 64 1826 PPC | KVM_REG_PPC_SDAR | 64
1801 PPC | KVM_REG_PPC_SIER | 64 1827 PPC | KVM_REG_PPC_SIER | 64
1802 PPC | KVM_REG_PPC_PMC1 | 32 1828 PPC | KVM_REG_PPC_PMC1 | 32
1803 PPC | KVM_REG_PPC_PMC2 | 32 1829 PPC | KVM_REG_PPC_PMC2 | 32
1804 PPC | KVM_REG_PPC_PMC3 | 32 1830 PPC | KVM_REG_PPC_PMC3 | 32
1805 PPC | KVM_REG_PPC_PMC4 | 32 1831 PPC | KVM_REG_PPC_PMC4 | 32
1806 PPC | KVM_REG_PPC_PMC5 | 32 1832 PPC | KVM_REG_PPC_PMC5 | 32
1807 PPC | KVM_REG_PPC_PMC6 | 32 1833 PPC | KVM_REG_PPC_PMC6 | 32
1808 PPC | KVM_REG_PPC_PMC7 | 32 1834 PPC | KVM_REG_PPC_PMC7 | 32
1809 PPC | KVM_REG_PPC_PMC8 | 32 1835 PPC | KVM_REG_PPC_PMC8 | 32
1810 PPC | KVM_REG_PPC_FPR0 | 64 1836 PPC | KVM_REG_PPC_FPR0 | 64
1837 ...
1838 PPC | KVM_REG_PPC_FPR31 | 64
1839 PPC | KVM_REG_PPC_VR0 | 128
1811 ... 1840 ...
1812 PPC | KVM_REG_PPC_FPR31 | 64 1841 PPC | KVM_REG_PPC_VR31 | 128
1813 PPC | KVM_REG_PPC_VR0 | 128 1842 PPC | KVM_REG_PPC_VSR0 | 128
1814 ... 1843 ...
1815 PPC | KVM_REG_PPC_VR31 | 128 1844 PPC | KVM_REG_PPC_VSR31 | 128
1816 PPC | KVM_REG_PPC_VSR0 | 128 1845 PPC | KVM_REG_PPC_FPSCR | 64
1846 PPC | KVM_REG_PPC_VSCR | 32
1847 PPC | KVM_REG_PPC_VPA_ADDR | 64
1848 PPC | KVM_REG_PPC_VPA_SLB | 128
1849 PPC | KVM_REG_PPC_VPA_DTL | 128
1850 PPC | KVM_REG_PPC_EPCR | 32
1851 PPC | KVM_REG_PPC_EPR | 32
1852 PPC | KVM_REG_PPC_TCR | 32
1853 PPC | KVM_REG_PPC_TSR | 32
1854 PPC | KVM_REG_PPC_OR_TSR | 32
1855 PPC | KVM_REG_PPC_CLEAR_TSR | 32
1856 PPC | KVM_REG_PPC_MAS0 | 32
1857 PPC | KVM_REG_PPC_MAS1 | 32
1858 PPC | KVM_REG_PPC_MAS2 | 64
1859 PPC | KVM_REG_PPC_MAS7_3 | 64
1860 PPC | KVM_REG_PPC_MAS4 | 32
1861 PPC | KVM_REG_PPC_MAS6 | 32
1862 PPC | KVM_REG_PPC_MMUCFG | 32
1863 PPC | KVM_REG_PPC_TLB0CFG | 32
1864 PPC | KVM_REG_PPC_TLB1CFG | 32
1865 PPC | KVM_REG_PPC_TLB2CFG | 32
1866 PPC | KVM_REG_PPC_TLB3CFG | 32
1867 PPC | KVM_REG_PPC_TLB0PS | 32
1868 PPC | KVM_REG_PPC_TLB1PS | 32
1869 PPC | KVM_REG_PPC_TLB2PS | 32
1870 PPC | KVM_REG_PPC_TLB3PS | 32
1871 PPC | KVM_REG_PPC_EPTCFG | 32
1872 PPC | KVM_REG_PPC_ICP_STATE | 64
1873 PPC | KVM_REG_PPC_TB_OFFSET | 64
1874 PPC | KVM_REG_PPC_SPMC1 | 32
1875 PPC | KVM_REG_PPC_SPMC2 | 32
1876 PPC | KVM_REG_PPC_IAMR | 64
1877 PPC | KVM_REG_PPC_TFHAR | 64
1878 PPC | KVM_REG_PPC_TFIAR | 64
1879 PPC | KVM_REG_PPC_TEXASR | 64
1880 PPC | KVM_REG_PPC_FSCR | 64
1881 PPC | KVM_REG_PPC_PSPB | 32
1882 PPC | KVM_REG_PPC_EBBHR | 64
1883 PPC | KVM_REG_PPC_EBBRR | 64
1884 PPC | KVM_REG_PPC_BESCR | 64
1885 PPC | KVM_REG_PPC_TAR | 64
1886 PPC | KVM_REG_PPC_DPDES | 64
1887 PPC | KVM_REG_PPC_DAWR | 64
1888 PPC | KVM_REG_PPC_DAWRX | 64
1889 PPC | KVM_REG_PPC_CIABR | 64
1890 PPC | KVM_REG_PPC_IC | 64
1891 PPC | KVM_REG_PPC_VTB | 64
1892 PPC | KVM_REG_PPC_CSIGR | 64
1893 PPC | KVM_REG_PPC_TACR | 64
1894 PPC | KVM_REG_PPC_TCSCR | 64
1895 PPC | KVM_REG_PPC_PID | 64
1896 PPC | KVM_REG_PPC_ACOP | 64
1897 PPC | KVM_REG_PPC_VRSAVE | 32
1898 PPC | KVM_REG_PPC_LPCR | 32
1899 PPC | KVM_REG_PPC_LPCR_64 | 64
1900 PPC | KVM_REG_PPC_PPR | 64
1901 PPC | KVM_REG_PPC_ARCH_COMPAT | 32
1902 PPC | KVM_REG_PPC_DABRX | 32
1903 PPC | KVM_REG_PPC_WORT | 64
1904 PPC | KVM_REG_PPC_TM_GPR0 | 64
1817 ... 1905 ...
1818 PPC | KVM_REG_PPC_VSR31 | 128 1906 PPC | KVM_REG_PPC_TM_GPR31 | 64
1819 PPC | KVM_REG_PPC_FPSCR | 64 1907 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 ... 1908 ...
1879 PPC | KVM_REG_PPC_TM_GPR31 | 64 1909 PPC | KVM_REG_PPC_TM_VSR63 | 128
1880 PPC | KVM_REG_PPC_TM_VSR0 | 128 1910 PPC | KVM_REG_PPC_TM_CR | 64
1911 PPC | KVM_REG_PPC_TM_LR | 64
1912 PPC | KVM_REG_PPC_TM_CTR | 64
1913 PPC | KVM_REG_PPC_TM_FPSCR | 64
1914 PPC | KVM_REG_PPC_TM_AMR | 64
1915 PPC | KVM_REG_PPC_TM_PPR | 64
1916 PPC | KVM_REG_PPC_TM_VRSAVE | 64
1917 PPC | KVM_REG_PPC_TM_VSCR | 32
1918 PPC | KVM_REG_PPC_TM_DSCR | 64
1919 PPC | KVM_REG_PPC_TM_TAR | 64
1920 | |
1921 MIPS | KVM_REG_MIPS_R0 | 64
1881 ... 1922 ...
1882 PPC | KVM_REG_PPC_TM_VSR63 | 128 1923 MIPS | KVM_REG_MIPS_R31 | 64
1883 PPC | KVM_REG_PPC_TM_CR | 64 1924 MIPS | KVM_REG_MIPS_HI | 64
1884 PPC | KVM_REG_PPC_TM_LR | 64 1925 MIPS | KVM_REG_MIPS_LO | 64
1885 PPC | KVM_REG_PPC_TM_CTR | 64 1926 MIPS | KVM_REG_MIPS_PC | 64
1886 PPC | KVM_REG_PPC_TM_FPSCR | 64 1927 MIPS | KVM_REG_MIPS_CP0_INDEX | 32
1887 PPC | KVM_REG_PPC_TM_AMR | 64 1928 MIPS | KVM_REG_MIPS_CP0_CONTEXT | 64
1888 PPC | KVM_REG_PPC_TM_PPR | 64 1929 MIPS | KVM_REG_MIPS_CP0_USERLOCAL | 64
1889 PPC | KVM_REG_PPC_TM_VRSAVE | 64 1930 MIPS | KVM_REG_MIPS_CP0_PAGEMASK | 32
1890 PPC | KVM_REG_PPC_TM_VSCR | 32 1931 MIPS | KVM_REG_MIPS_CP0_WIRED | 32
1891 PPC | KVM_REG_PPC_TM_DSCR | 64 1932 MIPS | KVM_REG_MIPS_CP0_HWRENA | 32
1892 PPC | KVM_REG_PPC_TM_TAR | 64 1933 MIPS | KVM_REG_MIPS_CP0_BADVADDR | 64
1934 MIPS | KVM_REG_MIPS_CP0_COUNT | 32
1935 MIPS | KVM_REG_MIPS_CP0_ENTRYHI | 64
1936 MIPS | KVM_REG_MIPS_CP0_COMPARE | 32
1937 MIPS | KVM_REG_MIPS_CP0_STATUS | 32
1938 MIPS | KVM_REG_MIPS_CP0_CAUSE | 32
1939 MIPS | KVM_REG_MIPS_CP0_EPC | 64
1940 MIPS | KVM_REG_MIPS_CP0_CONFIG | 32
1941 MIPS | KVM_REG_MIPS_CP0_CONFIG1 | 32
1942 MIPS | KVM_REG_MIPS_CP0_CONFIG2 | 32
1943 MIPS | KVM_REG_MIPS_CP0_CONFIG3 | 32
1944 MIPS | KVM_REG_MIPS_CP0_CONFIG7 | 32
1945 MIPS | KVM_REG_MIPS_CP0_ERROREPC | 64
1946 MIPS | KVM_REG_MIPS_COUNT_CTL | 64
1947 MIPS | KVM_REG_MIPS_COUNT_RESUME | 64
1948 MIPS | KVM_REG_MIPS_COUNT_HZ | 64
1893 1949
1894ARM registers are mapped using the lower 32 bits. The upper 16 of that 1950ARM registers are mapped using the lower 32 bits. The upper 16 of that
1895is the register group type, or coprocessor number: 1951is the register group type, or coprocessor number:
@@ -1928,6 +1984,22 @@ arm64 CCSIDR registers are demultiplexed by CSSELR value:
1928arm64 system registers have the following id bit patterns: 1984arm64 system registers have the following id bit patterns:
1929 0x6030 0000 0013 <op0:2> <op1:3> <crn:4> <crm:4> <op2:3> 1985 0x6030 0000 0013 <op0:2> <op1:3> <crn:4> <crm:4> <op2:3>
1930 1986
1987
1988MIPS registers are mapped using the lower 32 bits. The upper 16 of that is
1989the register group type:
1990
1991MIPS core registers (see above) have the following id bit patterns:
1992 0x7030 0000 0000 <reg:16>
1993
1994MIPS CP0 registers (see KVM_REG_MIPS_CP0_* above) have the following id bit
1995patterns depending on whether they're 32-bit or 64-bit registers:
1996 0x7020 0000 0001 00 <reg:5> <sel:3> (32-bit)
1997 0x7030 0000 0001 00 <reg:5> <sel:3> (64-bit)
1998
1999MIPS KVM control registers (see above) have the following id bit patterns:
2000 0x7030 0000 0002 <reg:16>
2001
2002
19314.69 KVM_GET_ONE_REG 20034.69 KVM_GET_ONE_REG
1932 2004
1933Capability: KVM_CAP_ONE_REG 2005Capability: KVM_CAP_ONE_REG
@@ -2415,7 +2487,7 @@ in VCPU matching underlying host.
24154.84 KVM_GET_REG_LIST 24874.84 KVM_GET_REG_LIST
2416 2488
2417Capability: basic 2489Capability: basic
2418Architectures: arm, arm64 2490Architectures: arm, arm64, mips
2419Type: vcpu ioctl 2491Type: vcpu ioctl
2420Parameters: struct kvm_reg_list (in/out) 2492Parameters: struct kvm_reg_list (in/out)
2421Returns: 0 on success; -1 on error 2493Returns: 0 on success; -1 on error
@@ -2609,8 +2681,8 @@ The 'data' member contains, in its first 'len' bytes, the value as it would
2609appear if the VCPU performed a load or store of the appropriate width directly 2681appear if the VCPU performed a load or store of the appropriate width directly
2610to the byte array. 2682to the byte array.
2611 2683
2612NOTE: For KVM_EXIT_IO, KVM_EXIT_MMIO, KVM_EXIT_OSI, KVM_EXIT_DCR, 2684NOTE: For KVM_EXIT_IO, KVM_EXIT_MMIO, KVM_EXIT_OSI, KVM_EXIT_PAPR and
2613 KVM_EXIT_PAPR and KVM_EXIT_EPR the corresponding 2685 KVM_EXIT_EPR the corresponding
2614operations are complete (and guest state is consistent) only after userspace 2686operations are complete (and guest state is consistent) only after userspace
2615has re-entered the kernel with KVM_RUN. The kernel side will first finish 2687has re-entered the kernel with KVM_RUN. The kernel side will first finish
2616incomplete operations and then check for pending signals. Userspace 2688incomplete operations and then check for pending signals. Userspace
@@ -2681,7 +2753,7 @@ Principles of Operation Book in the Chapter for Dynamic Address Translation
2681 __u8 is_write; 2753 __u8 is_write;
2682 } dcr; 2754 } dcr;
2683 2755
2684powerpc specific. 2756Deprecated - was used for 440 KVM.
2685 2757
2686 /* KVM_EXIT_OSI */ 2758 /* KVM_EXIT_OSI */
2687 struct { 2759 struct {
@@ -2863,18 +2935,21 @@ The fields in each entry are defined as follows:
2863 this function/index combination 2935 this function/index combination
2864 2936
2865 2937
28666. Capabilities that can be enabled 29386. Capabilities that can be enabled on vCPUs
2867----------------------------------- 2939--------------------------------------------
2868 2940
2869There are certain capabilities that change the behavior of the virtual CPU when 2941There 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 2942the virtual machine when enabled. To enable them, please see section 4.37.
2871capabilities and what their effect on the vCPU is when enabling them. 2943Below you can find a list of capabilities and what their effect on the vCPU or
2944the virtual machine is when enabling them.
2872 2945
2873The following information is provided along with the description: 2946The following information is provided along with the description:
2874 2947
2875 Architectures: which instruction set architectures provide this ioctl. 2948 Architectures: which instruction set architectures provide this ioctl.
2876 x86 includes both i386 and x86_64. 2949 x86 includes both i386 and x86_64.
2877 2950
2951 Target: whether this is a per-vcpu or per-vm capability.
2952
2878 Parameters: what parameters are accepted by the capability. 2953 Parameters: what parameters are accepted by the capability.
2879 2954
2880 Returns: the return value. General error numbers (EBADF, ENOMEM, EINVAL) 2955 Returns: the return value. General error numbers (EBADF, ENOMEM, EINVAL)
@@ -2884,6 +2959,7 @@ The following information is provided along with the description:
28846.1 KVM_CAP_PPC_OSI 29596.1 KVM_CAP_PPC_OSI
2885 2960
2886Architectures: ppc 2961Architectures: ppc
2962Target: vcpu
2887Parameters: none 2963Parameters: none
2888Returns: 0 on success; -1 on error 2964Returns: 0 on success; -1 on error
2889 2965
@@ -2898,6 +2974,7 @@ When this capability is enabled, KVM_EXIT_OSI can occur.
28986.2 KVM_CAP_PPC_PAPR 29746.2 KVM_CAP_PPC_PAPR
2899 2975
2900Architectures: ppc 2976Architectures: ppc
2977Target: vcpu
2901Parameters: none 2978Parameters: none
2902Returns: 0 on success; -1 on error 2979Returns: 0 on success; -1 on error
2903 2980
@@ -2917,6 +2994,7 @@ When this capability is enabled, KVM_EXIT_PAPR_HCALL can occur.
29176.3 KVM_CAP_SW_TLB 29946.3 KVM_CAP_SW_TLB
2918 2995
2919Architectures: ppc 2996Architectures: ppc
2997Target: vcpu
2920Parameters: args[0] is the address of a struct kvm_config_tlb 2998Parameters: args[0] is the address of a struct kvm_config_tlb
2921Returns: 0 on success; -1 on error 2999Returns: 0 on success; -1 on error
2922 3000
@@ -2959,6 +3037,7 @@ For mmu types KVM_MMU_FSL_BOOKE_NOHV and KVM_MMU_FSL_BOOKE_HV:
29596.4 KVM_CAP_S390_CSS_SUPPORT 30376.4 KVM_CAP_S390_CSS_SUPPORT
2960 3038
2961Architectures: s390 3039Architectures: s390
3040Target: vcpu
2962Parameters: none 3041Parameters: none
2963Returns: 0 on success; -1 on error 3042Returns: 0 on success; -1 on error
2964 3043
@@ -2970,9 +3049,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 3049When this capability is enabled, KVM_EXIT_S390_TSCH will occur on TEST
2971SUBCHANNEL intercepts. 3050SUBCHANNEL intercepts.
2972 3051
3052Note that even though this capability is enabled per-vcpu, the complete
3053virtual machine is affected.
3054
29736.5 KVM_CAP_PPC_EPR 30556.5 KVM_CAP_PPC_EPR
2974 3056
2975Architectures: ppc 3057Architectures: ppc
3058Target: vcpu
2976Parameters: args[0] defines whether the proxy facility is active 3059Parameters: args[0] defines whether the proxy facility is active
2977Returns: 0 on success; -1 on error 3060Returns: 0 on success; -1 on error
2978 3061
@@ -2998,7 +3081,57 @@ This capability connects the vcpu to an in-kernel MPIC device.
29986.7 KVM_CAP_IRQ_XICS 30816.7 KVM_CAP_IRQ_XICS
2999 3082
3000Architectures: ppc 3083Architectures: ppc
3084Target: vcpu
3001Parameters: args[0] is the XICS device fd 3085Parameters: args[0] is the XICS device fd
3002 args[1] is the XICS CPU number (server ID) for this vcpu 3086 args[1] is the XICS CPU number (server ID) for this vcpu
3003 3087
3004This capability connects the vcpu to an in-kernel XICS device. 3088This capability connects the vcpu to an in-kernel XICS device.
3089
30906.8 KVM_CAP_S390_IRQCHIP
3091
3092Architectures: s390
3093Target: vm
3094Parameters: none
3095
3096This capability enables the in-kernel irqchip for s390. Please refer to
3097"4.24 KVM_CREATE_IRQCHIP" for details.
3098
30997. Capabilities that can be enabled on VMs
3100------------------------------------------
3101
3102There are certain capabilities that change the behavior of the virtual
3103machine when enabled. To enable them, please see section 4.37. Below
3104you can find a list of capabilities and what their effect on the VM
3105is when enabling them.
3106
3107The following information is provided along with the description:
3108
3109 Architectures: which instruction set architectures provide this ioctl.
3110 x86 includes both i386 and x86_64.
3111
3112 Parameters: what parameters are accepted by the capability.
3113
3114 Returns: the return value. General error numbers (EBADF, ENOMEM, EINVAL)
3115 are not detailed, but errors with specific meanings are.
3116
3117
31187.1 KVM_CAP_PPC_ENABLE_HCALL
3119
3120Architectures: ppc
3121Parameters: args[0] is the sPAPR hcall number
3122 args[1] is 0 to disable, 1 to enable in-kernel handling
3123
3124This capability controls whether individual sPAPR hypercalls (hcalls)
3125get handled by the kernel or not. Enabling or disabling in-kernel
3126handling of an hcall is effective across the VM. On creation, an
3127initial set of hcalls are enabled for in-kernel handling, which
3128consists of those hcalls for which in-kernel handlers were implemented
3129before this capability was implemented. If disabled, the kernel will
3130not to attempt to handle the hcall, but will always exit to userspace
3131to handle it. Note that it may not make sense to enable some and
3132disable others of a group of related hcalls, but KVM does not prevent
3133userspace from doing that.
3134
3135If the hcall number specified is not one that has an in-kernel
3136implementation, the KVM_ENABLE_CAP ioctl will fail with an EINVAL
3137error.
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/watchdog/watchdog-api.txt b/Documentation/watchdog/watchdog-api.txt
index eb7132ed8bbc..b3a701f48118 100644
--- a/Documentation/watchdog/watchdog-api.txt
+++ b/Documentation/watchdog/watchdog-api.txt
@@ -118,7 +118,7 @@ resets.
118Note that the pretimeout is the number of seconds before the time 118Note that the pretimeout is the number of seconds before the time
119when the timeout will go off. It is not the number of seconds until 119when the timeout will go off. It is not the number of seconds until
120the pretimeout. So, for instance, if you set the timeout to 60 seconds 120the pretimeout. So, for instance, if you set the timeout to 60 seconds
121and the pretimeout to 10 seconds, the pretimout will go of in 50 121and the pretimeout to 10 seconds, the pretimeout will go off in 50
122seconds. Setting a pretimeout to zero disables it. 122seconds. Setting a pretimeout to zero disables it.
123 123
124There is also a get function for getting the pretimeout: 124There is also a get function for getting the pretimeout:
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/SubmittingDrivers b/Documentation/zh_CN/SubmittingDrivers
index 5889f8df6312..d313f5d8448d 100644
--- a/Documentation/zh_CN/SubmittingDrivers
+++ b/Documentation/zh_CN/SubmittingDrivers
@@ -150,10 +150,6 @@ LWN.net:
150 将旧版内核的驱动程序移植到 2.6 版: 150 将旧版内核的驱动程序移植到 2.6 版:
151 http://lwn.net/Articles/driver-porting/ 151 http://lwn.net/Articles/driver-porting/
152 152
153KernelTrap:
154 Linux 内核的最新动态以及开发者访谈
155 http://kerneltrap.org/
156
157内核新手(KernelNewbies): 153内核新手(KernelNewbies):
158 为新的内核开发者提供文档和帮助 154 为新的内核开发者提供文档和帮助
159 http://kernelnewbies.org/ 155 http://kernelnewbies.org/
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 框架中,并非驱动)可通过测试