summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/ABI/obsolete/sysfs-driver-hid-roccat-arvo (renamed from Documentation/ABI/testing/sysfs-driver-hid-roccat-arvo)0
-rw-r--r--Documentation/ABI/obsolete/sysfs-driver-hid-roccat-isku (renamed from Documentation/ABI/testing/sysfs-driver-hid-roccat-isku)0
-rw-r--r--Documentation/ABI/obsolete/sysfs-driver-hid-roccat-koneplus99
-rw-r--r--Documentation/ABI/obsolete/sysfs-driver-hid-roccat-konepure (renamed from Documentation/ABI/testing/sysfs-driver-hid-roccat-konepure)0
-rw-r--r--Documentation/ABI/obsolete/sysfs-driver-hid-roccat-kovaplus50
-rw-r--r--Documentation/ABI/obsolete/sysfs-driver-hid-roccat-lua (renamed from Documentation/ABI/testing/sysfs-driver-hid-roccat-lua)0
-rw-r--r--Documentation/ABI/obsolete/sysfs-driver-hid-roccat-pyra50
-rw-r--r--Documentation/ABI/obsolete/sysfs-driver-hid-roccat-ryos (renamed from Documentation/ABI/testing/sysfs-driver-hid-roccat-ryos)0
-rw-r--r--Documentation/ABI/obsolete/sysfs-driver-hid-roccat-savu (renamed from Documentation/ABI/testing/sysfs-driver-hid-roccat-savu)0
-rw-r--r--Documentation/ABI/stable/sysfs-class-tpm4
-rw-r--r--Documentation/ABI/stable/sysfs-firmware-opal-elog2
-rw-r--r--Documentation/ABI/testing/configfs-stp-policy48
-rw-r--r--Documentation/ABI/testing/sysfs-block7
-rw-r--r--Documentation/ABI/testing/sysfs-bus-coresight-devices-etm3x83
-rw-r--r--Documentation/ABI/testing/sysfs-bus-iio32
-rw-r--r--Documentation/ABI/testing/sysfs-bus-iio-adc-hi843543
-rw-r--r--Documentation/ABI/testing/sysfs-bus-iio-chemical-vz89x7
-rw-r--r--Documentation/ABI/testing/sysfs-bus-iio-humidity-hdc100x9
-rw-r--r--Documentation/ABI/testing/sysfs-bus-iio-meas-spec8
-rw-r--r--Documentation/ABI/testing/sysfs-bus-iio-trigger-sysfs22
-rw-r--r--Documentation/ABI/testing/sysfs-bus-intel_th-devices-gth49
-rw-r--r--Documentation/ABI/testing/sysfs-bus-intel_th-devices-msc33
-rw-r--r--Documentation/ABI/testing/sysfs-bus-intel_th-devices-pti24
-rw-r--r--Documentation/ABI/testing/sysfs-bus-intel_th-output-devices13
-rw-r--r--Documentation/ABI/testing/sysfs-bus-mei7
-rw-r--r--Documentation/ABI/testing/sysfs-bus-usb20
-rw-r--r--Documentation/ABI/testing/sysfs-class-fpga-manager37
-rw-r--r--Documentation/ABI/testing/sysfs-class-mic.txt29
-rw-r--r--Documentation/ABI/testing/sysfs-class-power58
-rw-r--r--Documentation/ABI/testing/sysfs-class-stm14
-rw-r--r--Documentation/ABI/testing/sysfs-class-stm_source11
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid-corsair15
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus96
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus49
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra49
-rw-r--r--Documentation/ABI/testing/sysfs-driver-ppi19
-rw-r--r--Documentation/ABI/testing/sysfs-fs-f2fs12
-rw-r--r--Documentation/ABI/testing/sysfs-power12
-rw-r--r--Documentation/Changes3
-rw-r--r--Documentation/DMA-API-HOWTO.txt5
-rw-r--r--Documentation/DMA-API.txt19
-rw-r--r--Documentation/DocBook/.gitignore2
-rw-r--r--Documentation/DocBook/80211.tmpl5
-rw-r--r--Documentation/DocBook/Makefile8
-rw-r--r--Documentation/DocBook/alsa-driver-api.tmpl2
-rw-r--r--Documentation/DocBook/device-drivers.tmpl81
-rw-r--r--Documentation/DocBook/gpu.tmpl (renamed from Documentation/DocBook/drm.tmpl)209
-rw-r--r--Documentation/DocBook/iio.tmpl2
-rw-r--r--Documentation/DocBook/media/dvb/dvbapi.xml3
-rw-r--r--Documentation/DocBook/media/dvb/kdapi.xml2309
-rw-r--r--Documentation/DocBook/media/v4l/biblio.xml18
-rw-r--r--Documentation/DocBook/media/v4l/compat.xml20
-rw-r--r--Documentation/DocBook/media/v4l/controls.xml14
-rw-r--r--Documentation/DocBook/media/v4l/dev-sdr.xml32
-rw-r--r--Documentation/DocBook/media/v4l/io.xml10
-rw-r--r--Documentation/DocBook/media/v4l/pixfmt.xml111
-rw-r--r--Documentation/DocBook/media/v4l/v4l2.xml13
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-encoder-cmd.xml2
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml7
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-g-fmt.xml2
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-g-modulator.xml14
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-g-tuner.xml16
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-querycap.xml6
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-queryctrl.xml21
-rw-r--r--Documentation/DocBook/media_api.tmpl2
-rw-r--r--Documentation/DocBook/writing-an-alsa-driver.tmpl19
-rw-r--r--Documentation/IRQ-domain.txt8
-rw-r--r--Documentation/RCU/stallwarn.txt7
-rw-r--r--Documentation/RCU/torture.txt39
-rw-r--r--Documentation/RCU/trace.txt32
-rw-r--r--Documentation/RCU/whatisRCU.txt6
-rw-r--r--Documentation/SubmittingPatches8
-rw-r--r--Documentation/acpi/enumeration.txt11
-rw-r--r--Documentation/acpi/i2c-muxes.txt58
-rw-r--r--Documentation/arm/OMAP/README7
-rw-r--r--Documentation/arm/SA1100/Victor16
-rw-r--r--Documentation/arm/Samsung/Bootloader-interface.txt5
-rw-r--r--Documentation/arm/keystone/knav-qmss.txt56
-rw-r--r--Documentation/arm/memory.txt2
-rw-r--r--Documentation/arm/sunxi/README2
-rw-r--r--Documentation/arm/uefi.txt4
-rw-r--r--Documentation/arm64/booting.txt18
-rw-r--r--Documentation/atomic_ops.txt4
-rw-r--r--Documentation/block/pr.txt119
-rw-r--r--Documentation/blockdev/zram.txt44
-rw-r--r--Documentation/cgroups/blkio-controller.txt2
-rw-r--r--Documentation/cgroups/cgroups.txt4
-rw-r--r--Documentation/cgroups/freezer-subsystem.txt2
-rw-r--r--Documentation/cgroups/unified-hierarchy.txt27
-rw-r--r--Documentation/crypto/asymmetric-keys.txt27
-rw-r--r--Documentation/device-mapper/delay.txt1
-rw-r--r--Documentation/device-mapper/snapshot.txt10
-rw-r--r--Documentation/devicetree/bindings/arm/amlogic.txt10
-rw-r--r--Documentation/devicetree/bindings/arm/apm/scu.txt17
-rw-r--r--Documentation/devicetree/bindings/arm/arm,scpi.txt188
-rw-r--r--Documentation/devicetree/bindings/arm/bcm/brcm,brcmstb.txt162
-rw-r--r--Documentation/devicetree/bindings/arm/bcm/brcm,nsp.txt34
-rw-r--r--Documentation/devicetree/bindings/arm/coherency-fabric.txt5
-rw-r--r--Documentation/devicetree/bindings/arm/cpus.txt2
-rw-r--r--Documentation/devicetree/bindings/arm/fsl.txt16
-rw-r--r--Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt21
-rw-r--r--Documentation/devicetree/bindings/arm/idle-states.txt2
-rw-r--r--Documentation/devicetree/bindings/arm/keystone/keystone.txt20
-rw-r--r--Documentation/devicetree/bindings/arm/mediatek/mediatek,imgsys.txt22
-rw-r--r--Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt22
-rw-r--r--Documentation/devicetree/bindings/arm/mediatek/mediatek,vdecsys.txt22
-rw-r--r--Documentation/devicetree/bindings/arm/mediatek/mediatek,vencltsys.txt22
-rw-r--r--Documentation/devicetree/bindings/arm/mediatek/mediatek,vencsys.txt22
-rw-r--r--Documentation/devicetree/bindings/arm/mvebu-cpu-config.txt20
-rw-r--r--Documentation/devicetree/bindings/arm/pmu.txt3
-rw-r--r--Documentation/devicetree/bindings/arm/psci.txt6
-rw-r--r--Documentation/devicetree/bindings/arm/rockchip.txt11
-rw-r--r--Documentation/devicetree/bindings/arm/samsung-boards.txt27
-rw-r--r--Documentation/devicetree/bindings/arm/samsung/samsung-boards.txt69
-rw-r--r--Documentation/devicetree/bindings/arm/shmobile.txt10
-rw-r--r--Documentation/devicetree/bindings/arm/sunxi.txt1
-rw-r--r--Documentation/devicetree/bindings/arm/tegra/nvidia,nvec.txt (renamed from Documentation/devicetree/bindings/nvec/nvidia,nvec.txt)0
-rw-r--r--Documentation/devicetree/bindings/arm/twd.txt5
-rw-r--r--Documentation/devicetree/bindings/arm/uniphier/cache-uniphier.txt60
-rw-r--r--Documentation/devicetree/bindings/ata/ahci-fsl-qoriq.txt21
-rw-r--r--Documentation/devicetree/bindings/ata/ahci-platform.txt2
-rw-r--r--Documentation/devicetree/bindings/board/fsl-board.txt (renamed from Documentation/devicetree/bindings/powerpc/fsl/board.txt)14
-rw-r--r--Documentation/devicetree/bindings/bus/sunxi-rsb.txt47
-rw-r--r--Documentation/devicetree/bindings/chosen.txt8
-rw-r--r--Documentation/devicetree/bindings/clock/at91-clock.txt35
-rw-r--r--Documentation/devicetree/bindings/clock/brcm,bcm2835-cprman.txt45
-rw-r--r--Documentation/devicetree/bindings/clock/brcm,iproc-clocks.txt78
-rw-r--r--Documentation/devicetree/bindings/clock/qcom,gcc.txt4
-rw-r--r--Documentation/devicetree/bindings/clock/qcom,mmcc.txt4
-rw-r--r--Documentation/devicetree/bindings/clock/qoriq-clock.txt61
-rw-r--r--Documentation/devicetree/bindings/clock/renesas,cpg-div6-clocks.txt2
-rw-r--r--Documentation/devicetree/bindings/clock/renesas,cpg-mssr.txt69
-rw-r--r--Documentation/devicetree/bindings/clock/silabs,si514.txt24
-rw-r--r--Documentation/devicetree/bindings/clock/st/st,clkgen-pll.txt1
-rw-r--r--Documentation/devicetree/bindings/crypto/fsl-sec4.txt4
-rw-r--r--Documentation/devicetree/bindings/display/arm,pl11x.txt (renamed from Documentation/devicetree/bindings/video/arm,pl11x.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/armada/marvell,dove-lcd.txt (renamed from Documentation/devicetree/bindings/drm/armada/marvell,dove-lcd.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/atmel,lcdc.txt (renamed from Documentation/devicetree/bindings/video/atmel,lcdc.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/atmel/hlcdc-dc.txt (renamed from Documentation/devicetree/bindings/drm/atmel/hlcdc-dc.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt65
-rw-r--r--Documentation/devicetree/bindings/display/bridge/adi,adv7123.txt (renamed from Documentation/devicetree/bindings/video/adi,adv7123.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/bridge/adi,adv7511.txt (renamed from Documentation/devicetree/bindings/video/adi,adv7511.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/bridge/dw_hdmi.txt (renamed from Documentation/devicetree/bindings/drm/bridge/dw_hdmi.txt)4
-rw-r--r--Documentation/devicetree/bindings/display/bridge/ps8622.txt (renamed from Documentation/devicetree/bindings/video/bridge/ps8622.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/bridge/ptn3460.txt (renamed from Documentation/devicetree/bindings/video/bridge/ptn3460.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/bridge/tda998x.txt (renamed from Documentation/devicetree/bindings/drm/i2c/tda998x.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/bridge/thine,thc63lvdm83d.txt (renamed from Documentation/devicetree/bindings/video/thine,thc63lvdm83d)0
-rw-r--r--Documentation/devicetree/bindings/display/cirrus,clps711x-fb.txt (renamed from Documentation/devicetree/bindings/video/cirrus,clps711x-fb.txt)2
-rw-r--r--Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt (renamed from Documentation/devicetree/bindings/video/analog-tv-connector.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/connector/dvi-connector.txt (renamed from Documentation/devicetree/bindings/video/dvi-connector.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/connector/hdmi-connector.txt (renamed from Documentation/devicetree/bindings/video/hdmi-connector.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/connector/vga-connector.txt (renamed from Documentation/devicetree/bindings/video/vga-connector.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/exynos/exynos-mic.txt (renamed from Documentation/devicetree/bindings/video/exynos-mic.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/exynos/exynos5433-decon.txt (renamed from Documentation/devicetree/bindings/video/exynos5433-decon.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/exynos/exynos7-decon.txt (renamed from Documentation/devicetree/bindings/video/exynos7-decon.txt)2
-rw-r--r--Documentation/devicetree/bindings/display/exynos/exynos_dp.txt (renamed from Documentation/devicetree/bindings/video/exynos_dp.txt)2
-rw-r--r--Documentation/devicetree/bindings/display/exynos/exynos_dsim.txt (renamed from Documentation/devicetree/bindings/video/exynos_dsim.txt)2
-rw-r--r--Documentation/devicetree/bindings/display/exynos/exynos_hdmi.txt (renamed from Documentation/devicetree/bindings/video/exynos_hdmi.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/exynos/exynos_hdmiddc.txt (renamed from Documentation/devicetree/bindings/video/exynos_hdmiddc.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/exynos/exynos_hdmiphy.txt (renamed from Documentation/devicetree/bindings/video/exynos_hdmiphy.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/exynos/exynos_mixer.txt (renamed from Documentation/devicetree/bindings/video/exynos_mixer.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/exynos/samsung-fimd.txt (renamed from Documentation/devicetree/bindings/video/samsung-fimd.txt)2
-rw-r--r--Documentation/devicetree/bindings/display/fsl,dcu.txt (renamed from Documentation/devicetree/bindings/video/fsl,dcu.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/imx/fsl,imx-fb.txt (renamed from Documentation/devicetree/bindings/video/fsl,imx-fb.txt)2
-rw-r--r--Documentation/devicetree/bindings/display/imx/fsl-imx-drm.txt (renamed from Documentation/devicetree/bindings/drm/imx/fsl-imx-drm.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/imx/hdmi.txt (renamed from Documentation/devicetree/bindings/drm/imx/hdmi.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/imx/ldb.txt (renamed from Documentation/devicetree/bindings/drm/imx/ldb.txt)2
-rw-r--r--Documentation/devicetree/bindings/display/marvell,pxa2xx-lcdc.txt34
-rw-r--r--Documentation/devicetree/bindings/display/mipi-dsi-bus.txt (renamed from Documentation/devicetree/bindings/mipi/dsi/mipi-dsi-bus.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/msm/dsi.txt (renamed from Documentation/devicetree/bindings/drm/msm/dsi.txt)2
-rw-r--r--Documentation/devicetree/bindings/display/msm/edp.txt (renamed from Documentation/devicetree/bindings/drm/msm/edp.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/msm/gpu.txt (renamed from Documentation/devicetree/bindings/drm/msm/gpu.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/msm/hdmi.txt (renamed from Documentation/devicetree/bindings/drm/msm/hdmi.txt)3
-rw-r--r--Documentation/devicetree/bindings/display/msm/mdp.txt (renamed from Documentation/devicetree/bindings/drm/msm/mdp.txt)3
-rw-r--r--Documentation/devicetree/bindings/display/mxsfb.txt (renamed from Documentation/devicetree/bindings/fb/mxsfb.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/ampire,am800480r3tmqwa1h.txt (renamed from Documentation/devicetree/bindings/panel/ampire,am800480r3tmqwa1h.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/auo,b080uan01.txt (renamed from Documentation/devicetree/bindings/panel/auo,b080uan01.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/auo,b101aw03.txt (renamed from Documentation/devicetree/bindings/panel/auo,b101aw03.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/auo,b101ean01.txt (renamed from Documentation/devicetree/bindings/panel/auo,b101ean01.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/auo,b101xtn01.txt (renamed from Documentation/devicetree/bindings/panel/auo,b101xtn01.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/auo,b116xw03.txt (renamed from Documentation/devicetree/bindings/panel/auo,b116xw03.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/auo,b133htn01.txt (renamed from Documentation/devicetree/bindings/panel/auo,b133htn01.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/auo,b133xtn01.txt (renamed from Documentation/devicetree/bindings/panel/auo,b133xtn01.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/avic,tm070ddh03.txt (renamed from Documentation/devicetree/bindings/panel/avic,tm070ddh03.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/chunghwa,claa101wa01a.txt (renamed from Documentation/devicetree/bindings/panel/chunghwa,claa101wa01a.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/chunghwa,claa101wb03.txt (renamed from Documentation/devicetree/bindings/panel/chunghwa,claa101wb03.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/display-timing.txt (renamed from Documentation/devicetree/bindings/video/display-timing.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/edt,et057090dhu.txt (renamed from Documentation/devicetree/bindings/panel/edt,et057090dhu.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/edt,et070080dh6.txt (renamed from Documentation/devicetree/bindings/panel/edt,et070080dh6.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/edt,etm0700g0dh6.txt (renamed from Documentation/devicetree/bindings/panel/edt,etm0700g0dh6.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/foxlink,fl500wvr00-a0t.txt (renamed from Documentation/devicetree/bindings/panel/foxlink,fl500wvr00-a0t.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/giantplus,gpg482739qs5.txt (renamed from Documentation/devicetree/bindings/panel/giantplus,gpg482739qs5.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/hannstar,hsd070pww1.txt (renamed from Documentation/devicetree/bindings/panel/hannstar,hsd070pww1.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/hannstar,hsd100pxn1.txt (renamed from Documentation/devicetree/bindings/panel/hannstar,hsd100pxn1.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/hit,tx23d38vm0caa.txt (renamed from Documentation/devicetree/bindings/panel/hit,tx23d38vm0caa.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/innolux,at043tn24.txt (renamed from Documentation/devicetree/bindings/panel/innolux,at043tn24.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/innolux,g121i1-l01.txt (renamed from Documentation/devicetree/bindings/panel/innolux,g121i1-l01.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/innolux,n116bge.txt (renamed from Documentation/devicetree/bindings/panel/innolux,n116bge.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/innolux,n156bge-l21.txt (renamed from Documentation/devicetree/bindings/panel/innolux,n156bge-l21.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/innolux,zj070na-01p.txt (renamed from Documentation/devicetree/bindings/panel/innolux,zj070na-01p.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/lg,lb070wv8.txt (renamed from Documentation/devicetree/bindings/panel/lg,lb070wv8.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/lg,ld070wx3-sl01.txt (renamed from Documentation/devicetree/bindings/panel/lg,ld070wx3-sl01.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/lg,lg4573.txt (renamed from Documentation/devicetree/bindings/panel/lg,lg4573.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/lg,lh500wx1-sd03.txt (renamed from Documentation/devicetree/bindings/panel/lg,lh500wx1-sd03.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/lg,lp129qe.txt (renamed from Documentation/devicetree/bindings/panel/lg,lp129qe.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.txt (renamed from Documentation/devicetree/bindings/video/lgphilips,lb035q02.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/nec,nl4827hc19-05b.txt (renamed from Documentation/devicetree/bindings/panel/nec,nl4827hc19-05b.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/okaya,rs800480t-7x0gp.txt (renamed from Documentation/devicetree/bindings/panel/okaya,rs800480t-7x0gp.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/ortustech,com43h4m85ulc.txt (renamed from Documentation/devicetree/bindings/panel/ortustech,com43h4m85ulc.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/panasonic,vvx10f004b00.txt (renamed from Documentation/devicetree/bindings/panel/panasonic,vvx10f004b00.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/panel-dpi.txt (renamed from Documentation/devicetree/bindings/video/panel-dpi.txt)2
-rw-r--r--Documentation/devicetree/bindings/display/panel/panel-dsi-cm.txt (renamed from Documentation/devicetree/bindings/video/panel-dsi-cm.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/samsung,ld9040.txt (renamed from Documentation/devicetree/bindings/panel/samsung,ld9040.txt)2
-rw-r--r--Documentation/devicetree/bindings/display/panel/samsung,ltn101nt05.txt (renamed from Documentation/devicetree/bindings/panel/samsung,ltn101nt05.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/samsung,ltn140at29-301.txt (renamed from Documentation/devicetree/bindings/panel/samsung,ltn140at29-301.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/samsung,s6e8aa0.txt (renamed from Documentation/devicetree/bindings/panel/samsung,s6e8aa0.txt)2
-rw-r--r--Documentation/devicetree/bindings/display/panel/sharp,lq101r1sx01.txt (renamed from Documentation/devicetree/bindings/panel/sharp,lq101r1sx01.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/sharp,ls037v7dw01.txt (renamed from Documentation/devicetree/bindings/video/sharp,ls037v7dw01.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/shelly,sca07010-bfn-lnn.txt (renamed from Documentation/devicetree/bindings/panel/shelly,sca07010-bfn-lnn.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/simple-panel.txt (renamed from Documentation/devicetree/bindings/panel/simple-panel.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/sony,acx565akm.txt (renamed from Documentation/devicetree/bindings/video/sony,acx565akm.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/toppoly,td028ttec1.txt (renamed from Documentation/devicetree/bindings/video/toppoly,td028ttec1.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/panel/tpo,td043mtea1.txt (renamed from Documentation/devicetree/bindings/video/tpo,td043mtea1.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/renesas,du.txt (renamed from Documentation/devicetree/bindings/video/renesas,du.txt)14
-rw-r--r--Documentation/devicetree/bindings/display/rockchip/dw_hdmi-rockchip.txt (renamed from Documentation/devicetree/bindings/video/dw_hdmi-rockchip.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/rockchip/rockchip-drm.txt (renamed from Documentation/devicetree/bindings/video/rockchip-drm.txt)2
-rw-r--r--Documentation/devicetree/bindings/display/rockchip/rockchip-vop.txt (renamed from Documentation/devicetree/bindings/video/rockchip-vop.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/simple-framebuffer-sunxi.txt (renamed from Documentation/devicetree/bindings/video/simple-framebuffer-sunxi.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/simple-framebuffer.txt (renamed from Documentation/devicetree/bindings/video/simple-framebuffer.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/sm501fb.txt (renamed from Documentation/devicetree/bindings/fb/sm501fb.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/ssd1289fb.txt (renamed from Documentation/devicetree/bindings/video/ssd1289fb.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/ssd1307fb.txt (renamed from Documentation/devicetree/bindings/video/ssd1307fb.txt)3
-rw-r--r--Documentation/devicetree/bindings/display/st,stih4xx.txt (renamed from Documentation/devicetree/bindings/gpu/st,stih4xx.txt)4
-rw-r--r--Documentation/devicetree/bindings/display/tegra/nvidia,tegra114-mipi.txt (renamed from Documentation/devicetree/bindings/mipi/nvidia,tegra114-mipi.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt (renamed from Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt)2
-rw-r--r--Documentation/devicetree/bindings/display/ti/ti,dra7-dss.txt (renamed from Documentation/devicetree/bindings/video/ti,dra7-dss.txt)2
-rw-r--r--Documentation/devicetree/bindings/display/ti/ti,omap-dss.txt (renamed from Documentation/devicetree/bindings/video/ti,omap-dss.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/ti/ti,omap2-dss.txt (renamed from Documentation/devicetree/bindings/video/ti,omap2-dss.txt)2
-rw-r--r--Documentation/devicetree/bindings/display/ti/ti,omap3-dss.txt (renamed from Documentation/devicetree/bindings/video/ti,omap3-dss.txt)2
-rw-r--r--Documentation/devicetree/bindings/display/ti/ti,omap4-dss.txt (renamed from Documentation/devicetree/bindings/video/ti,omap4-dss.txt)2
-rw-r--r--Documentation/devicetree/bindings/display/ti/ti,omap5-dss.txt (renamed from Documentation/devicetree/bindings/video/ti,omap5-dss.txt)2
-rw-r--r--Documentation/devicetree/bindings/display/ti/ti,opa362.txt (renamed from Documentation/devicetree/bindings/video/ti,opa362.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/ti/ti,tfp410.txt (renamed from Documentation/devicetree/bindings/video/ti,tfp410.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/ti/ti,tpd12s015.txt (renamed from Documentation/devicetree/bindings/video/ti,tpd12s015.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/tilcdc/panel.txt (renamed from Documentation/devicetree/bindings/drm/tilcdc/panel.txt)2
-rw-r--r--Documentation/devicetree/bindings/display/tilcdc/tfp410.txt (renamed from Documentation/devicetree/bindings/drm/tilcdc/tfp410.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt (renamed from Documentation/devicetree/bindings/drm/tilcdc/tilcdc.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/via,vt8500-fb.txt (renamed from Documentation/devicetree/bindings/video/via,vt8500-fb.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/wm,prizm-ge-rops.txt (renamed from Documentation/devicetree/bindings/video/wm,prizm-ge-rops.txt)0
-rw-r--r--Documentation/devicetree/bindings/display/wm,wm8505-fb.txt (renamed from Documentation/devicetree/bindings/video/wm,wm8505-fb.txt)0
-rw-r--r--Documentation/devicetree/bindings/dma/ti-dma-crossbar.txt15
-rw-r--r--Documentation/devicetree/bindings/dma/ti-edma.txt117
-rw-r--r--Documentation/devicetree/bindings/edac/apm-xgene-edac.txt23
-rw-r--r--Documentation/devicetree/bindings/eeprom/at25.txt (renamed from Documentation/devicetree/bindings/misc/at25.txt)0
-rw-r--r--Documentation/devicetree/bindings/eeprom/eeprom.txt (renamed from Documentation/devicetree/bindings/eeprom.txt)0
-rw-r--r--Documentation/devicetree/bindings/extcon/extcon-arizona.txt15
-rw-r--r--Documentation/devicetree/bindings/fpga/altera-socfpga-fpga-mgr.txt2
-rw-r--r--Documentation/devicetree/bindings/fpga/xilinx-zynq-fpga-mgr.txt19
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-mpc8xxx.txt4
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-msm.txt26
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-pca953x.txt1
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-zynq.txt9
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio.txt45
-rw-r--r--Documentation/devicetree/bindings/gpio/netxbig-gpio-ext.txt22
-rw-r--r--Documentation/devicetree/bindings/hwmon/ina209.txt18
-rw-r--r--Documentation/devicetree/bindings/hwmon/ina2xx.txt1
-rw-r--r--Documentation/devicetree/bindings/hwmon/pwm-fan.txt29
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-davinci.txt6
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-imx.txt9
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-rcar.txt1
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt1
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-uniphier-f.txt25
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-uniphier.txt25
-rw-r--r--Documentation/devicetree/bindings/i2c/trivial-devices.txt3
-rw-r--r--Documentation/devicetree/bindings/iio/accel/bma180.txt8
-rw-r--r--Documentation/devicetree/bindings/iio/accel/lis302.txt (renamed from Documentation/devicetree/bindings/misc/lis302.txt)0
-rw-r--r--Documentation/devicetree/bindings/iio/accel/mma8452.txt24
-rw-r--r--Documentation/devicetree/bindings/iio/adc/hi8435.txt21
-rw-r--r--Documentation/devicetree/bindings/iio/dac/ti,dac7512.txt (renamed from Documentation/devicetree/bindings/misc/ti,dac7512.txt)0
-rw-r--r--Documentation/devicetree/bindings/iio/light/apds9960.txt22
-rw-r--r--Documentation/devicetree/bindings/iio/light/us5182d.txt34
-rw-r--r--Documentation/devicetree/bindings/iio/pressure/bmp085.txt (renamed from Documentation/devicetree/bindings/misc/bmp085.txt)0
-rw-r--r--Documentation/devicetree/bindings/input/ads7846.txt3
-rw-r--r--Documentation/devicetree/bindings/input/cypress,cyapa.txt2
-rw-r--r--Documentation/devicetree/bindings/input/da9062-onkey.txt32
-rw-r--r--Documentation/devicetree/bindings/input/gpio-keys-polled.txt10
-rw-r--r--Documentation/devicetree/bindings/input/gpio-keys.txt1
-rw-r--r--Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt1
-rw-r--r--Documentation/devicetree/bindings/input/hid-over-i2c.txt (renamed from Documentation/devicetree/bindings/hid/hid-over-i2c.txt)0
-rw-r--r--Documentation/devicetree/bindings/input/nvidia,tegra20-kbc.txt3
-rw-r--r--Documentation/devicetree/bindings/input/qcom,pm8xxx-keypad.txt1
-rw-r--r--Documentation/devicetree/bindings/input/rotary-encoder.txt10
-rw-r--r--Documentation/devicetree/bindings/input/samsung-keypad.txt3
-rw-r--r--Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt8
-rw-r--r--Documentation/devicetree/bindings/input/touchscreen/focaltech-ft6236.txt35
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.txt (renamed from Documentation/devicetree/bindings/arm/gic-v3.txt)5
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/arm,gic.txt (renamed from Documentation/devicetree/bindings/arm/gic.txt)24
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/arm,versatile-fpga-irq.txt (renamed from Documentation/devicetree/bindings/arm/versatile-fpga-irq.txt)0
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/arm,vic.txt (renamed from Documentation/devicetree/bindings/arm/vic.txt)0
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/axis,crisv32-intc.txt (renamed from Documentation/devicetree/bindings/cris/interrupts.txt)0
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/img,meta-intc.txt (renamed from Documentation/devicetree/bindings/metag/meta-intc.txt)0
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/img,pdc-intc.txt (renamed from Documentation/devicetree/bindings/metag/pdc-intc.txt)0
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/intel,ce4100-ioapic.txt (renamed from Documentation/devicetree/bindings/x86/interrupt.txt)0
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/mediatek,sysirq.txt (renamed from Documentation/devicetree/bindings/arm/mediatek/mediatek,sysirq.txt)0
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/mrvl,intc.txt (renamed from Documentation/devicetree/bindings/arm/mrvl/intc.txt)0
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.txt (renamed from Documentation/devicetree/bindings/arm/lpc32xx-mic.txt)0
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/open-pic.txt (renamed from Documentation/devicetree/bindings/open-pic.txt)0
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/qca,ath79-misc-intc.txt20
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.txt1
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/samsung,exynos4210-combiner.txt (renamed from Documentation/devicetree/bindings/arm/samsung/interrupt-combiner.txt)0
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/snps,arc700-intc.txt (renamed from Documentation/devicetree/bindings/arc/interrupts.txt)0
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/snps,archs-idu-intc.txt (renamed from Documentation/devicetree/bindings/arc/archs-idu-intc.txt)0
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/snps,archs-intc.txt (renamed from Documentation/devicetree/bindings/arc/archs-intc.txt)0
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/st,spear3xx-shirq.txt (renamed from Documentation/devicetree/bindings/arm/spear/shirq.txt)0
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/ti,c64x+megamod-pic.txt (renamed from Documentation/devicetree/bindings/c6x/interrupt.txt)0
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/ti,cp-intc.txt (renamed from Documentation/devicetree/bindings/arm/davinci/cp-intc.txt)0
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/ti,omap2-intc.txt (renamed from Documentation/devicetree/bindings/arm/omap/intc.txt)0
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/via,vt8500-intc.txt (renamed from Documentation/devicetree/bindings/arm/vt8500/via,vt8500-intc.txt)0
-rw-r--r--Documentation/devicetree/bindings/iommu/arm,smmu-v3.txt19
-rw-r--r--Documentation/devicetree/bindings/iommu/samsung,sysmmu.txt2
-rw-r--r--Documentation/devicetree/bindings/iommu/ti,omap-iommu.txt27
-rw-r--r--Documentation/devicetree/bindings/leds/backlight/88pm860x.txt (renamed from Documentation/devicetree/bindings/video/backlight/88pm860x.txt)0
-rw-r--r--Documentation/devicetree/bindings/leds/backlight/gpio-backlight.txt (renamed from Documentation/devicetree/bindings/video/backlight/gpio-backlight.txt)0
-rw-r--r--Documentation/devicetree/bindings/leds/backlight/lp855x.txt (renamed from Documentation/devicetree/bindings/video/backlight/lp855x.txt)0
-rw-r--r--Documentation/devicetree/bindings/leds/backlight/max8925-backlight.txt (renamed from Documentation/devicetree/bindings/video/backlight/max8925-backlight.txt)0
-rw-r--r--Documentation/devicetree/bindings/leds/backlight/pm8941-wled.txt (renamed from Documentation/devicetree/bindings/video/backlight/pm8941-wled.txt)2
-rw-r--r--Documentation/devicetree/bindings/leds/backlight/pwm-backlight.txt (renamed from Documentation/devicetree/bindings/video/backlight/pwm-backlight.txt)0
-rw-r--r--Documentation/devicetree/bindings/leds/backlight/sky81452-backlight.txt (renamed from Documentation/devicetree/bindings/video/backlight/sky81452-backlight.txt)0
-rw-r--r--Documentation/devicetree/bindings/leds/backlight/tps65217-backlight.txt (renamed from Documentation/devicetree/bindings/video/backlight/tps65217-backlight.txt)0
-rw-r--r--Documentation/devicetree/bindings/leds/leds-aat1290.txt8
-rw-r--r--Documentation/devicetree/bindings/leds/leds-bcm6328.txt10
-rw-r--r--Documentation/devicetree/bindings/leds/leds-netxbig.txt92
-rw-r--r--Documentation/devicetree/bindings/mailbox/omap-mailbox.txt8
-rw-r--r--Documentation/devicetree/bindings/mailbox/sti-mailbox.txt51
-rw-r--r--Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt3
-rw-r--r--Documentation/devicetree/bindings/memory-controllers/arm,pl172.txt8
-rw-r--r--Documentation/devicetree/bindings/memory-controllers/calxeda-ddr-ctrlr.txt (renamed from Documentation/devicetree/bindings/arm/calxeda/mem-ctrlr.txt)0
-rw-r--r--Documentation/devicetree/bindings/memory-controllers/renesas-memory-controllers.txt6
-rw-r--r--Documentation/devicetree/bindings/mfd/arizona.txt15
-rw-r--r--Documentation/devicetree/bindings/mfd/atmel-flexcom.txt63
-rw-r--r--Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt2
-rw-r--r--Documentation/devicetree/bindings/mfd/axp20x.txt4
-rw-r--r--Documentation/devicetree/bindings/mfd/cros-ec.txt4
-rw-r--r--Documentation/devicetree/bindings/mfd/da9150.txt33
-rw-r--r--Documentation/devicetree/bindings/mfd/s2mps11.txt28
-rw-r--r--Documentation/devicetree/bindings/mfd/sky81452.txt2
-rw-r--r--Documentation/devicetree/bindings/mfd/tc3589x.txt1
-rw-r--r--Documentation/devicetree/bindings/misc/sram.txt16
-rw-r--r--Documentation/devicetree/bindings/mmc/fsl-esdhc.txt2
-rw-r--r--Documentation/devicetree/bindings/mmc/mmc.txt6
-rw-r--r--Documentation/devicetree/bindings/mmc/mtk-sd.txt11
-rw-r--r--Documentation/devicetree/bindings/mmc/renesas,mmcif.txt5
-rw-r--r--Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.txt13
-rw-r--r--Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt25
-rw-r--r--Documentation/devicetree/bindings/mtd/fsmc-nand.txt6
-rw-r--r--Documentation/devicetree/bindings/mtd/partition.txt71
-rw-r--r--Documentation/devicetree/bindings/mtd/vf610-nfc.txt59
-rw-r--r--Documentation/devicetree/bindings/net/apm-xgene-enet.txt10
-rw-r--r--Documentation/devicetree/bindings/net/brcm,iproc-mdio.txt23
-rw-r--r--Documentation/devicetree/bindings/net/can/sun4i_can.txt36
-rw-r--r--Documentation/devicetree/bindings/net/cpsw.txt13
-rw-r--r--Documentation/devicetree/bindings/net/fsl-tsec-phy.txt4
-rw-r--r--Documentation/devicetree/bindings/net/hisilicon-hip04-net.txt4
-rw-r--r--Documentation/devicetree/bindings/net/hisilicon-hns-dsaf.txt49
-rw-r--r--Documentation/devicetree/bindings/net/hisilicon-hns-mdio.txt22
-rw-r--r--Documentation/devicetree/bindings/net/hisilicon-hns-nic.txt47
-rw-r--r--Documentation/devicetree/bindings/net/ieee802154/mrf24j40.txt20
-rw-r--r--Documentation/devicetree/bindings/net/maxim,ds26522.txt13
-rw-r--r--Documentation/devicetree/bindings/net/nfc/nfcmrvl.txt61
-rw-r--r--Documentation/devicetree/bindings/net/nfc/st-nci-i2c.txt7
-rw-r--r--Documentation/devicetree/bindings/net/nfc/st-nci-spi.txt9
-rw-r--r--Documentation/devicetree/bindings/net/renesas,ravb.txt69
-rw-r--r--Documentation/devicetree/bindings/net/smsc-lan87xx.txt24
-rw-r--r--Documentation/devicetree/bindings/nvmem/imx-ocotp.txt20
-rw-r--r--Documentation/devicetree/bindings/nvmem/mxs-ocotp.txt25
-rw-r--r--Documentation/devicetree/bindings/nvmem/rockchip-efuse.txt38
-rw-r--r--Documentation/devicetree/bindings/nvmem/vf610-ocotp.txt19
-rw-r--r--Documentation/devicetree/bindings/pci/altera-pcie-msi.txt28
-rw-r--r--Documentation/devicetree/bindings/pci/altera-pcie.txt49
-rw-r--r--Documentation/devicetree/bindings/pci/arm,juno-r1-pcie.txt10
-rw-r--r--Documentation/devicetree/bindings/pci/brcm,iproc-pcie.txt20
-rw-r--r--Documentation/devicetree/bindings/pci/designware-pcie.txt12
-rw-r--r--Documentation/devicetree/bindings/pci/hisilicon-pcie.txt44
-rw-r--r--Documentation/devicetree/bindings/pci/host-generic-pci.txt5
-rw-r--r--Documentation/devicetree/bindings/pci/layerscape-pci.txt14
-rw-r--r--Documentation/devicetree/bindings/pci/pci-msi.txt220
-rw-r--r--Documentation/devicetree/bindings/pci/pci-rcar-gen2.txt3
-rw-r--r--Documentation/devicetree/bindings/pci/pci.txt4
-rw-r--r--Documentation/devicetree/bindings/pci/plda,xpressrich3-axi.txt12
-rw-r--r--Documentation/devicetree/bindings/phy/brcm,cygnus-pcie-phy.txt47
-rw-r--r--Documentation/devicetree/bindings/phy/calxeda-combophy.txt (renamed from Documentation/devicetree/bindings/arm/calxeda/combophy.txt)0
-rw-r--r--Documentation/devicetree/bindings/phy/keystone-usb-phy.txt (renamed from Documentation/devicetree/bindings/usb/keystone-phy.txt)0
-rw-r--r--Documentation/devicetree/bindings/phy/mxs-usb-phy.txt (renamed from Documentation/devicetree/bindings/usb/mxs-phy.txt)0
-rw-r--r--Documentation/devicetree/bindings/phy/nvidia,tegra20-usb-phy.txt (renamed from Documentation/devicetree/bindings/usb/nvidia,tegra20-usb-phy.txt)0
-rw-r--r--Documentation/devicetree/bindings/phy/phy-mt65xx-usb.txt68
-rw-r--r--Documentation/devicetree/bindings/phy/qcom,usb-8x16-phy.txt (renamed from Documentation/devicetree/bindings/usb/qcom,usb-8x16-phy.txt)0
-rw-r--r--Documentation/devicetree/bindings/phy/samsung-phy.txt3
-rw-r--r--Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt1
-rw-r--r--Documentation/devicetree/bindings/pinctrl/atmel,at91-pio4-pinctrl.txt90
-rw-r--r--Documentation/devicetree/bindings/pinctrl/berlin,pinctrl.txt5
-rw-r--r--Documentation/devicetree/bindings/pinctrl/brcm,cygnus-gpio.txt16
-rw-r--r--Documentation/devicetree/bindings/pinctrl/fsl,imx7d-pinctrl.txt63
-rw-r--r--Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt1
-rw-r--r--Documentation/devicetree/bindings/power/bq24257.txt53
-rw-r--r--Documentation/devicetree/bindings/power/da9150-fg.txt23
-rw-r--r--Documentation/devicetree/bindings/power/pd-samsung.txt (renamed from Documentation/devicetree/bindings/arm/exynos/power_domain.txt)5
-rw-r--r--Documentation/devicetree/bindings/power/wakeup-source.txt71
-rw-r--r--Documentation/devicetree/bindings/power_supply/axp20x_usb_power.txt34
-rw-r--r--Documentation/devicetree/bindings/power_supply/qcom_smbb.txt131
-rw-r--r--Documentation/devicetree/bindings/power_supply/tps65217_charger.txt12
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/mpc512x_lpbfifo.txt21
-rw-r--r--Documentation/devicetree/bindings/regulator/act8865-regulator.txt3
-rw-r--r--Documentation/devicetree/bindings/regulator/anatop-regulator.txt1
-rw-r--r--Documentation/devicetree/bindings/regulator/arizona-regulator.txt17
-rw-r--r--Documentation/devicetree/bindings/regulator/max77802.txt25
-rw-r--r--Documentation/devicetree/bindings/regulator/pbias-regulator.txt7
-rw-r--r--Documentation/devicetree/bindings/regulator/regulator.txt1
-rw-r--r--Documentation/devicetree/bindings/regulator/tps65023.txt60
-rw-r--r--Documentation/devicetree/bindings/rng/atmel-trng.txt (renamed from Documentation/devicetree/bindings/hwrng/atmel-trng.txt)0
-rw-r--r--Documentation/devicetree/bindings/rng/brcm,iproc-rng200.txt (renamed from Documentation/devicetree/bindings/hwrng/brcm,iproc-rng200.txt)0
-rw-r--r--Documentation/devicetree/bindings/rng/omap_rng.txt (renamed from Documentation/devicetree/bindings/hwrng/omap_rng.txt)0
-rw-r--r--Documentation/devicetree/bindings/rng/samsung,exynos-rng4.txt17
-rw-r--r--Documentation/devicetree/bindings/rng/st,rng.txt15
-rw-r--r--Documentation/devicetree/bindings/rng/st,stm32-rng.txt21
-rw-r--r--Documentation/devicetree/bindings/rng/timeriomem_rng.txt (renamed from Documentation/devicetree/bindings/hwrng/timeriomem_rng.txt)0
-rw-r--r--Documentation/devicetree/bindings/rtc/dallas,ds1390.txt18
-rw-r--r--Documentation/devicetree/bindings/rtc/isil,isl12057.txt10
-rw-r--r--Documentation/devicetree/bindings/rtc/pcf8563.txt25
-rw-r--r--Documentation/devicetree/bindings/rtc/rtc-opal.txt5
-rw-r--r--Documentation/devicetree/bindings/serial/ingenic,uart.txt3
-rw-r--r--Documentation/devicetree/bindings/serial/mrvl,pxa-ssp.txt1
-rw-r--r--Documentation/devicetree/bindings/serial/pl011.txt2
-rw-r--r--Documentation/devicetree/bindings/serial/qcom,msm-uartdm.txt6
-rw-r--r--Documentation/devicetree/bindings/serial/renesas,sci-serial.txt2
-rw-r--r--Documentation/devicetree/bindings/serial/snps-dw-apb-uart.txt3
-rw-r--r--Documentation/devicetree/bindings/soc/mediatek/scpsys.txt10
-rw-r--r--Documentation/devicetree/bindings/soc/qcom/qcom,smem.txt57
-rw-r--r--Documentation/devicetree/bindings/soc/rockchip/power_domain.txt46
-rw-r--r--Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt1
-rw-r--r--Documentation/devicetree/bindings/sound/ak4613.txt17
-rw-r--r--Documentation/devicetree/bindings/sound/ak4642.txt22
-rw-r--r--Documentation/devicetree/bindings/sound/atmel-classd.txt52
-rw-r--r--Documentation/devicetree/bindings/sound/da7213.txt41
-rw-r--r--Documentation/devicetree/bindings/sound/da7219.txt106
-rw-r--r--Documentation/devicetree/bindings/sound/fsl-asoc-card.txt10
-rw-r--r--Documentation/devicetree/bindings/sound/nau8825.txt102
-rw-r--r--Documentation/devicetree/bindings/sound/renesas,rsnd.txt7
-rw-r--r--Documentation/devicetree/bindings/sound/rockchip-i2s.txt6
-rw-r--r--Documentation/devicetree/bindings/sound/rockchip-spdif.txt40
-rw-r--r--Documentation/devicetree/bindings/sound/rt5640.txt9
-rw-r--r--Documentation/devicetree/bindings/sound/sun4i-codec.txt27
-rw-r--r--Documentation/devicetree/bindings/sound/tdm-slot.txt11
-rw-r--r--Documentation/devicetree/bindings/spi/brcm,bcm2835-aux-spi.txt38
-rw-r--r--Documentation/devicetree/bindings/spi/sh-msiof.txt2
-rw-r--r--Documentation/devicetree/bindings/spi/spi-mt65xx.txt23
-rw-r--r--Documentation/devicetree/bindings/thermal/rockchip-thermal.txt11
-rw-r--r--Documentation/devicetree/bindings/thermal/thermal.txt27
-rw-r--r--Documentation/devicetree/bindings/thermal/ti_soc_thermal.txt14
-rw-r--r--Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt8
-rw-r--r--Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt28
-rw-r--r--Documentation/devicetree/bindings/usb/dwc3.txt8
-rw-r--r--Documentation/devicetree/bindings/usb/renesas_usbhs.txt1
-rw-r--r--Documentation/devicetree/bindings/usb/samsung-usbphy.txt117
-rw-r--r--Documentation/devicetree/bindings/vendor-prefixes.txt11
-rw-r--r--Documentation/devicetree/bindings/w1/omap-hdq.txt7
-rw-r--r--Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.txt19
-rw-r--r--Documentation/driver-model/platform.txt14
-rw-r--r--Documentation/edac.txt46
-rw-r--r--Documentation/email-clients.txt2
-rw-r--r--Documentation/features/debug/KASAN/arch-support.txt2
-rw-r--r--Documentation/features/vm/THP/arch-support.txt2
-rw-r--r--Documentation/features/vm/pte_special/arch-support.txt2
-rw-r--r--Documentation/filesystems/debugfs.txt2
-rw-r--r--Documentation/filesystems/f2fs.txt3
-rw-r--r--Documentation/filesystems/gfs2-glocks.txt6
-rw-r--r--Documentation/filesystems/nfs/nfsroot.txt3
-rw-r--r--Documentation/filesystems/path-lookup.md1297
-rw-r--r--Documentation/filesystems/path-lookup.txt2
-rw-r--r--Documentation/filesystems/proc.txt49
-rw-r--r--Documentation/filesystems/sysfs-tagging.txt14
-rw-r--r--Documentation/filesystems/sysfs.txt9
-rw-r--r--Documentation/fpga/fpga-mgr.txt171
-rw-r--r--Documentation/gpio/board.txt38
-rw-r--r--Documentation/gpio/consumer.txt3
-rw-r--r--Documentation/gpio/driver.txt80
-rw-r--r--Documentation/gpio/sysfs.txt6
-rw-r--r--Documentation/hw_random.txt8
-rw-r--r--Documentation/hwmon/lm755
-rw-r--r--Documentation/hwmon/max3179037
-rw-r--r--Documentation/hwmon/nct67754
-rw-r--r--Documentation/hwmon/scpi-hwmon33
-rw-r--r--Documentation/i2c/busses/i2c-i8012
-rw-r--r--Documentation/input/multi-touch-protocol.txt2
-rw-r--r--Documentation/input/rotary-encoder.txt9
-rw-r--r--Documentation/input/userio.txt70
-rw-r--r--Documentation/ioctl/ioctl-number.txt4
-rw-r--r--Documentation/kasan.txt46
-rw-r--r--Documentation/kbuild/Kconfig.recursion-issue-0157
-rw-r--r--Documentation/kbuild/Kconfig.recursion-issue-0263
-rw-r--r--Documentation/kbuild/Kconfig.select-break33
-rw-r--r--Documentation/kbuild/kconfig-language.txt161
-rw-r--r--Documentation/kernel-docs.txt14
-rw-r--r--Documentation/kernel-parameters.txt75
-rw-r--r--Documentation/kselftest.txt16
-rw-r--r--Documentation/locking/lockstat.txt2
-rw-r--r--Documentation/locking/locktorture.txt3
-rw-r--r--Documentation/lockup-watchdogs.txt5
-rw-r--r--Documentation/memory-barriers.txt65
-rw-r--r--Documentation/mic/mic_overview.txt31
-rwxr-xr-xDocumentation/mic/mpssd/mpss4
-rw-r--r--Documentation/mic/mpssd/mpssd.c362
-rw-r--r--Documentation/mic/mpssd/mpssd.h1
-rw-r--r--Documentation/misc-devices/apds990x.txt2
-rw-r--r--Documentation/misc-devices/isl290032
-rw-r--r--Documentation/misc-devices/max68752
-rw-r--r--Documentation/mmc/mmc-dev-attrs.txt10
-rw-r--r--Documentation/networking/can.txt97
-rw-r--r--Documentation/networking/filter.txt6
-rw-r--r--Documentation/networking/ieee802154.txt8
-rw-r--r--Documentation/networking/ip-sysctl.txt25
-rw-r--r--Documentation/networking/ipvs-sysctl.txt10
-rw-r--r--Documentation/networking/l2tp.txt7
-rw-r--r--Documentation/networking/switchdev.txt65
-rw-r--r--Documentation/networking/vrf.txt393
-rw-r--r--Documentation/power/pci.txt51
-rw-r--r--Documentation/printk-formats.txt29
-rw-r--r--Documentation/ptp/testptp.c1
-rw-r--r--Documentation/rbtree.txt2
-rw-r--r--Documentation/security/Smack.txt10
-rw-r--r--Documentation/security/keys.txt41
-rw-r--r--Documentation/serial/driver10
-rw-r--r--Documentation/serial/tty.txt60
-rw-r--r--Documentation/sound/alsa/hda_codec.txt322
-rw-r--r--Documentation/spi/pxa2xx6
-rw-r--r--Documentation/static-keys.txt4
-rw-r--r--Documentation/sysctl/kernel.txt12
-rw-r--r--Documentation/sysctl/net.txt16
-rw-r--r--Documentation/sysctl/vm.txt2
-rw-r--r--Documentation/thermal/power_allocator.txt2
-rw-r--r--Documentation/trace/events.txt18
-rw-r--r--Documentation/trace/ftrace.txt23
-rw-r--r--Documentation/trace/intel_th.txt99
-rw-r--r--Documentation/trace/stm.txt80
-rw-r--r--Documentation/usb/authorization.txt31
-rw-r--r--Documentation/video4linux/CARDLIST.saa71341
-rw-r--r--Documentation/video4linux/v4l2-pci-skeleton.c4
-rw-r--r--Documentation/virtual/kvm/api.txt56
-rw-r--r--Documentation/virtual/kvm/arm/vgic-mapped-irqs.txt187
-rw-r--r--Documentation/virtual/kvm/devices/arm-vgic.txt18
-rw-r--r--Documentation/virtual/kvm/devices/vm.txt2
-rw-r--r--Documentation/virtual/kvm/locking.txt12
-rw-r--r--Documentation/virtual/kvm/ppc-pv.txt2
-rw-r--r--Documentation/vm/balance14
-rw-r--r--Documentation/vm/page_migration27
-rw-r--r--Documentation/vm/slub.txt59
-rw-r--r--Documentation/vm/split_page_table_lock4
-rw-r--r--Documentation/vm/transhuge.txt10
-rw-r--r--Documentation/vm/unevictable-lru.txt120
-rw-r--r--Documentation/w1/masters/omap-hdq6
-rw-r--r--Documentation/zh_CN/filesystems/sysfs.txt2
560 files changed, 10518 insertions, 4170 deletions
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-arvo b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-arvo
index 55e281b0071a..55e281b0071a 100644
--- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-arvo
+++ b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-arvo
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-isku b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-isku
index c601d0f2ac46..c601d0f2ac46 100644
--- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-isku
+++ b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-isku
diff --git a/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-koneplus b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-koneplus
index 833fd59926a7..545e69f43229 100644
--- a/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-koneplus
+++ b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-koneplus
@@ -1,3 +1,14 @@
1What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/actual_profile
2Date: October 2010
3Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
4Description: The integer value of this attribute ranges from 0-4.
5 When read, this attribute returns the number of the actual
6 profile. This value is persistent, so its equivalent to the
7 profile that's active when the mouse is powered on next time.
8 When written, this file sets the number of the startup profile
9 and the mouse activates this profile immediately.
10Users: http://roccat.sourceforge.net
11
1What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/startup_profile 12What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/startup_profile
2Date: October 2010 13Date: October 2010
3Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 14Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
@@ -22,6 +33,40 @@ Description: When read, this file returns the raw integer version number of the
22 Please read binary attribute info which contains firmware version. 33 Please read binary attribute info which contains firmware version.
23Users: http://roccat.sourceforge.net 34Users: http://roccat.sourceforge.net
24 35
36What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/info
37Date: November 2012
38Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
39Description: When read, this file returns general data like firmware version.
40 When written, the device can be reset.
41 The data is 8 bytes long.
42Users: http://roccat.sourceforge.net
43
44What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/macro
45Date: October 2010
46Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
47Description: The mouse can store a macro with max 500 key/button strokes
48 internally.
49 When written, this file lets one set the sequence for a specific
50 button for a specific profile. Button and profile numbers are
51 included in written data. The data has to be 2082 bytes long.
52 This file is writeonly.
53Users: http://roccat.sourceforge.net
54
55What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile_buttons
56Date: August 2010
57Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
58Description: The mouse can store 5 profiles which can be switched by the
59 press of a button. A profile is split in settings and buttons.
60 profile_buttons holds information about button layout.
61 When written, this file lets one write the respective profile
62 buttons back to the mouse. The data has to be 77 bytes long.
63 The mouse will reject invalid data.
64 Which profile to write is determined by the profile number
65 contained in the data.
66 Before reading this file, control has to be written to select
67 which profile to read.
68Users: http://roccat.sourceforge.net
69
25What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile[1-5]_buttons 70What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile[1-5]_buttons
26Date: August 2010 71Date: August 2010
27Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 72Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
@@ -34,6 +79,22 @@ Description: The mouse can store 5 profiles which can be switched by the
34 Write control to select profile and read profile_buttons instead. 79 Write control to select profile and read profile_buttons instead.
35Users: http://roccat.sourceforge.net 80Users: http://roccat.sourceforge.net
36 81
82What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile_settings
83Date: October 2010
84Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
85Description: The mouse can store 5 profiles which can be switched by the
86 press of a button. A profile is split in settings and buttons.
87 profile_settings holds information like resolution, sensitivity
88 and light effects.
89 When written, this file lets one write the respective profile
90 settings back to the mouse. The data has to be 43 bytes long.
91 The mouse will reject invalid data.
92 Which profile to write is determined by the profile number
93 contained in the data.
94 Before reading this file, control has to be written to select
95 which profile to read.
96Users: http://roccat.sourceforge.net
97
37What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile[1-5]_settings 98What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile[1-5]_settings
38Date: August 2010 99Date: August 2010
39Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 100Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
@@ -45,4 +106,40 @@ Description: The mouse can store 5 profiles which can be switched by the
45 The returned data is 43 bytes in size. 106 The returned data is 43 bytes in size.
46 This file is readonly. 107 This file is readonly.
47 Write control to select profile and read profile_settings instead. 108 Write control to select profile and read profile_settings instead.
48Users: http://roccat.sourceforge.net \ No newline at end of file 109Users: http://roccat.sourceforge.net
110
111What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/sensor
112Date: October 2010
113Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
114Description: The mouse has a tracking- and a distance-control-unit. These
115 can be activated/deactivated and the lift-off distance can be
116 set. The data has to be 6 bytes long.
117 This file is writeonly.
118Users: http://roccat.sourceforge.net
119
120What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/talk
121Date: May 2011
122Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
123Description: Used to active some easy* functions of the mouse from outside.
124 The data has to be 16 bytes long.
125 This file is writeonly.
126Users: http://roccat.sourceforge.net
127
128What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/tcu
129Date: October 2010
130Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
131Description: When written a calibration process for the tracking control unit
132 can be initiated/cancelled. Also lets one read/write sensor
133 registers.
134 The data has to be 4 bytes long.
135Users: http://roccat.sourceforge.net
136
137What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/tcu_image
138Date: October 2010
139Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
140Description: When read the mouse returns a 30x30 pixel image of the
141 sampled underground. This works only in the course of a
142 calibration process initiated with tcu.
143 The returned data is 1028 bytes in size.
144 This file is readonly.
145Users: http://roccat.sourceforge.net
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-konepure b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-konepure
index 41a9b7fbfc79..41a9b7fbfc79 100644
--- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-konepure
+++ b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-konepure
diff --git a/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-kovaplus b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-kovaplus
index 4a98e02b6c6a..ab01631e1e0f 100644
--- a/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-kovaplus
+++ b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-kovaplus
@@ -8,6 +8,17 @@ Description: The integer value of this attribute ranges from 1-4.
8 Has never been used. If bookkeeping is done, it's done in userland tools. 8 Has never been used. If bookkeeping is done, it's done in userland tools.
9Users: http://roccat.sourceforge.net 9Users: http://roccat.sourceforge.net
10 10
11What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/actual_profile
12Date: January 2011
13Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
14Description: The integer value of this attribute ranges from 0-4.
15 When read, this attribute returns the number of the active
16 profile.
17 When written, the mouse activates this profile immediately.
18 The profile that's active when powered down is the same that's
19 active when the mouse is powered on.
20Users: http://roccat.sourceforge.net
21
11What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/actual_sensitivity_x 22What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/actual_sensitivity_x
12Date: January 2011 23Date: January 2011
13Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 24Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
@@ -40,6 +51,29 @@ Description: When read, this file returns the raw integer version number of the
40 Obsoleted by binary sysfs attribute "info". 51 Obsoleted by binary sysfs attribute "info".
41Users: http://roccat.sourceforge.net 52Users: http://roccat.sourceforge.net
42 53
54What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/info
55Date: November 2012
56Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
57Description: When read, this file returns general data like firmware version.
58 When written, the device can be reset.
59 The data is 6 bytes long.
60Users: http://roccat.sourceforge.net
61
62What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile_buttons
63Date: January 2011
64Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
65Description: The mouse can store 5 profiles which can be switched by the
66 press of a button. A profile is split in settings and buttons.
67 profile_buttons holds information about button layout.
68 When written, this file lets one write the respective profile
69 buttons back to the mouse. The data has to be 23 bytes long.
70 The mouse will reject invalid data.
71 Which profile to write is determined by the profile number
72 contained in the data.
73 Before reading this file, control has to be written to select
74 which profile to read.
75Users: http://roccat.sourceforge.net
76
43What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile[1-5]_buttons 77What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile[1-5]_buttons
44Date: January 2011 78Date: January 2011
45Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 79Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
@@ -52,6 +86,22 @@ Description: The mouse can store 5 profiles which can be switched by the
52 Write control to select profile and read profile_buttons instead. 86 Write control to select profile and read profile_buttons instead.
53Users: http://roccat.sourceforge.net 87Users: http://roccat.sourceforge.net
54 88
89What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile_settings
90Date: January 2011
91Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
92Description: The mouse can store 5 profiles which can be switched by the
93 press of a button. A profile is split in settings and buttons.
94 profile_settings holds information like resolution, sensitivity
95 and light effects.
96 When written, this file lets one write the respective profile
97 settings back to the mouse. The data has to be 16 bytes long.
98 The mouse will reject invalid data.
99 Which profile to write is determined by the profile number
100 contained in the data.
101 Before reading this file, control has to be written to select
102 which profile to read.
103Users: http://roccat.sourceforge.net
104
55What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile[1-5]_settings 105What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile[1-5]_settings
56Date: January 2011 106Date: January 2011
57Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 107Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-lua b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-lua
index 31c6c4c8ba2b..31c6c4c8ba2b 100644
--- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-lua
+++ b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-lua
diff --git a/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-pyra b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-pyra
index 87ac87e9556d..16020b31ae64 100644
--- a/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-pyra
+++ b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-pyra
@@ -37,6 +37,29 @@ Description: When read, this file returns the raw integer version number of the
37 Please use binary attribute "info" which provides this information. 37 Please use binary attribute "info" which provides this information.
38Users: http://roccat.sourceforge.net 38Users: http://roccat.sourceforge.net
39 39
40What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/info
41Date: November 2012
42Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
43Description: When read, this file returns general data like firmware version.
44 When written, the device can be reset.
45 The data is 6 bytes long.
46Users: http://roccat.sourceforge.net
47
48What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile_buttons
49Date: August 2010
50Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
51Description: The mouse can store 5 profiles which can be switched by the
52 press of a button. A profile is split in settings and buttons.
53 profile_buttons holds information about button layout.
54 When written, this file lets one write the respective profile
55 buttons back to the mouse. The data has to be 19 bytes long.
56 The mouse will reject invalid data.
57 Which profile to write is determined by the profile number
58 contained in the data.
59 Before reading this file, control has to be written to select
60 which profile to read.
61Users: http://roccat.sourceforge.net
62
40What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile[1-5]_buttons 63What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile[1-5]_buttons
41Date: August 2010 64Date: August 2010
42Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 65Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
@@ -49,6 +72,22 @@ Description: The mouse can store 5 profiles which can be switched by the
49 Write control to select profile and read profile_buttons instead. 72 Write control to select profile and read profile_buttons instead.
50Users: http://roccat.sourceforge.net 73Users: http://roccat.sourceforge.net
51 74
75What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile_settings
76Date: August 2010
77Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
78Description: The mouse can store 5 profiles which can be switched by the
79 press of a button. A profile is split in settings and buttons.
80 profile_settings holds information like resolution, sensitivity
81 and light effects.
82 When written, this file lets one write the respective profile
83 settings back to the mouse. The data has to be 13 bytes long.
84 The mouse will reject invalid data.
85 Which profile to write is determined by the profile number
86 contained in the data.
87 Before reading this file, control has to be written to select
88 which profile to read.
89Users: http://roccat.sourceforge.net
90
52What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile[1-5]_settings 91What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile[1-5]_settings
53Date: August 2010 92Date: August 2010
54Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 93Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
@@ -62,6 +101,17 @@ Description: The mouse can store 5 profiles which can be switched by the
62 Write control to select profile and read profile_settings instead. 101 Write control to select profile and read profile_settings instead.
63Users: http://roccat.sourceforge.net 102Users: http://roccat.sourceforge.net
64 103
104What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/settings
105Date: August 2010
106Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
107Description: When read, this file returns the settings stored in the mouse.
108 The size of the data is 3 bytes and holds information on the
109 startup_profile.
110 When written, this file lets write settings back to the mouse.
111 The data has to be 3 bytes long. The mouse will reject invalid
112 data.
113Users: http://roccat.sourceforge.net
114
65What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/startup_profile 115What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/startup_profile
66Date: August 2010 116Date: August 2010
67Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 117Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-ryos b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-ryos
index 1d6a8cf9dc0a..1d6a8cf9dc0a 100644
--- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-ryos
+++ b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-ryos
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-savu b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-savu
index f1e02a98bd9d..f1e02a98bd9d 100644
--- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-savu
+++ b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-savu
diff --git a/Documentation/ABI/stable/sysfs-class-tpm b/Documentation/ABI/stable/sysfs-class-tpm
index 9f790eebb5d2..c0e23830f56a 100644
--- a/Documentation/ABI/stable/sysfs-class-tpm
+++ b/Documentation/ABI/stable/sysfs-class-tpm
@@ -116,7 +116,7 @@ Description: The "pubek" property will return the TPM's public endorsement
116 owner's authorization. Since the TPM driver doesn't store any 116 owner's authorization. Since the TPM driver doesn't store any
117 secrets, it can't authorize its own request for the pubek, 117 secrets, it can't authorize its own request for the pubek,
118 making it unaccessible. The public endorsement key is gener- 118 making it unaccessible. The public endorsement key is gener-
119 ated at TPM menufacture time and exists for the life of the 119 ated at TPM manufacture time and exists for the life of the
120 chip. 120 chip.
121 121
122 Example output: 122 Example output:
@@ -163,7 +163,7 @@ Date: April 2006
163KernelVersion: 2.6.17 163KernelVersion: 2.6.17
164Contact: tpmdd-devel@lists.sf.net 164Contact: tpmdd-devel@lists.sf.net
165Description: The "temp_deactivated" property returns a '1' if the chip has 165Description: The "temp_deactivated" property returns a '1' if the chip has
166 been temporarily dectivated, usually until the next power 166 been temporarily deactivated, usually until the next power
167 cycle. Whether a warm boot (reboot) will clear a TPM chip 167 cycle. Whether a warm boot (reboot) will clear a TPM chip
168 from a temp_deactivated state is platform specific. 168 from a temp_deactivated state is platform specific.
169 169
diff --git a/Documentation/ABI/stable/sysfs-firmware-opal-elog b/Documentation/ABI/stable/sysfs-firmware-opal-elog
index e1f3058f5954..2536434d49d0 100644
--- a/Documentation/ABI/stable/sysfs-firmware-opal-elog
+++ b/Documentation/ABI/stable/sysfs-firmware-opal-elog
@@ -57,4 +57,4 @@ Description:
57 Shortly after acknowledging it, the log 57 Shortly after acknowledging it, the log
58 entry will be removed from sysfs. 58 entry will be removed from sysfs.
59 Reading this file will list the supported 59 Reading this file will list the supported
60 operations (curently just acknowledge). \ No newline at end of file 60 operations (currently just acknowledge).
diff --git a/Documentation/ABI/testing/configfs-stp-policy b/Documentation/ABI/testing/configfs-stp-policy
new file mode 100644
index 000000000000..421ce6825c66
--- /dev/null
+++ b/Documentation/ABI/testing/configfs-stp-policy
@@ -0,0 +1,48 @@
1What: /config/stp-policy
2Date: June 2015
3KernelVersion: 4.3
4Description:
5 This group contains policies mandating Master/Channel allocation
6 for software sources wishing to send trace data over an STM
7 device.
8
9What: /config/stp-policy/<device>.<policy>
10Date: June 2015
11KernelVersion: 4.3
12Description:
13 This group is the root of a policy; its name is a concatenation
14 of an stm device name to which this policy applies and an
15 arbitrary string. If <device> part doesn't match an existing
16 stm device, mkdir will fail with ENODEV; if that device already
17 has a policy assigned to it, mkdir will fail with EBUSY.
18
19What: /config/stp-policy/<device>.<policy>/device
20Date: June 2015
21KernelVersion: 4.3
22Description:
23 STM device to which this policy applies, read only. Same as the
24 <device> component of its parent directory.
25
26What: /config/stp-policy/<device>.<policy>/<node>
27Date: June 2015
28KernelVersion: 4.3
29Description:
30 Policy node is a string identifier that software clients will
31 use to request a master/channel to be allocated and assigned to
32 them.
33
34What: /config/stp-policy/<device>.<policy>/<node>/masters
35Date: June 2015
36KernelVersion: 4.3
37Description:
38 Range of masters from which to allocate for users of this node.
39 Write two numbers: the first master and the last master number.
40
41What: /config/stp-policy/<device>.<policy>/<node>/channels
42Date: June 2015
43KernelVersion: 4.3
44Description:
45 Range of channels from which to allocate for users of this node.
46 Write two numbers: the first channel and the last channel
47 number.
48
diff --git a/Documentation/ABI/testing/sysfs-block b/Documentation/ABI/testing/sysfs-block
index 8df003963d99..71d184dbb70d 100644
--- a/Documentation/ABI/testing/sysfs-block
+++ b/Documentation/ABI/testing/sysfs-block
@@ -60,6 +60,13 @@ Description:
60 Indicates whether a storage device is capable of storing 60 Indicates whether a storage device is capable of storing
61 integrity metadata. Set if the device is T10 PI-capable. 61 integrity metadata. Set if the device is T10 PI-capable.
62 62
63What: /sys/block/<disk>/integrity/protection_interval_bytes
64Date: July 2015
65Contact: Martin K. Petersen <martin.petersen@oracle.com>
66Description:
67 Describes the number of data bytes which are protected
68 by one integrity tuple. Typically the device's logical
69 block size.
63 70
64What: /sys/block/<disk>/integrity/write_generate 71What: /sys/block/<disk>/integrity/write_generate
65Date: June 2008 72Date: June 2008
diff --git a/Documentation/ABI/testing/sysfs-bus-coresight-devices-etm3x b/Documentation/ABI/testing/sysfs-bus-coresight-devices-etm3x
index d72ca1736ba4..924265a1295d 100644
--- a/Documentation/ABI/testing/sysfs-bus-coresight-devices-etm3x
+++ b/Documentation/ABI/testing/sysfs-bus-coresight-devices-etm3x
@@ -8,13 +8,6 @@ Description: (RW) Enable/disable tracing on this specific trace entiry.
8 of coresight components linking the source to the sink is 8 of coresight components linking the source to the sink is
9 configured and managed automatically by the coresight framework. 9 configured and managed automatically by the coresight framework.
10 10
11What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/status
12Date: November 2014
13KernelVersion: 3.19
14Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
15Description: (R) List various control and status registers. The specific
16 layout and content is driver specific.
17
18What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/addr_idx 11What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/addr_idx
19Date: November 2014 12Date: November 2014
20KernelVersion: 3.19 13KernelVersion: 3.19
@@ -251,3 +244,79 @@ Date: November 2014
251KernelVersion: 3.19 244KernelVersion: 3.19
252Contact: Mathieu Poirier <mathieu.poirier@linaro.org> 245Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
253Description: (RW) Define the event that controls the trigger. 246Description: (RW) Define the event that controls the trigger.
247
248What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/cpu
249Date: October 2015
250KernelVersion: 4.4
251Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
252Description: (RO) Holds the cpu number this tracer is affined to.
253
254What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/mgmt/etmccr
255Date: September 2015
256KernelVersion: 4.4
257Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
258Description: (RO) Print the content of the ETM Configuration Code register
259 (0x004). The value is read directly from the HW.
260
261What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/mgmt/etmccer
262Date: September 2015
263KernelVersion: 4.4
264Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
265Description: (RO) Print the content of the ETM Configuration Code Extension
266 register (0x1e8). The value is read directly from the HW.
267
268What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/mgmt/etmscr
269Date: September 2015
270KernelVersion: 4.4
271Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
272Description: (RO) Print the content of the ETM System Configuration
273 register (0x014). The value is read directly from the HW.
274
275What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/mgmt/etmidr
276Date: September 2015
277KernelVersion: 4.4
278Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
279Description: (RO) Print the content of the ETM ID register (0x1e4). The
280 value is read directly from the HW.
281
282What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/mgmt/etmcr
283Date: September 2015
284KernelVersion: 4.4
285Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
286Description: (RO) Print the content of the ETM Main Control register (0x000).
287 The value is read directly from the HW.
288
289What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/mgmt/etmtraceidr
290Date: September 2015
291KernelVersion: 4.4
292Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
293Description: (RO) Print the content of the ETM Trace ID register (0x200).
294 The value is read directly from the HW.
295
296What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/mgmt/etmteevr
297Date: September 2015
298KernelVersion: 4.4
299Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
300Description: (RO) Print the content of the ETM Trace Enable Event register
301 (0x020). The value is read directly from the HW.
302
303What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/mgmt/etmtsscr
304Date: September 2015
305KernelVersion: 4.4
306Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
307Description: (RO) Print the content of the ETM Trace Start/Stop Conrol
308 register (0x018). The value is read directly from the HW.
309
310What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/mgmt/etmtecr1
311Date: September 2015
312KernelVersion: 4.4
313Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
314Description: (RO) Print the content of the ETM Enable Conrol #1
315 register (0x024). The value is read directly from the HW.
316
317What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/mgmt/etmtecr2
318Date: September 2015
319KernelVersion: 4.4
320Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
321Description: (RO) Print the content of the ETM Enable Conrol #2
322 register (0x01c). The value is read directly from the HW.
diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
index 42d360fe66a5..0439c2aaf741 100644
--- a/Documentation/ABI/testing/sysfs-bus-iio
+++ b/Documentation/ABI/testing/sysfs-bus-iio
@@ -581,6 +581,7 @@ What: /sys/.../iio:deviceX/events/in_voltageY_supply_thresh_rising_en
581What: /sys/.../iio:deviceX/events/in_voltageY_supply_thresh_falling_en 581What: /sys/.../iio:deviceX/events/in_voltageY_supply_thresh_falling_en
582What: /sys/.../iio:deviceX/events/in_voltageY_thresh_rising_en 582What: /sys/.../iio:deviceX/events/in_voltageY_thresh_rising_en
583What: /sys/.../iio:deviceX/events/in_voltageY_thresh_falling_en 583What: /sys/.../iio:deviceX/events/in_voltageY_thresh_falling_en
584What: /sys/.../iio:deviceX/events/in_voltageY_thresh_either_en
584What: /sys/.../iio:deviceX/events/in_tempY_thresh_rising_en 585What: /sys/.../iio:deviceX/events/in_tempY_thresh_rising_en
585What: /sys/.../iio:deviceX/events/in_tempY_thresh_falling_en 586What: /sys/.../iio:deviceX/events/in_tempY_thresh_falling_en
586KernelVersion: 2.6.37 587KernelVersion: 2.6.37
@@ -1459,3 +1460,34 @@ Description:
1459 measurements and return the average value as output data. Each 1460 measurements and return the average value as output data. Each
1460 value resulted from <type>[_name]_oversampling_ratio measurements 1461 value resulted from <type>[_name]_oversampling_ratio measurements
1461 is considered as one sample for <type>[_name]_sampling_frequency. 1462 is considered as one sample for <type>[_name]_sampling_frequency.
1463
1464What: /sys/bus/iio/devices/iio:deviceX/in_concentration_raw
1465What: /sys/bus/iio/devices/iio:deviceX/in_concentrationX_raw
1466What: /sys/bus/iio/devices/iio:deviceX/in_concentration_co2_raw
1467What: /sys/bus/iio/devices/iio:deviceX/in_concentrationX_co2_raw
1468What: /sys/bus/iio/devices/iio:deviceX/in_concentration_voc_raw
1469What: /sys/bus/iio/devices/iio:deviceX/in_concentrationX_voc_raw
1470KernelVersion: 4.3
1471Contact: linux-iio@vger.kernel.org
1472Description:
1473 Raw (unscaled no offset etc.) percentage reading of a substance.
1474
1475What: /sys/bus/iio/devices/iio:deviceX/in_resistance_raw
1476What: /sys/bus/iio/devices/iio:deviceX/in_resistanceX_raw
1477What: /sys/bus/iio/devices/iio:deviceX/out_resistance_raw
1478What: /sys/bus/iio/devices/iio:deviceX/out_resistanceX_raw
1479KernelVersion: 4.3
1480Contact: linux-iio@vger.kernel.org
1481Description:
1482 Raw (unscaled no offset etc.) resistance reading that can be processed
1483 into an ohm value.
1484
1485What: /sys/bus/iio/devices/iio:deviceX/heater_enable
1486KernelVersion: 4.1.0
1487Contact: linux-iio@vger.kernel.org
1488Description:
1489 '1' (enable) or '0' (disable) specifying the enable
1490 of heater function. Same reading values apply
1491 This ABI is especially applicable for humidity sensors
1492 to heatup the device and get rid of any condensation
1493 in some humidity environment
diff --git a/Documentation/ABI/testing/sysfs-bus-iio-adc-hi8435 b/Documentation/ABI/testing/sysfs-bus-iio-adc-hi8435
new file mode 100644
index 000000000000..f30b4c424fb6
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-iio-adc-hi8435
@@ -0,0 +1,43 @@
1What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_sensing_mode
2Date: August 2015
3KernelVersion: 4.2.0
4Contact: source@cogentembedded.com
5Description:
6 Program sensor type for threshold detector inputs.
7 Could be either "GND-Open" or "Supply-Open" mode. Y is a
8 threshold detector input channel. Channels 0..7, 8..15, 16..23
9 and 24..31 has common sensor types.
10
11What: /sys/bus/iio/devices/iio:deviceX/events/in_voltageY_thresh_falling_value
12Date: August 2015
13KernelVersion: 4.2.0
14Contact: source@cogentembedded.com
15Description:
16 Channel Y low voltage threshold. If sensor input voltage goes lower then
17 this value then the threshold falling event is pushed.
18 Depending on in_voltageY_sensing_mode the low voltage threshold
19 is separately set for "GND-Open" and "Supply-Open" modes.
20 Channels 0..31 have common low threshold values, but could have different
21 sensing_modes.
22 The low voltage threshold range is between 2..21V.
23 Hysteresis between low and high thresholds can not be lower then 2 and
24 can not be odd.
25 If falling threshold results hysteresis to odd value then rising
26 threshold is automatically subtracted by one.
27
28What: /sys/bus/iio/devices/iio:deviceX/events/in_voltageY_thresh_rising_value
29Date: August 2015
30KernelVersion: 4.2.0
31Contact: source@cogentembedded.com
32Description:
33 Channel Y high voltage threshold. If sensor input voltage goes higher then
34 this value then the threshold rising event is pushed.
35 Depending on in_voltageY_sensing_mode the high voltage threshold
36 is separately set for "GND-Open" and "Supply-Open" modes.
37 Channels 0..31 have common high threshold values, but could have different
38 sensing_modes.
39 The high voltage threshold range is between 3..22V.
40 Hysteresis between low and high thresholds can not be lower then 2 and
41 can not be odd.
42 If rising threshold results hysteresis to odd value then falling
43 threshold is automatically appended by one.
diff --git a/Documentation/ABI/testing/sysfs-bus-iio-chemical-vz89x b/Documentation/ABI/testing/sysfs-bus-iio-chemical-vz89x
new file mode 100644
index 000000000000..c0c1ea924535
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-iio-chemical-vz89x
@@ -0,0 +1,7 @@
1What: /sys/bus/iio/devices/iio:deviceX/in_concentration_VOC_short_raw
2Date: September 2015
3KernelVersion: 4.3
4Contact: Matt Ranostay <mranostay@gmail.com>
5Description:
6 Get the raw calibration VOC value from the sensor.
7 This value has little application outside of calibration.
diff --git a/Documentation/ABI/testing/sysfs-bus-iio-humidity-hdc100x b/Documentation/ABI/testing/sysfs-bus-iio-humidity-hdc100x
new file mode 100644
index 000000000000..b72bb62552cf
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-iio-humidity-hdc100x
@@ -0,0 +1,9 @@
1What: /sys/bus/iio/devices/iio:deviceX/out_current_heater_raw
2What: /sys/bus/iio/devices/iio:deviceX/out_current_heater_raw_available
3KernelVersion: 4.3
4Contact: linux-iio@vger.kernel.org
5Description:
6 Controls the heater device within the humidity sensor to get
7 rid of excess condensation.
8
9 Valid control values are 0 = OFF, and 1 = ON.
diff --git a/Documentation/ABI/testing/sysfs-bus-iio-meas-spec b/Documentation/ABI/testing/sysfs-bus-iio-meas-spec
new file mode 100644
index 000000000000..1a6265e92e2f
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-iio-meas-spec
@@ -0,0 +1,8 @@
1What: /sys/bus/iio/devices/iio:deviceX/battery_low
2KernelVersion: 4.1.0
3Contact: linux-iio@vger.kernel.org
4Description:
5 Reading returns either '1' or '0'. '1' means that the
6 battery level supplied to sensor is below 2.25V.
7 This ABI is available for tsys02d, htu21, ms8607
8 This ABI is available for htu21, ms8607
diff --git a/Documentation/ABI/testing/sysfs-bus-iio-trigger-sysfs b/Documentation/ABI/testing/sysfs-bus-iio-trigger-sysfs
index bbb039237a25..04ac62305018 100644
--- a/Documentation/ABI/testing/sysfs-bus-iio-trigger-sysfs
+++ b/Documentation/ABI/testing/sysfs-bus-iio-trigger-sysfs
@@ -18,3 +18,25 @@ Description:
18 trigger. In order to associate the trigger with an IIO device 18 trigger. In order to associate the trigger with an IIO device
19 one should write this name string to 19 one should write this name string to
20 /sys/bus/iio/devices/iio:deviceY/trigger/current_trigger. 20 /sys/bus/iio/devices/iio:deviceY/trigger/current_trigger.
21
22What: /sys/bus/iio/devices/iio_sysfs_trigger/add_trigger
23KernelVersion: 2.6.39
24Contact: linux-iio@vger.kernel.org
25Description:
26 This attribute is provided by the iio-trig-sysfs stand-alone
27 driver and it is used to activate the creation of a new trigger.
28 In order to achieve this, one should write a positive integer
29 into the associated file, which will serve as the id of the
30 trigger. If the trigger with the specified id is already present
31 in the system, an invalid argument message will be returned.
32
33What: /sys/bus/iio/devices/iio_sysfs_trigger/remove_trigger
34KernelVersion: 2.6.39
35Contact: linux-iio@vger.kernel.org
36Description:
37 This attribute is used to unregister and delete a previously
38 created trigger from the list of available triggers. In order to
39 achieve this, one should write a positive integer into the
40 associated file, representing the id of the trigger that needs
41 to be removed. If the trigger can't be found, an invalid
42 argument message will be returned to the user.
diff --git a/Documentation/ABI/testing/sysfs-bus-intel_th-devices-gth b/Documentation/ABI/testing/sysfs-bus-intel_th-devices-gth
new file mode 100644
index 000000000000..22d0843849a8
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-intel_th-devices-gth
@@ -0,0 +1,49 @@
1What: /sys/bus/intel_th/devices/<intel_th_id>-gth/masters/*
2Date: June 2015
3KernelVersion: 4.3
4Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
5Description: (RW) Configure output ports for STP masters. Writing -1
6 disables a master; any
7
8What: /sys/bus/intel_th/devices/<intel_th_id>-gth/outputs/[0-7]_port
9Date: June 2015
10KernelVersion: 4.3
11Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
12Description: (RO) Output port type:
13 0: not present,
14 1: MSU (Memory Storage Unit)
15 2: CTP (Common Trace Port)
16 4: PTI (MIPI PTI).
17
18What: /sys/bus/intel_th/devices/<intel_th_id>-gth/outputs/[0-7]_drop
19Date: June 2015
20KernelVersion: 4.3
21Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
22Description: (RW) Data retention policy setting: keep (0) or drop (1)
23 incoming data while output port is in reset.
24
25What: /sys/bus/intel_th/devices/<intel_th_id>-gth/outputs/[0-7]_null
26Date: June 2015
27KernelVersion: 4.3
28Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
29Description: (RW) STP NULL packet generation: enabled (1) or disabled (0).
30
31What: /sys/bus/intel_th/devices/<intel_th_id>-gth/outputs/[0-7]_flush
32Date: June 2015
33KernelVersion: 4.3
34Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
35Description: (RW) Force flush data from byte packing buffer for the output
36 port.
37
38What: /sys/bus/intel_th/devices/<intel_th_id>-gth/outputs/[0-7]_reset
39Date: June 2015
40KernelVersion: 4.3
41Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
42Description: (RO) Output port is in reset (1).
43
44What: /sys/bus/intel_th/devices/<intel_th_id>-gth/outputs/[0-7]_smcfreq
45Date: June 2015
46KernelVersion: 4.3
47Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
48Description: (RW) STP sync packet frequency for the port. Specifies the
49 number of clocks between mainenance packets.
diff --git a/Documentation/ABI/testing/sysfs-bus-intel_th-devices-msc b/Documentation/ABI/testing/sysfs-bus-intel_th-devices-msc
new file mode 100644
index 000000000000..b940c5d91cf7
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-intel_th-devices-msc
@@ -0,0 +1,33 @@
1What: /sys/bus/intel_th/devices/<intel_th_id>-msc<msc-id>/wrap
2Date: June 2015
3KernelVersion: 4.3
4Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
5Description: (RW) Configure MSC buffer wrapping. 1 == wrapping enabled.
6
7What: /sys/bus/intel_th/devices/<intel_th_id>-msc<msc-id>/mode
8Date: June 2015
9KernelVersion: 4.3
10Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
11Description: (RW) Configure MSC operating mode:
12 - "single", for contiguous buffer mode (high-order alloc);
13 - "multi", for multiblock mode;
14 - "ExI", for DCI handler mode;
15 - "debug", for debug mode.
16 If operating mode changes, existing buffer is deallocated,
17 provided there are no active users and tracing is not enabled,
18 otherwise the write will fail.
19
20What: /sys/bus/intel_th/devices/<intel_th_id>-msc<msc-id>/nr_pages
21Date: June 2015
22KernelVersion: 4.3
23Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
24Description: (RW) Configure MSC buffer size for "single" or "multi" modes.
25 In single mode, this is a single number of pages, has to be
26 power of 2. In multiblock mode, this is a comma-separated list
27 of numbers of pages for each window to be allocated. Number of
28 windows is not limited.
29 Writing to this file deallocates existing buffer (provided
30 there are no active users and tracing is not enabled) and then
31 allocates a new one.
32
33
diff --git a/Documentation/ABI/testing/sysfs-bus-intel_th-devices-pti b/Documentation/ABI/testing/sysfs-bus-intel_th-devices-pti
new file mode 100644
index 000000000000..df0b24fd0218
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-intel_th-devices-pti
@@ -0,0 +1,24 @@
1What: /sys/bus/intel_th/devices/<intel_th_id>-pti/mode
2Date: June 2015
3KernelVersion: 4.3
4Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
5Description: (RW) Configure PTI output width. Currently supported values
6 are 4, 8, 12, 16.
7
8What: /sys/bus/intel_th/devices/<intel_th_id>-pti/freerunning_clock
9Date: June 2015
10KernelVersion: 4.3
11Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
12Description: (RW) 0: PTI trace clock acts as a strobe which only toggles
13 when there is trace data to send. 1: PTI trace clock is a
14 free-running clock.
15
16What: /sys/bus/intel_th/devices/<intel_th_id>-pti/clock_divider
17Date: June 2015
18KernelVersion: 4.3
19Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
20Description: (RW) Configure PTI port clock divider:
21 - 0: Intel TH clock rate,
22 - 1: 1/2 Intel TH clock rate,
23 - 2: 1/4 Intel TH clock rate,
24 - 3: 1/8 Intel TH clock rate.
diff --git a/Documentation/ABI/testing/sysfs-bus-intel_th-output-devices b/Documentation/ABI/testing/sysfs-bus-intel_th-output-devices
new file mode 100644
index 000000000000..4d48a9451866
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-intel_th-output-devices
@@ -0,0 +1,13 @@
1What: /sys/bus/intel_th/devices/<intel_th_id>-<device><id>/active
2Date: June 2015
3KernelVersion: 4.3
4Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
5Description: (RW) Writes of 1 or 0 enable or disable trace output to this
6 output device. Reads return current status.
7
8What: /sys/bus/intel_th/devices/<intel_th_id>-msc<msc-id>/port
9Date: June 2015
10KernelVersion: 4.3
11Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
12Description: (RO) Port number, corresponding to this output device on the
13 switch (GTH).
diff --git a/Documentation/ABI/testing/sysfs-bus-mei b/Documentation/ABI/testing/sysfs-bus-mei
index 20e4d1638bac..6bd45346ac7e 100644
--- a/Documentation/ABI/testing/sysfs-bus-mei
+++ b/Documentation/ABI/testing/sysfs-bus-mei
@@ -19,3 +19,10 @@ KernelVersion: 4.2
19Contact: Tomas Winkler <tomas.winkler@intel.com> 19Contact: Tomas Winkler <tomas.winkler@intel.com>
20Description: Stores mei client device uuid 20Description: Stores mei client device uuid
21 Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 21 Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
22
23What: /sys/bus/mei/devices/.../version
24Date: Aug 2015
25KernelVersion: 4.3
26Contact: Tomas Winkler <tomas.winkler@intel.com>
27Description: Stores mei client protocol version
28 Format: %d
diff --git a/Documentation/ABI/testing/sysfs-bus-usb b/Documentation/ABI/testing/sysfs-bus-usb
index 864637f25bee..3a4abfc44f5e 100644
--- a/Documentation/ABI/testing/sysfs-bus-usb
+++ b/Documentation/ABI/testing/sysfs-bus-usb
@@ -1,3 +1,23 @@
1What: /sys/bus/usb/devices/INTERFACE/authorized
2Date: August 2015
3Description:
4 This allows to authorize (1) or deauthorize (0)
5 individual interfaces instead a whole device
6 in contrast to the device authorization.
7 If a deauthorized interface will be authorized
8 so the driver probing must be triggered manually
9 by writing INTERFACE to /sys/bus/usb/drivers_probe
10 This allows to avoid side-effects with drivers
11 that need multiple interfaces.
12 A deauthorized interface cannot be probed or claimed.
13
14What: /sys/bus/usb/devices/usbX/interface_authorized_default
15Date: August 2015
16Description:
17 This is used as value that determines if interfaces
18 would be authorized by default.
19 The value can be 1 or 0. It's by default 1.
20
1What: /sys/bus/usb/device/.../authorized 21What: /sys/bus/usb/device/.../authorized
2Date: July 2008 22Date: July 2008
3KernelVersion: 2.6.26 23KernelVersion: 2.6.26
diff --git a/Documentation/ABI/testing/sysfs-class-fpga-manager b/Documentation/ABI/testing/sysfs-class-fpga-manager
new file mode 100644
index 000000000000..23056c532fdd
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-fpga-manager
@@ -0,0 +1,37 @@
1What: /sys/class/fpga_manager/<fpga>/name
2Date: August 2015
3KernelVersion: 4.3
4Contact: Alan Tull <atull@opensource.altera.com>
5Description: Name of low level fpga manager driver.
6
7What: /sys/class/fpga_manager/<fpga>/state
8Date: August 2015
9KernelVersion: 4.3
10Contact: Alan Tull <atull@opensource.altera.com>
11Description: Read fpga manager state as a string.
12 The intent is to provide enough detail that if something goes
13 wrong during FPGA programming (something that the driver can't
14 fix) then userspace can know, i.e. if the firmware request
15 fails, that could be due to not being able to find the firmware
16 file.
17
18 This is a superset of FPGA states and fpga manager driver
19 states. The fpga manager driver is walking through these steps
20 to get the FPGA into a known operating state. It's a sequence,
21 though some steps may get skipped. Valid FPGA states will vary
22 by manufacturer; this is a superset.
23
24 * unknown = can't determine state
25 * power off = FPGA power is off
26 * power up = FPGA reports power is up
27 * reset = FPGA held in reset state
28 * firmware request = firmware class request in progress
29 * firmware request error = firmware request failed
30 * write init = preparing FPGA for programming
31 * write init error = Error while preparing FPGA for
32 programming
33 * write = FPGA ready to receive image data
34 * write error = Error while programming
35 * write complete = Doing post programming steps
36 * write complete error = Error while doing post programming
37 * operating = FPGA is programmed and operating
diff --git a/Documentation/ABI/testing/sysfs-class-mic.txt b/Documentation/ABI/testing/sysfs-class-mic.txt
index 13f48afc534f..d45eed2bf128 100644
--- a/Documentation/ABI/testing/sysfs-class-mic.txt
+++ b/Documentation/ABI/testing/sysfs-class-mic.txt
@@ -41,18 +41,15 @@ Description:
41 When read, this entry provides the current state of an Intel 41 When read, this entry provides the current state of an Intel
42 MIC device in the context of the card OS. Possible values that 42 MIC device in the context of the card OS. Possible values that
43 will be read are: 43 will be read are:
44 "offline" - The MIC device is ready to boot the card OS. On 44 "ready" - The MIC device is ready to boot the card OS. On
45 reading this entry after an OSPM resume, a "boot" has to be 45 reading this entry after an OSPM resume, a "boot" has to be
46 written to this entry if the card was previously shutdown 46 written to this entry if the card was previously shutdown
47 during OSPM suspend. 47 during OSPM suspend.
48 "online" - The MIC device has initiated booting a card OS. 48 "booting" - The MIC device has initiated booting a card OS.
49 "online" - The MIC device has completed boot and is online
49 "shutting_down" - The card OS is shutting down. 50 "shutting_down" - The card OS is shutting down.
51 "resetting" - A reset has been initiated for the MIC device
50 "reset_failed" - The MIC device has failed to reset. 52 "reset_failed" - The MIC device has failed to reset.
51 "suspending" - The MIC device is currently being prepared for
52 suspend. On reading this entry, a "suspend" has to be written
53 to the state sysfs entry to ensure the card is shutdown during
54 OSPM suspend.
55 "suspended" - The MIC device has been suspended.
56 53
57 When written, this sysfs entry triggers different state change 54 When written, this sysfs entry triggers different state change
58 operations depending upon the current state of the card OS. 55 operations depending upon the current state of the card OS.
@@ -62,8 +59,6 @@ Description:
62 sysfs entries. 59 sysfs entries.
63 "reset" - Initiates device reset. 60 "reset" - Initiates device reset.
64 "shutdown" - Initiates card OS shutdown. 61 "shutdown" - Initiates card OS shutdown.
65 "suspend" - Initiates card OS shutdown and also marks the card
66 as suspended.
67 62
68What: /sys/class/mic/mic(x)/shutdown_status 63What: /sys/class/mic/mic(x)/shutdown_status
69Date: October 2013 64Date: October 2013
@@ -126,7 +121,7 @@ Description:
126 the card. This sysfs entry can be written with the following 121 the card. This sysfs entry can be written with the following
127 valid strings: 122 valid strings:
128 a) linux - Boot a Linux image. 123 a) linux - Boot a Linux image.
129 b) elf - Boot an elf image for flash updates. 124 b) flash - Boot an image for flash updates.
130 125
131What: /sys/class/mic/mic(x)/log_buf_addr 126What: /sys/class/mic/mic(x)/log_buf_addr
132Date: October 2013 127Date: October 2013
@@ -155,3 +150,17 @@ Description:
155 daemon to set the log buffer length address. The correct log 150 daemon to set the log buffer length address. The correct log
156 buffer length address to be written can be found in the 151 buffer length address to be written can be found in the
157 System.map file of the card OS. 152 System.map file of the card OS.
153
154What: /sys/class/mic/mic(x)/heartbeat_enable
155Date: March 2015
156KernelVersion: 3.20
157Contact: Ashutosh Dixit <ashutosh.dixit@intel.com>
158Description:
159 The MIC drivers detect and inform user space about card crashes
160 via a heartbeat mechanism (see the description of
161 shutdown_status above). User space can turn off this
162 notification by setting heartbeat_enable to 0 and enable it by
163 setting this entry to 1. If this notification is disabled it is
164 the responsibility of user space to detect card crashes via
165 alternative means such as a network ping. This setting is
166 enabled by default.
diff --git a/Documentation/ABI/testing/sysfs-class-power b/Documentation/ABI/testing/sysfs-class-power
index 369d2a2d7d3e..fa05719f9981 100644
--- a/Documentation/ABI/testing/sysfs-class-power
+++ b/Documentation/ABI/testing/sysfs-class-power
@@ -74,3 +74,61 @@ Description:
74 74
75 Valid values: 75 Valid values:
76 - 0 - 70 (minutes), step by 10 (rounded down) 76 - 0 - 70 (minutes), step by 10 (rounded down)
77
78What: /sys/class/power_supply/bq24257-charger/ovp_voltage
79Date: October 2015
80KernelVersion: 4.4.0
81Contact: Andreas Dannenberg <dannenberg@ti.com>
82Description:
83 This entry configures the overvoltage protection feature of bq24257-
84 type charger devices. This feature protects the device and other
85 components against damage from overvoltage on the input supply. See
86 device datasheet for details.
87
88 Valid values:
89 - 6000000, 6500000, 7000000, 8000000, 9000000, 9500000, 10000000,
90 10500000 (all uV)
91
92What: /sys/class/power_supply/bq24257-charger/in_dpm_voltage
93Date: October 2015
94KernelVersion: 4.4.0
95Contact: Andreas Dannenberg <dannenberg@ti.com>
96Description:
97 This entry configures the input dynamic power path management voltage of
98 bq24257-type charger devices. Once the supply drops to the configured
99 voltage, the input current limit is reduced down to prevent the further
100 drop of the supply. When the IC enters this mode, the charge current is
101 lower than the set value. See device datasheet for details.
102
103 Valid values:
104 - 4200000, 4280000, 4360000, 4440000, 4520000, 4600000, 4680000,
105 4760000 (all uV)
106
107What: /sys/class/power_supply/bq24257-charger/high_impedance_enable
108Date: October 2015
109KernelVersion: 4.4.0
110Contact: Andreas Dannenberg <dannenberg@ti.com>
111Description:
112 This entry allows enabling the high-impedance mode of bq24257-type
113 charger devices. If enabled, it places the charger IC into low power
114 standby mode with the switch mode controller disabled. When disabled,
115 the charger operates normally. See device datasheet for details.
116
117 Valid values:
118 - 1: enabled
119 - 0: disabled
120
121What: /sys/class/power_supply/bq24257-charger/sysoff_enable
122Date: October 2015
123KernelVersion: 4.4.0
124Contact: Andreas Dannenberg <dannenberg@ti.com>
125Description:
126 This entry allows enabling the sysoff mode of bq24257-type charger
127 devices. If enabled and the input is removed, the internal battery FET
128 is turned off in order to reduce the leakage from the BAT pin to less
129 than 1uA. Note that on some devices/systems this disconnects the battery
130 from the system. See device datasheet for details.
131
132 Valid values:
133 - 1: enabled
134 - 0: disabled
diff --git a/Documentation/ABI/testing/sysfs-class-stm b/Documentation/ABI/testing/sysfs-class-stm
new file mode 100644
index 000000000000..c9aa4f3fc9a7
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-stm
@@ -0,0 +1,14 @@
1What: /sys/class/stm/<stm>/masters
2Date: June 2015
3KernelVersion: 4.3
4Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
5Description:
6 Shows first and last available to software master numbers on
7 this STM device.
8
9What: /sys/class/stm/<stm>/channels
10Date: June 2015
11KernelVersion: 4.3
12Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
13Description:
14 Shows the number of channels per master on this STM device.
diff --git a/Documentation/ABI/testing/sysfs-class-stm_source b/Documentation/ABI/testing/sysfs-class-stm_source
new file mode 100644
index 000000000000..57b8dd39bbf7
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-stm_source
@@ -0,0 +1,11 @@
1What: /sys/class/stm_source/<stm_source>/stm_source_link
2Date: June 2015
3KernelVersion: 4.3
4Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
5Description:
6 stm_source device linkage to stm device, where its tracing data
7 is directed. Reads return an existing connection or "<none>" if
8 this stm_source is not connected to any stm device yet.
9 Write an existing (registered) stm device's name here to
10 connect that device. If a device is already connected to this
11 stm_source, it will first be disconnected.
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-corsair b/Documentation/ABI/testing/sysfs-driver-hid-corsair
new file mode 100644
index 000000000000..b8827f0f12c4
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-driver-hid-corsair
@@ -0,0 +1,15 @@
1What: /sys/bus/drivers/corsair/<dev>/macro_mode
2Date: August 2015
3KernelVersion: 4.2
4Contact: Clement Vuchener <clement.vuchener@gmail.com>
5Description: Get/set the current playback mode. "SW" for software mode
6 where G-keys triggers their regular key codes. "HW" for
7 hardware playback mode where the G-keys play their macro
8 from the on-board memory.
9
10
11What: /sys/bus/drivers/corsair/<dev>/current_profile
12Date: August 2015
13KernelVersion: 4.2
14Contact: Clement Vuchener <clement.vuchener@gmail.com>
15Description: Get/set the current selected profile. Values are from 1 to 3.
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus b/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus
deleted file mode 100644
index 7bd776f9c3c7..000000000000
--- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus
+++ /dev/null
@@ -1,96 +0,0 @@
1What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/actual_profile
2Date: October 2010
3Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
4Description: The integer value of this attribute ranges from 0-4.
5 When read, this attribute returns the number of the actual
6 profile. This value is persistent, so its equivalent to the
7 profile that's active when the mouse is powered on next time.
8 When written, this file sets the number of the startup profile
9 and the mouse activates this profile immediately.
10Users: http://roccat.sourceforge.net
11
12What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/info
13Date: November 2012
14Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
15Description: When read, this file returns general data like firmware version.
16 When written, the device can be reset.
17 The data is 8 bytes long.
18Users: http://roccat.sourceforge.net
19
20What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/macro
21Date: October 2010
22Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
23Description: The mouse can store a macro with max 500 key/button strokes
24 internally.
25 When written, this file lets one set the sequence for a specific
26 button for a specific profile. Button and profile numbers are
27 included in written data. The data has to be 2082 bytes long.
28 This file is writeonly.
29Users: http://roccat.sourceforge.net
30
31What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile_buttons
32Date: August 2010
33Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
34Description: The mouse can store 5 profiles which can be switched by the
35 press of a button. A profile is split in settings and buttons.
36 profile_buttons holds information about button layout.
37 When written, this file lets one write the respective profile
38 buttons back to the mouse. The data has to be 77 bytes long.
39 The mouse will reject invalid data.
40 Which profile to write is determined by the profile number
41 contained in the data.
42 Before reading this file, control has to be written to select
43 which profile to read.
44Users: http://roccat.sourceforge.net
45
46What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile_settings
47Date: October 2010
48Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
49Description: The mouse can store 5 profiles which can be switched by the
50 press of a button. A profile is split in settings and buttons.
51 profile_settings holds information like resolution, sensitivity
52 and light effects.
53 When written, this file lets one write the respective profile
54 settings back to the mouse. The data has to be 43 bytes long.
55 The mouse will reject invalid data.
56 Which profile to write is determined by the profile number
57 contained in the data.
58 Before reading this file, control has to be written to select
59 which profile to read.
60Users: http://roccat.sourceforge.net
61
62What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/sensor
63Date: October 2010
64Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
65Description: The mouse has a tracking- and a distance-control-unit. These
66 can be activated/deactivated and the lift-off distance can be
67 set. The data has to be 6 bytes long.
68 This file is writeonly.
69Users: http://roccat.sourceforge.net
70
71What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/talk
72Date: May 2011
73Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
74Description: Used to active some easy* functions of the mouse from outside.
75 The data has to be 16 bytes long.
76 This file is writeonly.
77Users: http://roccat.sourceforge.net
78
79What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/tcu
80Date: October 2010
81Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
82Description: When written a calibration process for the tracking control unit
83 can be initiated/cancelled. Also lets one read/write sensor
84 registers.
85 The data has to be 4 bytes long.
86Users: http://roccat.sourceforge.net
87
88What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/tcu_image
89Date: October 2010
90Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
91Description: When read the mouse returns a 30x30 pixel image of the
92 sampled underground. This works only in the course of a
93 calibration process initiated with tcu.
94 The returned data is 1028 bytes in size.
95 This file is readonly.
96Users: http://roccat.sourceforge.net
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus b/Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus
deleted file mode 100644
index a10404f15a54..000000000000
--- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus
+++ /dev/null
@@ -1,49 +0,0 @@
1What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/actual_profile
2Date: January 2011
3Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
4Description: The integer value of this attribute ranges from 0-4.
5 When read, this attribute returns the number of the active
6 profile.
7 When written, the mouse activates this profile immediately.
8 The profile that's active when powered down is the same that's
9 active when the mouse is powered on.
10Users: http://roccat.sourceforge.net
11
12What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/info
13Date: November 2012
14Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
15Description: When read, this file returns general data like firmware version.
16 When written, the device can be reset.
17 The data is 6 bytes long.
18Users: http://roccat.sourceforge.net
19
20What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile_buttons
21Date: January 2011
22Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
23Description: The mouse can store 5 profiles which can be switched by the
24 press of a button. A profile is split in settings and buttons.
25 profile_buttons holds information about button layout.
26 When written, this file lets one write the respective profile
27 buttons back to the mouse. The data has to be 23 bytes long.
28 The mouse will reject invalid data.
29 Which profile to write is determined by the profile number
30 contained in the data.
31 Before reading this file, control has to be written to select
32 which profile to read.
33Users: http://roccat.sourceforge.net
34
35What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile_settings
36Date: January 2011
37Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
38Description: The mouse can store 5 profiles which can be switched by the
39 press of a button. A profile is split in settings and buttons.
40 profile_settings holds information like resolution, sensitivity
41 and light effects.
42 When written, this file lets one write the respective profile
43 settings back to the mouse. The data has to be 16 bytes long.
44 The mouse will reject invalid data.
45 Which profile to write is determined by the profile number
46 contained in the data.
47 Before reading this file, control has to be written to select
48 which profile to read.
49Users: http://roccat.sourceforge.net
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra b/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra
deleted file mode 100644
index 9fa9de30d14b..000000000000
--- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra
+++ /dev/null
@@ -1,49 +0,0 @@
1What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/info
2Date: November 2012
3Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
4Description: When read, this file returns general data like firmware version.
5 When written, the device can be reset.
6 The data is 6 bytes long.
7Users: http://roccat.sourceforge.net
8
9What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile_settings
10Date: August 2010
11Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
12Description: The mouse can store 5 profiles which can be switched by the
13 press of a button. A profile is split in settings and buttons.
14 profile_settings holds information like resolution, sensitivity
15 and light effects.
16 When written, this file lets one write the respective profile
17 settings back to the mouse. The data has to be 13 bytes long.
18 The mouse will reject invalid data.
19 Which profile to write is determined by the profile number
20 contained in the data.
21 Before reading this file, control has to be written to select
22 which profile to read.
23Users: http://roccat.sourceforge.net
24
25What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile_buttons
26Date: August 2010
27Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
28Description: The mouse can store 5 profiles which can be switched by the
29 press of a button. A profile is split in settings and buttons.
30 profile_buttons holds information about button layout.
31 When written, this file lets one write the respective profile
32 buttons back to the mouse. The data has to be 19 bytes long.
33 The mouse will reject invalid data.
34 Which profile to write is determined by the profile number
35 contained in the data.
36 Before reading this file, control has to be written to select
37 which profile to read.
38Users: http://roccat.sourceforge.net
39
40What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/settings
41Date: August 2010
42Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
43Description: When read, this file returns the settings stored in the mouse.
44 The size of the data is 3 bytes and holds information on the
45 startup_profile.
46 When written, this file lets write settings back to the mouse.
47 The data has to be 3 bytes long. The mouse will reject invalid
48 data.
49Users: http://roccat.sourceforge.net
diff --git a/Documentation/ABI/testing/sysfs-driver-ppi b/Documentation/ABI/testing/sysfs-driver-ppi
index 7d1435bc976c..9921ef285899 100644
--- a/Documentation/ABI/testing/sysfs-driver-ppi
+++ b/Documentation/ABI/testing/sysfs-driver-ppi
@@ -1,4 +1,4 @@
1What: /sys/devices/pnp0/<bus-num>/ppi/ 1What: /sys/class/tpm/tpmX/ppi/
2Date: August 2012 2Date: August 2012
3Kernel Version: 3.6 3Kernel Version: 3.6
4Contact: xiaoyan.zhang@intel.com 4Contact: xiaoyan.zhang@intel.com
@@ -8,9 +8,14 @@ Description:
8 folder makes sense. The folder path can be got by command 8 folder makes sense. The folder path can be got by command
9 'find /sys/ -name 'pcrs''. For the detail information of PPI, 9 'find /sys/ -name 'pcrs''. For the detail information of PPI,
10 please refer to the PPI specification from 10 please refer to the PPI specification from
11
11 http://www.trustedcomputinggroup.org/ 12 http://www.trustedcomputinggroup.org/
12 13
13What: /sys/devices/pnp0/<bus-num>/ppi/version 14 In Linux 4.2 ppi was moved to the character device directory.
15 A symlink from tpmX/device/ppi to tpmX/ppi to provide backwards
16 compatibility.
17
18What: /sys/class/tpm/tpmX/ppi/version
14Date: August 2012 19Date: August 2012
15Contact: xiaoyan.zhang@intel.com 20Contact: xiaoyan.zhang@intel.com
16Description: 21Description:
@@ -18,7 +23,7 @@ Description:
18 platform. 23 platform.
19 This file is readonly. 24 This file is readonly.
20 25
21What: /sys/devices/pnp0/<bus-num>/ppi/request 26What: /sys/class/tpm/tpmX/ppi/request
22Date: August 2012 27Date: August 2012
23Contact: xiaoyan.zhang@intel.com 28Contact: xiaoyan.zhang@intel.com
24Description: 29Description:
@@ -28,7 +33,7 @@ Description:
28 integer value range from 1 to 160, and 0 means no request. 33 integer value range from 1 to 160, and 0 means no request.
29 This file can be read and written. 34 This file can be read and written.
30 35
31What: /sys/devices/pnp0/00:<bus-num>/ppi/response 36What: /sys/class/tpm/tpmX/ppi/response
32Date: August 2012 37Date: August 2012
33Contact: xiaoyan.zhang@intel.com 38Contact: xiaoyan.zhang@intel.com
34Description: 39Description:
@@ -37,7 +42,7 @@ Description:
37 : <response description>". 42 : <response description>".
38 This file is readonly. 43 This file is readonly.
39 44
40What: /sys/devices/pnp0/<bus-num>/ppi/transition_action 45What: /sys/class/tpm/tpmX/ppi/transition_action
41Date: August 2012 46Date: August 2012
42Contact: xiaoyan.zhang@intel.com 47Contact: xiaoyan.zhang@intel.com
43Description: 48Description:
@@ -47,7 +52,7 @@ Description:
47 description>". 52 description>".
48 This file is readonly. 53 This file is readonly.
49 54
50What: /sys/devices/pnp0/<bus-num>/ppi/tcg_operations 55What: /sys/class/tpm/tpmX/ppi/tcg_operations
51Date: August 2012 56Date: August 2012
52Contact: xiaoyan.zhang@intel.com 57Contact: xiaoyan.zhang@intel.com
53Description: 58Description:
@@ -58,7 +63,7 @@ Description:
58 This attribute is only supported by PPI version 1.2+. 63 This attribute is only supported by PPI version 1.2+.
59 This file is readonly. 64 This file is readonly.
60 65
61What: /sys/devices/pnp0/<bus-num>/ppi/vs_operations 66What: /sys/class/tpm/tpmX/ppi/vs_operations
62Date: August 2012 67Date: August 2012
63Contact: xiaoyan.zhang@intel.com 68Contact: xiaoyan.zhang@intel.com
64Description: 69Description:
diff --git a/Documentation/ABI/testing/sysfs-fs-f2fs b/Documentation/ABI/testing/sysfs-fs-f2fs
index 2c4cc42006e8..0345f2d1c727 100644
--- a/Documentation/ABI/testing/sysfs-fs-f2fs
+++ b/Documentation/ABI/testing/sysfs-fs-f2fs
@@ -80,3 +80,15 @@ Date: February 2015
80Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> 80Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
81Description: 81Description:
82 Controls the trimming rate in batch mode. 82 Controls the trimming rate in batch mode.
83
84What: /sys/fs/f2fs/<disk>/cp_interval
85Date: October 2015
86Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
87Description:
88 Controls the checkpoint timing.
89
90What: /sys/fs/f2fs/<disk>/ra_nid_pages
91Date: October 2015
92Contact: "Chao Yu" <chao2.yu@samsung.com>
93Description:
94 Controls the count of nid pages to be readaheaded.
diff --git a/Documentation/ABI/testing/sysfs-power b/Documentation/ABI/testing/sysfs-power
index f4551816329e..50b368d490b5 100644
--- a/Documentation/ABI/testing/sysfs-power
+++ b/Documentation/ABI/testing/sysfs-power
@@ -256,3 +256,15 @@ Description:
256 Writing a "1" enables this printing while writing a "0" 256 Writing a "1" enables this printing while writing a "0"
257 disables it. The default value is "0". Reading from this file 257 disables it. The default value is "0". Reading from this file
258 will display the current value. 258 will display the current value.
259
260What: /sys/power/pm_wakeup_irq
261Date: April 2015
262Contact: Alexandra Yates <alexandra.yates@linux.intel.org>
263Description:
264 The /sys/power/pm_wakeup_irq file reports to user space the IRQ
265 number of the first wakeup interrupt (that is, the first
266 interrupt from an IRQ line armed for system wakeup) seen by the
267 kernel during the most recent system suspend/resume cycle.
268
269 This output is useful for system wakeup diagnostics of spurious
270 wakeup interrupts.
diff --git a/Documentation/Changes b/Documentation/Changes
index 6d8863004858..ec97b77c8b00 100644
--- a/Documentation/Changes
+++ b/Documentation/Changes
@@ -43,7 +43,8 @@ o udev 081 # udevd --version
43o grub 0.93 # grub --version || grub-install --version 43o grub 0.93 # grub --version || grub-install --version
44o mcelog 0.6 # mcelog --version 44o mcelog 0.6 # mcelog --version
45o iptables 1.4.2 # iptables -V 45o iptables 1.4.2 # iptables -V
46o openssl & libcrypto 1.0.1k # openssl version 46o openssl & libcrypto 1.0.0 # openssl version
47o bc 1.06.95 # bc --version
47 48
48 49
49Kernel compilation 50Kernel compilation
diff --git a/Documentation/DMA-API-HOWTO.txt b/Documentation/DMA-API-HOWTO.txt
index 55b70b903ead..d69b3fc64e14 100644
--- a/Documentation/DMA-API-HOWTO.txt
+++ b/Documentation/DMA-API-HOWTO.txt
@@ -681,6 +681,11 @@ or:
681 681
682as appropriate. 682as appropriate.
683 683
684PLEASE NOTE: The 'nents' argument to dma_sync_sg_for_cpu() and
685 dma_sync_sg_for_device() must be the same passed to
686 dma_map_sg(). It is _NOT_ the count returned by
687 dma_map_sg().
688
684After the last DMA transfer call one of the DMA unmap routines 689After the last DMA transfer call one of the DMA unmap routines
685dma_unmap_{single,sg}(). If you don't touch the data from the first 690dma_unmap_{single,sg}(). If you don't touch the data from the first
686dma_map_*() call till dma_unmap_*(), then you don't have to call the 691dma_map_*() call till dma_unmap_*(), then you don't have to call the
diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt
index edccacd4f048..1e98a7e6bccc 100644
--- a/Documentation/DMA-API.txt
+++ b/Documentation/DMA-API.txt
@@ -142,19 +142,6 @@ Part Ic - DMA addressing limitations
142------------------------------------ 142------------------------------------
143 143
144int 144int
145dma_supported(struct device *dev, u64 mask)
146
147Checks to see if the device can support DMA to the memory described by
148mask.
149
150Returns: 1 if it can and 0 if it can't.
151
152Notes: This routine merely tests to see if the mask is possible. It
153won't change the current mask settings. It is more intended as an
154internal API for use by the platform than an external API for use by
155driver writers.
156
157int
158dma_set_mask_and_coherent(struct device *dev, u64 mask) 145dma_set_mask_and_coherent(struct device *dev, u64 mask)
159 146
160Checks to see if the mask is possible and updates the device 147Checks to see if the mask is possible and updates the device
@@ -340,7 +327,7 @@ accessed sg->address and sg->length as shown above.
340 327
341 void 328 void
342 dma_unmap_sg(struct device *dev, struct scatterlist *sg, 329 dma_unmap_sg(struct device *dev, struct scatterlist *sg,
343 int nhwentries, enum dma_data_direction direction) 330 int nents, enum dma_data_direction direction)
344 331
345Unmap the previously mapped scatter/gather list. All the parameters 332Unmap the previously mapped scatter/gather list. All the parameters
346must be the same as those and passed in to the scatter/gather mapping 333must be the same as those and passed in to the scatter/gather mapping
@@ -356,10 +343,10 @@ void
356dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t size, 343dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t size,
357 enum dma_data_direction direction) 344 enum dma_data_direction direction)
358void 345void
359dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems, 346dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nents,
360 enum dma_data_direction direction) 347 enum dma_data_direction direction)
361void 348void
362dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems, 349dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nents,
363 enum dma_data_direction direction) 350 enum dma_data_direction direction)
364 351
365Synchronise a single contiguous or scatter/gather mapping for the CPU 352Synchronise a single contiguous or scatter/gather mapping for the CPU
diff --git a/Documentation/DocBook/.gitignore b/Documentation/DocBook/.gitignore
index 7ebd5465d927..e05da3f7aa21 100644
--- a/Documentation/DocBook/.gitignore
+++ b/Documentation/DocBook/.gitignore
@@ -11,5 +11,7 @@
11*.png 11*.png
12*.gif 12*.gif
13*.svg 13*.svg
14*.proc
15*.db
14media-indices.tmpl 16media-indices.tmpl
15media-entities.tmpl 17media-entities.tmpl
diff --git a/Documentation/DocBook/80211.tmpl b/Documentation/DocBook/80211.tmpl
index aac9357d4866..f9b9ad7894f5 100644
--- a/Documentation/DocBook/80211.tmpl
+++ b/Documentation/DocBook/80211.tmpl
@@ -154,8 +154,9 @@
154!Finclude/net/cfg80211.h cfg80211_scan_request 154!Finclude/net/cfg80211.h cfg80211_scan_request
155!Finclude/net/cfg80211.h cfg80211_scan_done 155!Finclude/net/cfg80211.h cfg80211_scan_done
156!Finclude/net/cfg80211.h cfg80211_bss 156!Finclude/net/cfg80211.h cfg80211_bss
157!Finclude/net/cfg80211.h cfg80211_inform_bss_width_frame 157!Finclude/net/cfg80211.h cfg80211_inform_bss
158!Finclude/net/cfg80211.h cfg80211_inform_bss_width 158!Finclude/net/cfg80211.h cfg80211_inform_bss_frame_data
159!Finclude/net/cfg80211.h cfg80211_inform_bss_data
159!Finclude/net/cfg80211.h cfg80211_unlink_bss 160!Finclude/net/cfg80211.h cfg80211_unlink_bss
160!Finclude/net/cfg80211.h cfg80211_find_ie 161!Finclude/net/cfg80211.h cfg80211_find_ie
161!Finclude/net/cfg80211.h ieee80211_bss_get_ie 162!Finclude/net/cfg80211.h ieee80211_bss_get_ie
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index 93eff64387cd..91f6d89bb19f 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -14,7 +14,7 @@ DOCBOOKS := z8530book.xml device-drivers.xml \
14 genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \ 14 genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \
15 80211.xml debugobjects.xml sh.xml regulator.xml \ 15 80211.xml debugobjects.xml sh.xml regulator.xml \
16 alsa-driver-api.xml writing-an-alsa-driver.xml \ 16 alsa-driver-api.xml writing-an-alsa-driver.xml \
17 tracepoint.xml drm.xml media_api.xml w1.xml \ 17 tracepoint.xml gpu.xml media_api.xml w1.xml \
18 writing_musb_glue_layer.xml crypto-API.xml iio.xml 18 writing_musb_glue_layer.xml crypto-API.xml iio.xml
19 19
20include Documentation/DocBook/media/Makefile 20include Documentation/DocBook/media/Makefile
@@ -69,6 +69,12 @@ installmandocs: mandocs
69KERNELDOCXMLREF = $(srctree)/scripts/kernel-doc-xml-ref 69KERNELDOCXMLREF = $(srctree)/scripts/kernel-doc-xml-ref
70KERNELDOC = $(srctree)/scripts/kernel-doc 70KERNELDOC = $(srctree)/scripts/kernel-doc
71DOCPROC = $(objtree)/scripts/docproc 71DOCPROC = $(objtree)/scripts/docproc
72CHECK_LC_CTYPE = $(objtree)/scripts/check-lc_ctype
73
74# Use a fixed encoding - UTF-8 if the C library has support built-in
75# or ASCII if not
76LC_CTYPE := $(call try-run, LC_CTYPE=C.UTF-8 $(CHECK_LC_CTYPE),C.UTF-8,C)
77export LC_CTYPE
72 78
73XMLTOFLAGS = -m $(srctree)/$(src)/stylesheet.xsl 79XMLTOFLAGS = -m $(srctree)/$(src)/stylesheet.xsl
74XMLTOFLAGS += --skip-validation 80XMLTOFLAGS += --skip-validation
diff --git a/Documentation/DocBook/alsa-driver-api.tmpl b/Documentation/DocBook/alsa-driver-api.tmpl
index e94a10bb4a9e..53f439dcc94b 100644
--- a/Documentation/DocBook/alsa-driver-api.tmpl
+++ b/Documentation/DocBook/alsa-driver-api.tmpl
@@ -112,6 +112,8 @@
112!Esound/soc/soc-devres.c 112!Esound/soc/soc-devres.c
113!Esound/soc/soc-io.c 113!Esound/soc/soc-io.c
114!Esound/soc/soc-pcm.c 114!Esound/soc/soc-pcm.c
115!Esound/soc/soc-ops.c
116!Esound/soc/soc-compress.c
115 </sect1> 117 </sect1>
116 <sect1><title>ASoC DAPM API</title> 118 <sect1><title>ASoC DAPM API</title>
117!Esound/soc/soc-dapm.c 119!Esound/soc/soc-dapm.c
diff --git a/Documentation/DocBook/device-drivers.tmpl b/Documentation/DocBook/device-drivers.tmpl
index 1d6008d51b55..42a2d8593e39 100644
--- a/Documentation/DocBook/device-drivers.tmpl
+++ b/Documentation/DocBook/device-drivers.tmpl
@@ -221,6 +221,9 @@ X!Isound/sound_firmware.c
221 <title>Media Devices</title> 221 <title>Media Devices</title>
222 222
223 <sect1><title>Video2Linux devices</title> 223 <sect1><title>Video2Linux devices</title>
224!Iinclude/media/tuner.h
225!Iinclude/media/tuner-types.h
226!Iinclude/media/tveeprom.h
224!Iinclude/media/v4l2-async.h 227!Iinclude/media/v4l2-async.h
225!Iinclude/media/v4l2-ctrls.h 228!Iinclude/media/v4l2-ctrls.h
226!Iinclude/media/v4l2-dv-timings.h 229!Iinclude/media/v4l2-dv-timings.h
@@ -231,6 +234,7 @@ X!Isound/sound_firmware.c
231!Iinclude/media/v4l2-of.h 234!Iinclude/media/v4l2-of.h
232!Iinclude/media/v4l2-subdev.h 235!Iinclude/media/v4l2-subdev.h
233!Iinclude/media/videobuf2-core.h 236!Iinclude/media/videobuf2-core.h
237!Iinclude/media/videobuf2-v4l2.h
234!Iinclude/media/videobuf2-memops.h 238!Iinclude/media/videobuf2-memops.h
235 </sect1> 239 </sect1>
236 <sect1><title>Digital TV (DVB) devices</title> 240 <sect1><title>Digital TV (DVB) devices</title>
@@ -239,15 +243,82 @@ X!Isound/sound_firmware.c
239!Idrivers/media/dvb-core/dvb_math.h 243!Idrivers/media/dvb-core/dvb_math.h
240!Idrivers/media/dvb-core/dvb_ringbuffer.h 244!Idrivers/media/dvb-core/dvb_ringbuffer.h
241!Idrivers/media/dvb-core/dvbdev.h 245!Idrivers/media/dvb-core/dvbdev.h
242 </sect1> 246 <sect1><title>Digital TV Demux API</title>
243 <sect1><title>Remote Controller devices</title> 247 <para>The kernel demux API defines a driver-internal interface for
248 registering low-level, hardware specific driver to a hardware
249 independent demux layer. It is only of interest for Digital TV
250 device driver writers. The header file for this API is named
251 <constant>demux.h</constant> and located in
252 <constant>drivers/media/dvb-core</constant>.</para>
253
254 <para>The demux API should be implemented for each demux in the
255 system. It is used to select the TS source of a demux and to manage
256 the demux resources. When the demux client allocates a resource via
257 the demux API, it receives a pointer to the API of that
258 resource.</para>
259 <para>Each demux receives its TS input from a DVB front-end or from
260 memory, as set via this demux API. In a system with more than one
261 front-end, the API can be used to select one of the DVB front-ends
262 as a TS source for a demux, unless this is fixed in the HW platform.
263 The demux API only controls front-ends regarding to their connections
264 with demuxes; the APIs used to set the other front-end parameters,
265 such as tuning, are not defined in this document.</para>
266 <para>The functions that implement the abstract interface demux should
267 be defined static or module private and registered to the Demux
268 core for external access. It is not necessary to implement every
269 function in the struct <constant>dmx_demux</constant>. For example,
270 a demux interface might support Section filtering, but not PES
271 filtering. The API client is expected to check the value of any
272 function pointer before calling the function: the value of NULL means
273 that the &#8220;function is not available&#8221;.</para>
274 <para>Whenever the functions of the demux API modify shared data,
275 the possibilities of lost update and race condition problems should
276 be addressed, e.g. by protecting parts of code with mutexes.</para>
277 <para>Note that functions called from a bottom half context must not
278 sleep. Even a simple memory allocation without using GFP_ATOMIC can
279 result in a kernel thread being put to sleep if swapping is needed.
280 For example, the Linux kernel calls the functions of a network device
281 interface from a bottom half context. Thus, if a demux API function
282 is called from network device code, the function must not sleep.
283 </para>
284 </sect1>
285
286 <section id="demux_callback_api">
287 <title>Demux Callback API</title>
288 <para>This kernel-space API comprises the callback functions that
289 deliver filtered data to the demux client. Unlike the other DVB
290 kABIs, these functions are provided by the client and called from
291 the demux code.</para>
292 <para>The function pointers of this abstract interface are not
293 packed into a structure as in the other demux APIs, because the
294 callback functions are registered and used independent of each
295 other. As an example, it is possible for the API client to provide
296 several callback functions for receiving TS packets and no
297 callbacks for PES packets or sections.</para>
298 <para>The functions that implement the callback API need not be
299 re-entrant: when a demux driver calls one of these functions,
300 the driver is not allowed to call the function again before
301 the original call returns. If a callback is triggered by a
302 hardware interrupt, it is recommended to use the Linux
303 &#8220;bottom half&#8221; mechanism or start a tasklet instead of
304 making the callback function call directly from a hardware
305 interrupt.</para>
306 <para>This mechanism is implemented by
307 <link linkend='API-dmx-ts-cb'>dmx_ts_cb()</link> and
308 <link linkend='API-dmx-section-cb'>dmx_section_cb()</link>.</para>
309 </section>
310
311!Idrivers/media/dvb-core/demux.h
312 </sect1>
313 <sect1><title>Remote Controller devices</title>
244!Iinclude/media/rc-core.h 314!Iinclude/media/rc-core.h
245 </sect1> 315!Iinclude/media/lirc_dev.h
246 <sect1><title>Media Controller devices</title> 316 </sect1>
317 <sect1><title>Media Controller devices</title>
247!Iinclude/media/media-device.h 318!Iinclude/media/media-device.h
248!Iinclude/media/media-devnode.h 319!Iinclude/media/media-devnode.h
249!Iinclude/media/media-entity.h 320!Iinclude/media/media-entity.h
250 </sect1> 321 </sect1>
251 322
252 </chapter> 323 </chapter>
253 324
diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/gpu.tmpl
index 9ddf8c6cb887..201dcd3c2e9d 100644
--- a/Documentation/DocBook/drm.tmpl
+++ b/Documentation/DocBook/gpu.tmpl
@@ -2,9 +2,9 @@
2<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 2<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []> 3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []>
4 4
5<book id="drmDevelopersGuide"> 5<book id="gpuDevelopersGuide">
6 <bookinfo> 6 <bookinfo>
7 <title>Linux DRM Developer's Guide</title> 7 <title>Linux GPU Driver Developer's Guide</title>
8 8
9 <authorgroup> 9 <authorgroup>
10 <author> 10 <author>
@@ -40,6 +40,16 @@
40 </address> 40 </address>
41 </affiliation> 41 </affiliation>
42 </author> 42 </author>
43 <author>
44 <firstname>Lukas</firstname>
45 <surname>Wunner</surname>
46 <contrib>vga_switcheroo documentation</contrib>
47 <affiliation>
48 <address>
49 <email>lukas@wunner.de</email>
50 </address>
51 </affiliation>
52 </author>
43 </authorgroup> 53 </authorgroup>
44 54
45 <copyright> 55 <copyright>
@@ -51,6 +61,10 @@
51 <year>2012</year> 61 <year>2012</year>
52 <holder>Laurent Pinchart</holder> 62 <holder>Laurent Pinchart</holder>
53 </copyright> 63 </copyright>
64 <copyright>
65 <year>2015</year>
66 <holder>Lukas Wunner</holder>
67 </copyright>
54 68
55 <legalnotice> 69 <legalnotice>
56 <para> 70 <para>
@@ -69,6 +83,13 @@
69 <revremark>Added extensive documentation about driver internals. 83 <revremark>Added extensive documentation about driver internals.
70 </revremark> 84 </revremark>
71 </revision> 85 </revision>
86 <revision>
87 <revnumber>1.1</revnumber>
88 <date>2015-10-11</date>
89 <authorinitials>LW</authorinitials>
90 <revremark>Added vga_switcheroo documentation.
91 </revremark>
92 </revision>
72 </revhistory> 93 </revhistory>
73 </bookinfo> 94 </bookinfo>
74 95
@@ -78,9 +99,9 @@
78 <title>DRM Core</title> 99 <title>DRM Core</title>
79 <partintro> 100 <partintro>
80 <para> 101 <para>
81 This first part of the DRM Developer's Guide documents core DRM code, 102 This first part of the GPU Driver Developer's Guide documents core DRM
82 helper libraries for writing drivers and generic userspace interfaces 103 code, helper libraries for writing drivers and generic userspace
83 exposed by DRM drivers. 104 interfaces exposed by DRM drivers.
84 </para> 105 </para>
85 </partintro> 106 </partintro>
86 107
@@ -138,14 +159,10 @@
138 <para> 159 <para>
139 At the core of every DRM driver is a <structname>drm_driver</structname> 160 At the core of every DRM driver is a <structname>drm_driver</structname>
140 structure. Drivers typically statically initialize a drm_driver structure, 161 structure. Drivers typically statically initialize a drm_driver structure,
141 and then pass it to one of the <function>drm_*_init()</function> functions 162 and then pass it to <function>drm_dev_alloc()</function> to allocate a
142 to register it with the DRM subsystem. 163 device instance. After the device instance is fully initialized it can be
143 </para> 164 registered (which makes it accessible from userspace) using
144 <para> 165 <function>drm_dev_register()</function>.
145 Newer drivers that no longer require a <structname>drm_bus</structname>
146 structure can alternatively use the low-level device initialization and
147 registration functions such as <function>drm_dev_alloc()</function> and
148 <function>drm_dev_register()</function> directly.
149 </para> 166 </para>
150 <para> 167 <para>
151 The <structname>drm_driver</structname> structure contains static 168 The <structname>drm_driver</structname> structure contains static
@@ -296,83 +313,12 @@ char *date;</synopsis>
296 </sect3> 313 </sect3>
297 </sect2> 314 </sect2>
298 <sect2> 315 <sect2>
299 <title>Device Registration</title> 316 <title>Device Instance and Driver Handling</title>
300 <para> 317!Pdrivers/gpu/drm/drm_drv.c driver instance overview
301 A number of functions are provided to help with device registration.
302 The functions deal with PCI and platform devices, respectively.
303 </para>
304!Edrivers/gpu/drm/drm_pci.c
305!Edrivers/gpu/drm/drm_platform.c
306 <para>
307 New drivers that no longer rely on the services provided by the
308 <structname>drm_bus</structname> structure can call the low-level
309 device registration functions directly. The
310 <function>drm_dev_alloc()</function> function can be used to allocate
311 and initialize a new <structname>drm_device</structname> structure.
312 Drivers will typically want to perform some additional setup on this
313 structure, such as allocating driver-specific data and storing a
314 pointer to it in the DRM device's <structfield>dev_private</structfield>
315 field. Drivers should also set the device's unique name using the
316 <function>drm_dev_set_unique()</function> function. After it has been
317 set up a device can be registered with the DRM subsystem by calling
318 <function>drm_dev_register()</function>. This will cause the device to
319 be exposed to userspace and will call the driver's
320 <structfield>.load()</structfield> implementation. When a device is
321 removed, the DRM device can safely be unregistered and freed by calling
322 <function>drm_dev_unregister()</function> followed by a call to
323 <function>drm_dev_unref()</function>.
324 </para>
325!Edrivers/gpu/drm/drm_drv.c 318!Edrivers/gpu/drm/drm_drv.c
326 </sect2> 319 </sect2>
327 <sect2> 320 <sect2>
328 <title>Driver Load</title> 321 <title>Driver Load</title>
329 <para>
330 The <methodname>load</methodname> method is the driver and device
331 initialization entry point. The method is responsible for allocating and
332 initializing driver private data, performing resource allocation and
333 mapping (e.g. acquiring
334 clocks, mapping registers or allocating command buffers), initializing
335 the memory manager (<xref linkend="drm-memory-management"/>), installing
336 the IRQ handler (<xref linkend="drm-irq-registration"/>), setting up
337 vertical blanking handling (<xref linkend="drm-vertical-blank"/>), mode
338 setting (<xref linkend="drm-mode-setting"/>) and initial output
339 configuration (<xref linkend="drm-kms-init"/>).
340 </para>
341 <note><para>
342 If compatibility is a concern (e.g. with drivers converted over from
343 User Mode Setting to Kernel Mode Setting), care must be taken to prevent
344 device initialization and control that is incompatible with currently
345 active userspace drivers. For instance, if user level mode setting
346 drivers are in use, it would be problematic to perform output discovery
347 &amp; configuration at load time. Likewise, if user-level drivers
348 unaware of memory management are in use, memory management and command
349 buffer setup may need to be omitted. These requirements are
350 driver-specific, and care needs to be taken to keep both old and new
351 applications and libraries working.
352 </para></note>
353 <synopsis>int (*load) (struct drm_device *, unsigned long flags);</synopsis>
354 <para>
355 The method takes two arguments, a pointer to the newly created
356 <structname>drm_device</structname> and flags. The flags are used to
357 pass the <structfield>driver_data</structfield> field of the device id
358 corresponding to the device passed to <function>drm_*_init()</function>.
359 Only PCI devices currently use this, USB and platform DRM drivers have
360 their <methodname>load</methodname> method called with flags to 0.
361 </para>
362 <sect3>
363 <title>Driver Private Data</title>
364 <para>
365 The driver private hangs off the main
366 <structname>drm_device</structname> structure and can be used for
367 tracking various device-specific bits of information, like register
368 offsets, command buffer status, register state for suspend/resume, etc.
369 At load time, a driver may simply allocate one and set
370 <structname>drm_device</structname>.<structfield>dev_priv</structfield>
371 appropriately; it should be freed and
372 <structname>drm_device</structname>.<structfield>dev_priv</structfield>
373 set to NULL when the driver is unloaded.
374 </para>
375 </sect3>
376 <sect3 id="drm-irq-registration"> 322 <sect3 id="drm-irq-registration">
377 <title>IRQ Registration</title> 323 <title>IRQ Registration</title>
378 <para> 324 <para>
@@ -465,6 +411,18 @@ char *date;</synopsis>
465 </para> 411 </para>
466 </sect3> 412 </sect3>
467 </sect2> 413 </sect2>
414 <sect2>
415 <title>Bus-specific Device Registration and PCI Support</title>
416 <para>
417 A number of functions are provided to help with device registration.
418 The functions deal with PCI and platform devices respectively and are
419 only provided for historical reasons. These are all deprecated and
420 shouldn't be used in new drivers. Besides that there's a few
421 helpers for pci drivers.
422 </para>
423!Edrivers/gpu/drm/drm_pci.c
424!Edrivers/gpu/drm/drm_platform.c
425 </sect2>
468 </sect1> 426 </sect1>
469 427
470 <!-- Internals: memory management --> 428 <!-- Internals: memory management -->
@@ -3646,10 +3604,11 @@ void (*postclose) (struct drm_device *, struct drm_file *);</synopsis>
3646 plane properties to default value, so that a subsequent open of the 3604 plane properties to default value, so that a subsequent open of the
3647 device will not inherit state from the previous user. It can also be 3605 device will not inherit state from the previous user. It can also be
3648 used to execute delayed power switching state changes, e.g. in 3606 used to execute delayed power switching state changes, e.g. in
3649 conjunction with the vga-switcheroo infrastructure. Beyond that KMS 3607 conjunction with the vga_switcheroo infrastructure (see
3650 drivers should not do any further cleanup. Only legacy UMS drivers might 3608 <xref linkend="vga_switcheroo"/>). Beyond that KMS drivers should not
3651 need to clean up device state so that the vga console or an independent 3609 do any further cleanup. Only legacy UMS drivers might need to clean up
3652 fbdev driver could take over. 3610 device state so that the vga console or an independent fbdev driver
3611 could take over.
3653 </para> 3612 </para>
3654 </sect2> 3613 </sect2>
3655 <sect2> 3614 <sect2>
@@ -3747,11 +3706,14 @@ int num_ioctls;</synopsis>
3747 </para></listitem> 3706 </para></listitem>
3748 <listitem><para> 3707 <listitem><para>
3749 DRM_UNLOCKED - The ioctl handler will be called without locking 3708 DRM_UNLOCKED - The ioctl handler will be called without locking
3750 the DRM global mutex 3709 the DRM global mutex. This is the enforced default for kms drivers
3710 (i.e. using the DRIVER_MODESET flag) and hence shouldn't be used
3711 any more for new drivers.
3751 </para></listitem> 3712 </para></listitem>
3752 </itemizedlist> 3713 </itemizedlist>
3753 </para> 3714 </para>
3754 </para> 3715 </para>
3716!Edrivers/gpu/drm/drm_ioctl.c
3755 </sect2> 3717 </sect2>
3756 </sect1> 3718 </sect1>
3757 <sect1> 3719 <sect1>
@@ -3949,8 +3911,8 @@ int num_ioctls;</synopsis>
3949 3911
3950 <partintro> 3912 <partintro>
3951 <para> 3913 <para>
3952 This second part of the DRM Developer's Guide documents driver code, 3914 This second part of the GPU Driver Developer's Guide documents driver
3953 implementation details and also all the driver-specific userspace 3915 code, implementation details and also all the driver-specific userspace
3954 interfaces. Especially since all hardware-acceleration interfaces to 3916 interfaces. Especially since all hardware-acceleration interfaces to
3955 userspace are driver specific for efficiency and other reasons these 3917 userspace are driver specific for efficiency and other reasons these
3956 interfaces can be rather substantial. Hence every driver has its own 3918 interfaces can be rather substantial. Hence every driver has its own
@@ -4051,6 +4013,7 @@ int num_ioctls;</synopsis>
4051 <title>High Definition Audio</title> 4013 <title>High Definition Audio</title>
4052!Pdrivers/gpu/drm/i915/intel_audio.c High Definition Audio over HDMI and Display Port 4014!Pdrivers/gpu/drm/i915/intel_audio.c High Definition Audio over HDMI and Display Port
4053!Idrivers/gpu/drm/i915/intel_audio.c 4015!Idrivers/gpu/drm/i915/intel_audio.c
4016!Iinclude/drm/i915_component.h
4054 </sect2> 4017 </sect2>
4055 <sect2> 4018 <sect2>
4056 <title>Panel Self Refresh PSR (PSR/SRD)</title> 4019 <title>Panel Self Refresh PSR (PSR/SRD)</title>
@@ -4238,6 +4201,20 @@ int num_ioctls;</synopsis>
4238 </sect2> 4201 </sect2>
4239 </sect1> 4202 </sect1>
4240 <sect1> 4203 <sect1>
4204 <title>GuC-based Command Submission</title>
4205 <sect2>
4206 <title>GuC</title>
4207!Pdrivers/gpu/drm/i915/intel_guc_loader.c GuC-specific firmware loader
4208!Idrivers/gpu/drm/i915/intel_guc_loader.c
4209 </sect2>
4210 <sect2>
4211 <title>GuC Client</title>
4212!Pdrivers/gpu/drm/i915/i915_guc_submission.c GuC-based command submissison
4213!Idrivers/gpu/drm/i915/i915_guc_submission.c
4214 </sect2>
4215 </sect1>
4216
4217 <sect1>
4241 <title> Tracing </title> 4218 <title> Tracing </title>
4242 <para> 4219 <para>
4243 This sections covers all things related to the tracepoints implemented in 4220 This sections covers all things related to the tracepoints implemented in
@@ -4260,4 +4237,50 @@ int num_ioctls;</synopsis>
4260 </chapter> 4237 </chapter>
4261!Cdrivers/gpu/drm/i915/i915_irq.c 4238!Cdrivers/gpu/drm/i915/i915_irq.c
4262</part> 4239</part>
4240
4241<part id="vga_switcheroo">
4242 <title>vga_switcheroo</title>
4243 <partintro>
4244!Pdrivers/gpu/vga/vga_switcheroo.c Overview
4245 </partintro>
4246
4247 <chapter id="modes_of_use">
4248 <title>Modes of Use</title>
4249 <sect1>
4250 <title>Manual switching and manual power control</title>
4251!Pdrivers/gpu/vga/vga_switcheroo.c Manual switching and manual power control
4252 </sect1>
4253 <sect1>
4254 <title>Driver power control</title>
4255!Pdrivers/gpu/vga/vga_switcheroo.c Driver power control
4256 </sect1>
4257 </chapter>
4258
4259 <chapter id="pubfunctions">
4260 <title>Public functions</title>
4261!Edrivers/gpu/vga/vga_switcheroo.c
4262 </chapter>
4263
4264 <chapter id="pubstructures">
4265 <title>Public structures</title>
4266!Finclude/linux/vga_switcheroo.h vga_switcheroo_handler
4267!Finclude/linux/vga_switcheroo.h vga_switcheroo_client_ops
4268 </chapter>
4269
4270 <chapter id="pubconstants">
4271 <title>Public constants</title>
4272!Finclude/linux/vga_switcheroo.h vga_switcheroo_client_id
4273!Finclude/linux/vga_switcheroo.h vga_switcheroo_state
4274 </chapter>
4275
4276 <chapter id="privstructures">
4277 <title>Private structures</title>
4278!Fdrivers/gpu/vga/vga_switcheroo.c vgasr_priv
4279!Fdrivers/gpu/vga/vga_switcheroo.c vga_switcheroo_client
4280 </chapter>
4281
4282!Cdrivers/gpu/vga/vga_switcheroo.c
4283!Cinclude/linux/vga_switcheroo.h
4284</part>
4285
4263</book> 4286</book>
diff --git a/Documentation/DocBook/iio.tmpl b/Documentation/DocBook/iio.tmpl
index 06bb53de5a47..98be322673da 100644
--- a/Documentation/DocBook/iio.tmpl
+++ b/Documentation/DocBook/iio.tmpl
@@ -578,7 +578,7 @@
578 work together. 578 work together.
579 </para> 579 </para>
580 <sect2 id="iiotrigbufsetup"> <title> IIO triggered buffer setup</title> 580 <sect2 id="iiotrigbufsetup"> <title> IIO triggered buffer setup</title>
581!Edrivers/iio/industrialio-triggered-buffer.c 581!Edrivers/iio/buffer/industrialio-triggered-buffer.c
582!Finclude/linux/iio/iio.h iio_buffer_setup_ops 582!Finclude/linux/iio/iio.h iio_buffer_setup_ops
583 583
584 584
diff --git a/Documentation/DocBook/media/dvb/dvbapi.xml b/Documentation/DocBook/media/dvb/dvbapi.xml
index 858fd7d17104..8576481e20ae 100644
--- a/Documentation/DocBook/media/dvb/dvbapi.xml
+++ b/Documentation/DocBook/media/dvb/dvbapi.xml
@@ -125,9 +125,6 @@ Added ISDB-T test originally written by Patrick Boettcher
125 &sub-audio; 125 &sub-audio;
126 </section> 126 </section>
127 </chapter> 127 </chapter>
128 <chapter id="dvb_kdapi">
129 &sub-kdapi;
130 </chapter>
131 <chapter id="dvb_examples"> 128 <chapter id="dvb_examples">
132 &sub-examples; 129 &sub-examples;
133 </chapter> 130 </chapter>
diff --git a/Documentation/DocBook/media/dvb/kdapi.xml b/Documentation/DocBook/media/dvb/kdapi.xml
deleted file mode 100644
index 68bcd33a82c3..000000000000
--- a/Documentation/DocBook/media/dvb/kdapi.xml
+++ /dev/null
@@ -1,2309 +0,0 @@
1<title>Kernel Demux API</title>
2<para>The kernel demux API defines a driver-internal interface for registering low-level,
3hardware specific driver to a hardware independent demux layer. It is only of interest for
4DVB device driver writers. The header file for this API is named <constant>demux.h</constant> and located in
5<constant>">drivers/media/dvb-core</constant>.
6</para>
7<para>Maintainer note: This section must be reviewed. It is probably out of date.
8</para>
9
10<section id="kernel_demux_data_types">
11<title>Kernel Demux Data Types</title>
12
13
14<section id="dmx_success_t">
15<title>dmx_success_t</title>
16 <programlisting>
17 typedef enum {
18 DMX_OK = 0, /&#x22C6; Received Ok &#x22C6;/
19 DMX_LENGTH_ERROR, /&#x22C6; Incorrect length &#x22C6;/
20 DMX_OVERRUN_ERROR, /&#x22C6; Receiver ring buffer overrun &#x22C6;/
21 DMX_CRC_ERROR, /&#x22C6; Incorrect CRC &#x22C6;/
22 DMX_FRAME_ERROR, /&#x22C6; Frame alignment error &#x22C6;/
23 DMX_FIFO_ERROR, /&#x22C6; Receiver FIFO overrun &#x22C6;/
24 DMX_MISSED_ERROR /&#x22C6; Receiver missed packet &#x22C6;/
25 } dmx_success_t;
26</programlisting>
27
28</section>
29<section id="ts_filter_types">
30<title>TS filter types</title>
31 <programlisting>
32 /&#x22C6;--------------------------------------------------------------------------&#x22C6;/
33 /&#x22C6; TS packet reception &#x22C6;/
34 /&#x22C6;--------------------------------------------------------------------------&#x22C6;/
35
36 /&#x22C6; TS filter type for set_type() &#x22C6;/
37
38 #define TS_PACKET 1 /&#x22C6; send TS packets (188 bytes) to callback (default) &#x22C6;/
39 #define TS_PAYLOAD_ONLY 2 /&#x22C6; in case TS_PACKET is set, only send the TS
40 payload (&#x003C;=184 bytes per packet) to callback &#x22C6;/
41 #define TS_DECODER 4 /&#x22C6; send stream to built-in decoder (if present) &#x22C6;/
42</programlisting>
43
44</section>
45<section id="dmx_ts_pes_t">
46<title>dmx_ts_pes_t</title>
47<para>The structure
48</para>
49<programlisting>
50 typedef enum
51 {
52 DMX_TS_PES_AUDIO, /&#x22C6; also send packets to audio decoder (if it exists) &#x22C6;/
53 DMX_TS_PES_VIDEO, /&#x22C6; ... &#x22C6;/
54 DMX_TS_PES_TELETEXT,
55 DMX_TS_PES_SUBTITLE,
56 DMX_TS_PES_PCR,
57 DMX_TS_PES_OTHER,
58 } dmx_ts_pes_t;
59</programlisting>
60<para>describes the PES type for filters which write to a built-in decoder. The correspond (and
61should be kept identical) to the types in the demux device.
62</para>
63<programlisting>
64 struct dmx_ts_feed_s {
65 int is_filtering; /&#x22C6; Set to non-zero when filtering in progress &#x22C6;/
66 struct dmx_demux_s&#x22C6; parent; /&#x22C6; Back-pointer &#x22C6;/
67 void&#x22C6; priv; /&#x22C6; Pointer to private data of the API client &#x22C6;/
68 int (&#x22C6;set) (struct dmx_ts_feed_s&#x22C6; feed,
69 __u16 pid,
70 size_t callback_length,
71 size_t circular_buffer_size,
72 int descramble,
73 struct timespec timeout);
74 int (&#x22C6;start_filtering) (struct dmx_ts_feed_s&#x22C6; feed);
75 int (&#x22C6;stop_filtering) (struct dmx_ts_feed_s&#x22C6; feed);
76 int (&#x22C6;set_type) (struct dmx_ts_feed_s&#x22C6; feed,
77 int type,
78 dmx_ts_pes_t pes_type);
79 };
80
81 typedef struct dmx_ts_feed_s dmx_ts_feed_t;
82</programlisting>
83 <programlisting>
84 /&#x22C6;--------------------------------------------------------------------------&#x22C6;/
85 /&#x22C6; PES packet reception (not supported yet) &#x22C6;/
86 /&#x22C6;--------------------------------------------------------------------------&#x22C6;/
87
88 typedef struct dmx_pes_filter_s {
89 struct dmx_pes_s&#x22C6; parent; /&#x22C6; Back-pointer &#x22C6;/
90 void&#x22C6; priv; /&#x22C6; Pointer to private data of the API client &#x22C6;/
91 } dmx_pes_filter_t;
92</programlisting>
93 <programlisting>
94 typedef struct dmx_pes_feed_s {
95 int is_filtering; /&#x22C6; Set to non-zero when filtering in progress &#x22C6;/
96 struct dmx_demux_s&#x22C6; parent; /&#x22C6; Back-pointer &#x22C6;/
97 void&#x22C6; priv; /&#x22C6; Pointer to private data of the API client &#x22C6;/
98 int (&#x22C6;set) (struct dmx_pes_feed_s&#x22C6; feed,
99 __u16 pid,
100 size_t circular_buffer_size,
101 int descramble,
102 struct timespec timeout);
103 int (&#x22C6;start_filtering) (struct dmx_pes_feed_s&#x22C6; feed);
104 int (&#x22C6;stop_filtering) (struct dmx_pes_feed_s&#x22C6; feed);
105 int (&#x22C6;allocate_filter) (struct dmx_pes_feed_s&#x22C6; feed,
106 dmx_pes_filter_t&#x22C6;&#x22C6; filter);
107 int (&#x22C6;release_filter) (struct dmx_pes_feed_s&#x22C6; feed,
108 dmx_pes_filter_t&#x22C6; filter);
109 } dmx_pes_feed_t;
110</programlisting>
111 <programlisting>
112 typedef struct {
113 __u8 filter_value [DMX_MAX_FILTER_SIZE];
114 __u8 filter_mask [DMX_MAX_FILTER_SIZE];
115 struct dmx_section_feed_s&#x22C6; parent; /&#x22C6; Back-pointer &#x22C6;/
116 void&#x22C6; priv; /&#x22C6; Pointer to private data of the API client &#x22C6;/
117 } dmx_section_filter_t;
118</programlisting>
119 <programlisting>
120 struct dmx_section_feed_s {
121 int is_filtering; /&#x22C6; Set to non-zero when filtering in progress &#x22C6;/
122 struct dmx_demux_s&#x22C6; parent; /&#x22C6; Back-pointer &#x22C6;/
123 void&#x22C6; priv; /&#x22C6; Pointer to private data of the API client &#x22C6;/
124 int (&#x22C6;set) (struct dmx_section_feed_s&#x22C6; feed,
125 __u16 pid,
126 size_t circular_buffer_size,
127 int descramble,
128 int check_crc);
129 int (&#x22C6;allocate_filter) (struct dmx_section_feed_s&#x22C6; feed,
130 dmx_section_filter_t&#x22C6;&#x22C6; filter);
131 int (&#x22C6;release_filter) (struct dmx_section_feed_s&#x22C6; feed,
132 dmx_section_filter_t&#x22C6; filter);
133 int (&#x22C6;start_filtering) (struct dmx_section_feed_s&#x22C6; feed);
134 int (&#x22C6;stop_filtering) (struct dmx_section_feed_s&#x22C6; feed);
135 };
136 typedef struct dmx_section_feed_s dmx_section_feed_t;
137
138 /&#x22C6;--------------------------------------------------------------------------&#x22C6;/
139 /&#x22C6; Callback functions &#x22C6;/
140 /&#x22C6;--------------------------------------------------------------------------&#x22C6;/
141
142 typedef int (&#x22C6;dmx_ts_cb) ( __u8 &#x22C6; buffer1,
143 size_t buffer1_length,
144 __u8 &#x22C6; buffer2,
145 size_t buffer2_length,
146 dmx_ts_feed_t&#x22C6; source,
147 dmx_success_t success);
148
149 typedef int (&#x22C6;dmx_section_cb) ( __u8 &#x22C6; buffer1,
150 size_t buffer1_len,
151 __u8 &#x22C6; buffer2,
152 size_t buffer2_len,
153 dmx_section_filter_t &#x22C6; source,
154 dmx_success_t success);
155
156 typedef int (&#x22C6;dmx_pes_cb) ( __u8 &#x22C6; buffer1,
157 size_t buffer1_len,
158 __u8 &#x22C6; buffer2,
159 size_t buffer2_len,
160 dmx_pes_filter_t&#x22C6; source,
161 dmx_success_t success);
162
163 /&#x22C6;--------------------------------------------------------------------------&#x22C6;/
164 /&#x22C6; DVB Front-End &#x22C6;/
165 /&#x22C6;--------------------------------------------------------------------------&#x22C6;/
166
167 typedef enum {
168 DMX_OTHER_FE = 0,
169 DMX_SATELLITE_FE,
170 DMX_CABLE_FE,
171 DMX_TERRESTRIAL_FE,
172 DMX_LVDS_FE,
173 DMX_ASI_FE, /&#x22C6; DVB-ASI interface &#x22C6;/
174 DMX_MEMORY_FE
175 } dmx_frontend_source_t;
176
177 typedef struct {
178 /&#x22C6; The following char&#x22C6; fields point to NULL terminated strings &#x22C6;/
179 char&#x22C6; id; /&#x22C6; Unique front-end identifier &#x22C6;/
180 char&#x22C6; vendor; /&#x22C6; Name of the front-end vendor &#x22C6;/
181 char&#x22C6; model; /&#x22C6; Name of the front-end model &#x22C6;/
182 struct list_head connectivity_list; /&#x22C6; List of front-ends that can
183 be connected to a particular
184 demux &#x22C6;/
185 void&#x22C6; priv; /&#x22C6; Pointer to private data of the API client &#x22C6;/
186 dmx_frontend_source_t source;
187 } dmx_frontend_t;
188
189 /&#x22C6;--------------------------------------------------------------------------&#x22C6;/
190 /&#x22C6; MPEG-2 TS Demux &#x22C6;/
191 /&#x22C6;--------------------------------------------------------------------------&#x22C6;/
192
193 /&#x22C6;
194 &#x22C6; Flags OR'ed in the capabilites field of struct dmx_demux_s.
195 &#x22C6;/
196
197 #define DMX_TS_FILTERING 1
198 #define DMX_PES_FILTERING 2
199 #define DMX_SECTION_FILTERING 4
200 #define DMX_MEMORY_BASED_FILTERING 8 /&#x22C6; write() available &#x22C6;/
201 #define DMX_CRC_CHECKING 16
202 #define DMX_TS_DESCRAMBLING 32
203 #define DMX_SECTION_PAYLOAD_DESCRAMBLING 64
204 #define DMX_MAC_ADDRESS_DESCRAMBLING 128
205</programlisting>
206
207</section>
208<section id="demux_demux_t">
209<title>demux_demux_t</title>
210 <programlisting>
211 /&#x22C6;
212 &#x22C6; DMX_FE_ENTRY(): Casts elements in the list of registered
213 &#x22C6; front-ends from the generic type struct list_head
214 &#x22C6; to the type &#x22C6; dmx_frontend_t
215 &#x22C6;.
216 &#x22C6;/
217
218 #define DMX_FE_ENTRY(list) list_entry(list, dmx_frontend_t, connectivity_list)
219
220 struct dmx_demux_s {
221 /&#x22C6; The following char&#x22C6; fields point to NULL terminated strings &#x22C6;/
222 char&#x22C6; id; /&#x22C6; Unique demux identifier &#x22C6;/
223 char&#x22C6; vendor; /&#x22C6; Name of the demux vendor &#x22C6;/
224 char&#x22C6; model; /&#x22C6; Name of the demux model &#x22C6;/
225 __u32 capabilities; /&#x22C6; Bitfield of capability flags &#x22C6;/
226 dmx_frontend_t&#x22C6; frontend; /&#x22C6; Front-end connected to the demux &#x22C6;/
227 struct list_head reg_list; /&#x22C6; List of registered demuxes &#x22C6;/
228 void&#x22C6; priv; /&#x22C6; Pointer to private data of the API client &#x22C6;/
229 int users; /&#x22C6; Number of users &#x22C6;/
230 int (&#x22C6;open) (struct dmx_demux_s&#x22C6; demux);
231 int (&#x22C6;close) (struct dmx_demux_s&#x22C6; demux);
232 int (&#x22C6;write) (struct dmx_demux_s&#x22C6; demux, const char&#x22C6; buf, size_t count);
233 int (&#x22C6;allocate_ts_feed) (struct dmx_demux_s&#x22C6; demux,
234 dmx_ts_feed_t&#x22C6;&#x22C6; feed,
235 dmx_ts_cb callback);
236 int (&#x22C6;release_ts_feed) (struct dmx_demux_s&#x22C6; demux,
237 dmx_ts_feed_t&#x22C6; feed);
238 int (&#x22C6;allocate_pes_feed) (struct dmx_demux_s&#x22C6; demux,
239 dmx_pes_feed_t&#x22C6;&#x22C6; feed,
240 dmx_pes_cb callback);
241 int (&#x22C6;release_pes_feed) (struct dmx_demux_s&#x22C6; demux,
242 dmx_pes_feed_t&#x22C6; feed);
243 int (&#x22C6;allocate_section_feed) (struct dmx_demux_s&#x22C6; demux,
244 dmx_section_feed_t&#x22C6;&#x22C6; feed,
245 dmx_section_cb callback);
246 int (&#x22C6;release_section_feed) (struct dmx_demux_s&#x22C6; demux,
247 dmx_section_feed_t&#x22C6; feed);
248 int (&#x22C6;descramble_mac_address) (struct dmx_demux_s&#x22C6; demux,
249 __u8&#x22C6; buffer1,
250 size_t buffer1_length,
251 __u8&#x22C6; buffer2,
252 size_t buffer2_length,
253 __u16 pid);
254 int (&#x22C6;descramble_section_payload) (struct dmx_demux_s&#x22C6; demux,
255 __u8&#x22C6; buffer1,
256 size_t buffer1_length,
257 __u8&#x22C6; buffer2, size_t buffer2_length,
258 __u16 pid);
259 int (&#x22C6;add_frontend) (struct dmx_demux_s&#x22C6; demux,
260 dmx_frontend_t&#x22C6; frontend);
261 int (&#x22C6;remove_frontend) (struct dmx_demux_s&#x22C6; demux,
262 dmx_frontend_t&#x22C6; frontend);
263 struct list_head&#x22C6; (&#x22C6;get_frontends) (struct dmx_demux_s&#x22C6; demux);
264 int (&#x22C6;connect_frontend) (struct dmx_demux_s&#x22C6; demux,
265 dmx_frontend_t&#x22C6; frontend);
266 int (&#x22C6;disconnect_frontend) (struct dmx_demux_s&#x22C6; demux);
267
268
269 /&#x22C6; added because js cannot keep track of these himself &#x22C6;/
270 int (&#x22C6;get_pes_pids) (struct dmx_demux_s&#x22C6; demux, __u16 &#x22C6;pids);
271 };
272 typedef struct dmx_demux_s dmx_demux_t;
273</programlisting>
274
275</section>
276<section id="demux_directory">
277<title>Demux directory</title>
278 <programlisting>
279 /&#x22C6;
280 &#x22C6; DMX_DIR_ENTRY(): Casts elements in the list of registered
281 &#x22C6; demuxes from the generic type struct list_head&#x22C6; to the type dmx_demux_t
282 &#x22C6;.
283 &#x22C6;/
284
285 #define DMX_DIR_ENTRY(list) list_entry(list, dmx_demux_t, reg_list)
286
287 int dmx_register_demux (dmx_demux_t&#x22C6; demux);
288 int dmx_unregister_demux (dmx_demux_t&#x22C6; demux);
289 struct list_head&#x22C6; dmx_get_demuxes (void);
290</programlisting>
291 </section></section>
292<section id="demux_directory_api">
293<title>Demux Directory API</title>
294<para>The demux directory is a Linux kernel-wide facility for registering and accessing the
295MPEG-2 TS demuxes in the system. Run-time registering and unregistering of demux drivers
296is possible using this API.
297</para>
298<para>All demux drivers in the directory implement the abstract interface dmx_demux_t.
299</para>
300
301<section
302role="subsection"><title>dmx_register_demux()</title>
303<para>DESCRIPTION
304</para>
305<informaltable><tgroup cols="1"><tbody><row><entry
306 align="char">
307<para>This function makes a demux driver interface available to the Linux kernel. It is
308 usually called by the init_module() function of the kernel module that contains
309 the demux driver. The caller of this function is responsible for allocating
310 dynamic or static memory for the demux structure and for initializing its fields
311 before calling this function. The memory allocated for the demux structure
312 must not be freed before calling dmx_unregister_demux(),</para>
313</entry>
314 </row></tbody></tgroup></informaltable>
315<para>SYNOPSIS
316</para>
317<informaltable><tgroup cols="1"><tbody><row><entry
318 align="char">
319<para>int dmx_register_demux ( dmx_demux_t &#x22C6;demux )</para>
320</entry>
321 </row></tbody></tgroup></informaltable>
322<para>PARAMETERS
323</para>
324<informaltable><tgroup cols="2"><tbody><row><entry
325 align="char">
326<para>dmx_demux_t*
327 demux</para>
328</entry><entry
329 align="char">
330<para>Pointer to the demux structure.</para>
331</entry>
332 </row></tbody></tgroup></informaltable>
333<para>RETURNS
334</para>
335<informaltable><tgroup cols="2"><tbody><row><entry
336 align="char">
337<para>0</para>
338</entry><entry
339 align="char">
340<para>The function was completed without errors.</para>
341</entry>
342 </row><row><entry
343 align="char">
344<para>-EEXIST</para>
345</entry><entry
346 align="char">
347<para>A demux with the same value of the id field already stored
348 in the directory.</para>
349</entry>
350 </row><row><entry
351 align="char">
352<para>-ENOSPC</para>
353</entry><entry
354 align="char">
355<para>No space left in the directory.</para>
356</entry>
357 </row></tbody></tgroup></informaltable>
358
359</section><section
360role="subsection"><title>dmx_unregister_demux()</title>
361<para>DESCRIPTION
362</para>
363<informaltable><tgroup cols="1"><tbody><row><entry
364 align="char">
365<para>This function is called to indicate that the given demux interface is no
366 longer available. The caller of this function is responsible for freeing the
367 memory of the demux structure, if it was dynamically allocated before calling
368 dmx_register_demux(). The cleanup_module() function of the kernel module
369 that contains the demux driver should call this function. Note that this function
370 fails if the demux is currently in use, i.e., release_demux() has not been called
371 for the interface.</para>
372</entry>
373 </row></tbody></tgroup></informaltable>
374<para>SYNOPSIS
375</para>
376<informaltable><tgroup cols="1"><tbody><row><entry
377 align="char">
378<para>int dmx_unregister_demux ( dmx_demux_t &#x22C6;demux )</para>
379</entry>
380 </row></tbody></tgroup></informaltable>
381<para>PARAMETERS
382</para>
383<informaltable><tgroup cols="2"><tbody><row><entry
384 align="char">
385<para>dmx_demux_t*
386 demux</para>
387</entry><entry
388 align="char">
389<para>Pointer to the demux structure which is to be
390 unregistered.</para>
391</entry>
392 </row></tbody></tgroup></informaltable>
393<para>RETURNS
394</para>
395<informaltable><tgroup cols="2"><tbody><row><entry
396 align="char">
397<para>0</para>
398</entry><entry
399 align="char">
400<para>The function was completed without errors.</para>
401</entry>
402 </row><row><entry
403 align="char">
404<para>ENODEV</para>
405</entry><entry
406 align="char">
407<para>The specified demux is not registered in the demux
408 directory.</para>
409</entry>
410 </row><row><entry
411 align="char">
412<para>EBUSY</para>
413</entry><entry
414 align="char">
415<para>The specified demux is currently in use.</para>
416</entry>
417 </row></tbody></tgroup></informaltable>
418
419</section><section
420role="subsection"><title>dmx_get_demuxes()</title>
421<para>DESCRIPTION
422</para>
423<informaltable><tgroup cols="1"><tbody><row><entry
424 align="char">
425<para>Provides the caller with the list of registered demux interfaces, using the
426 standard list structure defined in the include file linux/list.h. The include file
427 demux.h defines the macro DMX_DIR_ENTRY() for converting an element of
428 the generic type struct list_head* to the type dmx_demux_t*. The caller must
429 not free the memory of any of the elements obtained via this function call.</para>
430</entry>
431 </row></tbody></tgroup></informaltable>
432<para>SYNOPSIS
433</para>
434<informaltable><tgroup cols="1"><tbody><row><entry
435 align="char">
436<para>struct list_head &#x22C6;dmx_get_demuxes ()</para>
437</entry>
438 </row></tbody></tgroup></informaltable>
439<para>PARAMETERS
440</para>
441<informaltable><tgroup cols="2"><tbody><row><entry
442 align="char">
443<para>none</para>
444</entry>
445 </row></tbody></tgroup></informaltable>
446<para>RETURNS
447</para>
448<informaltable><tgroup cols="2"><tbody><row><entry
449 align="char">
450<para>struct list_head *</para>
451</entry><entry
452 align="char">
453<para>A list of demux interfaces, or NULL in the case of an
454 empty list.</para>
455</entry>
456 </row></tbody></tgroup></informaltable>
457 </section></section>
458<section id="demux_api">
459<title>Demux API</title>
460<para>The demux API should be implemented for each demux in the system. It is used to select
461the TS source of a demux and to manage the demux resources. When the demux
462client allocates a resource via the demux API, it receives a pointer to the API of that
463resource.
464</para>
465<para>Each demux receives its TS input from a DVB front-end or from memory, as set via the
466demux API. In a system with more than one front-end, the API can be used to select one of
467the DVB front-ends as a TS source for a demux, unless this is fixed in the HW platform. The
468demux API only controls front-ends regarding their connections with demuxes; the APIs
469used to set the other front-end parameters, such as tuning, are not defined in this
470document.
471</para>
472<para>The functions that implement the abstract interface demux should be defined static or
473module private and registered to the Demux Directory for external access. It is not necessary
474to implement every function in the demux_t struct, however (for example, a demux interface
475might support Section filtering, but not TS or PES filtering). The API client is expected to
476check the value of any function pointer before calling the function: the value of NULL means
477&#8220;function not available&#8221;.
478</para>
479<para>Whenever the functions of the demux API modify shared data, the possibilities of lost
480update and race condition problems should be addressed, e.g. by protecting parts of code with
481mutexes. This is especially important on multi-processor hosts.
482</para>
483<para>Note that functions called from a bottom half context must not sleep, at least in the 2.2.x
484kernels. Even a simple memory allocation can result in a kernel thread being put to sleep if
485swapping is needed. For example, the Linux kernel calls the functions of a network device
486interface from a bottom half context. Thus, if a demux API function is called from network
487device code, the function must not sleep.
488</para>
489
490
491<section id="kdapi_fopen">
492<title>open()</title>
493<para>DESCRIPTION
494</para>
495<informaltable><tgroup cols="1"><tbody><row><entry
496 align="char">
497<para>This function reserves the demux for use by the caller and, if necessary,
498 initializes the demux. When the demux is no longer needed, the function close()
499 should be called. It should be possible for multiple clients to access the demux
500 at the same time. Thus, the function implementation should increment the
501 demux usage count when open() is called and decrement it when close() is
502 called.</para>
503</entry>
504 </row></tbody></tgroup></informaltable>
505<para>SYNOPSIS
506</para>
507<informaltable><tgroup cols="1"><tbody><row><entry
508 align="char">
509<para>int open ( demux_t&#x22C6; demux );</para>
510</entry>
511 </row></tbody></tgroup></informaltable>
512<para>PARAMETERS
513</para>
514<informaltable><tgroup cols="2"><tbody><row><entry
515 align="char">
516<para>demux_t* demux</para>
517</entry><entry
518 align="char">
519<para>Pointer to the demux API and instance data.</para>
520</entry>
521 </row></tbody></tgroup></informaltable>
522<para>RETURNS
523</para>
524<informaltable><tgroup cols="2"><tbody><row><entry
525 align="char">
526<para>0</para>
527</entry><entry
528 align="char">
529<para>The function was completed without errors.</para>
530</entry>
531 </row><row><entry
532 align="char">
533<para>-EUSERS</para>
534</entry><entry
535 align="char">
536<para>Maximum usage count reached.</para>
537</entry>
538 </row><row><entry
539 align="char">
540<para>-EINVAL</para>
541</entry><entry
542 align="char">
543<para>Bad parameter.</para>
544</entry>
545 </row></tbody></tgroup></informaltable>
546
547</section>
548<section id="kdapi_fclose">
549<title>close()</title>
550<para>DESCRIPTION
551</para>
552<informaltable><tgroup cols="1"><tbody><row><entry
553 align="char">
554<para>This function reserves the demux for use by the caller and, if necessary,
555 initializes the demux. When the demux is no longer needed, the function close()
556 should be called. It should be possible for multiple clients to access the demux
557 at the same time. Thus, the function implementation should increment the
558 demux usage count when open() is called and decrement it when close() is
559 called.</para>
560</entry>
561 </row></tbody></tgroup></informaltable>
562<para>SYNOPSIS
563</para>
564<informaltable><tgroup cols="1"><tbody><row><entry
565 align="char">
566<para>int close(demux_t&#x22C6; demux);</para>
567</entry>
568 </row></tbody></tgroup></informaltable>
569<para>PARAMETERS
570</para>
571<informaltable><tgroup cols="2"><tbody><row><entry
572 align="char">
573<para>demux_t* demux</para>
574</entry><entry
575 align="char">
576<para>Pointer to the demux API and instance data.</para>
577</entry>
578 </row></tbody></tgroup></informaltable>
579<para>RETURNS
580</para>
581<informaltable><tgroup cols="2"><tbody><row><entry
582 align="char">
583<para>0</para>
584</entry><entry
585 align="char">
586<para>The function was completed without errors.</para>
587</entry>
588 </row><row><entry
589 align="char">
590<para>-ENODEV</para>
591</entry><entry
592 align="char">
593<para>The demux was not in use.</para>
594</entry>
595 </row><row><entry
596 align="char">
597<para>-EINVAL</para>
598</entry><entry
599 align="char">
600<para>Bad parameter.</para>
601</entry>
602 </row></tbody></tgroup></informaltable>
603
604</section>
605<section id="kdapi_fwrite">
606<title>write()</title>
607<para>DESCRIPTION
608</para>
609<informaltable><tgroup cols="1"><tbody><row><entry
610 align="char">
611<para>This function provides the demux driver with a memory buffer containing TS
612 packets. Instead of receiving TS packets from the DVB front-end, the demux
613 driver software will read packets from memory. Any clients of this demux
614 with active TS, PES or Section filters will receive filtered data via the Demux
615 callback API (see 0). The function returns when all the data in the buffer has
616 been consumed by the demux. Demux hardware typically cannot read TS from
617 memory. If this is the case, memory-based filtering has to be implemented
618 entirely in software.</para>
619</entry>
620 </row></tbody></tgroup></informaltable>
621<para>SYNOPSIS
622</para>
623<informaltable><tgroup cols="1"><tbody><row><entry
624 align="char">
625<para>int write(demux_t&#x22C6; demux, const char&#x22C6; buf, size_t
626 count);</para>
627</entry>
628 </row></tbody></tgroup></informaltable>
629<para>PARAMETERS
630</para>
631<informaltable><tgroup cols="2"><tbody><row><entry
632 align="char">
633<para>demux_t* demux</para>
634</entry><entry
635 align="char">
636<para>Pointer to the demux API and instance data.</para>
637</entry>
638 </row><row><entry
639 align="char">
640<para>const char* buf</para>
641</entry><entry
642 align="char">
643<para>Pointer to the TS data in kernel-space memory.</para>
644</entry>
645 </row><row><entry
646 align="char">
647<para>size_t length</para>
648</entry><entry
649 align="char">
650<para>Length of the TS data.</para>
651</entry>
652 </row></tbody></tgroup></informaltable>
653<para>RETURNS
654</para>
655<informaltable><tgroup cols="2"><tbody><row><entry
656 align="char">
657<para>0</para>
658</entry><entry
659 align="char">
660<para>The function was completed without errors.</para>
661</entry>
662 </row><row><entry
663 align="char">
664<para>-ENOSYS</para>
665</entry><entry
666 align="char">
667<para>The command is not implemented.</para>
668</entry>
669 </row><row><entry
670 align="char">
671<para>-EINVAL</para>
672</entry><entry
673 align="char">
674<para>Bad parameter.</para>
675</entry>
676 </row></tbody></tgroup></informaltable>
677
678</section><section
679role="subsection"><title>allocate_ts_feed()</title>
680<para>DESCRIPTION
681</para>
682<informaltable><tgroup cols="1"><tbody><row><entry
683 align="char">
684<para>Allocates a new TS feed, which is used to filter the TS packets carrying a
685 certain PID. The TS feed normally corresponds to a hardware PID filter on the
686 demux chip.</para>
687</entry>
688 </row></tbody></tgroup></informaltable>
689<para>SYNOPSIS
690</para>
691<informaltable><tgroup cols="1"><tbody><row><entry
692 align="char">
693<para>int allocate_ts_feed(dmx_demux_t&#x22C6; demux,
694 dmx_ts_feed_t&#x22C6;&#x22C6; feed, dmx_ts_cb callback);</para>
695</entry>
696 </row></tbody></tgroup></informaltable>
697<para>PARAMETERS
698</para>
699<informaltable><tgroup cols="2"><tbody><row><entry
700 align="char">
701<para>demux_t* demux</para>
702</entry><entry
703 align="char">
704<para>Pointer to the demux API and instance data.</para>
705</entry>
706 </row><row><entry
707 align="char">
708<para>dmx_ts_feed_t**
709 feed</para>
710</entry><entry
711 align="char">
712<para>Pointer to the TS feed API and instance data.</para>
713</entry>
714 </row><row><entry
715 align="char">
716<para>dmx_ts_cb callback</para>
717</entry><entry
718 align="char">
719<para>Pointer to the callback function for passing received TS
720 packet</para>
721</entry>
722 </row></tbody></tgroup></informaltable>
723<para>RETURNS
724</para>
725<informaltable><tgroup cols="2"><tbody><row><entry
726 align="char">
727<para>0</para>
728</entry><entry
729 align="char">
730<para>The function was completed without errors.</para>
731</entry>
732 </row><row><entry
733 align="char">
734<para>-EBUSY</para>
735</entry><entry
736 align="char">
737<para>No more TS feeds available.</para>
738</entry>
739 </row><row><entry
740 align="char">
741<para>-ENOSYS</para>
742</entry><entry
743 align="char">
744<para>The command is not implemented.</para>
745</entry>
746 </row><row><entry
747 align="char">
748<para>-EINVAL</para>
749</entry><entry
750 align="char">
751<para>Bad parameter.</para>
752</entry>
753 </row></tbody></tgroup></informaltable>
754
755</section><section
756role="subsection"><title>release_ts_feed()</title>
757<para>DESCRIPTION
758</para>
759<informaltable><tgroup cols="1"><tbody><row><entry
760 align="char">
761<para>Releases the resources allocated with allocate_ts_feed(). Any filtering in
762 progress on the TS feed should be stopped before calling this function.</para>
763</entry>
764 </row></tbody></tgroup></informaltable>
765<para>SYNOPSIS
766</para>
767<informaltable><tgroup cols="1"><tbody><row><entry
768 align="char">
769<para>int release_ts_feed(dmx_demux_t&#x22C6; demux,
770 dmx_ts_feed_t&#x22C6; feed);</para>
771</entry>
772 </row></tbody></tgroup></informaltable>
773<para>PARAMETERS
774</para>
775<informaltable><tgroup cols="2"><tbody><row><entry
776 align="char">
777<para>demux_t* demux</para>
778</entry><entry
779 align="char">
780<para>Pointer to the demux API and instance data.</para>
781</entry>
782 </row><row><entry
783 align="char">
784<para>dmx_ts_feed_t* feed</para>
785</entry><entry
786 align="char">
787<para>Pointer to the TS feed API and instance data.</para>
788</entry>
789 </row></tbody></tgroup></informaltable>
790<para>RETURNS
791</para>
792<informaltable><tgroup cols="2"><tbody><row><entry
793 align="char">
794<para>0</para>
795</entry><entry
796 align="char">
797<para>The function was completed without errors.</para>
798</entry>
799 </row><row><entry
800 align="char">
801<para>-EINVAL</para>
802</entry><entry
803 align="char">
804<para>Bad parameter.</para>
805</entry>
806 </row></tbody></tgroup></informaltable>
807
808</section><section
809role="subsection"><title>allocate_section_feed()</title>
810<para>DESCRIPTION
811</para>
812<informaltable><tgroup cols="1"><tbody><row><entry
813 align="char">
814<para>Allocates a new section feed, i.e. a demux resource for filtering and receiving
815 sections. On platforms with hardware support for section filtering, a section
816 feed is directly mapped to the demux HW. On other platforms, TS packets are
817 first PID filtered in hardware and a hardware section filter then emulated in
818 software. The caller obtains an API pointer of type dmx_section_feed_t as an
819 out parameter. Using this API the caller can set filtering parameters and start
820 receiving sections.</para>
821</entry>
822 </row></tbody></tgroup></informaltable>
823<para>SYNOPSIS
824</para>
825<informaltable><tgroup cols="1"><tbody><row><entry
826 align="char">
827<para>int allocate_section_feed(dmx_demux_t&#x22C6; demux,
828 dmx_section_feed_t &#x22C6;&#x22C6;feed, dmx_section_cb callback);</para>
829</entry>
830 </row></tbody></tgroup></informaltable>
831<para>PARAMETERS
832</para>
833<informaltable><tgroup cols="2"><tbody><row><entry
834 align="char">
835<para>demux_t *demux</para>
836</entry><entry
837 align="char">
838<para>Pointer to the demux API and instance data.</para>
839</entry>
840 </row><row><entry
841 align="char">
842<para>dmx_section_feed_t
843 **feed</para>
844</entry><entry
845 align="char">
846<para>Pointer to the section feed API and instance data.</para>
847</entry>
848 </row><row><entry
849 align="char">
850<para>dmx_section_cb
851 callback</para>
852</entry><entry
853 align="char">
854<para>Pointer to the callback function for passing received
855 sections.</para>
856</entry>
857 </row></tbody></tgroup></informaltable>
858<para>RETURNS
859</para>
860<informaltable><tgroup cols="2"><tbody><row><entry
861 align="char">
862<para>0</para>
863</entry><entry
864 align="char">
865<para>The function was completed without errors.</para>
866</entry>
867 </row><row><entry
868 align="char">
869<para>-EBUSY</para>
870</entry><entry
871 align="char">
872<para>No more section feeds available.</para>
873</entry>
874 </row><row><entry
875 align="char">
876<para>-ENOSYS</para>
877</entry><entry
878 align="char">
879<para>The command is not implemented.</para>
880</entry>
881 </row><row><entry
882 align="char">
883<para>-EINVAL</para>
884</entry><entry
885 align="char">
886<para>Bad parameter.</para>
887</entry>
888 </row></tbody></tgroup></informaltable>
889
890</section><section
891role="subsection"><title>release_section_feed()</title>
892<para>DESCRIPTION
893</para>
894<informaltable><tgroup cols="1"><tbody><row><entry
895 align="char">
896<para>Releases the resources allocated with allocate_section_feed(), including
897 allocated filters. Any filtering in progress on the section feed should be stopped
898 before calling this function.</para>
899</entry>
900 </row></tbody></tgroup></informaltable>
901<para>SYNOPSIS
902</para>
903<informaltable><tgroup cols="1"><tbody><row><entry
904 align="char">
905<para>int release_section_feed(dmx_demux_t&#x22C6; demux,
906 dmx_section_feed_t &#x22C6;feed);</para>
907</entry>
908 </row></tbody></tgroup></informaltable>
909<para>PARAMETERS
910</para>
911<informaltable><tgroup cols="2"><tbody><row><entry
912 align="char">
913<para>demux_t *demux</para>
914</entry><entry
915 align="char">
916<para>Pointer to the demux API and instance data.</para>
917</entry>
918 </row><row><entry
919 align="char">
920<para>dmx_section_feed_t
921 *feed</para>
922</entry><entry
923 align="char">
924<para>Pointer to the section feed API and instance data.</para>
925</entry>
926 </row></tbody></tgroup></informaltable>
927<para>RETURNS
928</para>
929<informaltable><tgroup cols="2"><tbody><row><entry
930 align="char">
931<para>0</para>
932</entry><entry
933 align="char">
934<para>The function was completed without errors.</para>
935</entry>
936 </row><row><entry
937 align="char">
938<para>-EINVAL</para>
939</entry><entry
940 align="char">
941<para>Bad parameter.</para>
942</entry>
943 </row></tbody></tgroup></informaltable>
944
945</section><section
946role="subsection"><title>descramble_mac_address()</title>
947<para>DESCRIPTION
948</para>
949<informaltable><tgroup cols="1"><tbody><row><entry
950 align="char">
951<para>This function runs a descrambling algorithm on the destination MAC
952 address field of a DVB Datagram Section, replacing the original address
953 with its un-encrypted version. Otherwise, the description on the function
954 descramble_section_payload() applies also to this function.</para>
955</entry>
956 </row></tbody></tgroup></informaltable>
957<para>SYNOPSIS
958</para>
959<informaltable><tgroup cols="1"><tbody><row><entry
960 align="char">
961<para>int descramble_mac_address(dmx_demux_t&#x22C6; demux, __u8
962 &#x22C6;buffer1, size_t buffer1_length, __u8 &#x22C6;buffer2,
963 size_t buffer2_length, __u16 pid);</para>
964</entry>
965 </row></tbody></tgroup></informaltable>
966<para>PARAMETERS
967</para>
968<informaltable><tgroup cols="2"><tbody><row><entry
969 align="char">
970<para>dmx_demux_t
971 *demux</para>
972</entry><entry
973 align="char">
974<para>Pointer to the demux API and instance data.</para>
975</entry>
976 </row><row><entry
977 align="char">
978<para>__u8 *buffer1</para>
979</entry><entry
980 align="char">
981<para>Pointer to the first byte of the section.</para>
982</entry>
983 </row><row><entry
984 align="char">
985<para>size_t buffer1_length</para>
986</entry><entry
987 align="char">
988<para>Length of the section data, including headers and CRC,
989 in buffer1.</para>
990</entry>
991 </row><row><entry
992 align="char">
993<para>__u8* buffer2</para>
994</entry><entry
995 align="char">
996<para>Pointer to the tail of the section data, or NULL. The
997 pointer has a non-NULL value if the section wraps past
998 the end of a circular buffer.</para>
999</entry>
1000 </row><row><entry
1001 align="char">
1002<para>size_t buffer2_length</para>
1003</entry><entry
1004 align="char">
1005<para>Length of the section data, including headers and CRC,
1006 in buffer2.</para>
1007</entry>
1008 </row><row><entry
1009 align="char">
1010<para>__u16 pid</para>
1011</entry><entry
1012 align="char">
1013<para>The PID on which the section was received. Useful
1014 for obtaining the descrambling key, e.g. from a DVB
1015 Common Access facility.</para>
1016</entry>
1017 </row></tbody></tgroup></informaltable>
1018<para>RETURNS
1019</para>
1020<informaltable><tgroup cols="2"><tbody><row><entry
1021 align="char">
1022<para>0</para>
1023</entry><entry
1024 align="char">
1025<para>The function was completed without errors.</para>
1026</entry>
1027 </row><row><entry
1028 align="char">
1029<para>-ENOSYS</para>
1030</entry><entry
1031 align="char">
1032<para>No descrambling facility available.</para>
1033</entry>
1034 </row><row><entry
1035 align="char">
1036<para>-EINVAL</para>
1037</entry><entry
1038 align="char">
1039<para>Bad parameter.</para>
1040</entry>
1041 </row></tbody></tgroup></informaltable>
1042
1043</section><section
1044role="subsection"><title>descramble_section_payload()</title>
1045<para>DESCRIPTION
1046</para>
1047<informaltable><tgroup cols="1"><tbody><row><entry
1048 align="char">
1049<para>This function runs a descrambling algorithm on the payload of a DVB
1050 Datagram Section, replacing the original payload with its un-encrypted
1051 version. The function will be called from the demux API implementation;
1052 the API client need not call this function directly. Section-level scrambling
1053 algorithms are currently standardized only for DVB-RCC (return channel
1054 over 2-directional cable TV network) systems. For all other DVB networks,
1055 encryption schemes are likely to be proprietary to each data broadcaster. Thus,
1056 it is expected that this function pointer will have the value of NULL (i.e.,
1057 function not available) in most demux API implementations. Nevertheless, it
1058 should be possible to use the function pointer as a hook for dynamically adding
1059 a &#8220;plug-in&#8221; descrambling facility to a demux driver.</para>
1060</entry>
1061 </row><row><entry
1062 align="char">
1063<para>While this function is not needed with hardware-based section descrambling,
1064 the descramble_section_payload function pointer can be used to override the
1065 default hardware-based descrambling algorithm: if the function pointer has a
1066 non-NULL value, the corresponding function should be used instead of any
1067 descrambling hardware.</para>
1068</entry>
1069 </row></tbody></tgroup></informaltable>
1070<para>SYNOPSIS
1071</para>
1072<informaltable><tgroup cols="1"><tbody><row><entry
1073 align="char">
1074<para>int descramble_section_payload(dmx_demux_t&#x22C6; demux,
1075 __u8 &#x22C6;buffer1, size_t buffer1_length, __u8 &#x22C6;buffer2,
1076 size_t buffer2_length, __u16 pid);</para>
1077</entry>
1078 </row></tbody></tgroup></informaltable>
1079<para>PARAMETERS
1080</para>
1081<informaltable><tgroup cols="2"><tbody><row><entry
1082 align="char">
1083<para>dmx_demux_t
1084 *demux</para>
1085</entry><entry
1086 align="char">
1087<para>Pointer to the demux API and instance data.</para>
1088</entry>
1089 </row><row><entry
1090 align="char">
1091<para>__u8 *buffer1</para>
1092</entry><entry
1093 align="char">
1094<para>Pointer to the first byte of the section.</para>
1095</entry>
1096 </row><row><entry
1097 align="char">
1098<para>size_t buffer1_length</para>
1099</entry><entry
1100 align="char">
1101<para>Length of the section data, including headers and CRC,
1102 in buffer1.</para>
1103</entry>
1104 </row><row><entry
1105 align="char">
1106<para>__u8 *buffer2</para>
1107</entry><entry
1108 align="char">
1109<para>Pointer to the tail of the section data, or NULL. The
1110 pointer has a non-NULL value if the section wraps past
1111 the end of a circular buffer.</para>
1112</entry>
1113 </row><row><entry
1114 align="char">
1115<para>size_t buffer2_length</para>
1116</entry><entry
1117 align="char">
1118<para>Length of the section data, including headers and CRC,
1119 in buffer2.</para>
1120</entry>
1121 </row><row><entry
1122 align="char">
1123<para>__u16 pid</para>
1124</entry><entry
1125 align="char">
1126<para>The PID on which the section was received. Useful
1127 for obtaining the descrambling key, e.g. from a DVB
1128 Common Access facility.</para>
1129</entry>
1130 </row></tbody></tgroup></informaltable>
1131<para>RETURNS
1132</para>
1133<informaltable><tgroup cols="2"><tbody><row><entry
1134 align="char">
1135<para>0</para>
1136</entry><entry
1137 align="char">
1138<para>The function was completed without errors.</para>
1139</entry>
1140 </row><row><entry
1141 align="char">
1142<para>-ENOSYS</para>
1143</entry><entry
1144 align="char">
1145<para>No descrambling facility available.</para>
1146</entry>
1147 </row><row><entry
1148 align="char">
1149<para>-EINVAL</para>
1150</entry><entry
1151 align="char">
1152<para>Bad parameter.</para>
1153</entry>
1154 </row></tbody></tgroup></informaltable>
1155
1156</section><section
1157role="subsection"><title>add_frontend()</title>
1158<para>DESCRIPTION
1159</para>
1160<informaltable><tgroup cols="1"><tbody><row><entry
1161 align="char">
1162<para>Registers a connectivity between a demux and a front-end, i.e., indicates that
1163 the demux can be connected via a call to connect_frontend() to use the given
1164 front-end as a TS source. The client of this function has to allocate dynamic or
1165 static memory for the frontend structure and initialize its fields before calling
1166 this function. This function is normally called during the driver initialization.
1167 The caller must not free the memory of the frontend struct before successfully
1168 calling remove_frontend().</para>
1169</entry>
1170 </row></tbody></tgroup></informaltable>
1171<para>SYNOPSIS
1172</para>
1173<informaltable><tgroup cols="1"><tbody><row><entry
1174 align="char">
1175<para>int add_frontend(dmx_demux_t &#x22C6;demux, dmx_frontend_t
1176 &#x22C6;frontend);</para>
1177</entry>
1178 </row></tbody></tgroup></informaltable>
1179<para>PARAMETERS
1180</para>
1181<informaltable><tgroup cols="2"><tbody><row><entry
1182 align="char">
1183<para>dmx_demux_t*
1184 demux</para>
1185</entry><entry
1186 align="char">
1187<para>Pointer to the demux API and instance data.</para>
1188</entry>
1189 </row><row><entry
1190 align="char">
1191<para>dmx_frontend_t*
1192 frontend</para>
1193</entry><entry
1194 align="char">
1195<para>Pointer to the front-end instance data.</para>
1196</entry>
1197 </row></tbody></tgroup></informaltable>
1198<para>RETURNS
1199</para>
1200<informaltable><tgroup cols="2"><tbody><row><entry
1201 align="char">
1202<para>0</para>
1203</entry><entry
1204 align="char">
1205<para>The function was completed without errors.</para>
1206</entry>
1207 </row><row><entry
1208 align="char">
1209<para>-EEXIST</para>
1210</entry><entry
1211 align="char">
1212<para>A front-end with the same value of the id field already
1213 registered.</para>
1214</entry>
1215 </row><row><entry
1216 align="char">
1217<para>-EINUSE</para>
1218</entry><entry
1219 align="char">
1220<para>The demux is in use.</para>
1221</entry>
1222 </row><row><entry
1223 align="char">
1224<para>-ENOMEM</para>
1225</entry><entry
1226 align="char">
1227<para>No more front-ends can be added.</para>
1228</entry>
1229 </row><row><entry
1230 align="char">
1231<para>-EINVAL</para>
1232</entry><entry
1233 align="char">
1234<para>Bad parameter.</para>
1235</entry>
1236 </row></tbody></tgroup></informaltable>
1237
1238</section><section
1239role="subsection"><title>remove_frontend()</title>
1240<para>DESCRIPTION
1241</para>
1242<informaltable><tgroup cols="1"><tbody><row><entry
1243 align="char">
1244<para>Indicates that the given front-end, registered by a call to add_frontend(), can
1245 no longer be connected as a TS source by this demux. The function should be
1246 called when a front-end driver or a demux driver is removed from the system.
1247 If the front-end is in use, the function fails with the return value of -EBUSY.
1248 After successfully calling this function, the caller can free the memory of
1249 the frontend struct if it was dynamically allocated before the add_frontend()
1250 operation.</para>
1251</entry>
1252 </row></tbody></tgroup></informaltable>
1253<para>SYNOPSIS
1254</para>
1255<informaltable><tgroup cols="1"><tbody><row><entry
1256 align="char">
1257<para>int remove_frontend(dmx_demux_t&#x22C6; demux,
1258 dmx_frontend_t&#x22C6; frontend);</para>
1259</entry>
1260 </row></tbody></tgroup></informaltable>
1261<para>PARAMETERS
1262</para>
1263<informaltable><tgroup cols="2"><tbody><row><entry
1264 align="char">
1265<para>dmx_demux_t*
1266 demux</para>
1267</entry><entry
1268 align="char">
1269<para>Pointer to the demux API and instance data.</para>
1270</entry>
1271 </row><row><entry
1272 align="char">
1273<para>dmx_frontend_t*
1274 frontend</para>
1275</entry><entry
1276 align="char">
1277<para>Pointer to the front-end instance data.</para>
1278</entry>
1279 </row></tbody></tgroup></informaltable>
1280<para>RETURNS
1281</para>
1282<informaltable><tgroup cols="2"><tbody><row><entry
1283 align="char">
1284<para>0</para>
1285</entry><entry
1286 align="char">
1287<para>The function was completed without errors.</para>
1288</entry>
1289 </row><row><entry
1290 align="char">
1291<para>-EINVAL</para>
1292</entry><entry
1293 align="char">
1294<para>Bad parameter.</para>
1295</entry>
1296 </row><row><entry
1297 align="char">
1298<para>-EBUSY</para>
1299</entry><entry
1300 align="char">
1301<para>The front-end is in use, i.e. a call to connect_frontend()
1302 has not been followed by a call to disconnect_frontend().</para>
1303</entry>
1304 </row></tbody></tgroup></informaltable>
1305
1306</section><section
1307role="subsection"><title>get_frontends()</title>
1308<para>DESCRIPTION
1309</para>
1310<informaltable><tgroup cols="1"><tbody><row><entry
1311 align="char">
1312<para>Provides the APIs of the front-ends that have been registered for this demux.
1313 Any of the front-ends obtained with this call can be used as a parameter for
1314 connect_frontend().</para>
1315</entry>
1316 </row><row><entry
1317 align="char">
1318<para>The include file demux.h contains the macro DMX_FE_ENTRY() for
1319 converting an element of the generic type struct list_head* to the type
1320 dmx_frontend_t*. The caller must not free the memory of any of the elements
1321 obtained via this function call.</para>
1322</entry>
1323 </row></tbody></tgroup></informaltable>
1324<para>SYNOPSIS
1325</para>
1326<informaltable><tgroup cols="1"><tbody><row><entry
1327 align="char">
1328<para>struct list_head&#x22C6; get_frontends(dmx_demux_t&#x22C6; demux);</para>
1329</entry>
1330 </row></tbody></tgroup></informaltable>
1331<para>PARAMETERS
1332</para>
1333<informaltable><tgroup cols="2"><tbody><row><entry
1334 align="char">
1335<para>dmx_demux_t*
1336 demux</para>
1337</entry><entry
1338 align="char">
1339<para>Pointer to the demux API and instance data.</para>
1340</entry>
1341 </row></tbody></tgroup></informaltable>
1342<para>RETURNS
1343</para>
1344<informaltable><tgroup cols="2"><tbody><row><entry
1345 align="char">
1346<para>dmx_demux_t*</para>
1347</entry><entry
1348 align="char">
1349<para>A list of front-end interfaces, or NULL in the case of an
1350 empty list.</para>
1351</entry>
1352 </row></tbody></tgroup></informaltable>
1353
1354</section><section
1355role="subsection"><title>connect_frontend()</title>
1356<para>DESCRIPTION
1357</para>
1358<informaltable><tgroup cols="1"><tbody><row><entry
1359 align="char">
1360<para>Connects the TS output of the front-end to the input of the demux. A demux
1361 can only be connected to a front-end registered to the demux with the function
1362 add_frontend().</para>
1363</entry>
1364 </row><row><entry
1365 align="char">
1366<para>It may or may not be possible to connect multiple demuxes to the same
1367 front-end, depending on the capabilities of the HW platform. When not used,
1368 the front-end should be released by calling disconnect_frontend().</para>
1369</entry>
1370 </row></tbody></tgroup></informaltable>
1371<para>SYNOPSIS
1372</para>
1373<informaltable><tgroup cols="1"><tbody><row><entry
1374 align="char">
1375<para>int connect_frontend(dmx_demux_t&#x22C6; demux,
1376 dmx_frontend_t&#x22C6; frontend);</para>
1377</entry>
1378 </row></tbody></tgroup></informaltable>
1379<para>PARAMETERS
1380</para>
1381<informaltable><tgroup cols="2"><tbody><row><entry
1382 align="char">
1383<para>dmx_demux_t*
1384 demux</para>
1385</entry><entry
1386 align="char">
1387<para>Pointer to the demux API and instance data.</para>
1388</entry>
1389 </row><row><entry
1390 align="char">
1391<para>dmx_frontend_t*
1392 frontend</para>
1393</entry><entry
1394 align="char">
1395<para>Pointer to the front-end instance data.</para>
1396</entry>
1397 </row></tbody></tgroup></informaltable>
1398<para>RETURNS
1399</para>
1400<informaltable><tgroup cols="2"><tbody><row><entry
1401 align="char">
1402<para>0</para>
1403</entry><entry
1404 align="char">
1405<para>The function was completed without errors.</para>
1406</entry>
1407 </row><row><entry
1408 align="char">
1409<para>-EINVAL</para>
1410</entry><entry
1411 align="char">
1412<para>Bad parameter.</para>
1413</entry>
1414 </row><row><entry
1415 align="char">
1416<para>-EBUSY</para>
1417</entry><entry
1418 align="char">
1419<para>The front-end is in use.</para>
1420</entry>
1421 </row></tbody></tgroup></informaltable>
1422
1423</section><section
1424role="subsection"><title>disconnect_frontend()</title>
1425<para>DESCRIPTION
1426</para>
1427<informaltable><tgroup cols="1"><tbody><row><entry
1428 align="char">
1429<para>Disconnects the demux and a front-end previously connected by a
1430 connect_frontend() call.</para>
1431</entry>
1432 </row></tbody></tgroup></informaltable>
1433<para>SYNOPSIS
1434</para>
1435<informaltable><tgroup cols="1"><tbody><row><entry
1436 align="char">
1437<para>int disconnect_frontend(dmx_demux_t&#x22C6; demux);</para>
1438</entry>
1439 </row></tbody></tgroup></informaltable>
1440<para>PARAMETERS
1441</para>
1442<informaltable><tgroup cols="2"><tbody><row><entry
1443 align="char">
1444<para>dmx_demux_t*
1445 demux</para>
1446</entry><entry
1447 align="char">
1448<para>Pointer to the demux API and instance data.</para>
1449</entry>
1450 </row></tbody></tgroup></informaltable>
1451<para>RETURNS
1452</para>
1453<informaltable><tgroup cols="2"><tbody><row><entry
1454 align="char">
1455<para>0</para>
1456</entry><entry
1457 align="char">
1458<para>The function was completed without errors.</para>
1459</entry>
1460 </row><row><entry
1461 align="char">
1462<para>-EINVAL</para>
1463</entry><entry
1464 align="char">
1465<para>Bad parameter.</para>
1466</entry>
1467 </row></tbody></tgroup></informaltable>
1468 </section></section>
1469<section id="demux_callback_api">
1470<title>Demux Callback API</title>
1471<para>This kernel-space API comprises the callback functions that deliver filtered data to the
1472demux client. Unlike the other APIs, these API functions are provided by the client and called
1473from the demux code.
1474</para>
1475<para>The function pointers of this abstract interface are not packed into a structure as in the
1476other demux APIs, because the callback functions are registered and used independent
1477of each other. As an example, it is possible for the API client to provide several
1478callback functions for receiving TS packets and no callbacks for PES packets or
1479sections.
1480</para>
1481<para>The functions that implement the callback API need not be re-entrant: when a demux
1482driver calls one of these functions, the driver is not allowed to call the function again before
1483the original call returns. If a callback is triggered by a hardware interrupt, it is recommended
1484to use the Linux &#8220;bottom half&#8221; mechanism or start a tasklet instead of making the callback
1485function call directly from a hardware interrupt.
1486</para>
1487
1488<section
1489role="subsection"><title>dmx_ts_cb()</title>
1490<para>DESCRIPTION
1491</para>
1492<informaltable><tgroup cols="1"><tbody><row><entry
1493 align="char">
1494<para>This function, provided by the client of the demux API, is called from the
1495 demux code. The function is only called when filtering on this TS feed has
1496 been enabled using the start_filtering() function.</para>
1497</entry>
1498 </row><row><entry
1499 align="char">
1500<para>Any TS packets that match the filter settings are copied to a circular buffer. The
1501 filtered TS packets are delivered to the client using this callback function. The
1502 size of the circular buffer is controlled by the circular_buffer_size parameter
1503 of the set() function in the TS Feed API. It is expected that the buffer1 and
1504 buffer2 callback parameters point to addresses within the circular buffer, but
1505 other implementations are also possible. Note that the called party should not
1506 try to free the memory the buffer1 and buffer2 parameters point to.</para>
1507</entry>
1508 </row><row><entry
1509 align="char">
1510<para>When this function is called, the buffer1 parameter typically points to the
1511 start of the first undelivered TS packet within a circular buffer. The buffer2
1512 buffer parameter is normally NULL, except when the received TS packets have
1513 crossed the last address of the circular buffer and &#8221;wrapped&#8221; to the beginning
1514 of the buffer. In the latter case the buffer1 parameter would contain an address
1515 within the circular buffer, while the buffer2 parameter would contain the first
1516 address of the circular buffer.</para>
1517</entry>
1518 </row><row><entry
1519 align="char">
1520<para>The number of bytes delivered with this function (i.e. buffer1_length +
1521 buffer2_length) is usually equal to the value of callback_length parameter
1522 given in the set() function, with one exception: if a timeout occurs before
1523 receiving callback_length bytes of TS data, any undelivered packets are
1524 immediately delivered to the client by calling this function. The timeout
1525 duration is controlled by the set() function in the TS Feed API.</para>
1526</entry>
1527 </row><row><entry
1528 align="char">
1529<para>If a TS packet is received with errors that could not be fixed by the TS-level
1530 forward error correction (FEC), the Transport_error_indicator flag of the TS
1531 packet header should be set. The TS packet should not be discarded, as
1532 the error can possibly be corrected by a higher layer protocol. If the called
1533 party is slow in processing the callback, it is possible that the circular buffer
1534 eventually fills up. If this happens, the demux driver should discard any TS
1535 packets received while the buffer is full. The error should be indicated to the
1536 client on the next callback by setting the success parameter to the value of
1537 DMX_OVERRUN_ERROR.</para>
1538</entry>
1539 </row><row><entry
1540 align="char">
1541<para>The type of data returned to the callback can be selected by the new
1542 function int (*set_type) (struct dmx_ts_feed_s* feed, int type, dmx_ts_pes_t
1543 pes_type) which is part of the dmx_ts_feed_s struct (also cf. to the
1544 include file ost/demux.h) The type parameter decides if the raw TS packet
1545 (TS_PACKET) or just the payload (TS_PACKET&#8212;TS_PAYLOAD_ONLY)
1546 should be returned. If additionally the TS_DECODER bit is set the stream
1547 will also be sent to the hardware MPEG decoder. In this case, the second
1548 flag decides as what kind of data the stream should be interpreted. The
1549 possible choices are one of DMX_TS_PES_AUDIO, DMX_TS_PES_VIDEO,
1550 DMX_TS_PES_TELETEXT, DMX_TS_PES_SUBTITLE,
1551 DMX_TS_PES_PCR, or DMX_TS_PES_OTHER.</para>
1552</entry>
1553 </row></tbody></tgroup></informaltable>
1554<para>SYNOPSIS
1555</para>
1556<informaltable><tgroup cols="1"><tbody><row><entry
1557 align="char">
1558<para>int dmx_ts_cb(__u8&#x22C6; buffer1, size_t buffer1_length,
1559 __u8&#x22C6; buffer2, size_t buffer2_length, dmx_ts_feed_t&#x22C6;
1560 source, dmx_success_t success);</para>
1561</entry>
1562 </row></tbody></tgroup></informaltable>
1563<para>PARAMETERS
1564</para>
1565<informaltable><tgroup cols="2"><tbody><row><entry
1566 align="char">
1567<para>__u8* buffer1</para>
1568</entry><entry
1569 align="char">
1570<para>Pointer to the start of the filtered TS packets.</para>
1571</entry>
1572 </row><row><entry
1573 align="char">
1574<para>size_t buffer1_length</para>
1575</entry><entry
1576 align="char">
1577<para>Length of the TS data in buffer1.</para>
1578</entry>
1579 </row><row><entry
1580 align="char">
1581<para>__u8* buffer2</para>
1582</entry><entry
1583 align="char">
1584<para>Pointer to the tail of the filtered TS packets, or NULL.</para>
1585</entry>
1586 </row><row><entry
1587 align="char">
1588<para>size_t buffer2_length</para>
1589</entry><entry
1590 align="char">
1591<para>Length of the TS data in buffer2.</para>
1592</entry>
1593 </row><row><entry
1594 align="char">
1595<para>dmx_ts_feed_t*
1596 source</para>
1597</entry><entry
1598 align="char">
1599<para>Indicates which TS feed is the source of the callback.</para>
1600</entry>
1601 </row><row><entry
1602 align="char">
1603<para>dmx_success_t
1604 success</para>
1605</entry><entry
1606 align="char">
1607<para>Indicates if there was an error in TS reception.</para>
1608</entry>
1609 </row></tbody></tgroup></informaltable>
1610<para>RETURNS
1611</para>
1612<informaltable><tgroup cols="2"><tbody><row><entry
1613 align="char">
1614<para>0</para>
1615</entry><entry
1616 align="char">
1617<para>Continue filtering.</para>
1618</entry>
1619 </row><row><entry
1620 align="char">
1621<para>-1</para>
1622</entry><entry
1623 align="char">
1624<para>Stop filtering - has the same effect as a call to
1625 stop_filtering() on the TS Feed API.</para>
1626</entry>
1627 </row></tbody></tgroup></informaltable>
1628
1629</section><section
1630role="subsection"><title>dmx_section_cb()</title>
1631<para>DESCRIPTION
1632</para>
1633<informaltable><tgroup cols="1"><tbody><row><entry
1634 align="char">
1635<para>This function, provided by the client of the demux API, is called from the
1636 demux code. The function is only called when filtering of sections has been
1637 enabled using the function start_filtering() of the section feed API. When the
1638 demux driver has received a complete section that matches at least one section
1639 filter, the client is notified via this callback function. Normally this function is
1640 called for each received section; however, it is also possible to deliver multiple
1641 sections with one callback, for example when the system load is high. If an
1642 error occurs while receiving a section, this function should be called with
1643 the corresponding error type set in the success field, whether or not there is
1644 data to deliver. The Section Feed implementation should maintain a circular
1645 buffer for received sections. However, this is not necessary if the Section Feed
1646 API is implemented as a client of the TS Feed API, because the TS Feed
1647 implementation then buffers the received data. The size of the circular buffer
1648 can be configured using the set() function in the Section Feed API. If there
1649 is no room in the circular buffer when a new section is received, the section
1650 must be discarded. If this happens, the value of the success parameter should
1651 be DMX_OVERRUN_ERROR on the next callback.</para>
1652</entry>
1653 </row></tbody></tgroup></informaltable>
1654<para>SYNOPSIS
1655</para>
1656<informaltable><tgroup cols="1"><tbody><row><entry
1657 align="char">
1658<para>int dmx_section_cb(__u8&#x22C6; buffer1, size_t
1659 buffer1_length, __u8&#x22C6; buffer2, size_t
1660 buffer2_length, dmx_section_filter_t&#x22C6; source,
1661 dmx_success_t success);</para>
1662</entry>
1663 </row></tbody></tgroup></informaltable>
1664<para>PARAMETERS
1665</para>
1666<informaltable><tgroup cols="2"><tbody><row><entry
1667 align="char">
1668<para>__u8* buffer1</para>
1669</entry><entry
1670 align="char">
1671<para>Pointer to the start of the filtered section, e.g. within the
1672 circular buffer of the demux driver.</para>
1673</entry>
1674 </row><row><entry
1675 align="char">
1676<para>size_t buffer1_length</para>
1677</entry><entry
1678 align="char">
1679<para>Length of the filtered section data in buffer1, including
1680 headers and CRC.</para>
1681</entry>
1682 </row><row><entry
1683 align="char">
1684<para>__u8* buffer2</para>
1685</entry><entry
1686 align="char">
1687<para>Pointer to the tail of the filtered section data, or NULL.
1688 Useful to handle the wrapping of a circular buffer.</para>
1689</entry>
1690 </row><row><entry
1691 align="char">
1692<para>size_t buffer2_length</para>
1693</entry><entry
1694 align="char">
1695<para>Length of the filtered section data in buffer2, including
1696 headers and CRC.</para>
1697</entry>
1698 </row><row><entry
1699 align="char">
1700<para>dmx_section_filter_t*
1701 filter</para>
1702</entry><entry
1703 align="char">
1704<para>Indicates the filter that triggered the callback.</para>
1705</entry>
1706 </row><row><entry
1707 align="char">
1708<para>dmx_success_t
1709 success</para>
1710</entry><entry
1711 align="char">
1712<para>Indicates if there was an error in section reception.</para>
1713</entry>
1714 </row></tbody></tgroup></informaltable>
1715<para>RETURNS
1716</para>
1717<informaltable><tgroup cols="2"><tbody><row><entry
1718 align="char">
1719<para>0</para>
1720</entry><entry
1721 align="char">
1722<para>Continue filtering.</para>
1723</entry>
1724 </row><row><entry
1725 align="char">
1726<para>-1</para>
1727</entry><entry
1728 align="char">
1729<para>Stop filtering - has the same effect as a call to
1730 stop_filtering() on the Section Feed API.</para>
1731</entry>
1732 </row></tbody></tgroup></informaltable>
1733 </section></section>
1734<section id="ts_feed_api">
1735<title>TS Feed API</title>
1736<para>A TS feed is typically mapped to a hardware PID filter on the demux chip.
1737Using this API, the client can set the filtering properties to start/stop filtering TS
1738packets on a particular TS feed. The API is defined as an abstract interface of the type
1739dmx_ts_feed_t.
1740</para>
1741<para>The functions that implement the interface should be defined static or module private. The
1742client can get the handle of a TS feed API by calling the function allocate_ts_feed() in the
1743demux API.
1744</para>
1745
1746<section
1747role="subsection"><title>set()</title>
1748<para>DESCRIPTION
1749</para>
1750<informaltable><tgroup cols="1"><tbody><row><entry
1751 align="char">
1752<para>This function sets the parameters of a TS feed. Any filtering in progress on the
1753 TS feed must be stopped before calling this function.</para>
1754</entry>
1755 </row></tbody></tgroup></informaltable>
1756<para>SYNOPSIS
1757</para>
1758<informaltable><tgroup cols="1"><tbody><row><entry
1759 align="char">
1760<para>int set ( dmx_ts_feed_t&#x22C6; feed, __u16 pid, size_t
1761 callback_length, size_t circular_buffer_size, int
1762 descramble, struct timespec timeout);</para>
1763</entry>
1764 </row></tbody></tgroup></informaltable>
1765<para>PARAMETERS
1766</para>
1767<informaltable><tgroup cols="2"><tbody><row><entry
1768 align="char">
1769<para>dmx_ts_feed_t* feed</para>
1770</entry><entry
1771 align="char">
1772<para>Pointer to the TS feed API and instance data.</para>
1773</entry>
1774 </row><row><entry
1775 align="char">
1776<para>__u16 pid</para>
1777</entry><entry
1778 align="char">
1779<para>PID value to filter. Only the TS packets carrying the
1780 specified PID will be passed to the API client.</para>
1781</entry>
1782 </row><row><entry
1783 align="char">
1784<para>size_t
1785 callback_length</para>
1786</entry><entry
1787 align="char">
1788<para>Number of bytes to deliver with each call to the
1789 dmx_ts_cb() callback function. The value of this
1790 parameter should be a multiple of 188.</para>
1791</entry>
1792 </row><row><entry
1793 align="char">
1794<para>size_t
1795 circular_buffer_size</para>
1796</entry><entry
1797 align="char">
1798<para>Size of the circular buffer for the filtered TS packets.</para>
1799</entry>
1800 </row><row><entry
1801 align="char">
1802<para>int descramble</para>
1803</entry><entry
1804 align="char">
1805<para>If non-zero, descramble the filtered TS packets.</para>
1806</entry>
1807 </row><row><entry
1808 align="char">
1809<para>struct timespec
1810 timeout</para>
1811</entry><entry
1812 align="char">
1813<para>Maximum time to wait before delivering received TS
1814 packets to the client.</para>
1815</entry>
1816 </row></tbody></tgroup></informaltable>
1817<para>RETURNS
1818</para>
1819<informaltable><tgroup cols="2"><tbody><row><entry
1820 align="char">
1821<para>0</para>
1822</entry><entry
1823 align="char">
1824<para>The function was completed without errors.</para>
1825</entry>
1826 </row><row><entry
1827 align="char">
1828<para>-ENOMEM</para>
1829</entry><entry
1830 align="char">
1831<para>Not enough memory for the requested buffer size.</para>
1832</entry>
1833 </row><row><entry
1834 align="char">
1835<para>-ENOSYS</para>
1836</entry><entry
1837 align="char">
1838<para>No descrambling facility available for TS.</para>
1839</entry>
1840 </row><row><entry
1841 align="char">
1842<para>-EINVAL</para>
1843</entry><entry
1844 align="char">
1845<para>Bad parameter.</para>
1846</entry>
1847 </row></tbody></tgroup></informaltable>
1848
1849</section><section
1850role="subsection"><title>start_filtering()</title>
1851<para>DESCRIPTION
1852</para>
1853<informaltable><tgroup cols="1"><tbody><row><entry
1854 align="char">
1855<para>Starts filtering TS packets on this TS feed, according to its settings. The PID
1856 value to filter can be set by the API client. All matching TS packets are
1857 delivered asynchronously to the client, using the callback function registered
1858 with allocate_ts_feed().</para>
1859</entry>
1860 </row></tbody></tgroup></informaltable>
1861<para>SYNOPSIS
1862</para>
1863<informaltable><tgroup cols="1"><tbody><row><entry
1864 align="char">
1865<para>int start_filtering(dmx_ts_feed_t&#x22C6; feed);</para>
1866</entry>
1867 </row></tbody></tgroup></informaltable>
1868<para>PARAMETERS
1869</para>
1870<informaltable><tgroup cols="2"><tbody><row><entry
1871 align="char">
1872<para>dmx_ts_feed_t* feed</para>
1873</entry><entry
1874 align="char">
1875<para>Pointer to the TS feed API and instance data.</para>
1876</entry>
1877 </row></tbody></tgroup></informaltable>
1878<para>RETURNS
1879</para>
1880<informaltable><tgroup cols="2"><tbody><row><entry
1881 align="char">
1882<para>0</para>
1883</entry><entry
1884 align="char">
1885<para>The function was completed without errors.</para>
1886</entry>
1887 </row><row><entry
1888 align="char">
1889<para>-EINVAL</para>
1890</entry><entry
1891 align="char">
1892<para>Bad parameter.</para>
1893</entry>
1894 </row></tbody></tgroup></informaltable>
1895
1896</section><section
1897role="subsection"><title>stop_filtering()</title>
1898<para>DESCRIPTION
1899</para>
1900<informaltable><tgroup cols="1"><tbody><row><entry
1901 align="char">
1902<para>Stops filtering TS packets on this TS feed.</para>
1903</entry>
1904 </row></tbody></tgroup></informaltable>
1905<para>SYNOPSIS
1906</para>
1907<informaltable><tgroup cols="1"><tbody><row><entry
1908 align="char">
1909<para>int stop_filtering(dmx_ts_feed_t&#x22C6; feed);</para>
1910</entry>
1911 </row></tbody></tgroup></informaltable>
1912<para>PARAMETERS
1913</para>
1914<informaltable><tgroup cols="2"><tbody><row><entry
1915 align="char">
1916<para>dmx_ts_feed_t* feed</para>
1917</entry><entry
1918 align="char">
1919<para>Pointer to the TS feed API and instance data.</para>
1920</entry>
1921 </row></tbody></tgroup></informaltable>
1922<para>RETURNS
1923</para>
1924<informaltable><tgroup cols="2"><tbody><row><entry
1925 align="char">
1926<para>0</para>
1927</entry><entry
1928 align="char">
1929<para>The function was completed without errors.</para>
1930</entry>
1931 </row><row><entry
1932 align="char">
1933<para>-EINVAL</para>
1934</entry><entry
1935 align="char">
1936<para>Bad parameter.</para>
1937</entry>
1938 </row></tbody></tgroup></informaltable>
1939 </section></section>
1940<section id="section_feed_api">
1941<title>Section Feed API</title>
1942<para>A section feed is a resource consisting of a PID filter and a set of section filters. Using this
1943API, the client can set the properties of a section feed and to start/stop filtering. The API is
1944defined as an abstract interface of the type dmx_section_feed_t. The functions that implement
1945the interface should be defined static or module private. The client can get the handle of
1946a section feed API by calling the function allocate_section_feed() in the demux
1947API.
1948</para>
1949<para>On demux platforms that provide section filtering in hardware, the Section Feed API
1950implementation provides a software wrapper for the demux hardware. Other platforms may
1951support only PID filtering in hardware, requiring that TS packets are converted to sections in
1952software. In the latter case the Section Feed API implementation can be a client of the TS
1953Feed API.
1954</para>
1955
1956</section>
1957<section id="kdapi_set">
1958<title>set()</title>
1959<para>DESCRIPTION
1960</para>
1961<informaltable><tgroup cols="1"><tbody><row><entry
1962 align="char">
1963<para>This function sets the parameters of a section feed. Any filtering in progress on
1964 the section feed must be stopped before calling this function. If descrambling
1965 is enabled, the payload_scrambling_control and address_scrambling_control
1966 fields of received DVB datagram sections should be observed. If either one is
1967 non-zero, the section should be descrambled either in hardware or using the
1968 functions descramble_mac_address() and descramble_section_payload() of the
1969 demux API. Note that according to the MPEG-2 Systems specification, only
1970 the payloads of private sections can be scrambled while the rest of the section
1971 data must be sent in the clear.</para>
1972</entry>
1973 </row></tbody></tgroup></informaltable>
1974<para>SYNOPSIS
1975</para>
1976<informaltable><tgroup cols="1"><tbody><row><entry
1977 align="char">
1978<para>int set(dmx_section_feed_t&#x22C6; feed, __u16 pid, size_t
1979 circular_buffer_size, int descramble, int
1980 check_crc);</para>
1981</entry>
1982 </row></tbody></tgroup></informaltable>
1983<para>PARAMETERS
1984</para>
1985<informaltable><tgroup cols="2"><tbody><row><entry
1986 align="char">
1987<para>dmx_section_feed_t*
1988 feed</para>
1989</entry><entry
1990 align="char">
1991<para>Pointer to the section feed API and instance data.</para>
1992</entry>
1993 </row><row><entry
1994 align="char">
1995<para>__u16 pid</para>
1996</entry><entry
1997 align="char">
1998<para>PID value to filter; only the TS packets carrying the
1999 specified PID will be accepted.</para>
2000</entry>
2001 </row><row><entry
2002 align="char">
2003<para>size_t
2004 circular_buffer_size</para>
2005</entry><entry
2006 align="char">
2007<para>Size of the circular buffer for filtered sections.</para>
2008</entry>
2009 </row><row><entry
2010 align="char">
2011<para>int descramble</para>
2012</entry><entry
2013 align="char">
2014<para>If non-zero, descramble any sections that are scrambled.</para>
2015</entry>
2016 </row><row><entry
2017 align="char">
2018<para>int check_crc</para>
2019</entry><entry
2020 align="char">
2021<para>If non-zero, check the CRC values of filtered sections.</para>
2022</entry>
2023 </row></tbody></tgroup></informaltable>
2024<para>RETURNS
2025</para>
2026<informaltable><tgroup cols="2"><tbody><row><entry
2027 align="char">
2028<para>0</para>
2029</entry><entry
2030 align="char">
2031<para>The function was completed without errors.</para>
2032</entry>
2033 </row><row><entry
2034 align="char">
2035<para>-ENOMEM</para>
2036</entry><entry
2037 align="char">
2038<para>Not enough memory for the requested buffer size.</para>
2039</entry>
2040 </row><row><entry
2041 align="char">
2042<para>-ENOSYS</para>
2043</entry><entry
2044 align="char">
2045<para>No descrambling facility available for sections.</para>
2046</entry>
2047 </row><row><entry
2048 align="char">
2049<para>-EINVAL</para>
2050</entry><entry
2051 align="char">
2052<para>Bad parameters.</para>
2053</entry>
2054 </row></tbody></tgroup></informaltable>
2055
2056</section><section
2057role="subsection"><title>allocate_filter()</title>
2058<para>DESCRIPTION
2059</para>
2060<informaltable><tgroup cols="1"><tbody><row><entry
2061 align="char">
2062<para>This function is used to allocate a section filter on the demux. It should only be
2063 called when no filtering is in progress on this section feed. If a filter cannot be
2064 allocated, the function fails with -ENOSPC. See in section ?? for the format of
2065 the section filter.</para>
2066</entry>
2067 </row><row><entry
2068 align="char">
2069<para>The bitfields filter_mask and filter_value should only be modified when no
2070 filtering is in progress on this section feed. filter_mask controls which bits of
2071 filter_value are compared with the section headers/payload. On a binary value
2072 of 1 in filter_mask, the corresponding bits are compared. The filter only accepts
2073 sections that are equal to filter_value in all the tested bit positions. Any changes
2074 to the values of filter_mask and filter_value are guaranteed to take effect only
2075 when the start_filtering() function is called next time. The parent pointer in
2076 the struct is initialized by the API implementation to the value of the feed
2077 parameter. The priv pointer is not used by the API implementation, and can
2078 thus be freely utilized by the caller of this function. Any data pointed to by the
2079 priv pointer is available to the recipient of the dmx_section_cb() function call.</para>
2080</entry>
2081 </row><row><entry
2082 align="char">
2083<para>While the maximum section filter length (DMX_MAX_FILTER_SIZE) is
2084 currently set at 16 bytes, hardware filters of that size are not available on all
2085 platforms. Therefore, section filtering will often take place first in hardware,
2086 followed by filtering in software for the header bytes that were not covered
2087 by a hardware filter. The filter_mask field can be checked to determine how
2088 many bytes of the section filter are actually used, and if the hardware filter will
2089 suffice. Additionally, software-only section filters can optionally be allocated
2090 to clients when all hardware section filters are in use. Note that on most demux
2091 hardware it is not possible to filter on the section_length field of the section
2092 header &#8211; thus this field is ignored, even though it is included in filter_value and
2093 filter_mask fields.</para>
2094</entry>
2095 </row></tbody></tgroup></informaltable>
2096<para>SYNOPSIS
2097</para>
2098<informaltable><tgroup cols="1"><tbody><row><entry
2099 align="char">
2100<para>int allocate_filter(dmx_section_feed_t&#x22C6; feed,
2101 dmx_section_filter_t&#x22C6;&#x22C6; filter);</para>
2102</entry>
2103 </row></tbody></tgroup></informaltable>
2104<para>PARAMETERS
2105</para>
2106<informaltable><tgroup cols="2"><tbody><row><entry
2107 align="char">
2108<para>dmx_section_feed_t*
2109 feed</para>
2110</entry><entry
2111 align="char">
2112<para>Pointer to the section feed API and instance data.</para>
2113</entry>
2114 </row><row><entry
2115 align="char">
2116<para>dmx_section_filter_t**
2117 filter</para>
2118</entry><entry
2119 align="char">
2120<para>Pointer to the allocated filter.</para>
2121</entry>
2122 </row></tbody></tgroup></informaltable>
2123<para>RETURNS
2124</para>
2125<informaltable><tgroup cols="2"><tbody><row><entry
2126 align="char">
2127<para>0</para>
2128</entry><entry
2129 align="char">
2130<para>The function was completed without errors.</para>
2131</entry>
2132 </row><row><entry
2133 align="char">
2134<para>-ENOSPC</para>
2135</entry><entry
2136 align="char">
2137<para>No filters of given type and length available.</para>
2138</entry>
2139 </row><row><entry
2140 align="char">
2141<para>-EINVAL</para>
2142</entry><entry
2143 align="char">
2144<para>Bad parameters.</para>
2145</entry>
2146 </row></tbody></tgroup></informaltable>
2147
2148</section><section
2149role="subsection"><title>release_filter()</title>
2150<para>DESCRIPTION
2151</para>
2152<informaltable><tgroup cols="1"><tbody><row><entry
2153 align="char">
2154<para>This function releases all the resources of a previously allocated section filter.
2155 The function should not be called while filtering is in progress on this section
2156 feed. After calling this function, the caller should not try to dereference the
2157 filter pointer.</para>
2158</entry>
2159 </row></tbody></tgroup></informaltable>
2160<para>SYNOPSIS
2161</para>
2162<informaltable><tgroup cols="1"><tbody><row><entry
2163 align="char">
2164<para>int release_filter ( dmx_section_feed_t&#x22C6; feed,
2165 dmx_section_filter_t&#x22C6; filter);</para>
2166</entry>
2167 </row></tbody></tgroup></informaltable>
2168<para>PARAMETERS
2169</para>
2170<informaltable><tgroup cols="2"><tbody><row><entry
2171 align="char">
2172<para>dmx_section_feed_t*
2173 feed</para>
2174</entry><entry
2175 align="char">
2176<para>Pointer to the section feed API and instance data.</para>
2177</entry>
2178 </row><row><entry
2179 align="char">
2180<para>dmx_section_filter_t*
2181 filter</para>
2182</entry><entry
2183 align="char">
2184<para>I/O Pointer to the instance data of a section filter.</para>
2185</entry>
2186 </row></tbody></tgroup></informaltable>
2187<para>RETURNS
2188</para>
2189<informaltable><tgroup cols="2"><tbody><row><entry
2190 align="char">
2191<para>0</para>
2192</entry><entry
2193 align="char">
2194<para>The function was completed without errors.</para>
2195</entry>
2196 </row><row><entry
2197 align="char">
2198<para>-ENODEV</para>
2199</entry><entry
2200 align="char">
2201<para>No such filter allocated.</para>
2202</entry>
2203 </row><row><entry
2204 align="char">
2205<para>-EINVAL</para>
2206</entry><entry
2207 align="char">
2208<para>Bad parameter.</para>
2209</entry>
2210 </row></tbody></tgroup></informaltable>
2211
2212</section><section
2213role="subsection"><title>start_filtering()</title>
2214<para>DESCRIPTION
2215</para>
2216<informaltable><tgroup cols="1"><tbody><row><entry
2217 align="char">
2218<para>Starts filtering sections on this section feed, according to its settings. Sections
2219 are first filtered based on their PID and then matched with the section
2220 filters allocated for this feed. If the section matches the PID filter and
2221 at least one section filter, it is delivered to the API client. The section
2222 is delivered asynchronously using the callback function registered with
2223 allocate_section_feed().</para>
2224</entry>
2225 </row></tbody></tgroup></informaltable>
2226<para>SYNOPSIS
2227</para>
2228<informaltable><tgroup cols="1"><tbody><row><entry
2229 align="char">
2230<para>int start_filtering ( dmx_section_feed_t&#x22C6; feed );</para>
2231</entry>
2232 </row></tbody></tgroup></informaltable>
2233<para>PARAMETERS
2234</para>
2235<informaltable><tgroup cols="2"><tbody><row><entry
2236 align="char">
2237<para>dmx_section_feed_t*
2238 feed</para>
2239</entry><entry
2240 align="char">
2241<para>Pointer to the section feed API and instance data.</para>
2242</entry>
2243 </row></tbody></tgroup></informaltable>
2244<para>RETURNS
2245</para>
2246<informaltable><tgroup cols="2"><tbody><row><entry
2247 align="char">
2248<para>0</para>
2249</entry><entry
2250 align="char">
2251<para>The function was completed without errors.</para>
2252</entry>
2253 </row><row><entry
2254 align="char">
2255<para>-EINVAL</para>
2256</entry><entry
2257 align="char">
2258<para>Bad parameter.</para>
2259</entry>
2260 </row></tbody></tgroup></informaltable>
2261
2262</section><section
2263role="subsection"><title>stop_filtering()</title>
2264<para>DESCRIPTION
2265</para>
2266<informaltable><tgroup cols="1"><tbody><row><entry
2267 align="char">
2268<para>Stops filtering sections on this section feed. Note that any changes to the
2269 filtering parameters (filter_value, filter_mask, etc.) should only be made when
2270 filtering is stopped.</para>
2271</entry>
2272 </row></tbody></tgroup></informaltable>
2273<para>SYNOPSIS
2274</para>
2275<informaltable><tgroup cols="1"><tbody><row><entry
2276 align="char">
2277<para>int stop_filtering ( dmx_section_feed_t&#x22C6; feed );</para>
2278</entry>
2279 </row></tbody></tgroup></informaltable>
2280<para>PARAMETERS
2281</para>
2282<informaltable><tgroup cols="2"><tbody><row><entry
2283 align="char">
2284<para>dmx_section_feed_t*
2285 feed</para>
2286</entry><entry
2287 align="char">
2288<para>Pointer to the section feed API and instance data.</para>
2289</entry>
2290 </row></tbody></tgroup></informaltable>
2291<para>RETURNS
2292</para>
2293<informaltable><tgroup cols="2"><tbody><row><entry
2294 align="char">
2295<para>0</para>
2296</entry><entry
2297 align="char">
2298<para>The function was completed without errors.</para>
2299</entry>
2300 </row><row><entry
2301 align="char">
2302<para>-EINVAL</para>
2303</entry><entry
2304 align="char">
2305<para>Bad parameter.</para>
2306</entry>
2307 </row></tbody></tgroup></informaltable>
2308
2309</section>
diff --git a/Documentation/DocBook/media/v4l/biblio.xml b/Documentation/DocBook/media/v4l/biblio.xml
index fdee6b3f3eca..9beb30f0071b 100644
--- a/Documentation/DocBook/media/v4l/biblio.xml
+++ b/Documentation/DocBook/media/v4l/biblio.xml
@@ -177,6 +177,24 @@ Signal - NTSC for Studio Applications"</title>
1771125-Line High-Definition Production"</title> 1771125-Line High-Definition Production"</title>
178 </biblioentry> 178 </biblioentry>
179 179
180 <biblioentry id="smpte431">
181 <abbrev>SMPTE&nbsp;RP&nbsp;431-2</abbrev>
182 <authorgroup>
183 <corpauthor>Society of Motion Picture and Television Engineers
184(<ulink url="http://www.smpte.org">http://www.smpte.org</ulink>)</corpauthor>
185 </authorgroup>
186 <title>SMPTE RP 431-2:2011 "D-Cinema Quality - Reference Projector and Environment"</title>
187 </biblioentry>
188
189 <biblioentry id="smpte2084">
190 <abbrev>SMPTE&nbsp;ST&nbsp;2084</abbrev>
191 <authorgroup>
192 <corpauthor>Society of Motion Picture and Television Engineers
193(<ulink url="http://www.smpte.org">http://www.smpte.org</ulink>)</corpauthor>
194 </authorgroup>
195 <title>SMPTE ST 2084:2014 "High Dynamic Range Electro-Optical Transfer Function of Master Reference Displays"</title>
196 </biblioentry>
197
180 <biblioentry id="srgb"> 198 <biblioentry id="srgb">
181 <abbrev>sRGB</abbrev> 199 <abbrev>sRGB</abbrev>
182 <authorgroup> 200 <authorgroup>
diff --git a/Documentation/DocBook/media/v4l/compat.xml b/Documentation/DocBook/media/v4l/compat.xml
index a0aef85d33c1..5701a08ed792 100644
--- a/Documentation/DocBook/media/v4l/compat.xml
+++ b/Documentation/DocBook/media/v4l/compat.xml
@@ -2591,6 +2591,26 @@ and &v4l2-mbus-framefmt;.
2591 </orderedlist> 2591 </orderedlist>
2592 </section> 2592 </section>
2593 2593
2594 <section>
2595 <title>V4L2 in Linux 4.4</title>
2596 <orderedlist>
2597 <listitem>
2598 <para>Renamed <constant>V4L2_TUNER_ADC</constant> to
2599<constant>V4L2_TUNER_SDR</constant>. The use of
2600<constant>V4L2_TUNER_ADC</constant> is deprecated now.
2601 </para>
2602 </listitem>
2603 <listitem>
2604 <para>Added <constant>V4L2_CID_RF_TUNER_RF_GAIN</constant>
2605RF Tuner control.</para>
2606 </listitem>
2607 <listitem>
2608 <para>Added transmitter support for Software Defined Radio (SDR)
2609Interface.</para>
2610 </listitem>
2611 </orderedlist>
2612 </section>
2613
2594 <section id="other"> 2614 <section id="other">
2595 <title>Relation of V4L2 to other Linux multimedia APIs</title> 2615 <title>Relation of V4L2 to other Linux multimedia APIs</title>
2596 2616
diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml
index 33aece541880..f13a429093f1 100644
--- a/Documentation/DocBook/media/v4l/controls.xml
+++ b/Documentation/DocBook/media/v4l/controls.xml
@@ -5418,6 +5418,18 @@ set. Unit is in Hz. The range and step are driver-specific.</entry>
5418 <entry spanname="descr">Enables/disables IF automatic gain control (AGC)</entry> 5418 <entry spanname="descr">Enables/disables IF automatic gain control (AGC)</entry>
5419 </row> 5419 </row>
5420 <row> 5420 <row>
5421 <entry spanname="id"><constant>V4L2_CID_RF_TUNER_RF_GAIN</constant>&nbsp;</entry>
5422 <entry>integer</entry>
5423 </row>
5424 <row>
5425 <entry spanname="descr">The RF amplifier is the very first
5426amplifier on the receiver signal path, just right after the antenna input.
5427The difference between the LNA gain and the RF gain in this document is that
5428the LNA gain is integrated in the tuner chip while the RF gain is a separate
5429chip. There may be both RF and LNA gain controls in the same device.
5430The range and step are driver-specific.</entry>
5431 </row>
5432 <row>
5421 <entry spanname="id"><constant>V4L2_CID_RF_TUNER_LNA_GAIN</constant>&nbsp;</entry> 5433 <entry spanname="id"><constant>V4L2_CID_RF_TUNER_LNA_GAIN</constant>&nbsp;</entry>
5422 <entry>integer</entry> 5434 <entry>integer</entry>
5423 </row> 5435 </row>
@@ -5425,6 +5437,8 @@ set. Unit is in Hz. The range and step are driver-specific.</entry>
5425 <entry spanname="descr">LNA (low noise amplifier) gain is first 5437 <entry spanname="descr">LNA (low noise amplifier) gain is first
5426gain stage on the RF tuner signal path. It is located very close to tuner 5438gain stage on the RF tuner signal path. It is located very close to tuner
5427antenna input. Used when <constant>V4L2_CID_RF_TUNER_LNA_GAIN_AUTO</constant> is not set. 5439antenna input. Used when <constant>V4L2_CID_RF_TUNER_LNA_GAIN_AUTO</constant> is not set.
5440See <constant>V4L2_CID_RF_TUNER_RF_GAIN</constant> to understand how RF gain
5441and LNA gain differs from the each others.
5428The range and step are driver-specific.</entry> 5442The range and step are driver-specific.</entry>
5429 </row> 5443 </row>
5430 <row> 5444 <row>
diff --git a/Documentation/DocBook/media/v4l/dev-sdr.xml b/Documentation/DocBook/media/v4l/dev-sdr.xml
index f8903568a243..a659771f7b7c 100644
--- a/Documentation/DocBook/media/v4l/dev-sdr.xml
+++ b/Documentation/DocBook/media/v4l/dev-sdr.xml
@@ -28,6 +28,16 @@ Devices supporting the SDR receiver interface set the
28<structfield>capabilities</structfield> field of &v4l2-capability; 28<structfield>capabilities</structfield> field of &v4l2-capability;
29returned by the &VIDIOC-QUERYCAP; ioctl. That flag means the device has an 29returned by the &VIDIOC-QUERYCAP; ioctl. That flag means the device has an
30Analog to Digital Converter (ADC), which is a mandatory element for the SDR receiver. 30Analog to Digital Converter (ADC), which is a mandatory element for the SDR receiver.
31 </para>
32 <para>
33Devices supporting the SDR transmitter interface set the
34<constant>V4L2_CAP_SDR_OUTPUT</constant> and
35<constant>V4L2_CAP_MODULATOR</constant> flag in the
36<structfield>capabilities</structfield> field of &v4l2-capability;
37returned by the &VIDIOC-QUERYCAP; ioctl. That flag means the device has an
38Digital to Analog Converter (DAC), which is a mandatory element for the SDR transmitter.
39 </para>
40 <para>
31At least one of the read/write, streaming or asynchronous I/O methods must 41At least one of the read/write, streaming or asynchronous I/O methods must
32be supported. 42be supported.
33 </para> 43 </para>
@@ -39,15 +49,16 @@ be supported.
39 <para> 49 <para>
40SDR devices can support <link linkend="control">controls</link>, and must 50SDR devices can support <link linkend="control">controls</link>, and must
41support the <link linkend="tuner">tuner</link> ioctls. Tuner ioctls are used 51support the <link linkend="tuner">tuner</link> ioctls. Tuner ioctls are used
42for setting the ADC sampling rate (sampling frequency) and the possible RF tuner 52for setting the ADC/DAC sampling rate (sampling frequency) and the possible
43frequency. 53radio frequency (RF).
44 </para> 54 </para>
45 55
46 <para> 56 <para>
47The <constant>V4L2_TUNER_ADC</constant> tuner type is used for ADC tuners, and 57The <constant>V4L2_TUNER_SDR</constant> tuner type is used for setting SDR
48the <constant>V4L2_TUNER_RF</constant> tuner type is used for RF tuners. The 58device ADC/DAC frequency, and the <constant>V4L2_TUNER_RF</constant>
49tuner index of the RF tuner (if any) must always follow the ADC tuner index. 59tuner type is used for setting radio frequency.
50Normally the ADC tuner is #0 and the RF tuner is #1. 60The tuner index of the RF tuner (if any) must always follow the SDR tuner index.
61Normally the SDR tuner is #0 and the RF tuner is #1.
51 </para> 62 </para>
52 63
53 <para> 64 <para>
@@ -59,9 +70,9 @@ The &VIDIOC-S-HW-FREQ-SEEK; ioctl is not supported.
59 <title>Data Format Negotiation</title> 70 <title>Data Format Negotiation</title>
60 71
61 <para> 72 <para>
62The SDR capture device uses the <link linkend="format">format</link> ioctls to 73The SDR device uses the <link linkend="format">format</link> ioctls to
63select the capture format. Both the sampling resolution and the data streaming 74select the capture and output format. Both the sampling resolution and the data
64format are bound to that selectable format. In addition to the basic 75streaming format are bound to that selectable format. In addition to the basic
65<link linkend="format">format</link> ioctls, the &VIDIOC-ENUM-FMT; ioctl 76<link linkend="format">format</link> ioctls, the &VIDIOC-ENUM-FMT; ioctl
66must be supported as well. 77must be supported as well.
67 </para> 78 </para>
@@ -69,7 +80,8 @@ must be supported as well.
69 <para> 80 <para>
70To use the <link linkend="format">format</link> ioctls applications set the 81To use the <link linkend="format">format</link> ioctls applications set the
71<structfield>type</structfield> field of a &v4l2-format; to 82<structfield>type</structfield> field of a &v4l2-format; to
72<constant>V4L2_BUF_TYPE_SDR_CAPTURE</constant> and use the &v4l2-sdr-format; 83<constant>V4L2_BUF_TYPE_SDR_CAPTURE</constant> or
84<constant>V4L2_BUF_TYPE_SDR_OUTPUT</constant> and use the &v4l2-sdr-format;
73<structfield>sdr</structfield> member of the <structfield>fmt</structfield> 85<structfield>sdr</structfield> member of the <structfield>fmt</structfield>
74union as needed per the desired operation. 86union as needed per the desired operation.
75Currently there is two fields, <structfield>pixelformat</structfield> and 87Currently there is two fields, <structfield>pixelformat</structfield> and
diff --git a/Documentation/DocBook/media/v4l/io.xml b/Documentation/DocBook/media/v4l/io.xml
index 7bbc2a48911e..da654031ef3f 100644
--- a/Documentation/DocBook/media/v4l/io.xml
+++ b/Documentation/DocBook/media/v4l/io.xml
@@ -1006,8 +1006,14 @@ must set this to 0.</entry>
1006 <row> 1006 <row>
1007 <entry><constant>V4L2_BUF_TYPE_SDR_CAPTURE</constant></entry> 1007 <entry><constant>V4L2_BUF_TYPE_SDR_CAPTURE</constant></entry>
1008 <entry>11</entry> 1008 <entry>11</entry>
1009 <entry>Buffer for Software Defined Radio (SDR), see <xref 1009 <entry>Buffer for Software Defined Radio (SDR) capture stream, see
1010 linkend="sdr" />.</entry> 1010 <xref linkend="sdr" />.</entry>
1011 </row>
1012 <row>
1013 <entry><constant>V4L2_BUF_TYPE_SDR_OUTPUT</constant></entry>
1014 <entry>12</entry>
1015 <entry>Buffer for Software Defined Radio (SDR) output stream, see
1016 <xref linkend="sdr" />.</entry>
1011 </row> 1017 </row>
1012 </tbody> 1018 </tbody>
1013 </tgroup> 1019 </tgroup>
diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml b/Documentation/DocBook/media/v4l/pixfmt.xml
index 965ea916784a..d871245d2973 100644
--- a/Documentation/DocBook/media/v4l/pixfmt.xml
+++ b/Documentation/DocBook/media/v4l/pixfmt.xml
@@ -540,6 +540,10 @@ colorspaces except for BT.2020 which uses limited range R'G'B' quantization.</pa
540 <entry>See <xref linkend="col-bt2020" />.</entry> 540 <entry>See <xref linkend="col-bt2020" />.</entry>
541 </row> 541 </row>
542 <row> 542 <row>
543 <entry><constant>V4L2_COLORSPACE_DCI_P3</constant></entry>
544 <entry>See <xref linkend="col-dcip3" />.</entry>
545 </row>
546 <row>
543 <entry><constant>V4L2_COLORSPACE_SMPTE240M</constant></entry> 547 <entry><constant>V4L2_COLORSPACE_SMPTE240M</constant></entry>
544 <entry>See <xref linkend="col-smpte-240m" />.</entry> 548 <entry>See <xref linkend="col-smpte-240m" />.</entry>
545 </row> 549 </row>
@@ -601,6 +605,14 @@ colorspaces except for BT.2020 which uses limited range R'G'B' quantization.</pa
601 <entry><constant>V4L2_XFER_FUNC_NONE</constant></entry> 605 <entry><constant>V4L2_XFER_FUNC_NONE</constant></entry>
602 <entry>Do not use a transfer function (i.e. use linear RGB values).</entry> 606 <entry>Do not use a transfer function (i.e. use linear RGB values).</entry>
603 </row> 607 </row>
608 <row>
609 <entry><constant>V4L2_XFER_FUNC_DCI_P3</constant></entry>
610 <entry>Use the DCI-P3 transfer function.</entry>
611 </row>
612 <row>
613 <entry><constant>V4L2_XFER_FUNC_SMPTE2084</constant></entry>
614 <entry>Use the SMPTE 2084 transfer function.</entry>
615 </row>
604 </tbody> 616 </tbody>
605 </tgroup> 617 </tgroup>
606 </table> 618 </table>
@@ -1154,6 +1166,68 @@ clamped to the range [-0.5&hellip;0.5]. The Y'CbCr quantization is limited range
1154clamped to the range [-0.5&hellip;0.5]. The Yc'CbcCrc quantization is limited range.</para> 1166clamped to the range [-0.5&hellip;0.5]. The Yc'CbcCrc quantization is limited range.</para>
1155 </section> 1167 </section>
1156 1168
1169 <section id="col-dcip3">
1170 <title>Colorspace DCI-P3 (<constant>V4L2_COLORSPACE_DCI_P3</constant>)</title>
1171 <para>The <xref linkend="smpte431" /> standard defines the colorspace used by cinema
1172projectors that use the DCI-P3 colorspace.
1173The default transfer function is <constant>V4L2_XFER_FUNC_DCI_P3</constant>.
1174The default Y'CbCr encoding is <constant>V4L2_YCBCR_ENC_709</constant>. Note that this
1175colorspace does not specify a Y'CbCr encoding since it is not meant to be encoded
1176to Y'CbCr. So this default Y'CbCr encoding was picked because it is the HDTV
1177encoding. The default Y'CbCr quantization is limited range. The chromaticities of
1178the primary colors and the white reference are:</para>
1179 <table frame="none">
1180 <title>DCI-P3 Chromaticities</title>
1181 <tgroup cols="3" align="left">
1182 &cs-str;
1183 <thead>
1184 <row>
1185 <entry>Color</entry>
1186 <entry>x</entry>
1187 <entry>y</entry>
1188 </row>
1189 </thead>
1190 <tbody valign="top">
1191 <row>
1192 <entry>Red</entry>
1193 <entry>0.6800</entry>
1194 <entry>0.3200</entry>
1195 </row>
1196 <row>
1197 <entry>Green</entry>
1198 <entry>0.2650</entry>
1199 <entry>0.6900</entry>
1200 </row>
1201 <row>
1202 <entry>Blue</entry>
1203 <entry>0.1500</entry>
1204 <entry>0.0600</entry>
1205 </row>
1206 <row>
1207 <entry>White Reference</entry>
1208 <entry>0.3140</entry>
1209 <entry>0.3510</entry>
1210 </row>
1211 </tbody>
1212 </tgroup>
1213 </table>
1214 <variablelist>
1215 <varlistentry>
1216 <term>Transfer function:</term>
1217 <listitem>
1218 <para>L' = L<superscript>1/2.6</superscript></para>
1219 </listitem>
1220 </varlistentry>
1221 <varlistentry>
1222 <term>Inverse Transfer function:</term>
1223 <listitem>
1224 <para>L = L'<superscript>2.6</superscript></para>
1225 </listitem>
1226 </varlistentry>
1227 </variablelist>
1228 <para>Y'CbCr encoding is not specified. V4L2 defaults to Rec. 709.</para>
1229 </section>
1230
1157 <section id="col-smpte-240m"> 1231 <section id="col-smpte-240m">
1158 <title>Colorspace SMPTE 240M (<constant>V4L2_COLORSPACE_SMPTE240M</constant>)</title> 1232 <title>Colorspace SMPTE 240M (<constant>V4L2_COLORSPACE_SMPTE240M</constant>)</title>
1159 <para>The <xref linkend="smpte240m" /> standard was an interim standard used during 1233 <para>The <xref linkend="smpte240m" /> standard was an interim standard used during
@@ -1402,6 +1476,41 @@ and <constant>V4L2_QUANTIZATION_FULL_RANGE</constant>.</para>
1402 1476
1403 </section> 1477 </section>
1404 1478
1479 <section>
1480 <title>Detailed Transfer Function Descriptions</title>
1481 <section id="xf-smpte-2084">
1482 <title>Transfer Function SMPTE 2084 (<constant>V4L2_XFER_FUNC_SMPTE2084</constant>)</title>
1483 <para>The <xref linkend="smpte2084" /> standard defines the transfer function used by
1484High Dynamic Range content.</para>
1485 <variablelist>
1486 <varlistentry>
1487 <term>Constants:</term>
1488 <listitem>
1489 <para>m1 = (2610 / 4096) / 4</para>
1490 <para>m2 = (2523 / 4096) * 128</para>
1491 <para>c1 = 3424 / 4096</para>
1492 <para>c2 = (2413 / 4096) * 32</para>
1493 <para>c3 = (2392 / 4096) * 32</para>
1494 </listitem>
1495 </varlistentry>
1496 <varlistentry>
1497 <term>Transfer function:</term>
1498 <listitem>
1499 <para>L' = ((c1 + c2 * L<superscript>m1</superscript>) / (1 + c3 * L<superscript>m1</superscript>))<superscript>m2</superscript></para>
1500 </listitem>
1501 </varlistentry>
1502 </variablelist>
1503 <variablelist>
1504 <varlistentry>
1505 <term>Inverse Transfer function:</term>
1506 <listitem>
1507 <para>L = (max(L'<superscript>1/m2</superscript> - c1, 0) / (c2 - c3 * L'<superscript>1/m2</superscript>))<superscript>1/m1</superscript></para>
1508 </listitem>
1509 </varlistentry>
1510 </variablelist>
1511 </section>
1512 </section>
1513
1405 <section id="pixfmt-indexed"> 1514 <section id="pixfmt-indexed">
1406 <title>Indexed Format</title> 1515 <title>Indexed Format</title>
1407 1516
@@ -1623,7 +1732,7 @@ extended control <constant>V4L2_CID_MPEG_STREAM_TYPE</constant>, see
1623 <section id="sdr-formats"> 1732 <section id="sdr-formats">
1624 <title>SDR Formats</title> 1733 <title>SDR Formats</title>
1625 1734
1626 <para>These formats are used for <link linkend="sdr">SDR Capture</link> 1735 <para>These formats are used for <link linkend="sdr">SDR</link>
1627interface only.</para> 1736interface only.</para>
1628 1737
1629 &sub-sdr-cu08; 1738 &sub-sdr-cu08;
diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml
index e98caa1c39bd..7e61643358de 100644
--- a/Documentation/DocBook/media/v4l/v4l2.xml
+++ b/Documentation/DocBook/media/v4l/v4l2.xml
@@ -151,9 +151,18 @@ Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab,
151structs, ioctls) must be noted in more detail in the history chapter 151structs, ioctls) must be noted in more detail in the history chapter
152(compat.xml), along with the possible impact on existing drivers and 152(compat.xml), along with the possible impact on existing drivers and
153applications. --> 153applications. -->
154 <revision>
155 <revnumber>4.4</revnumber>
156 <date>2015-05-26</date>
157 <authorinitials>ap</authorinitials>
158 <revremark>Renamed V4L2_TUNER_ADC to V4L2_TUNER_SDR.
159Added V4L2_CID_RF_TUNER_RF_GAIN control.
160Added transmitter support for Software Defined Radio (SDR) Interface.
161 </revremark>
162 </revision>
154 163
155 <revision> 164 <revision>
156 <revnumber>3.21</revnumber> 165 <revnumber>4.1</revnumber>
157 <date>2015-02-13</date> 166 <date>2015-02-13</date>
158 <authorinitials>mcc</authorinitials> 167 <authorinitials>mcc</authorinitials>
159 <revremark>Fix documentation for media controller device nodes and add support for DVB device nodes. 168 <revremark>Fix documentation for media controller device nodes and add support for DVB device nodes.
@@ -557,7 +566,7 @@ and discussions on the V4L mailing list.</revremark>
557</partinfo> 566</partinfo>
558 567
559<title>Video for Linux Two API Specification</title> 568<title>Video for Linux Two API Specification</title>
560 <subtitle>Revision 3.19</subtitle> 569 <subtitle>Revision 4.4</subtitle>
561 570
562 <chapter id="common"> 571 <chapter id="common">
563 &sub-common; 572 &sub-common;
diff --git a/Documentation/DocBook/media/v4l/vidioc-encoder-cmd.xml b/Documentation/DocBook/media/v4l/vidioc-encoder-cmd.xml
index fc1d4625a78c..70a4a08e9404 100644
--- a/Documentation/DocBook/media/v4l/vidioc-encoder-cmd.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-encoder-cmd.xml
@@ -130,7 +130,7 @@ encoding will continue until the end of the current <wordasword>Group
130Of Pictures</wordasword>, otherwise encoding will stop immediately. 130Of Pictures</wordasword>, otherwise encoding will stop immediately.
131When the encoder is already stopped, this command does 131When the encoder is already stopped, this command does
132nothing. mem2mem encoders will send a <constant>V4L2_EVENT_EOS</constant> event 132nothing. mem2mem encoders will send a <constant>V4L2_EVENT_EOS</constant> event
133when the last frame has been decoded and all frames are ready to be dequeued and 133when the last frame has been encoded and all frames are ready to be dequeued and
134will set the <constant>V4L2_BUF_FLAG_LAST</constant> buffer flag on the last 134will set the <constant>V4L2_BUF_FLAG_LAST</constant> buffer flag on the last
135buffer of the capture queue to indicate there will be no new buffers produced to 135buffer of the capture queue to indicate there will be no new buffers produced to
136dequeue. This buffer may be empty, indicated by the driver setting the 136dequeue. This buffer may be empty, indicated by the driver setting the
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml b/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml
index c5bdbfcc42b3..842536aae8b4 100644
--- a/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml
@@ -200,6 +200,13 @@ Valid if this control is of type <constant>V4L2_CTRL_TYPE_U16</constant>.</entry
200 </row> 200 </row>
201 <row> 201 <row>
202 <entry></entry> 202 <entry></entry>
203 <entry>__u32 *</entry>
204 <entry><structfield>p_u32</structfield></entry>
205 <entry>A pointer to a matrix control of unsigned 32-bit values.
206Valid if this control is of type <constant>V4L2_CTRL_TYPE_U32</constant>.</entry>
207 </row>
208 <row>
209 <entry></entry>
203 <entry>void *</entry> 210 <entry>void *</entry>
204 <entry><structfield>ptr</structfield></entry> 211 <entry><structfield>ptr</structfield></entry>
205 <entry>A pointer to a compound type which can be an N-dimensional array and/or a 212 <entry>A pointer to a compound type which can be an N-dimensional array and/or a
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-fmt.xml b/Documentation/DocBook/media/v4l/vidioc-g-fmt.xml
index 4fe19a7a9a31..ffcb448251f0 100644
--- a/Documentation/DocBook/media/v4l/vidioc-g-fmt.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-g-fmt.xml
@@ -175,7 +175,7 @@ capture and output devices.</entry>
175 <entry>&v4l2-sdr-format;</entry> 175 <entry>&v4l2-sdr-format;</entry>
176 <entry><structfield>sdr</structfield></entry> 176 <entry><structfield>sdr</structfield></entry>
177 <entry>Definition of a data format, see 177 <entry>Definition of a data format, see
178<xref linkend="pixfmt" />, used by SDR capture devices.</entry> 178<xref linkend="pixfmt" />, used by SDR capture and output devices.</entry>
179 </row> 179 </row>
180 <row> 180 <row>
181 <entry></entry> 181 <entry></entry>
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-modulator.xml b/Documentation/DocBook/media/v4l/vidioc-g-modulator.xml
index 7068b599a00d..96e17b344c5d 100644
--- a/Documentation/DocBook/media/v4l/vidioc-g-modulator.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-g-modulator.xml
@@ -78,6 +78,12 @@ different audio modulation if the request cannot be satisfied. However
78this is a write-only ioctl, it does not return the actual audio 78this is a write-only ioctl, it does not return the actual audio
79modulation selected.</para> 79modulation selected.</para>
80 80
81 <para><link linkend="sdr">SDR</link> specific modulator types are
82<constant>V4L2_TUNER_SDR</constant> and <constant>V4L2_TUNER_RF</constant>.
83For SDR devices <structfield>txsubchans</structfield> field must be
84initialized to zero.
85The term 'modulator' means SDR transmitter in this context.</para>
86
81 <para>To change the radio frequency the &VIDIOC-S-FREQUENCY; ioctl 87 <para>To change the radio frequency the &VIDIOC-S-FREQUENCY; ioctl
82is available.</para> 88is available.</para>
83 89
@@ -140,7 +146,13 @@ indicator, for example a stereo pilot tone.</entry>
140 </row> 146 </row>
141 <row> 147 <row>
142 <entry>__u32</entry> 148 <entry>__u32</entry>
143 <entry><structfield>reserved</structfield>[4]</entry> 149 <entry><structfield>type</structfield></entry>
150 <entry spanname="hspan">Type of the modulator, see <xref
151 linkend="v4l2-tuner-type" />.</entry>
152 </row>
153 <row>
154 <entry>__u32</entry>
155 <entry><structfield>reserved</structfield>[3]</entry>
144 <entry>Reserved for future extensions. Drivers and 156 <entry>Reserved for future extensions. Drivers and
145applications must set the array to zero.</entry> 157applications must set the array to zero.</entry>
146 </row> 158 </row>
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml b/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml
index b0d865933da6..459b7e561f3c 100644
--- a/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml
@@ -80,6 +80,12 @@ if the requested mode is invalid or unsupported. Since this is a
80<!-- FIXME -->write-only ioctl, it does not return the actually 80<!-- FIXME -->write-only ioctl, it does not return the actually
81selected audio mode.</para> 81selected audio mode.</para>
82 82
83 <para><link linkend="sdr">SDR</link> specific tuner types are
84<constant>V4L2_TUNER_SDR</constant> and <constant>V4L2_TUNER_RF</constant>.
85For SDR devices <structfield>audmode</structfield> field must be
86initialized to zero.
87The term 'tuner' means SDR receiver in this context.</para>
88
83 <para>To change the radio frequency the &VIDIOC-S-FREQUENCY; ioctl 89 <para>To change the radio frequency the &VIDIOC-S-FREQUENCY; ioctl
84is available.</para> 90is available.</para>
85 91
@@ -261,6 +267,16 @@ applications must set the array to zero.</entry>
261 <entry>2</entry> 267 <entry>2</entry>
262 <entry></entry> 268 <entry></entry>
263 </row> 269 </row>
270 <row>
271 <entry><constant>V4L2_TUNER_SDR</constant></entry>
272 <entry>4</entry>
273 <entry></entry>
274 </row>
275 <row>
276 <entry><constant>V4L2_TUNER_RF</constant></entry>
277 <entry>5</entry>
278 <entry></entry>
279 </row>
264 </tbody> 280 </tbody>
265 </tgroup> 281 </tgroup>
266 </table> 282 </table>
diff --git a/Documentation/DocBook/media/v4l/vidioc-querycap.xml b/Documentation/DocBook/media/v4l/vidioc-querycap.xml
index 20fda75a012d..cd82148dedd7 100644
--- a/Documentation/DocBook/media/v4l/vidioc-querycap.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-querycap.xml
@@ -308,6 +308,12 @@ modulator programming see
308fields.</entry> 308fields.</entry>
309 </row> 309 </row>
310 <row> 310 <row>
311 <entry><constant>V4L2_CAP_SDR_OUTPUT</constant></entry>
312 <entry>0x00400000</entry>
313 <entry>The device supports the
314<link linkend="sdr">SDR Output</link> interface.</entry>
315 </row>
316 <row>
311 <entry><constant>V4L2_CAP_READWRITE</constant></entry> 317 <entry><constant>V4L2_CAP_READWRITE</constant></entry>
312 <entry>0x01000000</entry> 318 <entry>0x01000000</entry>
313 <entry>The device supports the <link 319 <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 6ec39c698baf..55b7582cf314 100644
--- a/Documentation/DocBook/media/v4l/vidioc-queryctrl.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-queryctrl.xml
@@ -101,8 +101,9 @@ prematurely end the enumeration).</para></footnote></para>
101next supported non-compound control, or <errorcode>EINVAL</errorcode> 101next supported non-compound control, or <errorcode>EINVAL</errorcode>
102if there is none. In addition, the <constant>V4L2_CTRL_FLAG_NEXT_COMPOUND</constant> 102if there is none. In addition, the <constant>V4L2_CTRL_FLAG_NEXT_COMPOUND</constant>
103flag can be specified to enumerate all compound controls (i.e. controls 103flag can be specified to enumerate all compound controls (i.e. controls
104with type &ge; <constant>V4L2_CTRL_COMPOUND_TYPES</constant>). Specify both 104with type &ge; <constant>V4L2_CTRL_COMPOUND_TYPES</constant> and/or array
105<constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant> and 105control, in other words controls that contain more than one value).
106Specify both <constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant> and
106<constant>V4L2_CTRL_FLAG_NEXT_COMPOUND</constant> in order to enumerate 107<constant>V4L2_CTRL_FLAG_NEXT_COMPOUND</constant> in order to enumerate
107all controls, compound or not. Drivers which do not support these flags yet 108all controls, compound or not. Drivers which do not support these flags yet
108always return <errorcode>EINVAL</errorcode>.</para> 109always return <errorcode>EINVAL</errorcode>.</para>
@@ -422,7 +423,7 @@ the array to zero.</entry>
422 <entry>any</entry> 423 <entry>any</entry>
423 <entry>An integer-valued control ranging from minimum to 424 <entry>An integer-valued control ranging from minimum to
424maximum inclusive. The step value indicates the increment between 425maximum inclusive. The step value indicates the increment between
425values which are actually different on the hardware.</entry> 426values.</entry>
426 </row> 427 </row>
427 <row> 428 <row>
428 <entry><constant>V4L2_CTRL_TYPE_BOOLEAN</constant></entry> 429 <entry><constant>V4L2_CTRL_TYPE_BOOLEAN</constant></entry>
@@ -518,7 +519,7 @@ Older drivers which do not support this feature return an
518 <entry>any</entry> 519 <entry>any</entry>
519 <entry>An unsigned 8-bit valued control ranging from minimum to 520 <entry>An unsigned 8-bit valued control ranging from minimum to
520maximum inclusive. The step value indicates the increment between 521maximum inclusive. The step value indicates the increment between
521values which are actually different on the hardware. 522values.
522</entry> 523</entry>
523 </row> 524 </row>
524 <row> 525 <row>
@@ -528,7 +529,17 @@ values which are actually different on the hardware.
528 <entry>any</entry> 529 <entry>any</entry>
529 <entry>An unsigned 16-bit valued control ranging from minimum to 530 <entry>An unsigned 16-bit valued control ranging from minimum to
530maximum inclusive. The step value indicates the increment between 531maximum inclusive. The step value indicates the increment between
531values which are actually different on the hardware. 532values.
533</entry>
534 </row>
535 <row>
536 <entry><constant>V4L2_CTRL_TYPE_U32</constant></entry>
537 <entry>any</entry>
538 <entry>any</entry>
539 <entry>any</entry>
540 <entry>An unsigned 32-bit valued control ranging from minimum to
541maximum inclusive. The step value indicates the increment between
542values.
532</entry> 543</entry>
533 </row> 544 </row>
534 </tbody> 545 </tbody>
diff --git a/Documentation/DocBook/media_api.tmpl b/Documentation/DocBook/media_api.tmpl
index f3f5fe5b64c9..92037033f5eb 100644
--- a/Documentation/DocBook/media_api.tmpl
+++ b/Documentation/DocBook/media_api.tmpl
@@ -38,7 +38,7 @@
38 <title>LINUX MEDIA INFRASTRUCTURE API</title> 38 <title>LINUX MEDIA INFRASTRUCTURE API</title>
39 39
40 <copyright> 40 <copyright>
41 <year>2009-2014</year> 41 <year>2009-2015</year>
42 <holder>LinuxTV Developers</holder> 42 <holder>LinuxTV Developers</holder>
43 </copyright> 43 </copyright>
44 44
diff --git a/Documentation/DocBook/writing-an-alsa-driver.tmpl b/Documentation/DocBook/writing-an-alsa-driver.tmpl
index 84ef6a90131c..a27ab9f53fb6 100644
--- a/Documentation/DocBook/writing-an-alsa-driver.tmpl
+++ b/Documentation/DocBook/writing-an-alsa-driver.tmpl
@@ -2181,10 +2181,6 @@ struct _snd_pcm_runtime {
2181 struct snd_pcm_hardware hw; 2181 struct snd_pcm_hardware hw;
2182 struct snd_pcm_hw_constraints hw_constraints; 2182 struct snd_pcm_hw_constraints hw_constraints;
2183 2183
2184 /* -- interrupt callbacks -- */
2185 void (*transfer_ack_begin)(struct snd_pcm_substream *substream);
2186 void (*transfer_ack_end)(struct snd_pcm_substream *substream);
2187
2188 /* -- timer -- */ 2184 /* -- timer -- */
2189 unsigned int timer_resolution; /* timer resolution */ 2185 unsigned int timer_resolution; /* timer resolution */
2190 2186
@@ -2209,9 +2205,8 @@ struct _snd_pcm_runtime {
2209 For the operators (callbacks) of each sound driver, most of 2205 For the operators (callbacks) of each sound driver, most of
2210 these records are supposed to be read-only. Only the PCM 2206 these records are supposed to be read-only. Only the PCM
2211 middle-layer changes / updates them. The exceptions are 2207 middle-layer changes / updates them. The exceptions are
2212 the hardware description (hw), interrupt callbacks 2208 the hardware description (hw) DMA buffer information and the
2213 (transfer_ack_xxx), DMA buffer information, and the private 2209 private data. Besides, if you use the standard buffer allocation
2214 data. Besides, if you use the standard buffer allocation
2215 method via <function>snd_pcm_lib_malloc_pages()</function>, 2210 method via <function>snd_pcm_lib_malloc_pages()</function>,
2216 you don't need to set the DMA buffer information by yourself. 2211 you don't need to set the DMA buffer information by yourself.
2217 </para> 2212 </para>
@@ -2538,16 +2533,6 @@ struct _snd_pcm_runtime {
2538 </para> 2533 </para>
2539 </section> 2534 </section>
2540 2535
2541 <section id="pcm-interface-runtime-intr">
2542 <title>Interrupt Callbacks</title>
2543 <para>
2544 The field <structfield>transfer_ack_begin</structfield> and
2545 <structfield>transfer_ack_end</structfield> are called at
2546 the beginning and at the end of
2547 <function>snd_pcm_period_elapsed()</function>, respectively.
2548 </para>
2549 </section>
2550
2551 </section> 2536 </section>
2552 2537
2553 <section id="pcm-interface-operators"> 2538 <section id="pcm-interface-operators">
diff --git a/Documentation/IRQ-domain.txt b/Documentation/IRQ-domain.txt
index 3a8e15cba816..8d990bde8693 100644
--- a/Documentation/IRQ-domain.txt
+++ b/Documentation/IRQ-domain.txt
@@ -32,9 +32,9 @@ top of the irq_alloc_desc*() API. An irq_domain to manage mapping is
32preferred over interrupt controller drivers open coding their own 32preferred over interrupt controller drivers open coding their own
33reverse mapping scheme. 33reverse mapping scheme.
34 34
35irq_domain also implements translation from Device Tree interrupt 35irq_domain also implements translation from an abstract irq_fwspec
36specifiers to hwirq numbers, and can be easily extended to support 36structure to hwirq numbers (Device Tree and ACPI GSI so far), and can
37other IRQ topology data sources. 37be easily extended to support other IRQ topology data sources.
38 38
39=== irq_domain usage === 39=== irq_domain usage ===
40An interrupt controller driver creates and registers an irq_domain by 40An interrupt controller driver creates and registers an irq_domain by
@@ -184,7 +184,7 @@ There are four major interfaces to use hierarchy irq_domain:
184 related resources associated with these interrupts. 184 related resources associated with these interrupts.
1853) irq_domain_activate_irq(): activate interrupt controller hardware to 1853) irq_domain_activate_irq(): activate interrupt controller hardware to
186 deliver the interrupt. 186 deliver the interrupt.
1873) irq_domain_deactivate_irq(): deactivate interrupt controller hardware 1874) irq_domain_deactivate_irq(): deactivate interrupt controller hardware
188 to stop delivering the interrupt. 188 to stop delivering the interrupt.
189 189
190Following changes are needed to support hierarchy irq_domain. 190Following changes are needed to support hierarchy irq_domain.
diff --git a/Documentation/RCU/stallwarn.txt b/Documentation/RCU/stallwarn.txt
index efb9454875ab..0f7fb4298e7e 100644
--- a/Documentation/RCU/stallwarn.txt
+++ b/Documentation/RCU/stallwarn.txt
@@ -205,6 +205,13 @@ o For !CONFIG_PREEMPT kernels, a CPU looping anywhere in the
205 behavior, you might need to replace some of the cond_resched() 205 behavior, you might need to replace some of the cond_resched()
206 calls with calls to cond_resched_rcu_qs(). 206 calls with calls to cond_resched_rcu_qs().
207 207
208o Booting Linux using a console connection that is too slow to
209 keep up with the boot-time console-message rate. For example,
210 a 115Kbaud serial console can be -way- too slow to keep up
211 with boot-time message rates, and will frequently result in
212 RCU CPU stall warning messages. Especially if you have added
213 debug printk()s.
214
208o Anything that prevents RCU's grace-period kthreads from running. 215o Anything that prevents RCU's grace-period kthreads from running.
209 This can result in the "All QSes seen" console-log message. 216 This can result in the "All QSes seen" console-log message.
210 This message will include information on when the kthread last 217 This message will include information on when the kthread last
diff --git a/Documentation/RCU/torture.txt b/Documentation/RCU/torture.txt
index dac02a6219b1..118e7c176ce7 100644
--- a/Documentation/RCU/torture.txt
+++ b/Documentation/RCU/torture.txt
@@ -166,40 +166,27 @@ test_no_idle_hz Whether or not to test the ability of RCU to operate in
166 166
167torture_type The type of RCU to test, with string values as follows: 167torture_type The type of RCU to test, with string values as follows:
168 168
169 "rcu": rcu_read_lock(), rcu_read_unlock() and call_rcu(). 169 "rcu": rcu_read_lock(), rcu_read_unlock() and call_rcu(),
170 170 along with expedited, synchronous, and polling
171 "rcu_sync": rcu_read_lock(), rcu_read_unlock(), and 171 variants.
172 synchronize_rcu().
173
174 "rcu_expedited": rcu_read_lock(), rcu_read_unlock(), and
175 synchronize_rcu_expedited().
176 172
177 "rcu_bh": rcu_read_lock_bh(), rcu_read_unlock_bh(), and 173 "rcu_bh": rcu_read_lock_bh(), rcu_read_unlock_bh(), and
178 call_rcu_bh(). 174 call_rcu_bh(), along with expedited and synchronous
179 175 variants.
180 "rcu_bh_sync": rcu_read_lock_bh(), rcu_read_unlock_bh(),
181 and synchronize_rcu_bh().
182 176
183 "rcu_bh_expedited": rcu_read_lock_bh(), rcu_read_unlock_bh(), 177 "rcu_busted": This tests an intentionally incorrect version
184 and synchronize_rcu_bh_expedited(). 178 of RCU in order to help test rcutorture itself.
185 179
186 "srcu": srcu_read_lock(), srcu_read_unlock() and 180 "srcu": srcu_read_lock(), srcu_read_unlock() and
187 call_srcu(). 181 call_srcu(), along with expedited and
188 182 synchronous variants.
189 "srcu_sync": srcu_read_lock(), srcu_read_unlock() and
190 synchronize_srcu().
191
192 "srcu_expedited": srcu_read_lock(), srcu_read_unlock() and
193 synchronize_srcu_expedited().
194 183
195 "sched": preempt_disable(), preempt_enable(), and 184 "sched": preempt_disable(), preempt_enable(), and
196 call_rcu_sched(). 185 call_rcu_sched(), along with expedited,
197 186 synchronous, and polling variants.
198 "sched_sync": preempt_disable(), preempt_enable(), and
199 synchronize_sched().
200 187
201 "sched_expedited": preempt_disable(), preempt_enable(), and 188 "tasks": voluntary context switch and call_rcu_tasks(),
202 synchronize_sched_expedited(). 189 along with expedited and synchronous variants.
203 190
204 Defaults to "rcu". 191 Defaults to "rcu".
205 192
diff --git a/Documentation/RCU/trace.txt b/Documentation/RCU/trace.txt
index 97f17e9decda..ec6998b1b6d0 100644
--- a/Documentation/RCU/trace.txt
+++ b/Documentation/RCU/trace.txt
@@ -56,14 +56,14 @@ rcuboost:
56 56
57The output of "cat rcu/rcu_preempt/rcudata" looks as follows: 57The output of "cat rcu/rcu_preempt/rcudata" looks as follows:
58 58
59 0!c=30455 g=30456 pq=1/0 qp=1 dt=126535/140000000000000/0 df=2002 of=4 ql=0/0 qs=N... b=10 ci=74572 nci=0 co=1131 ca=716 59 0!c=30455 g=30456 cnq=1/0:1 dt=126535/140000000000000/0 df=2002 of=4 ql=0/0 qs=N... b=10 ci=74572 nci=0 co=1131 ca=716
60 1!c=30719 g=30720 pq=1/0 qp=0 dt=132007/140000000000000/0 df=1874 of=10 ql=0/0 qs=N... b=10 ci=123209 nci=0 co=685 ca=982 60 1!c=30719 g=30720 cnq=1/0:0 dt=132007/140000000000000/0 df=1874 of=10 ql=0/0 qs=N... b=10 ci=123209 nci=0 co=685 ca=982
61 2!c=30150 g=30151 pq=1/1 qp=1 dt=138537/140000000000000/0 df=1707 of=8 ql=0/0 qs=N... b=10 ci=80132 nci=0 co=1328 ca=1458 61 2!c=30150 g=30151 cnq=1/1:1 dt=138537/140000000000000/0 df=1707 of=8 ql=0/0 qs=N... b=10 ci=80132 nci=0 co=1328 ca=1458
62 3 c=31249 g=31250 pq=1/1 qp=0 dt=107255/140000000000000/0 df=1749 of=6 ql=0/450 qs=NRW. b=10 ci=151700 nci=0 co=509 ca=622 62 3 c=31249 g=31250 cnq=1/1:0 dt=107255/140000000000000/0 df=1749 of=6 ql=0/450 qs=NRW. b=10 ci=151700 nci=0 co=509 ca=622
63 4!c=29502 g=29503 pq=1/0 qp=1 dt=83647/140000000000000/0 df=965 of=5 ql=0/0 qs=N... b=10 ci=65643 nci=0 co=1373 ca=1521 63 4!c=29502 g=29503 cnq=1/0:1 dt=83647/140000000000000/0 df=965 of=5 ql=0/0 qs=N... b=10 ci=65643 nci=0 co=1373 ca=1521
64 5 c=31201 g=31202 pq=1/0 qp=1 dt=70422/0/0 df=535 of=7 ql=0/0 qs=.... b=10 ci=58500 nci=0 co=764 ca=698 64 5 c=31201 g=31202 cnq=1/0:1 dt=70422/0/0 df=535 of=7 ql=0/0 qs=.... b=10 ci=58500 nci=0 co=764 ca=698
65 6!c=30253 g=30254 pq=1/0 qp=1 dt=95363/140000000000000/0 df=780 of=5 ql=0/0 qs=N... b=10 ci=100607 nci=0 co=1414 ca=1353 65 6!c=30253 g=30254 cnq=1/0:1 dt=95363/140000000000000/0 df=780 of=5 ql=0/0 qs=N... b=10 ci=100607 nci=0 co=1414 ca=1353
66 7 c=31178 g=31178 pq=1/0 qp=0 dt=91536/0/0 df=547 of=4 ql=0/0 qs=.... b=10 ci=109819 nci=0 co=1115 ca=969 66 7 c=31178 g=31178 cnq=1/0:0 dt=91536/0/0 df=547 of=4 ql=0/0 qs=.... b=10 ci=109819 nci=0 co=1115 ca=969
67 67
68This file has one line per CPU, or eight for this 8-CPU system. 68This file has one line per CPU, or eight for this 8-CPU system.
69The fields are as follows: 69The fields are as follows:
@@ -188,14 +188,14 @@ o "ca" is the number of RCU callbacks that have been adopted by this
188Kernels compiled with CONFIG_RCU_BOOST=y display the following from 188Kernels compiled with CONFIG_RCU_BOOST=y display the following from
189/debug/rcu/rcu_preempt/rcudata: 189/debug/rcu/rcu_preempt/rcudata:
190 190
191 0!c=12865 g=12866 pq=1/0 qp=1 dt=83113/140000000000000/0 df=288 of=11 ql=0/0 qs=N... kt=0/O ktl=944 b=10 ci=60709 nci=0 co=748 ca=871 191 0!c=12865 g=12866 cnq=1/0:1 dt=83113/140000000000000/0 df=288 of=11 ql=0/0 qs=N... kt=0/O ktl=944 b=10 ci=60709 nci=0 co=748 ca=871
192 1 c=14407 g=14408 pq=1/0 qp=0 dt=100679/140000000000000/0 df=378 of=7 ql=0/119 qs=NRW. kt=0/W ktl=9b6 b=10 ci=109740 nci=0 co=589 ca=485 192 1 c=14407 g=14408 cnq=1/0:0 dt=100679/140000000000000/0 df=378 of=7 ql=0/119 qs=NRW. kt=0/W ktl=9b6 b=10 ci=109740 nci=0 co=589 ca=485
193 2 c=14407 g=14408 pq=1/0 qp=0 dt=105486/0/0 df=90 of=9 ql=0/89 qs=NRW. kt=0/W ktl=c0c b=10 ci=83113 nci=0 co=533 ca=490 193 2 c=14407 g=14408 cnq=1/0:0 dt=105486/0/0 df=90 of=9 ql=0/89 qs=NRW. kt=0/W ktl=c0c b=10 ci=83113 nci=0 co=533 ca=490
194 3 c=14407 g=14408 pq=1/0 qp=0 dt=107138/0/0 df=142 of=8 ql=0/188 qs=NRW. kt=0/W ktl=b96 b=10 ci=121114 nci=0 co=426 ca=290 194 3 c=14407 g=14408 cnq=1/0:0 dt=107138/0/0 df=142 of=8 ql=0/188 qs=NRW. kt=0/W ktl=b96 b=10 ci=121114 nci=0 co=426 ca=290
195 4 c=14405 g=14406 pq=1/0 qp=1 dt=50238/0/0 df=706 of=7 ql=0/0 qs=.... kt=0/W ktl=812 b=10 ci=34929 nci=0 co=643 ca=114 195 4 c=14405 g=14406 cnq=1/0:1 dt=50238/0/0 df=706 of=7 ql=0/0 qs=.... kt=0/W ktl=812 b=10 ci=34929 nci=0 co=643 ca=114
196 5!c=14168 g=14169 pq=1/0 qp=0 dt=45465/140000000000000/0 df=161 of=11 ql=0/0 qs=N... kt=0/O ktl=b4d b=10 ci=47712 nci=0 co=677 ca=722 196 5!c=14168 g=14169 cnq=1/0:0 dt=45465/140000000000000/0 df=161 of=11 ql=0/0 qs=N... kt=0/O ktl=b4d b=10 ci=47712 nci=0 co=677 ca=722
197 6 c=14404 g=14405 pq=1/0 qp=0 dt=59454/0/0 df=94 of=6 ql=0/0 qs=.... kt=0/W ktl=e57 b=10 ci=55597 nci=0 co=701 ca=811 197 6 c=14404 g=14405 cnq=1/0:0 dt=59454/0/0 df=94 of=6 ql=0/0 qs=.... kt=0/W ktl=e57 b=10 ci=55597 nci=0 co=701 ca=811
198 7 c=14407 g=14408 pq=1/0 qp=1 dt=68850/0/0 df=31 of=8 ql=0/0 qs=.... kt=0/W ktl=14bd b=10 ci=77475 nci=0 co=508 ca=1042 198 7 c=14407 g=14408 cnq=1/0:1 dt=68850/0/0 df=31 of=8 ql=0/0 qs=.... kt=0/W ktl=14bd b=10 ci=77475 nci=0 co=508 ca=1042
199 199
200This is similar to the output discussed above, but contains the following 200This is similar to the output discussed above, but contains the following
201additional fields: 201additional fields:
diff --git a/Documentation/RCU/whatisRCU.txt b/Documentation/RCU/whatisRCU.txt
index adc2184009c5..dc49c6712b17 100644
--- a/Documentation/RCU/whatisRCU.txt
+++ b/Documentation/RCU/whatisRCU.txt
@@ -364,7 +364,7 @@ uses of RCU may be found in listRCU.txt, arrayRCU.txt, and NMI-RCU.txt.
364 }; 364 };
365 DEFINE_SPINLOCK(foo_mutex); 365 DEFINE_SPINLOCK(foo_mutex);
366 366
367 struct foo *gbl_foo; 367 struct foo __rcu *gbl_foo;
368 368
369 /* 369 /*
370 * Create a new struct foo that is the same as the one currently 370 * Create a new struct foo that is the same as the one currently
@@ -386,7 +386,7 @@ uses of RCU may be found in listRCU.txt, arrayRCU.txt, and NMI-RCU.txt.
386 386
387 new_fp = kmalloc(sizeof(*new_fp), GFP_KERNEL); 387 new_fp = kmalloc(sizeof(*new_fp), GFP_KERNEL);
388 spin_lock(&foo_mutex); 388 spin_lock(&foo_mutex);
389 old_fp = gbl_foo; 389 old_fp = rcu_dereference_protected(gbl_foo, lockdep_is_held(&foo_mutex));
390 *new_fp = *old_fp; 390 *new_fp = *old_fp;
391 new_fp->a = new_a; 391 new_fp->a = new_a;
392 rcu_assign_pointer(gbl_foo, new_fp); 392 rcu_assign_pointer(gbl_foo, new_fp);
@@ -487,7 +487,7 @@ The foo_update_a() function might then be written as follows:
487 487
488 new_fp = kmalloc(sizeof(*new_fp), GFP_KERNEL); 488 new_fp = kmalloc(sizeof(*new_fp), GFP_KERNEL);
489 spin_lock(&foo_mutex); 489 spin_lock(&foo_mutex);
490 old_fp = gbl_foo; 490 old_fp = rcu_dereference_protected(gbl_foo, lockdep_is_held(&foo_mutex));
491 *new_fp = *old_fp; 491 *new_fp = *old_fp;
492 new_fp->a = new_a; 492 new_fp->a = new_a;
493 rcu_assign_pointer(gbl_foo, new_fp); 493 rcu_assign_pointer(gbl_foo, new_fp);
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index fd89b04d34f0..4710e4afef19 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -659,8 +659,8 @@ succinct and descriptive, but that is what a well-written summary
659should do. 659should do.
660 660
661The "summary phrase" may be prefixed by tags enclosed in square 661The "summary phrase" may be prefixed by tags enclosed in square
662brackets: "Subject: [PATCH tag] <summary phrase>". The tags are not 662brackets: "Subject: [PATCH <tag>...] <summary phrase>". The tags are
663considered part of the summary phrase, but describe how the patch 663not considered part of the summary phrase, but describe how the patch
664should be treated. Common tags might include a version descriptor if 664should be treated. Common tags might include a version descriptor if
665the multiple versions of the patch have been sent out in response to 665the multiple versions of the patch have been sent out in response to
666comments (i.e., "v1, v2, v3"), or "RFC" to indicate a request for 666comments (i.e., "v1, v2, v3"), or "RFC" to indicate a request for
@@ -672,8 +672,8 @@ the patch series.
672 672
673A couple of example Subjects: 673A couple of example Subjects:
674 674
675 Subject: [patch 2/5] ext2: improve scalability of bitmap searching 675 Subject: [PATCH 2/5] ext2: improve scalability of bitmap searching
676 Subject: [PATCHv2 001/207] x86: fix eflags tracking 676 Subject: [PATCH v2 01/27] x86: fix eflags tracking
677 677
678The "from" line must be the very first line in the message body, 678The "from" line must be the very first line in the message body,
679and has the form: 679and has the form:
diff --git a/Documentation/acpi/enumeration.txt b/Documentation/acpi/enumeration.txt
index b731b292e812..a91ec5af52df 100644
--- a/Documentation/acpi/enumeration.txt
+++ b/Documentation/acpi/enumeration.txt
@@ -347,13 +347,18 @@ For the first case, the MFD drivers do not need to do anything. The
347resulting child platform device will have its ACPI_COMPANION() set to point 347resulting child platform device will have its ACPI_COMPANION() set to point
348to the parent device. 348to the parent device.
349 349
350If the ACPI namespace has a device that we can match using an ACPI id, 350If the ACPI namespace has a device that we can match using an ACPI id or ACPI
351the id should be set like: 351adr, the cell should be set like:
352
353 static struct mfd_cell_acpi_match my_subdevice_cell_acpi_match = {
354 .pnpid = "XYZ0001",
355 .adr = 0,
356 };
352 357
353 static struct mfd_cell my_subdevice_cell = { 358 static struct mfd_cell my_subdevice_cell = {
354 .name = "my_subdevice", 359 .name = "my_subdevice",
355 /* set the resources relative to the parent */ 360 /* set the resources relative to the parent */
356 .acpi_pnpid = "XYZ0001", 361 .acpi_match = &my_subdevice_cell_acpi_match,
357 }; 362 };
358 363
359The ACPI id "XYZ0001" is then used to lookup an ACPI device directly under 364The ACPI id "XYZ0001" is then used to lookup an ACPI device directly under
diff --git a/Documentation/acpi/i2c-muxes.txt b/Documentation/acpi/i2c-muxes.txt
new file mode 100644
index 000000000000..9fcc4f0b885e
--- /dev/null
+++ b/Documentation/acpi/i2c-muxes.txt
@@ -0,0 +1,58 @@
1ACPI I2C Muxes
2--------------
3
4Describing an I2C device hierarchy that includes I2C muxes requires an ACPI
5Device () scope per mux channel.
6
7Consider this topology:
8
9+------+ +------+
10| SMB1 |-->| MUX0 |--CH00--> i2c client A (0x50)
11| | | 0x70 |--CH01--> i2c client B (0x50)
12+------+ +------+
13
14which corresponds to the following ASL:
15
16Device (SMB1)
17{
18 Name (_HID, ...)
19 Device (MUX0)
20 {
21 Name (_HID, ...)
22 Name (_CRS, ResourceTemplate () {
23 I2cSerialBus (0x70, ControllerInitiated, I2C_SPEED,
24 AddressingMode7Bit, "^SMB1", 0x00,
25 ResourceConsumer,,)
26 }
27
28 Device (CH00)
29 {
30 Name (_ADR, 0)
31
32 Device (CLIA)
33 {
34 Name (_HID, ...)
35 Name (_CRS, ResourceTemplate () {
36 I2cSerialBus (0x50, ControllerInitiated, I2C_SPEED,
37 AddressingMode7Bit, "^CH00", 0x00,
38 ResourceConsumer,,)
39 }
40 }
41 }
42
43 Device (CH01)
44 {
45 Name (_ADR, 1)
46
47 Device (CLIB)
48 {
49 Name (_HID, ...)
50 Name (_CRS, ResourceTemplate () {
51 I2cSerialBus (0x50, ControllerInitiated, I2C_SPEED,
52 AddressingMode7Bit, "^CH01", 0x00,
53 ResourceConsumer,,)
54 }
55 }
56 }
57 }
58}
diff --git a/Documentation/arm/OMAP/README b/Documentation/arm/OMAP/README
new file mode 100644
index 000000000000..75645c45d14a
--- /dev/null
+++ b/Documentation/arm/OMAP/README
@@ -0,0 +1,7 @@
1This file contains documentation for running mainline
2kernel on omaps.
3
4KERNEL NEW DEPENDENCIES
5v4.3+ Update is needed for custom .config files to make sure
6 CONFIG_REGULATOR_PBIAS is enabled for MMC1 to work
7 properly.
diff --git a/Documentation/arm/SA1100/Victor b/Documentation/arm/SA1100/Victor
deleted file mode 100644
index 9cff415da5a7..000000000000
--- a/Documentation/arm/SA1100/Victor
+++ /dev/null
@@ -1,16 +0,0 @@
1Victor is known as a "digital talking book player" manufactured by
2VisuAide, Inc. to be used by blind people.
3
4For more information related to Victor, see:
5
6 http://www.humanware.com/en-usa/products
7
8Of course Victor is using Linux as its main operating system.
9The Victor implementation for Linux is maintained by Nicolas Pitre:
10
11 nico@visuaide.com
12 nico@fluxnic.net
13
14For any comments, please feel free to contact me through the above
15addresses.
16
diff --git a/Documentation/arm/Samsung/Bootloader-interface.txt b/Documentation/arm/Samsung/Bootloader-interface.txt
index df8d4fb85939..ed494ac0beb2 100644
--- a/Documentation/arm/Samsung/Bootloader-interface.txt
+++ b/Documentation/arm/Samsung/Bootloader-interface.txt
@@ -19,7 +19,7 @@ executing kernel.
19Address: sysram_ns_base_addr 19Address: sysram_ns_base_addr
20Offset Value Purpose 20Offset Value Purpose
21============================================================================= 21=============================================================================
220x08 exynos_cpu_resume_ns System suspend 220x08 exynos_cpu_resume_ns, mcpm_entry_point System suspend
230x0c 0x00000bad (Magic cookie) System suspend 230x0c 0x00000bad (Magic cookie) System suspend
240x1c exynos4_secondary_startup Secondary CPU boot 240x1c exynos4_secondary_startup Secondary CPU boot
250x1c + 4*cpu exynos4_secondary_startup (Exynos4412) Secondary CPU boot 250x1c + 4*cpu exynos4_secondary_startup (Exynos4412) Secondary CPU boot
@@ -56,7 +56,8 @@ Offset Value Purpose
56Address: pmu_base_addr 56Address: pmu_base_addr
57Offset Value Purpose 57Offset Value Purpose
58============================================================================= 58=============================================================================
590x0908 Non-zero (only Exynos3250) Secondary CPU boot up indicator 590x0908 Non-zero Secondary CPU boot up indicator
60 on Exynos3250 and Exynos542x
60 61
61 62
624. Glossary 634. Glossary
diff --git a/Documentation/arm/keystone/knav-qmss.txt b/Documentation/arm/keystone/knav-qmss.txt
new file mode 100644
index 000000000000..fcdb9fd5f53a
--- /dev/null
+++ b/Documentation/arm/keystone/knav-qmss.txt
@@ -0,0 +1,56 @@
1* Texas Instruments Keystone Navigator Queue Management SubSystem driver
2
3Driver source code path
4 drivers/soc/ti/knav_qmss.c
5 drivers/soc/ti/knav_qmss_acc.c
6
7The QMSS (Queue Manager Sub System) found on Keystone SOCs is one of
8the main hardware sub system which forms the backbone of the Keystone
9multi-core Navigator. QMSS consist of queue managers, packed-data structure
10processors(PDSP), linking RAM, descriptor pools and infrastructure
11Packet DMA.
12The Queue Manager is a hardware module that is responsible for accelerating
13management of the packet queues. Packets are queued/de-queued by writing or
14reading descriptor address to a particular memory mapped location. The PDSPs
15perform QMSS related functions like accumulation, QoS, or event management.
16Linking RAM registers are used to link the descriptors which are stored in
17descriptor RAM. Descriptor RAM is configurable as internal or external memory.
18The QMSS driver manages the PDSP setups, linking RAM regions,
19queue pool management (allocation, push, pop and notify) and descriptor
20pool management.
21
22knav qmss driver provides a set of APIs to drivers to open/close qmss queues,
23allocate descriptor pools, map the descriptors, push/pop to queues etc. For
24details of the available APIs, please refers to include/linux/soc/ti/knav_qmss.h
25
26DT documentation is available at
27Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt
28
29Accumulator QMSS queues using PDSP firmware
30============================================
31The QMSS PDSP firmware support accumulator channel that can monitor a single
32queue or multiple contiguous queues. drivers/soc/ti/knav_qmss_acc.c is the
33driver that interface with the accumulator PDSP. This configures
34accumulator channels defined in DTS (example in DT documentation) to monitor
351 or 32 queues per channel. More description on the firmware is available in
36CPPI/QMSS Low Level Driver document (docs/CPPI_QMSS_LLD_SDS.pdf) at
37 git://git.ti.com/keystone-rtos/qmss-lld.git
38
39k2_qmss_pdsp_acc48_k2_le_1_0_0_9.bin firmware supports upto 48 accumulator
40channels. This firmware is available under ti-keystone folder of
41firmware.git at
42 git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
43
44To use copy the firmware image to lib/firmware folder of the initramfs or
45ubifs file system and provide a sym link to k2_qmss_pdsp_acc48_k2_le_1_0_0_9.bin
46in the file system and boot up the kernel. User would see
47
48 "firmware file ks2_qmss_pdsp_acc48.bin downloaded for PDSP"
49
50in the boot up log if loading of firmware to PDSP is successful.
51
52Use of accumulated queues requires the firmware image to be present in the
53file system. The driver doesn't acc queues to the supported queue range if
54PDSP is not running in the SoC. The API call fails if there is a queue open
55request to an acc queue and PDSP is not running. So make sure to copy firmware
56to file system before using these queue types.
diff --git a/Documentation/arm/memory.txt b/Documentation/arm/memory.txt
index 4178ebda6e66..546a39048eb0 100644
--- a/Documentation/arm/memory.txt
+++ b/Documentation/arm/memory.txt
@@ -54,7 +54,7 @@ VMALLOC_START VMALLOC_END-1 vmalloc() / ioremap() space.
54 located here through iotable_init(). 54 located here through iotable_init().
55 VMALLOC_START is based upon the value 55 VMALLOC_START is based upon the value
56 of the high_memory variable, and VMALLOC_END 56 of the high_memory variable, and VMALLOC_END
57 is equal to 0xff000000. 57 is equal to 0xff800000.
58 58
59PAGE_OFFSET high_memory-1 Kernel direct-mapped RAM region. 59PAGE_OFFSET high_memory-1 Kernel direct-mapped RAM region.
60 This maps the platforms RAM, and typically 60 This maps the platforms RAM, and typically
diff --git a/Documentation/arm/sunxi/README b/Documentation/arm/sunxi/README
index 5e38e1582f95..430d279a8df3 100644
--- a/Documentation/arm/sunxi/README
+++ b/Documentation/arm/sunxi/README
@@ -25,7 +25,7 @@ SunXi family
25 + Datasheet 25 + Datasheet
26 http://dl.linux-sunxi.org/A10s/A10s%20Datasheet%20-%20v1.20%20%282012-03-27%29.pdf 26 http://dl.linux-sunxi.org/A10s/A10s%20Datasheet%20-%20v1.20%20%282012-03-27%29.pdf
27 27
28 - Allwinner A13 (sun5i) 28 - Allwinner A13 / R8 (sun5i)
29 + Datasheet 29 + Datasheet
30 http://dl.linux-sunxi.org/A13/A13%20Datasheet%20-%20v1.12%20%282012-03-29%29.pdf 30 http://dl.linux-sunxi.org/A13/A13%20Datasheet%20-%20v1.12%20%282012-03-29%29.pdf
31 + User Manual 31 + User Manual
diff --git a/Documentation/arm/uefi.txt b/Documentation/arm/uefi.txt
index d60030a1b909..6543a0adea8a 100644
--- a/Documentation/arm/uefi.txt
+++ b/Documentation/arm/uefi.txt
@@ -58,7 +58,3 @@ linux,uefi-mmap-desc-size | 32-bit | Size in bytes of each entry in the UEFI
58-------------------------------------------------------------------------------- 58--------------------------------------------------------------------------------
59linux,uefi-mmap-desc-ver | 32-bit | Version of the mmap descriptor format. 59linux,uefi-mmap-desc-ver | 32-bit | Version of the mmap descriptor format.
60-------------------------------------------------------------------------------- 60--------------------------------------------------------------------------------
61linux,uefi-stub-kern-ver | string | Copy of linux_banner from build.
62--------------------------------------------------------------------------------
63
64For verbose debug messages, specify 'uefi_debug' on the kernel command line.
diff --git a/Documentation/arm64/booting.txt b/Documentation/arm64/booting.txt
index 7d9d3c2286b2..701d39d3171a 100644
--- a/Documentation/arm64/booting.txt
+++ b/Documentation/arm64/booting.txt
@@ -104,7 +104,12 @@ Header notes:
104- The flags field (introduced in v3.17) is a little-endian 64-bit field 104- The flags field (introduced in v3.17) is a little-endian 64-bit field
105 composed as follows: 105 composed as follows:
106 Bit 0: Kernel endianness. 1 if BE, 0 if LE. 106 Bit 0: Kernel endianness. 1 if BE, 0 if LE.
107 Bits 1-63: Reserved. 107 Bit 1-2: Kernel Page size.
108 0 - Unspecified.
109 1 - 4K
110 2 - 16K
111 3 - 64K
112 Bits 3-63: Reserved.
108 113
109- When image_size is zero, a bootloader should attempt to keep as much 114- When image_size is zero, a bootloader should attempt to keep as much
110 memory as possible free for use by the kernel immediately after the 115 memory as possible free for use by the kernel immediately after the
@@ -173,13 +178,22 @@ Before jumping into the kernel, the following conditions must be met:
173 the kernel image will be entered must be initialised by software at a 178 the kernel image will be entered must be initialised by software at a
174 higher exception level to prevent execution in an UNKNOWN state. 179 higher exception level to prevent execution in an UNKNOWN state.
175 180
176 For systems with a GICv3 interrupt controller: 181 For systems with a GICv3 interrupt controller to be used in v3 mode:
177 - If EL3 is present: 182 - If EL3 is present:
178 ICC_SRE_EL3.Enable (bit 3) must be initialiased to 0b1. 183 ICC_SRE_EL3.Enable (bit 3) must be initialiased to 0b1.
179 ICC_SRE_EL3.SRE (bit 0) must be initialised to 0b1. 184 ICC_SRE_EL3.SRE (bit 0) must be initialised to 0b1.
180 - If the kernel is entered at EL1: 185 - If the kernel is entered at EL1:
181 ICC.SRE_EL2.Enable (bit 3) must be initialised to 0b1 186 ICC.SRE_EL2.Enable (bit 3) must be initialised to 0b1
182 ICC_SRE_EL2.SRE (bit 0) must be initialised to 0b1. 187 ICC_SRE_EL2.SRE (bit 0) must be initialised to 0b1.
188 - The DT or ACPI tables must describe a GICv3 interrupt controller.
189
190 For systems with a GICv3 interrupt controller to be used in
191 compatibility (v2) mode:
192 - If EL3 is present:
193 ICC_SRE_EL3.SRE (bit 0) must be initialised to 0b0.
194 - If the kernel is entered at EL1:
195 ICC_SRE_EL2.SRE (bit 0) must be initialised to 0b0.
196 - The DT or ACPI tables must describe a GICv2 interrupt controller.
183 197
184The requirements described above for CPU mode, caches, MMUs, architected 198The requirements described above for CPU mode, caches, MMUs, architected
185timers, coherency and system registers apply to all CPUs. All CPUs must 199timers, coherency and system registers apply to all CPUs. All CPUs must
diff --git a/Documentation/atomic_ops.txt b/Documentation/atomic_ops.txt
index b19fc34efdb1..c9d1cacb4395 100644
--- a/Documentation/atomic_ops.txt
+++ b/Documentation/atomic_ops.txt
@@ -542,6 +542,10 @@ The routines xchg() and cmpxchg() must provide the same exact
542memory-barrier semantics as the atomic and bit operations returning 542memory-barrier semantics as the atomic and bit operations returning
543values. 543values.
544 544
545Note: If someone wants to use xchg(), cmpxchg() and their variants,
546linux/atomic.h should be included rather than asm/cmpxchg.h, unless
547the code is in arch/* and can take care of itself.
548
545Spinlocks and rwlocks have memory barrier expectations as well. 549Spinlocks and rwlocks have memory barrier expectations as well.
546The rule to follow is simple: 550The rule to follow is simple:
547 551
diff --git a/Documentation/block/pr.txt b/Documentation/block/pr.txt
new file mode 100644
index 000000000000..d3eb1ca65051
--- /dev/null
+++ b/Documentation/block/pr.txt
@@ -0,0 +1,119 @@
1
2Block layer support for Persistent Reservations
3===============================================
4
5The Linux kernel supports a user space interface for simplified
6Persistent Reservations which map to block devices that support
7these (like SCSI). Persistent Reservations allow restricting
8access to block devices to specific initiators in a shared storage
9setup.
10
11This document gives a general overview of the support ioctl commands.
12For a more detailed reference please refer the the SCSI Primary
13Commands standard, specifically the section on Reservations and the
14"PERSISTENT RESERVE IN" and "PERSISTENT RESERVE OUT" commands.
15
16All implementations are expected to ensure the reservations survive
17a power loss and cover all connections in a multi path environment.
18These behaviors are optional in SPC but will be automatically applied
19by Linux.
20
21
22The following types of reservations are supported:
23--------------------------------------------------
24
25 - PR_WRITE_EXCLUSIVE
26
27 Only the initiator that owns the reservation can write to the
28 device. Any initiator can read from the device.
29
30 - PR_EXCLUSIVE_ACCESS
31
32 Only the initiator that owns the reservation can access the
33 device.
34
35 - PR_WRITE_EXCLUSIVE_REG_ONLY
36
37 Only initiators with a registered key can write to the device,
38 Any initiator can read from the device.
39
40 - PR_EXCLUSIVE_ACCESS_REG_ONLY
41
42 Only initiators with a registered key can access the device.
43
44 - PR_WRITE_EXCLUSIVE_ALL_REGS
45
46 Only initiators with a registered key can write to the device,
47 Any initiator can read from the device.
48 All initiators with a registered key are considered reservation
49 holders.
50 Please reference the SPC spec on the meaning of a reservation
51 holder if you want to use this type.
52
53 - PR_EXCLUSIVE_ACCESS_ALL_REGS
54
55 Only initiators with a registered key can access the device.
56 All initiators with a registered key are considered reservation
57 holders.
58 Please reference the SPC spec on the meaning of a reservation
59 holder if you want to use this type.
60
61
62The following ioctl are supported:
63----------------------------------
64
651. IOC_PR_REGISTER
66
67This ioctl command registers a new reservation if the new_key argument
68is non-null. If no existing reservation exists old_key must be zero,
69if an existing reservation should be replaced old_key must contain
70the old reservation key.
71
72If the new_key argument is 0 it unregisters the existing reservation passed
73in old_key.
74
75
762. IOC_PR_RESERVE
77
78This ioctl command reserves the device and thus restricts access for other
79devices based on the type argument. The key argument must be the existing
80reservation key for the device as acquired by the IOC_PR_REGISTER,
81IOC_PR_REGISTER_IGNORE, IOC_PR_PREEMPT or IOC_PR_PREEMPT_ABORT commands.
82
83
843. IOC_PR_RELEASE
85
86This ioctl command releases the reservation specified by key and flags
87and thus removes any access restriction implied by it.
88
89
904. IOC_PR_PREEMPT
91
92This ioctl command releases the existing reservation referred to by
93old_key and replaces it with a a new reservation of type for the
94reservation key new_key.
95
96
975. IOC_PR_PREEMPT_ABORT
98
99This ioctl command works like IOC_PR_PREEMPT except that it also aborts
100any outstanding command sent over a connection identified by old_key.
101
1026. IOC_PR_CLEAR
103
104This ioctl command unregisters both key and any other reservation key
105registered with the device and drops any existing reservation.
106
107
108Flags
109-----
110
111All the ioctls have a flag field. Currently only one flag is supported:
112
113 - PR_FL_IGNORE_KEY
114
115 Ignore the existing reservation key. This is commonly supported for
116 IOC_PR_REGISTER, and some implementation may support the flag for
117 IOC_PR_RESERVE.
118
119For all unknown flags the kernel will return -EOPNOTSUPP.
diff --git a/Documentation/blockdev/zram.txt b/Documentation/blockdev/zram.txt
index 62435bb25266..5bda5031c83d 100644
--- a/Documentation/blockdev/zram.txt
+++ b/Documentation/blockdev/zram.txt
@@ -14,8 +14,43 @@ Statistics for individual zram devices are exported through sysfs nodes at
14 14
15* Usage 15* Usage
16 16
17There are several ways to configure and manage zram device(-s):
18a) using zram and zram_control sysfs attributes
19b) using zramctl utility, provided by util-linux (util-linux@vger.kernel.org).
20
21In this document we will describe only 'manual' zram configuration steps,
22IOW, zram and zram_control sysfs attributes.
23
24In order to get a better idea about zramctl please consult util-linux
25documentation, zramctl man-page or `zramctl --help'. Please be informed
26that zram maintainers do not develop/maintain util-linux or zramctl, should
27you have any questions please contact util-linux@vger.kernel.org
28
17Following shows a typical sequence of steps for using zram. 29Following shows a typical sequence of steps for using zram.
18 30
31WARNING
32=======
33For the sake of simplicity we skip error checking parts in most of the
34examples below. However, it is your sole responsibility to handle errors.
35
36zram sysfs attributes always return negative values in case of errors.
37The list of possible return codes:
38-EBUSY -- an attempt to modify an attribute that cannot be changed once
39the device has been initialised. Please reset device first;
40-ENOMEM -- zram was not able to allocate enough memory to fulfil your
41needs;
42-EINVAL -- invalid input has been provided.
43
44If you use 'echo', the returned value that is changed by 'echo' utility,
45and, in general case, something like:
46
47 echo 3 > /sys/block/zram0/max_comp_streams
48 if [ $? -ne 0 ];
49 handle_error
50 fi
51
52should suffice.
53
191) Load Module: 541) Load Module:
20 modprobe zram num_devices=4 55 modprobe zram num_devices=4
21 This creates 4 devices: /dev/zram{0,1,2,3} 56 This creates 4 devices: /dev/zram{0,1,2,3}
@@ -47,7 +82,7 @@ max_comp_streams adjustment.
47 82
483) Select compression algorithm 833) Select compression algorithm
49 Using comp_algorithm device attribute one can see available and 84 Using comp_algorithm device attribute one can see available and
50 currently selected (shown in square brackets) compression algortithms, 85 currently selected (shown in square brackets) compression algorithms,
51 change selected compression algorithm (once the device is initialised 86 change selected compression algorithm (once the device is initialised
52 there is no way to change compression algorithm). 87 there is no way to change compression algorithm).
53 88
@@ -119,7 +154,7 @@ execute
1198) Stats: 1548) Stats:
120Per-device statistics are exported as various nodes under /sys/block/zram<id>/ 155Per-device statistics are exported as various nodes under /sys/block/zram<id>/
121 156
122A brief description of exported device attritbutes. For more details please 157A brief description of exported device attributes. For more details please
123read Documentation/ABI/testing/sysfs-block-zram. 158read Documentation/ABI/testing/sysfs-block-zram.
124 159
125Name access description 160Name access description
@@ -140,8 +175,9 @@ zero_pages RO the number of zero filled pages written to this disk
140orig_data_size RO uncompressed size of data stored in this disk 175orig_data_size RO uncompressed size of data stored in this disk
141compr_data_size RO compressed size of data stored in this disk 176compr_data_size RO compressed size of data stored in this disk
142mem_used_total RO the amount of memory allocated for this disk 177mem_used_total RO the amount of memory allocated for this disk
143mem_used_max RW the maximum amount memory zram have consumed to 178mem_used_max RW the maximum amount of memory zram have consumed to
144 store compressed data 179 store the data (to reset this counter to the actual
180 current value, write 1 to this attribute)
145mem_limit RW the maximum amount of memory ZRAM can use to store 181mem_limit RW the maximum amount of memory ZRAM can use to store
146 the compressed data 182 the compressed data
147pages_compacted RO the number of pages freed during compaction 183pages_compacted RO the number of pages freed during compaction
diff --git a/Documentation/cgroups/blkio-controller.txt b/Documentation/cgroups/blkio-controller.txt
index 12686bec37b9..52fa9f353342 100644
--- a/Documentation/cgroups/blkio-controller.txt
+++ b/Documentation/cgroups/blkio-controller.txt
@@ -59,7 +59,7 @@ cgroups. Here is what you can do.
59- At macro level, first dd should finish first. To get more precise data, keep 59- At macro level, first dd should finish first. To get more precise data, keep
60 on looking at (with the help of script), at blkio.disk_time and 60 on looking at (with the help of script), at blkio.disk_time and
61 blkio.disk_sectors files of both test1 and test2 groups. This will tell how 61 blkio.disk_sectors files of both test1 and test2 groups. This will tell how
62 much disk time (in milli seconds), each group got and how many secotors each 62 much disk time (in milliseconds), each group got and how many sectors each
63 group dispatched to the disk. We provide fairness in terms of disk time, so 63 group dispatched to the disk. We provide fairness in terms of disk time, so
64 ideally io.disk_time of cgroups should be in proportion to the weight. 64 ideally io.disk_time of cgroups should be in proportion to the weight.
65 65
diff --git a/Documentation/cgroups/cgroups.txt b/Documentation/cgroups/cgroups.txt
index f935fac1e73b..c6256ae9885b 100644
--- a/Documentation/cgroups/cgroups.txt
+++ b/Documentation/cgroups/cgroups.txt
@@ -637,6 +637,10 @@ void exit(struct task_struct *task)
637 637
638Called during task exit. 638Called during task exit.
639 639
640void free(struct task_struct *task)
641
642Called when the task_struct is freed.
643
640void bind(struct cgroup *root) 644void bind(struct cgroup *root)
641(cgroup_mutex held by caller) 645(cgroup_mutex held by caller)
642 646
diff --git a/Documentation/cgroups/freezer-subsystem.txt b/Documentation/cgroups/freezer-subsystem.txt
index c96a72cbb30a..e831cb2b8394 100644
--- a/Documentation/cgroups/freezer-subsystem.txt
+++ b/Documentation/cgroups/freezer-subsystem.txt
@@ -50,7 +50,7 @@ being frozen. This allows the bash example above and gdb to run as
50expected. 50expected.
51 51
52The cgroup freezer is hierarchical. Freezing a cgroup freezes all 52The cgroup freezer is hierarchical. Freezing a cgroup freezes all
53tasks beloning to the cgroup and all its descendant cgroups. Each 53tasks belonging to the cgroup and all its descendant cgroups. Each
54cgroup has its own state (self-state) and the state inherited from the 54cgroup has its own state (self-state) and the state inherited from the
55parent (parent-state). Iff both states are THAWED, the cgroup is 55parent (parent-state). Iff both states are THAWED, the cgroup is
56THAWED. 56THAWED.
diff --git a/Documentation/cgroups/unified-hierarchy.txt b/Documentation/cgroups/unified-hierarchy.txt
index e0975c2cf03d..781b1d475bcf 100644
--- a/Documentation/cgroups/unified-hierarchy.txt
+++ b/Documentation/cgroups/unified-hierarchy.txt
@@ -107,12 +107,6 @@ root of unified hierarchy can be bound to other hierarchies. This
107allows mixing unified hierarchy with the traditional multiple 107allows mixing unified hierarchy with the traditional multiple
108hierarchies in a fully backward compatible way. 108hierarchies in a fully backward compatible way.
109 109
110For development purposes, the following boot parameter makes all
111controllers to appear on the unified hierarchy whether supported or
112not.
113
114 cgroup__DEVEL__legacy_files_on_dfl
115
116A controller can be moved across hierarchies only after the controller 110A controller can be moved across hierarchies only after the controller
117is no longer referenced in its current hierarchy. Because per-cgroup 111is no longer referenced in its current hierarchy. Because per-cgroup
118controller states are destroyed asynchronously and controllers may 112controller states are destroyed asynchronously and controllers may
@@ -341,11 +335,11 @@ is riddled with issues.
341 unnecessarily complicated and probably done this way because event 335 unnecessarily complicated and probably done this way because event
342 delivery itself was expensive. 336 delivery itself was expensive.
343 337
344Unified hierarchy implements an interface file "cgroup.populated" 338Unified hierarchy implements "populated" field in "cgroup.events"
345which can be used to monitor whether the cgroup's subhierarchy has 339interface file which can be used to monitor whether the cgroup's
346tasks in it or not. Its value is 0 if there is no task in the cgroup 340subhierarchy has tasks in it or not. Its value is 0 if there is no
347and its descendants; otherwise, 1. poll and [id]notify events are 341task in the cgroup and its descendants; otherwise, 1. poll and
348triggered when the value changes. 342[id]notify events are triggered when the value changes.
349 343
350This is significantly lighter and simpler and trivially allows 344This is significantly lighter and simpler and trivially allows
351delegating management of subhierarchy - subhierarchy monitoring can 345delegating management of subhierarchy - subhierarchy monitoring can
@@ -374,6 +368,10 @@ supported and the interface files "release_agent" and
374 368
375- The "cgroup.clone_children" file is removed. 369- The "cgroup.clone_children" file is removed.
376 370
371- /proc/PID/cgroup keeps reporting the cgroup that a zombie belonged
372 to before exiting. If the cgroup is removed before the zombie is
373 reaped, " (deleted)" is appeneded to the path.
374
377 375
3785-3. Controller File Conventions 3765-3. Controller File Conventions
379 377
@@ -435,6 +433,11 @@ may be specified in any order and not all pairs have to be specified.
435 the first entry in the file. Specific entries can use "default" as 433 the first entry in the file. Specific entries can use "default" as
436 its value to indicate inheritance of the default value. 434 its value to indicate inheritance of the default value.
437 435
436- For events which are not very high frequency, an interface file
437 "events" should be created which lists event key value pairs.
438 Whenever a notifiable event happens, file modified event should be
439 generated on the file.
440
438 441
4395-4. Per-Controller Changes 4425-4. Per-Controller Changes
440 443
@@ -491,7 +494,7 @@ may be specified in any order and not all pairs have to be specified.
491 ${R|W}BPS are read/write bytes per second and ${R|W}IOPS are 494 ${R|W}BPS are read/write bytes per second and ${R|W}IOPS are
492 read/write IOs per second. "max" indicates no limit. Writing 495 read/write IOs per second. "max" indicates no limit. Writing
493 to the file follows the same format but the individual 496 to the file follows the same format but the individual
494 settings may be ommitted or specified in any order. 497 settings may be omitted or specified in any order.
495 498
496 This file is available only on non-root cgroups. 499 This file is available only on non-root cgroups.
497 500
diff --git a/Documentation/crypto/asymmetric-keys.txt b/Documentation/crypto/asymmetric-keys.txt
index b7675904a747..8c07e0ea6bc0 100644
--- a/Documentation/crypto/asymmetric-keys.txt
+++ b/Documentation/crypto/asymmetric-keys.txt
@@ -186,7 +186,7 @@ and looks like the following:
186 const struct public_key_signature *sig); 186 const struct public_key_signature *sig);
187 }; 187 };
188 188
189Asymmetric keys point to this with their type_data[0] member. 189Asymmetric keys point to this with their payload[asym_subtype] member.
190 190
191The owner and name fields should be set to the owning module and the name of 191The owner and name fields should be set to the owning module and the name of
192the subtype. Currently, the name is only used for print statements. 192the subtype. Currently, the name is only used for print statements.
@@ -269,8 +269,7 @@ mandatory:
269 269
270 struct key_preparsed_payload { 270 struct key_preparsed_payload {
271 char *description; 271 char *description;
272 void *type_data[2]; 272 void *payload[4];
273 void *payload;
274 const void *data; 273 const void *data;
275 size_t datalen; 274 size_t datalen;
276 size_t quotalen; 275 size_t quotalen;
@@ -283,16 +282,18 @@ mandatory:
283 not theirs. 282 not theirs.
284 283
285 If the parser is happy with the blob, it should propose a description for 284 If the parser is happy with the blob, it should propose a description for
286 the key and attach it to ->description, ->type_data[0] should be set to 285 the key and attach it to ->description, ->payload[asym_subtype] should be
287 point to the subtype to be used, ->payload should be set to point to the 286 set to point to the subtype to be used, ->payload[asym_crypto] should be
288 initialised data for that subtype, ->type_data[1] should point to a hex 287 set to point to the initialised data for that subtype,
289 fingerprint and quotalen should be updated to indicate how much quota this 288 ->payload[asym_key_ids] should point to one or more hex fingerprints and
290 key should account for. 289 quotalen should be updated to indicate how much quota this key should
291 290 account for.
292 When clearing up, the data attached to ->type_data[1] and ->description 291
293 will be kfree()'d and the data attached to ->payload will be passed to the 292 When clearing up, the data attached to ->payload[asym_key_ids] and
294 subtype's ->destroy() method to be disposed of. A module reference for 293 ->description will be kfree()'d and the data attached to
295 the subtype pointed to by ->type_data[0] will be put. 294 ->payload[asm_crypto] will be passed to the subtype's ->destroy() method
295 to be disposed of. A module reference for the subtype pointed to by
296 ->payload[asym_subtype] will be put.
296 297
297 298
298 If the data format is not recognised, -EBADMSG should be returned. If it 299 If the data format is not recognised, -EBADMSG should be returned. If it
diff --git a/Documentation/device-mapper/delay.txt b/Documentation/device-mapper/delay.txt
index 15adc55359e5..a07b5927f4a8 100644
--- a/Documentation/device-mapper/delay.txt
+++ b/Documentation/device-mapper/delay.txt
@@ -8,6 +8,7 @@ Parameters:
8 <device> <offset> <delay> [<write_device> <write_offset> <write_delay>] 8 <device> <offset> <delay> [<write_device> <write_offset> <write_delay>]
9 9
10With separate write parameters, the first set is only used for reads. 10With separate write parameters, the first set is only used for reads.
11Offsets are specified in sectors.
11Delays are specified in milliseconds. 12Delays are specified in milliseconds.
12 13
13Example scripts 14Example scripts
diff --git a/Documentation/device-mapper/snapshot.txt b/Documentation/device-mapper/snapshot.txt
index 0d5bc46dc167..ad6949bff2e3 100644
--- a/Documentation/device-mapper/snapshot.txt
+++ b/Documentation/device-mapper/snapshot.txt
@@ -41,9 +41,13 @@ useless and be disabled, returning errors. So it is important to monitor
41the amount of free space and expand the <COW device> before it fills up. 41the amount of free space and expand the <COW device> before it fills up.
42 42
43<persistent?> is P (Persistent) or N (Not persistent - will not survive 43<persistent?> is P (Persistent) or N (Not persistent - will not survive
44after reboot). 44after reboot). O (Overflow) can be added as a persistent store option
45The difference is that for transient snapshots less metadata must be 45to allow userspace to advertise its support for seeing "Overflow" in the
46saved on disk - they can be kept in memory by the kernel. 46snapshot status. So supported store types are "P", "PO" and "N".
47
48The difference between persistent and transient is with transient
49snapshots less metadata must be saved on disk - they can be kept in
50memory by the kernel.
47 51
48 52
49* snapshot-merge <origin> <COW device> <persistent> <chunksize> 53* snapshot-merge <origin> <COW device> <persistent> <chunksize>
diff --git a/Documentation/devicetree/bindings/arm/amlogic.txt b/Documentation/devicetree/bindings/arm/amlogic.txt
index 973884a1bacf..1dfee20eee74 100644
--- a/Documentation/devicetree/bindings/arm/amlogic.txt
+++ b/Documentation/devicetree/bindings/arm/amlogic.txt
@@ -9,6 +9,12 @@ Boards with the Amlogic Meson8 SoC shall have the following properties:
9 Required root node property: 9 Required root node property:
10 compatible: "amlogic,meson8"; 10 compatible: "amlogic,meson8";
11 11
12Boards with the Amlogic Meson8b SoC shall have the following properties:
13 Required root node property:
14 compatible: "amlogic,meson8b";
15
12Board compatible values: 16Board compatible values:
13 - "geniatech,atv1200" 17 - "geniatech,atv1200" (Meson6)
14 - "minix,neo-x8" 18 - "minix,neo-x8" (Meson8)
19 - "tronfy,mxq" (Meson8b)
20 - "hardkernel,odroid-c1" (Meson8b)
diff --git a/Documentation/devicetree/bindings/arm/apm/scu.txt b/Documentation/devicetree/bindings/arm/apm/scu.txt
new file mode 100644
index 000000000000..b45be06625fd
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/apm/scu.txt
@@ -0,0 +1,17 @@
1APM X-GENE SoC series SCU Registers
2
3This system clock unit contain various register that control block resets,
4clock enable/disables, clock divisors and other deepsleep registers.
5
6Properties:
7 - compatible : should contain two values. First value must be:
8 - "apm,xgene-scu"
9 second value must be always "syscon".
10
11 - reg : offset and length of the register set.
12
13Example :
14 scu: system-clk-controller@17000000 {
15 compatible = "apm,xgene-scu","syscon";
16 reg = <0x0 0x17000000 0x0 0x400>;
17 };
diff --git a/Documentation/devicetree/bindings/arm/arm,scpi.txt b/Documentation/devicetree/bindings/arm/arm,scpi.txt
new file mode 100644
index 000000000000..86302de67c2c
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/arm,scpi.txt
@@ -0,0 +1,188 @@
1System Control and Power Interface (SCPI) Message Protocol
2----------------------------------------------------------
3
4Firmware implementing the SCPI described in ARM document number ARM DUI 0922B
5("ARM Compute Subsystem SCP: Message Interface Protocols")[0] can be used
6by Linux to initiate various system control and power operations.
7
8Required properties:
9
10- compatible : should be "arm,scpi"
11- mboxes: List of phandle and mailbox channel specifiers
12 All the channels reserved by remote SCP firmware for use by
13 SCPI message protocol should be specified in any order
14- shmem : List of phandle pointing to the shared memory(SHM) area between the
15 processors using these mailboxes for IPC, one for each mailbox
16 SHM can be any memory reserved for the purpose of this communication
17 between the processors.
18
19See Documentation/devicetree/bindings/mailbox/mailbox.txt
20for more details about the generic mailbox controller and
21client driver bindings.
22
23Clock bindings for the clocks based on SCPI Message Protocol
24------------------------------------------------------------
25
26This binding uses the common clock binding[1].
27
28Container Node
29==============
30Required properties:
31- compatible : should be "arm,scpi-clocks"
32 All the clocks provided by SCP firmware via SCPI message
33 protocol much be listed as sub-nodes under this node.
34
35Sub-nodes
36=========
37Required properties:
38- compatible : shall include one of the following
39 "arm,scpi-dvfs-clocks" - all the clocks that are variable and index based.
40 These clocks don't provide an entire range of values between the
41 limits but only discrete points within the range. The firmware
42 provides the mapping for each such operating frequency and the
43 index associated with it. The firmware also manages the
44 voltage scaling appropriately with the clock scaling.
45 "arm,scpi-variable-clocks" - all the clocks that are variable and provide full
46 range within the specified range. The firmware provides the
47 range of values within a specified range.
48
49Other required properties for all clocks(all from common clock binding):
50- #clock-cells : Should be 1. Contains the Clock ID value used by SCPI commands.
51- clock-output-names : shall be the corresponding names of the outputs.
52- clock-indices: The identifying number for the clocks(i.e.clock_id) in the
53 node. It can be non linear and hence provide the mapping of identifiers
54 into the clock-output-names array.
55
56SRAM and Shared Memory for SCPI
57-------------------------------
58
59A small area of SRAM is reserved for SCPI communication between application
60processors and SCP.
61
62Required properties:
63- compatible : should be "arm,juno-sram-ns" for Non-secure SRAM on Juno
64
65The rest of the properties should follow the generic mmio-sram description
66found in ../../misc/sysram.txt
67
68Each sub-node represents the reserved area for SCPI.
69
70Required sub-node properties:
71- reg : The base offset and size of the reserved area with the SRAM
72- compatible : should be "arm,juno-scp-shmem" for Non-secure SRAM based
73 shared memory on Juno platforms
74
75Sensor bindings for the sensors based on SCPI Message Protocol
76--------------------------------------------------------------
77SCPI provides an API to access the various sensors on the SoC.
78
79Required properties:
80- compatible : should be "arm,scpi-sensors".
81- #thermal-sensor-cells: should be set to 1. This property follows the
82 thermal device tree bindings[2].
83
84 Valid cell values are raw identifiers (Sensor
85 ID) as used by the firmware. Refer to
86 platform documentation for your
87 implementation for the IDs to use. For Juno
88 R0 and Juno R1 refer to [3].
89
90[0] http://infocenter.arm.com/help/topic/com.arm.doc.dui0922b/index.html
91[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
92[2] Documentation/devicetree/bindings/thermal/thermal.txt
93[3] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0922b/apas03s22.html
94
95Example:
96
97sram: sram@50000000 {
98 compatible = "arm,juno-sram-ns", "mmio-sram";
99 reg = <0x0 0x50000000 0x0 0x10000>;
100
101 #address-cells = <1>;
102 #size-cells = <1>;
103 ranges = <0 0x0 0x50000000 0x10000>;
104
105 cpu_scp_lpri: scp-shmem@0 {
106 compatible = "arm,juno-scp-shmem";
107 reg = <0x0 0x200>;
108 };
109
110 cpu_scp_hpri: scp-shmem@200 {
111 compatible = "arm,juno-scp-shmem";
112 reg = <0x200 0x200>;
113 };
114};
115
116mailbox: mailbox0@40000000 {
117 ....
118 #mbox-cells = <1>;
119};
120
121scpi_protocol: scpi@2e000000 {
122 compatible = "arm,scpi";
123 mboxes = <&mailbox 0 &mailbox 1>;
124 shmem = <&cpu_scp_lpri &cpu_scp_hpri>;
125
126 clocks {
127 compatible = "arm,scpi-clocks";
128
129 scpi_dvfs: scpi_clocks@0 {
130 compatible = "arm,scpi-dvfs-clocks";
131 #clock-cells = <1>;
132 clock-indices = <0>, <1>, <2>;
133 clock-output-names = "atlclk", "aplclk","gpuclk";
134 };
135 scpi_clk: scpi_clocks@3 {
136 compatible = "arm,scpi-variable-clocks";
137 #clock-cells = <1>;
138 clock-indices = <3>, <4>;
139 clock-output-names = "pxlclk0", "pxlclk1";
140 };
141 };
142
143 scpi_sensors0: sensors {
144 compatible = "arm,scpi-sensors";
145 #thermal-sensor-cells = <1>;
146 };
147};
148
149cpu@0 {
150 ...
151 reg = <0 0>;
152 clocks = <&scpi_dvfs 0>;
153};
154
155hdlcd@7ff60000 {
156 ...
157 reg = <0 0x7ff60000 0 0x1000>;
158 clocks = <&scpi_clk 4>;
159};
160
161thermal-zones {
162 soc_thermal {
163 polling-delay-passive = <100>;
164 polling-delay = <1000>;
165
166 /* sensor ID */
167 thermal-sensors = <&scpi_sensors0 3>;
168 ...
169 };
170};
171
172In the above example, the #clock-cells is set to 1 as required.
173scpi_dvfs has 3 output clocks namely: atlclk, aplclk, and gpuclk with 0,
1741 and 2 as clock-indices. scpi_clk has 2 output clocks namely: pxlclk0
175and pxlclk1 with 3 and 4 as clock-indices.
176
177The first consumer in the example is cpu@0 and it has '0' as the clock
178specifier which points to the first entry in the output clocks of
179scpi_dvfs i.e. "atlclk".
180
181Similarly the second example is hdlcd@7ff60000 and it has pxlclk1 as input
182clock. '4' in the clock specifier here points to the second entry
183in the output clocks of scpi_clocks i.e. "pxlclk1"
184
185The thermal-sensors property in the soc_thermal node uses the
186temperature sensor provided by SCP firmware to setup a thermal
187zone. The ID "3" is the sensor identifier for the temperature sensor
188as used by the firmware.
diff --git a/Documentation/devicetree/bindings/arm/bcm/brcm,brcmstb.txt b/Documentation/devicetree/bindings/arm/bcm/brcm,brcmstb.txt
index 430608ec09f0..0d0c1ae81bed 100644
--- a/Documentation/devicetree/bindings/arm/bcm/brcm,brcmstb.txt
+++ b/Documentation/devicetree/bindings/arm/bcm/brcm,brcmstb.txt
@@ -20,6 +20,25 @@ system control is required:
20 - compatible: "brcm,bcm<chip_id>-hif-cpubiuctrl", "syscon" 20 - compatible: "brcm,bcm<chip_id>-hif-cpubiuctrl", "syscon"
21 - compatible: "brcm,bcm<chip_id>-hif-continuation", "syscon" 21 - compatible: "brcm,bcm<chip_id>-hif-continuation", "syscon"
22 22
23hif-cpubiuctrl node
24-------------------
25SoCs with Broadcom Brahma15 ARM-based CPUs have a specific Bus Interface Unit
26(BIU) block which controls and interfaces the CPU complex to the different
27Memory Controller Ports (MCP), one per memory controller (MEMC). This BIU block
28offers a feature called Write Pairing which consists in collapsing two adjacent
29cache lines into a single (bursted) write transaction towards the memory
30controller (MEMC) to maximize write bandwidth.
31
32Required properties:
33
34 - compatible: must be "brcm,bcm7445-hif-cpubiuctrl", "syscon"
35
36Optional properties:
37
38 - brcm,write-pairing:
39 Boolean property, which when present indicates that the chip
40 supports write-pairing.
41
23example: 42example:
24 rdb { 43 rdb {
25 #address-cells = <1>; 44 #address-cells = <1>;
@@ -35,6 +54,7 @@ example:
35 hif_cpubiuctrl: syscon@3e2400 { 54 hif_cpubiuctrl: syscon@3e2400 {
36 compatible = "brcm,bcm7445-hif-cpubiuctrl", "syscon"; 55 compatible = "brcm,bcm7445-hif-cpubiuctrl", "syscon";
37 reg = <0x3e2400 0x5b4>; 56 reg = <0x3e2400 0x5b4>;
57 brcm,write-pairing;
38 }; 58 };
39 59
40 hif_continuation: syscon@452000 { 60 hif_continuation: syscon@452000 {
@@ -43,8 +63,7 @@ example:
43 }; 63 };
44 }; 64 };
45 65
46Lastly, nodes that allow for support of SMP initialization and reboot are 66Nodes that allow for support of SMP initialization and reboot are required:
47required:
48 67
49smpboot 68smpboot
50------- 69-------
@@ -95,3 +114,142 @@ example:
95 compatible = "brcm,brcmstb-reboot"; 114 compatible = "brcm,brcmstb-reboot";
96 syscon = <&sun_top_ctrl 0x304 0x308>; 115 syscon = <&sun_top_ctrl 0x304 0x308>;
97 }; 116 };
117
118
119
120Power management
121----------------
122
123For power management (particularly, S2/S3/S5 system suspend), the following SoC
124components are needed:
125
126= Always-On control block (AON CTRL)
127
128This hardware provides control registers for the "always-on" (even in low-power
129modes) hardware, such as the Power Management State Machine (PMSM).
130
131Required properties:
132- compatible : should contain "brcm,brcmstb-aon-ctrl"
133- reg : the register start and length for the AON CTRL block
134
135Example:
136
137aon-ctrl@410000 {
138 compatible = "brcm,brcmstb-aon-ctrl";
139 reg = <0x410000 0x400>;
140};
141
142= Memory controllers
143
144A Broadcom STB SoC typically has a number of independent memory controllers,
145each of which may have several associated hardware blocks, which are versioned
146independently (control registers, DDR PHYs, etc.). One might consider
147describing these controllers as a parent "memory controllers" block, which
148contains N sub-nodes (one for each controller in the system), each of which is
149associated with a number of hardware register resources (e.g., its PHY). See
150the example device tree snippet below.
151
152== MEMC (MEMory Controller)
153
154Represents a single memory controller instance.
155
156Required properties:
157- compatible : should contain "brcm,brcmstb-memc" and "simple-bus"
158
159Should contain subnodes for any of the following relevant hardware resources:
160
161== DDR PHY control
162
163Control registers for this memory controller's DDR PHY.
164
165Required properties:
166- compatible : should contain one of these
167 "brcm,brcmstb-ddr-phy-v225.1"
168 "brcm,brcmstb-ddr-phy-v240.1"
169 "brcm,brcmstb-ddr-phy-v240.2"
170
171- reg : the DDR PHY register range
172
173== DDR SHIMPHY
174
175Control registers for this memory controller's DDR SHIMPHY.
176
177Required properties:
178- compatible : should contain "brcm,brcmstb-ddr-shimphy-v1.0"
179- reg : the DDR SHIMPHY register range
180
181== MEMC DDR control
182
183Sequencer DRAM parameters and control registers. Used for Self-Refresh
184Power-Down (SRPD), among other things.
185
186Required properties:
187- compatible : should contain "brcm,brcmstb-memc-ddr"
188- reg : the MEMC DDR register range
189
190Example:
191
192memory_controllers {
193 ranges;
194 compatible = "simple-bus";
195
196 memc@0 {
197 compatible = "brcm,brcmstb-memc", "simple-bus";
198 ranges;
199
200 ddr-phy@f1106000 {
201 compatible = "brcm,brcmstb-ddr-phy-v240.1";
202 reg = <0xf1106000 0x21c>;
203 };
204
205 shimphy@f1108000 {
206 compatible = "brcm,brcmstb-ddr-shimphy-v1.0";
207 reg = <0xf1108000 0xe4>;
208 };
209
210 memc-ddr@f1102000 {
211 reg = <0xf1102000 0x800>;
212 compatible = "brcm,brcmstb-memc-ddr";
213 };
214 };
215
216 memc@1 {
217 compatible = "brcm,brcmstb-memc", "simple-bus";
218 ranges;
219
220 ddr-phy@f1186000 {
221 compatible = "brcm,brcmstb-ddr-phy-v240.1";
222 reg = <0xf1186000 0x21c>;
223 };
224
225 shimphy@f1188000 {
226 compatible = "brcm,brcmstb-ddr-shimphy-v1.0";
227 reg = <0xf1188000 0xe4>;
228 };
229
230 memc-ddr@f1182000 {
231 reg = <0xf1182000 0x800>;
232 compatible = "brcm,brcmstb-memc-ddr";
233 };
234 };
235
236 memc@2 {
237 compatible = "brcm,brcmstb-memc", "simple-bus";
238 ranges;
239
240 ddr-phy@f1206000 {
241 compatible = "brcm,brcmstb-ddr-phy-v240.1";
242 reg = <0xf1206000 0x21c>;
243 };
244
245 shimphy@f1208000 {
246 compatible = "brcm,brcmstb-ddr-shimphy-v1.0";
247 reg = <0xf1208000 0xe4>;
248 };
249
250 memc-ddr@f1202000 {
251 reg = <0xf1202000 0x800>;
252 compatible = "brcm,brcmstb-memc-ddr";
253 };
254 };
255};
diff --git a/Documentation/devicetree/bindings/arm/bcm/brcm,nsp.txt b/Documentation/devicetree/bindings/arm/bcm/brcm,nsp.txt
new file mode 100644
index 000000000000..eae53e4556be
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/bcm/brcm,nsp.txt
@@ -0,0 +1,34 @@
1Broadcom Northstar Plus device tree bindings
2--------------------------------------------
3
4Broadcom Northstar Plus family of SoCs are used for switching control
5and management applications as well as residential router/gateway
6applications. The SoC features dual core Cortex A9 ARM CPUs, integrating
7several peripheral interfaces including multiple Gigabit Ethernet PHYs,
8DDR3 memory, PCIE Gen-2, USB 2.0 and USB 3.0, serial and NAND flash,
9SATA and several other IO controllers.
10
11Boards with Northstar Plus SoCs shall have the following properties:
12
13Required root node property:
14
15BCM58522
16compatible = "brcm,bcm58522", "brcm,nsp";
17
18BCM58525
19compatible = "brcm,bcm58525", "brcm,nsp";
20
21BCM58535
22compatible = "brcm,bcm58535", "brcm,nsp";
23
24BCM58622
25compatible = "brcm,bcm58622", "brcm,nsp";
26
27BCM58623
28compatible = "brcm,bcm58623", "brcm,nsp";
29
30BCM58625
31compatible = "brcm,bcm58625", "brcm,nsp";
32
33BCM88312
34compatible = "brcm,bcm88312", "brcm,nsp";
diff --git a/Documentation/devicetree/bindings/arm/coherency-fabric.txt b/Documentation/devicetree/bindings/arm/coherency-fabric.txt
index 8dd46617c889..9b5c3f620e65 100644
--- a/Documentation/devicetree/bindings/arm/coherency-fabric.txt
+++ b/Documentation/devicetree/bindings/arm/coherency-fabric.txt
@@ -27,6 +27,11 @@ Required properties:
27 * For "marvell,armada-380-coherency-fabric", only one pair is needed 27 * For "marvell,armada-380-coherency-fabric", only one pair is needed
28 for the per-CPU fabric registers. 28 for the per-CPU fabric registers.
29 29
30Optional properties:
31
32- broken-idle: boolean to set when the Idle mode is not supported by the
33 hardware.
34
30Examples: 35Examples:
31 36
32coherency-fabric@d0020200 { 37coherency-fabric@d0020200 {
diff --git a/Documentation/devicetree/bindings/arm/cpus.txt b/Documentation/devicetree/bindings/arm/cpus.txt
index 91e6e5c478d0..3a07a87fef20 100644
--- a/Documentation/devicetree/bindings/arm/cpus.txt
+++ b/Documentation/devicetree/bindings/arm/cpus.txt
@@ -195,6 +195,8 @@ nodes to be present and contain the properties described below.
195 "marvell,armada-380-smp" 195 "marvell,armada-380-smp"
196 "marvell,armada-390-smp" 196 "marvell,armada-390-smp"
197 "marvell,armada-xp-smp" 197 "marvell,armada-xp-smp"
198 "mediatek,mt6589-smp"
199 "mediatek,mt81xx-tz-smp"
198 "qcom,gcc-msm8660" 200 "qcom,gcc-msm8660"
199 "qcom,kpss-acc-v1" 201 "qcom,kpss-acc-v1"
200 "qcom,kpss-acc-v2" 202 "qcom,kpss-acc-v2"
diff --git a/Documentation/devicetree/bindings/arm/fsl.txt b/Documentation/devicetree/bindings/arm/fsl.txt
index 2a3ba73f0c5c..34c88b0c7ab4 100644
--- a/Documentation/devicetree/bindings/arm/fsl.txt
+++ b/Documentation/devicetree/bindings/arm/fsl.txt
@@ -128,10 +128,18 @@ Example:
128 reg = <0x0 0x1ee0000 0x0 0x10000>; 128 reg = <0x0 0x1ee0000 0x0 0x10000>;
129 }; 129 };
130 130
131Freescale LS2085A SoC Device Tree Bindings 131Freescale ARMv8 based Layerscape SoC family Device Tree Bindings
132------------------------------------------ 132----------------------------------------------------------------
133 133
134LS2085A ARMv8 based Simulator model 134LS2080A ARMv8 based Simulator model
135Required root node properties: 135Required root node properties:
136 - compatible = "fsl,ls2085a-simu", "fsl,ls2085a"; 136 - compatible = "fsl,ls2080a-simu", "fsl,ls2080a";
137
138LS2080A ARMv8 based QDS Board
139Required root node properties:
140 - compatible = "fsl,ls2080a-qds", "fsl,ls2080a";
141
142LS2080A ARMv8 based RDB Board
143Required root node properties:
144 - compatible = "fsl,ls2080a-rdb", "fsl,ls2080a";
137 145
diff --git a/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt b/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt
index c733e28e18e5..6ac7c000af22 100644
--- a/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt
+++ b/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt
@@ -20,6 +20,10 @@ HiKey Board
20Required root node properties: 20Required root node properties:
21 - compatible = "hisilicon,hi6220-hikey", "hisilicon,hi6220"; 21 - compatible = "hisilicon,hi6220-hikey", "hisilicon,hi6220";
22 22
23HiP05 D02 Board
24Required root node properties:
25 - compatible = "hisilicon,hip05-d02";
26
23Hisilicon system controller 27Hisilicon system controller
24 28
25Required properties: 29Required properties:
@@ -167,6 +171,23 @@ Example:
167 }; 171 };
168 172
169----------------------------------------------------------------------- 173-----------------------------------------------------------------------
174Hisilicon HiP05 PCIe-SAS system controller
175
176Required properties:
177- compatible : "hisilicon,pcie-sas-subctrl", "syscon";
178- reg : Register address and size
179
180The HiP05 PCIe-SAS system controller is shared by PCIe and SAS controllers in
181HiP05 Soc to implement some basic configurations.
182
183Example:
184 /* for HiP05 PCIe-SAS system */
185 pcie_sas: system_controller@0xb0000000 {
186 compatible = "hisilicon,pcie-sas-subctrl", "syscon";
187 reg = <0xb0000000 0x10000>;
188 };
189
190-----------------------------------------------------------------------
170Hisilicon CPU controller 191Hisilicon CPU controller
171 192
172Required properties: 193Required properties:
diff --git a/Documentation/devicetree/bindings/arm/idle-states.txt b/Documentation/devicetree/bindings/arm/idle-states.txt
index a8274eabae2e..b8e41c148a3c 100644
--- a/Documentation/devicetree/bindings/arm/idle-states.txt
+++ b/Documentation/devicetree/bindings/arm/idle-states.txt
@@ -497,7 +497,7 @@ cpus {
497 }; 497 };
498 498
499 idle-states { 499 idle-states {
500 entry-method = "arm,psci"; 500 entry-method = "psci";
501 501
502 CPU_RETENTION_0_0: cpu-retention-0-0 { 502 CPU_RETENTION_0_0: cpu-retention-0-0 {
503 compatible = "arm,idle-state"; 503 compatible = "arm,idle-state";
diff --git a/Documentation/devicetree/bindings/arm/keystone/keystone.txt b/Documentation/devicetree/bindings/arm/keystone/keystone.txt
index 59d7a46f85eb..3090a8a008c0 100644
--- a/Documentation/devicetree/bindings/arm/keystone/keystone.txt
+++ b/Documentation/devicetree/bindings/arm/keystone/keystone.txt
@@ -9,12 +9,26 @@ Required properties:
9 the form "ti,keystone-*". Generic devices like gic, arch_timers, ns16550 9 the form "ti,keystone-*". Generic devices like gic, arch_timers, ns16550
10 type UART should use the specified compatible for those devices. 10 type UART should use the specified compatible for those devices.
11 11
12SoC families:
13
14- Keystone 2 generic SoC:
15 compatible = "ti,keystone"
16
17SoCs:
18
19- Keystone 2 Hawking/Kepler
20 compatible = "ti,k2hk", "ti,keystone"
21- Keystone 2 Lamarr
22 compatible = "ti,k2l", "ti,keystone"
23- Keystone 2 Edison
24 compatible = "ti,k2e", "ti,keystone"
25
12Boards: 26Boards:
13- Keystone 2 Hawking/Kepler EVM 27- Keystone 2 Hawking/Kepler EVM
14 compatible = "ti,k2hk-evm","ti,keystone" 28 compatible = "ti,k2hk-evm", "ti,k2hk", "ti,keystone"
15 29
16- Keystone 2 Lamarr EVM 30- Keystone 2 Lamarr EVM
17 compatible = "ti,k2l-evm","ti,keystone" 31 compatible = "ti,k2l-evm", "ti, k2l", "ti,keystone"
18 32
19- Keystone 2 Edison EVM 33- Keystone 2 Edison EVM
20 compatible = "ti,k2e-evm","ti,keystone" 34 compatible = "ti,k2e-evm", "ti,k2e", "ti,keystone"
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,imgsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,imgsys.txt
new file mode 100644
index 000000000000..b1f2ce17dff8
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,imgsys.txt
@@ -0,0 +1,22 @@
1Mediatek imgsys controller
2============================
3
4The Mediatek imgsys controller provides various clocks to the system.
5
6Required Properties:
7
8- compatible: Should be:
9 - "mediatek,mt8173-imgsys", "syscon"
10- #clock-cells: Must be 1
11
12The imgsys controller uses the common clk binding from
13Documentation/devicetree/bindings/clock/clock-bindings.txt
14The available clocks are defined in dt-bindings/clock/mt*-clk.h.
15
16Example:
17
18imgsys: clock-controller@15000000 {
19 compatible = "mediatek,mt8173-imgsys", "syscon";
20 reg = <0 0x15000000 0 0x1000>;
21 #clock-cells = <1>;
22};
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt
new file mode 100644
index 000000000000..4385946eadef
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt
@@ -0,0 +1,22 @@
1Mediatek mmsys controller
2============================
3
4The Mediatek mmsys controller provides various clocks to the system.
5
6Required Properties:
7
8- compatible: Should be:
9 - "mediatek,mt8173-mmsys", "syscon"
10- #clock-cells: Must be 1
11
12The mmsys controller uses the common clk binding from
13Documentation/devicetree/bindings/clock/clock-bindings.txt
14The available clocks are defined in dt-bindings/clock/mt*-clk.h.
15
16Example:
17
18mmsys: clock-controller@14000000 {
19 compatible = "mediatek,mt8173-mmsys", "syscon";
20 reg = <0 0x14000000 0 0x1000>;
21 #clock-cells = <1>;
22};
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,vdecsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vdecsys.txt
new file mode 100644
index 000000000000..1faacf1c1b25
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vdecsys.txt
@@ -0,0 +1,22 @@
1Mediatek vdecsys controller
2============================
3
4The Mediatek vdecsys controller provides various clocks to the system.
5
6Required Properties:
7
8- compatible: Should be:
9 - "mediatek,mt8173-vdecsys", "syscon"
10- #clock-cells: Must be 1
11
12The vdecsys controller uses the common clk binding from
13Documentation/devicetree/bindings/clock/clock-bindings.txt
14The available clocks are defined in dt-bindings/clock/mt*-clk.h.
15
16Example:
17
18vdecsys: clock-controller@16000000 {
19 compatible = "mediatek,mt8173-vdecsys", "syscon";
20 reg = <0 0x16000000 0 0x1000>;
21 #clock-cells = <1>;
22};
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencltsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencltsys.txt
new file mode 100644
index 000000000000..3cc299fd7857
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencltsys.txt
@@ -0,0 +1,22 @@
1Mediatek vencltsys controller
2============================
3
4The Mediatek vencltsys controller provides various clocks to the system.
5
6Required Properties:
7
8- compatible: Should be:
9 - "mediatek,mt8173-vencltsys", "syscon"
10- #clock-cells: Must be 1
11
12The vencltsys controller uses the common clk binding from
13Documentation/devicetree/bindings/clock/clock-bindings.txt
14The available clocks are defined in dt-bindings/clock/mt*-clk.h.
15
16Example:
17
18vencltsys: clock-controller@19000000 {
19 compatible = "mediatek,mt8173-vencltsys", "syscon";
20 reg = <0 0x19000000 0 0x1000>;
21 #clock-cells = <1>;
22};
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencsys.txt
new file mode 100644
index 000000000000..5bb2866a2b50
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencsys.txt
@@ -0,0 +1,22 @@
1Mediatek vencsys controller
2============================
3
4The Mediatek vencsys controller provides various clocks to the system.
5
6Required Properties:
7
8- compatible: Should be:
9 - "mediatek,mt8173-vencsys", "syscon"
10- #clock-cells: Must be 1
11
12The vencsys controller uses the common clk binding from
13Documentation/devicetree/bindings/clock/clock-bindings.txt
14The available clocks are defined in dt-bindings/clock/mt*-clk.h.
15
16Example:
17
18vencsys: clock-controller@18000000 {
19 compatible = "mediatek,mt8173-vencsys", "syscon";
20 reg = <0 0x18000000 0 0x1000>;
21 #clock-cells = <1>;
22};
diff --git a/Documentation/devicetree/bindings/arm/mvebu-cpu-config.txt b/Documentation/devicetree/bindings/arm/mvebu-cpu-config.txt
new file mode 100644
index 000000000000..2cdcd716da40
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mvebu-cpu-config.txt
@@ -0,0 +1,20 @@
1MVEBU CPU Config registers
2--------------------------
3
4MVEBU (Marvell SOCs: Armada 370/XP)
5
6Required properties:
7
8- compatible: one of:
9 - "marvell,armada-370-cpu-config"
10 - "marvell,armada-xp-cpu-config"
11
12- reg: Should contain CPU config registers location and length, in
13 their per-CPU variant
14
15Example:
16
17 cpu-config@21000 {
18 compatible = "marvell,armada-xp-cpu-config";
19 reg = <0x21000 0x8>;
20 };
diff --git a/Documentation/devicetree/bindings/arm/pmu.txt b/Documentation/devicetree/bindings/arm/pmu.txt
index 435251fa9ce0..97ba45af04fc 100644
--- a/Documentation/devicetree/bindings/arm/pmu.txt
+++ b/Documentation/devicetree/bindings/arm/pmu.txt
@@ -7,7 +7,10 @@ representation in the device tree should be done as under:-
7Required properties: 7Required properties:
8 8
9- compatible : should be one of 9- compatible : should be one of
10 "apm,potenza-pmu"
10 "arm,armv8-pmuv3" 11 "arm,armv8-pmuv3"
12 "arm.cortex-a57-pmu"
13 "arm.cortex-a53-pmu"
11 "arm,cortex-a17-pmu" 14 "arm,cortex-a17-pmu"
12 "arm,cortex-a15-pmu" 15 "arm,cortex-a15-pmu"
13 "arm,cortex-a12-pmu" 16 "arm,cortex-a12-pmu"
diff --git a/Documentation/devicetree/bindings/arm/psci.txt b/Documentation/devicetree/bindings/arm/psci.txt
index 5aa40ede0e99..a9adab84e2fe 100644
--- a/Documentation/devicetree/bindings/arm/psci.txt
+++ b/Documentation/devicetree/bindings/arm/psci.txt
@@ -31,6 +31,10 @@ Main node required properties:
31 support, but are permitted to be present for compatibility with 31 support, but are permitted to be present for compatibility with
32 existing software when "arm,psci" is later in the compatible list. 32 existing software when "arm,psci" is later in the compatible list.
33 33
34 * "arm,psci-1.0" : for implementations complying to PSCI 1.0. PSCI 1.0 is
35 backward compatible with PSCI 0.2 with minor specification updates,
36 as defined in the PSCI specification[2].
37
34 - method : The method of calling the PSCI firmware. Permitted 38 - method : The method of calling the PSCI firmware. Permitted
35 values are: 39 values are:
36 40
@@ -100,3 +104,5 @@ Case 3: PSCI v0.2 and PSCI v0.1.
100 104
101[1] Kernel documentation - ARM idle states bindings 105[1] Kernel documentation - ARM idle states bindings
102 Documentation/devicetree/bindings/arm/idle-states.txt 106 Documentation/devicetree/bindings/arm/idle-states.txt
107[2] Power State Coordination Interface (PSCI) specification
108 http://infocenter.arm.com/help/topic/com.arm.doc.den0022c/DEN0022C_Power_State_Coordination_Interface.pdf
diff --git a/Documentation/devicetree/bindings/arm/rockchip.txt b/Documentation/devicetree/bindings/arm/rockchip.txt
index af58cd74aeff..8e985dd2f181 100644
--- a/Documentation/devicetree/bindings/arm/rockchip.txt
+++ b/Documentation/devicetree/bindings/arm/rockchip.txt
@@ -17,6 +17,10 @@ Rockchip platforms device tree bindings
17 Required root node properties: 17 Required root node properties:
18 - compatible = "radxa,rock", "rockchip,rk3188"; 18 - compatible = "radxa,rock", "rockchip,rk3188";
19 19
20- Radxa Rock2 Square board:
21 Required root node properties:
22 - compatible = "radxa,rock2-square", "rockchip,rk3288";
23
20- Firefly Firefly-RK3288 board: 24- Firefly Firefly-RK3288 board:
21 Required root node properties: 25 Required root node properties:
22 - compatible = "firefly,firefly-rk3288", "rockchip,rk3288"; 26 - compatible = "firefly,firefly-rk3288", "rockchip,rk3288";
@@ -31,6 +35,13 @@ Rockchip platforms device tree bindings
31 Required root node properties: 35 Required root node properties:
32 - compatible = "netxeon,r89", "rockchip,rk3288"; 36 - compatible = "netxeon,r89", "rockchip,rk3288";
33 37
38- Google Jaq (Haier Chromebook 11 and more):
39 Required root node properties:
40 - compatible = "google,veyron-jaq-rev5", "google,veyron-jaq-rev4",
41 "google,veyron-jaq-rev3", "google,veyron-jaq-rev2",
42 "google,veyron-jaq-rev1", "google,veyron-jaq",
43 "google,veyron", "rockchip,rk3288";
44
34- Google Jerry (Hisense Chromebook C11 and more): 45- Google Jerry (Hisense Chromebook C11 and more):
35 Required root node properties: 46 Required root node properties:
36 - compatible = "google,veyron-jerry-rev7", "google,veyron-jerry-rev6", 47 - compatible = "google,veyron-jerry-rev7", "google,veyron-jerry-rev6",
diff --git a/Documentation/devicetree/bindings/arm/samsung-boards.txt b/Documentation/devicetree/bindings/arm/samsung-boards.txt
deleted file mode 100644
index 43589d2466a7..000000000000
--- a/Documentation/devicetree/bindings/arm/samsung-boards.txt
+++ /dev/null
@@ -1,27 +0,0 @@
1* Samsung's Exynos SoC based boards
2
3Required root node properties:
4 - compatible = should be one or more of the following.
5 - "samsung,monk" - for Exynos3250-based Samsung Simband board.
6 - "samsung,rinato" - for Exynos3250-based Samsung Gear2 board.
7 - "samsung,smdkv310" - for Exynos4210-based Samsung SMDKV310 eval board.
8 - "samsung,trats" - for Exynos4210-based Tizen Reference board.
9 - "samsung,universal_c210" - for Exynos4210-based Samsung board.
10 - "samsung,smdk4412", - for Exynos4412-based Samsung SMDK4412 eval board.
11 - "samsung,trats2" - for Exynos4412-based Tizen Reference board.
12 - "samsung,smdk5250" - for Exynos5250-based Samsung SMDK5250 eval board.
13 - "samsung,xyref5260" - for Exynos5260-based Samsung board.
14 - "samsung,smdk5410" - for Exynos5410-based Samsung SMDK5410 eval board.
15 - "samsung,smdk5420" - for Exynos5420-based Samsung SMDK5420 eval board.
16 - "samsung,sd5v1" - for Exynos5440-based Samsung board.
17 - "samsung,ssdk5440" - for Exynos5440-based Samsung board.
18
19Optional:
20 - firmware node, specifying presence and type of secure firmware:
21 - compatible: only "samsung,secure-firmware" is currently supported
22 - reg: address of non-secure SYSRAM used for communication with firmware
23
24 firmware@0203F000 {
25 compatible = "samsung,secure-firmware";
26 reg = <0x0203F000 0x1000>;
27 };
diff --git a/Documentation/devicetree/bindings/arm/samsung/samsung-boards.txt b/Documentation/devicetree/bindings/arm/samsung/samsung-boards.txt
new file mode 100644
index 000000000000..12129c011c8f
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/samsung/samsung-boards.txt
@@ -0,0 +1,69 @@
1* Samsung's Exynos SoC based boards
2
3Required root node properties:
4 - compatible = should be one or more of the following.
5 - "samsung,monk" - for Exynos3250-based Samsung Simband board.
6 - "samsung,rinato" - for Exynos3250-based Samsung Gear2 board.
7 - "samsung,smdkv310" - for Exynos4210-based Samsung SMDKV310 eval board.
8 - "samsung,trats" - for Exynos4210-based Tizen Reference board.
9 - "samsung,universal_c210" - for Exynos4210-based Samsung board.
10 - "samsung,smdk4412", - for Exynos4412-based Samsung SMDK4412 eval board.
11 - "samsung,trats2" - for Exynos4412-based Tizen Reference board.
12 - "samsung,smdk5250" - for Exynos5250-based Samsung SMDK5250 eval board.
13 - "samsung,xyref5260" - for Exynos5260-based Samsung board.
14 - "samsung,smdk5410" - for Exynos5410-based Samsung SMDK5410 eval board.
15 - "samsung,smdk5420" - for Exynos5420-based Samsung SMDK5420 eval board.
16 - "samsung,sd5v1" - for Exynos5440-based Samsung board.
17 - "samsung,ssdk5440" - for Exynos5440-based Samsung board.
18
19* Other companies Exynos SoC based
20 * FriendlyARM
21 - "friendlyarm,tiny4412" - for Exynos4412-based FriendlyARM
22 TINY4412 board.
23
24 * Google
25 - "google,pi" - for Exynos5800-based Google Peach Pi
26 Rev 10+ board,
27 also: "google,pi-rev16", "google,pi-rev15", "google,pi-rev14",
28 "google,pi-rev13", "google,pi-rev12", "google,pi-rev11",
29 "google,pi-rev10", "google,peach".
30
31 - "google,pit" - for Exynos5420-based Google Peach Pit
32 Rev 6+ (Exynos5420),
33 also: "google,pit-rev16", "google,pit-rev15", "google,pit-rev14",
34 "google,pit-rev13", "google,pit-rev12", "google,pit-rev11",
35 "google,pit-rev10", "google,pit-rev9", "google,pit-rev8",
36 "google,pit-rev7", "google,pit-rev6", "google,peach".
37
38 - "google,snow-rev4" - for Exynos5250-based Google Snow board,
39 also: "google,snow"
40 - "google,snow-rev5" - for Exynos5250-based Google Snow
41 Rev 5+ board.
42 - "google,spring" - for Exynos5250-based Google Spring board.
43
44 * Hardkernel
45 - "hardkernel,odroid-u3" - for Exynos4412-based Hardkernel Odroid U3.
46 - "hardkernel,odroid-x" - for Exynos4412-based Hardkernel Odroid X.
47 - "hardkernel,odroid-x2" - for Exynos4412-based Hardkernel Odroid X2.
48 - "hardkernel,odroid-xu3" - for Exynos5422-based Hardkernel Odroid XU3.
49 - "hardkernel,odroid-xu3-lite" - for Exynos5422-based Hardkernel
50 Odroid XU3 Lite board.
51 - "hardkernel,odroid-xu4" - for Exynos5422-based Hardkernel Odroid XU4.
52
53 * Insignal
54 - "insignal,arndale" - for Exynos5250-based Insignal Arndale board.
55 - "insignal,arndale-octa" - for Exynos5420-based Insignal Arndale
56 Octa board.
57 - "insignal,origen" - for Exynos4210-based Insignal Origen board.
58 - "insignal,origen4412 - for Exynos4412-based Insignal Origen board.
59
60
61Optional nodes:
62 - firmware node, specifying presence and type of secure firmware:
63 - compatible: only "samsung,secure-firmware" is currently supported
64 - reg: address of non-secure SYSRAM used for communication with firmware
65
66 firmware@0203F000 {
67 compatible = "samsung,secure-firmware";
68 reg = <0x0203F000 0x1000>;
69 };
diff --git a/Documentation/devicetree/bindings/arm/shmobile.txt b/Documentation/devicetree/bindings/arm/shmobile.txt
index c4f19b2e7dd9..40bb9007cd0d 100644
--- a/Documentation/devicetree/bindings/arm/shmobile.txt
+++ b/Documentation/devicetree/bindings/arm/shmobile.txt
@@ -39,8 +39,6 @@ Boards:
39 compatible = "renesas,armadillo800eva" 39 compatible = "renesas,armadillo800eva"
40 - BOCK-W 40 - BOCK-W
41 compatible = "renesas,bockw", "renesas,r8a7778" 41 compatible = "renesas,bockw", "renesas,r8a7778"
42 - BOCK-W - Reference Device Tree Implementation
43 compatible = "renesas,bockw-reference", "renesas,r8a7778"
44 - Genmai (RTK772100BC00000BR) 42 - Genmai (RTK772100BC00000BR)
45 compatible = "renesas,genmai", "renesas,r7s72100" 43 compatible = "renesas,genmai", "renesas,r7s72100"
46 - Gose 44 - Gose
@@ -57,7 +55,7 @@ Boards:
57 compatible = "renesas,lager", "renesas,r8a7790" 55 compatible = "renesas,lager", "renesas,r8a7790"
58 - Marzen 56 - Marzen
59 compatible = "renesas,marzen", "renesas,r8a7779" 57 compatible = "renesas,marzen", "renesas,r8a7779"
60 58 - Porter (M2-LCDP)
61Note: Reference Device Tree Implementations are temporary implementations 59 compatible = "renesas,porter", "renesas,r8a7791"
62 to ease the migration from platform devices to Device Tree, and are 60 - SILK (RTP0RC7794LCB00011S)
63 intended to be removed in the future. 61 compatible = "renesas,silk", "renesas,r8a7794"
diff --git a/Documentation/devicetree/bindings/arm/sunxi.txt b/Documentation/devicetree/bindings/arm/sunxi.txt
index 67da20539540..bb9b0faa919d 100644
--- a/Documentation/devicetree/bindings/arm/sunxi.txt
+++ b/Documentation/devicetree/bindings/arm/sunxi.txt
@@ -6,6 +6,7 @@ using one of the following compatible strings:
6 allwinner,sun4i-a10 6 allwinner,sun4i-a10
7 allwinner,sun5i-a10s 7 allwinner,sun5i-a10s
8 allwinner,sun5i-a13 8 allwinner,sun5i-a13
9 allwinner,sun5i-r8
9 allwinner,sun6i-a31 10 allwinner,sun6i-a31
10 allwinner,sun7i-a20 11 allwinner,sun7i-a20
11 allwinner,sun8i-a23 12 allwinner,sun8i-a23
diff --git a/Documentation/devicetree/bindings/nvec/nvidia,nvec.txt b/Documentation/devicetree/bindings/arm/tegra/nvidia,nvec.txt
index 5ae601e7f51f..5ae601e7f51f 100644
--- a/Documentation/devicetree/bindings/nvec/nvidia,nvec.txt
+++ b/Documentation/devicetree/bindings/arm/tegra/nvidia,nvec.txt
diff --git a/Documentation/devicetree/bindings/arm/twd.txt b/Documentation/devicetree/bindings/arm/twd.txt
index 75b8610939fa..383ea19c2bf0 100644
--- a/Documentation/devicetree/bindings/arm/twd.txt
+++ b/Documentation/devicetree/bindings/arm/twd.txt
@@ -19,6 +19,11 @@ interrupts.
19- reg : Specify the base address and the size of the TWD timer 19- reg : Specify the base address and the size of the TWD timer
20 register window. 20 register window.
21 21
22Optional
23
24- always-on : a boolean property. If present, the timer is powered through
25 an always-on power domain, therefore it never loses context.
26
22Example: 27Example:
23 28
24 twd-timer@2c000600 { 29 twd-timer@2c000600 {
diff --git a/Documentation/devicetree/bindings/arm/uniphier/cache-uniphier.txt b/Documentation/devicetree/bindings/arm/uniphier/cache-uniphier.txt
new file mode 100644
index 000000000000..d27a646f48a9
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/uniphier/cache-uniphier.txt
@@ -0,0 +1,60 @@
1UniPhier outer cache controller
2
3UniPhier SoCs are integrated with a full-custom outer cache controller system.
4All of them have a level 2 cache controller, and some have a level 3 cache
5controller as well.
6
7Required properties:
8- compatible: should be "socionext,uniphier-system-cache"
9- reg: offsets and lengths of the register sets for the device. It should
10 contain 3 regions: control register, revision register, operation register,
11 in this order.
12- cache-unified: specifies the cache is a unified cache.
13- cache-size: specifies the size in bytes of the cache
14- cache-sets: specifies the number of associativity sets of the cache
15- cache-line-size: specifies the line size in bytes
16- cache-level: specifies the level in the cache hierarchy. The value should
17 be 2 for L2 cache, 3 for L3 cache, etc.
18
19Optional properties:
20- next-level-cache: phandle to the next level cache if present. The next level
21 cache should be also compatible with "socionext,uniphier-system-cache".
22
23The L2 cache must exist to use the L3 cache; the cache hierarchy must be
24indicated correctly with "next-level-cache" properties.
25
26Example 1 (system with L2):
27 l2: l2-cache@500c0000 {
28 compatible = "socionext,uniphier-system-cache";
29 reg = <0x500c0000 0x2000>, <0x503c0100 0x4>,
30 <0x506c0000 0x400>;
31 cache-unified;
32 cache-size = <0x80000>;
33 cache-sets = <256>;
34 cache-line-size = <128>;
35 cache-level = <2>;
36 };
37
38Example 2 (system with L2 and L3):
39 l2: l2-cache@500c0000 {
40 compatible = "socionext,uniphier-system-cache";
41 reg = <0x500c0000 0x2000>, <0x503c0100 0x8>,
42 <0x506c0000 0x400>;
43 cache-unified;
44 cache-size = <0x200000>;
45 cache-sets = <512>;
46 cache-line-size = <128>;
47 cache-level = <2>;
48 next-level-cache = <&l3>;
49 };
50
51 l3: l3-cache@500c8000 {
52 compatible = "socionext,uniphier-system-cache";
53 reg = <0x500c8000 0x2000>, <0x503c8100 0x8>,
54 <0x506c8000 0x400>;
55 cache-unified;
56 cache-size = <0x400000>;
57 cache-sets = <512>;
58 cache-line-size = <256>;
59 cache-level = <3>;
60 };
diff --git a/Documentation/devicetree/bindings/ata/ahci-fsl-qoriq.txt b/Documentation/devicetree/bindings/ata/ahci-fsl-qoriq.txt
new file mode 100644
index 000000000000..032a7606b862
--- /dev/null
+++ b/Documentation/devicetree/bindings/ata/ahci-fsl-qoriq.txt
@@ -0,0 +1,21 @@
1Binding for Freescale QorIQ AHCI SATA Controller
2
3Required properties:
4 - reg: Physical base address and size of the controller's register area.
5 - compatible: Compatibility string. Must be 'fsl,<chip>-ahci', where
6 chip could be ls1021a, ls2080a, ls1043a etc.
7 - clocks: Input clock specifier. Refer to common clock bindings.
8 - interrupts: Interrupt specifier. Refer to interrupt binding.
9
10Optional properties:
11 - dma-coherent: Enable AHCI coherent DMA operation.
12 - reg-names: register area names when there are more than 1 register area.
13
14Examples:
15 sata@3200000 {
16 compatible = "fsl,ls1021a-ahci";
17 reg = <0x0 0x3200000 0x0 0x10000>;
18 interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
19 clocks = <&platform_clk 1>;
20 dma-coherent;
21 };
diff --git a/Documentation/devicetree/bindings/ata/ahci-platform.txt b/Documentation/devicetree/bindings/ata/ahci-platform.txt
index a2321819e7f5..c2340eeeb97f 100644
--- a/Documentation/devicetree/bindings/ata/ahci-platform.txt
+++ b/Documentation/devicetree/bindings/ata/ahci-platform.txt
@@ -16,8 +16,6 @@ Required properties:
16 - "snps,dwc-ahci" 16 - "snps,dwc-ahci"
17 - "snps,exynos5440-ahci" 17 - "snps,exynos5440-ahci"
18 - "snps,spear-ahci" 18 - "snps,spear-ahci"
19 - "fsl,qoriq-ahci" : for qoriq series socs which include ls1021, ls2085, etc.
20 - "fsl,<chip>-ahci" : chip could be ls1021, ls2085 etc.
21 - "generic-ahci" 19 - "generic-ahci"
22- interrupts : <interrupt mapping for SATA IRQ> 20- interrupts : <interrupt mapping for SATA IRQ>
23- reg : <registers mapping> 21- reg : <registers mapping>
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/board.txt b/Documentation/devicetree/bindings/board/fsl-board.txt
index cff38bdbc0e4..fb7b03ec2071 100644
--- a/Documentation/devicetree/bindings/powerpc/fsl/board.txt
+++ b/Documentation/devicetree/bindings/board/fsl-board.txt
@@ -21,11 +21,14 @@ Example:
21 21
22This is the memory-mapped registers for on board FPGA. 22This is the memory-mapped registers for on board FPGA.
23 23
24Required properities: 24Required properties:
25- compatible: should be a board-specific string followed by a string 25- compatible: should be a board-specific string followed by a string
26 indicating the type of FPGA. Example: 26 indicating the type of FPGA. Example:
27 "fsl,<board>-fpga", "fsl,fpga-pixis" 27 "fsl,<board>-fpga", "fsl,fpga-pixis", or
28 "fsl,<board>-fpga", "fsl,fpga-qixis"
28- reg: should contain the address and the length of the FPGA register set. 29- reg: should contain the address and the length of the FPGA register set.
30
31Optional properties:
29- interrupt-parent: should specify phandle for the interrupt controller. 32- interrupt-parent: should specify phandle for the interrupt controller.
30- interrupts: should specify event (wakeup) IRQ. 33- interrupts: should specify event (wakeup) IRQ.
31 34
@@ -38,6 +41,13 @@ Example (P1022DS):
38 interrupts = <8 8 0 0>; 41 interrupts = <8 8 0 0>;
39 }; 42 };
40 43
44Example (LS2080A-RDB):
45
46 cpld@3,0 {
47 compatible = "fsl,ls2080ardb-fpga", "fsl,fpga-qixis";
48 reg = <0x3 0 0x10000>;
49 };
50
41* Freescale BCSR GPIO banks 51* Freescale BCSR GPIO banks
42 52
43Some BCSR registers act as simple GPIO controllers, each such 53Some BCSR registers act as simple GPIO controllers, each such
diff --git a/Documentation/devicetree/bindings/bus/sunxi-rsb.txt b/Documentation/devicetree/bindings/bus/sunxi-rsb.txt
new file mode 100644
index 000000000000..3dd28343b6ce
--- /dev/null
+++ b/Documentation/devicetree/bindings/bus/sunxi-rsb.txt
@@ -0,0 +1,47 @@
1Allwinner Reduced Serial Bus (RSB) controller
2
3The RSB controller found on later Allwinner SoCs is an SMBus like 2 wire
4serial bus with 1 master and up to 15 slaves. It is represented by a node
5for the controller itself, and child nodes representing the slave devices.
6
7Required properties :
8
9 - reg : Offset and length of the register set for the controller.
10 - compatible : Shall be "allwinner,sun8i-a23-rsb".
11 - interrupts : The interrupt line associated to the RSB controller.
12 - clocks : The gate clk associated to the RSB controller.
13 - resets : The reset line associated to the RSB controller.
14 - #address-cells : shall be 1
15 - #size-cells : shall be 0
16
17Optional properties :
18
19 - clock-frequency : Desired RSB bus clock frequency in Hz. Maximum is 20MHz.
20 If not set this defaults to 3MHz.
21
22Child nodes:
23
24An RSB controller node can contain zero or more child nodes representing
25slave devices on the bus. Child 'reg' properties should contain the slave
26device's hardware address. The hardware address is hardwired in the device,
27which can normally be found in the datasheet.
28
29Example:
30
31 rsb@01f03400 {
32 compatible = "allwinner,sun8i-a23-rsb";
33 reg = <0x01f03400 0x400>;
34 interrupts = <0 39 4>;
35 clocks = <&apb0_gates 3>;
36 clock-frequency = <3000000>;
37 resets = <&apb0_rst 3>;
38 #address-cells = <1>;
39 #size-cells = <0>;
40
41 pmic@3e3 {
42 compatible = "...";
43 reg = <0x3e3>;
44
45 /* ... */
46 };
47 };
diff --git a/Documentation/devicetree/bindings/chosen.txt b/Documentation/devicetree/bindings/chosen.txt
index ed838f453f7a..6ae9d82d4c37 100644
--- a/Documentation/devicetree/bindings/chosen.txt
+++ b/Documentation/devicetree/bindings/chosen.txt
@@ -44,3 +44,11 @@ Implementation note: Linux will look for the property "linux,stdout-path" or
44on PowerPC "stdout" if "stdout-path" is not found. However, the 44on PowerPC "stdout" if "stdout-path" is not found. However, the
45"linux,stdout-path" and "stdout" properties are deprecated. New platforms 45"linux,stdout-path" and "stdout" properties are deprecated. New platforms
46should only use the "stdout-path" property. 46should only use the "stdout-path" property.
47
48linux,booted-from-kexec
49-----------------------
50
51This property is set (currently only on PowerPC, and only needed on
52book3e) by some versions of kexec-tools to tell the new kernel that it
53is being booted by kexec, as the booting environment may differ (e.g.
54a different secondary CPU release mechanism)
diff --git a/Documentation/devicetree/bindings/clock/at91-clock.txt b/Documentation/devicetree/bindings/clock/at91-clock.txt
index 5ba6450693b9..181bc8ac4e3a 100644
--- a/Documentation/devicetree/bindings/clock/at91-clock.txt
+++ b/Documentation/devicetree/bindings/clock/at91-clock.txt
@@ -77,6 +77,9 @@ Required properties:
77 "atmel,sama5d4-clk-h32mx": 77 "atmel,sama5d4-clk-h32mx":
78 at91 h32mx clock 78 at91 h32mx clock
79 79
80 "atmel,sama5d2-clk-generated":
81 at91 generated clock
82
80Required properties for SCKC node: 83Required properties for SCKC node:
81- reg : defines the IO memory reserved for the SCKC. 84- reg : defines the IO memory reserved for the SCKC.
82- #size-cells : shall be 0 (reg is used to encode clk id). 85- #size-cells : shall be 0 (reg is used to encode clk id).
@@ -461,3 +464,35 @@ For example:
461 compatible = "atmel,sama5d4-clk-h32mx"; 464 compatible = "atmel,sama5d4-clk-h32mx";
462 clocks = <&mck>; 465 clocks = <&mck>;
463 }; 466 };
467
468Required properties for generated clocks:
469- #size-cells : shall be 0 (reg is used to encode clk id).
470- #address-cells : shall be 1 (reg is used to encode clk id).
471- clocks : shall be the generated clock source phandles.
472 e.g. clocks = <&clk32k>, <&main>, <&plladiv>, <&utmi>, <&mck>, <&audio_pll_pmc>;
473- name: device tree node describing a specific generated clock.
474 * #clock-cells : from common clock binding; shall be set to 0.
475 * reg: peripheral id. See Atmel's datasheets to get a full
476 list of peripheral ids.
477 * atmel,clk-output-range : minimum and maximum clock frequency
478 (two u32 fields).
479
480For example:
481 gck {
482 compatible = "atmel,sama5d2-clk-generated";
483 #address-cells = <1>;
484 #size-cells = <0>;
485 clocks = <&clk32k>, <&main>, <&plladiv>, <&utmi>, <&mck>, <&audio_pll_pmc>;
486
487 tcb0_gclk: tcb0_gclk {
488 #clock-cells = <0>;
489 reg = <35>;
490 atmel,clk-output-range = <0 83000000>;
491 };
492
493 pwm_gclk: pwm_gclk {
494 #clock-cells = <0>;
495 reg = <38>;
496 atmel,clk-output-range = <0 83000000>;
497 };
498 };
diff --git a/Documentation/devicetree/bindings/clock/brcm,bcm2835-cprman.txt b/Documentation/devicetree/bindings/clock/brcm,bcm2835-cprman.txt
new file mode 100644
index 000000000000..e56a1df3a9d3
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/brcm,bcm2835-cprman.txt
@@ -0,0 +1,45 @@
1Broadcom BCM2835 CPRMAN clocks
2
3This binding uses the common clock binding:
4 Documentation/devicetree/bindings/clock/clock-bindings.txt
5
6The CPRMAN clock controller generates clocks in the audio power domain
7of the BCM2835. There is a level of PLLs deriving from an external
8oscillator, a level of PLL dividers that produce channels off of the
9few PLLs, and a level of mostly-generic clock generators sourcing from
10the PLL channels. Most other hardware components source from the
11clock generators, but a few (like the ARM or HDMI) will source from
12the PLL dividers directly.
13
14Required properties:
15- compatible: Should be "brcm,bcm2835-cprman"
16- #clock-cells: Should be <1>. The permitted clock-specifier values can be
17 found in include/dt-bindings/clock/bcm2835.h
18- reg: Specifies base physical address and size of the registers
19- clocks: The external oscillator clock phandle
20
21Example:
22
23 clk_osc: clock@3 {
24 compatible = "fixed-clock";
25 reg = <3>;
26 #clock-cells = <0>;
27 clock-output-names = "osc";
28 clock-frequency = <19200000>;
29 };
30
31 clocks: cprman@7e101000 {
32 compatible = "brcm,bcm2835-cprman";
33 #clock-cells = <1>;
34 reg = <0x7e101000 0x2000>;
35 clocks = <&clk_osc>;
36 };
37
38 i2c0: i2c@7e205000 {
39 compatible = "brcm,bcm2835-i2c";
40 reg = <0x7e205000 0x1000>;
41 interrupts = <2 21>;
42 clocks = <&clocks BCM2835_CLOCK_VPU>;
43 #address-cells = <1>;
44 #size-cells = <0>;
45 };
diff --git a/Documentation/devicetree/bindings/clock/brcm,iproc-clocks.txt b/Documentation/devicetree/bindings/clock/brcm,iproc-clocks.txt
index da8d9bb5751c..ede65a55e21b 100644
--- a/Documentation/devicetree/bindings/clock/brcm,iproc-clocks.txt
+++ b/Documentation/devicetree/bindings/clock/brcm,iproc-clocks.txt
@@ -130,3 +130,81 @@ These clock IDs are defined in:
130 ch3_unused mipipll 4 BCM_CYGNUS_MIPIPLL_CH3_UNUSED 130 ch3_unused mipipll 4 BCM_CYGNUS_MIPIPLL_CH3_UNUSED
131 ch4_unused mipipll 5 BCM_CYGNUS_MIPIPLL_CH4_UNUSED 131 ch4_unused mipipll 5 BCM_CYGNUS_MIPIPLL_CH4_UNUSED
132 ch5_unused mipipll 6 BCM_CYGNUS_MIPIPLL_CH5_UNUSED 132 ch5_unused mipipll 6 BCM_CYGNUS_MIPIPLL_CH5_UNUSED
133
134Northstar and Northstar Plus
135------
136PLL and leaf clock compatible strings for Northstar and Northstar Plus are:
137 "brcm,nsp-armpll"
138 "brcm,nsp-genpll"
139 "brcm,nsp-lcpll0"
140
141The following table defines the set of PLL/clock index and ID for Northstar and
142Northstar Plus. These clock IDs are defined in:
143 "include/dt-bindings/clock/bcm-nsp.h"
144
145 Clock Source Index ID
146 --- ----- ----- ---------
147 crystal N/A N/A N/A
148
149 armpll crystal N/A N/A
150
151 genpll crystal 0 BCM_NSP_GENPLL
152 phy genpll 1 BCM_NSP_GENPLL_PHY_CLK
153 ethernetclk genpll 2 BCM_NSP_GENPLL_ENET_SW_CLK
154 usbclk genpll 3 BCM_NSP_GENPLL_USB_PHY_REF_CLK
155 iprocfast genpll 4 BCM_NSP_GENPLL_IPROCFAST_CLK
156 sata1 genpll 5 BCM_NSP_GENPLL_SATA1_CLK
157 sata2 genpll 6 BCM_NSP_GENPLL_SATA2_CLK
158
159 lcpll0 crystal 0 BCM_NSP_LCPLL0
160 pcie_phy lcpll0 1 BCM_NSP_LCPLL0_PCIE_PHY_REF_CLK
161 sdio lcpll0 2 BCM_NSP_LCPLL0_SDIO_CLK
162 ddr_phy lcpll0 3 BCM_NSP_LCPLL0_DDR_PHY_CLK
163
164Northstar 2
165-----------
166PLL and leaf clock compatible strings for Northstar 2 are:
167 "brcm,ns2-genpll-scr"
168 "brcm,ns2-genpll-sw"
169 "brcm,ns2-lcpll-ddr"
170 "brcm,ns2-lcpll-ports"
171
172The following table defines the set of PLL/clock index and ID for Northstar 2.
173These clock IDs are defined in:
174 "include/dt-bindings/clock/bcm-ns2.h"
175
176 Clock Source Index ID
177 --- ----- ----- ---------
178 crystal N/A N/A N/A
179
180 genpll_scr crystal 0 BCM_NS2_GENPLL_SCR
181 scr genpll_scr 1 BCM_NS2_GENPLL_SCR_SCR_CLK
182 fs genpll_scr 2 BCM_NS2_GENPLL_SCR_FS_CLK
183 audio_ref genpll_scr 3 BCM_NS2_GENPLL_SCR_AUDIO_CLK
184 ch3_unused genpll_scr 4 BCM_NS2_GENPLL_SCR_CH3_UNUSED
185 ch4_unused genpll_scr 5 BCM_NS2_GENPLL_SCR_CH4_UNUSED
186 ch5_unused genpll_scr 6 BCM_NS2_GENPLL_SCR_CH5_UNUSED
187
188 genpll_sw crystal 0 BCM_NS2_GENPLL_SW
189 rpe genpll_sw 1 BCM_NS2_GENPLL_SW_RPE_CLK
190 250 genpll_sw 2 BCM_NS2_GENPLL_SW_250_CLK
191 nic genpll_sw 3 BCM_NS2_GENPLL_SW_NIC_CLK
192 chimp genpll_sw 4 BCM_NS2_GENPLL_SW_CHIMP_CLK
193 port genpll_sw 5 BCM_NS2_GENPLL_SW_PORT_CLK
194 sdio genpll_sw 6 BCM_NS2_GENPLL_SW_SDIO_CLK
195
196 lcpll_ddr crystal 0 BCM_NS2_LCPLL_DDR
197 pcie_sata_usb lcpll_ddr 1 BCM_NS2_LCPLL_DDR_PCIE_SATA_USB_CLK
198 ddr lcpll_ddr 2 BCM_NS2_LCPLL_DDR_DDR_CLK
199 ch2_unused lcpll_ddr 3 BCM_NS2_LCPLL_DDR_CH2_UNUSED
200 ch3_unused lcpll_ddr 4 BCM_NS2_LCPLL_DDR_CH3_UNUSED
201 ch4_unused lcpll_ddr 5 BCM_NS2_LCPLL_DDR_CH4_UNUSED
202 ch5_unused lcpll_ddr 6 BCM_NS2_LCPLL_DDR_CH5_UNUSED
203
204 lcpll_ports crystal 0 BCM_NS2_LCPLL_PORTS
205 wan lcpll_ports 1 BCM_NS2_LCPLL_PORTS_WAN_CLK
206 rgmii lcpll_ports 2 BCM_NS2_LCPLL_PORTS_RGMII_CLK
207 ch2_unused lcpll_ports 3 BCM_NS2_LCPLL_PORTS_CH2_UNUSED
208 ch3_unused lcpll_ports 4 BCM_NS2_LCPLL_PORTS_CH3_UNUSED
209 ch4_unused lcpll_ports 5 BCM_NS2_LCPLL_PORTS_CH4_UNUSED
210 ch5_unused lcpll_ports 6 BCM_NS2_LCPLL_PORTS_CH5_UNUSED
diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc.txt b/Documentation/devicetree/bindings/clock/qcom,gcc.txt
index 54c23f34f194..152dfaab2575 100644
--- a/Documentation/devicetree/bindings/clock/qcom,gcc.txt
+++ b/Documentation/devicetree/bindings/clock/qcom,gcc.txt
@@ -18,10 +18,14 @@ Required properties :
18- #clock-cells : shall contain 1 18- #clock-cells : shall contain 1
19- #reset-cells : shall contain 1 19- #reset-cells : shall contain 1
20 20
21Optional properties :
22- #power-domain-cells : shall contain 1
23
21Example: 24Example:
22 clock-controller@900000 { 25 clock-controller@900000 {
23 compatible = "qcom,gcc-msm8960"; 26 compatible = "qcom,gcc-msm8960";
24 reg = <0x900000 0x4000>; 27 reg = <0x900000 0x4000>;
25 #clock-cells = <1>; 28 #clock-cells = <1>;
26 #reset-cells = <1>; 29 #reset-cells = <1>;
30 #power-domain-cells = <1>;
27 }; 31 };
diff --git a/Documentation/devicetree/bindings/clock/qcom,mmcc.txt b/Documentation/devicetree/bindings/clock/qcom,mmcc.txt
index 29ebf84d25af..34e7614d5074 100644
--- a/Documentation/devicetree/bindings/clock/qcom,mmcc.txt
+++ b/Documentation/devicetree/bindings/clock/qcom,mmcc.txt
@@ -14,10 +14,14 @@ Required properties :
14- #clock-cells : shall contain 1 14- #clock-cells : shall contain 1
15- #reset-cells : shall contain 1 15- #reset-cells : shall contain 1
16 16
17Optional properties :
18- #power-domain-cells : shall contain 1
19
17Example: 20Example:
18 clock-controller@4000000 { 21 clock-controller@4000000 {
19 compatible = "qcom,mmcc-msm8960"; 22 compatible = "qcom,mmcc-msm8960";
20 reg = <0x4000000 0x1000>; 23 reg = <0x4000000 0x1000>;
21 #clock-cells = <1>; 24 #clock-cells = <1>;
22 #reset-cells = <1>; 25 #reset-cells = <1>;
26 #power-domain-cells = <1>;
23 }; 27 };
diff --git a/Documentation/devicetree/bindings/clock/qoriq-clock.txt b/Documentation/devicetree/bindings/clock/qoriq-clock.txt
index df4a259a6898..16a3ec433119 100644
--- a/Documentation/devicetree/bindings/clock/qoriq-clock.txt
+++ b/Documentation/devicetree/bindings/clock/qoriq-clock.txt
@@ -1,6 +1,6 @@
1* Clock Block on Freescale QorIQ Platforms 1* Clock Block on Freescale QorIQ Platforms
2 2
3Freescale qoriq chips take primary clocking input from the external 3Freescale QorIQ chips take primary clocking input from the external
4SYSCLK signal. The SYSCLK input (frequency) is multiplied using 4SYSCLK signal. The SYSCLK input (frequency) is multiplied using
5multiple phase locked loops (PLL) to create a variety of frequencies 5multiple phase locked loops (PLL) to create a variety of frequencies
6which can then be passed to a variety of internal logic, including 6which can then be passed to a variety of internal logic, including
@@ -13,14 +13,16 @@ which the chip complies.
13Chassis Version Example Chips 13Chassis Version Example Chips
14--------------- ------------- 14--------------- -------------
151.0 p4080, p5020, p5040 151.0 p4080, p5020, p5040
162.0 t4240, b4860, t1040 162.0 t4240, b4860
17 17
181. Clock Block Binding 181. Clock Block Binding
19 19
20Required properties: 20Required properties:
21- compatible: Should contain a specific clock block compatible string 21- compatible: Should contain a chip-specific clock block compatible
22 and a single chassis clock compatible string. 22 string and (if applicable) may contain a chassis-version clock
23 Clock block strings include, but not limited to, one of the: 23 compatible string.
24
25 Chip-specific strings are of the form "fsl,<chip>-clockgen", such as:
24 * "fsl,p2041-clockgen" 26 * "fsl,p2041-clockgen"
25 * "fsl,p3041-clockgen" 27 * "fsl,p3041-clockgen"
26 * "fsl,p4080-clockgen" 28 * "fsl,p4080-clockgen"
@@ -30,15 +32,14 @@ Required properties:
30 * "fsl,b4420-clockgen" 32 * "fsl,b4420-clockgen"
31 * "fsl,b4860-clockgen" 33 * "fsl,b4860-clockgen"
32 * "fsl,ls1021a-clockgen" 34 * "fsl,ls1021a-clockgen"
33 Chassis clock strings include: 35 Chassis-version clock strings include:
34 * "fsl,qoriq-clockgen-1.0": for chassis 1.0 clocks 36 * "fsl,qoriq-clockgen-1.0": for chassis 1.0 clocks
35 * "fsl,qoriq-clockgen-2.0": for chassis 2.0 clocks 37 * "fsl,qoriq-clockgen-2.0": for chassis 2.0 clocks
36- reg: Describes the address of the device's resources within the 38- reg: Describes the address of the device's resources within the
37 address space defined by its parent bus, and resource zero 39 address space defined by its parent bus, and resource zero
38 represents the clock register set 40 represents the clock register set
39- clock-frequency: Input system clock frequency
40 41
41Recommended properties: 42Optional properties:
42- ranges: Allows valid translation between child's address space and 43- ranges: Allows valid translation between child's address space and
43 parent's. Must be present if the device has sub-nodes. 44 parent's. Must be present if the device has sub-nodes.
44- #address-cells: Specifies the number of cells used to represent 45- #address-cells: Specifies the number of cells used to represent
@@ -47,8 +48,46 @@ Recommended properties:
47- #size-cells: Specifies the number of cells used to represent 48- #size-cells: Specifies the number of cells used to represent
48 the size of an address. Must be present if the device has 49 the size of an address. Must be present if the device has
49 sub-nodes and set to 1 if present 50 sub-nodes and set to 1 if present
51- clock-frequency: Input system clock frequency (SYSCLK)
52- clocks: If clock-frequency is not specified, sysclk may be provided
53 as an input clock. Either clock-frequency or clocks must be
54 provided.
55
562. Clock Provider
57
58The clockgen node should act as a clock provider, though in older device
59trees the children of the clockgen node are the clock providers.
60
61When the clockgen node is a clock provider, #clock-cells = <2>.
62The first cell of the clock specifier is the clock type, and the
63second cell is the clock index for the specified type.
64
65 Type# Name Index Cell
66 0 sysclk must be 0
67 1 cmux index (n in CLKCnCSR)
68 2 hwaccel index (n in CLKCGnHWACSR)
69 3 fman 0 for fm1, 1 for fm2
70 4 platform pll 0=pll, 1=pll/2, 2=pll/3, 3=pll/4
71
723. Example
73
74 clockgen: global-utilities@e1000 {
75 compatible = "fsl,p5020-clockgen", "fsl,qoriq-clockgen-1.0";
76 clock-frequency = <133333333>;
77 reg = <0xe1000 0x1000>;
78 #clock-cells = <2>;
79 };
80
81 fman@400000 {
82 ...
83 clocks = <&clockgen 3 0>;
84 ...
85 };
86}
874. Legacy Child Nodes
50 88
512. Clock Provider/Consumer Binding 89NOTE: These nodes are deprecated. Kernels should continue to support
90device trees with these nodes, but new device trees should not use them.
52 91
53Most of the bindings are from the common clock binding[1]. 92Most of the bindings are from the common clock binding[1].
54 [1] Documentation/devicetree/bindings/clock/clock-bindings.txt 93 [1] Documentation/devicetree/bindings/clock/clock-bindings.txt
@@ -82,7 +121,7 @@ Recommended properties:
82- reg: Should be the offset and length of clock block base address. 121- reg: Should be the offset and length of clock block base address.
83 The length should be 4. 122 The length should be 4.
84 123
85Example for clock block and clock provider: 124Legacy Example:
86/ { 125/ {
87 clockgen: global-utilities@e1000 { 126 clockgen: global-utilities@e1000 {
88 compatible = "fsl,p5020-clockgen", "fsl,qoriq-clockgen-1.0"; 127 compatible = "fsl,p5020-clockgen", "fsl,qoriq-clockgen-1.0";
@@ -142,7 +181,7 @@ Example for clock block and clock provider:
142 }; 181 };
143}; 182};
144 183
145Example for clock consumer: 184Example for legacy clock consumer:
146 185
147/ { 186/ {
148 cpu0: PowerPC,e5500@0 { 187 cpu0: PowerPC,e5500@0 {
diff --git a/Documentation/devicetree/bindings/clock/renesas,cpg-div6-clocks.txt b/Documentation/devicetree/bindings/clock/renesas,cpg-div6-clocks.txt
index 5ddb68418655..38dcf0370143 100644
--- a/Documentation/devicetree/bindings/clock/renesas,cpg-div6-clocks.txt
+++ b/Documentation/devicetree/bindings/clock/renesas,cpg-div6-clocks.txt
@@ -1,7 +1,7 @@
1* Renesas CPG DIV6 Clock 1* Renesas CPG DIV6 Clock
2 2
3The CPG DIV6 clocks are variable factor clocks provided by the Clock Pulse 3The CPG DIV6 clocks are variable factor clocks provided by the Clock Pulse
4Generator (CPG). They clock input is divided by a configurable factor from 1 4Generator (CPG). Their clock input is divided by a configurable factor from 1
5to 64. 5to 64.
6 6
7Required Properties: 7Required Properties:
diff --git a/Documentation/devicetree/bindings/clock/renesas,cpg-mssr.txt b/Documentation/devicetree/bindings/clock/renesas,cpg-mssr.txt
new file mode 100644
index 000000000000..59297d34b208
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/renesas,cpg-mssr.txt
@@ -0,0 +1,69 @@
1* Renesas Clock Pulse Generator / Module Standby and Software Reset
2
3On Renesas ARM SoCs (SH/R-Mobile, R-Car, RZ), the CPG (Clock Pulse Generator)
4and MSSR (Module Standby and Software Reset) blocks are intimately connected,
5and share the same register block.
6
7They provide the following functionalities:
8 - The CPG block generates various core clocks,
9 - The MSSR block provides two functions:
10 1. Module Standby, providing a Clock Domain to control the clock supply
11 to individual SoC devices,
12 2. Reset Control, to perform a software reset of individual SoC devices.
13
14Required Properties:
15 - compatible: Must be one of:
16 - "renesas,r8a7795-cpg-mssr" for the r8a7795 SoC
17
18 - reg: Base address and length of the memory resource used by the CPG/MSSR
19 block
20
21 - clocks: References to external parent clocks, one entry for each entry in
22 clock-names
23 - clock-names: List of external parent clock names. Valid names are:
24 - "extal" (r8a7795)
25 - "extalr" (r8a7795)
26
27 - #clock-cells: Must be 2
28 - For CPG core clocks, the two clock specifier cells must be "CPG_CORE"
29 and a core clock reference, as defined in
30 <dt-bindings/clock/*-cpg-mssr.h>.
31 - For module clocks, the two clock specifier cells must be "CPG_MOD" and
32 a module number, as defined in the datasheet.
33
34 - #power-domain-cells: Must be 0
35 - SoC devices that are part of the CPG/MSSR Clock Domain and can be
36 power-managed through Module Standby should refer to the CPG device
37 node in their "power-domains" property, as documented by the generic PM
38 Domain bindings in
39 Documentation/devicetree/bindings/power/power_domain.txt.
40
41
42Examples
43--------
44
45 - CPG device node:
46
47 cpg: clock-controller@e6150000 {
48 compatible = "renesas,r8a7795-cpg-mssr";
49 reg = <0 0xe6150000 0 0x1000>;
50 clocks = <&extal_clk>, <&extalr_clk>;
51 clock-names = "extal", "extalr";
52 #clock-cells = <2>;
53 #power-domain-cells = <0>;
54 };
55
56
57 - CPG/MSSR Clock Domain member device node:
58
59 scif2: serial@e6e88000 {
60 compatible = "renesas,scif-r8a7795", "renesas,scif";
61 reg = <0 0xe6e88000 0 64>;
62 interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>;
63 clocks = <&cpg CPG_MOD 310>;
64 clock-names = "sci_ick";
65 dmas = <&dmac1 0x13>, <&dmac1 0x12>;
66 dma-names = "tx", "rx";
67 power-domains = <&cpg>;
68 status = "disabled";
69 };
diff --git a/Documentation/devicetree/bindings/clock/silabs,si514.txt b/Documentation/devicetree/bindings/clock/silabs,si514.txt
new file mode 100644
index 000000000000..ea1a9dbc63b6
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/silabs,si514.txt
@@ -0,0 +1,24 @@
1Binding for Silicon Labs 514 programmable I2C clock generator.
2
3Reference
4This binding uses the common clock binding[1]. Details about the device can be
5found in the datasheet[2].
6
7[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
8[2] Si514 datasheet
9 http://www.silabs.com/Support%20Documents/TechnicalDocs/si514.pdf
10
11Required properties:
12 - compatible: Shall be "silabs,si514"
13 - reg: I2C device address.
14 - #clock-cells: From common clock bindings: Shall be 0.
15
16Optional properties:
17 - clock-output-names: From common clock bindings. Recommended to be "si514".
18
19Example:
20 si514: clock-generator@55 {
21 reg = <0x55>;
22 #clock-cells = <0>;
23 compatible = "silabs,si514";
24 };
diff --git a/Documentation/devicetree/bindings/clock/st/st,clkgen-pll.txt b/Documentation/devicetree/bindings/clock/st/st,clkgen-pll.txt
index d8b168ebd5f1..844b3a0976bf 100644
--- a/Documentation/devicetree/bindings/clock/st/st,clkgen-pll.txt
+++ b/Documentation/devicetree/bindings/clock/st/st,clkgen-pll.txt
@@ -23,6 +23,7 @@ Required properties:
23 "st,stih407-plls-c32-a9", "st,clkgen-plls-c32" 23 "st,stih407-plls-c32-a9", "st,clkgen-plls-c32"
24 "sst,plls-c32-cx_0", "st,clkgen-plls-c32" 24 "sst,plls-c32-cx_0", "st,clkgen-plls-c32"
25 "sst,plls-c32-cx_1", "st,clkgen-plls-c32" 25 "sst,plls-c32-cx_1", "st,clkgen-plls-c32"
26 "st,stih418-plls-c28-a9", "st,clkgen-plls-c32"
26 27
27 "st,stih415-gpu-pll-c32", "st,clkgengpu-pll-c32" 28 "st,stih415-gpu-pll-c32", "st,clkgengpu-pll-c32"
28 "st,stih416-gpu-pll-c32", "st,clkgengpu-pll-c32" 29 "st,stih416-gpu-pll-c32", "st,clkgengpu-pll-c32"
diff --git a/Documentation/devicetree/bindings/crypto/fsl-sec4.txt b/Documentation/devicetree/bindings/crypto/fsl-sec4.txt
index 6831d025ec24..adeca34c5a33 100644
--- a/Documentation/devicetree/bindings/crypto/fsl-sec4.txt
+++ b/Documentation/devicetree/bindings/crypto/fsl-sec4.txt
@@ -441,7 +441,7 @@ EXAMPLE:
441 regmap = <&snvs>; 441 regmap = <&snvs>;
442 interrupts = <0 4 0x4> 442 interrupts = <0 4 0x4>
443 linux,keycode = <116>; /* KEY_POWER */ 443 linux,keycode = <116>; /* KEY_POWER */
444 wakeup; 444 wakeup-source;
445 }; 445 };
446 446
447===================================================================== 447=====================================================================
@@ -530,7 +530,7 @@ FULL EXAMPLE
530 regmap = <&sec_mon>; 530 regmap = <&sec_mon>;
531 interrupts = <0 4 0x4>; 531 interrupts = <0 4 0x4>;
532 linux,keycode = <116>; /* KEY_POWER */ 532 linux,keycode = <116>; /* KEY_POWER */
533 wakeup; 533 wakeup-source;
534 }; 534 };
535 }; 535 };
536 536
diff --git a/Documentation/devicetree/bindings/video/arm,pl11x.txt b/Documentation/devicetree/bindings/display/arm,pl11x.txt
index 3e3039a8a253..3e3039a8a253 100644
--- a/Documentation/devicetree/bindings/video/arm,pl11x.txt
+++ b/Documentation/devicetree/bindings/display/arm,pl11x.txt
diff --git a/Documentation/devicetree/bindings/drm/armada/marvell,dove-lcd.txt b/Documentation/devicetree/bindings/display/armada/marvell,dove-lcd.txt
index 46525ea3e646..46525ea3e646 100644
--- a/Documentation/devicetree/bindings/drm/armada/marvell,dove-lcd.txt
+++ b/Documentation/devicetree/bindings/display/armada/marvell,dove-lcd.txt
diff --git a/Documentation/devicetree/bindings/video/atmel,lcdc.txt b/Documentation/devicetree/bindings/display/atmel,lcdc.txt
index ecb8da063d07..ecb8da063d07 100644
--- a/Documentation/devicetree/bindings/video/atmel,lcdc.txt
+++ b/Documentation/devicetree/bindings/display/atmel,lcdc.txt
diff --git a/Documentation/devicetree/bindings/drm/atmel/hlcdc-dc.txt b/Documentation/devicetree/bindings/display/atmel/hlcdc-dc.txt
index ebc1a914bda3..ebc1a914bda3 100644
--- a/Documentation/devicetree/bindings/drm/atmel/hlcdc-dc.txt
+++ b/Documentation/devicetree/bindings/display/atmel/hlcdc-dc.txt
diff --git a/Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt b/Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt
new file mode 100644
index 000000000000..56a961aa5061
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt
@@ -0,0 +1,65 @@
1Broadcom VC4 (VideoCore4) GPU
2
3The VC4 device present on the Raspberry Pi includes a display system
4with HDMI output and the HVS (Hardware Video Scaler) for compositing
5display planes.
6
7Required properties for VC4:
8- compatible: Should be "brcm,bcm2835-vc4"
9
10Required properties for Pixel Valve:
11- compatible: Should be one of "brcm,bcm2835-pixelvalve0",
12 "brcm,bcm2835-pixelvalve1", or "brcm,bcm2835-pixelvalve2"
13- reg: Physical base address and length of the PV's registers
14- interrupts: The interrupt number
15 See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt
16
17Required properties for HVS:
18- compatible: Should be "brcm,bcm2835-hvs"
19- reg: Physical base address and length of the HVS's registers
20- interrupts: The interrupt number
21 See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt
22
23Required properties for HDMI
24- compatible: Should be "brcm,bcm2835-hdmi"
25- reg: Physical base address and length of the two register ranges
26 ("HDMI" and "HD", in that order)
27- interrupts: The interrupt numbers
28 See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt
29- ddc: phandle of the I2C controller used for DDC EDID probing
30- clocks: a) hdmi: The HDMI state machine clock
31 b) pixel: The pixel clock.
32
33Optional properties for HDMI:
34- hpd-gpios: The GPIO pin for HDMI hotplug detect (if it doesn't appear
35 as an interrupt/status bit in the HDMI controller
36 itself). See bindings/pinctrl/brcm,bcm2835-gpio.txt
37
38Example:
39pixelvalve@7e807000 {
40 compatible = "brcm,bcm2835-pixelvalve2";
41 reg = <0x7e807000 0x100>;
42 interrupts = <2 10>; /* pixelvalve */
43};
44
45hvs@7e400000 {
46 compatible = "brcm,bcm2835-hvs";
47 reg = <0x7e400000 0x6000>;
48 interrupts = <2 1>;
49};
50
51hdmi: hdmi@7e902000 {
52 compatible = "brcm,bcm2835-hdmi";
53 reg = <0x7e902000 0x600>,
54 <0x7e808000 0x100>;
55 interrupts = <2 8>, <2 9>;
56 ddc = <&i2c2>;
57 hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>;
58 clocks = <&clocks BCM2835_PLLH_PIX>,
59 <&clocks BCM2835_CLOCK_HSM>;
60 clock-names = "pixel", "hdmi";
61};
62
63vc4: gpu {
64 compatible = "brcm,bcm2835-vc4";
65};
diff --git a/Documentation/devicetree/bindings/video/adi,adv7123.txt b/Documentation/devicetree/bindings/display/bridge/adi,adv7123.txt
index a6b2b2b8f3d9..a6b2b2b8f3d9 100644
--- a/Documentation/devicetree/bindings/video/adi,adv7123.txt
+++ b/Documentation/devicetree/bindings/display/bridge/adi,adv7123.txt
diff --git a/Documentation/devicetree/bindings/video/adi,adv7511.txt b/Documentation/devicetree/bindings/display/bridge/adi,adv7511.txt
index 96c25ee01501..96c25ee01501 100644
--- a/Documentation/devicetree/bindings/video/adi,adv7511.txt
+++ b/Documentation/devicetree/bindings/display/bridge/adi,adv7511.txt
diff --git a/Documentation/devicetree/bindings/drm/bridge/dw_hdmi.txt b/Documentation/devicetree/bindings/display/bridge/dw_hdmi.txt
index a905c1413558..dc1452f0d5d8 100644
--- a/Documentation/devicetree/bindings/drm/bridge/dw_hdmi.txt
+++ b/Documentation/devicetree/bindings/display/bridge/dw_hdmi.txt
@@ -14,8 +14,8 @@ Required properties:
14-port@[X]: SoC specific port nodes with endpoint definitions as defined 14-port@[X]: SoC specific port nodes with endpoint definitions as defined
15 in Documentation/devicetree/bindings/media/video-interfaces.txt, 15 in Documentation/devicetree/bindings/media/video-interfaces.txt,
16 please refer to the SoC specific binding document: 16 please refer to the SoC specific binding document:
17 * Documentation/devicetree/bindings/drm/imx/hdmi.txt 17 * Documentation/devicetree/bindings/display/imx/hdmi.txt
18 * Documentation/devicetree/bindings/video/dw_hdmi-rockchip.txt 18 * Documentation/devicetree/bindings/display/rockchip/dw_hdmi-rockchip.txt
19 19
20Optional properties 20Optional properties
21- reg-io-width: the width of the reg:1,4, default set to 1 if not present 21- reg-io-width: the width of the reg:1,4, default set to 1 if not present
diff --git a/Documentation/devicetree/bindings/video/bridge/ps8622.txt b/Documentation/devicetree/bindings/display/bridge/ps8622.txt
index c989c3807f2b..c989c3807f2b 100644
--- a/Documentation/devicetree/bindings/video/bridge/ps8622.txt
+++ b/Documentation/devicetree/bindings/display/bridge/ps8622.txt
diff --git a/Documentation/devicetree/bindings/video/bridge/ptn3460.txt b/Documentation/devicetree/bindings/display/bridge/ptn3460.txt
index 361971ba104d..361971ba104d 100644
--- a/Documentation/devicetree/bindings/video/bridge/ptn3460.txt
+++ b/Documentation/devicetree/bindings/display/bridge/ptn3460.txt
diff --git a/Documentation/devicetree/bindings/drm/i2c/tda998x.txt b/Documentation/devicetree/bindings/display/bridge/tda998x.txt
index e9e4bce40760..e9e4bce40760 100644
--- a/Documentation/devicetree/bindings/drm/i2c/tda998x.txt
+++ b/Documentation/devicetree/bindings/display/bridge/tda998x.txt
diff --git a/Documentation/devicetree/bindings/video/thine,thc63lvdm83d b/Documentation/devicetree/bindings/display/bridge/thine,thc63lvdm83d.txt
index 527e236e9a2a..527e236e9a2a 100644
--- a/Documentation/devicetree/bindings/video/thine,thc63lvdm83d
+++ b/Documentation/devicetree/bindings/display/bridge/thine,thc63lvdm83d.txt
diff --git a/Documentation/devicetree/bindings/video/cirrus,clps711x-fb.txt b/Documentation/devicetree/bindings/display/cirrus,clps711x-fb.txt
index 6fc3c6adeefa..d685be898d0c 100644
--- a/Documentation/devicetree/bindings/video/cirrus,clps711x-fb.txt
+++ b/Documentation/devicetree/bindings/display/cirrus,clps711x-fb.txt
@@ -6,7 +6,7 @@ Required properties:
6 location and size of the framebuffer memory. 6 location and size of the framebuffer memory.
7- clocks : phandle + clock specifier pair of the FB reference clock. 7- clocks : phandle + clock specifier pair of the FB reference clock.
8- display : phandle to a display node as described in 8- display : phandle to a display node as described in
9 Documentation/devicetree/bindings/video/display-timing.txt. 9 Documentation/devicetree/bindings/display/display-timing.txt.
10 Additionally, the display node has to define properties: 10 Additionally, the display node has to define properties:
11 - bits-per-pixel: Bits per pixel. 11 - bits-per-pixel: Bits per pixel.
12 - ac-prescale : LCD AC bias frequency. This frequency is the required 12 - ac-prescale : LCD AC bias frequency. This frequency is the required
diff --git a/Documentation/devicetree/bindings/video/analog-tv-connector.txt b/Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt
index 0c0970c210ab..0c0970c210ab 100644
--- a/Documentation/devicetree/bindings/video/analog-tv-connector.txt
+++ b/Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt
diff --git a/Documentation/devicetree/bindings/video/dvi-connector.txt b/Documentation/devicetree/bindings/display/connector/dvi-connector.txt
index fc53f7c60bc6..fc53f7c60bc6 100644
--- a/Documentation/devicetree/bindings/video/dvi-connector.txt
+++ b/Documentation/devicetree/bindings/display/connector/dvi-connector.txt
diff --git a/Documentation/devicetree/bindings/video/hdmi-connector.txt b/Documentation/devicetree/bindings/display/connector/hdmi-connector.txt
index acd5668b1ce1..acd5668b1ce1 100644
--- a/Documentation/devicetree/bindings/video/hdmi-connector.txt
+++ b/Documentation/devicetree/bindings/display/connector/hdmi-connector.txt
diff --git a/Documentation/devicetree/bindings/video/vga-connector.txt b/Documentation/devicetree/bindings/display/connector/vga-connector.txt
index c727f298e7ad..c727f298e7ad 100644
--- a/Documentation/devicetree/bindings/video/vga-connector.txt
+++ b/Documentation/devicetree/bindings/display/connector/vga-connector.txt
diff --git a/Documentation/devicetree/bindings/video/exynos-mic.txt b/Documentation/devicetree/bindings/display/exynos/exynos-mic.txt
index 0fba2ee6440a..0fba2ee6440a 100644
--- a/Documentation/devicetree/bindings/video/exynos-mic.txt
+++ b/Documentation/devicetree/bindings/display/exynos/exynos-mic.txt
diff --git a/Documentation/devicetree/bindings/video/exynos5433-decon.txt b/Documentation/devicetree/bindings/display/exynos/exynos5433-decon.txt
index 377afbf5122a..377afbf5122a 100644
--- a/Documentation/devicetree/bindings/video/exynos5433-decon.txt
+++ b/Documentation/devicetree/bindings/display/exynos/exynos5433-decon.txt
diff --git a/Documentation/devicetree/bindings/video/exynos7-decon.txt b/Documentation/devicetree/bindings/display/exynos/exynos7-decon.txt
index f5f9c8d4a55a..3938caacf11c 100644
--- a/Documentation/devicetree/bindings/video/exynos7-decon.txt
+++ b/Documentation/devicetree/bindings/display/exynos/exynos7-decon.txt
@@ -38,7 +38,7 @@ Optional Properties:
38 Can be used in case timings cannot be provided otherwise 38 Can be used in case timings cannot be provided otherwise
39 or to override timings provided by the panel. 39 or to override timings provided by the panel.
40 40
41[1]: Documentation/devicetree/bindings/video/display-timing.txt 41[1]: Documentation/devicetree/bindings/display/display-timing.txt
42 42
43Example: 43Example:
44 44
diff --git a/Documentation/devicetree/bindings/video/exynos_dp.txt b/Documentation/devicetree/bindings/display/exynos/exynos_dp.txt
index 7a3a9cdb86ab..64693f2ebc51 100644
--- a/Documentation/devicetree/bindings/video/exynos_dp.txt
+++ b/Documentation/devicetree/bindings/display/exynos/exynos_dp.txt
@@ -50,7 +50,7 @@ Required properties for dp-controller:
50 number of lanes supported by the panel. 50 number of lanes supported by the panel.
51 LANE_COUNT1 = 1, LANE_COUNT2 = 2, LANE_COUNT4 = 4 51 LANE_COUNT1 = 1, LANE_COUNT2 = 2, LANE_COUNT4 = 4
52 - display-timings: timings for the connected panel as described by 52 - display-timings: timings for the connected panel as described by
53 Documentation/devicetree/bindings/video/display-timing.txt 53 Documentation/devicetree/bindings/display/display-timing.txt
54 54
55Optional properties for dp-controller: 55Optional properties for dp-controller:
56 -interlaced: 56 -interlaced:
diff --git a/Documentation/devicetree/bindings/video/exynos_dsim.txt b/Documentation/devicetree/bindings/display/exynos/exynos_dsim.txt
index 0be036270661..0e6f0c024858 100644
--- a/Documentation/devicetree/bindings/video/exynos_dsim.txt
+++ b/Documentation/devicetree/bindings/display/exynos/exynos_dsim.txt
@@ -49,7 +49,7 @@ Video interfaces:
49 mode 49 mode
50 - samsung,esc-clock-frequency: specifies DSI frequency in escape mode 50 - samsung,esc-clock-frequency: specifies DSI frequency in escape mode
51 51
52[1]: Documentation/devicetree/bindings/mipi/dsi/mipi-dsi-bus.txt 52[1]: Documentation/devicetree/bindings/display/mipi-dsi-bus.txt
53[2]: Documentation/devicetree/bindings/media/video-interfaces.txt 53[2]: Documentation/devicetree/bindings/media/video-interfaces.txt
54 54
55Example: 55Example:
diff --git a/Documentation/devicetree/bindings/video/exynos_hdmi.txt b/Documentation/devicetree/bindings/display/exynos/exynos_hdmi.txt
index 1fd8cf9cbfac..1fd8cf9cbfac 100644
--- a/Documentation/devicetree/bindings/video/exynos_hdmi.txt
+++ b/Documentation/devicetree/bindings/display/exynos/exynos_hdmi.txt
diff --git a/Documentation/devicetree/bindings/video/exynos_hdmiddc.txt b/Documentation/devicetree/bindings/display/exynos/exynos_hdmiddc.txt
index 41eee971562b..41eee971562b 100644
--- a/Documentation/devicetree/bindings/video/exynos_hdmiddc.txt
+++ b/Documentation/devicetree/bindings/display/exynos/exynos_hdmiddc.txt
diff --git a/Documentation/devicetree/bindings/video/exynos_hdmiphy.txt b/Documentation/devicetree/bindings/display/exynos/exynos_hdmiphy.txt
index 162f641f7639..162f641f7639 100644
--- a/Documentation/devicetree/bindings/video/exynos_hdmiphy.txt
+++ b/Documentation/devicetree/bindings/display/exynos/exynos_hdmiphy.txt
diff --git a/Documentation/devicetree/bindings/video/exynos_mixer.txt b/Documentation/devicetree/bindings/display/exynos/exynos_mixer.txt
index 3e38128f866b..3e38128f866b 100644
--- a/Documentation/devicetree/bindings/video/exynos_mixer.txt
+++ b/Documentation/devicetree/bindings/display/exynos/exynos_mixer.txt
diff --git a/Documentation/devicetree/bindings/video/samsung-fimd.txt b/Documentation/devicetree/bindings/display/exynos/samsung-fimd.txt
index a8bbbde03e79..27c3ce0db16a 100644
--- a/Documentation/devicetree/bindings/video/samsung-fimd.txt
+++ b/Documentation/devicetree/bindings/display/exynos/samsung-fimd.txt
@@ -82,7 +82,7 @@ in [2]. The following are properties specific to those nodes:
82 3 - for parallel output, 82 3 - for parallel output,
83 4 - for write-back interface 83 4 - for write-back interface
84 84
85[1]: Documentation/devicetree/bindings/video/display-timing.txt 85[1]: Documentation/devicetree/bindings/display/display-timing.txt
86[2]: Documentation/devicetree/bindings/media/video-interfaces.txt 86[2]: Documentation/devicetree/bindings/media/video-interfaces.txt
87 87
88Example: 88Example:
diff --git a/Documentation/devicetree/bindings/video/fsl,dcu.txt b/Documentation/devicetree/bindings/display/fsl,dcu.txt
index ebf1be9ae393..ebf1be9ae393 100644
--- a/Documentation/devicetree/bindings/video/fsl,dcu.txt
+++ b/Documentation/devicetree/bindings/display/fsl,dcu.txt
diff --git a/Documentation/devicetree/bindings/video/fsl,imx-fb.txt b/Documentation/devicetree/bindings/display/imx/fsl,imx-fb.txt
index 8c8c2f4e4c3f..00d5f8ea7ec6 100644
--- a/Documentation/devicetree/bindings/video/fsl,imx-fb.txt
+++ b/Documentation/devicetree/bindings/display/imx/fsl,imx-fb.txt
@@ -9,7 +9,7 @@ Required properties:
9 9
10Required nodes: 10Required nodes:
11- display: Phandle to a display node as described in 11- display: Phandle to a display node as described in
12 Documentation/devicetree/bindings/video/display-timing.txt 12 Documentation/devicetree/bindings/display/display-timing.txt
13 Additional, the display node has to define properties: 13 Additional, the display node has to define properties:
14 - bits-per-pixel: Bits per pixel 14 - bits-per-pixel: Bits per pixel
15 - fsl,pcr: LCDC PCR value 15 - fsl,pcr: LCDC PCR value
diff --git a/Documentation/devicetree/bindings/drm/imx/fsl-imx-drm.txt b/Documentation/devicetree/bindings/display/imx/fsl-imx-drm.txt
index 971c3eedb1c7..971c3eedb1c7 100644
--- a/Documentation/devicetree/bindings/drm/imx/fsl-imx-drm.txt
+++ b/Documentation/devicetree/bindings/display/imx/fsl-imx-drm.txt
diff --git a/Documentation/devicetree/bindings/drm/imx/hdmi.txt b/Documentation/devicetree/bindings/display/imx/hdmi.txt
index 1b756cf9afb0..1b756cf9afb0 100644
--- a/Documentation/devicetree/bindings/drm/imx/hdmi.txt
+++ b/Documentation/devicetree/bindings/display/imx/hdmi.txt
diff --git a/Documentation/devicetree/bindings/drm/imx/ldb.txt b/Documentation/devicetree/bindings/display/imx/ldb.txt
index 9a21366436f6..0a175d991b52 100644
--- a/Documentation/devicetree/bindings/drm/imx/ldb.txt
+++ b/Documentation/devicetree/bindings/display/imx/ldb.txt
@@ -63,7 +63,7 @@ Required properties:
63 63
64Optional properties (required if display-timings are used): 64Optional properties (required if display-timings are used):
65 - display-timings : A node that describes the display timings as defined in 65 - display-timings : A node that describes the display timings as defined in
66 Documentation/devicetree/bindings/video/display-timing.txt. 66 Documentation/devicetree/bindings/display/display-timing.txt.
67 - fsl,data-mapping : should be "spwg" or "jeida" 67 - fsl,data-mapping : should be "spwg" or "jeida"
68 This describes how the color bits are laid out in the 68 This describes how the color bits are laid out in the
69 serialized LVDS signal. 69 serialized LVDS signal.
diff --git a/Documentation/devicetree/bindings/display/marvell,pxa2xx-lcdc.txt b/Documentation/devicetree/bindings/display/marvell,pxa2xx-lcdc.txt
new file mode 100644
index 000000000000..309c47f25b87
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/marvell,pxa2xx-lcdc.txt
@@ -0,0 +1,34 @@
1PXA LCD Controller
2------------------
3
4Required properties:
5 - compatible : one of these
6 "marvell,pxa2xx-lcdc",
7 "marvell,pxa270-lcdc",
8 "marvell,pxa300-lcdc"
9 - reg : should contain 1 register range (address and length).
10 - interrupts : framebuffer controller interrupt.
11 - clocks: phandle to input clocks
12
13Required nodes:
14 - port: connection to the LCD panel (see video-interfaces.txt)
15 This node must have its properties bus-width and remote-endpoint set.
16 If the panel is not a TFT color panel, then a "lcd-type" property in
17 the panel should specify the panel type.
18 This panel node should be in the board dts.
19
20Example:
21 lcd-controller@40500000 {
22 compatible = "marvell,pxa2xx-lcdc";
23 reg = <0x44000000 0x10000>;
24 interrupts = <17>;
25 clocks = <&clks CLK_LCD>;
26 status = "okay";
27
28 port {
29 lcdc_out: endpoint {
30 remote-endpoint = <&panel_in>;
31 bus-width = <16>;
32 };
33 };
34 };
diff --git a/Documentation/devicetree/bindings/mipi/dsi/mipi-dsi-bus.txt b/Documentation/devicetree/bindings/display/mipi-dsi-bus.txt
index 973c27273772..973c27273772 100644
--- a/Documentation/devicetree/bindings/mipi/dsi/mipi-dsi-bus.txt
+++ b/Documentation/devicetree/bindings/display/mipi-dsi-bus.txt
diff --git a/Documentation/devicetree/bindings/drm/msm/dsi.txt b/Documentation/devicetree/bindings/display/msm/dsi.txt
index d56923cd5590..f344b9e49198 100644
--- a/Documentation/devicetree/bindings/drm/msm/dsi.txt
+++ b/Documentation/devicetree/bindings/display/msm/dsi.txt
@@ -28,7 +28,7 @@ Required properties:
28 28
29Optional properties: 29Optional properties:
30- panel@0: Node of panel connected to this DSI controller. 30- panel@0: Node of panel connected to this DSI controller.
31 See files in Documentation/devicetree/bindings/panel/ for each supported 31 See files in Documentation/devicetree/bindings/display/panel/ for each supported
32 panel. 32 panel.
33- qcom,dual-dsi-mode: Boolean value indicating if the DSI controller is 33- qcom,dual-dsi-mode: Boolean value indicating if the DSI controller is
34 driving a panel which needs 2 DSI links. 34 driving a panel which needs 2 DSI links.
diff --git a/Documentation/devicetree/bindings/drm/msm/edp.txt b/Documentation/devicetree/bindings/display/msm/edp.txt
index 3a20f6ea5898..3a20f6ea5898 100644
--- a/Documentation/devicetree/bindings/drm/msm/edp.txt
+++ b/Documentation/devicetree/bindings/display/msm/edp.txt
diff --git a/Documentation/devicetree/bindings/drm/msm/gpu.txt b/Documentation/devicetree/bindings/display/msm/gpu.txt
index 67d0a58dbb77..67d0a58dbb77 100644
--- a/Documentation/devicetree/bindings/drm/msm/gpu.txt
+++ b/Documentation/devicetree/bindings/display/msm/gpu.txt
diff --git a/Documentation/devicetree/bindings/drm/msm/hdmi.txt b/Documentation/devicetree/bindings/display/msm/hdmi.txt
index e926239e1101..379ee2ea9a3d 100644
--- a/Documentation/devicetree/bindings/drm/msm/hdmi.txt
+++ b/Documentation/devicetree/bindings/display/msm/hdmi.txt
@@ -2,6 +2,7 @@ Qualcomm adreno/snapdragon hdmi output
2 2
3Required properties: 3Required properties:
4- compatible: one of the following 4- compatible: one of the following
5 * "qcom,hdmi-tx-8996"
5 * "qcom,hdmi-tx-8994" 6 * "qcom,hdmi-tx-8994"
6 * "qcom,hdmi-tx-8084" 7 * "qcom,hdmi-tx-8084"
7 * "qcom,hdmi-tx-8974" 8 * "qcom,hdmi-tx-8974"
@@ -21,6 +22,7 @@ Required properties:
21Optional properties: 22Optional properties:
22- qcom,hdmi-tx-mux-en-gpio: hdmi mux enable pin 23- qcom,hdmi-tx-mux-en-gpio: hdmi mux enable pin
23- qcom,hdmi-tx-mux-sel-gpio: hdmi mux select pin 24- qcom,hdmi-tx-mux-sel-gpio: hdmi mux select pin
25- power-domains: reference to the power domain(s), if available.
24- pinctrl-names: the pin control state names; should contain "default" 26- pinctrl-names: the pin control state names; should contain "default"
25- pinctrl-0: the default pinctrl state (active) 27- pinctrl-0: the default pinctrl state (active)
26- pinctrl-1: the "sleep" pinctrl state 28- pinctrl-1: the "sleep" pinctrl state
@@ -35,6 +37,7 @@ Example:
35 reg-names = "core_physical"; 37 reg-names = "core_physical";
36 reg = <0x04a00000 0x1000>; 38 reg = <0x04a00000 0x1000>;
37 interrupts = <GIC_SPI 79 0>; 39 interrupts = <GIC_SPI 79 0>;
40 power-domains = <&mmcc MDSS_GDSC>;
38 clock-names = 41 clock-names =
39 "core_clk", 42 "core_clk",
40 "master_iface_clk", 43 "master_iface_clk",
diff --git a/Documentation/devicetree/bindings/drm/msm/mdp.txt b/Documentation/devicetree/bindings/display/msm/mdp.txt
index 1a0598e5279d..0833edaba4c3 100644
--- a/Documentation/devicetree/bindings/drm/msm/mdp.txt
+++ b/Documentation/devicetree/bindings/display/msm/mdp.txt
@@ -11,13 +11,14 @@ Required properties:
11- clock-names: the following clocks are required: 11- clock-names: the following clocks are required:
12 * "core_clk" 12 * "core_clk"
13 * "iface_clk" 13 * "iface_clk"
14 * "lut_clk"
15 * "src_clk" 14 * "src_clk"
16 * "hdmi_clk" 15 * "hdmi_clk"
17 * "mpd_clk" 16 * "mpd_clk"
18 17
19Optional properties: 18Optional properties:
20- gpus: phandle for gpu device 19- gpus: phandle for gpu device
20- clock-names: the following clocks are optional:
21 * "lut_clk"
21 22
22Example: 23Example:
23 24
diff --git a/Documentation/devicetree/bindings/fb/mxsfb.txt b/Documentation/devicetree/bindings/display/mxsfb.txt
index 96ec5179c8a0..96ec5179c8a0 100644
--- a/Documentation/devicetree/bindings/fb/mxsfb.txt
+++ b/Documentation/devicetree/bindings/display/mxsfb.txt
diff --git a/Documentation/devicetree/bindings/panel/ampire,am800480r3tmqwa1h.txt b/Documentation/devicetree/bindings/display/panel/ampire,am800480r3tmqwa1h.txt
index 83e2cae1cc1b..83e2cae1cc1b 100644
--- a/Documentation/devicetree/bindings/panel/ampire,am800480r3tmqwa1h.txt
+++ b/Documentation/devicetree/bindings/display/panel/ampire,am800480r3tmqwa1h.txt
diff --git a/Documentation/devicetree/bindings/panel/auo,b080uan01.txt b/Documentation/devicetree/bindings/display/panel/auo,b080uan01.txt
index bae0e2b51467..bae0e2b51467 100644
--- a/Documentation/devicetree/bindings/panel/auo,b080uan01.txt
+++ b/Documentation/devicetree/bindings/display/panel/auo,b080uan01.txt
diff --git a/Documentation/devicetree/bindings/panel/auo,b101aw03.txt b/Documentation/devicetree/bindings/display/panel/auo,b101aw03.txt
index 72e088a4fb3a..72e088a4fb3a 100644
--- a/Documentation/devicetree/bindings/panel/auo,b101aw03.txt
+++ b/Documentation/devicetree/bindings/display/panel/auo,b101aw03.txt
diff --git a/Documentation/devicetree/bindings/panel/auo,b101ean01.txt b/Documentation/devicetree/bindings/display/panel/auo,b101ean01.txt
index 3590b0741619..3590b0741619 100644
--- a/Documentation/devicetree/bindings/panel/auo,b101ean01.txt
+++ b/Documentation/devicetree/bindings/display/panel/auo,b101ean01.txt
diff --git a/Documentation/devicetree/bindings/panel/auo,b101xtn01.txt b/Documentation/devicetree/bindings/display/panel/auo,b101xtn01.txt
index 889d511d66c9..889d511d66c9 100644
--- a/Documentation/devicetree/bindings/panel/auo,b101xtn01.txt
+++ b/Documentation/devicetree/bindings/display/panel/auo,b101xtn01.txt
diff --git a/Documentation/devicetree/bindings/panel/auo,b116xw03.txt b/Documentation/devicetree/bindings/display/panel/auo,b116xw03.txt
index 690d0a568ef3..690d0a568ef3 100644
--- a/Documentation/devicetree/bindings/panel/auo,b116xw03.txt
+++ b/Documentation/devicetree/bindings/display/panel/auo,b116xw03.txt
diff --git a/Documentation/devicetree/bindings/panel/auo,b133htn01.txt b/Documentation/devicetree/bindings/display/panel/auo,b133htn01.txt
index 302226b5bb55..302226b5bb55 100644
--- a/Documentation/devicetree/bindings/panel/auo,b133htn01.txt
+++ b/Documentation/devicetree/bindings/display/panel/auo,b133htn01.txt
diff --git a/Documentation/devicetree/bindings/panel/auo,b133xtn01.txt b/Documentation/devicetree/bindings/display/panel/auo,b133xtn01.txt
index 7443b7c76769..7443b7c76769 100644
--- a/Documentation/devicetree/bindings/panel/auo,b133xtn01.txt
+++ b/Documentation/devicetree/bindings/display/panel/auo,b133xtn01.txt
diff --git a/Documentation/devicetree/bindings/panel/avic,tm070ddh03.txt b/Documentation/devicetree/bindings/display/panel/avic,tm070ddh03.txt
index b6f2f3e8f44e..b6f2f3e8f44e 100644
--- a/Documentation/devicetree/bindings/panel/avic,tm070ddh03.txt
+++ b/Documentation/devicetree/bindings/display/panel/avic,tm070ddh03.txt
diff --git a/Documentation/devicetree/bindings/panel/chunghwa,claa101wa01a.txt b/Documentation/devicetree/bindings/display/panel/chunghwa,claa101wa01a.txt
index f24614e4d5ec..f24614e4d5ec 100644
--- a/Documentation/devicetree/bindings/panel/chunghwa,claa101wa01a.txt
+++ b/Documentation/devicetree/bindings/display/panel/chunghwa,claa101wa01a.txt
diff --git a/Documentation/devicetree/bindings/panel/chunghwa,claa101wb03.txt b/Documentation/devicetree/bindings/display/panel/chunghwa,claa101wb03.txt
index 0ab2c05a4c22..0ab2c05a4c22 100644
--- a/Documentation/devicetree/bindings/panel/chunghwa,claa101wb03.txt
+++ b/Documentation/devicetree/bindings/display/panel/chunghwa,claa101wb03.txt
diff --git a/Documentation/devicetree/bindings/video/display-timing.txt b/Documentation/devicetree/bindings/display/panel/display-timing.txt
index e1d4a0b59612..e1d4a0b59612 100644
--- a/Documentation/devicetree/bindings/video/display-timing.txt
+++ b/Documentation/devicetree/bindings/display/panel/display-timing.txt
diff --git a/Documentation/devicetree/bindings/panel/edt,et057090dhu.txt b/Documentation/devicetree/bindings/display/panel/edt,et057090dhu.txt
index 4903d7b1d947..4903d7b1d947 100644
--- a/Documentation/devicetree/bindings/panel/edt,et057090dhu.txt
+++ b/Documentation/devicetree/bindings/display/panel/edt,et057090dhu.txt
diff --git a/Documentation/devicetree/bindings/panel/edt,et070080dh6.txt b/Documentation/devicetree/bindings/display/panel/edt,et070080dh6.txt
index 20cb38e836e4..20cb38e836e4 100644
--- a/Documentation/devicetree/bindings/panel/edt,et070080dh6.txt
+++ b/Documentation/devicetree/bindings/display/panel/edt,et070080dh6.txt
diff --git a/Documentation/devicetree/bindings/panel/edt,etm0700g0dh6.txt b/Documentation/devicetree/bindings/display/panel/edt,etm0700g0dh6.txt
index ee4b18053e40..ee4b18053e40 100644
--- a/Documentation/devicetree/bindings/panel/edt,etm0700g0dh6.txt
+++ b/Documentation/devicetree/bindings/display/panel/edt,etm0700g0dh6.txt
diff --git a/Documentation/devicetree/bindings/panel/foxlink,fl500wvr00-a0t.txt b/Documentation/devicetree/bindings/display/panel/foxlink,fl500wvr00-a0t.txt
index b47f9d87bc19..b47f9d87bc19 100644
--- a/Documentation/devicetree/bindings/panel/foxlink,fl500wvr00-a0t.txt
+++ b/Documentation/devicetree/bindings/display/panel/foxlink,fl500wvr00-a0t.txt
diff --git a/Documentation/devicetree/bindings/panel/giantplus,gpg482739qs5.txt b/Documentation/devicetree/bindings/display/panel/giantplus,gpg482739qs5.txt
index 24b0b624434b..24b0b624434b 100644
--- a/Documentation/devicetree/bindings/panel/giantplus,gpg482739qs5.txt
+++ b/Documentation/devicetree/bindings/display/panel/giantplus,gpg482739qs5.txt
diff --git a/Documentation/devicetree/bindings/panel/hannstar,hsd070pww1.txt b/Documentation/devicetree/bindings/display/panel/hannstar,hsd070pww1.txt
index 7da1d5c038ff..7da1d5c038ff 100644
--- a/Documentation/devicetree/bindings/panel/hannstar,hsd070pww1.txt
+++ b/Documentation/devicetree/bindings/display/panel/hannstar,hsd070pww1.txt
diff --git a/Documentation/devicetree/bindings/panel/hannstar,hsd100pxn1.txt b/Documentation/devicetree/bindings/display/panel/hannstar,hsd100pxn1.txt
index 8270319a99de..8270319a99de 100644
--- a/Documentation/devicetree/bindings/panel/hannstar,hsd100pxn1.txt
+++ b/Documentation/devicetree/bindings/display/panel/hannstar,hsd100pxn1.txt
diff --git a/Documentation/devicetree/bindings/panel/hit,tx23d38vm0caa.txt b/Documentation/devicetree/bindings/display/panel/hit,tx23d38vm0caa.txt
index 04caaae19af6..04caaae19af6 100644
--- a/Documentation/devicetree/bindings/panel/hit,tx23d38vm0caa.txt
+++ b/Documentation/devicetree/bindings/display/panel/hit,tx23d38vm0caa.txt
diff --git a/Documentation/devicetree/bindings/panel/innolux,at043tn24.txt b/Documentation/devicetree/bindings/display/panel/innolux,at043tn24.txt
index 4104226b61bc..4104226b61bc 100644
--- a/Documentation/devicetree/bindings/panel/innolux,at043tn24.txt
+++ b/Documentation/devicetree/bindings/display/panel/innolux,at043tn24.txt
diff --git a/Documentation/devicetree/bindings/panel/innolux,g121i1-l01.txt b/Documentation/devicetree/bindings/display/panel/innolux,g121i1-l01.txt
index 2743b07cd2f2..2743b07cd2f2 100644
--- a/Documentation/devicetree/bindings/panel/innolux,g121i1-l01.txt
+++ b/Documentation/devicetree/bindings/display/panel/innolux,g121i1-l01.txt
diff --git a/Documentation/devicetree/bindings/panel/innolux,n116bge.txt b/Documentation/devicetree/bindings/display/panel/innolux,n116bge.txt
index 081bb939ed31..081bb939ed31 100644
--- a/Documentation/devicetree/bindings/panel/innolux,n116bge.txt
+++ b/Documentation/devicetree/bindings/display/panel/innolux,n116bge.txt
diff --git a/Documentation/devicetree/bindings/panel/innolux,n156bge-l21.txt b/Documentation/devicetree/bindings/display/panel/innolux,n156bge-l21.txt
index 7825844aafdf..7825844aafdf 100644
--- a/Documentation/devicetree/bindings/panel/innolux,n156bge-l21.txt
+++ b/Documentation/devicetree/bindings/display/panel/innolux,n156bge-l21.txt
diff --git a/Documentation/devicetree/bindings/panel/innolux,zj070na-01p.txt b/Documentation/devicetree/bindings/display/panel/innolux,zj070na-01p.txt
index 824f87f1526d..824f87f1526d 100644
--- a/Documentation/devicetree/bindings/panel/innolux,zj070na-01p.txt
+++ b/Documentation/devicetree/bindings/display/panel/innolux,zj070na-01p.txt
diff --git a/Documentation/devicetree/bindings/panel/lg,lb070wv8.txt b/Documentation/devicetree/bindings/display/panel/lg,lb070wv8.txt
index a7588e5259cf..a7588e5259cf 100644
--- a/Documentation/devicetree/bindings/panel/lg,lb070wv8.txt
+++ b/Documentation/devicetree/bindings/display/panel/lg,lb070wv8.txt
diff --git a/Documentation/devicetree/bindings/panel/lg,ld070wx3-sl01.txt b/Documentation/devicetree/bindings/display/panel/lg,ld070wx3-sl01.txt
index 5e649cb9aa1a..5e649cb9aa1a 100644
--- a/Documentation/devicetree/bindings/panel/lg,ld070wx3-sl01.txt
+++ b/Documentation/devicetree/bindings/display/panel/lg,ld070wx3-sl01.txt
diff --git a/Documentation/devicetree/bindings/panel/lg,lg4573.txt b/Documentation/devicetree/bindings/display/panel/lg,lg4573.txt
index 824441f4e95a..824441f4e95a 100644
--- a/Documentation/devicetree/bindings/panel/lg,lg4573.txt
+++ b/Documentation/devicetree/bindings/display/panel/lg,lg4573.txt
diff --git a/Documentation/devicetree/bindings/panel/lg,lh500wx1-sd03.txt b/Documentation/devicetree/bindings/display/panel/lg,lh500wx1-sd03.txt
index a04fd2b2e73d..a04fd2b2e73d 100644
--- a/Documentation/devicetree/bindings/panel/lg,lh500wx1-sd03.txt
+++ b/Documentation/devicetree/bindings/display/panel/lg,lh500wx1-sd03.txt
diff --git a/Documentation/devicetree/bindings/panel/lg,lp129qe.txt b/Documentation/devicetree/bindings/display/panel/lg,lp129qe.txt
index 9f262e0c5a2e..9f262e0c5a2e 100644
--- a/Documentation/devicetree/bindings/panel/lg,lp129qe.txt
+++ b/Documentation/devicetree/bindings/display/panel/lg,lp129qe.txt
diff --git a/Documentation/devicetree/bindings/video/lgphilips,lb035q02.txt b/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.txt
index 1a1e653e5407..1a1e653e5407 100644
--- a/Documentation/devicetree/bindings/video/lgphilips,lb035q02.txt
+++ b/Documentation/devicetree/bindings/display/panel/lgphilips,lb035q02.txt
diff --git a/Documentation/devicetree/bindings/panel/nec,nl4827hc19-05b.txt b/Documentation/devicetree/bindings/display/panel/nec,nl4827hc19-05b.txt
index 8e1914d1edb8..8e1914d1edb8 100644
--- a/Documentation/devicetree/bindings/panel/nec,nl4827hc19-05b.txt
+++ b/Documentation/devicetree/bindings/display/panel/nec,nl4827hc19-05b.txt
diff --git a/Documentation/devicetree/bindings/panel/okaya,rs800480t-7x0gp.txt b/Documentation/devicetree/bindings/display/panel/okaya,rs800480t-7x0gp.txt
index ddf8e211d382..ddf8e211d382 100644
--- a/Documentation/devicetree/bindings/panel/okaya,rs800480t-7x0gp.txt
+++ b/Documentation/devicetree/bindings/display/panel/okaya,rs800480t-7x0gp.txt
diff --git a/Documentation/devicetree/bindings/panel/ortustech,com43h4m85ulc.txt b/Documentation/devicetree/bindings/display/panel/ortustech,com43h4m85ulc.txt
index de19e9398618..de19e9398618 100644
--- a/Documentation/devicetree/bindings/panel/ortustech,com43h4m85ulc.txt
+++ b/Documentation/devicetree/bindings/display/panel/ortustech,com43h4m85ulc.txt
diff --git a/Documentation/devicetree/bindings/panel/panasonic,vvx10f004b00.txt b/Documentation/devicetree/bindings/display/panel/panasonic,vvx10f004b00.txt
index d328b0341bf4..d328b0341bf4 100644
--- a/Documentation/devicetree/bindings/panel/panasonic,vvx10f004b00.txt
+++ b/Documentation/devicetree/bindings/display/panel/panasonic,vvx10f004b00.txt
diff --git a/Documentation/devicetree/bindings/video/panel-dpi.txt b/Documentation/devicetree/bindings/display/panel/panel-dpi.txt
index a40180b05bab..216c894d4f99 100644
--- a/Documentation/devicetree/bindings/video/panel-dpi.txt
+++ b/Documentation/devicetree/bindings/display/panel/panel-dpi.txt
@@ -10,7 +10,7 @@ Optional properties:
10 10
11Required nodes: 11Required nodes:
12- "panel-timing" containing video timings 12- "panel-timing" containing video timings
13 (Documentation/devicetree/bindings/video/display-timing.txt) 13 (Documentation/devicetree/bindings/display/display-timing.txt)
14- Video port for DPI input 14- Video port for DPI input
15 15
16Example 16Example
diff --git a/Documentation/devicetree/bindings/video/panel-dsi-cm.txt b/Documentation/devicetree/bindings/display/panel/panel-dsi-cm.txt
index dce48eb9db57..dce48eb9db57 100644
--- a/Documentation/devicetree/bindings/video/panel-dsi-cm.txt
+++ b/Documentation/devicetree/bindings/display/panel/panel-dsi-cm.txt
diff --git a/Documentation/devicetree/bindings/panel/samsung,ld9040.txt b/Documentation/devicetree/bindings/display/panel/samsung,ld9040.txt
index 07c36c3f7b52..fc595d9b985b 100644
--- a/Documentation/devicetree/bindings/panel/samsung,ld9040.txt
+++ b/Documentation/devicetree/bindings/display/panel/samsung,ld9040.txt
@@ -20,7 +20,7 @@ The device node can contain one 'port' child node with one child
20'endpoint' node, according to the bindings defined in [3]. This 20'endpoint' node, according to the bindings defined in [3]. This
21node should describe panel's video bus. 21node should describe panel's video bus.
22 22
23[1]: Documentation/devicetree/bindings/video/display-timing.txt 23[1]: Documentation/devicetree/bindings/display/display-timing.txt
24[2]: Documentation/devicetree/bindings/spi/spi-bus.txt 24[2]: Documentation/devicetree/bindings/spi/spi-bus.txt
25[3]: Documentation/devicetree/bindings/media/video-interfaces.txt 25[3]: Documentation/devicetree/bindings/media/video-interfaces.txt
26 26
diff --git a/Documentation/devicetree/bindings/panel/samsung,ltn101nt05.txt b/Documentation/devicetree/bindings/display/panel/samsung,ltn101nt05.txt
index ef522c6bb85f..ef522c6bb85f 100644
--- a/Documentation/devicetree/bindings/panel/samsung,ltn101nt05.txt
+++ b/Documentation/devicetree/bindings/display/panel/samsung,ltn101nt05.txt
diff --git a/Documentation/devicetree/bindings/panel/samsung,ltn140at29-301.txt b/Documentation/devicetree/bindings/display/panel/samsung,ltn140at29-301.txt
index e7f969d891cc..e7f969d891cc 100644
--- a/Documentation/devicetree/bindings/panel/samsung,ltn140at29-301.txt
+++ b/Documentation/devicetree/bindings/display/panel/samsung,ltn140at29-301.txt
diff --git a/Documentation/devicetree/bindings/panel/samsung,s6e8aa0.txt b/Documentation/devicetree/bindings/display/panel/samsung,s6e8aa0.txt
index e7ee988e3156..25701c81b5e0 100644
--- a/Documentation/devicetree/bindings/panel/samsung,s6e8aa0.txt
+++ b/Documentation/devicetree/bindings/display/panel/samsung,s6e8aa0.txt
@@ -21,7 +21,7 @@ The device node can contain one 'port' child node with one child
21'endpoint' node, according to the bindings defined in [2]. This 21'endpoint' node, according to the bindings defined in [2]. This
22node should describe panel's video bus. 22node should describe panel's video bus.
23 23
24[1]: Documentation/devicetree/bindings/video/display-timing.txt 24[1]: Documentation/devicetree/bindings/display/display-timing.txt
25[2]: Documentation/devicetree/bindings/media/video-interfaces.txt 25[2]: Documentation/devicetree/bindings/media/video-interfaces.txt
26 26
27Example: 27Example:
diff --git a/Documentation/devicetree/bindings/panel/sharp,lq101r1sx01.txt b/Documentation/devicetree/bindings/display/panel/sharp,lq101r1sx01.txt
index f522bb8e47e1..f522bb8e47e1 100644
--- a/Documentation/devicetree/bindings/panel/sharp,lq101r1sx01.txt
+++ b/Documentation/devicetree/bindings/display/panel/sharp,lq101r1sx01.txt
diff --git a/Documentation/devicetree/bindings/video/sharp,ls037v7dw01.txt b/Documentation/devicetree/bindings/display/panel/sharp,ls037v7dw01.txt
index 0cc8981e9d49..0cc8981e9d49 100644
--- a/Documentation/devicetree/bindings/video/sharp,ls037v7dw01.txt
+++ b/Documentation/devicetree/bindings/display/panel/sharp,ls037v7dw01.txt
diff --git a/Documentation/devicetree/bindings/panel/shelly,sca07010-bfn-lnn.txt b/Documentation/devicetree/bindings/display/panel/shelly,sca07010-bfn-lnn.txt
index fc1ea9e26c94..fc1ea9e26c94 100644
--- a/Documentation/devicetree/bindings/panel/shelly,sca07010-bfn-lnn.txt
+++ b/Documentation/devicetree/bindings/display/panel/shelly,sca07010-bfn-lnn.txt
diff --git a/Documentation/devicetree/bindings/panel/simple-panel.txt b/Documentation/devicetree/bindings/display/panel/simple-panel.txt
index 1341bbf4aa3d..1341bbf4aa3d 100644
--- a/Documentation/devicetree/bindings/panel/simple-panel.txt
+++ b/Documentation/devicetree/bindings/display/panel/simple-panel.txt
diff --git a/Documentation/devicetree/bindings/video/sony,acx565akm.txt b/Documentation/devicetree/bindings/display/panel/sony,acx565akm.txt
index e12333280749..e12333280749 100644
--- a/Documentation/devicetree/bindings/video/sony,acx565akm.txt
+++ b/Documentation/devicetree/bindings/display/panel/sony,acx565akm.txt
diff --git a/Documentation/devicetree/bindings/video/toppoly,td028ttec1.txt b/Documentation/devicetree/bindings/display/panel/toppoly,td028ttec1.txt
index 7175dc3740ac..7175dc3740ac 100644
--- a/Documentation/devicetree/bindings/video/toppoly,td028ttec1.txt
+++ b/Documentation/devicetree/bindings/display/panel/toppoly,td028ttec1.txt
diff --git a/Documentation/devicetree/bindings/video/tpo,td043mtea1.txt b/Documentation/devicetree/bindings/display/panel/tpo,td043mtea1.txt
index ec6d62975162..ec6d62975162 100644
--- a/Documentation/devicetree/bindings/video/tpo,td043mtea1.txt
+++ b/Documentation/devicetree/bindings/display/panel/tpo,td043mtea1.txt
diff --git a/Documentation/devicetree/bindings/video/renesas,du.txt b/Documentation/devicetree/bindings/display/renesas,du.txt
index c902323928f7..eccd4f4867b2 100644
--- a/Documentation/devicetree/bindings/video/renesas,du.txt
+++ b/Documentation/devicetree/bindings/display/renesas,du.txt
@@ -5,7 +5,9 @@ Required Properties:
5 - compatible: must be one of the following. 5 - compatible: must be one of the following.
6 - "renesas,du-r8a7779" for R8A7779 (R-Car H1) compatible DU 6 - "renesas,du-r8a7779" for R8A7779 (R-Car H1) compatible DU
7 - "renesas,du-r8a7790" for R8A7790 (R-Car H2) compatible DU 7 - "renesas,du-r8a7790" for R8A7790 (R-Car H2) compatible DU
8 - "renesas,du-r8a7791" for R8A7791 (R-Car M2) compatible DU 8 - "renesas,du-r8a7791" for R8A7791 (R-Car M2-W) compatible DU
9 - "renesas,du-r8a7793" for R8A7793 (R-Car M2-N) compatible DU
10 - "renesas,du-r8a7794" for R8A7794 (R-Car E2) compatible DU
9 11
10 - reg: A list of base address and length of each memory resource, one for 12 - reg: A list of base address and length of each memory resource, one for
11 each entry in the reg-names property. 13 each entry in the reg-names property.
@@ -22,9 +24,9 @@ Required Properties:
22 - clock-names: Name of the clocks. This property is model-dependent. 24 - clock-names: Name of the clocks. This property is model-dependent.
23 - R8A7779 uses a single functional clock. The clock doesn't need to be 25 - R8A7779 uses a single functional clock. The clock doesn't need to be
24 named. 26 named.
25 - R8A7790 and R8A7791 use one functional clock per channel and one clock 27 - R8A779[0134] use one functional clock per channel and one clock per LVDS
26 per LVDS encoder. The functional clocks must be named "du.x" with "x" 28 encoder (if available). The functional clocks must be named "du.x" with
27 being the channel numerical index. The LVDS clocks must be named 29 "x" being the channel numerical index. The LVDS clocks must be named
28 "lvds.x" with "x" being the LVDS encoder numerical index. 30 "lvds.x" with "x" being the LVDS encoder numerical index.
29 - In addition to the functional and encoder clocks, all DU versions also 31 - In addition to the functional and encoder clocks, all DU versions also
30 support externally supplied pixel clocks. Those clocks are optional. 32 support externally supplied pixel clocks. Those clocks are optional.
@@ -43,7 +45,9 @@ corresponding to each DU output.
43----------------------------------------------------------------------------- 45-----------------------------------------------------------------------------
44 R8A7779 (H1) DPAD 0 DPAD 1 - 46 R8A7779 (H1) DPAD 0 DPAD 1 -
45 R8A7790 (H2) DPAD LVDS 0 LVDS 1 47 R8A7790 (H2) DPAD LVDS 0 LVDS 1
46 R8A7791 (M2) DPAD LVDS 0 - 48 R8A7791 (M2-W) DPAD LVDS 0 -
49 R8A7793 (M2-N) DPAD LVDS 0 -
50 R8A7794 (E2) DPAD 0 DPAD 1 -
47 51
48 52
49Example: R8A7790 (R-Car H2) DU 53Example: R8A7790 (R-Car H2) DU
diff --git a/Documentation/devicetree/bindings/video/dw_hdmi-rockchip.txt b/Documentation/devicetree/bindings/display/rockchip/dw_hdmi-rockchip.txt
index 668091f27674..668091f27674 100644
--- a/Documentation/devicetree/bindings/video/dw_hdmi-rockchip.txt
+++ b/Documentation/devicetree/bindings/display/rockchip/dw_hdmi-rockchip.txt
diff --git a/Documentation/devicetree/bindings/video/rockchip-drm.txt b/Documentation/devicetree/bindings/display/rockchip/rockchip-drm.txt
index 7fff582495a2..5707af89319d 100644
--- a/Documentation/devicetree/bindings/video/rockchip-drm.txt
+++ b/Documentation/devicetree/bindings/display/rockchip/rockchip-drm.txt
@@ -9,7 +9,7 @@ Required properties:
9- compatible: Should be "rockchip,display-subsystem" 9- compatible: Should be "rockchip,display-subsystem"
10- ports: Should contain a list of phandles pointing to display interface port 10- ports: Should contain a list of phandles pointing to display interface port
11 of vop devices. vop definitions as defined in 11 of vop devices. vop definitions as defined in
12 Documentation/devicetree/bindings/video/rockchip-vop.txt 12 Documentation/devicetree/bindings/display/rockchip/rockchip-vop.txt
13 13
14example: 14example:
15 15
diff --git a/Documentation/devicetree/bindings/video/rockchip-vop.txt b/Documentation/devicetree/bindings/display/rockchip/rockchip-vop.txt
index d15351f2313d..d15351f2313d 100644
--- a/Documentation/devicetree/bindings/video/rockchip-vop.txt
+++ b/Documentation/devicetree/bindings/display/rockchip/rockchip-vop.txt
diff --git a/Documentation/devicetree/bindings/video/simple-framebuffer-sunxi.txt b/Documentation/devicetree/bindings/display/simple-framebuffer-sunxi.txt
index c46ba641a1df..c46ba641a1df 100644
--- a/Documentation/devicetree/bindings/video/simple-framebuffer-sunxi.txt
+++ b/Documentation/devicetree/bindings/display/simple-framebuffer-sunxi.txt
diff --git a/Documentation/devicetree/bindings/video/simple-framebuffer.txt b/Documentation/devicetree/bindings/display/simple-framebuffer.txt
index 4474ef6e0b95..4474ef6e0b95 100644
--- a/Documentation/devicetree/bindings/video/simple-framebuffer.txt
+++ b/Documentation/devicetree/bindings/display/simple-framebuffer.txt
diff --git a/Documentation/devicetree/bindings/fb/sm501fb.txt b/Documentation/devicetree/bindings/display/sm501fb.txt
index 9d9f0098092b..9d9f0098092b 100644
--- a/Documentation/devicetree/bindings/fb/sm501fb.txt
+++ b/Documentation/devicetree/bindings/display/sm501fb.txt
diff --git a/Documentation/devicetree/bindings/video/ssd1289fb.txt b/Documentation/devicetree/bindings/display/ssd1289fb.txt
index 4fcd5e68cb6e..4fcd5e68cb6e 100644
--- a/Documentation/devicetree/bindings/video/ssd1289fb.txt
+++ b/Documentation/devicetree/bindings/display/ssd1289fb.txt
diff --git a/Documentation/devicetree/bindings/video/ssd1307fb.txt b/Documentation/devicetree/bindings/display/ssd1307fb.txt
index d1be78db63f5..eb31ed47a283 100644
--- a/Documentation/devicetree/bindings/video/ssd1307fb.txt
+++ b/Documentation/devicetree/bindings/display/ssd1307fb.txt
@@ -2,7 +2,8 @@
2 2
3Required properties: 3Required properties:
4 - compatible: Should be "solomon,<chip>fb-<bus>". The only supported bus for 4 - compatible: Should be "solomon,<chip>fb-<bus>". The only supported bus for
5 now is i2c, and the supported chips are ssd1305, ssd1306 and ssd1307. 5 now is i2c, and the supported chips are ssd1305, ssd1306, ssd1307 and
6 ssd1309.
6 - reg: Should contain address of the controller on the I2C bus. Most likely 7 - reg: Should contain address of the controller on the I2C bus. Most likely
7 0x3c or 0x3d 8 0x3c or 0x3d
8 - pwm: Should contain the pwm to use according to the OF device tree PWM 9 - pwm: Should contain the pwm to use according to the OF device tree PWM
diff --git a/Documentation/devicetree/bindings/gpu/st,stih4xx.txt b/Documentation/devicetree/bindings/display/st,stih4xx.txt
index a36dfce0032e..a352ed30cd70 100644
--- a/Documentation/devicetree/bindings/gpu/st,stih4xx.txt
+++ b/Documentation/devicetree/bindings/display/st,stih4xx.txt
@@ -61,7 +61,7 @@ STMicroelectronics stih4xx platforms
61 - reg-names: names of the mapped memory regions listed in regs property in 61 - reg-names: names of the mapped memory regions listed in regs property in
62 the same order. 62 the same order.
63 - interrupts : HDMI interrupt number to the CPU. 63 - interrupts : HDMI interrupt number to the CPU.
64 - interrupt-names: name of the interrupts listed in interrupts property in 64 - interrupt-names: names of the interrupts listed in interrupts property in
65 the same order 65 the same order
66 - clocks: from common clock binding: handle hardware IP needed clocks, the 66 - clocks: from common clock binding: handle hardware IP needed clocks, the
67 number of clocks may depend of the SoC type. 67 number of clocks may depend of the SoC type.
@@ -95,7 +95,7 @@ sti-dvo:
95 - clock-names: names of the clocks listed in clocks property in the same 95 - clock-names: names of the clocks listed in clocks property in the same
96 order. 96 order.
97 - pinctrl-0: pin control handle 97 - pinctrl-0: pin control handle
98 - pinctrl-name: names of the pin control to use 98 - pinctrl-names: names of the pin control states to use
99 - sti,panel: phandle of the panel connected to the DVO output 99 - sti,panel: phandle of the panel connected to the DVO output
100 100
101sti-hqvdp: 101sti-hqvdp:
diff --git a/Documentation/devicetree/bindings/mipi/nvidia,tegra114-mipi.txt b/Documentation/devicetree/bindings/display/tegra/nvidia,tegra114-mipi.txt
index e4a25cedc5cf..e4a25cedc5cf 100644
--- a/Documentation/devicetree/bindings/mipi/nvidia,tegra114-mipi.txt
+++ b/Documentation/devicetree/bindings/display/tegra/nvidia,tegra114-mipi.txt
diff --git a/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt b/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt
index e685610d38e2..a3bd8c050c4e 100644
--- a/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt
+++ b/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt
@@ -184,7 +184,7 @@ of the following host1x client modules:
184 - avdd-dsi-supply: phandle of a supply that powers the DSI controller 184 - avdd-dsi-supply: phandle of a supply that powers the DSI controller
185 - nvidia,mipi-calibrate: Should contain a phandle and a specifier specifying 185 - nvidia,mipi-calibrate: Should contain a phandle and a specifier specifying
186 which pads are used by this DSI output and need to be calibrated. See also 186 which pads are used by this DSI output and need to be calibrated. See also
187 ../mipi/nvidia,tegra114-mipi.txt. 187 ../display/tegra/nvidia,tegra114-mipi.txt.
188 188
189 Optional properties: 189 Optional properties:
190 - nvidia,ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing 190 - nvidia,ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing
diff --git a/Documentation/devicetree/bindings/video/ti,dra7-dss.txt b/Documentation/devicetree/bindings/display/ti/ti,dra7-dss.txt
index f33a05137b0e..c30f9ec189ed 100644
--- a/Documentation/devicetree/bindings/video/ti,dra7-dss.txt
+++ b/Documentation/devicetree/bindings/display/ti/ti,dra7-dss.txt
@@ -1,7 +1,7 @@
1Texas Instruments DRA7x Display Subsystem 1Texas Instruments DRA7x Display Subsystem
2========================================= 2=========================================
3 3
4See Documentation/devicetree/bindings/video/ti,omap-dss.txt for generic 4See Documentation/devicetree/bindings/display/ti/ti,omap-dss.txt for generic
5description about OMAP Display Subsystem bindings. 5description about OMAP Display Subsystem bindings.
6 6
7DSS Core 7DSS Core
diff --git a/Documentation/devicetree/bindings/video/ti,omap-dss.txt b/Documentation/devicetree/bindings/display/ti/ti,omap-dss.txt
index e1ef29569338..e1ef29569338 100644
--- a/Documentation/devicetree/bindings/video/ti,omap-dss.txt
+++ b/Documentation/devicetree/bindings/display/ti/ti,omap-dss.txt
diff --git a/Documentation/devicetree/bindings/video/ti,omap2-dss.txt b/Documentation/devicetree/bindings/display/ti/ti,omap2-dss.txt
index fa8bb2ed1170..afcd5a86c6a4 100644
--- a/Documentation/devicetree/bindings/video/ti,omap2-dss.txt
+++ b/Documentation/devicetree/bindings/display/ti/ti,omap2-dss.txt
@@ -1,7 +1,7 @@
1Texas Instruments OMAP2 Display Subsystem 1Texas Instruments OMAP2 Display Subsystem
2========================================= 2=========================================
3 3
4See Documentation/devicetree/bindings/video/ti,omap-dss.txt for generic 4See Documentation/devicetree/bindings/display/ti/ti,omap-dss.txt for generic
5description about OMAP Display Subsystem bindings. 5description about OMAP Display Subsystem bindings.
6 6
7DSS Core 7DSS Core
diff --git a/Documentation/devicetree/bindings/video/ti,omap3-dss.txt b/Documentation/devicetree/bindings/display/ti/ti,omap3-dss.txt
index 0023fa4b1328..dc66e1447c31 100644
--- a/Documentation/devicetree/bindings/video/ti,omap3-dss.txt
+++ b/Documentation/devicetree/bindings/display/ti/ti,omap3-dss.txt
@@ -1,7 +1,7 @@
1Texas Instruments OMAP3 Display Subsystem 1Texas Instruments OMAP3 Display Subsystem
2========================================= 2=========================================
3 3
4See Documentation/devicetree/bindings/video/ti,omap-dss.txt for generic 4See Documentation/devicetree/bindings/display/ti/ti,omap-dss.txt for generic
5description about OMAP Display Subsystem bindings. 5description about OMAP Display Subsystem bindings.
6 6
7DSS Core 7DSS Core
diff --git a/Documentation/devicetree/bindings/video/ti,omap4-dss.txt b/Documentation/devicetree/bindings/display/ti/ti,omap4-dss.txt
index b8c29fbd1fbb..bc624db8888d 100644
--- a/Documentation/devicetree/bindings/video/ti,omap4-dss.txt
+++ b/Documentation/devicetree/bindings/display/ti/ti,omap4-dss.txt
@@ -1,7 +1,7 @@
1Texas Instruments OMAP4 Display Subsystem 1Texas Instruments OMAP4 Display Subsystem
2========================================= 2=========================================
3 3
4See Documentation/devicetree/bindings/video/ti,omap-dss.txt for generic 4See Documentation/devicetree/bindings/display/ti/ti,omap-dss.txt for generic
5description about OMAP Display Subsystem bindings. 5description about OMAP Display Subsystem bindings.
6 6
7DSS Core 7DSS Core
diff --git a/Documentation/devicetree/bindings/video/ti,omap5-dss.txt b/Documentation/devicetree/bindings/display/ti/ti,omap5-dss.txt
index 38ffc8fcd816..118a486c47bb 100644
--- a/Documentation/devicetree/bindings/video/ti,omap5-dss.txt
+++ b/Documentation/devicetree/bindings/display/ti/ti,omap5-dss.txt
@@ -1,7 +1,7 @@
1Texas Instruments OMAP5 Display Subsystem 1Texas Instruments OMAP5 Display Subsystem
2========================================= 2=========================================
3 3
4See Documentation/devicetree/bindings/video/ti,omap-dss.txt for generic 4See Documentation/devicetree/bindings/display/ti/ti,omap-dss.txt for generic
5description about OMAP Display Subsystem bindings. 5description about OMAP Display Subsystem bindings.
6 6
7DSS Core 7DSS Core
diff --git a/Documentation/devicetree/bindings/video/ti,opa362.txt b/Documentation/devicetree/bindings/display/ti/ti,opa362.txt
index f96083c0bd17..f96083c0bd17 100644
--- a/Documentation/devicetree/bindings/video/ti,opa362.txt
+++ b/Documentation/devicetree/bindings/display/ti/ti,opa362.txt
diff --git a/Documentation/devicetree/bindings/video/ti,tfp410.txt b/Documentation/devicetree/bindings/display/ti/ti,tfp410.txt
index 2cbe32a3d0bb..2cbe32a3d0bb 100644
--- a/Documentation/devicetree/bindings/video/ti,tfp410.txt
+++ b/Documentation/devicetree/bindings/display/ti/ti,tfp410.txt
diff --git a/Documentation/devicetree/bindings/video/ti,tpd12s015.txt b/Documentation/devicetree/bindings/display/ti/ti,tpd12s015.txt
index 26e6d32e3f20..26e6d32e3f20 100644
--- a/Documentation/devicetree/bindings/video/ti,tpd12s015.txt
+++ b/Documentation/devicetree/bindings/display/ti/ti,tpd12s015.txt
diff --git a/Documentation/devicetree/bindings/drm/tilcdc/panel.txt b/Documentation/devicetree/bindings/display/tilcdc/panel.txt
index 4ab9e2300907..f20b31cdc59a 100644
--- a/Documentation/devicetree/bindings/drm/tilcdc/panel.txt
+++ b/Documentation/devicetree/bindings/display/tilcdc/panel.txt
@@ -15,7 +15,7 @@ Required properties:
15 - display-timings: typical videomode of lcd panel. Multiple video modes 15 - display-timings: typical videomode of lcd panel. Multiple video modes
16 can be listed if the panel supports multiple timings, but the 'native-mode' 16 can be listed if the panel supports multiple timings, but the 'native-mode'
17 should be the preferred/default resolution. Refer to 17 should be the preferred/default resolution. Refer to
18 Documentation/devicetree/bindings/video/display-timing.txt for display 18 Documentation/devicetree/bindings/display/display-timing.txt for display
19 timing binding details. 19 timing binding details.
20 20
21Optional properties: 21Optional properties:
diff --git a/Documentation/devicetree/bindings/drm/tilcdc/tfp410.txt b/Documentation/devicetree/bindings/display/tilcdc/tfp410.txt
index a58ae7756fc6..a58ae7756fc6 100644
--- a/Documentation/devicetree/bindings/drm/tilcdc/tfp410.txt
+++ b/Documentation/devicetree/bindings/display/tilcdc/tfp410.txt
diff --git a/Documentation/devicetree/bindings/drm/tilcdc/tilcdc.txt b/Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt
index 2136ee81e061..2136ee81e061 100644
--- a/Documentation/devicetree/bindings/drm/tilcdc/tilcdc.txt
+++ b/Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt
diff --git a/Documentation/devicetree/bindings/video/via,vt8500-fb.txt b/Documentation/devicetree/bindings/display/via,vt8500-fb.txt
index 2871e218a0fb..2871e218a0fb 100644
--- a/Documentation/devicetree/bindings/video/via,vt8500-fb.txt
+++ b/Documentation/devicetree/bindings/display/via,vt8500-fb.txt
diff --git a/Documentation/devicetree/bindings/video/wm,prizm-ge-rops.txt b/Documentation/devicetree/bindings/display/wm,prizm-ge-rops.txt
index a850fa011f02..a850fa011f02 100644
--- a/Documentation/devicetree/bindings/video/wm,prizm-ge-rops.txt
+++ b/Documentation/devicetree/bindings/display/wm,prizm-ge-rops.txt
diff --git a/Documentation/devicetree/bindings/video/wm,wm8505-fb.txt b/Documentation/devicetree/bindings/display/wm,wm8505-fb.txt
index 0bcadb2840a5..0bcadb2840a5 100644
--- a/Documentation/devicetree/bindings/video/wm,wm8505-fb.txt
+++ b/Documentation/devicetree/bindings/display/wm,wm8505-fb.txt
diff --git a/Documentation/devicetree/bindings/dma/ti-dma-crossbar.txt b/Documentation/devicetree/bindings/dma/ti-dma-crossbar.txt
index 63a48928f3a8..b152a75dceae 100644
--- a/Documentation/devicetree/bindings/dma/ti-dma-crossbar.txt
+++ b/Documentation/devicetree/bindings/dma/ti-dma-crossbar.txt
@@ -2,9 +2,10 @@ Texas Instruments DMA Crossbar (DMA request router)
2 2
3Required properties: 3Required properties:
4- compatible: "ti,dra7-dma-crossbar" for DRA7xx DMA crossbar 4- compatible: "ti,dra7-dma-crossbar" for DRA7xx DMA crossbar
5 "ti,am335x-edma-crossbar" for AM335x and AM437x
5- reg: Memory map for accessing module 6- reg: Memory map for accessing module
6- #dma-cells: Should be set to <1>. 7- #dma-cells: Should be set to to match with the DMA controller's dma-cells
7 Clients should use the crossbar request number (input) 8 for ti,dra7-dma-crossbar and <3> for ti,am335x-edma-crossbar.
8- dma-requests: Number of DMA requests the crossbar can receive 9- dma-requests: Number of DMA requests the crossbar can receive
9- dma-masters: phandle pointing to the DMA controller 10- dma-masters: phandle pointing to the DMA controller
10 11
@@ -14,6 +15,15 @@ The DMA controller node need to have the following poroperties:
14Optional properties: 15Optional properties:
15- ti,dma-safe-map: Safe routing value for unused request lines 16- ti,dma-safe-map: Safe routing value for unused request lines
16 17
18Notes:
19When requesting channel via ti,dra7-dma-crossbar, the DMA clinet must request
20the DMA event number as crossbar ID (input to the DMA crossbar).
21
22For ti,am335x-edma-crossbar: the meaning of parameters of dmas for clients:
23dmas = <&edma_xbar 12 0 1>; where <12> is the DMA request number, <0> is the TC
24the event should be assigned and <1> is the mux selection for in the crossbar.
25When mux 0 is used the DMA channel can be requested directly from edma node.
26
17Example: 27Example:
18 28
19/* DMA controller */ 29/* DMA controller */
@@ -47,6 +57,7 @@ uart1: serial@4806a000 {
47 ti,hwmods = "uart1"; 57 ti,hwmods = "uart1";
48 clock-frequency = <48000000>; 58 clock-frequency = <48000000>;
49 status = "disabled"; 59 status = "disabled";
60 /* Requesting crossbar input 49 and 50 */
50 dmas = <&sdma_xbar 49>, <&sdma_xbar 50>; 61 dmas = <&sdma_xbar 49>, <&sdma_xbar 50>;
51 dma-names = "tx", "rx"; 62 dma-names = "tx", "rx";
52}; 63};
diff --git a/Documentation/devicetree/bindings/dma/ti-edma.txt b/Documentation/devicetree/bindings/dma/ti-edma.txt
index 5ba525a10035..d3d0a4fb1c73 100644
--- a/Documentation/devicetree/bindings/dma/ti-edma.txt
+++ b/Documentation/devicetree/bindings/dma/ti-edma.txt
@@ -1,4 +1,119 @@
1TI EDMA 1Texas Instruments eDMA
2
3The eDMA3 consists of two components: Channel controller (CC) and Transfer
4Controller(s) (TC). The CC is the main entry for DMA users since it is
5responsible for the DMA channel handling, while the TCs are responsible to
6execute the actual DMA tansfer.
7
8------------------------------------------------------------------------------
9eDMA3 Channel Controller
10
11Required properties:
12- compatible: "ti,edma3-tpcc" for the channel controller(s)
13- #dma-cells: Should be set to <2>. The first number is the DMA request
14 number and the second is the TC the channel is serviced on.
15- reg: Memory map of eDMA CC
16- reg-names: "edma3_cc"
17- interrupts: Interrupt lines for CCINT, MPERR and CCERRINT.
18- interrupt-names: "edma3_ccint", "emda3_mperr" and "edma3_ccerrint"
19- ti,tptcs: List of TPTCs associated with the eDMA in the following form:
20 <&tptc_phandle TC_priority_number>. The highest priority is 0.
21
22Optional properties:
23- ti,hwmods: Name of the hwmods associated to the eDMA CC
24- ti,edma-memcpy-channels: List of channels allocated to be used for memcpy, iow
25 these channels will be SW triggered channels. The list must
26 contain 16 bits numbers, see example.
27- ti,edma-reserved-slot-ranges: PaRAM slot ranges which should not be used by
28 the driver, they are allocated to be used by for example the
29 DSP. See example.
30
31------------------------------------------------------------------------------
32eDMA3 Transfer Controller
33
34Required properties:
35- compatible: "ti,edma3-tptc" for the transfer controller(s)
36- reg: Memory map of eDMA TC
37- interrupts: Interrupt number for TCerrint.
38
39Optional properties:
40- ti,hwmods: Name of the hwmods associated to the given eDMA TC
41- interrupt-names: "edma3_tcerrint"
42
43------------------------------------------------------------------------------
44Example:
45
46edma: edma@49000000 {
47 compatible = "ti,edma3-tpcc";
48 ti,hwmods = "tpcc";
49 reg = <0x49000000 0x10000>;
50 reg-names = "edma3_cc";
51 interrupts = <12 13 14>;
52 interrupt-names = "edma3_ccint", "emda3_mperr", "edma3_ccerrint";
53 dma-requests = <64>;
54 #dma-cells = <2>;
55
56 ti,tptcs = <&edma_tptc0 7>, <&edma_tptc1 7>, <&edma_tptc2 0>;
57
58 /* Channel 20 and 21 is allocated for memcpy */
59 ti,edma-memcpy-channels = /bits/ 16 <20 21>;
60 /* The following PaRAM slots are reserved: 35-45 and 100-110 */
61 ti,edma-reserved-slot-ranges = /bits/ 16 <35 10>,
62 /bits/ 16 <100 10>;
63};
64
65edma_tptc0: tptc@49800000 {
66 compatible = "ti,edma3-tptc";
67 ti,hwmods = "tptc0";
68 reg = <0x49800000 0x100000>;
69 interrupts = <112>;
70 interrupt-names = "edm3_tcerrint";
71};
72
73edma_tptc1: tptc@49900000 {
74 compatible = "ti,edma3-tptc";
75 ti,hwmods = "tptc1";
76 reg = <0x49900000 0x100000>;
77 interrupts = <113>;
78 interrupt-names = "edm3_tcerrint";
79};
80
81edma_tptc2: tptc@49a00000 {
82 compatible = "ti,edma3-tptc";
83 ti,hwmods = "tptc2";
84 reg = <0x49a00000 0x100000>;
85 interrupts = <114>;
86 interrupt-names = "edm3_tcerrint";
87};
88
89sham: sham@53100000 {
90 compatible = "ti,omap4-sham";
91 ti,hwmods = "sham";
92 reg = <0x53100000 0x200>;
93 interrupts = <109>;
94 /* DMA channel 36 executed on eDMA TC0 - low priority queue */
95 dmas = <&edma 36 0>;
96 dma-names = "rx";
97};
98
99mcasp0: mcasp@48038000 {
100 compatible = "ti,am33xx-mcasp-audio";
101 ti,hwmods = "mcasp0";
102 reg = <0x48038000 0x2000>,
103 <0x46000000 0x400000>;
104 reg-names = "mpu", "dat";
105 interrupts = <80>, <81>;
106 interrupt-names = "tx", "rx";
107 status = "disabled";
108 /* DMA channels 8 and 9 executed on eDMA TC2 - high priority queue */
109 dmas = <&edma 8 2>,
110 <&edma 9 2>;
111 dma-names = "tx", "rx";
112};
113
114------------------------------------------------------------------------------
115DEPRECATED binding, new DTS files must use the ti,edma3-tpcc/ti,edma3-tptc
116binding.
2 117
3Required properties: 118Required properties:
4- compatible : "ti,edma3" 119- compatible : "ti,edma3"
diff --git a/Documentation/devicetree/bindings/edac/apm-xgene-edac.txt b/Documentation/devicetree/bindings/edac/apm-xgene-edac.txt
index 78edb80002c8..78e2a31c58d0 100644
--- a/Documentation/devicetree/bindings/edac/apm-xgene-edac.txt
+++ b/Documentation/devicetree/bindings/edac/apm-xgene-edac.txt
@@ -5,6 +5,8 @@ The follow error types are supported:
5 5
6 memory controller - Memory controller 6 memory controller - Memory controller
7 PMD (L1/L2) - Processor module unit (PMD) L1/L2 cache 7 PMD (L1/L2) - Processor module unit (PMD) L1/L2 cache
8 L3 - L3 cache controller
9 SoC - SoC IP's such as Ethernet, SATA, and etc
8 10
9The following section describes the EDAC DT node binding. 11The following section describes the EDAC DT node binding.
10 12
@@ -30,6 +32,17 @@ Required properties for PMD subnode:
30- reg : First resource shall be the PMD resource. 32- reg : First resource shall be the PMD resource.
31- pmd-controller : Instance number of the PMD controller. 33- pmd-controller : Instance number of the PMD controller.
32 34
35Required properties for L3 subnode:
36- compatible : Shall be "apm,xgene-edac-l3" or
37 "apm,xgene-edac-l3-v2".
38- reg : First resource shall be the L3 EDAC resource.
39
40Required properties for SoC subnode:
41- compatible : Shall be "apm,xgene-edac-soc-v1" for revision 1 or
42 "apm,xgene-edac-l3-soc" for general value reporting
43 only.
44- reg : First resource shall be the SoC EDAC resource.
45
33Example: 46Example:
34 csw: csw@7e200000 { 47 csw: csw@7e200000 {
35 compatible = "apm,xgene-csw", "syscon"; 48 compatible = "apm,xgene-csw", "syscon";
@@ -76,4 +89,14 @@ Example:
76 reg = <0x0 0x7c000000 0x0 0x200000>; 89 reg = <0x0 0x7c000000 0x0 0x200000>;
77 pmd-controller = <0>; 90 pmd-controller = <0>;
78 }; 91 };
92
93 edacl3@7e600000 {
94 compatible = "apm,xgene-edac-l3";
95 reg = <0x0 0x7e600000 0x0 0x1000>;
96 };
97
98 edacsoc@7e930000 {
99 compatible = "apm,xgene-edac-soc-v1";
100 reg = <0x0 0x7e930000 0x0 0x1000>;
101 };
79 }; 102 };
diff --git a/Documentation/devicetree/bindings/misc/at25.txt b/Documentation/devicetree/bindings/eeprom/at25.txt
index 1d3447165c37..1d3447165c37 100644
--- a/Documentation/devicetree/bindings/misc/at25.txt
+++ b/Documentation/devicetree/bindings/eeprom/at25.txt
diff --git a/Documentation/devicetree/bindings/eeprom.txt b/Documentation/devicetree/bindings/eeprom/eeprom.txt
index 4342c10de1bf..4342c10de1bf 100644
--- a/Documentation/devicetree/bindings/eeprom.txt
+++ b/Documentation/devicetree/bindings/eeprom/eeprom.txt
diff --git a/Documentation/devicetree/bindings/extcon/extcon-arizona.txt b/Documentation/devicetree/bindings/extcon/extcon-arizona.txt
new file mode 100644
index 000000000000..e1705fae63a8
--- /dev/null
+++ b/Documentation/devicetree/bindings/extcon/extcon-arizona.txt
@@ -0,0 +1,15 @@
1Cirrus Logic Arizona class audio SoCs
2
3These devices are audio SoCs with extensive digital capabilities and a range
4of analogue I/O.
5
6This document lists Extcon specific bindings, see the primary binding document:
7 ../mfd/arizona.txt
8
9Optional properties:
10
11 - wlf,hpdet-channel : Headphone detection channel.
12 ARIZONA_ACCDET_MODE_HPL or 1 - Headphone detect mode is set to HPDETL
13 ARIZONA_ACCDET_MODE_HPR or 2 - Headphone detect mode is set to HPDETR
14 If this node is not mentioned or if the value is unknown, then
15 headphone detection mode is set to HPDETL.
diff --git a/Documentation/devicetree/bindings/fpga/altera-socfpga-fpga-mgr.txt b/Documentation/devicetree/bindings/fpga/altera-socfpga-fpga-mgr.txt
index 9b027a615486..d52f3340414d 100644
--- a/Documentation/devicetree/bindings/fpga/altera-socfpga-fpga-mgr.txt
+++ b/Documentation/devicetree/bindings/fpga/altera-socfpga-fpga-mgr.txt
@@ -9,7 +9,7 @@ Required properties:
9 9
10Example: 10Example:
11 11
12 hps_0_fpgamgr: fpgamgr@0xff706000 { 12 hps_0_fpgamgr: fpgamgr@ff706000 {
13 compatible = "altr,socfpga-fpga-mgr"; 13 compatible = "altr,socfpga-fpga-mgr";
14 reg = <0xFF706000 0x1000 14 reg = <0xFF706000 0x1000
15 0xFFB90000 0x1000>; 15 0xFFB90000 0x1000>;
diff --git a/Documentation/devicetree/bindings/fpga/xilinx-zynq-fpga-mgr.txt b/Documentation/devicetree/bindings/fpga/xilinx-zynq-fpga-mgr.txt
new file mode 100644
index 000000000000..7018aa896835
--- /dev/null
+++ b/Documentation/devicetree/bindings/fpga/xilinx-zynq-fpga-mgr.txt
@@ -0,0 +1,19 @@
1Xilinx Zynq FPGA Manager
2
3Required properties:
4- compatible: should contain "xlnx,zynq-devcfg-1.0"
5- reg: base address and size for memory mapped io
6- interrupts: interrupt for the FPGA manager device
7- clocks: phandle for clocks required operation
8- clock-names: name for the clock, should be "ref_clk"
9- syscon: phandle for access to SLCR registers
10
11Example:
12 devcfg: devcfg@f8007000 {
13 compatible = "xlnx,zynq-devcfg-1.0";
14 reg = <0xf8007000 0x100>;
15 interrupts = <0 8 4>;
16 clocks = <&clkc 12>;
17 clock-names = "ref_clk";
18 syscon = <&slcr>;
19 };
diff --git a/Documentation/devicetree/bindings/gpio/gpio-mpc8xxx.txt b/Documentation/devicetree/bindings/gpio/gpio-mpc8xxx.txt
index 805ddcd79a57..f2455c50533d 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-mpc8xxx.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio-mpc8xxx.txt
@@ -1,9 +1,9 @@
1* Freescale MPC512x/MPC8xxx GPIO controller 1* Freescale MPC512x/MPC8xxx/Layerscape GPIO controller
2 2
3Required properties: 3Required properties:
4- compatible : Should be "fsl,<soc>-gpio" 4- compatible : Should be "fsl,<soc>-gpio"
5 The following <soc>s are known to be supported: 5 The following <soc>s are known to be supported:
6 mpc5121, mpc5125, mpc8349, mpc8572, mpc8610, pq3, qoriq 6 mpc5121, mpc5125, mpc8349, mpc8572, mpc8610, pq3, qoriq.
7- reg : Address and length of the register set for the device 7- reg : Address and length of the register set for the device
8- interrupts : Should be the port interrupt shared by all 32 pins. 8- interrupts : Should be the port interrupt shared by all 32 pins.
9- #gpio-cells : Should be two. The first cell is the pin number and 9- #gpio-cells : Should be two. The first cell is the pin number and
diff --git a/Documentation/devicetree/bindings/gpio/gpio-msm.txt b/Documentation/devicetree/bindings/gpio/gpio-msm.txt
deleted file mode 100644
index ac20e68a004e..000000000000
--- a/Documentation/devicetree/bindings/gpio/gpio-msm.txt
+++ /dev/null
@@ -1,26 +0,0 @@
1MSM GPIO controller bindings
2
3Required properties:
4- compatible:
5 - "qcom,msm-gpio" for MSM controllers
6- #gpio-cells : Should be two.
7 - first cell is the pin number
8 - second cell is used to specify optional parameters (unused)
9- gpio-controller : Marks the device node as a GPIO controller.
10- #interrupt-cells : Should be 2.
11- interrupt-controller: Mark the device node as an interrupt controller
12- interrupts : Specify the TLMM summary interrupt number
13- ngpio : Specify the number of MSM GPIOs
14
15Example:
16
17 msmgpio: gpio@fd510000 {
18 compatible = "qcom,msm-gpio";
19 gpio-controller;
20 #gpio-cells = <2>;
21 interrupt-controller;
22 #interrupt-cells = <2>;
23 reg = <0xfd510000 0x4000>;
24 interrupts = <0 208 0>;
25 ngpio = <150>;
26 };
diff --git a/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt b/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt
index b9a42f294dd0..13df9933f4cd 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt
@@ -24,6 +24,7 @@ Required properties:
24 ti,tca6408 24 ti,tca6408
25 ti,tca6416 25 ti,tca6416
26 ti,tca6424 26 ti,tca6424
27 ti,tca9539
27 exar,xra1202 28 exar,xra1202
28 29
29Example: 30Example:
diff --git a/Documentation/devicetree/bindings/gpio/gpio-zynq.txt b/Documentation/devicetree/bindings/gpio/gpio-zynq.txt
index db4c6a663c03..7b542657f259 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-zynq.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio-zynq.txt
@@ -12,6 +12,13 @@ Required properties:
12- interrupts : Interrupt specifier (see interrupt bindings for 12- interrupts : Interrupt specifier (see interrupt bindings for
13 details) 13 details)
14- interrupt-parent : Must be core interrupt controller 14- interrupt-parent : Must be core interrupt controller
15- interrupt-controller : Marks the device node as an interrupt controller.
16- #interrupt-cells : Should be 2. The first cell is the GPIO number.
17 The second cell bits[3:0] is used to specify trigger type and level flags:
18 1 = low-to-high edge triggered.
19 2 = high-to-low edge triggered.
20 4 = active high level-sensitive.
21 8 = active low level-sensitive.
15- reg : Address and length of the register set for the device 22- reg : Address and length of the register set for the device
16 23
17Example: 24Example:
@@ -22,5 +29,7 @@ Example:
22 gpio-controller; 29 gpio-controller;
23 interrupt-parent = <&intc>; 30 interrupt-parent = <&intc>;
24 interrupts = <0 20 4>; 31 interrupts = <0 20 4>;
32 interrupt-controller;
33 #interrupt-cells = <2>;
25 reg = <0xe000a000 0x1000>; 34 reg = <0xe000a000 0x1000>;
26 }; 35 };
diff --git a/Documentation/devicetree/bindings/gpio/gpio.txt b/Documentation/devicetree/bindings/gpio/gpio.txt
index 5788d5cf1252..069cdf6f9dac 100644
--- a/Documentation/devicetree/bindings/gpio/gpio.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio.txt
@@ -16,7 +16,9 @@ properties, each containing a 'gpio-list':
16GPIO properties should be named "[<name>-]gpios", with <name> being the purpose 16GPIO properties should be named "[<name>-]gpios", with <name> being the purpose
17of this GPIO for the device. While a non-existent <name> is considered valid 17of this GPIO for the device. While a non-existent <name> is considered valid
18for compatibility reasons (resolving to the "gpios" property), it is not allowed 18for compatibility reasons (resolving to the "gpios" property), it is not allowed
19for new bindings. 19for new bindings. Also, GPIO properties named "[<name>-]gpio" are valid and old
20bindings use it, but are only supported for compatibility reasons and should not
21be used for newer bindings since it has been deprecated.
20 22
21GPIO properties can contain one or more GPIO phandles, but only in exceptional 23GPIO properties can contain one or more GPIO phandles, but only in exceptional
22cases should they contain more than one. If your device uses several GPIOs with 24cases should they contain more than one. If your device uses several GPIOs with
@@ -52,9 +54,13 @@ only uses one.
52 54
53gpio-specifier may encode: bank, pin position inside the bank, 55gpio-specifier may encode: bank, pin position inside the bank,
54whether pin is open-drain and whether pin is logically inverted. 56whether pin is open-drain and whether pin is logically inverted.
57
55Exact meaning of each specifier cell is controller specific, and must 58Exact meaning of each specifier cell is controller specific, and must
56be documented in the device tree binding for the device. Use the macros 59be documented in the device tree binding for the device.
57defined in include/dt-bindings/gpio/gpio.h whenever possible: 60
61Most controllers are however specifying a generic flag bitfield
62in the last cell, so for these, use the macros defined in
63include/dt-bindings/gpio/gpio.h whenever possible:
58 64
59Example of a node using GPIOs: 65Example of a node using GPIOs:
60 66
@@ -65,6 +71,15 @@ Example of a node using GPIOs:
65GPIO_ACTIVE_HIGH is 0, so in this example gpio-specifier is "18 0" and encodes 71GPIO_ACTIVE_HIGH is 0, so in this example gpio-specifier is "18 0" and encodes
66GPIO pin number, and GPIO flags as accepted by the "qe_pio_e" gpio-controller. 72GPIO pin number, and GPIO flags as accepted by the "qe_pio_e" gpio-controller.
67 73
74Optional standard bitfield specifiers for the last cell:
75
76- Bit 0: 0 means active high, 1 means active low
77- Bit 1: 1 means single-ended wiring, see:
78 https://en.wikipedia.org/wiki/Single-ended_triode
79 When used with active-low, this means open drain/collector, see:
80 https://en.wikipedia.org/wiki/Open_collector
81 When used with active-high, this means open source/emitter
82
681.1) GPIO specifier best practices 831.1) GPIO specifier best practices
69---------------------------------- 84----------------------------------
70 85
@@ -116,6 +131,30 @@ Every GPIO controller node must contain both an empty "gpio-controller"
116property, and a #gpio-cells integer property, which indicates the number of 131property, and a #gpio-cells integer property, which indicates the number of
117cells in a gpio-specifier. 132cells in a gpio-specifier.
118 133
134Optionally, a GPIO controller may have a "ngpios" property. This property
135indicates the number of in-use slots of available slots for GPIOs. The
136typical example is something like this: the hardware register is 32 bits
137wide, but only 18 of the bits have a physical counterpart. The driver is
138generally written so that all 32 bits can be used, but the IP block is reused
139in a lot of designs, some using all 32 bits, some using 18 and some using
14012. In this case, setting "ngpios = <18>;" informs the driver that only the
141first 18 GPIOs, at local offset 0 .. 17, are in use.
142
143If these GPIOs do not happen to be the first N GPIOs at offset 0...N-1, an
144additional bitmask is needed to specify which GPIOs are actually in use,
145and which are dummies. The bindings for this case has not yet been
146specified, but should be specified if/when such hardware appears.
147
148Example:
149
150gpio-controller@00000000 {
151 compatible = "foo";
152 reg = <0x00000000 0x1000>;
153 gpio-controller;
154 #gpio-cells = <2>;
155 ngpios = <18>;
156}
157
119The GPIO chip may contain GPIO hog definitions. GPIO hogging is a mechanism 158The GPIO chip may contain GPIO hog definitions. GPIO hogging is a mechanism
120providing automatic GPIO request and configuration as part of the 159providing automatic GPIO request and configuration as part of the
121gpio-controller's driver probe function. 160gpio-controller's driver probe function.
diff --git a/Documentation/devicetree/bindings/gpio/netxbig-gpio-ext.txt b/Documentation/devicetree/bindings/gpio/netxbig-gpio-ext.txt
new file mode 100644
index 000000000000..50ec2e690701
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/netxbig-gpio-ext.txt
@@ -0,0 +1,22 @@
1Binding for the GPIO extension bus found on some LaCie/Seagate boards
2(Example: 2Big/5Big Network v2, 2Big NAS).
3
4Required properties:
5- compatible: "lacie,netxbig-gpio-ext".
6- addr-gpios: GPIOs representing the address register (LSB -> MSB).
7- data-gpios: GPIOs representing the data register (LSB -> MSB).
8- enable-gpio: latches the new configuration (address, data) on raising edge.
9
10Example:
11
12netxbig_gpio_ext: netxbig-gpio-ext {
13 compatible = "lacie,netxbig-gpio-ext";
14
15 addr-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH
16 &gpio1 16 GPIO_ACTIVE_HIGH
17 &gpio1 17 GPIO_ACTIVE_HIGH>;
18 data-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH
19 &gpio1 13 GPIO_ACTIVE_HIGH
20 &gpio1 14 GPIO_ACTIVE_HIGH>;
21 enable-gpio = <&gpio0 29 GPIO_ACTIVE_HIGH>;
22};
diff --git a/Documentation/devicetree/bindings/hwmon/ina209.txt b/Documentation/devicetree/bindings/hwmon/ina209.txt
deleted file mode 100644
index 9dd2bee80840..000000000000
--- a/Documentation/devicetree/bindings/hwmon/ina209.txt
+++ /dev/null
@@ -1,18 +0,0 @@
1ina209 properties
2
3Required properties:
4- compatible: Must be "ti,ina209"
5- reg: I2C address
6
7Optional properties:
8
9- shunt-resistor
10 Shunt resistor value in micro-Ohm
11
12Example:
13
14temp-sensor@4c {
15 compatible = "ti,ina209";
16 reg = <0x4c>;
17 shunt-resistor = <5000>;
18};
diff --git a/Documentation/devicetree/bindings/hwmon/ina2xx.txt b/Documentation/devicetree/bindings/hwmon/ina2xx.txt
index a2ad85d7e747..9bcd5e87830d 100644
--- a/Documentation/devicetree/bindings/hwmon/ina2xx.txt
+++ b/Documentation/devicetree/bindings/hwmon/ina2xx.txt
@@ -2,6 +2,7 @@ ina2xx properties
2 2
3Required properties: 3Required properties:
4- compatible: Must be one of the following: 4- compatible: Must be one of the following:
5 - "ti,ina209" for ina209
5 - "ti,ina219" for ina219 6 - "ti,ina219" for ina219
6 - "ti,ina220" for ina220 7 - "ti,ina220" for ina220
7 - "ti,ina226" for ina226 8 - "ti,ina226" for ina226
diff --git a/Documentation/devicetree/bindings/hwmon/pwm-fan.txt b/Documentation/devicetree/bindings/hwmon/pwm-fan.txt
index 610757ce4492..c6d533202d3e 100644
--- a/Documentation/devicetree/bindings/hwmon/pwm-fan.txt
+++ b/Documentation/devicetree/bindings/hwmon/pwm-fan.txt
@@ -3,10 +3,35 @@ Bindings for a fan connected to the PWM lines
3Required properties: 3Required properties:
4- compatible : "pwm-fan" 4- compatible : "pwm-fan"
5- pwms : the PWM that is used to control the PWM fan 5- pwms : the PWM that is used to control the PWM fan
6- cooling-levels : PWM duty cycle values in a range from 0 to 255
7 which correspond to thermal cooling states
6 8
7Example: 9Example:
8 pwm-fan { 10 fan0: pwm-fan {
9 compatible = "pwm-fan"; 11 compatible = "pwm-fan";
10 status = "okay"; 12 cooling-min-state = <0>;
13 cooling-max-state = <3>;
14 #cooling-cells = <2>;
11 pwms = <&pwm 0 10000 0>; 15 pwms = <&pwm 0 10000 0>;
16 cooling-levels = <0 102 170 230>;
12 }; 17 };
18
19 thermal-zones {
20 cpu_thermal: cpu-thermal {
21 thermal-sensors = <&tmu 0>;
22 polling-delay-passive = <0>;
23 polling-delay = <0>;
24 trips {
25 cpu_alert1: cpu-alert1 {
26 temperature = <100000>; /* millicelsius */
27 hysteresis = <2000>; /* millicelsius */
28 type = "passive";
29 };
30 };
31 cooling-maps {
32 map0 {
33 trip = <&cpu_alert1>;
34 cooling-device = <&fan0 0 1>;
35 };
36 };
37 };
diff --git a/Documentation/devicetree/bindings/i2c/i2c-davinci.txt b/Documentation/devicetree/bindings/i2c/i2c-davinci.txt
index a4e1cbc810c1..5b123e0e4cc2 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-davinci.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-davinci.txt
@@ -1,10 +1,10 @@
1* Texas Instruments Davinci I2C 1* Texas Instruments Davinci/Keystone I2C
2 2
3This file provides information, what the device node for the 3This file provides information, what the device node for the
4davinci i2c interface contain. 4davinci/keystone i2c interface contains.
5 5
6Required properties: 6Required properties:
7- compatible: "ti,davinci-i2c"; 7- compatible: "ti,davinci-i2c" or "ti,keystone-i2c";
8- reg : Offset and length of the register set for the device 8- reg : Offset and length of the register set for the device
9 9
10Recommended properties : 10Recommended properties :
diff --git a/Documentation/devicetree/bindings/i2c/i2c-imx.txt b/Documentation/devicetree/bindings/i2c/i2c-imx.txt
index ce4311d726ae..eab5836ba7f9 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-imx.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-imx.txt
@@ -14,6 +14,10 @@ Optional properties:
14 The absence of the propoerty indicates the default frequency 100 kHz. 14 The absence of the propoerty indicates the default frequency 100 kHz.
15- dmas: A list of two dma specifiers, one for each entry in dma-names. 15- dmas: A list of two dma specifiers, one for each entry in dma-names.
16- dma-names: should contain "tx" and "rx". 16- dma-names: should contain "tx" and "rx".
17- scl-gpios: specify the gpio related to SCL pin
18- sda-gpios: specify the gpio related to SDA pin
19- pinctrl: add extra pinctrl to configure i2c pins to gpio function for i2c
20 bus recovery, call it "gpio" state
17 21
18Examples: 22Examples:
19 23
@@ -37,4 +41,9 @@ i2c0: i2c@40066000 { /* i2c0 on vf610 */
37 dmas = <&edma0 0 50>, 41 dmas = <&edma0 0 50>,
38 <&edma0 0 51>; 42 <&edma0 0 51>;
39 dma-names = "rx","tx"; 43 dma-names = "rx","tx";
44 pinctrl-names = "default", "gpio";
45 pinctrl-0 = <&pinctrl_i2c1>;
46 pinctrl-1 = <&pinctrl_i2c1_gpio>;
47 scl-gpios = <&gpio5 26 GPIO_ACTIVE_HIGH>;
48 sda-gpios = <&gpio5 27 GPIO_ACTIVE_HIGH>;
40}; 49};
diff --git a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
index 16b3e07aa98f..ea406eb20fa5 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
@@ -10,6 +10,7 @@ Required properties:
10 "renesas,i2c-r8a7792" 10 "renesas,i2c-r8a7792"
11 "renesas,i2c-r8a7793" 11 "renesas,i2c-r8a7793"
12 "renesas,i2c-r8a7794" 12 "renesas,i2c-r8a7794"
13 "renesas,i2c-r8a7795"
13- reg: physical base address of the controller and length of memory mapped 14- reg: physical base address of the controller and length of memory mapped
14 region. 15 region.
15- interrupts: interrupt specifier. 16- interrupts: interrupt specifier.
diff --git a/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt b/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt
index 2bfc6e7ed094..214f94c25d37 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt
@@ -10,6 +10,7 @@ Required properties:
10 - "renesas,iic-r8a7792" (R-Car V2H) 10 - "renesas,iic-r8a7792" (R-Car V2H)
11 - "renesas,iic-r8a7793" (R-Car M2-N) 11 - "renesas,iic-r8a7793" (R-Car M2-N)
12 - "renesas,iic-r8a7794" (R-Car E2) 12 - "renesas,iic-r8a7794" (R-Car E2)
13 - "renesas,iic-r8a7795" (R-Car H3)
13 - "renesas,iic-sh73a0" (SH-Mobile AG5) 14 - "renesas,iic-sh73a0" (SH-Mobile AG5)
14- reg : address start and address range size of device 15- reg : address start and address range size of device
15- interrupts : interrupt of device 16- interrupts : interrupt of device
diff --git a/Documentation/devicetree/bindings/i2c/i2c-uniphier-f.txt b/Documentation/devicetree/bindings/i2c/i2c-uniphier-f.txt
new file mode 100644
index 000000000000..27fc6f8c798b
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-uniphier-f.txt
@@ -0,0 +1,25 @@
1UniPhier I2C controller (FIFO-builtin)
2
3Required properties:
4- compatible: should be "socionext,uniphier-fi2c".
5- #address-cells: should be 1.
6- #size-cells: should be 0.
7- reg: offset and length of the register set for the device.
8- interrupts: a single interrupt specifier.
9- clocks: phandle to the input clock.
10
11Optional properties:
12- clock-frequency: desired I2C bus frequency in Hz. The maximum supported
13 value is 400000. Defaults to 100000 if not specified.
14
15Examples:
16
17 i2c0: i2c@58780000 {
18 compatible = "socionext,uniphier-fi2c";
19 reg = <0x58780000 0x80>;
20 #address-cells = <1>;
21 #size-cells = <0>;
22 interrupts = <0 41 4>;
23 clocks = <&i2c_clk>;
24 clock-frequency = <100000>;
25 };
diff --git a/Documentation/devicetree/bindings/i2c/i2c-uniphier.txt b/Documentation/devicetree/bindings/i2c/i2c-uniphier.txt
new file mode 100644
index 000000000000..26f9d95b3436
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-uniphier.txt
@@ -0,0 +1,25 @@
1UniPhier I2C controller (FIFO-less)
2
3Required properties:
4- compatible: should be "socionext,uniphier-i2c".
5- #address-cells: should be 1.
6- #size-cells: should be 0.
7- reg: offset and length of the register set for the device.
8- interrupts: a single interrupt specifier.
9- clocks: phandle to the input clock.
10
11Optional properties:
12- clock-frequency: desired I2C bus frequency in Hz. The maximum supported
13 value is 400000. Defaults to 100000 if not specified.
14
15Examples:
16
17 i2c0: i2c@58400000 {
18 compatible = "socionext,uniphier-i2c";
19 reg = <0x58400000 0x40>;
20 #address-cells = <1>;
21 #size-cells = <0>;
22 interrupts = <0 41 1>;
23 clocks = <&i2c_clk>;
24 clock-frequency = <100000>;
25 };
diff --git a/Documentation/devicetree/bindings/i2c/trivial-devices.txt b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
index d77d412cbc68..c50cf13c852e 100644
--- a/Documentation/devicetree/bindings/i2c/trivial-devices.txt
+++ b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
@@ -54,7 +54,6 @@ epson,rx8581 I2C-BUS INTERFACE REAL TIME CLOCK MODULE
54fsl,mag3110 MAG3110: Xtrinsic High Accuracy, 3D Magnetometer 54fsl,mag3110 MAG3110: Xtrinsic High Accuracy, 3D Magnetometer
55fsl,mc13892 MC13892: Power Management Integrated Circuit (PMIC) for i.MX35/51 55fsl,mc13892 MC13892: Power Management Integrated Circuit (PMIC) for i.MX35/51
56fsl,mma8450 MMA8450Q: Xtrinsic Low-power, 3-axis Xtrinsic Accelerometer 56fsl,mma8450 MMA8450Q: Xtrinsic Low-power, 3-axis Xtrinsic Accelerometer
57fsl,mma8452 MMA8452Q: 3-axis 12-bit / 8-bit Digital Accelerometer
58fsl,mpr121 MPR121: Proximity Capacitive Touch Sensor Controller 57fsl,mpr121 MPR121: Proximity Capacitive Touch Sensor Controller
59fsl,sgtl5000 SGTL5000: Ultra Low-Power Audio Codec 58fsl,sgtl5000 SGTL5000: Ultra Low-Power Audio Codec
60gmt,g751 G751: Digital Temperature Sensor and Thermal Watchdog with Two-Wire Interface 59gmt,g751 G751: Digital Temperature Sensor and Thermal Watchdog with Two-Wire Interface
@@ -80,6 +79,7 @@ oki,ml86v7667 OKI ML86V7667 video decoder
80ovti,ov5642 OV5642: Color CMOS QSXGA (5-megapixel) Image Sensor with OmniBSI and Embedded TrueFocus 79ovti,ov5642 OV5642: Color CMOS QSXGA (5-megapixel) Image Sensor with OmniBSI and Embedded TrueFocus
81pericom,pt7c4338 Real-time Clock Module 80pericom,pt7c4338 Real-time Clock Module
82plx,pex8648 48-Lane, 12-Port PCI Express Gen 2 (5.0 GT/s) Switch 81plx,pex8648 48-Lane, 12-Port PCI Express Gen 2 (5.0 GT/s) Switch
82pulsedlight,lidar-lite-v2 Pulsedlight LIDAR range-finding sensor
83ramtron,24c64 i2c serial eeprom (24cxx) 83ramtron,24c64 i2c serial eeprom (24cxx)
84ricoh,r2025sd I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC 84ricoh,r2025sd I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
85ricoh,r2221tl I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC 85ricoh,r2221tl I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
@@ -88,6 +88,7 @@ ricoh,rs5c372b I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
88ricoh,rv5c386 I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC 88ricoh,rv5c386 I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
89ricoh,rv5c387a I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC 89ricoh,rv5c387a I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
90samsung,24ad0xd1 S524AD0XF1 (128K/256K-bit Serial EEPROM for Low Power) 90samsung,24ad0xd1 S524AD0XF1 (128K/256K-bit Serial EEPROM for Low Power)
91sgx,vz89x SGX Sensortech VZ89X Sensors
91sii,s35390a 2-wire CMOS real-time clock 92sii,s35390a 2-wire CMOS real-time clock
92skyworks,sky81452 Skyworks SKY81452: Six-Channel White LED Driver with Touch Panel Bias Supply 93skyworks,sky81452 Skyworks SKY81452: Six-Channel White LED Driver with Touch Panel Bias Supply
93st-micro,24c256 i2c serial eeprom (24cxx) 94st-micro,24c256 i2c serial eeprom (24cxx)
diff --git a/Documentation/devicetree/bindings/iio/accel/bma180.txt b/Documentation/devicetree/bindings/iio/accel/bma180.txt
index c5933573e0f6..4a3679d54457 100644
--- a/Documentation/devicetree/bindings/iio/accel/bma180.txt
+++ b/Documentation/devicetree/bindings/iio/accel/bma180.txt
@@ -1,10 +1,11 @@
1* Bosch BMA180 triaxial acceleration sensor 1* Bosch BMA180 / BMA250 triaxial acceleration sensor
2 2
3http://omapworld.com/BMA180_111_1002839.pdf 3http://omapworld.com/BMA180_111_1002839.pdf
4http://ae-bst.resource.bosch.com/media/products/dokumente/bma250/bst-bma250-ds002-05.pdf
4 5
5Required properties: 6Required properties:
6 7
7 - compatible : should be "bosch,bma180" 8 - compatible : should be "bosch,bma180" or "bosch,bma250"
8 - reg : the I2C address of the sensor 9 - reg : the I2C address of the sensor
9 10
10Optional properties: 11Optional properties:
@@ -13,6 +14,9 @@ Optional properties:
13 14
14 - interrupts : interrupt mapping for GPIO IRQ, it should by configured with 15 - interrupts : interrupt mapping for GPIO IRQ, it should by configured with
15 flags IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_EDGE_RISING 16 flags IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_EDGE_RISING
17 For the bma250 the first interrupt listed must be the one
18 connected to the INT1 pin, the second (optional) interrupt
19 listed must be the one connected to the INT2 pin.
16 20
17Example: 21Example:
18 22
diff --git a/Documentation/devicetree/bindings/misc/lis302.txt b/Documentation/devicetree/bindings/iio/accel/lis302.txt
index 2a19bff9693f..2a19bff9693f 100644
--- a/Documentation/devicetree/bindings/misc/lis302.txt
+++ b/Documentation/devicetree/bindings/iio/accel/lis302.txt
diff --git a/Documentation/devicetree/bindings/iio/accel/mma8452.txt b/Documentation/devicetree/bindings/iio/accel/mma8452.txt
new file mode 100644
index 000000000000..e3c37467d7da
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/accel/mma8452.txt
@@ -0,0 +1,24 @@
1Freescale MMA8452Q, MMA8453Q, MMA8652FC or MMA8653FC triaxial accelerometer
2
3Required properties:
4
5 - compatible: should contain one of
6 * "fsl,mma8452"
7 * "fsl,mma8453"
8 * "fsl,mma8652"
9 * "fsl,mma8653"
10 - reg: the I2C address of the chip
11
12Optional properties:
13
14 - interrupt-parent: should be the phandle for the interrupt controller
15 - interrupts: interrupt mapping for GPIO IRQ
16
17Example:
18
19 mma8453fc@1d {
20 compatible = "fsl,mma8453";
21 reg = <0x1d>;
22 interrupt-parent = <&gpio1>;
23 interrupts = <5 0>;
24 };
diff --git a/Documentation/devicetree/bindings/iio/adc/hi8435.txt b/Documentation/devicetree/bindings/iio/adc/hi8435.txt
new file mode 100644
index 000000000000..3b0348c5e516
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/hi8435.txt
@@ -0,0 +1,21 @@
1Holt Integrated Circuits HI-8435 threshold detector bindings
2
3Required properties:
4 - compatible: should be "holt,hi8435"
5 - reg: spi chip select number for the device
6
7Recommended properties:
8 - spi-max-frequency: definition as per
9 Documentation/devicetree/bindings/spi/spi-bus.txt
10
11Optional properties:
12 - gpios: GPIO used for controlling the reset pin
13
14Example:
15sensor@0 {
16 compatible = "holt,hi8435";
17 reg = <0>;
18 gpios = <&gpio6 1 0>;
19
20 spi-max-frequency = <1000000>;
21};
diff --git a/Documentation/devicetree/bindings/misc/ti,dac7512.txt b/Documentation/devicetree/bindings/iio/dac/ti,dac7512.txt
index 1db45939dac9..1db45939dac9 100644
--- a/Documentation/devicetree/bindings/misc/ti,dac7512.txt
+++ b/Documentation/devicetree/bindings/iio/dac/ti,dac7512.txt
diff --git a/Documentation/devicetree/bindings/iio/light/apds9960.txt b/Documentation/devicetree/bindings/iio/light/apds9960.txt
new file mode 100644
index 000000000000..174b709f16db
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/light/apds9960.txt
@@ -0,0 +1,22 @@
1* Avago APDS9960 gesture/RGB/ALS/proximity sensor
2
3http://www.avagotech.com/docs/AV02-4191EN
4
5Required properties:
6
7 - compatible: must be "avago,apds9960"
8 - reg: the I2c address of the sensor
9 - interrupt-parent: should be the phandle for the interrupt controller
10 - interrupts : the sole interrupt generated by the device
11
12 Refer to interrupt-controller/interrupts.txt for generic interrupt client
13 node bindings.
14
15Example:
16
17apds9960@39 {
18 compatible = "avago,apds9960";
19 reg = <0x39>;
20 interrupt-parent = <&gpio1>;
21 interrupts = <16 1>;
22};
diff --git a/Documentation/devicetree/bindings/iio/light/us5182d.txt b/Documentation/devicetree/bindings/iio/light/us5182d.txt
new file mode 100644
index 000000000000..6f0a530144fd
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/light/us5182d.txt
@@ -0,0 +1,34 @@
1* UPISEMI us5182d I2C ALS and Proximity sensor
2
3Required properties:
4- compatible: must be "upisemi,usd5182"
5- reg: the I2C address of the device
6
7Optional properties:
8- upisemi,glass-coef: glass attenuation factor - compensation factor of
9 resolution 1000 for material transmittance.
10- upisemi,dark-ths: array of 8 elements containing 16-bit thresholds (adc
11 counts) corresponding to every scale.
12- upisemi,upper-dark-gain: 8-bit dark gain compensation factor(4 int and 4
13 fractional bits - Q4.4) applied when light > threshold
14- upisemi,lower-dark-gain: 8-bit dark gain compensation factor(4 int and 4
15 fractional bits - Q4.4) applied when light < threshold
16
17If the optional properties are not specified these factors will default to the
18values in the below example.
19The glass-coef defaults to no compensation for the covering material.
20The threshold array defaults to experimental values that work with US5182D
21sensor on evaluation board - roughly between 12-32 lux.
22There will be no dark-gain compensation by default when ALS > thresh
23(0 * dark-gain), and a 1.35 compensation factor when ALS < thresh.
24
25Example:
26
27 usd5182@39 {
28 compatible = "upisemi,usd5182";
29 reg = <0x39>;
30 upisemi,glass-coef = < 1000 >;
31 upisemi,dark-ths = /bits/ 16 <170 200 512 512 800 2000 4000 8000>;
32 upisemi,upper-dark-gain = /bits/ 8 <0x00>;
33 upisemi,lower-dark-gain = /bits/ 8 <0x16>;
34 };
diff --git a/Documentation/devicetree/bindings/misc/bmp085.txt b/Documentation/devicetree/bindings/iio/pressure/bmp085.txt
index d7a6deb6b21e..d7a6deb6b21e 100644
--- a/Documentation/devicetree/bindings/misc/bmp085.txt
+++ b/Documentation/devicetree/bindings/iio/pressure/bmp085.txt
diff --git a/Documentation/devicetree/bindings/input/ads7846.txt b/Documentation/devicetree/bindings/input/ads7846.txt
index df8b1279491d..33a1638b61d6 100644
--- a/Documentation/devicetree/bindings/input/ads7846.txt
+++ b/Documentation/devicetree/bindings/input/ads7846.txt
@@ -65,6 +65,7 @@ Optional properties:
65 pendown-gpio GPIO handle describing the pin the !PENIRQ 65 pendown-gpio GPIO handle describing the pin the !PENIRQ
66 line is connected to. 66 line is connected to.
67 wakeup-source use any event on touchscreen as wakeup event. 67 wakeup-source use any event on touchscreen as wakeup event.
68 (Legacy property support: "linux,wakeup")
68 69
69 70
70Example for a TSC2046 chip connected to an McSPI controller of an OMAP SoC:: 71Example for a TSC2046 chip connected to an McSPI controller of an OMAP SoC::
@@ -86,6 +87,6 @@ Example for a TSC2046 chip connected to an McSPI controller of an OMAP SoC::
86 ti,x-plate-ohms = /bits/ 16 <40>; 87 ti,x-plate-ohms = /bits/ 16 <40>;
87 ti,pressure-max = /bits/ 16 <255>; 88 ti,pressure-max = /bits/ 16 <255>;
88 89
89 linux,wakeup; 90 wakeup-source;
90 }; 91 };
91 }; 92 };
diff --git a/Documentation/devicetree/bindings/input/cypress,cyapa.txt b/Documentation/devicetree/bindings/input/cypress,cyapa.txt
index 635a3b036630..8d91ba9ff2fd 100644
--- a/Documentation/devicetree/bindings/input/cypress,cyapa.txt
+++ b/Documentation/devicetree/bindings/input/cypress,cyapa.txt
@@ -25,7 +25,7 @@ Example:
25 /* Cypress Gen3 touchpad */ 25 /* Cypress Gen3 touchpad */
26 touchpad@67 { 26 touchpad@67 {
27 compatible = "cypress,cyapa"; 27 compatible = "cypress,cyapa";
28 reg = <0x24>; 28 reg = <0x67>;
29 interrupt-parent = <&gpio>; 29 interrupt-parent = <&gpio>;
30 interrupts = <2 IRQ_TYPE_EDGE_FALLING>; /* GPIO 2 */ 30 interrupts = <2 IRQ_TYPE_EDGE_FALLING>; /* GPIO 2 */
31 wakeup-source; 31 wakeup-source;
diff --git a/Documentation/devicetree/bindings/input/da9062-onkey.txt b/Documentation/devicetree/bindings/input/da9062-onkey.txt
new file mode 100644
index 000000000000..ab0e0488fe92
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/da9062-onkey.txt
@@ -0,0 +1,32 @@
1* Dialog DA9062/63 OnKey Module
2
3This module is part of the DA9062/DA9063. For more details about entire
4chips see Documentation/devicetree/bindings/mfd/da9062.txt and
5Documentation/devicetree/bindings/mfd/da9063.txt
6
7This module provides KEY_POWER, KEY_SLEEP and events.
8
9Required properties:
10
11- compatible: should be one of:
12 dlg,da9062-onkey
13 dlg,da9063-onkey
14
15Optional properties:
16
17 - dlg,disable-key-power : Disable power-down using a long key-press. If this
18 entry exists the OnKey driver will remove support for the KEY_POWER key
19 press. If this entry does not exist then by default the key-press
20 triggered power down is enabled and the OnKey will support both KEY_POWER
21 and KEY_SLEEP.
22
23Example:
24
25 pmic0: da9062@58 {
26
27 onkey {
28 compatible = "dlg,da9063-onkey";
29 dlg,disable-key-power;
30 };
31
32 };
diff --git a/Documentation/devicetree/bindings/input/gpio-keys-polled.txt b/Documentation/devicetree/bindings/input/gpio-keys-polled.txt
index 5b91f5a3bd5c..95d0fb11a787 100644
--- a/Documentation/devicetree/bindings/input/gpio-keys-polled.txt
+++ b/Documentation/devicetree/bindings/input/gpio-keys-polled.txt
@@ -13,14 +13,22 @@ Subnode properties:
13 13
14 - gpios: OF device-tree gpio specification. 14 - gpios: OF device-tree gpio specification.
15 - label: Descriptive name of the key. 15 - label: Descriptive name of the key.
16 - linux,code: Keycode to emit. 16 - linux,code: Key / Axis code to emit.
17 17
18Optional subnode-properties: 18Optional subnode-properties:
19 - linux,input-type: Specify event type this button/key generates. 19 - linux,input-type: Specify event type this button/key generates.
20 If not specified defaults to <1> == EV_KEY. 20 If not specified defaults to <1> == EV_KEY.
21 - linux,input-value: If linux,input-type is EV_ABS or EV_REL then this
22 value is sent for events this button generates when pressed.
23 EV_ABS/EV_REL axis will generate an event with a value of 0 when
24 all buttons with linux,input-type == type and linux,code == axis
25 are released. This value is interpreted as a signed 32 bit value,
26 e.g. to make a button generate a value of -1 use:
27 linux,input-value = <0xffffffff>; /* -1 */
21 - debounce-interval: Debouncing interval time in milliseconds. 28 - debounce-interval: Debouncing interval time in milliseconds.
22 If not specified defaults to 5. 29 If not specified defaults to 5.
23 - wakeup-source: Boolean, button can wake-up the system. 30 - wakeup-source: Boolean, button can wake-up the system.
31 (Legacy property supported: "gpio-key,wakeup")
24 32
25Example nodes: 33Example nodes:
26 34
diff --git a/Documentation/devicetree/bindings/input/gpio-keys.txt b/Documentation/devicetree/bindings/input/gpio-keys.txt
index 072bf7573c37..cf1333d1dd52 100644
--- a/Documentation/devicetree/bindings/input/gpio-keys.txt
+++ b/Documentation/devicetree/bindings/input/gpio-keys.txt
@@ -24,6 +24,7 @@ Optional subnode-properties:
24 - debounce-interval: Debouncing interval time in milliseconds. 24 - debounce-interval: Debouncing interval time in milliseconds.
25 If not specified defaults to 5. 25 If not specified defaults to 5.
26 - wakeup-source: Boolean, button can wake-up the system. 26 - wakeup-source: Boolean, button can wake-up the system.
27 (Legacy property supported: "gpio-key,wakeup")
27 - linux,can-disable: Boolean, indicates that button is connected 28 - linux,can-disable: Boolean, indicates that button is connected
28 to dedicated (not shared) interrupt which can be disabled to 29 to dedicated (not shared) interrupt which can be disabled to
29 suppress events from the button. 30 suppress events from the button.
diff --git a/Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt b/Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt
index 4d86059c370c..d0ea09ba249f 100644
--- a/Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt
+++ b/Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt
@@ -20,6 +20,7 @@ Required Properties:
20Optional Properties: 20Optional Properties:
21- linux,no-autorepeat: do no enable autorepeat feature. 21- linux,no-autorepeat: do no enable autorepeat feature.
22- wakeup-source: use any event on keypad as wakeup event. 22- wakeup-source: use any event on keypad as wakeup event.
23 (Legacy property supported: "linux,wakeup")
23- debounce-delay-ms: debounce interval in milliseconds 24- debounce-delay-ms: debounce interval in milliseconds
24- col-scan-delay-us: delay, measured in microseconds, that is needed 25- col-scan-delay-us: delay, measured in microseconds, that is needed
25 before we can scan keypad after activating column gpio 26 before we can scan keypad after activating column gpio
diff --git a/Documentation/devicetree/bindings/hid/hid-over-i2c.txt b/Documentation/devicetree/bindings/input/hid-over-i2c.txt
index 488edcb264c4..488edcb264c4 100644
--- a/Documentation/devicetree/bindings/hid/hid-over-i2c.txt
+++ b/Documentation/devicetree/bindings/input/hid-over-i2c.txt
diff --git a/Documentation/devicetree/bindings/input/nvidia,tegra20-kbc.txt b/Documentation/devicetree/bindings/input/nvidia,tegra20-kbc.txt
index 0382b8bd69c6..1faa7292e21f 100644
--- a/Documentation/devicetree/bindings/input/nvidia,tegra20-kbc.txt
+++ b/Documentation/devicetree/bindings/input/nvidia,tegra20-kbc.txt
@@ -29,7 +29,8 @@ matrix-keyboard bindings:
29- nvidia,debounce-delay-ms: delay in milliseconds per row scan for debouncing 29- nvidia,debounce-delay-ms: delay in milliseconds per row scan for debouncing
30- nvidia,repeat-delay-ms: delay in milliseconds before repeat starts 30- nvidia,repeat-delay-ms: delay in milliseconds before repeat starts
31- nvidia,ghost-filter: enable ghost filtering for this device 31- nvidia,ghost-filter: enable ghost filtering for this device
32- nvidia,wakeup-source: configure keyboard as a wakeup source for suspend/resume 32- wakeup-source: configure keyboard as a wakeup source for suspend/resume
33 (Legacy property supported: "nvidia,wakeup-source")
33 34
34Example: 35Example:
35 36
diff --git a/Documentation/devicetree/bindings/input/qcom,pm8xxx-keypad.txt b/Documentation/devicetree/bindings/input/qcom,pm8xxx-keypad.txt
index ee6215681182..4a9dc6ba96b1 100644
--- a/Documentation/devicetree/bindings/input/qcom,pm8xxx-keypad.txt
+++ b/Documentation/devicetree/bindings/input/qcom,pm8xxx-keypad.txt
@@ -37,6 +37,7 @@ PROPERTIES
37 Usage: optional 37 Usage: optional
38 Value type: <bool> 38 Value type: <bool>
39 Definition: use any event on keypad as wakeup event. 39 Definition: use any event on keypad as wakeup event.
40 (Legacy property supported: "linux,keypad-wakeup")
40 41
41- keypad,num-rows: 42- keypad,num-rows:
42 Usage: required 43 Usage: required
diff --git a/Documentation/devicetree/bindings/input/rotary-encoder.txt b/Documentation/devicetree/bindings/input/rotary-encoder.txt
index 331549593ed5..de99cbbbf6da 100644
--- a/Documentation/devicetree/bindings/input/rotary-encoder.txt
+++ b/Documentation/devicetree/bindings/input/rotary-encoder.txt
@@ -14,7 +14,17 @@ Optional properties:
14 device, hence no steps need to be passed. 14 device, hence no steps need to be passed.
15- rotary-encoder,rollover: Automatic rollove when the rotary value becomes 15- rotary-encoder,rollover: Automatic rollove when the rotary value becomes
16 greater than the specified steps or smaller than 0. For absolute axis only. 16 greater than the specified steps or smaller than 0. For absolute axis only.
17- rotary-encoder,steps-per-period: Number of steps (stable states) per period.
18 The values have the following meaning:
19 1: Full-period mode (default)
20 2: Half-period mode
21 4: Quarter-period mode
22- wakeup-source: Boolean, rotary encoder can wake up the system.
23
24Deprecated properties:
17- rotary-encoder,half-period: Makes the driver work on half-period mode. 25- rotary-encoder,half-period: Makes the driver work on half-period mode.
26 This property is deprecated. Instead, a 'steps-per-period ' value should
27 be used, such as "rotary-encoder,steps-per-period = <2>".
18 28
19See Documentation/input/rotary-encoder.txt for more information. 29See Documentation/input/rotary-encoder.txt for more information.
20 30
diff --git a/Documentation/devicetree/bindings/input/samsung-keypad.txt b/Documentation/devicetree/bindings/input/samsung-keypad.txt
index 863e77f619dc..5305e74e5742 100644
--- a/Documentation/devicetree/bindings/input/samsung-keypad.txt
+++ b/Documentation/devicetree/bindings/input/samsung-keypad.txt
@@ -38,6 +38,7 @@ Required Board Specific Properties:
38 38
39Optional Properties: 39Optional Properties:
40- wakeup-source: use any event on keypad as wakeup event. 40- wakeup-source: use any event on keypad as wakeup event.
41 (Legacy property supported: "linux,input-wakeup")
41 42
42Optional Properties specific to linux: 43Optional Properties specific to linux:
43- linux,keypad-no-autorepeat: do no enable autorepeat feature. 44- linux,keypad-no-autorepeat: do no enable autorepeat feature.
@@ -51,7 +52,7 @@ Example:
51 samsung,keypad-num-rows = <2>; 52 samsung,keypad-num-rows = <2>;
52 samsung,keypad-num-columns = <8>; 53 samsung,keypad-num-columns = <8>;
53 linux,input-no-autorepeat; 54 linux,input-no-autorepeat;
54 linux,input-wakeup; 55 wakeup-source;
55 56
56 pinctrl-names = "default"; 57 pinctrl-names = "default";
57 pinctrl-0 = <&keypad_rows &keypad_columns>; 58 pinctrl-0 = <&keypad_rows &keypad_columns>;
diff --git a/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt
index 76db96704a60..f99528da1b1d 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt
+++ b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt
@@ -5,6 +5,7 @@ There are 3 variants of the chip for various touch panel sizes
5FT5206GE1 2.8" .. 3.8" 5FT5206GE1 2.8" .. 3.8"
6FT5306DE4 4.3" .. 7" 6FT5306DE4 4.3" .. 7"
7FT5406EE8 7" .. 8.9" 7FT5406EE8 7" .. 8.9"
8FT5506EEG 7" .. 8.9"
8 9
9The software interface is identical for all those chips, so that 10The software interface is identical for all those chips, so that
10currently there is no need for the driver to distinguish between the 11currently there is no need for the driver to distinguish between the
@@ -17,6 +18,7 @@ Required properties:
17 - compatible: "edt,edt-ft5206" 18 - compatible: "edt,edt-ft5206"
18 or: "edt,edt-ft5306" 19 or: "edt,edt-ft5306"
19 or: "edt,edt-ft5406" 20 or: "edt,edt-ft5406"
21 or: "edt,edt-ft5506"
20 22
21 - reg: I2C slave address of the chip (0x38) 23 - reg: I2C slave address of the chip (0x38)
22 - interrupt-parent: a phandle pointing to the interrupt controller 24 - interrupt-parent: a phandle pointing to the interrupt controller
@@ -49,7 +51,7 @@ Example:
49 pinctrl-names = "default"; 51 pinctrl-names = "default";
50 pinctrl-0 = <&edt_ft5x06_pins>; 52 pinctrl-0 = <&edt_ft5x06_pins>;
51 interrupt-parent = <&gpio2>; 53 interrupt-parent = <&gpio2>;
52 interrupts = <5 0>; 54 interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
53 reset-gpios = <&gpio2 6 1>; 55 reset-gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;
54 wake-gpios = <&gpio4 9 0>; 56 wake-gpios = <&gpio4 9 GPIO_ACTIVE_HIGH>;
55 }; 57 };
diff --git a/Documentation/devicetree/bindings/input/touchscreen/focaltech-ft6236.txt b/Documentation/devicetree/bindings/input/touchscreen/focaltech-ft6236.txt
new file mode 100644
index 000000000000..777521da3da5
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/touchscreen/focaltech-ft6236.txt
@@ -0,0 +1,35 @@
1* FocalTech FT6236 I2C touchscreen controller
2
3Required properties:
4 - compatible : "focaltech,ft6236"
5 - reg : I2C slave address of the chip (0x38)
6 - interrupt-parent : a phandle pointing to the interrupt controller
7 serving the interrupt for this chip
8 - interrupts : interrupt specification for the touch controller
9 interrupt
10 - reset-gpios : GPIO specification for the RSTN input
11 - touchscreen-size-x : horizontal resolution of touchscreen (in pixels)
12 - touchscreen-size-y : vertical resolution of touchscreen (in pixels)
13
14Optional properties:
15 - touchscreen-fuzz-x : horizontal noise value of the absolute input
16 device (in pixels)
17 - touchscreen-fuzz-y : vertical noise value of the absolute input
18 device (in pixels)
19 - touchscreen-inverted-x : X axis is inverted (boolean)
20 - touchscreen-inverted-y : Y axis is inverted (boolean)
21 - touchscreen-swapped-x-y: X and Y axis are swapped (boolean)
22 Swapping is done after inverting the axis
23
24Example:
25
26 ft6x06@38 {
27 compatible = "focaltech,ft6236";
28 reg = <0x38>;
29 interrupt-parent = <&gpio>;
30 interrupts = <23 2>;
31 touchscreen-size-x = <320>;
32 touchscreen-size-y = <480>;
33 touchscreen-inverted-x;
34 touchscreen-swapped-x-y;
35 };
diff --git a/Documentation/devicetree/bindings/arm/gic-v3.txt b/Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.txt
index ddfade40ac59..7803e77d85cb 100644
--- a/Documentation/devicetree/bindings/arm/gic-v3.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.txt
@@ -57,6 +57,8 @@ used to route Message Signalled Interrupts (MSI) to the CPUs.
57These nodes must have the following properties: 57These nodes must have the following properties:
58- compatible : Should at least contain "arm,gic-v3-its". 58- compatible : Should at least contain "arm,gic-v3-its".
59- msi-controller : Boolean property. Identifies the node as an MSI controller 59- msi-controller : Boolean property. Identifies the node as an MSI controller
60- #msi-cells: Must be <1>. The single msi-cell is the DeviceID of the device
61 which will generate the MSI.
60- reg: Specifies the base physical address and size of the ITS 62- reg: Specifies the base physical address and size of the ITS
61 registers. 63 registers.
62 64
@@ -83,6 +85,7 @@ Examples:
83 gic-its@2c200000 { 85 gic-its@2c200000 {
84 compatible = "arm,gic-v3-its"; 86 compatible = "arm,gic-v3-its";
85 msi-controller; 87 msi-controller;
88 #msi-cells = <1>;
86 reg = <0x0 0x2c200000 0 0x200000>; 89 reg = <0x0 0x2c200000 0 0x200000>;
87 }; 90 };
88 }; 91 };
@@ -107,12 +110,14 @@ Examples:
107 gic-its@2c200000 { 110 gic-its@2c200000 {
108 compatible = "arm,gic-v3-its"; 111 compatible = "arm,gic-v3-its";
109 msi-controller; 112 msi-controller;
113 #msi-cells = <1>;
110 reg = <0x0 0x2c200000 0 0x200000>; 114 reg = <0x0 0x2c200000 0 0x200000>;
111 }; 115 };
112 116
113 gic-its@2c400000 { 117 gic-its@2c400000 {
114 compatible = "arm,gic-v3-its"; 118 compatible = "arm,gic-v3-its";
115 msi-controller; 119 msi-controller;
120 #msi-cells = <1>;
116 reg = <0x0 0x2c400000 0 0x200000>; 121 reg = <0x0 0x2c400000 0 0x200000>;
117 }; 122 };
118 }; 123 };
diff --git a/Documentation/devicetree/bindings/arm/gic.txt b/Documentation/devicetree/bindings/interrupt-controller/arm,gic.txt
index 2da059a4790c..cc56021eb60b 100644
--- a/Documentation/devicetree/bindings/arm/gic.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/arm,gic.txt
@@ -11,13 +11,14 @@ have PPIs or SGIs.
11Main node required properties: 11Main node required properties:
12 12
13- compatible : should be one of: 13- compatible : should be one of:
14 "arm,gic-400" 14 "arm,arm1176jzf-devchip-gic"
15 "arm,arm11mp-gic"
15 "arm,cortex-a15-gic" 16 "arm,cortex-a15-gic"
16 "arm,cortex-a9-gic"
17 "arm,cortex-a7-gic" 17 "arm,cortex-a7-gic"
18 "arm,arm11mp-gic" 18 "arm,cortex-a9-gic"
19 "arm,gic-400"
20 "arm,pl390"
19 "brcm,brahma-b15-gic" 21 "brcm,brahma-b15-gic"
20 "arm,arm1176jzf-devchip-gic"
21 "qcom,msm-8660-qgic" 22 "qcom,msm-8660-qgic"
22 "qcom,msm-qgic2" 23 "qcom,msm-qgic2"
23- interrupt-controller : Identifies the node as an interrupt controller 24- interrupt-controller : Identifies the node as an interrupt controller
@@ -58,6 +59,21 @@ Optional
58 regions, used when the GIC doesn't have banked registers. The offset is 59 regions, used when the GIC doesn't have banked registers. The offset is
59 cpu-offset * cpu-nr. 60 cpu-offset * cpu-nr.
60 61
62- clocks : List of phandle and clock-specific pairs, one for each entry
63 in clock-names.
64- clock-names : List of names for the GIC clock input(s). Valid clock names
65 depend on the GIC variant:
66 "ic_clk" (for "arm,arm11mp-gic")
67 "PERIPHCLKEN" (for "arm,cortex-a15-gic")
68 "PERIPHCLK", "PERIPHCLKEN" (for "arm,cortex-a9-gic")
69 "clk" (for "arm,gic-400")
70 "gclk" (for "arm,pl390")
71
72- power-domains : A phandle and PM domain specifier as defined by bindings of
73 the power controller specified by phandle, used when the GIC
74 is part of a Power or Clock Domain.
75
76
61Example: 77Example:
62 78
63 intc: interrupt-controller@fff11000 { 79 intc: interrupt-controller@fff11000 {
diff --git a/Documentation/devicetree/bindings/arm/versatile-fpga-irq.txt b/Documentation/devicetree/bindings/interrupt-controller/arm,versatile-fpga-irq.txt
index c9cf605bb995..c9cf605bb995 100644
--- a/Documentation/devicetree/bindings/arm/versatile-fpga-irq.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/arm,versatile-fpga-irq.txt
diff --git a/Documentation/devicetree/bindings/arm/vic.txt b/Documentation/devicetree/bindings/interrupt-controller/arm,vic.txt
index dd527216c5fb..dd527216c5fb 100644
--- a/Documentation/devicetree/bindings/arm/vic.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/arm,vic.txt
diff --git a/Documentation/devicetree/bindings/cris/interrupts.txt b/Documentation/devicetree/bindings/interrupt-controller/axis,crisv32-intc.txt
index e8b123b0a5e6..e8b123b0a5e6 100644
--- a/Documentation/devicetree/bindings/cris/interrupts.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/axis,crisv32-intc.txt
diff --git a/Documentation/devicetree/bindings/metag/meta-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/img,meta-intc.txt
index 80994adab392..80994adab392 100644
--- a/Documentation/devicetree/bindings/metag/meta-intc.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/img,meta-intc.txt
diff --git a/Documentation/devicetree/bindings/metag/pdc-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/img,pdc-intc.txt
index a69118550344..a69118550344 100644
--- a/Documentation/devicetree/bindings/metag/pdc-intc.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/img,pdc-intc.txt
diff --git a/Documentation/devicetree/bindings/x86/interrupt.txt b/Documentation/devicetree/bindings/interrupt-controller/intel,ce4100-ioapic.txt
index 7d19f494f19a..7d19f494f19a 100644
--- a/Documentation/devicetree/bindings/x86/interrupt.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/intel,ce4100-ioapic.txt
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,sysirq.txt b/Documentation/devicetree/bindings/interrupt-controller/mediatek,sysirq.txt
index afef6a85ac51..afef6a85ac51 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,sysirq.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/mediatek,sysirq.txt
diff --git a/Documentation/devicetree/bindings/arm/mrvl/intc.txt b/Documentation/devicetree/bindings/interrupt-controller/mrvl,intc.txt
index 8b53273cb22f..8b53273cb22f 100644
--- a/Documentation/devicetree/bindings/arm/mrvl/intc.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/mrvl,intc.txt
diff --git a/Documentation/devicetree/bindings/arm/lpc32xx-mic.txt b/Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.txt
index 539adca19e8f..539adca19e8f 100644
--- a/Documentation/devicetree/bindings/arm/lpc32xx-mic.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.txt
diff --git a/Documentation/devicetree/bindings/open-pic.txt b/Documentation/devicetree/bindings/interrupt-controller/open-pic.txt
index 909a902dff85..909a902dff85 100644
--- a/Documentation/devicetree/bindings/open-pic.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/open-pic.txt
diff --git a/Documentation/devicetree/bindings/interrupt-controller/qca,ath79-misc-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/qca,ath79-misc-intc.txt
index 391717a68f3b..ec96b1f01478 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/qca,ath79-misc-intc.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/qca,ath79-misc-intc.txt
@@ -4,8 +4,8 @@ The MISC interrupt controller is a secondary controller for lower priority
4interrupt. 4interrupt.
5 5
6Required Properties: 6Required Properties:
7- compatible: has to be "qca,<soctype>-cpu-intc", "qca,ar7100-misc-intc" 7- compatible: has to be "qca,<soctype>-cpu-intc", "qca,ar7100-misc-intc" or
8 as fallback 8 "qca,<soctype>-cpu-intc", "qca,ar7240-misc-intc"
9- reg: Base address and size of the controllers memory area 9- reg: Base address and size of the controllers memory area
10- interrupt-parent: phandle of the parent interrupt controller. 10- interrupt-parent: phandle of the parent interrupt controller.
11- interrupts: Interrupt specifier for the controllers interrupt. 11- interrupts: Interrupt specifier for the controllers interrupt.
@@ -13,6 +13,9 @@ Required Properties:
13- #interrupt-cells : Specifies the number of cells needed to encode interrupt 13- #interrupt-cells : Specifies the number of cells needed to encode interrupt
14 source, should be 1 14 source, should be 1
15 15
16Compatible fallback depends on the SoC. Use ar7100 for ar71xx and ar913x,
17use ar7240 for all other SoCs.
18
16Please refer to interrupts.txt in this directory for details of the common 19Please refer to interrupts.txt in this directory for details of the common
17Interrupt Controllers bindings used by client devices. 20Interrupt Controllers bindings used by client devices.
18 21
@@ -28,3 +31,16 @@ Example:
28 interrupt-controller; 31 interrupt-controller;
29 #interrupt-cells = <1>; 32 #interrupt-cells = <1>;
30 }; 33 };
34
35Another example:
36
37 interrupt-controller@18060010 {
38 compatible = "qca,ar9331-misc-intc", qca,ar7240-misc-intc";
39 reg = <0x18060010 0x4>;
40
41 interrupt-parent = <&cpuintc>;
42 interrupts = <6>;
43
44 interrupt-controller;
45 #interrupt-cells = <1>;
46 };
diff --git a/Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.txt b/Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.txt
index 63633bdea7e4..ae5054c27c99 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.txt
@@ -10,6 +10,7 @@ Required properties:
10 - "renesas,irqc-r8a7792" (R-Car V2H) 10 - "renesas,irqc-r8a7792" (R-Car V2H)
11 - "renesas,irqc-r8a7793" (R-Car M2-N) 11 - "renesas,irqc-r8a7793" (R-Car M2-N)
12 - "renesas,irqc-r8a7794" (R-Car E2) 12 - "renesas,irqc-r8a7794" (R-Car E2)
13 - "renesas,intc-ex-r8a7795" (R-Car H3)
13- #interrupt-cells: has to be <2>: an interrupt index and flags, as defined in 14- #interrupt-cells: has to be <2>: an interrupt index and flags, as defined in
14 interrupts.txt in this directory 15 interrupts.txt in this directory
15- clocks: Must contain a reference to the functional clock. 16- clocks: Must contain a reference to the functional clock.
diff --git a/Documentation/devicetree/bindings/arm/samsung/interrupt-combiner.txt b/Documentation/devicetree/bindings/interrupt-controller/samsung,exynos4210-combiner.txt
index 9e5f73412cd7..9e5f73412cd7 100644
--- a/Documentation/devicetree/bindings/arm/samsung/interrupt-combiner.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/samsung,exynos4210-combiner.txt
diff --git a/Documentation/devicetree/bindings/arc/interrupts.txt b/Documentation/devicetree/bindings/interrupt-controller/snps,arc700-intc.txt
index 9a5d562435ea..9a5d562435ea 100644
--- a/Documentation/devicetree/bindings/arc/interrupts.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/snps,arc700-intc.txt
diff --git a/Documentation/devicetree/bindings/arc/archs-idu-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/snps,archs-idu-intc.txt
index 0dcb7c7d3e40..0dcb7c7d3e40 100644
--- a/Documentation/devicetree/bindings/arc/archs-idu-intc.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/snps,archs-idu-intc.txt
diff --git a/Documentation/devicetree/bindings/arc/archs-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/snps,archs-intc.txt
index 69f326d6a5ad..69f326d6a5ad 100644
--- a/Documentation/devicetree/bindings/arc/archs-intc.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/snps,archs-intc.txt
diff --git a/Documentation/devicetree/bindings/arm/spear/shirq.txt b/Documentation/devicetree/bindings/interrupt-controller/st,spear3xx-shirq.txt
index 715a013ed4bd..715a013ed4bd 100644
--- a/Documentation/devicetree/bindings/arm/spear/shirq.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/st,spear3xx-shirq.txt
diff --git a/Documentation/devicetree/bindings/c6x/interrupt.txt b/Documentation/devicetree/bindings/interrupt-controller/ti,c64x+megamod-pic.txt
index 42bb796cc4ad..42bb796cc4ad 100644
--- a/Documentation/devicetree/bindings/c6x/interrupt.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/ti,c64x+megamod-pic.txt
diff --git a/Documentation/devicetree/bindings/arm/davinci/cp-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/ti,cp-intc.txt
index 597e8a089fe4..597e8a089fe4 100644
--- a/Documentation/devicetree/bindings/arm/davinci/cp-intc.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/ti,cp-intc.txt
diff --git a/Documentation/devicetree/bindings/arm/omap/intc.txt b/Documentation/devicetree/bindings/interrupt-controller/ti,omap2-intc.txt
index f2583e6ec060..f2583e6ec060 100644
--- a/Documentation/devicetree/bindings/arm/omap/intc.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/ti,omap2-intc.txt
diff --git a/Documentation/devicetree/bindings/arm/vt8500/via,vt8500-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/via,vt8500-intc.txt
index 0a4ce1051b02..0a4ce1051b02 100644
--- a/Documentation/devicetree/bindings/arm/vt8500/via,vt8500-intc.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/via,vt8500-intc.txt
diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu-v3.txt b/Documentation/devicetree/bindings/iommu/arm,smmu-v3.txt
index 3443e0f838df..947863acc2d4 100644
--- a/Documentation/devicetree/bindings/iommu/arm,smmu-v3.txt
+++ b/Documentation/devicetree/bindings/iommu/arm,smmu-v3.txt
@@ -36,5 +36,24 @@ the PCIe specification.
36 NOTE: this only applies to the SMMU itself, not 36 NOTE: this only applies to the SMMU itself, not
37 masters connected upstream of the SMMU. 37 masters connected upstream of the SMMU.
38 38
39- msi-parent : See the generic MSI binding described in
40 devicetree/bindings/interrupt-controller/msi.txt
41 for a description of the msi-parent property.
42
39- hisilicon,broken-prefetch-cmd 43- hisilicon,broken-prefetch-cmd
40 : Avoid sending CMD_PREFETCH_* commands to the SMMU. 44 : Avoid sending CMD_PREFETCH_* commands to the SMMU.
45
46** Example
47
48 smmu@2b400000 {
49 compatible = "arm,smmu-v3";
50 reg = <0x0 0x2b400000 0x0 0x20000>;
51 interrupts = <GIC_SPI 74 IRQ_TYPE_EDGE_RISING>,
52 <GIC_SPI 75 IRQ_TYPE_EDGE_RISING>,
53 <GIC_SPI 77 IRQ_TYPE_EDGE_RISING>,
54 <GIC_SPI 79 IRQ_TYPE_EDGE_RISING>;
55 interrupt-names = "eventq", "priq", "cmdq-sync", "gerror";
56 dma-coherent;
57 #iommu-cells = <0>;
58 msi-parent = <&its 0xff0000>;
59 };
diff --git a/Documentation/devicetree/bindings/iommu/samsung,sysmmu.txt b/Documentation/devicetree/bindings/iommu/samsung,sysmmu.txt
index 729543c47046..bc620fe32a70 100644
--- a/Documentation/devicetree/bindings/iommu/samsung,sysmmu.txt
+++ b/Documentation/devicetree/bindings/iommu/samsung,sysmmu.txt
@@ -47,7 +47,7 @@ Required properties:
47- clocks: Required if the System MMU is needed to gate its clock. 47- clocks: Required if the System MMU is needed to gate its clock.
48- power-domains: Required if the System MMU is needed to gate its power. 48- power-domains: Required if the System MMU is needed to gate its power.
49 Please refer to the following document: 49 Please refer to the following document:
50 Documentation/devicetree/bindings/arm/exynos/power_domain.txt 50 Documentation/devicetree/bindings/power/pd-samsung.txt
51 51
52Examples: 52Examples:
53 gsc_0: gsc@13e00000 { 53 gsc_0: gsc@13e00000 {
diff --git a/Documentation/devicetree/bindings/iommu/ti,omap-iommu.txt b/Documentation/devicetree/bindings/iommu/ti,omap-iommu.txt
index 869699925fd5..4bd10dd881b8 100644
--- a/Documentation/devicetree/bindings/iommu/ti,omap-iommu.txt
+++ b/Documentation/devicetree/bindings/iommu/ti,omap-iommu.txt
@@ -4,6 +4,7 @@ Required properties:
4- compatible : Should be one of, 4- compatible : Should be one of,
5 "ti,omap2-iommu" for OMAP2/OMAP3 IOMMU instances 5 "ti,omap2-iommu" for OMAP2/OMAP3 IOMMU instances
6 "ti,omap4-iommu" for OMAP4/OMAP5 IOMMU instances 6 "ti,omap4-iommu" for OMAP4/OMAP5 IOMMU instances
7 "ti,dra7-dsp-iommu" for DRA7xx DSP IOMMU instances
7 "ti,dra7-iommu" for DRA7xx IOMMU instances 8 "ti,dra7-iommu" for DRA7xx IOMMU instances
8- ti,hwmods : Name of the hwmod associated with the IOMMU instance 9- ti,hwmods : Name of the hwmod associated with the IOMMU instance
9- reg : Address space for the configuration registers 10- reg : Address space for the configuration registers
@@ -19,6 +20,13 @@ Optional properties:
19 Should be either 8 or 32 (default: 32) 20 Should be either 8 or 32 (default: 32)
20- ti,iommu-bus-err-back : Indicates the IOMMU instance supports throwing 21- ti,iommu-bus-err-back : Indicates the IOMMU instance supports throwing
21 back a bus error response on MMU faults. 22 back a bus error response on MMU faults.
23- ti,syscon-mmuconfig : Should be a pair of the phandle to the DSP_SYSTEM
24 syscon node that contains the additional control
25 register for enabling the MMU, and the MMU instance
26 number (0-indexed) within the sub-system. This property
27 is required for DSP IOMMU instances on DRA7xx SoCs. The
28 instance number should be 0 for DSP MDMA MMUs and 1 for
29 DSP EDMA MMUs.
22 30
23Example: 31Example:
24 /* OMAP3 ISP MMU */ 32 /* OMAP3 ISP MMU */
@@ -30,3 +38,22 @@ Example:
30 ti,hwmods = "mmu_isp"; 38 ti,hwmods = "mmu_isp";
31 ti,#tlb-entries = <8>; 39 ti,#tlb-entries = <8>;
32 }; 40 };
41
42 /* DRA74x DSP2 MMUs */
43 mmu0_dsp2: mmu@41501000 {
44 compatible = "ti,dra7-dsp-iommu";
45 reg = <0x41501000 0x100>;
46 interrupts = <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>;
47 ti,hwmods = "mmu0_dsp2";
48 #iommu-cells = <0>;
49 ti,syscon-mmuconfig = <&dsp2_system 0x0>;
50 };
51
52 mmu1_dsp2: mmu@41502000 {
53 compatible = "ti,dra7-dsp-iommu";
54 reg = <0x41502000 0x100>;
55 interrupts = <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>;
56 ti,hwmods = "mmu1_dsp2";
57 #iommu-cells = <0>;
58 ti,syscon-mmuconfig = <&dsp2_system 0x1>;
59 };
diff --git a/Documentation/devicetree/bindings/video/backlight/88pm860x.txt b/Documentation/devicetree/bindings/leds/backlight/88pm860x.txt
index 261df2799315..261df2799315 100644
--- a/Documentation/devicetree/bindings/video/backlight/88pm860x.txt
+++ b/Documentation/devicetree/bindings/leds/backlight/88pm860x.txt
diff --git a/Documentation/devicetree/bindings/video/backlight/gpio-backlight.txt b/Documentation/devicetree/bindings/leds/backlight/gpio-backlight.txt
index 321be6640533..321be6640533 100644
--- a/Documentation/devicetree/bindings/video/backlight/gpio-backlight.txt
+++ b/Documentation/devicetree/bindings/leds/backlight/gpio-backlight.txt
diff --git a/Documentation/devicetree/bindings/video/backlight/lp855x.txt b/Documentation/devicetree/bindings/leds/backlight/lp855x.txt
index 0a3ecbc3a1b9..0a3ecbc3a1b9 100644
--- a/Documentation/devicetree/bindings/video/backlight/lp855x.txt
+++ b/Documentation/devicetree/bindings/leds/backlight/lp855x.txt
diff --git a/Documentation/devicetree/bindings/video/backlight/max8925-backlight.txt b/Documentation/devicetree/bindings/leds/backlight/max8925-backlight.txt
index b4cffdaa4137..b4cffdaa4137 100644
--- a/Documentation/devicetree/bindings/video/backlight/max8925-backlight.txt
+++ b/Documentation/devicetree/bindings/leds/backlight/max8925-backlight.txt
diff --git a/Documentation/devicetree/bindings/video/backlight/pm8941-wled.txt b/Documentation/devicetree/bindings/leds/backlight/pm8941-wled.txt
index 424f8444a6cd..e5b294dafc58 100644
--- a/Documentation/devicetree/bindings/video/backlight/pm8941-wled.txt
+++ b/Documentation/devicetree/bindings/leds/backlight/pm8941-wled.txt
@@ -5,6 +5,8 @@ Required properties:
5- reg: slave address 5- reg: slave address
6 6
7Optional properties: 7Optional properties:
8- default-brightness: brightness value on boot, value from: 0-4095
9 default: 2048
8- label: The name of the backlight device 10- label: The name of the backlight device
9- qcom,cs-out: bool; enable current sink output 11- qcom,cs-out: bool; enable current sink output
10- qcom,cabc: bool; enable content adaptive backlight control 12- qcom,cabc: bool; enable content adaptive backlight control
diff --git a/Documentation/devicetree/bindings/video/backlight/pwm-backlight.txt b/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.txt
index 764db86d441a..764db86d441a 100644
--- a/Documentation/devicetree/bindings/video/backlight/pwm-backlight.txt
+++ b/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.txt
diff --git a/Documentation/devicetree/bindings/video/backlight/sky81452-backlight.txt b/Documentation/devicetree/bindings/leds/backlight/sky81452-backlight.txt
index 8bf2940f54bc..8bf2940f54bc 100644
--- a/Documentation/devicetree/bindings/video/backlight/sky81452-backlight.txt
+++ b/Documentation/devicetree/bindings/leds/backlight/sky81452-backlight.txt
diff --git a/Documentation/devicetree/bindings/video/backlight/tps65217-backlight.txt b/Documentation/devicetree/bindings/leds/backlight/tps65217-backlight.txt
index 5fb9279ac287..5fb9279ac287 100644
--- a/Documentation/devicetree/bindings/video/backlight/tps65217-backlight.txt
+++ b/Documentation/devicetree/bindings/leds/backlight/tps65217-backlight.txt
diff --git a/Documentation/devicetree/bindings/leds/leds-aat1290.txt b/Documentation/devicetree/bindings/leds/leds-aat1290.txt
index c05ed91a4e42..85c0c58617f6 100644
--- a/Documentation/devicetree/bindings/leds/leds-aat1290.txt
+++ b/Documentation/devicetree/bindings/leds/leds-aat1290.txt
@@ -27,9 +27,9 @@ Required properties of the LED child node:
27- flash-max-microamp : see Documentation/devicetree/bindings/leds/common.txt 27- flash-max-microamp : see Documentation/devicetree/bindings/leds/common.txt
28 Maximum flash LED supply current can be calculated using 28 Maximum flash LED supply current can be calculated using
29 following formula: I = 1A * 162kohm / Rset. 29 following formula: I = 1A * 162kohm / Rset.
30- flash-timeout-us : see Documentation/devicetree/bindings/leds/common.txt 30- flash-max-timeout-us : see Documentation/devicetree/bindings/leds/common.txt
31 Maximum flash timeout can be calculated using following 31 Maximum flash timeout can be calculated using following
32 formula: T = 8.82 * 10^9 * Ct. 32 formula: T = 8.82 * 10^9 * Ct.
33 33
34Optional properties of the LED child node: 34Optional properties of the LED child node:
35- label : see Documentation/devicetree/bindings/leds/common.txt 35- label : see Documentation/devicetree/bindings/leds/common.txt
@@ -54,7 +54,7 @@ aat1290 {
54 label = "aat1290-flash"; 54 label = "aat1290-flash";
55 led-max-microamp = <520833>; 55 led-max-microamp = <520833>;
56 flash-max-microamp = <1012500>; 56 flash-max-microamp = <1012500>;
57 flash-timeout-us = <1940000>; 57 flash-max-timeout-us = <1940000>;
58 }; 58 };
59}; 59};
60 60
diff --git a/Documentation/devicetree/bindings/leds/leds-bcm6328.txt b/Documentation/devicetree/bindings/leds/leds-bcm6328.txt
index f9e36adc0ebf..3f48c1eaf085 100644
--- a/Documentation/devicetree/bindings/leds/leds-bcm6328.txt
+++ b/Documentation/devicetree/bindings/leds/leds-bcm6328.txt
@@ -29,6 +29,14 @@ Required properties:
29Optional properties: 29Optional properties:
30 - brcm,serial-leds : Boolean, enables Serial LEDs. 30 - brcm,serial-leds : Boolean, enables Serial LEDs.
31 Default : false 31 Default : false
32 - brcm,serial-mux : Boolean, enables Serial LEDs multiplexing.
33 Default : false
34 - brcm,serial-clk-low : Boolean, makes clock signal active low.
35 Default : false
36 - brcm,serial-dat-low : Boolean, makes data signal active low.
37 Default : false
38 - brcm,serial-shift-inv : Boolean, inverts Serial LEDs shift direction.
39 Default : false
32 40
33Each LED is represented as a sub-node of the brcm,bcm6328-leds device. 41Each LED is represented as a sub-node of the brcm,bcm6328-leds device.
34 42
@@ -110,6 +118,8 @@ Scenario 2 : BCM63268 with Serial/GPHY0 LEDs
110 #size-cells = <0>; 118 #size-cells = <0>;
111 reg = <0x10001900 0x24>; 119 reg = <0x10001900 0x24>;
112 brcm,serial-leds; 120 brcm,serial-leds;
121 brcm,serial-dat-low;
122 brcm,serial-shift-inv;
113 123
114 gphy0_spd0@0 { 124 gphy0_spd0@0 {
115 reg = <0>; 125 reg = <0>;
diff --git a/Documentation/devicetree/bindings/leds/leds-netxbig.txt b/Documentation/devicetree/bindings/leds/leds-netxbig.txt
new file mode 100644
index 000000000000..5ef92a26d768
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/leds-netxbig.txt
@@ -0,0 +1,92 @@
1Binding for the CPLD LEDs (GPIO extension bus) found on some LaCie/Seagate
2boards (Example: 2Big/5Big Network v2, 2Big NAS).
3
4Required properties:
5- compatible: "lacie,netxbig-leds".
6- gpio-ext: Phandle for the gpio-ext bus.
7
8Optional properties:
9- timers: Timer array. Each timer entry is represented by three integers:
10 Mode (gpio-ext bus), delay_on and delay_off.
11
12Each LED is represented as a sub-node of the netxbig-leds device.
13
14Required sub-node properties:
15- mode-addr: Mode register address on gpio-ext bus.
16- mode-val: Mode to value mapping. Each entry is represented by two integers:
17 A mode and the corresponding value on the gpio-ext bus.
18- bright-addr: Brightness register address on gpio-ext bus.
19- max-brightness: Maximum brightness value.
20
21Optional sub-node properties:
22- label: Name for this LED. If omitted, the label is taken from the node name.
23- linux,default-trigger: Trigger assigned to the LED.
24
25Example:
26
27netxbig-leds {
28 compatible = "lacie,netxbig-leds";
29
30 gpio-ext = &gpio_ext;
31
32 timers = <NETXBIG_LED_TIMER1 500 500
33 NETXBIG_LED_TIMER2 500 1000>;
34
35 blue-power {
36 label = "netxbig:blue:power";
37 mode-addr = <0>;
38 mode-val = <NETXBIG_LED_OFF 0
39 NETXBIG_LED_ON 1
40 NETXBIG_LED_TIMER1 3
41 NETXBIG_LED_TIMER2 7>;
42 bright-addr = <1>;
43 max-brightness = <7>;
44 };
45 red-power {
46 label = "netxbig:red:power";
47 mode-addr = <0>;
48 mode-val = <NETXBIG_LED_OFF 0
49 NETXBIG_LED_ON 2
50 NETXBIG_LED_TIMER1 4>;
51 bright-addr = <1>;
52 max-brightness = <7>;
53 };
54 blue-sata0 {
55 label = "netxbig:blue:sata0";
56 mode-addr = <3>;
57 mode-val = <NETXBIG_LED_OFF 0
58 NETXBIG_LED_ON 7
59 NETXBIG_LED_SATA 1
60 NETXBIG_LED_TIMER1 3>;
61 bright-addr = <2>;
62 max-brightness = <7>;
63 };
64 red-sata0 {
65 label = "netxbig:red:sata0";
66 mode-addr = <3>;
67 mode-val = <NETXBIG_LED_OFF 0
68 NETXBIG_LED_ON 2
69 NETXBIG_LED_TIMER1 4>;
70 bright-addr = <2>;
71 max-brightness = <7>;
72 };
73 blue-sata1 {
74 label = "netxbig:blue:sata1";
75 mode-addr = <4>;
76 mode-val = <NETXBIG_LED_OFF 0
77 NETXBIG_LED_ON 7
78 NETXBIG_LED_SATA 1
79 NETXBIG_LED_TIMER1 3>;
80 bright-addr = <2>;
81 max-brightness = <7>;
82 };
83 red-sata1 {
84 label = "netxbig:red:sata1";
85 mode-addr = <4>;
86 mode-val = <NETXBIG_LED_OFF 0
87 NETXBIG_LED_ON 2
88 NETXBIG_LED_TIMER1 4>;
89 bright-addr = <2>;
90 max-brightness = <7>;
91 };
92};
diff --git a/Documentation/devicetree/bindings/mailbox/omap-mailbox.txt b/Documentation/devicetree/bindings/mailbox/omap-mailbox.txt
index d1a043339c11..9b40c4925aa9 100644
--- a/Documentation/devicetree/bindings/mailbox/omap-mailbox.txt
+++ b/Documentation/devicetree/bindings/mailbox/omap-mailbox.txt
@@ -75,6 +75,14 @@ data that represent the following:
75 Cell #3 (usr_id) - mailbox user id for identifying the interrupt line 75 Cell #3 (usr_id) - mailbox user id for identifying the interrupt line
76 associated with generating a tx/rx fifo interrupt. 76 associated with generating a tx/rx fifo interrupt.
77 77
78Optional Properties:
79--------------------
80- ti,mbox-send-noirq: Quirk flag to allow the client user of this sub-mailbox
81 to send messages without triggering a Tx ready interrupt,
82 and to control the Tx ticker. Should be used only on
83 sub-mailboxes used to communicate with WkupM3 remote
84 processor on AM33xx/AM43xx SoCs.
85
78Mailbox Users: 86Mailbox Users:
79============== 87==============
80A device needing to communicate with a target processor device should specify 88A device needing to communicate with a target processor device should specify
diff --git a/Documentation/devicetree/bindings/mailbox/sti-mailbox.txt b/Documentation/devicetree/bindings/mailbox/sti-mailbox.txt
new file mode 100644
index 000000000000..b61eec920359
--- /dev/null
+++ b/Documentation/devicetree/bindings/mailbox/sti-mailbox.txt
@@ -0,0 +1,51 @@
1ST Microelectronics Mailbox Driver
2
3Each ST Mailbox IP currently consists of 4 instances of 32 channels. Messages
4are passed between Application and Remote processors using shared memory.
5
6Controller
7----------
8
9Required properties:
10- compatible : Should be "st,stih407-mailbox"
11- reg : Offset and length of the device's register set
12- mbox-name : Name of the mailbox
13- #mbox-cells: : Must be 2
14 <&phandle instance channel direction>
15 phandle : Label name of controller
16 instance : Instance number
17 channel : Channel number
18
19Optional properties
20- interrupts : Contains the IRQ line for a Rx mailbox
21
22Example:
23
24mailbox0: mailbox@0 {
25 compatible = "st,stih407-mailbox";
26 reg = <0x08f00000 0x1000>;
27 interrupts = <GIC_SPI 1 IRQ_TYPE_NONE>;
28 #mbox-cells = <2>;
29 mbox-name = "a9";
30};
31
32Client
33------
34
35Required properties:
36- compatible : Many (See the client docs)
37- reg : Shared (between Application and Remote) memory address
38- mboxes : Standard property to specify a Mailbox (See ./mailbox.txt)
39 Cells must match 'mbox-cells' (See Controller docs above)
40
41Optional properties
42- mbox-names : Name given to channels seen in the 'mboxes' property.
43
44Example:
45
46mailbox_test {
47 compatible = "mailbox_test";
48 reg = <0x[shared_memory_address], [shared_memory_size]>;
49 mboxes = <&mailbox2 0 1>, <&mailbox0 2 1>;
50 mbox-names = "tx", "rx";
51};
diff --git a/Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt b/Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt
index 4ef45636ebde..38941db23dd2 100644
--- a/Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt
+++ b/Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt
@@ -4,7 +4,8 @@ Required 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", "samsung,exynos5420-jpeg"; 7 "samsung,exynos3250-jpeg", "samsung,exynos5420-jpeg",
8 "samsung,exynos5433-jpeg";
8- reg : address and length of the JPEG codec IP register set; 9- reg : address and length of the JPEG codec IP register set;
9- interrupts : specifies the JPEG codec IP interrupt; 10- interrupts : specifies the JPEG codec IP interrupt;
10- clock-names : should contain: 11- clock-names : should contain:
diff --git a/Documentation/devicetree/bindings/memory-controllers/arm,pl172.txt b/Documentation/devicetree/bindings/memory-controllers/arm,pl172.txt
index e6df32f9986d..22b77ee02f58 100644
--- a/Documentation/devicetree/bindings/memory-controllers/arm,pl172.txt
+++ b/Documentation/devicetree/bindings/memory-controllers/arm,pl172.txt
@@ -1,8 +1,9 @@
1* Device tree bindings for ARM PL172 MultiPort Memory Controller 1* Device tree bindings for ARM PL172/PL175/PL176 MultiPort Memory Controller
2 2
3Required properties: 3Required properties:
4 4
5- compatible: "arm,pl172", "arm,primecell" 5- compatible: Must be "arm,primecell" and exactly one from
6 "arm,pl172", "arm,pl175" or "arm,pl176".
6 7
7- reg: Must contains offset/length value for controller. 8- reg: Must contains offset/length value for controller.
8 9
@@ -56,7 +57,8 @@ Optional child cs node config properties:
56 57
57- mpmc,extended-wait: Enable extended wait. 58- mpmc,extended-wait: Enable extended wait.
58 59
59- mpmc,buffer-enable: Enable write buffer. 60- mpmc,buffer-enable: Enable write buffer, option is not supported by
61 PL175 and PL176 controllers.
60 62
61- mpmc,write-protect: Enable write protect. 63- mpmc,write-protect: Enable write protect.
62 64
diff --git a/Documentation/devicetree/bindings/arm/calxeda/mem-ctrlr.txt b/Documentation/devicetree/bindings/memory-controllers/calxeda-ddr-ctrlr.txt
index 049675944b78..049675944b78 100644
--- a/Documentation/devicetree/bindings/arm/calxeda/mem-ctrlr.txt
+++ b/Documentation/devicetree/bindings/memory-controllers/calxeda-ddr-ctrlr.txt
diff --git a/Documentation/devicetree/bindings/memory-controllers/renesas-memory-controllers.txt b/Documentation/devicetree/bindings/memory-controllers/renesas-memory-controllers.txt
index c64b7925cd09..9f78e6c82740 100644
--- a/Documentation/devicetree/bindings/memory-controllers/renesas-memory-controllers.txt
+++ b/Documentation/devicetree/bindings/memory-controllers/renesas-memory-controllers.txt
@@ -24,9 +24,9 @@ Required properties:
24Optional properties: 24Optional properties:
25 - interrupts: Must contain a list of interrupt specifiers for memory 25 - interrupts: Must contain a list of interrupt specifiers for memory
26 controller interrupts, if available. 26 controller interrupts, if available.
27 - interrupts-names: Must contain a list of interrupt names corresponding to 27 - interrupt-names: Must contain a list of interrupt names corresponding to
28 the interrupts in the interrupts property, if available. 28 the interrupts in the interrupts property, if available.
29 Valid interrupt names are: 29 Valid interrupt names are:
30 - "sec" (secure interrupt) 30 - "sec" (secure interrupt)
31 - "temp" (normal (temperature) interrupt) 31 - "temp" (normal (temperature) interrupt)
32 - power-domains: Must contain a reference to the PM domain that the memory 32 - power-domains: Must contain a reference to the PM domain that the memory
diff --git a/Documentation/devicetree/bindings/mfd/arizona.txt b/Documentation/devicetree/bindings/mfd/arizona.txt
index a8fee60dc20d..18be0cbfb456 100644
--- a/Documentation/devicetree/bindings/mfd/arizona.txt
+++ b/Documentation/devicetree/bindings/mfd/arizona.txt
@@ -44,7 +44,6 @@ Required properties:
44Optional properties: 44Optional properties:
45 45
46 - wlf,reset : GPIO specifier for the GPIO controlling /RESET 46 - wlf,reset : GPIO specifier for the GPIO controlling /RESET
47 - wlf,ldoena : GPIO specifier for the GPIO controlling LDOENA
48 47
49 - wlf,gpio-defaults : A list of GPIO configuration register values. Defines 48 - wlf,gpio-defaults : A list of GPIO configuration register values. Defines
50 for the appropriate values can found in <dt-bindings/mfd/arizona.txt>. If 49 for the appropriate values can found in <dt-bindings/mfd/arizona.txt>. If
@@ -67,21 +66,13 @@ Optional properties:
67 present, the number of values should be less than or equal to the 66 present, the number of values should be less than or equal to the
68 number of inputs, unspecified inputs will use the chip default. 67 number of inputs, unspecified inputs will use the chip default.
69 68
70 - wlf,hpdet-channel : Headphone detection channel.
71 ARIZONA_ACCDET_MODE_HPL or 1 - Headphone detect mode is set to HPDETL
72 ARIZONA_ACCDET_MODE_HPR or 2 - Headphone detect mode is set to HPDETR
73 If this node is not mentioned or if the value is unknown, then
74 headphone detection mode is set to HPDETL.
75
76 - DCVDD-supply, MICVDD-supply : Power supplies, only need to be specified if 69 - DCVDD-supply, MICVDD-supply : Power supplies, only need to be specified if
77 they are being externally supplied. As covered in 70 they are being externally supplied. As covered in
78 Documentation/devicetree/bindings/regulator/regulator.txt 71 Documentation/devicetree/bindings/regulator/regulator.txt
79 72
80Optional subnodes: 73Also see child specific device properties:
81 - ldo1 : Initial data for the LDO1 regulator, as covered in 74 Regulator - ../regulator/arizona-regulator.txt
82 Documentation/devicetree/bindings/regulator/regulator.txt 75 Extcon - ../extcon/extcon-arizona.txt
83 - micvdd : Initial data for the MICVDD regulator, as covered in
84 Documentation/devicetree/bindings/regulator/regulator.txt
85 76
86Example: 77Example:
87 78
diff --git a/Documentation/devicetree/bindings/mfd/atmel-flexcom.txt b/Documentation/devicetree/bindings/mfd/atmel-flexcom.txt
new file mode 100644
index 000000000000..692300117c64
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/atmel-flexcom.txt
@@ -0,0 +1,63 @@
1* Device tree bindings for Atmel Flexcom (Flexible Serial Communication Unit)
2
3The Atmel Flexcom is just a wrapper which embeds a SPI controller, an I2C
4controller and an USART. Only one function can be used at a time and is chosen
5at boot time according to the device tree.
6
7Required properties:
8- compatible: Should be "atmel,sama5d2-flexcom"
9- reg: Should be the offset/length value for Flexcom dedicated
10 I/O registers (without USART, TWI or SPI registers).
11- clocks: Should be the Flexcom peripheral clock from PMC.
12- #address-cells: Should be <1>
13- #size-cells: Should be <1>
14- ranges: Should be one range for the full I/O register region
15 (including USART, TWI and SPI registers).
16- atmel,flexcom-mode: Should be one of the following values:
17 - <1> for USART
18 - <2> for SPI
19 - <3> for I2C
20
21Required child:
22A single available child device of type matching the "atmel,flexcom-mode"
23property.
24
25The phandle provided by the clocks property of the child is the same as one for
26the Flexcom parent.
27
28For other properties, please refer to the documentations of the respective
29device:
30- ../serial/atmel-usart.txt
31- ../spi/spi_atmel.txt
32- ../i2c/i2c-at91.txt
33
34Example:
35
36flexcom@f8034000 {
37 compatible = "atmel,sama5d2-flexcom";
38 reg = <0xf8034000 0x200>;
39 clocks = <&flx0_clk>;
40 #address-cells = <1>;
41 #size-cells = <1>;
42 ranges = <0x0 0xf8034000 0x800>;
43 atmel,flexcom-mode = <2>;
44
45 spi@400 {
46 compatible = "atmel,at91rm9200-spi";
47 reg = <0x400 0x200>;
48 interrupts = <19 IRQ_TYPE_LEVEL_HIGH 7>;
49 pinctrl-names = "default";
50 pinctrl-0 = <&pinctrl_flx0_default>;
51 #address-cells = <1>;
52 #size-cells = <0>;
53 clocks = <&flx0_clk>;
54 clock-names = "spi_clk";
55 atmel,fifo-size = <32>;
56
57 mtd_dataflash@0 {
58 compatible = "atmel,at25f512b";
59 reg = <0>;
60 spi-max-frequency = <20000000>;
61 };
62 };
63};
diff --git a/Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt b/Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt
index ad5d90482a0e..670831b29565 100644
--- a/Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt
+++ b/Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt
@@ -15,7 +15,7 @@ Required properties:
15 15
16The HLCDC IP exposes two subdevices: 16The HLCDC IP exposes two subdevices:
17 - a PWM chip: see ../pwm/atmel-hlcdc-pwm.txt 17 - a PWM chip: see ../pwm/atmel-hlcdc-pwm.txt
18 - a Display Controller: see ../drm/atmel-hlcdc-dc.txt 18 - a Display Controller: see ../display/atmel-hlcdc-dc.txt
19 19
20Example: 20Example:
21 21
diff --git a/Documentation/devicetree/bindings/mfd/axp20x.txt b/Documentation/devicetree/bindings/mfd/axp20x.txt
index 41811223e5be..a474359dd206 100644
--- a/Documentation/devicetree/bindings/mfd/axp20x.txt
+++ b/Documentation/devicetree/bindings/mfd/axp20x.txt
@@ -60,8 +60,8 @@ DCDC2 : DC-DC buck : vin2-supply
60DCDC3 : DC-DC buck : vin3-supply 60DCDC3 : DC-DC buck : vin3-supply
61DCDC4 : DC-DC buck : vin4-supply 61DCDC4 : DC-DC buck : vin4-supply
62DCDC5 : DC-DC buck : vin5-supply 62DCDC5 : DC-DC buck : vin5-supply
63DC1SW : On/Off Switch : dcdc1-supply : DCDC1 secondary output 63DC1SW : On/Off Switch : : DCDC1 secondary output
64DC5LDO : LDO : dcdc5-supply : input from DCDC5 64DC5LDO : LDO : : input from DCDC5
65ALDO1 : LDO : aldoin-supply : shared supply 65ALDO1 : LDO : aldoin-supply : shared supply
66ALDO2 : LDO : aldoin-supply : shared supply 66ALDO2 : LDO : aldoin-supply : shared supply
67ALDO3 : LDO : aldoin-supply : shared supply 67ALDO3 : LDO : aldoin-supply : shared supply
diff --git a/Documentation/devicetree/bindings/mfd/cros-ec.txt b/Documentation/devicetree/bindings/mfd/cros-ec.txt
index 1777916e9e28..136e0c2da44d 100644
--- a/Documentation/devicetree/bindings/mfd/cros-ec.txt
+++ b/Documentation/devicetree/bindings/mfd/cros-ec.txt
@@ -34,6 +34,10 @@ Required properties (LPC):
34- compatible: "google,cros-ec-lpc" 34- compatible: "google,cros-ec-lpc"
35- reg: List of (IO address, size) pairs defining the interface uses 35- reg: List of (IO address, size) pairs defining the interface uses
36 36
37Optional properties (all):
38- google,has-vbc-nvram: Some implementations of the EC include a small
39 nvram space used to store verified boot context data. This boolean flag
40 is used to specify whether this nvram is present or not.
37 41
38Example for I2C: 42Example for I2C:
39 43
diff --git a/Documentation/devicetree/bindings/mfd/da9150.txt b/Documentation/devicetree/bindings/mfd/da9150.txt
index d0588eaa0d71..fd4dca7f4aba 100644
--- a/Documentation/devicetree/bindings/mfd/da9150.txt
+++ b/Documentation/devicetree/bindings/mfd/da9150.txt
@@ -6,6 +6,7 @@ Device Description
6------ ----------- 6------ -----------
7da9150-gpadc : General Purpose ADC 7da9150-gpadc : General Purpose ADC
8da9150-charger : Battery Charger 8da9150-charger : Battery Charger
9da9150-fg : Battery Fuel-Gauge
9 10
10====== 11======
11 12
@@ -16,13 +17,13 @@ Required properties:
16 the IRQs from da9150 are delivered to. 17 the IRQs from da9150 are delivered to.
17- interrupts: IRQ line info for da9150 chip. 18- interrupts: IRQ line info for da9150 chip.
18- interrupt-controller: da9150 has internal IRQs (own IRQ domain). 19- interrupt-controller: da9150 has internal IRQs (own IRQ domain).
19 (See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt for 20 (See ../interrupt-controller/interrupts.txt for
20 further information relating to interrupt properties) 21 further information relating to interrupt properties)
21 22
22Sub-devices: 23Sub-devices:
23- da9150-gpadc: See Documentation/devicetree/bindings/iio/adc/da9150-gpadc.txt 24- da9150-gpadc: See ../iio/adc/da9150-gpadc.txt
24- da9150-charger: See Documentation/devicetree/bindings/power/da9150-charger.txt 25- da9150-charger: See ../power/da9150-charger.txt
25 26- da9150-fg: See ../power/da9150-fg.txt
26 27
27Example: 28Example:
28 29
@@ -34,10 +35,28 @@ Example:
34 interrupt-controller; 35 interrupt-controller;
35 36
36 gpadc: da9150-gpadc { 37 gpadc: da9150-gpadc {
37 ... 38 compatible = "dlg,da9150-gpadc";
39 #io-channel-cells = <1>;
40 };
41
42 charger {
43 compatible = "dlg,da9150-charger";
44
45 io-channels = <&gpadc 0>,
46 <&gpadc 2>,
47 <&gpadc 8>,
48 <&gpadc 5>;
49 io-channel-names = "CHAN_IBUS",
50 "CHAN_VBUS",
51 "CHAN_TJUNC",
52 "CHAN_VBAT";
38 }; 53 };
39 54
40 da9150-charger { 55 fuel-gauge {
41 ... 56 compatible = "dlg,da9150-fuel-gauge";
57
58 dlg,update-interval = <10000>;
59 dlg,warn-soc-level = /bits/ 8 <15>;
60 dlg,crit-soc-level = /bits/ 8 <5>
42 }; 61 };
43 }; 62 };
diff --git a/Documentation/devicetree/bindings/mfd/s2mps11.txt b/Documentation/devicetree/bindings/mfd/s2mps11.txt
index 57a045016fca..09b94c97faac 100644
--- a/Documentation/devicetree/bindings/mfd/s2mps11.txt
+++ b/Documentation/devicetree/bindings/mfd/s2mps11.txt
@@ -1,5 +1,5 @@
1 1
2* Samsung S2MPS11, S2MPS13, S2MPS14 and S2MPU02 Voltage and Current Regulator 2* Samsung S2MPS11/13/14/15 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,17 +7,28 @@ 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,s2mps13-pmic" 10- compatible: Should be one of the following
11 or "samsung,s2mps14-pmic" or "samsung,s2mpu02-pmic". 11 - "samsung,s2mps11-pmic"
12 - "samsung,s2mps13-pmic"
13 - "samsung,s2mps14-pmic"
14 - "samsung,s2mps15-pmic"
15 - "samsung,s2mpu02-pmic".
12- reg: Specifies the I2C slave address of the pmic block. It should be 0x66. 16- reg: Specifies the I2C slave address of the pmic block. It should be 0x66.
13 17
14Optional properties: 18Optional properties:
15- interrupt-parent: Specifies the phandle of the interrupt controller to which 19- interrupt-parent: Specifies the phandle of the interrupt controller to which
16 the interrupts from s2mps11 are delivered to. 20 the interrupts from s2mps11 are delivered to.
17- interrupts: Interrupt specifiers for interrupt sources. 21- interrupts: Interrupt specifiers for interrupt sources.
22- samsung,s2mps11-wrstbi-ground: Indicates that WRSTBI pin of PMIC is pulled
23 down. When the system is suspended it will always go down thus triggerring
24 unwanted buck warm reset (setting buck voltages to default values).
25- samsung,s2mps11-acokb-ground: Indicates that ACOKB pin of S2MPS11 PMIC is
26 connected to the ground so the PMIC must manually set PWRHOLD bit in CTRL1
27 register to turn off the power. Usually the ACOKB is pulled up to VBATT so
28 when PWRHOLD pin goes low, the rising ACOKB will trigger power off.
18 29
19Optional nodes: 30Optional nodes:
20- clocks: s2mps11, s2mps13 and s5m8767 provide three(AP/CP/BT) buffered 32.768 31- clocks: s2mps11, s2mps13, s2mps15 and s5m8767 provide three(AP/CP/BT) buffered 32.768
21 KHz outputs, so to register these as clocks with common clock framework 32 KHz outputs, so to register these as clocks with common clock framework
22 instantiate a sub-node named "clocks". It uses the common clock binding 33 instantiate a sub-node named "clocks". It uses the common clock binding
23 documented in : 34 documented in :
@@ -30,12 +41,13 @@ Optional nodes:
30 the clock which they consume. 41 the clock which they consume.
31 Clock ID Devices 42 Clock ID Devices
32 ---------------------------------------------------------- 43 ----------------------------------------------------------
33 32KhzAP 0 S2MPS11, S2MPS13, S2MPS14, S5M8767 44 32KhzAP 0 S2MPS11, S2MPS13, S2MPS14, S2MPS15, S5M8767
34 32KhzCP 1 S2MPS11, S2MPS13, S5M8767 45 32KhzCP 1 S2MPS11, S2MPS13, S2MPS15, S5M8767
35 32KhzBT 2 S2MPS11, S2MPS13, S2MPS14, S5M8767 46 32KhzBT 2 S2MPS11, S2MPS13, S2MPS14, S2MPS15, S5M8767
36 47
37 - compatible: Should be one of: "samsung,s2mps11-clk", "samsung,s2mps13-clk", 48 - compatible: Should be one of: "samsung,s2mps11-clk", "samsung,s2mps13-clk",
38 "samsung,s2mps14-clk", "samsung,s5m8767-clk" 49 "samsung,s2mps14-clk", "samsung,s5m8767-clk"
50 The s2msp15 uses the same compatible as s2mps13, as both provides similar clocks.
39 51
40- regulators: The regulators of s2mps11 that have to be instantiated should be 52- regulators: The regulators of s2mps11 that have to be instantiated should be
41included in a sub-node named 'regulators'. Regulator nodes included in this 53included in a sub-node named 'regulators'. Regulator nodes included in this
@@ -83,6 +95,7 @@ as per the datasheet of s2mps11.
83 - S2MPS11: 1 to 38 95 - S2MPS11: 1 to 38
84 - S2MPS13: 1 to 40 96 - S2MPS13: 1 to 40
85 - S2MPS14: 1 to 25 97 - S2MPS14: 1 to 25
98 - S2MPS15: 1 to 27
86 - S2MPU02: 1 to 28 99 - S2MPU02: 1 to 28
87 - Example: LDO1, LDO2, LDO28 100 - Example: LDO1, LDO2, LDO28
88 - BUCKn 101 - BUCKn
@@ -90,6 +103,7 @@ as per the datasheet of s2mps11.
90 - S2MPS11: 1 to 10 103 - S2MPS11: 1 to 10
91 - S2MPS13: 1 to 10 104 - S2MPS13: 1 to 10
92 - S2MPS14: 1 to 5 105 - S2MPS14: 1 to 5
106 - S2MPS15: 1 to 10
93 - S2MPU02: 1 to 7 107 - S2MPU02: 1 to 7
94 - Example: BUCK1, BUCK2, BUCK9 108 - Example: BUCK1, BUCK2, BUCK9
95 109
diff --git a/Documentation/devicetree/bindings/mfd/sky81452.txt b/Documentation/devicetree/bindings/mfd/sky81452.txt
index 35181794aa24..511764acd4d5 100644
--- a/Documentation/devicetree/bindings/mfd/sky81452.txt
+++ b/Documentation/devicetree/bindings/mfd/sky81452.txt
@@ -6,7 +6,7 @@ Required properties:
6 6
7Required child nodes: 7Required child nodes:
8- backlight : container node for backlight following the binding 8- backlight : container node for backlight following the binding
9 in video/backlight/sky81452-backlight.txt 9 in leds/backlight/sky81452-backlight.txt
10- regulator : container node for regulators following the binding 10- regulator : container node for regulators following the binding
11 in regulator/sky81452-regulator.txt 11 in regulator/sky81452-regulator.txt
12 12
diff --git a/Documentation/devicetree/bindings/mfd/tc3589x.txt b/Documentation/devicetree/bindings/mfd/tc3589x.txt
index 37bf7f1aa70a..23fc2f21f5a4 100644
--- a/Documentation/devicetree/bindings/mfd/tc3589x.txt
+++ b/Documentation/devicetree/bindings/mfd/tc3589x.txt
@@ -56,6 +56,7 @@ Optional nodes:
56 bindings/input/matrix-keymap.txt 56 bindings/input/matrix-keymap.txt
57 - linux,no-autorepeat: do no enable autorepeat feature. 57 - linux,no-autorepeat: do no enable autorepeat feature.
58 - wakeup-source: use any event on keypad as wakeup event. 58 - wakeup-source: use any event on keypad as wakeup event.
59 (Legacy property supported: "linux,wakeup")
59 60
60Example: 61Example:
61 62
diff --git a/Documentation/devicetree/bindings/misc/sram.txt b/Documentation/devicetree/bindings/misc/sram.txt
index 36cbe5aea990..42ee9438b771 100644
--- a/Documentation/devicetree/bindings/misc/sram.txt
+++ b/Documentation/devicetree/bindings/misc/sram.txt
@@ -33,6 +33,12 @@ Optional properties in the area nodes:
33 33
34- compatible : standard definition, should contain a vendor specific string 34- compatible : standard definition, should contain a vendor specific string
35 in the form <vendor>,[<device>-]<usage> 35 in the form <vendor>,[<device>-]<usage>
36- pool : indicates that the particular reserved SRAM area is addressable
37 and in use by another device or devices
38- export : indicates that the reserved SRAM area may be accessed outside
39 of the kernel, e.g. by bootloader or userspace
40- label : the name for the reserved partition, if omitted, the label
41 is taken from the node name excluding the unit address.
36 42
37Example: 43Example:
38 44
@@ -48,4 +54,14 @@ sram: sram@5c000000 {
48 compatible = "socvendor,smp-sram"; 54 compatible = "socvendor,smp-sram";
49 reg = <0x100 0x50>; 55 reg = <0x100 0x50>;
50 }; 56 };
57
58 device-sram@1000 {
59 reg = <0x1000 0x1000>;
60 pool;
61 };
62
63 exported@20000 {
64 reg = <0x20000 0x20000>;
65 export;
66 };
51}; 67};
diff --git a/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt b/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt
index b7943f3f9995..dedfb02c744a 100644
--- a/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt
+++ b/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt
@@ -22,6 +22,8 @@ Optional properties:
22 - voltage-ranges : two cells are required, first cell specifies minimum 22 - voltage-ranges : two cells are required, first cell specifies minimum
23 slot voltage (mV), second cell specifies maximum slot voltage (mV). 23 slot voltage (mV), second cell specifies maximum slot voltage (mV).
24 Several ranges could be specified. 24 Several ranges could be specified.
25 - little-endian : If the host controller is little-endian mode, specify
26 this property. The default endian mode is big-endian.
25 27
26Example: 28Example:
27 29
diff --git a/Documentation/devicetree/bindings/mmc/mmc.txt b/Documentation/devicetree/bindings/mmc/mmc.txt
index 0384fc3f64e8..ed23b9bedfdc 100644
--- a/Documentation/devicetree/bindings/mmc/mmc.txt
+++ b/Documentation/devicetree/bindings/mmc/mmc.txt
@@ -37,6 +37,7 @@ Optional properties:
37- sd-uhs-sdr104: SD UHS SDR104 speed is supported 37- sd-uhs-sdr104: SD UHS SDR104 speed is supported
38- sd-uhs-ddr50: SD UHS DDR50 speed is supported 38- sd-uhs-ddr50: SD UHS DDR50 speed is supported
39- cap-power-off-card: powering off the card is safe 39- cap-power-off-card: powering off the card is safe
40- cap-mmc-hw-reset: eMMC hardware reset is supported
40- cap-sdio-irq: enable SDIO IRQ signalling on this interface 41- cap-sdio-irq: enable SDIO IRQ signalling on this interface
41- full-pwr-cycle: full power cycle of the card is supported 42- full-pwr-cycle: full power cycle of the card is supported
42- mmc-ddr-1_8v: eMMC high-speed DDR mode(1.8V I/O) is supported 43- mmc-ddr-1_8v: eMMC high-speed DDR mode(1.8V I/O) is supported
@@ -67,7 +68,8 @@ polarity is in effect.
67 68
68Optional SDIO properties: 69Optional SDIO properties:
69- keep-power-in-suspend: Preserves card power during a suspend/resume cycle 70- keep-power-in-suspend: Preserves card power during a suspend/resume cycle
70- enable-sdio-wakeup: Enables wake up of host system on SDIO IRQ assertion 71- wakeup-source: Enables wake up of host system on SDIO IRQ assertion
72 (Legacy property supported: "enable-sdio-wakeup")
71 73
72 74
73MMC power sequences: 75MMC power sequences:
@@ -117,7 +119,7 @@ sdhci@ab000000 {
117 wp-gpios = <&gpio 70 0>; 119 wp-gpios = <&gpio 70 0>;
118 max-frequency = <50000000>; 120 max-frequency = <50000000>;
119 keep-power-in-suspend; 121 keep-power-in-suspend;
120 enable-sdio-wakeup; 122 wakeup-source;
121 mmc-pwrseq = <&sdhci0_pwrseq> 123 mmc-pwrseq = <&sdhci0_pwrseq>
122} 124}
123 125
diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.txt b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
index a1adfa495ad3..0120c7f1109c 100644
--- a/Documentation/devicetree/bindings/mmc/mtk-sd.txt
+++ b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
@@ -17,6 +17,11 @@ Required properties:
17- vmmc-supply: power to the Core 17- vmmc-supply: power to the Core
18- vqmmc-supply: power to the IO 18- vqmmc-supply: power to the IO
19 19
20Optional properties:
21- assigned-clocks: PLL of the source clock
22- assigned-clock-parents: parent of source clock, used for HS400 mode to get 400Mhz source clock
23- hs400-ds-delay: HS400 DS delay setting
24
20Examples: 25Examples:
21mmc0: mmc@11230000 { 26mmc0: mmc@11230000 {
22 compatible = "mediatek,mt8173-mmc", "mediatek,mt8135-mmc"; 27 compatible = "mediatek,mt8173-mmc", "mediatek,mt8135-mmc";
@@ -24,9 +29,13 @@ mmc0: mmc@11230000 {
24 interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_LOW>; 29 interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_LOW>;
25 vmmc-supply = <&mt6397_vemc_3v3_reg>; 30 vmmc-supply = <&mt6397_vemc_3v3_reg>;
26 vqmmc-supply = <&mt6397_vio18_reg>; 31 vqmmc-supply = <&mt6397_vio18_reg>;
27 clocks = <&pericfg CLK_PERI_MSDC30_0>, <&topckgen CLK_TOP_MSDC50_0_H_SEL>; 32 clocks = <&pericfg CLK_PERI_MSDC30_0>,
33 <&topckgen CLK_TOP_MSDC50_0_H_SEL>;
28 clock-names = "source", "hclk"; 34 clock-names = "source", "hclk";
29 pinctrl-names = "default", "state_uhs"; 35 pinctrl-names = "default", "state_uhs";
30 pinctrl-0 = <&mmc0_pins_default>; 36 pinctrl-0 = <&mmc0_pins_default>;
31 pinctrl-1 = <&mmc0_pins_uhs>; 37 pinctrl-1 = <&mmc0_pins_uhs>;
38 assigned-clocks = <&topckgen CLK_TOP_MSDC50_0_SEL>;
39 assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL_D2>;
40 hs400-ds-delay = <0x14015>;
32}; 41};
diff --git a/Documentation/devicetree/bindings/mmc/renesas,mmcif.txt b/Documentation/devicetree/bindings/mmc/renesas,mmcif.txt
index d38942f6c5ae..cae29eb5733d 100644
--- a/Documentation/devicetree/bindings/mmc/renesas,mmcif.txt
+++ b/Documentation/devicetree/bindings/mmc/renesas,mmcif.txt
@@ -6,11 +6,12 @@ and the properties used by the MMCIF device.
6 6
7Required properties: 7Required properties:
8 8
9- compatible: must contain one of the following 9- compatible: should be "renesas,mmcif-<soctype>", "renesas,sh-mmcif" as a
10 fallback. Examples with <soctype> are:
10 - "renesas,mmcif-r8a7740" for the MMCIF found in r8a7740 SoCs 11 - "renesas,mmcif-r8a7740" for the MMCIF found in r8a7740 SoCs
11 - "renesas,mmcif-r8a7790" for the MMCIF found in r8a7790 SoCs 12 - "renesas,mmcif-r8a7790" for the MMCIF found in r8a7790 SoCs
12 - "renesas,mmcif-r8a7791" for the MMCIF found in r8a7791 SoCs 13 - "renesas,mmcif-r8a7791" for the MMCIF found in r8a7791 SoCs
13 - "renesas,sh-mmcif" for the generic MMCIF 14 - "renesas,mmcif-r8a7794" for the MMCIF found in r8a7794 SoCs
14 15
15- clocks: reference to the functional clock 16- clocks: reference to the functional clock
16 17
diff --git a/Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.txt
index c327c2d6f23d..3dc13b68fc3f 100644
--- a/Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.txt
+++ b/Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.txt
@@ -14,6 +14,19 @@ Required Properties:
14 before RK3288 14 before RK3288
15 - "rockchip,rk3288-dw-mshc": for Rockchip RK3288 15 - "rockchip,rk3288-dw-mshc": for Rockchip RK3288
16 16
17Optional Properties:
18* clocks: from common clock binding: if ciu_drive and ciu_sample are
19 specified in clock-names, should contain handles to these clocks.
20
21* clock-names: Apart from the clock-names described in synopsys-dw-mshc.txt
22 two more clocks "ciu-drive" and "ciu-sample" are supported. They are used
23 to control the clock phases, "ciu-sample" is required for tuning high-
24 speed modes.
25
26* rockchip,default-sample-phase: The default phase to set ciu_sample at
27 probing, low speeds or in case where all phases work at tuning time.
28 If not specified 0 deg will be used.
29
17Example: 30Example:
18 31
19 rkdwmmc0@12200000 { 32 rkdwmmc0@12200000 {
diff --git a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt
index 346c6095a615..8636f5ae97e5 100644
--- a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt
+++ b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt
@@ -75,6 +75,12 @@ Optional properties:
75* vmmc-supply: The phandle to the regulator to use for vmmc. If this is 75* vmmc-supply: The phandle to the regulator to use for vmmc. If this is
76 specified we'll defer probe until we can find this regulator. 76 specified we'll defer probe until we can find this regulator.
77 77
78* dmas: List of DMA specifiers with the controller specific format as described
79 in the generic DMA client binding. Refer to dma.txt for details.
80
81* dma-names: request names for generic DMA client binding. Must be "rx-tx".
82 Refer to dma.txt for details.
83
78Aliases: 84Aliases:
79 85
80- All the MSHC controller nodes should be represented in the aliases node using 86- All the MSHC controller nodes should be represented in the aliases node using
@@ -95,6 +101,23 @@ board specific portions as listed below.
95 #size-cells = <0>; 101 #size-cells = <0>;
96 }; 102 };
97 103
104[board specific internal DMA resources]
105
106 dwmmc0@12200000 {
107 clock-frequency = <400000000>;
108 clock-freq-min-max = <400000 200000000>;
109 num-slots = <1>;
110 broken-cd;
111 fifo-depth = <0x80>;
112 card-detect-delay = <200>;
113 vmmc-supply = <&buck8>;
114 bus-width = <8>;
115 cap-mmc-highspeed;
116 cap-sd-highspeed;
117 };
118
119[board specific generic DMA request binding]
120
98 dwmmc0@12200000 { 121 dwmmc0@12200000 {
99 clock-frequency = <400000000>; 122 clock-frequency = <400000000>;
100 clock-freq-min-max = <400000 200000000>; 123 clock-freq-min-max = <400000 200000000>;
@@ -106,4 +129,6 @@ board specific portions as listed below.
106 bus-width = <8>; 129 bus-width = <8>;
107 cap-mmc-highspeed; 130 cap-mmc-highspeed;
108 cap-sd-highspeed; 131 cap-sd-highspeed;
132 dmas = <&pdma 12>;
133 dma-names = "rx-tx";
109 }; 134 };
diff --git a/Documentation/devicetree/bindings/mtd/fsmc-nand.txt b/Documentation/devicetree/bindings/mtd/fsmc-nand.txt
index 5235cbc551b0..32636eb77304 100644
--- a/Documentation/devicetree/bindings/mtd/fsmc-nand.txt
+++ b/Documentation/devicetree/bindings/mtd/fsmc-nand.txt
@@ -30,6 +30,12 @@ Optional properties:
30 command is asserted. Zero means one cycle, 255 means 256 30 command is asserted. Zero means one cycle, 255 means 256
31 cycles. 31 cycles.
32- bank: default NAND bank to use (0-3 are valid, 0 is the default). 32- bank: default NAND bank to use (0-3 are valid, 0 is the default).
33- nand-ecc-mode : see nand.txt
34- nand-ecc-strength : see nand.txt
35- nand-ecc-step-size : see nand.txt
36
37Can support 1-bit HW ECC (default) or if stronger correction is required,
38software-based BCH.
33 39
34Example: 40Example:
35 41
diff --git a/Documentation/devicetree/bindings/mtd/partition.txt b/Documentation/devicetree/bindings/mtd/partition.txt
index 8e5557da1955..f1e2a02381a4 100644
--- a/Documentation/devicetree/bindings/mtd/partition.txt
+++ b/Documentation/devicetree/bindings/mtd/partition.txt
@@ -4,10 +4,17 @@ Partitions can be represented by sub-nodes of an mtd device. This can be used
4on platforms which have strong conventions about which portions of a flash are 4on platforms which have strong conventions about which portions of a flash are
5used for what purposes, but which don't use an on-flash partition table such 5used for what purposes, but which don't use an on-flash partition table such
6as RedBoot. 6as RedBoot.
7NOTE: if the sub-node has a compatible string, then it is not a partition.
8 7
9#address-cells & #size-cells must both be present in the mtd device. There are 8The partition table should be a subnode of the mtd node and should be named
10two valid values for both: 9'partitions'. Partitions are defined in subnodes of the partitions node.
10
11For backwards compatibility partitions as direct subnodes of the mtd device are
12supported. This use is discouraged.
13NOTE: also for backwards compatibility, direct subnodes that have a compatible
14string are not considered partitions, as they may be used for other bindings.
15
16#address-cells & #size-cells must both be present in the partitions subnode of the
17mtd device. There are two valid values for both:
11<1>: for partitions that require a single 32-bit cell to represent their 18<1>: for partitions that require a single 32-bit cell to represent their
12 size/address (aka the value is below 4 GiB) 19 size/address (aka the value is below 4 GiB)
13<2>: for partitions that require two 32-bit cells to represent their 20<2>: for partitions that require two 32-bit cells to represent their
@@ -28,44 +35,50 @@ Examples:
28 35
29 36
30flash@0 { 37flash@0 {
31 #address-cells = <1>; 38 partitions {
32 #size-cells = <1>; 39 #address-cells = <1>;
40 #size-cells = <1>;
33 41
34 partition@0 { 42 partition@0 {
35 label = "u-boot"; 43 label = "u-boot";
36 reg = <0x0000000 0x100000>; 44 reg = <0x0000000 0x100000>;
37 read-only; 45 read-only;
38 }; 46 };
39 47
40 uimage@100000 { 48 uimage@100000 {
41 reg = <0x0100000 0x200000>; 49 reg = <0x0100000 0x200000>;
50 };
42 }; 51 };
43}; 52};
44 53
45flash@1 { 54flash@1 {
46 #address-cells = <1>; 55 partitions {
47 #size-cells = <2>; 56 #address-cells = <1>;
57 #size-cells = <2>;
48 58
49 /* a 4 GiB partition */ 59 /* a 4 GiB partition */
50 partition@0 { 60 partition@0 {
51 label = "filesystem"; 61 label = "filesystem";
52 reg = <0x00000000 0x1 0x00000000>; 62 reg = <0x00000000 0x1 0x00000000>;
63 };
53 }; 64 };
54}; 65};
55 66
56flash@2 { 67flash@2 {
57 #address-cells = <2>; 68 partitions {
58 #size-cells = <2>; 69 #address-cells = <2>;
70 #size-cells = <2>;
59 71
60 /* an 8 GiB partition */ 72 /* an 8 GiB partition */
61 partition@0 { 73 partition@0 {
62 label = "filesystem #1"; 74 label = "filesystem #1";
63 reg = <0x0 0x00000000 0x2 0x00000000>; 75 reg = <0x0 0x00000000 0x2 0x00000000>;
64 }; 76 };
65 77
66 /* a 4 GiB partition */ 78 /* a 4 GiB partition */
67 partition@200000000 { 79 partition@200000000 {
68 label = "filesystem #2"; 80 label = "filesystem #2";
69 reg = <0x2 0x00000000 0x1 0x00000000>; 81 reg = <0x2 0x00000000 0x1 0x00000000>;
82 };
70 }; 83 };
71}; 84};
diff --git a/Documentation/devicetree/bindings/mtd/vf610-nfc.txt b/Documentation/devicetree/bindings/mtd/vf610-nfc.txt
new file mode 100644
index 000000000000..c96eeb65f450
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/vf610-nfc.txt
@@ -0,0 +1,59 @@
1Freescale's NAND flash controller (NFC)
2
3This variant of the Freescale NAND flash controller (NFC) can be found on
4Vybrid (vf610), MPC5125, MCF54418 and Kinetis K70.
5
6Required properties:
7- compatible: Should be set to "fsl,vf610-nfc".
8- reg: address range of the NFC.
9- interrupts: interrupt of the NFC.
10- #address-cells: shall be set to 1. Encode the nand CS.
11- #size-cells : shall be set to 0.
12- assigned-clocks: main clock from the SoC, for Vybrid <&clks VF610_CLK_NFC>;
13- assigned-clock-rates: The NAND bus timing is derived from this clock
14 rate and should not exceed maximum timing for any NAND memory chip
15 in a board stuffing. Typical NAND memory timings derived from this
16 clock are found in the SoC hardware reference manual. Furthermore,
17 there might be restrictions on maximum rates when using hardware ECC.
18
19- #address-cells, #size-cells : Must be present if the device has sub-nodes
20 representing partitions.
21
22Required children nodes:
23Children nodes represent the available nand chips. Currently the driver can
24only handle one NAND chip.
25
26Required properties:
27- compatible: Should be set to "fsl,vf610-nfc-cs".
28- nand-bus-width: see nand.txt
29- nand-ecc-mode: see nand.txt
30
31Required properties for hardware ECC:
32- nand-ecc-strength: supported strengths are 24 and 32 bit (see nand.txt)
33- nand-ecc-step-size: step size equals page size, currently only 2k pages are
34 supported
35- nand-on-flash-bbt: see nand.txt
36
37Example:
38
39 nfc: nand@400e0000 {
40 compatible = "fsl,vf610-nfc";
41 #address-cells = <1>;
42 #size-cells = <0>;
43 reg = <0x400e0000 0x4000>;
44 interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
45 clocks = <&clks VF610_CLK_NFC>;
46 clock-names = "nfc";
47 assigned-clocks = <&clks VF610_CLK_NFC>;
48 assigned-clock-rates = <33000000>;
49
50 nand@0 {
51 compatible = "fsl,vf610-nfc-nandcs";
52 reg = <0>;
53 nand-bus-width = <8>;
54 nand-ecc-mode = "hw";
55 nand-ecc-strength = <32>;
56 nand-ecc-step-size = <2048>;
57 nand-on-flash-bbt;
58 };
59 };
diff --git a/Documentation/devicetree/bindings/net/apm-xgene-enet.txt b/Documentation/devicetree/bindings/net/apm-xgene-enet.txt
index f55aa280d34f..078060a97f95 100644
--- a/Documentation/devicetree/bindings/net/apm-xgene-enet.txt
+++ b/Documentation/devicetree/bindings/net/apm-xgene-enet.txt
@@ -37,6 +37,14 @@ Required properties for ethernet interfaces that have external PHY:
37 37
38Optional properties: 38Optional properties:
39- status: Should be "ok" or "disabled" for enabled/disabled. Default is "ok". 39- status: Should be "ok" or "disabled" for enabled/disabled. Default is "ok".
40- tx-delay: Delay value for RGMII bridge TX clock.
41 Valid values are between 0 to 7, that maps to
42 417, 717, 1020, 1321, 1611, 1913, 2215, 2514 ps
43 Default value is 4, which corresponds to 1611 ps
44- rx-delay: Delay value for RGMII bridge RX clock.
45 Valid values are between 0 to 7, that maps to
46 273, 589, 899, 1222, 1480, 1806, 2147, 2464 ps
47 Default value is 2, which corresponds to 899 ps
40 48
41Example: 49Example:
42 menetclk: menetclk { 50 menetclk: menetclk {
@@ -72,5 +80,7 @@ Example:
72 80
73/* Board-specific peripheral configurations */ 81/* Board-specific peripheral configurations */
74&menet { 82&menet {
83 tx-delay = <4>;
84 rx-delay = <2>;
75 status = "ok"; 85 status = "ok";
76}; 86};
diff --git a/Documentation/devicetree/bindings/net/brcm,iproc-mdio.txt b/Documentation/devicetree/bindings/net/brcm,iproc-mdio.txt
new file mode 100644
index 000000000000..8ba9ed11d716
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/brcm,iproc-mdio.txt
@@ -0,0 +1,23 @@
1* Broadcom iProc MDIO bus controller
2
3Required properties:
4- compatible: should be "brcm,iproc-mdio"
5- reg: address and length of the register set for the MDIO interface
6- #size-cells: must be 1
7- #address-cells: must be 0
8
9Child nodes of this MDIO bus controller node are standard Ethernet PHY device
10nodes as described in Documentation/devicetree/bindings/net/phy.txt
11
12Example:
13
14mdio@18002000 {
15 compatible = "brcm,iproc-mdio";
16 reg = <0x18002000 0x8>;
17 #size-cells = <1>;
18 #address-cells = <0>;
19
20 enet-gphy@0 {
21 reg = <0>;
22 };
23};
diff --git a/Documentation/devicetree/bindings/net/can/sun4i_can.txt b/Documentation/devicetree/bindings/net/can/sun4i_can.txt
new file mode 100644
index 000000000000..84ed1909df76
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/can/sun4i_can.txt
@@ -0,0 +1,36 @@
1Allwinner A10/A20 CAN controller Device Tree Bindings
2-----------------------------------------------------
3
4Required properties:
5- compatible: "allwinner,sun4i-a10-can"
6- reg: physical base address and size of the Allwinner A10/A20 CAN register map.
7- interrupts: interrupt specifier for the sole interrupt.
8- clock: phandle and clock specifier.
9
10Example
11-------
12
13SoC common .dtsi file:
14
15 can0_pins_a: can0@0 {
16 allwinner,pins = "PH20","PH21";
17 allwinner,function = "can";
18 allwinner,drive = <0>;
19 allwinner,pull = <0>;
20 };
21...
22 can0: can@01c2bc00 {
23 compatible = "allwinner,sun4i-a10-can";
24 reg = <0x01c2bc00 0x400>;
25 interrupts = <0 26 4>;
26 clocks = <&apb1_gates 4>;
27 status = "disabled";
28 };
29
30Board specific .dts file:
31
32 can0: can@01c2bc00 {
33 pinctrl-names = "default";
34 pinctrl-0 = <&can0_pins_a>;
35 status = "okay";
36 };
diff --git a/Documentation/devicetree/bindings/net/cpsw.txt b/Documentation/devicetree/bindings/net/cpsw.txt
index a9df21aaa154..9853f8e70966 100644
--- a/Documentation/devicetree/bindings/net/cpsw.txt
+++ b/Documentation/devicetree/bindings/net/cpsw.txt
@@ -30,6 +30,13 @@ Optional properties:
30- dual_emac : Specifies Switch to act as Dual EMAC 30- dual_emac : Specifies Switch to act as Dual EMAC
31- syscon : Phandle to the system control device node, which is 31- syscon : Phandle to the system control device node, which is
32 the control module device of the am33x 32 the control module device of the am33x
33- mode-gpios : Should be added if one/multiple gpio lines are
34 required to be driven so that cpsw data lines
35 can be connected to the phy via selective mux.
36 For example in dra72x-evm, pcf gpio has to be
37 driven low so that cpsw slave 0 and phy data
38 lines are connected via mux.
39
33 40
34Slave Properties: 41Slave Properties:
35Required properties: 42Required properties:
@@ -39,6 +46,12 @@ Required properties:
39Optional properties: 46Optional properties:
40- dual_emac_res_vlan : Specifies VID to be used to segregate the ports 47- dual_emac_res_vlan : Specifies VID to be used to segregate the ports
41- mac-address : See ethernet.txt file in the same directory 48- mac-address : See ethernet.txt file in the same directory
49- phy-handle : See ethernet.txt file in the same directory
50
51Slave sub-nodes:
52- fixed-link : See fixed-link.txt file in the same directory
53 Either the properties phy_id and phy-mode,
54 or the sub-node fixed-link can be specified
42 55
43Note: "ti,hwmods" field is used to fetch the base address and irq 56Note: "ti,hwmods" field is used to fetch the base address and irq
44resources from TI, omap hwmod data base during device registration. 57resources from TI, omap hwmod data base during device registration.
diff --git a/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt b/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt
index 1e97532a0b79..db74f0dc290c 100644
--- a/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt
+++ b/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt
@@ -57,6 +57,10 @@ Properties:
57 "rgmii-id", as all other connection types are detected by hardware. 57 "rgmii-id", as all other connection types are detected by hardware.
58 - fsl,magic-packet : If present, indicates that the hardware supports 58 - fsl,magic-packet : If present, indicates that the hardware supports
59 waking up via magic packet. 59 waking up via magic packet.
60 - fsl,wake-on-filer : If present, indicates that the hardware supports
61 waking up by Filer General Purpose Interrupt (FGPI) asserted on the
62 Rx int line. This is an advanced power management capability allowing
63 certain packet types (user) defined by filer rules to wake up the system.
60 - bd-stash : If present, indicates that the hardware supports stashing 64 - bd-stash : If present, indicates that the hardware supports stashing
61 buffer descriptors in the L2. 65 buffer descriptors in the L2.
62 - rx-stash-len : Denotes the number of bytes of a received buffer to stash 66 - rx-stash-len : Denotes the number of bytes of a received buffer to stash
diff --git a/Documentation/devicetree/bindings/net/hisilicon-hip04-net.txt b/Documentation/devicetree/bindings/net/hisilicon-hip04-net.txt
index 988fc694b663..d1df8a00e1f3 100644
--- a/Documentation/devicetree/bindings/net/hisilicon-hip04-net.txt
+++ b/Documentation/devicetree/bindings/net/hisilicon-hip04-net.txt
@@ -32,13 +32,13 @@ Required properties:
32 32
33Required properties: 33Required properties:
34 34
35- compatible: should be "hisilicon,hip04-mdio". 35- compatible: should be "hisilicon,mdio".
36- Inherits from MDIO bus node binding [2] 36- Inherits from MDIO bus node binding [2]
37[2] Documentation/devicetree/bindings/net/phy.txt 37[2] Documentation/devicetree/bindings/net/phy.txt
38 38
39Example: 39Example:
40 mdio { 40 mdio {
41 compatible = "hisilicon,hip04-mdio"; 41 compatible = "hisilicon,mdio";
42 reg = <0x28f1000 0x1000>; 42 reg = <0x28f1000 0x1000>;
43 #address-cells = <1>; 43 #address-cells = <1>;
44 #size-cells = <0>; 44 #size-cells = <0>;
diff --git a/Documentation/devicetree/bindings/net/hisilicon-hns-dsaf.txt b/Documentation/devicetree/bindings/net/hisilicon-hns-dsaf.txt
new file mode 100644
index 000000000000..80411b2f0490
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/hisilicon-hns-dsaf.txt
@@ -0,0 +1,49 @@
1Hisilicon DSA Fabric device controller
2
3Required properties:
4- compatible: should be "hisilicon,hns-dsaf-v1" or "hisilicon,hns-dsaf-v2".
5 "hisilicon,hns-dsaf-v1" is for hip05.
6 "hisilicon,hns-dsaf-v2" is for Hi1610 and Hi1612.
7- dsa-name: dsa fabric name who provide this interface.
8 should be "dsafX", X is the dsaf id.
9- mode: dsa fabric mode string. only support one of dsaf modes like these:
10 "2port-64vf",
11 "6port-16rss",
12 "6port-16vf".
13- interrupt-parent: the interrupt parent of this device.
14- interrupts: should contain the DSA Fabric and rcb interrupt.
15- reg: specifies base physical address(es) and size of the device registers.
16 The first region is external interface control register base and size.
17 The second region is SerDes base register and size.
18 The third region is the PPE register base and size.
19 The fourth region is dsa fabric base register and size.
20 The fifth region is cpld base register and size, it is not required if do not use cpld.
21- phy-handle: phy handle of physicl port, 0 if not any phy device. see ethernet.txt [1].
22- buf-size: rx buffer size, should be 16-1024.
23- desc-num: number of description in TX and RX queue, should be 512, 1024, 2048 or 4096.
24
25[1] Documentation/devicetree/bindings/net/phy.txt
26
27Example:
28
29dsa: dsa@c7000000 {
30 compatible = "hisilicon,hns-dsaf-v1";
31 dsa_name = "dsaf0";
32 mode = "6port-16rss";
33 interrupt-parent = <&mbigen_dsa>;
34 reg = <0x0 0xC0000000 0x0 0x420000
35 0x0 0xC2000000 0x0 0x300000
36 0x0 0xc5000000 0x0 0x890000
37 0x0 0xc7000000 0x0 0x60000>;
38 phy-handle = <0 0 0 0 &soc0_phy4 &soc0_phy5 0 0>;
39 interrupts = <131 4>,<132 4>, <133 4>,<134 4>,
40 <135 4>,<136 4>, <137 4>,<138 4>,
41 <139 4>,<140 4>, <141 4>,<142 4>,
42 <143 4>,<144 4>, <145 4>,<146 4>,
43 <147 4>,<148 4>, <384 1>,<385 1>,
44 <386 1>,<387 1>, <388 1>,<389 1>,
45 <390 1>,<391 1>,
46 buf-size = <4096>;
47 desc-num = <1024>;
48 dma-coherent;
49};
diff --git a/Documentation/devicetree/bindings/net/hisilicon-hns-mdio.txt b/Documentation/devicetree/bindings/net/hisilicon-hns-mdio.txt
new file mode 100644
index 000000000000..9c23fdf25018
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/hisilicon-hns-mdio.txt
@@ -0,0 +1,22 @@
1Hisilicon MDIO bus controller
2
3Properties:
4- compatible: "hisilicon,mdio","hisilicon,hns-mdio".
5- reg: The base address of the MDIO bus controller register bank.
6- #address-cells: Must be <1>.
7- #size-cells: Must be <0>. MDIO addresses have no size component.
8
9Typically an MDIO bus might have several children.
10
11Example:
12 mdio@803c0000 {
13 #address-cells = <1>;
14 #size-cells = <0>;
15 compatible = "hisilicon,hns-mdio","hisilicon,mdio";
16 reg = <0x0 0x803c0000 0x0 0x10000>;
17
18 ethernet-phy@0 {
19 ...
20 reg = <0>;
21 };
22 };
diff --git a/Documentation/devicetree/bindings/net/hisilicon-hns-nic.txt b/Documentation/devicetree/bindings/net/hisilicon-hns-nic.txt
new file mode 100644
index 000000000000..41d19be7011e
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/hisilicon-hns-nic.txt
@@ -0,0 +1,47 @@
1Hisilicon Network Subsystem NIC controller
2
3Required properties:
4- compatible: "hisilicon,hns-nic-v1" or "hisilicon,hns-nic-v2".
5 "hisilicon,hns-nic-v1" is for hip05.
6 "hisilicon,hns-nic-v2" is for Hi1610 and Hi1612.
7- ae-name: accelerator name who provides this interface,
8 is simply a name referring to the name of name in the accelerator node.
9- port-id: is the index of port provided by DSAF (the accelerator). DSAF can
10 connect to 8 PHYs. Port 0 to 1 are both used for adminstration purpose. They
11 are called debug ports.
12
13 The remaining 6 PHYs are taken according to the mode of DSAF.
14
15 In NIC mode of DSAF, all 6 PHYs are taken as ethernet ports to the CPU. The
16 port-id can be 2 to 7. Here is the diagram:
17 +-----+---------------+
18 | CPU |
19 +-+-+-+---+-+-+-+-+-+-+
20 | | | | | | | |
21 debug service
22 port port
23 (0,1) (2-7)
24
25 In Switch mode of DSAF, all 6 PHYs are taken as physical ports connect to a
26 LAN Switch while the CPU side assume itself have one single NIC connect to
27 this switch. In this case, the port-id will be 2 only.
28 +-----+---------------+
29 | CPU |
30 +-+-+-+---+-+-+-+-+-+-+
31 | | service| port(2)
32 debug +------------+
33 port | switch |
34 (0,1) +-+-+-+-+-+-++
35 | | | | | |
36 external port
37
38- local-mac-address: mac addr of the ethernet interface
39
40Example:
41
42 ethernet@0{
43 compatible = "hisilicon,hns-nic-v1";
44 ae-name = "dsaf0";
45 port-id = <0>;
46 local-mac-address = [a2 14 e4 4b 56 76];
47 };
diff --git a/Documentation/devicetree/bindings/net/ieee802154/mrf24j40.txt b/Documentation/devicetree/bindings/net/ieee802154/mrf24j40.txt
new file mode 100644
index 000000000000..a4ed2efb5b73
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/ieee802154/mrf24j40.txt
@@ -0,0 +1,20 @@
1* MRF24J40 IEEE 802.15.4 *
2
3Required properties:
4 - compatible: should be "microchip,mrf24j40", "microchip,mrf24j40ma",
5 or "microchip,mrf24j40mc" depends on your transceiver
6 board
7 - spi-max-frequency: maximal bus speed, should be set something under or equal
8 10000000
9 - reg: the chipselect index
10 - interrupts: the interrupt generated by the device.
11
12Example:
13
14 mrf24j40ma@0 {
15 compatible = "microchip,mrf24j40ma";
16 spi-max-frequency = <8500000>;
17 reg = <0>;
18 interrupts = <19 8>;
19 interrupt-parent = <&gpio3>;
20 };
diff --git a/Documentation/devicetree/bindings/net/maxim,ds26522.txt b/Documentation/devicetree/bindings/net/maxim,ds26522.txt
new file mode 100644
index 000000000000..ee8bb725f245
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/maxim,ds26522.txt
@@ -0,0 +1,13 @@
1* Maxim (Dallas) DS26522 Dual T1/E1/J1 Transceiver
2
3Required properties:
4- compatible: Should contain "maxim,ds26522".
5- reg: SPI CS.
6- spi-max-frequency: SPI clock.
7
8Example:
9 slic@1 {
10 compatible = "maxim,ds26522";
11 reg = <1>;
12 spi-max-frequency = <2000000>; /* input clock */
13 };
diff --git a/Documentation/devicetree/bindings/net/nfc/nfcmrvl.txt b/Documentation/devicetree/bindings/net/nfc/nfcmrvl.txt
index 7c4a0cc370cf..76df9173825a 100644
--- a/Documentation/devicetree/bindings/net/nfc/nfcmrvl.txt
+++ b/Documentation/devicetree/bindings/net/nfc/nfcmrvl.txt
@@ -1,7 +1,10 @@
1* Marvell International Ltd. NCI NFC Controller 1* Marvell International Ltd. NCI NFC Controller
2 2
3Required properties: 3Required properties:
4- compatible: Should be "mrvl,nfc-uart". 4- compatible: Should be:
5 - "marvell,nfc-uart" or "mrvl,nfc-uart" for UART devices
6 - "marvell,nfc-i2c" for I2C devices
7 - "marvell,nfc-spi" for SPI devices
5 8
6Optional SoC specific properties: 9Optional SoC specific properties:
7- pinctrl-names: Contains only one value - "default". 10- pinctrl-names: Contains only one value - "default".
@@ -13,13 +16,19 @@ Optional UART-based chip specific properties:
13- flow-control: Specifies that the chip is using RTS/CTS. 16- flow-control: Specifies that the chip is using RTS/CTS.
14- break-control: Specifies that the chip needs specific break management. 17- break-control: Specifies that the chip needs specific break management.
15 18
19Optional I2C-based chip specific properties:
20- i2c-int-falling: Specifies that the chip read event shall be trigged on
21 falling edge.
22- i2c-int-rising: Specifies that the chip read event shall be trigged on
23 rising edge.
24
16Example (for ARM-based BeagleBoard Black with 88W8887 on UART5): 25Example (for ARM-based BeagleBoard Black with 88W8887 on UART5):
17 26
18&uart5 { 27&uart5 {
19 status = "okay"; 28 status = "okay";
20 29
21 nfcmrvluart: nfcmrvluart@5 { 30 nfcmrvluart: nfcmrvluart@5 {
22 compatible = "mrvl,nfc-uart"; 31 compatible = "marvell,nfc-uart";
23 32
24 reset-n-io = <&gpio3 16 0>; 33 reset-n-io = <&gpio3 16 0>;
25 34
@@ -27,3 +36,51 @@ Example (for ARM-based BeagleBoard Black with 88W8887 on UART5):
27 flow-control; 36 flow-control;
28 } 37 }
29}; 38};
39
40
41Example (for ARM-based BeagleBoard Black with 88W8887 on I2C1):
42
43&i2c1 {
44 status = "okay";
45 clock-frequency = <400000>;
46
47 nfcmrvli2c0: i2c@1 {
48 compatible = "marvell,nfc-i2c";
49
50 reg = <0x8>;
51
52 /* I2C INT configuration */
53 interrupt-parent = <&gpio3>;
54 interrupts = <21 0>;
55
56 /* I2C INT trigger configuration */
57 i2c-int-rising;
58
59 /* Reset IO */
60 reset-n-io = <&gpio3 19 0>;
61 };
62};
63
64
65Example (for ARM-based BeagleBoard Black on SPI0):
66
67&spi0 {
68
69 mrvlnfcspi0: spi@0 {
70 compatible = "marvell,nfc-spi";
71
72 reg = <0>;
73
74 /* SPI Bus configuration */
75 spi-max-frequency = <3000000>;
76 spi-cpha;
77 spi-cpol;
78
79 /* SPI INT configuration */
80 interrupt-parent = <&gpio1>;
81 interrupts = <17 0>;
82
83 /* Reset IO */
84 reset-n-io = <&gpio3 19 0>;
85 };
86};
diff --git a/Documentation/devicetree/bindings/net/nfc/st-nci-i2c.txt b/Documentation/devicetree/bindings/net/nfc/st-nci-i2c.txt
index d707588ed734..263732e8879f 100644
--- a/Documentation/devicetree/bindings/net/nfc/st-nci-i2c.txt
+++ b/Documentation/devicetree/bindings/net/nfc/st-nci-i2c.txt
@@ -11,6 +11,10 @@ Required properties:
11Optional SoC Specific Properties: 11Optional SoC Specific Properties:
12- pinctrl-names: Contains only one value - "default". 12- pinctrl-names: Contains only one value - "default".
13- pintctrl-0: Specifies the pin control groups used for this controller. 13- pintctrl-0: Specifies the pin control groups used for this controller.
14- ese-present: Specifies that an ese is physically connected to the nfc
15controller.
16- uicc-present: Specifies that the uicc swp signal can be physically
17connected to the nfc controller.
14 18
15Example (for ARM-based BeagleBoard xM with ST21NFCB on I2C2): 19Example (for ARM-based BeagleBoard xM with ST21NFCB on I2C2):
16 20
@@ -29,5 +33,8 @@ Example (for ARM-based BeagleBoard xM with ST21NFCB on I2C2):
29 interrupts = <2 IRQ_TYPE_LEVEL_HIGH>; 33 interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
30 34
31 reset-gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>; 35 reset-gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>;
36
37 ese-present;
38 uicc-present;
32 }; 39 };
33}; 40};
diff --git a/Documentation/devicetree/bindings/net/nfc/st-nci-spi.txt b/Documentation/devicetree/bindings/net/nfc/st-nci-spi.txt
index 525681b6dc39..711ca85a363d 100644
--- a/Documentation/devicetree/bindings/net/nfc/st-nci-spi.txt
+++ b/Documentation/devicetree/bindings/net/nfc/st-nci-spi.txt
@@ -2,7 +2,7 @@
2 2
3Required properties: 3Required properties:
4- compatible: Should be "st,st21nfcb-spi" 4- compatible: Should be "st,st21nfcb-spi"
5- spi-max-frequency: Maximum SPI frequency (<= 10000000). 5- spi-max-frequency: Maximum SPI frequency (<= 4000000).
6- interrupt-parent: phandle for the interrupt gpio controller 6- interrupt-parent: phandle for the interrupt gpio controller
7- interrupts: GPIO interrupt to which the chip is connected 7- interrupts: GPIO interrupt to which the chip is connected
8- reset-gpios: Output GPIO pin used to reset the ST21NFCB 8- reset-gpios: Output GPIO pin used to reset the ST21NFCB
@@ -10,6 +10,10 @@ Required properties:
10Optional SoC Specific Properties: 10Optional SoC Specific Properties:
11- pinctrl-names: Contains only one value - "default". 11- pinctrl-names: Contains only one value - "default".
12- pintctrl-0: Specifies the pin control groups used for this controller. 12- pintctrl-0: Specifies the pin control groups used for this controller.
13- ese-present: Specifies that an ese is physically connected to the nfc
14controller.
15- uicc-present: Specifies that the uicc swp signal can be physically
16connected to the nfc controller.
13 17
14Example (for ARM-based BeagleBoard xM with ST21NFCB on SPI4): 18Example (for ARM-based BeagleBoard xM with ST21NFCB on SPI4):
15 19
@@ -27,5 +31,8 @@ Example (for ARM-based BeagleBoard xM with ST21NFCB on SPI4):
27 interrupts = <2 IRQ_TYPE_EDGE_RISING>; 31 interrupts = <2 IRQ_TYPE_EDGE_RISING>;
28 32
29 reset-gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>; 33 reset-gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>;
34
35 ese-present;
36 uicc-present;
30 }; 37 };
31}; 38};
diff --git a/Documentation/devicetree/bindings/net/renesas,ravb.txt b/Documentation/devicetree/bindings/net/renesas,ravb.txt
index 1fd8831437bf..b486f3f5f6a3 100644
--- a/Documentation/devicetree/bindings/net/renesas,ravb.txt
+++ b/Documentation/devicetree/bindings/net/renesas,ravb.txt
@@ -6,8 +6,12 @@ interface contains.
6Required properties: 6Required properties:
7- compatible: "renesas,etheravb-r8a7790" if the device is a part of R8A7790 SoC. 7- compatible: "renesas,etheravb-r8a7790" if the device is a part of R8A7790 SoC.
8 "renesas,etheravb-r8a7794" if the device is a part of R8A7794 SoC. 8 "renesas,etheravb-r8a7794" if the device is a part of R8A7794 SoC.
9 "renesas,etheravb-r8a7795" if the device is a part of R8A7795 SoC.
9- reg: offset and length of (1) the register block and (2) the stream buffer. 10- reg: offset and length of (1) the register block and (2) the stream buffer.
10- interrupts: interrupt specifier for the sole interrupt. 11- interrupts: A list of interrupt-specifiers, one for each entry in
12 interrupt-names.
13 If interrupt-names is not present, an interrupt specifier
14 for a single muxed interrupt.
11- phy-mode: see ethernet.txt file in the same directory. 15- phy-mode: see ethernet.txt file in the same directory.
12- phy-handle: see ethernet.txt file in the same directory. 16- phy-handle: see ethernet.txt file in the same directory.
13- #address-cells: number of address cells for the MDIO bus, must be equal to 1. 17- #address-cells: number of address cells for the MDIO bus, must be equal to 1.
@@ -18,6 +22,12 @@ Required properties:
18Optional properties: 22Optional properties:
19- interrupt-parent: the phandle for the interrupt controller that services 23- interrupt-parent: the phandle for the interrupt controller that services
20 interrupts for this device. 24 interrupts for this device.
25- interrupt-names: A list of interrupt names.
26 For the R8A7795 SoC this property is mandatory;
27 it should include one entry per channel, named "ch%u",
28 where %u is the channel number ranging from 0 to 24.
29 For other SoCs this property is optional; if present
30 it should contain "mux" for a single muxed interrupt.
21- pinctrl-names: pin configuration state name ("default"). 31- pinctrl-names: pin configuration state name ("default").
22- renesas,no-ether-link: boolean, specify when a board does not provide a proper 32- renesas,no-ether-link: boolean, specify when a board does not provide a proper
23 AVB_LINK signal. 33 AVB_LINK signal.
@@ -27,13 +37,46 @@ Optional properties:
27Example: 37Example:
28 38
29 ethernet@e6800000 { 39 ethernet@e6800000 {
30 compatible = "renesas,etheravb-r8a7790"; 40 compatible = "renesas,etheravb-r8a7795";
31 reg = <0 0xe6800000 0 0x800>, <0 0xee0e8000 0 0x4000>; 41 reg = <0 0xe6800000 0 0x800>, <0 0xe6a00000 0 0x10000>;
32 interrupt-parent = <&gic>; 42 interrupt-parent = <&gic>;
33 interrupts = <0 163 IRQ_TYPE_LEVEL_HIGH>; 43 interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>,
34 clocks = <&mstp8_clks R8A7790_CLK_ETHERAVB>; 44 <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
35 phy-mode = "rmii"; 45 <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>,
46 <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>,
47 <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>,
48 <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>,
49 <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>,
50 <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>,
51 <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>,
52 <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>,
53 <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>,
54 <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>,
55 <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>,
56 <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>,
57 <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>,
58 <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>,
59 <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>,
60 <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>,
61 <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
62 <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>,
63 <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>,
64 <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>,
65 <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>,
66 <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>,
67 <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
68 interrupt-names = "ch0", "ch1", "ch2", "ch3",
69 "ch4", "ch5", "ch6", "ch7",
70 "ch8", "ch9", "ch10", "ch11",
71 "ch12", "ch13", "ch14", "ch15",
72 "ch16", "ch17", "ch18", "ch19",
73 "ch20", "ch21", "ch22", "ch23",
74 "ch24";
75 clocks = <&mstp8_clks R8A7795_CLK_ETHERAVB>;
76 power-domains = <&cpg_clocks>;
77 phy-mode = "rgmii-id";
36 phy-handle = <&phy0>; 78 phy-handle = <&phy0>;
79
37 pinctrl-0 = <&ether_pins>; 80 pinctrl-0 = <&ether_pins>;
38 pinctrl-names = "default"; 81 pinctrl-names = "default";
39 renesas,no-ether-link; 82 renesas,no-ether-link;
@@ -41,8 +84,20 @@ Example:
41 #size-cells = <0>; 84 #size-cells = <0>;
42 85
43 phy0: ethernet-phy@0 { 86 phy0: ethernet-phy@0 {
87 rxc-skew-ps = <900>;
88 rxdv-skew-ps = <0>;
89 rxd0-skew-ps = <0>;
90 rxd1-skew-ps = <0>;
91 rxd2-skew-ps = <0>;
92 rxd3-skew-ps = <0>;
93 txc-skew-ps = <900>;
94 txen-skew-ps = <0>;
95 txd0-skew-ps = <0>;
96 txd1-skew-ps = <0>;
97 txd2-skew-ps = <0>;
98 txd3-skew-ps = <0>;
44 reg = <0>; 99 reg = <0>;
45 interrupt-parent = <&gpio2>; 100 interrupt-parent = <&gpio2>;
46 interrupts = <15 IRQ_TYPE_LEVEL_LOW>; 101 interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
47 }; 102 };
48 }; 103 };
diff --git a/Documentation/devicetree/bindings/net/smsc-lan87xx.txt b/Documentation/devicetree/bindings/net/smsc-lan87xx.txt
new file mode 100644
index 000000000000..974edd5c85cc
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/smsc-lan87xx.txt
@@ -0,0 +1,24 @@
1SMSC LAN87xx Ethernet PHY
2
3Some boards require special tuning values. Configure them
4through an Ethernet OF device node.
5
6Optional properties:
7
8- smsc,disable-energy-detect:
9 If set, do not enable energy detect mode for the SMSC phy.
10 default: enable energy detect mode
11
12Examples:
13smsc phy with disabled energy detect mode on an am335x based board.
14&davinci_mdio {
15 pinctrl-names = "default", "sleep";
16 pinctrl-0 = <&davinci_mdio_default>;
17 pinctrl-1 = <&davinci_mdio_sleep>;
18 status = "okay";
19
20 ethernetphy0: ethernet-phy@0 {
21 reg = <0>;
22 smsc,disable-energy-detect;
23 };
24};
diff --git a/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt b/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt
new file mode 100644
index 000000000000..383d5889e95a
--- /dev/null
+++ b/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt
@@ -0,0 +1,20 @@
1Freescale i.MX6 On-Chip OTP Controller (OCOTP) device tree bindings
2
3This binding represents the on-chip eFuse OTP controller found on
4i.MX6Q/D, i.MX6DL/S, i.MX6SL, and i.MX6SX SoCs.
5
6Required properties:
7- compatible: should be one of
8 "fsl,imx6q-ocotp" (i.MX6Q/D/DL/S),
9 "fsl,imx6sl-ocotp" (i.MX6SL), or
10 "fsl,imx6sx-ocotp" (i.MX6SX), followed by "syscon".
11- reg: Should contain the register base and length.
12- clocks: Should contain a phandle pointing to the gated peripheral clock.
13
14Example:
15
16 ocotp: ocotp@021bc000 {
17 compatible = "fsl,imx6q-ocotp", "syscon";
18 reg = <0x021bc000 0x4000>;
19 clocks = <&clks IMX6QDL_CLK_IIM>;
20 };
diff --git a/Documentation/devicetree/bindings/nvmem/mxs-ocotp.txt b/Documentation/devicetree/bindings/nvmem/mxs-ocotp.txt
new file mode 100644
index 000000000000..daebce9e6b07
--- /dev/null
+++ b/Documentation/devicetree/bindings/nvmem/mxs-ocotp.txt
@@ -0,0 +1,25 @@
1On-Chip OTP Memory for Freescale i.MX23/i.MX28
2
3Required properties :
4- compatible :
5 - "fsl,imx23-ocotp" for i.MX23
6 - "fsl,imx28-ocotp" for i.MX28
7- #address-cells : Should be 1
8- #size-cells : Should be 1
9- reg : Address and length of OTP controller registers
10- clocks : Should contain a reference to the hbus clock
11
12= Data cells =
13Are child nodes of mxs-ocotp, bindings of which as described in
14bindings/nvmem/nvmem.txt
15
16Example for i.MX28:
17
18 ocotp: ocotp@8002c000 {
19 compatible = "fsl,imx28-ocotp", "fsl,ocotp";
20 #address-cells = <1>;
21 #size-cells = <1>;
22 reg = <0x8002c000 0x2000>;
23 clocks = <&clks 25>;
24 status = "okay";
25 };
diff --git a/Documentation/devicetree/bindings/nvmem/rockchip-efuse.txt b/Documentation/devicetree/bindings/nvmem/rockchip-efuse.txt
new file mode 100644
index 000000000000..8f86ab3b1046
--- /dev/null
+++ b/Documentation/devicetree/bindings/nvmem/rockchip-efuse.txt
@@ -0,0 +1,38 @@
1= Rockchip eFuse device tree bindings =
2
3Required properties:
4- compatible: Should be "rockchip,rockchip-efuse"
5- reg: Should contain the registers location and exact eFuse size
6- clocks: Should be the clock id of eFuse
7- clock-names: Should be "pclk_efuse"
8
9= Data cells =
10Are child nodes of eFuse, bindings of which as described in
11bindings/nvmem/nvmem.txt
12
13Example:
14
15 efuse: efuse@ffb40000 {
16 compatible = "rockchip,rockchip-efuse";
17 reg = <0xffb40000 0x20>;
18 #address-cells = <1>;
19 #size-cells = <1>;
20 clocks = <&cru PCLK_EFUSE256>;
21 clock-names = "pclk_efuse";
22
23 /* Data cells */
24 cpu_leakage: cpu_leakage {
25 reg = <0x17 0x1>;
26 };
27 };
28
29= Data consumers =
30Are device nodes which consume nvmem data cells.
31
32Example:
33
34 cpu_leakage {
35 ...
36 nvmem-cells = <&cpu_leakage>;
37 nvmem-cell-names = "cpu_leakage";
38 };
diff --git a/Documentation/devicetree/bindings/nvmem/vf610-ocotp.txt b/Documentation/devicetree/bindings/nvmem/vf610-ocotp.txt
new file mode 100644
index 000000000000..56ed481c3e26
--- /dev/null
+++ b/Documentation/devicetree/bindings/nvmem/vf610-ocotp.txt
@@ -0,0 +1,19 @@
1On-Chip OTP Memory for Freescale Vybrid
2
3Required Properties:
4 compatible:
5 - "fsl,vf610-ocotp" for VF5xx/VF6xx
6 #address-cells : Should be 1
7 #size-cells : Should be 1
8 reg : Address and length of OTP controller and fuse map registers
9 clocks : ipg clock we associate with the OCOTP peripheral
10
11Example for Vybrid VF5xx/VF6xx:
12
13 ocotp: ocotp@400a5000 {
14 compatible = "fsl,vf610-ocotp";
15 #address-cells = <1>;
16 #size-cells = <1>;
17 reg = <0x400a5000 0xCF0>;
18 clocks = <&clks VF610_CLK_OCOTP>;
19 };
diff --git a/Documentation/devicetree/bindings/pci/altera-pcie-msi.txt b/Documentation/devicetree/bindings/pci/altera-pcie-msi.txt
new file mode 100644
index 000000000000..09cd3bc4d038
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/altera-pcie-msi.txt
@@ -0,0 +1,28 @@
1* Altera PCIe MSI controller
2
3Required properties:
4- compatible: should contain "altr,msi-1.0"
5- reg: specifies the physical base address of the controller and
6 the length of the memory mapped region.
7- reg-names: must include the following entries:
8 "csr": CSR registers
9 "vector_slave": vectors slave port region
10- interrupt-parent: interrupt source phandle.
11- interrupts: specifies the interrupt source of the parent interrupt
12 controller. The format of the interrupt specifier depends on the
13 parent interrupt controller.
14- num-vectors: number of vectors, range 1 to 32.
15- msi-controller: indicates that this is MSI controller node
16
17
18Example
19msi0: msi@0xFF200000 {
20 compatible = "altr,msi-1.0";
21 reg = <0xFF200000 0x00000010
22 0xFF200010 0x00000080>;
23 reg-names = "csr", "vector_slave";
24 interrupt-parent = <&hps_0_arm_gic_0>;
25 interrupts = <0 42 4>;
26 msi-controller;
27 num-vectors = <32>;
28};
diff --git a/Documentation/devicetree/bindings/pci/altera-pcie.txt b/Documentation/devicetree/bindings/pci/altera-pcie.txt
new file mode 100644
index 000000000000..2951a6a50704
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/altera-pcie.txt
@@ -0,0 +1,49 @@
1* Altera PCIe controller
2
3Required properties:
4- compatible : should contain "altr,pcie-root-port-1.0"
5- reg: a list of physical base address and length for TXS and CRA.
6- reg-names: must include the following entries:
7 "Txs": TX slave port region
8 "Cra": Control register access region
9- interrupt-parent: interrupt source phandle.
10- interrupts: specifies the interrupt source of the parent interrupt controller.
11 The format of the interrupt specifier depends on the parent interrupt
12 controller.
13- device_type: must be "pci"
14- #address-cells: set to <3>
15- #size-cells: set to <2>
16- #interrupt-cells: set to <1>
17- ranges: describes the translation of addresses for root ports and standard
18 PCI regions.
19- interrupt-map-mask and interrupt-map: standard PCI properties to define the
20 mapping of the PCIe interface to interrupt numbers.
21
22Optional properties:
23- msi-parent: Link to the hardware entity that serves as the MSI controller for this PCIe
24 controller.
25- bus-range: PCI bus numbers covered
26
27Example
28 pcie_0: pcie@0xc00000000 {
29 compatible = "altr,pcie-root-port-1.0";
30 reg = <0xc0000000 0x20000000>,
31 <0xff220000 0x00004000>;
32 reg-names = "Txs", "Cra";
33 interrupt-parent = <&hps_0_arm_gic_0>;
34 interrupts = <0 40 4>;
35 interrupt-controller;
36 #interrupt-cells = <1>;
37 bus-range = <0x0 0xFF>;
38 device_type = "pci";
39 msi-parent = <&msi_to_gic_gen_0>;
40 #address-cells = <3>;
41 #size-cells = <2>;
42 interrupt-map-mask = <0 0 0 7>;
43 interrupt-map = <0 0 0 1 &pcie_0 1>,
44 <0 0 0 2 &pcie_0 2>,
45 <0 0 0 3 &pcie_0 3>,
46 <0 0 0 4 &pcie_0 4>;
47 ranges = <0x82000000 0x00000000 0x00000000 0xc0000000 0x00000000 0x10000000
48 0x82000000 0x00000000 0x10000000 0xd0000000 0x00000000 0x10000000>;
49 };
diff --git a/Documentation/devicetree/bindings/pci/arm,juno-r1-pcie.txt b/Documentation/devicetree/bindings/pci/arm,juno-r1-pcie.txt
new file mode 100644
index 000000000000..f7514c170a32
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/arm,juno-r1-pcie.txt
@@ -0,0 +1,10 @@
1* ARM Juno R1 PCIe interface
2
3This PCIe host controller is based on PLDA XpressRICH3-AXI IP
4and thus inherits all the common properties defined in plda,xpressrich3-axi.txt
5as well as the base properties defined in host-generic-pci.txt.
6
7Required properties:
8 - compatible: "arm,juno-r1-pcie"
9 - dma-coherent: The host controller bridges the AXI transactions into PCIe bus
10 in a manner that makes the DMA operations to appear coherent to the CPUs.
diff --git a/Documentation/devicetree/bindings/pci/brcm,iproc-pcie.txt b/Documentation/devicetree/bindings/pci/brcm,iproc-pcie.txt
index f7ce50e38ed4..45c2a8094a9f 100644
--- a/Documentation/devicetree/bindings/pci/brcm,iproc-pcie.txt
+++ b/Documentation/devicetree/bindings/pci/brcm,iproc-pcie.txt
@@ -17,6 +17,21 @@ Optional properties:
17- phys: phandle of the PCIe PHY device 17- phys: phandle of the PCIe PHY device
18- phy-names: must be "pcie-phy" 18- phy-names: must be "pcie-phy"
19 19
20- brcm,pcie-ob: Some iProc SoCs do not have the outbound address mapping done
21by the ASIC after power on reset. In this case, SW needs to configure it
22
23If the brcm,pcie-ob property is present, the following properties become
24effective:
25
26Required:
27- brcm,pcie-ob-axi-offset: The offset from the AXI address to the internal
28address used by the iProc PCIe core (not the PCIe address)
29- brcm,pcie-ob-window-size: The outbound address mapping window size (in MB)
30
31Optional:
32- brcm,pcie-ob-oarr-size: Some iProc SoCs need the OARR size bit to be set to
33increase the outbound window size
34
20Example: 35Example:
21 pcie0: pcie@18012000 { 36 pcie0: pcie@18012000 {
22 compatible = "brcm,iproc-pcie"; 37 compatible = "brcm,iproc-pcie";
@@ -38,6 +53,11 @@ Example:
38 53
39 phys = <&phy 0 5>; 54 phys = <&phy 0 5>;
40 phy-names = "pcie-phy"; 55 phy-names = "pcie-phy";
56
57 brcm,pcie-ob;
58 brcm,pcie-ob-oarr-size;
59 brcm,pcie-ob-axi-offset = <0x00000000>;
60 brcm,pcie-ob-window-size = <256>;
41 }; 61 };
42 62
43 pcie1: pcie@18013000 { 63 pcie1: pcie@18013000 {
diff --git a/Documentation/devicetree/bindings/pci/designware-pcie.txt b/Documentation/devicetree/bindings/pci/designware-pcie.txt
index 9f4faa8e8d00..5b0853df9d5a 100644
--- a/Documentation/devicetree/bindings/pci/designware-pcie.txt
+++ b/Documentation/devicetree/bindings/pci/designware-pcie.txt
@@ -15,14 +15,16 @@ Required properties:
15 to define the mapping of the PCIe interface to interrupt 15 to define the mapping of the PCIe interface to interrupt
16 numbers. 16 numbers.
17- num-lanes: number of lanes to use 17- num-lanes: number of lanes to use
18- clocks: Must contain an entry for each entry in clock-names.
19 See ../clocks/clock-bindings.txt for details.
20- clock-names: Must include the following entries:
21 - "pcie"
22 - "pcie_bus"
23 18
24Optional properties: 19Optional properties:
20- num-lanes: number of lanes to use (this property should be specified unless
21 the link is brought already up in BIOS)
25- reset-gpio: gpio pin number of power good signal 22- reset-gpio: gpio pin number of power good signal
26- bus-range: PCI bus numbers covered (it is recommended for new devicetrees to 23- bus-range: PCI bus numbers covered (it is recommended for new devicetrees to
27 specify this property, to keep backwards compatibility a range of 0x00-0xff 24 specify this property, to keep backwards compatibility a range of 0x00-0xff
28 is assumed if not present) 25 is assumed if not present)
26- clocks: Must contain an entry for each entry in clock-names.
27 See ../clocks/clock-bindings.txt for details.
28- clock-names: Must include the following entries:
29 - "pcie"
30 - "pcie_bus"
diff --git a/Documentation/devicetree/bindings/pci/hisilicon-pcie.txt b/Documentation/devicetree/bindings/pci/hisilicon-pcie.txt
new file mode 100644
index 000000000000..17c6ed9c6059
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/hisilicon-pcie.txt
@@ -0,0 +1,44 @@
1HiSilicon PCIe host bridge DT description
2
3HiSilicon PCIe host controller is based on Designware PCI core.
4It shares common functions with PCIe Designware core driver and inherits
5common properties defined in
6Documentation/devicetree/bindings/pci/designware-pci.txt.
7
8Additional properties are described here:
9
10Required properties:
11- compatible: Should contain "hisilicon,hip05-pcie".
12- reg: Should contain rc_dbi, config registers location and length.
13- reg-names: Must include the following entries:
14 "rc_dbi": controller configuration registers;
15 "config": PCIe configuration space registers.
16- msi-parent: Should be its_pcie which is an ITS receiving MSI interrupts.
17- port-id: Should be 0, 1, 2 or 3.
18
19Optional properties:
20- status: Either "ok" or "disabled".
21- dma-coherent: Present if DMA operations are coherent.
22
23Example:
24 pcie@0xb0080000 {
25 compatible = "hisilicon,hip05-pcie", "snps,dw-pcie";
26 reg = <0 0xb0080000 0 0x10000>, <0x220 0x00000000 0 0x2000>;
27 reg-names = "rc_dbi", "config";
28 bus-range = <0 15>;
29 msi-parent = <&its_pcie>;
30 #address-cells = <3>;
31 #size-cells = <2>;
32 device_type = "pci";
33 dma-coherent;
34 ranges = <0x82000000 0 0x00000000 0x220 0x00000000 0 0x10000000>;
35 num-lanes = <8>;
36 port-id = <1>;
37 #interrupts-cells = <1>;
38 interrupts-map-mask = <0xf800 0 0 7>;
39 interrupts-map = <0x0 0 0 1 &mbigen_pcie 1 10
40 0x0 0 0 2 &mbigen_pcie 2 11
41 0x0 0 0 3 &mbigen_pcie 3 12
42 0x0 0 0 4 &mbigen_pcie 4 13>;
43 status = "ok";
44 };
diff --git a/Documentation/devicetree/bindings/pci/host-generic-pci.txt b/Documentation/devicetree/bindings/pci/host-generic-pci.txt
index cf3e205e0b7e..3f1d3fca62bb 100644
--- a/Documentation/devicetree/bindings/pci/host-generic-pci.txt
+++ b/Documentation/devicetree/bindings/pci/host-generic-pci.txt
@@ -34,8 +34,9 @@ Properties of the host controller node:
34- #size-cells : Must be 2. 34- #size-cells : Must be 2.
35 35
36- reg : The Configuration Space base address and size, as accessed 36- reg : The Configuration Space base address and size, as accessed
37 from the parent bus. 37 from the parent bus. The base address corresponds to
38 38 the first bus in the "bus-range" property. If no
39 "bus-range" is specified, this will be bus 0 (the default).
39 40
40Properties of the /chosen node: 41Properties of the /chosen node:
41 42
diff --git a/Documentation/devicetree/bindings/pci/layerscape-pci.txt b/Documentation/devicetree/bindings/pci/layerscape-pci.txt
index 6286f049bf18..e3767857d30d 100644
--- a/Documentation/devicetree/bindings/pci/layerscape-pci.txt
+++ b/Documentation/devicetree/bindings/pci/layerscape-pci.txt
@@ -1,10 +1,20 @@
1Freescale Layerscape PCIe controller 1Freescale Layerscape PCIe controller
2 2
3This PCIe host controller is based on the Synopsis Designware PCIe IP 3This PCIe host controller is based on the Synopsys DesignWare PCIe IP
4and thus inherits all the common properties defined in designware-pcie.txt. 4and thus inherits all the common properties defined in designware-pcie.txt.
5 5
6This controller derives its clocks from the Reset Configuration Word (RCW)
7which is used to describe the PLL settings at the time of chip-reset.
8
9Also as per the available Reference Manuals, there is no specific 'version'
10register available in the Freescale PCIe controller register set,
11which can allow determining the underlying DesignWare PCIe controller version
12information.
13
6Required properties: 14Required properties:
7- compatible: should contain the platform identifier such as "fsl,ls1021a-pcie" 15- compatible: should contain the platform identifier such as:
16 "fsl,ls1021a-pcie", "snps,dw-pcie"
17 "fsl,ls2080a-pcie", "snps,dw-pcie"
8- reg: base addresses and lengths of the PCIe controller 18- reg: base addresses and lengths of the PCIe controller
9- interrupts: A list of interrupt outputs of the controller. Must contain an 19- interrupts: A list of interrupt outputs of the controller. Must contain an
10 entry for each entry in the interrupt-names property. 20 entry for each entry in the interrupt-names property.
diff --git a/Documentation/devicetree/bindings/pci/pci-msi.txt b/Documentation/devicetree/bindings/pci/pci-msi.txt
new file mode 100644
index 000000000000..9b3cc817d181
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/pci-msi.txt
@@ -0,0 +1,220 @@
1This document describes the generic device tree binding for describing the
2relationship between PCI devices and MSI controllers.
3
4Each PCI device under a root complex is uniquely identified by its Requester ID
5(AKA RID). A Requester ID is a triplet of a Bus number, Device number, and
6Function number.
7
8For the purpose of this document, when treated as a numeric value, a RID is
9formatted such that:
10
11* Bits [15:8] are the Bus number.
12* Bits [7:3] are the Device number.
13* Bits [2:0] are the Function number.
14* Any other bits required for padding must be zero.
15
16MSIs may be distinguished in part through the use of sideband data accompanying
17writes. In the case of PCI devices, this sideband data may be derived from the
18Requester ID. A mechanism is required to associate a device with both the MSI
19controllers it can address, and the sideband data that will be associated with
20its writes to those controllers.
21
22For generic MSI bindings, see
23Documentation/devicetree/bindings/interrupt-controller/msi.txt.
24
25
26PCI root complex
27================
28
29Optional properties
30-------------------
31
32- msi-map: Maps a Requester ID to an MSI controller and associated
33 msi-specifier data. The property is an arbitrary number of tuples of
34 (rid-base,msi-controller,msi-base,length), where:
35
36 * rid-base is a single cell describing the first RID matched by the entry.
37
38 * msi-controller is a single phandle to an MSI controller
39
40 * msi-base is an msi-specifier describing the msi-specifier produced for the
41 first RID matched by the entry.
42
43 * length is a single cell describing how many consecutive RIDs are matched
44 following the rid-base.
45
46 Any RID r in the interval [rid-base, rid-base + length) is associated with
47 the listed msi-controller, with the msi-specifier (r - rid-base + msi-base).
48
49- msi-map-mask: A mask to be applied to each Requester ID prior to being mapped
50 to an msi-specifier per the msi-map property.
51
52- msi-parent: Describes the MSI parent of the root complex itself. Where
53 the root complex and MSI controller do not pass sideband data with MSI
54 writes, this property may be used to describe the MSI controller(s)
55 used by PCI devices under the root complex, if defined as such in the
56 binding for the root complex.
57
58
59Example (1)
60===========
61
62/ {
63 #address-cells = <1>;
64 #size-cells = <1>;
65
66 msi: msi-controller@a {
67 reg = <0xa 0x1>;
68 compatible = "vendor,some-controller";
69 msi-controller;
70 #msi-cells = <1>;
71 };
72
73 pci: pci@f {
74 reg = <0xf 0x1>;
75 compatible = "vendor,pcie-root-complex";
76 device_type = "pci";
77
78 /*
79 * The sideband data provided to the MSI controller is
80 * the RID, identity-mapped.
81 */
82 msi-map = <0x0 &msi_a 0x0 0x10000>,
83 };
84};
85
86
87Example (2)
88===========
89
90/ {
91 #address-cells = <1>;
92 #size-cells = <1>;
93
94 msi: msi-controller@a {
95 reg = <0xa 0x1>;
96 compatible = "vendor,some-controller";
97 msi-controller;
98 #msi-cells = <1>;
99 };
100
101 pci: pci@f {
102 reg = <0xf 0x1>;
103 compatible = "vendor,pcie-root-complex";
104 device_type = "pci";
105
106 /*
107 * The sideband data provided to the MSI controller is
108 * the RID, masked to only the device and function bits.
109 */
110 msi-map = <0x0 &msi_a 0x0 0x100>,
111 msi-map-mask = <0xff>
112 };
113};
114
115
116Example (3)
117===========
118
119/ {
120 #address-cells = <1>;
121 #size-cells = <1>;
122
123 msi: msi-controller@a {
124 reg = <0xa 0x1>;
125 compatible = "vendor,some-controller";
126 msi-controller;
127 #msi-cells = <1>;
128 };
129
130 pci: pci@f {
131 reg = <0xf 0x1>;
132 compatible = "vendor,pcie-root-complex";
133 device_type = "pci";
134
135 /*
136 * The sideband data provided to the MSI controller is
137 * the RID, but the high bit of the bus number is
138 * ignored.
139 */
140 msi-map = <0x0000 &msi 0x0000 0x8000>,
141 <0x8000 &msi 0x0000 0x8000>;
142 };
143};
144
145
146Example (4)
147===========
148
149/ {
150 #address-cells = <1>;
151 #size-cells = <1>;
152
153 msi: msi-controller@a {
154 reg = <0xa 0x1>;
155 compatible = "vendor,some-controller";
156 msi-controller;
157 #msi-cells = <1>;
158 };
159
160 pci: pci@f {
161 reg = <0xf 0x1>;
162 compatible = "vendor,pcie-root-complex";
163 device_type = "pci";
164
165 /*
166 * The sideband data provided to the MSI controller is
167 * the RID, but the high bit of the bus number is
168 * negated.
169 */
170 msi-map = <0x0000 &msi 0x8000 0x8000>,
171 <0x8000 &msi 0x0000 0x8000>;
172 };
173};
174
175
176Example (5)
177===========
178
179/ {
180 #address-cells = <1>;
181 #size-cells = <1>;
182
183 msi_a: msi-controller@a {
184 reg = <0xa 0x1>;
185 compatible = "vendor,some-controller";
186 msi-controller;
187 #msi-cells = <1>;
188 };
189
190 msi_b: msi-controller@b {
191 reg = <0xb 0x1>;
192 compatible = "vendor,some-controller";
193 msi-controller;
194 #msi-cells = <1>;
195 };
196
197 msi_c: msi-controller@c {
198 reg = <0xc 0x1>;
199 compatible = "vendor,some-controller";
200 msi-controller;
201 #msi-cells = <1>;
202 };
203
204 pci: pci@c {
205 reg = <0xf 0x1>;
206 compatible = "vendor,pcie-root-complex";
207 device_type = "pci";
208
209 /*
210 * The sideband data provided to MSI controller a is the
211 * RID, but the high bit of the bus number is negated.
212 * The sideband data provided to MSI controller b is the
213 * RID, identity-mapped.
214 * MSI controller c is not addressable.
215 */
216 msi-map = <0x0000 &msi_a 0x8000 0x08000>,
217 <0x8000 &msi_a 0x0000 0x08000>,
218 <0x0000 &msi_b 0x0000 0x10000>;
219 };
220};
diff --git a/Documentation/devicetree/bindings/pci/pci-rcar-gen2.txt b/Documentation/devicetree/bindings/pci/pci-rcar-gen2.txt
index d8ef5bf50f11..7fab84b33531 100644
--- a/Documentation/devicetree/bindings/pci/pci-rcar-gen2.txt
+++ b/Documentation/devicetree/bindings/pci/pci-rcar-gen2.txt
@@ -7,7 +7,8 @@ OHCI and EHCI controllers.
7 7
8Required properties: 8Required properties:
9- compatible: "renesas,pci-r8a7790" for the R8A7790 SoC; 9- compatible: "renesas,pci-r8a7790" for the R8A7790 SoC;
10 "renesas,pci-r8a7791" for the R8A7791 SoC. 10 "renesas,pci-r8a7791" for the R8A7791 SoC;
11 "renesas,pci-r8a7794" for the R8A7794 SoC.
11- reg: A list of physical regions to access the device: the first is 12- reg: A list of physical regions to access the device: the first is
12 the operational registers for the OHCI/EHCI controllers and the 13 the operational registers for the OHCI/EHCI controllers and the
13 second is for the bridge configuration and control registers. 14 second is for the bridge configuration and control registers.
diff --git a/Documentation/devicetree/bindings/pci/pci.txt b/Documentation/devicetree/bindings/pci/pci.txt
index f8fbe9af7b2f..08dcfad09f8d 100644
--- a/Documentation/devicetree/bindings/pci/pci.txt
+++ b/Documentation/devicetree/bindings/pci/pci.txt
@@ -1,12 +1,12 @@
1PCI bus bridges have standardized Device Tree bindings: 1PCI bus bridges have standardized Device Tree bindings:
2 2
3PCI Bus Binding to: IEEE Std 1275-1994 3PCI Bus Binding to: IEEE Std 1275-1994
4http://www.openfirmware.org/ofwg/bindings/pci/pci2_1.pdf 4http://www.firmware.org/1275/bindings/pci/pci2_1.pdf
5 5
6And for the interrupt mapping part: 6And for the interrupt mapping part:
7 7
8Open Firmware Recommended Practice: Interrupt Mapping 8Open Firmware Recommended Practice: Interrupt Mapping
9http://www.openfirmware.org/1275/practice/imap/imap0_9d.pdf 9http://www.firmware.org/1275/practice/imap/imap0_9d.pdf
10 10
11Additionally to the properties specified in the above standards a host bridge 11Additionally to the properties specified in the above standards a host bridge
12driver implementation may support the following properties: 12driver implementation may support the following properties:
diff --git a/Documentation/devicetree/bindings/pci/plda,xpressrich3-axi.txt b/Documentation/devicetree/bindings/pci/plda,xpressrich3-axi.txt
new file mode 100644
index 000000000000..f3f75bfb42bc
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/plda,xpressrich3-axi.txt
@@ -0,0 +1,12 @@
1* PLDA XpressRICH3-AXI host controller
2
3The PLDA XpressRICH3-AXI host controller can be configured in a manner that
4makes it compliant with the SBSA[1] standard published by ARM Ltd. For those
5scenarios, the host-generic-pci.txt bindings apply with the following additions
6to the compatible property:
7
8Required properties:
9 - compatible: should contain "plda,xpressrich3-axi" to identify the IP used.
10
11
12[1] http://infocenter.arm.com/help/topic/com.arm.doc.den0029a/
diff --git a/Documentation/devicetree/bindings/phy/brcm,cygnus-pcie-phy.txt b/Documentation/devicetree/bindings/phy/brcm,cygnus-pcie-phy.txt
new file mode 100644
index 000000000000..761c4bc24a9b
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/brcm,cygnus-pcie-phy.txt
@@ -0,0 +1,47 @@
1Broadcom Cygnus PCIe PHY
2
3Required properties:
4- compatible: must be "brcm,cygnus-pcie-phy"
5- reg: base address and length of the PCIe PHY block
6- #address-cells: must be 1
7- #size-cells: must be 0
8
9Each PCIe PHY should be represented by a child node
10
11Required properties For the child node:
12- reg: the PHY ID
130 - PCIe RC 0
141 - PCIe RC 1
15- #phy-cells: must be 0
16
17Example:
18 pcie_phy: phy@0301d0a0 {
19 compatible = "brcm,cygnus-pcie-phy";
20 reg = <0x0301d0a0 0x14>;
21
22 pcie0_phy: phy@0 {
23 reg = <0>;
24 #phy-cells = <0>;
25 };
26
27 pcie1_phy: phy@1 {
28 reg = <1>;
29 #phy-cells = <0>;
30 };
31 };
32
33 /* users of the PCIe phy */
34
35 pcie0: pcie@18012000 {
36 ...
37 ...
38 phys = <&pcie0_phy>;
39 phy-names = "pcie-phy";
40 };
41
42 pcie1: pcie@18013000 {
43 ...
44 ...
45 phys = <pcie1_phy>;
46 phy-names = "pcie-phy";
47 };
diff --git a/Documentation/devicetree/bindings/arm/calxeda/combophy.txt b/Documentation/devicetree/bindings/phy/calxeda-combophy.txt
index 6622bdb2e8bc..6622bdb2e8bc 100644
--- a/Documentation/devicetree/bindings/arm/calxeda/combophy.txt
+++ b/Documentation/devicetree/bindings/phy/calxeda-combophy.txt
diff --git a/Documentation/devicetree/bindings/usb/keystone-phy.txt b/Documentation/devicetree/bindings/phy/keystone-usb-phy.txt
index f37b3a86341d..f37b3a86341d 100644
--- a/Documentation/devicetree/bindings/usb/keystone-phy.txt
+++ b/Documentation/devicetree/bindings/phy/keystone-usb-phy.txt
diff --git a/Documentation/devicetree/bindings/usb/mxs-phy.txt b/Documentation/devicetree/bindings/phy/mxs-usb-phy.txt
index 379b84a567cc..379b84a567cc 100644
--- a/Documentation/devicetree/bindings/usb/mxs-phy.txt
+++ b/Documentation/devicetree/bindings/phy/mxs-usb-phy.txt
diff --git a/Documentation/devicetree/bindings/usb/nvidia,tegra20-usb-phy.txt b/Documentation/devicetree/bindings/phy/nvidia,tegra20-usb-phy.txt
index a9aa79fb90ed..a9aa79fb90ed 100644
--- a/Documentation/devicetree/bindings/usb/nvidia,tegra20-usb-phy.txt
+++ b/Documentation/devicetree/bindings/phy/nvidia,tegra20-usb-phy.txt
diff --git a/Documentation/devicetree/bindings/phy/phy-mt65xx-usb.txt b/Documentation/devicetree/bindings/phy/phy-mt65xx-usb.txt
new file mode 100644
index 000000000000..00100cf3e037
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/phy-mt65xx-usb.txt
@@ -0,0 +1,68 @@
1mt65xx USB3.0 PHY binding
2--------------------------
3
4This binding describes a usb3.0 phy for mt65xx platforms of Medaitek SoC.
5
6Required properties (controller (parent) node):
7 - compatible : should be "mediatek,mt8173-u3phy"
8 - reg : offset and length of register for phy, exclude port's
9 register.
10 - clocks : a list of phandle + clock-specifier pairs, one for each
11 entry in clock-names
12 - clock-names : must contain
13 "u3phya_ref": for reference clock of usb3.0 analog phy.
14
15Required nodes : a sub-node is required for each port the controller
16 provides. Address range information including the usual
17 'reg' property is used inside these nodes to describe
18 the controller's topology.
19
20Required properties (port (child) node):
21- reg : address and length of the register set for the port.
22- #phy-cells : should be 1 (See second example)
23 cell after port phandle is phy type from:
24 - PHY_TYPE_USB2
25 - PHY_TYPE_USB3
26
27Example:
28
29u3phy: usb-phy@11290000 {
30 compatible = "mediatek,mt8173-u3phy";
31 reg = <0 0x11290000 0 0x800>;
32 clocks = <&apmixedsys CLK_APMIXED_REF2USB_TX>;
33 clock-names = "u3phya_ref";
34 #address-cells = <2>;
35 #size-cells = <2>;
36 ranges;
37 status = "okay";
38
39 phy_port0: port@11290800 {
40 reg = <0 0x11290800 0 0x800>;
41 #phy-cells = <1>;
42 status = "okay";
43 };
44
45 phy_port1: port@11291000 {
46 reg = <0 0x11291000 0 0x800>;
47 #phy-cells = <1>;
48 status = "okay";
49 };
50};
51
52Specifying phy control of devices
53---------------------------------
54
55Device nodes should specify the configuration required in their "phys"
56property, containing a phandle to the phy port node and a device type;
57phy-names for each port are optional.
58
59Example:
60
61#include <dt-bindings/phy/phy.h>
62
63usb30: usb@11270000 {
64 ...
65 phys = <&phy_port0 PHY_TYPE_USB3>;
66 phy-names = "usb3-0";
67 ...
68};
diff --git a/Documentation/devicetree/bindings/usb/qcom,usb-8x16-phy.txt b/Documentation/devicetree/bindings/phy/qcom,usb-8x16-phy.txt
index 2cb2168cef41..2cb2168cef41 100644
--- a/Documentation/devicetree/bindings/usb/qcom,usb-8x16-phy.txt
+++ b/Documentation/devicetree/bindings/phy/qcom,usb-8x16-phy.txt
diff --git a/Documentation/devicetree/bindings/phy/samsung-phy.txt b/Documentation/devicetree/bindings/phy/samsung-phy.txt
index 60c6f2a633e0..0289d3b07853 100644
--- a/Documentation/devicetree/bindings/phy/samsung-phy.txt
+++ b/Documentation/devicetree/bindings/phy/samsung-phy.txt
@@ -44,6 +44,9 @@ Required properties:
44 - the "ref" clock is used to get the rate of the clock provided to the 44 - the "ref" clock is used to get the rate of the clock provided to the
45 PHY module 45 PHY module
46 46
47Optional properties:
48- vbus-supply: power-supply phandle for vbus power source
49
47The first phandle argument in the PHY specifier identifies the PHY, its 50The first phandle argument in the PHY specifier identifies the PHY, its
48meaning is compatible dependent. For the currently supported SoCs (Exynos 4210 51meaning is compatible dependent. For the currently supported SoCs (Exynos 4210
49and Exynos 4212) it is as follows: 52and Exynos 4212) it is as follows:
diff --git a/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt
index 3c821cda1ad0..b321b26780dc 100644
--- a/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt
@@ -17,6 +17,7 @@ Required properties:
17 "allwinner,sun8i-a23-pinctrl" 17 "allwinner,sun8i-a23-pinctrl"
18 "allwinner,sun8i-a23-r-pinctrl" 18 "allwinner,sun8i-a23-r-pinctrl"
19 "allwinner,sun8i-a33-pinctrl" 19 "allwinner,sun8i-a33-pinctrl"
20 "allwinner,sun8i-a83t-pinctrl"
20 21
21- reg: Should contain the register physical address and length for the 22- reg: Should contain the register physical address and length for the
22 pin controller. 23 pin controller.
diff --git a/Documentation/devicetree/bindings/pinctrl/atmel,at91-pio4-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/atmel,at91-pio4-pinctrl.txt
new file mode 100644
index 000000000000..61ac75706cc9
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/atmel,at91-pio4-pinctrl.txt
@@ -0,0 +1,90 @@
1* Atmel PIO4 Controller
2
3The Atmel PIO4 controller is used to select the function of a pin and to
4configure it.
5
6Required properties:
7- compatible: "atmel,sama5d2-pinctrl".
8- reg: base address and length of the PIO controller.
9- interrupts: interrupt outputs from the controller, one for each bank.
10- interrupt-controller: mark the device node as an interrupt controller.
11- #interrupt-cells: should be two.
12- gpio-controller: mark the device node as a gpio controller.
13- #gpio-cells: should be two.
14
15Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
16a general description of GPIO and interrupt bindings.
17
18Please refer to pinctrl-bindings.txt in this directory for details of the
19common pinctrl bindings used by client devices.
20
21Subnode format
22Each node (or subnode) will list the pins it needs and how to configured these
23pins.
24
25 node {
26 pinmux = <PIN_NUMBER_PINMUX>;
27 GENERIC_PINCONFIG;
28 };
29
30Required properties:
31- pinmux: integer array. Each integer represents a pin number plus mux and
32ioset settings. Use the macros from boot/dts/<soc>-pinfunc.h file to get the
33right representation of the pin.
34
35Optional properties:
36- GENERIC_PINCONFIG: generic pinconfig options to use, bias-disable,
37bias-pull-down, bias-pull-up, drive-open-drain, input-schmitt-enable,
38input-debounce, output-low, output-high.
39
40Example:
41
42#include <sama5d2-pinfunc.h>
43
44...
45{
46 pioA: pinctrl@fc038000 {
47 compatible = "atmel,sama5d2-pinctrl";
48 reg = <0xfc038000 0x600>;
49 interrupts = <18 IRQ_TYPE_LEVEL_HIGH 7>,
50 <68 IRQ_TYPE_LEVEL_HIGH 7>,
51 <69 IRQ_TYPE_LEVEL_HIGH 7>,
52 <70 IRQ_TYPE_LEVEL_HIGH 7>;
53 interrupt-controller;
54 #interrupt-cells = <2>;
55 gpio-controller;
56 #gpio-cells = <2>;
57 clocks = <&pioA_clk>;
58
59 pinctrl_i2c0_default: i2c0_default {
60 pinmux = <PIN_PD21__TWD0>,
61 <PIN_PD22__TWCK0>;
62 bias-disable;
63 };
64
65 pinctrl_led_gpio_default: led_gpio_default {
66 pinmux = <PIN_PB0>,
67 <PIN_PB5>;
68 bias-pull-up;
69 };
70
71 pinctrl_sdmmc1_default: sdmmc1_default {
72 cmd_data {
73 pinmux = <PIN_PA28__SDMMC1_CMD>,
74 <PIN_PA18__SDMMC1_DAT0>,
75 <PIN_PA19__SDMMC1_DAT1>,
76 <PIN_PA20__SDMMC1_DAT2>,
77 <PIN_PA21__SDMMC1_DAT3>;
78 bias-pull-up;
79 };
80
81 ck_cd {
82 pinmux = <PIN_PA22__SDMMC1_CK>,
83 <PIN_PA30__SDMMC1_CD>;
84 bias-disable;
85 };
86 };
87 ...
88 };
89};
90...
diff --git a/Documentation/devicetree/bindings/pinctrl/berlin,pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/berlin,pinctrl.txt
index a8bb5e26019c..f8fa28ce163e 100644
--- a/Documentation/devicetree/bindings/pinctrl/berlin,pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/berlin,pinctrl.txt
@@ -20,7 +20,10 @@ Required properties:
20 "marvell,berlin2cd-soc-pinctrl", 20 "marvell,berlin2cd-soc-pinctrl",
21 "marvell,berlin2cd-system-pinctrl", 21 "marvell,berlin2cd-system-pinctrl",
22 "marvell,berlin2q-soc-pinctrl", 22 "marvell,berlin2q-soc-pinctrl",
23 "marvell,berlin2q-system-pinctrl" 23 "marvell,berlin2q-system-pinctrl",
24 "marvell,berlin4ct-avio-pinctrl",
25 "marvell,berlin4ct-soc-pinctrl",
26 "marvell,berlin4ct-system-pinctrl"
24 27
25Required subnode-properties: 28Required subnode-properties:
26- groups: a list of strings describing the group names. 29- groups: a list of strings describing the group names.
diff --git a/Documentation/devicetree/bindings/pinctrl/brcm,cygnus-gpio.txt b/Documentation/devicetree/bindings/pinctrl/brcm,cygnus-gpio.txt
index 6540ca56be5e..16589fb6f420 100644
--- a/Documentation/devicetree/bindings/pinctrl/brcm,cygnus-gpio.txt
+++ b/Documentation/devicetree/bindings/pinctrl/brcm,cygnus-gpio.txt
@@ -3,8 +3,8 @@ Broadcom Cygnus GPIO/PINCONF Controller
3Required properties: 3Required properties:
4 4
5- compatible: 5- compatible:
6 Must be "brcm,cygnus-ccm-gpio", "brcm,cygnus-asiu-gpio", or 6 Must be "brcm,cygnus-ccm-gpio", "brcm,cygnus-asiu-gpio",
7 "brcm,cygnus-crmu-gpio" 7 "brcm,cygnus-crmu-gpio" or "brcm,iproc-gpio"
8 8
9- reg: 9- reg:
10 Define the base and range of the I/O address space that contains the Cygnus 10 Define the base and range of the I/O address space that contains the Cygnus
@@ -26,9 +26,13 @@ Optional properties:
26- interrupt-controller: 26- interrupt-controller:
27 Specifies that the node is an interrupt controller 27 Specifies that the node is an interrupt controller
28 28
29- pinmux: 29- gpio-ranges:
30 Specifies the phandle to the IOMUX device, where pins can be individually 30 Specifies the mapping between gpio controller and pin-controllers pins.
31muxed to GPIO 31 This requires 4 fields in cells defined as -
32 1. Phandle of pin-controller.
33 2. GPIO base pin offset.
34 3 Pin-control base pin offset.
35 4. number of gpio pins which are linearly mapped from pin base.
32 36
33Supported generic PINCONF properties in child nodes: 37Supported generic PINCONF properties in child nodes:
34 38
@@ -78,6 +82,8 @@ Example:
78 gpio-controller; 82 gpio-controller;
79 interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>; 83 interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
80 interrupt-controller; 84 interrupt-controller;
85 gpio-ranges = <&pinctrl 0 42 1>,
86 <&pinctrl 1 44 3>;
81 }; 87 };
82 88
83 /* 89 /*
diff --git a/Documentation/devicetree/bindings/pinctrl/fsl,imx7d-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/fsl,imx7d-pinctrl.txt
index 8bbf25d58656..457b2c68d47b 100644
--- a/Documentation/devicetree/bindings/pinctrl/fsl,imx7d-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/fsl,imx7d-pinctrl.txt
@@ -1,16 +1,42 @@
1* Freescale i.MX7 Dual IOMUX Controller 1* Freescale i.MX7 Dual IOMUX Controller
2 2
3iMX7D supports two iomuxc controllers, fsl,imx7d-iomuxc controller is similar
4as previous iMX SoC generation and fsl,imx7d-iomuxc-lpsr which provides low
5power state retention capabilities on gpios that are part of iomuxc-lpsr
6(GPIO1_IO7..GPIO1_IO0). While iomuxc-lpsr provides its own set of registers for
7mux and pad control settings, it shares the input select register from main
8iomuxc controller for daisy chain settings, the fsl,input-sel property extends
9fsl,imx-pinctrl driver to support iomuxc-lpsr controller.
10
11iomuxc_lpsr: iomuxc-lpsr@302c0000 {
12 compatible = "fsl,imx7d-iomuxc-lpsr";
13 reg = <0x302c0000 0x10000>;
14 fsl,input-sel = <&iomuxc>;
15};
16
17iomuxc: iomuxc@30330000 {
18 compatible = "fsl,imx7d-iomuxc";
19 reg = <0x30330000 0x10000>;
20};
21
22Pheriparials using pads from iomuxc-lpsr support low state retention power
23state, under LPSR mode GPIO's state of pads are retain.
24
3Please refer to fsl,imx-pinctrl.txt in this directory for common binding part 25Please refer to fsl,imx-pinctrl.txt in this directory for common binding part
4and usage. 26and usage.
5 27
6Required properties: 28Required properties:
7- compatible: "fsl,imx7d-iomuxc" 29- compatible: "fsl,imx7d-iomuxc" for main IOMUXC controller, or
30 "fsl,imx7d-iomuxc-lpsr" for Low Power State Retention IOMUXC controller.
8- fsl,pins: each entry consists of 6 integers and represents the mux and config 31- fsl,pins: each entry consists of 6 integers and represents the mux and config
9 setting for one pin. The first 5 integers <mux_reg conf_reg input_reg mux_val 32 setting for one pin. The first 5 integers <mux_reg conf_reg input_reg mux_val
10 input_val> are specified using a PIN_FUNC_ID macro, which can be found in 33 input_val> are specified using a PIN_FUNC_ID macro, which can be found in
11 imx7d-pinfunc.h under device tree source folder. The last integer CONFIG is 34 imx7d-pinfunc.h under device tree source folder. The last integer CONFIG is
12 the pad setting value like pull-up on this pin. Please refer to i.MX7 Dual 35 the pad setting value like pull-up on this pin. Please refer to i.MX7 Dual
13 Reference Manual for detailed CONFIG settings. 36 Reference Manual for detailed CONFIG settings.
37- fsl,input-sel: required property for iomuxc-lpsr controller, this property is
38 a phandle for main iomuxc controller which shares the input select register for
39 daisy chain settings.
14 40
15CONFIG bits definition: 41CONFIG bits definition:
16PAD_CTL_PUS_100K_DOWN (0 << 5) 42PAD_CTL_PUS_100K_DOWN (0 << 5)
@@ -25,3 +51,38 @@ PAD_CTL_DSE_X1 (0 << 0)
25PAD_CTL_DSE_X2 (1 << 0) 51PAD_CTL_DSE_X2 (1 << 0)
26PAD_CTL_DSE_X3 (2 << 0) 52PAD_CTL_DSE_X3 (2 << 0)
27PAD_CTL_DSE_X4 (3 << 0) 53PAD_CTL_DSE_X4 (3 << 0)
54
55Examples:
56While iomuxc-lpsr is intended to be used by dedicated peripherals to take
57advantages of LPSR power mode, is also possible that an IP to use pads from
58any of the iomux controllers. For example the I2C1 IP can use SCL pad from
59iomuxc-lpsr controller and SDA pad from iomuxc controller as:
60
61i2c1: i2c@30a20000 {
62 pinctrl-names = "default";
63 pinctrl-0 = <&pinctrl_i2c1_1 &pinctrl_i2c1_2>;
64 status = "okay";
65};
66
67iomuxc-lpsr@302c0000 {
68 compatible = "fsl,imx7d-iomuxc-lpsr";
69 reg = <0x302c0000 0x10000>;
70 fsl,input-sel = <&iomuxc>;
71
72 pinctrl_i2c1_1: i2c1grp-1 {
73 fsl,pins = <
74 MX7D_PAD_GPIO1_IO04__I2C1_SCL 0x4000007f
75 >;
76 };
77};
78
79iomuxc@30330000 {
80 compatible = "fsl,imx7d-iomuxc";
81 reg = <0x30330000 0x10000>;
82
83 pinctrl_i2c1_2: i2c1grp-2 {
84 fsl,pins = <
85 MX7D_PAD_I2C1_SDA__I2C1_SDA 0x4000007f
86 >;
87 };
88};
diff --git a/Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt
index 9496934528bd..ffadb7a371f6 100644
--- a/Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt
@@ -19,6 +19,7 @@ Required Properties:
19 - "renesas,pfc-r8a7791": for R8A7791 (R-Car M2-W) compatible pin-controller. 19 - "renesas,pfc-r8a7791": for R8A7791 (R-Car M2-W) compatible pin-controller.
20 - "renesas,pfc-r8a7793": for R8A7793 (R-Car M2-N) compatible pin-controller. 20 - "renesas,pfc-r8a7793": for R8A7793 (R-Car M2-N) compatible pin-controller.
21 - "renesas,pfc-r8a7794": for R8A7794 (R-Car E2) compatible pin-controller. 21 - "renesas,pfc-r8a7794": for R8A7794 (R-Car E2) compatible pin-controller.
22 - "renesas,pfc-r8a7795": for R8A7795 (R-Car H3) compatible pin-controller.
22 - "renesas,pfc-sh73a0": for SH73A0 (SH-Mobile AG5) compatible pin-controller. 23 - "renesas,pfc-sh73a0": for SH73A0 (SH-Mobile AG5) compatible pin-controller.
23 24
24 - reg: Base address and length of each memory resource used by the pin 25 - reg: Base address and length of each memory resource used by the pin
diff --git a/Documentation/devicetree/bindings/power/bq24257.txt b/Documentation/devicetree/bindings/power/bq24257.txt
index 5c9d3940d07c..d693702c9c1e 100644
--- a/Documentation/devicetree/bindings/power/bq24257.txt
+++ b/Documentation/devicetree/bindings/power/bq24257.txt
@@ -1,21 +1,64 @@
1Binding for TI bq24257 Li-Ion Charger 1Binding for TI bq24250/bq24251/bq24257 Li-Ion Charger
2 2
3Required properties: 3Required properties:
4- compatible: Should contain one of the following: 4- compatible: Should contain one of the following:
5 * "ti,bq24250"
6 * "ti,bq24251"
5 * "ti,bq24257" 7 * "ti,bq24257"
6- reg: integer, i2c address of the device. 8- reg: integer, i2c address of the device.
9- interrupt-parent: Should be the phandle for the interrupt controller. Use in
10 conjunction with "interrupts".
11- interrupts: Interrupt mapping for GPIO IRQ (configure for both edges). Use in
12 conjunction with "interrupt-parent".
7- ti,battery-regulation-voltage: integer, maximum charging voltage in uV. 13- ti,battery-regulation-voltage: integer, maximum charging voltage in uV.
8- ti,charge-current: integer, maximum charging current in uA. 14- ti,charge-current: integer, maximum charging current in uA.
9- ti,termination-current: integer, charge will be terminated when current in 15- ti,termination-current: integer, charge will be terminated when current in
10 constant-voltage phase drops below this value (in uA). 16 constant-voltage phase drops below this value (in uA).
17
18Optional properties:
19- pg-gpios: GPIO used for connecting the bq2425x device PG (Power Good) pin.
20 This pin is not available on all devices however it should be used if
21 possible as this is the recommended way to obtain the charger's input PG
22 state. If this pin is not specified a software-based approach for PG
23 detection is used.
24- ti,current-limit: The maximum current to be drawn from the charger's input
25 (in uA). If this property is not specified, the input limit current is
26 set automatically using USB D+/D- signal based charger type detection.
27 If the hardware does not support the D+/D- based detection, a default
28 of 500,000 is used (=500mA) instead.
29- ti,ovp-voltage: Configures the over voltage protection voltage (in uV). If
30 not specified a default of 6,5000,000 (=6.5V) is used.
31- ti,in-dpm-voltage: Configures the threshold input voltage for the dynamic
32 power path management (in uV). If not specified a default of 4,360,000
33 (=4.36V) is used.
11 34
12Example: 35Example:
13 36
14bq24257 { 37bq24257 {
15 compatible = "ti,bq24257"; 38 compatible = "ti,bq24257";
16 reg = <0x6a>; 39 reg = <0x6a>;
40 interrupt-parent = <&gpio1>;
41 interrupts = <16 IRQ_TYPE_EDGE_BOTH>;
42
43 pg-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
17 44
18 ti,battery-regulation-voltage = <4200000>; 45 ti,battery-regulation-voltage = <4200000>;
19 ti,charge-current = <1000000>; 46 ti,charge-current = <1000000>;
20 ti,termination-current = <50000>; 47 ti,termination-current = <50000>;
21}; 48};
49
50Example:
51
52bq24250 {
53 compatible = "ti,bq24250";
54 reg = <0x6a>;
55 interrupt-parent = <&gpio1>;
56 interrupts = <16 IRQ_TYPE_EDGE_BOTH>;
57
58 ti,battery-regulation-voltage = <4200000>;
59 ti,charge-current = <500000>;
60 ti,termination-current = <50000>;
61 ti,current-limit = <900000>;
62 ti,ovp-voltage = <9500000>;
63 ti,in-dpm-voltage = <4440000>;
64};
diff --git a/Documentation/devicetree/bindings/power/da9150-fg.txt b/Documentation/devicetree/bindings/power/da9150-fg.txt
new file mode 100644
index 000000000000..00236fe3ea31
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/da9150-fg.txt
@@ -0,0 +1,23 @@
1Dialog Semiconductor DA9150 Fuel-Gauge Power Supply bindings
2
3Required properties:
4- compatible: "dlg,da9150-fuel-gauge" for DA9150 Fuel-Gauge Power Supply
5
6Optional properties:
7- dlg,update-interval: Interval time (milliseconds) between battery level checks.
8- dlg,warn-soc-level: Battery discharge level (%) where warning event raised.
9 [1 - 100]
10- dlg,crit-soc-level: Battery discharge level (%) where critical event raised.
11 This value should be lower than the warning level.
12 [1 - 100]
13
14
15Example:
16
17 fuel-gauge {
18 compatible = "dlg,da9150-fuel-gauge";
19
20 dlg,update-interval = <10000>;
21 dlg,warn-soc-level = /bits/ 8 <15>;
22 dlg,crit-soc-level = /bits/ 8 <5>;
23 };
diff --git a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt b/Documentation/devicetree/bindings/power/pd-samsung.txt
index e151057d92f0..4e947372a693 100644
--- a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
+++ b/Documentation/devicetree/bindings/power/pd-samsung.txt
@@ -43,9 +43,8 @@ Example:
43 mfc_pd: power-domain@10044060 { 43 mfc_pd: power-domain@10044060 {
44 compatible = "samsung,exynos4210-pd"; 44 compatible = "samsung,exynos4210-pd";
45 reg = <0x10044060 0x20>; 45 reg = <0x10044060 0x20>;
46 clocks = <&clock CLK_FIN_PLL>, <&clock CLK_MOUT_SW_ACLK333>, 46 clocks = <&clock CLK_FIN_PLL>, <&clock CLK_MOUT_USER_ACLK333>;
47 <&clock CLK_MOUT_USER_ACLK333>; 47 clock-names = "oscclk", "clk0";
48 clock-names = "oscclk", "pclk0", "clk0";
49 #power-domain-cells = <0>; 48 #power-domain-cells = <0>;
50 }; 49 };
51 50
diff --git a/Documentation/devicetree/bindings/power/wakeup-source.txt b/Documentation/devicetree/bindings/power/wakeup-source.txt
new file mode 100644
index 000000000000..963c6dfd484d
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/wakeup-source.txt
@@ -0,0 +1,71 @@
1Specifying wakeup capability for devices
2============================================
3
4Any device nodes
5----------------
6Nodes that describe devices which has wakeup capability must contain an
7"wakeup-source" boolean property.
8
9Also, if device is marked as a wakeup source, then all the primary
10interrupt(s) can be used as wakeup interrupt(s).
11
12However if the devices have dedicated interrupt as the wakeup source
13then they need to specify/identify the same using device specific
14interrupt name. In such cases only that interrupt can be used as wakeup
15interrupt.
16
17List of legacy properties and respective binding document
18---------------------------------------------------------
19
201. "enable-sdio-wakeup" Documentation/devicetree/bindings/mmc/mmc.txt
212. "gpio-key,wakeup" Documentation/devicetree/bindings/input/gpio-keys{,-polled}.txt
223. "has-tpo" Documentation/devicetree/bindings/rtc/rtc-opal.txt
234. "isil,irq2-can-wakeup-machine" Documentation/devicetree/bindings/rtc/isil,isl12057.txt
245. "linux,wakeup" Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt
25 Documentation/devicetree/bindings/mfd/tc3589x.txt
26 Documentation/devicetree/bindings/input/ads7846.txt
276. "linux,keypad-wakeup" Documentation/devicetree/bindings/input/qcom,pm8xxx-keypad.txt
287. "linux,input-wakeup" Documentation/devicetree/bindings/input/samsung-keypad.txt
298. "nvidia,wakeup-source" Documentation/devicetree/bindings/input/nvidia,tegra20-kbc.txt
30
31Examples
32--------
33
341. With "wakeup" interrupt name
35
36 device@10000 {
37 compatible = "vendor,device-id";
38 reg = <0x10000 0x1000>;
39 interrupts = <0 19 4>, <0 21 4>, <0 22 4>;
40 interrupt-names = "ack", "err", "wakeup";
41 wakeup-source;
42 };
43
442. Without "wakeup" interrupt name
45
46 embedded-controller {
47 compatible = "google,cros-ec-i2c";
48 reg = <0x1e>;
49 interrupts = <6 0>;
50 interrupt-parent = <&gpx1>;
51 pinctrl-names = "default";
52 pinctrl-0 = <&ec_irq>;
53 wakeup-source;
54 };
55
563. Without interrupts
57
58 gpio_keys {
59 compatible = "gpio-keys";
60 #address-cells = <1>;
61 #size-cells = <0>;
62
63 button@1 {
64 debounce_interval = <50>;
65 wakeup-source;
66 linux,code = <116>;
67 label = "POWER";
68 gpios = <&iofpga_gpio0 0 0x4>;
69 };
70 [....]
71 };
diff --git a/Documentation/devicetree/bindings/power_supply/axp20x_usb_power.txt b/Documentation/devicetree/bindings/power_supply/axp20x_usb_power.txt
new file mode 100644
index 000000000000..862f4a49dc49
--- /dev/null
+++ b/Documentation/devicetree/bindings/power_supply/axp20x_usb_power.txt
@@ -0,0 +1,34 @@
1AXP20x USB power supply
2
3Required Properties:
4-compatible: "x-powers,axp202-usb-power-supply"
5
6This node is a subnode of the axp20x PMIC.
7
8Example:
9
10axp209: pmic@34 {
11 compatible = "x-powers,axp209";
12 reg = <0x34>;
13 interrupt-parent = <&nmi_intc>;
14 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
15 interrupt-controller;
16 #interrupt-cells = <1>;
17
18 regulators {
19 x-powers,dcdc-freq = <1500>;
20
21 vdd_cpu: dcdc2 {
22 regulator-always-on;
23 regulator-min-microvolt = <1000000>;
24 regulator-max-microvolt = <1450000>;
25 regulator-name = "vdd-cpu";
26 };
27
28 ...
29 };
30
31 usb-power-supply: usb-power-supply {
32 compatible = "x-powers,axp202-usb-power-supply";
33 };
34};
diff --git a/Documentation/devicetree/bindings/power_supply/qcom_smbb.txt b/Documentation/devicetree/bindings/power_supply/qcom_smbb.txt
new file mode 100644
index 000000000000..65b88fac854b
--- /dev/null
+++ b/Documentation/devicetree/bindings/power_supply/qcom_smbb.txt
@@ -0,0 +1,131 @@
1Qualcomm Switch-Mode Battery Charger and Boost
2
3PROPERTIES
4- compatible:
5 Usage: required
6 Value type: <stringlist>
7 Description: Must be one of:
8 - "qcom,pm8941-charger"
9
10- reg:
11 Usage: required
12 Value type: <prop-encoded-array>
13 Description: Base address of registers for SMBB block
14
15- interrupts:
16 Usage: required
17 Value type: <prop-encoded-array>
18 Description: The format of the specifier is defined by the binding document
19 describing the node's interrupt parent. Must contain one
20 specifier for each of the following interrupts, in order:
21 - charge done
22 - charge fast mode
23 - charge trickle mode
24 - battery temperature ok
25 - battery present
26 - charger disconnected
27 - USB-in valid
28 - DC-in valid
29
30- interrupt-names:
31 Usage: required
32 Value type: <stringlist>
33 Description: Must contain the following list, strictly ordered:
34 "chg-done",
35 "chg-fast",
36 "chg-trkl",
37 "bat-temp-ok",
38 "bat-present",
39 "chg-gone",
40 "usb-valid",
41 "dc-valid"
42
43- qcom,fast-charge-current-limit:
44 Usage: optional (default: 1A, or pre-configured value)
45 Value type: <u32>; uA; range [100mA : 3A]
46 Description: Maximum charge current; May be clamped to safety limits.
47
48- qcom,fast-charge-low-threshold-voltage:
49 Usage: optional (default: 3.2V, or pre-configured value)
50 Value type: <u32>; uV; range [2.1V : 3.6V]
51 Description: Battery voltage limit above which fast charging may operate;
52 Below this value linear or switch-mode auto-trickle-charging
53 will operate.
54
55- qcom,fast-charge-high-threshold-voltage:
56 Usage: optional (default: 4.2V, or pre-configured value)
57 Value type: <u32>; uV; range [3.24V : 5V]
58 Description: Battery voltage limit below which fast charging may operate;
59 The fast charger will attempt to charge the battery to this
60 voltage. May be clamped to safety limits.
61
62- qcom,fast-charge-safe-voltage:
63 Usage: optional (default: 4.2V, or pre-configured value)
64 Value type: <u32>; uV; range [3.24V : 5V]
65 Description: Maximum safe battery voltage; May be pre-set by bootloader, in
66 which case, setting this will harmlessly fail. The property
67 'fast-charge-high-watermark' will be clamped by this value.
68
69- qcom,fast-charge-safe-current:
70 Usage: optional (default: 1A, or pre-configured value)
71 Value type: <u32>; uA; range [100mA : 3A]
72 Description: Maximum safe battery charge current; May pre-set by bootloader,
73 in which case, setting this will harmlessly fail. The property
74 'qcom,fast-charge-current-limit' will be clamped by this value.
75
76- qcom,auto-recharge-threshold-voltage:
77 Usage: optional (default: 4.1V, or pre-configured value)
78 Value type: <u32>; uV; range [3.24V : 5V]
79 Description: Battery voltage limit below which auto-recharge functionality
80 will restart charging after end-of-charge; The high cutoff
81 limit for auto-recharge is 5% above this value.
82
83- qcom,minimum-input-voltage:
84 Usage: optional (default: 4.3V, or pre-configured value)
85 Value type: <u32>; uV; range [4.2V : 9.6V]
86 Description: Input voltage level above which charging may operate
87
88- qcom,dc-current-limit:
89 Usage: optional (default: 100mA, or pre-configured value)
90 Value type: <u32>; uA; range [100mA : 2.5A]
91 Description: Default DC charge current limit
92
93- qcom,disable-dc:
94 Usage: optional (default: false)
95 Value type: boolean: <u32> or <empty>
96 Description: Disable DC charger
97
98- qcom,jeita-extended-temp-range:
99 Usage: optional (default: false)
100 Value type: boolean: <u32> or <empty>
101 Description: Enable JEITA extended temperature range; This does *not*
102 adjust the maximum charge voltage or current in the extended
103 temperature range. It only allows charging when the battery
104 is in the extended temperature range. Voltage/current
105 regulation must be done externally to fully comply with
106 the JEITA safety guidelines if this flag is set.
107
108EXAMPLE
109charger@1000 {
110 compatible = "qcom,pm8941-charger";
111 reg = <0x1000 0x700>;
112 interrupts = <0x0 0x10 7 IRQ_TYPE_EDGE_BOTH>,
113 <0x0 0x10 5 IRQ_TYPE_EDGE_BOTH>,
114 <0x0 0x10 4 IRQ_TYPE_EDGE_BOTH>,
115 <0x0 0x12 1 IRQ_TYPE_EDGE_BOTH>,
116 <0x0 0x12 0 IRQ_TYPE_EDGE_BOTH>,
117 <0x0 0x13 2 IRQ_TYPE_EDGE_BOTH>,
118 <0x0 0x13 1 IRQ_TYPE_EDGE_BOTH>,
119 <0x0 0x14 1 IRQ_TYPE_EDGE_BOTH>;
120 interrupt-names = "chg-done",
121 "chg-fast",
122 "chg-trkl",
123 "bat-temp-ok",
124 "bat-present",
125 "chg-gone",
126 "usb-valid",
127 "dc-valid";
128
129 qcom,fast-charge-current-limit = <1000000>;
130 qcom,dc-charge-current-limit = <1000000>;
131};
diff --git a/Documentation/devicetree/bindings/power_supply/tps65217_charger.txt b/Documentation/devicetree/bindings/power_supply/tps65217_charger.txt
new file mode 100644
index 000000000000..98d131acee95
--- /dev/null
+++ b/Documentation/devicetree/bindings/power_supply/tps65217_charger.txt
@@ -0,0 +1,12 @@
1TPS65217 Charger
2
3Required Properties:
4-compatible: "ti,tps65217-charger"
5
6This node is a subnode of the tps65217 PMIC.
7
8Example:
9
10 tps65217-charger {
11 compatible = "ti,tps65090-charger";
12 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/mpc512x_lpbfifo.txt b/Documentation/devicetree/bindings/powerpc/fsl/mpc512x_lpbfifo.txt
new file mode 100644
index 000000000000..b3b392fe1f61
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/mpc512x_lpbfifo.txt
@@ -0,0 +1,21 @@
1Freescale MPC512x LocalPlus Bus FIFO (called SCLPC in the Reference Manual)
2
3Required properties:
4- compatible: should be "fsl,mpc512x-lpbfifo";
5- reg: should contain the offset and length of SCLPC register set;
6- interrupts: should contain the interrupt specifier for SCLPC; syntax of an
7 interrupt client node is described in interrupt-controller/interrupts.txt;
8- dmas: should contain the DMA specifier for SCLPC as described at
9 dma/dma.txt and dma/mpc512x-dma.txt;
10- dma-names: should be "rx-tx";
11
12Example:
13
14 sclpc@10100 {
15 compatible = "fsl,mpc512x-lpbfifo";
16 reg = <0x10100 0x50>;
17 interrupts = <7 0x8>;
18 dmas = <&dma0 26>;
19 dma-names = "rx-tx";
20 };
21
diff --git a/Documentation/devicetree/bindings/regulator/act8865-regulator.txt b/Documentation/devicetree/bindings/regulator/act8865-regulator.txt
index e91485d11241..6067d9830d07 100644
--- a/Documentation/devicetree/bindings/regulator/act8865-regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/act8865-regulator.txt
@@ -8,6 +8,8 @@ Required properties:
8Optional properties: 8Optional properties:
9- system-power-controller: Telling whether or not this pmic is controlling 9- system-power-controller: Telling whether or not this pmic is controlling
10 the system power. See Documentation/devicetree/bindings/power/power-controller.txt . 10 the system power. See Documentation/devicetree/bindings/power/power-controller.txt .
11- active-semi,vsel-high: Indicates the VSEL pin is high.
12 If this property is missing, assume the VSEL pin is low(0).
11 13
12Optional input supply properties: 14Optional input supply properties:
13- for act8600: 15- for act8600:
@@ -49,6 +51,7 @@ Example:
49 pmic: act8865@5b { 51 pmic: act8865@5b {
50 compatible = "active-semi,act8865"; 52 compatible = "active-semi,act8865";
51 reg = <0x5b>; 53 reg = <0x5b>;
54 active-semi,vsel-high;
52 status = "disabled"; 55 status = "disabled";
53 56
54 regulators { 57 regulators {
diff --git a/Documentation/devicetree/bindings/regulator/anatop-regulator.txt b/Documentation/devicetree/bindings/regulator/anatop-regulator.txt
index 758eae24082a..37c4ea076f88 100644
--- a/Documentation/devicetree/bindings/regulator/anatop-regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/anatop-regulator.txt
@@ -13,6 +13,7 @@ Optional properties:
13- anatop-delay-reg-offset: Anatop MFD step time register offset 13- anatop-delay-reg-offset: Anatop MFD step time register offset
14- anatop-delay-bit-shift: Bit shift for the step time register 14- anatop-delay-bit-shift: Bit shift for the step time register
15- anatop-delay-bit-width: Number of bits used in the step time register 15- anatop-delay-bit-width: Number of bits used in the step time register
16- vin-supply: The supply for this regulator
16 17
17Any property defined as part of the core regulator 18Any property defined as part of the core regulator
18binding, defined in regulator.txt, can also be used. 19binding, defined in regulator.txt, can also be used.
diff --git a/Documentation/devicetree/bindings/regulator/arizona-regulator.txt b/Documentation/devicetree/bindings/regulator/arizona-regulator.txt
new file mode 100644
index 000000000000..443564d7784f
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/arizona-regulator.txt
@@ -0,0 +1,17 @@
1Cirrus Logic Arizona class audio SoCs
2
3These devices are audio SoCs with extensive digital capabilities and a range
4of analogue I/O.
5
6This document lists regulator specific bindings, see the primary binding
7document:
8 ../mfd/arizona.txt
9
10Optional properties:
11 - wlf,ldoena : GPIO specifier for the GPIO controlling LDOENA
12
13Optional subnodes:
14 - ldo1 : Initial data for the LDO1 regulator, as covered in
15 Documentation/devicetree/bindings/regulator/regulator.txt
16 - micvdd : Initial data for the MICVDD regulator, as covered in
17 Documentation/devicetree/bindings/regulator/regulator.txt
diff --git a/Documentation/devicetree/bindings/regulator/max77802.txt b/Documentation/devicetree/bindings/regulator/max77802.txt
index 79e5476444f7..09d796ed48be 100644
--- a/Documentation/devicetree/bindings/regulator/max77802.txt
+++ b/Documentation/devicetree/bindings/regulator/max77802.txt
@@ -8,7 +8,28 @@ regulators that can be controlled over I2C.
8 8
9Following properties should be present in main device node of the MFD chip. 9Following properties should be present in main device node of the MFD chip.
10 10
11Optional node: 11Optional properties:
12- inb1-supply: The input supply for BUCK1
13- inb2-supply: The input supply for BUCK2
14- inb3-supply: The input supply for BUCK3
15- inb4-supply: The input supply for BUCK4
16- inb5-supply: The input supply for BUCK5
17- inb6-supply: The input supply for BUCK6
18- inb7-supply: The input supply for BUCK7
19- inb8-supply: The input supply for BUCK8
20- inb9-supply: The input supply for BUCK9
21- inb10-supply: The input supply for BUCK10
22- inl1-supply: The input supply for LDO8 and LDO15
23- inl2-supply: The input supply for LDO17, LDO27, LDO30 and LDO35
24- inl3-supply: The input supply for LDO3, LDO5, LDO6 and LDO7
25- inl4-supply: The input supply for LDO10, LDO11, LDO13 and LDO14
26- inl5-supply: The input supply for LDO9 and LDO19
27- inl6-supply: The input supply for LDO4, LDO21, LDO24 and LDO33
28- inl7-supply: The input supply for LDO18, LDO20, LDO28 and LDO29
29- inl9-supply: The input supply for LDO12, LDO23, LDO25, LDO26, LDO32 and LDO34
30- inl10-supply: The input supply for LDO1 and LDO2
31
32Optional nodes:
12- regulators : The regulators of max77802 have to be instantiated 33- regulators : The regulators of max77802 have to be instantiated
13 under subnode named "regulators" using the following format. 34 under subnode named "regulators" using the following format.
14 35
@@ -58,6 +79,8 @@ Example:
58 #address-cells = <1>; 79 #address-cells = <1>;
59 #size-cells = <0>; 80 #size-cells = <0>;
60 81
82 inb1-supply = <&parent_reg>;
83
61 regulators { 84 regulators {
62 ldo1_reg: LDO1 { 85 ldo1_reg: LDO1 {
63 regulator-name = "vdd_1v0"; 86 regulator-name = "vdd_1v0";
diff --git a/Documentation/devicetree/bindings/regulator/pbias-regulator.txt b/Documentation/devicetree/bindings/regulator/pbias-regulator.txt
index 32aa26f1e434..acbcb452a69a 100644
--- a/Documentation/devicetree/bindings/regulator/pbias-regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/pbias-regulator.txt
@@ -2,7 +2,12 @@ PBIAS internal regulator for SD card dual voltage i/o pads on OMAP SoCs.
2 2
3Required properties: 3Required properties:
4- compatible: 4- compatible:
5 - "ti,pbias-omap" for OMAP2, OMAP3, OMAP4, OMAP5, DRA7. 5 - should be "ti,pbias-dra7" for DRA7
6 - should be "ti,pbias-omap2" for OMAP2
7 - should be "ti,pbias-omap3" for OMAP3
8 - should be "ti,pbias-omap4" for OMAP4
9 - should be "ti,pbias-omap5" for OMAP5
10 - "ti,pbias-omap" is deprecated
6- reg: pbias register offset from syscon base and size of pbias register. 11- reg: pbias register offset from syscon base and size of pbias register.
7- syscon : phandle of the system control module 12- syscon : phandle of the system control module
8- regulator-name : should be 13- regulator-name : should be
diff --git a/Documentation/devicetree/bindings/regulator/regulator.txt b/Documentation/devicetree/bindings/regulator/regulator.txt
index 24bd422cecd5..1d112fc456aa 100644
--- a/Documentation/devicetree/bindings/regulator/regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/regulator.txt
@@ -11,6 +11,7 @@ Optional properties:
11- regulator-always-on: boolean, regulator should never be disabled 11- regulator-always-on: boolean, regulator should never be disabled
12- regulator-boot-on: bootloader/firmware enabled regulator 12- regulator-boot-on: bootloader/firmware enabled regulator
13- regulator-allow-bypass: allow the regulator to go into bypass mode 13- regulator-allow-bypass: allow the regulator to go into bypass mode
14- regulator-allow-set-load: allow the regulator performance level to be configured
14- <name>-supply: phandle to the parent supply/regulator node 15- <name>-supply: phandle to the parent supply/regulator node
15- regulator-ramp-delay: ramp delay for regulator(in uV/uS) 16- regulator-ramp-delay: ramp delay for regulator(in uV/uS)
16 For hardware which supports disabling ramp rate, it should be explicitly 17 For hardware which supports disabling ramp rate, it should be explicitly
diff --git a/Documentation/devicetree/bindings/regulator/tps65023.txt b/Documentation/devicetree/bindings/regulator/tps65023.txt
new file mode 100644
index 000000000000..a4714e4da370
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/tps65023.txt
@@ -0,0 +1,60 @@
1TPS65023 family of regulators
2
3Required properties:
4- compatible: Must be one of the following.
5 "ti,tps65020",
6 "ti,tps65021",
7 "ti,tps65023",
8- reg: I2C slave address
9- regulators: list of regulators provided by this controller, must be named
10 after their hardware counterparts: VDCDC[1-3] and LDO[1-2]
11- regulators: This is the list of child nodes that specify the regulator
12 initialization data for defined regulators. The definition for each of
13 these nodes is defined using the standard binding for regulators found at
14 Documentation/devicetree/bindings/regulator/regulator.txt.
15
16Each regulator is defined using the standard binding for regulators.
17
18Example:
19
20 tps65023@48 {
21 compatible = "ti,tps65023";
22 reg = <0x48>;
23
24 regulators {
25 VDCDC1 {
26 regulator-name = "vdd_mpu";
27 regulator-always-on;
28 regulator-min-microvolt = <1200000>;
29 regulator-max-microvolt = <1200000>;
30 };
31
32 VDCDC2 {
33 regulator-name = "vdd_core";
34 regulator-always-on;
35 regulator-min-microvolt = <3300000>;
36 regulator-max-microvolt = <3300000>;
37 };
38
39 VDCDC3 {
40 regulator-name = "vdd_io";
41 regulator-always-on;
42 regulator-min-microvolt = <1800000>;
43 regulator-max-microvolt = <1800000>;
44 };
45
46 LDO1 {
47 regulator-name = "vdd_usb18";
48 regulator-always-on;
49 regulator-min-microvolt = <1800000>;
50 regulator-max-microvolt = <1800000>;
51 };
52
53 LDO2 {
54 regulator-name = "vdd_usb33";
55 regulator-always-on;
56 regulator-min-microvolt = <3300000>;
57 regulator-max-microvolt = <3300000>;
58 };
59 };
60 };
diff --git a/Documentation/devicetree/bindings/hwrng/atmel-trng.txt b/Documentation/devicetree/bindings/rng/atmel-trng.txt
index 4ac5aaa2d024..4ac5aaa2d024 100644
--- a/Documentation/devicetree/bindings/hwrng/atmel-trng.txt
+++ b/Documentation/devicetree/bindings/rng/atmel-trng.txt
diff --git a/Documentation/devicetree/bindings/hwrng/brcm,iproc-rng200.txt b/Documentation/devicetree/bindings/rng/brcm,iproc-rng200.txt
index e25a456664b9..e25a456664b9 100644
--- a/Documentation/devicetree/bindings/hwrng/brcm,iproc-rng200.txt
+++ b/Documentation/devicetree/bindings/rng/brcm,iproc-rng200.txt
diff --git a/Documentation/devicetree/bindings/hwrng/omap_rng.txt b/Documentation/devicetree/bindings/rng/omap_rng.txt
index 6a62acd86953..6a62acd86953 100644
--- a/Documentation/devicetree/bindings/hwrng/omap_rng.txt
+++ b/Documentation/devicetree/bindings/rng/omap_rng.txt
diff --git a/Documentation/devicetree/bindings/rng/samsung,exynos-rng4.txt b/Documentation/devicetree/bindings/rng/samsung,exynos-rng4.txt
new file mode 100644
index 000000000000..4ca8dd4d7e66
--- /dev/null
+++ b/Documentation/devicetree/bindings/rng/samsung,exynos-rng4.txt
@@ -0,0 +1,17 @@
1Exynos Pseudo Random Number Generator
2
3Required properties:
4
5- compatible : Should be "samsung,exynos4-rng".
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 : "secss" as a clock name.
9
10Example:
11
12 rng@10830400 {
13 compatible = "samsung,exynos4-rng";
14 reg = <0x10830400 0x200>;
15 clocks = <&clock CLK_SSS>;
16 clock-names = "secss";
17 };
diff --git a/Documentation/devicetree/bindings/rng/st,rng.txt b/Documentation/devicetree/bindings/rng/st,rng.txt
new file mode 100644
index 000000000000..35734bc282e9
--- /dev/null
+++ b/Documentation/devicetree/bindings/rng/st,rng.txt
@@ -0,0 +1,15 @@
1STMicroelectronics HW Random Number Generator
2----------------------------------------------
3
4Required parameters:
5compatible : Should be "st,rng"
6reg : Base address and size of IP's register map.
7clocks : Phandle to device's clock (See: ../clocks/clock-bindings.txt)
8
9Example:
10
11rng@fee80000 {
12 compatible = "st,rng";
13 reg = <0xfee80000 0x1000>;
14 clocks = <&clk_sysin>;
15}
diff --git a/Documentation/devicetree/bindings/rng/st,stm32-rng.txt b/Documentation/devicetree/bindings/rng/st,stm32-rng.txt
new file mode 100644
index 000000000000..47f04176f93b
--- /dev/null
+++ b/Documentation/devicetree/bindings/rng/st,stm32-rng.txt
@@ -0,0 +1,21 @@
1STMicroelectronics STM32 HW RNG
2===============================
3
4The STM32 hardware random number generator is a simple fixed purpose IP and
5is fully separated from other crypto functions.
6
7Required properties:
8
9- compatible : Should be "st,stm32-rng"
10- reg : Should be register base and length as documented in the datasheet
11- interrupts : The designated IRQ line for the RNG
12- clocks : The clock needed to enable the RNG
13
14Example:
15
16 rng: rng@50060800 {
17 compatible = "st,stm32-rng";
18 reg = <0x50060800 0x400>;
19 interrupts = <80>;
20 clocks = <&rcc 0 38>;
21 };
diff --git a/Documentation/devicetree/bindings/hwrng/timeriomem_rng.txt b/Documentation/devicetree/bindings/rng/timeriomem_rng.txt
index 6616d15866a3..6616d15866a3 100644
--- a/Documentation/devicetree/bindings/hwrng/timeriomem_rng.txt
+++ b/Documentation/devicetree/bindings/rng/timeriomem_rng.txt
diff --git a/Documentation/devicetree/bindings/rtc/dallas,ds1390.txt b/Documentation/devicetree/bindings/rtc/dallas,ds1390.txt
new file mode 100644
index 000000000000..8e76f2648796
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/dallas,ds1390.txt
@@ -0,0 +1,18 @@
1* Dallas DS1390 SPI Serial Real-Time Clock
2
3Required properties:
4- compatible: Should contain "dallas,ds1390".
5- reg: SPI address for chip
6
7Optional properties:
8- trickle-resistor-ohms : Selected resistor for trickle charger
9 Values usable for ds1390 are 250, 2000, 4000
10 Should be given if trickle charger should be enabled
11- trickle-diode-disable : Do not use internal trickle charger diode
12 Should be given if internal trickle charger diode should be disabled
13Example:
14 ds1390: rtc@68 {
15 compatible = "dallas,ds1390";
16 trickle-resistor-ohms = <250>;
17 reg = <0>;
18 };
diff --git a/Documentation/devicetree/bindings/rtc/isil,isl12057.txt b/Documentation/devicetree/bindings/rtc/isil,isl12057.txt
index 501c39ceae79..cf83e0940302 100644
--- a/Documentation/devicetree/bindings/rtc/isil,isl12057.txt
+++ b/Documentation/devicetree/bindings/rtc/isil,isl12057.txt
@@ -5,7 +5,7 @@ consisting of a compatible field, an address and possibly an interrupt
5line). 5line).
6 6
7Nonetheless, it also supports an option boolean property 7Nonetheless, it also supports an option boolean property
8("isil,irq2-can-wakeup-machine") to handle the specific use-case found 8("wakeup-source") to handle the specific use-case found
9on at least three in-tree users of the chip (NETGEAR ReadyNAS 102, 104 9on at least three in-tree users of the chip (NETGEAR ReadyNAS 102, 104
10and 2120 ARM-based NAS); On those devices, the IRQ#2 pin of the chip 10and 2120 ARM-based NAS); On those devices, the IRQ#2 pin of the chip
11(associated with the alarm supported by the driver) is not connected 11(associated with the alarm supported by the driver) is not connected
@@ -22,9 +22,9 @@ Required properties supported by the device:
22 22
23Optional properties: 23Optional properties:
24 24
25 - "isil,irq2-can-wakeup-machine": mark the chip as a wakeup source, 25 - "wakeup-source": mark the chip as a wakeup source, independently of
26 independently of the availability of an IRQ line connected to the 26 the availability of an IRQ line connected to the SoC.
27 SoC. 27 (Legacy property supported: "isil,irq2-can-wakeup-machine")
28 28
29 - "interrupt-parent", "interrupts": for passing the interrupt line 29 - "interrupt-parent", "interrupts": for passing the interrupt line
30 of the SoC connected to IRQ#2 of the RTC chip. 30 of the SoC connected to IRQ#2 of the RTC chip.
@@ -74,5 +74,5 @@ PMIC, allowing the device to be started based on configured alarm:
74 isl12057: isl12057@68 { 74 isl12057: isl12057@68 {
75 compatible = "isil,isl12057"; 75 compatible = "isil,isl12057";
76 reg = <0x68>; 76 reg = <0x68>;
77 isil,irq2-can-wakeup-machine; 77 wakeup-source;
78 }; 78 };
diff --git a/Documentation/devicetree/bindings/rtc/pcf8563.txt b/Documentation/devicetree/bindings/rtc/pcf8563.txt
new file mode 100644
index 000000000000..72f6d2c9665e
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/pcf8563.txt
@@ -0,0 +1,25 @@
1* Philips PCF8563/Epson RTC8564 Real Time Clock
2
3Philips PCF8563/Epson RTC8564 Real Time Clock
4
5Required properties:
6see: Documentation/devicetree/bindings/i2c/trivial-devices.txt
7
8Optional property:
9- #clock-cells: Should be 0.
10- clock-output-names:
11 overwrite the default clock name "pcf8563-clkout"
12
13Example:
14
15pcf8563: pcf8563@51 {
16 compatible = "nxp,pcf8563";
17 reg = <0x51>;
18 #clock-cells = <0>;
19};
20
21device {
22...
23 clocks = <&pcf8563>;
24...
25};
diff --git a/Documentation/devicetree/bindings/rtc/rtc-opal.txt b/Documentation/devicetree/bindings/rtc/rtc-opal.txt
index af87e5ecac54..a1734e5cb75b 100644
--- a/Documentation/devicetree/bindings/rtc/rtc-opal.txt
+++ b/Documentation/devicetree/bindings/rtc/rtc-opal.txt
@@ -5,12 +5,13 @@ Required properties:
5- comapatible: Should be "ibm,opal-rtc" 5- comapatible: Should be "ibm,opal-rtc"
6 6
7Optional properties: 7Optional properties:
8- has-tpo: Decides if the wakeup is supported or not. 8- wakeup-source: Decides if the wakeup is supported or not
9 (Legacy property supported: "has-tpo")
9 10
10Example: 11Example:
11 rtc { 12 rtc {
12 compatible = "ibm,opal-rtc"; 13 compatible = "ibm,opal-rtc";
13 has-tpo; 14 wakeup-source;
14 phandle = <0x10000029>; 15 phandle = <0x10000029>;
15 linux,phandle = <0x10000029>; 16 linux,phandle = <0x10000029>;
16 }; 17 };
diff --git a/Documentation/devicetree/bindings/serial/ingenic,uart.txt b/Documentation/devicetree/bindings/serial/ingenic,uart.txt
index c2d3b3abe7d9..02cb7fe59cb7 100644
--- a/Documentation/devicetree/bindings/serial/ingenic,uart.txt
+++ b/Documentation/devicetree/bindings/serial/ingenic,uart.txt
@@ -1,7 +1,8 @@
1* Ingenic SoC UART 1* Ingenic SoC UART
2 2
3Required properties: 3Required properties:
4- compatible : "ingenic,jz4740-uart" or "ingenic,jz4780-uart" 4- compatible : "ingenic,jz4740-uart", "ingenic,jz4760-uart",
5 "ingenic,jz4775-uart" or "ingenic,jz4780-uart"
5- reg : offset and length of the register set for the device. 6- reg : offset and length of the register set for the device.
6- interrupts : should contain uart interrupt. 7- interrupts : should contain uart interrupt.
7- clocks : phandles to the module & baud clocks. 8- clocks : phandles to the module & baud clocks.
diff --git a/Documentation/devicetree/bindings/serial/mrvl,pxa-ssp.txt b/Documentation/devicetree/bindings/serial/mrvl,pxa-ssp.txt
index 669b8140dd79..d10cc06c0c37 100644
--- a/Documentation/devicetree/bindings/serial/mrvl,pxa-ssp.txt
+++ b/Documentation/devicetree/bindings/serial/mrvl,pxa-ssp.txt
@@ -10,7 +10,6 @@ Required properties:
10 mvrl,pxa168-ssp 10 mvrl,pxa168-ssp
11 mrvl,pxa910-ssp 11 mrvl,pxa910-ssp
12 mrvl,ce4100-ssp 12 mrvl,ce4100-ssp
13 mrvl,lpss-ssp
14 13
15 - reg: The memory base 14 - reg: The memory base
16 - dmas: Two dma phandles, one for rx, one for tx 15 - dmas: Two dma phandles, one for rx, one for tx
diff --git a/Documentation/devicetree/bindings/serial/pl011.txt b/Documentation/devicetree/bindings/serial/pl011.txt
index cbae3d9a0278..77863aefe9ef 100644
--- a/Documentation/devicetree/bindings/serial/pl011.txt
+++ b/Documentation/devicetree/bindings/serial/pl011.txt
@@ -19,7 +19,7 @@ Optional properties:
19 must correspond to the PCLK clocking the internal logic 19 must correspond to the PCLK clocking the internal logic
20 of the block. Just listing one clock (the first one) is 20 of the block. Just listing one clock (the first one) is
21 deprecated. 21 deprecated.
22- clocks-names: 22- clock-names:
23 When present, the first clock listed must be named 23 When present, the first clock listed must be named
24 "uartclk" and the second clock listed must be named 24 "uartclk" and the second clock listed must be named
25 "apb_pclk" 25 "apb_pclk"
diff --git a/Documentation/devicetree/bindings/serial/qcom,msm-uartdm.txt b/Documentation/devicetree/bindings/serial/qcom,msm-uartdm.txt
index a2114c217376..182777fac9a2 100644
--- a/Documentation/devicetree/bindings/serial/qcom,msm-uartdm.txt
+++ b/Documentation/devicetree/bindings/serial/qcom,msm-uartdm.txt
@@ -26,6 +26,12 @@ Required properties:
26Optional properties: 26Optional properties:
27- dmas: Should contain dma specifiers for transmit and receive channels 27- dmas: Should contain dma specifiers for transmit and receive channels
28- dma-names: Should contain "tx" for transmit and "rx" for receive channels 28- dma-names: Should contain "tx" for transmit and "rx" for receive channels
29- qcom,tx-crci: Identificator <u32> for Client Rate Control Interface to be
30 used with TX DMA channel. Required when using DMA for transmission
31 with UARTDM v1.3 and bellow.
32- qcom,rx-crci: Identificator <u32> for Client Rate Control Interface to be
33 used with RX DMA channel. Required when using DMA for reception
34 with UARTDM v1.3 and bellow.
29 35
30Note: Aliases may be defined to ensure the correct ordering of the UARTs. 36Note: Aliases may be defined to ensure the correct ordering of the UARTs.
31The alias serialN will result in the UART being assigned port N. If any 37The alias serialN will result in the UART being assigned port N. If any
diff --git a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
index e84b13a8eda3..73f825e5e644 100644
--- a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
+++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
@@ -23,6 +23,8 @@ Required properties:
23 - "renesas,scifa-r8a7794" for R8A7794 (R-Car E2) SCIFA compatible UART. 23 - "renesas,scifa-r8a7794" for R8A7794 (R-Car E2) SCIFA compatible UART.
24 - "renesas,scifb-r8a7794" for R8A7794 (R-Car E2) SCIFB compatible UART. 24 - "renesas,scifb-r8a7794" for R8A7794 (R-Car E2) SCIFB compatible UART.
25 - "renesas,hscif-r8a7794" for R8A7794 (R-Car E2) HSCIF compatible UART. 25 - "renesas,hscif-r8a7794" for R8A7794 (R-Car E2) HSCIF compatible UART.
26 - "renesas,scif-r8a7795" for R8A7795 (R-Car H3) SCIF compatible UART.
27 - "renesas,hscif-r8a7795" for R8A7795 (R-Car H3) HSCIF compatible UART.
26 - "renesas,scifa-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFA compatible UART. 28 - "renesas,scifa-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFA compatible UART.
27 - "renesas,scifb-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFB compatible UART. 29 - "renesas,scifb-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFB compatible UART.
28 - "renesas,scif" for generic SCIF compatible UART. 30 - "renesas,scif" for generic SCIF compatible UART.
diff --git a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.txt b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.txt
index 289c40ed7470..12bbe9f22560 100644
--- a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.txt
+++ b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.txt
@@ -15,6 +15,9 @@ The supplying peripheral clock can also be handled, needing a second property
15 Required elements: "baudclk", "apb_pclk" 15 Required elements: "baudclk", "apb_pclk"
16 16
17Optional properties: 17Optional properties:
18- snps,uart-16550-compatible : reflects the value of UART_16550_COMPATIBLE
19 configuration parameter. Define this if your UART does not implement the busy
20 functionality.
18- resets : phandle to the parent reset controller. 21- resets : phandle to the parent reset controller.
19- reg-shift : quantity to shift the register offsets by. If this property is 22- reg-shift : quantity to shift the register offsets by. If this property is
20 not present then the register offsets are not shifted. 23 not present then the register offsets are not shifted.
diff --git a/Documentation/devicetree/bindings/soc/mediatek/scpsys.txt b/Documentation/devicetree/bindings/soc/mediatek/scpsys.txt
index c0511142b39c..a6c8afc8385a 100644
--- a/Documentation/devicetree/bindings/soc/mediatek/scpsys.txt
+++ b/Documentation/devicetree/bindings/soc/mediatek/scpsys.txt
@@ -17,9 +17,9 @@ Required properties:
17- reg: Address range of the SCPSYS unit 17- reg: Address range of the SCPSYS unit
18- infracfg: must contain a phandle to the infracfg controller 18- infracfg: must contain a phandle to the infracfg controller
19- clock, clock-names: clocks according to the common clock binding. 19- clock, clock-names: clocks according to the common clock binding.
20 The clocks needed "mm" and "mfg". These are the 20 The clocks needed "mm", "mfg", "venc" and "venc_lt".
21 clocks which hardware needs to be enabled before 21 These are the clocks which hardware needs to be enabled
22 enabling certain power domains. 22 before enabling certain power domains.
23 23
24Example: 24Example:
25 25
@@ -30,7 +30,9 @@ Example:
30 infracfg = <&infracfg>; 30 infracfg = <&infracfg>;
31 clocks = <&clk26m>, 31 clocks = <&clk26m>,
32 <&topckgen CLK_TOP_MM_SEL>; 32 <&topckgen CLK_TOP_MM_SEL>;
33 clock-names = "mfg", "mm"; 33 <&topckgen CLK_TOP_VENC_SEL>,
34 <&topckgen CLK_TOP_VENC_LT_SEL>;
35 clock-names = "mfg", "mm", "venc", "venc_lt";
34 }; 36 };
35 37
36Example consumer: 38Example consumer:
diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,smem.txt b/Documentation/devicetree/bindings/soc/qcom/qcom,smem.txt
new file mode 100644
index 000000000000..9326cdf6e1b1
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom,smem.txt
@@ -0,0 +1,57 @@
1Qualcomm Shared Memory Manager binding
2
3This binding describes the Qualcomm Shared Memory Manager, used to share data
4between various subsystems and OSes in Qualcomm platforms.
5
6- compatible:
7 Usage: required
8 Value type: <stringlist>
9 Definition: must be:
10 "qcom,smem"
11
12- memory-region:
13 Usage: required
14 Value type: <prop-encoded-array>
15 Definition: handle to memory reservation for main SMEM memory region.
16
17- qcom,rpm-msg-ram:
18 Usage: required
19 Value type: <prop-encoded-array>
20 Definition: handle to RPM message memory resource
21
22- hwlocks:
23 Usage: required
24 Value type: <prop-encoded-array>
25 Definition: reference to a hwspinlock used to protect allocations from
26 the shared memory
27
28= EXAMPLE
29The following example shows the SMEM setup for MSM8974, with a main SMEM region
30at 0xfa00000 and the RPM message ram at 0xfc428000:
31
32 reserved-memory {
33 #address-cells = <1>;
34 #size-cells = <1>;
35 ranges;
36
37 smem_region: smem@fa00000 {
38 reg = <0xfa00000 0x200000>;
39 no-map;
40 };
41 };
42
43 smem@fa00000 {
44 compatible = "qcom,smem";
45
46 memory-region = <&smem_region>;
47 qcom,rpm-msg-ram = <&rpm_msg_ram>;
48
49 hwlocks = <&tcsr_mutex 3>;
50 };
51
52 soc {
53 rpm_msg_ram: memory@fc428000 {
54 compatible = "qcom,rpm-msg-ram";
55 reg = <0xfc428000 0x4000>;
56 };
57 };
diff --git a/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt b/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
new file mode 100644
index 000000000000..112756e11802
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
@@ -0,0 +1,46 @@
1* Rockchip Power Domains
2
3Rockchip processors include support for multiple power domains which can be
4powered up/down by software based on different application scenes to save power.
5
6Required properties for power domain controller:
7- compatible: Should be one of the following.
8 "rockchip,rk3288-power-controller" - for RK3288 SoCs.
9- #power-domain-cells: Number of cells in a power-domain specifier.
10 Should be 1 for multiple PM domains.
11- #address-cells: Should be 1.
12- #size-cells: Should be 0.
13
14Required properties for power domain sub nodes:
15- reg: index of the power domain, should use macros in:
16 "include/dt-bindings/power/rk3288-power.h" - for RK3288 type power domain.
17- clocks (optional): phandles to clocks which need to be enabled while power domain
18 switches state.
19
20Example:
21
22 power: power-controller {
23 compatible = "rockchip,rk3288-power-controller";
24 #power-domain-cells = <1>;
25 #address-cells = <1>;
26 #size-cells = <0>;
27
28 pd_gpu {
29 reg = <RK3288_PD_GPU>;
30 clocks = <&cru ACLK_GPU>;
31 };
32 };
33
34Node of a device using power domains must have a power-domains property,
35containing a phandle to the power device node and an index specifying which
36power domain to use.
37The index should use macros in:
38 "include/dt-bindings/power/rk3288-power.h" - for rk3288 type power domain.
39
40Example of the node using power domain:
41
42 node {
43 /* ... */
44 power-domains = <&power RK3288_PD_GPU>;
45 /* ... */
46 };
diff --git a/Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt b/Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt
index d8e8cdb733f9..d1ce21a4904d 100644
--- a/Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt
+++ b/Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt
@@ -221,7 +221,6 @@ qmss: qmss@2a40000 {
221 #size-cells = <1>; 221 #size-cells = <1>;
222 ranges; 222 ranges;
223 pdsp0@0x2a10000 { 223 pdsp0@0x2a10000 {
224 firmware = "keystone/qmss_pdsp_acc48_k2_le_1_0_0_8.fw";
225 reg = <0x2a10000 0x1000>, 224 reg = <0x2a10000 0x1000>,
226 <0x2a0f000 0x100>, 225 <0x2a0f000 0x100>,
227 <0x2a0c000 0x3c8>, 226 <0x2a0c000 0x3c8>,
diff --git a/Documentation/devicetree/bindings/sound/ak4613.txt b/Documentation/devicetree/bindings/sound/ak4613.txt
new file mode 100644
index 000000000000..15a919522b42
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/ak4613.txt
@@ -0,0 +1,17 @@
1AK4613 I2C transmitter
2
3This device supports I2C mode only.
4
5Required properties:
6
7- compatible : "asahi-kasei,ak4613"
8- reg : The chip select number on the I2C bus
9
10Example:
11
12&i2c {
13 ak4613: ak4613@0x10 {
14 compatible = "asahi-kasei,ak4613";
15 reg = <0x10>;
16 };
17};
diff --git a/Documentation/devicetree/bindings/sound/ak4642.txt b/Documentation/devicetree/bindings/sound/ak4642.txt
index 623d4e70ae11..340784db6808 100644
--- a/Documentation/devicetree/bindings/sound/ak4642.txt
+++ b/Documentation/devicetree/bindings/sound/ak4642.txt
@@ -7,7 +7,14 @@ Required properties:
7 - compatible : "asahi-kasei,ak4642" or "asahi-kasei,ak4643" or "asahi-kasei,ak4648" 7 - compatible : "asahi-kasei,ak4642" or "asahi-kasei,ak4643" or "asahi-kasei,ak4648"
8 - reg : The chip select number on the I2C bus 8 - reg : The chip select number on the I2C bus
9 9
10Example: 10Optional properties:
11
12 - #clock-cells : common clock binding; shall be set to 0
13 - clocks : common clock binding; MCKI clock
14 - clock-frequency : common clock binding; frequency of MCKO
15 - clock-output-names : common clock binding; MCKO clock name
16
17Example 1:
11 18
12&i2c { 19&i2c {
13 ak4648: ak4648@0x12 { 20 ak4648: ak4648@0x12 {
@@ -15,3 +22,16 @@ Example:
15 reg = <0x12>; 22 reg = <0x12>;
16 }; 23 };
17}; 24};
25
26Example 2:
27
28&i2c {
29 ak4643: codec@12 {
30 compatible = "asahi-kasei,ak4643";
31 reg = <0x12>;
32 #clock-cells = <0>;
33 clocks = <&audio_clock>;
34 clock-frequency = <12288000>;
35 clock-output-names = "ak4643_mcko";
36 };
37};
diff --git a/Documentation/devicetree/bindings/sound/atmel-classd.txt b/Documentation/devicetree/bindings/sound/atmel-classd.txt
new file mode 100644
index 000000000000..0018451c4351
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/atmel-classd.txt
@@ -0,0 +1,52 @@
1* Atmel ClassD driver under ALSA SoC architecture
2
3Required properties:
4- compatible
5 Should be "atmel,sama5d2-classd".
6- reg
7 Should contain ClassD registers location and length.
8- interrupts
9 Should contain the IRQ line for the ClassD.
10- dmas
11 One DMA specifiers as described in atmel-dma.txt and dma.txt files.
12- dma-names
13 Must be "tx".
14- clock-names
15 Tuple listing input clock names.
16 Required elements: "pclk", "gclk" and "aclk".
17- clocks
18 Please refer to clock-bindings.txt.
19
20Optional properties:
21- pinctrl-names, pinctrl-0
22 Please refer to pinctrl-bindings.txt.
23- atmel,model
24 The user-visible name of this sound complex.
25 The default value is "CLASSD".
26- atmel,pwm-type
27 PWM modulation type, "single" or "diff".
28 The default value is "single".
29- atmel,non-overlap-time
30 Set non-overlapping time, the unit is nanosecond(ns).
31 There are four values,
32 <5>, <10>, <15>, <20>, the default value is <10>.
33 Non-overlapping will be disabled if not specified.
34
35Example:
36classd: classd@fc048000 {
37 compatible = "atmel,sama5d2-classd";
38 reg = <0xfc048000 0x100>;
39 interrupts = <59 IRQ_TYPE_LEVEL_HIGH 7>;
40 dmas = <&dma0
41 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
42 | AT91_XDMAC_DT_PERID(47))>;
43 dma-names = "tx";
44 clocks = <&classd_clk>, <&classd_gclk>, <&audio_pll_pmc>;
45 clock-names = "pclk", "gclk", "aclk";
46
47 pinctrl-names = "default";
48 pinctrl-0 = <&pinctrl_classd_default>;
49 atmel,model = "classd @ SAMA5D2-Xplained";
50 atmel,pwm-type = "diff";
51 atmel,non-overlap-time = <10>;
52};
diff --git a/Documentation/devicetree/bindings/sound/da7213.txt b/Documentation/devicetree/bindings/sound/da7213.txt
new file mode 100644
index 000000000000..58902802d56c
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/da7213.txt
@@ -0,0 +1,41 @@
1Dialog Semiconductor DA7213 Audio Codec bindings
2
3======
4
5Required properties:
6- compatible : Should be "dlg,da7213"
7- reg: Specifies the I2C slave address
8
9Optional properties:
10- clocks : phandle and clock specifier for codec MCLK.
11- clock-names : Clock name string for 'clocks' attribute, should be "mclk".
12
13- dlg,micbias1-lvl : Voltage (mV) for Mic Bias 1
14 [<1600>, <2200>, <2500>, <3000>]
15- dlg,micbias2-lvl : Voltage (mV) for Mic Bias 2
16 [<1600>, <2200>, <2500>, <3000>]
17- dlg,dmic-data-sel : DMIC channel select based on clock edge.
18 ["lrise_rfall", "lfall_rrise"]
19- dlg,dmic-samplephase : When to sample audio from DMIC.
20 ["on_clkedge", "between_clkedge"]
21- dlg,dmic-clkrate : DMIC clock frequency (Hz).
22 [<1500000>, <3000000>]
23
24======
25
26Example:
27
28 codec_i2c: da7213@1a {
29 compatible = "dlg,da7213";
30 reg = <0x1a>;
31
32 clocks = <&clks 201>;
33 clock-names = "mclk";
34
35 dlg,micbias1-lvl = <2500>;
36 dlg,micbias2-lvl = <2500>;
37
38 dlg,dmic-data-sel = "lrise_rfall";
39 dlg,dmic-samplephase = "between_clkedge";
40 dlg,dmic-clkrate = <3000000>;
41 };
diff --git a/Documentation/devicetree/bindings/sound/da7219.txt b/Documentation/devicetree/bindings/sound/da7219.txt
new file mode 100644
index 000000000000..1b7030911a3b
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/da7219.txt
@@ -0,0 +1,106 @@
1Dialog Semiconductor DA7219 Audio Codec bindings
2
3DA7219 is an audio codec with advanced accessory detect features.
4
5======
6
7Required properties:
8- compatible : Should be "dlg,da7219"
9- reg: Specifies the I2C slave address
10
11- interrupt-parent : Specifies the phandle of the interrupt controller to which
12 the IRQs from DA7219 are delivered to.
13- interrupts : IRQ line info for DA7219.
14 (See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt for
15 further information relating to interrupt properties)
16
17- VDD-supply: VDD power supply for the device
18- VDDMIC-supply: VDDMIC power supply for the device
19- VDDIO-supply: VDDIO power supply for the device
20 (See Documentation/devicetree/bindings/regulator/regulator.txt for further
21 information relating to regulators)
22
23Optional properties:
24- interrupt-names : Name associated with interrupt line. Should be "wakeup" if
25 interrupt is to be used to wake system, otherwise "irq" should be used.
26- wakeup-source: Flag to indicate this device can wake system (suspend/resume).
27
28- clocks : phandle and clock specifier for codec MCLK.
29- clock-names : Clock name string for 'clocks' attribute, should be "mclk".
30
31- dlg,ldo-lvl : Required internal LDO voltage (mV) level for digital engine
32 [<1050>, <1100>, <1200>, <1400>]
33- dlg,micbias-lvl : Voltage (mV) for Mic Bias
34 [<1800>, <2000>, <2200>, <2400>, <2600>]
35- dlg,mic-amp-in-sel : Mic input source type
36 ["diff", "se_p", "se_n"]
37
38======
39
40Child node - 'da7219_aad':
41
42Optional properties:
43- dlg,micbias-pulse-lvl : Mic bias higher voltage pulse level (mV).
44 [<2800>, <2900>]
45- dlg,micbias-pulse-time : Mic bias higher voltage pulse duration (ms)
46- dlg,btn-cfg : Periodic button press measurements for 4-pole jack (ms)
47 [<2>, <5>, <10>, <50>, <100>, <200>, <500>]
48- dlg,mic-det-thr : Impedance threshold for mic detection measurement (Ohms)
49 [<200>, <500>, <750>, <1000>]
50- dlg,jack-ins-deb : Debounce time for jack insertion (ms)
51 [<5>, <10>, <20>, <50>, <100>, <200>, <500>, <1000>]
52- dlg,jack-det-rate: Jack type detection latency (3/4 pole)
53 ["32ms_64ms", "64ms_128ms", "128ms_256ms", "256ms_512ms"]
54- dlg,jack-rem-deb : Debounce time for jack removal (ms)
55 [<1>, <5>, <10>, <20>]
56- dlg,a-d-btn-thr : Impedance threshold between buttons A and D
57 [0x0 - 0xFF]
58- dlg,d-b-btn-thr : Impedance threshold between buttons D and B
59 [0x0 - 0xFF]
60- dlg,b-c-btn-thr : Impedance threshold between buttons B and C
61 [0x0 - 0xFF]
62- dlg,c-mic-btn-thr : Impedance threshold between button C and Mic
63 [0x0 - 0xFF]
64- dlg,btn-avg : Number of 8-bit readings for averaged button measurement
65 [<1>, <2>, <4>, <8>]
66- dlg,adc-1bit-rpt : Repeat count for 1-bit button measurement
67 [<1>, <2>, <4>, <8>]
68
69======
70
71Example:
72
73 codec: da7219@1a {
74 compatible = "dlg,da7219";
75 reg = <0x1a>;
76
77 interrupt-parent = <&gpio6>;
78 interrupts = <11 IRQ_TYPE_LEVEL_HIGH>;
79
80 VDD-supply = <&reg_audio>;
81 VDDMIC-supply = <&reg_audio>;
82 VDDIO-supply = <&reg_audio>;
83
84 clocks = <&clks 201>;
85 clock-names = "mclk";
86
87 dlg,ldo-lvl = <1200>;
88 dlg,micbias-lvl = <2600>;
89 dlg,mic-amp-in-sel = "diff";
90
91 da7219_aad {
92 dlg,btn-cfg = <50>;
93 dlg,mic-det-thr = <500>;
94 dlg,jack-ins-deb = <20>;
95 dlg,jack-det-rate = "32ms_64ms";
96 dlg,jack-rem-deb = <1>;
97
98 dlg,a-d-btn-thr = <0xa>;
99 dlg,d-b-btn-thr = <0x16>;
100 dlg,b-c-btn-thr = <0x21>;
101 dlg,c-mic-btn-thr = <0x3E>;
102
103 dlg,btn-avg = <4>;
104 dlg,adc-1bit-rpt = <1>;
105 };
106 };
diff --git a/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt b/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
index a96774c194c8..ce55c0a6f757 100644
--- a/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
+++ b/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
@@ -13,13 +13,15 @@ So having this generic sound card allows all Freescale SoC users to benefit
13from the simplification of a new card support and the capability of the wide 13from the simplification of a new card support and the capability of the wide
14sample rates support through ASRC. 14sample rates support through ASRC.
15 15
16Note: The card is initially designed for those sound cards who use I2S and 16Note: The card is initially designed for those sound cards who use AC'97, I2S
17 PCM DAI formats. However, it'll be also possible to support those non 17 and PCM DAI formats. However, it'll be also possible to support those non
18 I2S/PCM type sound cards, such as S/PDIF audio and HDMI audio, as long 18 AC'97/I2S/PCM type sound cards, such as S/PDIF audio and HDMI audio, as
19 as the driver has been properly upgraded. 19 long as the driver has been properly upgraded.
20 20
21 21
22The compatible list for this generic sound card currently: 22The compatible list for this generic sound card currently:
23 "fsl,imx-audio-ac97"
24
23 "fsl,imx-audio-cs42888" 25 "fsl,imx-audio-cs42888"
24 26
25 "fsl,imx-audio-wm8962" 27 "fsl,imx-audio-wm8962"
diff --git a/Documentation/devicetree/bindings/sound/nau8825.txt b/Documentation/devicetree/bindings/sound/nau8825.txt
new file mode 100644
index 000000000000..d3374231c871
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/nau8825.txt
@@ -0,0 +1,102 @@
1Nuvoton NAU8825 audio codec
2
3This device supports I2C only.
4
5Required properties:
6 - compatible : Must be "nuvoton,nau8825"
7
8 - reg : the I2C address of the device. This is either 0x1a (CSB=0) or 0x1b (CSB=1).
9
10Optional properties:
11 - nuvoton,jkdet-enable: Enable jack detection via JKDET pin.
12 - nuvoton,jkdet-pull-enable: Enable JKDET pin pull. If set - pin pull enabled,
13 otherwise pin in high impedance state.
14 - nuvoton,jkdet-pull-up: Pull-up JKDET pin. If set then JKDET pin is pull up, otherwise pull down.
15 - nuvoton,jkdet-polarity: JKDET pin polarity. 0 - active high, 1 - active low.
16
17 - nuvoton,vref-impedance: VREF Impedance selection
18 0 - Open
19 1 - 25 kOhm
20 2 - 125 kOhm
21 3 - 2.5 kOhm
22
23 - nuvoton,micbias-voltage: Micbias voltage level.
24 0 - VDDA
25 1 - VDDA
26 2 - VDDA * 1.1
27 3 - VDDA * 1.2
28 4 - VDDA * 1.3
29 5 - VDDA * 1.4
30 6 - VDDA * 1.53
31 7 - VDDA * 1.53
32
33 - nuvoton,sar-threshold-num: Number of buttons supported
34 - nuvoton,sar-threshold: Impedance threshold for each button. Array that contains up to 8 buttons configuration. SAR value is calculated as
35 SAR = 255 * MICBIAS / SAR_VOLTAGE * R / (2000 + R)
36 where MICBIAS is configured by 'nuvoton,micbias-voltage', SAR_VOLTAGE is configured by 'nuvoton,sar-voltage', R - button impedance.
37 Refer datasheet section 10.2 for more information about threshold calculation.
38
39 - nuvoton,sar-hysteresis: Button impedance measurement hysteresis.
40
41 - nuvoton,sar-voltage: Reference voltage for button impedance measurement.
42 0 - VDDA
43 1 - VDDA
44 2 - VDDA * 1.1
45 3 - VDDA * 1.2
46 4 - VDDA * 1.3
47 5 - VDDA * 1.4
48 6 - VDDA * 1.53
49 7 - VDDA * 1.53
50
51 - nuvoton,sar-compare-time: SAR compare time
52 0 - 500 ns
53 1 - 1 us
54 2 - 2 us
55 3 - 4 us
56
57 - nuvoton,sar-sampling-time: SAR sampling time
58 0 - 2 us
59 1 - 4 us
60 2 - 8 us
61 3 - 16 us
62
63 - nuvoton,short-key-debounce: Button short key press debounce time.
64 0 - 30 ms
65 1 - 50 ms
66 2 - 100 ms
67 3 - 30 ms
68
69 - nuvoton,jack-insert-debounce: number from 0 to 7 that sets debounce time to 2^(n+2) ms
70 - nuvoton,jack-eject-debounce: number from 0 to 7 that sets debounce time to 2^(n+2) ms
71
72 - clocks: list of phandle and clock specifier pairs according to common clock bindings for the
73 clocks described in clock-names
74 - clock-names: should include "mclk" for the MCLK master clock
75
76Example:
77
78 headset: nau8825@1a {
79 compatible = "nuvoton,nau8825";
80 reg = <0x1a>;
81 interrupt-parent = <&gpio>;
82 interrupts = <TEGRA_GPIO(E, 6) IRQ_TYPE_LEVEL_LOW>;
83 nuvoton,jkdet-enable;
84 nuvoton,jkdet-pull-enable;
85 nuvoton,jkdet-pull-up;
86 nuvoton,jkdet-polarity = <GPIO_ACTIVE_LOW>;
87 nuvoton,vref-impedance = <2>;
88 nuvoton,micbias-voltage = <6>;
89 // Setup 4 buttons impedance according to Android specification
90 nuvoton,sar-threshold-num = <4>;
91 nuvoton,sar-threshold = <0xc 0x1e 0x38 0x60>;
92 nuvoton,sar-hysteresis = <1>;
93 nuvoton,sar-voltage = <0>;
94 nuvoton,sar-compare-time = <0>;
95 nuvoton,sar-sampling-time = <0>;
96 nuvoton,short-key-debounce = <2>;
97 nuvoton,jack-insert-debounce = <7>;
98 nuvoton,jack-eject-debounce = <7>;
99
100 clock-names = "mclk";
101 clocks = <&tegra_car TEGRA210_CLK_CLK_OUT_2>;
102 };
diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
index 1173395b5e5c..c57cbd65736c 100644
--- a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
+++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
@@ -4,10 +4,12 @@ Required properties:
4- compatible : "renesas,rcar_sound-<soctype>", fallbacks 4- compatible : "renesas,rcar_sound-<soctype>", fallbacks
5 "renesas,rcar_sound-gen1" if generation1, and 5 "renesas,rcar_sound-gen1" if generation1, and
6 "renesas,rcar_sound-gen2" if generation2 6 "renesas,rcar_sound-gen2" if generation2
7 "renesas,rcar_sound-gen3" if generation3
7 Examples with soctypes are: 8 Examples with soctypes are:
8 - "renesas,rcar_sound-r8a7778" (R-Car M1A) 9 - "renesas,rcar_sound-r8a7778" (R-Car M1A)
9 - "renesas,rcar_sound-r8a7790" (R-Car H2) 10 - "renesas,rcar_sound-r8a7790" (R-Car H2)
10 - "renesas,rcar_sound-r8a7791" (R-Car M2-W) 11 - "renesas,rcar_sound-r8a7791" (R-Car M2-W)
12 - "renesas,rcar_sound-r8a7795" (R-Car H3)
11- reg : Should contain the register physical address. 13- reg : Should contain the register physical address.
12 required register is 14 required register is
13 SRU/ADG/SSI if generation1 15 SRU/ADG/SSI if generation1
@@ -30,6 +32,11 @@ Required properties:
30- rcar_sound,dai : DAI contents. 32- rcar_sound,dai : DAI contents.
31 The number of DAI subnode should be same as HW. 33 The number of DAI subnode should be same as HW.
32 see below for detail. 34 see below for detail.
35- #sound-dai-cells : it must be 0 if your system is using single DAI
36 it must be 1 if your system is using multi DAI
37- #clock-cells : it must be 0 if your system has audio_clkout
38 it must be 1 if your system has audio_clkout0/1/2/3
39- clock-frequency : for all audio_clkout0/1/2/3
33 40
34SSI subnode properties: 41SSI subnode properties:
35- interrupts : Should contain SSI interrupt for PIO transfer 42- interrupts : Should contain SSI interrupt for PIO transfer
diff --git a/Documentation/devicetree/bindings/sound/rockchip-i2s.txt b/Documentation/devicetree/bindings/sound/rockchip-i2s.txt
index 9b82c20b306b..2267d249ca0e 100644
--- a/Documentation/devicetree/bindings/sound/rockchip-i2s.txt
+++ b/Documentation/devicetree/bindings/sound/rockchip-i2s.txt
@@ -12,8 +12,6 @@ Required properties:
12- reg: physical base address of the controller and length of memory mapped 12- reg: physical base address of the controller and length of memory mapped
13 region. 13 region.
14- interrupts: should contain the I2S interrupt. 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, 15- dmas: DMA specifiers for tx and rx dma. See the DMA client binding,
18 Documentation/devicetree/bindings/dma/dma.txt 16 Documentation/devicetree/bindings/dma/dma.txt
19- dma-names: should include "tx" and "rx". 17- dma-names: should include "tx" and "rx".
@@ -21,6 +19,7 @@ Required properties:
21- clock-names: should contain followings: 19- clock-names: should contain followings:
22 - "i2s_hclk": clock for I2S BUS 20 - "i2s_hclk": clock for I2S BUS
23 - "i2s_clk" : clock for I2S controller 21 - "i2s_clk" : clock for I2S controller
22- rockchip,capture-channels: max capture channels, if not set, 2 channels default.
24 23
25Example for rk3288 I2S controller: 24Example for rk3288 I2S controller:
26 25
@@ -28,10 +27,9 @@ i2s@ff890000 {
28 compatible = "rockchip,rk3288-i2s", "rockchip,rk3066-i2s"; 27 compatible = "rockchip,rk3288-i2s", "rockchip,rk3066-i2s";
29 reg = <0xff890000 0x10000>; 28 reg = <0xff890000 0x10000>;
30 interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>; 29 interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
31 #address-cells = <1>;
32 #size-cells = <0>;
33 dmas = <&pdma1 0>, <&pdma1 1>; 30 dmas = <&pdma1 0>, <&pdma1 1>;
34 dma-names = "tx", "rx"; 31 dma-names = "tx", "rx";
35 clock-names = "i2s_hclk", "i2s_clk"; 32 clock-names = "i2s_hclk", "i2s_clk";
36 clocks = <&cru HCLK_I2S0>, <&cru SCLK_I2S0>; 33 clocks = <&cru HCLK_I2S0>, <&cru SCLK_I2S0>;
34 rockchip,capture-channels = <2>;
37}; 35};
diff --git a/Documentation/devicetree/bindings/sound/rockchip-spdif.txt b/Documentation/devicetree/bindings/sound/rockchip-spdif.txt
new file mode 100644
index 000000000000..e64dbdea7db9
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/rockchip-spdif.txt
@@ -0,0 +1,40 @@
1* Rockchip SPDIF transceiver
2
3The S/PDIF audio block is a stereo transceiver that allows the
4processor to receive and transmit digital audio via an coaxial cable or
5a fibre cable.
6
7Required properties:
8
9- compatible: should be one of the following:
10 - "rockchip,rk3288-spdif", "rockchip,rk3188-spdif" or
11 "rockchip,rk3066-spdif"
12- reg: physical base address of the controller and length of memory mapped
13 region.
14- interrupts: should contain the SPDIF interrupt.
15- dmas: DMA specifiers for tx dma. See the DMA client binding,
16 Documentation/devicetree/bindings/dma/dma.txt
17- dma-names: should be "tx"
18- clocks: a list of phandle + clock-specifier pairs, one for each entry
19 in clock-names.
20- clock-names: should contain following:
21 - "hclk": clock for SPDIF controller
22 - "mclk" : clock for SPDIF bus
23
24Required properties on RK3288:
25 - rockchip,grf: the phandle of the syscon node for the general register
26 file (GRF)
27
28Example for the rk3188 SPDIF controller:
29
30spdif: spdif@0x1011e000 {
31 compatible = "rockchip,rk3188-spdif", "rockchip,rk3066-spdif";
32 reg = <0x1011e000 0x2000>;
33 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
34 dmas = <&dmac1_s 8>;
35 dma-names = "tx";
36 clock-names = "hclk", "mclk";
37 clocks = <&cru HCLK_SPDIF>, <&cru SCLK_SPDIF>;
38 status = "disabled";
39 #sound-dai-cells = <0>;
40};
diff --git a/Documentation/devicetree/bindings/sound/rt5640.txt b/Documentation/devicetree/bindings/sound/rt5640.txt
index bac4d9ac1edc..9e62f6eb348f 100644
--- a/Documentation/devicetree/bindings/sound/rt5640.txt
+++ b/Documentation/devicetree/bindings/sound/rt5640.txt
@@ -14,7 +14,8 @@ Optional properties:
14 14
15- realtek,in1-differential 15- realtek,in1-differential
16- realtek,in2-differential 16- realtek,in2-differential
17 Boolean. Indicate MIC1/2 input are differential, rather than single-ended. 17- realtek,in3-differential
18 Boolean. Indicate MIC1/2/3 input are differential, rather than single-ended.
18 19
19- realtek,ldo1-en-gpios : The GPIO that controls the CODEC's LDO1_EN pin. 20- realtek,ldo1-en-gpios : The GPIO that controls the CODEC's LDO1_EN pin.
20 21
@@ -24,9 +25,11 @@ Pins on the device (for linking into audio routes) for RT5639/RT5640:
24 * DMIC2 25 * DMIC2
25 * MICBIAS1 26 * MICBIAS1
26 * IN1P 27 * IN1P
27 * IN1R 28 * IN1N
28 * IN2P 29 * IN2P
29 * IN2R 30 * IN2N
31 * IN3P
32 * IN3N
30 * HPOL 33 * HPOL
31 * HPOR 34 * HPOR
32 * LOUTL 35 * LOUTL
diff --git a/Documentation/devicetree/bindings/sound/sun4i-codec.txt b/Documentation/devicetree/bindings/sound/sun4i-codec.txt
new file mode 100644
index 000000000000..c92966bd5488
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/sun4i-codec.txt
@@ -0,0 +1,27 @@
1* Allwinner A10 Codec
2
3Required properties:
4- compatible: must be either "allwinner,sun4i-a10-codec" or
5 "allwinner,sun7i-a20-codec"
6- reg: must contain the registers location and length
7- interrupts: must contain the codec interrupt
8- dmas: DMA channels for tx and rx dma. See the DMA client binding,
9 Documentation/devicetree/bindings/dma/dma.txt
10- dma-names: should include "tx" and "rx".
11- clocks: a list of phandle + clock-specifer pairs, one for each entry
12 in clock-names.
13- clock-names: should contain followings:
14 - "apb": the parent APB clock for this controller
15 - "codec": the parent module clock
16
17Example:
18codec: codec@01c22c00 {
19 #sound-dai-cells = <0>;
20 compatible = "allwinner,sun7i-a20-codec";
21 reg = <0x01c22c00 0x40>;
22 interrupts = <0 30 4>;
23 clocks = <&apb0_gates 0>, <&codec_clk>;
24 clock-names = "apb", "codec";
25 dmas = <&dma 0 19>, <&dma 0 19>;
26 dma-names = "rx", "tx";
27};
diff --git a/Documentation/devicetree/bindings/sound/tdm-slot.txt b/Documentation/devicetree/bindings/sound/tdm-slot.txt
index 6a2c84247f91..34cf70e2cbc4 100644
--- a/Documentation/devicetree/bindings/sound/tdm-slot.txt
+++ b/Documentation/devicetree/bindings/sound/tdm-slot.txt
@@ -4,11 +4,15 @@ This specifies audio DAI's TDM slot.
4 4
5TDM slot properties: 5TDM slot properties:
6dai-tdm-slot-num : Number of slots in use. 6dai-tdm-slot-num : Number of slots in use.
7dai-tdm-slot-width : Width in bits for each slot. 7dai-tdm-slot-width : Width in bits for each slot.
8dai-tdm-slot-tx-mask : Transmit direction slot mask, optional
9dai-tdm-slot-rx-mask : Receive direction slot mask, optional
8 10
9For instance: 11For instance:
10 dai-tdm-slot-num = <2>; 12 dai-tdm-slot-num = <2>;
11 dai-tdm-slot-width = <8>; 13 dai-tdm-slot-width = <8>;
14 dai-tdm-slot-tx-mask = <0 1>;
15 dai-tdm-slot-rx-mask = <1 0>;
12 16
13And for each spcified driver, there could be one .of_xlate_tdm_slot_mask() 17And for each spcified driver, there could be one .of_xlate_tdm_slot_mask()
14to specify a explicit mapping of the channels and the slots. If it's absent 18to specify a explicit mapping of the channels and the slots. If it's absent
@@ -18,3 +22,8 @@ tx and rx masks.
18For snd_soc_of_xlate_tdm_slot_mask(), the tx and rx masks will use a 1 bit 22For snd_soc_of_xlate_tdm_slot_mask(), the tx and rx masks will use a 1 bit
19for an active slot as default, and the default active bits are at the LSB of 23for an active slot as default, and the default active bits are at the LSB of
20the masks. 24the masks.
25
26The explicit masks are given as array of integers, where the first
27number presents bit-0 (LSB), second presents bit-1, etc. Any non zero
28number is considered 1 and 0 is 0. snd_soc_of_xlate_tdm_slot_mask()
29does not do anything, if either mask is set non zero value.
diff --git a/Documentation/devicetree/bindings/spi/brcm,bcm2835-aux-spi.txt b/Documentation/devicetree/bindings/spi/brcm,bcm2835-aux-spi.txt
new file mode 100644
index 000000000000..9887b0724759
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/brcm,bcm2835-aux-spi.txt
@@ -0,0 +1,38 @@
1Broadcom BCM2835 auxiliar SPI1/2 controller
2
3The BCM2835 contains two forms of SPI master controller, one known simply as
4SPI0, and the other known as the "Universal SPI Master"; part of the
5auxiliary block. This binding applies to the SPI1/2 controller.
6
7Required properties:
8- compatible: Should be "brcm,bcm2835-aux-spi".
9- reg: Should contain register location and length for the spi block
10- interrupts: Should contain shared interrupt of the aux block
11- clocks: The clock feeding the SPI controller - needs to
12 point to the auxiliar clock driver of the bcm2835,
13 as this clock will enable the output gate for the specific
14 clock.
15- cs-gpios: the cs-gpios (native cs is NOT supported)
16 see also spi-bus.txt
17
18Example:
19
20spi1@7e215080 {
21 compatible = "brcm,bcm2835-aux-spi";
22 reg = <0x7e215080 0x40>;
23 interrupts = <1 29>;
24 clocks = <&aux_clocks BCM2835_AUX_CLOCK_SPI1>;
25 #address-cells = <1>;
26 #size-cells = <0>;
27 cs-gpios = <&gpio 18>, <&gpio 17>, <&gpio 16>;
28};
29
30spi2@7e2150c0 {
31 compatible = "brcm,bcm2835-aux-spi";
32 reg = <0x7e2150c0 0x40>;
33 interrupts = <1 29>;
34 clocks = <&aux_clocks BCM2835_AUX_CLOCK_SPI2>;
35 #address-cells = <1>;
36 #size-cells = <0>;
37 cs-gpios = <&gpio 43>, <&gpio 44>, <&gpio 45>;
38};
diff --git a/Documentation/devicetree/bindings/spi/sh-msiof.txt b/Documentation/devicetree/bindings/spi/sh-msiof.txt
index 8f771441be60..705075da2f10 100644
--- a/Documentation/devicetree/bindings/spi/sh-msiof.txt
+++ b/Documentation/devicetree/bindings/spi/sh-msiof.txt
@@ -51,7 +51,7 @@ Optional properties, deprecated for soctype-specific bindings:
51- renesas,tx-fifo-size : Overrides the default tx fifo size given in words 51- renesas,tx-fifo-size : Overrides the default tx fifo size given in words
52 (default is 64) 52 (default is 64)
53- renesas,rx-fifo-size : Overrides the default rx fifo size given in words 53- renesas,rx-fifo-size : Overrides the default rx fifo size given in words
54 (default is 64, or 256 on R-Car Gen2) 54 (default is 64)
55 55
56Pinctrl properties might be needed, too. See 56Pinctrl properties might be needed, too. See
57Documentation/devicetree/bindings/pinctrl/renesas,*. 57Documentation/devicetree/bindings/pinctrl/renesas,*.
diff --git a/Documentation/devicetree/bindings/spi/spi-mt65xx.txt b/Documentation/devicetree/bindings/spi/spi-mt65xx.txt
index dcefc438272f..ce363c923f44 100644
--- a/Documentation/devicetree/bindings/spi/spi-mt65xx.txt
+++ b/Documentation/devicetree/bindings/spi/spi-mt65xx.txt
@@ -15,21 +15,25 @@ Required properties:
15- interrupts: Should contain spi interrupt 15- interrupts: Should contain spi interrupt
16 16
17- clocks: phandles to input clocks. 17- clocks: phandles to input clocks.
18 The first should be <&topckgen CLK_TOP_SPI_SEL>. 18 The first should be one of the following. It's PLL.
19 The second should be one of the following.
20 - <&clk26m>: specify parent clock 26MHZ. 19 - <&clk26m>: specify parent clock 26MHZ.
21 - <&topckgen CLK_TOP_SYSPLL3_D2>: specify parent clock 109MHZ. 20 - <&topckgen CLK_TOP_SYSPLL3_D2>: specify parent clock 109MHZ.
22 It's the default one. 21 It's the default one.
23 - <&topckgen CLK_TOP_SYSPLL4_D2>: specify parent clock 78MHZ. 22 - <&topckgen CLK_TOP_SYSPLL4_D2>: specify parent clock 78MHZ.
24 - <&topckgen CLK_TOP_UNIVPLL2_D4>: specify parent clock 104MHZ. 23 - <&topckgen CLK_TOP_UNIVPLL2_D4>: specify parent clock 104MHZ.
25 - <&topckgen CLK_TOP_UNIVPLL1_D8>: specify parent clock 78MHZ. 24 - <&topckgen CLK_TOP_UNIVPLL1_D8>: specify parent clock 78MHZ.
25 The second should be <&topckgen CLK_TOP_SPI_SEL>. It's clock mux.
26 The third is <&pericfg CLK_PERI_SPI0>. It's clock gate.
26 27
27- clock-names: shall be "spi-clk" for the controller clock, and 28- clock-names: shall be "parent-clk" for the parent clock, "sel-clk" for the
28 "parent-clk" for the parent clock. 29 muxes clock, and "spi-clk" for the clock gate.
29 30
30Optional properties: 31Optional properties:
32-cs-gpios: see spi-bus.txt, only required for MT8173.
33
31- mediatek,pad-select: specify which pins group(ck/mi/mo/cs) spi 34- mediatek,pad-select: specify which pins group(ck/mi/mo/cs) spi
32 controller used, this value should be 0~3, only required for MT8173. 35 controller used. This is a array, the element value should be 0~3,
36 only required for MT8173.
33 0: specify GPIO69,70,71,72 for spi pins. 37 0: specify GPIO69,70,71,72 for spi pins.
34 1: specify GPIO102,103,104,105 for spi pins. 38 1: specify GPIO102,103,104,105 for spi pins.
35 2: specify GPIO128,129,130,131 for spi pins. 39 2: specify GPIO128,129,130,131 for spi pins.
@@ -44,8 +48,11 @@ spi: spi@1100a000 {
44 #size-cells = <0>; 48 #size-cells = <0>;
45 reg = <0 0x1100a000 0 0x1000>; 49 reg = <0 0x1100a000 0 0x1000>;
46 interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_LOW>; 50 interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_LOW>;
47 clocks = <&topckgen CLK_TOP_SPI_SEL>, <&topckgen CLK_TOP_SYSPLL3_D2>; 51 clocks = <&topckgen CLK_TOP_SYSPLL3_D2>,
48 clock-names = "spi-clk", "parent-clk"; 52 <&topckgen CLK_TOP_SPI_SEL>,
49 mediatek,pad-select = <0>; 53 <&pericfg CLK_PERI_SPI0>;
54 clock-names = "parent-clk", "sel-clk", "spi-clk";
55 cs-gpios = <&pio 105 GPIO_ACTIVE_LOW>, <&pio 72 GPIO_ACTIVE_LOW>;
56 mediatek,pad-select = <1>, <0>;
50 status = "disabled"; 57 status = "disabled";
51}; 58};
diff --git a/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt b/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt
index ef802de4957a..b38200d2583a 100644
--- a/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt
+++ b/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt
@@ -12,6 +12,11 @@ Required properties:
12- resets : Must contain an entry for each entry in reset-names. 12- resets : Must contain an entry for each entry in reset-names.
13 See ../reset/reset.txt for details. 13 See ../reset/reset.txt for details.
14- reset-names : Must include the name "tsadc-apb". 14- reset-names : Must include the name "tsadc-apb".
15- pinctrl-names : The pin control state names;
16- pinctrl-0 : The "init" pinctrl state, it will be set before device probe.
17- pinctrl-1 : The "default" pinctrl state, it will be set after reset the
18 TSADC controller.
19- pinctrl-2 : The "sleep" pinctrl state, it will be in for suspend.
15- #thermal-sensor-cells : Should be 1. See ./thermal.txt for a description. 20- #thermal-sensor-cells : Should be 1. See ./thermal.txt for a description.
16- rockchip,hw-tshut-temp : The hardware-controlled shutdown temperature value. 21- rockchip,hw-tshut-temp : The hardware-controlled shutdown temperature value.
17- rockchip,hw-tshut-mode : The hardware-controlled shutdown mode 0:CRU 1:GPIO. 22- rockchip,hw-tshut-mode : The hardware-controlled shutdown mode 0:CRU 1:GPIO.
@@ -27,8 +32,10 @@ tsadc: tsadc@ff280000 {
27 clock-names = "tsadc", "apb_pclk"; 32 clock-names = "tsadc", "apb_pclk";
28 resets = <&cru SRST_TSADC>; 33 resets = <&cru SRST_TSADC>;
29 reset-names = "tsadc-apb"; 34 reset-names = "tsadc-apb";
30 pinctrl-names = "default"; 35 pinctrl-names = "init", "default", "sleep";
31 pinctrl-0 = <&otp_out>; 36 pinctrl-0 = <&otp_gpio>;
37 pinctrl-1 = <&otp_out>;
38 pinctrl-2 = <&otp_gpio>;
32 #thermal-sensor-cells = <1>; 39 #thermal-sensor-cells = <1>;
33 rockchip,hw-tshut-temp = <95000>; 40 rockchip,hw-tshut-temp = <95000>;
34 rockchip,hw-tshut-mode = <0>; 41 rockchip,hw-tshut-mode = <0>;
diff --git a/Documentation/devicetree/bindings/thermal/thermal.txt b/Documentation/devicetree/bindings/thermal/thermal.txt
index 8a49362dea6e..41b817f7b670 100644
--- a/Documentation/devicetree/bindings/thermal/thermal.txt
+++ b/Documentation/devicetree/bindings/thermal/thermal.txt
@@ -55,19 +55,11 @@ of heat dissipation). For example a fan's cooling states correspond to
55the different fan speeds possible. Cooling states are referred to by 55the different fan speeds possible. Cooling states are referred to by
56single unsigned integers, where larger numbers mean greater heat 56single unsigned integers, where larger numbers mean greater heat
57dissipation. The precise set of cooling states associated with a device 57dissipation. The precise set of cooling states associated with a device
58(as referred to be the cooling-min-state and cooling-max-state 58(as referred to by the cooling-min-level and cooling-max-level
59properties) should be defined in a particular device's binding. 59properties) should be defined in a particular device's binding.
60For more examples of cooling devices, refer to the example sections below. 60For more examples of cooling devices, refer to the example sections below.
61 61
62Required properties: 62Required properties:
63- cooling-min-state: An integer indicating the smallest
64 Type: unsigned cooling state accepted. Typically 0.
65 Size: one cell
66
67- cooling-max-state: An integer indicating the largest
68 Type: unsigned cooling state accepted.
69 Size: one cell
70
71- #cooling-cells: Used to provide cooling device specific information 63- #cooling-cells: Used to provide cooling device specific information
72 Type: unsigned while referring to it. Must be at least 2, in order 64 Type: unsigned while referring to it. Must be at least 2, in order
73 Size: one cell to specify minimum and maximum cooling state used 65 Size: one cell to specify minimum and maximum cooling state used
@@ -77,6 +69,15 @@ Required properties:
77 See Cooling device maps section below for more details 69 See Cooling device maps section below for more details
78 on how consumers refer to cooling devices. 70 on how consumers refer to cooling devices.
79 71
72Optional properties:
73- cooling-min-level: An integer indicating the smallest
74 Type: unsigned cooling state accepted. Typically 0.
75 Size: one cell
76
77- cooling-max-level: An integer indicating the largest
78 Type: unsigned cooling state accepted.
79 Size: one cell
80
80* Trip points 81* Trip points
81 82
82The trip node is a node to describe a point in the temperature domain 83The trip node is a node to describe a point in the temperature domain
@@ -225,8 +226,8 @@ cpus {
225 396000 950000 226 396000 950000
226 198000 850000 227 198000 850000
227 >; 228 >;
228 cooling-min-state = <0>; 229 cooling-min-level = <0>;
229 cooling-max-state = <3>; 230 cooling-max-level = <3>;
230 #cooling-cells = <2>; /* min followed by max */ 231 #cooling-cells = <2>; /* min followed by max */
231 }; 232 };
232 ... 233 ...
@@ -240,8 +241,8 @@ cpus {
240 */ 241 */
241 fan0: fan@0x48 { 242 fan0: fan@0x48 {
242 ... 243 ...
243 cooling-min-state = <0>; 244 cooling-min-level = <0>;
244 cooling-max-state = <9>; 245 cooling-max-level = <9>;
245 #cooling-cells = <2>; /* min followed by max */ 246 #cooling-cells = <2>; /* min followed by max */
246 }; 247 };
247}; 248};
diff --git a/Documentation/devicetree/bindings/thermal/ti_soc_thermal.txt b/Documentation/devicetree/bindings/thermal/ti_soc_thermal.txt
index 0c9222d27fae..6299dd8de339 100644
--- a/Documentation/devicetree/bindings/thermal/ti_soc_thermal.txt
+++ b/Documentation/devicetree/bindings/thermal/ti_soc_thermal.txt
@@ -10,6 +10,8 @@ to the silicon temperature.
10 10
11Required properties: 11Required properties:
12- compatible : Should be: 12- compatible : Should be:
13 - "ti,omap34xx-bandgap" : for OMAP34xx bandgap
14 - "ti,omap36xx-bandgap" : for OMAP36xx bandgap
13 - "ti,omap4430-bandgap" : for OMAP4430 bandgap 15 - "ti,omap4430-bandgap" : for OMAP4430 bandgap
14 - "ti,omap4460-bandgap" : for OMAP4460 bandgap 16 - "ti,omap4460-bandgap" : for OMAP4460 bandgap
15 - "ti,omap4470-bandgap" : for OMAP4470 bandgap 17 - "ti,omap4470-bandgap" : for OMAP4470 bandgap
@@ -25,6 +27,18 @@ to each bandgap version, because the mapping may change from
25soc to soc, apart of depending on available features. 27soc to soc, apart of depending on available features.
26 28
27Example: 29Example:
30OMAP34xx:
31bandgap {
32 reg = <0x48002524 0x4>;
33 compatible = "ti,omap34xx-bandgap";
34};
35
36OMAP36xx:
37bandgap {
38 reg = <0x48002524 0x4>;
39 compatible = "ti,omap36xx-bandgap";
40};
41
28OMAP4430: 42OMAP4430:
29bandgap { 43bandgap {
30 reg = <0x4a002260 0x4 0x4a00232C 0x4>; 44 reg = <0x4a002260 0x4 0x4a00232C 0x4>;
diff --git a/Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt b/Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt
index 53a3029b7589..64083bc5633c 100644
--- a/Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt
+++ b/Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt
@@ -3,10 +3,12 @@ Mediatek MT6577, MT6572 and MT6589 Timers
3 3
4Required properties: 4Required properties:
5- compatible should contain: 5- compatible should contain:
6 * "mediatek,mt6589-timer" for MT6589 compatible timers
7 * "mediatek,mt6580-timer" for MT6580 compatible timers 6 * "mediatek,mt6580-timer" for MT6580 compatible timers
8 * "mediatek,mt6577-timer" for all compatible timers (MT6589, MT6580, 7 * "mediatek,mt6589-timer" for MT6589 compatible timers
9 MT6577) 8 * "mediatek,mt8127-timer" for MT8127 compatible timers
9 * "mediatek,mt8135-timer" for MT8135 compatible timers
10 * "mediatek,mt8173-timer" for MT8173 compatible timers
11 * "mediatek,mt6577-timer" for MT6577 and all above compatible timers
10- reg: Should contain location and length for timers register. 12- reg: Should contain location and length for timers register.
11- clocks: Clocks driving the timer hardware. This list should include two 13- clocks: Clocks driving the timer hardware. This list should include two
12 clocks. The order is system clock and as second clock the RTC clock. 14 clocks. The order is system clock and as second clock the RTC clock.
diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
index d71ef07bca5d..781296bfbe4f 100644
--- a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
+++ b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
@@ -6,6 +6,7 @@ Required properties:
6 "lsi,zevio-usb" 6 "lsi,zevio-usb"
7 "qcom,ci-hdrc" 7 "qcom,ci-hdrc"
8 "chipidea,usb2" 8 "chipidea,usb2"
9 "xlnx,zynq-usb-2.20a"
9- reg: base address and length of the registers 10- reg: base address and length of the registers
10- interrupts: interrupt for the USB controller 11- interrupts: interrupt for the USB controller
11 12
@@ -26,10 +27,6 @@ Optional properties:
26- vbus-supply: reference to the VBUS regulator 27- vbus-supply: reference to the VBUS regulator
27- maximum-speed: limit the maximum connection speed to "full-speed". 28- maximum-speed: limit the maximum connection speed to "full-speed".
28- tpl-support: TPL (Targeted Peripheral List) feature for targeted hosts 29- tpl-support: TPL (Targeted Peripheral List) feature for targeted hosts
29- fsl,usbmisc: (FSL only) phandler of non-core register device, with one
30 argument that indicate usb controller index
31- disable-over-current: (FSL only) disable over current detect
32- external-vbus-divider: (FSL only) enables off-chip resistor divider for Vbus
33- itc-setting: interrupt threshold control register control, the setting 30- itc-setting: interrupt threshold control register control, the setting
34 should be aligned with ITC bits at register USBCMD. 31 should be aligned with ITC bits at register USBCMD.
35- ahb-burst-config: it is vendor dependent, the required value should be 32- ahb-burst-config: it is vendor dependent, the required value should be
@@ -40,11 +37,28 @@ Optional properties:
40- tx-burst-size-dword: it is vendor dependent, the tx burst size in dword 37- tx-burst-size-dword: it is vendor dependent, the tx burst size in dword
41 (4 bytes), This register represents the maximum length of a the burst 38 (4 bytes), This register represents the maximum length of a the burst
42 in 32-bit words while moving data from system memory to the USB 39 in 32-bit words while moving data from system memory to the USB
43 bus, changing this value takes effect only the SBUSCFG.AHBBRST is 0. 40 bus, the value of this property will only take effect if property
41 "ahb-burst-config" is set to 0, if this property is missing the reset
42 default of the hardware implementation will be used.
44- rx-burst-size-dword: it is vendor dependent, the rx burst size in dword 43- rx-burst-size-dword: it is vendor dependent, the rx burst size in dword
45 (4 bytes), This register represents the maximum length of a the burst 44 (4 bytes), This register represents the maximum length of a the burst
46 in 32-bit words while moving data from the USB bus to system memory, 45 in 32-bit words while moving data from the USB bus to system memory,
47 changing this value takes effect only the SBUSCFG.AHBBRST is 0. 46 the value of this property will only take effect if property
47 "ahb-burst-config" is set to 0, if this property is missing the reset
48 default of the hardware implementation will be used.
49- extcon: phandles to external connector devices. First phandle should point to
50 external connector, which provide "USB" cable events, the second should point
51 to external connector device, which provide "USB-HOST" cable events. If one
52 of the external connector devices is not required, empty <0> phandle should
53 be specified.
54- phy-clkgate-delay-us: the delay time (us) between putting the PHY into
55 low power mode and gating the PHY clock.
56
57i.mx specific properties
58- fsl,usbmisc: phandler of non-core register device, with one
59 argument that indicate usb controller index
60- disable-over-current: disable over current detect
61- external-vbus-divider: enables off-chip resistor divider for Vbus
48 62
49Example: 63Example:
50 64
@@ -61,4 +75,6 @@ Example:
61 ahb-burst-config = <0x0>; 75 ahb-burst-config = <0x0>;
62 tx-burst-size-dword = <0x10>; /* 64 bytes */ 76 tx-burst-size-dword = <0x10>; /* 64 bytes */
63 rx-burst-size-dword = <0x10>; 77 rx-burst-size-dword = <0x10>;
78 extcon = <0>, <&usb_id>;
79 phy-clkgate-delay-us = <400>;
64 }; 80 };
diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt b/Documentation/devicetree/bindings/usb/dwc3.txt
index 0815eac5b185..fb2ad0acedbd 100644
--- a/Documentation/devicetree/bindings/usb/dwc3.txt
+++ b/Documentation/devicetree/bindings/usb/dwc3.txt
@@ -1,6 +1,7 @@
1synopsys DWC3 CORE 1synopsys DWC3 CORE
2 2
3DWC3- USB3 CONTROLLER 3DWC3- USB3 CONTROLLER. Complies to the generic USB binding properties
4 as described in 'usb/generic.txt'
4 5
5Required properties: 6Required properties:
6 - compatible: must be "snps,dwc3" 7 - compatible: must be "snps,dwc3"
@@ -35,11 +36,16 @@ Optional properties:
35 LTSSM during USB3 Compliance mode. 36 LTSSM during USB3 Compliance mode.
36 - snps,dis_u3_susphy_quirk: when set core will disable USB3 suspend phy. 37 - snps,dis_u3_susphy_quirk: when set core will disable USB3 suspend phy.
37 - snps,dis_u2_susphy_quirk: when set core will disable USB2 suspend phy. 38 - snps,dis_u2_susphy_quirk: when set core will disable USB2 suspend phy.
39 - snps,dis_enblslpm_quirk: when set clears the enblslpm in GUSB2PHYCFG,
40 disabling the suspend signal to the PHY.
38 - snps,is-utmi-l1-suspend: true when DWC3 asserts output signal 41 - snps,is-utmi-l1-suspend: true when DWC3 asserts output signal
39 utmi_l1_suspend_n, false when asserts utmi_sleep_n 42 utmi_l1_suspend_n, false when asserts utmi_sleep_n
40 - snps,hird-threshold: HIRD threshold 43 - snps,hird-threshold: HIRD threshold
41 - snps,hsphy_interface: High-Speed PHY interface selection between "utmi" for 44 - snps,hsphy_interface: High-Speed PHY interface selection between "utmi" for
42 UTMI+ and "ulpi" for ULPI when the DWC_USB3_HSPHY_INTERFACE has value 3. 45 UTMI+ and "ulpi" for ULPI when the DWC_USB3_HSPHY_INTERFACE has value 3.
46 - snps,quirk-frame-length-adjustment: Value for GFLADJ_30MHZ field of GFLADJ
47 register for post-silicon frame length adjustment when the
48 fladj_30mhz_sdbnd signal is invalid or incorrect.
43 49
44This is usually a subnode to DWC3 glue to which it is connected. 50This is usually a subnode to DWC3 glue to which it is connected.
45 51
diff --git a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
index 64a4ca6cf96f..7d48f63db44e 100644
--- a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
+++ b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
@@ -5,6 +5,7 @@ Required properties:
5 - "renesas,usbhs-r8a7790" 5 - "renesas,usbhs-r8a7790"
6 - "renesas,usbhs-r8a7791" 6 - "renesas,usbhs-r8a7791"
7 - "renesas,usbhs-r8a7794" 7 - "renesas,usbhs-r8a7794"
8 - "renesas,usbhs-r8a7795"
8 - reg: Base address and length of the register for the USBHS 9 - reg: Base address and length of the register for the USBHS
9 - interrupts: Interrupt specifier for the USBHS 10 - interrupts: Interrupt specifier for the USBHS
10 - clocks: A list of phandle + clock specifier pairs 11 - clocks: A list of phandle + clock specifier pairs
diff --git a/Documentation/devicetree/bindings/usb/samsung-usbphy.txt b/Documentation/devicetree/bindings/usb/samsung-usbphy.txt
deleted file mode 100644
index 33fd3543f3f8..000000000000
--- a/Documentation/devicetree/bindings/usb/samsung-usbphy.txt
+++ /dev/null
@@ -1,117 +0,0 @@
1SAMSUNG USB-PHY controllers
2
3** Samsung's usb 2.0 phy transceiver
4
5The Samsung's usb 2.0 phy transceiver is used for controlling
6usb 2.0 phy for s3c-hsotg as well as ehci-s5p and ohci-exynos
7usb controllers across Samsung SOCs.
8TODO: Adding the PHY binding with controller(s) according to the under
9development generic PHY driver.
10
11Required properties:
12
13Exynos4210:
14- compatible : should be "samsung,exynos4210-usb2phy"
15- reg : base physical address of the phy registers and length of memory mapped
16 region.
17- clocks: Clock IDs array as required by the controller.
18- clock-names: names of clock correseponding IDs clock property as requested
19 by the controller driver.
20
21Exynos5250:
22- compatible : should be "samsung,exynos5250-usb2phy"
23- reg : base physical address of the phy registers and length of memory mapped
24 region.
25
26Optional properties:
27- #address-cells: should be '1' when usbphy node has a child node with 'reg'
28 property.
29- #size-cells: should be '1' when usbphy node has a child node with 'reg'
30 property.
31- ranges: allows valid translation between child's address space and parent's
32 address space.
33
34- The child node 'usbphy-sys' to the node 'usbphy' is for the system controller
35 interface for usb-phy. It should provide the following information required by
36 usb-phy controller to control phy.
37 - reg : base physical address of PHY_CONTROL registers.
38 The size of this register is the total sum of size of all PHY_CONTROL
39 registers that the SoC has. For example, the size will be
40 '0x4' in case we have only one PHY_CONTROL register (e.g.
41 OTHERS register in S3C64XX or USB_PHY_CONTROL register in S5PV210)
42 and, '0x8' in case we have two PHY_CONTROL registers (e.g.
43 USBDEVICE_PHY_CONTROL and USBHOST_PHY_CONTROL registers in exynos4x).
44 and so on.
45
46Example:
47 - Exynos4210
48
49 usbphy@125B0000 {
50 #address-cells = <1>;
51 #size-cells = <1>;
52 compatible = "samsung,exynos4210-usb2phy";
53 reg = <0x125B0000 0x100>;
54 ranges;
55
56 clocks = <&clock 2>, <&clock 305>;
57 clock-names = "xusbxti", "otg";
58
59 usbphy-sys {
60 /* USB device and host PHY_CONTROL registers */
61 reg = <0x10020704 0x8>;
62 };
63 };
64
65
66** Samsung's usb 3.0 phy transceiver
67
68Starting exynso5250, Samsung's SoC have usb 3.0 phy transceiver
69which is used for controlling usb 3.0 phy for dwc3-exynos usb 3.0
70controllers across Samsung SOCs.
71
72Required properties:
73
74Exynos5250:
75- compatible : should be "samsung,exynos5250-usb3phy"
76- reg : base physical address of the phy registers and length of memory mapped
77 region.
78- clocks: Clock IDs array as required by the controller.
79- clock-names: names of clocks correseponding to IDs in the clock property
80 as requested by the controller driver.
81
82Optional properties:
83- #address-cells: should be '1' when usbphy node has a child node with 'reg'
84 property.
85- #size-cells: should be '1' when usbphy node has a child node with 'reg'
86 property.
87- ranges: allows valid translation between child's address space and parent's
88 address space.
89
90- The child node 'usbphy-sys' to the node 'usbphy' is for the system controller
91 interface for usb-phy. It should provide the following information required by
92 usb-phy controller to control phy.
93 - reg : base physical address of PHY_CONTROL registers.
94 The size of this register is the total sum of size of all PHY_CONTROL
95 registers that the SoC has. For example, the size will be
96 '0x4' in case we have only one PHY_CONTROL register (e.g.
97 OTHERS register in S3C64XX or USB_PHY_CONTROL register in S5PV210)
98 and, '0x8' in case we have two PHY_CONTROL registers (e.g.
99 USBDEVICE_PHY_CONTROL and USBHOST_PHY_CONTROL registers in exynos4x).
100 and so on.
101
102Example:
103 usbphy@12100000 {
104 compatible = "samsung,exynos5250-usb3phy";
105 reg = <0x12100000 0x100>;
106 #address-cells = <1>;
107 #size-cells = <1>;
108 ranges;
109
110 clocks = <&clock 1>, <&clock 286>;
111 clock-names = "ext_xtal", "usbdrd30";
112
113 usbphy-sys {
114 /* USB device and host PHY_CONTROL registers */
115 reg = <0x10040704 0x8>;
116 };
117 };
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index ac5f0c34ae00..55df1d444e9f 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -34,6 +34,7 @@ avago Avago Technologies
34avic Shanghai AVIC Optoelectronics Co., Ltd. 34avic Shanghai AVIC Optoelectronics Co., Ltd.
35axis Axis Communications AB 35axis Axis Communications AB
36bosch Bosch Sensortec GmbH 36bosch Bosch Sensortec GmbH
37boundary Boundary Devices Inc.
37brcm Broadcom Corporation 38brcm Broadcom Corporation
38buffalo Buffalo, Inc. 39buffalo Buffalo, Inc.
39calxeda Calxeda 40calxeda Calxeda
@@ -51,6 +52,7 @@ cirrus Cirrus Logic, Inc.
51cloudengines Cloud Engines, Inc. 52cloudengines Cloud Engines, Inc.
52cnm Chips&Media, Inc. 53cnm Chips&Media, Inc.
53cnxt Conexant Systems, Inc. 54cnxt Conexant Systems, Inc.
55compulab CompuLab Ltd.
54cortina Cortina Systems, Inc. 56cortina Cortina Systems, Inc.
55cosmic Cosmic Circuits 57cosmic Cosmic Circuits
56crystalfontz Crystalfontz America, Inc. 58crystalfontz Crystalfontz America, Inc.
@@ -82,6 +84,7 @@ everspin Everspin Technologies, Inc.
82excito Excito 84excito Excito
83fcs Fairchild Semiconductor 85fcs Fairchild Semiconductor
84firefly Firefly 86firefly Firefly
87focaltech FocalTech Systems Co.,Ltd
85fsl Freescale Semiconductor 88fsl Freescale Semiconductor
86GEFanuc GE Fanuc Intelligent Platforms Embedded Systems, Inc. 89GEFanuc GE Fanuc Intelligent Platforms Embedded Systems, Inc.
87gef GE Fanuc Intelligent Platforms Embedded Systems, Inc. 90gef GE Fanuc Intelligent Platforms Embedded Systems, Inc.
@@ -101,6 +104,7 @@ himax Himax Technologies, Inc.
101hisilicon Hisilicon Limited. 104hisilicon Hisilicon Limited.
102hit Hitachi Ltd. 105hit Hitachi Ltd.
103hitex Hitex Development Tools 106hitex Hitex Development Tools
107holt Holt Integrated Circuits, Inc.
104honeywell Honeywell 108honeywell Honeywell
105hp Hewlett Packard 109hp Hewlett Packard
106i2se I2SE GmbH 110i2se I2SE GmbH
@@ -168,7 +172,9 @@ pericom Pericom Technology Inc.
168phytec PHYTEC Messtechnik GmbH 172phytec PHYTEC Messtechnik GmbH
169picochip Picochip Ltd 173picochip Picochip Ltd
170plathome Plat'Home Co., Ltd. 174plathome Plat'Home Co., Ltd.
175plda PLDA
171pixcir PIXCIR MICROELECTRONICS Co., Ltd 176pixcir PIXCIR MICROELECTRONICS Co., Ltd
177pulsedlight PulsedLight, Inc
172powervr PowerVR (deprecated, use img) 178powervr PowerVR (deprecated, use img)
173qca Qualcomm Atheros, Inc. 179qca Qualcomm Atheros, Inc.
174qcom Qualcomm Technologies, Inc 180qcom Qualcomm Technologies, Inc
@@ -191,7 +197,9 @@ sbs Smart Battery System
191schindler Schindler 197schindler Schindler
192seagate Seagate Technology PLC 198seagate Seagate Technology PLC
193semtech Semtech Corporation 199semtech Semtech Corporation
200sgx SGX Sensortech
194sharp Sharp Corporation 201sharp Sharp Corporation
202sigma Sigma Designs, Inc.
195sil Silicon Image 203sil Silicon Image
196silabs Silicon Laboratories 204silabs Silicon Laboratories
197siliconmitus Silicon Mitus, Inc. 205siliconmitus Silicon Mitus, Inc.
@@ -203,6 +211,7 @@ sitronix Sitronix Technology Corporation
203skyworks Skyworks Solutions, Inc. 211skyworks Skyworks Solutions, Inc.
204smsc Standard Microsystems Corporation 212smsc Standard Microsystems Corporation
205snps Synopsys, Inc. 213snps Synopsys, Inc.
214socionext Socionext Inc.
206solidrun SolidRun 215solidrun SolidRun
207solomon Solomon Systech Limited 216solomon Solomon Systech Limited
208sony Sony Corporation 217sony Sony Corporation
@@ -221,7 +230,9 @@ toradex Toradex AG
221toshiba Toshiba Corporation 230toshiba Toshiba Corporation
222toumaz Toumaz 231toumaz Toumaz
223tplink TP-LINK Technologies Co., Ltd. 232tplink TP-LINK Technologies Co., Ltd.
233tronfy Tronfy
224truly Truly Semiconductors Limited 234truly Truly Semiconductors Limited
235upisemi uPI Semiconductor Corp.
225usi Universal Scientific Industrial Co., Ltd. 236usi Universal Scientific Industrial Co., Ltd.
226v3 V3 Semiconductor 237v3 V3 Semiconductor
227variscite Variscite Ltd. 238variscite Variscite Ltd.
diff --git a/Documentation/devicetree/bindings/w1/omap-hdq.txt b/Documentation/devicetree/bindings/w1/omap-hdq.txt
index fef794741bd1..913c5f91a0f9 100644
--- a/Documentation/devicetree/bindings/w1/omap-hdq.txt
+++ b/Documentation/devicetree/bindings/w1/omap-hdq.txt
@@ -1,11 +1,15 @@
1* OMAP HDQ One wire bus master controller 1* OMAP HDQ One wire bus master controller
2 2
3Required properties: 3Required properties:
4- compatible : should be "ti,omap3-1w" 4- compatible : should be "ti,omap3-1w" or "ti,am4372-hdq"
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 : interrupt line. 6- interrupts : interrupt line.
7- ti,hwmods : "hdq1w" 7- ti,hwmods : "hdq1w"
8 8
9Optional properties:
10- ti,mode: should be "hdq": HDQ mode "1w": one-wire mode.
11 If not specified HDQ mode is implied.
12
9Example: 13Example:
10 14
11- From omap3.dtsi 15- From omap3.dtsi
@@ -14,4 +18,5 @@ Example:
14 reg = <0x480b2000 0x1000>; 18 reg = <0x480b2000 0x1000>;
15 interrupts = <58>; 19 interrupts = <58>;
16 ti,hwmods = "hdq1w"; 20 ti,hwmods = "hdq1w";
21 ti,mode = "hdq";
17 }; 22 };
diff --git a/Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.txt b/Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.txt
new file mode 100644
index 000000000000..84122270be8f
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.txt
@@ -0,0 +1,19 @@
1BCM7038 Watchdog timer
2
3Required properties:
4
5- compatible : should be "brcm,bcm7038-wdt"
6- reg : Specifies base physical address and size of the registers.
7
8Optional properties:
9
10- clocks: The clock running the watchdog. If no clock is found the
11 driver will default to 27000000 Hz.
12
13Example:
14
15watchdog@f040a7e8 {
16 compatible = "brcm,bcm7038-wdt";
17 clocks = <&upg_fixed>;
18 reg = <0xf040a7e8 0x16>;
19};
diff --git a/Documentation/driver-model/platform.txt b/Documentation/driver-model/platform.txt
index 07795ec51cde..e456696cfef2 100644
--- a/Documentation/driver-model/platform.txt
+++ b/Documentation/driver-model/platform.txt
@@ -63,6 +63,20 @@ runtime memory footprint:
63 int platform_driver_probe(struct platform_driver *drv, 63 int platform_driver_probe(struct platform_driver *drv,
64 int (*probe)(struct platform_device *)) 64 int (*probe)(struct platform_device *))
65 65
66Kernel modules can be composed of several platform drivers. The platform core
67provides helpers to register and unregister an array of drivers:
68
69 int __platform_register_drivers(struct platform_driver * const *drivers,
70 unsigned int count, struct module *owner);
71 void platform_unregister_drivers(struct platform_driver * const *drivers,
72 unsigned int count);
73
74If one of the drivers fails to register, all drivers registered up to that
75point will be unregistered in reverse order. Note that there is a convenience
76macro that passes THIS_MODULE as owner parameter:
77
78 #define platform_register_driver(drivers, count)
79
66 80
67Device Enumeration 81Device Enumeration
68~~~~~~~~~~~~~~~~~~ 82~~~~~~~~~~~~~~~~~~
diff --git a/Documentation/edac.txt b/Documentation/edac.txt
index 0cf27a3544a5..80841a2d640c 100644
--- a/Documentation/edac.txt
+++ b/Documentation/edac.txt
@@ -744,6 +744,52 @@ exports one
744 possible that some errors could be lost. With rdimm's, they display the 744 possible that some errors could be lost. With rdimm's, they display the
745 contents of the registers 745 contents of the registers
746 746
747AMD64_EDAC REFERENCE DOCUMENTS USED
748-----------------------------------
749amd64_edac module is based on the following documents
750(available from http://support.amd.com/en-us/search/tech-docs):
751
7521. Title: BIOS and Kernel Developer's Guide for AMD Athlon 64 and AMD
753 Opteron Processors
754 AMD publication #: 26094
755 Revision: 3.26
756 Link: http://support.amd.com/TechDocs/26094.PDF
757
7582. Title: BIOS and Kernel Developer's Guide for AMD NPT Family 0Fh
759 Processors
760 AMD publication #: 32559
761 Revision: 3.00
762 Issue Date: May 2006
763 Link: http://support.amd.com/TechDocs/32559.pdf
764
7653. Title: BIOS and Kernel Developer's Guide (BKDG) For AMD Family 10h
766 Processors
767 AMD publication #: 31116
768 Revision: 3.00
769 Issue Date: September 07, 2007
770 Link: http://support.amd.com/TechDocs/31116.pdf
771
7724. Title: BIOS and Kernel Developer's Guide (BKDG) for AMD Family 15h
773 Models 30h-3Fh Processors
774 AMD publication #: 49125
775 Revision: 3.06
776 Issue Date: 2/12/2015 (latest release)
777 Link: http://support.amd.com/TechDocs/49125_15h_Models_30h-3Fh_BKDG.pdf
778
7795. Title: BIOS and Kernel Developer's Guide (BKDG) for AMD Family 15h
780 Models 60h-6Fh Processors
781 AMD publication #: 50742
782 Revision: 3.01
783 Issue Date: 7/23/2015 (latest release)
784 Link: http://support.amd.com/TechDocs/50742_15h_Models_60h-6Fh_BKDG.pdf
785
7866. Title: BIOS and Kernel Developer's Guide (BKDG) for AMD Family 16h
787 Models 00h-0Fh Processors
788 AMD publication #: 48751
789 Revision: 3.03
790 Issue Date: 2/23/2015 (latest release)
791 Link: http://support.amd.com/TechDocs/48751_16h_bkdg.pdf
792
747CREDITS: 793CREDITS:
748======== 794========
749 795
diff --git a/Documentation/email-clients.txt b/Documentation/email-clients.txt
index 3fa450881ecb..aba85b39a400 100644
--- a/Documentation/email-clients.txt
+++ b/Documentation/email-clients.txt
@@ -220,7 +220,7 @@ to coerce it into behaving.
220 Compose dialog. 220 Compose dialog.
221 221
222 Please note that "external editor" requires that your editor must not 222 Please note that "external editor" requires that your editor must not
223 fork, or in other words, the editor must not return before closing. 223 fork, or in other words, the editor must not return before closing.
224 You may have to pass additional flags or change the settings of your 224 You may have to pass additional flags or change the settings of your
225 editor. Most notably if you are using gvim then you must pass the -f 225 editor. Most notably if you are using gvim then you must pass the -f
226 option to gvim by putting "/usr/bin/gvim -f" (if the binary is in 226 option to gvim by putting "/usr/bin/gvim -f" (if the binary is in
diff --git a/Documentation/features/debug/KASAN/arch-support.txt b/Documentation/features/debug/KASAN/arch-support.txt
index 14531da2fb54..703f5784bc90 100644
--- a/Documentation/features/debug/KASAN/arch-support.txt
+++ b/Documentation/features/debug/KASAN/arch-support.txt
@@ -9,7 +9,7 @@
9 | alpha: | TODO | 9 | alpha: | TODO |
10 | arc: | TODO | 10 | arc: | TODO |
11 | arm: | TODO | 11 | arm: | TODO |
12 | arm64: | TODO | 12 | arm64: | ok |
13 | avr32: | TODO | 13 | avr32: | TODO |
14 | blackfin: | TODO | 14 | blackfin: | TODO |
15 | c6x: | TODO | 15 | c6x: | TODO |
diff --git a/Documentation/features/vm/THP/arch-support.txt b/Documentation/features/vm/THP/arch-support.txt
index df384e3e845f..523f8307b9cd 100644
--- a/Documentation/features/vm/THP/arch-support.txt
+++ b/Documentation/features/vm/THP/arch-support.txt
@@ -7,7 +7,7 @@
7 | arch |status| 7 | arch |status|
8 ----------------------- 8 -----------------------
9 | alpha: | TODO | 9 | alpha: | TODO |
10 | arc: | .. | 10 | arc: | ok |
11 | arm: | ok | 11 | arm: | ok |
12 | arm64: | ok | 12 | arm64: | ok |
13 | avr32: | .. | 13 | avr32: | .. |
diff --git a/Documentation/features/vm/pte_special/arch-support.txt b/Documentation/features/vm/pte_special/arch-support.txt
index aaaa21db6226..3de5434c857c 100644
--- a/Documentation/features/vm/pte_special/arch-support.txt
+++ b/Documentation/features/vm/pte_special/arch-support.txt
@@ -7,7 +7,7 @@
7 | arch |status| 7 | arch |status|
8 ----------------------- 8 -----------------------
9 | alpha: | TODO | 9 | alpha: | TODO |
10 | arc: | TODO | 10 | arc: | ok |
11 | arm: | ok | 11 | arm: | ok |
12 | arm64: | ok | 12 | arm64: | ok |
13 | avr32: | TODO | 13 | avr32: | TODO |
diff --git a/Documentation/filesystems/debugfs.txt b/Documentation/filesystems/debugfs.txt
index 463f595733e8..4f45f71149cb 100644
--- a/Documentation/filesystems/debugfs.txt
+++ b/Documentation/filesystems/debugfs.txt
@@ -105,7 +105,7 @@ a variable of type size_t.
105Boolean values can be placed in debugfs with: 105Boolean values can be placed in debugfs with:
106 106
107 struct dentry *debugfs_create_bool(const char *name, umode_t mode, 107 struct dentry *debugfs_create_bool(const char *name, umode_t mode,
108 struct dentry *parent, u32 *value); 108 struct dentry *parent, bool *value);
109 109
110A read on the resulting file will yield either Y (for non-zero values) or 110A read on the resulting file will yield either Y (for non-zero values) or
111N, followed by a newline. If written to, it will accept either upper- or 111N, followed by a newline. If written to, it will accept either upper- or
diff --git a/Documentation/filesystems/f2fs.txt b/Documentation/filesystems/f2fs.txt
index e2d5105b7214..b102b436563e 100644
--- a/Documentation/filesystems/f2fs.txt
+++ b/Documentation/filesystems/f2fs.txt
@@ -102,7 +102,8 @@ background_gc=%s Turn on/off cleaning operations, namely garbage
102 collection, triggered in background when I/O subsystem is 102 collection, triggered in background when I/O subsystem is
103 idle. If background_gc=on, it will turn on the garbage 103 idle. If background_gc=on, it will turn on the garbage
104 collection and if background_gc=off, garbage collection 104 collection and if background_gc=off, garbage collection
105 will be truned off. 105 will be truned off. If background_gc=sync, it will turn
106 on synchronous garbage collection running in background.
106 Default value for this option is on. So garbage 107 Default value for this option is on. So garbage
107 collection is on by default. 108 collection is on by default.
108disable_roll_forward Disable the roll-forward recovery routine 109disable_roll_forward Disable the roll-forward recovery routine
diff --git a/Documentation/filesystems/gfs2-glocks.txt b/Documentation/filesystems/gfs2-glocks.txt
index fcc79957be63..1fb12f9dfe48 100644
--- a/Documentation/filesystems/gfs2-glocks.txt
+++ b/Documentation/filesystems/gfs2-glocks.txt
@@ -5,7 +5,7 @@ This documents the basic principles of the glock state machine
5internals. Each glock (struct gfs2_glock in fs/gfs2/incore.h) 5internals. Each glock (struct gfs2_glock in fs/gfs2/incore.h)
6has two main (internal) locks: 6has two main (internal) locks:
7 7
8 1. A spinlock (gl_spin) which protects the internal state such 8 1. A spinlock (gl_lockref.lock) which protects the internal state such
9 as gl_state, gl_target and the list of holders (gl_holders) 9 as gl_state, gl_target and the list of holders (gl_holders)
10 2. A non-blocking bit lock, GLF_LOCK, which is used to prevent other 10 2. A non-blocking bit lock, GLF_LOCK, which is used to prevent other
11 threads from making calls to the DLM, etc. at the same time. If a 11 threads from making calls to the DLM, etc. at the same time. If a
@@ -82,8 +82,8 @@ rather than via the glock.
82 82
83Locking rules for glock operations: 83Locking rules for glock operations:
84 84
85Operation | GLF_LOCK bit lock held | gl_spin spinlock held 85Operation | GLF_LOCK bit lock held | gl_lockref.lock spinlock held
86----------------------------------------------------------------- 86-------------------------------------------------------------------------
87go_xmote_th | Yes | No 87go_xmote_th | Yes | No
88go_xmote_bh | Yes | No 88go_xmote_bh | Yes | No
89go_inval | Yes | No 89go_inval | Yes | No
diff --git a/Documentation/filesystems/nfs/nfsroot.txt b/Documentation/filesystems/nfs/nfsroot.txt
index 2d66ed688125..bb5ab6de5924 100644
--- a/Documentation/filesystems/nfs/nfsroot.txt
+++ b/Documentation/filesystems/nfs/nfsroot.txt
@@ -157,6 +157,9 @@ ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>:
157 both: use both BOOTP and RARP but not DHCP 157 both: use both BOOTP and RARP but not DHCP
158 (old option kept for backwards compatibility) 158 (old option kept for backwards compatibility)
159 159
160 if dhcp is used, the client identifier can be used by following
161 format "ip=dhcp,client-id-type,client-id-value"
162
160 Default: any 163 Default: any
161 164
162 <dns0-ip> IP address of first nameserver. 165 <dns0-ip> IP address of first nameserver.
diff --git a/Documentation/filesystems/path-lookup.md b/Documentation/filesystems/path-lookup.md
new file mode 100644
index 000000000000..1b39e084a2b2
--- /dev/null
+++ b/Documentation/filesystems/path-lookup.md
@@ -0,0 +1,1297 @@
1<head>
2<style> p { max-width:50em} ol, ul {max-width: 40em}</style>
3</head>
4
5Pathname lookup in Linux.
6=========================
7
8This write-up is based on three articles published at lwn.net:
9
10- <https://lwn.net/Articles/649115/> Pathname lookup in Linux
11- <https://lwn.net/Articles/649729/> RCU-walk: faster pathname lookup in Linux
12- <https://lwn.net/Articles/650786/> A walk among the symlinks
13
14Written by Neil Brown with help from Al Viro and Jon Corbet.
15
16Introduction
17------------
18
19The most obvious aspect of pathname lookup, which very little
20exploration is needed to discover, is that it is complex. There are
21many rules, special cases, and implementation alternatives that all
22combine to confuse the unwary reader. Computer science has long been
23acquainted with such complexity and has tools to help manage it. One
24tool that we will make extensive use of is "divide and conquer". For
25the early parts of the analysis we will divide off symlinks - leaving
26them until the final part. Well before we get to symlinks we have
27another major division based on the VFS's approach to locking which
28will allow us to review "REF-walk" and "RCU-walk" separately. But we
29are getting ahead of ourselves. There are some important low level
30distinctions we need to clarify first.
31
32There are two sorts of ...
33--------------------------
34
35[`openat()`]: http://man7.org/linux/man-pages/man2/openat.2.html
36
37Pathnames (sometimes "file names"), used to identify objects in the
38filesystem, will be familiar to most readers. They contain two sorts
39of elements: "slashes" that are sequences of one or more "`/`"
40characters, and "components" that are sequences of one or more
41non-"`/`" characters. These form two kinds of paths. Those that
42start with slashes are "absolute" and start from the filesystem root.
43The others are "relative" and start from the current directory, or
44from some other location specified by a file descriptor given to a
45"xxx`at`" system call such as "[`openat()`]".
46
47[`execveat()`]: http://man7.org/linux/man-pages/man2/execveat.2.html
48
49It is tempting to describe the second kind as starting with a
50component, but that isn't always accurate: a pathname can lack both
51slashes and components, it can be empty, in other words. This is
52generally forbidden in POSIX, but some of those "xxx`at`" system calls
53in Linux permit it when the `AT_EMPTY_PATH` flag is given. For
54example, if you have an open file descriptor on an executable file you
55can execute it by calling [`execveat()`] passing the file descriptor,
56an empty path, and the `AT_EMPTY_PATH` flag.
57
58These paths can be divided into two sections: the final component and
59everything else. The "everything else" is the easy bit. In all cases
60it must identify a directory that already exists, otherwise an error
61such as `ENOENT` or `ENOTDIR` will be reported.
62
63The final component is not so simple. Not only do different system
64calls interpret it quite differently (e.g. some create it, some do
65not), but it might not even exist: neither the empty pathname nor the
66pathname that is just slashes have a final component. If it does
67exist, it could be "`.`" or "`..`" which are handled quite differently
68from other components.
69
70[POSIX]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_12
71
72If a pathname ends with a slash, such as "`/tmp/foo/`" it might be
73tempting to consider that to have an empty final component. In many
74ways that would lead to correct results, but not always. In
75particular, `mkdir()` and `rmdir()` each create or remove a directory named
76by the final component, and they are required to work with pathnames
77ending in "`/`". According to [POSIX]
78
79> A pathname that contains at least one non- &lt;slash> character and
80> that ends with one or more trailing &lt;slash> characters shall not
81> be resolved successfully unless the last pathname component before
82> the trailing <slash> characters names an existing directory or a
83> directory entry that is to be created for a directory immediately
84> after the pathname is resolved.
85
86The Linux pathname walking code (mostly in `fs/namei.c`) deals with
87all of these issues: breaking the path into components, handling the
88"everything else" quite separately from the final component, and
89checking that the trailing slash is not used where it isn't
90permitted. It also addresses the important issue of concurrent
91access.
92
93While one process is looking up a pathname, another might be making
94changes that affect that lookup. One fairly extreme case is that if
95"a/b" were renamed to "a/c/b" while another process were looking up
96"a/b/..", that process might successfully resolve on "a/c".
97Most races are much more subtle, and a big part of the task of
98pathname lookup is to prevent them from having damaging effects. Many
99of the possible races are seen most clearly in the context of the
100"dcache" and an understanding of that is central to understanding
101pathname lookup.
102
103More than just a cache.
104-----------------------
105
106The "dcache" caches information about names in each filesystem to
107make them quickly available for lookup. Each entry (known as a
108"dentry") contains three significant fields: a component name, a
109pointer to a parent dentry, and a pointer to the "inode" which
110contains further information about the object in that parent with
111the given name. The inode pointer can be `NULL` indicating that the
112name doesn't exist in the parent. While there can be linkage in the
113dentry of a directory to the dentries of the children, that linkage is
114not used for pathname lookup, and so will not be considered here.
115
116The dcache has a number of uses apart from accelerating lookup. One
117that will be particularly relevant is that it is closely integrated
118with the mount table that records which filesystem is mounted where.
119What the mount table actually stores is which dentry is mounted on top
120of which other dentry.
121
122When considering the dcache, we have another of our "two types"
123distinctions: there are two types of filesystems.
124
125Some filesystems ensure that the information in the dcache is always
126completely accurate (though not necessarily complete). This can allow
127the VFS to determine if a particular file does or doesn't exist
128without checking with the filesystem, and means that the VFS can
129protect the filesystem against certain races and other problems.
130These are typically "local" filesystems such as ext3, XFS, and Btrfs.
131
132Other filesystems don't provide that guarantee because they cannot.
133These are typically filesystems that are shared across a network,
134whether remote filesystems like NFS and 9P, or cluster filesystems
135like ocfs2 or cephfs. These filesystems allow the VFS to revalidate
136cached information, and must provide their own protection against
137awkward races. The VFS can detect these filesystems by the
138`DCACHE_OP_REVALIDATE` flag being set in the dentry.
139
140REF-walk: simple concurrency management with refcounts and spinlocks
141--------------------------------------------------------------------
142
143With all of those divisions carefully classified, we can now start
144looking at the actual process of walking along a path. In particular
145we will start with the handling of the "everything else" part of a
146pathname, and focus on the "REF-walk" approach to concurrency
147management. This code is found in the `link_path_walk()` function, if
148you ignore all the places that only run when "`LOOKUP_RCU`"
149(indicating the use of RCU-walk) is set.
150
151[Meet the Lockers]: https://lwn.net/Articles/453685/
152
153REF-walk is fairly heavy-handed with locks and reference counts. Not
154as heavy-handed as in the old "big kernel lock" days, but certainly not
155afraid of taking a lock when one is needed. It uses a variety of
156different concurrency controls. A background understanding of the
157various primitives is assumed, or can be gleaned from elsewhere such
158as in [Meet the Lockers].
159
160The locking mechanisms used by REF-walk include:
161
162### dentry->d_lockref ###
163
164This uses the lockref primitive to provide both a spinlock and a
165reference count. The special-sauce of this primitive is that the
166conceptual sequence "lock; inc_ref; unlock;" can often be performed
167with a single atomic memory operation.
168
169Holding a reference on a dentry ensures that the dentry won't suddenly
170be freed and used for something else, so the values in various fields
171will behave as expected. It also protects the `->d_inode` reference
172to the inode to some extent.
173
174The association between a dentry and its inode is fairly permanent.
175For example, when a file is renamed, the dentry and inode move
176together to the new location. When a file is created the dentry will
177initially be negative (i.e. `d_inode` is `NULL`), and will be assigned
178to the new inode as part of the act of creation.
179
180When a file is deleted, this can be reflected in the cache either by
181setting `d_inode` to `NULL`, or by removing it from the hash table
182(described shortly) used to look up the name in the parent directory.
183If the dentry is still in use the second option is used as it is
184perfectly legal to keep using an open file after it has been deleted
185and having the dentry around helps. If the dentry is not otherwise in
186use (i.e. if the refcount in `d_lockref` is one), only then will
187`d_inode` be set to `NULL`. Doing it this way is more efficient for a
188very common case.
189
190So as long as a counted reference is held to a dentry, a non-`NULL` `->d_inode`
191value will never be changed.
192
193### dentry->d_lock ###
194
195`d_lock` is a synonym for the spinlock that is part of `d_lockref` above.
196For our purposes, holding this lock protects against the dentry being
197renamed or unlinked. In particular, its parent (`d_parent`), and its
198name (`d_name`) cannot be changed, and it cannot be removed from the
199dentry hash table.
200
201When looking for a name in a directory, REF-walk takes `d_lock` on
202each candidate dentry that it finds in the hash table and then checks
203that the parent and name are correct. So it doesn't lock the parent
204while searching in the cache; it only locks children.
205
206When looking for the parent for a given name (to handle "`..`"),
207REF-walk can take `d_lock` to get a stable reference to `d_parent`,
208but it first tries a more lightweight approach. As seen in
209`dget_parent()`, if a reference can be claimed on the parent, and if
210subsequently `d_parent` can be seen to have not changed, then there is
211no need to actually take the lock on the child.
212
213### rename_lock ###
214
215Looking up a given name in a given directory involves computing a hash
216from the two values (the name and the dentry of the directory),
217accessing that slot in a hash table, and searching the linked list
218that is found there.
219
220When a dentry is renamed, the name and the parent dentry can both
221change so the hash will almost certainly change too. This would move the
222dentry to a different chain in the hash table. If a filename search
223happened to be looking at a dentry that was moved in this way,
224it might end up continuing the search down the wrong chain,
225and so miss out on part of the correct chain.
226
227The name-lookup process (`d_lookup()`) does _not_ try to prevent this
228from happening, but only to detect when it happens.
229`rename_lock` is a seqlock that is updated whenever any dentry is
230renamed. If `d_lookup` finds that a rename happened while it
231unsuccessfully scanned a chain in the hash table, it simply tries
232again.
233
234### inode->i_mutex ###
235
236`i_mutex` is a mutex that serializes all changes to a particular
237directory. This ensures that, for example, an `unlink()` and a `rename()`
238cannot both happen at the same time. It also keeps the directory
239stable while the filesystem is asked to look up a name that is not
240currently in the dcache.
241
242This has a complementary role to that of `d_lock`: `i_mutex` on a
243directory protects all of the names in that directory, while `d_lock`
244on a name protects just one name in a directory. Most changes to the
245dcache hold `i_mutex` on the relevant directory inode and briefly take
246`d_lock` on one or more the dentries while the change happens. One
247exception is when idle dentries are removed from the dcache due to
248memory pressure. This uses `d_lock`, but `i_mutex` plays no role.
249
250The mutex affects pathname lookup in two distinct ways. Firstly it
251serializes lookup of a name in a directory. `walk_component()` uses
252`lookup_fast()` first which, in turn, checks to see if the name is in the cache,
253using only `d_lock` locking. If the name isn't found, then `walk_component()`
254falls back to `lookup_slow()` which takes `i_mutex`, checks again that
255the name isn't in the cache, and then calls in to the filesystem to get a
256definitive answer. A new dentry will be added to the cache regardless of
257the result.
258
259Secondly, when pathname lookup reaches the final component, it will
260sometimes need to take `i_mutex` before performing the last lookup so
261that the required exclusion can be achieved. How path lookup chooses
262to take, or not take, `i_mutex` is one of the
263issues addressed in a subsequent section.
264
265### mnt->mnt_count ###
266
267`mnt_count` is a per-CPU reference counter on "`mount`" structures.
268Per-CPU here means that incrementing the count is cheap as it only
269uses CPU-local memory, but checking if the count is zero is expensive as
270it needs to check with every CPU. Taking a `mnt_count` reference
271prevents the mount structure from disappearing as the result of regular
272unmount operations, but does not prevent a "lazy" unmount. So holding
273`mnt_count` doesn't ensure that the mount remains in the namespace and,
274in particular, doesn't stabilize the link to the mounted-on dentry. It
275does, however, ensure that the `mount` data structure remains coherent,
276and it provides a reference to the root dentry of the mounted
277filesystem. So a reference through `->mnt_count` provides a stable
278reference to the mounted dentry, but not the mounted-on dentry.
279
280### mount_lock ###
281
282`mount_lock` is a global seqlock, a bit like `rename_lock`. It can be used to
283check if any change has been made to any mount points.
284
285While walking down the tree (away from the root) this lock is used when
286crossing a mount point to check that the crossing was safe. That is,
287the value in the seqlock is read, then the code finds the mount that
288is mounted on the current directory, if there is one, and increments
289the `mnt_count`. Finally the value in `mount_lock` is checked against
290the old value. If there is no change, then the crossing was safe. If there
291was a change, the `mnt_count` is decremented and the whole process is
292retried.
293
294When walking up the tree (towards the root) by following a ".." link,
295a little more care is needed. In this case the seqlock (which
296contains both a counter and a spinlock) is fully locked to prevent
297any changes to any mount points while stepping up. This locking is
298needed to stabilize the link to the mounted-on dentry, which the
299refcount on the mount itself doesn't ensure.
300
301### RCU ###
302
303Finally the global (but extremely lightweight) RCU read lock is held
304from time to time to ensure certain data structures don't get freed
305unexpectedly.
306
307In particular it is held while scanning chains in the dcache hash
308table, and the mount point hash table.
309
310Bringing it together with `struct nameidata`
311--------------------------------------------
312
313[First edition Unix]: http://minnie.tuhs.org/cgi-bin/utree.pl?file=V1/u2.s
314
315Throughout the process of walking a path, the current status is stored
316in a `struct nameidata`, "namei" being the traditional name - dating
317all the way back to [First Edition Unix] - of the function that
318converts a "name" to an "inode". `struct nameidata` contains (among
319other fields):
320
321### `struct path path` ###
322
323A `path` contains a `struct vfsmount` (which is
324embedded in a `struct mount`) and a `struct dentry`. Together these
325record the current status of the walk. They start out referring to the
326starting point (the current working directory, the root directory, or some other
327directory identified by a file descriptor), and are updated on each
328step. A reference through `d_lockref` and `mnt_count` is always
329held.
330
331### `struct qstr last` ###
332
333This is a string together with a length (i.e. _not_ `nul` terminated)
334that is the "next" component in the pathname.
335
336### `int last_type` ###
337
338This is one of `LAST_NORM`, `LAST_ROOT`, `LAST_DOT`, `LAST_DOTDOT`, or
339`LAST_BIND`. The `last` field is only valid if the type is
340`LAST_NORM`. `LAST_BIND` is used when following a symlink and no
341components of the symlink have been processed yet. Others should be
342fairly self-explanatory.
343
344### `struct path root` ###
345
346This is used to hold a reference to the effective root of the
347filesystem. Often that reference won't be needed, so this field is
348only assigned the first time it is used, or when a non-standard root
349is requested. Keeping a reference in the `nameidata` ensures that
350only one root is in effect for the entire path walk, even if it races
351with a `chroot()` system call.
352
353The root is needed when either of two conditions holds: (1) either the
354pathname or a symbolic link starts with a "'/'", or (2) a "`..`"
355component is being handled, since "`..`" from the root must always stay
356at the root. The value used is usually the current root directory of
357the calling process. An alternate root can be provided as when
358`sysctl()` calls `file_open_root()`, and when NFSv4 or Btrfs call
359`mount_subtree()`. In each case a pathname is being looked up in a very
360specific part of the filesystem, and the lookup must not be allowed to
361escape that subtree. It works a bit like a local `chroot()`.
362
363Ignoring the handling of symbolic links, we can now describe the
364"`link_path_walk()`" function, which handles the lookup of everything
365except the final component as:
366
367> Given a path (`name`) and a nameidata structure (`nd`), check that the
368> current directory has execute permission and then advance `name`
369> over one component while updating `last_type` and `last`. If that
370> was the final component, then return, otherwise call
371> `walk_component()` and repeat from the top.
372
373`walk_component()` is even easier. If the component is `LAST_DOTS`,
374it calls `handle_dots()` which does the necessary locking as already
375described. If it finds a `LAST_NORM` component it first calls
376"`lookup_fast()`" which only looks in the dcache, but will ask the
377filesystem to revalidate the result if it is that sort of filesystem.
378If that doesn't get a good result, it calls "`lookup_slow()`" which
379takes the `i_mutex`, rechecks the cache, and then asks the filesystem
380to find a definitive answer. Each of these will call
381`follow_managed()` (as described below) to handle any mount points.
382
383In the absence of symbolic links, `walk_component()` creates a new
384`struct path` containing a counted reference to the new dentry and a
385reference to the new `vfsmount` which is only counted if it is
386different from the previous `vfsmount`. It then calls
387`path_to_nameidata()` to install the new `struct path` in the
388`struct nameidata` and drop the unneeded references.
389
390This "hand-over-hand" sequencing of getting a reference to the new
391dentry before dropping the reference to the previous dentry may
392seem obvious, but is worth pointing out so that we will recognize its
393analogue in the "RCU-walk" version.
394
395Handling the final component.
396-----------------------------
397
398`link_path_walk()` only walks as far as setting `nd->last` and
399`nd->last_type` to refer to the final component of the path. It does
400not call `walk_component()` that last time. Handling that final
401component remains for the caller to sort out. Those callers are
402`path_lookupat()`, `path_parentat()`, `path_mountpoint()` and
403`path_openat()` each of which handles the differing requirements of
404different system calls.
405
406`path_parentat()` is clearly the simplest - it just wraps a little bit
407of housekeeping around `link_path_walk()` and returns the parent
408directory and final component to the caller. The caller will be either
409aiming to create a name (via `filename_create()`) or remove or rename
410a name (in which case `user_path_parent()` is used). They will use
411`i_mutex` to exclude other changes while they validate and then
412perform their operation.
413
414`path_lookupat()` is nearly as simple - it is used when an existing
415object is wanted such as by `stat()` or `chmod()`. It essentially just
416calls `walk_component()` on the final component through a call to
417`lookup_last()`. `path_lookupat()` returns just the final dentry.
418
419`path_mountpoint()` handles the special case of unmounting which must
420not try to revalidate the mounted filesystem. It effectively
421contains, through a call to `mountpoint_last()`, an alternate
422implementation of `lookup_slow()` which skips that step. This is
423important when unmounting a filesystem that is inaccessible, such as
424one provided by a dead NFS server.
425
426Finally `path_openat()` is used for the `open()` system call; it
427contains, in support functions starting with "`do_last()`", all the
428complexity needed to handle the different subtleties of O_CREAT (with
429or without O_EXCL), final "`/`" characters, and trailing symbolic
430links. We will revisit this in the final part of this series, which
431focuses on those symbolic links. "`do_last()`" will sometimes, but
432not always, take `i_mutex`, depending on what it finds.
433
434Each of these, or the functions which call them, need to be alert to
435the possibility that the final component is not `LAST_NORM`. If the
436goal of the lookup is to create something, then any value for
437`last_type` other than `LAST_NORM` will result in an error. For
438example if `path_parentat()` reports `LAST_DOTDOT`, then the caller
439won't try to create that name. They also check for trailing slashes
440by testing `last.name[last.len]`. If there is any character beyond
441the final component, it must be a trailing slash.
442
443Revalidation and automounts
444---------------------------
445
446Apart from symbolic links, there are only two parts of the "REF-walk"
447process not yet covered. One is the handling of stale cache entries
448and the other is automounts.
449
450On filesystems that require it, the lookup routines will call the
451`->d_revalidate()` dentry method to ensure that the cached information
452is current. This will often confirm validity or update a few details
453from a server. In some cases it may find that there has been change
454further up the path and that something that was thought to be valid
455previously isn't really. When this happens the lookup of the whole
456path is aborted and retried with the "`LOOKUP_REVAL`" flag set. This
457forces revalidation to be more thorough. We will see more details of
458this retry process in the next article.
459
460Automount points are locations in the filesystem where an attempt to
461lookup a name can trigger changes to how that lookup should be
462handled, in particular by mounting a filesystem there. These are
463covered in greater detail in autofs4.txt in the Linux documentation
464tree, but a few notes specifically related to path lookup are in order
465here.
466
467The Linux VFS has a concept of "managed" dentries which is reflected
468in function names such as "`follow_managed()`". There are three
469potentially interesting things about these dentries corresponding
470to three different flags that might be set in `dentry->d_flags`:
471
472### `DCACHE_MANAGE_TRANSIT` ###
473
474If this flag has been set, then the filesystem has requested that the
475`d_manage()` dentry operation be called before handling any possible
476mount point. This can perform two particular services:
477
478It can block to avoid races. If an automount point is being
479unmounted, the `d_manage()` function will usually wait for that
480process to complete before letting the new lookup proceed and possibly
481trigger a new automount.
482
483It can selectively allow only some processes to transit through a
484mount point. When a server process is managing automounts, it may
485need to access a directory without triggering normal automount
486processing. That server process can identify itself to the `autofs`
487filesystem, which will then give it a special pass through
488`d_manage()` by returning `-EISDIR`.
489
490### `DCACHE_MOUNTED` ###
491
492This flag is set on every dentry that is mounted on. As Linux
493supports multiple filesystem namespaces, it is possible that the
494dentry may not be mounted on in *this* namespace, just in some
495other. So this flag is seen as a hint, not a promise.
496
497If this flag is set, and `d_manage()` didn't return `-EISDIR`,
498`lookup_mnt()` is called to examine the mount hash table (honoring the
499`mount_lock` described earlier) and possibly return a new `vfsmount`
500and a new `dentry` (both with counted references).
501
502### `DCACHE_NEED_AUTOMOUNT` ###
503
504If `d_manage()` allowed us to get this far, and `lookup_mnt()` didn't
505find a mount point, then this flag causes the `d_automount()` dentry
506operation to be called.
507
508The `d_automount()` operation can be arbitrarily complex and may
509communicate with server processes etc. but it should ultimately either
510report that there was an error, that there was nothing to mount, or
511should provide an updated `struct path` with new `dentry` and `vfsmount`.
512
513In the latter case, `finish_automount()` will be called to safely
514install the new mount point into the mount table.
515
516There is no new locking of import here and it is important that no
517locks (only counted references) are held over this processing due to
518the very real possibility of extended delays.
519This will become more important next time when we examine RCU-walk
520which is particularly sensitive to delays.
521
522RCU-walk - faster pathname lookup in Linux
523==========================================
524
525RCU-walk is another algorithm for performing pathname lookup in Linux.
526It is in many ways similar to REF-walk and the two share quite a bit
527of code. The significant difference in RCU-walk is how it allows for
528the possibility of concurrent access.
529
530We noted that REF-walk is complex because there are numerous details
531and special cases. RCU-walk reduces this complexity by simply
532refusing to handle a number of cases -- it instead falls back to
533REF-walk. The difficulty with RCU-walk comes from a different
534direction: unfamiliarity. The locking rules when depending on RCU are
535quite different from traditional locking, so we will spend a little extra
536time when we come to those.
537
538Clear demarcation of roles
539--------------------------
540
541The easiest way to manage concurrency is to forcibly stop any other
542thread from changing the data structures that a given thread is
543looking at. In cases where no other thread would even think of
544changing the data and lots of different threads want to read at the
545same time, this can be very costly. Even when using locks that permit
546multiple concurrent readers, the simple act of updating the count of
547the number of current readers can impose an unwanted cost. So the
548goal when reading a shared data structure that no other process is
549changing is to avoid writing anything to memory at all. Take no
550locks, increment no counts, leave no footprints.
551
552The REF-walk mechanism already described certainly doesn't follow this
553principle, but then it is really designed to work when there may well
554be other threads modifying the data. RCU-walk, in contrast, is
555designed for the common situation where there are lots of frequent
556readers and only occasional writers. This may not be common in all
557parts of the filesystem tree, but in many parts it will be. For the
558other parts it is important that RCU-walk can quickly fall back to
559using REF-walk.
560
561Pathname lookup always starts in RCU-walk mode but only remains there
562as long as what it is looking for is in the cache and is stable. It
563dances lightly down the cached filesystem image, leaving no footprints
564and carefully watching where it is, to be sure it doesn't trip. If it
565notices that something has changed or is changing, or if something
566isn't in the cache, then it tries to stop gracefully and switch to
567REF-walk.
568
569This stopping requires getting a counted reference on the current
570`vfsmount` and `dentry`, and ensuring that these are still valid -
571that a path walk with REF-walk would have found the same entries.
572This is an invariant that RCU-walk must guarantee. It can only make
573decisions, such as selecting the next step, that are decisions which
574REF-walk could also have made if it were walking down the tree at the
575same time. If the graceful stop succeeds, the rest of the path is
576processed with the reliable, if slightly sluggish, REF-walk. If
577RCU-walk finds it cannot stop gracefully, it simply gives up and
578restarts from the top with REF-walk.
579
580This pattern of "try RCU-walk, if that fails try REF-walk" can be
581clearly seen in functions like `filename_lookup()`,
582`filename_parentat()`, `filename_mountpoint()`,
583`do_filp_open()`, and `do_file_open_root()`. These five
584correspond roughly to the four `path_`* functions we met earlier,
585each of which calls `link_path_walk()`. The `path_*` functions are
586called using different mode flags until a mode is found which works.
587They are first called with `LOOKUP_RCU` set to request "RCU-walk". If
588that fails with the error `ECHILD` they are called again with no
589special flag to request "REF-walk". If either of those report the
590error `ESTALE` a final attempt is made with `LOOKUP_REVAL` set (and no
591`LOOKUP_RCU`) to ensure that entries found in the cache are forcibly
592revalidated - normally entries are only revalidated if the filesystem
593determines that they are too old to trust.
594
595The `LOOKUP_RCU` attempt may drop that flag internally and switch to
596REF-walk, but will never then try to switch back to RCU-walk. Places
597that trip up RCU-walk are much more likely to be near the leaves and
598so it is very unlikely that there will be much, if any, benefit from
599switching back.
600
601RCU and seqlocks: fast and light
602--------------------------------
603
604RCU is, unsurprisingly, critical to RCU-walk mode. The
605`rcu_read_lock()` is held for the entire time that RCU-walk is walking
606down a path. The particular guarantee it provides is that the key
607data structures - dentries, inodes, super_blocks, and mounts - will
608not be freed while the lock is held. They might be unlinked or
609invalidated in one way or another, but the memory will not be
610repurposed so values in various fields will still be meaningful. This
611is the only guarantee that RCU provides; everything else is done using
612seqlocks.
613
614As we saw above, REF-walk holds a counted reference to the current
615dentry and the current vfsmount, and does not release those references
616before taking references to the "next" dentry or vfsmount. It also
617sometimes takes the `d_lock` spinlock. These references and locks are
618taken to prevent certain changes from happening. RCU-walk must not
619take those references or locks and so cannot prevent such changes.
620Instead, it checks to see if a change has been made, and aborts or
621retries if it has.
622
623To preserve the invariant mentioned above (that RCU-walk may only make
624decisions that REF-walk could have made), it must make the checks at
625or near the same places that REF-walk holds the references. So, when
626REF-walk increments a reference count or takes a spinlock, RCU-walk
627samples the status of a seqlock using `read_seqcount_begin()` or a
628similar function. When REF-walk decrements the count or drops the
629lock, RCU-walk checks if the sampled status is still valid using
630`read_seqcount_retry()` or similar.
631
632However, there is a little bit more to seqlocks than that. If
633RCU-walk accesses two different fields in a seqlock-protected
634structure, or accesses the same field twice, there is no a priori
635guarantee of any consistency between those accesses. When consistency
636is needed - which it usually is - RCU-walk must take a copy and then
637use `read_seqcount_retry()` to validate that copy.
638
639`read_seqcount_retry()` not only checks the sequence number, but also
640imposes a memory barrier so that no memory-read instruction from
641*before* the call can be delayed until *after* the call, either by the
642CPU or by the compiler. A simple example of this can be seen in
643`slow_dentry_cmp()` which, for filesystems which do not use simple
644byte-wise name equality, calls into the filesystem to compare a name
645against a dentry. The length and name pointer are copied into local
646variables, then `read_seqcount_retry()` is called to confirm the two
647are consistent, and only then is `->d_compare()` called. When
648standard filename comparison is used, `dentry_cmp()` is called
649instead. Notably it does _not_ use `read_seqcount_retry()`, but
650instead has a large comment explaining why the consistency guarantee
651isn't necessary. A subsequent `read_seqcount_retry()` will be
652sufficient to catch any problem that could occur at this point.
653
654With that little refresher on seqlocks out of the way we can look at
655the bigger picture of how RCU-walk uses seqlocks.
656
657### `mount_lock` and `nd->m_seq` ###
658
659We already met the `mount_lock` seqlock when REF-walk used it to
660ensure that crossing a mount point is performed safely. RCU-walk uses
661it for that too, but for quite a bit more.
662
663Instead of taking a counted reference to each `vfsmount` as it
664descends the tree, RCU-walk samples the state of `mount_lock` at the
665start of the walk and stores this initial sequence number in the
666`struct nameidata` in the `m_seq` field. This one lock and one
667sequence number are used to validate all accesses to all `vfsmounts`,
668and all mount point crossings. As changes to the mount table are
669relatively rare, it is reasonable to fall back on REF-walk any time
670that any "mount" or "unmount" happens.
671
672`m_seq` is checked (using `read_seqretry()`) at the end of an RCU-walk
673sequence, whether switching to REF-walk for the rest of the path or
674when the end of the path is reached. It is also checked when stepping
675down over a mount point (in `__follow_mount_rcu()`) or up (in
676`follow_dotdot_rcu()`). If it is ever found to have changed, the
677whole RCU-walk sequence is aborted and the path is processed again by
678REF-walk.
679
680If RCU-walk finds that `mount_lock` hasn't changed then it can be sure
681that, had REF-walk taken counted references on each vfsmount, the
682results would have been the same. This ensures the invariant holds,
683at least for vfsmount structures.
684
685### `dentry->d_seq` and `nd->seq`. ###
686
687In place of taking a count or lock on `d_reflock`, RCU-walk samples
688the per-dentry `d_seq` seqlock, and stores the sequence number in the
689`seq` field of the nameidata structure, so `nd->seq` should always be
690the current sequence number of `nd->dentry`. This number needs to be
691revalidated after copying, and before using, the name, parent, or
692inode of the dentry.
693
694The handling of the name we have already looked at, and the parent is
695only accessed in `follow_dotdot_rcu()` which fairly trivially follows
696the required pattern, though it does so for three different cases.
697
698When not at a mount point, `d_parent` is followed and its `d_seq` is
699collected. When we are at a mount point, we instead follow the
700`mnt->mnt_mountpoint` link to get a new dentry and collect its
701`d_seq`. Then, after finally finding a `d_parent` to follow, we must
702check if we have landed on a mount point and, if so, must find that
703mount point and follow the `mnt->mnt_root` link. This would imply a
704somewhat unusual, but certainly possible, circumstance where the
705starting point of the path lookup was in part of the filesystem that
706was mounted on, and so not visible from the root.
707
708The inode pointer, stored in `->d_inode`, is a little more
709interesting. The inode will always need to be accessed at least
710twice, once to determine if it is NULL and once to verify access
711permissions. Symlink handling requires a validated inode pointer too.
712Rather than revalidating on each access, a copy is made on the first
713access and it is stored in the `inode` field of `nameidata` from where
714it can be safely accessed without further validation.
715
716`lookup_fast()` is the only lookup routine that is used in RCU-mode,
717`lookup_slow()` being too slow and requiring locks. It is in
718`lookup_fast()` that we find the important "hand over hand" tracking
719of the current dentry.
720
721The current `dentry` and current `seq` number are passed to
722`__d_lookup_rcu()` which, on success, returns a new `dentry` and a
723new `seq` number. `lookup_fast()` then copies the inode pointer and
724revalidates the new `seq` number. It then validates the old `dentry`
725with the old `seq` number one last time and only then continues. This
726process of getting the `seq` number of the new dentry and then
727checking the `seq` number of the old exactly mirrors the process of
728getting a counted reference to the new dentry before dropping that for
729the old dentry which we saw in REF-walk.
730
731### No `inode->i_mutex` or even `rename_lock` ###
732
733A mutex is a fairly heavyweight lock that can only be taken when it is
734permissible to sleep. As `rcu_read_lock()` forbids sleeping,
735`inode->i_mutex` plays no role in RCU-walk. If some other thread does
736take `i_mutex` and modifies the directory in a way that RCU-walk needs
737to notice, the result will be either that RCU-walk fails to find the
738dentry that it is looking for, or it will find a dentry which
739`read_seqretry()` won't validate. In either case it will drop down to
740REF-walk mode which can take whatever locks are needed.
741
742Though `rename_lock` could be used by RCU-walk as it doesn't require
743any sleeping, RCU-walk doesn't bother. REF-walk uses `rename_lock` to
744protect against the possibility of hash chains in the dcache changing
745while they are being searched. This can result in failing to find
746something that actually is there. When RCU-walk fails to find
747something in the dentry cache, whether it is really there or not, it
748already drops down to REF-walk and tries again with appropriate
749locking. This neatly handles all cases, so adding extra checks on
750rename_lock would bring no significant value.
751
752`unlazy walk()` and `complete_walk()`
753-------------------------------------
754
755That "dropping down to REF-walk" typically involves a call to
756`unlazy_walk()`, so named because "RCU-walk" is also sometimes
757referred to as "lazy walk". `unlazy_walk()` is called when
758following the path down to the current vfsmount/dentry pair seems to
759have proceeded successfully, but the next step is problematic. This
760can happen if the next name cannot be found in the dcache, if
761permission checking or name revalidation couldn't be achieved while
762the `rcu_read_lock()` is held (which forbids sleeping), if an
763automount point is found, or in a couple of cases involving symlinks.
764It is also called from `complete_walk()` when the lookup has reached
765the final component, or the very end of the path, depending on which
766particular flavor of lookup is used.
767
768Other reasons for dropping out of RCU-walk that do not trigger a call
769to `unlazy_walk()` are when some inconsistency is found that cannot be
770handled immediately, such as `mount_lock` or one of the `d_seq`
771seqlocks reporting a change. In these cases the relevant function
772will return `-ECHILD` which will percolate up until it triggers a new
773attempt from the top using REF-walk.
774
775For those cases where `unlazy_walk()` is an option, it essentially
776takes a reference on each of the pointers that it holds (vfsmount,
777dentry, and possibly some symbolic links) and then verifies that the
778relevant seqlocks have not been changed. If there have been changes,
779it, too, aborts with `-ECHILD`, otherwise the transition to REF-walk
780has been a success and the lookup process continues.
781
782Taking a reference on those pointers is not quite as simple as just
783incrementing a counter. That works to take a second reference if you
784already have one (often indirectly through another object), but it
785isn't sufficient if you don't actually have a counted reference at
786all. For `dentry->d_lockref`, it is safe to increment the reference
787counter to get a reference unless it has been explicitly marked as
788"dead" which involves setting the counter to `-128`.
789`lockref_get_not_dead()` achieves this.
790
791For `mnt->mnt_count` it is safe to take a reference as long as
792`mount_lock` is then used to validate the reference. If that
793validation fails, it may *not* be safe to just drop that reference in
794the standard way of calling `mnt_put()` - an unmount may have
795progressed too far. So the code in `legitimize_mnt()`, when it
796finds that the reference it got might not be safe, checks the
797`MNT_SYNC_UMOUNT` flag to determine if a simple `mnt_put()` is
798correct, or if it should just decrement the count and pretend none of
799this ever happened.
800
801Taking care in filesystems
802---------------------------
803
804RCU-walk depends almost entirely on cached information and often will
805not call into the filesystem at all. However there are two places,
806besides the already-mentioned component-name comparison, where the
807file system might be included in RCU-walk, and it must know to be
808careful.
809
810If the filesystem has non-standard permission-checking requirements -
811such as a networked filesystem which may need to check with the server
812- the `i_op->permission` interface might be called during RCU-walk.
813In this case an extra "`MAY_NOT_BLOCK`" flag is passed so that it
814knows not to sleep, but to return `-ECHILD` if it cannot complete
815promptly. `i_op->permission` is given the inode pointer, not the
816dentry, so it doesn't need to worry about further consistency checks.
817However if it accesses any other filesystem data structures, it must
818ensure they are safe to be accessed with only the `rcu_read_lock()`
819held. This typically means they must be freed using `kfree_rcu()` or
820similar.
821
822[`READ_ONCE()`]: https://lwn.net/Articles/624126/
823
824If the filesystem may need to revalidate dcache entries, then
825`d_op->d_revalidate` may be called in RCU-walk too. This interface
826*is* passed the dentry but does not have access to the `inode` or the
827`seq` number from the `nameidata`, so it needs to be extra careful
828when accessing fields in the dentry. This "extra care" typically
829involves using `ACCESS_ONCE()` or the newer [`READ_ONCE()`] to access
830fields, and verifying the result is not NULL before using it. This
831pattern can be see in `nfs_lookup_revalidate()`.
832
833A pair of patterns
834------------------
835
836In various places in the details of REF-walk and RCU-walk, and also in
837the big picture, there are a couple of related patterns that are worth
838being aware of.
839
840The first is "try quickly and check, if that fails try slowly". We
841can see that in the high-level approach of first trying RCU-walk and
842then trying REF-walk, and in places where `unlazy_walk()` is used to
843switch to REF-walk for the rest of the path. We also saw it earlier
844in `dget_parent()` when following a "`..`" link. It tries a quick way
845to get a reference, then falls back to taking locks if needed.
846
847The second pattern is "try quickly and check, if that fails try
848again - repeatedly". This is seen with the use of `rename_lock` and
849`mount_lock` in REF-walk. RCU-walk doesn't make use of this pattern -
850if anything goes wrong it is much safer to just abort and try a more
851sedate approach.
852
853The emphasis here is "try quickly and check". It should probably be
854"try quickly _and carefully,_ then check". The fact that checking is
855needed is a reminder that the system is dynamic and only a limited
856number of things are safe at all. The most likely cause of errors in
857this whole process is assuming something is safe when in reality it
858isn't. Careful consideration of what exactly guarantees the safety of
859each access is sometimes necessary.
860
861A walk among the symlinks
862=========================
863
864There are several basic issues that we will examine to understand the
865handling of symbolic links: the symlink stack, together with cache
866lifetimes, will help us understand the overall recursive handling of
867symlinks and lead to the special care needed for the final component.
868Then a consideration of access-time updates and summary of the various
869flags controlling lookup will finish the story.
870
871The symlink stack
872-----------------
873
874There are only two sorts of filesystem objects that can usefully
875appear in a path prior to the final component: directories and symlinks.
876Handling directories is quite straightforward: the new directory
877simply becomes the starting point at which to interpret the next
878component on the path. Handling symbolic links requires a bit more
879work.
880
881Conceptually, symbolic links could be handled by editing the path. If
882a component name refers to a symbolic link, then that component is
883replaced by the body of the link and, if that body starts with a '/',
884then all preceding parts of the path are discarded. This is what the
885"`readlink -f`" command does, though it also edits out "`.`" and
886"`..`" components.
887
888Directly editing the path string is not really necessary when looking
889up a path, and discarding early components is pointless as they aren't
890looked at anyway. Keeping track of all remaining components is
891important, but they can of course be kept separately; there is no need
892to concatenate them. As one symlink may easily refer to another,
893which in turn can refer to a third, we may need to keep the remaining
894components of several paths, each to be processed when the preceding
895ones are completed. These path remnants are kept on a stack of
896limited size.
897
898There are two reasons for placing limits on how many symlinks can
899occur in a single path lookup. The most obvious is to avoid loops.
900If a symlink referred to itself either directly or through
901intermediaries, then following the symlink can never complete
902successfully - the error `ELOOP` must be returned. Loops can be
903detected without imposing limits, but limits are the simplest solution
904and, given the second reason for restriction, quite sufficient.
905
906[outlined recently]: http://thread.gmane.org/gmane.linux.kernel/1934390/focus=1934550
907
908The second reason was [outlined recently] by Linus:
909
910> Because it's a latency and DoS issue too. We need to react well to
911> true loops, but also to "very deep" non-loops. It's not about memory
912> use, it's about users triggering unreasonable CPU resources.
913
914Linux imposes a limit on the length of any pathname: `PATH_MAX`, which
915is 4096. There are a number of reasons for this limit; not letting the
916kernel spend too much time on just one path is one of them. With
917symbolic links you can effectively generate much longer paths so some
918sort of limit is needed for the same reason. Linux imposes a limit of
919at most 40 symlinks in any one path lookup. It previously imposed a
920further limit of eight on the maximum depth of recursion, but that was
921raised to 40 when a separate stack was implemented, so there is now
922just the one limit.
923
924The `nameidata` structure that we met in an earlier article contains a
925small stack that can be used to store the remaining part of up to two
926symlinks. In many cases this will be sufficient. If it isn't, a
927separate stack is allocated with room for 40 symlinks. Pathname
928lookup will never exceed that stack as, once the 40th symlink is
929detected, an error is returned.
930
931It might seem that the name remnants are all that needs to be stored on
932this stack, but we need a bit more. To see that, we need to move on to
933cache lifetimes.
934
935Storage and lifetime of cached symlinks
936---------------------------------------
937
938Like other filesystem resources, such as inodes and directory
939entries, symlinks are cached by Linux to avoid repeated costly access
940to external storage. It is particularly important for RCU-walk to be
941able to find and temporarily hold onto these cached entries, so that
942it doesn't need to drop down into REF-walk.
943
944[object-oriented design pattern]: https://lwn.net/Articles/446317/
945
946While each filesystem is free to make its own choice, symlinks are
947typically stored in one of two places. Short symlinks are often
948stored directly in the inode. When a filesystem allocates a `struct
949inode` it typically allocates extra space to store private data (a
950common [object-oriented design pattern] in the kernel). This will
951sometimes include space for a symlink. The other common location is
952in the page cache, which normally stores the content of files. The
953pathname in a symlink can be seen as the content of that symlink and
954can easily be stored in the page cache just like file content.
955
956When neither of these is suitable, the next most likely scenario is
957that the filesystem will allocate some temporary memory and copy or
958construct the symlink content into that memory whenever it is needed.
959
960When the symlink is stored in the inode, it has the same lifetime as
961the inode which, itself, is protected by RCU or by a counted reference
962on the dentry. This means that the mechanisms that pathname lookup
963uses to access the dcache and icache (inode cache) safely are quite
964sufficient for accessing some cached symlinks safely. In these cases,
965the `i_link` pointer in the inode is set to point to wherever the
966symlink is stored and it can be accessed directly whenever needed.
967
968When the symlink is stored in the page cache or elsewhere, the
969situation is not so straightforward. A reference on a dentry or even
970on an inode does not imply any reference on cached pages of that
971inode, and even an `rcu_read_lock()` is not sufficient to ensure that
972a page will not disappear. So for these symlinks the pathname lookup
973code needs to ask the filesystem to provide a stable reference and,
974significantly, needs to release that reference when it is finished
975with it.
976
977Taking a reference to a cache page is often possible even in RCU-walk
978mode. It does require making changes to memory, which is best avoided,
979but that isn't necessarily a big cost and it is better than dropping
980out of RCU-walk mode completely. Even filesystems that allocate
981space to copy the symlink into can use `GFP_ATOMIC` to often successfully
982allocate memory without the need to drop out of RCU-walk. If a
983filesystem cannot successfully get a reference in RCU-walk mode, it
984must return `-ECHILD` and `unlazy_walk()` will be called to return to
985REF-walk mode in which the filesystem is allowed to sleep.
986
987The place for all this to happen is the `i_op->follow_link()` inode
988method. In the present mainline code this is never actually called in
989RCU-walk mode as the rewrite is not quite complete. It is likely that
990in a future release this method will be passed an `inode` pointer when
991called in RCU-walk mode so it both (1) knows to be careful, and (2) has the
992validated pointer. Much like the `i_op->permission()` method we
993looked at previously, `->follow_link()` would need to be careful that
994all the data structures it references are safe to be accessed while
995holding no counted reference, only the RCU lock. Though getting a
996reference with `->follow_link()` is not yet done in RCU-walk mode, the
997code is ready to release the reference when that does happen.
998
999This need to drop the reference to a symlink adds significant
1000complexity. It requires a reference to the inode so that the
1001`i_op->put_link()` inode operation can be called. In REF-walk, that
1002reference is kept implicitly through a reference to the dentry, so
1003keeping the `struct path` of the symlink is easiest. For RCU-walk,
1004the pointer to the inode is kept separately. To allow switching from
1005RCU-walk back to REF-walk in the middle of processing nested symlinks
1006we also need the seq number for the dentry so we can confirm that
1007switching back was safe.
1008
1009Finally, when providing a reference to a symlink, the filesystem also
1010provides an opaque "cookie" that must be passed to `->put_link()` so that it
1011knows what to free. This might be the allocated memory area, or a
1012pointer to the `struct page` in the page cache, or something else
1013completely. Only the filesystem knows what it is.
1014
1015In order for the reference to each symlink to be dropped when the walk completes,
1016whether in RCU-walk or REF-walk, the symlink stack needs to contain,
1017along with the path remnants:
1018
1019- the `struct path` to provide a reference to the inode in REF-walk
1020- the `struct inode *` to provide a reference to the inode in RCU-walk
1021- the `seq` to allow the path to be safely switched from RCU-walk to REF-walk
1022- the `cookie` that tells `->put_path()` what to put.
1023
1024This means that each entry in the symlink stack needs to hold five
1025pointers and an integer instead of just one pointer (the path
1026remnant). On a 64-bit system, this is about 40 bytes per entry;
1027with 40 entries it adds up to 1600 bytes total, which is less than
1028half a page. So it might seem like a lot, but is by no means
1029excessive.
1030
1031Note that, in a given stack frame, the path remnant (`name`) is not
1032part of the symlink that the other fields refer to. It is the remnant
1033to be followed once that symlink has been fully parsed.
1034
1035Following the symlink
1036---------------------
1037
1038The main loop in `link_path_walk()` iterates seamlessly over all
1039components in the path and all of the non-final symlinks. As symlinks
1040are processed, the `name` pointer is adjusted to point to a new
1041symlink, or is restored from the stack, so that much of the loop
1042doesn't need to notice. Getting this `name` variable on and off the
1043stack is very straightforward; pushing and popping the references is
1044a little more complex.
1045
1046When a symlink is found, `walk_component()` returns the value `1`
1047(`0` is returned for any other sort of success, and a negative number
1048is, as usual, an error indicator). This causes `get_link()` to be
1049called; it then gets the link from the filesystem. Providing that
1050operation is successful, the old path `name` is placed on the stack,
1051and the new value is used as the `name` for a while. When the end of
1052the path is found (i.e. `*name` is `'\0'`) the old `name` is restored
1053off the stack and path walking continues.
1054
1055Pushing and popping the reference pointers (inode, cookie, etc.) is more
1056complex in part because of the desire to handle tail recursion. When
1057the last component of a symlink itself points to a symlink, we
1058want to pop the symlink-just-completed off the stack before pushing
1059the symlink-just-found to avoid leaving empty path remnants that would
1060just get in the way.
1061
1062It is most convenient to push the new symlink references onto the
1063stack in `walk_component()` immediately when the symlink is found;
1064`walk_component()` is also the last piece of code that needs to look at the
1065old symlink as it walks that last component. So it is quite
1066convenient for `walk_component()` to release the old symlink and pop
1067the references just before pushing the reference information for the
1068new symlink. It is guided in this by two flags; `WALK_GET`, which
1069gives it permission to follow a symlink if it finds one, and
1070`WALK_PUT`, which tells it to release the current symlink after it has been
1071followed. `WALK_PUT` is tested first, leading to a call to
1072`put_link()`. `WALK_GET` is tested subsequently (by
1073`should_follow_link()`) leading to a call to `pick_link()` which sets
1074up the stack frame.
1075
1076### Symlinks with no final component ###
1077
1078A pair of special-case symlinks deserve a little further explanation.
1079Both result in a new `struct path` (with mount and dentry) being set
1080up in the `nameidata`, and result in `get_link()` returning `NULL`.
1081
1082The more obvious case is a symlink to "`/`". All symlinks starting
1083with "`/`" are detected in `get_link()` which resets the `nameidata`
1084to point to the effective filesystem root. If the symlink only
1085contains "`/`" then there is nothing more to do, no components at all,
1086so `NULL` is returned to indicate that the symlink can be released and
1087the stack frame discarded.
1088
1089The other case involves things in `/proc` that look like symlinks but
1090aren't really.
1091
1092> $ ls -l /proc/self/fd/1
1093> lrwx------ 1 neilb neilb 64 Jun 13 10:19 /proc/self/fd/1 -> /dev/pts/4
1094
1095Every open file descriptor in any process is represented in `/proc` by
1096something that looks like a symlink. It is really a reference to the
1097target file, not just the name of it. When you `readlink` these
1098objects you get a name that might refer to the same file - unless it
1099has been unlinked or mounted over. When `walk_component()` follows
1100one of these, the `->follow_link()` method in "procfs" doesn't return
1101a string name, but instead calls `nd_jump_link()` which updates the
1102`nameidata` in place to point to that target. `->follow_link()` then
1103returns `NULL`. Again there is no final component and `get_link()`
1104reports this by leaving the `last_type` field of `nameidata` as
1105`LAST_BIND`.
1106
1107Following the symlink in the final component
1108--------------------------------------------
1109
1110All this leads to `link_path_walk()` walking down every component, and
1111following all symbolic links it finds, until it reaches the final
1112component. This is just returned in the `last` field of `nameidata`.
1113For some callers, this is all they need; they want to create that
1114`last` name if it doesn't exist or give an error if it does. Other
1115callers will want to follow a symlink if one is found, and possibly
1116apply special handling to the last component of that symlink, rather
1117than just the last component of the original file name. These callers
1118potentially need to call `link_path_walk()` again and again on
1119successive symlinks until one is found that doesn't point to another
1120symlink.
1121
1122This case is handled by the relevant caller of `link_path_walk()`, such as
1123`path_lookupat()` using a loop that calls `link_path_walk()`, and then
1124handles the final component. If the final component is a symlink
1125that needs to be followed, then `trailing_symlink()` is called to set
1126things up properly and the loop repeats, calling `link_path_walk()`
1127again. This could loop as many as 40 times if the last component of
1128each symlink is another symlink.
1129
1130The various functions that examine the final component and possibly
1131report that it is a symlink are `lookup_last()`, `mountpoint_last()`
1132and `do_last()`, each of which use the same convention as
1133`walk_component()` of returning `1` if a symlink was found that needs
1134to be followed.
1135
1136Of these, `do_last()` is the most interesting as it is used for
1137opening a file. Part of `do_last()` runs with `i_mutex` held and this
1138part is in a separate function: `lookup_open()`.
1139
1140Explaining `do_last()` completely is beyond the scope of this article,
1141but a few highlights should help those interested in exploring the
1142code.
1143
11441. Rather than just finding the target file, `do_last()` needs to open
1145 it. If the file was found in the dcache, then `vfs_open()` is used for
1146 this. If not, then `lookup_open()` will either call `atomic_open()` (if
1147 the filesystem provides it) to combine the final lookup with the open, or
1148 will perform the separate `lookup_real()` and `vfs_create()` steps
1149 directly. In the later case the actual "open" of this newly found or
1150 created file will be performed by `vfs_open()`, just as if the name
1151 were found in the dcache.
1152
11532. `vfs_open()` can fail with `-EOPENSTALE` if the cached information
1154 wasn't quite current enough. Rather than restarting the lookup from
1155 the top with `LOOKUP_REVAL` set, `lookup_open()` is called instead,
1156 giving the filesystem a chance to resolve small inconsistencies.
1157 If that doesn't work, only then is the lookup restarted from the top.
1158
11593. An open with O_CREAT **does** follow a symlink in the final component,
1160 unlike other creation system calls (like `mkdir`). So the sequence:
1161
1162 > ln -s bar /tmp/foo
1163 > echo hello > /tmp/foo
1164
1165 will create a file called `/tmp/bar`. This is not permitted if
1166 `O_EXCL` is set but otherwise is handled for an O_CREAT open much
1167 like for a non-creating open: `should_follow_link()` returns `1`, and
1168 so does `do_last()` so that `trailing_symlink()` gets called and the
1169 open process continues on the symlink that was found.
1170
1171Updating the access time
1172------------------------
1173
1174We previously said of RCU-walk that it would "take no locks, increment
1175no counts, leave no footprints." We have since seen that some
1176"footprints" can be needed when handling symlinks as a counted
1177reference (or even a memory allocation) may be needed. But these
1178footprints are best kept to a minimum.
1179
1180One other place where walking down a symlink can involve leaving
1181footprints in a way that doesn't affect directories is in updating access times.
1182In Unix (and Linux) every filesystem object has a "last accessed
1183time", or "`atime`". Passing through a directory to access a file
1184within is not considered to be an access for the purposes of
1185`atime`; only listing the contents of a directory can update its `atime`.
1186Symlinks are different it seems. Both reading a symlink (with `readlink()`)
1187and looking up a symlink on the way to some other destination can
1188update the atime on that symlink.
1189
1190[clearest statement]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_08
1191
1192It is not clear why this is the case; POSIX has little to say on the
1193subject. The [clearest statement] is that, if a particular implementation
1194updates a timestamp in a place not specified by POSIX, this must be
1195documented "except that any changes caused by pathname resolution need
1196not be documented". This seems to imply that POSIX doesn't really
1197care about access-time updates during pathname lookup.
1198
1199[Linux 1.3.87]: https://git.kernel.org/cgit/linux/kernel/git/history/history.git/diff/fs/ext2/symlink.c?id=f806c6db77b8eaa6e00dcfb6b567706feae8dbb8
1200
1201An examination of history shows that prior to [Linux 1.3.87], the ext2
1202filesystem, at least, didn't update atime when following a link.
1203Unfortunately we have no record of why that behavior was changed.
1204
1205In any case, access time must now be updated and that operation can be
1206quite complex. Trying to stay in RCU-walk while doing it is best
1207avoided. Fortunately it is often permitted to skip the `atime`
1208update. Because `atime` updates cause performance problems in various
1209areas, Linux supports the `relatime` mount option, which generally
1210limits the updates of `atime` to once per day on files that aren't
1211being changed (and symlinks never change once created). Even without
1212`relatime`, many filesystems record `atime` with a one-second
1213granularity, so only one update per second is required.
1214
1215It is easy to test if an `atime` update is needed while in RCU-walk
1216mode and, if it isn't, the update can be skipped and RCU-walk mode
1217continues. Only when an `atime` update is actually required does the
1218path walk drop down to REF-walk. All of this is handled in the
1219`get_link()` function.
1220
1221A few flags
1222-----------
1223
1224A suitable way to wrap up this tour of pathname walking is to list
1225the various flags that can be stored in the `nameidata` to guide the
1226lookup process. Many of these are only meaningful on the final
1227component, others reflect the current state of the pathname lookup.
1228And then there is `LOOKUP_EMPTY`, which doesn't fit conceptually with
1229the others. If this is not set, an empty pathname causes an error
1230very early on. If it is set, empty pathnames are not considered to be
1231an error.
1232
1233### Global state flags ###
1234
1235We have already met two global state flags: `LOOKUP_RCU` and
1236`LOOKUP_REVAL`. These select between one of three overall approaches
1237to lookup: RCU-walk, REF-walk, and REF-walk with forced revalidation.
1238
1239`LOOKUP_PARENT` indicates that the final component hasn't been reached
1240yet. This is primarily used to tell the audit subsystem the full
1241context of a particular access being audited.
1242
1243`LOOKUP_ROOT` indicates that the `root` field in the `nameidata` was
1244provided by the caller, so it shouldn't be released when it is no
1245longer needed.
1246
1247`LOOKUP_JUMPED` means that the current dentry was chosen not because
1248it had the right name but for some other reason. This happens when
1249following "`..`", following a symlink to `/`, crossing a mount point
1250or accessing a "`/proc/$PID/fd/$FD`" symlink. In this case the
1251filesystem has not been asked to revalidate the name (with
1252`d_revalidate()`). In such cases the inode may still need to be
1253revalidated, so `d_op->d_weak_revalidate()` is called if
1254`LOOKUP_JUMPED` is set when the look completes - which may be at the
1255final component or, when creating, unlinking, or renaming, at the penultimate component.
1256
1257### Final-component flags ###
1258
1259Some of these flags are only set when the final component is being
1260considered. Others are only checked for when considering that final
1261component.
1262
1263`LOOKUP_AUTOMOUNT` ensures that, if the final component is an automount
1264point, then the mount is triggered. Some operations would trigger it
1265anyway, but operations like `stat()` deliberately don't. `statfs()`
1266needs to trigger the mount but otherwise behaves a lot like `stat()`, so
1267it sets `LOOKUP_AUTOMOUNT`, as does "`quotactl()`" and the handling of
1268"`mount --bind`".
1269
1270`LOOKUP_FOLLOW` has a similar function to `LOOKUP_AUTOMOUNT` but for
1271symlinks. Some system calls set or clear it implicitly, while
1272others have API flags such as `AT_SYMLINK_FOLLOW` and
1273`UMOUNT_NOFOLLOW` to control it. Its effect is similar to
1274`WALK_GET` that we already met, but it is used in a different way.
1275
1276`LOOKUP_DIRECTORY` insists that the final component is a directory.
1277Various callers set this and it is also set when the final component
1278is found to be followed by a slash.
1279
1280Finally `LOOKUP_OPEN`, `LOOKUP_CREATE`, `LOOKUP_EXCL`, and
1281`LOOKUP_RENAME_TARGET` are not used directly by the VFS but are made
1282available to the filesystem and particularly the `->d_revalidate()`
1283method. A filesystem can choose not to bother revalidating too hard
1284if it knows that it will be asked to open or create the file soon.
1285These flags were previously useful for `->lookup()` too but with the
1286introduction of `->atomic_open()` they are less relevant there.
1287
1288End of the road
1289---------------
1290
1291Despite its complexity, all this pathname lookup code appears to be
1292in good shape - various parts are certainly easier to understand now
1293than even a couple of releases ago. But that doesn't mean it is
1294"finished". As already mentioned, RCU-walk currently only follows
1295symlinks that are stored in the inode so, while it handles many ext4
1296symlinks, it doesn't help with NFS, XFS, or Btrfs. That support
1297is not likely to be long delayed.
diff --git a/Documentation/filesystems/path-lookup.txt b/Documentation/filesystems/path-lookup.txt
index 3571667c7105..9b8930f589d9 100644
--- a/Documentation/filesystems/path-lookup.txt
+++ b/Documentation/filesystems/path-lookup.txt
@@ -379,4 +379,4 @@ Papers and other documentation on dcache locking
379 379
3802. http://lse.sourceforge.net/locking/dcache/dcache.html 3802. http://lse.sourceforge.net/locking/dcache/dcache.html
381 381
382 3823. path-lookup.md in this directory.
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index d411ca63c8b6..402ab99e409f 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -140,7 +140,8 @@ Table 1-1: Process specific entries in /proc
140 stat Process status 140 stat Process status
141 statm Process memory status information 141 statm Process memory status information
142 status Process status in human readable form 142 status Process status in human readable form
143 wchan If CONFIG_KALLSYMS is set, a pre-decoded wchan 143 wchan Present with CONFIG_KALLSYMS=y: it shows the kernel function
144 symbol the task is blocked in - or "0" if not blocked.
144 pagemap Page table 145 pagemap Page table
145 stack Report full stack trace, enable via CONFIG_STACKTRACE 146 stack Report full stack trace, enable via CONFIG_STACKTRACE
146 smaps a extension based on maps, showing the memory consumption of 147 smaps a extension based on maps, showing the memory consumption of
@@ -174,6 +175,7 @@ read the file /proc/PID/status:
174 VmLib: 1412 kB 175 VmLib: 1412 kB
175 VmPTE: 20 kb 176 VmPTE: 20 kb
176 VmSwap: 0 kB 177 VmSwap: 0 kB
178 HugetlbPages: 0 kB
177 Threads: 1 179 Threads: 1
178 SigQ: 0/28578 180 SigQ: 0/28578
179 SigPnd: 0000000000000000 181 SigPnd: 0000000000000000
@@ -237,6 +239,7 @@ Table 1-2: Contents of the status files (as of 4.1)
237 VmPTE size of page table entries 239 VmPTE size of page table entries
238 VmPMD size of second level page tables 240 VmPMD size of second level page tables
239 VmSwap size of swap usage (the number of referred swapents) 241 VmSwap size of swap usage (the number of referred swapents)
242 HugetlbPages size of hugetlb memory portions
240 Threads number of threads 243 Threads number of threads
241 SigQ number of signals queued/max. number for queue 244 SigQ number of signals queued/max. number for queue
242 SigPnd bitmap of pending signals for the thread 245 SigPnd bitmap of pending signals for the thread
@@ -310,7 +313,7 @@ Table 1-4: Contents of the stat files (as of 2.6.30-rc7)
310 blocked bitmap of blocked signals 313 blocked bitmap of blocked signals
311 sigign bitmap of ignored signals 314 sigign bitmap of ignored signals
312 sigcatch bitmap of caught signals 315 sigcatch bitmap of caught signals
313 wchan address where process went to sleep 316 0 (place holder, used to be the wchan address, use /proc/PID/wchan instead)
314 0 (place holder) 317 0 (place holder)
315 0 (place holder) 318 0 (place holder)
316 exit_signal signal to send to parent thread on exit 319 exit_signal signal to send to parent thread on exit
@@ -423,12 +426,15 @@ Private_Clean: 0 kB
423Private_Dirty: 0 kB 426Private_Dirty: 0 kB
424Referenced: 892 kB 427Referenced: 892 kB
425Anonymous: 0 kB 428Anonymous: 0 kB
429AnonHugePages: 0 kB
430Shared_Hugetlb: 0 kB
431Private_Hugetlb: 0 kB
426Swap: 0 kB 432Swap: 0 kB
427SwapPss: 0 kB 433SwapPss: 0 kB
428KernelPageSize: 4 kB 434KernelPageSize: 4 kB
429MMUPageSize: 4 kB 435MMUPageSize: 4 kB
430Locked: 374 kB 436Locked: 0 kB
431VmFlags: rd ex mr mw me de 437VmFlags: rd ex mr mw me dw
432 438
433the first of these lines shows the same information as is displayed for the 439the first of these lines shows the same information as is displayed for the
434mapping in /proc/PID/maps. The remaining lines show the size of the mapping 440mapping in /proc/PID/maps. The remaining lines show the size of the mapping
@@ -448,9 +454,14 @@ accessed.
448"Anonymous" shows the amount of memory that does not belong to any file. Even 454"Anonymous" shows the amount of memory that does not belong to any file. Even
449a mapping associated with a file may contain anonymous pages: when MAP_PRIVATE 455a mapping associated with a file may contain anonymous pages: when MAP_PRIVATE
450and a page is modified, the file page is replaced by a private anonymous copy. 456and a page is modified, the file page is replaced by a private anonymous copy.
451"Swap" shows how much would-be-anonymous memory is also used, but out on 457"AnonHugePages" shows the ammount of memory backed by transparent hugepage.
452swap. 458"Shared_Hugetlb" and "Private_Hugetlb" show the ammounts of memory backed by
459hugetlbfs page which is *not* counted in "RSS" or "PSS" field for historical
460reasons. And these are not included in {Shared,Private}_{Clean,Dirty} field.
461"Swap" shows how much would-be-anonymous memory is also used, but out on swap.
453"SwapPss" shows proportional swap share of this mapping. 462"SwapPss" shows proportional swap share of this mapping.
463"Locked" indicates whether the mapping is locked in memory or not.
464
454"VmFlags" field deserves a separate description. This member represents the kernel 465"VmFlags" field deserves a separate description. This member represents the kernel
455flags associated with the particular virtual memory area in two letter encoded 466flags associated with the particular virtual memory area in two letter encoded
456manner. The codes are the following: 467manner. The codes are the following:
@@ -474,7 +485,6 @@ manner. The codes are the following:
474 ac - area is accountable 485 ac - area is accountable
475 nr - swap space is not reserved for the area 486 nr - swap space is not reserved for the area
476 ht - area uses huge tlb pages 487 ht - area uses huge tlb pages
477 nl - non-linear mapping
478 ar - architecture specific flag 488 ar - architecture specific flag
479 dd - do not include area into core dump 489 dd - do not include area into core dump
480 sd - soft-dirty flag 490 sd - soft-dirty flag
@@ -814,9 +824,6 @@ varies by architecture and compile options. The following is from a
814 824
815> cat /proc/meminfo 825> cat /proc/meminfo
816 826
817The "Locked" indicates whether the mapping is locked in memory or not.
818
819
820MemTotal: 16344972 kB 827MemTotal: 16344972 kB
821MemFree: 13634064 kB 828MemFree: 13634064 kB
822MemAvailable: 14836172 kB 829MemAvailable: 14836172 kB
@@ -1598,16 +1605,16 @@ Documentation/accounting.
1598--------------------------------------------------------------- 1605---------------------------------------------------------------
1599When a process is dumped, all anonymous memory is written to a core file as 1606When a process is dumped, all anonymous memory is written to a core file as
1600long as the size of the core file isn't limited. But sometimes we don't want 1607long as the size of the core file isn't limited. But sometimes we don't want
1601to dump some memory segments, for example, huge shared memory. Conversely, 1608to dump some memory segments, for example, huge shared memory or DAX.
1602sometimes we want to save file-backed memory segments into a core file, not 1609Conversely, sometimes we want to save file-backed memory segments into a core
1603only the individual files. 1610file, not only the individual files.
1604 1611
1605/proc/<pid>/coredump_filter allows you to customize which memory segments 1612/proc/<pid>/coredump_filter allows you to customize which memory segments
1606will be dumped when the <pid> process is dumped. coredump_filter is a bitmask 1613will be dumped when the <pid> process is dumped. coredump_filter is a bitmask
1607of memory types. If a bit of the bitmask is set, memory segments of the 1614of memory types. If a bit of the bitmask is set, memory segments of the
1608corresponding memory type are dumped, otherwise they are not dumped. 1615corresponding memory type are dumped, otherwise they are not dumped.
1609 1616
1610The following 7 memory types are supported: 1617The following 9 memory types are supported:
1611 - (bit 0) anonymous private memory 1618 - (bit 0) anonymous private memory
1612 - (bit 1) anonymous shared memory 1619 - (bit 1) anonymous shared memory
1613 - (bit 2) file-backed private memory 1620 - (bit 2) file-backed private memory
@@ -1616,20 +1623,22 @@ The following 7 memory types are supported:
1616 effective only if the bit 2 is cleared) 1623 effective only if the bit 2 is cleared)
1617 - (bit 5) hugetlb private memory 1624 - (bit 5) hugetlb private memory
1618 - (bit 6) hugetlb shared memory 1625 - (bit 6) hugetlb shared memory
1626 - (bit 7) DAX private memory
1627 - (bit 8) DAX shared memory
1619 1628
1620 Note that MMIO pages such as frame buffer are never dumped and vDSO pages 1629 Note that MMIO pages such as frame buffer are never dumped and vDSO pages
1621 are always dumped regardless of the bitmask status. 1630 are always dumped regardless of the bitmask status.
1622 1631
1623 Note bit 0-4 doesn't effect any hugetlb memory. hugetlb memory are only 1632 Note that bits 0-4 don't affect hugetlb or DAX memory. hugetlb memory is
1624 effected by bit 5-6. 1633 only affected by bit 5-6, and DAX is only affected by bits 7-8.
1625 1634
1626Default value of coredump_filter is 0x23; this means all anonymous memory 1635The default value of coredump_filter is 0x33; this means all anonymous memory
1627segments and hugetlb private memory are dumped. 1636segments, ELF header pages and hugetlb private memory are dumped.
1628 1637
1629If you don't want to dump all shared memory segments attached to pid 1234, 1638If you don't want to dump all shared memory segments attached to pid 1234,
1630write 0x21 to the process's proc file. 1639write 0x31 to the process's proc file.
1631 1640
1632 $ echo 0x21 > /proc/1234/coredump_filter 1641 $ echo 0x31 > /proc/1234/coredump_filter
1633 1642
1634When a new process is created, the process inherits the bitmask status from its 1643When a new process is created, the process inherits the bitmask status from its
1635parent. It is useful to set up coredump_filter before the program runs. 1644parent. It is useful to set up coredump_filter before the program runs.
diff --git a/Documentation/filesystems/sysfs-tagging.txt b/Documentation/filesystems/sysfs-tagging.txt
index eb843e49c5a3..c7c8e6438958 100644
--- a/Documentation/filesystems/sysfs-tagging.txt
+++ b/Documentation/filesystems/sysfs-tagging.txt
@@ -17,13 +17,13 @@ the sysfs directory entries we ensure that we don't have conflicts
17in the directories and applications only see a limited set of 17in the directories and applications only see a limited set of
18the network devices. 18the network devices.
19 19
20Each sysfs directory entry may be tagged with zero or one 20Each sysfs directory entry may be tagged with a namespace via the
21namespaces. A sysfs_dirent is augmented with a void *s_ns. If a 21void *ns member of its kernfs_node. If a directory entry is tagged,
22directory entry is tagged, then sysfs_dirent->s_flags will have a 22then kernfs_node->flags will have a flag between KOBJ_NS_TYPE_NONE
23flag between KOBJ_NS_TYPE_NONE and KOBJ_NS_TYPES, and s_ns will 23and KOBJ_NS_TYPES, and ns will point to the namespace to which it
24point to the namespace to which it belongs. 24belongs.
25 25
26Each sysfs superblock's sysfs_super_info contains an array void 26Each sysfs superblock's kernfs_super_info contains an array void
27*ns[KOBJ_NS_TYPES]. When a task in a tagging namespace 27*ns[KOBJ_NS_TYPES]. When a task in a tagging namespace
28kobj_nstype first mounts sysfs, a new superblock is created. It 28kobj_nstype first mounts sysfs, a new superblock is created. It
29will be differentiated from other sysfs mounts by having its 29will be differentiated from other sysfs mounts by having its
@@ -31,7 +31,7 @@ s_fs_info->ns[kobj_nstype] set to the new namespace. Note that
31through bind mounting and mounts propagation, a task can easily view 31through bind mounting and mounts propagation, a task can easily view
32the contents of other namespaces' sysfs mounts. Therefore, when a 32the contents of other namespaces' sysfs mounts. Therefore, when a
33namespace exits, it will call kobj_ns_exit() to invalidate any 33namespace exits, it will call kobj_ns_exit() to invalidate any
34sysfs_dirent->s_ns pointers pointing to it. 34kernfs_node->ns pointers pointing to it.
35 35
36Users of this interface: 36Users of this interface:
37- define a type in the kobj_ns_type enumeration. 37- define a type in the kobj_ns_type enumeration.
diff --git a/Documentation/filesystems/sysfs.txt b/Documentation/filesystems/sysfs.txt
index 9494afb9476a..24da7b32c489 100644
--- a/Documentation/filesystems/sysfs.txt
+++ b/Documentation/filesystems/sysfs.txt
@@ -40,7 +40,7 @@ ancestors of object hierarchies; i.e. the subsystems the objects
40belong to. 40belong to.
41 41
42Sysfs internally stores a pointer to the kobject that implements a 42Sysfs internally stores a pointer to the kobject that implements a
43directory in the sysfs_dirent object associated with the directory. In 43directory in the kernfs_node object associated with the directory. In
44the past this kobject pointer has been used by sysfs to do reference 44the past this kobject pointer has been used by sysfs to do reference
45counting directly on the kobject whenever the file is opened or closed. 45counting directly on the kobject whenever the file is opened or closed.
46With the current sysfs implementation the kobject reference count is 46With the current sysfs implementation the kobject reference count is
@@ -191,9 +191,10 @@ implementations:
191 be called again, rearmed, to fill the buffer. 191 be called again, rearmed, to fill the buffer.
192 192
193- On write(2), sysfs expects the entire buffer to be passed during the 193- On write(2), sysfs expects the entire buffer to be passed during the
194 first write. Sysfs then passes the entire buffer to the store() 194 first write. Sysfs then passes the entire buffer to the store() method.
195 method. 195 A terminating null is added after the data on stores. This makes
196 196 functions like sysfs_streq() safe to use.
197
197 When writing sysfs files, userspace processes should first read the 198 When writing sysfs files, userspace processes should first read the
198 entire file, modify the values it wishes to change, then write the 199 entire file, modify the values it wishes to change, then write the
199 entire buffer back. 200 entire buffer back.
diff --git a/Documentation/fpga/fpga-mgr.txt b/Documentation/fpga/fpga-mgr.txt
new file mode 100644
index 000000000000..ce3e84fa9023
--- /dev/null
+++ b/Documentation/fpga/fpga-mgr.txt
@@ -0,0 +1,171 @@
1FPGA Manager Core
2
3Alan Tull 2015
4
5Overview
6========
7
8The FPGA manager core exports a set of functions for programming an FPGA with
9an image. The API is manufacturer agnostic. All manufacturer specifics are
10hidden away in a low level driver which registers a set of ops with the core.
11The FPGA image data itself is very manufacturer specific, but for our purposes
12it's just binary data. The FPGA manager core won't parse it.
13
14
15API Functions:
16==============
17
18To program the FPGA from a file or from a buffer:
19-------------------------------------------------
20
21 int fpga_mgr_buf_load(struct fpga_manager *mgr, u32 flags,
22 const char *buf, size_t count);
23
24Load the FPGA from an image which exists as a buffer in memory.
25
26 int fpga_mgr_firmware_load(struct fpga_manager *mgr, u32 flags,
27 const char *image_name);
28
29Load the FPGA from an image which exists as a file. The image file must be on
30the firmware search path (see the firmware class documentation).
31
32For both these functions, flags == 0 for normal full reconfiguration or
33FPGA_MGR_PARTIAL_RECONFIG for partial reconfiguration. If successful, the FPGA
34ends up in operating mode. Return 0 on success or a negative error code.
35
36
37To get/put a reference to a FPGA manager:
38-----------------------------------------
39
40 struct fpga_manager *of_fpga_mgr_get(struct device_node *node);
41
42 void fpga_mgr_put(struct fpga_manager *mgr);
43
44Given a DT node, get an exclusive reference to a FPGA manager or release
45the reference.
46
47
48To register or unregister the low level FPGA-specific driver:
49-------------------------------------------------------------
50
51 int fpga_mgr_register(struct device *dev, const char *name,
52 const struct fpga_manager_ops *mops,
53 void *priv);
54
55 void fpga_mgr_unregister(struct device *dev);
56
57Use of these two functions is described below in "How To Support a new FPGA
58device."
59
60
61How to write an image buffer to a supported FPGA
62================================================
63/* Include to get the API */
64#include <linux/fpga/fpga-mgr.h>
65
66/* device node that specifies the FPGA manager to use */
67struct device_node *mgr_node = ...
68
69/* FPGA image is in this buffer. count is size of the buffer. */
70char *buf = ...
71int count = ...
72
73/* flags indicates whether to do full or partial reconfiguration */
74int flags = 0;
75
76int ret;
77
78/* Get exclusive control of FPGA manager */
79struct fpga_manager *mgr = of_fpga_mgr_get(mgr_node);
80
81/* Load the buffer to the FPGA */
82ret = fpga_mgr_buf_load(mgr, flags, buf, count);
83
84/* Release the FPGA manager */
85fpga_mgr_put(mgr);
86
87
88How to write an image file to a supported FPGA
89==============================================
90/* Include to get the API */
91#include <linux/fpga/fpga-mgr.h>
92
93/* device node that specifies the FPGA manager to use */
94struct device_node *mgr_node = ...
95
96/* FPGA image is in this file which is in the firmware search path */
97const char *path = "fpga-image-9.rbf"
98
99/* flags indicates whether to do full or partial reconfiguration */
100int flags = 0;
101
102int ret;
103
104/* Get exclusive control of FPGA manager */
105struct fpga_manager *mgr = of_fpga_mgr_get(mgr_node);
106
107/* Get the firmware image (path) and load it to the FPGA */
108ret = fpga_mgr_firmware_load(mgr, flags, path);
109
110/* Release the FPGA manager */
111fpga_mgr_put(mgr);
112
113
114How to support a new FPGA device
115================================
116To add another FPGA manager, write a driver that implements a set of ops. The
117probe function calls fpga_mgr_register(), such as:
118
119static const struct fpga_manager_ops socfpga_fpga_ops = {
120 .write_init = socfpga_fpga_ops_configure_init,
121 .write = socfpga_fpga_ops_configure_write,
122 .write_complete = socfpga_fpga_ops_configure_complete,
123 .state = socfpga_fpga_ops_state,
124};
125
126static int socfpga_fpga_probe(struct platform_device *pdev)
127{
128 struct device *dev = &pdev->dev;
129 struct socfpga_fpga_priv *priv;
130 int ret;
131
132 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
133 if (!priv)
134 return -ENOMEM;
135
136 /* ... do ioremaps, get interrupts, etc. and save
137 them in priv... */
138
139 return fpga_mgr_register(dev, "Altera SOCFPGA FPGA Manager",
140 &socfpga_fpga_ops, priv);
141}
142
143static int socfpga_fpga_remove(struct platform_device *pdev)
144{
145 fpga_mgr_unregister(&pdev->dev);
146
147 return 0;
148}
149
150
151The ops will implement whatever device specific register writes are needed to
152do the programming sequence for this particular FPGA. These ops return 0 for
153success or negative error codes otherwise.
154
155The programming sequence is:
156 1. .write_init
157 2. .write (may be called once or multiple times)
158 3. .write_complete
159
160The .write_init function will prepare the FPGA to receive the image data.
161
162The .write function writes a buffer to the FPGA. The buffer may be contain the
163whole FPGA image or may be a smaller chunk of an FPGA image. In the latter
164case, this function is called multiple times for successive chunks.
165
166The .write_complete function is called after all the image has been written
167to put the FPGA into operating mode.
168
169The ops include a .state function which will read the hardware FPGA manager and
170return a code of type enum fpga_mgr_states. It doesn't result in a change in
171hardware state.
diff --git a/Documentation/gpio/board.txt b/Documentation/gpio/board.txt
index b80606de545a..3092178628c4 100644
--- a/Documentation/gpio/board.txt
+++ b/Documentation/gpio/board.txt
@@ -34,20 +34,33 @@ through gpiod_get(). For example:
34 power-gpios = <&gpio 1 GPIO_ACTIVE_LOW>; 34 power-gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
35 }; 35 };
36 36
37Properties named <function>-gpio are also considered valid and old bindings use
38it but are only supported for compatibility reasons and should not be used for
39newer bindings since it has been deprecated.
40
37This property will make GPIOs 15, 16 and 17 available to the driver under the 41This property will make GPIOs 15, 16 and 17 available to the driver under the
38"led" function, and GPIO 1 as the "power" GPIO: 42"led" function, and GPIO 1 as the "power" GPIO:
39 43
40 struct gpio_desc *red, *green, *blue, *power; 44 struct gpio_desc *red, *green, *blue, *power;
41 45
42 red = gpiod_get_index(dev, "led", 0); 46 red = gpiod_get_index(dev, "led", 0, GPIOD_OUT_HIGH);
43 green = gpiod_get_index(dev, "led", 1); 47 green = gpiod_get_index(dev, "led", 1, GPIOD_OUT_HIGH);
44 blue = gpiod_get_index(dev, "led", 2); 48 blue = gpiod_get_index(dev, "led", 2, GPIOD_OUT_HIGH);
45 49
46 power = gpiod_get(dev, "power"); 50 power = gpiod_get(dev, "power", GPIOD_OUT_HIGH);
47 51
48The led GPIOs will be active-high, while the power GPIO will be active-low (i.e. 52The led GPIOs will be active-high, while the power GPIO will be active-low (i.e.
49gpiod_is_active_low(power) will be true). 53gpiod_is_active_low(power) will be true).
50 54
55The second parameter of the gpiod_get() functions, the con_id string, has to be
56the <function>-prefix of the GPIO suffixes ("gpios" or "gpio", automatically
57looked up by the gpiod functions internally) used in the device tree. With above
58"led-gpios" example, use the prefix without the "-" as con_id parameter: "led".
59
60Internally, the GPIO subsystem prefixes the GPIO suffix ("gpios" or "gpio")
61with the string passed in con_id to get the resulting string
62(snprintf(... "%s-%s", con_id, gpio_suffixes[]).
63
51ACPI 64ACPI
52---- 65----
53ACPI also supports function names for GPIOs in a similar fashion to DT. 66ACPI also supports function names for GPIOs in a similar fashion to DT.
@@ -142,13 +155,14 @@ The driver controlling "foo.0" will then be able to obtain its GPIOs as follows:
142 155
143 struct gpio_desc *red, *green, *blue, *power; 156 struct gpio_desc *red, *green, *blue, *power;
144 157
145 red = gpiod_get_index(dev, "led", 0); 158 red = gpiod_get_index(dev, "led", 0, GPIOD_OUT_HIGH);
146 green = gpiod_get_index(dev, "led", 1); 159 green = gpiod_get_index(dev, "led", 1, GPIOD_OUT_HIGH);
147 blue = gpiod_get_index(dev, "led", 2); 160 blue = gpiod_get_index(dev, "led", 2, GPIOD_OUT_HIGH);
148 161
149 power = gpiod_get(dev, "power"); 162 power = gpiod_get(dev, "power", GPIOD_OUT_HIGH);
150 gpiod_direction_output(power, 1);
151 163
152Since the "power" GPIO is mapped as active-low, its actual signal will be 0 164Since the "led" GPIOs are mapped as active-high, this example will switch their
153after this code. Contrary to the legacy integer GPIO interface, the active-low 165signals to 1, i.e. enabling the LEDs. And for the "power" GPIO, which is mapped
154property is handled during mapping and is thus transparent to GPIO consumers. 166as active-low, its actual signal will be 0 after this code. Contrary to the legacy
167integer GPIO interface, the active-low property is handled during mapping and is
168thus transparent to GPIO consumers.
diff --git a/Documentation/gpio/consumer.txt b/Documentation/gpio/consumer.txt
index a206639454ab..e000502fde20 100644
--- a/Documentation/gpio/consumer.txt
+++ b/Documentation/gpio/consumer.txt
@@ -39,6 +39,9 @@ device that displays digits), an additional index argument can be specified:
39 const char *con_id, unsigned int idx, 39 const char *con_id, unsigned int idx,
40 enum gpiod_flags flags) 40 enum gpiod_flags flags)
41 41
42For a more detailed description of the con_id parameter in the DeviceTree case
43see Documentation/gpio/board.txt
44
42The flags parameter is used to optionally specify a direction and initial value 45The flags parameter is used to optionally specify a direction and initial value
43for the GPIO. Values can be: 46for the GPIO. Values can be:
44 47
diff --git a/Documentation/gpio/driver.txt b/Documentation/gpio/driver.txt
index 90d0f6aba7a6..12a61948ec91 100644
--- a/Documentation/gpio/driver.txt
+++ b/Documentation/gpio/driver.txt
@@ -62,6 +62,11 @@ Any debugfs dump method should normally ignore signals which haven't been
62requested as GPIOs. They can use gpiochip_is_requested(), which returns either 62requested as GPIOs. They can use gpiochip_is_requested(), which returns either
63NULL or the label associated with that GPIO when it was requested. 63NULL or the label associated with that GPIO when it was requested.
64 64
65RT_FULL: GPIO driver should not use spinlock_t or any sleepable APIs
66(like PM runtime) in its gpio_chip implementation (.get/.set and direction
67control callbacks) if it is expected to call GPIO APIs from atomic context
68on -RT (inside hard IRQ handlers and similar contexts). Normally this should
69not be required.
65 70
66GPIO drivers providing IRQs 71GPIO drivers providing IRQs
67--------------------------- 72---------------------------
@@ -73,6 +78,13 @@ The IRQ portions of the GPIO block are implemented using an irqchip, using
73the header <linux/irq.h>. So basically such a driver is utilizing two sub- 78the header <linux/irq.h>. So basically such a driver is utilizing two sub-
74systems simultaneously: gpio and irq. 79systems simultaneously: gpio and irq.
75 80
81RT_FULL: GPIO driver should not use spinlock_t or any sleepable APIs
82(like PM runtime) as part of its irq_chip implementation on -RT.
83- spinlock_t should be replaced with raw_spinlock_t [1].
84- If sleepable APIs have to be used, these can be done from the .irq_bus_lock()
85 and .irq_bus_unlock() callbacks, as these are the only slowpath callbacks
86 on an irqchip. Create the callbacks if needed [2].
87
76GPIO irqchips usually fall in one of two categories: 88GPIO irqchips usually fall in one of two categories:
77 89
78* CHAINED GPIO irqchips: these are usually the type that is embedded on 90* CHAINED GPIO irqchips: these are usually the type that is embedded on
@@ -93,6 +105,38 @@ GPIO irqchips usually fall in one of two categories:
93 Chained GPIO irqchips typically can NOT set the .can_sleep flag on 105 Chained GPIO irqchips typically can NOT set the .can_sleep flag on
94 struct gpio_chip, as everything happens directly in the callbacks. 106 struct gpio_chip, as everything happens directly in the callbacks.
95 107
108 RT_FULL: Note, chained IRQ handlers will not be forced threaded on -RT.
109 As result, spinlock_t or any sleepable APIs (like PM runtime) can't be used
110 in chained IRQ handler.
111 if required (and if it can't be converted to the nested threaded GPIO irqchip)
112 - chained IRQ handler can be converted to generic irq handler and this way
113 it will be threaded IRQ handler on -RT and hard IRQ handler on non-RT
114 (for example, see [3]).
115 Know W/A: The generic_handle_irq() is expected to be called with IRQ disabled,
116 so IRQ core will complain if it will be called from IRQ handler wich is forced
117 thread. The "fake?" raw lock can be used to W/A this problem:
118
119 raw_spinlock_t wa_lock;
120 static irqreturn_t omap_gpio_irq_handler(int irq, void *gpiobank)
121 unsigned long wa_lock_flags;
122 raw_spin_lock_irqsave(&bank->wa_lock, wa_lock_flags);
123 generic_handle_irq(irq_find_mapping(bank->chip.irqdomain, bit));
124 raw_spin_unlock_irqrestore(&bank->wa_lock, wa_lock_flags);
125
126* GENERIC CHAINED GPIO irqchips: these are the same as "CHAINED GPIO irqchips",
127 but chained IRQ handlers are not used. Instead GPIO IRQs dispatching is
128 performed by generic IRQ handler which is configured using request_irq().
129 The GPIO irqchip will then end up calling something like this sequence in
130 its interrupt handler:
131
132 static irqreturn_t gpio_rcar_irq_handler(int irq, void *dev_id)
133 for each detected GPIO IRQ
134 generic_handle_irq(...);
135
136 RT_FULL: Such kind of handlers will be forced threaded on -RT, as result IRQ
137 core will complain that generic_handle_irq() is called with IRQ enabled and
138 the same W/A as for "CHAINED GPIO irqchips" can be applied.
139
96* NESTED THREADED GPIO irqchips: these are off-chip GPIO expanders and any 140* NESTED THREADED GPIO irqchips: these are off-chip GPIO expanders and any
97 other GPIO irqchip residing on the other side of a sleeping bus. Of course 141 other GPIO irqchip residing on the other side of a sleeping bus. Of course
98 such drivers that need slow bus traffic to read out IRQ status and similar, 142 such drivers that need slow bus traffic to read out IRQ status and similar,
@@ -133,6 +177,13 @@ To use the helpers please keep the following in mind:
133 the irqchip can initialize. E.g. .dev and .can_sleep shall be set up 177 the irqchip can initialize. E.g. .dev and .can_sleep shall be set up
134 properly. 178 properly.
135 179
180- Nominally set all handlers to handle_bad_irq() in the setup call and pass
181 handle_bad_irq() as flow handler parameter in gpiochip_irqchip_add() if it is
182 expected for GPIO driver that irqchip .set_type() callback have to be called
183 before using/enabling GPIO IRQ. Then set the handler to handle_level_irq()
184 and/or handle_edge_irq() in the irqchip .set_type() callback depending on
185 what your controller supports.
186
136It is legal for any IRQ consumer to request an IRQ from any irqchip no matter 187It is legal for any IRQ consumer to request an IRQ from any irqchip no matter
137if that is a combined GPIO+IRQ driver. The basic premise is that gpio_chip and 188if that is a combined GPIO+IRQ driver. The basic premise is that gpio_chip and
138irq_chip are orthogonal, and offering their services independent of each 189irq_chip are orthogonal, and offering their services independent of each
@@ -169,6 +220,31 @@ When implementing an irqchip inside a GPIO driver, these two functions should
169typically be called in the .startup() and .shutdown() callbacks from the 220typically be called in the .startup() and .shutdown() callbacks from the
170irqchip. 221irqchip.
171 222
223Real-Time compliance for GPIO IRQ chips
224---------------------------------------
225
226Any provider of irqchips needs to be carefully tailored to support Real Time
227preemption. It is desireable that all irqchips in the GPIO subsystem keep this
228in mind and does the proper testing to assure they are real time-enabled.
229So, pay attention on above " RT_FULL:" notes, please.
230The following is a checklist to follow when preparing a driver for real
231time-compliance:
232
233- ensure spinlock_t is not used as part irq_chip implementation;
234- ensure that sleepable APIs are not used as part irq_chip implementation.
235 If sleepable APIs have to be used, these can be done from the .irq_bus_lock()
236 and .irq_bus_unlock() callbacks;
237- Chained GPIO irqchips: ensure spinlock_t or any sleepable APIs are not used
238 from chained IRQ handler;
239- Generic chained GPIO irqchips: take care about generic_handle_irq() calls and
240 apply corresponding W/A;
241- Chained GPIO irqchips: get rid of chained IRQ handler and use generic irq
242 handler if possible :)
243- regmap_mmio: Sry, but you are in trouble :( if MMIO regmap is used as for
244 GPIO IRQ chip implementation;
245- Test your driver with the appropriate in-kernel real time test cases for both
246 level and edge IRQs.
247
172 248
173Requesting self-owned GPIO pins 249Requesting self-owned GPIO pins
174------------------------------- 250-------------------------------
@@ -190,3 +266,7 @@ gpiochip_free_own_desc().
190These functions must be used with care since they do not affect module use 266These functions must be used with care since they do not affect module use
191count. Do not use the functions to request gpio descriptors not owned by the 267count. Do not use the functions to request gpio descriptors not owned by the
192calling driver. 268calling driver.
269
270[1] http://www.spinics.net/lists/linux-omap/msg120425.html
271[2] https://lkml.org/lkml/2015/9/25/494
272[3] https://lkml.org/lkml/2015/9/25/495
diff --git a/Documentation/gpio/sysfs.txt b/Documentation/gpio/sysfs.txt
index 0700b55637f5..aeab01aa4d00 100644
--- a/Documentation/gpio/sysfs.txt
+++ b/Documentation/gpio/sysfs.txt
@@ -20,14 +20,14 @@ userspace GPIO can be used to determine system configuration data that
20standard kernels won't know about. And for some tasks, simple userspace 20standard kernels won't know about. And for some tasks, simple userspace
21GPIO drivers could be all that the system really needs. 21GPIO drivers could be all that the system really needs.
22 22
23DO NOT ABUSE SYFS TO CONTROL HARDWARE THAT HAS PROPER KERNEL DRIVERS. 23DO NOT ABUSE SYSFS TO CONTROL HARDWARE THAT HAS PROPER KERNEL DRIVERS.
24PLEASE READ THE DOCUMENT NAMED "drivers-on-gpio.txt" IN THIS DOCUMENTATION 24PLEASE READ THE DOCUMENT NAMED "drivers-on-gpio.txt" IN THIS DOCUMENTATION
25DIRECTORY TO AVOID REINVENTING KERNEL WHEELS IN USERSPACE. I MEAN IT. 25DIRECTORY TO AVOID REINVENTING KERNEL WHEELS IN USERSPACE. I MEAN IT.
26REALLY. 26REALLY.
27 27
28Paths in Sysfs 28Paths in Sysfs
29-------------- 29--------------
30There are three kinds of entry in /sys/class/gpio: 30There are three kinds of entries in /sys/class/gpio:
31 31
32 - Control interfaces used to get userspace control over GPIOs; 32 - Control interfaces used to get userspace control over GPIOs;
33 33
@@ -106,7 +106,7 @@ read-only attributes:
106 106
107 "label" ... provided for diagnostics (not always unique) 107 "label" ... provided for diagnostics (not always unique)
108 108
109 "ngpio" ... how many GPIOs this manges (N to N + ngpio - 1) 109 "ngpio" ... how many GPIOs this manages (N to N + ngpio - 1)
110 110
111Board documentation should in most cases cover what GPIOs are used for 111Board documentation should in most cases cover what GPIOs are used for
112what purposes. However, those numbers are not always stable; GPIOs on 112what purposes. However, those numbers are not always stable; GPIOs on
diff --git a/Documentation/hw_random.txt b/Documentation/hw_random.txt
index 026e237bbc87..fce1634907d0 100644
--- a/Documentation/hw_random.txt
+++ b/Documentation/hw_random.txt
@@ -3,7 +3,7 @@ Introduction:
3 The hw_random framework is software that makes use of a 3 The hw_random framework is software that makes use of a
4 special hardware feature on your CPU or motherboard, 4 special hardware feature on your CPU or motherboard,
5 a Random Number Generator (RNG). The software has two parts: 5 a Random Number Generator (RNG). The software has two parts:
6 a core providing the /dev/hw_random character device and its 6 a core providing the /dev/hwrng character device and its
7 sysfs support, plus a hardware-specific driver that plugs 7 sysfs support, plus a hardware-specific driver that plugs
8 into that core. 8 into that core.
9 9
@@ -14,7 +14,7 @@ Introduction:
14 14
15 http://sourceforge.net/projects/gkernel/ 15 http://sourceforge.net/projects/gkernel/
16 16
17 Those tools use /dev/hw_random to fill the kernel entropy pool, 17 Those tools use /dev/hwrng to fill the kernel entropy pool,
18 which is used internally and exported by the /dev/urandom and 18 which is used internally and exported by the /dev/urandom and
19 /dev/random special files. 19 /dev/random special files.
20 20
@@ -32,13 +32,13 @@ Theory of operation:
32 The rng-tools package uses such tests in "rngd", and lets you 32 The rng-tools package uses such tests in "rngd", and lets you
33 run them by hand with a "rngtest" utility. 33 run them by hand with a "rngtest" utility.
34 34
35 /dev/hw_random is char device major 10, minor 183. 35 /dev/hwrng is char device major 10, minor 183.
36 36
37 CLASS DEVICE. There is a /sys/class/misc/hw_random node with 37 CLASS DEVICE. There is a /sys/class/misc/hw_random node with
38 two unique attributes, "rng_available" and "rng_current". The 38 two unique attributes, "rng_available" and "rng_current". The
39 "rng_available" attribute lists the hardware-specific drivers 39 "rng_available" attribute lists the hardware-specific drivers
40 available, while "rng_current" lists the one which is currently 40 available, while "rng_current" lists the one which is currently
41 connected to /dev/hw_random. If your system has more than one 41 connected to /dev/hwrng. If your system has more than one
42 RNG available, you may change the one used by writing a name from 42 RNG available, you may change the one used by writing a name from
43 the list in "rng_available" into "rng_current". 43 the list in "rng_available" into "rng_current".
44 44
diff --git a/Documentation/hwmon/lm75 b/Documentation/hwmon/lm75
index 67691a0aa41d..ac95edfcd907 100644
--- a/Documentation/hwmon/lm75
+++ b/Documentation/hwmon/lm75
@@ -42,8 +42,8 @@ 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, TMP112, TMP75, TMP175, TMP275 45 * Texas Instruments TMP100, TMP101, TMP105, TMP112, TMP75, TMP75C, TMP175, TMP275
46 Prefixes: 'tmp100', 'tmp101', 'tmp105', 'tmp112', 'tmp175', 'tmp75', 'tmp275' 46 Prefixes: 'tmp100', 'tmp101', 'tmp105', 'tmp112', 'tmp175', 'tmp75', 'tmp75c', '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
@@ -51,6 +51,7 @@ Supported chips:
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/tmp112
53 http://www.ti.com/product/tmp75 53 http://www.ti.com/product/tmp75
54 http://www.ti.com/product/tmp75c
54 http://www.ti.com/product/tmp175 55 http://www.ti.com/product/tmp175
55 http://www.ti.com/product/tmp275 56 http://www.ti.com/product/tmp275
56 * NXP LM75B 57 * NXP LM75B
diff --git a/Documentation/hwmon/max31790 b/Documentation/hwmon/max31790
new file mode 100644
index 000000000000..855e62430da9
--- /dev/null
+++ b/Documentation/hwmon/max31790
@@ -0,0 +1,37 @@
1Kernel driver max31790
2======================
3
4Supported chips:
5 * Maxim MAX31790
6 Prefix: 'max31790'
7 Addresses scanned: -
8 Datasheet: http://pdfserv.maximintegrated.com/en/ds/MAX31790.pdf
9
10Author: Il Han <corone.il.han@gmail.com>
11
12
13Description
14-----------
15
16This driver implements support for the Maxim MAX31790 chip.
17
18The MAX31790 controls the speeds of up to six fans using six independent
19PWM outputs. The desired fan speeds (or PWM duty cycles) are written
20through the I2C interface. The outputs drive "4-wire" fans directly,
21or can be used to modulate the fan's power terminals using an external
22pass transistor.
23
24Tachometer inputs monitor fan tachometer logic outputs for precise (+/-1%)
25monitoring and control of fan RPM as well as detection of fan failure.
26Six pins are dedicated tachometer inputs. Any of the six PWM outputs can
27also be configured to serve as tachometer inputs.
28
29
30Sysfs entries
31-------------
32
33fan[1-12]_input RO fan tachometer speed in RPM
34fan[1-12]_fault RO fan experienced fault
35fan[1-6]_target RW desired fan speed in RPM
36pwm[1-6]_enable RW regulator mode, 0=disabled, 1=manual mode, 2=rpm mode
37pwm[1-6] RW fan target duty cycle (0-255)
diff --git a/Documentation/hwmon/nct6775 b/Documentation/hwmon/nct6775
index f0dd3d2fec96..76add4c9cd68 100644
--- a/Documentation/hwmon/nct6775
+++ b/Documentation/hwmon/nct6775
@@ -32,6 +32,10 @@ Supported chips:
32 Prefix: 'nct6792' 32 Prefix: 'nct6792'
33 Addresses scanned: ISA address retrieved from Super I/O registers 33 Addresses scanned: ISA address retrieved from Super I/O registers
34 Datasheet: Available from Nuvoton upon request 34 Datasheet: Available from Nuvoton upon request
35 * Nuvoton NCT6793D
36 Prefix: 'nct6793'
37 Addresses scanned: ISA address retrieved from Super I/O registers
38 Datasheet: Available from Nuvoton upon request
35 39
36Authors: 40Authors:
37 Guenter Roeck <linux@roeck-us.net> 41 Guenter Roeck <linux@roeck-us.net>
diff --git a/Documentation/hwmon/scpi-hwmon b/Documentation/hwmon/scpi-hwmon
new file mode 100644
index 000000000000..4cfcdf2d5eab
--- /dev/null
+++ b/Documentation/hwmon/scpi-hwmon
@@ -0,0 +1,33 @@
1Kernel driver scpi-hwmon
2========================
3
4Supported chips:
5 * Chips based on ARM System Control Processor Interface
6 Addresses scanned: -
7 Datasheet: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0922b/index.html
8
9Author: Punit Agrawal <punit.agrawal@arm.com>
10
11Description
12-----------
13
14This driver supports hardware monitoring for SoC's based on the ARM
15System Control Processor (SCP) implementing the System Control
16Processor Interface (SCPI). The following sensor types are supported
17by the SCP -
18
19 * temperature
20 * voltage
21 * current
22 * power
23
24The SCP interface provides an API to query the available sensors and
25their values which are then exported to userspace by this driver.
26
27Usage Notes
28-----------
29
30The driver relies on device tree node to indicate the presence of SCPI
31support in the kernel. See
32Documentation/devicetree/bindings/arm/arm,scpi.txt for details of the
33devicetree node. \ No newline at end of file
diff --git a/Documentation/i2c/busses/i2c-i801 b/Documentation/i2c/busses/i2c-i801
index 82f48f774afb..6a4b1af724f8 100644
--- a/Documentation/i2c/busses/i2c-i801
+++ b/Documentation/i2c/busses/i2c-i801
@@ -30,6 +30,8 @@ Supported adapters:
30 * Intel BayTrail (SOC) 30 * Intel BayTrail (SOC)
31 * Intel Sunrise Point-H (PCH) 31 * Intel Sunrise Point-H (PCH)
32 * Intel Sunrise Point-LP (PCH) 32 * Intel Sunrise Point-LP (PCH)
33 * Intel DNV (SOC)
34 * Intel Broxton (SOC)
33 Datasheets: Publicly available at the Intel website 35 Datasheets: Publicly available at the Intel website
34 36
35On Intel Patsburg and later chipsets, both the normal host SMBus controller 37On Intel Patsburg and later chipsets, both the normal host SMBus controller
diff --git a/Documentation/input/multi-touch-protocol.txt b/Documentation/input/multi-touch-protocol.txt
index b85d000faeb4..c51f1146f3bd 100644
--- a/Documentation/input/multi-touch-protocol.txt
+++ b/Documentation/input/multi-touch-protocol.txt
@@ -361,7 +361,7 @@ For win8 devices with both T and C coordinates, the position mapping is
361 ABS_MT_POSITION_X := T_X 361 ABS_MT_POSITION_X := T_X
362 ABS_MT_POSITION_Y := T_Y 362 ABS_MT_POSITION_Y := T_Y
363 ABS_MT_TOOL_X := C_X 363 ABS_MT_TOOL_X := C_X
364 ABS_MT_TOOL_X := C_Y 364 ABS_MT_TOOL_Y := C_Y
365 365
366Unfortunately, there is not enough information to specify both the touching 366Unfortunately, there is not enough information to specify both the touching
367ellipse and the tool ellipse, so one has to resort to approximations. One 367ellipse and the tool ellipse, so one has to resort to approximations. One
diff --git a/Documentation/input/rotary-encoder.txt b/Documentation/input/rotary-encoder.txt
index 5737e3590adb..46a74f0c551a 100644
--- a/Documentation/input/rotary-encoder.txt
+++ b/Documentation/input/rotary-encoder.txt
@@ -9,8 +9,9 @@ peripherals with two wires. The outputs are phase-shifted by 90 degrees
9and by triggering on falling and rising edges, the turn direction can 9and by triggering on falling and rising edges, the turn direction can
10be determined. 10be determined.
11 11
12Some encoders have both outputs low in stable states, whereas others also have 12Some encoders have both outputs low in stable states, others also have
13a stable state with both outputs high (half-period mode). 13a stable state with both outputs high (half-period mode) and some have
14a stable state in all steps (quarter-period mode).
14 15
15The phase diagram of these two outputs look like this: 16The phase diagram of these two outputs look like this:
16 17
@@ -32,6 +33,9 @@ The phase diagram of these two outputs look like this:
32 |<-->| 33 |<-->|
33 one step (half-period mode) 34 one step (half-period mode)
34 35
36 |<>|
37 one step (quarter-period mode)
38
35For more information, please see 39For more information, please see
36 https://en.wikipedia.org/wiki/Rotary_encoder 40 https://en.wikipedia.org/wiki/Rotary_encoder
37 41
@@ -109,6 +113,7 @@ static struct rotary_encoder_platform_data my_rotary_encoder_info = {
109 .inverted_a = 0, 113 .inverted_a = 0,
110 .inverted_b = 0, 114 .inverted_b = 0,
111 .half_period = false, 115 .half_period = false,
116 .wakeup_source = false,
112}; 117};
113 118
114static struct platform_device rotary_encoder_device = { 119static struct platform_device rotary_encoder_device = {
diff --git a/Documentation/input/userio.txt b/Documentation/input/userio.txt
new file mode 100644
index 000000000000..0880c0f447a6
--- /dev/null
+++ b/Documentation/input/userio.txt
@@ -0,0 +1,70 @@
1 The userio Protocol
2 (c) 2015 Stephen Chandler Paul <thatslyude@gmail.com>
3 Sponsored by Red Hat
4--------------------------------------------------------------------------------
5
61. Introduction
7~~~~~~~~~~~~~~~
8 This module is intended to try to make the lives of input driver developers
9easier by allowing them to test various serio devices (mainly the various
10touchpads found on laptops) without having to have the physical device in front
11of them. userio accomplishes this by allowing any privileged userspace program
12to directly interact with the kernel's serio driver and control a virtual serio
13port from there.
14
152. Usage overview
16~~~~~~~~~~~~~~~~~
17 In order to interact with the userio kernel module, one simply opens the
18/dev/userio character device in their applications. Commands are sent to the
19kernel module by writing to the device, and any data received from the serio
20driver is read as-is from the /dev/userio device. All of the structures and
21macros you need to interact with the device are defined in <linux/userio.h> and
22<linux/serio.h>.
23
243. Command Structure
25~~~~~~~~~~~~~~~~~~~~
26 The struct used for sending commands to /dev/userio is as follows:
27
28 struct userio_cmd {
29 __u8 type;
30 __u8 data;
31 };
32
33 "type" describes the type of command that is being sent. This can be any one
34of the USERIO_CMD macros defined in <linux/userio.h>. "data" is the argument
35that goes along with the command. In the event that the command doesn't have an
36argument, this field can be left untouched and will be ignored by the kernel.
37Each command should be sent by writing the struct directly to the character
38device. In the event that the command you send is invalid, an error will be
39returned by the character device and a more descriptive error will be printed
40to the kernel log. Only one command can be sent at a time, any additional data
41written to the character device after the initial command will be ignored.
42 To close the virtual serio port, just close /dev/userio.
43
444. Commands
45~~~~~~~~~~~
46
474.1 USERIO_CMD_REGISTER
48~~~~~~~~~~~~~~~~~~~~~~~
49 Registers the port with the serio driver and begins transmitting data back and
50forth. Registration can only be performed once a port type is set with
51USERIO_CMD_SET_PORT_TYPE. Has no argument.
52
534.2 USERIO_CMD_SET_PORT_TYPE
54~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55 Sets the type of port we're emulating, where "data" is the port type being
56set. Can be any of the macros from <linux/serio.h>. For example: SERIO_8042
57would set the port type to be a normal PS/2 port.
58
594.3 USERIO_CMD_SEND_INTERRUPT
60~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
61 Sends an interrupt through the virtual serio port to the serio driver, where
62"data" is the interrupt data being sent.
63
645. Userspace tools
65~~~~~~~~~~~~~~~~~~
66 The userio userspace tools are able to record PS/2 devices using some of the
67debugging information from i8042, and play back the devices on /dev/userio. The
68latest version of these tools can be found at:
69
70 https://github.com/Lyude/ps2emu
diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt
index df1b25eb8382..91261a32a573 100644
--- a/Documentation/ioctl/ioctl-number.txt
+++ b/Documentation/ioctl/ioctl-number.txt
@@ -81,6 +81,9 @@ Code Seq#(hex) Include File Comments
810x22 all scsi/sg.h 810x22 all scsi/sg.h
82'#' 00-3F IEEE 1394 Subsystem Block for the entire subsystem 82'#' 00-3F IEEE 1394 Subsystem Block for the entire subsystem
83'$' 00-0F linux/perf_counter.h, linux/perf_event.h 83'$' 00-0F linux/perf_counter.h, linux/perf_event.h
84'%' 00-0F include/uapi/linux/stm.h
85 System Trace Module subsystem
86 <mailto:alexander.shishkin@linux.intel.com>
84'&' 00-07 drivers/firewire/nosy-user.h 87'&' 00-07 drivers/firewire/nosy-user.h
85'1' 00-1F <linux/timepps.h> PPS kit from Ulrich Windl 88'1' 00-1F <linux/timepps.h> PPS kit from Ulrich Windl
86 <ftp://ftp.de.kernel.org/pub/linux/daemons/ntp/PPS/> 89 <ftp://ftp.de.kernel.org/pub/linux/daemons/ntp/PPS/>
@@ -149,6 +152,7 @@ Code Seq#(hex) Include File Comments
149'K' all linux/kd.h 152'K' all linux/kd.h
150'L' 00-1F linux/loop.h conflict! 153'L' 00-1F linux/loop.h conflict!
151'L' 10-1F drivers/scsi/mpt2sas/mpt2sas_ctl.h conflict! 154'L' 10-1F drivers/scsi/mpt2sas/mpt2sas_ctl.h conflict!
155'L' 20-2F linux/lightnvm.h
152'L' E0-FF linux/ppdd.h encrypted disk device driver 156'L' E0-FF linux/ppdd.h encrypted disk device driver
153 <http://linux01.gwdg.de/~alatham/ppdd.html> 157 <http://linux01.gwdg.de/~alatham/ppdd.html>
154'M' all linux/soundcard.h conflict! 158'M' all linux/soundcard.h conflict!
diff --git a/Documentation/kasan.txt b/Documentation/kasan.txt
index 0d32355a4c34..aa1e0c91e368 100644
--- a/Documentation/kasan.txt
+++ b/Documentation/kasan.txt
@@ -1,36 +1,34 @@
1Kernel address sanitizer 1KernelAddressSanitizer (KASAN)
2================ 2==============================
3 3
40. Overview 40. Overview
5=========== 5===========
6 6
7Kernel Address sanitizer (KASan) is a dynamic memory error detector. It provides 7KernelAddressSANitizer (KASAN) is a dynamic memory error detector. It provides
8a fast and comprehensive solution for finding use-after-free and out-of-bounds 8a fast and comprehensive solution for finding use-after-free and out-of-bounds
9bugs. 9bugs.
10 10
11KASan uses compile-time instrumentation for checking every memory access, 11KASAN uses compile-time instrumentation for checking every memory access,
12therefore you will need a gcc version of 4.9.2 or later. KASan could detect out 12therefore you will need a GCC version 4.9.2 or later. GCC 5.0 or later is
13of bounds accesses to stack or global variables, but only if gcc 5.0 or later was 13required for detection of out-of-bounds accesses to stack or global variables.
14used to built the kernel.
15 14
16Currently KASan is supported only for x86_64 architecture and requires that the 15Currently KASAN is supported only for x86_64 architecture and requires the
17kernel be built with the SLUB allocator. 16kernel to be built with the SLUB allocator.
18 17
191. Usage 181. Usage
20========= 19========
21 20
22To enable KASAN configure kernel with: 21To enable KASAN configure kernel with:
23 22
24 CONFIG_KASAN = y 23 CONFIG_KASAN = y
25 24
26and choose between CONFIG_KASAN_OUTLINE and CONFIG_KASAN_INLINE. Outline/inline 25and choose between CONFIG_KASAN_OUTLINE and CONFIG_KASAN_INLINE. Outline and
27is compiler instrumentation types. The former produces smaller binary the 26inline are compiler instrumentation types. The former produces smaller binary
28latter is 1.1 - 2 times faster. Inline instrumentation requires a gcc version 27the latter is 1.1 - 2 times faster. Inline instrumentation requires a GCC
29of 5.0 or later. 28version 5.0 or later.
30 29
31Currently KASAN works only with the SLUB memory allocator. 30Currently KASAN works only with the SLUB memory allocator.
32For better bug detection and nicer report, enable CONFIG_STACKTRACE and put 31For better bug detection and nicer reporting, enable CONFIG_STACKTRACE.
33at least 'slub_debug=U' in the boot cmdline.
34 32
35To disable instrumentation for specific files or directories, add a line 33To disable instrumentation for specific files or directories, add a line
36similar to the following to the respective kernel Makefile: 34similar to the following to the respective kernel Makefile:
@@ -42,7 +40,7 @@ similar to the following to the respective kernel Makefile:
42 KASAN_SANITIZE := n 40 KASAN_SANITIZE := n
43 41
441.1 Error reports 421.1 Error reports
45========== 43=================
46 44
47A typical out of bounds access report looks like this: 45A typical out of bounds access report looks like this:
48 46
@@ -119,14 +117,16 @@ Memory state around the buggy address:
119 ffff8800693bc800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb 117 ffff8800693bc800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
120================================================================== 118==================================================================
121 119
122First sections describe slub object where bad access happened. 120The header of the report discribe what kind of bug happened and what kind of
123See 'SLUB Debug output' section in Documentation/vm/slub.txt for details. 121access caused it. It's followed by the description of the accessed slub object
122(see 'SLUB Debug output' section in Documentation/vm/slub.txt for details) and
123the description of the accessed memory page.
124 124
125In the last section the report shows memory state around the accessed address. 125In the last section the report shows memory state around the accessed address.
126Reading this part requires some more understanding of how KASAN works. 126Reading this part requires some understanding of how KASAN works.
127 127
128Each 8 bytes of memory are encoded in one shadow byte as accessible, 128The state of each 8 aligned bytes of memory is encoded in one shadow byte.
129partially accessible, freed or they can be part of a redzone. 129Those 8 bytes can be accessible, partially accessible, freed or be a redzone.
130We use the following encoding for each shadow byte: 0 means that all 8 bytes 130We use the following encoding for each shadow byte: 0 means that all 8 bytes
131of the corresponding memory region are accessible; number N (1 <= N <= 7) means 131of the corresponding memory region are accessible; number N (1 <= N <= 7) means
132that the first N bytes are accessible, and other (8 - N) bytes are not; 132that the first N bytes are accessible, and other (8 - N) bytes are not;
@@ -139,7 +139,7 @@ the accessed address is partially accessible.
139 139
140 140
1412. Implementation details 1412. Implementation details
142======================== 142=========================
143 143
144From a high level, our approach to memory error detection is similar to that 144From a high level, our approach to memory error detection is similar to that
145of kmemcheck: use shadow memory to record whether each byte of memory is safe 145of kmemcheck: use shadow memory to record whether each byte of memory is safe
diff --git a/Documentation/kbuild/Kconfig.recursion-issue-01 b/Documentation/kbuild/Kconfig.recursion-issue-01
new file mode 100644
index 000000000000..e8877db0461f
--- /dev/null
+++ b/Documentation/kbuild/Kconfig.recursion-issue-01
@@ -0,0 +1,57 @@
1# Simple Kconfig recursive issue
2# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3#
4# Test with:
5#
6# make KBUILD_KCONFIG=Documentation/kbuild/Kconfig.recursion-issue-01 allnoconfig
7#
8# This Kconfig file has a simple recursive dependency issue. In order to
9# understand why this recursive dependency issue occurs lets consider what
10# Kconfig needs to address. We iterate over what Kconfig needs to address
11# by stepping through the questions it needs to address sequentially.
12#
13# * What values are possible for CORE?
14#
15# CORE_BELL_A_ADVANCED selects CORE, which means that it influences the values
16# that are possible for CORE. So for example if CORE_BELL_A_ADVANCED is 'y',
17# CORE must be 'y' too.
18#
19# * What influences CORE_BELL_A_ADVANCED ?
20#
21# As the name implies CORE_BELL_A_ADVANCED is an advanced feature of
22# CORE_BELL_A so naturally it depends on CORE_BELL_A. So if CORE_BELL_A is 'y'
23# we know CORE_BELL_A_ADVANCED can be 'y' too.
24#
25# * What influences CORE_BELL_A ?
26#
27# CORE_BELL_A depends on CORE, so CORE influences CORE_BELL_A.
28#
29# But that is a problem, because this means that in order to determine
30# what values are possible for CORE we ended up needing to address questions
31# regarding possible values of CORE itself again. Answering the original
32# question of what are the possible values of CORE would make the kconfig
33# tools run in a loop. When this happens Kconfig exits and complains about
34# the "recursive dependency detected" error.
35#
36# Reading the Documentation/kbuild/Kconfig.recursion-issue-01 file it may be
37# obvious that an easy to solution to this problem should just be the removal
38# of the "select CORE" from CORE_BELL_A_ADVANCED as that is implicit already
39# since CORE_BELL_A depends on CORE. Recursive dependency issues are not always
40# so trivial to resolve, we provide another example below of practical
41# implications of this recursive issue where the solution is perhaps not so
42# easy to understand. Note that matching semantics on the dependency on
43# CORE also consist of a solution to this recursive problem.
44
45mainmenu "Simple example to demo kconfig recursive dependency issue"
46
47config CORE
48 tristate
49
50config CORE_BELL_A
51 tristate
52 depends on CORE
53
54config CORE_BELL_A_ADVANCED
55 tristate
56 depends on CORE_BELL_A
57 select CORE
diff --git a/Documentation/kbuild/Kconfig.recursion-issue-02 b/Documentation/kbuild/Kconfig.recursion-issue-02
new file mode 100644
index 000000000000..b9fd56c4b57e
--- /dev/null
+++ b/Documentation/kbuild/Kconfig.recursion-issue-02
@@ -0,0 +1,63 @@
1# Cumulative Kconfig recursive issue
2# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3#
4# Test with:
5#
6# make KBUILD_KCONFIG=Documentation/kbuild/Kconfig.recursion-issue-02 allnoconfig
7#
8# The recursive limitations with Kconfig has some non intuitive implications on
9# kconfig sematics which are documented here. One known practical implication
10# of the recursive limitation is that drivers cannot negate features from other
11# drivers if they share a common core requirement and use disjoint semantics to
12# annotate those requirements, ie, some drivers use "depends on" while others
13# use "select". For instance it means if a driver A and driver B share the same
14# core requirement, and one uses "select" while the other uses "depends on" to
15# annotate this, all features that driver A selects cannot now be negated by
16# driver B.
17#
18# A perhaps not so obvious implication of this is that, if semantics on these
19# core requirements are not carefully synced, as drivers evolve features
20# they select or depend on end up becoming shared requirements which cannot be
21# negated by other drivers.
22#
23# The example provided in Documentation/kbuild/Kconfig.recursion-issue-02
24# describes a simple driver core layout of example features a kernel might
25# have. Let's assume we have some CORE functionality, then the kernel has a
26# series of bells and whistles it desires to implement, its not so advanced so
27# it only supports bells at this time: CORE_BELL_A and CORE_BELL_B. If
28# CORE_BELL_A has some advanced feature CORE_BELL_A_ADVANCED which selects
29# CORE_BELL_A then CORE_BELL_A ends up becoming a common BELL feature which
30# other bells in the system cannot negate. The reason for this issue is
31# due to the disjoint use of semantics on expressing each bell's relationship
32# with CORE, one uses "depends on" while the other uses "select". Another
33# more important reason is that kconfig does not check for dependencies listed
34# under 'select' for a symbol, when such symbols are selected kconfig them
35# as mandatory required symbols. For more details on the heavy handed nature
36# of select refer to Documentation/kbuild/Kconfig.select-break
37#
38# To fix this the "depends on CORE" must be changed to "select CORE", or the
39# "select CORE" must be changed to "depends on CORE".
40#
41# For an example real world scenario issue refer to the attempt to remove
42# "select FW_LOADER" [0], in the end the simple alternative solution to this
43# problem consisted on matching semantics with newly introduced features.
44#
45# [0] http://lkml.kernel.org/r/1432241149-8762-1-git-send-email-mcgrof@do-not-panic.com
46
47mainmenu "Simple example to demo cumulative kconfig recursive dependency implication"
48
49config CORE
50 tristate
51
52config CORE_BELL_A
53 tristate
54 depends on CORE
55
56config CORE_BELL_A_ADVANCED
57 tristate
58 select CORE_BELL_A
59
60config CORE_BELL_B
61 tristate
62 depends on !CORE_BELL_A
63 select CORE
diff --git a/Documentation/kbuild/Kconfig.select-break b/Documentation/kbuild/Kconfig.select-break
new file mode 100644
index 000000000000..365ceb3424b1
--- /dev/null
+++ b/Documentation/kbuild/Kconfig.select-break
@@ -0,0 +1,33 @@
1# Select broken dependency issue
2# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3#
4# Test with:
5#
6# make KBUILD_KCONFIG=Documentation/kbuild/Kconfig.select-break menuconfig
7#
8# kconfig will not complain and enable this layout for configuration. This is
9# currently a feature of kconfig, given select was designed to be heavy handed.
10# Kconfig currently does not check the list of symbols listed on a symbol's
11# "select" list, this is done on purpose to help load a set of known required
12# symbols. Because of this use of select should be used with caution. An
13# example of this issue is below.
14#
15# The option B and C are clearly contradicting with respect to A.
16# However, when A is set, C can be set as well because Kconfig does not
17# visit the dependencies of the select target (in this case B). And since
18# Kconfig does not visit the dependencies, it breaks the dependencies of B
19# (!A).
20
21mainmenu "Simple example to demo kconfig select broken dependency issue"
22
23config A
24 bool "CONFIG A"
25
26config B
27 bool "CONFIG B"
28 depends on !A
29
30config C
31 bool "CONFIG C"
32 depends on A
33 select B
diff --git a/Documentation/kbuild/kconfig-language.txt b/Documentation/kbuild/kconfig-language.txt
index 350f733bf2c7..c52856da0cad 100644
--- a/Documentation/kbuild/kconfig-language.txt
+++ b/Documentation/kbuild/kconfig-language.txt
@@ -393,3 +393,164 @@ config FOO
393 depends on BAR && m 393 depends on BAR && m
394 394
395limits FOO to module (=m) or disabled (=n). 395limits FOO to module (=m) or disabled (=n).
396
397Kconfig recursive dependency limitations
398~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
399
400If you've hit the Kconfig error: "recursive dependency detected" you've run
401into a recursive dependency issue with Kconfig, a recursive dependency can be
402summarized as a circular dependency. The kconfig tools need to ensure that
403Kconfig files comply with specified configuration requirements. In order to do
404that kconfig must determine the values that are possible for all Kconfig
405symbols, this is currently not possible if there is a circular relation
406between two or more Kconfig symbols. For more details refer to the "Simple
407Kconfig recursive issue" subsection below. Kconfig does not do recursive
408dependency resolution; this has a few implications for Kconfig file writers.
409We'll first explain why this issues exists and then provide an example
410technical limitation which this brings upon Kconfig developers. Eager
411developers wishing to try to address this limitation should read the next
412subsections.
413
414Simple Kconfig recursive issue
415~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
416
417Read: Documentation/kbuild/Kconfig.recursion-issue-01
418
419Test with:
420
421make KBUILD_KCONFIG=Documentation/kbuild/Kconfig.recursion-issue-01 allnoconfig
422
423Cumulative Kconfig recursive issue
424~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
425
426Read: Documentation/kbuild/Kconfig.recursion-issue-02
427
428Test with:
429
430make KBUILD_KCONFIG=Documentation/kbuild/Kconfig.recursion-issue-02 allnoconfig
431
432Practical solutions to kconfig recursive issue
433~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
434
435Developers who run into the recursive Kconfig issue have three options
436at their disposal. We document them below and also provide a list of
437historical issues resolved through these different solutions.
438
439 a) Remove any superfluous "select FOO" or "depends on FOO"
440 b) Match dependency semantics:
441 b1) Swap all "select FOO" to "depends on FOO" or,
442 b2) Swap all "depends on FOO" to "select FOO"
443
444The resolution to a) can be tested with the sample Kconfig file
445Documentation/kbuild/Kconfig.recursion-issue-01 through the removal
446of the "select CORE" from CORE_BELL_A_ADVANCED as that is implicit already
447since CORE_BELL_A depends on CORE. At times it may not be possible to remove
448some dependency criteria, for such cases you can work with solution b).
449
450The two different resolutions for b) can be tested in the sample Kconfig file
451Documentation/kbuild/Kconfig.recursion-issue-02.
452
453Below is a list of examples of prior fixes for these types of recursive issues;
454all errors appear to involve one or more select's and one or more "depends on".
455
456commit fix
457====== ===
45806b718c01208 select A -> depends on A
459c22eacfe82f9 depends on A -> depends on B
4606a91e854442c select A -> depends on A
461118c565a8f2e select A -> select B
462f004e5594705 select A -> depends on A
463c7861f37b4c6 depends on A -> (null)
46480c69915e5fb select A -> (null) (1)
465c2218e26c0d0 select A -> depends on A (1)
466d6ae99d04e1c select A -> depends on A
46795ca19cf8cbf select A -> depends on A
4688f057d7bca54 depends on A -> (null)
4698f057d7bca54 depends on A -> select A
470a0701f04846e select A -> depends on A
4710c8b92f7f259 depends on A -> (null)
472e4e9e0540928 select A -> depends on A (2)
4737453ea886e87 depends on A > (null) (1)
4747b1fff7e4fdf select A -> depends on A
47586c747d2a4f0 select A -> depends on A
476d9f9ab51e55e select A -> depends on A
4770c51a4d8abd6 depends on A -> select A (3)
478e98062ed6dc4 select A -> depends on A (3)
47991e5d284a7f1 select A -> (null)
480
481(1) Partial (or no) quote of error.
482(2) That seems to be the gist of that fix.
483(3) Same error.
484
485Future kconfig work
486~~~~~~~~~~~~~~~~~~~
487
488Work on kconfig is welcomed on both areas of clarifying semantics and on
489evaluating the use of a full SAT solver for it. A full SAT solver can be
490desirable to enable more complex dependency mappings and / or queries,
491for instance on possible use case for a SAT solver could be that of handling
492the current known recursive dependency issues. It is not known if this would
493address such issues but such evaluation is desirable. If support for a full SAT
494solver proves too complex or that it cannot address recursive dependency issues
495Kconfig should have at least clear and well defined semantics which also
496addresses and documents limitations or requirements such as the ones dealing
497with recursive dependencies.
498
499Further work on both of these areas is welcomed on Kconfig. We elaborate
500on both of these in the next two subsections.
501
502Semantics of Kconfig
503~~~~~~~~~~~~~~~~~~~~
504
505The use of Kconfig is broad, Linux is now only one of Kconfig's users:
506one study has completed a broad analysis of Kconfig use in 12 projects [0].
507Despite its widespread use, and although this document does a reasonable job
508in documenting basic Kconfig syntax a more precise definition of Kconfig
509semantics is welcomed. One project deduced Kconfig semantics through
510the use of the xconfig configurator [1]. Work should be done to confirm if
511the deduced semantics matches our intended Kconfig design goals.
512
513Having well defined semantics can be useful for tools for practical
514evaluation of depenencies, for instance one such use known case was work to
515express in boolean abstraction of the inferred semantics of Kconfig to
516translate Kconfig logic into boolean formulas and run a SAT solver on this to
517find dead code / features (always inactive), 114 dead features were found in
518Linux using this methodology [1] (Section 8: Threats to validity).
519
520Confirming this could prove useful as Kconfig stands as one of the the leading
521industrial variability modeling languages [1] [2]. Its study would help
522evaluate practical uses of such languages, their use was only theoretical
523and real world requirements were not well understood. As it stands though
524only reverse engineering techniques have been used to deduce semantics from
525variability modeling languages such as Kconfig [3].
526
527[0] http://www.eng.uwaterloo.ca/~shshe/kconfig_semantics.pdf
528[1] http://gsd.uwaterloo.ca/sites/default/files/vm-2013-berger.pdf
529[2] http://gsd.uwaterloo.ca/sites/default/files/ase241-berger_0.pdf
530[3] http://gsd.uwaterloo.ca/sites/default/files/icse2011.pdf
531
532Full SAT solver for Kconfig
533~~~~~~~~~~~~~~~~~~~~~~~~~~~
534
535Although SAT solvers [0] haven't yet been used by Kconfig directly, as noted in
536the previous subsection, work has been done however to express in boolean
537abstraction the inferred semantics of Kconfig to translate Kconfig logic into
538boolean formulas and run a SAT solver on it [1]. Another known related project
539is CADOS [2] (former VAMOS [3]) and the tools, mainly undertaker [4], which has
540been introduced first with [5]. The basic concept of undertaker is to exract
541variability models from Kconfig, and put them together with a propositional
542formula extracted from CPP #ifdefs and build-rules into a SAT solver in order
543to find dead code, dead files, and dead symbols. If using a SAT solver is
544desirable on Kconfig one approach would be to evaluate repurposing such efforts
545somehow on Kconfig. There is enough interest from mentors of existing projects
546to not only help advise how to integrate this work upstream but also help
547maintain it long term. Interested developers should visit:
548
549http://kernelnewbies.org/KernelProjects/kconfig-sat
550
551[0] http://www.cs.cornell.edu/~sabhar/chapters/SATSolvers-KR-Handbook.pdf
552[1] http://gsd.uwaterloo.ca/sites/default/files/vm-2013-berger.pdf
553[2] https://cados.cs.fau.de
554[3] https://vamos.cs.fau.de
555[4] https://undertaker.cs.fau.de
556[5] https://www4.cs.fau.de/Publications/2011/tartler_11_eurosys.pdf
diff --git a/Documentation/kernel-docs.txt b/Documentation/kernel-docs.txt
index eda1eb1451a0..08913361e054 100644
--- a/Documentation/kernel-docs.txt
+++ b/Documentation/kernel-docs.txt
@@ -696,18 +696,18 @@
696 Memory related patches, HOWTOs, links, mm developers... Don't miss 696 Memory related patches, HOWTOs, links, mm developers... Don't miss
697 it if you are interested in memory management development! 697 it if you are interested in memory management development!
698 698
699 * Name: "Kernel Newbies IRC Channel" 699 * Name: "Kernel Newbies IRC Channel and Website"
700 URL: http://www.kernelnewbies.org 700 URL: http://www.kernelnewbies.org
701 Keywords: IRC, newbies, channel, asking doubts. 701 Keywords: IRC, newbies, channel, asking doubts.
702 Description: #kernelnewbies on irc.openprojects.net. From the web 702 Description: #kernelnewbies on irc.oftc.net.
703 page: "#kernelnewbies is an IRC network dedicated to the 'newbie' 703 #kernelnewbies is an IRC network dedicated to the 'newbie'
704 kernel hacker. The audience mostly consists of people who are 704 kernel hacker. The audience mostly consists of people who are
705 learning about the kernel, working on kernel projects or 705 learning about the kernel, working on kernel projects or
706 professional kernel hackers that want to help less seasoned kernel 706 professional kernel hackers that want to help less seasoned kernel
707 people. [...] #kernelnewbies is on the Open Projects IRC Network, 707 people.
708 try irc.openprojects.net or irc.<country>.openprojects.net as your 708 #kernelnewbies is on the OFTC IRC Network.
709 server and then /join #kernelnewbies". It also hosts articles, 709 Try irc.oftc.net as your server and then /join #kernelnewbies.
710 documents, FAQs... 710 The kernelnewbies website also hosts articles, documents, FAQs...
711 711
712 * Name: "linux-kernel mailing list archives and search engines" 712 * Name: "linux-kernel mailing list archives and search engines"
713 URL: http://vger.kernel.org/vger-lists.html 713 URL: http://vger.kernel.org/vger-lists.html
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 22a4b687ea5b..f8aae632f02f 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -167,7 +167,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
167 167
168 acpi= [HW,ACPI,X86,ARM64] 168 acpi= [HW,ACPI,X86,ARM64]
169 Advanced Configuration and Power Interface 169 Advanced Configuration and Power Interface
170 Format: { force | off | strict | noirq | rsdt } 170 Format: { force | off | strict | noirq | rsdt |
171 copy_dsdt }
171 force -- enable ACPI if default was off 172 force -- enable ACPI if default was off
172 off -- disable ACPI if default was on 173 off -- disable ACPI if default was on
173 noirq -- do not use ACPI for IRQ routing 174 noirq -- do not use ACPI for IRQ routing
@@ -789,8 +790,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
789 is passed, kernel could allocate physical memory region 790 is passed, kernel could allocate physical memory region
790 above 4G, that cause second kernel crash on system 791 above 4G, that cause second kernel crash on system
791 that require some amount of low memory, e.g. swiotlb 792 that require some amount of low memory, e.g. swiotlb
792 requires at least 64M+32K low memory. Kernel would 793 requires at least 64M+32K low memory, also enough extra
793 try to allocate 72M below 4G automatically. 794 low memory is needed to make sure DMA buffers for 32-bit
795 devices won't run out. Kernel would try to allocate at
796 at least 256M below 4G automatically.
794 This one let user to specify own low range under 4G 797 This one let user to specify own low range under 4G
795 for second kernel instead. 798 for second kernel instead.
796 0: to disable low allocation. 799 0: to disable low allocation.
@@ -929,11 +932,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
929 The filter can be disabled or changed to another 932 The filter can be disabled or changed to another
930 driver later using sysfs. 933 driver later using sysfs.
931 934
932 drm_kms_helper.edid_firmware=[<connector>:]<file> 935 drm_kms_helper.edid_firmware=[<connector>:]<file>[,[<connector>:]<file>]
933 Broken monitors, graphic adapters and KVMs may 936 Broken monitors, graphic adapters, KVMs and EDIDless
934 send no or incorrect EDID data sets. This parameter 937 panels may send no or incorrect EDID data sets.
935 allows to specify an EDID data set in the 938 This parameter allows to specify an EDID data sets
936 /lib/firmware directory that is used instead. 939 in the /lib/firmware directory that are used instead.
937 Generic built-in EDID data sets are used, if one of 940 Generic built-in EDID data sets are used, if one of
938 edid/1024x768.bin, edid/1280x1024.bin, 941 edid/1024x768.bin, edid/1280x1024.bin,
939 edid/1680x1050.bin, or edid/1920x1080.bin is given 942 edid/1680x1050.bin, or edid/1920x1080.bin is given
@@ -942,7 +945,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
942 available in Documentation/EDID/HOWTO.txt. An EDID 945 available in Documentation/EDID/HOWTO.txt. An EDID
943 data set will only be used for a particular connector, 946 data set will only be used for a particular connector,
944 if its name and a colon are prepended to the EDID 947 if its name and a colon are prepended to the EDID
945 name. 948 name. Each connector may use a unique EDID data
949 set by separating the files with a comma. An EDID
950 data set with no connector name will be used for
951 any connectors not explicitly specified.
946 952
947 dscc4.setup= [NET] 953 dscc4.setup= [NET]
948 954
@@ -971,6 +977,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
971 977
972 earlycon= [KNL] Output early console device and options. 978 earlycon= [KNL] Output early console device and options.
973 979
980 When used with no options, the early console is
981 determined by the stdout-path property in device
982 tree's chosen node.
983
974 cdns,<addr> 984 cdns,<addr>
975 Start an early, polled-mode console on a cadence serial 985 Start an early, polled-mode console on a cadence serial
976 port at the specified address. The cadence serial port 986 port at the specified address. The cadence serial port
@@ -1023,6 +1033,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1023 serial port must already be setup and configured. 1033 serial port must already be setup and configured.
1024 Options are not yet supported. 1034 Options are not yet supported.
1025 1035
1036 lpuart,<addr>
1037 lpuart32,<addr>
1038 Use early console provided by Freescale LP UART driver
1039 found on Freescale Vybrid and QorIQ LS1021A processors.
1040 A valid base address must be provided, and the serial
1041 port must already be setup and configured.
1042
1026 earlyprintk= [X86,SH,BLACKFIN,ARM,M68k] 1043 earlyprintk= [X86,SH,BLACKFIN,ARM,M68k]
1027 earlyprintk=vga 1044 earlyprintk=vga
1028 earlyprintk=efi 1045 earlyprintk=efi
@@ -1094,6 +1111,21 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1094 you are really sure that your UEFI does sane gc and 1111 you are really sure that your UEFI does sane gc and
1095 fulfills the spec otherwise your board may brick. 1112 fulfills the spec otherwise your board may brick.
1096 1113
1114 efi_fake_mem= nn[KMG]@ss[KMG]:aa[,nn[KMG]@ss[KMG]:aa,..] [EFI; X86]
1115 Add arbitrary attribute to specific memory range by
1116 updating original EFI memory map.
1117 Region of memory which aa attribute is added to is
1118 from ss to ss+nn.
1119 If efi_fake_mem=2G@4G:0x10000,2G@0x10a0000000:0x10000
1120 is specified, EFI_MEMORY_MORE_RELIABLE(0x10000)
1121 attribute is added to range 0x100000000-0x180000000 and
1122 0x10a0000000-0x1120000000.
1123
1124 Using this parameter you can do debugging of EFI memmap
1125 related feature. For example, you can do debugging of
1126 Address Range Mirroring feature even if your box
1127 doesn't support it.
1128
1097 eisa_irq_edge= [PARISC,HW] 1129 eisa_irq_edge= [PARISC,HW]
1098 See header of drivers/parisc/eisa.c. 1130 See header of drivers/parisc/eisa.c.
1099 1131
@@ -1246,6 +1278,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1246 Format: <unsigned int> such that (rxsize & ~0x1fffc0) == 0. 1278 Format: <unsigned int> such that (rxsize & ~0x1fffc0) == 0.
1247 Default: 1024 1279 Default: 1024
1248 1280
1281 hardlockup_all_cpu_backtrace=
1282 [KNL] Should the hard-lockup detector generate
1283 backtraces on all cpus.
1284 Format: <integer>
1285
1249 hashdist= [KNL,NUMA] Large hashes allocated during boot 1286 hashdist= [KNL,NUMA] Large hashes allocated during boot
1250 are distributed across NUMA nodes. Defaults on 1287 are distributed across NUMA nodes. Defaults on
1251 for 64-bit NUMA, off otherwise. 1288 for 64-bit NUMA, off otherwise.
@@ -1546,6 +1583,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1546 hwp_only 1583 hwp_only
1547 Only load intel_pstate on systems which support 1584 Only load intel_pstate on systems which support
1548 hardware P state control (HWP) if available. 1585 hardware P state control (HWP) if available.
1586 no_acpi
1587 Don't use ACPI processor performance control objects
1588 _PSS and _PPC specified limits.
1549 1589
1550 intremap= [X86-64, Intel-IOMMU] 1590 intremap= [X86-64, Intel-IOMMU]
1551 on enable Interrupt Remapping (default) 1591 on enable Interrupt Remapping (default)
@@ -1553,6 +1593,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1553 nosid disable Source ID checking 1593 nosid disable Source ID checking
1554 no_x2apic_optout 1594 no_x2apic_optout
1555 BIOS x2APIC opt-out request will be ignored 1595 BIOS x2APIC opt-out request will be ignored
1596 nopost disable Interrupt Posting
1556 1597
1557 iomem= Disable strict checking of access to MMIO memory 1598 iomem= Disable strict checking of access to MMIO memory
1558 strict regions from userspace. 1599 strict regions from userspace.
@@ -2314,11 +2355,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2314 nmi_watchdog= [KNL,BUGS=X86] Debugging features for SMP kernels 2355 nmi_watchdog= [KNL,BUGS=X86] Debugging features for SMP kernels
2315 Format: [panic,][nopanic,][num] 2356 Format: [panic,][nopanic,][num]
2316 Valid num: 0 or 1 2357 Valid num: 0 or 1
2317 0 - turn nmi_watchdog off 2358 0 - turn hardlockup detector in nmi_watchdog off
2318 1 - turn nmi_watchdog on 2359 1 - turn hardlockup detector in nmi_watchdog on
2319 When panic is specified, panic when an NMI watchdog 2360 When panic is specified, panic when an NMI watchdog
2320 timeout occurs (or 'nopanic' to override the opposite 2361 timeout occurs (or 'nopanic' to override the opposite
2321 default). 2362 default). To disable both hard and soft lockup detectors,
2363 please see 'nowatchdog'.
2322 This is useful when you use a panic=... timeout and 2364 This is useful when you use a panic=... timeout and
2323 need the box quickly up again. 2365 need the box quickly up again.
2324 2366
@@ -3074,9 +3116,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
3074 cache-to-cache transfer latencies. 3116 cache-to-cache transfer latencies.
3075 3117
3076 rcutree.rcu_fanout_leaf= [KNL] 3118 rcutree.rcu_fanout_leaf= [KNL]
3077 Increase the number of CPUs assigned to each 3119 Change the number of CPUs assigned to each
3078 leaf rcu_node structure. Useful for very large 3120 leaf rcu_node structure. Useful for very
3079 systems. 3121 large systems, which will choose the value 64,
3122 and for NUMA systems with large remote-access
3123 latencies, which will choose a value aligned
3124 with the appropriate hardware boundaries.
3080 3125
3081 rcutree.jiffies_till_sched_qs= [KNL] 3126 rcutree.jiffies_till_sched_qs= [KNL]
3082 Set required age in jiffies for a 3127 Set required age in jiffies for a
diff --git a/Documentation/kselftest.txt b/Documentation/kselftest.txt
index a87d840bacfe..9bbbcdc598d9 100644
--- a/Documentation/kselftest.txt
+++ b/Documentation/kselftest.txt
@@ -54,6 +54,22 @@ To run the hotplug tests:
54- note that some tests will require root privileges. 54- note that some tests will require root privileges.
55 55
56 56
57Install selftests
58=================
59
60You can use kselftest_install.sh tool installs selftests in default
61location which is tools/testing/selftests/kselftest or an user specified
62location.
63
64To install selftests in default location:
65 $ cd tools/testing/selftests
66 $ ./kselftest_install.sh
67
68To install selftests in an user specified location:
69 $ cd tools/testing/selftests
70 $ ./kselftest_install.sh install_dir
71
72
57Contributing new tests 73Contributing new tests
58====================== 74======================
59 75
diff --git a/Documentation/locking/lockstat.txt b/Documentation/locking/lockstat.txt
index 568bbbacee91..5786ad2cd5e6 100644
--- a/Documentation/locking/lockstat.txt
+++ b/Documentation/locking/lockstat.txt
@@ -12,7 +12,7 @@ Because things like lock contention can severely impact performance.
12- HOW 12- HOW
13 13
14Lockdep already has hooks in the lock functions and maps lock instances to 14Lockdep already has hooks in the lock functions and maps lock instances to
15lock classes. We build on that (see Documentation/lokcing/lockdep-design.txt). 15lock classes. We build on that (see Documentation/locking/lockdep-design.txt).
16The graph below shows the relation between the lock functions and the various 16The graph below shows the relation between the lock functions and the various
17hooks therein. 17hooks therein.
18 18
diff --git a/Documentation/locking/locktorture.txt b/Documentation/locking/locktorture.txt
index 619f2bb136a5..a2ef3a929bf1 100644
--- a/Documentation/locking/locktorture.txt
+++ b/Documentation/locking/locktorture.txt
@@ -52,6 +52,9 @@ torture_type Type of lock to torture. By default, only spinlocks will
52 52
53 o "mutex_lock": mutex_lock() and mutex_unlock() pairs. 53 o "mutex_lock": mutex_lock() and mutex_unlock() pairs.
54 54
55 o "rtmutex_lock": rtmutex_lock() and rtmutex_unlock()
56 pairs. Kernel must have CONFIG_RT_MUTEX=y.
57
55 o "rwsem_lock": read/write down() and up() semaphore pairs. 58 o "rwsem_lock": read/write down() and up() semaphore pairs.
56 59
57torture_runnable Start locktorture at boot time in the case where the 60torture_runnable Start locktorture at boot time in the case where the
diff --git a/Documentation/lockup-watchdogs.txt b/Documentation/lockup-watchdogs.txt
index 22dd6af2e4bd..4a6e33e1af61 100644
--- a/Documentation/lockup-watchdogs.txt
+++ b/Documentation/lockup-watchdogs.txt
@@ -20,8 +20,9 @@ kernel mode for more than 10 seconds (see "Implementation" below for
20details), without letting other interrupts have a chance to run. 20details), without letting other interrupts have a chance to run.
21Similarly to the softlockup case, the current stack trace is displayed 21Similarly to the softlockup case, the current stack trace is displayed
22upon detection and the system will stay locked up unless the default 22upon detection and the system will stay locked up unless the default
23behavior is changed, which can be done through a compile time knob, 23behavior is changed, which can be done through a sysctl,
24"BOOTPARAM_HARDLOCKUP_PANIC", and a kernel parameter, "nmi_watchdog" 24'hardlockup_panic', a compile time knob, "BOOTPARAM_HARDLOCKUP_PANIC",
25and a kernel parameter, "nmi_watchdog"
25(see "Documentation/kernel-parameters.txt" for details). 26(see "Documentation/kernel-parameters.txt" for details).
26 27
27The panic option can be used in combination with panic_timeout (this 28The panic option can be used in combination with panic_timeout (this
diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt
index 2ba8461b0631..aef9487303d0 100644
--- a/Documentation/memory-barriers.txt
+++ b/Documentation/memory-barriers.txt
@@ -617,16 +617,16 @@ case what's actually required is:
617However, stores are not speculated. This means that ordering -is- provided 617However, stores are not speculated. This means that ordering -is- provided
618for load-store control dependencies, as in the following example: 618for load-store control dependencies, as in the following example:
619 619
620 q = READ_ONCE_CTRL(a); 620 q = READ_ONCE(a);
621 if (q) { 621 if (q) {
622 WRITE_ONCE(b, p); 622 WRITE_ONCE(b, p);
623 } 623 }
624 624
625Control dependencies pair normally with other types of barriers. That 625Control dependencies pair normally with other types of barriers. That
626said, please note that READ_ONCE_CTRL() is not optional! Without the 626said, please note that READ_ONCE() is not optional! Without the
627READ_ONCE_CTRL(), the compiler might combine the load from 'a' with 627READ_ONCE(), the compiler might combine the load from 'a' with other
628other loads from 'a', and the store to 'b' with other stores to 'b', 628loads from 'a', and the store to 'b' with other stores to 'b', with
629with possible highly counterintuitive effects on ordering. 629possible highly counterintuitive effects on ordering.
630 630
631Worse yet, if the compiler is able to prove (say) that the value of 631Worse yet, if the compiler is able to prove (say) that the value of
632variable 'a' is always non-zero, it would be well within its rights 632variable 'a' is always non-zero, it would be well within its rights
@@ -636,15 +636,12 @@ as follows:
636 q = a; 636 q = a;
637 b = p; /* BUG: Compiler and CPU can both reorder!!! */ 637 b = p; /* BUG: Compiler and CPU can both reorder!!! */
638 638
639Finally, the READ_ONCE_CTRL() includes an smp_read_barrier_depends() 639So don't leave out the READ_ONCE().
640that DEC Alpha needs in order to respect control depedencies.
641
642So don't leave out the READ_ONCE_CTRL().
643 640
644It is tempting to try to enforce ordering on identical stores on both 641It is tempting to try to enforce ordering on identical stores on both
645branches of the "if" statement as follows: 642branches of the "if" statement as follows:
646 643
647 q = READ_ONCE_CTRL(a); 644 q = READ_ONCE(a);
648 if (q) { 645 if (q) {
649 barrier(); 646 barrier();
650 WRITE_ONCE(b, p); 647 WRITE_ONCE(b, p);
@@ -658,7 +655,7 @@ branches of the "if" statement as follows:
658Unfortunately, current compilers will transform this as follows at high 655Unfortunately, current compilers will transform this as follows at high
659optimization levels: 656optimization levels:
660 657
661 q = READ_ONCE_CTRL(a); 658 q = READ_ONCE(a);
662 barrier(); 659 barrier();
663 WRITE_ONCE(b, p); /* BUG: No ordering vs. load from a!!! */ 660 WRITE_ONCE(b, p); /* BUG: No ordering vs. load from a!!! */
664 if (q) { 661 if (q) {
@@ -688,7 +685,7 @@ memory barriers, for example, smp_store_release():
688In contrast, without explicit memory barriers, two-legged-if control 685In contrast, without explicit memory barriers, two-legged-if control
689ordering is guaranteed only when the stores differ, for example: 686ordering is guaranteed only when the stores differ, for example:
690 687
691 q = READ_ONCE_CTRL(a); 688 q = READ_ONCE(a);
692 if (q) { 689 if (q) {
693 WRITE_ONCE(b, p); 690 WRITE_ONCE(b, p);
694 do_something(); 691 do_something();
@@ -697,14 +694,14 @@ ordering is guaranteed only when the stores differ, for example:
697 do_something_else(); 694 do_something_else();
698 } 695 }
699 696
700The initial READ_ONCE_CTRL() is still required to prevent the compiler 697The initial READ_ONCE() is still required to prevent the compiler from
701from proving the value of 'a'. 698proving the value of 'a'.
702 699
703In addition, you need to be careful what you do with the local variable 'q', 700In addition, you need to be careful what you do with the local variable 'q',
704otherwise the compiler might be able to guess the value and again remove 701otherwise the compiler might be able to guess the value and again remove
705the needed conditional. For example: 702the needed conditional. For example:
706 703
707 q = READ_ONCE_CTRL(a); 704 q = READ_ONCE(a);
708 if (q % MAX) { 705 if (q % MAX) {
709 WRITE_ONCE(b, p); 706 WRITE_ONCE(b, p);
710 do_something(); 707 do_something();
@@ -717,7 +714,7 @@ If MAX is defined to be 1, then the compiler knows that (q % MAX) is
717equal to zero, in which case the compiler is within its rights to 714equal to zero, in which case the compiler is within its rights to
718transform the above code into the following: 715transform the above code into the following:
719 716
720 q = READ_ONCE_CTRL(a); 717 q = READ_ONCE(a);
721 WRITE_ONCE(b, p); 718 WRITE_ONCE(b, p);
722 do_something_else(); 719 do_something_else();
723 720
@@ -728,7 +725,7 @@ is gone, and the barrier won't bring it back. Therefore, if you are
728relying on this ordering, you should make sure that MAX is greater than 725relying on this ordering, you should make sure that MAX is greater than
729one, perhaps as follows: 726one, perhaps as follows:
730 727
731 q = READ_ONCE_CTRL(a); 728 q = READ_ONCE(a);
732 BUILD_BUG_ON(MAX <= 1); /* Order load from a with store to b. */ 729 BUILD_BUG_ON(MAX <= 1); /* Order load from a with store to b. */
733 if (q % MAX) { 730 if (q % MAX) {
734 WRITE_ONCE(b, p); 731 WRITE_ONCE(b, p);
@@ -745,7 +742,7 @@ of the 'if' statement.
745You must also be careful not to rely too much on boolean short-circuit 742You must also be careful not to rely too much on boolean short-circuit
746evaluation. Consider this example: 743evaluation. Consider this example:
747 744
748 q = READ_ONCE_CTRL(a); 745 q = READ_ONCE(a);
749 if (q || 1 > 0) 746 if (q || 1 > 0)
750 WRITE_ONCE(b, 1); 747 WRITE_ONCE(b, 1);
751 748
@@ -753,7 +750,7 @@ Because the first condition cannot fault and the second condition is
753always true, the compiler can transform this example as following, 750always true, the compiler can transform this example as following,
754defeating control dependency: 751defeating control dependency:
755 752
756 q = READ_ONCE_CTRL(a); 753 q = READ_ONCE(a);
757 WRITE_ONCE(b, 1); 754 WRITE_ONCE(b, 1);
758 755
759This example underscores the need to ensure that the compiler cannot 756This example underscores the need to ensure that the compiler cannot
@@ -767,7 +764,7 @@ x and y both being zero:
767 764
768 CPU 0 CPU 1 765 CPU 0 CPU 1
769 ======================= ======================= 766 ======================= =======================
770 r1 = READ_ONCE_CTRL(x); r2 = READ_ONCE_CTRL(y); 767 r1 = READ_ONCE(x); r2 = READ_ONCE(y);
771 if (r1 > 0) if (r2 > 0) 768 if (r1 > 0) if (r2 > 0)
772 WRITE_ONCE(y, 1); WRITE_ONCE(x, 1); 769 WRITE_ONCE(y, 1); WRITE_ONCE(x, 1);
773 770
@@ -796,11 +793,6 @@ site: https://www.cl.cam.ac.uk/~pes20/ppcmem/index.html.
796 793
797In summary: 794In summary:
798 795
799 (*) Control dependencies must be headed by READ_ONCE_CTRL().
800 Or, as a much less preferable alternative, interpose
801 smp_read_barrier_depends() between a READ_ONCE() and the
802 control-dependent write.
803
804 (*) Control dependencies can order prior loads against later stores. 796 (*) Control dependencies can order prior loads against later stores.
805 However, they do -not- guarantee any other sort of ordering: 797 However, they do -not- guarantee any other sort of ordering:
806 Not prior loads against later loads, nor prior stores against 798 Not prior loads against later loads, nor prior stores against
@@ -816,14 +808,13 @@ In summary:
816 between the prior load and the subsequent store, and this 808 between the prior load and the subsequent store, and this
817 conditional must involve the prior load. If the compiler is able 809 conditional must involve the prior load. If the compiler is able
818 to optimize the conditional away, it will have also optimized 810 to optimize the conditional away, it will have also optimized
819 away the ordering. Careful use of READ_ONCE_CTRL() READ_ONCE(), 811 away the ordering. Careful use of READ_ONCE() and WRITE_ONCE()
820 and WRITE_ONCE() can help to preserve the needed conditional. 812 can help to preserve the needed conditional.
821 813
822 (*) Control dependencies require that the compiler avoid reordering the 814 (*) Control dependencies require that the compiler avoid reordering the
823 dependency into nonexistence. Careful use of READ_ONCE_CTRL() 815 dependency into nonexistence. Careful use of READ_ONCE() or
824 or smp_read_barrier_depends() can help to preserve your control 816 atomic{,64}_read() can help to preserve your control dependency.
825 dependency. Please see the Compiler Barrier section for more 817 Please see the Compiler Barrier section for more information.
826 information.
827 818
828 (*) Control dependencies pair normally with other types of barriers. 819 (*) Control dependencies pair normally with other types of barriers.
829 820
@@ -1710,6 +1701,17 @@ There are some more advanced barrier functions:
1710 operations" subsection for information on where to use these. 1701 operations" subsection for information on where to use these.
1711 1702
1712 1703
1704 (*) lockless_dereference();
1705 This can be thought of as a pointer-fetch wrapper around the
1706 smp_read_barrier_depends() data-dependency barrier.
1707
1708 This is also similar to rcu_dereference(), but in cases where
1709 object lifetime is handled by some mechanism other than RCU, for
1710 example, when the objects removed only when the system goes down.
1711 In addition, lockless_dereference() is used in some data structures
1712 that can be used both with and without RCU.
1713
1714
1713 (*) dma_wmb(); 1715 (*) dma_wmb();
1714 (*) dma_rmb(); 1716 (*) dma_rmb();
1715 1717
@@ -1789,7 +1791,6 @@ The Linux kernel has a number of locking constructs:
1789 (*) mutexes 1791 (*) mutexes
1790 (*) semaphores 1792 (*) semaphores
1791 (*) R/W semaphores 1793 (*) R/W semaphores
1792 (*) RCU
1793 1794
1794In all cases there are variants on "ACQUIRE" operations and "RELEASE" operations 1795In all cases there are variants on "ACQUIRE" operations and "RELEASE" operations
1795for each construct. These operations all imply certain barriers: 1796for each construct. These operations all imply certain barriers:
diff --git a/Documentation/mic/mic_overview.txt b/Documentation/mic/mic_overview.txt
index 1a2f2c8ec59e..73f44fc3e715 100644
--- a/Documentation/mic/mic_overview.txt
+++ b/Documentation/mic/mic_overview.txt
@@ -28,6 +28,10 @@ The Symmetric Communication Interface (SCIF (pronounced as skiff)) is a
28low level communications API across PCIe currently implemented for MIC. 28low level communications API across PCIe currently implemented for MIC.
29More details are available at scif_overview.txt. 29More details are available at scif_overview.txt.
30 30
31The Coprocessor State Management (COSM) driver on the host allows for
32boot, shutdown and reset of Intel MIC devices. It communicates with a COSM
33"client" driver on the MIC cards over SCIF to perform these functions.
34
31Here is a block diagram of the various components described above. The 35Here is a block diagram of the various components described above. The
32virtio backends are situated on the host rather than the card given better 36virtio backends are situated on the host rather than the card given better
33single threaded performance for the host compared to MIC, the ability of 37single threaded performance for the host compared to MIC, the ability of
@@ -51,19 +55,20 @@ the fact that the virtio block storage backend can only be on the host.
51 | | | Virtio over PCIe IOCTLs | 55 | | | Virtio over PCIe IOCTLs |
52 | | +--------------------------+ 56 | | +--------------------------+
53+-----------+ | | | +-----------+ 57+-----------+ | | | +-----------+
54| MIC DMA | | +----------+ | +-----------+ | | MIC DMA | 58| MIC DMA | | +------+ | +------+ +------+ | | MIC DMA |
55| Driver | | | SCIF | | | SCIF | | | Driver | 59| Driver | | | SCIF | | | SCIF | | COSM | | | Driver |
56+-----------+ | +----------+ | +-----------+ | +-----------+ 60+-----------+ | +------+ | +------+ +--+---+ | +-----------+
57 | | | | | | | 61 | | | | | | | |
58+---------------+ | +-----+-----+ | +-----+-----+ | +---------------+ 62+---------------+ | +------+ | +--+---+ +--+---+ | +----------------+
59|MIC virtual Bus| | |SCIF HW Bus| | |SCIF HW BUS| | |MIC virtual Bus| 63|MIC virtual Bus| | |SCIF | | |SCIF | | COSM | | |MIC virtual Bus |
60+---------------+ | +-----------+ | +-----+-----+ | +---------------+ 64+---------------+ | |HW Bus| | |HW Bus| | Bus | | +----------------+
61 | | | | | | | 65 | | +------+ | +--+---+ +------+ | |
62 | +--------------+ | | | +---------------+ | 66 | | | | | | | |
63 | |Intel MIC | | | | |Intel MIC | | 67 | +-----------+---+ | | | +---------------+ |
64 +---|Card Driver +----+ | | |Host Driver | | 68 | |Intel MIC | | | | |Intel MIC | |
65 +--------------+ | +----+---------------+-----+ 69 +---|Card Driver | | | | |Host Driver | |
66 | | | 70 +------------+--------+ | +----+---------------+-----+
71 | | |
67 +-------------------------------------------------------------+ 72 +-------------------------------------------------------------+
68 | | 73 | |
69 | PCIe Bus | 74 | PCIe Bus |
diff --git a/Documentation/mic/mpssd/mpss b/Documentation/mic/mpssd/mpss
index 582aad4811ae..09ea90931649 100755
--- a/Documentation/mic/mpssd/mpss
+++ b/Documentation/mic/mpssd/mpss
@@ -119,10 +119,10 @@ stop()
119 # Wait for the cards to go offline 119 # Wait for the cards to go offline
120 for f in $sysfs/* 120 for f in $sysfs/*
121 do 121 do
122 while [ "`cat $f/state`" != "offline" ] 122 while [ "`cat $f/state`" != "ready" ]
123 do 123 do
124 sleep 1 124 sleep 1
125 echo -e "Waiting for "`basename $f`" to go offline" 125 echo -e "Waiting for "`basename $f`" to become ready"
126 done 126 done
127 done 127 done
128 128
diff --git a/Documentation/mic/mpssd/mpssd.c b/Documentation/mic/mpssd/mpssd.c
index 3c5c379fc29d..aaeafa18d99b 100644
--- a/Documentation/mic/mpssd/mpssd.c
+++ b/Documentation/mic/mpssd/mpssd.c
@@ -43,7 +43,7 @@
43#include <linux/mic_common.h> 43#include <linux/mic_common.h>
44#include <tools/endian.h> 44#include <tools/endian.h>
45 45
46static void init_mic(struct mic_info *mic); 46static void *init_mic(void *arg);
47 47
48static FILE *logfp; 48static FILE *logfp;
49static struct mic_info mic_list; 49static struct mic_info mic_list;
@@ -116,19 +116,18 @@ static struct {
116 .num = htole16(MIC_VRING_ENTRIES), 116 .num = htole16(MIC_VRING_ENTRIES),
117 }, 117 },
118#if GSO_ENABLED 118#if GSO_ENABLED
119 .host_features = htole32( 119 .host_features = htole32(
120 1 << VIRTIO_NET_F_CSUM | 120 1 << VIRTIO_NET_F_CSUM |
121 1 << VIRTIO_NET_F_GSO | 121 1 << VIRTIO_NET_F_GSO |
122 1 << VIRTIO_NET_F_GUEST_TSO4 | 122 1 << VIRTIO_NET_F_GUEST_TSO4 |
123 1 << VIRTIO_NET_F_GUEST_TSO6 | 123 1 << VIRTIO_NET_F_GUEST_TSO6 |
124 1 << VIRTIO_NET_F_GUEST_ECN | 124 1 << VIRTIO_NET_F_GUEST_ECN),
125 1 << VIRTIO_NET_F_GUEST_UFO),
126#else 125#else
127 .host_features = 0, 126 .host_features = 0,
128#endif 127#endif
129}; 128};
130 129
131static const char *mic_config_dir = "/etc/sysconfig/mic"; 130static const char *mic_config_dir = "/etc/mpss";
132static const char *virtblk_backend = "VIRTBLK_BACKEND"; 131static const char *virtblk_backend = "VIRTBLK_BACKEND";
133static struct { 132static struct {
134 struct mic_device_desc dd; 133 struct mic_device_desc dd;
@@ -192,7 +191,7 @@ tap_configure(struct mic_info *mic, char *dev)
192 return ret; 191 return ret;
193 } 192 }
194 193
195 snprintf(ipaddr, IFNAMSIZ, "172.31.%d.254/24", mic->id); 194 snprintf(ipaddr, IFNAMSIZ, "172.31.%d.254/24", mic->id + 1);
196 195
197 pid = fork(); 196 pid = fork();
198 if (pid == 0) { 197 if (pid == 0) {
@@ -255,8 +254,7 @@ static int tun_alloc(struct mic_info *mic, char *dev)
255 return err; 254 return err;
256 } 255 }
257#if GSO_ENABLED 256#if GSO_ENABLED
258 offload = TUN_F_CSUM | TUN_F_TSO4 | TUN_F_TSO6 | 257 offload = TUN_F_CSUM | TUN_F_TSO4 | TUN_F_TSO6 | TUN_F_TSO_ECN;
259 TUN_F_TSO_ECN | TUN_F_UFO;
260 258
261 err = ioctl(fd, TUNSETOFFLOAD, offload); 259 err = ioctl(fd, TUNSETOFFLOAD, offload);
262 if (err < 0) { 260 if (err < 0) {
@@ -332,7 +330,6 @@ static struct mic_device_desc *get_device_desc(struct mic_info *mic, int type)
332 return d; 330 return d;
333 } 331 }
334 mpsslog("%s %s %d not found\n", mic->name, __func__, type); 332 mpsslog("%s %s %d not found\n", mic->name, __func__, type);
335 assert(0);
336 return NULL; 333 return NULL;
337} 334}
338 335
@@ -415,6 +412,13 @@ mic_virtio_copy(struct mic_info *mic, int fd,
415 return ret; 412 return ret;
416} 413}
417 414
415static inline unsigned _vring_size(unsigned int num, unsigned long align)
416{
417 return ((sizeof(struct vring_desc) * num + sizeof(__u16) * (3 + num)
418 + align - 1) & ~(align - 1))
419 + sizeof(__u16) * 3 + sizeof(struct vring_used_elem) * num;
420}
421
418/* 422/*
419 * This initialization routine requires at least one 423 * This initialization routine requires at least one
420 * vring i.e. vr0. vr1 is optional. 424 * vring i.e. vr0. vr1 is optional.
@@ -426,8 +430,9 @@ init_vr(struct mic_info *mic, int fd, int type,
426 int vr_size; 430 int vr_size;
427 char *va; 431 char *va;
428 432
429 vr_size = PAGE_ALIGN(vring_size(MIC_VRING_ENTRIES, 433 vr_size = PAGE_ALIGN(_vring_size(MIC_VRING_ENTRIES,
430 MIC_VIRTIO_RING_ALIGN) + sizeof(struct _mic_vring_info)); 434 MIC_VIRTIO_RING_ALIGN) +
435 sizeof(struct _mic_vring_info));
431 va = mmap(NULL, MIC_DEVICE_PAGE_END + vr_size * num_vq, 436 va = mmap(NULL, MIC_DEVICE_PAGE_END + vr_size * num_vq,
432 PROT_READ, MAP_SHARED, fd, 0); 437 PROT_READ, MAP_SHARED, fd, 0);
433 if (MAP_FAILED == va) { 438 if (MAP_FAILED == va) {
@@ -439,25 +444,25 @@ init_vr(struct mic_info *mic, int fd, int type,
439 set_dp(mic, type, va); 444 set_dp(mic, type, va);
440 vr0->va = (struct mic_vring *)&va[MIC_DEVICE_PAGE_END]; 445 vr0->va = (struct mic_vring *)&va[MIC_DEVICE_PAGE_END];
441 vr0->info = vr0->va + 446 vr0->info = vr0->va +
442 vring_size(MIC_VRING_ENTRIES, MIC_VIRTIO_RING_ALIGN); 447 _vring_size(MIC_VRING_ENTRIES, MIC_VIRTIO_RING_ALIGN);
443 vring_init(&vr0->vr, 448 vring_init(&vr0->vr,
444 MIC_VRING_ENTRIES, vr0->va, MIC_VIRTIO_RING_ALIGN); 449 MIC_VRING_ENTRIES, vr0->va, MIC_VIRTIO_RING_ALIGN);
445 mpsslog("%s %s vr0 %p vr0->info %p vr_size 0x%x vring 0x%x ", 450 mpsslog("%s %s vr0 %p vr0->info %p vr_size 0x%x vring 0x%x ",
446 __func__, mic->name, vr0->va, vr0->info, vr_size, 451 __func__, mic->name, vr0->va, vr0->info, vr_size,
447 vring_size(MIC_VRING_ENTRIES, MIC_VIRTIO_RING_ALIGN)); 452 _vring_size(MIC_VRING_ENTRIES, MIC_VIRTIO_RING_ALIGN));
448 mpsslog("magic 0x%x expected 0x%x\n", 453 mpsslog("magic 0x%x expected 0x%x\n",
449 le32toh(vr0->info->magic), MIC_MAGIC + type); 454 le32toh(vr0->info->magic), MIC_MAGIC + type);
450 assert(le32toh(vr0->info->magic) == MIC_MAGIC + type); 455 assert(le32toh(vr0->info->magic) == MIC_MAGIC + type);
451 if (vr1) { 456 if (vr1) {
452 vr1->va = (struct mic_vring *) 457 vr1->va = (struct mic_vring *)
453 &va[MIC_DEVICE_PAGE_END + vr_size]; 458 &va[MIC_DEVICE_PAGE_END + vr_size];
454 vr1->info = vr1->va + vring_size(MIC_VRING_ENTRIES, 459 vr1->info = vr1->va + _vring_size(MIC_VRING_ENTRIES,
455 MIC_VIRTIO_RING_ALIGN); 460 MIC_VIRTIO_RING_ALIGN);
456 vring_init(&vr1->vr, 461 vring_init(&vr1->vr,
457 MIC_VRING_ENTRIES, vr1->va, MIC_VIRTIO_RING_ALIGN); 462 MIC_VRING_ENTRIES, vr1->va, MIC_VIRTIO_RING_ALIGN);
458 mpsslog("%s %s vr1 %p vr1->info %p vr_size 0x%x vring 0x%x ", 463 mpsslog("%s %s vr1 %p vr1->info %p vr_size 0x%x vring 0x%x ",
459 __func__, mic->name, vr1->va, vr1->info, vr_size, 464 __func__, mic->name, vr1->va, vr1->info, vr_size,
460 vring_size(MIC_VRING_ENTRIES, MIC_VIRTIO_RING_ALIGN)); 465 _vring_size(MIC_VRING_ENTRIES, MIC_VIRTIO_RING_ALIGN));
461 mpsslog("magic 0x%x expected 0x%x\n", 466 mpsslog("magic 0x%x expected 0x%x\n",
462 le32toh(vr1->info->magic), MIC_MAGIC + type + 1); 467 le32toh(vr1->info->magic), MIC_MAGIC + type + 1);
463 assert(le32toh(vr1->info->magic) == MIC_MAGIC + type + 1); 468 assert(le32toh(vr1->info->magic) == MIC_MAGIC + type + 1);
@@ -466,16 +471,21 @@ done:
466 return va; 471 return va;
467} 472}
468 473
469static void 474static int
470wait_for_card_driver(struct mic_info *mic, int fd, int type) 475wait_for_card_driver(struct mic_info *mic, int fd, int type)
471{ 476{
472 struct pollfd pollfd; 477 struct pollfd pollfd;
473 int err; 478 int err;
474 struct mic_device_desc *desc = get_device_desc(mic, type); 479 struct mic_device_desc *desc = get_device_desc(mic, type);
480 __u8 prev_status;
475 481
482 if (!desc)
483 return -ENODEV;
484 prev_status = desc->status;
476 pollfd.fd = fd; 485 pollfd.fd = fd;
477 mpsslog("%s %s Waiting .... desc-> type %d status 0x%x\n", 486 mpsslog("%s %s Waiting .... desc-> type %d status 0x%x\n",
478 mic->name, __func__, type, desc->status); 487 mic->name, __func__, type, desc->status);
488
479 while (1) { 489 while (1) {
480 pollfd.events = POLLIN; 490 pollfd.events = POLLIN;
481 pollfd.revents = 0; 491 pollfd.revents = 0;
@@ -487,8 +497,13 @@ wait_for_card_driver(struct mic_info *mic, int fd, int type)
487 } 497 }
488 498
489 if (pollfd.revents) { 499 if (pollfd.revents) {
490 mpsslog("%s %s Waiting... desc-> type %d status 0x%x\n", 500 if (desc->status != prev_status) {
491 mic->name, __func__, type, desc->status); 501 mpsslog("%s %s Waiting... desc-> type %d "
502 "status 0x%x\n",
503 mic->name, __func__, type,
504 desc->status);
505 prev_status = desc->status;
506 }
492 if (desc->status & VIRTIO_CONFIG_S_DRIVER_OK) { 507 if (desc->status & VIRTIO_CONFIG_S_DRIVER_OK) {
493 mpsslog("%s %s poll.revents %d\n", 508 mpsslog("%s %s poll.revents %d\n",
494 mic->name, __func__, pollfd.revents); 509 mic->name, __func__, pollfd.revents);
@@ -499,6 +514,7 @@ wait_for_card_driver(struct mic_info *mic, int fd, int type)
499 } 514 }
500 } 515 }
501 } 516 }
517 return 0;
502} 518}
503 519
504/* Spin till we have some descriptors */ 520/* Spin till we have some descriptors */
@@ -575,9 +591,16 @@ virtio_net(void *arg)
575 __func__, strerror(errno)); 591 __func__, strerror(errno));
576 continue; 592 continue;
577 } 593 }
578 if (!(desc->status & VIRTIO_CONFIG_S_DRIVER_OK)) 594 if (!(desc->status & VIRTIO_CONFIG_S_DRIVER_OK)) {
579 wait_for_card_driver(mic, mic->mic_net.virtio_net_fd, 595 err = wait_for_card_driver(mic,
580 VIRTIO_ID_NET); 596 mic->mic_net.virtio_net_fd,
597 VIRTIO_ID_NET);
598 if (err) {
599 mpsslog("%s %s %d Exiting...\n",
600 mic->name, __func__, __LINE__);
601 break;
602 }
603 }
581 /* 604 /*
582 * Check if there is data to be read from TUN and write to 605 * Check if there is data to be read from TUN and write to
583 * virtio net fd if there is. 606 * virtio net fd if there is.
@@ -786,10 +809,16 @@ virtio_console(void *arg)
786 strerror(errno)); 809 strerror(errno));
787 continue; 810 continue;
788 } 811 }
789 if (!(desc->status & VIRTIO_CONFIG_S_DRIVER_OK)) 812 if (!(desc->status & VIRTIO_CONFIG_S_DRIVER_OK)) {
790 wait_for_card_driver(mic, 813 err = wait_for_card_driver(mic,
791 mic->mic_console.virtio_console_fd, 814 mic->mic_console.virtio_console_fd,
792 VIRTIO_ID_CONSOLE); 815 VIRTIO_ID_CONSOLE);
816 if (err) {
817 mpsslog("%s %s %d Exiting...\n",
818 mic->name, __func__, __LINE__);
819 break;
820 }
821 }
793 822
794 if (console_poll[MONITOR_FD].revents & POLLIN) { 823 if (console_poll[MONITOR_FD].revents & POLLIN) {
795 copy.iov = iov0; 824 copy.iov = iov0;
@@ -1048,8 +1077,9 @@ stop_virtblk(struct mic_info *mic)
1048{ 1077{
1049 int vr_size, ret; 1078 int vr_size, ret;
1050 1079
1051 vr_size = PAGE_ALIGN(vring_size(MIC_VRING_ENTRIES, 1080 vr_size = PAGE_ALIGN(_vring_size(MIC_VRING_ENTRIES,
1052 MIC_VIRTIO_RING_ALIGN) + sizeof(struct _mic_vring_info)); 1081 MIC_VIRTIO_RING_ALIGN) +
1082 sizeof(struct _mic_vring_info));
1053 ret = munmap(mic->mic_virtblk.block_dp, 1083 ret = munmap(mic->mic_virtblk.block_dp,
1054 MIC_DEVICE_PAGE_END + vr_size * virtblk_dev_page.dd.num_vq); 1084 MIC_DEVICE_PAGE_END + vr_size * virtblk_dev_page.dd.num_vq);
1055 if (ret < 0) 1085 if (ret < 0)
@@ -1131,6 +1161,10 @@ write_status(int fd, __u8 *status)
1131 return ioctl(fd, MIC_VIRTIO_COPY_DESC, &copy); 1161 return ioctl(fd, MIC_VIRTIO_COPY_DESC, &copy);
1132} 1162}
1133 1163
1164#ifndef VIRTIO_BLK_T_GET_ID
1165#define VIRTIO_BLK_T_GET_ID 8
1166#endif
1167
1134static void * 1168static void *
1135virtio_block(void *arg) 1169virtio_block(void *arg)
1136{ 1170{
@@ -1297,12 +1331,7 @@ reset(struct mic_info *mic)
1297 mpsslog("%s: %s %d state %s\n", 1331 mpsslog("%s: %s %d state %s\n",
1298 mic->name, __func__, __LINE__, state); 1332 mic->name, __func__, __LINE__, state);
1299 1333
1300 /* 1334 if (!strcmp(state, "ready")) {
1301 * If the shutdown was initiated by OSPM, the state stays
1302 * in "suspended" which is also a valid condition for reset.
1303 */
1304 if ((!strcmp(state, "offline")) ||
1305 (!strcmp(state, "suspended"))) {
1306 free(state); 1335 free(state);
1307 break; 1336 break;
1308 } 1337 }
@@ -1331,34 +1360,50 @@ get_mic_shutdown_status(struct mic_info *mic, char *shutdown_status)
1331 assert(0); 1360 assert(0);
1332}; 1361};
1333 1362
1334static int get_mic_state(struct mic_info *mic, char *state) 1363static int get_mic_state(struct mic_info *mic)
1335{ 1364{
1336 if (!strcmp(state, "offline")) 1365 char *state = NULL;
1337 return MIC_OFFLINE; 1366 enum mic_states mic_state;
1338 if (!strcmp(state, "online")) 1367
1339 return MIC_ONLINE; 1368 while (!state) {
1340 if (!strcmp(state, "shutting_down")) 1369 state = readsysfs(mic->name, "state");
1341 return MIC_SHUTTING_DOWN; 1370 sleep(1);
1342 if (!strcmp(state, "reset_failed")) 1371 }
1343 return MIC_RESET_FAILED; 1372 mpsslog("%s: %s %d state %s\n",
1344 if (!strcmp(state, "suspending")) 1373 mic->name, __func__, __LINE__, state);
1345 return MIC_SUSPENDING; 1374
1346 if (!strcmp(state, "suspended")) 1375 if (!strcmp(state, "ready")) {
1347 return MIC_SUSPENDED; 1376 mic_state = MIC_READY;
1348 mpsslog("%s: BUG invalid state %s\n", mic->name, state); 1377 } else if (!strcmp(state, "booting")) {
1349 /* Invalid state */ 1378 mic_state = MIC_BOOTING;
1350 assert(0); 1379 } else if (!strcmp(state, "online")) {
1380 mic_state = MIC_ONLINE;
1381 } else if (!strcmp(state, "shutting_down")) {
1382 mic_state = MIC_SHUTTING_DOWN;
1383 } else if (!strcmp(state, "reset_failed")) {
1384 mic_state = MIC_RESET_FAILED;
1385 } else if (!strcmp(state, "resetting")) {
1386 mic_state = MIC_RESETTING;
1387 } else {
1388 mpsslog("%s: BUG invalid state %s\n", mic->name, state);
1389 assert(0);
1390 }
1391
1392 free(state);
1393 return mic_state;
1351}; 1394};
1352 1395
1353static void mic_handle_shutdown(struct mic_info *mic) 1396static void mic_handle_shutdown(struct mic_info *mic)
1354{ 1397{
1355#define SHUTDOWN_TIMEOUT 60 1398#define SHUTDOWN_TIMEOUT 60
1356 int i = SHUTDOWN_TIMEOUT, ret, stat = 0; 1399 int i = SHUTDOWN_TIMEOUT;
1357 char *shutdown_status; 1400 char *shutdown_status;
1358 while (i) { 1401 while (i) {
1359 shutdown_status = readsysfs(mic->name, "shutdown_status"); 1402 shutdown_status = readsysfs(mic->name, "shutdown_status");
1360 if (!shutdown_status) 1403 if (!shutdown_status) {
1404 sleep(1);
1361 continue; 1405 continue;
1406 }
1362 mpsslog("%s: %s %d shutdown_status %s\n", 1407 mpsslog("%s: %s %d shutdown_status %s\n",
1363 mic->name, __func__, __LINE__, shutdown_status); 1408 mic->name, __func__, __LINE__, shutdown_status);
1364 switch (get_mic_shutdown_status(mic, shutdown_status)) { 1409 switch (get_mic_shutdown_status(mic, shutdown_status)) {
@@ -1377,94 +1422,110 @@ static void mic_handle_shutdown(struct mic_info *mic)
1377 i--; 1422 i--;
1378 } 1423 }
1379reset: 1424reset:
1380 ret = kill(mic->pid, SIGTERM); 1425 if (!i)
1381 mpsslog("%s: %s %d kill pid %d ret %d\n", 1426 mpsslog("%s: %s %d timing out waiting for shutdown_status %s\n",
1382 mic->name, __func__, __LINE__, 1427 mic->name, __func__, __LINE__, shutdown_status);
1383 mic->pid, ret); 1428 reset(mic);
1384 if (!ret) {
1385 ret = waitpid(mic->pid, &stat,
1386 WIFSIGNALED(stat));
1387 mpsslog("%s: %s %d waitpid ret %d pid %d\n",
1388 mic->name, __func__, __LINE__,
1389 ret, mic->pid);
1390 }
1391 if (ret == mic->pid)
1392 reset(mic);
1393} 1429}
1394 1430
1395static void * 1431static int open_state_fd(struct mic_info *mic)
1396mic_config(void *arg)
1397{ 1432{
1398 struct mic_info *mic = (struct mic_info *)arg;
1399 char *state = NULL;
1400 char pathname[PATH_MAX]; 1433 char pathname[PATH_MAX];
1401 int fd, ret; 1434 int fd;
1402 struct pollfd ufds[1];
1403 char value[4096];
1404 1435
1405 snprintf(pathname, PATH_MAX - 1, "%s/%s/%s", 1436 snprintf(pathname, PATH_MAX - 1, "%s/%s/%s",
1406 MICSYSFSDIR, mic->name, "state"); 1437 MICSYSFSDIR, mic->name, "state");
1407 1438
1408 fd = open(pathname, O_RDONLY); 1439 fd = open(pathname, O_RDONLY);
1409 if (fd < 0) { 1440 if (fd < 0)
1410 mpsslog("%s: opening file %s failed %s\n", 1441 mpsslog("%s: opening file %s failed %s\n",
1411 mic->name, pathname, strerror(errno)); 1442 mic->name, pathname, strerror(errno));
1412 goto error; 1443 return fd;
1444}
1445
1446static int block_till_state_change(int fd, struct mic_info *mic)
1447{
1448 struct pollfd ufds[1];
1449 char value[PAGE_SIZE];
1450 int ret;
1451
1452 ufds[0].fd = fd;
1453 ufds[0].events = POLLERR | POLLPRI;
1454 ret = poll(ufds, 1, -1);
1455 if (ret < 0) {
1456 mpsslog("%s: %s %d poll failed %s\n",
1457 mic->name, __func__, __LINE__, strerror(errno));
1458 return ret;
1459 }
1460
1461 ret = lseek(fd, 0, SEEK_SET);
1462 if (ret < 0) {
1463 mpsslog("%s: %s %d Failed to seek to 0: %s\n",
1464 mic->name, __func__, __LINE__, strerror(errno));
1465 return ret;
1466 }
1467
1468 ret = read(fd, value, sizeof(value));
1469 if (ret < 0) {
1470 mpsslog("%s: %s %d Failed to read sysfs entry: %s\n",
1471 mic->name, __func__, __LINE__, strerror(errno));
1472 return ret;
1473 }
1474
1475 return 0;
1476}
1477
1478static void *
1479mic_config(void *arg)
1480{
1481 struct mic_info *mic = (struct mic_info *)arg;
1482 int fd, ret, stat = 0;
1483
1484 fd = open_state_fd(mic);
1485 if (fd < 0) {
1486 mpsslog("%s: %s %d open state fd failed %s\n",
1487 mic->name, __func__, __LINE__, strerror(errno));
1488 goto exit;
1413 } 1489 }
1414 1490
1415 do { 1491 do {
1416 ret = lseek(fd, 0, SEEK_SET); 1492 ret = block_till_state_change(fd, mic);
1417 if (ret < 0) { 1493 if (ret < 0) {
1418 mpsslog("%s: Failed to seek to file start '%s': %s\n", 1494 mpsslog("%s: %s %d block_till_state_change error %s\n",
1419 mic->name, pathname, strerror(errno)); 1495 mic->name, __func__, __LINE__, strerror(errno));
1420 goto close_error1; 1496 goto close_exit;
1421 } 1497 }
1422 ret = read(fd, value, sizeof(value)); 1498
1423 if (ret < 0) { 1499 switch (get_mic_state(mic)) {
1424 mpsslog("%s: Failed to read sysfs entry '%s': %s\n",
1425 mic->name, pathname, strerror(errno));
1426 goto close_error1;
1427 }
1428retry:
1429 state = readsysfs(mic->name, "state");
1430 if (!state)
1431 goto retry;
1432 mpsslog("%s: %s %d state %s\n",
1433 mic->name, __func__, __LINE__, state);
1434 switch (get_mic_state(mic, state)) {
1435 case MIC_SHUTTING_DOWN: 1500 case MIC_SHUTTING_DOWN:
1436 mic_handle_shutdown(mic); 1501 mic_handle_shutdown(mic);
1437 goto close_error; 1502 break;
1438 case MIC_SUSPENDING: 1503 case MIC_READY:
1439 mic->boot_on_resume = 1; 1504 case MIC_RESET_FAILED:
1440 setsysfs(mic->name, "state", "suspend"); 1505 ret = kill(mic->pid, SIGTERM);
1441 mic_handle_shutdown(mic); 1506 mpsslog("%s: %s %d kill pid %d ret %d\n",
1442 goto close_error; 1507 mic->name, __func__, __LINE__,
1443 case MIC_OFFLINE: 1508 mic->pid, ret);
1509 if (!ret) {
1510 ret = waitpid(mic->pid, &stat,
1511 WIFSIGNALED(stat));
1512 mpsslog("%s: %s %d waitpid ret %d pid %d\n",
1513 mic->name, __func__, __LINE__,
1514 ret, mic->pid);
1515 }
1444 if (mic->boot_on_resume) { 1516 if (mic->boot_on_resume) {
1445 setsysfs(mic->name, "state", "boot"); 1517 setsysfs(mic->name, "state", "boot");
1446 mic->boot_on_resume = 0; 1518 mic->boot_on_resume = 0;
1447 } 1519 }
1448 break; 1520 goto close_exit;
1449 default: 1521 default:
1450 break; 1522 break;
1451 } 1523 }
1452 free(state);
1453
1454 ufds[0].fd = fd;
1455 ufds[0].events = POLLERR | POLLPRI;
1456 ret = poll(ufds, 1, -1);
1457 if (ret < 0) {
1458 mpsslog("%s: poll failed %s\n",
1459 mic->name, strerror(errno));
1460 goto close_error1;
1461 }
1462 } while (1); 1524 } while (1);
1463close_error: 1525
1464 free(state); 1526close_exit:
1465close_error1:
1466 close(fd); 1527 close(fd);
1467error: 1528exit:
1468 init_mic(mic); 1529 init_mic(mic);
1469 pthread_exit(NULL); 1530 pthread_exit(NULL);
1470} 1531}
@@ -1477,15 +1538,15 @@ set_cmdline(struct mic_info *mic)
1477 1538
1478 len = snprintf(buffer, PATH_MAX, 1539 len = snprintf(buffer, PATH_MAX,
1479 "clocksource=tsc highres=off nohz=off "); 1540 "clocksource=tsc highres=off nohz=off ");
1480 len += snprintf(buffer + len, PATH_MAX - len, 1541 len += snprintf(buffer + len, PATH_MAX,
1481 "cpufreq_on;corec6_off;pc3_off;pc6_off "); 1542 "cpufreq_on;corec6_off;pc3_off;pc6_off ");
1482 len += snprintf(buffer + len, PATH_MAX - len, 1543 len += snprintf(buffer + len, PATH_MAX,
1483 "ifcfg=static;address,172.31.%d.1;netmask,255.255.255.0", 1544 "ifcfg=static;address,172.31.%d.1;netmask,255.255.255.0",
1484 mic->id); 1545 mic->id + 1);
1485 1546
1486 setsysfs(mic->name, "cmdline", buffer); 1547 setsysfs(mic->name, "cmdline", buffer);
1487 mpsslog("%s: Command line: \"%s\"\n", mic->name, buffer); 1548 mpsslog("%s: Command line: \"%s\"\n", mic->name, buffer);
1488 snprintf(buffer, PATH_MAX, "172.31.%d.1", mic->id); 1549 snprintf(buffer, PATH_MAX, "172.31.%d.1", mic->id + 1);
1489 mpsslog("%s: IPADDR: \"%s\"\n", mic->name, buffer); 1550 mpsslog("%s: IPADDR: \"%s\"\n", mic->name, buffer);
1490} 1551}
1491 1552
@@ -1541,8 +1602,6 @@ set_log_buf_info(struct mic_info *mic)
1541 close(fd); 1602 close(fd);
1542} 1603}
1543 1604
1544static void init_mic(struct mic_info *mic);
1545
1546static void 1605static void
1547change_virtblk_backend(int x, siginfo_t *siginfo, void *p) 1606change_virtblk_backend(int x, siginfo_t *siginfo, void *p)
1548{ 1607{
@@ -1553,8 +1612,16 @@ change_virtblk_backend(int x, siginfo_t *siginfo, void *p)
1553} 1612}
1554 1613
1555static void 1614static void
1556init_mic(struct mic_info *mic) 1615set_mic_boot_params(struct mic_info *mic)
1616{
1617 set_log_buf_info(mic);
1618 set_cmdline(mic);
1619}
1620
1621static void *
1622init_mic(void *arg)
1557{ 1623{
1624 struct mic_info *mic = (struct mic_info *)arg;
1558 struct sigaction ignore = { 1625 struct sigaction ignore = {
1559 .sa_flags = 0, 1626 .sa_flags = 0,
1560 .sa_handler = SIG_IGN 1627 .sa_handler = SIG_IGN
@@ -1564,7 +1631,7 @@ init_mic(struct mic_info *mic)
1564 .sa_sigaction = change_virtblk_backend, 1631 .sa_sigaction = change_virtblk_backend,
1565 }; 1632 };
1566 char buffer[PATH_MAX]; 1633 char buffer[PATH_MAX];
1567 int err; 1634 int err, fd;
1568 1635
1569 /* 1636 /*
1570 * Currently, one virtio block device is supported for each MIC card 1637 * Currently, one virtio block device is supported for each MIC card
@@ -1577,12 +1644,38 @@ init_mic(struct mic_info *mic)
1577 * the MIC daemon. 1644 * the MIC daemon.
1578 */ 1645 */
1579 sigaction(SIGUSR1, &ignore, NULL); 1646 sigaction(SIGUSR1, &ignore, NULL);
1647retry:
1648 fd = open_state_fd(mic);
1649 if (fd < 0) {
1650 mpsslog("%s: %s %d open state fd failed %s\n",
1651 mic->name, __func__, __LINE__, strerror(errno));
1652 sleep(2);
1653 goto retry;
1654 }
1655
1656 if (mic->restart) {
1657 snprintf(buffer, PATH_MAX, "boot");
1658 setsysfs(mic->name, "state", buffer);
1659 mpsslog("%s restarting mic %d\n",
1660 mic->name, mic->restart);
1661 mic->restart = 0;
1662 }
1663
1664 while (1) {
1665 while (block_till_state_change(fd, mic)) {
1666 mpsslog("%s: %s %d block_till_state_change error %s\n",
1667 mic->name, __func__, __LINE__, strerror(errno));
1668 sleep(2);
1669 continue;
1670 }
1671
1672 if (get_mic_state(mic) == MIC_BOOTING)
1673 break;
1674 }
1580 1675
1581 mic->pid = fork(); 1676 mic->pid = fork();
1582 switch (mic->pid) { 1677 switch (mic->pid) {
1583 case 0: 1678 case 0:
1584 set_log_buf_info(mic);
1585 set_cmdline(mic);
1586 add_virtio_device(mic, &virtcons_dev_page.dd); 1679 add_virtio_device(mic, &virtcons_dev_page.dd);
1587 add_virtio_device(mic, &virtnet_dev_page.dd); 1680 add_virtio_device(mic, &virtnet_dev_page.dd);
1588 err = pthread_create(&mic->mic_console.console_thread, NULL, 1681 err = pthread_create(&mic->mic_console.console_thread, NULL,
@@ -1612,24 +1705,29 @@ init_mic(struct mic_info *mic)
1612 mic->name, mic->id, errno); 1705 mic->name, mic->id, errno);
1613 break; 1706 break;
1614 default: 1707 default:
1615 if (mic->restart) { 1708 err = pthread_create(&mic->config_thread, NULL,
1616 snprintf(buffer, PATH_MAX, "boot"); 1709 mic_config, mic);
1617 setsysfs(mic->name, "state", buffer); 1710 if (err)
1618 mpsslog("%s restarting mic %d\n", 1711 mpsslog("%s mic_config pthread_create failed %s\n",
1619 mic->name, mic->restart); 1712 mic->name, strerror(err));
1620 mic->restart = 0;
1621 }
1622 pthread_create(&mic->config_thread, NULL, mic_config, mic);
1623 } 1713 }
1714
1715 return NULL;
1624} 1716}
1625 1717
1626static void 1718static void
1627start_daemon(void) 1719start_daemon(void)
1628{ 1720{
1629 struct mic_info *mic; 1721 struct mic_info *mic;
1722 int err;
1630 1723
1631 for (mic = mic_list.next; mic != NULL; mic = mic->next) 1724 for (mic = mic_list.next; mic; mic = mic->next) {
1632 init_mic(mic); 1725 set_mic_boot_params(mic);
1726 err = pthread_create(&mic->init_thread, NULL, init_mic, mic);
1727 if (err)
1728 mpsslog("%s init_mic pthread_create failed %s\n",
1729 mic->name, strerror(err));
1730 }
1633 1731
1634 while (1) 1732 while (1)
1635 sleep(60); 1733 sleep(60);
diff --git a/Documentation/mic/mpssd/mpssd.h b/Documentation/mic/mpssd/mpssd.h
index f5f18b15d9a0..8bd64944aacc 100644
--- a/Documentation/mic/mpssd/mpssd.h
+++ b/Documentation/mic/mpssd/mpssd.h
@@ -86,6 +86,7 @@ struct mic_info {
86 int id; 86 int id;
87 char *name; 87 char *name;
88 pthread_t config_thread; 88 pthread_t config_thread;
89 pthread_t init_thread;
89 pid_t pid; 90 pid_t pid;
90 struct mic_console_info mic_console; 91 struct mic_console_info mic_console;
91 struct mic_net_info mic_net; 92 struct mic_net_info mic_net;
diff --git a/Documentation/misc-devices/apds990x.txt b/Documentation/misc-devices/apds990x.txt
index d5408cade32f..454d95d623b3 100644
--- a/Documentation/misc-devices/apds990x.txt
+++ b/Documentation/misc-devices/apds990x.txt
@@ -30,7 +30,7 @@ lead to false interrupt, but that doesn't harm.
30 30
31ALS contains 4 different gain steps. Driver automatically 31ALS contains 4 different gain steps. Driver automatically
32selects suitable gain step. After each measurement, reliability of the results 32selects suitable gain step. After each measurement, reliability of the results
33is estimated and new measurement is trigged if necessary. 33is estimated and new measurement is triggered if necessary.
34 34
35Platform data can provide tuned values to the conversion formulas if 35Platform data can provide tuned values to the conversion formulas if
36values are known. Otherwise plain sensor default values are used. 36values are known. Otherwise plain sensor default values are used.
diff --git a/Documentation/misc-devices/isl29003 b/Documentation/misc-devices/isl29003
index c4ff5f38e010..80b952fd32ff 100644
--- a/Documentation/misc-devices/isl29003
+++ b/Documentation/misc-devices/isl29003
@@ -29,7 +29,7 @@ Detection
29 29
30The ISL29003 does not have an ID register which could be used to identify 30The ISL29003 does not have an ID register which could be used to identify
31it, so the detection routine will just try to read from the configured I2C 31it, so the detection routine will just try to read from the configured I2C
32addess and consider the device to be present as soon as it ACKs the 32address and consider the device to be present as soon as it ACKs the
33transfer. 33transfer.
34 34
35 35
diff --git a/Documentation/misc-devices/max6875 b/Documentation/misc-devices/max6875
index 1e89ee3ccc1b..2f2bd0b17b5d 100644
--- a/Documentation/misc-devices/max6875
+++ b/Documentation/misc-devices/max6875
@@ -22,7 +22,7 @@ At reset, the MAX6875 reads the configuration EEPROM into its configuration
22registers. The chip then begins to operate according to the values in the 22registers. The chip then begins to operate according to the values in the
23registers. 23registers.
24 24
25The Maxim MAX6874 is a similar, mostly compatible device, with more intputs 25The Maxim MAX6874 is a similar, mostly compatible device, with more inputs
26and outputs: 26and outputs:
27 vin gpi vout 27 vin gpi vout
28MAX6874 6 4 8 28MAX6874 6 4 8
diff --git a/Documentation/mmc/mmc-dev-attrs.txt b/Documentation/mmc/mmc-dev-attrs.txt
index 189bab09255a..caa555706f89 100644
--- a/Documentation/mmc/mmc-dev-attrs.txt
+++ b/Documentation/mmc/mmc-dev-attrs.txt
@@ -72,13 +72,3 @@ Note on raw_rpmb_size_mult:
72 "raw_rpmb_size_mult" is a mutliple of 128kB block. 72 "raw_rpmb_size_mult" is a mutliple of 128kB block.
73 RPMB size in byte is calculated by using the following equation: 73 RPMB size in byte is calculated by using the following equation:
74 RPMB partition size = 128kB x raw_rpmb_size_mult 74 RPMB partition size = 128kB x raw_rpmb_size_mult
75
76SD/MMC/SDIO Clock Gating Attribute
77==================================
78
79Read and write access is provided to following attribute.
80This attribute appears only if CONFIG_MMC_CLKGATE is enabled.
81
82 clkgate_delay Tune the clock gating delay with desired value in milliseconds.
83
84echo <desired delay> > /sys/class/mmc_host/mmcX/clkgate_delay
diff --git a/Documentation/networking/can.txt b/Documentation/networking/can.txt
index fd1a1aad49a9..4636b94518da 100644
--- a/Documentation/networking/can.txt
+++ b/Documentation/networking/can.txt
@@ -1018,25 +1018,34 @@ solution for a couple of reasons:
1018 1018
1019 $ ip link set can0 type can help 1019 $ ip link set can0 type can help
1020 Usage: ip link set DEVICE type can 1020 Usage: ip link set DEVICE type can
1021 [ bitrate BITRATE [ sample-point SAMPLE-POINT] ] | 1021 [ bitrate BITRATE [ sample-point SAMPLE-POINT] ] |
1022 [ tq TQ prop-seg PROP_SEG phase-seg1 PHASE-SEG1 1022 [ tq TQ prop-seg PROP_SEG phase-seg1 PHASE-SEG1
1023 phase-seg2 PHASE-SEG2 [ sjw SJW ] ] 1023 phase-seg2 PHASE-SEG2 [ sjw SJW ] ]
1024 1024
1025 [ loopback { on | off } ] 1025 [ dbitrate BITRATE [ dsample-point SAMPLE-POINT] ] |
1026 [ listen-only { on | off } ] 1026 [ dtq TQ dprop-seg PROP_SEG dphase-seg1 PHASE-SEG1
1027 [ triple-sampling { on | off } ] 1027 dphase-seg2 PHASE-SEG2 [ dsjw SJW ] ]
1028 1028
1029 [ restart-ms TIME-MS ] 1029 [ loopback { on | off } ]
1030 [ restart ] 1030 [ listen-only { on | off } ]
1031 1031 [ triple-sampling { on | off } ]
1032 Where: BITRATE := { 1..1000000 } 1032 [ one-shot { on | off } ]
1033 SAMPLE-POINT := { 0.000..0.999 } 1033 [ berr-reporting { on | off } ]
1034 TQ := { NUMBER } 1034 [ fd { on | off } ]
1035 PROP-SEG := { 1..8 } 1035 [ fd-non-iso { on | off } ]
1036 PHASE-SEG1 := { 1..8 } 1036 [ presume-ack { on | off } ]
1037 PHASE-SEG2 := { 1..8 } 1037
1038 SJW := { 1..4 } 1038 [ restart-ms TIME-MS ]
1039 RESTART-MS := { 0 | NUMBER } 1039 [ restart ]
1040
1041 Where: BITRATE := { 1..1000000 }
1042 SAMPLE-POINT := { 0.000..0.999 }
1043 TQ := { NUMBER }
1044 PROP-SEG := { 1..8 }
1045 PHASE-SEG1 := { 1..8 }
1046 PHASE-SEG2 := { 1..8 }
1047 SJW := { 1..4 }
1048 RESTART-MS := { 0 | NUMBER }
1040 1049
1041 - Display CAN device details and statistics: 1050 - Display CAN device details and statistics:
1042 1051
@@ -1178,7 +1187,55 @@ solution for a couple of reasons:
1178 The CAN device MTU can be retrieved e.g. with a SIOCGIFMTU ioctl() syscall. 1187 The CAN device MTU can be retrieved e.g. with a SIOCGIFMTU ioctl() syscall.
1179 N.B. CAN FD capable devices can also handle and send legacy CAN frames. 1188 N.B. CAN FD capable devices can also handle and send legacy CAN frames.
1180 1189
1181 FIXME: Add details about the CAN FD controller configuration when available. 1190 When configuring CAN FD capable CAN controllers an additional 'data' bitrate
1191 has to be set. This bitrate for the data phase of the CAN FD frame has to be
1192 at least the bitrate which was configured for the arbitration phase. This
1193 second bitrate is specified analogue to the first bitrate but the bitrate
1194 setting keywords for the 'data' bitrate start with 'd' e.g. dbitrate,
1195 dsample-point, dsjw or dtq and similar settings. When a data bitrate is set
1196 within the configuration process the controller option "fd on" can be
1197 specified to enable the CAN FD mode in the CAN controller. This controller
1198 option also switches the device MTU to 72 (CANFD_MTU).
1199
1200 The first CAN FD specification presented as whitepaper at the International
1201 CAN Conference 2012 needed to be improved for data integrity reasons.
1202 Therefore two CAN FD implementations have to be distinguished today:
1203
1204 - ISO compliant: The ISO 11898-1:2015 CAN FD implementation (default)
1205 - non-ISO compliant: The CAN FD implementation following the 2012 whitepaper
1206
1207 Finally there are three types of CAN FD controllers:
1208
1209 1. ISO compliant (fixed)
1210 2. non-ISO compliant (fixed, like the M_CAN IP core v3.0.1 in m_can.c)
1211 3. ISO/non-ISO CAN FD controllers (switchable, like the PEAK PCAN-USB FD)
1212
1213 The current ISO/non-ISO mode is announced by the CAN controller driver via
1214 netlink and displayed by the 'ip' tool (controller option FD-NON-ISO).
1215 The ISO/non-ISO-mode can be altered by setting 'fd-non-iso {on|off}' for
1216 switchable CAN FD controllers only.
1217
1218 Example configuring 500 kbit/s arbitration bitrate and 4 Mbit/s data bitrate:
1219
1220 $ ip link set can0 up type can bitrate 500000 sample-point 0.75 \
1221 dbitrate 4000000 dsample-point 0.8 fd on
1222 $ ip -details link show can0
1223 5: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 72 qdisc pfifo_fast state UNKNOWN \
1224 mode DEFAULT group default qlen 10
1225 link/can promiscuity 0
1226 can <FD> state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
1227 bitrate 500000 sample-point 0.750
1228 tq 50 prop-seg 14 phase-seg1 15 phase-seg2 10 sjw 1
1229 pcan_usb_pro_fd: tseg1 1..64 tseg2 1..16 sjw 1..16 brp 1..1024 \
1230 brp-inc 1
1231 dbitrate 4000000 dsample-point 0.800
1232 dtq 12 dprop-seg 7 dphase-seg1 8 dphase-seg2 4 dsjw 1
1233 pcan_usb_pro_fd: dtseg1 1..16 dtseg2 1..8 dsjw 1..4 dbrp 1..1024 \
1234 dbrp-inc 1
1235 clock 80000000
1236
1237 Example when 'fd-non-iso on' is added on this switchable CAN FD adapter:
1238 can <FD,FD-NON-ISO> state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
1182 1239
1183 6.7 Supported CAN hardware 1240 6.7 Supported CAN hardware
1184 1241
diff --git a/Documentation/networking/filter.txt b/Documentation/networking/filter.txt
index 135581f015e1..96da119a47e7 100644
--- a/Documentation/networking/filter.txt
+++ b/Documentation/networking/filter.txt
@@ -596,9 +596,9 @@ skb pointer). All constraints and restrictions from bpf_check_classic() apply
596before a conversion to the new layout is being done behind the scenes! 596before a conversion to the new layout is being done behind the scenes!
597 597
598Currently, the classic BPF format is being used for JITing on most of the 598Currently, the classic BPF format is being used for JITing on most of the
599architectures. Only x86-64 performs JIT compilation from eBPF instruction set, 599architectures. x86-64, aarch64 and s390x perform JIT compilation from eBPF
600however, future work will migrate other JIT compilers as well, so that they 600instruction set, however, future work will migrate other JIT compilers as well,
601will profit from the very same benefits. 601so that they will profit from the very same benefits.
602 602
603Some core changes of the new internal format: 603Some core changes of the new internal format:
604 604
diff --git a/Documentation/networking/ieee802154.txt b/Documentation/networking/ieee802154.txt
index 1700756af057..aa69ccc481db 100644
--- a/Documentation/networking/ieee802154.txt
+++ b/Documentation/networking/ieee802154.txt
@@ -7,11 +7,11 @@ Introduction
7The IEEE 802.15.4 working group focuses on standardization of bottom 7The IEEE 802.15.4 working group focuses on standardization of bottom
8two layers: Medium Access Control (MAC) and Physical (PHY). And there 8two layers: Medium Access Control (MAC) and Physical (PHY). And there
9are mainly two options available for upper layers: 9are mainly two options available for upper layers:
10 - ZigBee - proprietary protocol from ZigBee Alliance 10 - ZigBee - proprietary protocol from the ZigBee Alliance
11 - 6LowPAN - IPv6 networking over low rate personal area networks 11 - 6LoWPAN - IPv6 networking over low rate personal area networks
12 12
13The Linux-ZigBee project goal is to provide complete implementation 13The linux-wpan project goal is to provide a complete implementation
14of IEEE 802.15.4 and 6LoWPAN protocols. IEEE 802.15.4 is a stack 14of the IEEE 802.15.4 and 6LoWPAN protocols. IEEE 802.15.4 is a stack
15of protocols for organizing Low-Rate Wireless Personal Area Networks. 15of protocols for organizing Low-Rate Wireless Personal Area Networks.
16 16
17The stack is composed of three main parts: 17The stack is composed of three main parts:
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index ebe94f2cab98..2ea4c45cf1c8 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -384,6 +384,14 @@ tcp_mem - vector of 3 INTEGERs: min, pressure, max
384 Defaults are calculated at boot time from amount of available 384 Defaults are calculated at boot time from amount of available
385 memory. 385 memory.
386 386
387tcp_min_rtt_wlen - INTEGER
388 The window length of the windowed min filter to track the minimum RTT.
389 A shorter window lets a flow more quickly pick up new (higher)
390 minimum RTT when it is moved to a longer path (e.g., due to traffic
391 engineering). A longer window makes the filter more resistant to RTT
392 inflations such as transient congestion. The unit is seconds.
393 Default: 300
394
387tcp_moderate_rcvbuf - BOOLEAN 395tcp_moderate_rcvbuf - BOOLEAN
388 If set, TCP performs receive buffer auto-tuning, attempting to 396 If set, TCP performs receive buffer auto-tuning, attempting to
389 automatically size the buffer (no greater than tcp_rmem[2]) to 397 automatically size the buffer (no greater than tcp_rmem[2]) to
@@ -425,6 +433,15 @@ tcp_orphan_retries - INTEGER
425 you should think about lowering this value, such sockets 433 you should think about lowering this value, such sockets
426 may consume significant resources. Cf. tcp_max_orphans. 434 may consume significant resources. Cf. tcp_max_orphans.
427 435
436tcp_recovery - INTEGER
437 This value is a bitmap to enable various experimental loss recovery
438 features.
439
440 RACK: 0x1 enables the RACK loss detection for fast detection of lost
441 retransmissions and tail drops.
442
443 Default: 0x1
444
428tcp_reordering - INTEGER 445tcp_reordering - INTEGER
429 Initial reordering level of packets in a TCP stream. 446 Initial reordering level of packets in a TCP stream.
430 TCP stack can then dynamically adjust flow reordering level 447 TCP stack can then dynamically adjust flow reordering level
@@ -692,7 +709,7 @@ tcp_limit_output_bytes - INTEGER
692 typical pfifo_fast qdiscs. 709 typical pfifo_fast qdiscs.
693 tcp_limit_output_bytes limits the number of bytes on qdisc 710 tcp_limit_output_bytes limits the number of bytes on qdisc
694 or device to reduce artificial RTT/cwnd and reduce bufferbloat. 711 or device to reduce artificial RTT/cwnd and reduce bufferbloat.
695 Default: 131072 712 Default: 262144
696 713
697tcp_challenge_ack_limit - INTEGER 714tcp_challenge_ack_limit - INTEGER
698 Limits number of Challenge ACK sent per second, as recommended 715 Limits number of Challenge ACK sent per second, as recommended
@@ -1199,7 +1216,8 @@ tag - INTEGER
1199xfrm4_gc_thresh - INTEGER 1216xfrm4_gc_thresh - INTEGER
1200 The threshold at which we will start garbage collecting for IPv4 1217 The threshold at which we will start garbage collecting for IPv4
1201 destination cache entries. At twice this value the system will 1218 destination cache entries. At twice this value the system will
1202 refuse new allocations. 1219 refuse new allocations. The value must be set below the flowcache
1220 limit (4096 * number of online cpus) to take effect.
1203 1221
1204igmp_link_local_mcast_reports - BOOLEAN 1222igmp_link_local_mcast_reports - BOOLEAN
1205 Enable IGMP reports for link local multicast groups in the 1223 Enable IGMP reports for link local multicast groups in the
@@ -1645,7 +1663,8 @@ ratelimit - INTEGER
1645xfrm6_gc_thresh - INTEGER 1663xfrm6_gc_thresh - INTEGER
1646 The threshold at which we will start garbage collecting for IPv6 1664 The threshold at which we will start garbage collecting for IPv6
1647 destination cache entries. At twice this value the system will 1665 destination cache entries. At twice this value the system will
1648 refuse new allocations. 1666 refuse new allocations. The value must be set below the flowcache
1667 limit (4096 * number of online cpus) to take effect.
1649 1668
1650 1669
1651IPv6 Update by: 1670IPv6 Update by:
diff --git a/Documentation/networking/ipvs-sysctl.txt b/Documentation/networking/ipvs-sysctl.txt
index 3ba709531adb..e6b1c025fdd8 100644
--- a/Documentation/networking/ipvs-sysctl.txt
+++ b/Documentation/networking/ipvs-sysctl.txt
@@ -157,6 +157,16 @@ expire_quiescent_template - BOOLEAN
157 persistence template if it is to be used to schedule a new 157 persistence template if it is to be used to schedule a new
158 connection and the destination server is quiescent. 158 connection and the destination server is quiescent.
159 159
160ignore_tunneled - BOOLEAN
161 0 - disabled (default)
162 not 0 - enabled
163
164 If set, ipvs will set the ipvs_property on all packets which are of
165 unrecognized protocols. This prevents us from routing tunneled
166 protocols like ipip, which is useful to prevent rescheduling
167 packets that have been tunneled to the ipvs host (i.e. to prevent
168 ipvs routing loops when ipvs is also acting as a real server).
169
160nat_icmp_send - BOOLEAN 170nat_icmp_send - BOOLEAN
161 0 - disabled (default) 171 0 - disabled (default)
162 not 0 - enabled 172 not 0 - enabled
diff --git a/Documentation/networking/l2tp.txt b/Documentation/networking/l2tp.txt
index c74434de2fa5..4650a00ed012 100644
--- a/Documentation/networking/l2tp.txt
+++ b/Documentation/networking/l2tp.txt
@@ -213,15 +213,12 @@ To create an L2TPv3 ethernet pseudowire between local host 192.168.1.1
213and peer 192.168.1.2, using IP addresses 10.5.1.1 and 10.5.1.2 for the 213and peer 192.168.1.2, using IP addresses 10.5.1.1 and 10.5.1.2 for the
214tunnel endpoints:- 214tunnel endpoints:-
215 215
216# modprobe l2tp_eth
217# modprobe l2tp_netlink
218
219# ip l2tp add tunnel tunnel_id 1 peer_tunnel_id 1 udp_sport 5000 \ 216# ip l2tp add tunnel tunnel_id 1 peer_tunnel_id 1 udp_sport 5000 \
220 udp_dport 5000 encap udp local 192.168.1.1 remote 192.168.1.2 217 udp_dport 5000 encap udp local 192.168.1.1 remote 192.168.1.2
221# ip l2tp add session tunnel_id 1 session_id 1 peer_session_id 1 218# ip l2tp add session tunnel_id 1 session_id 1 peer_session_id 1
222# ifconfig -a 219# ip -s -d show dev l2tpeth0
223# ip addr add 10.5.1.2/32 peer 10.5.1.1/32 dev l2tpeth0 220# ip addr add 10.5.1.2/32 peer 10.5.1.1/32 dev l2tpeth0
224# ifconfig l2tpeth0 up 221# ip li set dev l2tpeth0 up
225 222
226Choose IP addresses to be the address of a local IP interface and that 223Choose IP addresses to be the address of a local IP interface and that
227of the remote system. The IP addresses of the l2tpeth0 interface can be 224of the remote system. The IP addresses of the l2tpeth0 interface can be
diff --git a/Documentation/networking/switchdev.txt b/Documentation/networking/switchdev.txt
index 476df0496686..91994134efca 100644
--- a/Documentation/networking/switchdev.txt
+++ b/Documentation/networking/switchdev.txt
@@ -115,7 +115,7 @@ Switch ID
115^^^^^^^^^ 115^^^^^^^^^
116 116
117The switchdev driver must implement the switchdev op switchdev_port_attr_get 117The switchdev driver must implement the switchdev op switchdev_port_attr_get
118for SWITCHDEV_ATTR_PORT_PARENT_ID for each port netdev, returning the same 118for SWITCHDEV_ATTR_ID_PORT_PARENT_ID for each port netdev, returning the same
119physical ID for each port of a switch. The ID must be unique between switches 119physical ID for each port of a switch. The ID must be unique between switches
120on the same system. The ID does not need to be unique between switches on 120on the same system. The ID does not need to be unique between switches on
121different systems. 121different systems.
@@ -178,7 +178,7 @@ entries are installed, for example, using iproute2 bridge cmd:
178 bridge fdb add ADDR dev DEV [vlan VID] [self] 178 bridge fdb add ADDR dev DEV [vlan VID] [self]
179 179
180The driver should use the helper switchdev_port_fdb_xxx ops for ndo_fdb_xxx 180The driver should use the helper switchdev_port_fdb_xxx ops for ndo_fdb_xxx
181ops, and handle add/delete/dump of SWITCHDEV_OBJ_PORT_FDB object using 181ops, and handle add/delete/dump of SWITCHDEV_OBJ_ID_PORT_FDB object using
182switchdev_port_obj_xxx ops. 182switchdev_port_obj_xxx ops.
183 183
184XXX: what should be done if offloading this rule to hardware fails (for 184XXX: what should be done if offloading this rule to hardware fails (for
@@ -233,26 +233,27 @@ the bridge's FDB. It's possible, but not optimal, to enable learning on the
233device port and on the bridge port, and disable learning_sync. 233device port and on the bridge port, and disable learning_sync.
234 234
235To support learning and learning_sync port attributes, the driver implements 235To support learning and learning_sync port attributes, the driver implements
236switchdev op switchdev_port_attr_get/set for SWITCHDEV_ATTR_PORT_BRIDGE_FLAGS. 236switchdev op switchdev_port_attr_get/set for
237The driver should initialize the attributes to the hardware defaults. 237SWITCHDEV_ATTR_PORT_ID_BRIDGE_FLAGS. The driver should initialize the attributes
238to the hardware defaults.
238 239
239FDB Ageing 240FDB Ageing
240^^^^^^^^^^ 241^^^^^^^^^^
241 242
242There are two FDB ageing models supported: 1) ageing by the device, and 2) 243The bridge will skip ageing FDB entries marked with NTF_EXT_LEARNED and it is
243ageing by the kernel. Ageing by the device is preferred if many FDB entries 244the responsibility of the port driver/device to age out these entries. If the
244are supported. The driver calls call_switchdev_notifiers(SWITCHDEV_FDB_DEL, 245port device supports ageing, when the FDB entry expires, it will notify the
245...) to age out the FDB entry. In this model, ageing by the kernel should be 246driver which in turn will notify the bridge with SWITCHDEV_FDB_DEL. If the
246turned off. XXX: how to turn off ageing in kernel on a per-port basis or 247device does not support ageing, the driver can simulate ageing using a
247otherwise prevent the kernel from ageing out the FDB entry? 248garbage collection timer to monitor FBD entries. Expired entries will be
248 249notified to the bridge using SWITCHDEV_FDB_DEL. See rocker driver for
249In the kernel ageing model, the standard bridge ageing mechanism is used to age 250example of driver running ageing timer.
250out stale FDB entries. To keep an FDB entry "alive", the driver should refresh 251
251the FDB entry by calling call_switchdev_notifiers(SWITCHDEV_FDB_ADD, ...). The 252To keep an NTF_EXT_LEARNED entry "alive", the driver should refresh the FDB
253entry by calling call_switchdev_notifiers(SWITCHDEV_FDB_ADD, ...). The
252notification will reset the FDB entry's last-used time to now. The driver 254notification will reset the FDB entry's last-used time to now. The driver
253should rate limit refresh notifications, for example, no more than once a 255should rate limit refresh notifications, for example, no more than once a
254second. If the FDB entry expires, fdb_delete is called to remove entry from 256second. (The last-used time is visible using the bridge -s fdb option).
255the device.
256 257
257STP State Change on Port 258STP State Change on Port
258^^^^^^^^^^^^^^^^^^^^^^^^ 259^^^^^^^^^^^^^^^^^^^^^^^^
@@ -260,7 +261,7 @@ STP State Change on Port
260Internally or with a third-party STP protocol implementation (e.g. mstpd), the 261Internally or with a third-party STP protocol implementation (e.g. mstpd), the
261bridge driver maintains the STP state for ports, and will notify the switch 262bridge driver maintains the STP state for ports, and will notify the switch
262driver of STP state change on a port using the switchdev op 263driver of STP state change on a port using the switchdev op
263switchdev_attr_port_set for SWITCHDEV_ATTR_PORT_STP_UPDATE. 264switchdev_attr_port_set for SWITCHDEV_ATTR_PORT_ID_STP_UPDATE.
264 265
265State is one of BR_STATE_*. The switch driver can use STP state updates to 266State is one of BR_STATE_*. The switch driver can use STP state updates to
266update ingress packet filter list for the port. For example, if port is 267update ingress packet filter list for the port. For example, if port is
@@ -277,8 +278,8 @@ Flooding L2 domain
277For a given L2 VLAN domain, the switch device should flood multicast/broadcast 278For a given L2 VLAN domain, the switch device should flood multicast/broadcast
278and unknown unicast packets to all ports in domain, if allowed by port's 279and unknown unicast packets to all ports in domain, if allowed by port's
279current STP state. The switch driver, knowing which ports are within which 280current STP state. The switch driver, knowing which ports are within which
280vlan L2 domain, can program the switch device for flooding. The packet should 281vlan L2 domain, can program the switch device for flooding. The packet may
281also be sent to the port netdev for processing by the bridge driver. The 282be sent to the port netdev for processing by the bridge driver. The
282bridge should not reflood the packet to the same ports the device flooded, 283bridge should not reflood the packet to the same ports the device flooded,
283otherwise there will be duplicate packets on the wire. 284otherwise there will be duplicate packets on the wire.
284 285
@@ -297,6 +298,9 @@ packets up to the bridge driver for flooding. This is not ideal as the number
297of ports scale in the L2 domain as the device is much more efficient at 298of ports scale in the L2 domain as the device is much more efficient at
298flooding packets that software. 299flooding packets that software.
299 300
301If supported by the device, flood control can be offloaded to it, preventing
302certain netdevs from flooding unicast traffic for which there is no FDB entry.
303
300IGMP Snooping 304IGMP Snooping
301^^^^^^^^^^^^^ 305^^^^^^^^^^^^^
302 306
@@ -316,9 +320,9 @@ SWITCHDEV_OBJ_IPV[4|6]_FIB object using switchdev_port_obj_xxx ops.
316switchdev_port_obj_add is used for both adding a new FIB entry to the device, 320switchdev_port_obj_add is used for both adding a new FIB entry to the device,
317or modifying an existing entry on the device. 321or modifying an existing entry on the device.
318 322
319XXX: Currently, only SWITCHDEV_OBJ_IPV4_FIB objects are supported. 323XXX: Currently, only SWITCHDEV_OBJ_ID_IPV4_FIB objects are supported.
320 324
321SWITCHDEV_OBJ_IPV4_FIB object passes: 325SWITCHDEV_OBJ_ID_IPV4_FIB object passes:
322 326
323 struct switchdev_obj_ipv4_fib { /* IPV4_FIB */ 327 struct switchdev_obj_ipv4_fib { /* IPV4_FIB */
324 u32 dst; 328 u32 dst;
@@ -369,3 +373,22 @@ The driver can monitor for updates to arp_tbl using the netevent notifier
369NETEVENT_NEIGH_UPDATE. The device can be programmed with resolved nexthops 373NETEVENT_NEIGH_UPDATE. The device can be programmed with resolved nexthops
370for the routes as arp_tbl updates. The driver implements ndo_neigh_destroy 374for the routes as arp_tbl updates. The driver implements ndo_neigh_destroy
371to know when arp_tbl neighbor entries are purged from the port. 375to know when arp_tbl neighbor entries are purged from the port.
376
377Transaction item queue
378^^^^^^^^^^^^^^^^^^^^^^
379
380For switchdev ops attr_set and obj_add, there is a 2 phase transaction model
381used. First phase is to "prepare" anything needed, including various checks,
382memory allocation, etc. The goal is to handle the stuff that is not unlikely
383to fail here. The second phase is to "commit" the actual changes.
384
385Switchdev provides an inftrastructure for sharing items (for example memory
386allocations) between the two phases.
387
388The object created by a driver in "prepare" phase and it is queued up by:
389switchdev_trans_item_enqueue()
390During the "commit" phase, the driver gets the object by:
391switchdev_trans_item_dequeue()
392
393If a transaction is aborted during "prepare" phase, switchdev code will handle
394cleanup of the queued-up objects.
diff --git a/Documentation/networking/vrf.txt b/Documentation/networking/vrf.txt
new file mode 100644
index 000000000000..d52aa10cfe91
--- /dev/null
+++ b/Documentation/networking/vrf.txt
@@ -0,0 +1,393 @@
1Virtual Routing and Forwarding (VRF)
2====================================
3The VRF device combined with ip rules provides the ability to create virtual
4routing and forwarding domains (aka VRFs, VRF-lite to be specific) in the
5Linux network stack. One use case is the multi-tenancy problem where each
6tenant has their own unique routing tables and in the very least need
7different default gateways.
8
9Processes can be "VRF aware" by binding a socket to the VRF device. Packets
10through the socket then use the routing table associated with the VRF
11device. An important feature of the VRF device implementation is that it
12impacts only Layer 3 and above so L2 tools (e.g., LLDP) are not affected
13(ie., they do not need to be run in each VRF). The design also allows
14the use of higher priority ip rules (Policy Based Routing, PBR) to take
15precedence over the VRF device rules directing specific traffic as desired.
16
17In addition, VRF devices allow VRFs to be nested within namespaces. For
18example network namespaces provide separation of network interfaces at L1
19(Layer 1 separation), VLANs on the interfaces within a namespace provide
20L2 separation and then VRF devices provide L3 separation.
21
22Design
23------
24A VRF device is created with an associated route table. Network interfaces
25are then enslaved to a VRF device:
26
27 +-----------------------------+
28 | vrf-blue | ===> route table 10
29 +-----------------------------+
30 | | |
31 +------+ +------+ +-------------+
32 | eth1 | | eth2 | ... | bond1 |
33 +------+ +------+ +-------------+
34 | |
35 +------+ +------+
36 | eth8 | | eth9 |
37 +------+ +------+
38
39Packets received on an enslaved device and are switched to the VRF device
40using an rx_handler which gives the impression that packets flow through
41the VRF device. Similarly on egress routing rules are used to send packets
42to the VRF device driver before getting sent out the actual interface. This
43allows tcpdump on a VRF device to capture all packets into and out of the
44VRF as a whole.[1] Similiarly, netfilter [2] and tc rules can be applied
45using the VRF device to specify rules that apply to the VRF domain as a whole.
46
47[1] Packets in the forwarded state do not flow through the device, so those
48 packets are not seen by tcpdump. Will revisit this limitation in a
49 future release.
50
51[2] Iptables on ingress is limited to NF_INET_PRE_ROUTING only with skb->dev
52 set to real ingress device and egress is limited to NF_INET_POST_ROUTING.
53 Will revisit this limitation in a future release.
54
55
56Setup
57-----
581. VRF device is created with an association to a FIB table.
59 e.g, ip link add vrf-blue type vrf table 10
60 ip link set dev vrf-blue up
61
622. Rules are added that send lookups to the associated FIB table when the
63 iif or oif is the VRF device. e.g.,
64 ip ru add oif vrf-blue table 10
65 ip ru add iif vrf-blue table 10
66
67 Set the default route for the table (and hence default route for the VRF).
68 e.g, ip route add table 10 prohibit default
69
703. Enslave L3 interfaces to a VRF device.
71 e.g, ip link set dev eth1 master vrf-blue
72
73 Local and connected routes for enslaved devices are automatically moved to
74 the table associated with VRF device. Any additional routes depending on
75 the enslaved device will need to be reinserted following the enslavement.
76
774. Additional VRF routes are added to associated table.
78 e.g., ip route add table 10 ...
79
80
81Applications
82------------
83Applications that are to work within a VRF need to bind their socket to the
84VRF device:
85
86 setsockopt(sd, SOL_SOCKET, SO_BINDTODEVICE, dev, strlen(dev)+1);
87
88or to specify the output device using cmsg and IP_PKTINFO.
89
90
91Limitations
92-----------
93Index of original ingress interface is not available via cmsg. Will address
94soon.
95
96################################################################################
97
98Using iproute2 for VRFs
99=======================
100VRF devices do *not* have to start with 'vrf-'. That is a convention used here
101for emphasis of the device type, similar to use of 'br' in bridge names.
102
1031. Create a VRF
104
105 To instantiate a VRF device and associate it with a table:
106 $ ip link add dev NAME type vrf table ID
107
108 Remember to add the ip rules as well:
109 $ ip ru add oif NAME table 10
110 $ ip ru add iif NAME table 10
111 $ ip -6 ru add oif NAME table 10
112 $ ip -6 ru add iif NAME table 10
113
114 Without the rules route lookups are not directed to the table.
115
116 For example:
117 $ ip link add dev vrf-blue type vrf table 10
118 $ ip ru add pref 200 oif vrf-blue table 10
119 $ ip ru add pref 200 iif vrf-blue table 10
120 $ ip -6 ru add pref 200 oif vrf-blue table 10
121 $ ip -6 ru add pref 200 iif vrf-blue table 10
122
123
1242. List VRFs
125
126 To list VRFs that have been created:
127 $ ip [-d] link show type vrf
128 NOTE: The -d option is needed to show the table id
129
130 For example:
131 $ ip -d link show type vrf
132 11: vrf-mgmt: <NOARP,MASTER,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
133 link/ether 72:b3:ba:91:e2:24 brd ff:ff:ff:ff:ff:ff promiscuity 0
134 vrf table 1 addrgenmode eui64
135 12: vrf-red: <NOARP,MASTER,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
136 link/ether b6:6f:6e:f6:da:73 brd ff:ff:ff:ff:ff:ff promiscuity 0
137 vrf table 10 addrgenmode eui64
138 13: vrf-blue: <NOARP,MASTER,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
139 link/ether 36:62:e8:7d:bb:8c brd ff:ff:ff:ff:ff:ff promiscuity 0
140 vrf table 66 addrgenmode eui64
141 14: vrf-green: <NOARP,MASTER,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
142 link/ether e6:28:b8:63:70:bb brd ff:ff:ff:ff:ff:ff promiscuity 0
143 vrf table 81 addrgenmode eui64
144
145
146 Or in brief output:
147
148 $ ip -br link show type vrf
149 vrf-mgmt UP 72:b3:ba:91:e2:24 <NOARP,MASTER,UP,LOWER_UP>
150 vrf-red UP b6:6f:6e:f6:da:73 <NOARP,MASTER,UP,LOWER_UP>
151 vrf-blue UP 36:62:e8:7d:bb:8c <NOARP,MASTER,UP,LOWER_UP>
152 vrf-green UP e6:28:b8:63:70:bb <NOARP,MASTER,UP,LOWER_UP>
153
154
1553. Assign a Network Interface to a VRF
156
157 Network interfaces are assigned to a VRF by enslaving the netdevice to a
158 VRF device:
159 $ ip link set dev NAME master VRF-NAME
160
161 On enslavement connected and local routes are automatically moved to the
162 table associated with the VRF device.
163
164 For example:
165 $ ip link set dev eth0 master vrf-mgmt
166
167
1684. Show Devices Assigned to a VRF
169
170 To show devices that have been assigned to a specific VRF add the master
171 option to the ip command:
172 $ ip link show master VRF-NAME
173
174 For example:
175 $ ip link show master vrf-red
176 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master vrf-red state UP mode DEFAULT group default qlen 1000
177 link/ether 02:00:00:00:02:02 brd ff:ff:ff:ff:ff:ff
178 4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master vrf-red state UP mode DEFAULT group default qlen 1000
179 link/ether 02:00:00:00:02:03 brd ff:ff:ff:ff:ff:ff
180 7: eth5: <BROADCAST,MULTICAST> mtu 1500 qdisc noop master vrf-red state DOWN mode DEFAULT group default qlen 1000
181 link/ether 02:00:00:00:02:06 brd ff:ff:ff:ff:ff:ff
182
183
184 Or using the brief output:
185 $ ip -br link show master vrf-red
186 eth1 UP 02:00:00:00:02:02 <BROADCAST,MULTICAST,UP,LOWER_UP>
187 eth2 UP 02:00:00:00:02:03 <BROADCAST,MULTICAST,UP,LOWER_UP>
188 eth5 DOWN 02:00:00:00:02:06 <BROADCAST,MULTICAST>
189
190
1915. Show Neighbor Entries for a VRF
192
193 To list neighbor entries associated with devices enslaved to a VRF device
194 add the master option to the ip command:
195 $ ip [-6] neigh show master VRF-NAME
196
197 For example:
198 $ ip neigh show master vrf-red
199 10.2.1.254 dev eth1 lladdr a6:d9:c7:4f:06:23 REACHABLE
200 10.2.2.254 dev eth2 lladdr 5e:54:01:6a:ee:80 REACHABLE
201
202 $ ip -6 neigh show master vrf-red
203 2002:1::64 dev eth1 lladdr a6:d9:c7:4f:06:23 REACHABLE
204
205
2066. Show Addresses for a VRF
207
208 To show addresses for interfaces associated with a VRF add the master
209 option to the ip command:
210 $ ip addr show master VRF-NAME
211
212 For example:
213 $ ip addr show master vrf-red
214 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master vrf-red state UP group default qlen 1000
215 link/ether 02:00:00:00:02:02 brd ff:ff:ff:ff:ff:ff
216 inet 10.2.1.2/24 brd 10.2.1.255 scope global eth1
217 valid_lft forever preferred_lft forever
218 inet6 2002:1::2/120 scope global
219 valid_lft forever preferred_lft forever
220 inet6 fe80::ff:fe00:202/64 scope link
221 valid_lft forever preferred_lft forever
222 4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master vrf-red state UP group default qlen 1000
223 link/ether 02:00:00:00:02:03 brd ff:ff:ff:ff:ff:ff
224 inet 10.2.2.2/24 brd 10.2.2.255 scope global eth2
225 valid_lft forever preferred_lft forever
226 inet6 2002:2::2/120 scope global
227 valid_lft forever preferred_lft forever
228 inet6 fe80::ff:fe00:203/64 scope link
229 valid_lft forever preferred_lft forever
230 7: eth5: <BROADCAST,MULTICAST> mtu 1500 qdisc noop master vrf-red state DOWN group default qlen 1000
231 link/ether 02:00:00:00:02:06 brd ff:ff:ff:ff:ff:ff
232
233 Or in brief format:
234 $ ip -br addr show master vrf-red
235 eth1 UP 10.2.1.2/24 2002:1::2/120 fe80::ff:fe00:202/64
236 eth2 UP 10.2.2.2/24 2002:2::2/120 fe80::ff:fe00:203/64
237 eth5 DOWN
238
239
2407. Show Routes for a VRF
241
242 To show routes for a VRF use the ip command to display the table associated
243 with the VRF device:
244 $ ip [-6] route show table ID
245
246 For example:
247 $ ip route show table vrf-red
248 prohibit default
249 broadcast 10.2.1.0 dev eth1 proto kernel scope link src 10.2.1.2
250 10.2.1.0/24 dev eth1 proto kernel scope link src 10.2.1.2
251 local 10.2.1.2 dev eth1 proto kernel scope host src 10.2.1.2
252 broadcast 10.2.1.255 dev eth1 proto kernel scope link src 10.2.1.2
253 broadcast 10.2.2.0 dev eth2 proto kernel scope link src 10.2.2.2
254 10.2.2.0/24 dev eth2 proto kernel scope link src 10.2.2.2
255 local 10.2.2.2 dev eth2 proto kernel scope host src 10.2.2.2
256 broadcast 10.2.2.255 dev eth2 proto kernel scope link src 10.2.2.2
257
258 $ ip -6 route show table vrf-red
259 local 2002:1:: dev lo proto none metric 0 pref medium
260 local 2002:1::2 dev lo proto none metric 0 pref medium
261 2002:1::/120 dev eth1 proto kernel metric 256 pref medium
262 local 2002:2:: dev lo proto none metric 0 pref medium
263 local 2002:2::2 dev lo proto none metric 0 pref medium
264 2002:2::/120 dev eth2 proto kernel metric 256 pref medium
265 local fe80:: dev lo proto none metric 0 pref medium
266 local fe80:: dev lo proto none metric 0 pref medium
267 local fe80::ff:fe00:202 dev lo proto none metric 0 pref medium
268 local fe80::ff:fe00:203 dev lo proto none metric 0 pref medium
269 fe80::/64 dev eth1 proto kernel metric 256 pref medium
270 fe80::/64 dev eth2 proto kernel metric 256 pref medium
271 ff00::/8 dev vrf-red metric 256 pref medium
272 ff00::/8 dev eth1 metric 256 pref medium
273 ff00::/8 dev eth2 metric 256 pref medium
274
275
2768. Route Lookup for a VRF
277
278 A test route lookup can be done for a VRF by adding the oif option to ip:
279 $ ip [-6] route get oif VRF-NAME ADDRESS
280
281 For example:
282 $ ip route get 10.2.1.40 oif vrf-red
283 10.2.1.40 dev eth1 table vrf-red src 10.2.1.2
284 cache
285
286 $ ip -6 route get 2002:1::32 oif vrf-red
287 2002:1::32 from :: dev eth1 table vrf-red proto kernel src 2002:1::2 metric 256 pref medium
288
289
2909. Removing Network Interface from a VRF
291
292 Network interfaces are removed from a VRF by breaking the enslavement to
293 the VRF device:
294 $ ip link set dev NAME nomaster
295
296 Connected routes are moved back to the default table and local entries are
297 moved to the local table.
298
299 For example:
300 $ ip link set dev eth0 nomaster
301
302--------------------------------------------------------------------------------
303
304Commands used in this example:
305
306cat >> /etc/iproute2/rt_tables <<EOF
3071 vrf-mgmt
30810 vrf-red
30966 vrf-blue
31081 vrf-green
311EOF
312
313function vrf_create
314{
315 VRF=$1
316 TBID=$2
317 # create VRF device
318 ip link add vrf-${VRF} type vrf table ${TBID}
319
320 # add rules that direct lookups to vrf table
321 ip ru add pref 200 oif vrf-${VRF} table ${TBID}
322 ip ru add pref 200 iif vrf-${VRF} table ${TBID}
323 ip -6 ru add pref 200 oif vrf-${VRF} table ${TBID}
324 ip -6 ru add pref 200 iif vrf-${VRF} table ${TBID}
325
326 if [ "${VRF}" != "mgmt" ]; then
327 ip route add table ${TBID} prohibit default
328 fi
329 ip link set dev vrf-${VRF} up
330 ip link set dev vrf-${VRF} state up
331}
332
333vrf_create mgmt 1
334ip link set dev eth0 master vrf-mgmt
335
336vrf_create red 10
337ip link set dev eth1 master vrf-red
338ip link set dev eth2 master vrf-red
339ip link set dev eth5 master vrf-red
340
341vrf_create blue 66
342ip link set dev eth3 master vrf-blue
343
344vrf_create green 81
345ip link set dev eth4 master vrf-green
346
347
348Interface addresses from /etc/network/interfaces:
349auto eth0
350iface eth0 inet static
351 address 10.0.0.2
352 netmask 255.255.255.0
353 gateway 10.0.0.254
354
355iface eth0 inet6 static
356 address 2000:1::2
357 netmask 120
358
359auto eth1
360iface eth1 inet static
361 address 10.2.1.2
362 netmask 255.255.255.0
363
364iface eth1 inet6 static
365 address 2002:1::2
366 netmask 120
367
368auto eth2
369iface eth2 inet static
370 address 10.2.2.2
371 netmask 255.255.255.0
372
373iface eth2 inet6 static
374 address 2002:2::2
375 netmask 120
376
377auto eth3
378iface eth3 inet static
379 address 10.2.3.2
380 netmask 255.255.255.0
381
382iface eth3 inet6 static
383 address 2002:3::2
384 netmask 120
385
386auto eth4
387iface eth4 inet static
388 address 10.2.4.2
389 netmask 255.255.255.0
390
391iface eth4 inet6 static
392 address 2002:4::2
393 netmask 120
diff --git a/Documentation/power/pci.txt b/Documentation/power/pci.txt
index 62328d76b55b..b0e911e0e8f5 100644
--- a/Documentation/power/pci.txt
+++ b/Documentation/power/pci.txt
@@ -979,20 +979,45 @@ every time right after the runtime_resume() callback has returned
979(alternatively, the runtime_suspend() callback will have to check if the 979(alternatively, the runtime_suspend() callback will have to check if the
980device should really be suspended and return -EAGAIN if that is not the case). 980device should really be suspended and return -EAGAIN if that is not the case).
981 981
982The runtime PM of PCI devices is disabled by default. It is also blocked by 982The runtime PM of PCI devices is enabled by default by the PCI core. PCI
983pci_pm_init() that runs the pm_runtime_forbid() helper function. If a PCI 983device drivers do not need to enable it and should not attempt to do so.
984driver implements the runtime PM callbacks and intends to use the runtime PM 984However, it is blocked by pci_pm_init() that runs the pm_runtime_forbid()
985framework provided by the PM core and the PCI subsystem, it should enable this 985helper function. In addition to that, the runtime PM usage counter of
986feature by executing the pm_runtime_enable() helper function. However, the 986each PCI device is incremented by local_pci_probe() before executing the
987driver should not call the pm_runtime_allow() helper function unblocking 987probe callback provided by the device's driver.
988the runtime PM of the device. Instead, it should allow user space or some 988
989platform-specific code to do that (user space can do it via sysfs), although 989If a PCI driver implements the runtime PM callbacks and intends to use the
990once it has called pm_runtime_enable(), it must be prepared to handle the 990runtime PM framework provided by the PM core and the PCI subsystem, it needs
991to decrement the device's runtime PM usage counter in its probe callback
992function. If it doesn't do that, the counter will always be different from
993zero for the device and it will never be runtime-suspended. The simplest
994way to do that is by calling pm_runtime_put_noidle(), but if the driver
995wants to schedule an autosuspend right away, for example, it may call
996pm_runtime_put_autosuspend() instead for this purpose. Generally, it
997just needs to call a function that decrements the devices usage counter
998from its probe routine to make runtime PM work for the device.
999
1000It is important to remember that the driver's runtime_suspend() callback
1001may be executed right after the usage counter has been decremented, because
1002user space may already have cuased the pm_runtime_allow() helper function
1003unblocking the runtime PM of the device to run via sysfs, so the driver must
1004be prepared to cope with that.
1005
1006The driver itself should not call pm_runtime_allow(), though. Instead, it
1007should let user space or some platform-specific code do that (user space can
1008do it via sysfs as stated above), but it must be prepared to handle the
991runtime PM of the device correctly as soon as pm_runtime_allow() is called 1009runtime PM of the device correctly as soon as pm_runtime_allow() is called
992(which may happen at any time). [It also is possible that user space causes 1010(which may happen at any time, even before the driver is loaded).
993pm_runtime_allow() to be called via sysfs before the driver is loaded, so in 1011
994fact the driver has to be prepared to handle the runtime PM of the device as 1012When the driver's remove callback runs, it has to balance the decrementation
995soon as it calls pm_runtime_enable().] 1013of the device's runtime PM usage counter at the probe time. For this reason,
1014if it has decremented the counter in its probe callback, it must run
1015pm_runtime_get_noresume() in its remove callback. [Since the core carries
1016out a runtime resume of the device and bumps up the device's usage counter
1017before running the driver's remove callback, the runtime PM of the device
1018is effectively disabled for the duration of the remove execution and all
1019runtime PM helper functions incrementing the device's usage counter are
1020then effectively equivalent to pm_runtime_get_noresume().]
996 1021
997The runtime PM framework works by processing requests to suspend or resume 1022The runtime PM framework works by processing requests to suspend or resume
998devices, or to check if they are idle (in which cases it is reasonable to 1023devices, or to check if they are idle (in which cases it is reasonable to
diff --git a/Documentation/printk-formats.txt b/Documentation/printk-formats.txt
index 2216eb187c21..b784c270105f 100644
--- a/Documentation/printk-formats.txt
+++ b/Documentation/printk-formats.txt
@@ -23,6 +23,10 @@ Example:
23 23
24Reminder: sizeof() result is of type size_t. 24Reminder: sizeof() result is of type size_t.
25 25
26The kernel's printf does not support %n. For obvious reasons, floating
27point formats (%e, %f, %g, %a) are also not recognized. Use of any
28unsupported specifier or length qualifier results in a WARN and early
29return from vsnprintf.
26 30
27Raw pointer value SHOULD be printed with %p. The kernel supports 31Raw pointer value SHOULD be printed with %p. The kernel supports
28the following extended format specifiers for pointer types: 32the following extended format specifiers for pointer types:
@@ -119,6 +123,7 @@ Raw buffer as an escaped string:
119 If field width is omitted the 1 byte only will be escaped. 123 If field width is omitted the 1 byte only will be escaped.
120 124
121Raw buffer as a hex string: 125Raw buffer as a hex string:
126
122 %*ph 00 01 02 ... 3f 127 %*ph 00 01 02 ... 3f
123 %*phC 00:01:02: ... :3f 128 %*phC 00:01:02: ... :3f
124 %*phD 00-01-02- ... -3f 129 %*phD 00-01-02- ... -3f
@@ -234,6 +239,7 @@ UUID/GUID addresses:
234 Passed by reference. 239 Passed by reference.
235 240
236dentry names: 241dentry names:
242
237 %pd{,2,3,4} 243 %pd{,2,3,4}
238 %pD{,2,3,4} 244 %pD{,2,3,4}
239 245
@@ -256,6 +262,8 @@ struct va_format:
256 va_list *va; 262 va_list *va;
257 }; 263 };
258 264
265 Implements a "recursive vsnprintf".
266
259 Do not use this feature without some mechanism to verify the 267 Do not use this feature without some mechanism to verify the
260 correctness of the format string and va_list arguments. 268 correctness of the format string and va_list arguments.
261 269
@@ -284,6 +292,27 @@ bitmap and its derivatives such as cpumask and nodemask:
284 292
285 Passed by reference. 293 Passed by reference.
286 294
295Network device features:
296
297 %pNF 0x000000000000c000
298
299 For printing netdev_features_t.
300
301 Passed by reference.
302
303Command from struct task_struct
304
305 %pT ls
306
307 For printing executable name excluding path from struct
308 task_struct.
309
310 Passed by reference.
311
312If you add other %p extensions, please extend lib/test_printf.c with
313one or more test cases, if at all feasible.
314
315
287Thank you for your cooperation and attention. 316Thank you for your cooperation and attention.
288 317
289 318
diff --git a/Documentation/ptp/testptp.c b/Documentation/ptp/testptp.c
index 2bc8abc57fa0..6c6247aaa7b9 100644
--- a/Documentation/ptp/testptp.c
+++ b/Documentation/ptp/testptp.c
@@ -18,6 +18,7 @@
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 */ 19 */
20#define _GNU_SOURCE 20#define _GNU_SOURCE
21#define __SANE_USERSPACE_TYPES__ /* For PPC64, to get LL64 types */
21#include <errno.h> 22#include <errno.h>
22#include <fcntl.h> 23#include <fcntl.h>
23#include <inttypes.h> 24#include <inttypes.h>
diff --git a/Documentation/rbtree.txt b/Documentation/rbtree.txt
index 39873ef41bf9..b9d9cc57be18 100644
--- a/Documentation/rbtree.txt
+++ b/Documentation/rbtree.txt
@@ -203,7 +203,7 @@ functions with the user provided augmentation callback when inserting
203and erasing nodes. 203and erasing nodes.
204 204
205C files implementing augmented rbtree manipulation must include 205C files implementing augmented rbtree manipulation must include
206<linux/rbtree_augmented.h> instead of <linus/rbtree.h>. Note that 206<linux/rbtree_augmented.h> instead of <linux/rbtree.h>. Note that
207linux/rbtree_augmented.h exposes some rbtree implementations details 207linux/rbtree_augmented.h exposes some rbtree implementations details
208you are not expected to rely on; please stick to the documented APIs 208you are not expected to rely on; please stick to the documented APIs
209there and do not include <linux/rbtree_augmented.h> from header files 209there and do not include <linux/rbtree_augmented.h> from header files
diff --git a/Documentation/security/Smack.txt b/Documentation/security/Smack.txt
index 5e6d07fbed07..945cc633d883 100644
--- a/Documentation/security/Smack.txt
+++ b/Documentation/security/Smack.txt
@@ -255,6 +255,16 @@ unconfined
255 the access permitted if it wouldn't be otherwise. Note that this 255 the access permitted if it wouldn't be otherwise. Note that this
256 is dangerous and can ruin the proper labeling of your system. 256 is dangerous and can ruin the proper labeling of your system.
257 It should never be used in production. 257 It should never be used in production.
258relabel-self
259 This interface contains a list of labels to which the process can
260 transition to, by writing to /proc/self/attr/current.
261 Normally a process can change its own label to any legal value, but only
262 if it has CAP_MAC_ADMIN. This interface allows a process without
263 CAP_MAC_ADMIN to relabel itself to one of labels from predefined list.
264 A process without CAP_MAC_ADMIN can change its label only once. When it
265 does, this list will be cleared.
266 The values are set by writing the desired labels, separated
267 by spaces, to the file or cleared by writing "-" to the file.
258 268
259If you are using the smackload utility 269If you are using the smackload utility
260you can add access rules in /etc/smack/accesses. They take the form: 270you can add access rules in /etc/smack/accesses. They take the form:
diff --git a/Documentation/security/keys.txt b/Documentation/security/keys.txt
index c9e7f4f223a5..8c183873b2b7 100644
--- a/Documentation/security/keys.txt
+++ b/Documentation/security/keys.txt
@@ -1049,12 +1049,12 @@ search a specific keyring, so using keyrings in this way is of limited utility.
1049NOTES ON ACCESSING PAYLOAD CONTENTS 1049NOTES ON ACCESSING PAYLOAD CONTENTS
1050=================================== 1050===================================
1051 1051
1052The simplest payload is just a number in key->payload.value. In this case, 1052The simplest payload is just data stored in key->payload directly. In this
1053there's no need to indulge in RCU or locking when accessing the payload. 1053case, there's no need to indulge in RCU or locking when accessing the payload.
1054 1054
1055More complex payload contents must be allocated and a pointer to them set in 1055More complex payload contents must be allocated and pointers to them set in the
1056key->payload.data. One of the following ways must be selected to access the 1056key->payload.data[] array. One of the following ways must be selected to
1057data: 1057access the data:
1058 1058
1059 (1) Unmodifiable key type. 1059 (1) Unmodifiable key type.
1060 1060
@@ -1092,6 +1092,13 @@ data:
1092 the payload. key->datalen cannot be relied upon to be consistent with the 1092 the payload. key->datalen cannot be relied upon to be consistent with the
1093 payload just dereferenced if the key's semaphore is not held. 1093 payload just dereferenced if the key's semaphore is not held.
1094 1094
1095 Note that key->payload.data[0] has a shadow that is marked for __rcu
1096 usage. This is called key->payload.rcu_data0. The following accessors
1097 wrap the RCU calls to this element:
1098
1099 rcu_assign_keypointer(struct key *key, void *data);
1100 void *rcu_dereference_key(struct key *key);
1101
1095 1102
1096=================== 1103===================
1097DEFINING A KEY TYPE 1104DEFINING A KEY TYPE
@@ -1143,8 +1150,7 @@ The structure has a number of fields, some of which are mandatory:
1143 1150
1144 struct key_preparsed_payload { 1151 struct key_preparsed_payload {
1145 char *description; 1152 char *description;
1146 void *type_data[2]; 1153 union key_payload payload;
1147 void *payload;
1148 const void *data; 1154 const void *data;
1149 size_t datalen; 1155 size_t datalen;
1150 size_t quotalen; 1156 size_t quotalen;
@@ -1160,10 +1166,9 @@ The structure has a number of fields, some of which are mandatory:
1160 attached as a string to the description field. This will be used for the 1166 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 "". 1167 key description if the caller of add_key() passes NULL or "".
1162 1168
1163 The method can attach anything it likes to type_data[] and payload. These 1169 The method can attach anything it likes to payload. This is merely passed
1164 are merely passed along to the instantiate() or update() operations. If 1170 along to the instantiate() or update() operations. If set, the expiry
1165 set, the expiry time will be applied to the key if it is instantiated from 1171 time will be applied to the key if it is instantiated from this data.
1166 this data.
1167 1172
1168 The method should return 0 if successful or a negative error code 1173 The method should return 0 if successful or a negative error code
1169 otherwise. 1174 otherwise.
@@ -1172,11 +1177,10 @@ The structure has a number of fields, some of which are mandatory:
1172 (*) void (*free_preparse)(struct key_preparsed_payload *prep); 1177 (*) void (*free_preparse)(struct key_preparsed_payload *prep);
1173 1178
1174 This method is only required if the preparse() method is provided, 1179 This method is only required if the preparse() method is provided,
1175 otherwise it is unused. It cleans up anything attached to the 1180 otherwise it is unused. It cleans up anything attached to the description
1176 description, type_data and payload fields of the key_preparsed_payload 1181 and payload fields of the key_preparsed_payload struct as filled in by the
1177 struct as filled in by the preparse() method. It will always be called 1182 preparse() method. It will always be called after preparse() returns
1178 after preparse() returns successfully, even if instantiate() or update() 1183 successfully, even if instantiate() or update() succeed.
1179 succeed.
1180 1184
1181 1185
1182 (*) int (*instantiate)(struct key *key, struct key_preparsed_payload *prep); 1186 (*) int (*instantiate)(struct key *key, struct key_preparsed_payload *prep);
@@ -1197,6 +1201,11 @@ The structure has a number of fields, some of which are mandatory:
1197 1201
1198 It is safe to sleep in this method. 1202 It is safe to sleep in this method.
1199 1203
1204 generic_key_instantiate() is provided to simply copy the data from
1205 prep->payload.data[] to key->payload.data[], with RCU-safe assignment on
1206 the first element. It will then clear prep->payload.data[] so that the
1207 free_preparse method doesn't release the data.
1208
1200 1209
1201 (*) int (*update)(struct key *key, const void *data, size_t datalen); 1210 (*) int (*update)(struct key *key, const void *data, size_t datalen);
1202 1211
diff --git a/Documentation/serial/driver b/Documentation/serial/driver
index c415b0ef4493..379468e12680 100644
--- a/Documentation/serial/driver
+++ b/Documentation/serial/driver
@@ -439,11 +439,13 @@ Modem control lines via GPIO
439 439
440Some helpers are provided in order to set/get modem control lines via GPIO. 440Some helpers are provided in order to set/get modem control lines via GPIO.
441 441
442mctrl_gpio_init(dev, idx): 442mctrl_gpio_init(port, idx):
443 This will get the {cts,rts,...}-gpios from device tree if they are 443 This will get the {cts,rts,...}-gpios from device tree if they are
444 present and request them, set direction etc, and return an 444 present and request them, set direction etc, and return an
445 allocated structure. devm_* functions are used, so there's no need 445 allocated structure. devm_* functions are used, so there's no need
446 to call mctrl_gpio_free(). 446 to call mctrl_gpio_free().
447 As this sets up the irq handling make sure to not handle changes to the
448 gpio input lines in your driver, too.
447 449
448mctrl_gpio_free(dev, gpios): 450mctrl_gpio_free(dev, gpios):
449 This will free the requested gpios in mctrl_gpio_init(). 451 This will free the requested gpios in mctrl_gpio_init().
@@ -458,3 +460,9 @@ mctrl_gpio_set(gpios, mctrl):
458 460
459mctrl_gpio_get(gpios, mctrl): 461mctrl_gpio_get(gpios, mctrl):
460 This will update mctrl with the gpios values. 462 This will update mctrl with the gpios values.
463
464mctrl_gpio_enable_ms(gpios):
465 Enables irqs and handling of changes to the ms lines.
466
467mctrl_gpio_disable_ms(gpios):
468 Disables irqs and handling of changes to the ms lines.
diff --git a/Documentation/serial/tty.txt b/Documentation/serial/tty.txt
index 973c8ad3f959..bc3842dc323a 100644
--- a/Documentation/serial/tty.txt
+++ b/Documentation/serial/tty.txt
@@ -39,8 +39,13 @@ TTY side interfaces:
39open() - Called when the line discipline is attached to 39open() - Called when the line discipline is attached to
40 the terminal. No other call into the line 40 the terminal. No other call into the line
41 discipline for this tty will occur until it 41 discipline for this tty will occur until it
42 completes successfully. Returning an error will 42 completes successfully. Should initialize any
43 prevent the ldisc from being attached. Can sleep. 43 state needed by the ldisc, and set receive_room
44 in the tty_struct to the maximum amount of data
45 the line discipline is willing to accept from the
46 driver with a single call to receive_buf().
47 Returning an error will prevent the ldisc from
48 being attached. Can sleep.
44 49
45close() - This is called on a terminal when the line 50close() - This is called on a terminal when the line
46 discipline is being unplugged. At the point of 51 discipline is being unplugged. At the point of
@@ -52,9 +57,16 @@ hangup() - Called when the tty line is hung up.
52 No further calls into the ldisc code will occur. 57 No further calls into the ldisc code will occur.
53 The return value is ignored. Can sleep. 58 The return value is ignored. Can sleep.
54 59
55write() - A process is writing data through the line 60read() - (optional) A process requests reading data from
56 discipline. Multiple write calls are serialized 61 the line. Multiple read calls may occur in parallel
57 by the tty layer for the ldisc. May sleep. 62 and the ldisc must deal with serialization issues.
63 If not defined, the process will receive an EIO
64 error. May sleep.
65
66write() - (optional) A process requests writing data to the
67 line. Multiple write calls are serialized by the
68 tty layer for the ldisc. If not defined, the
69 process will receive an EIO error. May sleep.
58 70
59flush_buffer() - (optional) May be called at any point between 71flush_buffer() - (optional) May be called at any point between
60 open and close, and instructs the line discipline 72 open and close, and instructs the line discipline
@@ -69,27 +81,33 @@ set_termios() - (optional) Called on termios structure changes.
69 termios semaphore so allowed to sleep. Serialized 81 termios semaphore so allowed to sleep. Serialized
70 against itself only. 82 against itself only.
71 83
72read() - Move data from the line discipline to the user. 84poll() - (optional) Check the status for the poll/select
73 Multiple read calls may occur in parallel and the 85 calls. Multiple poll calls may occur in parallel.
74 ldisc must deal with serialization issues. May 86 May sleep.
75 sleep.
76
77poll() - Check the status for the poll/select calls. Multiple
78 poll calls may occur in parallel. May sleep.
79 87
80ioctl() - Called when an ioctl is handed to the tty layer 88ioctl() - (optional) Called when an ioctl is handed to the
81 that might be for the ldisc. Multiple ioctl calls 89 tty layer that might be for the ldisc. Multiple
82 may occur in parallel. May sleep. 90 ioctl calls may occur in parallel. May sleep.
83 91
84compat_ioctl() - Called when a 32 bit ioctl is handed to the tty layer 92compat_ioctl() - (optional) Called when a 32 bit ioctl is handed
85 that might be for the ldisc. Multiple ioctl calls 93 to the tty layer that might be for the ldisc.
86 may occur in parallel. May sleep. 94 Multiple ioctl calls may occur in parallel.
95 May sleep.
87 96
88Driver Side Interfaces: 97Driver Side Interfaces:
89 98
90receive_buf() - Hand buffers of bytes from the driver to the ldisc 99receive_buf() - (optional) Called by the low-level driver to hand
91 for processing. Semantics currently rather 100 a buffer of received bytes to the ldisc for
92 mysterious 8( 101 processing. The number of bytes is guaranteed not
102 to exceed the current value of tty->receive_room.
103 All bytes must be processed.
104
105receive_buf2() - (optional) Called by the low-level driver to hand
106 a buffer of received bytes to the ldisc for
107 processing. Returns the number of bytes processed.
108
109 If both receive_buf() and receive_buf2() are
110 defined, receive_buf2() should be preferred.
93 111
94write_wakeup() - May be called at any point between open and close. 112write_wakeup() - May be called at any point between open and close.
95 The TTY_DO_WRITE_WAKEUP flag indicates if a call 113 The TTY_DO_WRITE_WAKEUP flag indicates if a call
diff --git a/Documentation/sound/alsa/hda_codec.txt b/Documentation/sound/alsa/hda_codec.txt
deleted file mode 100644
index de8efbc7e4bd..000000000000
--- a/Documentation/sound/alsa/hda_codec.txt
+++ /dev/null
@@ -1,322 +0,0 @@
1Notes on Universal Interface for Intel High Definition Audio Codec
2------------------------------------------------------------------
3
4Takashi Iwai <tiwai@suse.de>
5
6
7[Still a draft version]
8
9
10General
11=======
12
13The snd-hda-codec module supports the generic access function for the
14High Definition (HD) audio codecs. It's designed to be independent
15from the controller code like ac97 codec module. The real accessors
16from/to the controller must be implemented in the lowlevel driver.
17
18The structure of this module is similar with ac97_codec module.
19Each codec chip belongs to a bus class which communicates with the
20controller.
21
22
23Initialization of Bus Instance
24==============================
25
26The card driver has to create struct hda_bus at first. The template
27struct should be filled and passed to the constructor:
28
29struct hda_bus_template {
30 void *private_data;
31 struct pci_dev *pci;
32 const char *modelname;
33 struct hda_bus_ops ops;
34};
35
36The card driver can set and use the private_data field to retrieve its
37own data in callback functions. The pci field is used when the patch
38needs to check the PCI subsystem IDs, so on. For non-PCI system, it
39doesn't have to be set, of course.
40The modelname field specifies the board's specific configuration. The
41string is passed to the codec parser, and it depends on the parser how
42the string is used.
43These fields, private_data, pci and modelname are all optional.
44
45The ops field contains the callback functions as the following:
46
47struct hda_bus_ops {
48 int (*command)(struct hda_codec *codec, hda_nid_t nid, int direct,
49 unsigned int verb, unsigned int parm);
50 unsigned int (*get_response)(struct hda_codec *codec);
51 void (*private_free)(struct hda_bus *);
52#ifdef CONFIG_SND_HDA_POWER_SAVE
53 void (*pm_notify)(struct hda_codec *codec);
54#endif
55};
56
57The command callback is called when the codec module needs to send a
58VERB to the controller. It's always a single command.
59The get_response callback is called when the codec requires the answer
60for the last command. These two callbacks are mandatory and have to
61be given.
62The third, private_free callback, is optional. It's called in the
63destructor to release any necessary data in the lowlevel driver.
64
65The pm_notify callback is available only with
66CONFIG_SND_HDA_POWER_SAVE kconfig. It's called when the codec needs
67to power up or may power down. The controller should check the all
68belonging codecs on the bus whether they are actually powered off
69(check codec->power_on), and optionally the driver may power down the
70controller side, too.
71
72The bus instance is created via snd_hda_bus_new(). You need to pass
73the card instance, the template, and the pointer to store the
74resultant bus instance.
75
76int snd_hda_bus_new(struct snd_card *card, const struct hda_bus_template *temp,
77 struct hda_bus **busp);
78
79It returns zero if successful. A negative return value means any
80error during creation.
81
82
83Creation of Codec Instance
84==========================
85
86Each codec chip on the board is then created on the BUS instance.
87To create a codec instance, call snd_hda_codec_new().
88
89int snd_hda_codec_new(struct hda_bus *bus, unsigned int codec_addr,
90 struct hda_codec **codecp);
91
92The first argument is the BUS instance, the second argument is the
93address of the codec, and the last one is the pointer to store the
94resultant codec instance (can be NULL if not needed).
95
96The codec is stored in a linked list of bus instance. You can follow
97the codec list like:
98
99 struct hda_codec *codec;
100 list_for_each_entry(codec, &bus->codec_list, list) {
101 ...
102 }
103
104The codec isn't initialized at this stage properly. The
105initialization sequence is called when the controls are built later.
106
107
108Codec Access
109============
110
111To access codec, use snd_hda_codec_read() and snd_hda_codec_write().
112snd_hda_param_read() is for reading parameters.
113For writing a sequence of verbs, use snd_hda_sequence_write().
114
115There are variants of cached read/write, snd_hda_codec_write_cache(),
116snd_hda_sequence_write_cache(). These are used for recording the
117register states for the power-management resume. When no PM is needed,
118these are equivalent with non-cached version.
119
120To retrieve the number of sub nodes connected to the given node, use
121snd_hda_get_sub_nodes(). The connection list can be obtained via
122snd_hda_get_connections() call.
123
124When an unsolicited event happens, pass the event via
125snd_hda_queue_unsol_event() so that the codec routines will process it
126later.
127
128
129(Mixer) Controls
130================
131
132To create mixer controls of all codecs, call
133snd_hda_build_controls(). It then builds the mixers and does
134initialization stuff on each codec.
135
136
137PCM Stuff
138=========
139
140snd_hda_build_pcms() gives the necessary information to create PCM
141streams. When it's called, each codec belonging to the bus stores
142codec->num_pcms and codec->pcm_info fields. The num_pcms indicates
143the number of elements in pcm_info array. The card driver is supposed
144to traverse the codec linked list, read the pcm information in
145pcm_info array, and build pcm instances according to them.
146
147The pcm_info array contains the following record:
148
149/* PCM information for each substream */
150struct hda_pcm_stream {
151 unsigned int substreams; /* number of substreams, 0 = not exist */
152 unsigned int channels_min; /* min. number of channels */
153 unsigned int channels_max; /* max. number of channels */
154 hda_nid_t nid; /* default NID to query rates/formats/bps, or set up */
155 u32 rates; /* supported rates */
156 u64 formats; /* supported formats (SNDRV_PCM_FMTBIT_) */
157 unsigned int maxbps; /* supported max. bit per sample */
158 struct hda_pcm_ops ops;
159};
160
161/* for PCM creation */
162struct hda_pcm {
163 char *name;
164 struct hda_pcm_stream stream[2];
165};
166
167The name can be passed to snd_pcm_new(). The stream field contains
168the information for playback (SNDRV_PCM_STREAM_PLAYBACK = 0) and
169capture (SNDRV_PCM_STREAM_CAPTURE = 1) directions. The card driver
170should pass substreams to snd_pcm_new() for the number of substreams
171to create.
172
173The channels_min, channels_max, rates and formats should be copied to
174runtime->hw record. They and maxbps fields are used also to compute
175the format value for the HDA codec and controller. Call
176snd_hda_calc_stream_format() to get the format value.
177
178The ops field contains the following callback functions:
179
180struct hda_pcm_ops {
181 int (*open)(struct hda_pcm_stream *info, struct hda_codec *codec,
182 struct snd_pcm_substream *substream);
183 int (*close)(struct hda_pcm_stream *info, struct hda_codec *codec,
184 struct snd_pcm_substream *substream);
185 int (*prepare)(struct hda_pcm_stream *info, struct hda_codec *codec,
186 unsigned int stream_tag, unsigned int format,
187 struct snd_pcm_substream *substream);
188 int (*cleanup)(struct hda_pcm_stream *info, struct hda_codec *codec,
189 struct snd_pcm_substream *substream);
190};
191
192All are non-NULL, so you can call them safely without NULL check.
193
194The open callback should be called in PCM open after runtime->hw is
195set up. It may override some setting and constraints additionally.
196Similarly, the close callback should be called in the PCM close.
197
198The prepare callback should be called in PCM prepare. This will set
199up the codec chip properly for the operation. The cleanup should be
200called in hw_free to clean up the configuration.
201
202The caller should check the return value, at least for open and
203prepare callbacks. When a negative value is returned, some error
204occurred.
205
206
207Proc Files
208==========
209
210Each codec dumps the widget node information in
211/proc/asound/card*/codec#* file. This information would be really
212helpful for debugging. Please provide its contents together with the
213bug report.
214
215
216Power Management
217================
218
219It's simple:
220Call snd_hda_suspend() in the PM suspend callback.
221Call snd_hda_resume() in the PM resume callback.
222
223
224Codec Preset (Patch)
225====================
226
227To set up and handle the codec functionality fully, each codec may
228have a codec preset (patch). It's defined in struct hda_codec_preset:
229
230 struct hda_codec_preset {
231 unsigned int id;
232 unsigned int mask;
233 unsigned int subs;
234 unsigned int subs_mask;
235 unsigned int rev;
236 const char *name;
237 int (*patch)(struct hda_codec *codec);
238 };
239
240When the codec id and codec subsystem id match with the given id and
241subs fields bitwise (with bitmask mask and subs_mask), the callback
242patch is called. The patch callback should initialize the codec and
243set the codec->patch_ops field. This is defined as below:
244
245 struct hda_codec_ops {
246 int (*build_controls)(struct hda_codec *codec);
247 int (*build_pcms)(struct hda_codec *codec);
248 int (*init)(struct hda_codec *codec);
249 void (*free)(struct hda_codec *codec);
250 void (*unsol_event)(struct hda_codec *codec, unsigned int res);
251 #ifdef CONFIG_PM
252 int (*suspend)(struct hda_codec *codec, pm_message_t state);
253 int (*resume)(struct hda_codec *codec);
254 #endif
255 #ifdef CONFIG_SND_HDA_POWER_SAVE
256 int (*check_power_status)(struct hda_codec *codec,
257 hda_nid_t nid);
258 #endif
259 };
260
261The build_controls callback is called from snd_hda_build_controls().
262Similarly, the build_pcms callback is called from
263snd_hda_build_pcms(). The init callback is called after
264build_controls to initialize the hardware.
265The free callback is called as a destructor.
266
267The unsol_event callback is called when an unsolicited event is
268received.
269
270The suspend and resume callbacks are for power management.
271They can be NULL if no special sequence is required. When the resume
272callback is NULL, the driver calls the init callback and resumes the
273registers from the cache. If other handling is needed, you'd need to
274write your own resume callback. There, the amp values can be resumed
275via
276 void snd_hda_codec_resume_amp(struct hda_codec *codec);
277and the other codec registers via
278 void snd_hda_codec_resume_cache(struct hda_codec *codec);
279
280The check_power_status callback is called when the amp value of the
281given widget NID is changed. The codec code can turn on/off the power
282appropriately from this information.
283
284Each entry can be NULL if not necessary to be called.
285
286
287Generic Parser
288==============
289
290When the device doesn't match with any given presets, the widgets are
291parsed via th generic parser (hda_generic.c). Its support is
292limited: no multi-channel support, for example.
293
294
295Digital I/O
296===========
297
298Call snd_hda_create_spdif_out_ctls() from the patch to create controls
299related with SPDIF out.
300
301
302Helper Functions
303================
304
305snd_hda_get_codec_name() stores the codec name on the given string.
306
307snd_hda_check_board_config() can be used to obtain the configuration
308information matching with the device. Define the model string table
309and the table with struct snd_pci_quirk entries (zero-terminated),
310and pass it to the function. The function checks the modelname given
311as a module parameter, and PCI subsystem IDs. If the matching entry
312is found, it returns the config field value.
313
314snd_hda_add_new_ctls() can be used to create and add control entries.
315Pass the zero-terminated array of struct snd_kcontrol_new
316
317Macros HDA_CODEC_VOLUME(), HDA_CODEC_MUTE() and their variables can be
318used for the entry of struct snd_kcontrol_new.
319
320The input MUX helper callbacks for such a control are provided, too:
321snd_hda_input_mux_info() and snd_hda_input_mux_put(). See
322patch_realtek.c for example.
diff --git a/Documentation/spi/pxa2xx b/Documentation/spi/pxa2xx
index 3352f97430e4..13a0b7fb192f 100644
--- a/Documentation/spi/pxa2xx
+++ b/Documentation/spi/pxa2xx
@@ -22,15 +22,10 @@ Typically a SPI master is defined in the arch/.../mach-*/board-*.c as a
22found in include/linux/spi/pxa2xx_spi.h: 22found in include/linux/spi/pxa2xx_spi.h:
23 23
24struct pxa2xx_spi_master { 24struct pxa2xx_spi_master {
25 u32 clock_enable;
26 u16 num_chipselect; 25 u16 num_chipselect;
27 u8 enable_dma; 26 u8 enable_dma;
28}; 27};
29 28
30The "pxa2xx_spi_master.clock_enable" field is used to enable/disable the
31corresponding SSP peripheral block in the "Clock Enable Register (CKEN"). See
32the "PXA2xx Developer Manual" section "Clocks and Power Management".
33
34The "pxa2xx_spi_master.num_chipselect" field is used to determine the number of 29The "pxa2xx_spi_master.num_chipselect" field is used to determine the number of
35slave device (chips) attached to this SPI master. 30slave device (chips) attached to this SPI master.
36 31
@@ -57,7 +52,6 @@ static struct resource pxa_spi_nssp_resources[] = {
57}; 52};
58 53
59static struct pxa2xx_spi_master pxa_nssp_master_info = { 54static struct pxa2xx_spi_master pxa_nssp_master_info = {
60 .clock_enable = CKEN_NSSP, /* NSSP Peripheral clock */
61 .num_chipselect = 1, /* Matches the number of chips attached to NSSP */ 55 .num_chipselect = 1, /* Matches the number of chips attached to NSSP */
62 .enable_dma = 1, /* Enables NSSP DMA */ 56 .enable_dma = 1, /* Enables NSSP DMA */
63}; 57};
diff --git a/Documentation/static-keys.txt b/Documentation/static-keys.txt
index f4cb0b2d5cd7..477927becacb 100644
--- a/Documentation/static-keys.txt
+++ b/Documentation/static-keys.txt
@@ -15,8 +15,8 @@ The updated API replacements are:
15 15
16DEFINE_STATIC_KEY_TRUE(key); 16DEFINE_STATIC_KEY_TRUE(key);
17DEFINE_STATIC_KEY_FALSE(key); 17DEFINE_STATIC_KEY_FALSE(key);
18static_key_likely() 18static_branch_likely()
19statick_key_unlikely() 19static_branch_unlikely()
20 20
210) Abstract 210) Abstract
22 22
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt
index 6fccb69c03e7..af70d1541d3a 100644
--- a/Documentation/sysctl/kernel.txt
+++ b/Documentation/sysctl/kernel.txt
@@ -33,6 +33,7 @@ show up in /proc/sys/kernel:
33- domainname 33- domainname
34- hostname 34- hostname
35- hotplug 35- hotplug
36- hardlockup_all_cpu_backtrace
36- hung_task_panic 37- hung_task_panic
37- hung_task_check_count 38- hung_task_check_count
38- hung_task_timeout_secs 39- hung_task_timeout_secs
@@ -293,6 +294,17 @@ domain names are in general different. For a detailed discussion
293see the hostname(1) man page. 294see the hostname(1) man page.
294 295
295============================================================== 296==============================================================
297hardlockup_all_cpu_backtrace:
298
299This value controls the hard lockup detector behavior when a hard
300lockup condition is detected as to whether or not to gather further
301debug information. If enabled, arch-specific all-CPU stack dumping
302will be initiated.
303
3040: do nothing. This is the default behavior.
305
3061: on detection capture more debug information.
307==============================================================
296 308
297hotplug: 309hotplug:
298 310
diff --git a/Documentation/sysctl/net.txt b/Documentation/sysctl/net.txt
index 6294b5186ae5..809ab6efcc74 100644
--- a/Documentation/sysctl/net.txt
+++ b/Documentation/sysctl/net.txt
@@ -54,13 +54,15 @@ default_qdisc
54-------------- 54--------------
55 55
56The default queuing discipline to use for network devices. This allows 56The default queuing discipline to use for network devices. This allows
57overriding the default queue discipline of pfifo_fast with an 57overriding the default of pfifo_fast with an alternative. Since the default
58alternative. Since the default queuing discipline is created with the 58queuing discipline is created without additional parameters so is best suited
59no additional parameters so is best suited to queuing disciplines that 59to queuing disciplines that work well without configuration like stochastic
60work well without configuration like stochastic fair queue (sfq), 60fair queue (sfq), CoDel (codel) or fair queue CoDel (fq_codel). Don't use
61CoDel (codel) or fair queue CoDel (fq_codel). Don't use queuing disciplines 61queuing disciplines like Hierarchical Token Bucket or Deficit Round Robin
62like Hierarchical Token Bucket or Deficit Round Robin which require setting 62which require setting up classes and bandwidths. Note that physical multiqueue
63up classes and bandwidths. 63interfaces still use mq as root qdisc, which in turn uses this default for its
64leaves. Virtual devices (like e.g. lo or veth) ignore this setting and instead
65default to noqueue.
64Default: pfifo_fast 66Default: pfifo_fast
65 67
66busy_read 68busy_read
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt
index a4482fceacec..f72370b440b1 100644
--- a/Documentation/sysctl/vm.txt
+++ b/Documentation/sysctl/vm.txt
@@ -639,7 +639,7 @@ and don't use much of it.
639The default value is 0. 639The default value is 0.
640 640
641See Documentation/vm/overcommit-accounting and 641See Documentation/vm/overcommit-accounting and
642security/commoncap.c::cap_vm_enough_memory() for more information. 642mm/mmap.c::__vm_enough_memory() for more information.
643 643
644============================================================== 644==============================================================
645 645
diff --git a/Documentation/thermal/power_allocator.txt b/Documentation/thermal/power_allocator.txt
index c3797b529991..a1ce2235f121 100644
--- a/Documentation/thermal/power_allocator.txt
+++ b/Documentation/thermal/power_allocator.txt
@@ -4,7 +4,7 @@ Power allocator governor tunables
4Trip points 4Trip points
5----------- 5-----------
6 6
7The governor requires the following two passive trip points: 7The governor works optimally with the following two passive trip points:
8 8
91. "switch on" trip point: temperature above which the governor 91. "switch on" trip point: temperature above which the governor
10 control loop starts operating. This is the first passive trip 10 control loop starts operating. This is the first passive trip
diff --git a/Documentation/trace/events.txt b/Documentation/trace/events.txt
index 75d25a1d6e42..c010be8c85d7 100644
--- a/Documentation/trace/events.txt
+++ b/Documentation/trace/events.txt
@@ -288,6 +288,24 @@ prev_pid == 0
288# cat sched_wakeup/filter 288# cat sched_wakeup/filter
289common_pid == 0 289common_pid == 0
290 290
2915.4 PID filtering
292-----------------
293
294The set_event_pid file in the same directory as the top events directory
295exists, will filter all events from tracing any task that does not have the
296PID listed in the set_event_pid file.
297
298# cd /sys/kernel/debug/tracing
299# echo $$ > set_event_pid
300# echo 1 > events/enabled
301
302Will only trace events for the current task.
303
304To add more PIDs without losing the PIDs already included, use '>>'.
305
306# echo 123 244 1 >> set_event_pid
307
308
2916. Event triggers 3096. Event triggers
292================= 310=================
293 311
diff --git a/Documentation/trace/ftrace.txt b/Documentation/trace/ftrace.txt
index ef621d34ba5b..f52f297cb406 100644
--- a/Documentation/trace/ftrace.txt
+++ b/Documentation/trace/ftrace.txt
@@ -204,6 +204,12 @@ of ftrace. Here is a list of some of the key files:
204 204
205 Have the function tracer only trace a single thread. 205 Have the function tracer only trace a single thread.
206 206
207 set_event_pid:
208
209 Have the events only trace a task with a PID listed in this file.
210 Note, sched_switch and sched_wake_up will also trace events
211 listed in this file.
212
207 set_graph_function: 213 set_graph_function:
208 214
209 Set a "trigger" function where tracing should start 215 Set a "trigger" function where tracing should start
@@ -2437,6 +2443,23 @@ The following commands are supported:
2437 2443
2438 echo '!writeback*:mod:ext3' >> set_ftrace_filter 2444 echo '!writeback*:mod:ext3' >> set_ftrace_filter
2439 2445
2446 Mod command supports module globbing. Disable tracing for all
2447 functions except a specific module:
2448
2449 echo '!*:mod:!ext3' >> set_ftrace_filter
2450
2451 Disable tracing for all modules, but still trace kernel:
2452
2453 echo '!*:mod:*' >> set_ftrace_filter
2454
2455 Enable filter only for kernel:
2456
2457 echo '*write*:mod:!*' >> set_ftrace_filter
2458
2459 Enable filter for module globbing:
2460
2461 echo '*write*:mod:*snd*' >> set_ftrace_filter
2462
2440- traceon/traceoff 2463- traceon/traceoff
2441 These commands turn tracing on and off when the specified 2464 These commands turn tracing on and off when the specified
2442 functions are hit. The parameter determines how many times the 2465 functions are hit. The parameter determines how many times the
diff --git a/Documentation/trace/intel_th.txt b/Documentation/trace/intel_th.txt
new file mode 100644
index 000000000000..f7fc5ba5df8d
--- /dev/null
+++ b/Documentation/trace/intel_th.txt
@@ -0,0 +1,99 @@
1Intel(R) Trace Hub (TH)
2=======================
3
4Overview
5--------
6
7Intel(R) Trace Hub (TH) is a set of hardware blocks that produce,
8switch and output trace data from multiple hardware and software
9sources over several types of trace output ports encoded in System
10Trace Protocol (MIPI STPv2) and is intended to perform full system
11debugging. For more information on the hardware, see Intel(R) Trace
12Hub developer's manual [1].
13
14It consists of trace sources, trace destinations (outputs) and a
15switch (Global Trace Hub, GTH). These devices are placed on a bus of
16their own ("intel_th"), where they can be discovered and configured
17via sysfs attributes.
18
19Currently, the following Intel TH subdevices (blocks) are supported:
20 - Software Trace Hub (STH), trace source, which is a System Trace
21 Module (STM) device,
22 - Memory Storage Unit (MSU), trace output, which allows storing
23 trace hub output in system memory,
24 - Parallel Trace Interface output (PTI), trace output to an external
25 debug host via a PTI port,
26 - Global Trace Hub (GTH), which is a switch and a central component
27 of Intel(R) Trace Hub architecture.
28
29Common attributes for output devices are described in
30Documentation/ABI/testing/sysfs-bus-intel_th-output-devices, the most
31notable of them is "active", which enables or disables trace output
32into that particular output device.
33
34GTH allows directing different STP masters into different output ports
35via its "masters" attribute group. More detailed GTH interface
36description is at Documentation/ABI/testing/sysfs-bus-intel_th-devices-gth.
37
38STH registers an stm class device, through which it provides interface
39to userspace and kernelspace software trace sources. See
40Documentation/tracing/stm.txt for more information on that.
41
42MSU can be configured to collect trace data into a system memory
43buffer, which can later on be read from its device nodes via read() or
44mmap() interface.
45
46On the whole, Intel(R) Trace Hub does not require any special
47userspace software to function; everything can be configured, started
48and collected via sysfs attributes, and device nodes.
49
50[1] https://software.intel.com/sites/default/files/managed/d3/3c/intel-th-developer-manual.pdf
51
52Bus and Subdevices
53------------------
54
55For each Intel TH device in the system a bus of its own is
56created and assigned an id number that reflects the order in which TH
57devices were emumerated. All TH subdevices (devices on intel_th bus)
58begin with this id: 0-gth, 0-msc0, 0-msc1, 0-pti, 0-sth, which is
59followed by device's name and an optional index.
60
61Output devices also get a device node in /dev/intel_thN, where N is
62the Intel TH device id. For example, MSU's memory buffers, when
63allocated, are accessible via /dev/intel_th0/msc{0,1}.
64
65Quick example
66-------------
67
68# figure out which GTH port is the first memory controller:
69
70$ cat /sys/bus/intel_th/devices/0-msc0/port
710
72
73# looks like it's port 0, configure master 33 to send data to port 0:
74
75$ echo 0 > /sys/bus/intel_th/devices/0-gth/masters/33
76
77# allocate a 2-windowed multiblock buffer on the first memory
78# controller, each with 64 pages:
79
80$ echo multi > /sys/bus/intel_th/devices/0-msc0/mode
81$ echo 64,64 > /sys/bus/intel_th/devices/0-msc0/nr_pages
82
83# enable wrapping for this controller, too:
84
85$ echo 1 > /sys/bus/intel_th/devices/0-msc0/wrap
86
87# and enable tracing into this port:
88
89$ echo 1 > /sys/bus/intel_th/devices/0-msc0/active
90
91# .. send data to master 33, see stm.txt for more details ..
92# .. wait for traces to pile up ..
93# .. and stop the trace:
94
95$ echo 0 > /sys/bus/intel_th/devices/0-msc0/active
96
97# and now you can collect the trace from the device node:
98
99$ cat /dev/intel_th0/msc0 > my_stp_trace
diff --git a/Documentation/trace/stm.txt b/Documentation/trace/stm.txt
new file mode 100644
index 000000000000..ea035f9dbfd7
--- /dev/null
+++ b/Documentation/trace/stm.txt
@@ -0,0 +1,80 @@
1System Trace Module
2===================
3
4System Trace Module (STM) is a device described in MIPI STP specs as
5STP trace stream generator. STP (System Trace Protocol) is a trace
6protocol multiplexing data from multiple trace sources, each one of
7which is assigned a unique pair of master and channel. While some of
8these masters and channels are statically allocated to certain
9hardware trace sources, others are available to software. Software
10trace sources are usually free to pick for themselves any
11master/channel combination from this pool.
12
13On the receiving end of this STP stream (the decoder side), trace
14sources can only be identified by master/channel combination, so in
15order for the decoder to be able to make sense of the trace that
16involves multiple trace sources, it needs to be able to map those
17master/channel pairs to the trace sources that it understands.
18
19For instance, it is helpful to know that syslog messages come on
20master 7 channel 15, while arbitrary user applications can use masters
2148 to 63 and channels 0 to 127.
22
23To solve this mapping problem, stm class provides a policy management
24mechanism via configfs, that allows defining rules that map string
25identifiers to ranges of masters and channels. If these rules (policy)
26are consistent with what decoder expects, it will be able to properly
27process the trace data.
28
29This policy is a tree structure containing rules (policy_node) that
30have a name (string identifier) and a range of masters and channels
31associated with it, located in "stp-policy" subsystem directory in
32configfs. The topmost directory's name (the policy) is formatted as
33the STM device name to which this policy applies and and arbitrary
34string identifier separated by a stop. From the examle above, a rule
35may look like this:
36
37$ ls /config/stp-policy/dummy_stm.my-policy/user
38channels masters
39$ cat /config/stp-policy/dummy_stm.my-policy/user/masters
4048 63
41$ cat /config/stp-policy/dummy_stm.my-policy/user/channels
420 127
43
44which means that the master allocation pool for this rule consists of
45masters 48 through 63 and channel allocation pool has channels 0
46through 127 in it. Now, any producer (trace source) identifying itself
47with "user" identification string will be allocated a master and
48channel from within these ranges.
49
50These rules can be nested, for example, one can define a rule "dummy"
51under "user" directory from the example above and this new rule will
52be used for trace sources with the id string of "user/dummy".
53
54Trace sources have to open the stm class device's node and write their
55trace data into its file descriptor. In order to identify themselves
56to the policy, they need to do a STP_POLICY_ID_SET ioctl on this file
57descriptor providing their id string. Otherwise, they will be
58automatically allocated a master/channel pair upon first write to this
59file descriptor according to the "default" rule of the policy, if such
60exists.
61
62Some STM devices may allow direct mapping of the channel mmio regions
63to userspace for zero-copy writing. One mappable page (in terms of
64mmu) will usually contain multiple channels' mmios, so the user will
65need to allocate that many channels to themselves (via the
66aforementioned ioctl() call) to be able to do this. That is, if your
67stm device's channel mmio region is 64 bytes and hardware page size is
684096 bytes, after a successful STP_POLICY_ID_SET ioctl() call with
69width==64, you should be able to mmap() one page on this file
70descriptor and obtain direct access to an mmio region for 64 channels.
71
72For kernel-based trace sources, there is "stm_source" device
73class. Devices of this class can be connected and disconnected to/from
74stm devices at runtime via a sysfs attribute.
75
76Examples of STM devices are Intel(R) Trace Hub [1] and Coresight STM
77[2].
78
79[1] https://software.intel.com/sites/default/files/managed/d3/3c/intel-th-developer-manual.pdf
80[2] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0444b/index.html
diff --git a/Documentation/usb/authorization.txt b/Documentation/usb/authorization.txt
index c069b6884c77..c7e985f05d8f 100644
--- a/Documentation/usb/authorization.txt
+++ b/Documentation/usb/authorization.txt
@@ -90,3 +90,34 @@ etc, but you get the idea. Anybody with access to a device gadget kit
90can fake descriptors and device info. Don't trust that. You are 90can fake descriptors and device info. Don't trust that. You are
91welcome. 91welcome.
92 92
93
94Interface authorization
95-----------------------
96There is a similar approach to allow or deny specific USB interfaces.
97That allows to block only a subset of an USB device.
98
99Authorize an interface:
100$ echo 1 > /sys/bus/usb/devices/INTERFACE/authorized
101
102Deauthorize an interface:
103$ echo 0 > /sys/bus/usb/devices/INTERFACE/authorized
104
105The default value for new interfaces
106on a particular USB bus can be changed, too.
107
108Allow interfaces per default:
109$ echo 1 > /sys/bus/usb/devices/usbX/interface_authorized_default
110
111Deny interfaces per default:
112$ echo 0 > /sys/bus/usb/devices/usbX/interface_authorized_default
113
114Per default the interface_authorized_default bit is 1.
115So all interfaces would authorized per default.
116
117Note:
118If a deauthorized interface will be authorized so the driver probing must
119be triggered manually by writing INTERFACE to /sys/bus/usb/drivers_probe
120
121For drivers that need multiple interfaces all needed interfaces should be
122authroized first. After that the drivers should be probed.
123This avoids side effects.
diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134
index f4b395bdc090..282102014bb9 100644
--- a/Documentation/video4linux/CARDLIST.saa7134
+++ b/Documentation/video4linux/CARDLIST.saa7134
@@ -193,3 +193,4 @@
193192 -> AverMedia AverTV Satellite Hybrid+FM A706 [1461:2055] 193192 -> AverMedia AverTV Satellite Hybrid+FM A706 [1461:2055]
194193 -> WIS Voyager or compatible [1905:7007] 194193 -> WIS Voyager or compatible [1905:7007]
195194 -> AverMedia AverTV/505 [1461:a10a] 195194 -> AverMedia AverTV/505 [1461:a10a]
196195 -> Leadtek Winfast TV2100 FM [107d:6f3a]
diff --git a/Documentation/video4linux/v4l2-pci-skeleton.c b/Documentation/video4linux/v4l2-pci-skeleton.c
index 9c80c090e92d..95ae82860092 100644
--- a/Documentation/video4linux/v4l2-pci-skeleton.c
+++ b/Documentation/video4linux/v4l2-pci-skeleton.c
@@ -37,6 +37,7 @@
37#include <media/v4l2-dv-timings.h> 37#include <media/v4l2-dv-timings.h>
38#include <media/v4l2-ctrls.h> 38#include <media/v4l2-ctrls.h>
39#include <media/v4l2-event.h> 39#include <media/v4l2-event.h>
40#include <media/videobuf2-v4l2.h>
40#include <media/videobuf2-dma-contig.h> 41#include <media/videobuf2-dma-contig.h>
41 42
42MODULE_DESCRIPTION("V4L2 PCI Skeleton Driver"); 43MODULE_DESCRIPTION("V4L2 PCI Skeleton Driver");
@@ -162,10 +163,11 @@ static irqreturn_t skeleton_irq(int irq, void *dev_id)
162 * minimum number: many DMA engines need a minimum of 2 buffers in the 163 * minimum number: many DMA engines need a minimum of 2 buffers in the
163 * queue and you need to have another available for userspace processing. 164 * queue and you need to have another available for userspace processing.
164 */ 165 */
165static int queue_setup(struct vb2_queue *vq, const struct v4l2_format *fmt, 166static int queue_setup(struct vb2_queue *vq, const void *parg,
166 unsigned int *nbuffers, unsigned int *nplanes, 167 unsigned int *nbuffers, unsigned int *nplanes,
167 unsigned int sizes[], void *alloc_ctxs[]) 168 unsigned int sizes[], void *alloc_ctxs[])
168{ 169{
170 const struct v4l2_format *fmt = parg;
169 struct skeleton *skel = vb2_get_drv_priv(vq); 171 struct skeleton *skel = vb2_get_drv_priv(vq);
170 172
171 skel->field = skel->format.field; 173 skel->field = skel->format.field;
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index d9ecceea5a02..092ee9fbaf2b 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -401,10 +401,9 @@ Capability: basic
401Architectures: x86, ppc, mips 401Architectures: x86, ppc, mips
402Type: vcpu ioctl 402Type: vcpu ioctl
403Parameters: struct kvm_interrupt (in) 403Parameters: struct kvm_interrupt (in)
404Returns: 0 on success, -1 on error 404Returns: 0 on success, negative on failure.
405 405
406Queues a hardware interrupt vector to be injected. This is only 406Queues a hardware interrupt vector to be injected.
407useful if in-kernel local APIC or equivalent is not used.
408 407
409/* for KVM_INTERRUPT */ 408/* for KVM_INTERRUPT */
410struct kvm_interrupt { 409struct kvm_interrupt {
@@ -414,7 +413,14 @@ struct kvm_interrupt {
414 413
415X86: 414X86:
416 415
417Note 'irq' is an interrupt vector, not an interrupt pin or line. 416Returns: 0 on success,
417 -EEXIST if an interrupt is already enqueued
418 -EINVAL the the irq number is invalid
419 -ENXIO if the PIC is in the kernel
420 -EFAULT if the pointer is invalid
421
422Note 'irq' is an interrupt vector, not an interrupt pin or line. This
423ioctl is useful if the in-kernel PIC is not used.
418 424
419PPC: 425PPC:
420 426
@@ -1598,7 +1604,7 @@ provided event instead of triggering an exit.
1598struct kvm_ioeventfd { 1604struct kvm_ioeventfd {
1599 __u64 datamatch; 1605 __u64 datamatch;
1600 __u64 addr; /* legal pio/mmio address */ 1606 __u64 addr; /* legal pio/mmio address */
1601 __u32 len; /* 1, 2, 4, or 8 bytes */ 1607 __u32 len; /* 0, 1, 2, 4, or 8 bytes */
1602 __s32 fd; 1608 __s32 fd;
1603 __u32 flags; 1609 __u32 flags;
1604 __u8 pad[36]; 1610 __u8 pad[36];
@@ -1621,6 +1627,10 @@ to the registered address is equal to datamatch in struct kvm_ioeventfd.
1621For virtio-ccw devices, addr contains the subchannel id and datamatch the 1627For virtio-ccw devices, addr contains the subchannel id and datamatch the
1622virtqueue index. 1628virtqueue index.
1623 1629
1630With KVM_CAP_IOEVENTFD_ANY_LENGTH, a zero length ioeventfd is allowed, and
1631the kernel will ignore the length of guest write and may get a faster vmexit.
1632The speedup may only apply to specific architectures, but the ioeventfd will
1633work anyway.
1624 1634
16254.60 KVM_DIRTY_TLB 16354.60 KVM_DIRTY_TLB
1626 1636
@@ -1774,7 +1784,7 @@ has been called, this interface is completely emulated within the kernel.
1774To use this to emulate the LINT1 input with KVM_CREATE_IRQCHIP, use the 1784To use this to emulate the LINT1 input with KVM_CREATE_IRQCHIP, use the
1775following algorithm: 1785following algorithm:
1776 1786
1777 - pause the vpcu 1787 - pause the vcpu
1778 - read the local APIC's state (KVM_GET_LAPIC) 1788 - read the local APIC's state (KVM_GET_LAPIC)
1779 - check whether changing LINT1 will queue an NMI (see the LVT entry for LINT1) 1789 - check whether changing LINT1 will queue an NMI (see the LVT entry for LINT1)
1780 - if so, issue KVM_NMI 1790 - if so, issue KVM_NMI
@@ -2798,7 +2808,7 @@ Returns: = 0 on success,
2798 < 0 on generic error (e.g. -EFAULT or -ENOMEM), 2808 < 0 on generic error (e.g. -EFAULT or -ENOMEM),
2799 > 0 if an exception occurred while walking the page tables 2809 > 0 if an exception occurred while walking the page tables
2800 2810
2801Read or write data from/to the logical (virtual) memory of a VPCU. 2811Read or write data from/to the logical (virtual) memory of a VCPU.
2802 2812
2803Parameters are specified via the following structure: 2813Parameters are specified via the following structure:
2804 2814
@@ -3309,6 +3319,18 @@ Valid values for 'type' are:
3309 to ignore the request, or to gather VM memory core dump and/or 3319 to ignore the request, or to gather VM memory core dump and/or
3310 reset/shutdown of the VM. 3320 reset/shutdown of the VM.
3311 3321
3322 /* KVM_EXIT_IOAPIC_EOI */
3323 struct {
3324 __u8 vector;
3325 } eoi;
3326
3327Indicates that the VCPU's in-kernel local APIC received an EOI for a
3328level-triggered IOAPIC interrupt. This exit only triggers when the
3329IOAPIC is implemented in userspace (i.e. KVM_CAP_SPLIT_IRQCHIP is enabled);
3330the userspace IOAPIC should process the EOI and retrigger the interrupt if
3331it is still asserted. Vector is the LAPIC interrupt vector for which the
3332EOI was received.
3333
3312 /* Fix the size of the union. */ 3334 /* Fix the size of the union. */
3313 char padding[256]; 3335 char padding[256];
3314 }; 3336 };
@@ -3627,6 +3649,26 @@ struct {
3627 3649
3628KVM handlers should exit to userspace with rc = -EREMOTE. 3650KVM handlers should exit to userspace with rc = -EREMOTE.
3629 3651
36527.5 KVM_CAP_SPLIT_IRQCHIP
3653
3654Architectures: x86
3655Parameters: args[0] - number of routes reserved for userspace IOAPICs
3656Returns: 0 on success, -1 on error
3657
3658Create a local apic for each processor in the kernel. This can be used
3659instead of KVM_CREATE_IRQCHIP if the userspace VMM wishes to emulate the
3660IOAPIC and PIC (and also the PIT, even though this has to be enabled
3661separately).
3662
3663This capability also enables in kernel routing of interrupt requests;
3664when KVM_CAP_SPLIT_IRQCHIP only routes of KVM_IRQ_ROUTING_MSI type are
3665used in the IRQ routing table. The first args[0] MSI routes are reserved
3666for the IOAPIC pins. Whenever the LAPIC receives an EOI for these routes,
3667a KVM_EXIT_IOAPIC_EOI vmexit will be reported to userspace.
3668
3669Fails if VCPU has already been created, or if the irqchip is already in the
3670kernel (i.e. KVM_CREATE_IRQCHIP has already been called).
3671
3630 3672
36318. Other capabilities. 36738. Other capabilities.
3632---------------------- 3674----------------------
diff --git a/Documentation/virtual/kvm/arm/vgic-mapped-irqs.txt b/Documentation/virtual/kvm/arm/vgic-mapped-irqs.txt
new file mode 100644
index 000000000000..38bca2835278
--- /dev/null
+++ b/Documentation/virtual/kvm/arm/vgic-mapped-irqs.txt
@@ -0,0 +1,187 @@
1KVM/ARM VGIC Forwarded Physical Interrupts
2==========================================
3
4The KVM/ARM code implements software support for the ARM Generic
5Interrupt Controller's (GIC's) hardware support for virtualization by
6allowing software to inject virtual interrupts to a VM, which the guest
7OS sees as regular interrupts. The code is famously known as the VGIC.
8
9Some of these virtual interrupts, however, correspond to physical
10interrupts from real physical devices. One example could be the
11architected timer, which itself supports virtualization, and therefore
12lets a guest OS program the hardware device directly to raise an
13interrupt at some point in time. When such an interrupt is raised, the
14host OS initially handles the interrupt and must somehow signal this
15event as a virtual interrupt to the guest. Another example could be a
16passthrough device, where the physical interrupts are initially handled
17by the host, but the device driver for the device lives in the guest OS
18and KVM must therefore somehow inject a virtual interrupt on behalf of
19the physical one to the guest OS.
20
21These virtual interrupts corresponding to a physical interrupt on the
22host are called forwarded physical interrupts, but are also sometimes
23referred to as 'virtualized physical interrupts' and 'mapped interrupts'.
24
25Forwarded physical interrupts are handled slightly differently compared
26to virtual interrupts generated purely by a software emulated device.
27
28
29The HW bit
30----------
31Virtual interrupts are signalled to the guest by programming the List
32Registers (LRs) on the GIC before running a VCPU. The LR is programmed
33with the virtual IRQ number and the state of the interrupt (Pending,
34Active, or Pending+Active). When the guest ACKs and EOIs a virtual
35interrupt, the LR state moves from Pending to Active, and finally to
36inactive.
37
38The LRs include an extra bit, called the HW bit. When this bit is set,
39KVM must also program an additional field in the LR, the physical IRQ
40number, to link the virtual with the physical IRQ.
41
42When the HW bit is set, KVM must EITHER set the Pending OR the Active
43bit, never both at the same time.
44
45Setting the HW bit causes the hardware to deactivate the physical
46interrupt on the physical distributor when the guest deactivates the
47corresponding virtual interrupt.
48
49
50Forwarded Physical Interrupts Life Cycle
51----------------------------------------
52
53The state of forwarded physical interrupts is managed in the following way:
54
55 - The physical interrupt is acked by the host, and becomes active on
56 the physical distributor (*).
57 - KVM sets the LR.Pending bit, because this is the only way the GICV
58 interface is going to present it to the guest.
59 - LR.Pending will stay set as long as the guest has not acked the interrupt.
60 - LR.Pending transitions to LR.Active on the guest read of the IAR, as
61 expected.
62 - On guest EOI, the *physical distributor* active bit gets cleared,
63 but the LR.Active is left untouched (set).
64 - KVM clears the LR on VM exits when the physical distributor
65 active state has been cleared.
66
67(*): The host handling is slightly more complicated. For some forwarded
68interrupts (shared), KVM directly sets the active state on the physical
69distributor before entering the guest, because the interrupt is never actually
70handled on the host (see details on the timer as an example below). For other
71forwarded interrupts (non-shared) the host does not deactivate the interrupt
72when the host ISR completes, but leaves the interrupt active until the guest
73deactivates it. Leaving the interrupt active is allowed, because Linux
74configures the physical GIC with EOIMode=1, which causes EOI operations to
75perform a priority drop allowing the GIC to receive other interrupts of the
76default priority.
77
78
79Forwarded Edge and Level Triggered PPIs and SPIs
80------------------------------------------------
81Forwarded physical interrupts injected should always be active on the
82physical distributor when injected to a guest.
83
84Level-triggered interrupts will keep the interrupt line to the GIC
85asserted, typically until the guest programs the device to deassert the
86line. This means that the interrupt will remain pending on the physical
87distributor until the guest has reprogrammed the device. Since we
88always run the VM with interrupts enabled on the CPU, a pending
89interrupt will exit the guest as soon as we switch into the guest,
90preventing the guest from ever making progress as the process repeats
91over and over. Therefore, the active state on the physical distributor
92must be set when entering the guest, preventing the GIC from forwarding
93the pending interrupt to the CPU. As soon as the guest deactivates the
94interrupt, the physical line is sampled by the hardware again and the host
95takes a new interrupt if and only if the physical line is still asserted.
96
97Edge-triggered interrupts do not exhibit the same problem with
98preventing guest execution that level-triggered interrupts do. One
99option is to not use HW bit at all, and inject edge-triggered interrupts
100from a physical device as pure virtual interrupts. But that would
101potentially slow down handling of the interrupt in the guest, because a
102physical interrupt occurring in the middle of the guest ISR would
103preempt the guest for the host to handle the interrupt. Additionally,
104if you configure the system to handle interrupts on a separate physical
105core from that running your VCPU, you still have to interrupt the VCPU
106to queue the pending state onto the LR, even though the guest won't use
107this information until the guest ISR completes. Therefore, the HW
108bit should always be set for forwarded edge-triggered interrupts. With
109the HW bit set, the virtual interrupt is injected and additional
110physical interrupts occurring before the guest deactivates the interrupt
111simply mark the state on the physical distributor as Pending+Active. As
112soon as the guest deactivates the interrupt, the host takes another
113interrupt if and only if there was a physical interrupt between injecting
114the forwarded interrupt to the guest and the guest deactivating the
115interrupt.
116
117Consequently, whenever we schedule a VCPU with one or more LRs with the
118HW bit set, the interrupt must also be active on the physical
119distributor.
120
121
122Forwarded LPIs
123--------------
124LPIs, introduced in GICv3, are always edge-triggered and do not have an
125active state. They become pending when a device signal them, and as
126soon as they are acked by the CPU, they are inactive again.
127
128It therefore doesn't make sense, and is not supported, to set the HW bit
129for physical LPIs that are forwarded to a VM as virtual interrupts,
130typically virtual SPIs.
131
132For LPIs, there is no other choice than to preempt the VCPU thread if
133necessary, and queue the pending state onto the LR.
134
135
136Putting It Together: The Architected Timer
137------------------------------------------
138The architected timer is a device that signals interrupts with level
139triggered semantics. The timer hardware is directly accessed by VCPUs
140which program the timer to fire at some point in time. Each VCPU on a
141system programs the timer to fire at different times, and therefore the
142hardware is multiplexed between multiple VCPUs. This is implemented by
143context-switching the timer state along with each VCPU thread.
144
145However, this means that a scenario like the following is entirely
146possible, and in fact, typical:
147
1481. KVM runs the VCPU
1492. The guest programs the time to fire in T+100
1503. The guest is idle and calls WFI (wait-for-interrupts)
1514. The hardware traps to the host
1525. KVM stores the timer state to memory and disables the hardware timer
1536. KVM schedules a soft timer to fire in T+(100 - time since step 2)
1547. KVM puts the VCPU thread to sleep (on a waitqueue)
1558. The soft timer fires, waking up the VCPU thread
1569. KVM reprograms the timer hardware with the VCPU's values
15710. KVM marks the timer interrupt as active on the physical distributor
15811. KVM injects a forwarded physical interrupt to the guest
15912. KVM runs the VCPU
160
161Notice that KVM injects a forwarded physical interrupt in step 11 without
162the corresponding interrupt having actually fired on the host. That is
163exactly why we mark the timer interrupt as active in step 10, because
164the active state on the physical distributor is part of the state
165belonging to the timer hardware, which is context-switched along with
166the VCPU thread.
167
168If the guest does not idle because it is busy, the flow looks like this
169instead:
170
1711. KVM runs the VCPU
1722. The guest programs the time to fire in T+100
1734. At T+100 the timer fires and a physical IRQ causes the VM to exit
174 (note that this initially only traps to EL2 and does not run the host ISR
175 until KVM has returned to the host).
1765. With interrupts still disabled on the CPU coming back from the guest, KVM
177 stores the virtual timer state to memory and disables the virtual hw timer.
1786. KVM looks at the timer state (in memory) and injects a forwarded physical
179 interrupt because it concludes the timer has expired.
1807. KVM marks the timer interrupt as active on the physical distributor
1817. KVM enables the timer, enables interrupts, and runs the VCPU
182
183Notice that again the forwarded physical interrupt is injected to the
184guest without having actually been handled on the host. In this case it
185is because the physical interrupt is never actually seen by the host because the
186timer is disabled upon guest return, and the virtual forwarded interrupt is
187injected on the KVM guest entry path.
diff --git a/Documentation/virtual/kvm/devices/arm-vgic.txt b/Documentation/virtual/kvm/devices/arm-vgic.txt
index 3fb905429e8a..59541d49e15c 100644
--- a/Documentation/virtual/kvm/devices/arm-vgic.txt
+++ b/Documentation/virtual/kvm/devices/arm-vgic.txt
@@ -44,28 +44,29 @@ Groups:
44 Attributes: 44 Attributes:
45 The attr field of kvm_device_attr encodes two values: 45 The attr field of kvm_device_attr encodes two values:
46 bits: | 63 .... 40 | 39 .. 32 | 31 .... 0 | 46 bits: | 63 .... 40 | 39 .. 32 | 31 .... 0 |
47 values: | reserved | cpu id | offset | 47 values: | reserved | vcpu_index | offset |
48 48
49 All distributor regs are (rw, 32-bit) 49 All distributor regs are (rw, 32-bit)
50 50
51 The offset is relative to the "Distributor base address" as defined in the 51 The offset is relative to the "Distributor base address" as defined in the
52 GICv2 specs. Getting or setting such a register has the same effect as 52 GICv2 specs. Getting or setting such a register has the same effect as
53 reading or writing the register on the actual hardware from the cpu 53 reading or writing the register on the actual hardware from the cpu whose
54 specified with cpu id field. Note that most distributor fields are not 54 index is specified with the vcpu_index field. Note that most distributor
55 banked, but return the same value regardless of the cpu id used to access 55 fields are not banked, but return the same value regardless of the
56 the register. 56 vcpu_index used to access the register.
57 Limitations: 57 Limitations:
58 - Priorities are not implemented, and registers are RAZ/WI 58 - Priorities are not implemented, and registers are RAZ/WI
59 - Currently only implemented for KVM_DEV_TYPE_ARM_VGIC_V2. 59 - Currently only implemented for KVM_DEV_TYPE_ARM_VGIC_V2.
60 Errors: 60 Errors:
61 -ENODEV: Getting or setting this register is not yet supported 61 -ENXIO: Getting or setting this register is not yet supported
62 -EBUSY: One or more VCPUs are running 62 -EBUSY: One or more VCPUs are running
63 -EINVAL: Invalid vcpu_index supplied
63 64
64 KVM_DEV_ARM_VGIC_GRP_CPU_REGS 65 KVM_DEV_ARM_VGIC_GRP_CPU_REGS
65 Attributes: 66 Attributes:
66 The attr field of kvm_device_attr encodes two values: 67 The attr field of kvm_device_attr encodes two values:
67 bits: | 63 .... 40 | 39 .. 32 | 31 .... 0 | 68 bits: | 63 .... 40 | 39 .. 32 | 31 .... 0 |
68 values: | reserved | cpu id | offset | 69 values: | reserved | vcpu_index | offset |
69 70
70 All CPU interface regs are (rw, 32-bit) 71 All CPU interface regs are (rw, 32-bit)
71 72
@@ -91,8 +92,9 @@ Groups:
91 - Priorities are not implemented, and registers are RAZ/WI 92 - Priorities are not implemented, and registers are RAZ/WI
92 - Currently only implemented for KVM_DEV_TYPE_ARM_VGIC_V2. 93 - Currently only implemented for KVM_DEV_TYPE_ARM_VGIC_V2.
93 Errors: 94 Errors:
94 -ENODEV: Getting or setting this register is not yet supported 95 -ENXIO: Getting or setting this register is not yet supported
95 -EBUSY: One or more VCPUs are running 96 -EBUSY: One or more VCPUs are running
97 -EINVAL: Invalid vcpu_index supplied
96 98
97 KVM_DEV_ARM_VGIC_GRP_NR_IRQS 99 KVM_DEV_ARM_VGIC_GRP_NR_IRQS
98 Attributes: 100 Attributes:
diff --git a/Documentation/virtual/kvm/devices/vm.txt b/Documentation/virtual/kvm/devices/vm.txt
index 5542c4641a3c..2d09d1ed86d0 100644
--- a/Documentation/virtual/kvm/devices/vm.txt
+++ b/Documentation/virtual/kvm/devices/vm.txt
@@ -74,7 +74,7 @@ struct kvm_s390_vm_cpu_processor {
74 74
75KVM does not enforce or limit the cpu model data in any form. Take the information 75KVM does not enforce or limit the cpu model data in any form. Take the information
76retrieved by means of KVM_S390_VM_CPU_MACHINE as hint for reasonable configuration 76retrieved by means of KVM_S390_VM_CPU_MACHINE as hint for reasonable configuration
77setups. Instruction interceptions triggered by additionally set facilitiy bits that 77setups. Instruction interceptions triggered by additionally set facility bits that
78are not handled by KVM need to by imlemented in the VM driver code. 78are not handled by KVM need to by imlemented in the VM driver code.
79 79
80Parameters: address of buffer to store/set the processor related cpu 80Parameters: address of buffer to store/set the processor related cpu
diff --git a/Documentation/virtual/kvm/locking.txt b/Documentation/virtual/kvm/locking.txt
index d68af4dc3006..19f94a6b9bb0 100644
--- a/Documentation/virtual/kvm/locking.txt
+++ b/Documentation/virtual/kvm/locking.txt
@@ -166,3 +166,15 @@ Comment: The srcu read lock must be held while accessing memslots (e.g.
166 MMIO/PIO address->device structure mapping (kvm->buses). 166 MMIO/PIO address->device structure mapping (kvm->buses).
167 The srcu index can be stored in kvm_vcpu->srcu_idx per vcpu 167 The srcu index can be stored in kvm_vcpu->srcu_idx per vcpu
168 if it is needed by multiple functions. 168 if it is needed by multiple functions.
169
170Name: blocked_vcpu_on_cpu_lock
171Type: spinlock_t
172Arch: x86
173Protects: blocked_vcpu_on_cpu
174Comment: This is a per-CPU lock and it is used for VT-d posted-interrupts.
175 When VT-d posted-interrupts is supported and the VM has assigned
176 devices, we put the blocked vCPU on the list blocked_vcpu_on_cpu
177 protected by blocked_vcpu_on_cpu_lock, when VT-d hardware issues
178 wakeup notification event since external interrupts from the
179 assigned devices happens, we will find the vCPU on the list to
180 wakeup.
diff --git a/Documentation/virtual/kvm/ppc-pv.txt b/Documentation/virtual/kvm/ppc-pv.txt
index 319560646f32..e26115ce4258 100644
--- a/Documentation/virtual/kvm/ppc-pv.txt
+++ b/Documentation/virtual/kvm/ppc-pv.txt
@@ -110,7 +110,7 @@ Flags are passed to the host in the low 12 bits of the Effective Address.
110 110
111The following flags are currently available for a guest to expose: 111The following flags are currently available for a guest to expose:
112 112
113 MAGIC_PAGE_FLAG_NOT_MAPPED_NX Guest handles NX bits correclty wrt magic page 113 MAGIC_PAGE_FLAG_NOT_MAPPED_NX Guest handles NX bits correctly wrt magic page
114 114
115MSR bits 115MSR bits
116======== 116========
diff --git a/Documentation/vm/balance b/Documentation/vm/balance
index c46e68cf9344..964595481af6 100644
--- a/Documentation/vm/balance
+++ b/Documentation/vm/balance
@@ -1,12 +1,14 @@
1Started Jan 2000 by Kanoj Sarcar <kanoj@sgi.com> 1Started Jan 2000 by Kanoj Sarcar <kanoj@sgi.com>
2 2
3Memory balancing is needed for non __GFP_WAIT as well as for non 3Memory balancing is needed for !__GFP_ATOMIC and !__GFP_KSWAPD_RECLAIM as
4__GFP_IO allocations. 4well as for non __GFP_IO allocations.
5 5
6There are two reasons to be requesting non __GFP_WAIT allocations: 6The first reason why a caller may avoid reclaim is that the caller can not
7the caller can not sleep (typically intr context), or does not want 7sleep due to holding a spinlock or is in interrupt context. The second may
8to incur cost overheads of page stealing and possible swap io for 8be that the caller is willing to fail the allocation without incurring the
9whatever reasons. 9overhead of page reclaim. This may happen for opportunistic high-order
10allocation requests that have order-0 fallback options. In such cases,
11the caller may also wish to avoid waking kswapd.
10 12
11__GFP_IO allocation requests are made to prevent file system deadlocks. 13__GFP_IO allocation requests are made to prevent file system deadlocks.
12 14
diff --git a/Documentation/vm/page_migration b/Documentation/vm/page_migration
index 6513fe2d90b8..fea5c0864170 100644
--- a/Documentation/vm/page_migration
+++ b/Documentation/vm/page_migration
@@ -92,29 +92,26 @@ Steps:
92 92
932. Insure that writeback is complete. 932. Insure that writeback is complete.
94 94
953. Prep the new page that we want to move to. It is locked 953. Lock the new page that we want to move to. It is locked so that accesses to
96 and set to not being uptodate so that all accesses to the new 96 this (not yet uptodate) page immediately lock while the move is in progress.
97 page immediately lock while the move is in progress.
98 97
994. The new page is prepped with some settings from the old page so that 984. All the page table references to the page are converted to migration
100 accesses to the new page will discover a page with the correct settings. 99 entries. This decreases the mapcount of a page. If the resulting
101 100 mapcount is not zero then we do not migrate the page. All user space
1025. All the page table references to the page are converted 101 processes that attempt to access the page will now wait on the page lock.
103 to migration entries or dropped (nonlinear vmas).
104 This decrease the mapcount of a page. If the resulting
105 mapcount is not zero then we do not migrate the page.
106 All user space processes that attempt to access the page
107 will now wait on the page lock.
108 102
1096. The radix tree lock is taken. This will cause all processes trying 1035. The radix tree lock is taken. This will cause all processes trying
110 to access the page via the mapping to block on the radix tree spinlock. 104 to access the page via the mapping to block on the radix tree spinlock.
111 105
1127. The refcount of the page is examined and we back out if references remain 1066. The refcount of the page is examined and we back out if references remain
113 otherwise we know that we are the only one referencing this page. 107 otherwise we know that we are the only one referencing this page.
114 108
1158. The radix tree is checked and if it does not contain the pointer to this 1097. The radix tree is checked and if it does not contain the pointer to this
116 page then we back out because someone else modified the radix tree. 110 page then we back out because someone else modified the radix tree.
117 111
1128. The new page is prepped with some settings from the old page so that
113 accesses to the new page will discover a page with the correct settings.
114
1189. The radix tree is changed to point to the new page. 1159. The radix tree is changed to point to the new page.
119 116
12010. The reference count of the old page is dropped because the radix tree 11710. The reference count of the old page is dropped because the radix tree
diff --git a/Documentation/vm/slub.txt b/Documentation/vm/slub.txt
index b0c6d1bbb434..699d8ea5c230 100644
--- a/Documentation/vm/slub.txt
+++ b/Documentation/vm/slub.txt
@@ -280,4 +280,63 @@ of other objects.
280 280
281 slub_debug=FZ,dentry 281 slub_debug=FZ,dentry
282 282
283Extended slabinfo mode and plotting
284-----------------------------------
285
286The slabinfo tool has a special 'extended' ('-X') mode that includes:
287 - Slabcache Totals
288 - Slabs sorted by size (up to -N <num> slabs, default 1)
289 - Slabs sorted by loss (up to -N <num> slabs, default 1)
290
291Additionally, in this mode slabinfo does not dynamically scale sizes (G/M/K)
292and reports everything in bytes (this functionality is also available to
293other slabinfo modes via '-B' option) which makes reporting more precise and
294accurate. Moreover, in some sense the `-X' mode also simplifies the analysis
295of slabs' behaviour, because its output can be plotted using the
296slabinfo-gnuplot.sh script. So it pushes the analysis from looking through
297the numbers (tons of numbers) to something easier -- visual analysis.
298
299To generate plots:
300a) collect slabinfo extended records, for example:
301
302 while [ 1 ]; do slabinfo -X >> FOO_STATS; sleep 1; done
303
304b) pass stats file(-s) to slabinfo-gnuplot.sh script:
305 slabinfo-gnuplot.sh FOO_STATS [FOO_STATS2 .. FOO_STATSN]
306
307The slabinfo-gnuplot.sh script will pre-processes the collected records
308and generates 3 png files (and 3 pre-processing cache files) per STATS
309file:
310 - Slabcache Totals: FOO_STATS-totals.png
311 - Slabs sorted by size: FOO_STATS-slabs-by-size.png
312 - Slabs sorted by loss: FOO_STATS-slabs-by-loss.png
313
314Another use case, when slabinfo-gnuplot can be useful, is when you need
315to compare slabs' behaviour "prior to" and "after" some code modification.
316To help you out there, slabinfo-gnuplot.sh script can 'merge' the
317`Slabcache Totals` sections from different measurements. To visually
318compare N plots:
319
320a) Collect as many STATS1, STATS2, .. STATSN files as you need
321 while [ 1 ]; do slabinfo -X >> STATS<X>; sleep 1; done
322
323b) Pre-process those STATS files
324 slabinfo-gnuplot.sh STATS1 STATS2 .. STATSN
325
326c) Execute slabinfo-gnuplot.sh in '-t' mode, passing all of the
327generated pre-processed *-totals
328 slabinfo-gnuplot.sh -t STATS1-totals STATS2-totals .. STATSN-totals
329
330This will produce a single plot (png file).
331
332Plots, expectedly, can be large so some fluctuations or small spikes
333can go unnoticed. To deal with that, `slabinfo-gnuplot.sh' has two
334options to 'zoom-in'/'zoom-out':
335 a) -s %d,%d overwrites the default image width and heigh
336 b) -r %d,%d specifies a range of samples to use (for example,
337 in `slabinfo -X >> FOO_STATS; sleep 1;' case, using
338 a "-r 40,60" range will plot only samples collected
339 between 40th and 60th seconds).
340
283Christoph Lameter, May 30, 2007 341Christoph Lameter, May 30, 2007
342Sergey Senozhatsky, October 23, 2015
diff --git a/Documentation/vm/split_page_table_lock b/Documentation/vm/split_page_table_lock
index 6dea4fd5c961..62842a857dab 100644
--- a/Documentation/vm/split_page_table_lock
+++ b/Documentation/vm/split_page_table_lock
@@ -54,8 +54,8 @@ everything required is done by pgtable_page_ctor() and pgtable_page_dtor(),
54which must be called on PTE table allocation / freeing. 54which must be called on PTE table allocation / freeing.
55 55
56Make sure the architecture doesn't use slab allocator for page table 56Make sure the architecture doesn't use slab allocator for page table
57allocation: slab uses page->slab_cache and page->first_page for its pages. 57allocation: slab uses page->slab_cache for its pages.
58These fields share storage with page->ptl. 58This field shares storage with page->ptl.
59 59
60PMD split lock only makes sense if you have more than two page table 60PMD split lock only makes sense if you have more than two page table
61levels. 61levels.
diff --git a/Documentation/vm/transhuge.txt b/Documentation/vm/transhuge.txt
index 8143b9e8373d..8a282687ee06 100644
--- a/Documentation/vm/transhuge.txt
+++ b/Documentation/vm/transhuge.txt
@@ -170,6 +170,16 @@ A lower value leads to gain less thp performance. Value of
170max_ptes_none can waste cpu time very little, you can 170max_ptes_none can waste cpu time very little, you can
171ignore it. 171ignore it.
172 172
173max_ptes_swap specifies how many pages can be brought in from
174swap when collapsing a group of pages into a transparent huge page.
175
176/sys/kernel/mm/transparent_hugepage/khugepaged/max_ptes_swap
177
178A higher value can cause excessive swap IO and waste
179memory. A lower value can prevent THPs from being
180collapsed, resulting fewer pages being collapsed into
181THPs, and lower memory access performance.
182
173== Boot parameter == 183== Boot parameter ==
174 184
175You can change the sysfs boot time defaults of Transparent Hugepage 185You can change the sysfs boot time defaults of Transparent Hugepage
diff --git a/Documentation/vm/unevictable-lru.txt b/Documentation/vm/unevictable-lru.txt
index 32ee3a67dba2..fa3b527086fa 100644
--- a/Documentation/vm/unevictable-lru.txt
+++ b/Documentation/vm/unevictable-lru.txt
@@ -531,83 +531,20 @@ map.
531 531
532try_to_unmap() is always called, by either vmscan for reclaim or for page 532try_to_unmap() is always called, by either vmscan for reclaim or for page
533migration, with the argument page locked and isolated from the LRU. Separate 533migration, with the argument page locked and isolated from the LRU. Separate
534functions handle anonymous and mapped file pages, as these types of pages have 534functions handle anonymous and mapped file and KSM pages, as these types of
535different reverse map mechanisms. 535pages have different reverse map lookup mechanisms, with different locking.
536 536In each case, whether rmap_walk_anon() or rmap_walk_file() or rmap_walk_ksm(),
537 (*) try_to_unmap_anon() 537it will call try_to_unmap_one() for every VMA which might contain the page.
538 538
539 To unmap anonymous pages, each VMA in the list anchored in the anon_vma 539When trying to reclaim, if try_to_unmap_one() finds the page in a VM_LOCKED
540 must be visited - at least until a VM_LOCKED VMA is encountered. If the 540VMA, it will then mlock the page via mlock_vma_page() instead of unmapping it,
541 page is being unmapped for migration, VM_LOCKED VMAs do not stop the 541and return SWAP_MLOCK to indicate that the page is unevictable: and the scan
542 process because mlocked pages are migratable. However, for reclaim, if 542stops there.
543 the page is mapped into a VM_LOCKED VMA, the scan stops. 543
544 544mlock_vma_page() is called while holding the page table's lock (in addition
545 try_to_unmap_anon() attempts to acquire in read mode the mmap semaphore of 545to the page lock, and the rmap lock): to serialize against concurrent mlock or
546 the mm_struct to which the VMA belongs. If this is successful, it will 546munlock or munmap system calls, mm teardown (munlock_vma_pages_all), reclaim,
547 mlock the page via mlock_vma_page() - we wouldn't have gotten to 547holepunching, and truncation of file pages and their anonymous COWed pages.
548 try_to_unmap_anon() if the page were already mlocked - and will return
549 SWAP_MLOCK, indicating that the page is unevictable.
550
551 If the mmap semaphore cannot be acquired, we are not sure whether the page
552 is really unevictable or not. In this case, try_to_unmap_anon() will
553 return SWAP_AGAIN.
554
555 (*) try_to_unmap_file() - linear mappings
556
557 Unmapping of a mapped file page works the same as for anonymous mappings,
558 except that the scan visits all VMAs that map the page's index/page offset
559 in the page's mapping's reverse map priority search tree. It also visits
560 each VMA in the page's mapping's non-linear list, if the list is
561 non-empty.
562
563 As for anonymous pages, on encountering a VM_LOCKED VMA for a mapped file
564 page, try_to_unmap_file() will attempt to acquire the associated
565 mm_struct's mmap semaphore to mlock the page, returning SWAP_MLOCK if this
566 is successful, and SWAP_AGAIN, if not.
567
568 (*) try_to_unmap_file() - non-linear mappings
569
570 If a page's mapping contains a non-empty non-linear mapping VMA list, then
571 try_to_un{map|lock}() must also visit each VMA in that list to determine
572 whether the page is mapped in a VM_LOCKED VMA. Again, the scan must visit
573 all VMAs in the non-linear list to ensure that the pages is not/should not
574 be mlocked.
575
576 If a VM_LOCKED VMA is found in the list, the scan could terminate.
577 However, there is no easy way to determine whether the page is actually
578 mapped in a given VMA - either for unmapping or testing whether the
579 VM_LOCKED VMA actually pins the page.
580
581 try_to_unmap_file() handles non-linear mappings by scanning a certain
582 number of pages - a "cluster" - in each non-linear VMA associated with the
583 page's mapping, for each file mapped page that vmscan tries to unmap. If
584 this happens to unmap the page we're trying to unmap, try_to_unmap() will
585 notice this on return (page_mapcount(page) will be 0) and return
586 SWAP_SUCCESS. Otherwise, it will return SWAP_AGAIN, causing vmscan to
587 recirculate this page. We take advantage of the cluster scan in
588 try_to_unmap_cluster() as follows:
589
590 For each non-linear VMA, try_to_unmap_cluster() attempts to acquire the
591 mmap semaphore of the associated mm_struct for read without blocking.
592
593 If this attempt is successful and the VMA is VM_LOCKED,
594 try_to_unmap_cluster() will retain the mmap semaphore for the scan;
595 otherwise it drops it here.
596
597 Then, for each page in the cluster, if we're holding the mmap semaphore
598 for a locked VMA, try_to_unmap_cluster() calls mlock_vma_page() to
599 mlock the page. This call is a no-op if the page is already locked,
600 but will mlock any pages in the non-linear mapping that happen to be
601 unlocked.
602
603 If one of the pages so mlocked is the page passed in to try_to_unmap(),
604 try_to_unmap_cluster() will return SWAP_MLOCK, rather than the default
605 SWAP_AGAIN. This will allow vmscan to cull the page, rather than
606 recirculating it on the inactive list.
607
608 Again, if try_to_unmap_cluster() cannot acquire the VMA's mmap sem, it
609 returns SWAP_AGAIN, indicating that the page is mapped by a VM_LOCKED
610 VMA, but couldn't be mlocked.
611 548
612 549
613try_to_munlock() REVERSE MAP SCAN 550try_to_munlock() REVERSE MAP SCAN
@@ -623,29 +560,15 @@ all PTEs from the page. For this purpose, the unevictable/mlock infrastructure
623introduced a variant of try_to_unmap() called try_to_munlock(). 560introduced a variant of try_to_unmap() called try_to_munlock().
624 561
625try_to_munlock() calls the same functions as try_to_unmap() for anonymous and 562try_to_munlock() calls the same functions as try_to_unmap() for anonymous and
626mapped file pages with an additional argument specifying unlock versus unmap 563mapped file and KSM pages with a flag argument specifying unlock versus unmap
627processing. Again, these functions walk the respective reverse maps looking 564processing. Again, these functions walk the respective reverse maps looking
628for VM_LOCKED VMAs. When such a VMA is found for anonymous pages and file 565for VM_LOCKED VMAs. When such a VMA is found, as in the try_to_unmap() case,
629pages mapped in linear VMAs, as in the try_to_unmap() case, the functions 566the functions mlock the page via mlock_vma_page() and return SWAP_MLOCK. This
630attempt to acquire the associated mmap semaphore, mlock the page via 567undoes the pre-clearing of the page's PG_mlocked done by munlock_vma_page.
631mlock_vma_page() and return SWAP_MLOCK. This effectively undoes the
632pre-clearing of the page's PG_mlocked done by munlock_vma_page.
633
634If try_to_unmap() is unable to acquire a VM_LOCKED VMA's associated mmap
635semaphore, it will return SWAP_AGAIN. This will allow shrink_page_list() to
636recycle the page on the inactive list and hope that it has better luck with the
637page next time.
638
639For file pages mapped into non-linear VMAs, the try_to_munlock() logic works
640slightly differently. On encountering a VM_LOCKED non-linear VMA that might
641map the page, try_to_munlock() returns SWAP_AGAIN without actually mlocking the
642page. munlock_vma_page() will just leave the page unlocked and let vmscan deal
643with it - the usual fallback position.
644 568
645Note that try_to_munlock()'s reverse map walk must visit every VMA in a page's 569Note that try_to_munlock()'s reverse map walk must visit every VMA in a page's
646reverse map to determine that a page is NOT mapped into any VM_LOCKED VMA. 570reverse map to determine that a page is NOT mapped into any VM_LOCKED VMA.
647However, the scan can terminate when it encounters a VM_LOCKED VMA and can 571However, the scan can terminate when it encounters a VM_LOCKED VMA.
648successfully acquire the VMA's mmap semaphore for read and mlock the page.
649Although try_to_munlock() might be called a great many times when munlocking a 572Although try_to_munlock() might be called a great many times when munlocking a
650large region or tearing down a large address space that has been mlocked via 573large region or tearing down a large address space that has been mlocked via
651mlockall(), overall this is a fairly rare event. 574mlockall(), overall this is a fairly rare event.
@@ -673,11 +596,6 @@ Some examples of these unevictable pages on the LRU lists are:
673 (3) mlocked pages that could not be isolated from the LRU and moved to the 596 (3) mlocked pages that could not be isolated from the LRU and moved to the
674 unevictable list in mlock_vma_page(). 597 unevictable list in mlock_vma_page().
675 598
676 (4) Pages mapped into multiple VM_LOCKED VMAs, but try_to_munlock() couldn't
677 acquire the VMA's mmap semaphore to test the flags and set PageMlocked.
678 munlock_vma_page() was forced to let the page back on to the normal LRU
679 list for vmscan to handle.
680
681shrink_inactive_list() also diverts any unevictable pages that it finds on the 599shrink_inactive_list() also diverts any unevictable pages that it finds on the
682inactive lists to the appropriate zone's unevictable list. 600inactive lists to the appropriate zone's unevictable list.
683 601
diff --git a/Documentation/w1/masters/omap-hdq b/Documentation/w1/masters/omap-hdq
index 884dc284b215..234522709a5f 100644
--- a/Documentation/w1/masters/omap-hdq
+++ b/Documentation/w1/masters/omap-hdq
@@ -44,3 +44,9 @@ e.g:
44insmod omap_hdq.ko W1_ID=2 44insmod omap_hdq.ko W1_ID=2
45inamod w1_bq27000.ko F_ID=2 45inamod w1_bq27000.ko F_ID=2
46 46
47The driver also supports 1-wire mode. In this mode, there is no need to
48pass slave ID as parameter. The driver will auto-detect slaves connected
49to the bus using SEARCH_ROM procedure. 1-wire mode can be selected by
50setting "ti,mode" property to "1w" in DT (see
51Documentation/devicetree/bindings/w1/omap-hdq.txt for more details).
52By default driver is in HDQ mode.
diff --git a/Documentation/zh_CN/filesystems/sysfs.txt b/Documentation/zh_CN/filesystems/sysfs.txt
index e230eaa33122..7d3b05edb8ce 100644
--- a/Documentation/zh_CN/filesystems/sysfs.txt
+++ b/Documentation/zh_CN/filesystems/sysfs.txt
@@ -61,7 +61,7 @@ Documentation/kobject.txt 文档以获得更多关于 kobject 接口的
61内核的对象层次到用户空间。sysfs 中的顶层目录代表着内核对象层次的 61内核的对象层次到用户空间。sysfs 中的顶层目录代表着内核对象层次的
62共同祖先;例如:某些对象属于某个子系统。 62共同祖先;例如:某些对象属于某个子系统。
63 63
64Sysfs 在与其目录关联的 sysfs_dirent 对象中内部保存一个指向实现 64Sysfs 在与其目录关联的 kernfs_node 对象中内部保存一个指向实现
65目录的 kobject 的指针。以前,这个 kobject 指针被 sysfs 直接用于 65目录的 kobject 的指针。以前,这个 kobject 指针被 sysfs 直接用于
66kobject 文件打开和关闭的引用计数。而现在的 sysfs 实现中,kobject 66kobject 文件打开和关闭的引用计数。而现在的 sysfs 实现中,kobject
67引用计数只能通过 sysfs_schedule_callback() 函数直接修改。 67引用计数只能通过 sysfs_schedule_callback() 函数直接修改。