aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2013-03-17 22:40:50 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2013-03-17 22:40:50 -0400
commit688d794c4c3f8b08c814381ee2edd3ede5856056 (patch)
treeef680add71e2a9588d07d8b594edbc1b5cd127d7 /Documentation
parent16142655269aaf580488e074eabfdcf0fb4e3687 (diff)
parenta937536b868b8369b98967929045f1df54234323 (diff)
Merge tag 'v3.9-rc3' into next
Merge with mainline to bring in module_platform_driver_probe() and devm_ioremap_resource().
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/00-INDEX153
-rw-r--r--Documentation/ABI/README3
-rw-r--r--Documentation/ABI/obsolete/sysfs-driver-hid-roccat-koneplus38
-rw-r--r--Documentation/ABI/obsolete/sysfs-driver-hid-roccat-kovaplus66
-rw-r--r--Documentation/ABI/obsolete/sysfs-driver-hid-roccat-pyra73
-rw-r--r--Documentation/ABI/stable/sysfs-class-tpm185
-rw-r--r--Documentation/ABI/stable/sysfs-devices-node96
-rw-r--r--Documentation/ABI/stable/sysfs-driver-ib_srp156
-rw-r--r--Documentation/ABI/stable/sysfs-transport-srp19
-rw-r--r--Documentation/ABI/testing/dev-kmsg2
-rw-r--r--Documentation/ABI/testing/ima_policy11
-rw-r--r--Documentation/ABI/testing/pstore10
-rw-r--r--Documentation/ABI/testing/sysfs-bus-event_source-devices-events62
-rw-r--r--Documentation/ABI/testing/sysfs-bus-fcoe45
-rw-r--r--Documentation/ABI/testing/sysfs-bus-iio24
-rw-r--r--Documentation/ABI/testing/sysfs-bus-iio-mpu605013
-rw-r--r--Documentation/ABI/testing/sysfs-bus-mdio9
-rw-r--r--Documentation/ABI/testing/sysfs-bus-pci34
-rw-r--r--Documentation/ABI/testing/sysfs-bus-rbd4
-rw-r--r--Documentation/ABI/testing/sysfs-bus-usb9
-rw-r--r--Documentation/ABI/testing/sysfs-class-bdi5
-rw-r--r--Documentation/ABI/testing/sysfs-class-devfreq44
-rw-r--r--Documentation/ABI/testing/sysfs-class-net-batman-adv11
-rw-r--r--Documentation/ABI/testing/sysfs-class-net-grcan35
-rw-r--r--Documentation/ABI/testing/sysfs-class-net-mesh40
-rw-r--r--Documentation/ABI/testing/sysfs-devices-node7
-rw-r--r--Documentation/ABI/testing/sysfs-devices-power33
-rw-r--r--Documentation/ABI/testing/sysfs-devices-power_resources_D013
-rw-r--r--Documentation/ABI/testing/sysfs-devices-power_resources_D114
-rw-r--r--Documentation/ABI/testing/sysfs-devices-power_resources_D214
-rw-r--r--Documentation/ABI/testing/sysfs-devices-power_resources_D3hot14
-rw-r--r--Documentation/ABI/testing/sysfs-devices-power_state20
-rw-r--r--Documentation/ABI/testing/sysfs-devices-real_power_state23
-rw-r--r--Documentation/ABI/testing/sysfs-devices-resource_in_use12
-rw-r--r--Documentation/ABI/testing/sysfs-devices-sun14
-rw-r--r--Documentation/ABI/testing/sysfs-devices-system-cpu14
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid-roccat-isku8
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus48
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus69
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid-roccat-lua7
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra76
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid-roccat-savu3
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid-srws121
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid-thingm23
-rw-r--r--Documentation/ABI/testing/sysfs-driver-ppi2
-rw-r--r--Documentation/ABI/testing/sysfs-kernel-mm-ksm52
-rw-r--r--Documentation/ABI/testing/sysfs-platform-msi-laptop83
-rw-r--r--Documentation/ABI/testing/sysfs-platform-ts550047
-rw-r--r--Documentation/ABI/testing/sysfs-profiling6
-rw-r--r--Documentation/ABI/testing/sysfs-tty112
-rw-r--r--Documentation/CodingStyle10
-rw-r--r--Documentation/DMA-API-HOWTO.txt127
-rw-r--r--Documentation/DMA-API.txt12
-rw-r--r--Documentation/DMA-attributes.txt9
-rw-r--r--Documentation/DocBook/80211.tmpl4
-rw-r--r--Documentation/DocBook/drm.tmpl117
-rw-r--r--Documentation/DocBook/gadget.tmpl2
-rw-r--r--Documentation/DocBook/kernel-api.tmpl3
-rw-r--r--Documentation/DocBook/kernel-hacking.tmpl11
-rw-r--r--Documentation/DocBook/kgdb.tmpl6
-rw-r--r--Documentation/DocBook/media/dvb/dvbapi.xml2
-rw-r--r--Documentation/DocBook/media/dvb/dvbproperty.xml180
-rw-r--r--Documentation/DocBook/media/dvb/frontend.xml2
-rw-r--r--Documentation/DocBook/media/v4l/common.xml2
-rw-r--r--Documentation/DocBook/media/v4l/compat.xml23
-rw-r--r--Documentation/DocBook/media/v4l/controls.xml23
-rw-r--r--Documentation/DocBook/media/v4l/driver.xml6
-rw-r--r--Documentation/DocBook/media/v4l/io.xml243
-rw-r--r--Documentation/DocBook/media/v4l/pixfmt-nv12m.xml2
-rw-r--r--Documentation/DocBook/media/v4l/pixfmt-srggb10alaw8.xml34
-rw-r--r--Documentation/DocBook/media/v4l/pixfmt-uv8.xml62
-rw-r--r--Documentation/DocBook/media/v4l/pixfmt.xml2
-rw-r--r--Documentation/DocBook/media/v4l/subdev-formats.xml926
-rw-r--r--Documentation/DocBook/media/v4l/v4l2.xml13
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-create-bufs.xml16
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-dqevent.xml6
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-expbuf.xml208
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-g-ctrl.xml8
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml57
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-qbuf.xml17
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-querycap.xml2
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-reqbufs.xml47
-rw-r--r--Documentation/DocBook/media_api.tmpl1
-rw-r--r--Documentation/DocBook/uio-howto.tmpl58
-rw-r--r--Documentation/DocBook/writing-an-alsa-driver.tmpl143
-rw-r--r--Documentation/EDID/HOWTO.txt27
-rw-r--r--Documentation/HOWTO2
-rw-r--r--Documentation/IPMI.txt18
-rw-r--r--Documentation/IRQ-domain.txt34
-rw-r--r--Documentation/PCI/MSI-HOWTO.txt37
-rw-r--r--Documentation/PCI/pci-iov-howto.txt54
-rw-r--r--Documentation/PCI/pci.txt20
-rw-r--r--Documentation/RCU/RTFP.txt2
-rw-r--r--Documentation/RCU/checklist.txt17
-rw-r--r--Documentation/RCU/listRCU.txt2
-rw-r--r--Documentation/RCU/rcuref.txt61
-rw-r--r--Documentation/RCU/trace.txt396
-rw-r--r--Documentation/RCU/whatisRCU.txt17
-rw-r--r--Documentation/SubmittingPatches3
-rw-r--r--Documentation/accounting/getdelays.c1
-rw-r--r--Documentation/acpi/enumeration.txt227
-rw-r--r--Documentation/acpi/initrd_table_override.txt94
-rw-r--r--Documentation/acpi/scan_handlers.txt77
-rw-r--r--Documentation/aoe/aoe.txt4
-rw-r--r--Documentation/arm/OMAP/DSS10
-rw-r--r--Documentation/arm/sunxi/README19
-rw-r--r--Documentation/arm64/memory.txt16
-rw-r--r--Documentation/atomic_ops.txt2
-rw-r--r--Documentation/backlight/lp855x-driver.txt14
-rw-r--r--Documentation/block/cfq-iosched.txt58
-rw-r--r--Documentation/blockdev/nbd.txt38
-rw-r--r--Documentation/bus-devices/ti-gpmc.txt122
-rw-r--r--Documentation/cgroups/00-INDEX6
-rw-r--r--Documentation/cgroups/blkio-controller.txt37
-rw-r--r--Documentation/cgroups/cgroup_event_listener.c110
-rw-r--r--Documentation/cgroups/cgroups.txt61
-rw-r--r--Documentation/cgroups/cpusets.txt2
-rw-r--r--Documentation/cgroups/freezer-subsystem.txt63
-rw-r--r--Documentation/cgroups/memcg_test.txt3
-rw-r--r--Documentation/cgroups/memory.txt76
-rw-r--r--Documentation/cgroups/net_prio.txt2
-rw-r--r--Documentation/cgroups/resource_counter.txt7
-rw-r--r--Documentation/coccinelle.txt4
-rw-r--r--Documentation/cpu-freq/cpu-drivers.txt6
-rw-r--r--Documentation/cpu-freq/user-guide.txt8
-rw-r--r--Documentation/cpu-hotplug.txt24
-rw-r--r--Documentation/device-mapper/cache-policies.txt77
-rw-r--r--Documentation/device-mapper/cache.txt243
-rw-r--r--Documentation/device-mapper/dm-raid.txt45
-rw-r--r--Documentation/devices.txt3
-rw-r--r--Documentation/devicetree/bindings/arc/interrupts.txt24
-rw-r--r--Documentation/devicetree/bindings/arm/altera/socfpga-reset.txt11
-rw-r--r--Documentation/devicetree/bindings/arm/altera/socfpga-system.txt13
-rw-r--r--Documentation/devicetree/bindings/arm/arch_timer.txt7
-rw-r--r--Documentation/devicetree/bindings/arm/arm-boards4
-rw-r--r--Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt12
-rw-r--r--Documentation/devicetree/bindings/arm/armada-370-xp-pmsu.txt20
-rw-r--r--Documentation/devicetree/bindings/arm/armada-370-xp-timer.txt11
-rw-r--r--Documentation/devicetree/bindings/arm/armadeus.txt6
-rw-r--r--Documentation/devicetree/bindings/arm/atmel-aic.txt2
-rw-r--r--Documentation/devicetree/bindings/arm/atmel-at91.txt6
-rw-r--r--Documentation/devicetree/bindings/arm/bcm/bcm11351.txt9
-rw-r--r--Documentation/devicetree/bindings/arm/calxeda.txt13
-rw-r--r--Documentation/devicetree/bindings/arm/coherency-fabric.txt21
-rw-r--r--Documentation/devicetree/bindings/arm/cpus.txt77
-rw-r--r--Documentation/devicetree/bindings/arm/davinci.txt17
-rw-r--r--Documentation/devicetree/bindings/arm/davinci/nand.txt43
-rw-r--r--Documentation/devicetree/bindings/arm/exynos/power_domain.txt15
-rw-r--r--Documentation/devicetree/bindings/arm/fsl.txt12
-rw-r--r--Documentation/devicetree/bindings/arm/gic.txt4
-rw-r--r--Documentation/devicetree/bindings/arm/kirkwood.txt27
-rw-r--r--Documentation/devicetree/bindings/arm/l2cc.txt11
-rw-r--r--Documentation/devicetree/bindings/arm/omap/counter.txt15
-rw-r--r--Documentation/devicetree/bindings/arm/omap/omap.txt6
-rw-r--r--Documentation/devicetree/bindings/arm/omap/timer.txt31
-rw-r--r--Documentation/devicetree/bindings/arm/psci.txt55
-rw-r--r--Documentation/devicetree/bindings/arm/sirf.txt10
-rw-r--r--Documentation/devicetree/bindings/arm/spear/shirq.txt48
-rw-r--r--Documentation/devicetree/bindings/arm/ste-nomadik.txt27
-rw-r--r--Documentation/devicetree/bindings/arm/tegra.txt32
-rw-r--r--Documentation/devicetree/bindings/arm/vexpress-sysreg.txt50
-rw-r--r--Documentation/devicetree/bindings/arm/vexpress.txt98
-rw-r--r--Documentation/devicetree/bindings/arm/vt8500.txt8
-rw-r--r--Documentation/devicetree/bindings/ata/exynos-sata-phy.txt14
-rw-r--r--Documentation/devicetree/bindings/ata/exynos-sata.txt17
-rw-r--r--Documentation/devicetree/bindings/bus/omap-ocp2scp.txt18
-rw-r--r--Documentation/devicetree/bindings/bus/ti-gpmc.txt84
-rw-r--r--Documentation/devicetree/bindings/clock/imx23-clock.txt7
-rw-r--r--Documentation/devicetree/bindings/clock/imx25-clock.txt158
-rw-r--r--Documentation/devicetree/bindings/clock/imx28-clock.txt9
-rw-r--r--Documentation/devicetree/bindings/clock/imx31-clock.txt91
-rw-r--r--Documentation/devicetree/bindings/clock/imx5-clock.txt192
-rw-r--r--Documentation/devicetree/bindings/clock/imx6q-clock.txt15
-rw-r--r--Documentation/devicetree/bindings/clock/mvebu-core-clock.txt47
-rw-r--r--Documentation/devicetree/bindings/clock/mvebu-cpu-clock.txt21
-rw-r--r--Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt119
-rw-r--r--Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt205
-rw-r--r--Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt262
-rw-r--r--Documentation/devicetree/bindings/clock/prima2-clock.txt73
-rw-r--r--Documentation/devicetree/bindings/clock/zynq-7000.txt55
-rw-r--r--Documentation/devicetree/bindings/cpufreq/cpufreq-spear.txt42
-rw-r--r--Documentation/devicetree/bindings/crypto/fsl-sec4.txt7
-rw-r--r--Documentation/devicetree/bindings/dma/arm-pl330.txt21
-rw-r--r--Documentation/devicetree/bindings/dma/dma.txt81
-rw-r--r--Documentation/devicetree/bindings/dma/mv-xor.txt40
-rw-r--r--Documentation/devicetree/bindings/dma/snps-dma.txt50
-rw-r--r--Documentation/devicetree/bindings/drm/exynos/g2d.txt22
-rw-r--r--Documentation/devicetree/bindings/drm/exynos/hdmi.txt22
-rw-r--r--Documentation/devicetree/bindings/drm/exynos/hdmiddc.txt12
-rw-r--r--Documentation/devicetree/bindings/drm/exynos/hdmiphy.txt12
-rw-r--r--Documentation/devicetree/bindings/drm/exynos/mixer.txt15
-rw-r--r--Documentation/devicetree/bindings/drm/tilcdc/panel.txt59
-rw-r--r--Documentation/devicetree/bindings/drm/tilcdc/slave.txt18
-rw-r--r--Documentation/devicetree/bindings/drm/tilcdc/tfp410.txt21
-rw-r--r--Documentation/devicetree/bindings/drm/tilcdc/tilcdc.txt21
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-poweroff.txt36
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-stmpe.txt18
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio.txt36
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio_atmel.txt5
-rw-r--r--Documentation/devicetree/bindings/gpio/spear_spics.txt50
-rw-r--r--Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt191
-rw-r--r--Documentation/devicetree/bindings/hwmon/vexpress.txt23
-rw-r--r--Documentation/devicetree/bindings/i2c/brcm,bcm2835-i2c.txt20
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-at91.txt (renamed from Documentation/devicetree/bindings/i2c/atmel-i2c.txt)0
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-cbus-gpio.txt27
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-davinci.txt (renamed from Documentation/devicetree/bindings/i2c/davinci.txt)0
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-gpio.txt (renamed from Documentation/devicetree/bindings/i2c/gpio-i2c.txt)0
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-imx.txt (renamed from Documentation/devicetree/bindings/i2c/fsl-imx-i2c.txt)4
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-mpc.txt (renamed from Documentation/devicetree/bindings/i2c/fsl-i2c.txt)0
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-mux-gpio.txt81
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-mux.txt (renamed from Documentation/devicetree/bindings/i2c/mux.txt)0
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt18
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-nomadik.txt (renamed from Documentation/devicetree/bindings/i2c/nomadik.txt)0
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-ocores.txt2
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-octeon.txt (renamed from Documentation/devicetree/bindings/i2c/cavium-i2c.txt)0
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-omap.txt (renamed from Documentation/devicetree/bindings/i2c/omap-i2c.txt)0
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-pnx.txt (renamed from Documentation/devicetree/bindings/i2c/pnx.txt)0
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-pxa-pci-ce4100.txt (renamed from Documentation/devicetree/bindings/i2c/ce4100-i2c.txt)0
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-pxa.txt (renamed from Documentation/devicetree/bindings/i2c/mrvl-i2c.txt)18
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-s3c2410.txt (renamed from Documentation/devicetree/bindings/i2c/samsung-i2c.txt)22
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-sirf.txt (renamed from Documentation/devicetree/bindings/i2c/sirf-i2c.txt)0
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-versatile.txt (renamed from Documentation/devicetree/bindings/i2c/arm-versatile.txt)0
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-xiic.txt (renamed from Documentation/devicetree/bindings/i2c/xiic.txt)0
-rw-r--r--Documentation/devicetree/bindings/i2c/ina209.txt18
-rw-r--r--Documentation/devicetree/bindings/i2c/max6697.txt64
-rw-r--r--Documentation/devicetree/bindings/i2c/trivial-devices.txt2
-rw-r--r--Documentation/devicetree/bindings/input/lpc32xx-key.txt9
-rw-r--r--Documentation/devicetree/bindings/input/matrix-keymap.txt8
-rw-r--r--Documentation/devicetree/bindings/input/omap-keypad.txt13
-rw-r--r--Documentation/devicetree/bindings/input/tca8418_keypad.txt6
-rw-r--r--Documentation/devicetree/bindings/input/touchscreen/bu21013.txt28
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/allwinner,sunxi-ic.txt104
-rw-r--r--Documentation/devicetree/bindings/leds/common.txt23
-rw-r--r--Documentation/devicetree/bindings/leds/leds-gpio.txt (renamed from Documentation/devicetree/bindings/gpio/led.txt)14
-rw-r--r--Documentation/devicetree/bindings/leds/leds-ns2.txt26
-rw-r--r--Documentation/devicetree/bindings/leds/leds-pwm.txt48
-rw-r--r--Documentation/devicetree/bindings/leds/tca6507.txt33
-rw-r--r--Documentation/devicetree/bindings/media/gpio-ir-receiver.txt16
-rw-r--r--Documentation/devicetree/bindings/media/s5p-mfc.txt23
-rw-r--r--Documentation/devicetree/bindings/metag/meta-intc.txt82
-rw-r--r--Documentation/devicetree/bindings/mfd/ab8500.txt33
-rw-r--r--Documentation/devicetree/bindings/mfd/max8925.txt64
-rw-r--r--Documentation/devicetree/bindings/mfd/stmpe.txt28
-rwxr-xr-xDocumentation/devicetree/bindings/mfd/tps6507x.txt91
-rw-r--r--Documentation/devicetree/bindings/mips/cavium/dma-engine.txt2
-rw-r--r--Documentation/devicetree/bindings/mips/cpu_irq.txt47
-rw-r--r--Documentation/devicetree/bindings/misc/atmel-ssc.txt15
-rw-r--r--Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhci.txt18
-rw-r--r--Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt8
-rw-r--r--Documentation/devicetree/bindings/mmc/mmc.txt42
-rw-r--r--Documentation/devicetree/bindings/mmc/orion-sdio.txt17
-rw-r--r--Documentation/devicetree/bindings/mmc/samsung-sdhci.txt22
-rw-r--r--Documentation/devicetree/bindings/mmc/synopsis-dw-mshc.txt (renamed from Documentation/devicetree/bindings/mmc/synposis-dw-mshc.txt)12
-rw-r--r--Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt1
-rw-r--r--Documentation/devicetree/bindings/mmc/tmio_mmc.txt20
-rw-r--r--Documentation/devicetree/bindings/mmc/vt8500-sdmmc.txt23
-rw-r--r--Documentation/devicetree/bindings/mtd/denali-nand.txt23
-rw-r--r--Documentation/devicetree/bindings/mtd/elm.txt16
-rw-r--r--Documentation/devicetree/bindings/mtd/flctl-nand.txt49
-rw-r--r--Documentation/devicetree/bindings/mtd/fsmc-nand.txt14
-rw-r--r--Documentation/devicetree/bindings/mtd/gpmc-nand.txt80
-rw-r--r--Documentation/devicetree/bindings/mtd/gpmc-onenand.txt43
-rw-r--r--Documentation/devicetree/bindings/mtd/m25p80.txt29
-rw-r--r--Documentation/devicetree/bindings/mtd/mtd-physmap.txt6
-rw-r--r--Documentation/devicetree/bindings/net/can/grcan.txt28
-rw-r--r--Documentation/devicetree/bindings/net/cdns-emac.txt23
-rw-r--r--Documentation/devicetree/bindings/net/cpsw.txt50
-rw-r--r--Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt23
-rw-r--r--Documentation/devicetree/bindings/net/marvell-orion-mdio.txt35
-rw-r--r--Documentation/devicetree/bindings/net/mdio-gpio.txt9
-rw-r--r--Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt60
-rw-r--r--Documentation/devicetree/bindings/pinctrl/atmel,at91-pinctrl.txt142
-rw-r--r--Documentation/devicetree/bindings/pinctrl/marvell,kirkwood-pinctrl.txt39
-rw-r--r--Documentation/devicetree/bindings/pinctrl/nvidia,tegra114-pinmux.txt120
-rw-r--r--Documentation/devicetree/bindings/pinctrl/pinctrl-sirf.txt47
-rw-r--r--Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt127
-rw-r--r--Documentation/devicetree/bindings/pinctrl/ste,nomadik.txt140
-rw-r--r--Documentation/devicetree/bindings/power_supply/ab8500/btemp.txt16
-rw-r--r--Documentation/devicetree/bindings/power_supply/ab8500/chargalg.txt16
-rw-r--r--Documentation/devicetree/bindings/power_supply/ab8500/charger.txt25
-rw-r--r--Documentation/devicetree/bindings/power_supply/ab8500/fg.txt58
-rw-r--r--Documentation/devicetree/bindings/power_supply/max8925_batter.txt18
-rw-r--r--Documentation/devicetree/bindings/power_supply/qnap-poweroff.txt13
-rw-r--r--Documentation/devicetree/bindings/power_supply/restart-poweroff.txt8
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/guts.txt13
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/pamu.txt140
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/raideng.txt81
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/srio.txt4
-rw-r--r--Documentation/devicetree/bindings/pwm/atmel-tcb-pwm.txt18
-rw-r--r--Documentation/devicetree/bindings/pwm/pwm-tiecap.txt23
-rw-r--r--Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt23
-rw-r--r--Documentation/devicetree/bindings/pwm/pwm-tipwmss.txt31
-rw-r--r--Documentation/devicetree/bindings/pwm/pwm.txt17
-rw-r--r--Documentation/devicetree/bindings/pwm/spear-pwm.txt18
-rw-r--r--Documentation/devicetree/bindings/pwm/ti,twl-pwm.txt17
-rw-r--r--Documentation/devicetree/bindings/pwm/ti,twl-pwmled.txt17
-rw-r--r--Documentation/devicetree/bindings/pwm/vt8500-pwm.txt20
-rw-r--r--Documentation/devicetree/bindings/regulator/anatop-regulator.txt8
-rw-r--r--Documentation/devicetree/bindings/regulator/gpio-regulator.txt37
-rw-r--r--Documentation/devicetree/bindings/regulator/max8925-regulator.txt40
-rw-r--r--Documentation/devicetree/bindings/regulator/max8997-regulator.txt146
-rw-r--r--Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt152
-rw-r--r--Documentation/devicetree/bindings/regulator/tps51632-regulator.txt27
-rw-r--r--Documentation/devicetree/bindings/regulator/tps62360-regulator.txt4
-rw-r--r--Documentation/devicetree/bindings/regulator/tps65090.txt122
-rw-r--r--Documentation/devicetree/bindings/regulator/tps65217.txt4
-rw-r--r--Documentation/devicetree/bindings/regulator/vexpress.txt32
-rw-r--r--Documentation/devicetree/bindings/rtc/imxdi-rtc.txt17
-rw-r--r--Documentation/devicetree/bindings/rtc/nvidia,tegra20-rtc.txt19
-rw-r--r--Documentation/devicetree/bindings/rtc/orion-rtc.txt18
-rw-r--r--Documentation/devicetree/bindings/rtc/rtc-omap.txt17
-rw-r--r--Documentation/devicetree/bindings/rtc/s3c-rtc.txt2
-rw-r--r--Documentation/devicetree/bindings/serial/lantiq_asc.txt16
-rw-r--r--Documentation/devicetree/bindings/serial/nvidia,tegra20-hsuart.txt24
-rw-r--r--Documentation/devicetree/bindings/sound/ak4104.txt22
-rw-r--r--Documentation/devicetree/bindings/sound/ak4642.txt17
-rw-r--r--Documentation/devicetree/bindings/sound/atmel-at91sam9g20ek-wm8731-audio.txt26
-rw-r--r--Documentation/devicetree/bindings/sound/cs4271.txt14
-rw-r--r--Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm9712.txt51
-rw-r--r--Documentation/devicetree/bindings/sound/nvidia,tegra20-ac97.txt22
-rw-r--r--Documentation/devicetree/bindings/sound/omap-abe-twl6040.txt4
-rw-r--r--Documentation/devicetree/bindings/sound/omap-twl4030.txt46
-rw-r--r--Documentation/devicetree/bindings/sound/renesas,fsi.txt26
-rw-r--r--Documentation/devicetree/bindings/sound/samsung,smdk-wm8994.txt14
-rw-r--r--Documentation/devicetree/bindings/sound/samsung-i2s.txt63
-rw-r--r--Documentation/devicetree/bindings/sound/tlv320aic3x.txt6
-rw-r--r--Documentation/devicetree/bindings/sound/wm8962.txt16
-rw-r--r--Documentation/devicetree/bindings/spi/nvidia,tegra20-sflash.txt26
-rw-r--r--Documentation/devicetree/bindings/spi/nvidia,tegra20-slink.txt26
-rw-r--r--Documentation/devicetree/bindings/spi/omap-spi.txt4
-rw-r--r--Documentation/devicetree/bindings/spi/sh-msiof.txt12
-rw-r--r--Documentation/devicetree/bindings/spi/spi-bus.txt22
-rw-r--r--Documentation/devicetree/bindings/spi/spi_atmel.txt26
-rw-r--r--Documentation/devicetree/bindings/staging/iio/adc/mxs-lradc.txt6
-rw-r--r--Documentation/devicetree/bindings/thermal/db8500-thermal.txt44
-rw-r--r--Documentation/devicetree/bindings/thermal/dove-thermal.txt18
-rw-r--r--Documentation/devicetree/bindings/thermal/kirkwood-thermal.txt15
-rw-r--r--Documentation/devicetree/bindings/thermal/rcar-thermal.txt29
-rw-r--r--Documentation/devicetree/bindings/timer/allwinner,sunxi-timer.txt17
-rw-r--r--Documentation/devicetree/bindings/timer/marvell,armada-370-xp-timer.txt15
-rw-r--r--Documentation/devicetree/bindings/timer/nvidia,tegra20-timer.txt21
-rw-r--r--Documentation/devicetree/bindings/timer/nvidia,tegra30-timer.txt23
-rw-r--r--Documentation/devicetree/bindings/tty/serial/arc-uart.txt26
-rw-r--r--Documentation/devicetree/bindings/tty/serial/efm32-uart.txt6
-rw-r--r--Documentation/devicetree/bindings/tty/serial/fsl-mxs-auart.txt8
-rw-r--r--Documentation/devicetree/bindings/tty/serial/of-serial.txt8
-rw-r--r--Documentation/devicetree/bindings/usb/am33xx-usb.txt29
-rw-r--r--Documentation/devicetree/bindings/usb/dwc3.txt22
-rw-r--r--Documentation/devicetree/bindings/usb/ehci-orion.txt15
-rw-r--r--Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt3
-rw-r--r--Documentation/devicetree/bindings/usb/nvidia,tegra20-usb-phy.txt17
-rw-r--r--Documentation/devicetree/bindings/usb/omap-usb.txt34
-rw-r--r--Documentation/devicetree/bindings/usb/samsung-usbphy.txt55
-rw-r--r--Documentation/devicetree/bindings/usb/usb-phy.txt35
-rw-r--r--Documentation/devicetree/bindings/usb/usb3503.txt20
-rw-r--r--Documentation/devicetree/bindings/vendor-prefixes.txt11
-rw-r--r--Documentation/devicetree/bindings/video/backlight/max8925-backlight.txt10
-rw-r--r--Documentation/devicetree/bindings/video/display-timing.txt109
-rw-r--r--Documentation/devicetree/bindings/video/exynos_dp.txt80
-rw-r--r--Documentation/devicetree/bindings/video/ssd1307fb.txt24
-rw-r--r--Documentation/devicetree/bindings/w1/fsl-imx-owire.txt19
-rw-r--r--Documentation/devicetree/bindings/watchdog/atmel-at91rm9200-wdt.txt9
-rw-r--r--Documentation/devicetree/bindings/watchdog/atmel-wdt.txt19
-rw-r--r--Documentation/devicetree/bindings/watchdog/brcm,bcm2835-pm-wdog.txt13
-rw-r--r--Documentation/devicetree/bindings/watchdog/davinci-wdt.txt12
-rw-r--r--Documentation/devicetree/bindings/watchdog/marvel.txt5
-rw-r--r--Documentation/devicetree/bindings/watchdog/pnx4008-wdt.txt4
-rw-r--r--Documentation/devicetree/bindings/watchdog/qca-ar7130-wdt.txt13
-rw-r--r--Documentation/devicetree/bindings/watchdog/samsung-wdt.txt5
-rw-r--r--Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt13
-rw-r--r--Documentation/devicetree/bindings/watchdog/twl4030-wdt.txt10
-rw-r--r--Documentation/devicetree/booting-without-of.txt2
-rw-r--r--Documentation/devicetree/usage-model.txt2
-rw-r--r--Documentation/dma-buf-sharing.txt10
-rw-r--r--Documentation/dontdiff1
-rw-r--r--Documentation/driver-model/devres.txt7
-rwxr-xr-xDocumentation/dvb/get_dvb_firmware17
-rw-r--r--Documentation/dynamic-debug-howto.txt15
-rw-r--r--Documentation/fault-injection/notifier-error-inject.txt4
-rw-r--r--Documentation/filesystems/00-INDEX4
-rw-r--r--Documentation/filesystems/Locking8
-rw-r--r--Documentation/filesystems/caching/backend-api.txt38
-rw-r--r--Documentation/filesystems/caching/netfs-api.txt46
-rw-r--r--Documentation/filesystems/caching/object.txt23
-rw-r--r--Documentation/filesystems/caching/operations.txt2
-rw-r--r--Documentation/filesystems/efivarfs.txt16
-rw-r--r--Documentation/filesystems/ext4.txt9
-rw-r--r--Documentation/filesystems/f2fs.txt421
-rw-r--r--Documentation/filesystems/nfs/nfs41-server.txt20
-rw-r--r--Documentation/filesystems/porting6
-rw-r--r--Documentation/filesystems/proc.txt146
-rw-r--r--Documentation/filesystems/vfat.txt9
-rw-r--r--Documentation/filesystems/vfs.txt35
-rw-r--r--Documentation/filesystems/xfs.txt13
-rw-r--r--Documentation/firmware_class/README12
-rw-r--r--Documentation/gpio.txt42
-rw-r--r--[-rwxr-xr-x]Documentation/hid/hid-sensor.txt0
-rw-r--r--Documentation/hid/uhid.txt2
-rw-r--r--Documentation/hwmon/adm12752
-rw-r--r--Documentation/hwmon/ads782846
-rw-r--r--Documentation/hwmon/adt741011
-rw-r--r--Documentation/hwmon/coretemp11
-rw-r--r--Documentation/hwmon/da905547
-rw-r--r--Documentation/hwmon/ina20993
-rw-r--r--Documentation/hwmon/it8726
-rw-r--r--Documentation/hwmon/jc425
-rw-r--r--Documentation/hwmon/lineage-pem2
-rw-r--r--Documentation/hwmon/lm250662
-rw-r--r--Documentation/hwmon/lm7390
-rw-r--r--Documentation/hwmon/ltc29786
-rw-r--r--Documentation/hwmon/ltc42612
-rw-r--r--Documentation/hwmon/max160642
-rw-r--r--Documentation/hwmon/max160652
-rw-r--r--Documentation/hwmon/max3444018
-rw-r--r--Documentation/hwmon/max669758
-rw-r--r--Documentation/hwmon/max86882
-rw-r--r--Documentation/hwmon/pmbus4
-rw-r--r--Documentation/hwmon/smm6652
-rw-r--r--Documentation/hwmon/sysfs-interface8
-rw-r--r--Documentation/hwmon/ucd90002
-rw-r--r--Documentation/hwmon/ucd92002
-rw-r--r--Documentation/hwmon/vexpress34
-rw-r--r--Documentation/hwmon/zl610028
-rw-r--r--Documentation/i2c/busses/i2c-i8012
-rw-r--r--Documentation/i2c/busses/i2c-ismt36
-rw-r--r--Documentation/i2c/busses/i2c-sis6309
-rw-r--r--Documentation/i2c/instantiating-devices2
-rw-r--r--Documentation/i2c/smbus-protocol44
-rw-r--r--Documentation/i2c/writing-clients4
-rw-r--r--Documentation/input/alps.txt69
-rw-r--r--Documentation/input/event-codes.txt11
-rw-r--r--Documentation/intel_txt.txt2
-rw-r--r--Documentation/ioctl/ioctl-number.txt2
-rw-r--r--Documentation/kbuild/kconfig-language.txt23
-rw-r--r--Documentation/kbuild/kconfig.txt6
-rw-r--r--Documentation/kbuild/makefiles.txt38
-rw-r--r--Documentation/kbuild/modules.txt2
-rw-r--r--Documentation/kernel-doc-nano-HOWTO.txt13
-rw-r--r--Documentation/kernel-parameters.txt138
-rw-r--r--Documentation/kref.txt88
-rw-r--r--Documentation/laptops/thinkpad-acpi.txt2
-rw-r--r--Documentation/leds/00-INDEX2
-rw-r--r--Documentation/leds/leds-lp5521.txt63
-rw-r--r--Documentation/leds/leds-lp5523.txt27
-rw-r--r--Documentation/leds/leds-lp55xx.txt118
-rw-r--r--Documentation/lockstat.txt2
-rw-r--r--Documentation/magic-number.txt2
-rw-r--r--Documentation/media-framework.txt2
-rw-r--r--Documentation/memory-barriers.txt10
-rw-r--r--Documentation/memory-hotplug.txt24
-rw-r--r--Documentation/metag/00-INDEX4
-rw-r--r--Documentation/metag/kernel-ABI.txt256
-rw-r--r--Documentation/misc-devices/mei/mei-amt-version.c4
-rw-r--r--Documentation/mmc/mmc-dev-attrs.txt7
-rw-r--r--Documentation/namespaces/resource-control.txt14
-rw-r--r--Documentation/networking/00-INDEX6
-rw-r--r--Documentation/networking/DLINK.txt203
-rw-r--r--Documentation/networking/LICENSE.qlcnic2
-rw-r--r--Documentation/networking/batman-adv.txt3
-rw-r--r--Documentation/networking/cs89x0.txt79
-rw-r--r--Documentation/networking/depca.txt92
-rw-r--r--Documentation/networking/ewrk3.txt46
-rw-r--r--Documentation/networking/filter.txt11
-rw-r--r--Documentation/networking/ip-sysctl.txt83
-rw-r--r--Documentation/networking/multicast.txt63
-rw-r--r--Documentation/networking/netconsole.txt7
-rw-r--r--Documentation/networking/netdev-features.txt2
-rw-r--r--Documentation/networking/nf_conntrack-sysctl.txt176
-rw-r--r--Documentation/networking/operstates.txt4
-rw-r--r--Documentation/networking/packet_mmap.txt246
-rw-r--r--Documentation/networking/phy.txt11
-rw-r--r--Documentation/networking/stmmac.txt28
-rw-r--r--Documentation/networking/tuntap.txt77
-rw-r--r--Documentation/networking/vxlan.txt4
-rw-r--r--Documentation/nfc/nfc-hci.txt129
-rw-r--r--Documentation/nfc/nfc-pn544.txt84
-rw-r--r--Documentation/pinctrl.txt25
-rw-r--r--Documentation/power/freezing-of-tasks.txt5
-rw-r--r--Documentation/power/opp.txt25
-rw-r--r--Documentation/power/pm_qos_interface.txt2
-rw-r--r--Documentation/power/power_supply_class.txt3
-rw-r--r--Documentation/power/runtime_pm.txt13
-rw-r--r--Documentation/powerpc/cpu_features.txt10
-rw-r--r--Documentation/powerpc/ptrace.txt16
-rw-r--r--Documentation/powerpc/transactional_memory.txt175
-rw-r--r--Documentation/prctl/seccomp_filter.txt74
-rw-r--r--Documentation/printk-formats.txt16
-rw-r--r--Documentation/rpmsg.txt4
-rw-r--r--Documentation/scsi/ChangeLog.megaraid_sas9
-rw-r--r--Documentation/scsi/hptiop.txt69
-rw-r--r--Documentation/security/00-INDEX2
-rw-r--r--Documentation/security/keys.txt17
-rw-r--r--Documentation/serial/driver44
-rw-r--r--Documentation/sound/alsa/ALSA-Configuration.txt8
-rw-r--r--Documentation/sound/alsa/HD-Audio-Models.txt2
-rw-r--r--Documentation/sound/alsa/HD-Audio.txt126
-rw-r--r--Documentation/sound/alsa/compress_offload.txt46
-rw-r--r--Documentation/sparse.txt18
-rw-r--r--Documentation/spi/spi-summary4
-rw-r--r--Documentation/sysctl/kernel.txt32
-rw-r--r--Documentation/telephony/00-INDEX4
-rw-r--r--Documentation/telephony/ixj.txt394
-rw-r--r--Documentation/thermal/exynos_thermal_emulation53
-rw-r--r--Documentation/thermal/intel_powerclamp.txt307
-rw-r--r--Documentation/thermal/nouveau_thermal81
-rw-r--r--Documentation/thermal/sysfs-api.txt82
-rw-r--r--Documentation/trace/events-power.txt27
-rw-r--r--Documentation/trace/ftrace.txt83
-rw-r--r--Documentation/usb/error-codes.txt7
-rw-r--r--Documentation/usb/mass-storage.txt15
-rw-r--r--Documentation/video4linux/CARDLIST.au08282
-rw-r--r--Documentation/video4linux/CARDLIST.cx238852
-rw-r--r--Documentation/video4linux/CARDLIST.em28xx3
-rw-r--r--Documentation/video4linux/CARDLIST.saa71341
-rw-r--r--Documentation/video4linux/bttv/Cards2
-rw-r--r--Documentation/video4linux/bttv/Sound-FAQ2
-rw-r--r--Documentation/video4linux/et61x251.txt315
-rwxr-xr-x[-rw-r--r--]Documentation/video4linux/extract_xc3028.pl0
-rw-r--r--Documentation/video4linux/fimc.txt2
-rw-r--r--Documentation/video4linux/ibmcam.txt323
-rw-r--r--Documentation/video4linux/m5602.txt12
-rw-r--r--Documentation/video4linux/ov511.txt288
-rw-r--r--Documentation/video4linux/se401.txt54
-rw-r--r--Documentation/video4linux/si470x.txt7
-rw-r--r--Documentation/video4linux/soc-camera.txt146
-rw-r--r--Documentation/video4linux/stv680.txt53
-rw-r--r--Documentation/video4linux/v4l2-controls.txt22
-rw-r--r--Documentation/video4linux/v4l2-framework.txt6
-rw-r--r--Documentation/video4linux/w9968cf.txt458
-rw-r--r--Documentation/video4linux/zc0301.txt270
-rw-r--r--Documentation/virtual/kvm/api.txt381
-rw-r--r--Documentation/virtual/kvm/mmu.txt7
-rw-r--r--Documentation/vm/frontswap.txt2
-rw-r--r--Documentation/vm/ksm.txt15
-rw-r--r--Documentation/vm/transhuge.txt19
-rw-r--r--Documentation/w1/slaves/w1_therm13
-rw-r--r--Documentation/watchdog/watchdog-kernel-api.txt14
-rw-r--r--Documentation/x86/boot.txt73
-rw-r--r--Documentation/x86/early-microcode.txt43
-rw-r--r--Documentation/x86/x86_64/boot-options.txt4
-rw-r--r--Documentation/x86/zero-page.txt4
-rw-r--r--Documentation/xtensa/atomctl.txt44
-rw-r--r--Documentation/zh_CN/CodingStyle7
-rw-r--r--Documentation/zh_CN/arm/kernel_user_helpers.txt284
-rw-r--r--Documentation/zh_CN/arm64/memory.txt14
-rw-r--r--Documentation/zh_CN/magic-number.txt2
-rw-r--r--Documentation/zh_CN/video4linux/v4l2-framework.txt3
547 files changed, 17439 insertions, 5183 deletions
diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX
index ceb1ff735469..45b3df936d2f 100644
--- a/Documentation/00-INDEX
+++ b/Documentation/00-INDEX
@@ -2,7 +2,7 @@
2This is a brief list of all the files in ./linux/Documentation and what 2This is a brief list of all the files in ./linux/Documentation and what
3they contain. If you add a documentation file, please list it here in 3they contain. If you add a documentation file, please list it here in
4alphabetical order as well, or risk being hunted down like a rabid dog. 4alphabetical order as well, or risk being hunted down like a rabid dog.
5Please try and keep the descriptions small enough to fit on one line. 5Please keep the descriptions small enough to fit on one line.
6 Thanks -- Paul G. 6 Thanks -- Paul G.
7 7
8Following translations are available on the WWW: 8Following translations are available on the WWW:
@@ -20,24 +20,33 @@ BUG-HUNTING
20Changes 20Changes
21 - list of changes that break older software packages. 21 - list of changes that break older software packages.
22CodingStyle 22CodingStyle
23 - how the boss likes the C code in the kernel to look. 23 - how the maintainers expect the C code in the kernel to look.
24development-process/
25 - An extended tutorial on how to work with the kernel development
26 process.
27DMA-API.txt 24DMA-API.txt
28 - DMA API, pci_ API & extensions for non-consistent memory machines. 25 - DMA API, pci_ API & extensions for non-consistent memory machines.
26DMA-API-HOWTO.txt
27 - Dynamic DMA mapping Guide
29DMA-ISA-LPC.txt 28DMA-ISA-LPC.txt
30 - How to do DMA with ISA (and LPC) devices. 29 - How to do DMA with ISA (and LPC) devices.
30DMA-attributes.txt
31 - listing of the various possible attributes a DMA region can have
31DocBook/ 32DocBook/
32 - directory with DocBook templates etc. for kernel documentation. 33 - directory with DocBook templates etc. for kernel documentation.
34EDID/
35 - directory with info on customizing EDID for broken gfx/displays.
33HOWTO 36HOWTO
34 - the process and procedures of how to do Linux kernel development. 37 - the process and procedures of how to do Linux kernel development.
35IPMI.txt 38IPMI.txt
36 - info on Linux Intelligent Platform Management Interface (IPMI) Driver. 39 - info on Linux Intelligent Platform Management Interface (IPMI) Driver.
37IRQ-affinity.txt 40IRQ-affinity.txt
38 - how to select which CPU(s) handle which interrupt events on SMP. 41 - how to select which CPU(s) handle which interrupt events on SMP.
42IRQ-domain.txt
43 - info on inerrupt numbering and setting up IRQ domains.
39IRQ.txt 44IRQ.txt
40 - description of what an IRQ is. 45 - description of what an IRQ is.
46Intel-IOMMU.txt
47 - basic info on the Intel IOMMU virtualization support.
48Makefile
49 - some files in Documentation dir are actually sample code to build
41ManagementStyle 50ManagementStyle
42 - how to (attempt to) manage kernel hackers. 51 - how to (attempt to) manage kernel hackers.
43RCU/ 52RCU/
@@ -66,10 +75,16 @@ applying-patches.txt
66 - description of various trees and how to apply their patches. 75 - description of various trees and how to apply their patches.
67arm/ 76arm/
68 - directory with info about Linux on the ARM architecture. 77 - directory with info about Linux on the ARM architecture.
78arm64/
79 - directory with info about Linux on the 64 bit ARM architecture.
69atomic_ops.txt 80atomic_ops.txt
70 - semantics and behavior of atomic and bitmask operations. 81 - semantics and behavior of atomic and bitmask operations.
71auxdisplay/ 82auxdisplay/
72 - misc. LCD driver documentation (cfag12864b, ks0108). 83 - misc. LCD driver documentation (cfag12864b, ks0108).
84backlight/
85 - directory with info on controlling backlights in flat panel displays
86bad_memory.txt
87 - how to use kernel parameters to exclude bad RAM regions.
73basic_profiling.txt 88basic_profiling.txt
74 - basic instructions for those who wants to profile Linux kernel. 89 - basic instructions for those who wants to profile Linux kernel.
75binfmt_misc.txt 90binfmt_misc.txt
@@ -80,8 +95,14 @@ block/
80 - info on the Block I/O (BIO) layer. 95 - info on the Block I/O (BIO) layer.
81blockdev/ 96blockdev/
82 - info on block devices & drivers 97 - info on block devices & drivers
98braille-console.txt
99 - info on how to use serial devices for Braille support.
100bt8xxgpio.txt
101 - info on how to modify a bt8xx video card for GPIO usage.
83btmrvl.txt 102btmrvl.txt
84 - info on Marvell Bluetooth driver usage. 103 - info on Marvell Bluetooth driver usage.
104bus-devices/
105 - directory with info on TI GPMC (General Purpose Memory Controller)
85bus-virt-phys-mapping.txt 106bus-virt-phys-mapping.txt
86 - how to access I/O mapped memory from within device drivers. 107 - how to access I/O mapped memory from within device drivers.
87cachetlb.txt 108cachetlb.txt
@@ -90,6 +111,12 @@ cdrom/
90 - directory with information on the CD-ROM drivers that Linux has. 111 - directory with information on the CD-ROM drivers that Linux has.
91cgroups/ 112cgroups/
92 - cgroups features, including cpusets and memory controller. 113 - cgroups features, including cpusets and memory controller.
114circular-buffers.txt
115 - how to make use of the existing circular buffer infrastructure
116clk.txt
117 - info on the common clock framework
118coccinelle.txt
119 - info on how to get and use the Coccinelle code checking tool.
93connector/ 120connector/
94 - docs on the netlink based userspace<->kernel space communication mod. 121 - docs on the netlink based userspace<->kernel space communication mod.
95console/ 122console/
@@ -114,40 +141,66 @@ dcdbas.txt
114 - information on the Dell Systems Management Base Driver. 141 - information on the Dell Systems Management Base Driver.
115debugging-modules.txt 142debugging-modules.txt
116 - some notes on debugging modules after Linux 2.6.3. 143 - some notes on debugging modules after Linux 2.6.3.
144debugging-via-ohci1394.txt
145 - how to use firewire like a hardware debugger memory reader.
117dell_rbu.txt 146dell_rbu.txt
118 - document demonstrating the use of the Dell Remote BIOS Update driver. 147 - document demonstrating the use of the Dell Remote BIOS Update driver.
148development-process/
149 - how to work with the mainline kernel development process.
119device-mapper/ 150device-mapper/
120 - directory with info on Device Mapper. 151 - directory with info on Device Mapper.
121devices.txt 152devices.txt
122 - plain ASCII listing of all the nodes in /dev/ with major minor #'s. 153 - plain ASCII listing of all the nodes in /dev/ with major minor #'s.
154devicetree/
155 - directory with info on device tree files used by OF/PowerPC/ARM
156digsig.txt
157 -info on the Digital Signature Verification API
158dma-buf-sharing.txt
159 - the DMA Buffer Sharing API Guide
160dmaengine.txt
161 -the DMA Engine API Guide
123dontdiff 162dontdiff
124 - file containing a list of files that should never be diff'ed. 163 - file containing a list of files that should never be diff'ed.
125driver-model/ 164driver-model/
126 - directory with info about Linux driver model. 165 - directory with info about Linux driver model.
127dvb/ 166dvb/
128 - info on Linux Digital Video Broadcast (DVB) subsystem. 167 - info on Linux Digital Video Broadcast (DVB) subsystem.
168dynamic-debug-howto.txt
169 - how to use the dynamic debug (dyndbg) feature.
129early-userspace/ 170early-userspace/
130 - info about initramfs, klibc, and userspace early during boot. 171 - info about initramfs, klibc, and userspace early during boot.
131edac.txt 172edac.txt
132 - information on EDAC - Error Detection And Correction 173 - information on EDAC - Error Detection And Correction
133eisa.txt 174eisa.txt
134 - info on EISA bus support. 175 - info on EISA bus support.
176email-clients.txt
177 - info on how to use e-mail to send un-mangled (git) patches.
178extcon/
179 - directory with porting guide for Android kernel switch driver.
135fault-injection/ 180fault-injection/
136 - dir with docs about the fault injection capabilities infrastructure. 181 - dir with docs about the fault injection capabilities infrastructure.
137fb/ 182fb/
138 - directory with info on the frame buffer graphics abstraction layer. 183 - directory with info on the frame buffer graphics abstraction layer.
139feature-removal-schedule.txt
140 - list of files and features that are going to be removed.
141filesystems/ 184filesystems/
142 - info on the vfs and the various filesystems that Linux supports. 185 - info on the vfs and the various filesystems that Linux supports.
143firmware_class/ 186firmware_class/
144 - request_firmware() hotplug interface info. 187 - request_firmware() hotplug interface info.
188flexible-arrays.txt
189 - how to make use of flexible sized arrays in linux
145frv/ 190frv/
146 - Fujitsu FR-V Linux documentation. 191 - Fujitsu FR-V Linux documentation.
192futex-requeue-pi.txt
193 - info on requeueing of tasks from a non-PI futex to a PI futex
194gcov.txt
195 - use of GCC's coverage testing tool "gcov" with the Linux kernel
147gpio.txt 196gpio.txt
148 - overview of GPIO (General Purpose Input/Output) access conventions. 197 - overview of GPIO (General Purpose Input/Output) access conventions.
198hid/
199 - directory with information on human interface devices
149highuid.txt 200highuid.txt
150 - notes on the change from 16 bit to 32 bit user/group IDs. 201 - notes on the change from 16 bit to 32 bit user/group IDs.
202hwspinlock.txt
203 - hardware spinlock provides hardware assistance for synchronization
151timers/ 204timers/
152 - info on the timer related topics 205 - info on the timer related topics
153hw_random.txt 206hw_random.txt
@@ -164,10 +217,14 @@ ia64/
164 - directory with info about Linux on Intel 64 bit architecture. 217 - directory with info about Linux on Intel 64 bit architecture.
165infiniband/ 218infiniband/
166 - directory with documents concerning Linux InfiniBand support. 219 - directory with documents concerning Linux InfiniBand support.
220init.txt
221 - what to do when the kernel can't find the 1st process to run.
167initrd.txt 222initrd.txt
168 - how to use the RAM disk as an initial/temporary root filesystem. 223 - how to use the RAM disk as an initial/temporary root filesystem.
169input/ 224input/
170 - info on Linux input device support. 225 - info on Linux input device support.
226intel_txt.txt
227 - info on intel Trusted Execution Technology (intel TXT).
171io-mapping.txt 228io-mapping.txt
172 - description of io_mapping functions in linux/io-mapping.h 229 - description of io_mapping functions in linux/io-mapping.h
173io_ordering.txt 230io_ordering.txt
@@ -184,6 +241,8 @@ isdn/
184 - directory with info on the Linux ISDN support, and supported cards. 241 - directory with info on the Linux ISDN support, and supported cards.
185java.txt 242java.txt
186 - info on the in-kernel binary support for Java(tm). 243 - info on the in-kernel binary support for Java(tm).
244ja_JP/
245 - directory with Japanese translations of various documents
187kbuild/ 246kbuild/
188 - directory with info about the kernel build process. 247 - directory with info about the kernel build process.
189kdump/ 248kdump/
@@ -194,6 +253,12 @@ kernel-docs.txt
194 - listing of various WWW + books that document kernel internals. 253 - listing of various WWW + books that document kernel internals.
195kernel-parameters.txt 254kernel-parameters.txt
196 - summary listing of command line / boot prompt args for the kernel. 255 - summary listing of command line / boot prompt args for the kernel.
256kmemcheck.txt
257 - info on dynamic checker that detects uses of uninitialized memory.
258kmemleak.txt
259 - info on how to make use of the kernel memory leak detection system
260ko_KR/
261 - directory with Korean translations of various documents
197kobject.txt 262kobject.txt
198 - info of the kobject infrastructure of the Linux kernel. 263 - info of the kobject infrastructure of the Linux kernel.
199kprobes.txt 264kprobes.txt
@@ -210,6 +275,8 @@ local_ops.txt
210 - semantics and behavior of local atomic operations. 275 - semantics and behavior of local atomic operations.
211lockdep-design.txt 276lockdep-design.txt
212 - documentation on the runtime locking correctness validator. 277 - documentation on the runtime locking correctness validator.
278lockstat.txt
279 - info on collecting statistics on locks (and contention).
213lockup-watchdogs.txt 280lockup-watchdogs.txt
214 - info on soft and hard lockup detectors (aka nmi_watchdog). 281 - info on soft and hard lockup detectors (aka nmi_watchdog).
215logo.gif 282logo.gif
@@ -222,16 +289,28 @@ magic-number.txt
222 - list of magic numbers used to mark/protect kernel data structures. 289 - list of magic numbers used to mark/protect kernel data structures.
223md.txt 290md.txt
224 - info on boot arguments for the multiple devices driver. 291 - info on boot arguments for the multiple devices driver.
292media-framework.txt
293 - info on media framework, its data structures, functions and usage.
225memory-barriers.txt 294memory-barriers.txt
226 - info on Linux kernel memory barriers. 295 - info on Linux kernel memory barriers.
296memory-devices/
297 - directory with info on parts like the Texas Instruments EMIF driver
227memory-hotplug.txt 298memory-hotplug.txt
228 - Hotpluggable memory support, how to use and current status. 299 - Hotpluggable memory support, how to use and current status.
229memory.txt 300memory.txt
230 - info on typical Linux memory problems. 301 - info on typical Linux memory problems.
302metag/
303 - directory with info about Linux on Meta architecture.
231mips/ 304mips/
232 - directory with info about Linux on MIPS architecture. 305 - directory with info about Linux on MIPS architecture.
306misc-devices/
307 - directory with info about devices using the misc dev subsystem
233mmc/ 308mmc/
234 - directory with info about the MMC subsystem 309 - directory with info about the MMC subsystem
310mn10300/
311 - directory with info about the mn10300 architecture port
312mtd/
313 - directory with info about memory technology devices (flash)
235mono.txt 314mono.txt
236 - how to execute Mono-based .NET binaries with the help of BINFMT_MISC. 315 - how to execute Mono-based .NET binaries with the help of BINFMT_MISC.
237mutex-design.txt 316mutex-design.txt
@@ -242,6 +321,8 @@ netlabel/
242 - directory with information on the NetLabel subsystem. 321 - directory with information on the NetLabel subsystem.
243networking/ 322networking/
244 - directory with info on various aspects of networking with Linux. 323 - directory with info on various aspects of networking with Linux.
324nfc/
325 - directory relating info about Near Field Communications support.
245nommu-mmap.txt 326nommu-mmap.txt
246 - documentation about no-mmu memory mapping support. 327 - documentation about no-mmu memory mapping support.
247numastat.txt 328numastat.txt
@@ -258,26 +339,46 @@ parport-lowlevel.txt
258 - description and usage of the low level parallel port functions. 339 - description and usage of the low level parallel port functions.
259pcmcia/ 340pcmcia/
260 - info on the Linux PCMCIA driver. 341 - info on the Linux PCMCIA driver.
342percpu-rw-semaphore.txt
343 - RCU based read-write semaphore optimized for locking for reading
261pi-futex.txt 344pi-futex.txt
262 - documentation on lightweight PI-futexes. 345 - documentation on lightweight priority inheritance futexes.
346pinctrl.txt
347 - info on pinctrl subsystem and the PINMUX/PINCONF and drivers
263pnp.txt 348pnp.txt
264 - Linux Plug and Play documentation. 349 - Linux Plug and Play documentation.
265power/ 350power/
266 - directory with info on Linux PCI power management. 351 - directory with info on Linux PCI power management.
267powerpc/ 352powerpc/
268 - directory with info on using Linux with the PowerPC. 353 - directory with info on using Linux with the PowerPC.
354prctl/
355 - directory with info on the priveledge control subsystem
269preempt-locking.txt 356preempt-locking.txt
270 - info on locking under a preemptive kernel. 357 - info on locking under a preemptive kernel.
271printk-formats.txt 358printk-formats.txt
272 - how to get printk format specifiers right 359 - how to get printk format specifiers right
360pps/
361 - directory with information on the pulse-per-second support
362ptp/
363 - directory with info on support for IEEE 1588 PTP clocks in Linux.
364pwm.txt
365 - info on the pulse width modulation driver subsystem
273ramoops.txt 366ramoops.txt
274 - documentation of the ramoops oops/panic logging module. 367 - documentation of the ramoops oops/panic logging module.
368rapidio/
369 - directory with info on RapidIO packet-based fabric interconnect
275rbtree.txt 370rbtree.txt
276 - info on what red-black trees are and what they are for. 371 - info on what red-black trees are and what they are for.
372remoteproc.txt
373 - info on how to handle remote processor (e.g. AMP) offloads/usage.
374rfkill.txt
375 - info on the radio frequency kill switch subsystem/support.
277robust-futex-ABI.txt 376robust-futex-ABI.txt
278 - documentation of the robust futex ABI. 377 - documentation of the robust futex ABI.
279robust-futexes.txt 378robust-futexes.txt
280 - a description of what robust futexes are. 379 - a description of what robust futexes are.
380rpmsg.txt
381 - info on the Remote Processor Messaging (rpmsg) Framework
281rt-mutex-design.txt 382rt-mutex-design.txt
282 - description of the RealTime mutex implementation design. 383 - description of the RealTime mutex implementation design.
283rt-mutex.txt 384rt-mutex.txt
@@ -302,10 +403,10 @@ sgi-visws.txt
302 - short blurb on the SGI Visual Workstations. 403 - short blurb on the SGI Visual Workstations.
303sh/ 404sh/
304 - directory with info on porting Linux to a new architecture. 405 - directory with info on porting Linux to a new architecture.
406smsc_ece1099.txt
407 -info on the smsc Keyboard Scan Expansion/GPIO Expansion device.
305sound/ 408sound/
306 - directory with info on sound card support. 409 - directory with info on sound card support.
307sparc/
308 - directory with info on using Linux on Sparc architecture.
309sparse.txt 410sparse.txt
310 - info on how to obtain and use the sparse tool for typechecking. 411 - info on how to obtain and use the sparse tool for typechecking.
311spi/ 412spi/
@@ -316,6 +417,8 @@ stable_api_nonsense.txt
316 - info on why the kernel does not have a stable in-kernel api or abi. 417 - info on why the kernel does not have a stable in-kernel api or abi.
317stable_kernel_rules.txt 418stable_kernel_rules.txt
318 - rules and procedures for the -stable kernel releases. 419 - rules and procedures for the -stable kernel releases.
420static-keys.txt
421 - info on how static keys allow debug code in hotpaths via patching
319svga.txt 422svga.txt
320 - short guide on selecting video modes at boot via VGA BIOS. 423 - short guide on selecting video modes at boot via VGA BIOS.
321sysfs-rules.txt 424sysfs-rules.txt
@@ -324,27 +427,53 @@ sysctl/
324 - directory with info on the /proc/sys/* files. 427 - directory with info on the /proc/sys/* files.
325sysrq.txt 428sysrq.txt
326 - info on the magic SysRq key. 429 - info on the magic SysRq key.
327telephony/ 430target/
328 - directory with info on telephony (e.g. voice over IP) support. 431 - directory with info on generating TCM v4 fabric .ko modules
432thermal/
433 - directory with information on managing thermal issues (CPU/temp)
434trace/
435 - directory with info on tracing technologies within linux
436unaligned-memory-access.txt
437 - info on how to avoid arch breaking unaligned memory access in code.
329unicode.txt 438unicode.txt
330 - info on the Unicode character/font mapping used in Linux. 439 - info on the Unicode character/font mapping used in Linux.
331unshare.txt 440unshare.txt
332 - description of the Linux unshare system call. 441 - description of the Linux unshare system call.
333usb/ 442usb/
334 - directory with info regarding the Universal Serial Bus. 443 - directory with info regarding the Universal Serial Bus.
444vDSO/
445 - directory with info regarding virtual dynamic shared objects
446vfio.txt
447 - info on Virtual Function I/O used in guest/hypervisor instances.
448vgaarbiter.txt
449 - info on enable/disable the legacy decoding on different VGA devices
335video-output.txt 450video-output.txt
336 - sysfs class driver interface to enable/disable a video output device. 451 - sysfs class driver interface to enable/disable a video output device.
337video4linux/ 452video4linux/
338 - directory with info regarding video/TV/radio cards and linux. 453 - directory with info regarding video/TV/radio cards and linux.
454virtual/
455 - directory with information on the various linux virtualizations.
339vm/ 456vm/
340 - directory with info on the Linux vm code. 457 - directory with info on the Linux vm code.
458vme_api.txt
459 - file relating info on the VME bus API in linux
341volatile-considered-harmful.txt 460volatile-considered-harmful.txt
342 - Why the "volatile" type class should not be used 461 - Why the "volatile" type class should not be used
343w1/ 462w1/
344 - directory with documents regarding the 1-wire (w1) subsystem. 463 - directory with documents regarding the 1-wire (w1) subsystem.
345watchdog/ 464watchdog/
346 - how to auto-reboot Linux if it has "fallen and can't get up". ;-) 465 - how to auto-reboot Linux if it has "fallen and can't get up". ;-)
466wimax/
467 - directory with info about Intel Wireless Wimax Connections
468workqueue.txt
469 - information on the Concurrency Managed Workqueue implementation
347x86/x86_64/ 470x86/x86_64/
348 - directory with info on Linux support for AMD x86-64 (Hammer) machines. 471 - directory with info on Linux support for AMD x86-64 (Hammer) machines.
472xtensa/
473 - directory with documents relating to arch/xtensa port/implementation
474xz.txt
475 - how to make use of the XZ data compression within linux kernel
476zh_CN/
477 - directory with Chinese translations of various documents
349zorro.txt 478zorro.txt
350 - info on writing drivers for Zorro bus devices found on Amigas. 479 - info on writing drivers for Zorro bus devices found on Amigas.
diff --git a/Documentation/ABI/README b/Documentation/ABI/README
index 9feaf16f1617..10069828568b 100644
--- a/Documentation/ABI/README
+++ b/Documentation/ABI/README
@@ -36,9 +36,6 @@ The different levels of stability are:
36 the kernel, but are marked to be removed at some later point in 36 the kernel, but are marked to be removed at some later point in
37 time. The description of the interface will document the reason 37 time. The description of the interface will document the reason
38 why it is obsolete and when it can be expected to be removed. 38 why it is obsolete and when it can be expected to be removed.
39 The file Documentation/feature-removal-schedule.txt may describe
40 some of these interfaces, giving a schedule for when they will
41 be removed.
42 39
43 removed/ 40 removed/
44 This directory contains a list of the old interfaces that have 41 This directory contains a list of the old interfaces that have
diff --git a/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-koneplus b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-koneplus
index c2a270b45b03..833fd59926a7 100644
--- a/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-koneplus
+++ b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-koneplus
@@ -8,3 +8,41 @@ Description: The integer value of this attribute ranges from 0-4.
8 When written, this file sets the number of the startup profile 8 When written, this file sets the number of the startup profile
9 and the mouse activates this profile immediately. 9 and the mouse activates this profile immediately.
10 Please use actual_profile, it does the same thing. 10 Please use actual_profile, it does the same thing.
11Users: http://roccat.sourceforge.net
12
13What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/firmware_version
14Date: October 2010
15Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
16Description: When read, this file returns the raw integer version number of the
17 firmware reported by the mouse. Using the integer value eases
18 further usage in other programs. To receive the real version
19 number the decimal point has to be shifted 2 positions to the
20 left. E.g. a returned value of 121 means 1.21
21 This file is readonly.
22 Please read binary attribute info which contains firmware version.
23Users: http://roccat.sourceforge.net
24
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
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 read, these files return the respective profile buttons.
32 The returned data is 77 bytes in size.
33 This file is readonly.
34 Write control to select profile and read profile_buttons instead.
35Users: http://roccat.sourceforge.net
36
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
38Date: August 2010
39Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
40Description: The mouse can store 5 profiles which can be switched by the
41 press of a button. A profile is split in settings and buttons.
42 profile_settings holds information like resolution, sensitivity
43 and light effects.
44 When read, these files return the respective profile settings.
45 The returned data is 43 bytes in size.
46 This file is readonly.
47 Write control to select profile and read profile_settings instead.
48Users: http://roccat.sourceforge.net \ No newline at end of file
diff --git a/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-kovaplus b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-kovaplus
new file mode 100644
index 000000000000..4a98e02b6c6a
--- /dev/null
+++ b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-kovaplus
@@ -0,0 +1,66 @@
1What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/actual_cpi
2Date: January 2011
3Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
4Description: The integer value of this attribute ranges from 1-4.
5 When read, this attribute returns the number of the active
6 cpi level.
7 This file is readonly.
8 Has never been used. If bookkeeping is done, it's done in userland tools.
9Users: http://roccat.sourceforge.net
10
11What: /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
13Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
14Description: The integer value of this attribute ranges from 1-10.
15 When read, this attribute returns the number of the actual
16 sensitivity in x direction.
17 This file is readonly.
18 Has never been used. If bookkeeping is done, it's done in userland tools.
19Users: http://roccat.sourceforge.net
20
21What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/actual_sensitivity_y
22Date: January 2011
23Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
24Description: The integer value of this attribute ranges from 1-10.
25 When read, this attribute returns the number of the actual
26 sensitivity in y direction.
27 This file is readonly.
28 Has never been used. If bookkeeping is done, it's done in userland tools.
29Users: http://roccat.sourceforge.net
30
31What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/firmware_version
32Date: January 2011
33Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
34Description: When read, this file returns the raw integer version number of the
35 firmware reported by the mouse. Using the integer value eases
36 further usage in other programs. To receive the real version
37 number the decimal point has to be shifted 2 positions to the
38 left. E.g. a returned value of 121 means 1.21
39 This file is readonly.
40 Obsoleted by binary sysfs attribute "info".
41Users: http://roccat.sourceforge.net
42
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
44Date: January 2011
45Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
46Description: The mouse can store 5 profiles which can be switched by the
47 press of a button. A profile is split in settings and buttons.
48 profile_buttons holds information about button layout.
49 When read, these files return the respective profile buttons.
50 The returned data is 23 bytes in size.
51 This file is readonly.
52 Write control to select profile and read profile_buttons instead.
53Users: http://roccat.sourceforge.net
54
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
56Date: January 2011
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_settings holds information like resolution, sensitivity
61 and light effects.
62 When read, these files return the respective profile settings.
63 The returned data is 16 bytes in size.
64 This file is readonly.
65 Write control to select profile and read profile_settings instead.
66Users: http://roccat.sourceforge.net
diff --git a/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-pyra b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-pyra
new file mode 100644
index 000000000000..87ac87e9556d
--- /dev/null
+++ b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-pyra
@@ -0,0 +1,73 @@
1What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/actual_cpi
2Date: August 2010
3Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
4Description: It is possible to switch the cpi setting of the mouse with the
5 press of a button.
6 When read, this file returns the raw number of the actual cpi
7 setting reported by the mouse. This number has to be further
8 processed to receive the real dpi value.
9
10 VALUE DPI
11 1 400
12 2 800
13 4 1600
14
15 This file is readonly.
16 Has never been used. If bookkeeping is done, it's done in userland tools.
17Users: http://roccat.sourceforge.net
18
19What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/actual_profile
20Date: August 2010
21Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
22Description: When read, this file returns the number of the actual profile in
23 range 0-4.
24 This file is readonly.
25 Please use binary attribute "settings" which provides this information.
26Users: http://roccat.sourceforge.net
27
28What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/firmware_version
29Date: August 2010
30Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
31Description: When read, this file returns the raw integer version number of the
32 firmware reported by the mouse. Using the integer value eases
33 further usage in other programs. To receive the real version
34 number the decimal point has to be shifted 2 positions to the
35 left. E.g. a returned value of 138 means 1.38
36 This file is readonly.
37 Please use binary attribute "info" which provides this information.
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>/profile[1-5]_buttons
41Date: August 2010
42Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
43Description: The mouse can store 5 profiles which can be switched by the
44 press of a button. A profile is split in settings and buttons.
45 profile_buttons holds information about button layout.
46 When read, these files return the respective profile buttons.
47 The returned data is 19 bytes in size.
48 This file is readonly.
49 Write control to select profile and read profile_buttons instead.
50Users: http://roccat.sourceforge.net
51
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
53Date: August 2010
54Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
55Description: The mouse can store 5 profiles which can be switched by the
56 press of a button. A profile is split in settings and buttons.
57 profile_settings holds information like resolution, sensitivity
58 and light effects.
59 When read, these files return the respective profile settings.
60 The returned data is 13 bytes in size.
61 This file is readonly.
62 Write control to select profile and read profile_settings instead.
63Users: http://roccat.sourceforge.net
64
65What: /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
67Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
68Description: The integer value of this attribute ranges from 0-4.
69 When read, this attribute returns the number of the profile
70 that's active when the mouse is powered on.
71 This file is readonly.
72 Please use binary attribute "settings" which provides this information.
73Users: http://roccat.sourceforge.net
diff --git a/Documentation/ABI/stable/sysfs-class-tpm b/Documentation/ABI/stable/sysfs-class-tpm
new file mode 100644
index 000000000000..a60b45e2493b
--- /dev/null
+++ b/Documentation/ABI/stable/sysfs-class-tpm
@@ -0,0 +1,185 @@
1What: /sys/class/misc/tpmX/device/
2Date: April 2005
3KernelVersion: 2.6.12
4Contact: tpmdd-devel@lists.sf.net
5Description: The device/ directory under a specific TPM instance exposes
6 the properties of that TPM chip
7
8
9What: /sys/class/misc/tpmX/device/active
10Date: April 2006
11KernelVersion: 2.6.17
12Contact: tpmdd-devel@lists.sf.net
13Description: The "active" property prints a '1' if the TPM chip is accepting
14 commands. An inactive TPM chip still contains all the state of
15 an active chip (Storage Root Key, NVRAM, etc), and can be
16 visible to the OS, but will only accept a restricted set of
17 commands. See the TPM Main Specification part 2, Structures,
18 section 17 for more information on which commands are
19 available.
20
21What: /sys/class/misc/tpmX/device/cancel
22Date: June 2005
23KernelVersion: 2.6.13
24Contact: tpmdd-devel@lists.sf.net
25Description: The "cancel" property allows you to cancel the currently
26 pending TPM command. Writing any value to cancel will call the
27 TPM vendor specific cancel operation.
28
29What: /sys/class/misc/tpmX/device/caps
30Date: April 2005
31KernelVersion: 2.6.12
32Contact: tpmdd-devel@lists.sf.net
33Description: The "caps" property contains TPM manufacturer and version info.
34
35 Example output:
36
37 Manufacturer: 0x53544d20
38 TCG version: 1.2
39 Firmware version: 8.16
40
41 Manufacturer is a hex dump of the 4 byte manufacturer info
42 space in a TPM. TCG version shows the TCG TPM spec level that
43 the chip supports. Firmware version is that of the chip and
44 is manufacturer specific.
45
46What: /sys/class/misc/tpmX/device/durations
47Date: March 2011
48KernelVersion: 3.1
49Contact: tpmdd-devel@lists.sf.net
50Description: The "durations" property shows the 3 vendor-specific values
51 used to wait for a short, medium and long TPM command. All
52 TPM commands are categorized as short, medium or long in
53 execution time, so that the driver doesn't have to wait
54 any longer than necessary before starting to poll for a
55 result.
56
57 Example output:
58
59 3015000 4508000 180995000 [original]
60
61 Here the short, medium and long durations are displayed in
62 usecs. "[original]" indicates that the values are displayed
63 unmodified from when they were queried from the chip.
64 Durations can be modified in the case where a buggy chip
65 reports them in msec instead of usec and they need to be
66 scaled to be displayed in usecs. In this case "[adjusted]"
67 will be displayed in place of "[original]".
68
69What: /sys/class/misc/tpmX/device/enabled
70Date: April 2006
71KernelVersion: 2.6.17
72Contact: tpmdd-devel@lists.sf.net
73Description: The "enabled" property prints a '1' if the TPM chip is enabled,
74 meaning that it should be visible to the OS. This property
75 may be visible but produce a '0' after some operation that
76 disables the TPM.
77
78What: /sys/class/misc/tpmX/device/owned
79Date: April 2006
80KernelVersion: 2.6.17
81Contact: tpmdd-devel@lists.sf.net
82Description: The "owned" property produces a '1' if the TPM_TakeOwnership
83 ordinal has been executed successfully in the chip. A '0'
84 indicates that ownership hasn't been taken.
85
86What: /sys/class/misc/tpmX/device/pcrs
87Date: April 2005
88KernelVersion: 2.6.12
89Contact: tpmdd-devel@lists.sf.net
90Description: The "pcrs" property will dump the current value of all Platform
91 Configuration Registers in the TPM. Note that since these
92 values may be constantly changing, the output is only valid
93 for a snapshot in time.
94
95 Example output:
96
97 PCR-00: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 75
98 PCR-01: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 75
99 PCR-02: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 75
100 PCR-03: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 75
101 PCR-04: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 75
102 ...
103
104 The number of PCRs and hex bytes needed to represent a PCR
105 value will vary depending on TPM chip version. For TPM 1.1 and
106 1.2 chips, PCRs represent SHA-1 hashes, which are 20 bytes
107 long. Use the "caps" property to determine TPM version.
108
109What: /sys/class/misc/tpmX/device/pubek
110Date: April 2005
111KernelVersion: 2.6.12
112Contact: tpmdd-devel@lists.sf.net
113Description: The "pubek" property will return the TPM's public endorsement
114 key if possible. If the TPM has had ownership established and
115 is version 1.2, the pubek will not be available without the
116 owner's authorization. Since the TPM driver doesn't store any
117 secrets, it can't authorize its own request for the pubek,
118 making it unaccessible. The public endorsement key is gener-
119 ated at TPM menufacture time and exists for the life of the
120 chip.
121
122 Example output:
123
124 Algorithm: 00 00 00 01
125 Encscheme: 00 03
126 Sigscheme: 00 01
127 Parameters: 00 00 08 00 00 00 00 02 00 00 00 00
128 Modulus length: 256
129 Modulus:
130 B4 76 41 82 C9 20 2C 10 18 40 BC 8B E5 44 4C 6C
131 3A B2 92 0C A4 9B 2A 83 EB 5C 12 85 04 48 A0 B6
132 1E E4 81 84 CE B2 F2 45 1C F0 85 99 61 02 4D EB
133 86 C4 F7 F3 29 60 52 93 6B B2 E5 AB 8B A9 09 E3
134 D7 0E 7D CA 41 BF 43 07 65 86 3C 8C 13 7A D0 8B
135 82 5E 96 0B F8 1F 5F 34 06 DA A2 52 C1 A9 D5 26
136 0F F4 04 4B D9 3F 2D F2 AC 2F 74 64 1F 8B CD 3E
137 1E 30 38 6C 70 63 69 AB E2 50 DF 49 05 2E E1 8D
138 6F 78 44 DA 57 43 69 EE 76 6C 38 8A E9 8E A3 F0
139 A7 1F 3C A8 D0 12 15 3E CA 0E BD FA 24 CD 33 C6
140 47 AE A4 18 83 8E 22 39 75 93 86 E6 FD 66 48 B6
141 10 AD 94 14 65 F9 6A 17 78 BD 16 53 84 30 BF 70
142 E0 DC 65 FD 3C C6 B0 1E BF B9 C1 B5 6C EF B1 3A
143 F8 28 05 83 62 26 11 DC B4 6B 5A 97 FF 32 26 B6
144 F7 02 71 CF 15 AE 16 DD D1 C1 8E A8 CF 9B 50 7B
145 C3 91 FF 44 1E CF 7C 39 FE 17 77 21 20 BD CE 9B
146
147 Possible values:
148
149 Algorithm: TPM_ALG_RSA (1)
150 Encscheme: TPM_ES_RSAESPKCSv15 (2)
151 TPM_ES_RSAESOAEP_SHA1_MGF1 (3)
152 Sigscheme: TPM_SS_NONE (1)
153 Parameters, a byte string of 3 u32 values:
154 Key Length (bits): 00 00 08 00 (2048)
155 Num primes: 00 00 00 02 (2)
156 Exponent Size: 00 00 00 00 (0 means the
157 default exp)
158 Modulus Length: 256 (bytes)
159 Modulus: The 256 byte Endorsement Key modulus
160
161What: /sys/class/misc/tpmX/device/temp_deactivated
162Date: April 2006
163KernelVersion: 2.6.17
164Contact: tpmdd-devel@lists.sf.net
165Description: The "temp_deactivated" property returns a '1' if the chip has
166 been temporarily dectivated, usually until the next power
167 cycle. Whether a warm boot (reboot) will clear a TPM chip
168 from a temp_deactivated state is platform specific.
169
170What: /sys/class/misc/tpmX/device/timeouts
171Date: March 2011
172KernelVersion: 3.1
173Contact: tpmdd-devel@lists.sf.net
174Description: The "timeouts" property shows the 4 vendor-specific values
175 for the TPM's interface spec timeouts. The use of these
176 timeouts is defined by the TPM interface spec that the chip
177 conforms to.
178
179 Example output:
180
181 750000 750000 750000 750000 [original]
182
183 The four timeout values are shown in usecs, with a trailing
184 "[original]" or "[adjusted]" depending on whether the values
185 were scaled by the driver to be reported in usec from msecs.
diff --git a/Documentation/ABI/stable/sysfs-devices-node b/Documentation/ABI/stable/sysfs-devices-node
index 49b82cad7003..ce259c13c36a 100644
--- a/Documentation/ABI/stable/sysfs-devices-node
+++ b/Documentation/ABI/stable/sysfs-devices-node
@@ -1,7 +1,101 @@
1What: /sys/devices/system/node/possible
2Date: October 2002
3Contact: Linux Memory Management list <linux-mm@kvack.org>
4Description:
5 Nodes that could be possibly become online at some point.
6
7What: /sys/devices/system/node/online
8Date: October 2002
9Contact: Linux Memory Management list <linux-mm@kvack.org>
10Description:
11 Nodes that are online.
12
13What: /sys/devices/system/node/has_normal_memory
14Date: October 2002
15Contact: Linux Memory Management list <linux-mm@kvack.org>
16Description:
17 Nodes that have regular memory.
18
19What: /sys/devices/system/node/has_cpu
20Date: October 2002
21Contact: Linux Memory Management list <linux-mm@kvack.org>
22Description:
23 Nodes that have one or more CPUs.
24
25What: /sys/devices/system/node/has_high_memory
26Date: October 2002
27Contact: Linux Memory Management list <linux-mm@kvack.org>
28Description:
29 Nodes that have regular or high memory.
30 Depends on CONFIG_HIGHMEM.
31
1What: /sys/devices/system/node/nodeX 32What: /sys/devices/system/node/nodeX
2Date: October 2002 33Date: October 2002
3Contact: Linux Memory Management list <linux-mm@kvack.org> 34Contact: Linux Memory Management list <linux-mm@kvack.org>
4Description: 35Description:
5 When CONFIG_NUMA is enabled, this is a directory containing 36 When CONFIG_NUMA is enabled, this is a directory containing
6 information on node X such as what CPUs are local to the 37 information on node X such as what CPUs are local to the
7 node. 38 node. Each file is detailed next.
39
40What: /sys/devices/system/node/nodeX/cpumap
41Date: October 2002
42Contact: Linux Memory Management list <linux-mm@kvack.org>
43Description:
44 The node's cpumap.
45
46What: /sys/devices/system/node/nodeX/cpulist
47Date: October 2002
48Contact: Linux Memory Management list <linux-mm@kvack.org>
49Description:
50 The CPUs associated to the node.
51
52What: /sys/devices/system/node/nodeX/meminfo
53Date: October 2002
54Contact: Linux Memory Management list <linux-mm@kvack.org>
55Description:
56 Provides information about the node's distribution and memory
57 utilization. Similar to /proc/meminfo, see Documentation/filesystems/proc.txt
58
59What: /sys/devices/system/node/nodeX/numastat
60Date: October 2002
61Contact: Linux Memory Management list <linux-mm@kvack.org>
62Description:
63 The node's hit/miss statistics, in units of pages.
64 See Documentation/numastat.txt
65
66What: /sys/devices/system/node/nodeX/distance
67Date: October 2002
68Contact: Linux Memory Management list <linux-mm@kvack.org>
69Description:
70 Distance between the node and all the other nodes
71 in the system.
72
73What: /sys/devices/system/node/nodeX/vmstat
74Date: October 2002
75Contact: Linux Memory Management list <linux-mm@kvack.org>
76Description:
77 The node's zoned virtual memory statistics.
78 This is a superset of numastat.
79
80What: /sys/devices/system/node/nodeX/compact
81Date: February 2010
82Contact: Mel Gorman <mel@csn.ul.ie>
83Description:
84 When this file is written to, all memory within that node
85 will be compacted. When it completes, memory will be freed
86 into blocks which have as many contiguous pages as possible
87
88What: /sys/devices/system/node/nodeX/scan_unevictable_pages
89Date: October 2008
90Contact: Lee Schermerhorn <lee.schermerhorn@hp.com>
91Description:
92 When set, it triggers scanning the node's unevictable lists
93 and move any pages that have become evictable onto the respective
94 zone's inactive list. See mm/vmscan.c
95
96What: /sys/devices/system/node/nodeX/hugepages/hugepages-<size>/
97Date: December 2009
98Contact: Lee Schermerhorn <lee.schermerhorn@hp.com>
99Description:
100 The node's huge page size control/query attributes.
101 See Documentation/vm/hugetlbpage.txt \ No newline at end of file
diff --git a/Documentation/ABI/stable/sysfs-driver-ib_srp b/Documentation/ABI/stable/sysfs-driver-ib_srp
new file mode 100644
index 000000000000..481aae95c7d1
--- /dev/null
+++ b/Documentation/ABI/stable/sysfs-driver-ib_srp
@@ -0,0 +1,156 @@
1What: /sys/class/infiniband_srp/srp-<hca>-<port_number>/add_target
2Date: January 2, 2006
3KernelVersion: 2.6.15
4Contact: linux-rdma@vger.kernel.org
5Description: Interface for making ib_srp connect to a new target.
6 One can request ib_srp to connect to a new target by writing
7 a comma-separated list of login parameters to this sysfs
8 attribute. The supported parameters are:
9 * id_ext, a 16-digit hexadecimal number specifying the eight
10 byte identifier extension in the 16-byte SRP target port
11 identifier. The target port identifier is sent by ib_srp
12 to the target in the SRP_LOGIN_REQ request.
13 * ioc_guid, a 16-digit hexadecimal number specifying the eight
14 byte I/O controller GUID portion of the 16-byte target port
15 identifier.
16 * dgid, a 32-digit hexadecimal number specifying the
17 destination GID.
18 * pkey, a four-digit hexadecimal number specifying the
19 InfiniBand partition key.
20 * service_id, a 16-digit hexadecimal number specifying the
21 InfiniBand service ID used to establish communication with
22 the SRP target. How to find out the value of the service ID
23 is specified in the documentation of the SRP target.
24 * max_sect, a decimal number specifying the maximum number of
25 512-byte sectors to be transferred via a single SCSI command.
26 * max_cmd_per_lun, a decimal number specifying the maximum
27 number of outstanding commands for a single LUN.
28 * io_class, a hexadecimal number specifying the SRP I/O class.
29 Must be either 0xff00 (rev 10) or 0x0100 (rev 16a). The I/O
30 class defines the format of the SRP initiator and target
31 port identifiers.
32 * initiator_ext, a 16-digit hexadecimal number specifying the
33 identifier extension portion of the SRP initiator port
34 identifier. This data is sent by the initiator to the target
35 in the SRP_LOGIN_REQ request.
36 * cmd_sg_entries, a number in the range 1..255 that specifies
37 the maximum number of data buffer descriptors stored in the
38 SRP_CMD information unit itself. With allow_ext_sg=0 the
39 parameter cmd_sg_entries defines the maximum S/G list length
40 for a single SRP_CMD, and commands whose S/G list length
41 exceeds this limit after S/G list collapsing will fail.
42 * allow_ext_sg, whether ib_srp is allowed to include a partial
43 memory descriptor list in an SRP_CMD instead of the entire
44 list. If a partial memory descriptor list has been included
45 in an SRP_CMD the remaining memory descriptors are
46 communicated from initiator to target via an additional RDMA
47 transfer. Setting allow_ext_sg to 1 increases the maximum
48 amount of data that can be transferred between initiator and
49 target via a single SCSI command. Since not all SRP target
50 implementations support partial memory descriptor lists the
51 default value for this option is 0.
52 * sg_tablesize, a number in the range 1..2048 specifying the
53 maximum S/G list length the SCSI layer is allowed to pass to
54 ib_srp. Specifying a value that exceeds cmd_sg_entries is
55 only safe with partial memory descriptor list support enabled
56 (allow_ext_sg=1).
57
58What: /sys/class/infiniband_srp/srp-<hca>-<port_number>/ibdev
59Date: January 2, 2006
60KernelVersion: 2.6.15
61Contact: linux-rdma@vger.kernel.org
62Description: HCA name (<hca>).
63
64What: /sys/class/infiniband_srp/srp-<hca>-<port_number>/port
65Date: January 2, 2006
66KernelVersion: 2.6.15
67Contact: linux-rdma@vger.kernel.org
68Description: HCA port number (<port_number>).
69
70What: /sys/class/scsi_host/host<n>/allow_ext_sg
71Date: May 19, 2011
72KernelVersion: 2.6.39
73Contact: linux-rdma@vger.kernel.org
74Description: Whether ib_srp is allowed to include a partial memory
75 descriptor list in an SRP_CMD when communicating with an SRP
76 target.
77
78What: /sys/class/scsi_host/host<n>/cmd_sg_entries
79Date: May 19, 2011
80KernelVersion: 2.6.39
81Contact: linux-rdma@vger.kernel.org
82Description: Maximum number of data buffer descriptors that may be sent to
83 the target in a single SRP_CMD request.
84
85What: /sys/class/scsi_host/host<n>/dgid
86Date: June 17, 2006
87KernelVersion: 2.6.17
88Contact: linux-rdma@vger.kernel.org
89Description: InfiniBand destination GID used for communication with the SRP
90 target. Differs from orig_dgid if port redirection has happened.
91
92What: /sys/class/scsi_host/host<n>/id_ext
93Date: June 17, 2006
94KernelVersion: 2.6.17
95Contact: linux-rdma@vger.kernel.org
96Description: Eight-byte identifier extension portion of the 16-byte target
97 port identifier.
98
99What: /sys/class/scsi_host/host<n>/ioc_guid
100Date: June 17, 2006
101KernelVersion: 2.6.17
102Contact: linux-rdma@vger.kernel.org
103Description: Eight-byte I/O controller GUID portion of the 16-byte target
104 port identifier.
105
106What: /sys/class/scsi_host/host<n>/local_ib_device
107Date: November 29, 2006
108KernelVersion: 2.6.19
109Contact: linux-rdma@vger.kernel.org
110Description: Name of the InfiniBand HCA used for communicating with the
111 SRP target.
112
113What: /sys/class/scsi_host/host<n>/local_ib_port
114Date: November 29, 2006
115KernelVersion: 2.6.19
116Contact: linux-rdma@vger.kernel.org
117Description: Number of the HCA port used for communicating with the
118 SRP target.
119
120What: /sys/class/scsi_host/host<n>/orig_dgid
121Date: June 17, 2006
122KernelVersion: 2.6.17
123Contact: linux-rdma@vger.kernel.org
124Description: InfiniBand destination GID specified in the parameters
125 written to the add_target sysfs attribute.
126
127What: /sys/class/scsi_host/host<n>/pkey
128Date: June 17, 2006
129KernelVersion: 2.6.17
130Contact: linux-rdma@vger.kernel.org
131Description: A 16-bit number representing the InfiniBand partition key used
132 for communication with the SRP target.
133
134What: /sys/class/scsi_host/host<n>/req_lim
135Date: October 20, 2010
136KernelVersion: 2.6.36
137Contact: linux-rdma@vger.kernel.org
138Description: Number of requests ib_srp can send to the target before it has
139 to wait for more credits. For more information see also the
140 SRP credit algorithm in the SRP specification.
141
142What: /sys/class/scsi_host/host<n>/service_id
143Date: June 17, 2006
144KernelVersion: 2.6.17
145Contact: linux-rdma@vger.kernel.org
146Description: InfiniBand service ID used for establishing communication with
147 the SRP target.
148
149What: /sys/class/scsi_host/host<n>/zero_req_lim
150Date: September 20, 2006
151KernelVersion: 2.6.18
152Contact: linux-rdma@vger.kernel.org
153Description: Number of times the initiator had to wait before sending a
154 request to the target because it ran out of credits. For more
155 information see also the SRP credit algorithm in the SRP
156 specification.
diff --git a/Documentation/ABI/stable/sysfs-transport-srp b/Documentation/ABI/stable/sysfs-transport-srp
new file mode 100644
index 000000000000..b36fb0dc13c8
--- /dev/null
+++ b/Documentation/ABI/stable/sysfs-transport-srp
@@ -0,0 +1,19 @@
1What: /sys/class/srp_remote_ports/port-<h>:<n>/delete
2Date: June 1, 2012
3KernelVersion: 3.7
4Contact: linux-scsi@vger.kernel.org, linux-rdma@vger.kernel.org
5Description: Instructs an SRP initiator to disconnect from a target and to
6 remove all LUNs imported from that target.
7
8What: /sys/class/srp_remote_ports/port-<h>:<n>/port_id
9Date: June 27, 2007
10KernelVersion: 2.6.24
11Contact: linux-scsi@vger.kernel.org
12Description: 16-byte local SRP port identifier in hexadecimal format. An
13 example: 4c:49:4e:55:58:20:56:49:4f:00:00:00:00:00:00:00.
14
15What: /sys/class/srp_remote_ports/port-<h>:<n>/roles
16Date: June 27, 2007
17KernelVersion: 2.6.24
18Contact: linux-scsi@vger.kernel.org
19Description: Role of the remote port. Either "SRP Initiator" or "SRP Target".
diff --git a/Documentation/ABI/testing/dev-kmsg b/Documentation/ABI/testing/dev-kmsg
index 7e7e07a82e0e..bb820be48179 100644
--- a/Documentation/ABI/testing/dev-kmsg
+++ b/Documentation/ABI/testing/dev-kmsg
@@ -92,7 +92,7 @@ Description: The /dev/kmsg character device node provides userspace access
92 The flags field carries '-' by default. A 'c' indicates a 92 The flags field carries '-' by default. A 'c' indicates a
93 fragment of a line. All following fragments are flagged with 93 fragment of a line. All following fragments are flagged with
94 '+'. Note, that these hints about continuation lines are not 94 '+'. Note, that these hints about continuation lines are not
95 neccessarily correct, and the stream could be interleaved with 95 necessarily correct, and the stream could be interleaved with
96 unrelated messages, but merging the lines in the output 96 unrelated messages, but merging the lines in the output
97 usually produces better human readable results. A similar 97 usually produces better human readable results. A similar
98 logic is used internally when messages are printed to the 98 logic is used internally when messages are printed to the
diff --git a/Documentation/ABI/testing/ima_policy b/Documentation/ABI/testing/ima_policy
index 986946613542..f1c5cc9d17a8 100644
--- a/Documentation/ABI/testing/ima_policy
+++ b/Documentation/ABI/testing/ima_policy
@@ -18,17 +18,21 @@ Description:
18 rule format: action [condition ...] 18 rule format: action [condition ...]
19 19
20 action: measure | dont_measure | appraise | dont_appraise | audit 20 action: measure | dont_measure | appraise | dont_appraise | audit
21 condition:= base | lsm 21 condition:= base | lsm [option]
22 base: [[func=] [mask=] [fsmagic=] [uid=] [fowner]] 22 base: [[func=] [mask=] [fsmagic=] [fsuuid=] [uid=]
23 [fowner]]
23 lsm: [[subj_user=] [subj_role=] [subj_type=] 24 lsm: [[subj_user=] [subj_role=] [subj_type=]
24 [obj_user=] [obj_role=] [obj_type=]] 25 [obj_user=] [obj_role=] [obj_type=]]
26 option: [[appraise_type=]]
25 27
26 base: func:= [BPRM_CHECK][FILE_MMAP][FILE_CHECK] 28 base: func:= [BPRM_CHECK][MMAP_CHECK][FILE_CHECK][MODULE_CHECK]
27 mask:= [MAY_READ] [MAY_WRITE] [MAY_APPEND] [MAY_EXEC] 29 mask:= [MAY_READ] [MAY_WRITE] [MAY_APPEND] [MAY_EXEC]
28 fsmagic:= hex value 30 fsmagic:= hex value
31 fsuuid:= file system UUID (e.g 8bcbe394-4f13-4144-be8e-5aa9ea2ce2f6)
29 uid:= decimal value 32 uid:= decimal value
30 fowner:=decimal value 33 fowner:=decimal value
31 lsm: are LSM specific 34 lsm: are LSM specific
35 option: appraise_type:= [imasig]
32 36
33 default policy: 37 default policy:
34 # PROC_SUPER_MAGIC 38 # PROC_SUPER_MAGIC
@@ -53,6 +57,7 @@ Description:
53 measure func=BPRM_CHECK 57 measure func=BPRM_CHECK
54 measure func=FILE_MMAP mask=MAY_EXEC 58 measure func=FILE_MMAP mask=MAY_EXEC
55 measure func=FILE_CHECK mask=MAY_READ uid=0 59 measure func=FILE_CHECK mask=MAY_READ uid=0
60 measure func=MODULE_CHECK uid=0
56 appraise fowner=0 61 appraise fowner=0
57 62
58 The default policy measures all executables in bprm_check, 63 The default policy measures all executables in bprm_check,
diff --git a/Documentation/ABI/testing/pstore b/Documentation/ABI/testing/pstore
index ff1df4e3b059..5fca9f5e10a3 100644
--- a/Documentation/ABI/testing/pstore
+++ b/Documentation/ABI/testing/pstore
@@ -1,4 +1,4 @@
1Where: /dev/pstore/... 1Where: /sys/fs/pstore/... (or /dev/pstore/...)
2Date: March 2011 2Date: March 2011
3Kernel Version: 2.6.39 3Kernel Version: 2.6.39
4Contact: tony.luck@intel.com 4Contact: tony.luck@intel.com
@@ -11,9 +11,9 @@ Description: Generic interface to platform dependent persistent storage.
11 of the console log is captured, but other interesting 11 of the console log is captured, but other interesting
12 data can also be saved. 12 data can also be saved.
13 13
14 # mount -t pstore -o kmsg_bytes=8000 - /dev/pstore 14 # mount -t pstore -o kmsg_bytes=8000 - /sys/fs/pstore
15 15
16 $ ls -l /dev/pstore 16 $ ls -l /sys/fs/pstore/
17 total 0 17 total 0
18 -r--r--r-- 1 root root 7896 Nov 30 15:38 dmesg-erst-1 18 -r--r--r-- 1 root root 7896 Nov 30 15:38 dmesg-erst-1
19 19
@@ -27,9 +27,9 @@ Description: Generic interface to platform dependent persistent storage.
27 the file will signal to the underlying persistent storage 27 the file will signal to the underlying persistent storage
28 device that it can reclaim the space for later re-use. 28 device that it can reclaim the space for later re-use.
29 29
30 $ rm /dev/pstore/dmesg-erst-1 30 $ rm /sys/fs/pstore/dmesg-erst-1
31 31
32 The expectation is that all files in /dev/pstore 32 The expectation is that all files in /sys/fs/pstore/
33 will be saved elsewhere and erased from persistent store 33 will be saved elsewhere and erased from persistent store
34 soon after boot to free up space ready for the next 34 soon after boot to free up space ready for the next
35 catastrophe. 35 catastrophe.
diff --git a/Documentation/ABI/testing/sysfs-bus-event_source-devices-events b/Documentation/ABI/testing/sysfs-bus-event_source-devices-events
new file mode 100644
index 000000000000..0adeb524c0d4
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-event_source-devices-events
@@ -0,0 +1,62 @@
1What: /sys/devices/cpu/events/
2 /sys/devices/cpu/events/branch-misses
3 /sys/devices/cpu/events/cache-references
4 /sys/devices/cpu/events/cache-misses
5 /sys/devices/cpu/events/stalled-cycles-frontend
6 /sys/devices/cpu/events/branch-instructions
7 /sys/devices/cpu/events/stalled-cycles-backend
8 /sys/devices/cpu/events/instructions
9 /sys/devices/cpu/events/cpu-cycles
10
11Date: 2013/01/08
12
13Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
14
15Description: Generic performance monitoring events
16
17 A collection of performance monitoring events that may be
18 supported by many/most CPUs. These events can be monitored
19 using the 'perf(1)' tool.
20
21 The contents of each file would look like:
22
23 event=0xNNNN
24
25 where 'N' is a hex digit and the number '0xNNNN' shows the
26 "raw code" for the perf event identified by the file's
27 "basename".
28
29
30What: /sys/devices/cpu/events/PM_LD_MISS_L1
31 /sys/devices/cpu/events/PM_LD_REF_L1
32 /sys/devices/cpu/events/PM_CYC
33 /sys/devices/cpu/events/PM_BRU_FIN
34 /sys/devices/cpu/events/PM_GCT_NOSLOT_CYC
35 /sys/devices/cpu/events/PM_BRU_MPRED
36 /sys/devices/cpu/events/PM_INST_CMPL
37 /sys/devices/cpu/events/PM_CMPLU_STALL
38
39Date: 2013/01/08
40
41Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
42 Linux Powerpc mailing list <linuxppc-dev@ozlabs.org>
43
44Description: POWER-systems specific performance monitoring events
45
46 A collection of performance monitoring events that may be
47 supported by the POWER CPU. These events can be monitored
48 using the 'perf(1)' tool.
49
50 These events may not be supported by other CPUs.
51
52 The contents of each file would look like:
53
54 event=0xNNNN
55
56 where 'N' is a hex digit and the number '0xNNNN' shows the
57 "raw code" for the perf event identified by the file's
58 "basename".
59
60 Further, multiple terms like 'event=0xNNNN' can be specified
61 and separated with comma. All available terms are defined in
62 the /sys/bus/event_source/devices/<dev>/format file.
diff --git a/Documentation/ABI/testing/sysfs-bus-fcoe b/Documentation/ABI/testing/sysfs-bus-fcoe
index 50e2a80ea28f..21640eaad371 100644
--- a/Documentation/ABI/testing/sysfs-bus-fcoe
+++ b/Documentation/ABI/testing/sysfs-bus-fcoe
@@ -1,14 +1,53 @@
1What: /sys/bus/fcoe/ctlr_X 1What: /sys/bus/fcoe/
2Date: August 2012
3KernelVersion: TBD
4Contact: Robert Love <robert.w.love@intel.com>, devel@open-fcoe.org
5Description: The FCoE bus. Attributes in this directory are control interfaces.
6Attributes:
7
8 ctlr_create: 'FCoE Controller' instance creation interface. Writing an
9 <ifname> to this file will allocate and populate sysfs with a
10 fcoe_ctlr_device (ctlr_X). The user can then configure any
11 per-port settings and finally write to the fcoe_ctlr_device's
12 'start' attribute to begin the kernel's discovery and login
13 process.
14
15 ctlr_destroy: 'FCoE Controller' instance removal interface. Writing a
16 fcoe_ctlr_device's sysfs name to this file will log the
17 fcoe_ctlr_device out of the fabric or otherwise connected
18 FCoE devices. It will also free all kernel memory allocated
19 for this fcoe_ctlr_device and any structures associated
20 with it, this includes the scsi_host.
21
22What: /sys/bus/fcoe/devices/ctlr_X
2Date: March 2012 23Date: March 2012
3KernelVersion: TBD 24KernelVersion: TBD
4Contact: Robert Love <robert.w.love@intel.com>, devel@open-fcoe.org 25Contact: Robert Love <robert.w.love@intel.com>, devel@open-fcoe.org
5Description: 'FCoE Controller' instances on the fcoe bus 26Description: 'FCoE Controller' instances on the fcoe bus.
27 The FCoE Controller now has a three stage creation process.
28 1) Write interface name to ctlr_create 2) Configure the FCoE
29 Controller (ctlr_X) 3) Enable the FCoE Controller to begin
30 discovery and login. The FCoE Controller is destroyed by
31 writing it's name, i.e. ctlr_X to the ctlr_delete file.
32
6Attributes: 33Attributes:
7 34
8 fcf_dev_loss_tmo: Device loss timeout peroid (see below). Changing 35 fcf_dev_loss_tmo: Device loss timeout peroid (see below). Changing
9 this value will change the dev_loss_tmo for all 36 this value will change the dev_loss_tmo for all
10 FCFs discovered by this controller. 37 FCFs discovered by this controller.
11 38
39 mode: Display or change the FCoE Controller's mode. Possible
40 modes are 'Fabric' and 'VN2VN'. If a FCoE Controller
41 is started in 'Fabric' mode then FIP FCF discovery is
42 initiated and ultimately a fabric login is attempted.
43 If a FCoE Controller is started in 'VN2VN' mode then
44 FIP VN2VN discovery and login is performed. A FCoE
45 Controller only supports one mode at a time.
46
47 enabled: Whether an FCoE controller is enabled or disabled.
48 0 if disabled, 1 if enabled. Writing either 0 or 1
49 to this file will enable or disable the FCoE controller.
50
12 lesb/link_fail: Link Error Status Block (LESB) link failure count. 51 lesb/link_fail: Link Error Status Block (LESB) link failure count.
13 52
14 lesb/vlink_fail: Link Error Status Block (LESB) virtual link 53 lesb/vlink_fail: Link Error Status Block (LESB) virtual link
@@ -26,7 +65,7 @@ Attributes:
26 65
27Notes: ctlr_X (global increment starting at 0) 66Notes: ctlr_X (global increment starting at 0)
28 67
29What: /sys/bus/fcoe/fcf_X 68What: /sys/bus/fcoe/devices/fcf_X
30Date: March 2012 69Date: March 2012
31KernelVersion: TBD 70KernelVersion: TBD
32Contact: Robert Love <robert.w.love@intel.com>, devel@open-fcoe.org 71Contact: Robert Love <robert.w.love@intel.com>, devel@open-fcoe.org
diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
index 2f06d40fe07d..2e33dc6b2346 100644
--- a/Documentation/ABI/testing/sysfs-bus-iio
+++ b/Documentation/ABI/testing/sysfs-bus-iio
@@ -189,6 +189,14 @@ Description:
189 A computed peak value based on the sum squared magnitude of 189 A computed peak value based on the sum squared magnitude of
190 the underlying value in the specified directions. 190 the underlying value in the specified directions.
191 191
192What: /sys/bus/iio/devices/iio:deviceX/in_pressureY_raw
193What: /sys/bus/iio/devices/iio:deviceX/in_pressure_raw
194KernelVersion: 3.8
195Contact: linux-iio@vger.kernel.org
196Description:
197 Raw pressure measurement from channel Y. Units after
198 application of scale and offset are kilopascal.
199
192What: /sys/bus/iio/devices/iio:deviceX/in_accel_offset 200What: /sys/bus/iio/devices/iio:deviceX/in_accel_offset
193What: /sys/bus/iio/devices/iio:deviceX/in_accel_x_offset 201What: /sys/bus/iio/devices/iio:deviceX/in_accel_x_offset
194What: /sys/bus/iio/devices/iio:deviceX/in_accel_y_offset 202What: /sys/bus/iio/devices/iio:deviceX/in_accel_y_offset
@@ -197,6 +205,8 @@ What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_offset
197What: /sys/bus/iio/devices/iio:deviceX/in_voltage_offset 205What: /sys/bus/iio/devices/iio:deviceX/in_voltage_offset
198What: /sys/bus/iio/devices/iio:deviceX/in_tempY_offset 206What: /sys/bus/iio/devices/iio:deviceX/in_tempY_offset
199What: /sys/bus/iio/devices/iio:deviceX/in_temp_offset 207What: /sys/bus/iio/devices/iio:deviceX/in_temp_offset
208What: /sys/bus/iio/devices/iio:deviceX/in_pressureY_offset
209What: /sys/bus/iio/devices/iio:deviceX/in_pressure_offset
200KernelVersion: 2.6.35 210KernelVersion: 2.6.35
201Contact: linux-iio@vger.kernel.org 211Contact: linux-iio@vger.kernel.org
202Description: 212Description:
@@ -226,6 +236,8 @@ What: /sys/bus/iio/devices/iio:deviceX/in_magn_scale
226What: /sys/bus/iio/devices/iio:deviceX/in_magn_x_scale 236What: /sys/bus/iio/devices/iio:deviceX/in_magn_x_scale
227What: /sys/bus/iio/devices/iio:deviceX/in_magn_y_scale 237What: /sys/bus/iio/devices/iio:deviceX/in_magn_y_scale
228What: /sys/bus/iio/devices/iio:deviceX/in_magn_z_scale 238What: /sys/bus/iio/devices/iio:deviceX/in_magn_z_scale
239What: /sys/bus/iio/devices/iio:deviceX/in_pressureY_scale
240What: /sys/bus/iio/devices/iio:deviceX/in_pressure_scale
229KernelVersion: 2.6.35 241KernelVersion: 2.6.35
230Contact: linux-iio@vger.kernel.org 242Contact: linux-iio@vger.kernel.org
231Description: 243Description:
@@ -245,6 +257,8 @@ What: /sys/bus/iio/devices/iio:deviceX/in_anglvel_y_calibbias
245What: /sys/bus/iio/devices/iio:deviceX/in_anglvel_z_calibbias 257What: /sys/bus/iio/devices/iio:deviceX/in_anglvel_z_calibbias
246What: /sys/bus/iio/devices/iio:deviceX/in_illuminance0_calibbias 258What: /sys/bus/iio/devices/iio:deviceX/in_illuminance0_calibbias
247What: /sys/bus/iio/devices/iio:deviceX/in_proximity0_calibbias 259What: /sys/bus/iio/devices/iio:deviceX/in_proximity0_calibbias
260What: /sys/bus/iio/devices/iio:deviceX/in_pressureY_calibbias
261What: /sys/bus/iio/devices/iio:deviceX/in_pressure_calibbias
248KernelVersion: 2.6.35 262KernelVersion: 2.6.35
249Contact: linux-iio@vger.kernel.org 263Contact: linux-iio@vger.kernel.org
250Description: 264Description:
@@ -262,6 +276,8 @@ What /sys/bus/iio/devices/iio:deviceX/in_anglvel_y_calibscale
262What /sys/bus/iio/devices/iio:deviceX/in_anglvel_z_calibscale 276What /sys/bus/iio/devices/iio:deviceX/in_anglvel_z_calibscale
263what /sys/bus/iio/devices/iio:deviceX/in_illuminance0_calibscale 277what /sys/bus/iio/devices/iio:deviceX/in_illuminance0_calibscale
264what /sys/bus/iio/devices/iio:deviceX/in_proximity0_calibscale 278what /sys/bus/iio/devices/iio:deviceX/in_proximity0_calibscale
279What: /sys/bus/iio/devices/iio:deviceX/in_pressureY_calibscale
280What: /sys/bus/iio/devices/iio:deviceX/in_pressure_calibscale
265KernelVersion: 2.6.35 281KernelVersion: 2.6.35
266Contact: linux-iio@vger.kernel.org 282Contact: linux-iio@vger.kernel.org
267Description: 283Description:
@@ -275,6 +291,8 @@ What: /sys/.../iio:deviceX/in_voltage-voltage_scale_available
275What: /sys/.../iio:deviceX/out_voltageX_scale_available 291What: /sys/.../iio:deviceX/out_voltageX_scale_available
276What: /sys/.../iio:deviceX/out_altvoltageX_scale_available 292What: /sys/.../iio:deviceX/out_altvoltageX_scale_available
277What: /sys/.../iio:deviceX/in_capacitance_scale_available 293What: /sys/.../iio:deviceX/in_capacitance_scale_available
294What: /sys/.../iio:deviceX/in_pressure_scale_available
295What: /sys/.../iio:deviceX/in_pressureY_scale_available
278KernelVersion: 2.6.35 296KernelVersion: 2.6.35
279Contact: linux-iio@vger.kernel.org 297Contact: linux-iio@vger.kernel.org
280Description: 298Description:
@@ -694,6 +712,8 @@ What: /sys/.../buffer/scan_elements/in_voltageY_en
694What: /sys/.../buffer/scan_elements/in_voltageY-voltageZ_en 712What: /sys/.../buffer/scan_elements/in_voltageY-voltageZ_en
695What: /sys/.../buffer/scan_elements/in_incli_x_en 713What: /sys/.../buffer/scan_elements/in_incli_x_en
696What: /sys/.../buffer/scan_elements/in_incli_y_en 714What: /sys/.../buffer/scan_elements/in_incli_y_en
715What: /sys/.../buffer/scan_elements/in_pressureY_en
716What: /sys/.../buffer/scan_elements/in_pressure_en
697KernelVersion: 2.6.37 717KernelVersion: 2.6.37
698Contact: linux-iio@vger.kernel.org 718Contact: linux-iio@vger.kernel.org
699Description: 719Description:
@@ -707,6 +727,8 @@ What: /sys/.../buffer/scan_elements/in_voltageY_type
707What: /sys/.../buffer/scan_elements/in_voltage_type 727What: /sys/.../buffer/scan_elements/in_voltage_type
708What: /sys/.../buffer/scan_elements/in_voltageY_supply_type 728What: /sys/.../buffer/scan_elements/in_voltageY_supply_type
709What: /sys/.../buffer/scan_elements/in_timestamp_type 729What: /sys/.../buffer/scan_elements/in_timestamp_type
730What: /sys/.../buffer/scan_elements/in_pressureY_type
731What: /sys/.../buffer/scan_elements/in_pressure_type
710KernelVersion: 2.6.37 732KernelVersion: 2.6.37
711Contact: linux-iio@vger.kernel.org 733Contact: linux-iio@vger.kernel.org
712Description: 734Description:
@@ -751,6 +773,8 @@ What: /sys/.../buffer/scan_elements/in_magn_z_index
751What: /sys/.../buffer/scan_elements/in_incli_x_index 773What: /sys/.../buffer/scan_elements/in_incli_x_index
752What: /sys/.../buffer/scan_elements/in_incli_y_index 774What: /sys/.../buffer/scan_elements/in_incli_y_index
753What: /sys/.../buffer/scan_elements/in_timestamp_index 775What: /sys/.../buffer/scan_elements/in_timestamp_index
776What: /sys/.../buffer/scan_elements/in_pressureY_index
777What: /sys/.../buffer/scan_elements/in_pressure_index
754KernelVersion: 2.6.37 778KernelVersion: 2.6.37
755Contact: linux-iio@vger.kernel.org 779Contact: linux-iio@vger.kernel.org
756Description: 780Description:
diff --git a/Documentation/ABI/testing/sysfs-bus-iio-mpu6050 b/Documentation/ABI/testing/sysfs-bus-iio-mpu6050
new file mode 100644
index 000000000000..cb53737aacbf
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-iio-mpu6050
@@ -0,0 +1,13 @@
1What: /sys/bus/iio/devices/iio:deviceX/in_gyro_matrix
2What: /sys/bus/iio/devices/iio:deviceX/in_accel_matrix
3What: /sys/bus/iio/devices/iio:deviceX/in_magn_matrix
4KernelVersion: 3.4.0
5Contact: linux-iio@vger.kernel.org
6Description:
7 This is mounting matrix for motion sensors. Mounting matrix
8 is a 3x3 unitary matrix. A typical mounting matrix would look like
9 [0, 1, 0; 1, 0, 0; 0, 0, -1]. Using this information, it would be
10 easy to tell the relative positions among sensors as well as their
11 positions relative to the board that holds these sensors. Identity matrix
12 [1, 0, 0; 0, 1, 0; 0, 0, 1] means sensor chip and device are perfectly
13 aligned with each other. All axes are exactly the same.
diff --git a/Documentation/ABI/testing/sysfs-bus-mdio b/Documentation/ABI/testing/sysfs-bus-mdio
new file mode 100644
index 000000000000..6349749ebc29
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-mdio
@@ -0,0 +1,9 @@
1What: /sys/bus/mdio_bus/devices/.../phy_id
2Date: November 2012
3KernelVersion: 3.8
4Contact: netdev@vger.kernel.org
5Description:
6 This attribute contains the 32-bit PHY Identifier as reported
7 by the device during bus enumeration, encoded in hexadecimal.
8 This ID is used to match the device with the appropriate
9 driver.
diff --git a/Documentation/ABI/testing/sysfs-bus-pci b/Documentation/ABI/testing/sysfs-bus-pci
index dff1f48d252d..1ce5ae329c04 100644
--- a/Documentation/ABI/testing/sysfs-bus-pci
+++ b/Documentation/ABI/testing/sysfs-bus-pci
@@ -222,3 +222,37 @@ Description:
222 satisfied too. Reading this attribute will show the current 222 satisfied too. Reading this attribute will show the current
223 value of d3cold_allowed bit. Writing this attribute will set 223 value of d3cold_allowed bit. Writing this attribute will set
224 the value of d3cold_allowed bit. 224 the value of d3cold_allowed bit.
225
226What: /sys/bus/pci/devices/.../sriov_totalvfs
227Date: November 2012
228Contact: Donald Dutile <ddutile@redhat.com>
229Description:
230 This file appears when a physical PCIe device supports SR-IOV.
231 Userspace applications can read this file to determine the
232 maximum number of Virtual Functions (VFs) a PCIe physical
233 function (PF) can support. Typically, this is the value reported
234 in the PF's SR-IOV extended capability structure's TotalVFs
235 element. Drivers have the ability at probe time to reduce the
236 value read from this file via the pci_sriov_set_totalvfs()
237 function.
238
239What: /sys/bus/pci/devices/.../sriov_numvfs
240Date: November 2012
241Contact: Donald Dutile <ddutile@redhat.com>
242Description:
243 This file appears when a physical PCIe device supports SR-IOV.
244 Userspace applications can read and write to this file to
245 determine and control the enablement or disablement of Virtual
246 Functions (VFs) on the physical function (PF). A read of this
247 file will return the number of VFs that are enabled on this PF.
248 A number written to this file will enable the specified
249 number of VFs. A userspace application would typically read the
250 file and check that the value is zero, and then write the number
251 of VFs that should be enabled on the PF; the value written
252 should be less than or equal to the value in the sriov_totalvfs
253 file. A userspace application wanting to disable the VFs would
254 write a zero to this file. The core ensures that valid values
255 are written to this file, and returns errors when values are not
256 valid. For example, writing a 2 to this file when sriov_numvfs
257 is not 0 and not 2 already will return an error. Writing a 10
258 when the value of sriov_totalvfs is 8 will return an error.
diff --git a/Documentation/ABI/testing/sysfs-bus-rbd b/Documentation/ABI/testing/sysfs-bus-rbd
index 1cf2adf46b11..cd9213ccf3dc 100644
--- a/Documentation/ABI/testing/sysfs-bus-rbd
+++ b/Documentation/ABI/testing/sysfs-bus-rbd
@@ -70,6 +70,10 @@ snap_*
70 70
71 A directory per each snapshot 71 A directory per each snapshot
72 72
73parent
74
75 Information identifying the pool, image, and snapshot id for
76 the parent image in a layered rbd image (format 2 only).
73 77
74Entries under /sys/bus/rbd/devices/<dev-id>/snap_<snap-name> 78Entries under /sys/bus/rbd/devices/<dev-id>/snap_<snap-name>
75------------------------------------------------------------- 79-------------------------------------------------------------
diff --git a/Documentation/ABI/testing/sysfs-bus-usb b/Documentation/ABI/testing/sysfs-bus-usb
index b6fbe514a869..c8baaf53594a 100644
--- a/Documentation/ABI/testing/sysfs-bus-usb
+++ b/Documentation/ABI/testing/sysfs-bus-usb
@@ -227,3 +227,12 @@ Contact: Lan Tianyu <tianyu.lan@intel.com>
227Description: 227Description:
228 The /sys/bus/usb/devices/.../(hub interface)/portX 228 The /sys/bus/usb/devices/.../(hub interface)/portX
229 is usb port device's sysfs directory. 229 is usb port device's sysfs directory.
230
231What: /sys/bus/usb/devices/.../(hub interface)/portX/connect_type
232Date: January 2013
233Contact: Lan Tianyu <tianyu.lan@intel.com>
234Description:
235 Some platforms provide usb port connect types through ACPI.
236 This attribute is to expose these information to user space.
237 The file will read "hotplug", "wired" and "not used" if the
238 information is available, and "unknown" otherwise.
diff --git a/Documentation/ABI/testing/sysfs-class-bdi b/Documentation/ABI/testing/sysfs-class-bdi
index 5f500977b42f..d773d5697cf5 100644
--- a/Documentation/ABI/testing/sysfs-class-bdi
+++ b/Documentation/ABI/testing/sysfs-class-bdi
@@ -48,3 +48,8 @@ max_ratio (read-write)
48 most of the write-back cache. For example in case of an NFS 48 most of the write-back cache. For example in case of an NFS
49 mount that is prone to get stuck, or a FUSE mount which cannot 49 mount that is prone to get stuck, or a FUSE mount which cannot
50 be trusted to play fair. 50 be trusted to play fair.
51
52stable_pages_required (read-only)
53
54 If set, the backing device requires that all pages comprising a write
55 request must not be changed until writeout is complete.
diff --git a/Documentation/ABI/testing/sysfs-class-devfreq b/Documentation/ABI/testing/sysfs-class-devfreq
index 23d78b5aab11..0ba6ea2f89d9 100644
--- a/Documentation/ABI/testing/sysfs-class-devfreq
+++ b/Documentation/ABI/testing/sysfs-class-devfreq
@@ -11,7 +11,7 @@ What: /sys/class/devfreq/.../governor
11Date: September 2011 11Date: September 2011
12Contact: MyungJoo Ham <myungjoo.ham@samsung.com> 12Contact: MyungJoo Ham <myungjoo.ham@samsung.com>
13Description: 13Description:
14 The /sys/class/devfreq/.../governor shows the name of the 14 The /sys/class/devfreq/.../governor show or set the name of the
15 governor used by the corresponding devfreq object. 15 governor used by the corresponding devfreq object.
16 16
17What: /sys/class/devfreq/.../cur_freq 17What: /sys/class/devfreq/.../cur_freq
@@ -19,15 +19,16 @@ Date: September 2011
19Contact: MyungJoo Ham <myungjoo.ham@samsung.com> 19Contact: MyungJoo Ham <myungjoo.ham@samsung.com>
20Description: 20Description:
21 The /sys/class/devfreq/.../cur_freq shows the current 21 The /sys/class/devfreq/.../cur_freq shows the current
22 frequency of the corresponding devfreq object. 22 frequency of the corresponding devfreq object. Same as
23 target_freq when get_cur_freq() is not implemented by
24 devfreq driver.
23 25
24What: /sys/class/devfreq/.../central_polling 26What: /sys/class/devfreq/.../target_freq
25Date: September 2011 27Date: September 2012
26Contact: MyungJoo Ham <myungjoo.ham@samsung.com> 28Contact: Rajagopal Venkat <rajagopal.venkat@linaro.org>
27Description: 29Description:
28 The /sys/class/devfreq/.../central_polling shows whether 30 The /sys/class/devfreq/.../target_freq shows the next governor
29 the devfreq ojbect is using devfreq-provided central 31 predicted target frequency of the corresponding devfreq object.
30 polling mechanism or not.
31 32
32What: /sys/class/devfreq/.../polling_interval 33What: /sys/class/devfreq/.../polling_interval
33Date: September 2011 34Date: September 2011
@@ -43,6 +44,17 @@ Description:
43 (/sys/class/devfreq/.../central_polling is 0), this value 44 (/sys/class/devfreq/.../central_polling is 0), this value
44 may be useless. 45 may be useless.
45 46
47What: /sys/class/devfreq/.../trans_stat
48Date: October 2012
49Contact: MyungJoo Ham <myungjoo.ham@samsung.com>
50Descrtiption:
51 This ABI shows the statistics of devfreq behavior on a
52 specific device. It shows the time spent in each state and
53 the number of transitions between states.
54 In order to activate this ABI, the devfreq target device
55 driver should provide the list of available frequencies
56 with its profile.
57
46What: /sys/class/devfreq/.../userspace/set_freq 58What: /sys/class/devfreq/.../userspace/set_freq
47Date: September 2011 59Date: September 2011
48Contact: MyungJoo Ham <myungjoo.ham@samsung.com> 60Contact: MyungJoo Ham <myungjoo.ham@samsung.com>
@@ -50,3 +62,19 @@ Description:
50 The /sys/class/devfreq/.../userspace/set_freq shows and 62 The /sys/class/devfreq/.../userspace/set_freq shows and
51 sets the requested frequency for the devfreq object if 63 sets the requested frequency for the devfreq object if
52 userspace governor is in effect. 64 userspace governor is in effect.
65
66What: /sys/class/devfreq/.../available_frequencies
67Date: October 2012
68Contact: Nishanth Menon <nm@ti.com>
69Description:
70 The /sys/class/devfreq/.../available_frequencies shows
71 the available frequencies of the corresponding devfreq object.
72 This is a snapshot of available frequencies and not limited
73 by the min/max frequency restrictions.
74
75What: /sys/class/devfreq/.../available_governors
76Date: October 2012
77Contact: Nishanth Menon <nm@ti.com>
78Description:
79 The /sys/class/devfreq/.../available_governors shows
80 currently available governors in the system.
diff --git a/Documentation/ABI/testing/sysfs-class-net-batman-adv b/Documentation/ABI/testing/sysfs-class-net-batman-adv
index 38dd762def4b..bdc00707c751 100644
--- a/Documentation/ABI/testing/sysfs-class-net-batman-adv
+++ b/Documentation/ABI/testing/sysfs-class-net-batman-adv
@@ -1,4 +1,10 @@
1 1
2What: /sys/class/net/<iface>/batman-adv/iface_status
3Date: May 2010
4Contact: Marek Lindner <lindner_marek@yahoo.de>
5Description:
6 Indicates the status of <iface> as it is seen by batman.
7
2What: /sys/class/net/<iface>/batman-adv/mesh_iface 8What: /sys/class/net/<iface>/batman-adv/mesh_iface
3Date: May 2010 9Date: May 2010
4Contact: Marek Lindner <lindner_marek@yahoo.de> 10Contact: Marek Lindner <lindner_marek@yahoo.de>
@@ -7,8 +13,3 @@ Description:
7 displays the batman mesh interface this <iface> 13 displays the batman mesh interface this <iface>
8 currently is associated with. 14 currently is associated with.
9 15
10What: /sys/class/net/<iface>/batman-adv/iface_status
11Date: May 2010
12Contact: Marek Lindner <lindner_marek@yahoo.de>
13Description:
14 Indicates the status of <iface> as it is seen by batman.
diff --git a/Documentation/ABI/testing/sysfs-class-net-grcan b/Documentation/ABI/testing/sysfs-class-net-grcan
new file mode 100644
index 000000000000..f418c92ca555
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-net-grcan
@@ -0,0 +1,35 @@
1
2What: /sys/class/net/<iface>/grcan/enable0
3Date: October 2012
4KernelVersion: 3.8
5Contact: Andreas Larsson <andreas@gaisler.com>
6Description:
7 Hardware configuration of physical interface 0. This file reads
8 and writes the "Enable 0" bit of the configuration register.
9 Possible values: 0 or 1. See the GRCAN chapter of the GRLIB IP
10 core library documentation for details. The default value is 0
11 or set by the module parameter grcan.enable0 and can be read at
12 /sys/module/grcan/parameters/enable0.
13
14What: /sys/class/net/<iface>/grcan/enable1
15Date: October 2012
16KernelVersion: 3.8
17Contact: Andreas Larsson <andreas@gaisler.com>
18Description:
19 Hardware configuration of physical interface 1. This file reads
20 and writes the "Enable 1" bit of the configuration register.
21 Possible values: 0 or 1. See the GRCAN chapter of the GRLIB IP
22 core library documentation for details. The default value is 0
23 or set by the module parameter grcan.enable1 and can be read at
24 /sys/module/grcan/parameters/enable1.
25
26What: /sys/class/net/<iface>/grcan/select
27Date: October 2012
28KernelVersion: 3.8
29Contact: Andreas Larsson <andreas@gaisler.com>
30Description:
31 Configuration of which physical interface to be used. Possible
32 values: 0 or 1. See the GRCAN chapter of the GRLIB IP core
33 library documentation for details. The default value is 0 or is
34 set by the module parameter grcan.select and can be read at
35 /sys/module/grcan/parameters/select.
diff --git a/Documentation/ABI/testing/sysfs-class-net-mesh b/Documentation/ABI/testing/sysfs-class-net-mesh
index c81fe89c4c46..bc41da61608d 100644
--- a/Documentation/ABI/testing/sysfs-class-net-mesh
+++ b/Documentation/ABI/testing/sysfs-class-net-mesh
@@ -6,6 +6,14 @@ Description:
6 Indicates whether the batman protocol messages of the 6 Indicates whether the batman protocol messages of the
7 mesh <mesh_iface> shall be aggregated or not. 7 mesh <mesh_iface> shall be aggregated or not.
8 8
9What: /sys/class/net/<mesh_iface>/mesh/ap_isolation
10Date: May 2011
11Contact: Antonio Quartulli <ordex@autistici.org>
12Description:
13 Indicates whether the data traffic going from a
14 wireless client to another wireless client will be
15 silently dropped.
16
9What: /sys/class/net/<mesh_iface>/mesh/bonding 17What: /sys/class/net/<mesh_iface>/mesh/bonding
10Date: June 2010 18Date: June 2010
11Contact: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> 19Contact: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
@@ -31,14 +39,6 @@ Description:
31 mesh will be fragmented or silently discarded if the 39 mesh will be fragmented or silently discarded if the
32 packet size exceeds the outgoing interface MTU. 40 packet size exceeds the outgoing interface MTU.
33 41
34What: /sys/class/net/<mesh_iface>/mesh/ap_isolation
35Date: May 2011
36Contact: Antonio Quartulli <ordex@autistici.org>
37Description:
38 Indicates whether the data traffic going from a
39 wireless client to another wireless client will be
40 silently dropped.
41
42What: /sys/class/net/<mesh_iface>/mesh/gw_bandwidth 42What: /sys/class/net/<mesh_iface>/mesh/gw_bandwidth
43Date: October 2010 43Date: October 2010
44Contact: Marek Lindner <lindner_marek@yahoo.de> 44Contact: Marek Lindner <lindner_marek@yahoo.de>
@@ -60,6 +60,13 @@ Description:
60 Defines the selection criteria this node will use 60 Defines the selection criteria this node will use
61 to choose a gateway if gw_mode was set to 'client'. 61 to choose a gateway if gw_mode was set to 'client'.
62 62
63What: /sys/class/net/<mesh_iface>/mesh/hop_penalty
64Date: Oct 2010
65Contact: Linus Lüssing <linus.luessing@web.de>
66Description:
67 Defines the penalty which will be applied to an
68 originator message's tq-field on every hop.
69
63What: /sys/class/net/<mesh_iface>/mesh/orig_interval 70What: /sys/class/net/<mesh_iface>/mesh/orig_interval
64Date: May 2010 71Date: May 2010
65Contact: Marek Lindner <lindner_marek@yahoo.de> 72Contact: Marek Lindner <lindner_marek@yahoo.de>
@@ -67,19 +74,12 @@ Description:
67 Defines the interval in milliseconds in which batman 74 Defines the interval in milliseconds in which batman
68 sends its protocol messages. 75 sends its protocol messages.
69 76
70What: /sys/class/net/<mesh_iface>/mesh/hop_penalty 77What: /sys/class/net/<mesh_iface>/mesh/routing_algo
71Date: Oct 2010 78Date: Dec 2011
72Contact: Linus Lüssing <linus.luessing@web.de> 79Contact: Marek Lindner <lindner_marek@yahoo.de>
73Description:
74 Defines the penalty which will be applied to an
75 originator message's tq-field on every hop.
76
77What: /sys/class/net/<mesh_iface>/mesh/routing_algo
78Date: Dec 2011
79Contact: Marek Lindner <lindner_marek@yahoo.de>
80Description: 80Description:
81 Defines the routing procotol this mesh instance 81 Defines the routing procotol this mesh instance
82 uses to find the optimal paths through the mesh. 82 uses to find the optimal paths through the mesh.
83 83
84What: /sys/class/net/<mesh_iface>/mesh/vis_mode 84What: /sys/class/net/<mesh_iface>/mesh/vis_mode
85Date: May 2010 85Date: May 2010
diff --git a/Documentation/ABI/testing/sysfs-devices-node b/Documentation/ABI/testing/sysfs-devices-node
deleted file mode 100644
index 453a210c3ceb..000000000000
--- a/Documentation/ABI/testing/sysfs-devices-node
+++ /dev/null
@@ -1,7 +0,0 @@
1What: /sys/devices/system/node/nodeX/compact
2Date: February 2010
3Contact: Mel Gorman <mel@csn.ul.ie>
4Description:
5 When this file is written to, all memory within that node
6 will be compacted. When it completes, memory will be freed
7 into blocks which have as many contiguous pages as possible
diff --git a/Documentation/ABI/testing/sysfs-devices-power b/Documentation/ABI/testing/sysfs-devices-power
index 45000f0db4d4..9d43e7670841 100644
--- a/Documentation/ABI/testing/sysfs-devices-power
+++ b/Documentation/ABI/testing/sysfs-devices-power
@@ -164,7 +164,7 @@ Contact: Rafael J. Wysocki <rjw@sisk.pl>
164Description: 164Description:
165 The /sys/devices/.../wakeup_prevent_sleep_time_ms attribute 165 The /sys/devices/.../wakeup_prevent_sleep_time_ms attribute
166 contains the total time the device has been preventing 166 contains the total time the device has been preventing
167 opportunistic transitions to sleep states from occuring. 167 opportunistic transitions to sleep states from occurring.
168 This attribute is read-only. If the device is not enabled to 168 This attribute is read-only. If the device is not enabled to
169 wake up the system from sleep states, this attribute is not 169 wake up the system from sleep states, this attribute is not
170 present. 170 present.
@@ -204,3 +204,34 @@ Description:
204 204
205 This attribute has no effect on system-wide suspend/resume and 205 This attribute has no effect on system-wide suspend/resume and
206 hibernation. 206 hibernation.
207
208What: /sys/devices/.../power/pm_qos_no_power_off
209Date: September 2012
210Contact: Rafael J. Wysocki <rjw@sisk.pl>
211Description:
212 The /sys/devices/.../power/pm_qos_no_power_off attribute
213 is used for manipulating the PM QoS "no power off" flag. If
214 set, this flag indicates to the kernel that power should not
215 be removed entirely from the device.
216
217 Not all drivers support this attribute. If it isn't supported,
218 it is not present.
219
220 This attribute has no effect on system-wide suspend/resume and
221 hibernation.
222
223What: /sys/devices/.../power/pm_qos_remote_wakeup
224Date: September 2012
225Contact: Rafael J. Wysocki <rjw@sisk.pl>
226Description:
227 The /sys/devices/.../power/pm_qos_remote_wakeup attribute
228 is used for manipulating the PM QoS "remote wakeup required"
229 flag. If set, this flag indicates to the kernel that the
230 device is a source of user events that have to be signaled from
231 its low-power states.
232
233 Not all drivers support this attribute. If it isn't supported,
234 it is not present.
235
236 This attribute has no effect on system-wide suspend/resume and
237 hibernation.
diff --git a/Documentation/ABI/testing/sysfs-devices-power_resources_D0 b/Documentation/ABI/testing/sysfs-devices-power_resources_D0
new file mode 100644
index 000000000000..73b77a6be196
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-devices-power_resources_D0
@@ -0,0 +1,13 @@
1What: /sys/devices/.../power_resources_D0/
2Date: January 2013
3Contact: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
4Description:
5 The /sys/devices/.../power_resources_D0/ directory is only
6 present for device objects representing ACPI device nodes that
7 use ACPI power resources for power management.
8
9 If present, it contains symbolic links to device directories
10 representing ACPI power resources that need to be turned on for
11 the given device node to be in ACPI power state D0. The names
12 of the links are the same as the names of the directories they
13 point to.
diff --git a/Documentation/ABI/testing/sysfs-devices-power_resources_D1 b/Documentation/ABI/testing/sysfs-devices-power_resources_D1
new file mode 100644
index 000000000000..30c20703fb8c
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-devices-power_resources_D1
@@ -0,0 +1,14 @@
1What: /sys/devices/.../power_resources_D1/
2Date: January 2013
3Contact: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
4Description:
5 The /sys/devices/.../power_resources_D1/ directory is only
6 present for device objects representing ACPI device nodes that
7 use ACPI power resources for power management and support ACPI
8 power state D1.
9
10 If present, it contains symbolic links to device directories
11 representing ACPI power resources that need to be turned on for
12 the given device node to be in ACPI power state D1. The names
13 of the links are the same as the names of the directories they
14 point to.
diff --git a/Documentation/ABI/testing/sysfs-devices-power_resources_D2 b/Documentation/ABI/testing/sysfs-devices-power_resources_D2
new file mode 100644
index 000000000000..fd9d84b421e1
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-devices-power_resources_D2
@@ -0,0 +1,14 @@
1What: /sys/devices/.../power_resources_D2/
2Date: January 2013
3Contact: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
4Description:
5 The /sys/devices/.../power_resources_D2/ directory is only
6 present for device objects representing ACPI device nodes that
7 use ACPI power resources for power management and support ACPI
8 power state D2.
9
10 If present, it contains symbolic links to device directories
11 representing ACPI power resources that need to be turned on for
12 the given device node to be in ACPI power state D2. The names
13 of the links are the same as the names of the directories they
14 point to.
diff --git a/Documentation/ABI/testing/sysfs-devices-power_resources_D3hot b/Documentation/ABI/testing/sysfs-devices-power_resources_D3hot
new file mode 100644
index 000000000000..3df32c20addf
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-devices-power_resources_D3hot
@@ -0,0 +1,14 @@
1What: /sys/devices/.../power_resources_D3hot/
2Date: January 2013
3Contact: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
4Description:
5 The /sys/devices/.../power_resources_D3hot/ directory is only
6 present for device objects representing ACPI device nodes that
7 use ACPI power resources for power management and support ACPI
8 power state D3hot.
9
10 If present, it contains symbolic links to device directories
11 representing ACPI power resources that need to be turned on for
12 the given device node to be in ACPI power state D3hot. The
13 names of the links are the same as the names of the directories
14 they point to.
diff --git a/Documentation/ABI/testing/sysfs-devices-power_state b/Documentation/ABI/testing/sysfs-devices-power_state
new file mode 100644
index 000000000000..7ad9546748f0
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-devices-power_state
@@ -0,0 +1,20 @@
1What: /sys/devices/.../power_state
2Date: January 2013
3Contact: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
4Description:
5 The /sys/devices/.../power_state attribute is only present for
6 device objects representing ACPI device nodes that provide power
7 management methods.
8
9 If present, it contains a string representing the current ACPI
10 power state of the given device node. Its possible values,
11 "D0", "D1", "D2", "D3hot", and "D3cold", reflect the power state
12 names defined by the ACPI specification (ACPI 4 and above).
13
14 If the device node uses shared ACPI power resources, this state
15 determines a list of power resources required not to be turned
16 off. However, some power resources needed by the device node in
17 higher-power (lower-number) states may also be ON because of
18 some other devices using them at the moment.
19
20 This attribute is read-only.
diff --git a/Documentation/ABI/testing/sysfs-devices-real_power_state b/Documentation/ABI/testing/sysfs-devices-real_power_state
new file mode 100644
index 000000000000..8b3527c82a7d
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-devices-real_power_state
@@ -0,0 +1,23 @@
1What: /sys/devices/.../real_power_state
2Date: January 2013
3Contact: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
4Description:
5 The /sys/devices/.../real_power_state attribute is only present
6 for device objects representing ACPI device nodes that provide
7 power management methods and use ACPI power resources for power
8 management.
9
10 If present, it contains a string representing the real ACPI
11 power state of the given device node as returned by the _PSC
12 control method or inferred from the configuration of power
13 resources. Its possible values, "D0", "D1", "D2", "D3hot", and
14 "D3cold", reflect the power state names defined by the ACPI
15 specification (ACPI 4 and above).
16
17 In some situations the value of this attribute may be different
18 from the value of the /sys/devices/.../power_state attribute for
19 the same device object. If that happens, some shared power
20 resources used by the device node are only ON because of some
21 other devices using them at the moment.
22
23 This attribute is read-only.
diff --git a/Documentation/ABI/testing/sysfs-devices-resource_in_use b/Documentation/ABI/testing/sysfs-devices-resource_in_use
new file mode 100644
index 000000000000..b4a3bc5922a3
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-devices-resource_in_use
@@ -0,0 +1,12 @@
1What: /sys/devices/.../resource_in_use
2Date: January 2013
3Contact: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
4Description:
5 The /sys/devices/.../resource_in_use attribute is only present
6 for device objects representing ACPI power resources.
7
8 If present, it contains a number (0 or 1) representing the
9 current status of the given power resource (0 means that the
10 resource is not in use and therefore it has been turned off).
11
12 This attribute is read-only.
diff --git a/Documentation/ABI/testing/sysfs-devices-sun b/Documentation/ABI/testing/sysfs-devices-sun
new file mode 100644
index 000000000000..86be9848a77e
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-devices-sun
@@ -0,0 +1,14 @@
1Whatt: /sys/devices/.../sun
2Date: October 2012
3Contact: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
4Description:
5 The file contains a Slot-unique ID which provided by the _SUN
6 method in the ACPI namespace. The value is written in Advanced
7 Configuration and Power Interface Specification as follows:
8
9 "The _SUN value is required to be unique among the slots of
10 the same type. It is also recommended that this number match
11 the slot number printed on the physical slot whenever possible."
12
13 So reading the sysfs file, we can identify a physical position
14 of the slot in the system.
diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu
index 6943133afcb8..9c978dcae07d 100644
--- a/Documentation/ABI/testing/sysfs-devices-system-cpu
+++ b/Documentation/ABI/testing/sysfs-devices-system-cpu
@@ -67,20 +67,6 @@ Description: Discover NUMA node a CPU belongs to
67 /sys/devices/system/cpu/cpu42/node2 -> ../../node/node2 67 /sys/devices/system/cpu/cpu42/node2 -> ../../node/node2
68 68
69 69
70What: /sys/devices/system/cpu/cpu#/node
71Date: October 2009
72Contact: Linux memory management mailing list <linux-mm@kvack.org>
73Description: Discover NUMA node a CPU belongs to
74
75 When CONFIG_NUMA is enabled, a symbolic link that points
76 to the corresponding NUMA node directory.
77
78 For example, the following symlink is created for cpu42
79 in NUMA node 2:
80
81 /sys/devices/system/cpu/cpu42/node2 -> ../../node/node2
82
83
84What: /sys/devices/system/cpu/cpu#/topology/core_id 70What: /sys/devices/system/cpu/cpu#/topology/core_id
85 /sys/devices/system/cpu/cpu#/topology/core_siblings 71 /sys/devices/system/cpu/cpu#/topology/core_siblings
86 /sys/devices/system/cpu/cpu#/topology/core_siblings_list 72 /sys/devices/system/cpu/cpu#/topology/core_siblings_list
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-isku b/Documentation/ABI/testing/sysfs-driver-hid-roccat-isku
index 189dc43891bf..9eca5a182e64 100644
--- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-isku
+++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-isku
@@ -117,6 +117,14 @@ Description: When written, this file lets one store macros with max 500
117 which profile and key to read. 117 which profile and key to read.
118Users: http://roccat.sourceforge.net 118Users: http://roccat.sourceforge.net
119 119
120What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/isku/roccatisku<minor>/reset
121Date: November 2012
122Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
123Description: When written, this file lets one reset the device.
124 The data has to be 3 bytes long.
125 This file is writeonly.
126Users: http://roccat.sourceforge.net
127
120What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/isku/roccatisku<minor>/control 128What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/isku/roccatisku<minor>/control
121Date: June 2011 129Date: June 2011
122Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 130Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus b/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus
index 65e6e5dd67e8..7bd776f9c3c7 100644
--- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus
+++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus
@@ -9,15 +9,12 @@ Description: The integer value of this attribute ranges from 0-4.
9 and the mouse activates this profile immediately. 9 and the mouse activates this profile immediately.
10Users: http://roccat.sourceforge.net 10Users: http://roccat.sourceforge.net
11 11
12What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/firmware_version 12What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/info
13Date: October 2010 13Date: November 2012
14Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 14Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
15Description: When read, this file returns the raw integer version number of the 15Description: When read, this file returns general data like firmware version.
16 firmware reported by the mouse. Using the integer value eases 16 When written, the device can be reset.
17 further usage in other programs. To receive the real version 17 The data is 8 bytes long.
18 number the decimal point has to be shifted 2 positions to the
19 left. E.g. a returned value of 121 means 1.21
20 This file is readonly.
21Users: http://roccat.sourceforge.net 18Users: http://roccat.sourceforge.net
22 19
23What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/macro 20What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/macro
@@ -42,18 +39,8 @@ Description: The mouse can store 5 profiles which can be switched by the
42 The mouse will reject invalid data. 39 The mouse will reject invalid data.
43 Which profile to write is determined by the profile number 40 Which profile to write is determined by the profile number
44 contained in the data. 41 contained in the data.
45 This file is writeonly. 42 Before reading this file, control has to be written to select
46Users: http://roccat.sourceforge.net 43 which profile to read.
47
48What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile[1-5]_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 read, these files return the respective profile buttons.
55 The returned data is 77 bytes in size.
56 This file is readonly.
57Users: http://roccat.sourceforge.net 44Users: http://roccat.sourceforge.net
58 45
59What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile_settings 46What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile_settings
@@ -68,19 +55,8 @@ Description: The mouse can store 5 profiles which can be switched by the
68 The mouse will reject invalid data. 55 The mouse will reject invalid data.
69 Which profile to write is determined by the profile number 56 Which profile to write is determined by the profile number
70 contained in the data. 57 contained in the data.
71 This file is writeonly. 58 Before reading this file, control has to be written to select
72Users: http://roccat.sourceforge.net 59 which profile to read.
73
74What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile[1-5]_settings
75Date: August 2010
76Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
77Description: The mouse can store 5 profiles which can be switched by the
78 press of a button. A profile is split in settings and buttons.
79 profile_settings holds information like resolution, sensitivity
80 and light effects.
81 When read, these files return the respective profile settings.
82 The returned data is 43 bytes in size.
83 This file is readonly.
84Users: http://roccat.sourceforge.net 60Users: http://roccat.sourceforge.net
85 61
86What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/sensor 62What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/sensor
@@ -104,9 +80,9 @@ What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-
104Date: October 2010 80Date: October 2010
105Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 81Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
106Description: When written a calibration process for the tracking control unit 82Description: When written a calibration process for the tracking control unit
107 can be initiated/cancelled. 83 can be initiated/cancelled. Also lets one read/write sensor
108 The data has to be 3 bytes long. 84 registers.
109 This file is writeonly. 85 The data has to be 4 bytes long.
110Users: http://roccat.sourceforge.net 86Users: http://roccat.sourceforge.net
111 87
112What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/tcu_image 88What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/tcu_image
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus b/Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus
index 20f937c9d84f..a10404f15a54 100644
--- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus
+++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus
@@ -1,12 +1,3 @@
1What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/actual_cpi
2Date: January 2011
3Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
4Description: The integer value of this attribute ranges from 1-4.
5 When read, this attribute returns the number of the active
6 cpi level.
7 This file is readonly.
8Users: http://roccat.sourceforge.net
9
10What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/actual_profile 1What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/actual_profile
11Date: January 2011 2Date: January 2011
12Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 3Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
@@ -18,33 +9,12 @@ Description: The integer value of this attribute ranges from 0-4.
18 active when the mouse is powered on. 9 active when the mouse is powered on.
19Users: http://roccat.sourceforge.net 10Users: http://roccat.sourceforge.net
20 11
21What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/actual_sensitivity_x 12What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/info
22Date: January 2011 13Date: November 2012
23Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 14Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
24Description: The integer value of this attribute ranges from 1-10. 15Description: When read, this file returns general data like firmware version.
25 When read, this attribute returns the number of the actual 16 When written, the device can be reset.
26 sensitivity in x direction. 17 The data is 6 bytes long.
27 This file is readonly.
28Users: http://roccat.sourceforge.net
29
30What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/actual_sensitivity_y
31Date: January 2011
32Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
33Description: The integer value of this attribute ranges from 1-10.
34 When read, this attribute returns the number of the actual
35 sensitivity in y direction.
36 This file is readonly.
37Users: http://roccat.sourceforge.net
38
39What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/firmware_version
40Date: January 2011
41Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
42Description: When read, this file returns the raw integer version number of the
43 firmware reported by the mouse. Using the integer value eases
44 further usage in other programs. To receive the real version
45 number the decimal point has to be shifted 2 positions to the
46 left. E.g. a returned value of 121 means 1.21
47 This file is readonly.
48Users: http://roccat.sourceforge.net 18Users: http://roccat.sourceforge.net
49 19
50What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile_buttons 20What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile_buttons
@@ -58,18 +28,8 @@ Description: The mouse can store 5 profiles which can be switched by the
58 The mouse will reject invalid data. 28 The mouse will reject invalid data.
59 Which profile to write is determined by the profile number 29 Which profile to write is determined by the profile number
60 contained in the data. 30 contained in the data.
61 This file is writeonly. 31 Before reading this file, control has to be written to select
62Users: http://roccat.sourceforge.net 32 which profile to read.
63
64What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile[1-5]_buttons
65Date: January 2011
66Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
67Description: The mouse can store 5 profiles which can be switched by the
68 press of a button. A profile is split in settings and buttons.
69 profile_buttons holds information about button layout.
70 When read, these files return the respective profile buttons.
71 The returned data is 23 bytes in size.
72 This file is readonly.
73Users: http://roccat.sourceforge.net 33Users: http://roccat.sourceforge.net
74 34
75What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile_settings 35What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile_settings
@@ -84,17 +44,6 @@ Description: The mouse can store 5 profiles which can be switched by the
84 The mouse will reject invalid data. 44 The mouse will reject invalid data.
85 Which profile to write is determined by the profile number 45 Which profile to write is determined by the profile number
86 contained in the data. 46 contained in the data.
87 This file is writeonly. 47 Before reading this file, control has to be written to select
88Users: http://roccat.sourceforge.net 48 which profile to read.
89
90What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile[1-5]_settings
91Date: January 2011
92Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
93Description: The mouse can store 5 profiles which can be switched by the
94 press of a button. A profile is split in settings and buttons.
95 profile_settings holds information like resolution, sensitivity
96 and light effects.
97 When read, these files return the respective profile settings.
98 The returned data is 16 bytes in size.
99 This file is readonly.
100Users: http://roccat.sourceforge.net 49Users: http://roccat.sourceforge.net
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-lua b/Documentation/ABI/testing/sysfs-driver-hid-roccat-lua
new file mode 100644
index 000000000000..31c6c4c8ba2b
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-lua
@@ -0,0 +1,7 @@
1What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/control
2Date: October 2012
3Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
4Description: When written, cpi, button and light settings can be configured.
5 When read, actual cpi setting and sensor data are returned.
6 The data has to be 8 bytes long.
7Users: http://roccat.sourceforge.net
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra b/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra
index 3f8de50e4ff1..9fa9de30d14b 100644
--- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra
+++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra
@@ -1,37 +1,9 @@
1What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/actual_cpi 1What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/info
2Date: August 2010 2Date: November 2012
3Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
4Description: It is possible to switch the cpi setting of the mouse with the
5 press of a button.
6 When read, this file returns the raw number of the actual cpi
7 setting reported by the mouse. This number has to be further
8 processed to receive the real dpi value.
9
10 VALUE DPI
11 1 400
12 2 800
13 4 1600
14
15 This file is readonly.
16Users: http://roccat.sourceforge.net
17
18What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/actual_profile
19Date: August 2010
20Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 3Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
21Description: When read, this file returns the number of the actual profile in 4Description: When read, this file returns general data like firmware version.
22 range 0-4. 5 When written, the device can be reset.
23 This file is readonly. 6 The data is 6 bytes long.
24Users: http://roccat.sourceforge.net
25
26What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/firmware_version
27Date: August 2010
28Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
29Description: When read, this file returns the raw integer version number of the
30 firmware reported by the mouse. Using the integer value eases
31 further usage in other programs. To receive the real version
32 number the decimal point has to be shifted 2 positions to the
33 left. E.g. a returned value of 138 means 1.38
34 This file is readonly.
35Users: http://roccat.sourceforge.net 7Users: http://roccat.sourceforge.net
36 8
37What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile_settings 9What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile_settings
@@ -46,19 +18,8 @@ Description: The mouse can store 5 profiles which can be switched by the
46 The mouse will reject invalid data. 18 The mouse will reject invalid data.
47 Which profile to write is determined by the profile number 19 Which profile to write is determined by the profile number
48 contained in the data. 20 contained in the data.
49 This file is writeonly. 21 Before reading this file, control has to be written to select
50Users: http://roccat.sourceforge.net 22 which profile to read.
51
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
53Date: August 2010
54Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
55Description: The mouse can store 5 profiles which can be switched by the
56 press of a button. A profile is split in settings and buttons.
57 profile_settings holds information like resolution, sensitivity
58 and light effects.
59 When read, these files return the respective profile settings.
60 The returned data is 13 bytes in size.
61 This file is readonly.
62Users: http://roccat.sourceforge.net 23Users: http://roccat.sourceforge.net
63 24
64What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile_buttons 25What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile_buttons
@@ -72,27 +33,8 @@ Description: The mouse can store 5 profiles which can be switched by the
72 The mouse will reject invalid data. 33 The mouse will reject invalid data.
73 Which profile to write is determined by the profile number 34 Which profile to write is determined by the profile number
74 contained in the data. 35 contained in the data.
75 This file is writeonly. 36 Before reading this file, control has to be written to select
76Users: http://roccat.sourceforge.net 37 which profile to read.
77
78What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile[1-5]_buttons
79Date: August 2010
80Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
81Description: The mouse can store 5 profiles which can be switched by the
82 press of a button. A profile is split in settings and buttons.
83 profile_buttons holds information about button layout.
84 When read, these files return the respective profile buttons.
85 The returned data is 19 bytes in size.
86 This file is readonly.
87Users: http://roccat.sourceforge.net
88
89What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/startup_profile
90Date: August 2010
91Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
92Description: The integer value of this attribute ranges from 0-4.
93 When read, this attribute returns the number of the profile
94 that's active when the mouse is powered on.
95 This file is readonly.
96Users: http://roccat.sourceforge.net 38Users: http://roccat.sourceforge.net
97 39
98What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/settings 40What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/settings
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-savu b/Documentation/ABI/testing/sysfs-driver-hid-roccat-savu
index b42922cf6b1f..f1e02a98bd9d 100644
--- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-savu
+++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-savu
@@ -40,8 +40,8 @@ What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-
40Date: Mai 2012 40Date: Mai 2012
41Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 41Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
42Description: When read, this file returns general data like firmware version. 42Description: When read, this file returns general data like firmware version.
43 When written, the device can be reset.
43 The data is 8 bytes long. 44 The data is 8 bytes long.
44 This file is readonly.
45Users: http://roccat.sourceforge.net 45Users: http://roccat.sourceforge.net
46 46
47What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/savu/roccatsavu<minor>/macro 47What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/savu/roccatsavu<minor>/macro
@@ -74,4 +74,3 @@ Description: The mouse has a Avago ADNS-3090 sensor.
74 This file allows reading and writing of the mouse sensors registers. 74 This file allows reading and writing of the mouse sensors registers.
75 The data has to be 4 bytes long. 75 The data has to be 4 bytes long.
76Users: http://roccat.sourceforge.net 76Users: http://roccat.sourceforge.net
77
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-srws1 b/Documentation/ABI/testing/sysfs-driver-hid-srws1
new file mode 100644
index 000000000000..d0eba70c7d40
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-driver-hid-srws1
@@ -0,0 +1,21 @@
1What: /sys/class/leds/SRWS1::<serial>::RPM1
2What: /sys/class/leds/SRWS1::<serial>::RPM2
3What: /sys/class/leds/SRWS1::<serial>::RPM3
4What: /sys/class/leds/SRWS1::<serial>::RPM4
5What: /sys/class/leds/SRWS1::<serial>::RPM5
6What: /sys/class/leds/SRWS1::<serial>::RPM6
7What: /sys/class/leds/SRWS1::<serial>::RPM7
8What: /sys/class/leds/SRWS1::<serial>::RPM8
9What: /sys/class/leds/SRWS1::<serial>::RPM9
10What: /sys/class/leds/SRWS1::<serial>::RPM10
11What: /sys/class/leds/SRWS1::<serial>::RPM11
12What: /sys/class/leds/SRWS1::<serial>::RPM12
13What: /sys/class/leds/SRWS1::<serial>::RPM13
14What: /sys/class/leds/SRWS1::<serial>::RPM14
15What: /sys/class/leds/SRWS1::<serial>::RPM15
16What: /sys/class/leds/SRWS1::<serial>::RPMALL
17Date: Jan 2013
18KernelVersion: 3.9
19Contact: Simon Wood <simon@mungewell.org>
20Description: Provides a control for turning on/off the LEDs which form
21 an RPM meter on the front of the controller
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-thingm b/Documentation/ABI/testing/sysfs-driver-hid-thingm
new file mode 100644
index 000000000000..abcffeedd20a
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-driver-hid-thingm
@@ -0,0 +1,23 @@
1What: /sys/class/leds/blink1::<serial>/rgb
2Date: January 2013
3Contact: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
4Description: The ThingM blink1 is an USB RGB LED. The color notation is
5 3-byte hexadecimal. Read this attribute to get the last set
6 color. Write the 24-bit hexadecimal color to change the current
7 LED color. The default color is full white (0xFFFFFF).
8 For instance, set the color to green with: echo 00FF00 > rgb
9
10What: /sys/class/leds/blink1::<serial>/fade
11Date: January 2013
12Contact: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
13Description: This attribute allows to set a fade time in milliseconds for
14 the next color change. Read the attribute to know the current
15 fade time. The default value is set to 0 (no fade time). For
16 instance, set a fade time of 2 seconds with: echo 2000 > fade
17
18What: /sys/class/leds/blink1::<serial>/play
19Date: January 2013
20Contact: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
21Description: This attribute is used to play/pause the light patterns. Write 1
22 to start playing, 0 to stop. Reading this attribute returns the
23 current playing status.
diff --git a/Documentation/ABI/testing/sysfs-driver-ppi b/Documentation/ABI/testing/sysfs-driver-ppi
index 97a003ee058b..7d1435bc976c 100644
--- a/Documentation/ABI/testing/sysfs-driver-ppi
+++ b/Documentation/ABI/testing/sysfs-driver-ppi
@@ -5,7 +5,7 @@ Contact: xiaoyan.zhang@intel.com
5Description: 5Description:
6 This folder includes the attributes related with PPI (Physical 6 This folder includes the attributes related with PPI (Physical
7 Presence Interface). Only if TPM is supported by BIOS, this 7 Presence Interface). Only if TPM is supported by BIOS, this
8 folder makes sence. 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 http://www.trustedcomputinggroup.org/ 11 http://www.trustedcomputinggroup.org/
diff --git a/Documentation/ABI/testing/sysfs-kernel-mm-ksm b/Documentation/ABI/testing/sysfs-kernel-mm-ksm
new file mode 100644
index 000000000000..73e653ee2481
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-kernel-mm-ksm
@@ -0,0 +1,52 @@
1What: /sys/kernel/mm/ksm
2Date: September 2009
3KernelVersion: 2.6.32
4Contact: Linux memory management mailing list <linux-mm@kvack.org>
5Description: Interface for Kernel Samepage Merging (KSM)
6
7What: /sys/kernel/mm/ksm/full_scans
8What: /sys/kernel/mm/ksm/pages_shared
9What: /sys/kernel/mm/ksm/pages_sharing
10What: /sys/kernel/mm/ksm/pages_to_scan
11What: /sys/kernel/mm/ksm/pages_unshared
12What: /sys/kernel/mm/ksm/pages_volatile
13What: /sys/kernel/mm/ksm/run
14What: /sys/kernel/mm/ksm/sleep_millisecs
15Date: September 2009
16Contact: Linux memory management mailing list <linux-mm@kvack.org>
17Description: Kernel Samepage Merging daemon sysfs interface
18
19 full_scans: how many times all mergeable areas have been
20 scanned.
21
22 pages_shared: how many shared pages are being used.
23
24 pages_sharing: how many more sites are sharing them i.e. how
25 much saved.
26
27 pages_to_scan: how many present pages to scan before ksmd goes
28 to sleep.
29
30 pages_unshared: how many pages unique but repeatedly checked
31 for merging.
32
33 pages_volatile: how many pages changing too fast to be placed
34 in a tree.
35
36 run: write 0 to disable ksm, read 0 while ksm is disabled.
37 write 1 to run ksm, read 1 while ksm is running.
38 write 2 to disable ksm and unmerge all its pages.
39
40 sleep_millisecs: how many milliseconds ksm should sleep between
41 scans.
42
43 See Documentation/vm/ksm.txt for more information.
44
45What: /sys/kernel/mm/ksm/merge_across_nodes
46Date: January 2013
47KernelVersion: 3.9
48Contact: Linux memory management mailing list <linux-mm@kvack.org>
49Description: Control merging pages across different NUMA nodes.
50
51 When it is set to 0 only pages from the same node are merged,
52 otherwise pages from all nodes can be merged together (default).
diff --git a/Documentation/ABI/testing/sysfs-platform-msi-laptop b/Documentation/ABI/testing/sysfs-platform-msi-laptop
new file mode 100644
index 000000000000..307a247ba1ef
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-platform-msi-laptop
@@ -0,0 +1,83 @@
1What: /sys/devices/platform/msi-laptop-pf/lcd_level
2Date: Oct 2006
3KernelVersion: 2.6.19
4Contact: "Lennart Poettering <mzxreary@0pointer.de>"
5Description:
6 Screen brightness: contains a single integer in the range 0..8.
7
8What: /sys/devices/platform/msi-laptop-pf/auto_brightness
9Date: Oct 2006
10KernelVersion: 2.6.19
11Contact: "Lennart Poettering <mzxreary@0pointer.de>"
12Description:
13 Enable automatic brightness control: contains either 0 or 1. If
14 set to 1 the hardware adjusts the screen brightness
15 automatically when the power cord is plugged/unplugged.
16
17What: /sys/devices/platform/msi-laptop-pf/wlan
18Date: Oct 2006
19KernelVersion: 2.6.19
20Contact: "Lennart Poettering <mzxreary@0pointer.de>"
21Description:
22 WLAN subsystem enabled: contains either 0 or 1.
23
24What: /sys/devices/platform/msi-laptop-pf/bluetooth
25Date: Oct 2006
26KernelVersion: 2.6.19
27Contact: "Lennart Poettering <mzxreary@0pointer.de>"
28Description:
29 Bluetooth subsystem enabled: contains either 0 or 1. Please
30 note that this file is constantly 0 if no Bluetooth hardware is
31 available.
32
33What: /sys/devices/platform/msi-laptop-pf/touchpad
34Date: Nov 2012
35KernelVersion: 3.8
36Contact: "Maxim Mikityanskiy <maxtram95@gmail.com>"
37Description:
38 Contains either 0 or 1 and indicates if touchpad is turned on.
39 Touchpad state can only be toggled by pressing Fn+F3.
40
41What: /sys/devices/platform/msi-laptop-pf/turbo_mode
42Date: Nov 2012
43KernelVersion: 3.8
44Contact: "Maxim Mikityanskiy <maxtram95@gmail.com>"
45Description:
46 Contains either 0 or 1 and indicates if turbo mode is turned
47 on. In turbo mode power LED is orange and processor is
48 overclocked. Turbo mode is available only if charging. It is
49 only possible to toggle turbo mode state by pressing Fn+F10,
50 and there is a few seconds cooldown between subsequent toggles.
51 If user presses Fn+F10 too frequent, turbo mode state is not
52 changed.
53
54What: /sys/devices/platform/msi-laptop-pf/eco_mode
55Date: Nov 2012
56KernelVersion: 3.8
57Contact: "Maxim Mikityanskiy <maxtram95@gmail.com>"
58Description:
59 Contains either 0 or 1 and indicates if ECO mode is turned on.
60 In ECO mode power LED is green and userspace should do some
61 powersaving actions. ECO mode is available only on battery
62 power. ECO mode can only be toggled by pressing Fn+F10.
63
64What: /sys/devices/platform/msi-laptop-pf/turbo_cooldown
65Date: Nov 2012
66KernelVersion: 3.8
67Contact: "Maxim Mikityanskiy <maxtram95@gmail.com>"
68Description:
69 Contains value in range 0..3:
70 * 0 -> Turbo mode is off
71 * 1 -> Turbo mode is on, cannot be turned off yet
72 * 2 -> Turbo mode is off, cannot be turned on yet
73 * 3 -> Turbo mode is on
74
75What: /sys/devices/platform/msi-laptop-pf/auto_fan
76Date: Nov 2012
77KernelVersion: 3.8
78Contact: "Maxim Mikityanskiy <maxtram95@gmail.com>"
79Description:
80 Contains either 0 or 1 and indicates if fan speed is controlled
81 automatically (1) or fan runs at maximal speed (0). Can be
82 toggled in software.
83
diff --git a/Documentation/ABI/testing/sysfs-platform-ts5500 b/Documentation/ABI/testing/sysfs-platform-ts5500
new file mode 100644
index 000000000000..c88375a537a1
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-platform-ts5500
@@ -0,0 +1,47 @@
1What: /sys/devices/platform/ts5500/adc
2Date: January 2013
3KernelVersion: 3.7
4Contact: "Savoir-faire Linux Inc." <kernel@savoirfairelinux.com>
5Description:
6 Indicates the presence of an A/D Converter. If it is present,
7 it will display "1", otherwise "0".
8
9What: /sys/devices/platform/ts5500/ereset
10Date: January 2013
11KernelVersion: 3.7
12Contact: "Savoir-faire Linux Inc." <kernel@savoirfairelinux.com>
13Description:
14 Indicates the presence of an external reset. If it is present,
15 it will display "1", otherwise "0".
16
17What: /sys/devices/platform/ts5500/id
18Date: January 2013
19KernelVersion: 3.7
20Contact: "Savoir-faire Linux Inc." <kernel@savoirfairelinux.com>
21Description:
22 Product ID of the TS board. TS-5500 ID is 0x60.
23
24What: /sys/devices/platform/ts5500/jumpers
25Date: January 2013
26KernelVersion: 3.7
27Contact: "Savoir-faire Linux Inc." <kernel@savoirfairelinux.com>
28Description:
29 Bitfield showing the jumpers' state. If a jumper is present,
30 the corresponding bit is set. For instance, 0x0e means jumpers
31 2, 3 and 4 are set.
32
33What: /sys/devices/platform/ts5500/rs485
34Date: January 2013
35KernelVersion: 3.7
36Contact: "Savoir-faire Linux Inc." <kernel@savoirfairelinux.com>
37Description:
38 Indicates the presence of the RS485 option. If it is present,
39 it will display "1", otherwise "0".
40
41What: /sys/devices/platform/ts5500/sram
42Date: January 2013
43KernelVersion: 3.7
44Contact: "Savoir-faire Linux Inc." <kernel@savoirfairelinux.com>
45Description:
46 Indicates the presence of the SRAM option. If it is present,
47 it will display "1", otherwise "0".
diff --git a/Documentation/ABI/testing/sysfs-profiling b/Documentation/ABI/testing/sysfs-profiling
index b02d8b8c173a..8a8e466eb2c0 100644
--- a/Documentation/ABI/testing/sysfs-profiling
+++ b/Documentation/ABI/testing/sysfs-profiling
@@ -1,13 +1,13 @@
1What: /sys/kernel/profile 1What: /sys/kernel/profiling
2Date: September 2008 2Date: September 2008
3Contact: Dave Hansen <dave@linux.vnet.ibm.com> 3Contact: Dave Hansen <dave@linux.vnet.ibm.com>
4Description: 4Description:
5 /sys/kernel/profile is the runtime equivalent 5 /sys/kernel/profiling is the runtime equivalent
6 of the boot-time profile= option. 6 of the boot-time profile= option.
7 7
8 You can get the same effect running: 8 You can get the same effect running:
9 9
10 echo 2 > /sys/kernel/profile 10 echo 2 > /sys/kernel/profiling
11 11
12 as you would by issuing profile=2 on the boot 12 as you would by issuing profile=2 on the boot
13 command line. 13 command line.
diff --git a/Documentation/ABI/testing/sysfs-tty b/Documentation/ABI/testing/sysfs-tty
index 0c430150d929..ad22fb0ee765 100644
--- a/Documentation/ABI/testing/sysfs-tty
+++ b/Documentation/ABI/testing/sysfs-tty
@@ -26,3 +26,115 @@ Description:
26 UART port in serial_core, that is bound to TTY like ttyS0. 26 UART port in serial_core, that is bound to TTY like ttyS0.
27 uartclk = 16 * baud_base 27 uartclk = 16 * baud_base
28 28
29 These sysfs values expose the TIOCGSERIAL interface via
30 sysfs rather than via ioctls.
31
32What: /sys/class/tty/ttyS0/type
33Date: October 2012
34Contact: Alan Cox <alan@linux.intel.com>
35Description:
36 Shows the current tty type for this port.
37
38 These sysfs values expose the TIOCGSERIAL interface via
39 sysfs rather than via ioctls.
40
41What: /sys/class/tty/ttyS0/line
42Date: October 2012
43Contact: Alan Cox <alan@linux.intel.com>
44Description:
45 Shows the current tty line number for this port.
46
47 These sysfs values expose the TIOCGSERIAL interface via
48 sysfs rather than via ioctls.
49
50What: /sys/class/tty/ttyS0/port
51Date: October 2012
52Contact: Alan Cox <alan@linux.intel.com>
53Description:
54 Shows the current tty port I/O address for this port.
55
56 These sysfs values expose the TIOCGSERIAL interface via
57 sysfs rather than via ioctls.
58
59What: /sys/class/tty/ttyS0/irq
60Date: October 2012
61Contact: Alan Cox <alan@linux.intel.com>
62Description:
63 Shows the current primary interrupt for this port.
64
65 These sysfs values expose the TIOCGSERIAL interface via
66 sysfs rather than via ioctls.
67
68What: /sys/class/tty/ttyS0/flags
69Date: October 2012
70Contact: Alan Cox <alan@linux.intel.com>
71Description:
72 Show the tty port status flags for this port.
73
74 These sysfs values expose the TIOCGSERIAL interface via
75 sysfs rather than via ioctls.
76
77What: /sys/class/tty/ttyS0/xmit_fifo_size
78Date: October 2012
79Contact: Alan Cox <alan@linux.intel.com>
80Description:
81 Show the transmit FIFO size for this port.
82
83 These sysfs values expose the TIOCGSERIAL interface via
84 sysfs rather than via ioctls.
85
86What: /sys/class/tty/ttyS0/close_delay
87Date: October 2012
88Contact: Alan Cox <alan@linux.intel.com>
89Description:
90 Show the closing delay time for this port in ms.
91
92 These sysfs values expose the TIOCGSERIAL interface via
93 sysfs rather than via ioctls.
94
95What: /sys/class/tty/ttyS0/closing_wait
96Date: October 2012
97Contact: Alan Cox <alan@linux.intel.com>
98Description:
99 Show the close wait time for this port in ms.
100
101 These sysfs values expose the TIOCGSERIAL interface via
102 sysfs rather than via ioctls.
103
104What: /sys/class/tty/ttyS0/custom_divisor
105Date: October 2012
106Contact: Alan Cox <alan@linux.intel.com>
107Description:
108 Show the custom divisor if any that is set on this port.
109
110 These sysfs values expose the TIOCGSERIAL interface via
111 sysfs rather than via ioctls.
112
113What: /sys/class/tty/ttyS0/io_type
114Date: October 2012
115Contact: Alan Cox <alan@linux.intel.com>
116Description:
117 Show the I/O type that is to be used with the iomem base
118 address.
119
120 These sysfs values expose the TIOCGSERIAL interface via
121 sysfs rather than via ioctls.
122
123What: /sys/class/tty/ttyS0/iomem_base
124Date: October 2012
125Contact: Alan Cox <alan@linux.intel.com>
126Description:
127 The I/O memory base for this port.
128
129 These sysfs values expose the TIOCGSERIAL interface via
130 sysfs rather than via ioctls.
131
132What: /sys/class/tty/ttyS0/iomem_reg_shift
133Date: October 2012
134Contact: Alan Cox <alan@linux.intel.com>
135Description:
136 Show the register shift indicating the spacing to be used
137 for accesses on this iomem address.
138
139 These sysfs values expose the TIOCGSERIAL interface via
140 sysfs rather than via ioctls.
diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle
index 495e5ba1634c..e00b8f0dde52 100644
--- a/Documentation/CodingStyle
+++ b/Documentation/CodingStyle
@@ -546,15 +546,7 @@ config AUDIT
546 logging of avc messages output). Does not do system-call 546 logging of avc messages output). Does not do system-call
547 auditing without CONFIG_AUDITSYSCALL. 547 auditing without CONFIG_AUDITSYSCALL.
548 548
549Features that might still be considered unstable should be defined as 549Seriously dangerous features (such as write support for certain
550dependent on "EXPERIMENTAL":
551
552config SLUB
553 depends on EXPERIMENTAL && !ARCH_USES_SLAB_PAGE_STRUCT
554 bool "SLUB (Unqueued Allocator)"
555 ...
556
557while seriously dangerous features (such as write support for certain
558filesystems) should advertise this prominently in their prompt string: 550filesystems) should advertise this prominently in their prompt string:
559 551
560config ADFS_FS_RW 552config ADFS_FS_RW
diff --git a/Documentation/DMA-API-HOWTO.txt b/Documentation/DMA-API-HOWTO.txt
index a0b6250add79..14129f149a75 100644
--- a/Documentation/DMA-API-HOWTO.txt
+++ b/Documentation/DMA-API-HOWTO.txt
@@ -468,11 +468,47 @@ To map a single region, you do:
468 size_t size = buffer->len; 468 size_t size = buffer->len;
469 469
470 dma_handle = dma_map_single(dev, addr, size, direction); 470 dma_handle = dma_map_single(dev, addr, size, direction);
471 if (dma_mapping_error(dma_handle)) {
472 /*
473 * reduce current DMA mapping usage,
474 * delay and try again later or
475 * reset driver.
476 */
477 goto map_error_handling;
478 }
471 479
472and to unmap it: 480and to unmap it:
473 481
474 dma_unmap_single(dev, dma_handle, size, direction); 482 dma_unmap_single(dev, dma_handle, size, direction);
475 483
484You should call dma_mapping_error() as dma_map_single() could fail and return
485error. Not all dma implementations support dma_mapping_error() interface.
486However, it is a good practice to call dma_mapping_error() interface, which
487will invoke the generic mapping error check interface. Doing so will ensure
488that the mapping code will work correctly on all dma implementations without
489any dependency on the specifics of the underlying implementation. Using the
490returned address without checking for errors could result in failures ranging
491from panics to silent data corruption. A couple of examples of incorrect ways
492to check for errors that make assumptions about the underlying dma
493implementation are as follows and these are applicable to dma_map_page() as
494well.
495
496Incorrect example 1:
497 dma_addr_t dma_handle;
498
499 dma_handle = dma_map_single(dev, addr, size, direction);
500 if ((dma_handle & 0xffff != 0) || (dma_handle >= 0x1000000)) {
501 goto map_error;
502 }
503
504Incorrect example 2:
505 dma_addr_t dma_handle;
506
507 dma_handle = dma_map_single(dev, addr, size, direction);
508 if (dma_handle == DMA_ERROR_CODE) {
509 goto map_error;
510 }
511
476You should call dma_unmap_single when the DMA activity is finished, e.g. 512You should call dma_unmap_single when the DMA activity is finished, e.g.
477from the interrupt which told you that the DMA transfer is done. 513from the interrupt which told you that the DMA transfer is done.
478 514
@@ -489,6 +525,14 @@ Specifically:
489 size_t size = buffer->len; 525 size_t size = buffer->len;
490 526
491 dma_handle = dma_map_page(dev, page, offset, size, direction); 527 dma_handle = dma_map_page(dev, page, offset, size, direction);
528 if (dma_mapping_error(dma_handle)) {
529 /*
530 * reduce current DMA mapping usage,
531 * delay and try again later or
532 * reset driver.
533 */
534 goto map_error_handling;
535 }
492 536
493 ... 537 ...
494 538
@@ -496,6 +540,12 @@ Specifically:
496 540
497Here, "offset" means byte offset within the given page. 541Here, "offset" means byte offset within the given page.
498 542
543You should call dma_mapping_error() as dma_map_page() could fail and return
544error as outlined under the dma_map_single() discussion.
545
546You should call dma_unmap_page when the DMA activity is finished, e.g.
547from the interrupt which told you that the DMA transfer is done.
548
499With scatterlists, you map a region gathered from several regions by: 549With scatterlists, you map a region gathered from several regions by:
500 550
501 int i, count = dma_map_sg(dev, sglist, nents, direction); 551 int i, count = dma_map_sg(dev, sglist, nents, direction);
@@ -578,6 +628,14 @@ to use the dma_sync_*() interfaces.
578 dma_addr_t mapping; 628 dma_addr_t mapping;
579 629
580 mapping = dma_map_single(cp->dev, buffer, len, DMA_FROM_DEVICE); 630 mapping = dma_map_single(cp->dev, buffer, len, DMA_FROM_DEVICE);
631 if (dma_mapping_error(dma_handle)) {
632 /*
633 * reduce current DMA mapping usage,
634 * delay and try again later or
635 * reset driver.
636 */
637 goto map_error_handling;
638 }
581 639
582 cp->rx_buf = buffer; 640 cp->rx_buf = buffer;
583 cp->rx_len = len; 641 cp->rx_len = len;
@@ -658,6 +716,75 @@ failure can be determined by:
658 * delay and try again later or 716 * delay and try again later or
659 * reset driver. 717 * reset driver.
660 */ 718 */
719 goto map_error_handling;
720 }
721
722- unmap pages that are already mapped, when mapping error occurs in the middle
723 of a multiple page mapping attempt. These example are applicable to
724 dma_map_page() as well.
725
726Example 1:
727 dma_addr_t dma_handle1;
728 dma_addr_t dma_handle2;
729
730 dma_handle1 = dma_map_single(dev, addr, size, direction);
731 if (dma_mapping_error(dev, dma_handle1)) {
732 /*
733 * reduce current DMA mapping usage,
734 * delay and try again later or
735 * reset driver.
736 */
737 goto map_error_handling1;
738 }
739 dma_handle2 = dma_map_single(dev, addr, size, direction);
740 if (dma_mapping_error(dev, dma_handle2)) {
741 /*
742 * reduce current DMA mapping usage,
743 * delay and try again later or
744 * reset driver.
745 */
746 goto map_error_handling2;
747 }
748
749 ...
750
751 map_error_handling2:
752 dma_unmap_single(dma_handle1);
753 map_error_handling1:
754
755Example 2: (if buffers are allocated in a loop, unmap all mapped buffers when
756 mapping error is detected in the middle)
757
758 dma_addr_t dma_addr;
759 dma_addr_t array[DMA_BUFFERS];
760 int save_index = 0;
761
762 for (i = 0; i < DMA_BUFFERS; i++) {
763
764 ...
765
766 dma_addr = dma_map_single(dev, addr, size, direction);
767 if (dma_mapping_error(dev, dma_addr)) {
768 /*
769 * reduce current DMA mapping usage,
770 * delay and try again later or
771 * reset driver.
772 */
773 goto map_error_handling;
774 }
775 array[i].dma_addr = dma_addr;
776 save_index++;
777 }
778
779 ...
780
781 map_error_handling:
782
783 for (i = 0; i < save_index; i++) {
784
785 ...
786
787 dma_unmap_single(array[i].dma_addr);
661 } 788 }
662 789
663Networking drivers must call dev_kfree_skb to free the socket buffer 790Networking drivers must call dev_kfree_skb to free the socket buffer
diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt
index 66bd97a95f10..78a6c569d204 100644
--- a/Documentation/DMA-API.txt
+++ b/Documentation/DMA-API.txt
@@ -678,3 +678,15 @@ out of dma_debug_entries. These entries are preallocated at boot. The number
678of preallocated entries is defined per architecture. If it is too low for you 678of preallocated entries is defined per architecture. If it is too low for you
679boot with 'dma_debug_entries=<your_desired_number>' to overwrite the 679boot with 'dma_debug_entries=<your_desired_number>' to overwrite the
680architectural default. 680architectural default.
681
682void debug_dmap_mapping_error(struct device *dev, dma_addr_t dma_addr);
683
684dma-debug interface debug_dma_mapping_error() to debug drivers that fail
685to check dma mapping errors on addresses returned by dma_map_single() and
686dma_map_page() interfaces. This interface clears a flag set by
687debug_dma_map_page() to indicate that dma_mapping_error() has been called by
688the driver. When driver does unmap, debug_dma_unmap() checks the flag and if
689this flag is still set, prints warning message that includes call trace that
690leads up to the unmap. This interface can be called from dma_mapping_error()
691routines to enable dma mapping error check debugging.
692
diff --git a/Documentation/DMA-attributes.txt b/Documentation/DMA-attributes.txt
index f50309081ac7..e59480db9ee0 100644
--- a/Documentation/DMA-attributes.txt
+++ b/Documentation/DMA-attributes.txt
@@ -91,3 +91,12 @@ transferred to 'device' domain. This attribute can be also used for
91dma_unmap_{single,page,sg} functions family to force buffer to stay in 91dma_unmap_{single,page,sg} functions family to force buffer to stay in
92device domain after releasing a mapping for it. Use this attribute with 92device domain after releasing a mapping for it. Use this attribute with
93care! 93care!
94
95DMA_ATTR_FORCE_CONTIGUOUS
96-------------------------
97
98By default DMA-mapping subsystem is allowed to assemble the buffer
99allocated by dma_alloc_attrs() function from individual pages if it can
100be mapped as contiguous chunk into device dma address space. By
101specifing this attribute the allocated buffer is forced to be contiguous
102also in physical memory.
diff --git a/Documentation/DocBook/80211.tmpl b/Documentation/DocBook/80211.tmpl
index 42e7f030cb16..284ced7a228f 100644
--- a/Documentation/DocBook/80211.tmpl
+++ b/Documentation/DocBook/80211.tmpl
@@ -107,8 +107,8 @@
107!Finclude/net/cfg80211.h key_params 107!Finclude/net/cfg80211.h key_params
108!Finclude/net/cfg80211.h survey_info_flags 108!Finclude/net/cfg80211.h survey_info_flags
109!Finclude/net/cfg80211.h survey_info 109!Finclude/net/cfg80211.h survey_info
110!Finclude/net/cfg80211.h beacon_parameters 110!Finclude/net/cfg80211.h cfg80211_beacon_data
111!Finclude/net/cfg80211.h plink_actions 111!Finclude/net/cfg80211.h cfg80211_ap_settings
112!Finclude/net/cfg80211.h station_parameters 112!Finclude/net/cfg80211.h station_parameters
113!Finclude/net/cfg80211.h station_info_flags 113!Finclude/net/cfg80211.h station_info_flags
114!Finclude/net/cfg80211.h rate_info_flags 114!Finclude/net/cfg80211.h rate_info_flags
diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/drm.tmpl
index b0300529ab13..f9df3b872c16 100644
--- a/Documentation/DocBook/drm.tmpl
+++ b/Documentation/DocBook/drm.tmpl
@@ -743,6 +743,10 @@ char *date;</synopsis>
743 These two operations are mandatory for GEM drivers that support DRM 743 These two operations are mandatory for GEM drivers that support DRM
744 PRIME. 744 PRIME.
745 </para> 745 </para>
746 <sect4>
747 <title>DRM PRIME Helper Functions Reference</title>
748!Pdrivers/gpu/drm/drm_prime.c PRIME Helpers
749 </sect4>
746 </sect3> 750 </sect3>
747 <sect3 id="drm-gem-objects-mapping"> 751 <sect3 id="drm-gem-objects-mapping">
748 <title>GEM Objects Mapping</title> 752 <title>GEM Objects Mapping</title>
@@ -978,10 +982,25 @@ int max_width, max_height;</synopsis>
978 If the parameters are deemed valid, drivers then create, initialize and 982 If the parameters are deemed valid, drivers then create, initialize and
979 return an instance of struct <structname>drm_framebuffer</structname>. 983 return an instance of struct <structname>drm_framebuffer</structname>.
980 If desired the instance can be embedded in a larger driver-specific 984 If desired the instance can be embedded in a larger driver-specific
981 structure. The new instance is initialized with a call to 985 structure. Drivers must fill its <structfield>width</structfield>,
982 <function>drm_framebuffer_init</function> which takes a pointer to DRM 986 <structfield>height</structfield>, <structfield>pitches</structfield>,
983 frame buffer operations (struct 987 <structfield>offsets</structfield>, <structfield>depth</structfield>,
984 <structname>drm_framebuffer_funcs</structname>). Frame buffer operations are 988 <structfield>bits_per_pixel</structfield> and
989 <structfield>pixel_format</structfield> fields from the values passed
990 through the <parameter>drm_mode_fb_cmd2</parameter> argument. They
991 should call the <function>drm_helper_mode_fill_fb_struct</function>
992 helper function to do so.
993 </para>
994
995 <para>
996 The initailization of the new framebuffer instance is finalized with a
997 call to <function>drm_framebuffer_init</function> which takes a pointer
998 to DRM frame buffer operations (struct
999 <structname>drm_framebuffer_funcs</structname>). Note that this function
1000 publishes the framebuffer and so from this point on it can be accessed
1001 concurrently from other threads. Hence it must be the last step in the
1002 driver's framebuffer initialization sequence. Frame buffer operations
1003 are
985 <itemizedlist> 1004 <itemizedlist>
986 <listitem> 1005 <listitem>
987 <synopsis>int (*create_handle)(struct drm_framebuffer *fb, 1006 <synopsis>int (*create_handle)(struct drm_framebuffer *fb,
@@ -1022,16 +1041,16 @@ int max_width, max_height;</synopsis>
1022 </itemizedlist> 1041 </itemizedlist>
1023 </para> 1042 </para>
1024 <para> 1043 <para>
1025 After initializing the <structname>drm_framebuffer</structname> 1044 The lifetime of a drm framebuffer is controlled with a reference count,
1026 instance drivers must fill its <structfield>width</structfield>, 1045 drivers can grab additional references with
1027 <structfield>height</structfield>, <structfield>pitches</structfield>, 1046 <function>drm_framebuffer_reference</function> </para> and drop them
1028 <structfield>offsets</structfield>, <structfield>depth</structfield>, 1047 again with <function>drm_framebuffer_unreference</function>. For
1029 <structfield>bits_per_pixel</structfield> and 1048 driver-private framebuffers for which the last reference is never
1030 <structfield>pixel_format</structfield> fields from the values passed 1049 dropped (e.g. for the fbdev framebuffer when the struct
1031 through the <parameter>drm_mode_fb_cmd2</parameter> argument. They 1050 <structname>drm_framebuffer</structname> is embedded into the fbdev
1032 should call the <function>drm_helper_mode_fill_fb_struct</function> 1051 helper struct) drivers can manually clean up a framebuffer at module
1033 helper function to do so. 1052 unload time with
1034 </para> 1053 <function>drm_framebuffer_unregister_private</function>.
1035 </sect2> 1054 </sect2>
1036 <sect2> 1055 <sect2>
1037 <title>Output Polling</title> 1056 <title>Output Polling</title>
@@ -1043,6 +1062,22 @@ int max_width, max_height;</synopsis>
1043 operation. 1062 operation.
1044 </para> 1063 </para>
1045 </sect2> 1064 </sect2>
1065 <sect2>
1066 <title>Locking</title>
1067 <para>
1068 Beside some lookup structures with their own locking (which is hidden
1069 behind the interface functions) most of the modeset state is protected
1070 by the <code>dev-&lt;mode_config.lock</code> mutex and additionally
1071 per-crtc locks to allow cursor updates, pageflips and similar operations
1072 to occur concurrently with background tasks like output detection.
1073 Operations which cross domains like a full modeset always grab all
1074 locks. Drivers there need to protect resources shared between crtcs with
1075 additional locking. They also need to be careful to always grab the
1076 relevant crtc locks if a modset functions touches crtc state, e.g. for
1077 load detection (which does only grab the <code>mode_config.lock</code>
1078 to allow concurrent screen updates on live crtcs).
1079 </para>
1080 </sect2>
1046 </sect1> 1081 </sect1>
1047 1082
1048 <!-- Internals: kms initialization and cleanup --> 1083 <!-- Internals: kms initialization and cleanup -->
@@ -1126,6 +1161,12 @@ int max_width, max_height;</synopsis>
1126 any new rendering to the frame buffer until the page flip completes. 1161 any new rendering to the frame buffer until the page flip completes.
1127 </para> 1162 </para>
1128 <para> 1163 <para>
1164 If a page flip can be successfully scheduled the driver must set the
1165 <code>drm_crtc-&lt;fb</code> field to the new framebuffer pointed to
1166 by <code>fb</code>. This is important so that the reference counting
1167 on framebuffers stays balanced.
1168 </para>
1169 <para>
1129 If a page flip is already pending, the 1170 If a page flip is already pending, the
1130 <methodname>page_flip</methodname> operation must return 1171 <methodname>page_flip</methodname> operation must return
1131 -<errorname>EBUSY</errorname>. 1172 -<errorname>EBUSY</errorname>.
@@ -1141,23 +1182,13 @@ int max_width, max_height;</synopsis>
1141 the <methodname>page_flip</methodname> operation will be called with a 1182 the <methodname>page_flip</methodname> operation will be called with a
1142 non-NULL <parameter>event</parameter> argument pointing to a 1183 non-NULL <parameter>event</parameter> argument pointing to a
1143 <structname>drm_pending_vblank_event</structname> instance. Upon page 1184 <structname>drm_pending_vblank_event</structname> instance. Upon page
1144 flip completion the driver must fill the 1185 flip completion the driver must call <methodname>drm_send_vblank_event</methodname>
1145 <parameter>event</parameter>::<structfield>event</structfield> 1186 to fill in the event and send to wake up any waiting processes.
1146 <structfield>sequence</structfield>, <structfield>tv_sec</structfield> 1187 This can be performed with
1147 and <structfield>tv_usec</structfield> fields with the associated
1148 vertical blanking count and timestamp, add the event to the
1149 <parameter>drm_file</parameter> list of events to be signaled, and wake
1150 up any waiting process. This can be performed with
1151 <programlisting><![CDATA[ 1188 <programlisting><![CDATA[
1152 struct timeval now;
1153
1154 event->event.sequence = drm_vblank_count_and_time(..., &now);
1155 event->event.tv_sec = now.tv_sec;
1156 event->event.tv_usec = now.tv_usec;
1157
1158 spin_lock_irqsave(&dev->event_lock, flags); 1189 spin_lock_irqsave(&dev->event_lock, flags);
1159 list_add_tail(&event->base.link, &event->base.file_priv->event_list); 1190 ...
1160 wake_up_interruptible(&event->base.file_priv->event_wait); 1191 drm_send_vblank_event(dev, pipe, event);
1161 spin_unlock_irqrestore(&dev->event_lock, flags); 1192 spin_unlock_irqrestore(&dev->event_lock, flags);
1162 ]]></programlisting> 1193 ]]></programlisting>
1163 </para> 1194 </para>
@@ -1619,12 +1650,16 @@ void intel_crt_init(struct drm_device *dev)
1619 make its properties available to applications. 1650 make its properties available to applications.
1620 </para> 1651 </para>
1621 </sect2> 1652 </sect2>
1653 <sect2>
1654 <title>KMS API Functions</title>
1655!Edrivers/gpu/drm/drm_crtc.c
1656 </sect2>
1622 </sect1> 1657 </sect1>
1623 1658
1624 <!-- Internals: mid-layer helper functions --> 1659 <!-- Internals: kms helper functions -->
1625 1660
1626 <sect1> 1661 <sect1>
1627 <title>Mid-layer Helper Functions</title> 1662 <title>Mode Setting Helper Functions</title>
1628 <para> 1663 <para>
1629 The CRTC, encoder and connector functions provided by the drivers 1664 The CRTC, encoder and connector functions provided by the drivers
1630 implement the DRM API. They're called by the DRM core and ioctl handlers 1665 implement the DRM API. They're called by the DRM core and ioctl handlers
@@ -2106,6 +2141,26 @@ void intel_crt_init(struct drm_device *dev)
2106 </listitem> 2141 </listitem>
2107 </itemizedlist> 2142 </itemizedlist>
2108 </sect2> 2143 </sect2>
2144 <sect2>
2145 <title>Modeset Helper Functions Reference</title>
2146!Edrivers/gpu/drm/drm_crtc_helper.c
2147 </sect2>
2148 <sect2>
2149 <title>fbdev Helper Functions Reference</title>
2150!Pdrivers/gpu/drm/drm_fb_helper.c fbdev helpers
2151!Edrivers/gpu/drm/drm_fb_helper.c
2152!Iinclude/drm/drm_fb_helper.h
2153 </sect2>
2154 <sect2>
2155 <title>Display Port Helper Functions Reference</title>
2156!Pdrivers/gpu/drm/drm_dp_helper.c dp helpers
2157!Iinclude/drm/drm_dp_helper.h
2158!Edrivers/gpu/drm/drm_dp_helper.c
2159 </sect2>
2160 <sect2>
2161 <title>EDID Helper Functions Reference</title>
2162!Edrivers/gpu/drm/drm_edid.c
2163 </sect2>
2109 </sect1> 2164 </sect1>
2110 2165
2111 <!-- Internals: vertical blanking --> 2166 <!-- Internals: vertical blanking -->
diff --git a/Documentation/DocBook/gadget.tmpl b/Documentation/DocBook/gadget.tmpl
index 6ef2f0073e5a..4017f147ba2f 100644
--- a/Documentation/DocBook/gadget.tmpl
+++ b/Documentation/DocBook/gadget.tmpl
@@ -671,7 +671,7 @@ than a kernel driver.
671<para>There's a USB Mass Storage class driver, which provides 671<para>There's a USB Mass Storage class driver, which provides
672a different solution for interoperability with systems such 672a different solution for interoperability with systems such
673as MS-Windows and MacOS. 673as MS-Windows and MacOS.
674That <emphasis>File-backed Storage</emphasis> driver uses a 674That <emphasis>Mass Storage</emphasis> driver uses a
675file or block device as backing store for a drive, 675file or block device as backing store for a drive,
676like the <filename>loop</filename> driver. 676like the <filename>loop</filename> driver.
677The USB host uses the BBB, CB, or CBI versions of the mass 677The USB host uses the BBB, CB, or CBI versions of the mass
diff --git a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl
index 00687ee9d363..f75ab4c1b281 100644
--- a/Documentation/DocBook/kernel-api.tmpl
+++ b/Documentation/DocBook/kernel-api.tmpl
@@ -58,6 +58,9 @@
58 58
59 <sect1><title>String Conversions</title> 59 <sect1><title>String Conversions</title>
60!Elib/vsprintf.c 60!Elib/vsprintf.c
61!Finclude/linux/kernel.h kstrtol
62!Finclude/linux/kernel.h kstrtoul
63!Elib/kstrtox.c
61 </sect1> 64 </sect1>
62 <sect1><title>String Manipulation</title> 65 <sect1><title>String Manipulation</title>
63<!-- All functions are exported at now 66<!-- All functions are exported at now
diff --git a/Documentation/DocBook/kernel-hacking.tmpl b/Documentation/DocBook/kernel-hacking.tmpl
index eee71426ecb8..d0758b241b23 100644
--- a/Documentation/DocBook/kernel-hacking.tmpl
+++ b/Documentation/DocBook/kernel-hacking.tmpl
@@ -945,7 +945,7 @@ printk(KERN_INFO "my ip: %pI4\n", &amp;ipaddress);
945 945
946 <sect1 id="sym-exportsymbols"> 946 <sect1 id="sym-exportsymbols">
947 <title><function>EXPORT_SYMBOL()</function> 947 <title><function>EXPORT_SYMBOL()</function>
948 <filename class="headerfile">include/linux/module.h</filename></title> 948 <filename class="headerfile">include/linux/export.h</filename></title>
949 949
950 <para> 950 <para>
951 This is the classic method of exporting a symbol: dynamically 951 This is the classic method of exporting a symbol: dynamically
@@ -955,7 +955,7 @@ printk(KERN_INFO "my ip: %pI4\n", &amp;ipaddress);
955 955
956 <sect1 id="sym-exportsymbols-gpl"> 956 <sect1 id="sym-exportsymbols-gpl">
957 <title><function>EXPORT_SYMBOL_GPL()</function> 957 <title><function>EXPORT_SYMBOL_GPL()</function>
958 <filename class="headerfile">include/linux/module.h</filename></title> 958 <filename class="headerfile">include/linux/export.h</filename></title>
959 959
960 <para> 960 <para>
961 Similar to <function>EXPORT_SYMBOL()</function> except that the 961 Similar to <function>EXPORT_SYMBOL()</function> except that the
@@ -1185,13 +1185,6 @@ static struct block_device_operations opt_fops = {
1185 </para> 1185 </para>
1186 1186
1187 <para> 1187 <para>
1188 You may well want to make your CONFIG option only visible if
1189 <symbol>CONFIG_EXPERIMENTAL</symbol> is enabled: this serves as a
1190 warning to users. There many other fancy things you can do: see
1191 the various <filename>Kconfig</filename> files for ideas.
1192 </para>
1193
1194 <para>
1195 In your description of the option, make sure you address both the 1188 In your description of the option, make sure you address both the
1196 expert user and the user who knows nothing about your feature. Mention 1189 expert user and the user who knows nothing about your feature. Mention
1197 incompatibilities and issues here. <emphasis> Definitely 1190 incompatibilities and issues here. <emphasis> Definitely
diff --git a/Documentation/DocBook/kgdb.tmpl b/Documentation/DocBook/kgdb.tmpl
index 4ee4ba3509fc..f77358f96930 100644
--- a/Documentation/DocBook/kgdb.tmpl
+++ b/Documentation/DocBook/kgdb.tmpl
@@ -94,10 +94,8 @@
94 <sect1 id="CompileKGDB"> 94 <sect1 id="CompileKGDB">
95 <title>Kernel config options for kgdb</title> 95 <title>Kernel config options for kgdb</title>
96 <para> 96 <para>
97 To enable <symbol>CONFIG_KGDB</symbol> you should first turn on 97 To enable <symbol>CONFIG_KGDB</symbol> you should look under
98 "Prompt for development and/or incomplete code/drivers" 98 "Kernel debugging" and select "KGDB: kernel debugger".
99 (CONFIG_EXPERIMENTAL) in "General setup", then under the
100 "Kernel debugging" select "KGDB: kernel debugger".
101 </para> 99 </para>
102 <para> 100 <para>
103 While it is not a hard requirement that you have symbols in your 101 While it is not a hard requirement that you have symbols in your
diff --git a/Documentation/DocBook/media/dvb/dvbapi.xml b/Documentation/DocBook/media/dvb/dvbapi.xml
index 757488b24f4f..0197bcc7842d 100644
--- a/Documentation/DocBook/media/dvb/dvbapi.xml
+++ b/Documentation/DocBook/media/dvb/dvbapi.xml
@@ -84,7 +84,7 @@ Added ISDB-T test originally written by Patrick Boettcher
84 84
85 85
86<title>LINUX DVB API</title> 86<title>LINUX DVB API</title>
87<subtitle>Version 5.8</subtitle> 87<subtitle>Version 5.10</subtitle>
88<!-- ADD THE CHAPTERS HERE --> 88<!-- ADD THE CHAPTERS HERE -->
89 <chapter id="dvb_introdution"> 89 <chapter id="dvb_introdution">
90 &sub-intro; 90 &sub-intro;
diff --git a/Documentation/DocBook/media/dvb/dvbproperty.xml b/Documentation/DocBook/media/dvb/dvbproperty.xml
index 957e3acaae8e..4a5eaeed0b9e 100644
--- a/Documentation/DocBook/media/dvb/dvbproperty.xml
+++ b/Documentation/DocBook/media/dvb/dvbproperty.xml
@@ -7,14 +7,41 @@ the capability ioctls weren't implemented yet via the new way.</para>
7<para>The typical usage for the <constant>FE_GET_PROPERTY/FE_SET_PROPERTY</constant> 7<para>The typical usage for the <constant>FE_GET_PROPERTY/FE_SET_PROPERTY</constant>
8API is to replace the ioctl's were the <link linkend="dvb-frontend-parameters"> 8API is to replace the ioctl's were the <link linkend="dvb-frontend-parameters">
9struct <constant>dvb_frontend_parameters</constant></link> were used.</para> 9struct <constant>dvb_frontend_parameters</constant></link> were used.</para>
10<section id="dtv-stats">
11<title>DTV stats type</title>
12<programlisting>
13struct dtv_stats {
14 __u8 scale; /* enum fecap_scale_params type */
15 union {
16 __u64 uvalue; /* for counters and relative scales */
17 __s64 svalue; /* for 1/1000 dB measures */
18 };
19} __packed;
20</programlisting>
21</section>
22<section id="dtv-fe-stats">
23<title>DTV stats type</title>
24<programlisting>
25#define MAX_DTV_STATS 4
26
27struct dtv_fe_stats {
28 __u8 len;
29 struct dtv_stats stat[MAX_DTV_STATS];
30} __packed;
31</programlisting>
32</section>
33
10<section id="dtv-property"> 34<section id="dtv-property">
11<title>DTV property type</title> 35<title>DTV property type</title>
12<programlisting> 36<programlisting>
13/* Reserved fields should be set to 0 */ 37/* Reserved fields should be set to 0 */
38
14struct dtv_property { 39struct dtv_property {
15 __u32 cmd; 40 __u32 cmd;
41 __u32 reserved[3];
16 union { 42 union {
17 __u32 data; 43 __u32 data;
44 struct dtv_fe_stats st;
18 struct { 45 struct {
19 __u8 data[32]; 46 __u8 data[32];
20 __u32 len; 47 __u32 len;
@@ -440,7 +467,7 @@ typedef enum fe_delivery_system {
440 <title><constant>DTV-ISDBT-LAYER*</constant> parameters</title> 467 <title><constant>DTV-ISDBT-LAYER*</constant> parameters</title>
441 <para>ISDB-T channels can be coded hierarchically. As opposed to DVB-T in 468 <para>ISDB-T channels can be coded hierarchically. As opposed to DVB-T in
442 ISDB-T hierarchical layers can be decoded simultaneously. For that 469 ISDB-T hierarchical layers can be decoded simultaneously. For that
443 reason a ISDB-T demodulator has 3 viterbi and 3 reed-solomon-decoders.</para> 470 reason a ISDB-T demodulator has 3 Viterbi and 3 Reed-Solomon decoders.</para>
444 <para>ISDB-T has 3 hierarchical layers which each can use a part of the 471 <para>ISDB-T has 3 hierarchical layers which each can use a part of the
445 available segments. The total number of segments over all layers has 472 available segments. The total number of segments over all layers has
446 to 13 in ISDB-T.</para> 473 to 13 in ISDB-T.</para>
@@ -850,6 +877,147 @@ enum fe_interleaving {
850 <para>use the special macro LNA_AUTO to set LNA auto</para> 877 <para>use the special macro LNA_AUTO to set LNA auto</para>
851 </section> 878 </section>
852</section> 879</section>
880
881 <section id="frontend-stat-properties">
882 <title>Frontend statistics indicators</title>
883 <para>The values are returned via <constant>dtv_property.stat</constant>.
884 If the property is supported, <constant>dtv_property.stat.len</constant> is bigger than zero.</para>
885 <para>For most delivery systems, <constant>dtv_property.stat.len</constant>
886 will be 1 if the stats is supported, and the properties will
887 return a single value for each parameter.</para>
888 <para>It should be noticed, however, that new OFDM delivery systems
889 like ISDB can use different modulation types for each group of
890 carriers. On such standards, up to 3 groups of statistics can be
891 provided, and <constant>dtv_property.stat.len</constant> is updated
892 to reflect the "global" metrics, plus one metric per each carrier
893 group (called "layer" on ISDB).</para>
894 <para>So, in order to be consistent with other delivery systems, the first
895 value at <link linkend="dtv-stats"><constant>dtv_property.stat.dtv_stats</constant></link>
896 array refers to the global metric. The other elements of the array
897 represent each layer, starting from layer A(index 1),
898 layer B (index 2) and so on.</para>
899 <para>The number of filled elements are stored at <constant>dtv_property.stat.len</constant>.</para>
900 <para>Each element of the <constant>dtv_property.stat.dtv_stats</constant> array consists on two elements:</para>
901 <itemizedlist mark='opencircle'>
902 <listitem><para><constant>svalue</constant> or <constant>uvalue</constant>, where
903 <constant>svalue</constant> is for signed values of the measure (dB measures)
904 and <constant>uvalue</constant> is for unsigned values (counters, relative scale)</para></listitem>
905 <listitem><para><constant>scale</constant> - Scale for the value. It can be:</para>
906 <section id = "fecap-scale-params">
907 <itemizedlist mark='bullet'>
908 <listitem><para><constant>FE_SCALE_NOT_AVAILABLE</constant> - The parameter is supported by the frontend, but it was not possible to collect it (could be a transitory or permanent condition)</para></listitem>
909 <listitem><para><constant>FE_SCALE_DECIBEL</constant> - parameter is a signed value, measured in 1/1000 dB</para></listitem>
910 <listitem><para><constant>FE_SCALE_RELATIVE</constant> - parameter is a unsigned value, where 0 means 0% and 65535 means 100%.</para></listitem>
911 <listitem><para><constant>FE_SCALE_COUNTER</constant> - parameter is a unsigned value that counts the occurrence of an event, like bit error, block error, or lapsed time.</para></listitem>
912 </itemizedlist>
913 </section>
914 </listitem>
915 </itemizedlist>
916 <section id="DTV-STAT-SIGNAL-STRENGTH">
917 <title><constant>DTV_STAT_SIGNAL_STRENGTH</constant></title>
918 <para>Indicates the signal strength level at the analog part of the tuner or of the demod.</para>
919 <para>Possible scales for this metric are:</para>
920 <itemizedlist mark='bullet'>
921 <listitem><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</listitem>
922 <listitem><constant>FE_SCALE_DECIBEL</constant> - signal strength is in 0.0001 dBm units, power measured in miliwatts. This value is generally negative.</listitem>
923 <listitem><constant>FE_SCALE_RELATIVE</constant> - The frontend provides a 0% to 100% measurement for power (actually, 0 to 65535).</listitem>
924 </itemizedlist>
925 </section>
926 <section id="DTV-STAT-CNR">
927 <title><constant>DTV_STAT_CNR</constant></title>
928 <para>Indicates the Signal to Noise ratio for the main carrier.</para>
929 <para>Possible scales for this metric are:</para>
930 <itemizedlist mark='bullet'>
931 <listitem><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</listitem>
932 <listitem><constant>FE_SCALE_DECIBEL</constant> - Signal/Noise ratio is in 0.0001 dB units.</listitem>
933 <listitem><constant>FE_SCALE_RELATIVE</constant> - The frontend provides a 0% to 100% measurement for Signal/Noise (actually, 0 to 65535).</listitem>
934 </itemizedlist>
935 </section>
936 <section id="DTV-STAT-PRE-ERROR-BIT-COUNT">
937 <title><constant>DTV_STAT_PRE_ERROR_BIT_COUNT</constant></title>
938 <para>Measures the number of bit errors before the forward error correction (FEC) on the inner coding block (before Viterbi, LDPC or other inner code).</para>
939 <para>This measure is taken during the same interval as <constant>DTV_STAT_PRE_TOTAL_BIT_COUNT</constant>.</para>
940 <para>In order to get the BER (Bit Error Rate) measurement, it should be divided by
941 <link linkend="DTV-STAT-PRE-TOTAL-BIT-COUNT"><constant>DTV_STAT_PRE_TOTAL_BIT_COUNT</constant></link>.</para>
942 <para>This measurement is monotonically increased, as the frontend gets more bit count measurements.
943 The frontend may reset it when a channel/transponder is tuned.</para>
944 <para>Possible scales for this metric are:</para>
945 <itemizedlist mark='bullet'>
946 <listitem><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</listitem>
947 <listitem><constant>FE_SCALE_COUNTER</constant> - Number of error bits counted before the inner coding.</listitem>
948 </itemizedlist>
949 </section>
950 <section id="DTV-STAT-PRE-TOTAL-BIT-COUNT">
951 <title><constant>DTV_STAT_PRE_TOTAL_BIT_COUNT</constant></title>
952 <para>Measures the amount of bits received before the inner code block, during the same period as
953 <link linkend="DTV-STAT-PRE-ERROR-BIT-COUNT"><constant>DTV_STAT_PRE_ERROR_BIT_COUNT</constant></link> measurement was taken.</para>
954 <para>It should be noticed that this measurement can be smaller than the total amount of bits on the transport stream,
955 as the frontend may need to manually restart the measurement, loosing some data between each measurement interval.</para>
956 <para>This measurement is monotonically increased, as the frontend gets more bit count measurements.
957 The frontend may reset it when a channel/transponder is tuned.</para>
958 <para>Possible scales for this metric are:</para>
959 <itemizedlist mark='bullet'>
960 <listitem><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</listitem>
961 <listitem><constant>FE_SCALE_COUNTER</constant> - Number of bits counted while measuring
962 <link linkend="DTV-STAT-PRE-ERROR-BIT-COUNT"><constant>DTV_STAT_PRE_ERROR_BIT_COUNT</constant></link>.</listitem>
963 </itemizedlist>
964 </section>
965 <section id="DTV-STAT-POST-ERROR-BIT-COUNT">
966 <title><constant>DTV_STAT_POST_ERROR_BIT_COUNT</constant></title>
967 <para>Measures the number of bit errors after the forward error correction (FEC) done by inner code block (after Viterbi, LDPC or other inner code).</para>
968 <para>This measure is taken during the same interval as <constant>DTV_STAT_POST_TOTAL_BIT_COUNT</constant>.</para>
969 <para>In order to get the BER (Bit Error Rate) measurement, it should be divided by
970 <link linkend="DTV-STAT-POST-TOTAL-BIT-COUNT"><constant>DTV_STAT_POST_TOTAL_BIT_COUNT</constant></link>.</para>
971 <para>This measurement is monotonically increased, as the frontend gets more bit count measurements.
972 The frontend may reset it when a channel/transponder is tuned.</para>
973 <para>Possible scales for this metric are:</para>
974 <itemizedlist mark='bullet'>
975 <listitem><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</listitem>
976 <listitem><constant>FE_SCALE_COUNTER</constant> - Number of error bits counted after the inner coding.</listitem>
977 </itemizedlist>
978 </section>
979 <section id="DTV-STAT-POST-TOTAL-BIT-COUNT">
980 <title><constant>DTV_STAT_POST_TOTAL_BIT_COUNT</constant></title>
981 <para>Measures the amount of bits received after the inner coding, during the same period as
982 <link linkend="DTV-STAT-POST-ERROR-BIT-COUNT"><constant>DTV_STAT_POST_ERROR_BIT_COUNT</constant></link> measurement was taken.</para>
983 <para>It should be noticed that this measurement can be smaller than the total amount of bits on the transport stream,
984 as the frontend may need to manually restart the measurement, loosing some data between each measurement interval.</para>
985 <para>This measurement is monotonically increased, as the frontend gets more bit count measurements.
986 The frontend may reset it when a channel/transponder is tuned.</para>
987 <para>Possible scales for this metric are:</para>
988 <itemizedlist mark='bullet'>
989 <listitem><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</listitem>
990 <listitem><constant>FE_SCALE_COUNTER</constant> - Number of bits counted while measuring
991 <link linkend="DTV-STAT-POST-ERROR-BIT-COUNT"><constant>DTV_STAT_POST_ERROR_BIT_COUNT</constant></link>.</listitem>
992 </itemizedlist>
993 </section>
994 <section id="DTV-STAT-ERROR-BLOCK-COUNT">
995 <title><constant>DTV_STAT_ERROR_BLOCK_COUNT</constant></title>
996 <para>Measures the number of block errors after the outer forward error correction coding (after Reed-Solomon or other outer code).</para>
997 <para>This measurement is monotonically increased, as the frontend gets more bit count measurements.
998 The frontend may reset it when a channel/transponder is tuned.</para>
999 <para>Possible scales for this metric are:</para>
1000 <itemizedlist mark='bullet'>
1001 <listitem><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</listitem>
1002 <listitem><constant>FE_SCALE_COUNTER</constant> - Number of error blocks counted after the outer coding.</listitem>
1003 </itemizedlist>
1004 </section>
1005 <section id="DTV-STAT-TOTAL-BLOCK-COUNT">
1006 <title><constant>DTV-STAT_TOTAL_BLOCK_COUNT</constant></title>
1007 <para>Measures the total number of blocks received during the same period as
1008 <link linkend="DTV-STAT-ERROR-BLOCK-COUNT"><constant>DTV_STAT_ERROR_BLOCK_COUNT</constant></link> measurement was taken.</para>
1009 <para>It can be used to calculate the PER indicator, by dividing
1010 <link linkend="DTV-STAT-ERROR-BLOCK-COUNT"><constant>DTV_STAT_ERROR_BLOCK_COUNT</constant></link>
1011 by <link linkend="DTV-STAT-TOTAL-BLOCK-COUNT"><constant>DTV-STAT-TOTAL-BLOCK-COUNT</constant></link>.</para>
1012 <para>Possible scales for this metric are:</para>
1013 <itemizedlist mark='bullet'>
1014 <listitem><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</listitem>
1015 <listitem><constant>FE_SCALE_COUNTER</constant> - Number of blocks counted while measuring
1016 <link linkend="DTV-STAT-ERROR-BLOCK-COUNT"><constant>DTV_STAT_ERROR_BLOCK_COUNT</constant></link>.</listitem>
1017 </itemizedlist>
1018 </section>
1019 </section>
1020
853 <section id="frontend-property-terrestrial-systems"> 1021 <section id="frontend-property-terrestrial-systems">
854 <title>Properties used on terrestrial delivery systems</title> 1022 <title>Properties used on terrestrial delivery systems</title>
855 <section id="dvbt-params"> 1023 <section id="dvbt-params">
@@ -871,6 +1039,7 @@ enum fe_interleaving {
871 <listitem><para><link linkend="DTV-HIERARCHY"><constant>DTV_HIERARCHY</constant></link></para></listitem> 1039 <listitem><para><link linkend="DTV-HIERARCHY"><constant>DTV_HIERARCHY</constant></link></para></listitem>
872 <listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem> 1040 <listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem>
873 </itemizedlist> 1041 </itemizedlist>
1042 <para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para>
874 </section> 1043 </section>
875 <section id="dvbt2-params"> 1044 <section id="dvbt2-params">
876 <title>DVB-T2 delivery system</title> 1045 <title>DVB-T2 delivery system</title>
@@ -895,6 +1064,7 @@ enum fe_interleaving {
895 <listitem><para><link linkend="DTV-STREAM-ID"><constant>DTV_STREAM_ID</constant></link></para></listitem> 1064 <listitem><para><link linkend="DTV-STREAM-ID"><constant>DTV_STREAM_ID</constant></link></para></listitem>
896 <listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem> 1065 <listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem>
897 </itemizedlist> 1066 </itemizedlist>
1067 <para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para>
898 </section> 1068 </section>
899 <section id="isdbt"> 1069 <section id="isdbt">
900 <title>ISDB-T delivery system</title> 1070 <title>ISDB-T delivery system</title>
@@ -948,6 +1118,7 @@ enum fe_interleaving {
948 <listitem><para><link linkend="DTV-ISDBT-LAYER-SEGMENT-COUNT"><constant>DTV_ISDBT_LAYERC_SEGMENT_COUNT</constant></link></para></listitem> 1118 <listitem><para><link linkend="DTV-ISDBT-LAYER-SEGMENT-COUNT"><constant>DTV_ISDBT_LAYERC_SEGMENT_COUNT</constant></link></para></listitem>
949 <listitem><para><link linkend="DTV-ISDBT-LAYER-TIME-INTERLEAVING"><constant>DTV_ISDBT_LAYERC_TIME_INTERLEAVING</constant></link></para></listitem> 1119 <listitem><para><link linkend="DTV-ISDBT-LAYER-TIME-INTERLEAVING"><constant>DTV_ISDBT_LAYERC_TIME_INTERLEAVING</constant></link></para></listitem>
950 </itemizedlist> 1120 </itemizedlist>
1121 <para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para>
951 </section> 1122 </section>
952 <section id="atsc-params"> 1123 <section id="atsc-params">
953 <title>ATSC delivery system</title> 1124 <title>ATSC delivery system</title>
@@ -961,6 +1132,7 @@ enum fe_interleaving {
961 <listitem><para><link linkend="DTV-MODULATION"><constant>DTV_MODULATION</constant></link></para></listitem> 1132 <listitem><para><link linkend="DTV-MODULATION"><constant>DTV_MODULATION</constant></link></para></listitem>
962 <listitem><para><link linkend="DTV-BANDWIDTH-HZ"><constant>DTV_BANDWIDTH_HZ</constant></link></para></listitem> 1133 <listitem><para><link linkend="DTV-BANDWIDTH-HZ"><constant>DTV_BANDWIDTH_HZ</constant></link></para></listitem>
963 </itemizedlist> 1134 </itemizedlist>
1135 <para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para>
964 </section> 1136 </section>
965 <section id="atscmh-params"> 1137 <section id="atscmh-params">
966 <title>ATSC-MH delivery system</title> 1138 <title>ATSC-MH delivery system</title>
@@ -988,6 +1160,7 @@ enum fe_interleaving {
988 <listitem><para><link linkend="DTV-ATSCMH-SCCC-CODE-MODE-C"><constant>DTV_ATSCMH_SCCC_CODE_MODE_C</constant></link></para></listitem> 1160 <listitem><para><link linkend="DTV-ATSCMH-SCCC-CODE-MODE-C"><constant>DTV_ATSCMH_SCCC_CODE_MODE_C</constant></link></para></listitem>
989 <listitem><para><link linkend="DTV-ATSCMH-SCCC-CODE-MODE-D"><constant>DTV_ATSCMH_SCCC_CODE_MODE_D</constant></link></para></listitem> 1161 <listitem><para><link linkend="DTV-ATSCMH-SCCC-CODE-MODE-D"><constant>DTV_ATSCMH_SCCC_CODE_MODE_D</constant></link></para></listitem>
990 </itemizedlist> 1162 </itemizedlist>
1163 <para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para>
991 </section> 1164 </section>
992 <section id="dtmb-params"> 1165 <section id="dtmb-params">
993 <title>DTMB delivery system</title> 1166 <title>DTMB delivery system</title>
@@ -1007,6 +1180,7 @@ enum fe_interleaving {
1007 <listitem><para><link linkend="DTV-INTERLEAVING"><constant>DTV_INTERLEAVING</constant></link></para></listitem> 1180 <listitem><para><link linkend="DTV-INTERLEAVING"><constant>DTV_INTERLEAVING</constant></link></para></listitem>
1008 <listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem> 1181 <listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem>
1009 </itemizedlist> 1182 </itemizedlist>
1183 <para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para>
1010 </section> 1184 </section>
1011 </section> 1185 </section>
1012 <section id="frontend-property-cable-systems"> 1186 <section id="frontend-property-cable-systems">
@@ -1028,6 +1202,7 @@ enum fe_interleaving {
1028 <listitem><para><link linkend="DTV-INNER-FEC"><constant>DTV_INNER_FEC</constant></link></para></listitem> 1202 <listitem><para><link linkend="DTV-INNER-FEC"><constant>DTV_INNER_FEC</constant></link></para></listitem>
1029 <listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem> 1203 <listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem>
1030 </itemizedlist> 1204 </itemizedlist>
1205 <para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para>
1031 </section> 1206 </section>
1032 <section id="dvbc-annex-b-params"> 1207 <section id="dvbc-annex-b-params">
1033 <title>DVB-C Annex B delivery system</title> 1208 <title>DVB-C Annex B delivery system</title>
@@ -1043,6 +1218,7 @@ enum fe_interleaving {
1043 <listitem><para><link linkend="DTV-INVERSION"><constant>DTV_INVERSION</constant></link></para></listitem> 1218 <listitem><para><link linkend="DTV-INVERSION"><constant>DTV_INVERSION</constant></link></para></listitem>
1044 <listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem> 1219 <listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem>
1045 </itemizedlist> 1220 </itemizedlist>
1221 <para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para>
1046 </section> 1222 </section>
1047 </section> 1223 </section>
1048 <section id="frontend-property-satellital-systems"> 1224 <section id="frontend-property-satellital-systems">
@@ -1062,6 +1238,7 @@ enum fe_interleaving {
1062 <listitem><para><link linkend="DTV-VOLTAGE"><constant>DTV_VOLTAGE</constant></link></para></listitem> 1238 <listitem><para><link linkend="DTV-VOLTAGE"><constant>DTV_VOLTAGE</constant></link></para></listitem>
1063 <listitem><para><link linkend="DTV-TONE"><constant>DTV_TONE</constant></link></para></listitem> 1239 <listitem><para><link linkend="DTV-TONE"><constant>DTV_TONE</constant></link></para></listitem>
1064 </itemizedlist> 1240 </itemizedlist>
1241 <para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para>
1065 <para>Future implementations might add those two missing parameters:</para> 1242 <para>Future implementations might add those two missing parameters:</para>
1066 <itemizedlist mark='opencircle'> 1243 <itemizedlist mark='opencircle'>
1067 <listitem><para><link linkend="DTV-DISEQC-MASTER"><constant>DTV_DISEQC_MASTER</constant></link></para></listitem> 1244 <listitem><para><link linkend="DTV-DISEQC-MASTER"><constant>DTV_DISEQC_MASTER</constant></link></para></listitem>
@@ -1077,6 +1254,7 @@ enum fe_interleaving {
1077 <listitem><para><link linkend="DTV-ROLLOFF"><constant>DTV_ROLLOFF</constant></link></para></listitem> 1254 <listitem><para><link linkend="DTV-ROLLOFF"><constant>DTV_ROLLOFF</constant></link></para></listitem>
1078 <listitem><para><link linkend="DTV-STREAM-ID"><constant>DTV_STREAM_ID</constant></link></para></listitem> 1255 <listitem><para><link linkend="DTV-STREAM-ID"><constant>DTV_STREAM_ID</constant></link></para></listitem>
1079 </itemizedlist> 1256 </itemizedlist>
1257 <para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para>
1080 </section> 1258 </section>
1081 <section id="turbo-params"> 1259 <section id="turbo-params">
1082 <title>Turbo code delivery system</title> 1260 <title>Turbo code delivery system</title>
diff --git a/Documentation/DocBook/media/dvb/frontend.xml b/Documentation/DocBook/media/dvb/frontend.xml
index 426c2526a454..df39ba395df0 100644
--- a/Documentation/DocBook/media/dvb/frontend.xml
+++ b/Documentation/DocBook/media/dvb/frontend.xml
@@ -230,7 +230,7 @@ typedef enum fe_status {
230<entry align="char">The frontend has found a DVB signal</entry> 230<entry align="char">The frontend has found a DVB signal</entry>
231</row><row> 231</row><row>
232<entry align="char">FE_HAS_VITERBI</entry> 232<entry align="char">FE_HAS_VITERBI</entry>
233<entry align="char">The frontend FEC code is stable</entry> 233<entry align="char">The frontend FEC inner coding (Viterbi, LDPC or other inner code) is stable</entry>
234</row><row> 234</row><row>
235<entry align="char">FE_HAS_SYNC</entry> 235<entry align="char">FE_HAS_SYNC</entry>
236<entry align="char">Syncronization bytes was found</entry> 236<entry align="char">Syncronization bytes was found</entry>
diff --git a/Documentation/DocBook/media/v4l/common.xml b/Documentation/DocBook/media/v4l/common.xml
index 73c6847436c9..ae06afbbb3a9 100644
--- a/Documentation/DocBook/media/v4l/common.xml
+++ b/Documentation/DocBook/media/v4l/common.xml
@@ -609,7 +609,7 @@ to zero and the <constant>VIDIOC_G_STD</constant>,
609 <para>Applications can make use of the <xref linkend="input-capabilities" /> and 609 <para>Applications can make use of the <xref linkend="input-capabilities" /> and
610<xref linkend="output-capabilities"/> flags to determine whether the video standard ioctls 610<xref linkend="output-capabilities"/> flags to determine whether the video standard ioctls
611are available for the device.</para> 611are available for the device.</para>
612&ENOTTY;. 612
613 <para>See <xref linkend="buffer" /> for a rationale. Probably 613 <para>See <xref linkend="buffer" /> for a rationale. Probably
614even USB cameras follow some well known video standard. It might have 614even USB cameras follow some well known video standard. It might have
615been better to explicitly indicate elsewhere if a device cannot live 615been better to explicitly indicate elsewhere if a device cannot live
diff --git a/Documentation/DocBook/media/v4l/compat.xml b/Documentation/DocBook/media/v4l/compat.xml
index 4fdf6b562d1c..104a1a2b8849 100644
--- a/Documentation/DocBook/media/v4l/compat.xml
+++ b/Documentation/DocBook/media/v4l/compat.xml
@@ -2477,6 +2477,22 @@ that used it. It was originally scheduled for removal in 2.6.35.
2477 </orderedlist> 2477 </orderedlist>
2478 </section> 2478 </section>
2479 2479
2480 <section>
2481 <title>V4L2 in Linux 3.9</title>
2482 <orderedlist>
2483 <listitem>
2484 <para>Added timestamp types to
2485 <structfield>flags</structfield> field in
2486 <structname>v4l2_buffer</structname>. See <xref
2487 linkend="buffer-flags" />.</para>
2488 </listitem>
2489 <listitem>
2490 <para>Added <constant>V4L2_EVENT_CTRL_CH_RANGE</constant> control event
2491 changes flag. See <xref linkend="changes-flags"/>.</para>
2492 </listitem>
2493 </orderedlist>
2494 </section>
2495
2480 <section id="other"> 2496 <section id="other">
2481 <title>Relation of V4L2 to other Linux multimedia APIs</title> 2497 <title>Relation of V4L2 to other Linux multimedia APIs</title>
2482 2498
@@ -2586,6 +2602,13 @@ ioctls.</para>
2586 <para>Vendor and device specific media bus pixel formats. 2602 <para>Vendor and device specific media bus pixel formats.
2587 <xref linkend="v4l2-mbus-vendor-spec-fmts" />.</para> 2603 <xref linkend="v4l2-mbus-vendor-spec-fmts" />.</para>
2588 </listitem> 2604 </listitem>
2605 <listitem>
2606 <para>Importing DMABUF file descriptors as a new IO method described
2607 in <xref linkend="dmabuf" />.</para>
2608 </listitem>
2609 <listitem>
2610 <para>Exporting DMABUF files using &VIDIOC-EXPBUF; ioctl.</para>
2611 </listitem>
2589 </itemizedlist> 2612 </itemizedlist>
2590 </section> 2613 </section>
2591 2614
diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml
index 7fe5be1d3bbb..9e8f85498678 100644
--- a/Documentation/DocBook/media/v4l/controls.xml
+++ b/Documentation/DocBook/media/v4l/controls.xml
@@ -203,29 +203,6 @@ and should not be used in new drivers and applications.</entry>
203 <entry>boolean</entry> 203 <entry>boolean</entry>
204 <entry>Mirror the picture vertically.</entry> 204 <entry>Mirror the picture vertically.</entry>
205 </row> 205 </row>
206 <row>
207 <entry><constant>V4L2_CID_HCENTER_DEPRECATED</constant> (formerly <constant>V4L2_CID_HCENTER</constant>)</entry>
208 <entry>integer</entry>
209 <entry>Horizontal image centering. This control is
210deprecated. New drivers and applications should use the <link
211linkend="camera-controls">Camera class controls</link>
212<constant>V4L2_CID_PAN_ABSOLUTE</constant>,
213<constant>V4L2_CID_PAN_RELATIVE</constant> and
214<constant>V4L2_CID_PAN_RESET</constant> instead.</entry>
215 </row>
216 <row>
217 <entry><constant>V4L2_CID_VCENTER_DEPRECATED</constant>
218 (formerly <constant>V4L2_CID_VCENTER</constant>)</entry>
219 <entry>integer</entry>
220 <entry>Vertical image centering. Centering is intended to
221<emphasis>physically</emphasis> adjust cameras. For image cropping see
222<xref linkend="crop" />, for clipping <xref linkend="overlay" />. This
223control is deprecated. New drivers and applications should use the
224<link linkend="camera-controls">Camera class controls</link>
225<constant>V4L2_CID_TILT_ABSOLUTE</constant>,
226<constant>V4L2_CID_TILT_RELATIVE</constant> and
227<constant>V4L2_CID_TILT_RESET</constant> instead.</entry>
228 </row>
229 <row id="v4l2-power-line-frequency"> 206 <row id="v4l2-power-line-frequency">
230 <entry><constant>V4L2_CID_POWER_LINE_FREQUENCY</constant></entry> 207 <entry><constant>V4L2_CID_POWER_LINE_FREQUENCY</constant></entry>
231 <entry>enum</entry> 208 <entry>enum</entry>
diff --git a/Documentation/DocBook/media/v4l/driver.xml b/Documentation/DocBook/media/v4l/driver.xml
index eacafe312cd2..7c6638bacedb 100644
--- a/Documentation/DocBook/media/v4l/driver.xml
+++ b/Documentation/DocBook/media/v4l/driver.xml
@@ -116,7 +116,7 @@ my_suspend (struct pci_dev * pci_dev,
116 return 0; /* a negative value on error, 0 on success. */ 116 return 0; /* a negative value on error, 0 on success. */
117} 117}
118 118
119static void __devexit 119static void
120my_remove (struct pci_dev * pci_dev) 120my_remove (struct pci_dev * pci_dev)
121{ 121{
122 my_device *my = pci_get_drvdata (pci_dev); 122 my_device *my = pci_get_drvdata (pci_dev);
@@ -124,7 +124,7 @@ my_remove (struct pci_dev * pci_dev)
124 /* Describe me. */ 124 /* Describe me. */
125} 125}
126 126
127static int __devinit 127static int
128my_probe (struct pci_dev * pci_dev, 128my_probe (struct pci_dev * pci_dev,
129 const struct pci_device_id * pci_id) 129 const struct pci_device_id * pci_id)
130{ 130{
@@ -157,7 +157,7 @@ my_pci_driver = {
157 .id_table = my_pci_device_ids, 157 .id_table = my_pci_device_ids,
158 158
159 .probe = my_probe, 159 .probe = my_probe,
160 .remove = __devexit_p (my_remove), 160 .remove = my_remove,
161 161
162 /* Power management functions. */ 162 /* Power management functions. */
163 .suspend = my_suspend, 163 .suspend = my_suspend,
diff --git a/Documentation/DocBook/media/v4l/io.xml b/Documentation/DocBook/media/v4l/io.xml
index b5d1cbdc558b..e6c58559ca6b 100644
--- a/Documentation/DocBook/media/v4l/io.xml
+++ b/Documentation/DocBook/media/v4l/io.xml
@@ -331,7 +331,7 @@ application until one or more buffers can be dequeued. By default
331outgoing queue. When the <constant>O_NONBLOCK</constant> flag was 331outgoing queue. When the <constant>O_NONBLOCK</constant> flag was
332given to the &func-open; function, <constant>VIDIOC_DQBUF</constant> 332given to the &func-open; function, <constant>VIDIOC_DQBUF</constant>
333returns immediately with an &EAGAIN; when no buffer is available. The 333returns immediately with an &EAGAIN; when no buffer is available. The
334&func-select; or &func-poll; function are always available.</para> 334&func-select; or &func-poll; functions are always available.</para>
335 335
336 <para>To start and stop capturing or output applications call the 336 <para>To start and stop capturing or output applications call the
337&VIDIOC-STREAMON; and &VIDIOC-STREAMOFF; ioctl. Note 337&VIDIOC-STREAMON; and &VIDIOC-STREAMOFF; ioctl. Note
@@ -472,6 +472,165 @@ rest should be evident.</para>
472 </footnote></para> 472 </footnote></para>
473 </section> 473 </section>
474 474
475 <section id="dmabuf">
476 <title>Streaming I/O (DMA buffer importing)</title>
477
478 <note>
479 <title>Experimental</title>
480 <para>This is an <link linkend="experimental">experimental</link>
481 interface and may change in the future.</para>
482 </note>
483
484<para>The DMABUF framework provides a generic method for sharing buffers
485between multiple devices. Device drivers that support DMABUF can export a DMA
486buffer to userspace as a file descriptor (known as the exporter role), import a
487DMA buffer from userspace using a file descriptor previously exported for a
488different or the same device (known as the importer role), or both. This
489section describes the DMABUF importer role API in V4L2.</para>
490
491 <para>Refer to <link linkend="vidioc-expbuf">DMABUF exporting</link> for
492details about exporting V4L2 buffers as DMABUF file descriptors.</para>
493
494<para>Input and output devices support the streaming I/O method when the
495<constant>V4L2_CAP_STREAMING</constant> flag in the
496<structfield>capabilities</structfield> field of &v4l2-capability; returned by
497the &VIDIOC-QUERYCAP; ioctl is set. Whether importing DMA buffers through
498DMABUF file descriptors is supported is determined by calling the
499&VIDIOC-REQBUFS; ioctl with the memory type set to
500<constant>V4L2_MEMORY_DMABUF</constant>.</para>
501
502 <para>This I/O method is dedicated to sharing DMA buffers between different
503devices, which may be V4L devices or other video-related devices (e.g. DRM).
504Buffers (planes) are allocated by a driver on behalf of an application. Next,
505these buffers are exported to the application as file descriptors using an API
506which is specific for an allocator driver. Only such file descriptor are
507exchanged. The descriptors and meta-information are passed in &v4l2-buffer; (or
508in &v4l2-plane; in the multi-planar API case). The driver must be switched
509into DMABUF I/O mode by calling the &VIDIOC-REQBUFS; with the desired buffer
510type.</para>
511
512 <example>
513 <title>Initiating streaming I/O with DMABUF file descriptors</title>
514
515 <programlisting>
516&v4l2-requestbuffers; reqbuf;
517
518memset(&amp;reqbuf, 0, sizeof (reqbuf));
519reqbuf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
520reqbuf.memory = V4L2_MEMORY_DMABUF;
521reqbuf.count = 1;
522
523if (ioctl(fd, &VIDIOC-REQBUFS;, &amp;reqbuf) == -1) {
524 if (errno == EINVAL)
525 printf("Video capturing or DMABUF streaming is not supported\n");
526 else
527 perror("VIDIOC_REQBUFS");
528
529 exit(EXIT_FAILURE);
530}
531 </programlisting>
532 </example>
533
534 <para>The buffer (plane) file descriptor is passed on the fly with the
535&VIDIOC-QBUF; ioctl. In case of multiplanar buffers, every plane can be
536associated with a different DMABUF descriptor. Although buffers are commonly
537cycled, applications can pass a different DMABUF descriptor at each
538<constant>VIDIOC_QBUF</constant> call.</para>
539
540 <example>
541 <title>Queueing DMABUF using single plane API</title>
542
543 <programlisting>
544int buffer_queue(int v4lfd, int index, int dmafd)
545{
546 &v4l2-buffer; buf;
547
548 memset(&amp;buf, 0, sizeof buf);
549 buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
550 buf.memory = V4L2_MEMORY_DMABUF;
551 buf.index = index;
552 buf.m.fd = dmafd;
553
554 if (ioctl(v4lfd, &VIDIOC-QBUF;, &amp;buf) == -1) {
555 perror("VIDIOC_QBUF");
556 return -1;
557 }
558
559 return 0;
560}
561 </programlisting>
562 </example>
563
564 <example>
565 <title>Queueing DMABUF using multi plane API</title>
566
567 <programlisting>
568int buffer_queue_mp(int v4lfd, int index, int dmafd[], int n_planes)
569{
570 &v4l2-buffer; buf;
571 &v4l2-plane; planes[VIDEO_MAX_PLANES];
572 int i;
573
574 memset(&amp;buf, 0, sizeof buf);
575 buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
576 buf.memory = V4L2_MEMORY_DMABUF;
577 buf.index = index;
578 buf.m.planes = planes;
579 buf.length = n_planes;
580
581 memset(&amp;planes, 0, sizeof planes);
582
583 for (i = 0; i &lt; n_planes; ++i)
584 buf.m.planes[i].m.fd = dmafd[i];
585
586 if (ioctl(v4lfd, &VIDIOC-QBUF;, &amp;buf) == -1) {
587 perror("VIDIOC_QBUF");
588 return -1;
589 }
590
591 return 0;
592}
593 </programlisting>
594 </example>
595
596 <para>Captured or displayed buffers are dequeued with the
597&VIDIOC-DQBUF; ioctl. The driver can unlock the buffer at any
598time between the completion of the DMA and this ioctl. The memory is
599also unlocked when &VIDIOC-STREAMOFF; is called, &VIDIOC-REQBUFS;, or
600when the device is closed.</para>
601
602 <para>For capturing applications it is customary to enqueue a
603number of empty buffers, to start capturing and enter the read loop.
604Here the application waits until a filled buffer can be dequeued, and
605re-enqueues the buffer when the data is no longer needed. Output
606applications fill and enqueue buffers, when enough buffers are stacked
607up output is started. In the write loop, when the application
608runs out of free buffers it must wait until an empty buffer can be
609dequeued and reused. Two methods exist to suspend execution of the
610application until one or more buffers can be dequeued. By default
611<constant>VIDIOC_DQBUF</constant> blocks when no buffer is in the
612outgoing queue. When the <constant>O_NONBLOCK</constant> flag was
613given to the &func-open; function, <constant>VIDIOC_DQBUF</constant>
614returns immediately with an &EAGAIN; when no buffer is available. The
615&func-select; and &func-poll; functions are always available.</para>
616
617 <para>To start and stop capturing or displaying applications call the
618&VIDIOC-STREAMON; and &VIDIOC-STREAMOFF; ioctls. Note that
619<constant>VIDIOC_STREAMOFF</constant> removes all buffers from both queues and
620unlocks all buffers as a side effect. Since there is no notion of doing
621anything "now" on a multitasking system, if an application needs to synchronize
622with another event it should examine the &v4l2-buffer;
623<structfield>timestamp</structfield> of captured buffers, or set the field
624before enqueuing buffers for output.</para>
625
626 <para>Drivers implementing DMABUF importing I/O must support the
627<constant>VIDIOC_REQBUFS</constant>, <constant>VIDIOC_QBUF</constant>,
628<constant>VIDIOC_DQBUF</constant>, <constant>VIDIOC_STREAMON</constant> and
629<constant>VIDIOC_STREAMOFF</constant> ioctls, and the
630<function>select()</function> and <function>poll()</function> functions.</para>
631
632 </section>
633
475 <section id="async"> 634 <section id="async">
476 <title>Asynchronous I/O</title> 635 <title>Asynchronous I/O</title>
477 636
@@ -582,17 +741,19 @@ applications when an output stream.</entry>
582 <entry>struct timeval</entry> 741 <entry>struct timeval</entry>
583 <entry><structfield>timestamp</structfield></entry> 742 <entry><structfield>timestamp</structfield></entry>
584 <entry></entry> 743 <entry></entry>
585 <entry><para>For input streams this is the 744 <entry><para>For input streams this is time when the first data
586system time (as returned by the <function>gettimeofday()</function> 745 byte was captured, as returned by the
587function) when the first data byte was captured. For output streams 746 <function>clock_gettime()</function> function for the relevant
588the data will not be displayed before this time, secondary to the 747 clock id; see <constant>V4L2_BUF_FLAG_TIMESTAMP_*</constant> in
589nominal frame rate determined by the current video standard in 748 <xref linkend="buffer-flags" />. For output streams the data
590enqueued order. Applications can for example zero this field to 749 will not be displayed before this time, secondary to the nominal
591display frames as soon as possible. The driver stores the time at 750 frame rate determined by the current video standard in enqueued
592which the first data byte was actually sent out in the 751 order. Applications can for example zero this field to display
593<structfield>timestamp</structfield> field. This permits 752 frames as soon as possible. The driver stores the time at which
594applications to monitor the drift between the video and system 753 the first data byte was actually sent out in the
595clock.</para></entry> 754 <structfield>timestamp</structfield> field. This permits
755 applications to monitor the drift between the video and system
756 clock.</para></entry>
596 </row> 757 </row>
597 <row> 758 <row>
598 <entry>&v4l2-timecode;</entry> 759 <entry>&v4l2-timecode;</entry>
@@ -673,6 +834,14 @@ memory, set by the application. See <xref linkend="userp" /> for details.
673 <structname>v4l2_buffer</structname> structure.</entry> 834 <structname>v4l2_buffer</structname> structure.</entry>
674 </row> 835 </row>
675 <row> 836 <row>
837 <entry></entry>
838 <entry>int</entry>
839 <entry><structfield>fd</structfield></entry>
840 <entry>For the single-plane API and when
841<structfield>memory</structfield> is <constant>V4L2_MEMORY_DMABUF</constant> this
842is the file descriptor associated with a DMABUF buffer.</entry>
843 </row>
844 <row>
676 <entry>__u32</entry> 845 <entry>__u32</entry>
677 <entry><structfield>length</structfield></entry> 846 <entry><structfield>length</structfield></entry>
678 <entry></entry> 847 <entry></entry>
@@ -736,7 +905,7 @@ should set this to 0.</entry>
736 </row> 905 </row>
737 <row> 906 <row>
738 <entry></entry> 907 <entry></entry>
739 <entry>__unsigned long</entry> 908 <entry>unsigned long</entry>
740 <entry><structfield>userptr</structfield></entry> 909 <entry><structfield>userptr</structfield></entry>
741 <entry>When the memory type in the containing &v4l2-buffer; is 910 <entry>When the memory type in the containing &v4l2-buffer; is
742 <constant>V4L2_MEMORY_USERPTR</constant>, this is a userspace 911 <constant>V4L2_MEMORY_USERPTR</constant>, this is a userspace
@@ -744,6 +913,15 @@ should set this to 0.</entry>
744 </entry> 913 </entry>
745 </row> 914 </row>
746 <row> 915 <row>
916 <entry></entry>
917 <entry>int</entry>
918 <entry><structfield>fd</structfield></entry>
919 <entry>When the memory type in the containing &v4l2-buffer; is
920 <constant>V4L2_MEMORY_DMABUF</constant>, this is a file
921 descriptor associated with a DMABUF buffer, similar to the
922 <structfield>fd</structfield> field in &v4l2-buffer;.</entry>
923 </row>
924 <row>
747 <entry>__u32</entry> 925 <entry>__u32</entry>
748 <entry><structfield>data_offset</structfield></entry> 926 <entry><structfield>data_offset</structfield></entry>
749 <entry></entry> 927 <entry></entry>
@@ -923,7 +1101,7 @@ application. Drivers set or clear this flag when the
923 </row> 1101 </row>
924 <row> 1102 <row>
925 <entry><constant>V4L2_BUF_FLAG_NO_CACHE_INVALIDATE</constant></entry> 1103 <entry><constant>V4L2_BUF_FLAG_NO_CACHE_INVALIDATE</constant></entry>
926 <entry>0x0400</entry> 1104 <entry>0x0800</entry>
927 <entry>Caches do not have to be invalidated for this buffer. 1105 <entry>Caches do not have to be invalidated for this buffer.
928Typically applications shall use this flag if the data captured in the buffer 1106Typically applications shall use this flag if the data captured in the buffer
929is not going to be touched by the CPU, instead the buffer will, probably, be 1107is not going to be touched by the CPU, instead the buffer will, probably, be
@@ -932,12 +1110,41 @@ passed on to a DMA-capable hardware unit for further processing or output.
932 </row> 1110 </row>
933 <row> 1111 <row>
934 <entry><constant>V4L2_BUF_FLAG_NO_CACHE_CLEAN</constant></entry> 1112 <entry><constant>V4L2_BUF_FLAG_NO_CACHE_CLEAN</constant></entry>
935 <entry>0x0800</entry> 1113 <entry>0x1000</entry>
936 <entry>Caches do not have to be cleaned for this buffer. 1114 <entry>Caches do not have to be cleaned for this buffer.
937Typically applications shall use this flag for output buffers if the data 1115Typically applications shall use this flag for output buffers if the data
938in this buffer has not been created by the CPU but by some DMA-capable unit, 1116in this buffer has not been created by the CPU but by some DMA-capable unit,
939in which case caches have not been used.</entry> 1117in which case caches have not been used.</entry>
940 </row> 1118 </row>
1119 <row>
1120 <entry><constant>V4L2_BUF_FLAG_TIMESTAMP_MASK</constant></entry>
1121 <entry>0xe000</entry>
1122 <entry>Mask for timestamp types below. To test the
1123 timestamp type, mask out bits not belonging to timestamp
1124 type by performing a logical and operation with buffer
1125 flags and timestamp mask.</entry>
1126 </row>
1127 <row>
1128 <entry><constant>V4L2_BUF_FLAG_TIMESTAMP_UNKNOWN</constant></entry>
1129 <entry>0x0000</entry>
1130 <entry>Unknown timestamp type. This type is used by
1131 drivers before Linux 3.9 and may be either monotonic (see
1132 below) or realtime (wall clock). Monotonic clock has been
1133 favoured in embedded systems whereas most of the drivers
1134 use the realtime clock. Either kinds of timestamps are
1135 available in user space via
1136 <function>clock_gettime(2)</function> using clock IDs
1137 <constant>CLOCK_MONOTONIC</constant> and
1138 <constant>CLOCK_REALTIME</constant>, respectively.</entry>
1139 </row>
1140 <row>
1141 <entry><constant>V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC</constant></entry>
1142 <entry>0x2000</entry>
1143 <entry>The buffer timestamp has been taken from the
1144 <constant>CLOCK_MONOTONIC</constant> clock. To access the
1145 same clock outside V4L2, use
1146 <function>clock_gettime(2)</function> .</entry>
1147 </row>
941 </tbody> 1148 </tbody>
942 </tgroup> 1149 </tgroup>
943 </table> 1150 </table>
@@ -964,6 +1171,12 @@ pointer</link> I/O.</entry>
964 <entry>3</entry> 1171 <entry>3</entry>
965 <entry>[to do]</entry> 1172 <entry>[to do]</entry>
966 </row> 1173 </row>
1174 <row>
1175 <entry><constant>V4L2_MEMORY_DMABUF</constant></entry>
1176 <entry>4</entry>
1177 <entry>The buffer is used for <link linkend="dmabuf">DMA shared
1178buffer</link> I/O.</entry>
1179 </row>
967 </tbody> 1180 </tbody>
968 </tgroup> 1181 </tgroup>
969 </table> 1182 </table>
diff --git a/Documentation/DocBook/media/v4l/pixfmt-nv12m.xml b/Documentation/DocBook/media/v4l/pixfmt-nv12m.xml
index a990b34d911a..f3a3d459fcdf 100644
--- a/Documentation/DocBook/media/v4l/pixfmt-nv12m.xml
+++ b/Documentation/DocBook/media/v4l/pixfmt-nv12m.xml
@@ -6,7 +6,7 @@
6 <refnamediv> 6 <refnamediv>
7 <refname id="V4L2-PIX-FMT-NV12M"><constant>V4L2_PIX_FMT_NV12M</constant></refname> 7 <refname id="V4L2-PIX-FMT-NV12M"><constant>V4L2_PIX_FMT_NV12M</constant></refname>
8 <refname id="V4L2-PIX-FMT-NV21M"><constant>V4L2_PIX_FMT_NV21M</constant></refname> 8 <refname id="V4L2-PIX-FMT-NV21M"><constant>V4L2_PIX_FMT_NV21M</constant></refname>
9 <refname id="V4L2-PIX-FMT-NV12MT_16X16"><constant>V4L2_PIX_FMT_NV12MT_16X16</constant></refname> 9 <refname id="V4L2-PIX-FMT-NV12MT-16X16"><constant>V4L2_PIX_FMT_NV12MT_16X16</constant></refname>
10 <refpurpose>Variation of <constant>V4L2_PIX_FMT_NV12</constant> and <constant>V4L2_PIX_FMT_NV21</constant> with planes 10 <refpurpose>Variation of <constant>V4L2_PIX_FMT_NV12</constant> and <constant>V4L2_PIX_FMT_NV21</constant> with planes
11 non contiguous in memory. </refpurpose> 11 non contiguous in memory. </refpurpose>
12 </refnamediv> 12 </refnamediv>
diff --git a/Documentation/DocBook/media/v4l/pixfmt-srggb10alaw8.xml b/Documentation/DocBook/media/v4l/pixfmt-srggb10alaw8.xml
new file mode 100644
index 000000000000..29acc2098cc2
--- /dev/null
+++ b/Documentation/DocBook/media/v4l/pixfmt-srggb10alaw8.xml
@@ -0,0 +1,34 @@
1 <refentry>
2 <refmeta>
3 <refentrytitle>
4 V4L2_PIX_FMT_SBGGR10ALAW8 ('aBA8'),
5 V4L2_PIX_FMT_SGBRG10ALAW8 ('aGA8'),
6 V4L2_PIX_FMT_SGRBG10ALAW8 ('agA8'),
7 V4L2_PIX_FMT_SRGGB10ALAW8 ('aRA8'),
8 </refentrytitle>
9 &manvol;
10 </refmeta>
11 <refnamediv>
12 <refname id="V4L2-PIX-FMT-SBGGR10ALAW8">
13 <constant>V4L2_PIX_FMT_SBGGR10ALAW8</constant>
14 </refname>
15 <refname id="V4L2-PIX-FMT-SGBRG10ALAW8">
16 <constant>V4L2_PIX_FMT_SGBRG10ALAW8</constant>
17 </refname>
18 <refname id="V4L2-PIX-FMT-SGRBG10ALAW8">
19 <constant>V4L2_PIX_FMT_SGRBG10ALAW8</constant>
20 </refname>
21 <refname id="V4L2-PIX-FMT-SRGGB10ALAW8">
22 <constant>V4L2_PIX_FMT_SRGGB10ALAW8</constant>
23 </refname>
24 <refpurpose>10-bit Bayer formats compressed to 8 bits</refpurpose>
25 </refnamediv>
26 <refsect1>
27 <title>Description</title>
28 <para>The following four pixel formats are raw sRGB / Bayer
29 formats with 10 bits per color compressed to 8 bits each,
30 using the A-LAW algorithm. Each color component consumes 8
31 bits of memory. In other respects this format is similar to
32 <xref linkend="V4L2-PIX-FMT-SRGGB8"></xref>.</para>
33 </refsect1>
34 </refentry>
diff --git a/Documentation/DocBook/media/v4l/pixfmt-uv8.xml b/Documentation/DocBook/media/v4l/pixfmt-uv8.xml
new file mode 100644
index 000000000000..c507c1f73cd0
--- /dev/null
+++ b/Documentation/DocBook/media/v4l/pixfmt-uv8.xml
@@ -0,0 +1,62 @@
1 <refentry id="V4L2-PIX-FMT-UV8">
2 <refmeta>
3 <refentrytitle>V4L2_PIX_FMT_UV8 ('UV8')</refentrytitle>
4 &manvol;
5 </refmeta>
6 <refnamediv>
7 <refname><constant>V4L2_PIX_FMT_UV8</constant></refname>
8 <refpurpose>UV plane interleaved</refpurpose>
9 </refnamediv>
10 <refsect1>
11 <title>Description</title>
12 <para>In this format there is no Y plane, Only CbCr plane. ie
13 (UV interleaved)</para>
14 <example>
15 <title>
16 <constant>V4L2_PIX_FMT_UV8</constant>
17 pixel image
18 </title>
19
20 <formalpara>
21 <title>Byte Order.</title>
22 <para>Each cell is one byte.
23 <informaltable frame="none">
24 <tgroup cols="5" align="center">
25 <colspec align="left" colwidth="2*" />
26 <tbody valign="top">
27 <row>
28 <entry>start&nbsp;+&nbsp;0:</entry>
29 <entry>Cb<subscript>00</subscript></entry>
30 <entry>Cr<subscript>00</subscript></entry>
31 <entry>Cb<subscript>01</subscript></entry>
32 <entry>Cr<subscript>01</subscript></entry>
33 </row>
34 <row>
35 <entry>start&nbsp;+&nbsp;4:</entry>
36 <entry>Cb<subscript>10</subscript></entry>
37 <entry>Cr<subscript>10</subscript></entry>
38 <entry>Cb<subscript>11</subscript></entry>
39 <entry>Cr<subscript>11</subscript></entry>
40 </row>
41 <row>
42 <entry>start&nbsp;+&nbsp;8:</entry>
43 <entry>Cb<subscript>20</subscript></entry>
44 <entry>Cr<subscript>20</subscript></entry>
45 <entry>Cb<subscript>21</subscript></entry>
46 <entry>Cr<subscript>21</subscript></entry>
47 </row>
48 <row>
49 <entry>start&nbsp;+&nbsp;12:</entry>
50 <entry>Cb<subscript>30</subscript></entry>
51 <entry>Cr<subscript>30</subscript></entry>
52 <entry>Cb<subscript>31</subscript></entry>
53 <entry>Cr<subscript>31</subscript></entry>
54 </row>
55 </tbody>
56 </tgroup>
57 </informaltable>
58 </para>
59 </formalpara>
60 </example>
61 </refsect1>
62 </refentry>
diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml b/Documentation/DocBook/media/v4l/pixfmt.xml
index bf94f417592c..99b8d2ad6e4f 100644
--- a/Documentation/DocBook/media/v4l/pixfmt.xml
+++ b/Documentation/DocBook/media/v4l/pixfmt.xml
@@ -673,6 +673,7 @@ access the palette, this must be done with ioctls of the Linux framebuffer API.<
673 &sub-srggb8; 673 &sub-srggb8;
674 &sub-sbggr16; 674 &sub-sbggr16;
675 &sub-srggb10; 675 &sub-srggb10;
676 &sub-srggb10alaw8;
676 &sub-srggb10dpcm8; 677 &sub-srggb10dpcm8;
677 &sub-srggb12; 678 &sub-srggb12;
678 </section> 679 </section>
@@ -701,6 +702,7 @@ information.</para>
701 &sub-y12; 702 &sub-y12;
702 &sub-y10b; 703 &sub-y10b;
703 &sub-y16; 704 &sub-y16;
705 &sub-uv8;
704 &sub-yuyv; 706 &sub-yuyv;
705 &sub-uyvy; 707 &sub-uyvy;
706 &sub-yvyu; 708 &sub-yvyu;
diff --git a/Documentation/DocBook/media/v4l/subdev-formats.xml b/Documentation/DocBook/media/v4l/subdev-formats.xml
index a0a936455fae..cc51372ed5e0 100644
--- a/Documentation/DocBook/media/v4l/subdev-formats.xml
+++ b/Documentation/DocBook/media/v4l/subdev-formats.xml
@@ -353,9 +353,9 @@
353 <listitem><para>The number of bits per pixel component. All components are 353 <listitem><para>The number of bits per pixel component. All components are
354 transferred on the same number of bits. Common values are 8, 10 and 12.</para> 354 transferred on the same number of bits. Common values are 8, 10 and 12.</para>
355 </listitem> 355 </listitem>
356 <listitem><para>If the pixel components are DPCM-compressed, a mention of the 356 <listitem><para>The compression (optional). If the pixel components are
357 DPCM compression and the number of bits per compressed pixel component.</para> 357 ALAW- or DPCM-compressed, a mention of the compression scheme and the
358 </listitem> 358 number of bits per compressed pixel component.</para></listitem>
359 <listitem><para>The number of bus samples per pixel. Pixels that are wider than 359 <listitem><para>The number of bus samples per pixel. Pixels that are wider than
360 the bus width must be transferred in multiple samples. Common values are 360 the bus width must be transferred in multiple samples. Common values are
361 1 and 2.</para></listitem> 361 1 and 2.</para></listitem>
@@ -504,6 +504,74 @@
504 <entry>r<subscript>1</subscript></entry> 504 <entry>r<subscript>1</subscript></entry>
505 <entry>r<subscript>0</subscript></entry> 505 <entry>r<subscript>0</subscript></entry>
506 </row> 506 </row>
507 <row id="V4L2-MBUS-FMT-SBGGR10-ALAW8-1X8">
508 <entry>V4L2_MBUS_FMT_SBGGR10_ALAW8_1X8</entry>
509 <entry>0x3015</entry>
510 <entry></entry>
511 <entry>-</entry>
512 <entry>-</entry>
513 <entry>-</entry>
514 <entry>-</entry>
515 <entry>b<subscript>7</subscript></entry>
516 <entry>b<subscript>6</subscript></entry>
517 <entry>b<subscript>5</subscript></entry>
518 <entry>b<subscript>4</subscript></entry>
519 <entry>b<subscript>3</subscript></entry>
520 <entry>b<subscript>2</subscript></entry>
521 <entry>b<subscript>1</subscript></entry>
522 <entry>b<subscript>0</subscript></entry>
523 </row>
524 <row id="V4L2-MBUS-FMT-SGBRG10-ALAW8-1X8">
525 <entry>V4L2_MBUS_FMT_SGBRG10_ALAW8_1X8</entry>
526 <entry>0x3016</entry>
527 <entry></entry>
528 <entry>-</entry>
529 <entry>-</entry>
530 <entry>-</entry>
531 <entry>-</entry>
532 <entry>g<subscript>7</subscript></entry>
533 <entry>g<subscript>6</subscript></entry>
534 <entry>g<subscript>5</subscript></entry>
535 <entry>g<subscript>4</subscript></entry>
536 <entry>g<subscript>3</subscript></entry>
537 <entry>g<subscript>2</subscript></entry>
538 <entry>g<subscript>1</subscript></entry>
539 <entry>g<subscript>0</subscript></entry>
540 </row>
541 <row id="V4L2-MBUS-FMT-SGRBG10-ALAW8-1X8">
542 <entry>V4L2_MBUS_FMT_SGRBG10_ALAW8_1X8</entry>
543 <entry>0x3017</entry>
544 <entry></entry>
545 <entry>-</entry>
546 <entry>-</entry>
547 <entry>-</entry>
548 <entry>-</entry>
549 <entry>g<subscript>7</subscript></entry>
550 <entry>g<subscript>6</subscript></entry>
551 <entry>g<subscript>5</subscript></entry>
552 <entry>g<subscript>4</subscript></entry>
553 <entry>g<subscript>3</subscript></entry>
554 <entry>g<subscript>2</subscript></entry>
555 <entry>g<subscript>1</subscript></entry>
556 <entry>g<subscript>0</subscript></entry>
557 </row>
558 <row id="V4L2-MBUS-FMT-SRGGB10-ALAW8-1X8">
559 <entry>V4L2_MBUS_FMT_SRGGB10_ALAW8_1X8</entry>
560 <entry>0x3018</entry>
561 <entry></entry>
562 <entry>-</entry>
563 <entry>-</entry>
564 <entry>-</entry>
565 <entry>-</entry>
566 <entry>r<subscript>7</subscript></entry>
567 <entry>r<subscript>6</subscript></entry>
568 <entry>r<subscript>5</subscript></entry>
569 <entry>r<subscript>4</subscript></entry>
570 <entry>r<subscript>3</subscript></entry>
571 <entry>r<subscript>2</subscript></entry>
572 <entry>r<subscript>1</subscript></entry>
573 <entry>r<subscript>0</subscript></entry>
574 </row>
507 <row id="V4L2-MBUS-FMT-SBGGR10-DPCM8-1X8"> 575 <row id="V4L2-MBUS-FMT-SBGGR10-DPCM8-1X8">
508 <entry>V4L2_MBUS_FMT_SBGGR10_DPCM8_1X8</entry> 576 <entry>V4L2_MBUS_FMT_SBGGR10_DPCM8_1X8</entry>
509 <entry>0x300b</entry> 577 <entry>0x300b</entry>
@@ -853,10 +921,16 @@
853 <title>Packed YUV Formats</title> 921 <title>Packed YUV Formats</title>
854 922
855 <para>Those data formats transfer pixel data as (possibly downsampled) Y, U 923 <para>Those data formats transfer pixel data as (possibly downsampled) Y, U
856 and V components. The format code is made of the following information. 924 and V components. Some formats include dummy bits in some of their samples
925 and are collectively referred to as "YDYC" (Y-Dummy-Y-Chroma) formats.
926 One cannot rely on the values of these dummy bits as those are undefined.
927 </para>
928 <para>The format code is made of the following information.
857 <itemizedlist> 929 <itemizedlist>
858 <listitem><para>The Y, U and V components order code, as transferred on the 930 <listitem><para>The Y, U and V components order code, as transferred on the
859 bus. Possible values are YUYV, UYVY, YVYU and VYUY.</para></listitem> 931 bus. Possible values are YUYV, UYVY, YVYU and VYUY for formats with no
932 dummy bit, and YDYUYDYV, YDYVYDYU, YUYDYVYD and YVYDYUYD for YDYC formats.
933 </para></listitem>
860 <listitem><para>The number of bits per pixel component. All components are 934 <listitem><para>The number of bits per pixel component. All components are
861 transferred on the same number of bits. Common values are 8, 10 and 12.</para> 935 transferred on the same number of bits. Common values are 8, 10 and 12.</para>
862 </listitem> 936 </listitem>
@@ -877,7 +951,21 @@
877 U, Y, V, Y order will be named <constant>V4L2_MBUS_FMT_UYVY8_2X8</constant>. 951 U, Y, V, Y order will be named <constant>V4L2_MBUS_FMT_UYVY8_2X8</constant>.
878 </para> 952 </para>
879 953
880 <para>The following table lisst existing packet YUV formats.</para> 954 <para><xref linkend="v4l2-mbus-pixelcode-yuv8"/> list existing packet YUV
955 formats and describes the organization of each pixel data in each sample.
956 When a format pattern is split across multiple samples each of the samples
957 in the pattern is described.</para>
958
959 <para>The role of each bit transferred over the bus is identified by one
960 of the following codes.</para>
961
962 <itemizedlist>
963 <listitem><para>y<subscript>x</subscript> for luma component bit number x</para></listitem>
964 <listitem><para>u<subscript>x</subscript> for blue chroma component bit number x</para></listitem>
965 <listitem><para>v<subscript>x</subscript> for red chroma component bit number x</para></listitem>
966 <listitem><para>- for non-available bits (for positions higher than the bus width)</para></listitem>
967 <listitem><para>d for dummy bits</para></listitem>
968 </itemizedlist>
881 969
882 <table pgwide="0" frame="none" id="v4l2-mbus-pixelcode-yuv8"> 970 <table pgwide="0" frame="none" id="v4l2-mbus-pixelcode-yuv8">
883 <title>YUV Formats</title> 971 <title>YUV Formats</title>
@@ -885,27 +973,37 @@
885 <colspec colname="id" align="left" /> 973 <colspec colname="id" align="left" />
886 <colspec colname="code" align="center"/> 974 <colspec colname="code" align="center"/>
887 <colspec colname="bit" /> 975 <colspec colname="bit" />
888 <colspec colnum="4" colname="b19" align="center" /> 976 <colspec colnum="4" colname="b29" align="center" />
889 <colspec colnum="5" colname="b18" align="center" /> 977 <colspec colnum="5" colname="b28" align="center" />
890 <colspec colnum="6" colname="b17" align="center" /> 978 <colspec colnum="6" colname="b27" align="center" />
891 <colspec colnum="7" colname="b16" align="center" /> 979 <colspec colnum="7" colname="b26" align="center" />
892 <colspec colnum="8" colname="b15" align="center" /> 980 <colspec colnum="8" colname="b25" align="center" />
893 <colspec colnum="9" colname="b14" align="center" /> 981 <colspec colnum="9" colname="b24" align="center" />
894 <colspec colnum="10" colname="b13" align="center" /> 982 <colspec colnum="10" colname="b23" align="center" />
895 <colspec colnum="11" colname="b12" align="center" /> 983 <colspec colnum="11" colname="b22" align="center" />
896 <colspec colnum="12" colname="b11" align="center" /> 984 <colspec colnum="12" colname="b21" align="center" />
897 <colspec colnum="13" colname="b10" align="center" /> 985 <colspec colnum="13" colname="b20" align="center" />
898 <colspec colnum="14" colname="b09" align="center" /> 986 <colspec colnum="14" colname="b19" align="center" />
899 <colspec colnum="15" colname="b08" align="center" /> 987 <colspec colnum="15" colname="b18" align="center" />
900 <colspec colnum="16" colname="b07" align="center" /> 988 <colspec colnum="16" colname="b17" align="center" />
901 <colspec colnum="17" colname="b06" align="center" /> 989 <colspec colnum="17" colname="b16" align="center" />
902 <colspec colnum="18" colname="b05" align="center" /> 990 <colspec colnum="18" colname="b15" align="center" />
903 <colspec colnum="19" colname="b04" align="center" /> 991 <colspec colnum="19" colname="b14" align="center" />
904 <colspec colnum="20" colname="b03" align="center" /> 992 <colspec colnum="20" colname="b13" align="center" />
905 <colspec colnum="21" colname="b02" align="center" /> 993 <colspec colnum="21" colname="b12" align="center" />
906 <colspec colnum="22" colname="b01" align="center" /> 994 <colspec colnum="22" colname="b11" align="center" />
907 <colspec colnum="23" colname="b00" align="center" /> 995 <colspec colnum="23" colname="b10" align="center" />
908 <spanspec namest="b19" nameend="b00" spanname="b0" /> 996 <colspec colnum="24" colname="b09" align="center" />
997 <colspec colnum="25" colname="b08" align="center" />
998 <colspec colnum="26" colname="b07" align="center" />
999 <colspec colnum="27" colname="b06" align="center" />
1000 <colspec colnum="28" colname="b05" align="center" />
1001 <colspec colnum="29" colname="b04" align="center" />
1002 <colspec colnum="30" colname="b03" align="center" />
1003 <colspec colnum="31" colname="b02" align="center" />
1004 <colspec colnum="32" colname="b01" align="center" />
1005 <colspec colnum="33" colname="b00" align="center" />
1006 <spanspec namest="b29" nameend="b00" spanname="b0" />
909 <thead> 1007 <thead>
910 <row> 1008 <row>
911 <entry>Identifier</entry> 1009 <entry>Identifier</entry>
@@ -917,6 +1015,16 @@
917 <entry></entry> 1015 <entry></entry>
918 <entry></entry> 1016 <entry></entry>
919 <entry>Bit</entry> 1017 <entry>Bit</entry>
1018 <entry>29</entry>
1019 <entry>28</entry>
1020 <entry>27</entry>
1021 <entry>26</entry>
1022 <entry>25</entry>
1023 <entry>24</entry>
1024 <entry>23</entry>
1025 <entry>22</entry>
1026 <entry>21</entry>
1027 <entry>10</entry>
920 <entry>19</entry> 1028 <entry>19</entry>
921 <entry>18</entry> 1029 <entry>18</entry>
922 <entry>17</entry> 1030 <entry>17</entry>
@@ -944,16 +1052,8 @@
944 <entry>V4L2_MBUS_FMT_Y8_1X8</entry> 1052 <entry>V4L2_MBUS_FMT_Y8_1X8</entry>
945 <entry>0x2001</entry> 1053 <entry>0x2001</entry>
946 <entry></entry> 1054 <entry></entry>
947 <entry>-</entry> 1055 &dash-ent-10;
948 <entry>-</entry> 1056 &dash-ent-10;
949 <entry>-</entry>
950 <entry>-</entry>
951 <entry>-</entry>
952 <entry>-</entry>
953 <entry>-</entry>
954 <entry>-</entry>
955 <entry>-</entry>
956 <entry>-</entry>
957 <entry>-</entry> 1057 <entry>-</entry>
958 <entry>-</entry> 1058 <entry>-</entry>
959 <entry>y<subscript>7</subscript></entry> 1059 <entry>y<subscript>7</subscript></entry>
@@ -965,9 +1065,9 @@
965 <entry>y<subscript>1</subscript></entry> 1065 <entry>y<subscript>1</subscript></entry>
966 <entry>y<subscript>0</subscript></entry> 1066 <entry>y<subscript>0</subscript></entry>
967 </row> 1067 </row>
968 <row id="V4L2-MBUS-FMT-UYVY8-1_5X8"> 1068 <row id="V4L2-MBUS-FMT-UV8-1X8">
969 <entry>V4L2_MBUS_FMT_UYVY8_1_5X8</entry> 1069 <entry>V4L2_MBUS_FMT_UV8_1X8</entry>
970 <entry>0x2002</entry> 1070 <entry>0x2015</entry>
971 <entry></entry> 1071 <entry></entry>
972 <entry>-</entry> 1072 <entry>-</entry>
973 <entry>-</entry> 1073 <entry>-</entry>
@@ -1006,6 +1106,40 @@
1006 <entry>-</entry> 1106 <entry>-</entry>
1007 <entry>-</entry> 1107 <entry>-</entry>
1008 <entry>-</entry> 1108 <entry>-</entry>
1109 <entry>v<subscript>7</subscript></entry>
1110 <entry>v<subscript>6</subscript></entry>
1111 <entry>v<subscript>5</subscript></entry>
1112 <entry>v<subscript>4</subscript></entry>
1113 <entry>v<subscript>3</subscript></entry>
1114 <entry>v<subscript>2</subscript></entry>
1115 <entry>v<subscript>1</subscript></entry>
1116 <entry>v<subscript>0</subscript></entry>
1117 </row>
1118 <row id="V4L2-MBUS-FMT-UYVY8-1_5X8">
1119 <entry>V4L2_MBUS_FMT_UYVY8_1_5X8</entry>
1120 <entry>0x2002</entry>
1121 <entry></entry>
1122 &dash-ent-10;
1123 &dash-ent-10;
1124 <entry>-</entry>
1125 <entry>-</entry>
1126 <entry>u<subscript>7</subscript></entry>
1127 <entry>u<subscript>6</subscript></entry>
1128 <entry>u<subscript>5</subscript></entry>
1129 <entry>u<subscript>4</subscript></entry>
1130 <entry>u<subscript>3</subscript></entry>
1131 <entry>u<subscript>2</subscript></entry>
1132 <entry>u<subscript>1</subscript></entry>
1133 <entry>u<subscript>0</subscript></entry>
1134 </row>
1135 <row>
1136 <entry></entry>
1137 <entry></entry>
1138 <entry></entry>
1139 &dash-ent-10;
1140 &dash-ent-10;
1141 <entry>-</entry>
1142 <entry>-</entry>
1009 <entry>y<subscript>7</subscript></entry> 1143 <entry>y<subscript>7</subscript></entry>
1010 <entry>y<subscript>6</subscript></entry> 1144 <entry>y<subscript>6</subscript></entry>
1011 <entry>y<subscript>5</subscript></entry> 1145 <entry>y<subscript>5</subscript></entry>
@@ -1019,16 +1153,8 @@
1019 <entry></entry> 1153 <entry></entry>
1020 <entry></entry> 1154 <entry></entry>
1021 <entry></entry> 1155 <entry></entry>
1022 <entry>-</entry> 1156 &dash-ent-10;
1023 <entry>-</entry> 1157 &dash-ent-10;
1024 <entry>-</entry>
1025 <entry>-</entry>
1026 <entry>-</entry>
1027 <entry>-</entry>
1028 <entry>-</entry>
1029 <entry>-</entry>
1030 <entry>-</entry>
1031 <entry>-</entry>
1032 <entry>-</entry> 1158 <entry>-</entry>
1033 <entry>-</entry> 1159 <entry>-</entry>
1034 <entry>y<subscript>7</subscript></entry> 1160 <entry>y<subscript>7</subscript></entry>
@@ -1044,16 +1170,8 @@
1044 <entry></entry> 1170 <entry></entry>
1045 <entry></entry> 1171 <entry></entry>
1046 <entry></entry> 1172 <entry></entry>
1047 <entry>-</entry> 1173 &dash-ent-10;
1048 <entry>-</entry> 1174 &dash-ent-10;
1049 <entry>-</entry>
1050 <entry>-</entry>
1051 <entry>-</entry>
1052 <entry>-</entry>
1053 <entry>-</entry>
1054 <entry>-</entry>
1055 <entry>-</entry>
1056 <entry>-</entry>
1057 <entry>-</entry> 1175 <entry>-</entry>
1058 <entry>-</entry> 1176 <entry>-</entry>
1059 <entry>v<subscript>7</subscript></entry> 1177 <entry>v<subscript>7</subscript></entry>
@@ -1069,16 +1187,8 @@
1069 <entry></entry> 1187 <entry></entry>
1070 <entry></entry> 1188 <entry></entry>
1071 <entry></entry> 1189 <entry></entry>
1072 <entry>-</entry> 1190 &dash-ent-10;
1073 <entry>-</entry> 1191 &dash-ent-10;
1074 <entry>-</entry>
1075 <entry>-</entry>
1076 <entry>-</entry>
1077 <entry>-</entry>
1078 <entry>-</entry>
1079 <entry>-</entry>
1080 <entry>-</entry>
1081 <entry>-</entry>
1082 <entry>-</entry> 1192 <entry>-</entry>
1083 <entry>-</entry> 1193 <entry>-</entry>
1084 <entry>y<subscript>7</subscript></entry> 1194 <entry>y<subscript>7</subscript></entry>
@@ -1094,16 +1204,8 @@
1094 <entry></entry> 1204 <entry></entry>
1095 <entry></entry> 1205 <entry></entry>
1096 <entry></entry> 1206 <entry></entry>
1097 <entry>-</entry> 1207 &dash-ent-10;
1098 <entry>-</entry> 1208 &dash-ent-10;
1099 <entry>-</entry>
1100 <entry>-</entry>
1101 <entry>-</entry>
1102 <entry>-</entry>
1103 <entry>-</entry>
1104 <entry>-</entry>
1105 <entry>-</entry>
1106 <entry>-</entry>
1107 <entry>-</entry> 1209 <entry>-</entry>
1108 <entry>-</entry> 1210 <entry>-</entry>
1109 <entry>y<subscript>7</subscript></entry> 1211 <entry>y<subscript>7</subscript></entry>
@@ -1119,16 +1221,8 @@
1119 <entry>V4L2_MBUS_FMT_VYUY8_1_5X8</entry> 1221 <entry>V4L2_MBUS_FMT_VYUY8_1_5X8</entry>
1120 <entry>0x2003</entry> 1222 <entry>0x2003</entry>
1121 <entry></entry> 1223 <entry></entry>
1122 <entry>-</entry> 1224 &dash-ent-10;
1123 <entry>-</entry> 1225 &dash-ent-10;
1124 <entry>-</entry>
1125 <entry>-</entry>
1126 <entry>-</entry>
1127 <entry>-</entry>
1128 <entry>-</entry>
1129 <entry>-</entry>
1130 <entry>-</entry>
1131 <entry>-</entry>
1132 <entry>-</entry> 1226 <entry>-</entry>
1133 <entry>-</entry> 1227 <entry>-</entry>
1134 <entry>v<subscript>7</subscript></entry> 1228 <entry>v<subscript>7</subscript></entry>
@@ -1144,16 +1238,8 @@
1144 <entry></entry> 1238 <entry></entry>
1145 <entry></entry> 1239 <entry></entry>
1146 <entry></entry> 1240 <entry></entry>
1147 <entry>-</entry> 1241 &dash-ent-10;
1148 <entry>-</entry> 1242 &dash-ent-10;
1149 <entry>-</entry>
1150 <entry>-</entry>
1151 <entry>-</entry>
1152 <entry>-</entry>
1153 <entry>-</entry>
1154 <entry>-</entry>
1155 <entry>-</entry>
1156 <entry>-</entry>
1157 <entry>-</entry> 1243 <entry>-</entry>
1158 <entry>-</entry> 1244 <entry>-</entry>
1159 <entry>y<subscript>7</subscript></entry> 1245 <entry>y<subscript>7</subscript></entry>
@@ -1169,16 +1255,8 @@
1169 <entry></entry> 1255 <entry></entry>
1170 <entry></entry> 1256 <entry></entry>
1171 <entry></entry> 1257 <entry></entry>
1172 <entry>-</entry> 1258 &dash-ent-10;
1173 <entry>-</entry> 1259 &dash-ent-10;
1174 <entry>-</entry>
1175 <entry>-</entry>
1176 <entry>-</entry>
1177 <entry>-</entry>
1178 <entry>-</entry>
1179 <entry>-</entry>
1180 <entry>-</entry>
1181 <entry>-</entry>
1182 <entry>-</entry> 1260 <entry>-</entry>
1183 <entry>-</entry> 1261 <entry>-</entry>
1184 <entry>y<subscript>7</subscript></entry> 1262 <entry>y<subscript>7</subscript></entry>
@@ -1194,16 +1272,8 @@
1194 <entry></entry> 1272 <entry></entry>
1195 <entry></entry> 1273 <entry></entry>
1196 <entry></entry> 1274 <entry></entry>
1197 <entry>-</entry> 1275 &dash-ent-10;
1198 <entry>-</entry> 1276 &dash-ent-10;
1199 <entry>-</entry>
1200 <entry>-</entry>
1201 <entry>-</entry>
1202 <entry>-</entry>
1203 <entry>-</entry>
1204 <entry>-</entry>
1205 <entry>-</entry>
1206 <entry>-</entry>
1207 <entry>-</entry> 1277 <entry>-</entry>
1208 <entry>-</entry> 1278 <entry>-</entry>
1209 <entry>u<subscript>7</subscript></entry> 1279 <entry>u<subscript>7</subscript></entry>
@@ -1219,16 +1289,8 @@
1219 <entry></entry> 1289 <entry></entry>
1220 <entry></entry> 1290 <entry></entry>
1221 <entry></entry> 1291 <entry></entry>
1222 <entry>-</entry> 1292 &dash-ent-10;
1223 <entry>-</entry> 1293 &dash-ent-10;
1224 <entry>-</entry>
1225 <entry>-</entry>
1226 <entry>-</entry>
1227 <entry>-</entry>
1228 <entry>-</entry>
1229 <entry>-</entry>
1230 <entry>-</entry>
1231 <entry>-</entry>
1232 <entry>-</entry> 1294 <entry>-</entry>
1233 <entry>-</entry> 1295 <entry>-</entry>
1234 <entry>y<subscript>7</subscript></entry> 1296 <entry>y<subscript>7</subscript></entry>
@@ -1244,16 +1306,8 @@
1244 <entry></entry> 1306 <entry></entry>
1245 <entry></entry> 1307 <entry></entry>
1246 <entry></entry> 1308 <entry></entry>
1247 <entry>-</entry> 1309 &dash-ent-10;
1248 <entry>-</entry> 1310 &dash-ent-10;
1249 <entry>-</entry>
1250 <entry>-</entry>
1251 <entry>-</entry>
1252 <entry>-</entry>
1253 <entry>-</entry>
1254 <entry>-</entry>
1255 <entry>-</entry>
1256 <entry>-</entry>
1257 <entry>-</entry> 1311 <entry>-</entry>
1258 <entry>-</entry> 1312 <entry>-</entry>
1259 <entry>y<subscript>7</subscript></entry> 1313 <entry>y<subscript>7</subscript></entry>
@@ -1269,16 +1323,8 @@
1269 <entry>V4L2_MBUS_FMT_YUYV8_1_5X8</entry> 1323 <entry>V4L2_MBUS_FMT_YUYV8_1_5X8</entry>
1270 <entry>0x2004</entry> 1324 <entry>0x2004</entry>
1271 <entry></entry> 1325 <entry></entry>
1272 <entry>-</entry> 1326 &dash-ent-10;
1273 <entry>-</entry> 1327 &dash-ent-10;
1274 <entry>-</entry>
1275 <entry>-</entry>
1276 <entry>-</entry>
1277 <entry>-</entry>
1278 <entry>-</entry>
1279 <entry>-</entry>
1280 <entry>-</entry>
1281 <entry>-</entry>
1282 <entry>-</entry> 1328 <entry>-</entry>
1283 <entry>-</entry> 1329 <entry>-</entry>
1284 <entry>y<subscript>7</subscript></entry> 1330 <entry>y<subscript>7</subscript></entry>
@@ -1294,16 +1340,8 @@
1294 <entry></entry> 1340 <entry></entry>
1295 <entry></entry> 1341 <entry></entry>
1296 <entry></entry> 1342 <entry></entry>
1297 <entry>-</entry> 1343 &dash-ent-10;
1298 <entry>-</entry> 1344 &dash-ent-10;
1299 <entry>-</entry>
1300 <entry>-</entry>
1301 <entry>-</entry>
1302 <entry>-</entry>
1303 <entry>-</entry>
1304 <entry>-</entry>
1305 <entry>-</entry>
1306 <entry>-</entry>
1307 <entry>-</entry> 1345 <entry>-</entry>
1308 <entry>-</entry> 1346 <entry>-</entry>
1309 <entry>y<subscript>7</subscript></entry> 1347 <entry>y<subscript>7</subscript></entry>
@@ -1319,16 +1357,8 @@
1319 <entry></entry> 1357 <entry></entry>
1320 <entry></entry> 1358 <entry></entry>
1321 <entry></entry> 1359 <entry></entry>
1322 <entry>-</entry> 1360 &dash-ent-10;
1323 <entry>-</entry> 1361 &dash-ent-10;
1324 <entry>-</entry>
1325 <entry>-</entry>
1326 <entry>-</entry>
1327 <entry>-</entry>
1328 <entry>-</entry>
1329 <entry>-</entry>
1330 <entry>-</entry>
1331 <entry>-</entry>
1332 <entry>-</entry> 1362 <entry>-</entry>
1333 <entry>-</entry> 1363 <entry>-</entry>
1334 <entry>u<subscript>7</subscript></entry> 1364 <entry>u<subscript>7</subscript></entry>
@@ -1344,16 +1374,8 @@
1344 <entry></entry> 1374 <entry></entry>
1345 <entry></entry> 1375 <entry></entry>
1346 <entry></entry> 1376 <entry></entry>
1347 <entry>-</entry> 1377 &dash-ent-10;
1348 <entry>-</entry> 1378 &dash-ent-10;
1349 <entry>-</entry>
1350 <entry>-</entry>
1351 <entry>-</entry>
1352 <entry>-</entry>
1353 <entry>-</entry>
1354 <entry>-</entry>
1355 <entry>-</entry>
1356 <entry>-</entry>
1357 <entry>-</entry> 1379 <entry>-</entry>
1358 <entry>-</entry> 1380 <entry>-</entry>
1359 <entry>y<subscript>7</subscript></entry> 1381 <entry>y<subscript>7</subscript></entry>
@@ -1369,16 +1391,8 @@
1369 <entry></entry> 1391 <entry></entry>
1370 <entry></entry> 1392 <entry></entry>
1371 <entry></entry> 1393 <entry></entry>
1372 <entry>-</entry> 1394 &dash-ent-10;
1373 <entry>-</entry> 1395 &dash-ent-10;
1374 <entry>-</entry>
1375 <entry>-</entry>
1376 <entry>-</entry>
1377 <entry>-</entry>
1378 <entry>-</entry>
1379 <entry>-</entry>
1380 <entry>-</entry>
1381 <entry>-</entry>
1382 <entry>-</entry> 1396 <entry>-</entry>
1383 <entry>-</entry> 1397 <entry>-</entry>
1384 <entry>y<subscript>7</subscript></entry> 1398 <entry>y<subscript>7</subscript></entry>
@@ -1394,16 +1408,8 @@
1394 <entry></entry> 1408 <entry></entry>
1395 <entry></entry> 1409 <entry></entry>
1396 <entry></entry> 1410 <entry></entry>
1397 <entry>-</entry> 1411 &dash-ent-10;
1398 <entry>-</entry> 1412 &dash-ent-10;
1399 <entry>-</entry>
1400 <entry>-</entry>
1401 <entry>-</entry>
1402 <entry>-</entry>
1403 <entry>-</entry>
1404 <entry>-</entry>
1405 <entry>-</entry>
1406 <entry>-</entry>
1407 <entry>-</entry> 1413 <entry>-</entry>
1408 <entry>-</entry> 1414 <entry>-</entry>
1409 <entry>v<subscript>7</subscript></entry> 1415 <entry>v<subscript>7</subscript></entry>
@@ -1419,16 +1425,8 @@
1419 <entry>V4L2_MBUS_FMT_YVYU8_1_5X8</entry> 1425 <entry>V4L2_MBUS_FMT_YVYU8_1_5X8</entry>
1420 <entry>0x2005</entry> 1426 <entry>0x2005</entry>
1421 <entry></entry> 1427 <entry></entry>
1422 <entry>-</entry> 1428 &dash-ent-10;
1423 <entry>-</entry> 1429 &dash-ent-10;
1424 <entry>-</entry>
1425 <entry>-</entry>
1426 <entry>-</entry>
1427 <entry>-</entry>
1428 <entry>-</entry>
1429 <entry>-</entry>
1430 <entry>-</entry>
1431 <entry>-</entry>
1432 <entry>-</entry> 1430 <entry>-</entry>
1433 <entry>-</entry> 1431 <entry>-</entry>
1434 <entry>y<subscript>7</subscript></entry> 1432 <entry>y<subscript>7</subscript></entry>
@@ -1444,16 +1442,8 @@
1444 <entry></entry> 1442 <entry></entry>
1445 <entry></entry> 1443 <entry></entry>
1446 <entry></entry> 1444 <entry></entry>
1447 <entry>-</entry> 1445 &dash-ent-10;
1448 <entry>-</entry> 1446 &dash-ent-10;
1449 <entry>-</entry>
1450 <entry>-</entry>
1451 <entry>-</entry>
1452 <entry>-</entry>
1453 <entry>-</entry>
1454 <entry>-</entry>
1455 <entry>-</entry>
1456 <entry>-</entry>
1457 <entry>-</entry> 1447 <entry>-</entry>
1458 <entry>-</entry> 1448 <entry>-</entry>
1459 <entry>y<subscript>7</subscript></entry> 1449 <entry>y<subscript>7</subscript></entry>
@@ -1469,16 +1459,8 @@
1469 <entry></entry> 1459 <entry></entry>
1470 <entry></entry> 1460 <entry></entry>
1471 <entry></entry> 1461 <entry></entry>
1472 <entry>-</entry> 1462 &dash-ent-10;
1473 <entry>-</entry> 1463 &dash-ent-10;
1474 <entry>-</entry>
1475 <entry>-</entry>
1476 <entry>-</entry>
1477 <entry>-</entry>
1478 <entry>-</entry>
1479 <entry>-</entry>
1480 <entry>-</entry>
1481 <entry>-</entry>
1482 <entry>-</entry> 1464 <entry>-</entry>
1483 <entry>-</entry> 1465 <entry>-</entry>
1484 <entry>v<subscript>7</subscript></entry> 1466 <entry>v<subscript>7</subscript></entry>
@@ -1494,16 +1476,8 @@
1494 <entry></entry> 1476 <entry></entry>
1495 <entry></entry> 1477 <entry></entry>
1496 <entry></entry> 1478 <entry></entry>
1497 <entry>-</entry> 1479 &dash-ent-10;
1498 <entry>-</entry> 1480 &dash-ent-10;
1499 <entry>-</entry>
1500 <entry>-</entry>
1501 <entry>-</entry>
1502 <entry>-</entry>
1503 <entry>-</entry>
1504 <entry>-</entry>
1505 <entry>-</entry>
1506 <entry>-</entry>
1507 <entry>-</entry> 1481 <entry>-</entry>
1508 <entry>-</entry> 1482 <entry>-</entry>
1509 <entry>y<subscript>7</subscript></entry> 1483 <entry>y<subscript>7</subscript></entry>
@@ -1519,16 +1493,8 @@
1519 <entry></entry> 1493 <entry></entry>
1520 <entry></entry> 1494 <entry></entry>
1521 <entry></entry> 1495 <entry></entry>
1522 <entry>-</entry> 1496 &dash-ent-10;
1523 <entry>-</entry> 1497 &dash-ent-10;
1524 <entry>-</entry>
1525 <entry>-</entry>
1526 <entry>-</entry>
1527 <entry>-</entry>
1528 <entry>-</entry>
1529 <entry>-</entry>
1530 <entry>-</entry>
1531 <entry>-</entry>
1532 <entry>-</entry> 1498 <entry>-</entry>
1533 <entry>-</entry> 1499 <entry>-</entry>
1534 <entry>y<subscript>7</subscript></entry> 1500 <entry>y<subscript>7</subscript></entry>
@@ -1544,16 +1510,8 @@
1544 <entry></entry> 1510 <entry></entry>
1545 <entry></entry> 1511 <entry></entry>
1546 <entry></entry> 1512 <entry></entry>
1547 <entry>-</entry> 1513 &dash-ent-10;
1548 <entry>-</entry> 1514 &dash-ent-10;
1549 <entry>-</entry>
1550 <entry>-</entry>
1551 <entry>-</entry>
1552 <entry>-</entry>
1553 <entry>-</entry>
1554 <entry>-</entry>
1555 <entry>-</entry>
1556 <entry>-</entry>
1557 <entry>-</entry> 1515 <entry>-</entry>
1558 <entry>-</entry> 1516 <entry>-</entry>
1559 <entry>u<subscript>7</subscript></entry> 1517 <entry>u<subscript>7</subscript></entry>
@@ -1569,16 +1527,8 @@
1569 <entry>V4L2_MBUS_FMT_UYVY8_2X8</entry> 1527 <entry>V4L2_MBUS_FMT_UYVY8_2X8</entry>
1570 <entry>0x2006</entry> 1528 <entry>0x2006</entry>
1571 <entry></entry> 1529 <entry></entry>
1572 <entry>-</entry> 1530 &dash-ent-10;
1573 <entry>-</entry> 1531 &dash-ent-10;
1574 <entry>-</entry>
1575 <entry>-</entry>
1576 <entry>-</entry>
1577 <entry>-</entry>
1578 <entry>-</entry>
1579 <entry>-</entry>
1580 <entry>-</entry>
1581 <entry>-</entry>
1582 <entry>-</entry> 1532 <entry>-</entry>
1583 <entry>-</entry> 1533 <entry>-</entry>
1584 <entry>u<subscript>7</subscript></entry> 1534 <entry>u<subscript>7</subscript></entry>
@@ -1594,16 +1544,8 @@
1594 <entry></entry> 1544 <entry></entry>
1595 <entry></entry> 1545 <entry></entry>
1596 <entry></entry> 1546 <entry></entry>
1597 <entry>-</entry> 1547 &dash-ent-10;
1598 <entry>-</entry> 1548 &dash-ent-10;
1599 <entry>-</entry>
1600 <entry>-</entry>
1601 <entry>-</entry>
1602 <entry>-</entry>
1603 <entry>-</entry>
1604 <entry>-</entry>
1605 <entry>-</entry>
1606 <entry>-</entry>
1607 <entry>-</entry> 1549 <entry>-</entry>
1608 <entry>-</entry> 1550 <entry>-</entry>
1609 <entry>y<subscript>7</subscript></entry> 1551 <entry>y<subscript>7</subscript></entry>
@@ -1619,16 +1561,8 @@
1619 <entry></entry> 1561 <entry></entry>
1620 <entry></entry> 1562 <entry></entry>
1621 <entry></entry> 1563 <entry></entry>
1622 <entry>-</entry> 1564 &dash-ent-10;
1623 <entry>-</entry> 1565 &dash-ent-10;
1624 <entry>-</entry>
1625 <entry>-</entry>
1626 <entry>-</entry>
1627 <entry>-</entry>
1628 <entry>-</entry>
1629 <entry>-</entry>
1630 <entry>-</entry>
1631 <entry>-</entry>
1632 <entry>-</entry> 1566 <entry>-</entry>
1633 <entry>-</entry> 1567 <entry>-</entry>
1634 <entry>v<subscript>7</subscript></entry> 1568 <entry>v<subscript>7</subscript></entry>
@@ -1644,16 +1578,8 @@
1644 <entry></entry> 1578 <entry></entry>
1645 <entry></entry> 1579 <entry></entry>
1646 <entry></entry> 1580 <entry></entry>
1647 <entry>-</entry> 1581 &dash-ent-10;
1648 <entry>-</entry> 1582 &dash-ent-10;
1649 <entry>-</entry>
1650 <entry>-</entry>
1651 <entry>-</entry>
1652 <entry>-</entry>
1653 <entry>-</entry>
1654 <entry>-</entry>
1655 <entry>-</entry>
1656 <entry>-</entry>
1657 <entry>-</entry> 1583 <entry>-</entry>
1658 <entry>-</entry> 1584 <entry>-</entry>
1659 <entry>y<subscript>7</subscript></entry> 1585 <entry>y<subscript>7</subscript></entry>
@@ -1669,16 +1595,8 @@
1669 <entry>V4L2_MBUS_FMT_VYUY8_2X8</entry> 1595 <entry>V4L2_MBUS_FMT_VYUY8_2X8</entry>
1670 <entry>0x2007</entry> 1596 <entry>0x2007</entry>
1671 <entry></entry> 1597 <entry></entry>
1672 <entry>-</entry> 1598 &dash-ent-10;
1673 <entry>-</entry> 1599 &dash-ent-10;
1674 <entry>-</entry>
1675 <entry>-</entry>
1676 <entry>-</entry>
1677 <entry>-</entry>
1678 <entry>-</entry>
1679 <entry>-</entry>
1680 <entry>-</entry>
1681 <entry>-</entry>
1682 <entry>-</entry> 1600 <entry>-</entry>
1683 <entry>-</entry> 1601 <entry>-</entry>
1684 <entry>v<subscript>7</subscript></entry> 1602 <entry>v<subscript>7</subscript></entry>
@@ -1694,16 +1612,8 @@
1694 <entry></entry> 1612 <entry></entry>
1695 <entry></entry> 1613 <entry></entry>
1696 <entry></entry> 1614 <entry></entry>
1697 <entry>-</entry> 1615 &dash-ent-10;
1698 <entry>-</entry> 1616 &dash-ent-10;
1699 <entry>-</entry>
1700 <entry>-</entry>
1701 <entry>-</entry>
1702 <entry>-</entry>
1703 <entry>-</entry>
1704 <entry>-</entry>
1705 <entry>-</entry>
1706 <entry>-</entry>
1707 <entry>-</entry> 1617 <entry>-</entry>
1708 <entry>-</entry> 1618 <entry>-</entry>
1709 <entry>y<subscript>7</subscript></entry> 1619 <entry>y<subscript>7</subscript></entry>
@@ -1719,16 +1629,8 @@
1719 <entry></entry> 1629 <entry></entry>
1720 <entry></entry> 1630 <entry></entry>
1721 <entry></entry> 1631 <entry></entry>
1722 <entry>-</entry> 1632 &dash-ent-10;
1723 <entry>-</entry> 1633 &dash-ent-10;
1724 <entry>-</entry>
1725 <entry>-</entry>
1726 <entry>-</entry>
1727 <entry>-</entry>
1728 <entry>-</entry>
1729 <entry>-</entry>
1730 <entry>-</entry>
1731 <entry>-</entry>
1732 <entry>-</entry> 1634 <entry>-</entry>
1733 <entry>-</entry> 1635 <entry>-</entry>
1734 <entry>u<subscript>7</subscript></entry> 1636 <entry>u<subscript>7</subscript></entry>
@@ -1744,16 +1646,8 @@
1744 <entry></entry> 1646 <entry></entry>
1745 <entry></entry> 1647 <entry></entry>
1746 <entry></entry> 1648 <entry></entry>
1747 <entry>-</entry> 1649 &dash-ent-10;
1748 <entry>-</entry> 1650 &dash-ent-10;
1749 <entry>-</entry>
1750 <entry>-</entry>
1751 <entry>-</entry>
1752 <entry>-</entry>
1753 <entry>-</entry>
1754 <entry>-</entry>
1755 <entry>-</entry>
1756 <entry>-</entry>
1757 <entry>-</entry> 1651 <entry>-</entry>
1758 <entry>-</entry> 1652 <entry>-</entry>
1759 <entry>y<subscript>7</subscript></entry> 1653 <entry>y<subscript>7</subscript></entry>
@@ -1769,16 +1663,8 @@
1769 <entry>V4L2_MBUS_FMT_YUYV8_2X8</entry> 1663 <entry>V4L2_MBUS_FMT_YUYV8_2X8</entry>
1770 <entry>0x2008</entry> 1664 <entry>0x2008</entry>
1771 <entry></entry> 1665 <entry></entry>
1772 <entry>-</entry> 1666 &dash-ent-10;
1773 <entry>-</entry> 1667 &dash-ent-10;
1774 <entry>-</entry>
1775 <entry>-</entry>
1776 <entry>-</entry>
1777 <entry>-</entry>
1778 <entry>-</entry>
1779 <entry>-</entry>
1780 <entry>-</entry>
1781 <entry>-</entry>
1782 <entry>-</entry> 1668 <entry>-</entry>
1783 <entry>-</entry> 1669 <entry>-</entry>
1784 <entry>y<subscript>7</subscript></entry> 1670 <entry>y<subscript>7</subscript></entry>
@@ -1794,16 +1680,8 @@
1794 <entry></entry> 1680 <entry></entry>
1795 <entry></entry> 1681 <entry></entry>
1796 <entry></entry> 1682 <entry></entry>
1797 <entry>-</entry> 1683 &dash-ent-10;
1798 <entry>-</entry> 1684 &dash-ent-10;
1799 <entry>-</entry>
1800 <entry>-</entry>
1801 <entry>-</entry>
1802 <entry>-</entry>
1803 <entry>-</entry>
1804 <entry>-</entry>
1805 <entry>-</entry>
1806 <entry>-</entry>
1807 <entry>-</entry> 1685 <entry>-</entry>
1808 <entry>-</entry> 1686 <entry>-</entry>
1809 <entry>u<subscript>7</subscript></entry> 1687 <entry>u<subscript>7</subscript></entry>
@@ -1819,16 +1697,8 @@
1819 <entry></entry> 1697 <entry></entry>
1820 <entry></entry> 1698 <entry></entry>
1821 <entry></entry> 1699 <entry></entry>
1822 <entry>-</entry> 1700 &dash-ent-10;
1823 <entry>-</entry> 1701 &dash-ent-10;
1824 <entry>-</entry>
1825 <entry>-</entry>
1826 <entry>-</entry>
1827 <entry>-</entry>
1828 <entry>-</entry>
1829 <entry>-</entry>
1830 <entry>-</entry>
1831 <entry>-</entry>
1832 <entry>-</entry> 1702 <entry>-</entry>
1833 <entry>-</entry> 1703 <entry>-</entry>
1834 <entry>y<subscript>7</subscript></entry> 1704 <entry>y<subscript>7</subscript></entry>
@@ -1844,16 +1714,8 @@
1844 <entry></entry> 1714 <entry></entry>
1845 <entry></entry> 1715 <entry></entry>
1846 <entry></entry> 1716 <entry></entry>
1847 <entry>-</entry> 1717 &dash-ent-10;
1848 <entry>-</entry> 1718 &dash-ent-10;
1849 <entry>-</entry>
1850 <entry>-</entry>
1851 <entry>-</entry>
1852 <entry>-</entry>
1853 <entry>-</entry>
1854 <entry>-</entry>
1855 <entry>-</entry>
1856 <entry>-</entry>
1857 <entry>-</entry> 1719 <entry>-</entry>
1858 <entry>-</entry> 1720 <entry>-</entry>
1859 <entry>v<subscript>7</subscript></entry> 1721 <entry>v<subscript>7</subscript></entry>
@@ -1869,16 +1731,8 @@
1869 <entry>V4L2_MBUS_FMT_YVYU8_2X8</entry> 1731 <entry>V4L2_MBUS_FMT_YVYU8_2X8</entry>
1870 <entry>0x2009</entry> 1732 <entry>0x2009</entry>
1871 <entry></entry> 1733 <entry></entry>
1872 <entry>-</entry> 1734 &dash-ent-10;
1873 <entry>-</entry> 1735 &dash-ent-10;
1874 <entry>-</entry>
1875 <entry>-</entry>
1876 <entry>-</entry>
1877 <entry>-</entry>
1878 <entry>-</entry>
1879 <entry>-</entry>
1880 <entry>-</entry>
1881 <entry>-</entry>
1882 <entry>-</entry> 1736 <entry>-</entry>
1883 <entry>-</entry> 1737 <entry>-</entry>
1884 <entry>y<subscript>7</subscript></entry> 1738 <entry>y<subscript>7</subscript></entry>
@@ -1894,16 +1748,8 @@
1894 <entry></entry> 1748 <entry></entry>
1895 <entry></entry> 1749 <entry></entry>
1896 <entry></entry> 1750 <entry></entry>
1897 <entry>-</entry> 1751 &dash-ent-10;
1898 <entry>-</entry> 1752 &dash-ent-10;
1899 <entry>-</entry>
1900 <entry>-</entry>
1901 <entry>-</entry>
1902 <entry>-</entry>
1903 <entry>-</entry>
1904 <entry>-</entry>
1905 <entry>-</entry>
1906 <entry>-</entry>
1907 <entry>-</entry> 1753 <entry>-</entry>
1908 <entry>-</entry> 1754 <entry>-</entry>
1909 <entry>v<subscript>7</subscript></entry> 1755 <entry>v<subscript>7</subscript></entry>
@@ -1919,16 +1765,8 @@
1919 <entry></entry> 1765 <entry></entry>
1920 <entry></entry> 1766 <entry></entry>
1921 <entry></entry> 1767 <entry></entry>
1922 <entry>-</entry> 1768 &dash-ent-10;
1923 <entry>-</entry> 1769 &dash-ent-10;
1924 <entry>-</entry>
1925 <entry>-</entry>
1926 <entry>-</entry>
1927 <entry>-</entry>
1928 <entry>-</entry>
1929 <entry>-</entry>
1930 <entry>-</entry>
1931 <entry>-</entry>
1932 <entry>-</entry> 1770 <entry>-</entry>
1933 <entry>-</entry> 1771 <entry>-</entry>
1934 <entry>y<subscript>7</subscript></entry> 1772 <entry>y<subscript>7</subscript></entry>
@@ -1944,16 +1782,8 @@
1944 <entry></entry> 1782 <entry></entry>
1945 <entry></entry> 1783 <entry></entry>
1946 <entry></entry> 1784 <entry></entry>
1947 <entry>-</entry> 1785 &dash-ent-10;
1948 <entry>-</entry> 1786 &dash-ent-10;
1949 <entry>-</entry>
1950 <entry>-</entry>
1951 <entry>-</entry>
1952 <entry>-</entry>
1953 <entry>-</entry>
1954 <entry>-</entry>
1955 <entry>-</entry>
1956 <entry>-</entry>
1957 <entry>-</entry> 1787 <entry>-</entry>
1958 <entry>-</entry> 1788 <entry>-</entry>
1959 <entry>u<subscript>7</subscript></entry> 1789 <entry>u<subscript>7</subscript></entry>
@@ -1969,16 +1799,8 @@
1969 <entry>V4L2_MBUS_FMT_Y10_1X10</entry> 1799 <entry>V4L2_MBUS_FMT_Y10_1X10</entry>
1970 <entry>0x200a</entry> 1800 <entry>0x200a</entry>
1971 <entry></entry> 1801 <entry></entry>
1972 <entry>-</entry> 1802 &dash-ent-10;
1973 <entry>-</entry> 1803 &dash-ent-10;
1974 <entry>-</entry>
1975 <entry>-</entry>
1976 <entry>-</entry>
1977 <entry>-</entry>
1978 <entry>-</entry>
1979 <entry>-</entry>
1980 <entry>-</entry>
1981 <entry>-</entry>
1982 <entry>y<subscript>9</subscript></entry> 1804 <entry>y<subscript>9</subscript></entry>
1983 <entry>y<subscript>8</subscript></entry> 1805 <entry>y<subscript>8</subscript></entry>
1984 <entry>y<subscript>7</subscript></entry> 1806 <entry>y<subscript>7</subscript></entry>
@@ -1994,16 +1816,8 @@
1994 <entry>V4L2_MBUS_FMT_YUYV10_2X10</entry> 1816 <entry>V4L2_MBUS_FMT_YUYV10_2X10</entry>
1995 <entry>0x200b</entry> 1817 <entry>0x200b</entry>
1996 <entry></entry> 1818 <entry></entry>
1997 <entry>-</entry> 1819 &dash-ent-10;
1998 <entry>-</entry> 1820 &dash-ent-10;
1999 <entry>-</entry>
2000 <entry>-</entry>
2001 <entry>-</entry>
2002 <entry>-</entry>
2003 <entry>-</entry>
2004 <entry>-</entry>
2005 <entry>-</entry>
2006 <entry>-</entry>
2007 <entry>y<subscript>9</subscript></entry> 1821 <entry>y<subscript>9</subscript></entry>
2008 <entry>y<subscript>8</subscript></entry> 1822 <entry>y<subscript>8</subscript></entry>
2009 <entry>y<subscript>7</subscript></entry> 1823 <entry>y<subscript>7</subscript></entry>
@@ -2019,16 +1833,8 @@
2019 <entry></entry> 1833 <entry></entry>
2020 <entry></entry> 1834 <entry></entry>
2021 <entry></entry> 1835 <entry></entry>
2022 <entry>-</entry> 1836 &dash-ent-10;
2023 <entry>-</entry> 1837 &dash-ent-10;
2024 <entry>-</entry>
2025 <entry>-</entry>
2026 <entry>-</entry>
2027 <entry>-</entry>
2028 <entry>-</entry>
2029 <entry>-</entry>
2030 <entry>-</entry>
2031 <entry>-</entry>
2032 <entry>u<subscript>9</subscript></entry> 1838 <entry>u<subscript>9</subscript></entry>
2033 <entry>u<subscript>8</subscript></entry> 1839 <entry>u<subscript>8</subscript></entry>
2034 <entry>u<subscript>7</subscript></entry> 1840 <entry>u<subscript>7</subscript></entry>
@@ -2044,16 +1850,8 @@
2044 <entry></entry> 1850 <entry></entry>
2045 <entry></entry> 1851 <entry></entry>
2046 <entry></entry> 1852 <entry></entry>
2047 <entry>-</entry> 1853 &dash-ent-10;
2048 <entry>-</entry> 1854 &dash-ent-10;
2049 <entry>-</entry>
2050 <entry>-</entry>
2051 <entry>-</entry>
2052 <entry>-</entry>
2053 <entry>-</entry>
2054 <entry>-</entry>
2055 <entry>-</entry>
2056 <entry>-</entry>
2057 <entry>y<subscript>9</subscript></entry> 1855 <entry>y<subscript>9</subscript></entry>
2058 <entry>y<subscript>8</subscript></entry> 1856 <entry>y<subscript>8</subscript></entry>
2059 <entry>y<subscript>7</subscript></entry> 1857 <entry>y<subscript>7</subscript></entry>
@@ -2069,16 +1867,8 @@
2069 <entry></entry> 1867 <entry></entry>
2070 <entry></entry> 1868 <entry></entry>
2071 <entry></entry> 1869 <entry></entry>
2072 <entry>-</entry> 1870 &dash-ent-10;
2073 <entry>-</entry> 1871 &dash-ent-10;
2074 <entry>-</entry>
2075 <entry>-</entry>
2076 <entry>-</entry>
2077 <entry>-</entry>
2078 <entry>-</entry>
2079 <entry>-</entry>
2080 <entry>-</entry>
2081 <entry>-</entry>
2082 <entry>v<subscript>9</subscript></entry> 1872 <entry>v<subscript>9</subscript></entry>
2083 <entry>v<subscript>8</subscript></entry> 1873 <entry>v<subscript>8</subscript></entry>
2084 <entry>v<subscript>7</subscript></entry> 1874 <entry>v<subscript>7</subscript></entry>
@@ -2094,16 +1884,8 @@
2094 <entry>V4L2_MBUS_FMT_YVYU10_2X10</entry> 1884 <entry>V4L2_MBUS_FMT_YVYU10_2X10</entry>
2095 <entry>0x200c</entry> 1885 <entry>0x200c</entry>
2096 <entry></entry> 1886 <entry></entry>
2097 <entry>-</entry> 1887 &dash-ent-10;
2098 <entry>-</entry> 1888 &dash-ent-10;
2099 <entry>-</entry>
2100 <entry>-</entry>
2101 <entry>-</entry>
2102 <entry>-</entry>
2103 <entry>-</entry>
2104 <entry>-</entry>
2105 <entry>-</entry>
2106 <entry>-</entry>
2107 <entry>y<subscript>9</subscript></entry> 1889 <entry>y<subscript>9</subscript></entry>
2108 <entry>y<subscript>8</subscript></entry> 1890 <entry>y<subscript>8</subscript></entry>
2109 <entry>y<subscript>7</subscript></entry> 1891 <entry>y<subscript>7</subscript></entry>
@@ -2119,16 +1901,8 @@
2119 <entry></entry> 1901 <entry></entry>
2120 <entry></entry> 1902 <entry></entry>
2121 <entry></entry> 1903 <entry></entry>
2122 <entry>-</entry> 1904 &dash-ent-10;
2123 <entry>-</entry> 1905 &dash-ent-10;
2124 <entry>-</entry>
2125 <entry>-</entry>
2126 <entry>-</entry>
2127 <entry>-</entry>
2128 <entry>-</entry>
2129 <entry>-</entry>
2130 <entry>-</entry>
2131 <entry>-</entry>
2132 <entry>v<subscript>9</subscript></entry> 1906 <entry>v<subscript>9</subscript></entry>
2133 <entry>v<subscript>8</subscript></entry> 1907 <entry>v<subscript>8</subscript></entry>
2134 <entry>v<subscript>7</subscript></entry> 1908 <entry>v<subscript>7</subscript></entry>
@@ -2144,16 +1918,8 @@
2144 <entry></entry> 1918 <entry></entry>
2145 <entry></entry> 1919 <entry></entry>
2146 <entry></entry> 1920 <entry></entry>
2147 <entry>-</entry> 1921 &dash-ent-10;
2148 <entry>-</entry> 1922 &dash-ent-10;
2149 <entry>-</entry>
2150 <entry>-</entry>
2151 <entry>-</entry>
2152 <entry>-</entry>
2153 <entry>-</entry>
2154 <entry>-</entry>
2155 <entry>-</entry>
2156 <entry>-</entry>
2157 <entry>y<subscript>9</subscript></entry> 1923 <entry>y<subscript>9</subscript></entry>
2158 <entry>y<subscript>8</subscript></entry> 1924 <entry>y<subscript>8</subscript></entry>
2159 <entry>y<subscript>7</subscript></entry> 1925 <entry>y<subscript>7</subscript></entry>
@@ -2169,16 +1935,8 @@
2169 <entry></entry> 1935 <entry></entry>
2170 <entry></entry> 1936 <entry></entry>
2171 <entry></entry> 1937 <entry></entry>
2172 <entry>-</entry> 1938 &dash-ent-10;
2173 <entry>-</entry> 1939 &dash-ent-10;
2174 <entry>-</entry>
2175 <entry>-</entry>
2176 <entry>-</entry>
2177 <entry>-</entry>
2178 <entry>-</entry>
2179 <entry>-</entry>
2180 <entry>-</entry>
2181 <entry>-</entry>
2182 <entry>u<subscript>9</subscript></entry> 1940 <entry>u<subscript>9</subscript></entry>
2183 <entry>u<subscript>8</subscript></entry> 1941 <entry>u<subscript>8</subscript></entry>
2184 <entry>u<subscript>7</subscript></entry> 1942 <entry>u<subscript>7</subscript></entry>
@@ -2194,6 +1952,7 @@
2194 <entry>V4L2_MBUS_FMT_Y12_1X12</entry> 1952 <entry>V4L2_MBUS_FMT_Y12_1X12</entry>
2195 <entry>0x2013</entry> 1953 <entry>0x2013</entry>
2196 <entry></entry> 1954 <entry></entry>
1955 &dash-ent-10;
2197 <entry>-</entry> 1956 <entry>-</entry>
2198 <entry>-</entry> 1957 <entry>-</entry>
2199 <entry>-</entry> 1958 <entry>-</entry>
@@ -2219,6 +1978,7 @@
2219 <entry>V4L2_MBUS_FMT_UYVY8_1X16</entry> 1978 <entry>V4L2_MBUS_FMT_UYVY8_1X16</entry>
2220 <entry>0x200f</entry> 1979 <entry>0x200f</entry>
2221 <entry></entry> 1980 <entry></entry>
1981 &dash-ent-10;
2222 <entry>-</entry> 1982 <entry>-</entry>
2223 <entry>-</entry> 1983 <entry>-</entry>
2224 <entry>-</entry> 1984 <entry>-</entry>
@@ -2244,6 +2004,7 @@
2244 <entry></entry> 2004 <entry></entry>
2245 <entry></entry> 2005 <entry></entry>
2246 <entry></entry> 2006 <entry></entry>
2007 &dash-ent-10;
2247 <entry>-</entry> 2008 <entry>-</entry>
2248 <entry>-</entry> 2009 <entry>-</entry>
2249 <entry>-</entry> 2010 <entry>-</entry>
@@ -2269,6 +2030,7 @@
2269 <entry>V4L2_MBUS_FMT_VYUY8_1X16</entry> 2030 <entry>V4L2_MBUS_FMT_VYUY8_1X16</entry>
2270 <entry>0x2010</entry> 2031 <entry>0x2010</entry>
2271 <entry></entry> 2032 <entry></entry>
2033 &dash-ent-10;
2272 <entry>-</entry> 2034 <entry>-</entry>
2273 <entry>-</entry> 2035 <entry>-</entry>
2274 <entry>-</entry> 2036 <entry>-</entry>
@@ -2294,6 +2056,7 @@
2294 <entry></entry> 2056 <entry></entry>
2295 <entry></entry> 2057 <entry></entry>
2296 <entry></entry> 2058 <entry></entry>
2059 &dash-ent-10;
2297 <entry>-</entry> 2060 <entry>-</entry>
2298 <entry>-</entry> 2061 <entry>-</entry>
2299 <entry>-</entry> 2062 <entry>-</entry>
@@ -2319,6 +2082,7 @@
2319 <entry>V4L2_MBUS_FMT_YUYV8_1X16</entry> 2082 <entry>V4L2_MBUS_FMT_YUYV8_1X16</entry>
2320 <entry>0x2011</entry> 2083 <entry>0x2011</entry>
2321 <entry></entry> 2084 <entry></entry>
2085 &dash-ent-10;
2322 <entry>-</entry> 2086 <entry>-</entry>
2323 <entry>-</entry> 2087 <entry>-</entry>
2324 <entry>-</entry> 2088 <entry>-</entry>
@@ -2344,6 +2108,7 @@
2344 <entry></entry> 2108 <entry></entry>
2345 <entry></entry> 2109 <entry></entry>
2346 <entry></entry> 2110 <entry></entry>
2111 &dash-ent-10;
2347 <entry>-</entry> 2112 <entry>-</entry>
2348 <entry>-</entry> 2113 <entry>-</entry>
2349 <entry>-</entry> 2114 <entry>-</entry>
@@ -2369,6 +2134,7 @@
2369 <entry>V4L2_MBUS_FMT_YVYU8_1X16</entry> 2134 <entry>V4L2_MBUS_FMT_YVYU8_1X16</entry>
2370 <entry>0x2012</entry> 2135 <entry>0x2012</entry>
2371 <entry></entry> 2136 <entry></entry>
2137 &dash-ent-10;
2372 <entry>-</entry> 2138 <entry>-</entry>
2373 <entry>-</entry> 2139 <entry>-</entry>
2374 <entry>-</entry> 2140 <entry>-</entry>
@@ -2394,6 +2160,57 @@
2394 <entry></entry> 2160 <entry></entry>
2395 <entry></entry> 2161 <entry></entry>
2396 <entry></entry> 2162 <entry></entry>
2163 &dash-ent-10;
2164 <entry>-</entry>
2165 <entry>-</entry>
2166 <entry>-</entry>
2167 <entry>-</entry>
2168 <entry>y<subscript>7</subscript></entry>
2169 <entry>y<subscript>6</subscript></entry>
2170 <entry>y<subscript>5</subscript></entry>
2171 <entry>y<subscript>4</subscript></entry>
2172 <entry>y<subscript>3</subscript></entry>
2173 <entry>y<subscript>2</subscript></entry>
2174 <entry>y<subscript>1</subscript></entry>
2175 <entry>y<subscript>0</subscript></entry>
2176 <entry>u<subscript>7</subscript></entry>
2177 <entry>u<subscript>6</subscript></entry>
2178 <entry>u<subscript>5</subscript></entry>
2179 <entry>u<subscript>4</subscript></entry>
2180 <entry>u<subscript>3</subscript></entry>
2181 <entry>u<subscript>2</subscript></entry>
2182 <entry>u<subscript>1</subscript></entry>
2183 <entry>u<subscript>0</subscript></entry>
2184 </row>
2185 <row id="V4L2-MBUS-FMT-YDYUYDYV8-1X16">
2186 <entry>V4L2_MBUS_FMT_YDYUYDYV8_1X16</entry>
2187 <entry>0x2014</entry>
2188 <entry></entry>
2189 <entry>-</entry>
2190 <entry>-</entry>
2191 <entry>-</entry>
2192 <entry>-</entry>
2193 <entry>y<subscript>7</subscript></entry>
2194 <entry>y<subscript>6</subscript></entry>
2195 <entry>y<subscript>5</subscript></entry>
2196 <entry>y<subscript>4</subscript></entry>
2197 <entry>y<subscript>3</subscript></entry>
2198 <entry>y<subscript>2</subscript></entry>
2199 <entry>y<subscript>1</subscript></entry>
2200 <entry>y<subscript>0</subscript></entry>
2201 <entry>d</entry>
2202 <entry>d</entry>
2203 <entry>d</entry>
2204 <entry>d</entry>
2205 <entry>d</entry>
2206 <entry>d</entry>
2207 <entry>d</entry>
2208 <entry>d</entry>
2209 </row>
2210 <row>
2211 <entry></entry>
2212 <entry></entry>
2213 <entry></entry>
2397 <entry>-</entry> 2214 <entry>-</entry>
2398 <entry>-</entry> 2215 <entry>-</entry>
2399 <entry>-</entry> 2216 <entry>-</entry>
@@ -2415,10 +2232,61 @@
2415 <entry>u<subscript>1</subscript></entry> 2232 <entry>u<subscript>1</subscript></entry>
2416 <entry>u<subscript>0</subscript></entry> 2233 <entry>u<subscript>0</subscript></entry>
2417 </row> 2234 </row>
2235 <row>
2236 <entry></entry>
2237 <entry></entry>
2238 <entry></entry>
2239 <entry>-</entry>
2240 <entry>-</entry>
2241 <entry>-</entry>
2242 <entry>-</entry>
2243 <entry>y<subscript>7</subscript></entry>
2244 <entry>y<subscript>6</subscript></entry>
2245 <entry>y<subscript>5</subscript></entry>
2246 <entry>y<subscript>4</subscript></entry>
2247 <entry>y<subscript>3</subscript></entry>
2248 <entry>y<subscript>2</subscript></entry>
2249 <entry>y<subscript>1</subscript></entry>
2250 <entry>y<subscript>0</subscript></entry>
2251 <entry>d</entry>
2252 <entry>d</entry>
2253 <entry>d</entry>
2254 <entry>d</entry>
2255 <entry>d</entry>
2256 <entry>d</entry>
2257 <entry>d</entry>
2258 <entry>d</entry>
2259 </row>
2260 <row>
2261 <entry></entry>
2262 <entry></entry>
2263 <entry></entry>
2264 <entry>-</entry>
2265 <entry>-</entry>
2266 <entry>-</entry>
2267 <entry>-</entry>
2268 <entry>y<subscript>7</subscript></entry>
2269 <entry>y<subscript>6</subscript></entry>
2270 <entry>y<subscript>5</subscript></entry>
2271 <entry>y<subscript>4</subscript></entry>
2272 <entry>y<subscript>3</subscript></entry>
2273 <entry>y<subscript>2</subscript></entry>
2274 <entry>y<subscript>1</subscript></entry>
2275 <entry>y<subscript>0</subscript></entry>
2276 <entry>v<subscript>7</subscript></entry>
2277 <entry>v<subscript>6</subscript></entry>
2278 <entry>v<subscript>5</subscript></entry>
2279 <entry>v<subscript>4</subscript></entry>
2280 <entry>v<subscript>3</subscript></entry>
2281 <entry>v<subscript>2</subscript></entry>
2282 <entry>v<subscript>1</subscript></entry>
2283 <entry>v<subscript>0</subscript></entry>
2284 </row>
2418 <row id="V4L2-MBUS-FMT-YUYV10-1X20"> 2285 <row id="V4L2-MBUS-FMT-YUYV10-1X20">
2419 <entry>V4L2_MBUS_FMT_YUYV10_1X20</entry> 2286 <entry>V4L2_MBUS_FMT_YUYV10_1X20</entry>
2420 <entry>0x200d</entry> 2287 <entry>0x200d</entry>
2421 <entry></entry> 2288 <entry></entry>
2289 &dash-ent-10;
2422 <entry>y<subscript>9</subscript></entry> 2290 <entry>y<subscript>9</subscript></entry>
2423 <entry>y<subscript>8</subscript></entry> 2291 <entry>y<subscript>8</subscript></entry>
2424 <entry>y<subscript>7</subscript></entry> 2292 <entry>y<subscript>7</subscript></entry>
@@ -2444,6 +2312,7 @@
2444 <entry></entry> 2312 <entry></entry>
2445 <entry></entry> 2313 <entry></entry>
2446 <entry></entry> 2314 <entry></entry>
2315 &dash-ent-10;
2447 <entry>y<subscript>9</subscript></entry> 2316 <entry>y<subscript>9</subscript></entry>
2448 <entry>y<subscript>8</subscript></entry> 2317 <entry>y<subscript>8</subscript></entry>
2449 <entry>y<subscript>7</subscript></entry> 2318 <entry>y<subscript>7</subscript></entry>
@@ -2469,6 +2338,7 @@
2469 <entry>V4L2_MBUS_FMT_YVYU10_1X20</entry> 2338 <entry>V4L2_MBUS_FMT_YVYU10_1X20</entry>
2470 <entry>0x200e</entry> 2339 <entry>0x200e</entry>
2471 <entry></entry> 2340 <entry></entry>
2341 &dash-ent-10;
2472 <entry>y<subscript>9</subscript></entry> 2342 <entry>y<subscript>9</subscript></entry>
2473 <entry>y<subscript>8</subscript></entry> 2343 <entry>y<subscript>8</subscript></entry>
2474 <entry>y<subscript>7</subscript></entry> 2344 <entry>y<subscript>7</subscript></entry>
@@ -2494,6 +2364,7 @@
2494 <entry></entry> 2364 <entry></entry>
2495 <entry></entry> 2365 <entry></entry>
2496 <entry></entry> 2366 <entry></entry>
2367 &dash-ent-10;
2497 <entry>y<subscript>9</subscript></entry> 2368 <entry>y<subscript>9</subscript></entry>
2498 <entry>y<subscript>8</subscript></entry> 2369 <entry>y<subscript>8</subscript></entry>
2499 <entry>y<subscript>7</subscript></entry> 2370 <entry>y<subscript>7</subscript></entry>
@@ -2515,6 +2386,41 @@
2515 <entry>u<subscript>1</subscript></entry> 2386 <entry>u<subscript>1</subscript></entry>
2516 <entry>u<subscript>0</subscript></entry> 2387 <entry>u<subscript>0</subscript></entry>
2517 </row> 2388 </row>
2389 <row id="V4L2-MBUS-FMT-YUV10-1X30">
2390 <entry>V4L2_MBUS_FMT_YUV10_1X30</entry>
2391 <entry>0x2014</entry>
2392 <entry></entry>
2393 <entry>y<subscript>9</subscript></entry>
2394 <entry>y<subscript>8</subscript></entry>
2395 <entry>y<subscript>7</subscript></entry>
2396 <entry>y<subscript>6</subscript></entry>
2397 <entry>y<subscript>5</subscript></entry>
2398 <entry>y<subscript>4</subscript></entry>
2399 <entry>y<subscript>3</subscript></entry>
2400 <entry>y<subscript>2</subscript></entry>
2401 <entry>y<subscript>1</subscript></entry>
2402 <entry>y<subscript>0</subscript></entry>
2403 <entry>u<subscript>9</subscript></entry>
2404 <entry>u<subscript>8</subscript></entry>
2405 <entry>u<subscript>7</subscript></entry>
2406 <entry>u<subscript>6</subscript></entry>
2407 <entry>u<subscript>5</subscript></entry>
2408 <entry>u<subscript>4</subscript></entry>
2409 <entry>u<subscript>3</subscript></entry>
2410 <entry>u<subscript>2</subscript></entry>
2411 <entry>u<subscript>1</subscript></entry>
2412 <entry>u<subscript>0</subscript></entry>
2413 <entry>v<subscript>9</subscript></entry>
2414 <entry>v<subscript>8</subscript></entry>
2415 <entry>v<subscript>7</subscript></entry>
2416 <entry>v<subscript>6</subscript></entry>
2417 <entry>v<subscript>5</subscript></entry>
2418 <entry>v<subscript>4</subscript></entry>
2419 <entry>v<subscript>3</subscript></entry>
2420 <entry>v<subscript>2</subscript></entry>
2421 <entry>v<subscript>1</subscript></entry>
2422 <entry>v<subscript>0</subscript></entry>
2423 </row>
2518 </tbody> 2424 </tbody>
2519 </tgroup> 2425 </tgroup>
2520 </table> 2426 </table>
diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml
index 10ccde9d16d0..a3cce18384e9 100644
--- a/Documentation/DocBook/media/v4l/v4l2.xml
+++ b/Documentation/DocBook/media/v4l/v4l2.xml
@@ -140,6 +140,16 @@ structs, ioctls) must be noted in more detail in the history chapter
140applications. --> 140applications. -->
141 141
142 <revision> 142 <revision>
143 <revnumber>3.9</revnumber>
144 <date>2012-12-03</date>
145 <authorinitials>sa, sn</authorinitials>
146 <revremark>Added timestamp types to v4l2_buffer.
147 Added <constant>V4L2_EVENT_CTRL_CH_RANGE</constant> control
148 event changes flag, see <xref linkend="changes-flags"/>.
149 </revremark>
150 </revision>
151
152 <revision>
143 <revnumber>3.6</revnumber> 153 <revnumber>3.6</revnumber>
144 <date>2012-07-02</date> 154 <date>2012-07-02</date>
145 <authorinitials>hv</authorinitials> 155 <authorinitials>hv</authorinitials>
@@ -472,7 +482,7 @@ and discussions on the V4L mailing list.</revremark>
472</partinfo> 482</partinfo>
473 483
474<title>Video for Linux Two API Specification</title> 484<title>Video for Linux Two API Specification</title>
475 <subtitle>Revision 3.6</subtitle> 485 <subtitle>Revision 3.9</subtitle>
476 486
477 <chapter id="common"> 487 <chapter id="common">
478 &sub-common; 488 &sub-common;
@@ -543,6 +553,7 @@ and discussions on the V4L mailing list.</revremark>
543 &sub-enuminput; 553 &sub-enuminput;
544 &sub-enumoutput; 554 &sub-enumoutput;
545 &sub-enumstd; 555 &sub-enumstd;
556 &sub-expbuf;
546 &sub-g-audio; 557 &sub-g-audio;
547 &sub-g-audioout; 558 &sub-g-audioout;
548 &sub-g-crop; 559 &sub-g-crop;
diff --git a/Documentation/DocBook/media/v4l/vidioc-create-bufs.xml b/Documentation/DocBook/media/v4l/vidioc-create-bufs.xml
index a8cda1acacd9..cd9943672434 100644
--- a/Documentation/DocBook/media/v4l/vidioc-create-bufs.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-create-bufs.xml
@@ -6,7 +6,8 @@
6 6
7 <refnamediv> 7 <refnamediv>
8 <refname>VIDIOC_CREATE_BUFS</refname> 8 <refname>VIDIOC_CREATE_BUFS</refname>
9 <refpurpose>Create buffers for Memory Mapped or User Pointer I/O</refpurpose> 9 <refpurpose>Create buffers for Memory Mapped or User Pointer or DMA Buffer
10 I/O</refpurpose>
10 </refnamediv> 11 </refnamediv>
11 12
12 <refsynopsisdiv> 13 <refsynopsisdiv>
@@ -55,11 +56,11 @@
55 </note> 56 </note>
56 57
57 <para>This ioctl is used to create buffers for <link linkend="mmap">memory 58 <para>This ioctl is used to create buffers for <link linkend="mmap">memory
58mapped</link> or <link linkend="userp">user pointer</link> 59mapped</link> or <link linkend="userp">user pointer</link> or <link
59I/O. It can be used as an alternative or in addition to the 60linkend="dmabuf">DMA buffer</link> I/O. It can be used as an alternative or in
60<constant>VIDIOC_REQBUFS</constant> ioctl, when a tighter control over buffers 61addition to the <constant>VIDIOC_REQBUFS</constant> ioctl, when a tighter
61is required. This ioctl can be called multiple times to create buffers of 62control over buffers is required. This ioctl can be called multiple times to
62different sizes.</para> 63create buffers of different sizes.</para>
63 64
64 <para>To allocate device buffers applications initialize relevant fields of 65 <para>To allocate device buffers applications initialize relevant fields of
65the <structname>v4l2_create_buffers</structname> structure. They set the 66the <structname>v4l2_create_buffers</structname> structure. They set the
@@ -109,7 +110,8 @@ information.</para>
109 <entry>__u32</entry> 110 <entry>__u32</entry>
110 <entry><structfield>memory</structfield></entry> 111 <entry><structfield>memory</structfield></entry>
111 <entry>Applications set this field to 112 <entry>Applications set this field to
112<constant>V4L2_MEMORY_MMAP</constant> or 113<constant>V4L2_MEMORY_MMAP</constant>,
114<constant>V4L2_MEMORY_DMABUF</constant> or
113<constant>V4L2_MEMORY_USERPTR</constant>. See <xref linkend="v4l2-memory" 115<constant>V4L2_MEMORY_USERPTR</constant>. See <xref linkend="v4l2-memory"
114/></entry> 116/></entry>
115 </row> 117 </row>
diff --git a/Documentation/DocBook/media/v4l/vidioc-dqevent.xml b/Documentation/DocBook/media/v4l/vidioc-dqevent.xml
index 98a856f9ec30..89891adb928a 100644
--- a/Documentation/DocBook/media/v4l/vidioc-dqevent.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-dqevent.xml
@@ -261,6 +261,12 @@
261 <entry>This control event was triggered because the control flags 261 <entry>This control event was triggered because the control flags
262 changed.</entry> 262 changed.</entry>
263 </row> 263 </row>
264 <row>
265 <entry><constant>V4L2_EVENT_CTRL_CH_RANGE</constant></entry>
266 <entry>0x0004</entry>
267 <entry>This control event was triggered because the minimum,
268 maximum, step or the default value of the control changed.</entry>
269 </row>
264 </tbody> 270 </tbody>
265 </tgroup> 271 </tgroup>
266 </table> 272 </table>
diff --git a/Documentation/DocBook/media/v4l/vidioc-expbuf.xml b/Documentation/DocBook/media/v4l/vidioc-expbuf.xml
new file mode 100644
index 000000000000..e287c8fc803b
--- /dev/null
+++ b/Documentation/DocBook/media/v4l/vidioc-expbuf.xml
@@ -0,0 +1,208 @@
1<refentry id="vidioc-expbuf">
2
3 <refmeta>
4 <refentrytitle>ioctl VIDIOC_EXPBUF</refentrytitle>
5 &manvol;
6 </refmeta>
7
8 <refnamediv>
9 <refname>VIDIOC_EXPBUF</refname>
10 <refpurpose>Export a buffer as a DMABUF file descriptor.</refpurpose>
11 </refnamediv>
12
13 <refsynopsisdiv>
14 <funcsynopsis>
15 <funcprototype>
16 <funcdef>int <function>ioctl</function></funcdef>
17 <paramdef>int <parameter>fd</parameter></paramdef>
18 <paramdef>int <parameter>request</parameter></paramdef>
19 <paramdef>struct v4l2_exportbuffer *<parameter>argp</parameter></paramdef>
20 </funcprototype>
21 </funcsynopsis>
22 </refsynopsisdiv>
23
24 <refsect1>
25 <title>Arguments</title>
26
27 <variablelist>
28 <varlistentry>
29 <term><parameter>fd</parameter></term>
30 <listitem>
31 <para>&fd;</para>
32 </listitem>
33 </varlistentry>
34 <varlistentry>
35 <term><parameter>request</parameter></term>
36 <listitem>
37 <para>VIDIOC_EXPBUF</para>
38 </listitem>
39 </varlistentry>
40 <varlistentry>
41 <term><parameter>argp</parameter></term>
42 <listitem>
43 <para></para>
44 </listitem>
45 </varlistentry>
46 </variablelist>
47 </refsect1>
48
49 <refsect1>
50 <title>Description</title>
51
52 <note>
53 <title>Experimental</title>
54 <para>This is an <link linkend="experimental"> experimental </link>
55 interface and may change in the future.</para>
56 </note>
57
58<para>This ioctl is an extension to the <link linkend="mmap">memory
59mapping</link> I/O method, therefore it is available only for
60<constant>V4L2_MEMORY_MMAP</constant> buffers. It can be used to export a
61buffer as a DMABUF file at any time after buffers have been allocated with the
62&VIDIOC-REQBUFS; ioctl.</para>
63
64<para> To export a buffer, applications fill &v4l2-exportbuffer;. The
65<structfield> type </structfield> field is set to the same buffer type as was
66previously used with &v4l2-requestbuffers;<structfield> type </structfield>.
67Applications must also set the <structfield> index </structfield> field. Valid
68index numbers range from zero to the number of buffers allocated with
69&VIDIOC-REQBUFS; (&v4l2-requestbuffers;<structfield> count </structfield>)
70minus one. For the multi-planar API, applications set the <structfield> plane
71</structfield> field to the index of the plane to be exported. Valid planes
72range from zero to the maximal number of valid planes for the currently active
73format. For the single-planar API, applications must set <structfield> plane
74</structfield> to zero. Additional flags may be posted in the <structfield>
75flags </structfield> field. Refer to a manual for open() for details.
76Currently only O_CLOEXEC is supported. All other fields must be set to zero.
77In the case of multi-planar API, every plane is exported separately using
78multiple <constant> VIDIOC_EXPBUF </constant> calls. </para>
79
80<para> After calling <constant>VIDIOC_EXPBUF</constant> the <structfield> fd
81</structfield> field will be set by a driver. This is a DMABUF file
82descriptor. The application may pass it to other DMABUF-aware devices. Refer to
83<link linkend="dmabuf">DMABUF importing</link> for details about importing
84DMABUF files into V4L2 nodes. It is recommended to close a DMABUF file when it
85is no longer used to allow the associated memory to be reclaimed. </para>
86 </refsect1>
87
88 <refsect1>
89 <title>Examples</title>
90
91 <example>
92 <title>Exporting a buffer.</title>
93 <programlisting>
94int buffer_export(int v4lfd, &v4l2-buf-type; bt, int index, int *dmafd)
95{
96 &v4l2-exportbuffer; expbuf;
97
98 memset(&amp;expbuf, 0, sizeof(expbuf));
99 expbuf.type = bt;
100 expbuf.index = index;
101 if (ioctl(v4lfd, &VIDIOC-EXPBUF;, &amp;expbuf) == -1) {
102 perror("VIDIOC_EXPBUF");
103 return -1;
104 }
105
106 *dmafd = expbuf.fd;
107
108 return 0;
109}
110 </programlisting>
111 </example>
112
113 <example>
114 <title>Exporting a buffer using the multi-planar API.</title>
115 <programlisting>
116int buffer_export_mp(int v4lfd, &v4l2-buf-type; bt, int index,
117 int dmafd[], int n_planes)
118{
119 int i;
120
121 for (i = 0; i &lt; n_planes; ++i) {
122 &v4l2-exportbuffer; expbuf;
123
124 memset(&amp;expbuf, 0, sizeof(expbuf));
125 expbuf.type = bt;
126 expbuf.index = index;
127 expbuf.plane = i;
128 if (ioctl(v4lfd, &VIDIOC-EXPBUF;, &amp;expbuf) == -1) {
129 perror("VIDIOC_EXPBUF");
130 while (i)
131 close(dmafd[--i]);
132 return -1;
133 }
134 dmafd[i] = expbuf.fd;
135 }
136
137 return 0;
138}
139 </programlisting>
140 </example>
141
142 <table pgwide="1" frame="none" id="v4l2-exportbuffer">
143 <title>struct <structname>v4l2_exportbuffer</structname></title>
144 <tgroup cols="3">
145 &cs-str;
146 <tbody valign="top">
147 <row>
148 <entry>__u32</entry>
149 <entry><structfield>type</structfield></entry>
150 <entry>Type of the buffer, same as &v4l2-format;
151<structfield>type</structfield> or &v4l2-requestbuffers;
152<structfield>type</structfield>, set by the application. See <xref
153linkend="v4l2-buf-type" /></entry>
154 </row>
155 <row>
156 <entry>__u32</entry>
157 <entry><structfield>index</structfield></entry>
158 <entry>Number of the buffer, set by the application. This field is
159only used for <link linkend="mmap">memory mapping</link> I/O and can range from
160zero to the number of buffers allocated with the &VIDIOC-REQBUFS; and/or
161&VIDIOC-CREATE-BUFS; ioctls. </entry>
162 </row>
163 <row>
164 <entry>__u32</entry>
165 <entry><structfield>plane</structfield></entry>
166 <entry>Index of the plane to be exported when using the
167multi-planar API. Otherwise this value must be set to zero. </entry>
168 </row>
169 <row>
170 <entry>__u32</entry>
171 <entry><structfield>flags</structfield></entry>
172 <entry>Flags for the newly created file, currently only <constant>
173O_CLOEXEC </constant> is supported, refer to the manual of open() for more
174details.</entry>
175 </row>
176 <row>
177 <entry>__s32</entry>
178 <entry><structfield>fd</structfield></entry>
179 <entry>The DMABUF file descriptor associated with a buffer. Set by
180 the driver.</entry>
181 </row>
182 <row>
183 <entry>__u32</entry>
184 <entry><structfield>reserved[11]</structfield></entry>
185 <entry>Reserved field for future use. Must be set to zero.</entry>
186 </row>
187 </tbody>
188 </tgroup>
189 </table>
190
191 </refsect1>
192
193 <refsect1>
194 &return-value;
195 <variablelist>
196 <varlistentry>
197 <term><errorcode>EINVAL</errorcode></term>
198 <listitem>
199 <para>A queue is not in MMAP mode or DMABUF exporting is not
200supported or <structfield> flags </structfield> or <structfield> type
201</structfield> or <structfield> index </structfield> or <structfield> plane
202</structfield> fields are invalid.</para>
203 </listitem>
204 </varlistentry>
205 </variablelist>
206 </refsect1>
207
208</refentry>
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-ctrl.xml b/Documentation/DocBook/media/v4l/vidioc-g-ctrl.xml
index 12b1d0503e26..ee2820d6ca66 100644
--- a/Documentation/DocBook/media/v4l/vidioc-g-ctrl.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-g-ctrl.xml
@@ -64,7 +64,9 @@ return an &EINVAL;. When the <structfield>value</structfield> is out
64of bounds drivers can choose to take the closest valid value or return 64of bounds drivers can choose to take the closest valid value or return
65an &ERANGE;, whatever seems more appropriate. However, 65an &ERANGE;, whatever seems more appropriate. However,
66<constant>VIDIOC_S_CTRL</constant> is a write-only ioctl, it does not 66<constant>VIDIOC_S_CTRL</constant> is a write-only ioctl, it does not
67return the actual new value.</para> 67return the actual new value. If the <structfield>value</structfield>
68is inappropriate for the control (e.g. if it refers to an unsupported
69menu index of a menu control), then &EINVAL; is returned as well.</para>
68 70
69 <para>These ioctls work only with user controls. For other 71 <para>These ioctls work only with user controls. For other
70control classes the &VIDIOC-G-EXT-CTRLS;, &VIDIOC-S-EXT-CTRLS; or 72control classes the &VIDIOC-G-EXT-CTRLS;, &VIDIOC-S-EXT-CTRLS; or
@@ -99,7 +101,9 @@ application.</entry>
99 <term><errorcode>EINVAL</errorcode></term> 101 <term><errorcode>EINVAL</errorcode></term>
100 <listitem> 102 <listitem>
101 <para>The &v4l2-control; <structfield>id</structfield> is 103 <para>The &v4l2-control; <structfield>id</structfield> is
102invalid.</para> 104invalid or the <structfield>value</structfield> is inappropriate for
105the given control (i.e. if a menu item is selected that is not supported
106by the driver according to &VIDIOC-QUERYMENU;).</para>
103 </listitem> 107 </listitem>
104 </varlistentry> 108 </varlistentry>
105 <varlistentry> 109 <varlistentry>
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml b/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml
index 0a4b90fcf2da..4e16112df992 100644
--- a/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml
@@ -106,7 +106,9 @@ value or if an error is returned.</para>
106&EINVAL;. When the value is out of bounds drivers can choose to take 106&EINVAL;. When the value is out of bounds drivers can choose to take
107the closest valid value or return an &ERANGE;, whatever seems more 107the closest valid value or return an &ERANGE;, whatever seems more
108appropriate. In the first case the new value is set in 108appropriate. In the first case the new value is set in
109&v4l2-ext-control;.</para> 109&v4l2-ext-control;. If the new control value is inappropriate (e.g. the
110given menu index is not supported by the menu control), then this will
111also result in an &EINVAL; error.</para>
110 112
111 <para>The driver will only set/get these controls if all control 113 <para>The driver will only set/get these controls if all control
112values are correct. This prevents the situation where only some of the 114values are correct. This prevents the situation where only some of the
@@ -199,13 +201,46 @@ also be zero.</entry>
199 <row> 201 <row>
200 <entry>__u32</entry> 202 <entry>__u32</entry>
201 <entry><structfield>error_idx</structfield></entry> 203 <entry><structfield>error_idx</structfield></entry>
202 <entry>Set by the driver in case of an error. If it is equal 204 <entry><para>Set by the driver in case of an error. If the error is
203to <structfield>count</structfield>, then no actual changes were made to 205associated with a particular control, then <structfield>error_idx</structfield>
204controls. In other words, the error was not associated with setting a particular 206is set to the index of that control. If the error is not related to a specific
205control. If it is another value, then only the controls up to <structfield>error_idx-1</structfield> 207control, or the validation step failed (see below), then
206were modified and control <structfield>error_idx</structfield> is the one that 208<structfield>error_idx</structfield> is set to <structfield>count</structfield>.
207caused the error. The <structfield>error_idx</structfield> value is undefined 209The value is undefined if the ioctl returned 0 (success).</para>
208if the ioctl returned 0 (success).</entry> 210
211<para>Before controls are read from/written to hardware a validation step
212takes place: this checks if all controls in the list are valid controls,
213if no attempt is made to write to a read-only control or read from a write-only
214control, and any other up-front checks that can be done without accessing the
215hardware. The exact validations done during this step are driver dependent
216since some checks might require hardware access for some devices, thus making
217it impossible to do those checks up-front. However, drivers should make a
218best-effort to do as many up-front checks as possible.</para>
219
220<para>This check is done to avoid leaving the hardware in an inconsistent state due
221to easy-to-avoid problems. But it leads to another problem: the application needs to
222know whether an error came from the validation step (meaning that the hardware
223was not touched) or from an error during the actual reading from/writing to hardware.</para>
224
225<para>The, in hindsight quite poor, solution for that is to set <structfield>error_idx</structfield>
226to <structfield>count</structfield> if the validation failed. This has the
227unfortunate side-effect that it is not possible to see which control failed the
228validation. If the validation was successful and the error happened while
229accessing the hardware, then <structfield>error_idx</structfield> is less than
230<structfield>count</structfield> and only the controls up to
231<structfield>error_idx-1</structfield> were read or written correctly, and the
232state of the remaining controls is undefined.</para>
233
234<para>Since <constant>VIDIOC_TRY_EXT_CTRLS</constant> does not access hardware
235there is also no need to handle the validation step in this special way,
236so <structfield>error_idx</structfield> will just be set to the control that
237failed the validation step instead of to <structfield>count</structfield>.
238This means that if <constant>VIDIOC_S_EXT_CTRLS</constant> fails with
239<structfield>error_idx</structfield> set to <structfield>count</structfield>,
240then you can call <constant>VIDIOC_TRY_EXT_CTRLS</constant> to try to discover
241the actual control that failed the validation step. Unfortunately, there
242is no <constant>TRY</constant> equivalent for <constant>VIDIOC_G_EXT_CTRLS</constant>.
243</para></entry>
209 </row> 244 </row>
210 <row> 245 <row>
211 <entry>__u32</entry> 246 <entry>__u32</entry>
@@ -298,8 +333,10 @@ These controls are described in <xref
298 <term><errorcode>EINVAL</errorcode></term> 333 <term><errorcode>EINVAL</errorcode></term>
299 <listitem> 334 <listitem>
300 <para>The &v4l2-ext-control; <structfield>id</structfield> 335 <para>The &v4l2-ext-control; <structfield>id</structfield>
301is invalid or the &v4l2-ext-controls; 336is invalid, the &v4l2-ext-controls;
302<structfield>ctrl_class</structfield> is invalid. This error code is 337<structfield>ctrl_class</structfield> is invalid, or the &v4l2-ext-control;
338<structfield>value</structfield> was inappropriate (e.g. the given menu
339index is not supported by the driver). This error code is
303also returned by the <constant>VIDIOC_S_EXT_CTRLS</constant> and 340also returned by the <constant>VIDIOC_S_EXT_CTRLS</constant> and
304<constant>VIDIOC_TRY_EXT_CTRLS</constant> ioctls if two or more 341<constant>VIDIOC_TRY_EXT_CTRLS</constant> ioctls if two or more
305control values are in conflict.</para> 342control values are in conflict.</para>
diff --git a/Documentation/DocBook/media/v4l/vidioc-qbuf.xml b/Documentation/DocBook/media/v4l/vidioc-qbuf.xml
index 2d37abefce13..3504a7f2f382 100644
--- a/Documentation/DocBook/media/v4l/vidioc-qbuf.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-qbuf.xml
@@ -109,6 +109,23 @@ they cannot be swapped out to disk. Buffers remain locked until
109dequeued, until the &VIDIOC-STREAMOFF; or &VIDIOC-REQBUFS; ioctl is 109dequeued, until the &VIDIOC-STREAMOFF; or &VIDIOC-REQBUFS; ioctl is
110called, or until the device is closed.</para> 110called, or until the device is closed.</para>
111 111
112 <para>To enqueue a <link linkend="dmabuf">DMABUF</link> buffer applications
113set the <structfield>memory</structfield> field to
114<constant>V4L2_MEMORY_DMABUF</constant> and the <structfield>m.fd</structfield>
115field to a file descriptor associated with a DMABUF buffer. When the
116multi-planar API is used the <structfield>m.fd</structfield> fields of the
117passed array of &v4l2-plane; have to be used instead. When
118<constant>VIDIOC_QBUF</constant> is called with a pointer to this structure the
119driver sets the <constant>V4L2_BUF_FLAG_QUEUED</constant> flag and clears the
120<constant>V4L2_BUF_FLAG_MAPPED</constant> and
121<constant>V4L2_BUF_FLAG_DONE</constant> flags in the
122<structfield>flags</structfield> field, or it returns an error code. This
123ioctl locks the buffer. Locking a buffer means passing it to a driver for a
124hardware access (usually DMA). If an application accesses (reads/writes) a
125locked buffer then the result is undefined. Buffers remain locked until
126dequeued, until the &VIDIOC-STREAMOFF; or &VIDIOC-REQBUFS; ioctl is called, or
127until the device is closed.</para>
128
112 <para>Applications call the <constant>VIDIOC_DQBUF</constant> 129 <para>Applications call the <constant>VIDIOC_DQBUF</constant>
113ioctl to dequeue a filled (capturing) or displayed (output) buffer 130ioctl to dequeue a filled (capturing) or displayed (output) buffer
114from the driver's outgoing queue. They just set the 131from the driver's outgoing queue. They just set the
diff --git a/Documentation/DocBook/media/v4l/vidioc-querycap.xml b/Documentation/DocBook/media/v4l/vidioc-querycap.xml
index 4c70215ae03f..d5a3c97b206a 100644
--- a/Documentation/DocBook/media/v4l/vidioc-querycap.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-querycap.xml
@@ -76,7 +76,7 @@ make sure the strings are properly NUL-terminated.</para></entry>
76 <row> 76 <row>
77 <entry>__u8</entry> 77 <entry>__u8</entry>
78 <entry><structfield>card</structfield>[32]</entry> 78 <entry><structfield>card</structfield>[32]</entry>
79 <entry>Name of the device, a NUL-terminated ASCII string. 79 <entry>Name of the device, a NUL-terminated UTF-8 string.
80For example: "Yoyodyne TV/FM". One driver may support different brands 80For example: "Yoyodyne TV/FM". One driver may support different brands
81or models of video hardware. This information is intended for users, 81or models of video hardware. This information is intended for users,
82for example in a menu of available devices. Since multiple TV cards of 82for example in a menu of available devices. Since multiple TV cards of
diff --git a/Documentation/DocBook/media/v4l/vidioc-reqbufs.xml b/Documentation/DocBook/media/v4l/vidioc-reqbufs.xml
index 2b50ef2007f3..78a06a9a5ece 100644
--- a/Documentation/DocBook/media/v4l/vidioc-reqbufs.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-reqbufs.xml
@@ -48,28 +48,30 @@
48 <refsect1> 48 <refsect1>
49 <title>Description</title> 49 <title>Description</title>
50 50
51 <para>This ioctl is used to initiate <link linkend="mmap">memory 51<para>This ioctl is used to initiate <link linkend="mmap">memory mapped</link>,
52mapped</link> or <link linkend="userp">user pointer</link> 52<link linkend="userp">user pointer</link> or <link
53I/O. Memory mapped buffers are located in device memory and must be 53linkend="dmabuf">DMABUF</link> based I/O. Memory mapped buffers are located in
54allocated with this ioctl before they can be mapped into the 54device memory and must be allocated with this ioctl before they can be mapped
55application's address space. User buffers are allocated by 55into the application's address space. User buffers are allocated by
56applications themselves, and this ioctl is merely used to switch the 56applications themselves, and this ioctl is merely used to switch the driver
57driver into user pointer I/O mode and to setup some internal structures.</para> 57into user pointer I/O mode and to setup some internal structures.
58Similarly, DMABUF buffers are allocated by applications through a device
59driver, and this ioctl only configures the driver into DMABUF I/O mode without
60performing any direct allocation.</para>
58 61
59 <para>To allocate device buffers applications initialize all 62 <para>To allocate device buffers applications initialize all fields of the
60fields of the <structname>v4l2_requestbuffers</structname> structure. 63<structname>v4l2_requestbuffers</structname> structure. They set the
61They set the <structfield>type</structfield> field to the respective 64<structfield>type</structfield> field to the respective stream or buffer type,
62stream or buffer type, the <structfield>count</structfield> field to 65the <structfield>count</structfield> field to the desired number of buffers,
63the desired number of buffers, <structfield>memory</structfield> 66<structfield>memory</structfield> must be set to the requested I/O method and
64must be set to the requested I/O method and the <structfield>reserved</structfield> array 67the <structfield>reserved</structfield> array must be zeroed. When the ioctl is
65must be zeroed. When the ioctl 68called with a pointer to this structure the driver will attempt to allocate the
66is called with a pointer to this structure the driver will attempt to allocate 69requested number of buffers and it stores the actual number allocated in the
67the requested number of buffers and it stores the actual number 70<structfield>count</structfield> field. It can be smaller than the number
68allocated in the <structfield>count</structfield> field. It can be 71requested, even zero, when the driver runs out of free memory. A larger number
69smaller than the number requested, even zero, when the driver runs out 72is also possible when the driver requires more buffers to function correctly.
70of free memory. A larger number is also possible when the driver requires 73For example video output requires at least two buffers, one displayed and one
71more buffers to function correctly. For example video output requires at least two buffers, 74filled by the application.</para>
72one displayed and one filled by the application.</para>
73 <para>When the I/O method is not supported the ioctl 75 <para>When the I/O method is not supported the ioctl
74returns an &EINVAL;.</para> 76returns an &EINVAL;.</para>
75 77
@@ -102,7 +104,8 @@ as the &v4l2-format; <structfield>type</structfield> field. See <xref
102 <entry>__u32</entry> 104 <entry>__u32</entry>
103 <entry><structfield>memory</structfield></entry> 105 <entry><structfield>memory</structfield></entry>
104 <entry>Applications set this field to 106 <entry>Applications set this field to
105<constant>V4L2_MEMORY_MMAP</constant> or 107<constant>V4L2_MEMORY_MMAP</constant>,
108<constant>V4L2_MEMORY_DMABUF</constant> or
106<constant>V4L2_MEMORY_USERPTR</constant>. See <xref linkend="v4l2-memory" 109<constant>V4L2_MEMORY_USERPTR</constant>. See <xref linkend="v4l2-memory"
107/>.</entry> 110/>.</entry>
108 </row> 111 </row>
diff --git a/Documentation/DocBook/media_api.tmpl b/Documentation/DocBook/media_api.tmpl
index f2413acfe241..1f6593deb995 100644
--- a/Documentation/DocBook/media_api.tmpl
+++ b/Documentation/DocBook/media_api.tmpl
@@ -22,6 +22,7 @@
22 22
23<!-- LinuxTV v4l-dvb repository. --> 23<!-- LinuxTV v4l-dvb repository. -->
24<!ENTITY v4l-dvb "<ulink url='http://linuxtv.org/repo/'>http://linuxtv.org/repo/</ulink>"> 24<!ENTITY v4l-dvb "<ulink url='http://linuxtv.org/repo/'>http://linuxtv.org/repo/</ulink>">
25<!ENTITY dash-ent-10 "<entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry>">
25]> 26]>
26 27
27<book id="media_api"> 28<book id="media_api">
diff --git a/Documentation/DocBook/uio-howto.tmpl b/Documentation/DocBook/uio-howto.tmpl
index ac3d0018140c..95618159e29b 100644
--- a/Documentation/DocBook/uio-howto.tmpl
+++ b/Documentation/DocBook/uio-howto.tmpl
@@ -719,6 +719,62 @@ framework to set up sysfs files for this region. Simply leave it alone.
719 </para> 719 </para>
720</sect1> 720</sect1>
721 721
722<sect1 id="using uio_dmem_genirq">
723<title>Using uio_dmem_genirq for platform devices</title>
724 <para>
725 In addition to statically allocated memory ranges, they may also be
726 a desire to use dynamically allocated regions in a user space driver.
727 In particular, being able to access memory made available through the
728 dma-mapping API, may be particularly useful. The
729 <varname>uio_dmem_genirq</varname> driver provides a way to accomplish
730 this.
731 </para>
732 <para>
733 This driver is used in a similar manner to the
734 <varname>"uio_pdrv_genirq"</varname> driver with respect to interrupt
735 configuration and handling.
736 </para>
737 <para>
738 Set the <varname>.name</varname> element of
739 <varname>struct platform_device</varname> to
740 <varname>"uio_dmem_genirq"</varname> to use this driver.
741 </para>
742 <para>
743 When using this driver, fill in the <varname>.platform_data</varname>
744 element of <varname>struct platform_device</varname>, which is of type
745 <varname>struct uio_dmem_genirq_pdata</varname> and which contains the
746 following elements:
747 </para>
748 <itemizedlist>
749 <listitem><varname>struct uio_info uioinfo</varname>: The same
750 structure used as the <varname>uio_pdrv_genirq</varname> platform
751 data</listitem>
752 <listitem><varname>unsigned int *dynamic_region_sizes</varname>:
753 Pointer to list of sizes of dynamic memory regions to be mapped into
754 user space.
755 </listitem>
756 <listitem><varname>unsigned int num_dynamic_regions</varname>:
757 Number of elements in <varname>dynamic_region_sizes</varname> array.
758 </listitem>
759 </itemizedlist>
760 <para>
761 The dynamic regions defined in the platform data will be appended to
762 the <varname> mem[] </varname> array after the platform device
763 resources, which implies that the total number of static and dynamic
764 memory regions cannot exceed <varname>MAX_UIO_MAPS</varname>.
765 </para>
766 <para>
767 The dynamic memory regions will be allocated when the UIO device file,
768 <varname>/dev/uioX</varname> is opened.
769 Simiar to static memory resources, the memory region information for
770 dynamic regions is then visible via sysfs at
771 <varname>/sys/class/uio/uioX/maps/mapY/*</varname>.
772 The dynmaic memory regions will be freed when the UIO device file is
773 closed. When no processes are holding the device file open, the address
774 returned to userspace is ~0.
775 </para>
776</sect1>
777
722</chapter> 778</chapter>
723 779
724<chapter id="userspace_driver" xreflabel="Writing a driver in user space"> 780<chapter id="userspace_driver" xreflabel="Writing a driver in user space">
@@ -928,7 +984,7 @@ int main()
928 return errno; 984 return errno;
929 } 985 }
930 configfd = open(&quot;/sys/class/uio/uio0/device/config&quot;, O_RDWR); 986 configfd = open(&quot;/sys/class/uio/uio0/device/config&quot;, O_RDWR);
931 if (uiofd &lt; 0) { 987 if (configfd &lt; 0) {
932 perror(&quot;config open:&quot;); 988 perror(&quot;config open:&quot;);
933 return errno; 989 return errno;
934 } 990 }
diff --git a/Documentation/DocBook/writing-an-alsa-driver.tmpl b/Documentation/DocBook/writing-an-alsa-driver.tmpl
index cab4ec58e46e..bd6fee22c4dd 100644
--- a/Documentation/DocBook/writing-an-alsa-driver.tmpl
+++ b/Documentation/DocBook/writing-an-alsa-driver.tmpl
@@ -433,9 +433,9 @@
433 /* chip-specific constructor 433 /* chip-specific constructor
434 * (see "Management of Cards and Components") 434 * (see "Management of Cards and Components")
435 */ 435 */
436 static int __devinit snd_mychip_create(struct snd_card *card, 436 static int snd_mychip_create(struct snd_card *card,
437 struct pci_dev *pci, 437 struct pci_dev *pci,
438 struct mychip **rchip) 438 struct mychip **rchip)
439 { 439 {
440 struct mychip *chip; 440 struct mychip *chip;
441 int err; 441 int err;
@@ -475,8 +475,8 @@
475 } 475 }
476 476
477 /* constructor -- see "Constructor" sub-section */ 477 /* constructor -- see "Constructor" sub-section */
478 static int __devinit snd_mychip_probe(struct pci_dev *pci, 478 static int snd_mychip_probe(struct pci_dev *pci,
479 const struct pci_device_id *pci_id) 479 const struct pci_device_id *pci_id)
480 { 480 {
481 static int dev; 481 static int dev;
482 struct snd_card *card; 482 struct snd_card *card;
@@ -526,7 +526,7 @@
526 } 526 }
527 527
528 /* destructor -- see the "Destructor" sub-section */ 528 /* destructor -- see the "Destructor" sub-section */
529 static void __devexit snd_mychip_remove(struct pci_dev *pci) 529 static void snd_mychip_remove(struct pci_dev *pci)
530 { 530 {
531 snd_card_free(pci_get_drvdata(pci)); 531 snd_card_free(pci_get_drvdata(pci));
532 pci_set_drvdata(pci, NULL); 532 pci_set_drvdata(pci, NULL);
@@ -542,9 +542,8 @@
542 <para> 542 <para>
543 The real constructor of PCI drivers is the <function>probe</function> callback. 543 The real constructor of PCI drivers is the <function>probe</function> callback.
544 The <function>probe</function> callback and other component-constructors which are called 544 The <function>probe</function> callback and other component-constructors which are called
545 from the <function>probe</function> callback should be defined with 545 from the <function>probe</function> callback cannot be used with
546 the <parameter>__devinit</parameter> prefix. You 546 the <parameter>__init</parameter> prefix
547 cannot use the <parameter>__init</parameter> prefix for them,
548 because any PCI device could be a hotplug device. 547 because any PCI device could be a hotplug device.
549 </para> 548 </para>
550 549
@@ -728,7 +727,7 @@
728 <informalexample> 727 <informalexample>
729 <programlisting> 728 <programlisting>
730<![CDATA[ 729<![CDATA[
731 static void __devexit snd_mychip_remove(struct pci_dev *pci) 730 static void snd_mychip_remove(struct pci_dev *pci)
732 { 731 {
733 snd_card_free(pci_get_drvdata(pci)); 732 snd_card_free(pci_get_drvdata(pci));
734 pci_set_drvdata(pci, NULL); 733 pci_set_drvdata(pci, NULL);
@@ -872,9 +871,8 @@
872 <para> 871 <para>
873 This function itself doesn't allocate the data space. The data 872 This function itself doesn't allocate the data space. The data
874 must be allocated manually beforehand, and its pointer is passed 873 must be allocated manually beforehand, and its pointer is passed
875 as the argument. This pointer is used as the 874 as the argument. This pointer (<parameter>chip</parameter> in the
876 (<parameter>chip</parameter> identifier in the above example) 875 above example) is used as the identifier for the instance.
877 for the instance.
878 </para> 876 </para>
879 877
880 <para> 878 <para>
@@ -1059,14 +1057,6 @@
1059 </para> 1057 </para>
1060 1058
1061 <para> 1059 <para>
1062 As further notes, the destructors (both
1063 <function>snd_mychip_dev_free</function> and
1064 <function>snd_mychip_free</function>) cannot be defined with
1065 the <parameter>__devexit</parameter> prefix, because they may be
1066 called from the constructor, too, at the false path.
1067 </para>
1068
1069 <para>
1070 For a device which allows hotplugging, you can use 1060 For a device which allows hotplugging, you can use
1071 <function>snd_card_free_when_closed</function>. This one will 1061 <function>snd_card_free_when_closed</function>. This one will
1072 postpone the destruction until all devices are closed. 1062 postpone the destruction until all devices are closed.
@@ -1120,9 +1110,9 @@
1120 } 1110 }
1121 1111
1122 /* chip-specific constructor */ 1112 /* chip-specific constructor */
1123 static int __devinit snd_mychip_create(struct snd_card *card, 1113 static int snd_mychip_create(struct snd_card *card,
1124 struct pci_dev *pci, 1114 struct pci_dev *pci,
1125 struct mychip **rchip) 1115 struct mychip **rchip)
1126 { 1116 {
1127 struct mychip *chip; 1117 struct mychip *chip;
1128 int err; 1118 int err;
@@ -1200,7 +1190,7 @@
1200 .name = KBUILD_MODNAME, 1190 .name = KBUILD_MODNAME,
1201 .id_table = snd_mychip_ids, 1191 .id_table = snd_mychip_ids,
1202 .probe = snd_mychip_probe, 1192 .probe = snd_mychip_probe,
1203 .remove = __devexit_p(snd_mychip_remove), 1193 .remove = snd_mychip_remove,
1204 }; 1194 };
1205 1195
1206 /* module initialization */ 1196 /* module initialization */
@@ -1465,11 +1455,6 @@
1465 </para> 1455 </para>
1466 1456
1467 <para> 1457 <para>
1468 Again, remember that you cannot
1469 use the <parameter>__devexit</parameter> prefix for this destructor.
1470 </para>
1471
1472 <para>
1473 We didn't implement the hardware disabling part in the above. 1458 We didn't implement the hardware disabling part in the above.
1474 If you need to do this, please note that the destructor may be 1459 If you need to do this, please note that the destructor may be
1475 called even before the initialization of the chip is completed. 1460 called even before the initialization of the chip is completed.
@@ -1619,7 +1604,7 @@
1619 .name = KBUILD_MODNAME, 1604 .name = KBUILD_MODNAME,
1620 .id_table = snd_mychip_ids, 1605 .id_table = snd_mychip_ids,
1621 .probe = snd_mychip_probe, 1606 .probe = snd_mychip_probe,
1622 .remove = __devexit_p(snd_mychip_remove), 1607 .remove = snd_mychip_remove,
1623 }; 1608 };
1624]]> 1609]]>
1625 </programlisting> 1610 </programlisting>
@@ -1630,11 +1615,7 @@
1630 The <structfield>probe</structfield> and 1615 The <structfield>probe</structfield> and
1631 <structfield>remove</structfield> functions have already 1616 <structfield>remove</structfield> functions have already
1632 been defined in the previous sections. 1617 been defined in the previous sections.
1633 The <structfield>remove</structfield> function should 1618 The <structfield>name</structfield>
1634 be defined with the
1635 <function>__devexit_p()</function> macro, so that it's not
1636 defined for built-in (and non-hot-pluggable) case. The
1637 <structfield>name</structfield>
1638 field is the name string of this device. Note that you must not 1619 field is the name string of this device. Note that you must not
1639 use a slash <quote>/</quote> in this string. 1620 use a slash <quote>/</quote> in this string.
1640 </para> 1621 </para>
@@ -1665,9 +1646,7 @@
1665 <para> 1646 <para>
1666 Note that these module entries are tagged with 1647 Note that these module entries are tagged with
1667 <parameter>__init</parameter> and 1648 <parameter>__init</parameter> and
1668 <parameter>__exit</parameter> prefixes, not 1649 <parameter>__exit</parameter> prefixes.
1669 <parameter>__devinit</parameter> nor
1670 <parameter>__devexit</parameter>.
1671 </para> 1650 </para>
1672 1651
1673 <para> 1652 <para>
@@ -1918,7 +1897,7 @@
1918 */ 1897 */
1919 1898
1920 /* create a pcm device */ 1899 /* create a pcm device */
1921 static int __devinit snd_mychip_new_pcm(struct mychip *chip) 1900 static int snd_mychip_new_pcm(struct mychip *chip)
1922 { 1901 {
1923 struct snd_pcm *pcm; 1902 struct snd_pcm *pcm;
1924 int err; 1903 int err;
@@ -1957,7 +1936,7 @@
1957 <informalexample> 1936 <informalexample>
1958 <programlisting> 1937 <programlisting>
1959<![CDATA[ 1938<![CDATA[
1960 static int __devinit snd_mychip_new_pcm(struct mychip *chip) 1939 static int snd_mychip_new_pcm(struct mychip *chip)
1961 { 1940 {
1962 struct snd_pcm *pcm; 1941 struct snd_pcm *pcm;
1963 int err; 1942 int err;
@@ -2124,7 +2103,7 @@
2124 .... 2103 ....
2125 } 2104 }
2126 2105
2127 static int __devinit snd_mychip_new_pcm(struct mychip *chip) 2106 static int snd_mychip_new_pcm(struct mychip *chip)
2128 { 2107 {
2129 struct snd_pcm *pcm; 2108 struct snd_pcm *pcm;
2130 .... 2109 ....
@@ -2324,7 +2303,7 @@ struct _snd_pcm_runtime {
2324 <constant>SNDRV_PCM_INFO_XXX</constant>. Here, at least, you 2303 <constant>SNDRV_PCM_INFO_XXX</constant>. Here, at least, you
2325 have to specify whether the mmap is supported and which 2304 have to specify whether the mmap is supported and which
2326 interleaved format is supported. 2305 interleaved format is supported.
2327 When the is supported, add the 2306 When the hardware supports mmap, add the
2328 <constant>SNDRV_PCM_INFO_MMAP</constant> flag here. When the 2307 <constant>SNDRV_PCM_INFO_MMAP</constant> flag here. When the
2329 hardware supports the interleaved or the non-interleaved 2308 hardware supports the interleaved or the non-interleaved
2330 formats, <constant>SNDRV_PCM_INFO_INTERLEAVED</constant> or 2309 formats, <constant>SNDRV_PCM_INFO_INTERLEAVED</constant> or
@@ -2918,7 +2897,7 @@ struct _snd_pcm_runtime {
2918 2897
2919 <para> 2898 <para>
2920 When the pcm supports the pause operation (given in the info 2899 When the pcm supports the pause operation (given in the info
2921 field of the hardware table), the <constant>PAUSE_PUSE</constant> 2900 field of the hardware table), the <constant>PAUSE_PUSH</constant>
2922 and <constant>PAUSE_RELEASE</constant> commands must be 2901 and <constant>PAUSE_RELEASE</constant> commands must be
2923 handled here, too. The former is the command to pause the pcm, 2902 handled here, too. The former is the command to pause the pcm,
2924 and the latter to restart the pcm again. 2903 and the latter to restart the pcm again.
@@ -3105,7 +3084,7 @@ struct _snd_pcm_runtime {
3105 <section id="pcm-interface-interrupt-handler-timer"> 3084 <section id="pcm-interface-interrupt-handler-timer">
3106 <title>High frequency timer interrupts</title> 3085 <title>High frequency timer interrupts</title>
3107 <para> 3086 <para>
3108 This happense when the hardware doesn't generate interrupts 3087 This happens when the hardware doesn't generate interrupts
3109 at the period boundary but issues timer interrupts at a fixed 3088 at the period boundary but issues timer interrupts at a fixed
3110 timer rate (e.g. es1968 or ymfpci drivers). 3089 timer rate (e.g. es1968 or ymfpci drivers).
3111 In this case, you need to check the current hardware 3090 In this case, you need to check the current hardware
@@ -3271,18 +3250,19 @@ struct _snd_pcm_runtime {
3271 <title>Example of Hardware Constraints for Channels</title> 3250 <title>Example of Hardware Constraints for Channels</title>
3272 <programlisting> 3251 <programlisting>
3273<![CDATA[ 3252<![CDATA[
3274 static int hw_rule_format_by_channels(struct snd_pcm_hw_params *params, 3253 static int hw_rule_channels_by_format(struct snd_pcm_hw_params *params,
3275 struct snd_pcm_hw_rule *rule) 3254 struct snd_pcm_hw_rule *rule)
3276 { 3255 {
3277 struct snd_interval *c = hw_param_interval(params, 3256 struct snd_interval *c = hw_param_interval(params,
3278 SNDRV_PCM_HW_PARAM_CHANNELS); 3257 SNDRV_PCM_HW_PARAM_CHANNELS);
3279 struct snd_mask *f = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT); 3258 struct snd_mask *f = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
3280 struct snd_mask fmt; 3259 struct snd_interval ch;
3281 3260
3282 snd_mask_any(&fmt); /* Init the struct */ 3261 snd_interval_any(&ch);
3283 if (c->min < 2) { 3262 if (f->bits[0] == SNDRV_PCM_FMTBIT_S16_LE) {
3284 fmt.bits[0] &= SNDRV_PCM_FMTBIT_S16_LE; 3263 ch.min = ch.max = 1;
3285 return snd_mask_refine(f, &fmt); 3264 ch.integer = 1;
3265 return snd_interval_refine(c, &ch);
3286 } 3266 }
3287 return 0; 3267 return 0;
3288 } 3268 }
@@ -3298,35 +3278,35 @@ struct _snd_pcm_runtime {
3298 <programlisting> 3278 <programlisting>
3299<![CDATA[ 3279<![CDATA[
3300 snd_pcm_hw_rule_add(substream->runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS, 3280 snd_pcm_hw_rule_add(substream->runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
3301 hw_rule_channels_by_format, 0, SNDRV_PCM_HW_PARAM_FORMAT, 3281 hw_rule_channels_by_format, NULL,
3302 -1); 3282 SNDRV_PCM_HW_PARAM_FORMAT, -1);
3303]]> 3283]]>
3304 </programlisting> 3284 </programlisting>
3305 </informalexample> 3285 </informalexample>
3306 </para> 3286 </para>
3307 3287
3308 <para> 3288 <para>
3309 The rule function is called when an application sets the number of 3289 The rule function is called when an application sets the PCM
3310 channels. But an application can set the format before the number of 3290 format, and it refines the number of channels accordingly.
3311 channels. Thus you also need to define the inverse rule: 3291 But an application may set the number of channels before
3292 setting the format. Thus you also need to define the inverse rule:
3312 3293
3313 <example> 3294 <example>
3314 <title>Example of Hardware Constraints for Channels</title> 3295 <title>Example of Hardware Constraints for Formats</title>
3315 <programlisting> 3296 <programlisting>
3316<![CDATA[ 3297<![CDATA[
3317 static int hw_rule_channels_by_format(struct snd_pcm_hw_params *params, 3298 static int hw_rule_format_by_channels(struct snd_pcm_hw_params *params,
3318 struct snd_pcm_hw_rule *rule) 3299 struct snd_pcm_hw_rule *rule)
3319 { 3300 {
3320 struct snd_interval *c = hw_param_interval(params, 3301 struct snd_interval *c = hw_param_interval(params,
3321 SNDRV_PCM_HW_PARAM_CHANNELS); 3302 SNDRV_PCM_HW_PARAM_CHANNELS);
3322 struct snd_mask *f = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT); 3303 struct snd_mask *f = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
3323 struct snd_interval ch; 3304 struct snd_mask fmt;
3324 3305
3325 snd_interval_any(&ch); 3306 snd_mask_any(&fmt); /* Init the struct */
3326 if (f->bits[0] == SNDRV_PCM_FMTBIT_S16_LE) { 3307 if (c->min < 2) {
3327 ch.min = ch.max = 1; 3308 fmt.bits[0] &= SNDRV_PCM_FMTBIT_S16_LE;
3328 ch.integer = 1; 3309 return snd_mask_refine(f, &fmt);
3329 return snd_interval_refine(c, &ch);
3330 } 3310 }
3331 return 0; 3311 return 0;
3332 } 3312 }
@@ -3341,8 +3321,8 @@ struct _snd_pcm_runtime {
3341 <programlisting> 3321 <programlisting>
3342<![CDATA[ 3322<![CDATA[
3343 snd_pcm_hw_rule_add(substream->runtime, 0, SNDRV_PCM_HW_PARAM_FORMAT, 3323 snd_pcm_hw_rule_add(substream->runtime, 0, SNDRV_PCM_HW_PARAM_FORMAT,
3344 hw_rule_format_by_channels, 0, SNDRV_PCM_HW_PARAM_CHANNELS, 3324 hw_rule_format_by_channels, NULL,
3345 -1); 3325 SNDRV_PCM_HW_PARAM_CHANNELS, -1);
3346]]> 3326]]>
3347 </programlisting> 3327 </programlisting>
3348 </informalexample> 3328 </informalexample>
@@ -3399,7 +3379,7 @@ struct _snd_pcm_runtime {
3399 <title>Definition of a Control</title> 3379 <title>Definition of a Control</title>
3400 <programlisting> 3380 <programlisting>
3401<![CDATA[ 3381<![CDATA[
3402 static struct snd_kcontrol_new my_control __devinitdata = { 3382 static struct snd_kcontrol_new my_control = {
3403 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 3383 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
3404 .name = "PCM Playback Switch", 3384 .name = "PCM Playback Switch",
3405 .index = 0, 3385 .index = 0,
@@ -3415,13 +3395,6 @@ struct _snd_pcm_runtime {
3415 </para> 3395 </para>
3416 3396
3417 <para> 3397 <para>
3418 Most likely the control is created via
3419 <function>snd_ctl_new1()</function>, and in such a case, you can
3420 add the <parameter>__devinitdata</parameter> prefix to the
3421 definition as above.
3422 </para>
3423
3424 <para>
3425 The <structfield>iface</structfield> field specifies the control 3398 The <structfield>iface</structfield> field specifies the control
3426 type, <constant>SNDRV_CTL_ELEM_IFACE_XXX</constant>, which 3399 type, <constant>SNDRV_CTL_ELEM_IFACE_XXX</constant>, which
3427 is usually <constant>MIXER</constant>. 3400 is usually <constant>MIXER</constant>.
@@ -3847,10 +3820,8 @@ struct _snd_pcm_runtime {
3847 3820
3848 <para> 3821 <para>
3849 <function>snd_ctl_new1()</function> allocates a new 3822 <function>snd_ctl_new1()</function> allocates a new
3850 <structname>snd_kcontrol</structname> instance (that's why the definition 3823 <structname>snd_kcontrol</structname> instance,
3851 of <parameter>my_control</parameter> can be with 3824 and <function>snd_ctl_add</function> assigns the given
3852 the <parameter>__devinitdata</parameter>
3853 prefix), and <function>snd_ctl_add</function> assigns the given
3854 control component to the card. 3825 control component to the card.
3855 </para> 3826 </para>
3856 </section> 3827 </section>
@@ -3896,7 +3867,7 @@ struct _snd_pcm_runtime {
3896<![CDATA[ 3867<![CDATA[
3897 static DECLARE_TLV_DB_SCALE(db_scale_my_control, -4050, 150, 0); 3868 static DECLARE_TLV_DB_SCALE(db_scale_my_control, -4050, 150, 0);
3898 3869
3899 static struct snd_kcontrol_new my_control __devinitdata = { 3870 static struct snd_kcontrol_new my_control = {
3900 ... 3871 ...
3901 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | 3872 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE |
3902 SNDRV_CTL_ELEM_ACCESS_TLV_READ, 3873 SNDRV_CTL_ELEM_ACCESS_TLV_READ,
@@ -5761,8 +5732,8 @@ struct _snd_pcm_runtime {
5761 <informalexample> 5732 <informalexample>
5762 <programlisting> 5733 <programlisting>
5763<![CDATA[ 5734<![CDATA[
5764 static int __devinit snd_mychip_probe(struct pci_dev *pci, 5735 static int snd_mychip_probe(struct pci_dev *pci,
5765 const struct pci_device_id *pci_id) 5736 const struct pci_device_id *pci_id)
5766 { 5737 {
5767 .... 5738 ....
5768 struct snd_card *card; 5739 struct snd_card *card;
@@ -5787,8 +5758,8 @@ struct _snd_pcm_runtime {
5787 <informalexample> 5758 <informalexample>
5788 <programlisting> 5759 <programlisting>
5789<![CDATA[ 5760<![CDATA[
5790 static int __devinit snd_mychip_probe(struct pci_dev *pci, 5761 static int snd_mychip_probe(struct pci_dev *pci,
5791 const struct pci_device_id *pci_id) 5762 const struct pci_device_id *pci_id)
5792 { 5763 {
5793 .... 5764 ....
5794 struct snd_card *card; 5765 struct snd_card *card;
@@ -5825,7 +5796,7 @@ struct _snd_pcm_runtime {
5825 .name = KBUILD_MODNAME, 5796 .name = KBUILD_MODNAME,
5826 .id_table = snd_my_ids, 5797 .id_table = snd_my_ids,
5827 .probe = snd_my_probe, 5798 .probe = snd_my_probe,
5828 .remove = __devexit_p(snd_my_remove), 5799 .remove = snd_my_remove,
5829 #ifdef CONFIG_PM 5800 #ifdef CONFIG_PM
5830 .suspend = snd_my_suspend, 5801 .suspend = snd_my_suspend,
5831 .resume = snd_my_resume, 5802 .resume = snd_my_resume,
diff --git a/Documentation/EDID/HOWTO.txt b/Documentation/EDID/HOWTO.txt
index 75a9f2a0c43d..2d0a8f09475d 100644
--- a/Documentation/EDID/HOWTO.txt
+++ b/Documentation/EDID/HOWTO.txt
@@ -28,11 +28,30 @@ Makefile environment are given here.
28To create binary EDID and C source code files from the existing data 28To create binary EDID and C source code files from the existing data
29material, simply type "make". 29material, simply type "make".
30 30
31If you want to create your own EDID file, copy the file 1024x768.S and 31If you want to create your own EDID file, copy the file 1024x768.S,
32replace the settings with your own data. The CRC value in the last line 32replace the settings with your own data and add a new target to the
33Makefile. Please note that the EDID data structure expects the timing
34values in a different way as compared to the standard X11 format.
35
36X11:
37HTimings: hdisp hsyncstart hsyncend htotal
38VTimings: vdisp vsyncstart vsyncend vtotal
39
40EDID:
41#define XPIX hdisp
42#define XBLANK htotal-hdisp
43#define XOFFSET hsyncstart-hdisp
44#define XPULSE hsyncend-hsyncstart
45
46#define YPIX vdisp
47#define YBLANK vtotal-vdisp
48#define YOFFSET (63+(vsyncstart-vdisp))
49#define YPULSE (63+(vsyncend-vsyncstart))
50
51The CRC value in the last line
33 #define CRC 0x55 52 #define CRC 0x55
34is a bit tricky. After a first version of the binary data set is 53also is a bit tricky. After a first version of the binary data set is
35created, it must be be checked with the "edid-decode" utility which will 54created, it must be checked with the "edid-decode" utility which will
36most probably complain about a wrong CRC. Fortunately, the utility also 55most probably complain about a wrong CRC. Fortunately, the utility also
37displays the correct CRC which must then be inserted into the source 56displays the correct CRC which must then be inserted into the source
38file. After the make procedure is repeated, the EDID data set is ready 57file. After the make procedure is repeated, the EDID data set is ready
diff --git a/Documentation/HOWTO b/Documentation/HOWTO
index 59c080f084ef..a9f288ff54f9 100644
--- a/Documentation/HOWTO
+++ b/Documentation/HOWTO
@@ -462,7 +462,7 @@ Differences between the kernel community and corporate structures
462 462
463The kernel community works differently than most traditional corporate 463The kernel community works differently than most traditional corporate
464development environments. Here are a list of things that you can try to 464development environments. Here are a list of things that you can try to
465do to try to avoid problems: 465do to avoid problems:
466 Good things to say regarding your proposed changes: 466 Good things to say regarding your proposed changes:
467 - "This solves multiple problems." 467 - "This solves multiple problems."
468 - "This deletes 2000 lines of code." 468 - "This deletes 2000 lines of code."
diff --git a/Documentation/IPMI.txt b/Documentation/IPMI.txt
index 16eb4c9e9233..f13c9132e9f2 100644
--- a/Documentation/IPMI.txt
+++ b/Documentation/IPMI.txt
@@ -348,34 +348,40 @@ You can change this at module load time (for a module) with:
348 348
349 modprobe ipmi_si.o type=<type1>,<type2>.... 349 modprobe ipmi_si.o type=<type1>,<type2>....
350 ports=<port1>,<port2>... addrs=<addr1>,<addr2>... 350 ports=<port1>,<port2>... addrs=<addr1>,<addr2>...
351 irqs=<irq1>,<irq2>... trydefaults=[0|1] 351 irqs=<irq1>,<irq2>...
352 regspacings=<sp1>,<sp2>,... regsizes=<size1>,<size2>,... 352 regspacings=<sp1>,<sp2>,... regsizes=<size1>,<size2>,...
353 regshifts=<shift1>,<shift2>,... 353 regshifts=<shift1>,<shift2>,...
354 slave_addrs=<addr1>,<addr2>,... 354 slave_addrs=<addr1>,<addr2>,...
355 force_kipmid=<enable1>,<enable2>,... 355 force_kipmid=<enable1>,<enable2>,...
356 kipmid_max_busy_us=<ustime1>,<ustime2>,... 356 kipmid_max_busy_us=<ustime1>,<ustime2>,...
357 unload_when_empty=[0|1] 357 unload_when_empty=[0|1]
358 trydefaults=[0|1] trydmi=[0|1] tryacpi=[0|1]
359 tryplatform=[0|1] trypci=[0|1]
358 360
359Each of these except si_trydefaults is a list, the first item for the 361Each of these except try... items is a list, the first item for the
360first interface, second item for the second interface, etc. 362first interface, second item for the second interface, etc.
361 363
362The si_type may be either "kcs", "smic", or "bt". If you leave it blank, it 364The si_type may be either "kcs", "smic", or "bt". If you leave it blank, it
363defaults to "kcs". 365defaults to "kcs".
364 366
365If you specify si_addrs as non-zero for an interface, the driver will 367If you specify addrs as non-zero for an interface, the driver will
366use the memory address given as the address of the device. This 368use the memory address given as the address of the device. This
367overrides si_ports. 369overrides si_ports.
368 370
369If you specify si_ports as non-zero for an interface, the driver will 371If you specify ports as non-zero for an interface, the driver will
370use the I/O port given as the device address. 372use the I/O port given as the device address.
371 373
372If you specify si_irqs as non-zero for an interface, the driver will 374If you specify irqs as non-zero for an interface, the driver will
373attempt to use the given interrupt for the device. 375attempt to use the given interrupt for the device.
374 376
375si_trydefaults sets whether the standard IPMI interface at 0xca2 and 377trydefaults sets whether the standard IPMI interface at 0xca2 and
376any interfaces specified by ACPE are tried. By default, the driver 378any interfaces specified by ACPE are tried. By default, the driver
377tries it, set this value to zero to turn this off. 379tries it, set this value to zero to turn this off.
378 380
381The other try... items disable discovery by their corresponding
382names. These are all enabled by default, set them to zero to disable
383them. The tryplatform disables openfirmware.
384
379The next three parameters have to do with register layout. The 385The next three parameters have to do with register layout. The
380registers used by the interfaces may not appear at successive 386registers used by the interfaces may not appear at successive
381locations and they may not be in 8-bit registers. These parameters 387locations and they may not be in 8-bit registers. These parameters
diff --git a/Documentation/IRQ-domain.txt b/Documentation/IRQ-domain.txt
index 1401cece745a..9bc95942ec22 100644
--- a/Documentation/IRQ-domain.txt
+++ b/Documentation/IRQ-domain.txt
@@ -7,6 +7,21 @@ systems with multiple interrupt controllers the kernel must ensure
7that each one gets assigned non-overlapping allocations of Linux 7that each one gets assigned non-overlapping allocations of Linux
8IRQ numbers. 8IRQ numbers.
9 9
10The number of interrupt controllers registered as unique irqchips
11show a rising tendency: for example subdrivers of different kinds
12such as GPIO controllers avoid reimplementing identical callback
13mechanisms as the IRQ core system by modelling their interrupt
14handlers as irqchips, i.e. in effect cascading interrupt controllers.
15
16Here the interrupt number loose all kind of correspondence to
17hardware interrupt numbers: whereas in the past, IRQ numbers could
18be chosen so they matched the hardware IRQ line into the root
19interrupt controller (i.e. the component actually fireing the
20interrupt line to the CPU) nowadays this number is just a number.
21
22For this reason we need a mechanism to separate controller-local
23interrupt numbers, called hardware irq's, from Linux IRQ numbers.
24
10The irq_alloc_desc*() and irq_free_desc*() APIs provide allocation of 25The irq_alloc_desc*() and irq_free_desc*() APIs provide allocation of
11irq numbers, but they don't provide any support for reverse mapping of 26irq numbers, but they don't provide any support for reverse mapping of
12the controller-local IRQ (hwirq) number into the Linux IRQ number 27the controller-local IRQ (hwirq) number into the Linux IRQ number
@@ -40,6 +55,10 @@ required hardware setup.
40When an interrupt is received, irq_find_mapping() function should 55When an interrupt is received, irq_find_mapping() function should
41be used to find the Linux IRQ number from the hwirq number. 56be used to find the Linux IRQ number from the hwirq number.
42 57
58The irq_create_mapping() function must be called *atleast once*
59before any call to irq_find_mapping(), lest the descriptor will not
60be allocated.
61
43If the driver has the Linux IRQ number or the irq_data pointer, and 62If the driver has the Linux IRQ number or the irq_data pointer, and
44needs to know the associated hwirq number (such as in the irq_chip 63needs to know the associated hwirq number (such as in the irq_chip
45callbacks) then it can be directly obtained from irq_data->hwirq. 64callbacks) then it can be directly obtained from irq_data->hwirq.
@@ -119,4 +138,17 @@ numbers.
119 138
120Most users of legacy mappings should use irq_domain_add_simple() which 139Most users of legacy mappings should use irq_domain_add_simple() which
121will use a legacy domain only if an IRQ range is supplied by the 140will use a legacy domain only if an IRQ range is supplied by the
122system and will otherwise use a linear domain mapping. 141system and will otherwise use a linear domain mapping. The semantics
142of this call are such that if an IRQ range is specified then
143descriptors will be allocated on-the-fly for it, and if no range is
144specified it will fall through to irq_domain_add_linear() which meand
145*no* irq descriptors will be allocated.
146
147A typical use case for simple domains is where an irqchip provider
148is supporting both dynamic and static IRQ assignments.
149
150In order to avoid ending up in a situation where a linear domain is
151used and no descriptor gets allocated it is very important to make sure
152that the driver using the simple domain call irq_create_mapping()
153before any irq_find_mapping() since the latter will actually work
154for the static IRQ assignment case.
diff --git a/Documentation/PCI/MSI-HOWTO.txt b/Documentation/PCI/MSI-HOWTO.txt
index 53e6fca146d7..a09178086c30 100644
--- a/Documentation/PCI/MSI-HOWTO.txt
+++ b/Documentation/PCI/MSI-HOWTO.txt
@@ -127,15 +127,42 @@ on the number of vectors that can be allocated; pci_enable_msi_block()
127returns as soon as it finds any constraint that doesn't allow the 127returns as soon as it finds any constraint that doesn't allow the
128call to succeed. 128call to succeed.
129 129
1304.2.3 pci_disable_msi 1304.2.3 pci_enable_msi_block_auto
131
132int pci_enable_msi_block_auto(struct pci_dev *dev, unsigned int *count)
133
134This variation on pci_enable_msi() call allows a device driver to request
135the maximum possible number of MSIs. The MSI specification only allows
136interrupts to be allocated in powers of two, up to a maximum of 2^5 (32).
137
138If this function returns a positive number, it indicates that it has
139succeeded and the returned value is the number of allocated interrupts. In
140this case, the function enables MSI on this device and updates dev->irq to
141be the lowest of the new interrupts assigned to it. The other interrupts
142assigned to the device are in the range dev->irq to dev->irq + returned
143value - 1.
144
145If this function returns a negative number, it indicates an error and
146the driver should not attempt to request any more MSI interrupts for
147this device.
148
149If the device driver needs to know the number of interrupts the device
150supports it can pass the pointer count where that number is stored. The
151device driver must decide what action to take if pci_enable_msi_block_auto()
152succeeds, but returns a value less than the number of interrupts supported.
153If the device driver does not need to know the number of interrupts
154supported, it can set the pointer count to NULL.
155
1564.2.4 pci_disable_msi
131 157
132void pci_disable_msi(struct pci_dev *dev) 158void pci_disable_msi(struct pci_dev *dev)
133 159
134This function should be used to undo the effect of pci_enable_msi() or 160This function should be used to undo the effect of pci_enable_msi() or
135pci_enable_msi_block(). Calling it restores dev->irq to the pin-based 161pci_enable_msi_block() or pci_enable_msi_block_auto(). Calling it restores
136interrupt number and frees the previously allocated message signaled 162dev->irq to the pin-based interrupt number and frees the previously
137interrupt(s). The interrupt may subsequently be assigned to another 163allocated message signaled interrupt(s). The interrupt may subsequently be
138device, so drivers should not cache the value of dev->irq. 164assigned to another device, so drivers should not cache the value of
165dev->irq.
139 166
140Before calling this function, a device driver must always call free_irq() 167Before calling this function, a device driver must always call free_irq()
141on any interrupt for which it previously called request_irq(). 168on any interrupt for which it previously called request_irq().
diff --git a/Documentation/PCI/pci-iov-howto.txt b/Documentation/PCI/pci-iov-howto.txt
index fc73ef5d65b8..86551cc72e03 100644
--- a/Documentation/PCI/pci-iov-howto.txt
+++ b/Documentation/PCI/pci-iov-howto.txt
@@ -2,6 +2,9 @@
2 Copyright (C) 2009 Intel Corporation 2 Copyright (C) 2009 Intel Corporation
3 Yu Zhao <yu.zhao@intel.com> 3 Yu Zhao <yu.zhao@intel.com>
4 4
5 Update: November 2012
6 -- sysfs-based SRIOV enable-/disable-ment
7 Donald Dutile <ddutile@redhat.com>
5 8
61. Overview 91. Overview
7 10
@@ -24,10 +27,21 @@ real existing PCI device.
24 27
252.1 How can I enable SR-IOV capability 282.1 How can I enable SR-IOV capability
26 29
27The device driver (PF driver) will control the enabling and disabling 30Multiple methods are available for SR-IOV enablement.
28of the capability via API provided by SR-IOV core. If the hardware 31In the first method, the device driver (PF driver) will control the
29has SR-IOV capability, loading its PF driver would enable it and all 32enabling and disabling of the capability via API provided by SR-IOV core.
30VFs associated with the PF. 33If the hardware has SR-IOV capability, loading its PF driver would
34enable it and all VFs associated with the PF. Some PF drivers require
35a module parameter to be set to determine the number of VFs to enable.
36In the second method, a write to the sysfs file sriov_numvfs will
37enable and disable the VFs associated with a PCIe PF. This method
38enables per-PF, VF enable/disable values versus the first method,
39which applies to all PFs of the same device. Additionally, the
40PCI SRIOV core support ensures that enable/disable operations are
41valid to reduce duplication in multiple drivers for the same
42checks, e.g., check numvfs == 0 if enabling VFs, ensure
43numvfs <= totalvfs.
44The second method is the recommended method for new/future VF devices.
31 45
322.2 How can I use the Virtual Functions 462.2 How can I use the Virtual Functions
33 47
@@ -40,20 +54,29 @@ requires device driver that is same as a normal PCI device's.
403.1 SR-IOV API 543.1 SR-IOV API
41 55
42To enable SR-IOV capability: 56To enable SR-IOV capability:
57(a) For the first method, in the driver:
43 int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn); 58 int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn);
44 'nr_virtfn' is number of VFs to be enabled. 59 'nr_virtfn' is number of VFs to be enabled.
60(b) For the second method, from sysfs:
61 echo 'nr_virtfn' > \
62 /sys/bus/pci/devices/<DOMAIN:BUS:DEVICE.FUNCTION>/sriov_numvfs
45 63
46To disable SR-IOV capability: 64To disable SR-IOV capability:
65(a) For the first method, in the driver:
47 void pci_disable_sriov(struct pci_dev *dev); 66 void pci_disable_sriov(struct pci_dev *dev);
67(b) For the second method, from sysfs:
68 echo 0 > \
69 /sys/bus/pci/devices/<DOMAIN:BUS:DEVICE.FUNCTION>/sriov_numvfs
48 70
49To notify SR-IOV core of Virtual Function Migration: 71To notify SR-IOV core of Virtual Function Migration:
72(a) In the driver:
50 irqreturn_t pci_sriov_migration(struct pci_dev *dev); 73 irqreturn_t pci_sriov_migration(struct pci_dev *dev);
51 74
523.2 Usage example 753.2 Usage example
53 76
54Following piece of code illustrates the usage of the SR-IOV API. 77Following piece of code illustrates the usage of the SR-IOV API.
55 78
56static int __devinit dev_probe(struct pci_dev *dev, const struct pci_device_id *id) 79static int dev_probe(struct pci_dev *dev, const struct pci_device_id *id)
57{ 80{
58 pci_enable_sriov(dev, NR_VIRTFN); 81 pci_enable_sriov(dev, NR_VIRTFN);
59 82
@@ -62,7 +85,7 @@ static int __devinit dev_probe(struct pci_dev *dev, const struct pci_device_id *
62 return 0; 85 return 0;
63} 86}
64 87
65static void __devexit dev_remove(struct pci_dev *dev) 88static void dev_remove(struct pci_dev *dev)
66{ 89{
67 pci_disable_sriov(dev); 90 pci_disable_sriov(dev);
68 91
@@ -88,12 +111,29 @@ static void dev_shutdown(struct pci_dev *dev)
88 ... 111 ...
89} 112}
90 113
114static int dev_sriov_configure(struct pci_dev *dev, int numvfs)
115{
116 if (numvfs > 0) {
117 ...
118 pci_enable_sriov(dev, numvfs);
119 ...
120 return numvfs;
121 }
122 if (numvfs == 0) {
123 ....
124 pci_disable_sriov(dev);
125 ...
126 return 0;
127 }
128}
129
91static struct pci_driver dev_driver = { 130static struct pci_driver dev_driver = {
92 .name = "SR-IOV Physical Function driver", 131 .name = "SR-IOV Physical Function driver",
93 .id_table = dev_id_table, 132 .id_table = dev_id_table,
94 .probe = dev_probe, 133 .probe = dev_probe,
95 .remove = __devexit_p(dev_remove), 134 .remove = dev_remove,
96 .suspend = dev_suspend, 135 .suspend = dev_suspend,
97 .resume = dev_resume, 136 .resume = dev_resume,
98 .shutdown = dev_shutdown, 137 .shutdown = dev_shutdown,
138 .sriov_configure = dev_sriov_configure,
99}; 139};
diff --git a/Documentation/PCI/pci.txt b/Documentation/PCI/pci.txt
index aa09e5476bba..bccf602a87f5 100644
--- a/Documentation/PCI/pci.txt
+++ b/Documentation/PCI/pci.txt
@@ -183,12 +183,6 @@ Please mark the initialization and cleanup functions where appropriate
183 initializes. 183 initializes.
184 __exit Exit code. Ignored for non-modular drivers. 184 __exit Exit code. Ignored for non-modular drivers.
185 185
186
187 __devinit Device initialization code.
188 Identical to __init if the kernel is not compiled
189 with CONFIG_HOTPLUG, normal function otherwise.
190 __devexit The same for __exit.
191
192Tips on when/where to use the above attributes: 186Tips on when/where to use the above attributes:
193 o The module_init()/module_exit() functions (and all 187 o The module_init()/module_exit() functions (and all
194 initialization functions called _only_ from these) 188 initialization functions called _only_ from these)
@@ -196,20 +190,6 @@ Tips on when/where to use the above attributes:
196 190
197 o Do not mark the struct pci_driver. 191 o Do not mark the struct pci_driver.
198 192
199 o The ID table array should be marked __devinitconst; this is done
200 automatically if the table is declared with DEFINE_PCI_DEVICE_TABLE().
201
202 o The probe() and remove() functions should be marked __devinit
203 and __devexit respectively. All initialization functions
204 exclusively called by the probe() routine, can be marked __devinit.
205 Ditto for remove() and __devexit.
206
207 o If mydriver_remove() is marked with __devexit(), then all address
208 references to mydriver_remove must use __devexit_p(mydriver_remove)
209 (in the struct pci_driver declaration for example).
210 __devexit_p() will generate the function name _or_ NULL if the
211 function will be discarded. For an example, see drivers/net/tg3.c.
212
213 o Do NOT mark a function if you are not sure which mark to use. 193 o Do NOT mark a function if you are not sure which mark to use.
214 Better to not mark the function than mark the function wrong. 194 Better to not mark the function than mark the function wrong.
215 195
diff --git a/Documentation/RCU/RTFP.txt b/Documentation/RCU/RTFP.txt
index 7c1dfb19fc40..7f40c72a9c51 100644
--- a/Documentation/RCU/RTFP.txt
+++ b/Documentation/RCU/RTFP.txt
@@ -186,7 +186,7 @@ Bibtex Entries
186 186
187@article{Kung80 187@article{Kung80
188,author="H. T. Kung and Q. Lehman" 188,author="H. T. Kung and Q. Lehman"
189,title="Concurrent Maintenance of Binary Search Trees" 189,title="Concurrent Manipulation of Binary Search Trees"
190,Year="1980" 190,Year="1980"
191,Month="September" 191,Month="September"
192,journal="ACM Transactions on Database Systems" 192,journal="ACM Transactions on Database Systems"
diff --git a/Documentation/RCU/checklist.txt b/Documentation/RCU/checklist.txt
index cdb20d41a44a..31ef8fe07f82 100644
--- a/Documentation/RCU/checklist.txt
+++ b/Documentation/RCU/checklist.txt
@@ -271,15 +271,14 @@ over a rather long period of time, but improvements are always welcome!
271 The same cautions apply to call_rcu_bh() and call_rcu_sched(). 271 The same cautions apply to call_rcu_bh() and call_rcu_sched().
272 272
2739. All RCU list-traversal primitives, which include 2739. All RCU list-traversal primitives, which include
274 rcu_dereference(), list_for_each_entry_rcu(), 274 rcu_dereference(), list_for_each_entry_rcu(), and
275 list_for_each_continue_rcu(), and list_for_each_safe_rcu(), 275 list_for_each_safe_rcu(), must be either within an RCU read-side
276 must be either within an RCU read-side critical section or 276 critical section or must be protected by appropriate update-side
277 must be protected by appropriate update-side locks. RCU 277 locks. RCU read-side critical sections are delimited by
278 read-side critical sections are delimited by rcu_read_lock() 278 rcu_read_lock() and rcu_read_unlock(), or by similar primitives
279 and rcu_read_unlock(), or by similar primitives such as 279 such as rcu_read_lock_bh() and rcu_read_unlock_bh(), in which
280 rcu_read_lock_bh() and rcu_read_unlock_bh(), in which case 280 case the matching rcu_dereference() primitive must be used in
281 the matching rcu_dereference() primitive must be used in order 281 order to keep lockdep happy, in this case, rcu_dereference_bh().
282 to keep lockdep happy, in this case, rcu_dereference_bh().
283 282
284 The reason that it is permissible to use RCU list-traversal 283 The reason that it is permissible to use RCU list-traversal
285 primitives when the update-side lock is held is that doing so 284 primitives when the update-side lock is held is that doing so
diff --git a/Documentation/RCU/listRCU.txt b/Documentation/RCU/listRCU.txt
index 4349c1487e91..adb5a3782846 100644
--- a/Documentation/RCU/listRCU.txt
+++ b/Documentation/RCU/listRCU.txt
@@ -205,7 +205,7 @@ RCU ("read-copy update") its name. The RCU code is as follows:
205 audit_copy_rule(&ne->rule, &e->rule); 205 audit_copy_rule(&ne->rule, &e->rule);
206 ne->rule.action = newaction; 206 ne->rule.action = newaction;
207 ne->rule.file_count = newfield_count; 207 ne->rule.file_count = newfield_count;
208 list_replace_rcu(e, ne); 208 list_replace_rcu(&e->list, &ne->list);
209 call_rcu(&e->rcu, audit_free_rule); 209 call_rcu(&e->rcu, audit_free_rule);
210 return 0; 210 return 0;
211 } 211 }
diff --git a/Documentation/RCU/rcuref.txt b/Documentation/RCU/rcuref.txt
index 4202ad093130..141d531aa14b 100644
--- a/Documentation/RCU/rcuref.txt
+++ b/Documentation/RCU/rcuref.txt
@@ -20,7 +20,7 @@ release_referenced() delete()
20{ { 20{ {
21 ... write_lock(&list_lock); 21 ... write_lock(&list_lock);
22 atomic_dec(&el->rc, relfunc) ... 22 atomic_dec(&el->rc, relfunc) ...
23 ... delete_element 23 ... remove_element
24} write_unlock(&list_lock); 24} write_unlock(&list_lock);
25 ... 25 ...
26 if (atomic_dec_and_test(&el->rc)) 26 if (atomic_dec_and_test(&el->rc))
@@ -52,7 +52,7 @@ release_referenced() delete()
52{ { 52{ {
53 ... spin_lock(&list_lock); 53 ... spin_lock(&list_lock);
54 if (atomic_dec_and_test(&el->rc)) ... 54 if (atomic_dec_and_test(&el->rc)) ...
55 call_rcu(&el->head, el_free); delete_element 55 call_rcu(&el->head, el_free); remove_element
56 ... spin_unlock(&list_lock); 56 ... spin_unlock(&list_lock);
57} ... 57} ...
58 if (atomic_dec_and_test(&el->rc)) 58 if (atomic_dec_and_test(&el->rc))
@@ -64,3 +64,60 @@ Sometimes, a reference to the element needs to be obtained in the
64update (write) stream. In such cases, atomic_inc_not_zero() might be 64update (write) stream. In such cases, atomic_inc_not_zero() might be
65overkill, since we hold the update-side spinlock. One might instead 65overkill, since we hold the update-side spinlock. One might instead
66use atomic_inc() in such cases. 66use atomic_inc() in such cases.
67
68It is not always convenient to deal with "FAIL" in the
69search_and_reference() code path. In such cases, the
70atomic_dec_and_test() may be moved from delete() to el_free()
71as follows:
72
731. 2.
74add() search_and_reference()
75{ {
76 alloc_object rcu_read_lock();
77 ... search_for_element
78 atomic_set(&el->rc, 1); atomic_inc(&el->rc);
79 spin_lock(&list_lock); ...
80
81 add_element rcu_read_unlock();
82 ... }
83 spin_unlock(&list_lock); 4.
84} delete()
853. {
86release_referenced() spin_lock(&list_lock);
87{ ...
88 ... remove_element
89 if (atomic_dec_and_test(&el->rc)) spin_unlock(&list_lock);
90 kfree(el); ...
91 ... call_rcu(&el->head, el_free);
92} ...
935. }
94void el_free(struct rcu_head *rhp)
95{
96 release_referenced();
97}
98
99The key point is that the initial reference added by add() is not removed
100until after a grace period has elapsed following removal. This means that
101search_and_reference() cannot find this element, which means that the value
102of el->rc cannot increase. Thus, once it reaches zero, there are no
103readers that can or ever will be able to reference the element. The
104element can therefore safely be freed. This in turn guarantees that if
105any reader finds the element, that reader may safely acquire a reference
106without checking the value of the reference counter.
107
108In cases where delete() can sleep, synchronize_rcu() can be called from
109delete(), so that el_free() can be subsumed into delete as follows:
110
1114.
112delete()
113{
114 spin_lock(&list_lock);
115 ...
116 remove_element
117 spin_unlock(&list_lock);
118 ...
119 synchronize_rcu();
120 if (atomic_dec_and_test(&el->rc))
121 kfree(el);
122 ...
123}
diff --git a/Documentation/RCU/trace.txt b/Documentation/RCU/trace.txt
index 672d19083252..c776968f4463 100644
--- a/Documentation/RCU/trace.txt
+++ b/Documentation/RCU/trace.txt
@@ -10,51 +10,63 @@ for rcutree and next for rcutiny.
10 10
11CONFIG_TREE_RCU and CONFIG_TREE_PREEMPT_RCU debugfs Files and Formats 11CONFIG_TREE_RCU and CONFIG_TREE_PREEMPT_RCU debugfs Files and Formats
12 12
13These implementations of RCU provides several debugfs files under the 13These implementations of RCU provide several debugfs directories under the
14top-level directory "rcu": 14top-level directory "rcu":
15 15
16rcu/rcudata: 16rcu/rcu_bh
17rcu/rcu_preempt
18rcu/rcu_sched
19
20Each directory contains files for the corresponding flavor of RCU.
21Note that rcu/rcu_preempt is only present for CONFIG_TREE_PREEMPT_RCU.
22For CONFIG_TREE_RCU, the RCU flavor maps onto the RCU-sched flavor,
23so that activity for both appears in rcu/rcu_sched.
24
25In addition, the following file appears in the top-level directory:
26rcu/rcutorture. This file displays rcutorture test progress. The output
27of "cat rcu/rcutorture" looks as follows:
28
29rcutorture test sequence: 0 (test in progress)
30rcutorture update version number: 615
31
32The first line shows the number of rcutorture tests that have completed
33since boot. If a test is currently running, the "(test in progress)"
34string will appear as shown above. The second line shows the number of
35update cycles that the current test has started, or zero if there is
36no test in progress.
37
38
39Within each flavor directory (rcu/rcu_bh, rcu/rcu_sched, and possibly
40also rcu/rcu_preempt) the following files will be present:
41
42rcudata:
17 Displays fields in struct rcu_data. 43 Displays fields in struct rcu_data.
18rcu/rcudata.csv: 44rcuexp:
19 Comma-separated values spreadsheet version of rcudata. 45 Displays statistics for expedited grace periods.
20rcu/rcugp: 46rcugp:
21 Displays grace-period counters. 47 Displays grace-period counters.
22rcu/rcuhier: 48rcuhier:
23 Displays the struct rcu_node hierarchy. 49 Displays the struct rcu_node hierarchy.
24rcu/rcu_pending: 50rcu_pending:
25 Displays counts of the reasons rcu_pending() decided that RCU had 51 Displays counts of the reasons rcu_pending() decided that RCU had
26 work to do. 52 work to do.
27rcu/rcutorture: 53rcuboost:
28 Displays rcutorture test progress.
29rcu/rcuboost:
30 Displays RCU boosting statistics. Only present if 54 Displays RCU boosting statistics. Only present if
31 CONFIG_RCU_BOOST=y. 55 CONFIG_RCU_BOOST=y.
32 56
33The output of "cat rcu/rcudata" looks as follows: 57The output of "cat rcu/rcu_preempt/rcudata" looks as follows:
34 58
35rcu_sched: 59 0!c=30455 g=30456 pq=1 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
36 0 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=545/1/0 df=50 of=0 ql=163 qs=NRW. kt=0/W/0 ktl=ebc3 b=10 ci=153737 co=0 ca=0 60 1!c=30719 g=30720 pq=1 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
37 1 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=967/1/0 df=58 of=0 ql=634 qs=NRW. kt=0/W/1 ktl=58c b=10 ci=191037 co=0 ca=0 61 2!c=30150 g=30151 pq=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
38 2 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=1081/1/0 df=175 of=0 ql=74 qs=N.W. kt=0/W/2 ktl=da94 b=10 ci=75991 co=0 ca=0 62 3 c=31249 g=31250 pq=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
39 3 c=20942 g=20943 pq=1 pgp=20942 qp=1 dt=1846/0/0 df=404 of=0 ql=0 qs=.... kt=0/W/3 ktl=d1cd b=10 ci=72261 co=0 ca=0 63 4!c=29502 g=29503 pq=1 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
40 4 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=369/1/0 df=83 of=0 ql=48 qs=N.W. kt=0/W/4 ktl=e0e7 b=10 ci=128365 co=0 ca=0 64 5 c=31201 g=31202 pq=1 qp=1 dt=70422/0/0 df=535 of=7 ql=0/0 qs=.... b=10 ci=58500 nci=0 co=764 ca=698
41 5 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=381/1/0 df=64 of=0 ql=169 qs=NRW. kt=0/W/5 ktl=fb2f b=10 ci=164360 co=0 ca=0 65 6!c=30253 g=30254 pq=1 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
42 6 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=1037/1/0 df=183 of=0 ql=62 qs=N.W. kt=0/W/6 ktl=d2ad b=10 ci=65663 co=0 ca=0 66 7 c=31178 g=31178 pq=1 qp=0 dt=91536/0/0 df=547 of=4 ql=0/0 qs=.... b=10 ci=109819 nci=0 co=1115 ca=969
43 7 c=20897 g=20897 pq=1 pgp=20896 qp=0 dt=1572/0/0 df=382 of=0 ql=0 qs=.... kt=0/W/7 ktl=cf15 b=10 ci=75006 co=0 ca=0 67
44rcu_bh: 68This file has one line per CPU, or eight for this 8-CPU system.
45 0 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=545/1/0 df=6 of=0 ql=0 qs=.... kt=0/W/0 ktl=ebc3 b=10 ci=0 co=0 ca=0 69The fields are as follows:
46 1 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=967/1/0 df=3 of=0 ql=0 qs=.... kt=0/W/1 ktl=58c b=10 ci=151 co=0 ca=0
47 2 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=1081/1/0 df=6 of=0 ql=0 qs=.... kt=0/W/2 ktl=da94 b=10 ci=0 co=0 ca=0
48 3 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=1846/0/0 df=8 of=0 ql=0 qs=.... kt=0/W/3 ktl=d1cd b=10 ci=0 co=0 ca=0
49 4 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=369/1/0 df=6 of=0 ql=0 qs=.... kt=0/W/4 ktl=e0e7 b=10 ci=0 co=0 ca=0
50 5 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=381/1/0 df=4 of=0 ql=0 qs=.... kt=0/W/5 ktl=fb2f b=10 ci=0 co=0 ca=0
51 6 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=1037/1/0 df=6 of=0 ql=0 qs=.... kt=0/W/6 ktl=d2ad b=10 ci=0 co=0 ca=0
52 7 c=1474 g=1474 pq=1 pgp=1473 qp=0 dt=1572/0/0 df=8 of=0 ql=0 qs=.... kt=0/W/7 ktl=cf15 b=10 ci=0 co=0 ca=0
53
54The first section lists the rcu_data structures for rcu_sched, the second
55for rcu_bh. Note that CONFIG_TREE_PREEMPT_RCU kernels will have an
56additional section for rcu_preempt. Each section has one line per CPU,
57or eight for this 8-CPU system. The fields are as follows:
58 70
59o The number at the beginning of each line is the CPU number. 71o The number at the beginning of each line is the CPU number.
60 CPUs numbers followed by an exclamation mark are offline, 72 CPUs numbers followed by an exclamation mark are offline,
@@ -64,11 +76,13 @@ o The number at the beginning of each line is the CPU number.
64 substantially larger than the number of actual CPUs. 76 substantially larger than the number of actual CPUs.
65 77
66o "c" is the count of grace periods that this CPU believes have 78o "c" is the count of grace periods that this CPU believes have
67 completed. Offlined CPUs and CPUs in dynticks idle mode may 79 completed. Offlined CPUs and CPUs in dynticks idle mode may lag
68 lag quite a ways behind, for example, CPU 6 under "rcu_sched" 80 quite a ways behind, for example, CPU 4 under "rcu_sched" above,
69 above, which has been offline through not quite 40,000 RCU grace 81 which has been offline through 16 RCU grace periods. It is not
70 periods. It is not unusual to see CPUs lagging by thousands of 82 unusual to see offline CPUs lagging by thousands of grace periods.
71 grace periods. 83 Note that although the grace-period number is an unsigned long,
84 it is printed out as a signed long to allow more human-friendly
85 representation near boot time.
72 86
73o "g" is the count of grace periods that this CPU believes have 87o "g" is the count of grace periods that this CPU believes have
74 started. Again, offlined CPUs and CPUs in dynticks idle mode 88 started. Again, offlined CPUs and CPUs in dynticks idle mode
@@ -84,30 +98,25 @@ o "pq" indicates that this CPU has passed through a quiescent state
84 CPU has not yet reported that fact, (2) some other CPU has not 98 CPU has not yet reported that fact, (2) some other CPU has not
85 yet reported for this grace period, or (3) both. 99 yet reported for this grace period, or (3) both.
86 100
87o "pgp" indicates which grace period the last-observed quiescent
88 state for this CPU corresponds to. This is important for handling
89 the race between CPU 0 reporting an extended dynticks-idle
90 quiescent state for CPU 1 and CPU 1 suddenly waking up and
91 reporting its own quiescent state. If CPU 1 was the last CPU
92 for the current grace period, then the CPU that loses this race
93 will attempt to incorrectly mark CPU 1 as having checked in for
94 the next grace period!
95
96o "qp" indicates that RCU still expects a quiescent state from 101o "qp" indicates that RCU still expects a quiescent state from
97 this CPU. Offlined CPUs and CPUs in dyntick idle mode might 102 this CPU. Offlined CPUs and CPUs in dyntick idle mode might
98 well have qp=1, which is OK: RCU is still ignoring them. 103 well have qp=1, which is OK: RCU is still ignoring them.
99 104
100o "dt" is the current value of the dyntick counter that is incremented 105o "dt" is the current value of the dyntick counter that is incremented
101 when entering or leaving dynticks idle state, either by the 106 when entering or leaving idle, either due to a context switch or
102 scheduler or by irq. This number is even if the CPU is in 107 due to an interrupt. This number is even if the CPU is in idle
103 dyntick idle mode and odd otherwise. The number after the first 108 from RCU's viewpoint and odd otherwise. The number after the
104 "/" is the interrupt nesting depth when in dyntick-idle state, 109 first "/" is the interrupt nesting depth when in idle state,
105 or one greater than the interrupt-nesting depth otherwise. 110 or a large number added to the interrupt-nesting depth when
106 The number after the second "/" is the NMI nesting depth. 111 running a non-idle task. Some architectures do not accurately
112 count interrupt nesting when running in non-idle kernel context,
113 which can result in interesting anomalies such as negative
114 interrupt-nesting levels. The number after the second "/"
115 is the NMI nesting depth.
107 116
108o "df" is the number of times that some other CPU has forced a 117o "df" is the number of times that some other CPU has forced a
109 quiescent state on behalf of this CPU due to this CPU being in 118 quiescent state on behalf of this CPU due to this CPU being in
110 dynticks-idle state. 119 idle state.
111 120
112o "of" is the number of times that some other CPU has forced a 121o "of" is the number of times that some other CPU has forced a
113 quiescent state on behalf of this CPU due to this CPU being 122 quiescent state on behalf of this CPU due to this CPU being
@@ -120,9 +129,13 @@ o "of" is the number of times that some other CPU has forced a
120 error, so it makes sense to err conservatively. 129 error, so it makes sense to err conservatively.
121 130
122o "ql" is the number of RCU callbacks currently residing on 131o "ql" is the number of RCU callbacks currently residing on
123 this CPU. This is the total number of callbacks, regardless 132 this CPU. The first number is the number of "lazy" callbacks
124 of what state they are in (new, waiting for grace period to 133 that are known to RCU to only be freeing memory, and the number
125 start, waiting for grace period to end, ready to invoke). 134 after the "/" is the total number of callbacks, lazy or not.
135 These counters count callbacks regardless of what phase of
136 grace-period processing that they are in (new, waiting for
137 grace period to start, waiting for grace period to end, ready
138 to invoke).
126 139
127o "qs" gives an indication of the state of the callback queue 140o "qs" gives an indication of the state of the callback queue
128 with four characters: 141 with four characters:
@@ -150,6 +163,43 @@ o "qs" gives an indication of the state of the callback queue
150 If there are no callbacks in a given one of the above states, 163 If there are no callbacks in a given one of the above states,
151 the corresponding character is replaced by ".". 164 the corresponding character is replaced by ".".
152 165
166o "b" is the batch limit for this CPU. If more than this number
167 of RCU callbacks is ready to invoke, then the remainder will
168 be deferred.
169
170o "ci" is the number of RCU callbacks that have been invoked for
171 this CPU. Note that ci+nci+ql is the number of callbacks that have
172 been registered in absence of CPU-hotplug activity.
173
174o "nci" is the number of RCU callbacks that have been offloaded from
175 this CPU. This will always be zero unless the kernel was built
176 with CONFIG_RCU_NOCB_CPU=y and the "rcu_nocbs=" kernel boot
177 parameter was specified.
178
179o "co" is the number of RCU callbacks that have been orphaned due to
180 this CPU going offline. These orphaned callbacks have been moved
181 to an arbitrarily chosen online CPU.
182
183o "ca" is the number of RCU callbacks that have been adopted by this
184 CPU due to other CPUs going offline. Note that ci+co-ca+ql is
185 the number of RCU callbacks registered on this CPU.
186
187
188Kernels compiled with CONFIG_RCU_BOOST=y display the following from
189/debug/rcu/rcu_preempt/rcudata:
190
191 0!c=12865 g=12866 pq=1 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
192 1 c=14407 g=14408 pq=1 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
193 2 c=14407 g=14408 pq=1 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
194 3 c=14407 g=14408 pq=1 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
195 4 c=14405 g=14406 pq=1 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
196 5!c=14168 g=14169 pq=1 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
197 6 c=14404 g=14405 pq=1 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
198 7 c=14407 g=14408 pq=1 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
199
200This is similar to the output discussed above, but contains the following
201additional fields:
202
153o "kt" is the per-CPU kernel-thread state. The digit preceding 203o "kt" is the per-CPU kernel-thread state. The digit preceding
154 the first slash is zero if there is no work pending and 1 204 the first slash is zero if there is no work pending and 1
155 otherwise. The character between the first pair of slashes is 205 otherwise. The character between the first pair of slashes is
@@ -184,35 +234,51 @@ o "ktl" is the low-order 16 bits (in hexadecimal) of the count of
184 234
185 This field is displayed only for CONFIG_RCU_BOOST kernels. 235 This field is displayed only for CONFIG_RCU_BOOST kernels.
186 236
187o "b" is the batch limit for this CPU. If more than this number
188 of RCU callbacks is ready to invoke, then the remainder will
189 be deferred.
190 237
191o "ci" is the number of RCU callbacks that have been invoked for 238The output of "cat rcu/rcu_preempt/rcuexp" looks as follows:
192 this CPU. Note that ci+ql is the number of callbacks that have
193 been registered in absence of CPU-hotplug activity.
194 239
195o "co" is the number of RCU callbacks that have been orphaned due to 240s=21872 d=21872 w=0 tf=0 wd1=0 wd2=0 n=0 sc=21872 dt=21872 dl=0 dx=21872
196 this CPU going offline. These orphaned callbacks have been moved 241
197 to an arbitrarily chosen online CPU. 242These fields are as follows:
243
244o "s" is the starting sequence number.
198 245
199o "ca" is the number of RCU callbacks that have been adopted due to 246o "d" is the ending sequence number. When the starting and ending
200 other CPUs going offline. Note that ci+co-ca+ql is the number of 247 numbers differ, there is an expedited grace period in progress.
201 RCU callbacks registered on this CPU.
202 248
203There is also an rcu/rcudata.csv file with the same information in 249o "w" is the number of times that the sequence numbers have been
204comma-separated-variable spreadsheet format. 250 in danger of wrapping.
205 251
252o "tf" is the number of times that contention has resulted in a
253 failure to begin an expedited grace period.
206 254
207The output of "cat rcu/rcugp" looks as follows: 255o "wd1" and "wd2" are the number of times that an attempt to
256 start an expedited grace period found that someone else had
257 completed an expedited grace period that satisfies the
258 attempted request. "Our work is done."
208 259
209rcu_sched: completed=33062 gpnum=33063 260o "n" is number of times that contention was so great that
210rcu_bh: completed=464 gpnum=464 261 the request was demoted from an expedited grace period to
262 a normal grace period.
263
264o "sc" is the number of times that the attempt to start a
265 new expedited grace period succeeded.
266
267o "dt" is the number of times that we attempted to update
268 the "d" counter.
269
270o "dl" is the number of times that we failed to update the "d"
271 counter.
272
273o "dx" is the number of times that we succeeded in updating
274 the "d" counter.
211 275
212Again, this output is for both "rcu_sched" and "rcu_bh". Note that 276
213kernels built with CONFIG_TREE_PREEMPT_RCU will have an additional 277The output of "cat rcu/rcu_preempt/rcugp" looks as follows:
214"rcu_preempt" line. The fields are taken from the rcu_state structure, 278
215and are as follows: 279completed=31249 gpnum=31250 age=1 max=18
280
281These fields are taken from the rcu_state structure, and are as follows:
216 282
217o "completed" is the number of grace periods that have completed. 283o "completed" is the number of grace periods that have completed.
218 It is comparable to the "c" field from rcu/rcudata in that a 284 It is comparable to the "c" field from rcu/rcudata in that a
@@ -220,44 +286,42 @@ o "completed" is the number of grace periods that have completed.
220 that the corresponding RCU grace period has completed. 286 that the corresponding RCU grace period has completed.
221 287
222o "gpnum" is the number of grace periods that have started. It is 288o "gpnum" is the number of grace periods that have started. It is
223 comparable to the "g" field from rcu/rcudata in that a CPU 289 similarly comparable to the "g" field from rcu/rcudata in that
224 whose "g" field matches the value of "gpnum" is aware that the 290 a CPU whose "g" field matches the value of "gpnum" is aware that
225 corresponding RCU grace period has started. 291 the corresponding RCU grace period has started.
292
293 If these two fields are equal, then there is no grace period
294 in progress, in other words, RCU is idle. On the other hand,
295 if the two fields differ (as they are above), then an RCU grace
296 period is in progress.
226 297
227 If these two fields are equal (as they are for "rcu_bh" above), 298o "age" is the number of jiffies that the current grace period
228 then there is no grace period in progress, in other words, RCU 299 has extended for, or zero if there is no grace period currently
229 is idle. On the other hand, if the two fields differ (as they 300 in effect.
230 do for "rcu_sched" above), then an RCU grace period is in progress.
231 301
302o "max" is the age in jiffies of the longest-duration grace period
303 thus far.
232 304
233The output of "cat rcu/rcuhier" looks as follows, with very long lines: 305The output of "cat rcu/rcu_preempt/rcuhier" looks as follows:
234 306
235c=6902 g=6903 s=2 jfq=3 j=72c7 nfqs=13142/nfqsng=0(13142) fqlh=6 307c=14407 g=14408 s=0 jfq=2 j=c863 nfqs=12040/nfqsng=0(12040) fqlh=1051 oqlen=0/0
2361/1 ..>. 0:127 ^0 3083/3 ..>. 0:7 ^0
2373/3 ..>. 0:35 ^0 0/0 ..>. 36:71 ^1 0/0 ..>. 72:107 ^2 0/0 ..>. 108:127 ^3 309e/e ..>. 0:3 ^0 d/d ..>. 4:7 ^1
2383/3f ..>. 0:5 ^0 2/3 ..>. 6:11 ^1 0/0 ..>. 12:17 ^2 0/0 ..>. 18:23 ^3 0/0 ..>. 24:29 ^4 0/0 ..>. 30:35 ^5 0/0 ..>. 36:41 ^0 0/0 ..>. 42:47 ^1 0/0 ..>. 48:53 ^2 0/0 ..>. 54:59 ^3 0/0 ..>. 60:65 ^4 0/0 ..>. 66:71 ^5 0/0 ..>. 72:77 ^0 0/0 ..>. 78:83 ^1 0/0 ..>. 84:89 ^2 0/0 ..>. 90:95 ^3 0/0 ..>. 96:101 ^4 0/0 ..>. 102:107 ^5 0/0 ..>. 108:113 ^0 0/0 ..>. 114:119 ^1 0/0 ..>. 120:125 ^2 0/0 ..>. 126:127 ^3
239rcu_bh:
240c=-226 g=-226 s=1 jfq=-5701 j=72c7 nfqs=88/nfqsng=0(88) fqlh=0
2410/1 ..>. 0:127 ^0
2420/3 ..>. 0:35 ^0 0/0 ..>. 36:71 ^1 0/0 ..>. 72:107 ^2 0/0 ..>. 108:127 ^3
2430/3f ..>. 0:5 ^0 0/3 ..>. 6:11 ^1 0/0 ..>. 12:17 ^2 0/0 ..>. 18:23 ^3 0/0 ..>. 24:29 ^4 0/0 ..>. 30:35 ^5 0/0 ..>. 36:41 ^0 0/0 ..>. 42:47 ^1 0/0 ..>. 48:53 ^2 0/0 ..>. 54:59 ^3 0/0 ..>. 60:65 ^4 0/0 ..>. 66:71 ^5 0/0 ..>. 72:77 ^0 0/0 ..>. 78:83 ^1 0/0 ..>. 84:89 ^2 0/0 ..>. 90:95 ^3 0/0 ..>. 96:101 ^4 0/0 ..>. 102:107 ^5 0/0 ..>. 108:113 ^0 0/0 ..>. 114:119 ^1 0/0 ..>. 120:125 ^2 0/0 ..>. 126:127 ^3
244 310
245This is once again split into "rcu_sched" and "rcu_bh" portions, 311The fields are as follows:
246and CONFIG_TREE_PREEMPT_RCU kernels will again have an additional
247"rcu_preempt" section. The fields are as follows:
248 312
249o "c" is exactly the same as "completed" under rcu/rcugp. 313o "c" is exactly the same as "completed" under rcu/rcu_preempt/rcugp.
250 314
251o "g" is exactly the same as "gpnum" under rcu/rcugp. 315o "g" is exactly the same as "gpnum" under rcu/rcu_preempt/rcugp.
252 316
253o "s" is the "signaled" state that drives force_quiescent_state()'s 317o "s" is the current state of the force_quiescent_state()
254 state machine. 318 state machine.
255 319
256o "jfq" is the number of jiffies remaining for this grace period 320o "jfq" is the number of jiffies remaining for this grace period
257 before force_quiescent_state() is invoked to help push things 321 before force_quiescent_state() is invoked to help push things
258 along. Note that CPUs in dyntick-idle mode throughout the grace 322 along. Note that CPUs in idle mode throughout the grace period
259 period will not report on their own, but rather must be check by 323 will not report on their own, but rather must be check by some
260 some other CPU via force_quiescent_state(). 324 other CPU via force_quiescent_state().
261 325
262o "j" is the low-order four hex digits of the jiffies counter. 326o "j" is the low-order four hex digits of the jiffies counter.
263 Yes, Paul did run into a number of problems that turned out to 327 Yes, Paul did run into a number of problems that turned out to
@@ -268,7 +332,8 @@ o "nfqs" is the number of calls to force_quiescent_state() since
268 332
269o "nfqsng" is the number of useless calls to force_quiescent_state(), 333o "nfqsng" is the number of useless calls to force_quiescent_state(),
270 where there wasn't actually a grace period active. This can 334 where there wasn't actually a grace period active. This can
271 happen due to races. The number in parentheses is the difference 335 no longer happen due to grace-period processing being pushed
336 into a kthread. The number in parentheses is the difference
272 between "nfqs" and "nfqsng", or the number of times that 337 between "nfqs" and "nfqsng", or the number of times that
273 force_quiescent_state() actually did some real work. 338 force_quiescent_state() actually did some real work.
274 339
@@ -276,28 +341,27 @@ o "fqlh" is the number of calls to force_quiescent_state() that
276 exited immediately (without even being counted in nfqs above) 341 exited immediately (without even being counted in nfqs above)
277 due to contention on ->fqslock. 342 due to contention on ->fqslock.
278 343
279o Each element of the form "1/1 0:127 ^0" represents one struct 344o Each element of the form "3/3 ..>. 0:7 ^0" represents one rcu_node
280 rcu_node. Each line represents one level of the hierarchy, from 345 structure. Each line represents one level of the hierarchy,
281 root to leaves. It is best to think of the rcu_data structures 346 from root to leaves. It is best to think of the rcu_data
282 as forming yet another level after the leaves. Note that there 347 structures as forming yet another level after the leaves.
283 might be either one, two, or three levels of rcu_node structures, 348 Note that there might be either one, two, three, or even four
284 depending on the relationship between CONFIG_RCU_FANOUT and 349 levels of rcu_node structures, depending on the relationship
285 CONFIG_NR_CPUS. 350 between CONFIG_RCU_FANOUT, CONFIG_RCU_FANOUT_LEAF (possibly
351 adjusted using the rcu_fanout_leaf kernel boot parameter), and
352 CONFIG_NR_CPUS (possibly adjusted using the nr_cpu_ids count of
353 possible CPUs for the booting hardware).
286 354
287 o The numbers separated by the "/" are the qsmask followed 355 o The numbers separated by the "/" are the qsmask followed
288 by the qsmaskinit. The qsmask will have one bit 356 by the qsmaskinit. The qsmask will have one bit
289 set for each entity in the next lower level that 357 set for each entity in the next lower level that has
290 has not yet checked in for the current grace period. 358 not yet checked in for the current grace period ("e"
359 indicating CPUs 5, 6, and 7 in the example above).
291 The qsmaskinit will have one bit for each entity that is 360 The qsmaskinit will have one bit for each entity that is
292 currently expected to check in during each grace period. 361 currently expected to check in during each grace period.
293 The value of qsmaskinit is assigned to that of qsmask 362 The value of qsmaskinit is assigned to that of qsmask
294 at the beginning of each grace period. 363 at the beginning of each grace period.
295 364
296 For example, for "rcu_sched", the qsmask of the first
297 entry of the lowest level is 0x14, meaning that we
298 are still waiting for CPUs 2 and 4 to check in for the
299 current grace period.
300
301 o The characters separated by the ">" indicate the state 365 o The characters separated by the ">" indicate the state
302 of the blocked-tasks lists. A "G" preceding the ">" 366 of the blocked-tasks lists. A "G" preceding the ">"
303 indicates that at least one task blocked in an RCU 367 indicates that at least one task blocked in an RCU
@@ -312,48 +376,39 @@ o Each element of the form "1/1 0:127 ^0" represents one struct
312 A "." character appears if the corresponding condition 376 A "." character appears if the corresponding condition
313 does not hold, so that "..>." indicates that no tasks 377 does not hold, so that "..>." indicates that no tasks
314 are blocked. In contrast, "GE>T" indicates maximal 378 are blocked. In contrast, "GE>T" indicates maximal
315 inconvenience from blocked tasks. 379 inconvenience from blocked tasks. CONFIG_TREE_RCU
380 builds of the kernel will always show "..>.".
316 381
317 o The numbers separated by the ":" are the range of CPUs 382 o The numbers separated by the ":" are the range of CPUs
318 served by this struct rcu_node. This can be helpful 383 served by this struct rcu_node. This can be helpful
319 in working out how the hierarchy is wired together. 384 in working out how the hierarchy is wired together.
320 385
321 For example, the first entry at the lowest level shows 386 For example, the example rcu_node structure shown above
322 "0:5", indicating that it covers CPUs 0 through 5. 387 has "0:7", indicating that it covers CPUs 0 through 7.
323 388
324 o The number after the "^" indicates the bit in the 389 o The number after the "^" indicates the bit in the
325 next higher level rcu_node structure that this 390 next higher level rcu_node structure that this rcu_node
326 rcu_node structure corresponds to. 391 structure corresponds to. For example, the "d/d ..>. 4:7
327 392 ^1" has a "1" in this position, indicating that it
328 For example, the first entry at the lowest level shows 393 corresponds to the "1" bit in the "3" shown in the
329 "^0", indicating that it corresponds to bit zero in 394 "3/3 ..>. 0:7 ^0" entry on the next level up.
330 the first entry at the middle level. 395
331 396
332 397The output of "cat rcu/rcu_sched/rcu_pending" looks as follows:
333The output of "cat rcu/rcu_pending" looks as follows: 398
334 399 0!np=26111 qsp=29 rpq=5386 cbr=1 cng=570 gpc=3674 gps=577 nn=15903
335rcu_sched: 400 1!np=28913 qsp=35 rpq=6097 cbr=1 cng=448 gpc=3700 gps=554 nn=18113
336 0 np=255892 qsp=53936 rpq=85 cbr=0 cng=14417 gpc=10033 gps=24320 nn=146741 401 2!np=32740 qsp=37 rpq=6202 cbr=0 cng=476 gpc=4627 gps=546 nn=20889
337 1 np=261224 qsp=54638 rpq=33 cbr=0 cng=25723 gpc=16310 gps=2849 nn=155792 402 3 np=23679 qsp=22 rpq=5044 cbr=1 cng=415 gpc=3403 gps=347 nn=14469
338 2 np=237496 qsp=49664 rpq=23 cbr=0 cng=2762 gpc=45478 gps=1762 nn=136629 403 4!np=30714 qsp=4 rpq=5574 cbr=0 cng=528 gpc=3931 gps=639 nn=20042
339 3 np=236249 qsp=48766 rpq=98 cbr=0 cng=286 gpc=48049 gps=1218 nn=137723 404 5 np=28910 qsp=2 rpq=5246 cbr=0 cng=428 gpc=4105 gps=709 nn=18422
340 4 np=221310 qsp=46850 rpq=7 cbr=0 cng=26 gpc=43161 gps=4634 nn=123110 405 6!np=38648 qsp=5 rpq=7076 cbr=0 cng=840 gpc=4072 gps=961 nn=25699
341 5 np=237332 qsp=48449 rpq=9 cbr=0 cng=54 gpc=47920 gps=3252 nn=137456 406 7 np=37275 qsp=2 rpq=6873 cbr=0 cng=868 gpc=3416 gps=971 nn=25147
342 6 np=219995 qsp=46718 rpq=12 cbr=0 cng=50 gpc=42098 gps=6093 nn=120834 407
343 7 np=249893 qsp=49390 rpq=42 cbr=0 cng=72 gpc=38400 gps=17102 nn=144888 408The fields are as follows:
344rcu_bh: 409
345 0 np=146741 qsp=1419 rpq=6 cbr=0 cng=6 gpc=0 gps=0 nn=145314 410o The leading number is the CPU number, with "!" indicating
346 1 np=155792 qsp=12597 rpq=3 cbr=0 cng=0 gpc=4 gps=8 nn=143180 411 an offline CPU.
347 2 np=136629 qsp=18680 rpq=1 cbr=0 cng=0 gpc=7 gps=6 nn=117936
348 3 np=137723 qsp=2843 rpq=0 cbr=0 cng=0 gpc=10 gps=7 nn=134863
349 4 np=123110 qsp=12433 rpq=0 cbr=0 cng=0 gpc=4 gps=2 nn=110671
350 5 np=137456 qsp=4210 rpq=1 cbr=0 cng=0 gpc=6 gps=5 nn=133235
351 6 np=120834 qsp=9902 rpq=2 cbr=0 cng=0 gpc=6 gps=3 nn=110921
352 7 np=144888 qsp=26336 rpq=0 cbr=0 cng=0 gpc=8 gps=2 nn=118542
353
354As always, this is once again split into "rcu_sched" and "rcu_bh"
355portions, with CONFIG_TREE_PREEMPT_RCU kernels having an additional
356"rcu_preempt" section. The fields are as follows:
357 412
358o "np" is the number of times that __rcu_pending() has been invoked 413o "np" is the number of times that __rcu_pending() has been invoked
359 for the corresponding flavor of RCU. 414 for the corresponding flavor of RCU.
@@ -377,38 +432,23 @@ o "gpc" is the number of times that an old grace period had
377o "gps" is the number of times that a new grace period had started, 432o "gps" is the number of times that a new grace period had started,
378 but this CPU was not yet aware of it. 433 but this CPU was not yet aware of it.
379 434
380o "nn" is the number of times that this CPU needed nothing. Alert 435o "nn" is the number of times that this CPU needed nothing.
381 readers will note that the rcu "nn" number for a given CPU very
382 closely matches the rcu_bh "np" number for that same CPU. This
383 is due to short-circuit evaluation in rcu_pending().
384
385
386The output of "cat rcu/rcutorture" looks as follows:
387
388rcutorture test sequence: 0 (test in progress)
389rcutorture update version number: 615
390
391The first line shows the number of rcutorture tests that have completed
392since boot. If a test is currently running, the "(test in progress)"
393string will appear as shown above. The second line shows the number of
394update cycles that the current test has started, or zero if there is
395no test in progress.
396 436
397 437
398The output of "cat rcu/rcuboost" looks as follows: 438The output of "cat rcu/rcuboost" looks as follows:
399 439
4000:5 tasks=.... kt=W ntb=0 neb=0 nnb=0 j=2f95 bt=300f 4400:3 tasks=.... kt=W ntb=0 neb=0 nnb=0 j=c864 bt=c894
401 balk: nt=0 egt=989 bt=0 nb=0 ny=0 nos=16 441 balk: nt=0 egt=4695 bt=0 nb=0 ny=56 nos=0
4026:7 tasks=.... kt=W ntb=0 neb=0 nnb=0 j=2f95 bt=300f 4424:7 tasks=.... kt=W ntb=0 neb=0 nnb=0 j=c864 bt=c894
403 balk: nt=0 egt=225 bt=0 nb=0 ny=0 nos=6 443 balk: nt=0 egt=6541 bt=0 nb=0 ny=126 nos=0
404 444
405This information is output only for rcu_preempt. Each two-line entry 445This information is output only for rcu_preempt. Each two-line entry
406corresponds to a leaf rcu_node strcuture. The fields are as follows: 446corresponds to a leaf rcu_node strcuture. The fields are as follows:
407 447
408o "n:m" is the CPU-number range for the corresponding two-line 448o "n:m" is the CPU-number range for the corresponding two-line
409 entry. In the sample output above, the first entry covers 449 entry. In the sample output above, the first entry covers
410 CPUs zero through five and the second entry covers CPUs 6 450 CPUs zero through three and the second entry covers CPUs four
411 and 7. 451 through seven.
412 452
413o "tasks=TNEB" gives the state of the various segments of the 453o "tasks=TNEB" gives the state of the various segments of the
414 rnp->blocked_tasks list: 454 rnp->blocked_tasks list:
diff --git a/Documentation/RCU/whatisRCU.txt b/Documentation/RCU/whatisRCU.txt
index bf0f6de2aa00..0cc7820967f4 100644
--- a/Documentation/RCU/whatisRCU.txt
+++ b/Documentation/RCU/whatisRCU.txt
@@ -499,6 +499,8 @@ The foo_reclaim() function might appear as follows:
499 { 499 {
500 struct foo *fp = container_of(rp, struct foo, rcu); 500 struct foo *fp = container_of(rp, struct foo, rcu);
501 501
502 foo_cleanup(fp->a);
503
502 kfree(fp); 504 kfree(fp);
503 } 505 }
504 506
@@ -521,6 +523,12 @@ o Use call_rcu() -after- removing a data element from an
521 read-side critical sections that might be referencing that 523 read-side critical sections that might be referencing that
522 data item. 524 data item.
523 525
526If the callback for call_rcu() is not doing anything more than calling
527kfree() on the structure, you can use kfree_rcu() instead of call_rcu()
528to avoid having to write your own callback:
529
530 kfree_rcu(old_fp, rcu);
531
524Again, see checklist.txt for additional rules governing the use of RCU. 532Again, see checklist.txt for additional rules governing the use of RCU.
525 533
526 534
@@ -773,8 +781,8 @@ a single atomic update, converting to RCU will require special care.
773 781
774Also, the presence of synchronize_rcu() means that the RCU version of 782Also, the presence of synchronize_rcu() means that the RCU version of
775delete() can now block. If this is a problem, there is a callback-based 783delete() can now block. If this is a problem, there is a callback-based
776mechanism that never blocks, namely call_rcu(), that can be used in 784mechanism that never blocks, namely call_rcu() or kfree_rcu(), that can
777place of synchronize_rcu(). 785be used in place of synchronize_rcu().
778 786
779 787
7807. FULL LIST OF RCU APIs 7887. FULL LIST OF RCU APIs
@@ -789,9 +797,7 @@ RCU list traversal:
789 list_for_each_entry_rcu 797 list_for_each_entry_rcu
790 hlist_for_each_entry_rcu 798 hlist_for_each_entry_rcu
791 hlist_nulls_for_each_entry_rcu 799 hlist_nulls_for_each_entry_rcu
792 800 list_for_each_entry_continue_rcu
793 list_for_each_continue_rcu (to be deprecated in favor of new
794 list_for_each_entry_continue_rcu)
795 801
796RCU pointer/list update: 802RCU pointer/list update:
797 803
@@ -813,6 +819,7 @@ RCU: Critical sections Grace period Barrier
813 rcu_read_unlock synchronize_rcu 819 rcu_read_unlock synchronize_rcu
814 rcu_dereference synchronize_rcu_expedited 820 rcu_dereference synchronize_rcu_expedited
815 call_rcu 821 call_rcu
822 kfree_rcu
816 823
817 824
818bh: Critical sections Grace period Barrier 825bh: Critical sections Grace period Barrier
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index c379a2a6949f..aa0c1e63f050 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -60,8 +60,7 @@ own source tree. For example:
60"dontdiff" is a list of files which are generated by the kernel during 60"dontdiff" is a list of files which are generated by the kernel during
61the build process, and should be ignored in any diff(1)-generated 61the build process, and should be ignored in any diff(1)-generated
62patch. The "dontdiff" file is included in the kernel tree in 62patch. The "dontdiff" file is included in the kernel tree in
632.6.12 and later. For earlier kernel versions, you can get it 632.6.12 and later.
64from <http://www.xenotime.net/linux/doc/dontdiff>.
65 64
66Make sure your patch does not include any extra files which do not 65Make sure your patch does not include any extra files which do not
67belong in a patch submission. Make sure to review your patch -after- 66belong in a patch submission. Make sure to review your patch -after-
diff --git a/Documentation/accounting/getdelays.c b/Documentation/accounting/getdelays.c
index 6f706aca2049..f8ebcde43b17 100644
--- a/Documentation/accounting/getdelays.c
+++ b/Documentation/accounting/getdelays.c
@@ -51,7 +51,6 @@ int dbg;
51int print_delays; 51int print_delays;
52int print_io_accounting; 52int print_io_accounting;
53int print_task_context_switch_counts; 53int print_task_context_switch_counts;
54__u64 stime, utime;
55 54
56#define PRINTF(fmt, arg...) { \ 55#define PRINTF(fmt, arg...) { \
57 if (dbg) { \ 56 if (dbg) { \
diff --git a/Documentation/acpi/enumeration.txt b/Documentation/acpi/enumeration.txt
new file mode 100644
index 000000000000..94a656131885
--- /dev/null
+++ b/Documentation/acpi/enumeration.txt
@@ -0,0 +1,227 @@
1ACPI based device enumeration
2~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3ACPI 5 introduced a set of new resources (UartTSerialBus, I2cSerialBus,
4SpiSerialBus, GpioIo and GpioInt) which can be used in enumerating slave
5devices behind serial bus controllers.
6
7In addition we are starting to see peripherals integrated in the
8SoC/Chipset to appear only in ACPI namespace. These are typically devices
9that are accessed through memory-mapped registers.
10
11In order to support this and re-use the existing drivers as much as
12possible we decided to do following:
13
14 o Devices that have no bus connector resource are represented as
15 platform devices.
16
17 o Devices behind real busses where there is a connector resource
18 are represented as struct spi_device or struct i2c_device
19 (standard UARTs are not busses so there is no struct uart_device).
20
21As both ACPI and Device Tree represent a tree of devices (and their
22resources) this implementation follows the Device Tree way as much as
23possible.
24
25The ACPI implementation enumerates devices behind busses (platform, SPI and
26I2C), creates the physical devices and binds them to their ACPI handle in
27the ACPI namespace.
28
29This means that when ACPI_HANDLE(dev) returns non-NULL the device was
30enumerated from ACPI namespace. This handle can be used to extract other
31device-specific configuration. There is an example of this below.
32
33Platform bus support
34~~~~~~~~~~~~~~~~~~~~
35Since we are using platform devices to represent devices that are not
36connected to any physical bus we only need to implement a platform driver
37for the device and add supported ACPI IDs. If this same IP-block is used on
38some other non-ACPI platform, the driver might work out of the box or needs
39some minor changes.
40
41Adding ACPI support for an existing driver should be pretty
42straightforward. Here is the simplest example:
43
44 #ifdef CONFIG_ACPI
45 static struct acpi_device_id mydrv_acpi_match[] = {
46 /* ACPI IDs here */
47 { }
48 };
49 MODULE_DEVICE_TABLE(acpi, mydrv_acpi_match);
50 #endif
51
52 static struct platform_driver my_driver = {
53 ...
54 .driver = {
55 .acpi_match_table = ACPI_PTR(mydrv_acpi_match),
56 },
57 };
58
59If the driver needs to perform more complex initialization like getting and
60configuring GPIOs it can get its ACPI handle and extract this information
61from ACPI tables.
62
63Currently the kernel is not able to automatically determine from which ACPI
64device it should make the corresponding platform device so we need to add
65the ACPI device explicitly to acpi_platform_device_ids list defined in
66drivers/acpi/acpi_platform.c. This limitation is only for the platform
67devices, SPI and I2C devices are created automatically as described below.
68
69SPI serial bus support
70~~~~~~~~~~~~~~~~~~~~~~
71Slave devices behind SPI bus have SpiSerialBus resource attached to them.
72This is extracted automatically by the SPI core and the slave devices are
73enumerated once spi_register_master() is called by the bus driver.
74
75Here is what the ACPI namespace for a SPI slave might look like:
76
77 Device (EEP0)
78 {
79 Name (_ADR, 1)
80 Name (_CID, Package() {
81 "ATML0025",
82 "AT25",
83 })
84 ...
85 Method (_CRS, 0, NotSerialized)
86 {
87 SPISerialBus(1, PolarityLow, FourWireMode, 8,
88 ControllerInitiated, 1000000, ClockPolarityLow,
89 ClockPhaseFirst, "\\_SB.PCI0.SPI1",)
90 }
91 ...
92
93The SPI device drivers only need to add ACPI IDs in a similar way than with
94the platform device drivers. Below is an example where we add ACPI support
95to at25 SPI eeprom driver (this is meant for the above ACPI snippet):
96
97 #ifdef CONFIG_ACPI
98 static struct acpi_device_id at25_acpi_match[] = {
99 { "AT25", 0 },
100 { },
101 };
102 MODULE_DEVICE_TABLE(acpi, at25_acpi_match);
103 #endif
104
105 static struct spi_driver at25_driver = {
106 .driver = {
107 ...
108 .acpi_match_table = ACPI_PTR(at25_acpi_match),
109 },
110 };
111
112Note that this driver actually needs more information like page size of the
113eeprom etc. but at the time writing this there is no standard way of
114passing those. One idea is to return this in _DSM method like:
115
116 Device (EEP0)
117 {
118 ...
119 Method (_DSM, 4, NotSerialized)
120 {
121 Store (Package (6)
122 {
123 "byte-len", 1024,
124 "addr-mode", 2,
125 "page-size, 32
126 }, Local0)
127
128 // Check UUIDs etc.
129
130 Return (Local0)
131 }
132
133Then the at25 SPI driver can get this configation by calling _DSM on its
134ACPI handle like:
135
136 struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL };
137 struct acpi_object_list input;
138 acpi_status status;
139
140 /* Fill in the input buffer */
141
142 status = acpi_evaluate_object(ACPI_HANDLE(&spi->dev), "_DSM",
143 &input, &output);
144 if (ACPI_FAILURE(status))
145 /* Handle the error */
146
147 /* Extract the data here */
148
149 kfree(output.pointer);
150
151I2C serial bus support
152~~~~~~~~~~~~~~~~~~~~~~
153The slaves behind I2C bus controller only need to add the ACPI IDs like
154with the platform and SPI drivers. However the I2C bus controller driver
155needs to call acpi_i2c_register_devices() after it has added the adapter.
156
157An I2C bus (controller) driver does:
158
159 ...
160 ret = i2c_add_numbered_adapter(adapter);
161 if (ret)
162 /* handle error */
163
164 of_i2c_register_devices(adapter);
165 /* Enumerate the slave devices behind this bus via ACPI */
166 acpi_i2c_register_devices(adapter);
167
168Below is an example of how to add ACPI support to the existing mpu3050
169input driver:
170
171 #ifdef CONFIG_ACPI
172 static struct acpi_device_id mpu3050_acpi_match[] = {
173 { "MPU3050", 0 },
174 { },
175 };
176 MODULE_DEVICE_TABLE(acpi, mpu3050_acpi_match);
177 #endif
178
179 static struct i2c_driver mpu3050_i2c_driver = {
180 .driver = {
181 .name = "mpu3050",
182 .owner = THIS_MODULE,
183 .pm = &mpu3050_pm,
184 .of_match_table = mpu3050_of_match,
185 .acpi_match_table ACPI_PTR(mpu3050_acpi_match),
186 },
187 .probe = mpu3050_probe,
188 .remove = mpu3050_remove,
189 .id_table = mpu3050_ids,
190 };
191
192GPIO support
193~~~~~~~~~~~~
194ACPI 5 introduced two new resources to describe GPIO connections: GpioIo
195and GpioInt. These resources are used be used to pass GPIO numbers used by
196the device to the driver. For example:
197
198 Method (_CRS, 0, NotSerialized)
199 {
200 Name (SBUF, ResourceTemplate()
201 {
202 GpioIo (Exclusive, PullDefault, 0x0000, 0x0000,
203 IoRestrictionOutputOnly, "\\_SB.PCI0.GPI0",
204 0x00, ResourceConsumer,,)
205 {
206 // Pin List
207 0x0055
208 }
209 ...
210
211 Return (SBUF)
212 }
213 }
214
215These GPIO numbers are controller relative and path "\\_SB.PCI0.GPI0"
216specifies the path to the controller. In order to use these GPIOs in Linux
217we need to translate them to the Linux GPIO numbers.
218
219The driver can do this by including <linux/acpi_gpio.h> and then calling
220acpi_get_gpio(path, gpio). This will return the Linux GPIO number or
221negative errno if there was no translation found.
222
223Other GpioIo parameters must be converted first by the driver to be
224suitable to the gpiolib before passing them.
225
226In case of GpioInt resource an additional call to gpio_to_irq() must be
227done before calling request_irq().
diff --git a/Documentation/acpi/initrd_table_override.txt b/Documentation/acpi/initrd_table_override.txt
new file mode 100644
index 000000000000..35c3f5415476
--- /dev/null
+++ b/Documentation/acpi/initrd_table_override.txt
@@ -0,0 +1,94 @@
1Overriding ACPI tables via initrd
2=================================
3
41) Introduction (What is this about)
52) What is this for
63) How does it work
74) References (Where to retrieve userspace tools)
8
91) What is this about
10---------------------
11
12If the ACPI_INITRD_TABLE_OVERRIDE compile option is true, it is possible to
13override nearly any ACPI table provided by the BIOS with an instrumented,
14modified one.
15
16For a full list of ACPI tables that can be overridden, take a look at
17the char *table_sigs[MAX_ACPI_SIGNATURE]; definition in drivers/acpi/osl.c
18All ACPI tables iasl (Intel's ACPI compiler and disassembler) knows should
19be overridable, except:
20 - ACPI_SIG_RSDP (has a signature of 6 bytes)
21 - ACPI_SIG_FACS (does not have an ordinary ACPI table header)
22Both could get implemented as well.
23
24
252) What is this for
26-------------------
27
28Please keep in mind that this is a debug option.
29ACPI tables should not get overridden for productive use.
30If BIOS ACPI tables are overridden the kernel will get tainted with the
31TAINT_OVERRIDDEN_ACPI_TABLE flag.
32Complain to your platform/BIOS vendor if you find a bug which is so sever
33that a workaround is not accepted in the Linux kernel.
34
35Still, it can and should be enabled in any kernel, because:
36 - There is no functional change with not instrumented initrds
37 - It provides a powerful feature to easily debug and test ACPI BIOS table
38 compatibility with the Linux kernel.
39
40
413) How does it work
42-------------------
43
44# Extract the machine's ACPI tables:
45cd /tmp
46acpidump >acpidump
47acpixtract -a acpidump
48# Disassemble, modify and recompile them:
49iasl -d *.dat
50# For example add this statement into a _PRT (PCI Routing Table) function
51# of the DSDT:
52Store("HELLO WORLD", debug)
53iasl -sa dsdt.dsl
54# Add the raw ACPI tables to an uncompressed cpio archive.
55# They must be put into a /kernel/firmware/acpi directory inside the
56# cpio archive.
57# The uncompressed cpio archive must be the first.
58# Other, typically compressed cpio archives, must be
59# concatenated on top of the uncompressed one.
60mkdir -p kernel/firmware/acpi
61cp dsdt.aml kernel/firmware/acpi
62# A maximum of: #define ACPI_OVERRIDE_TABLES 10
63# tables are currently allowed (see osl.c):
64iasl -sa facp.dsl
65iasl -sa ssdt1.dsl
66cp facp.aml kernel/firmware/acpi
67cp ssdt1.aml kernel/firmware/acpi
68# Create the uncompressed cpio archive and concatenate the original initrd
69# on top:
70find kernel | cpio -H newc --create > /boot/instrumented_initrd
71cat /boot/initrd >>/boot/instrumented_initrd
72# reboot with increased acpi debug level, e.g. boot params:
73acpi.debug_level=0x2 acpi.debug_layer=0xFFFFFFFF
74# and check your syslog:
75[ 1.268089] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
76[ 1.272091] [ACPI Debug] String [0x0B] "HELLO WORLD"
77
78iasl is able to disassemble and recompile quite a lot different,
79also static ACPI tables.
80
81
824) Where to retrieve userspace tools
83------------------------------------
84
85iasl and acpixtract are part of Intel's ACPICA project:
86http://acpica.org/
87and should be packaged by distributions (for example in the acpica package
88on SUSE).
89
90acpidump can be found in Len Browns pmtools:
91ftp://kernel.org/pub/linux/kernel/people/lenb/acpi/utils/pmtools/acpidump
92This tool is also part of the acpica package on SUSE.
93Alternatively, used ACPI tables can be retrieved via sysfs in latest kernels:
94/sys/firmware/acpi/tables
diff --git a/Documentation/acpi/scan_handlers.txt b/Documentation/acpi/scan_handlers.txt
new file mode 100644
index 000000000000..3246ccf15992
--- /dev/null
+++ b/Documentation/acpi/scan_handlers.txt
@@ -0,0 +1,77 @@
1ACPI Scan Handlers
2
3Copyright (C) 2012, Intel Corporation
4Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
5
6During system initialization and ACPI-based device hot-add, the ACPI namespace
7is scanned in search of device objects that generally represent various pieces
8of hardware. This causes a struct acpi_device object to be created and
9registered with the driver core for every device object in the ACPI namespace
10and the hierarchy of those struct acpi_device objects reflects the namespace
11layout (i.e. parent device objects in the namespace are represented by parent
12struct acpi_device objects and analogously for their children). Those struct
13acpi_device objects are referred to as "device nodes" in what follows, but they
14should not be confused with struct device_node objects used by the Device Trees
15parsing code (although their role is analogous to the role of those objects).
16
17During ACPI-based device hot-remove device nodes representing pieces of hardware
18being removed are unregistered and deleted.
19
20The core ACPI namespace scanning code in drivers/acpi/scan.c carries out basic
21initialization of device nodes, such as retrieving common configuration
22information from the device objects represented by them and populating them with
23appropriate data, but some of them require additional handling after they have
24been registered. For example, if the given device node represents a PCI host
25bridge, its registration should cause the PCI bus under that bridge to be
26enumerated and PCI devices on that bus to be registered with the driver core.
27Similarly, if the device node represents a PCI interrupt link, it is necessary
28to configure that link so that the kernel can use it.
29
30Those additional configuration tasks usually depend on the type of the hardware
31component represented by the given device node which can be determined on the
32basis of the device node's hardware ID (HID). They are performed by objects
33called ACPI scan handlers represented by the following structure:
34
35struct acpi_scan_handler {
36 const struct acpi_device_id *ids;
37 struct list_head list_node;
38 int (*attach)(struct acpi_device *dev, const struct acpi_device_id *id);
39 void (*detach)(struct acpi_device *dev);
40};
41
42where ids is the list of IDs of device nodes the given handler is supposed to
43take care of, list_node is the hook to the global list of ACPI scan handlers
44maintained by the ACPI core and the .attach() and .detach() callbacks are
45executed, respectively, after registration of new device nodes and before
46unregistration of device nodes the handler attached to previously.
47
48The namespace scanning function, acpi_bus_scan(), first registers all of the
49device nodes in the given namespace scope with the driver core. Then, it tries
50to match a scan handler against each of them using the ids arrays of the
51available scan handlers. If a matching scan handler is found, its .attach()
52callback is executed for the given device node. If that callback returns 1,
53that means that the handler has claimed the device node and is now responsible
54for carrying out any additional configuration tasks related to it. It also will
55be responsible for preparing the device node for unregistration in that case.
56The device node's handler field is then populated with the address of the scan
57handler that has claimed it.
58
59If the .attach() callback returns 0, it means that the device node is not
60interesting to the given scan handler and may be matched against the next scan
61handler in the list. If it returns a (negative) error code, that means that
62the namespace scan should be terminated due to a serious error. The error code
63returned should then reflect the type of the error.
64
65The namespace trimming function, acpi_bus_trim(), first executes .detach()
66callbacks from the scan handlers of all device nodes in the given namespace
67scope (if they have scan handlers). Next, it unregisters all of the device
68nodes in that scope.
69
70ACPI scan handlers can be added to the list maintained by the ACPI core with the
71help of the acpi_scan_add_handler() function taking a pointer to the new scan
72handler as an argument. The order in which scan handlers are added to the list
73is the order in which they are matched against device nodes during namespace
74scans.
75
76All scan handles must be added to the list before acpi_bus_scan() is run for the
77first time and they cannot be removed from it.
diff --git a/Documentation/aoe/aoe.txt b/Documentation/aoe/aoe.txt
index bfc9cb19abcd..c71487d399d1 100644
--- a/Documentation/aoe/aoe.txt
+++ b/Documentation/aoe/aoe.txt
@@ -125,7 +125,9 @@ DRIVER OPTIONS
125 The aoe_deadsecs module parameter determines the maximum number of 125 The aoe_deadsecs module parameter determines the maximum number of
126 seconds that the driver will wait for an AoE device to provide a 126 seconds that the driver will wait for an AoE device to provide a
127 response to an AoE command. After aoe_deadsecs seconds have 127 response to an AoE command. After aoe_deadsecs seconds have
128 elapsed, the AoE device will be marked as "down". 128 elapsed, the AoE device will be marked as "down". A value of zero
129 is supported for testing purposes and makes the aoe driver keep
130 trying AoE commands forever.
129 131
130 The aoe_maxout module parameter has a default of 128. This is the 132 The aoe_maxout module parameter has a default of 128. This is the
131 maximum number of unresponded packets that will be sent to an AoE 133 maximum number of unresponded packets that will be sent to an AoE
diff --git a/Documentation/arm/OMAP/DSS b/Documentation/arm/OMAP/DSS
index a564ceea9e98..4484e021290e 100644
--- a/Documentation/arm/OMAP/DSS
+++ b/Documentation/arm/OMAP/DSS
@@ -285,7 +285,10 @@ FB0 +-- GFX ---- LCD ---- LCD
285Misc notes 285Misc notes
286---------- 286----------
287 287
288OMAP FB allocates the framebuffer memory using the OMAP VRAM allocator. 288OMAP FB allocates the framebuffer memory using the standard dma allocator. You
289can enable Contiguous Memory Allocator (CONFIG_CMA) to improve the dma
290allocator, and if CMA is enabled, you use "cma=" kernel parameter to increase
291the global memory area for CMA.
289 292
290Using DSI DPLL to generate pixel clock it is possible produce the pixel clock 293Using DSI DPLL to generate pixel clock it is possible produce the pixel clock
291of 86.5MHz (max possible), and with that you get 1280x1024@57 output from DVI. 294of 86.5MHz (max possible), and with that you get 1280x1024@57 output from DVI.
@@ -301,11 +304,6 @@ framebuffer parameters.
301Kernel boot arguments 304Kernel boot arguments
302--------------------- 305---------------------
303 306
304vram=<size>[,<physaddr>]
305 - Amount of total VRAM to preallocate and optionally a physical start
306 memory address. For example, "10M". omapfb allocates memory for
307 framebuffers from VRAM.
308
309omapfb.mode=<display>:<mode>[,...] 307omapfb.mode=<display>:<mode>[,...]
310 - Default video mode for specified displays. For example, 308 - Default video mode for specified displays. For example,
311 "dvi:800x400MR-24@60". See drivers/video/modedb.c. 309 "dvi:800x400MR-24@60". See drivers/video/modedb.c.
diff --git a/Documentation/arm/sunxi/README b/Documentation/arm/sunxi/README
new file mode 100644
index 000000000000..87a1e8fb6242
--- /dev/null
+++ b/Documentation/arm/sunxi/README
@@ -0,0 +1,19 @@
1ARM Allwinner SoCs
2==================
3
4This document lists all the ARM Allwinner SoCs that are currently
5supported in mainline by the Linux kernel. This document will also
6provide links to documentation and or datasheet for these SoCs.
7
8SunXi family
9------------
10
11 Flavors:
12 Allwinner A10 (sun4i)
13 Datasheet : http://dl.linux-sunxi.org/A10/A10%20Datasheet%20-%20v1.21%20%282012-04-06%29.pdf
14
15 Allwinner A13 (sun5i)
16 Datasheet : http://dl.linux-sunxi.org/A13/A13%20Datasheet%20-%20v1.12%20%282012-03-29%29.pdf
17
18 Core: Cortex A8
19 Linux kernel mach directory: arch/arm/mach-sunxi \ No newline at end of file
diff --git a/Documentation/arm64/memory.txt b/Documentation/arm64/memory.txt
index dbbdcbba75a3..5f583af0a6e1 100644
--- a/Documentation/arm64/memory.txt
+++ b/Documentation/arm64/memory.txt
@@ -27,21 +27,23 @@ Start End Size Use
27----------------------------------------------------------------------- 27-----------------------------------------------------------------------
280000000000000000 0000007fffffffff 512GB user 280000000000000000 0000007fffffffff 512GB user
29 29
30ffffff8000000000 ffffffbbfffcffff ~240GB vmalloc 30ffffff8000000000 ffffffbbfffeffff ~240GB vmalloc
31 31
32ffffffbbfffd0000 ffffffbcfffdffff 64KB [guard page] 32ffffffbbffff0000 ffffffbbffffffff 64KB [guard page]
33 33
34ffffffbbfffe0000 ffffffbcfffeffff 64KB PCI I/O space 34ffffffbc00000000 ffffffbdffffffff 8GB vmemmap
35 35
36ffffffbbffff0000 ffffffbcffffffff 64KB [guard page] 36ffffffbe00000000 ffffffbffbbfffff ~8GB [guard, future vmmemap]
37 37
38ffffffbc00000000 ffffffbdffffffff 8GB vmemmap 38ffffffbffbc00000 ffffffbffbdfffff 2MB earlyprintk device
39
40ffffffbffbe00000 ffffffbffbe0ffff 64KB PCI I/O space
39 41
40ffffffbe00000000 ffffffbffbffffff ~8GB [guard, future vmmemap] 42ffffffbbffff0000 ffffffbcffffffff ~2MB [guard]
41 43
42ffffffbffc000000 ffffffbfffffffff 64MB modules 44ffffffbffc000000 ffffffbfffffffff 64MB modules
43 45
44ffffffc000000000 ffffffffffffffff 256GB memory 46ffffffc000000000 ffffffffffffffff 256GB kernel logical memory map
45 47
46 48
47Translation table lookup with 4KB pages: 49Translation table lookup with 4KB pages:
diff --git a/Documentation/atomic_ops.txt b/Documentation/atomic_ops.txt
index 27f2b21a9d5c..d9ca5be9b471 100644
--- a/Documentation/atomic_ops.txt
+++ b/Documentation/atomic_ops.txt
@@ -253,6 +253,8 @@ This performs an atomic exchange operation on the atomic variable v, setting
253the given new value. It returns the old value that the atomic variable v had 253the given new value. It returns the old value that the atomic variable v had
254just before the operation. 254just before the operation.
255 255
256atomic_xchg requires explicit memory barriers around the operation.
257
256 int atomic_cmpxchg(atomic_t *v, int old, int new); 258 int atomic_cmpxchg(atomic_t *v, int old, int new);
257 259
258This performs an atomic compare exchange operation on the atomic value v, 260This performs an atomic compare exchange operation on the atomic value v,
diff --git a/Documentation/backlight/lp855x-driver.txt b/Documentation/backlight/lp855x-driver.txt
index f5e4caafab7d..18b06ca038ea 100644
--- a/Documentation/backlight/lp855x-driver.txt
+++ b/Documentation/backlight/lp855x-driver.txt
@@ -4,7 +4,7 @@ Kernel driver lp855x
4Backlight driver for LP855x ICs 4Backlight driver for LP855x ICs
5 5
6Supported chips: 6Supported chips:
7 Texas Instruments LP8550, LP8551, LP8552, LP8553 and LP8556 7 Texas Instruments LP8550, LP8551, LP8552, LP8553, LP8556 and LP8557
8 8
9Author: Milo(Woogyom) Kim <milo.kim@ti.com> 9Author: Milo(Woogyom) Kim <milo.kim@ti.com>
10 10
@@ -24,7 +24,7 @@ Value : pwm based or register based
24 24
252) chip_id 252) chip_id
26The lp855x chip id. 26The lp855x chip id.
27Value : lp8550/lp8551/lp8552/lp8553/lp8556 27Value : lp8550/lp8551/lp8552/lp8553/lp8556/lp8557
28 28
29Platform data for lp855x 29Platform data for lp855x
30------------------------ 30------------------------
@@ -35,11 +35,8 @@ For supporting platform specific data, the lp855x platform data can be used.
35* mode : Brightness control mode. PWM or register based. 35* mode : Brightness control mode. PWM or register based.
36* device_control : Value of DEVICE CONTROL register. 36* device_control : Value of DEVICE CONTROL register.
37* initial_brightness : Initial value of backlight brightness. 37* initial_brightness : Initial value of backlight brightness.
38* pwm_data : Platform specific pwm generation functions. 38* period_ns : Platform specific PWM period value. unit is nano.
39 Only valid when brightness is pwm input mode. 39 Only valid when brightness is pwm input mode.
40 Functions should be implemented by PWM driver.
41 - pwm_set_intensity() : set duty of PWM
42 - pwm_get_intensity() : get current duty of PWM
43* load_new_rom_data : 40* load_new_rom_data :
44 0 : use default configuration data 41 0 : use default configuration data
45 1 : update values of eeprom or eprom registers on loading driver 42 1 : update values of eeprom or eprom registers on loading driver
@@ -71,8 +68,5 @@ static struct lp855x_platform_data lp8556_pdata = {
71 .mode = PWM_BASED, 68 .mode = PWM_BASED,
72 .device_control = PWM_CONFIG(LP8556), 69 .device_control = PWM_CONFIG(LP8556),
73 .initial_brightness = INITIAL_BRT, 70 .initial_brightness = INITIAL_BRT,
74 .pwm_data = { 71 .period_ns = 1000000,
75 .pwm_set_intensity = platform_pwm_set_intensity,
76 .pwm_get_intensity = platform_pwm_get_intensity,
77 },
78}; 72};
diff --git a/Documentation/block/cfq-iosched.txt b/Documentation/block/cfq-iosched.txt
index d89b4fe724d7..a5eb7d19a65d 100644
--- a/Documentation/block/cfq-iosched.txt
+++ b/Documentation/block/cfq-iosched.txt
@@ -102,6 +102,64 @@ processing of request. Therefore, increasing the value can imporve the
102performace although this can cause the latency of some I/O to increase due 102performace although this can cause the latency of some I/O to increase due
103to more number of requests. 103to more number of requests.
104 104
105CFQ Group scheduling
106====================
107
108CFQ supports blkio cgroup and has "blkio." prefixed files in each
109blkio cgroup directory. It is weight-based and there are four knobs
110for configuration - weight[_device] and leaf_weight[_device].
111Internal cgroup nodes (the ones with children) can also have tasks in
112them, so the former two configure how much proportion the cgroup as a
113whole is entitled to at its parent's level while the latter two
114configure how much proportion the tasks in the cgroup have compared to
115its direct children.
116
117Another way to think about it is assuming that each internal node has
118an implicit leaf child node which hosts all the tasks whose weight is
119configured by leaf_weight[_device]. Let's assume a blkio hierarchy
120composed of five cgroups - root, A, B, AA and AB - with the following
121weights where the names represent the hierarchy.
122
123 weight leaf_weight
124 root : 125 125
125 A : 500 750
126 B : 250 500
127 AA : 500 500
128 AB : 1000 500
129
130root never has a parent making its weight is meaningless. For backward
131compatibility, weight is always kept in sync with leaf_weight. B, AA
132and AB have no child and thus its tasks have no children cgroup to
133compete with. They always get 100% of what the cgroup won at the
134parent level. Considering only the weights which matter, the hierarchy
135looks like the following.
136
137 root
138 / | \
139 A B leaf
140 500 250 125
141 / | \
142 AA AB leaf
143 500 1000 750
144
145If all cgroups have active IOs and competing with each other, disk
146time will be distributed like the following.
147
148Distribution below root. The total active weight at this level is
149A:500 + B:250 + C:125 = 875.
150
151 root-leaf : 125 / 875 =~ 14%
152 A : 500 / 875 =~ 57%
153 B(-leaf) : 250 / 875 =~ 28%
154
155A has children and further distributes its 57% among the children and
156the implicit leaf node. The total active weight at this level is
157AA:500 + AB:1000 + A-leaf:750 = 2250.
158
159 A-leaf : ( 750 / 2250) * A =~ 19%
160 AA(-leaf) : ( 500 / 2250) * A =~ 12%
161 AB(-leaf) : (1000 / 2250) * A =~ 25%
162
105CFQ IOPS Mode for group scheduling 163CFQ IOPS Mode for group scheduling
106=================================== 164===================================
107Basic CFQ design is to provide priority based time slices. Higher priority 165Basic CFQ design is to provide priority based time slices. Higher priority
diff --git a/Documentation/blockdev/nbd.txt b/Documentation/blockdev/nbd.txt
index aeb93ffe6416..271e607304da 100644
--- a/Documentation/blockdev/nbd.txt
+++ b/Documentation/blockdev/nbd.txt
@@ -4,43 +4,13 @@
4 can use a remote server as one of its block devices. So every time 4 can use a remote server as one of its block devices. So every time
5 the client computer wants to read, e.g., /dev/nb0, it sends a 5 the client computer wants to read, e.g., /dev/nb0, it sends a
6 request over TCP to the server, which will reply with the data read. 6 request over TCP to the server, which will reply with the data read.
7 This can be used for stations with low disk space (or even diskless - 7 This can be used for stations with low disk space (or even diskless)
8 if you boot from floppy) to borrow disk space from another computer. 8 to borrow disk space from another computer.
9 Unlike NFS, it is possible to put any filesystem on it, etc. It should 9 Unlike NFS, it is possible to put any filesystem on it, etc.
10 even be possible to use NBD as a root filesystem (I've never tried), 10
11 but it requires a user-level program to be in the initrd to start.
12 It also allows you to run block-device in user land (making server
13 and client physically the same computer, communicating using loopback).
14
15 Current state: It currently works. Network block device is stable.
16 I originally thought that it was impossible to swap over TCP. It
17 turned out not to be true - swapping over TCP now works and seems
18 to be deadlock-free, but it requires heavy patches into Linux's
19 network layer.
20
21 For more information, or to download the nbd-client and nbd-server 11 For more information, or to download the nbd-client and nbd-server
22 tools, go to http://nbd.sf.net/. 12 tools, go to http://nbd.sf.net/.
23 13
24 Howto: To setup nbd, you can simply do the following:
25
26 First, serve a device or file from a remote server:
27
28 nbd-server <port-number> <device-or-file-to-serve-to-client>
29
30 e.g.,
31 root@server1 # nbd-server 1234 /dev/sdb1
32
33 (serves sdb1 partition on TCP port 1234)
34
35 Then, on the local (client) system:
36
37 nbd-client <server-name-or-IP> <server-port-number> /dev/nb[0-n]
38
39 e.g.,
40 root@client1 # nbd-client server1 1234 /dev/nb0
41
42 (creates the nb0 device on client1)
43
44 The nbd kernel module need only be installed on the client 14 The nbd kernel module need only be installed on the client
45 system, as the nbd-server is completely in userspace. In fact, 15 system, as the nbd-server is completely in userspace. In fact,
46 the nbd-server has been successfully ported to other operating 16 the nbd-server has been successfully ported to other operating
diff --git a/Documentation/bus-devices/ti-gpmc.txt b/Documentation/bus-devices/ti-gpmc.txt
new file mode 100644
index 000000000000..cc9ce57e0a26
--- /dev/null
+++ b/Documentation/bus-devices/ti-gpmc.txt
@@ -0,0 +1,122 @@
1GPMC (General Purpose Memory Controller):
2=========================================
3
4GPMC is an unified memory controller dedicated to interfacing external
5memory devices like
6 * Asynchronous SRAM like memories and application specific integrated
7 circuit devices.
8 * Asynchronous, synchronous, and page mode burst NOR flash devices
9 NAND flash
10 * Pseudo-SRAM devices
11
12GPMC is found on Texas Instruments SoC's (OMAP based)
13IP details: http://www.ti.com/lit/pdf/spruh73 section 7.1
14
15
16GPMC generic timing calculation:
17================================
18
19GPMC has certain timings that has to be programmed for proper
20functioning of the peripheral, while peripheral has another set of
21timings. To have peripheral work with gpmc, peripheral timings has to
22be translated to the form gpmc can understand. The way it has to be
23translated depends on the connected peripheral. Also there is a
24dependency for certain gpmc timings on gpmc clock frequency. Hence a
25generic timing routine was developed to achieve above requirements.
26
27Generic routine provides a generic method to calculate gpmc timings
28from gpmc peripheral timings. struct gpmc_device_timings fields has to
29be updated with timings from the datasheet of the peripheral that is
30connected to gpmc. A few of the peripheral timings can be fed either
31in time or in cycles, provision to handle this scenario has been
32provided (refer struct gpmc_device_timings definition). It may so
33happen that timing as specified by peripheral datasheet is not present
34in timing structure, in this scenario, try to correlate peripheral
35timing to the one available. If that doesn't work, try to add a new
36field as required by peripheral, educate generic timing routine to
37handle it, make sure that it does not break any of the existing.
38Then there may be cases where peripheral datasheet doesn't mention
39certain fields of struct gpmc_device_timings, zero those entries.
40
41Generic timing routine has been verified to work properly on
42multiple onenand's and tusb6010 peripherals.
43
44A word of caution: generic timing routine has been developed based
45on understanding of gpmc timings, peripheral timings, available
46custom timing routines, a kind of reverse engineering without
47most of the datasheets & hardware (to be exact none of those supported
48in mainline having custom timing routine) and by simulation.
49
50gpmc timing dependency on peripheral timings:
51[<gpmc_timing>: <peripheral timing1>, <peripheral timing2> ...]
52
531. common
54cs_on: t_ceasu
55adv_on: t_avdasu, t_ceavd
56
572. sync common
58sync_clk: clk
59page_burst_access: t_bacc
60clk_activation: t_ces, t_avds
61
623. read async muxed
63adv_rd_off: t_avdp_r
64oe_on: t_oeasu, t_aavdh
65access: t_iaa, t_oe, t_ce, t_aa
66rd_cycle: t_rd_cycle, t_cez_r, t_oez
67
684. read async non-muxed
69adv_rd_off: t_avdp_r
70oe_on: t_oeasu
71access: t_iaa, t_oe, t_ce, t_aa
72rd_cycle: t_rd_cycle, t_cez_r, t_oez
73
745. read sync muxed
75adv_rd_off: t_avdp_r, t_avdh
76oe_on: t_oeasu, t_ach, cyc_aavdh_oe
77access: t_iaa, cyc_iaa, cyc_oe
78rd_cycle: t_cez_r, t_oez, t_ce_rdyz
79
806. read sync non-muxed
81adv_rd_off: t_avdp_r
82oe_on: t_oeasu
83access: t_iaa, cyc_iaa, cyc_oe
84rd_cycle: t_cez_r, t_oez, t_ce_rdyz
85
867. write async muxed
87adv_wr_off: t_avdp_w
88we_on, wr_data_mux_bus: t_weasu, t_aavdh, cyc_aavhd_we
89we_off: t_wpl
90cs_wr_off: t_wph
91wr_cycle: t_cez_w, t_wr_cycle
92
938. write async non-muxed
94adv_wr_off: t_avdp_w
95we_on, wr_data_mux_bus: t_weasu
96we_off: t_wpl
97cs_wr_off: t_wph
98wr_cycle: t_cez_w, t_wr_cycle
99
1009. write sync muxed
101adv_wr_off: t_avdp_w, t_avdh
102we_on, wr_data_mux_bus: t_weasu, t_rdyo, t_aavdh, cyc_aavhd_we
103we_off: t_wpl, cyc_wpl
104cs_wr_off: t_wph
105wr_cycle: t_cez_w, t_ce_rdyz
106
10710. write sync non-muxed
108adv_wr_off: t_avdp_w
109we_on, wr_data_mux_bus: t_weasu, t_rdyo
110we_off: t_wpl, cyc_wpl
111cs_wr_off: t_wph
112wr_cycle: t_cez_w, t_ce_rdyz
113
114
115Note: Many of gpmc timings are dependent on other gpmc timings (a few
116gpmc timings purely dependent on other gpmc timings, a reason that
117some of the gpmc timings are missing above), and it will result in
118indirect dependency of peripheral timings to gpmc timings other than
119mentioned above, refer timing routine for more details. To know what
120these peripheral timings correspond to, please see explanations in
121struct gpmc_device_timings definition. And for gpmc timings refer
122IP details (link above).
diff --git a/Documentation/cgroups/00-INDEX b/Documentation/cgroups/00-INDEX
index 3f58fa3d6d00..f5635a09c3f6 100644
--- a/Documentation/cgroups/00-INDEX
+++ b/Documentation/cgroups/00-INDEX
@@ -1,5 +1,7 @@
100-INDEX 100-INDEX
2 - this file 2 - this file
3blkio-controller.txt
4 - Description for Block IO Controller, implementation and usage details.
3cgroups.txt 5cgroups.txt
4 - Control Groups definition, implementation details, examples and API. 6 - Control Groups definition, implementation details, examples and API.
5cpuacct.txt 7cpuacct.txt
@@ -10,9 +12,13 @@ devices.txt
10 - Device Whitelist Controller; description, interface and security. 12 - Device Whitelist Controller; description, interface and security.
11freezer-subsystem.txt 13freezer-subsystem.txt
12 - checkpointing; rationale to not use signals, interface. 14 - checkpointing; rationale to not use signals, interface.
15hugetlb.txt
16 - HugeTLB Controller implementation and usage details.
13memcg_test.txt 17memcg_test.txt
14 - Memory Resource Controller; implementation details. 18 - Memory Resource Controller; implementation details.
15memory.txt 19memory.txt
16 - Memory Resource Controller; design, accounting, interface, testing. 20 - Memory Resource Controller; design, accounting, interface, testing.
21net_prio.txt
22 - Network priority cgroups details and usages.
17resource_counter.txt 23resource_counter.txt
18 - Resource Counter API. 24 - Resource Counter API.
diff --git a/Documentation/cgroups/blkio-controller.txt b/Documentation/cgroups/blkio-controller.txt
index b4b1fb3a83f0..da272c8f44e7 100644
--- a/Documentation/cgroups/blkio-controller.txt
+++ b/Documentation/cgroups/blkio-controller.txt
@@ -75,7 +75,7 @@ Throttling/Upper Limit policy
75 mount -t cgroup -o blkio none /sys/fs/cgroup/blkio 75 mount -t cgroup -o blkio none /sys/fs/cgroup/blkio
76 76
77- Specify a bandwidth rate on particular device for root group. The format 77- Specify a bandwidth rate on particular device for root group. The format
78 for policy is "<major>:<minor> <byes_per_second>". 78 for policy is "<major>:<minor> <bytes_per_second>".
79 79
80 echo "8:16 1048576" > /sys/fs/cgroup/blkio/blkio.throttle.read_bps_device 80 echo "8:16 1048576" > /sys/fs/cgroup/blkio/blkio.throttle.read_bps_device
81 81
@@ -94,13 +94,11 @@ Throttling/Upper Limit policy
94 94
95Hierarchical Cgroups 95Hierarchical Cgroups
96==================== 96====================
97- Currently none of the IO control policy supports hierarchical groups. But 97- Currently only CFQ supports hierarchical groups. For throttling,
98 cgroup interface does allow creation of hierarchical cgroups and internally 98 cgroup interface does allow creation of hierarchical cgroups and
99 IO policies treat them as flat hierarchy. 99 internally it treats them as flat hierarchy.
100 100
101 So this patch will allow creation of cgroup hierarchcy but at the backend 101 If somebody created a hierarchy like as follows.
102 everything will be treated as flat. So if somebody created a hierarchy like
103 as follows.
104 102
105 root 103 root
106 / \ 104 / \
@@ -108,16 +106,20 @@ Hierarchical Cgroups
108 | 106 |
109 test3 107 test3
110 108
111 CFQ and throttling will practically treat all groups at same level. 109 CFQ will handle the hierarchy correctly but and throttling will
110 practically treat all groups at same level. For details on CFQ
111 hierarchy support, refer to Documentation/block/cfq-iosched.txt.
112 Throttling will treat the hierarchy as if it looks like the
113 following.
112 114
113 pivot 115 pivot
114 / / \ \ 116 / / \ \
115 root test1 test2 test3 117 root test1 test2 test3
116 118
117 Down the line we can implement hierarchical accounting/control support 119 Nesting cgroups, while allowed, isn't officially supported and blkio
118 and also introduce a new cgroup file "use_hierarchy" which will control 120 genereates warning when cgroups nest. Once throttling implements
119 whether cgroup hierarchy is viewed as flat or hierarchical by the policy.. 121 hierarchy support, hierarchy will be supported and the warning will
120 This is how memory controller also has implemented the things. 122 be removed.
121 123
122Various user visible config options 124Various user visible config options
123=================================== 125===================================
@@ -172,6 +174,12 @@ Proportional weight policy files
172 dev weight 174 dev weight
173 8:16 300 175 8:16 300
174 176
177- blkio.leaf_weight[_device]
178 - Equivalents of blkio.weight[_device] for the purpose of
179 deciding how much weight tasks in the given cgroup has while
180 competing with the cgroup's child cgroups. For details,
181 please refer to Documentation/block/cfq-iosched.txt.
182
175- blkio.time 183- blkio.time
176 - disk time allocated to cgroup per device in milliseconds. First 184 - disk time allocated to cgroup per device in milliseconds. First
177 two fields specify the major and minor number of the device and 185 two fields specify the major and minor number of the device and
@@ -279,6 +287,11 @@ Proportional weight policy files
279 and minor number of the device and third field specifies the number 287 and minor number of the device and third field specifies the number
280 of times a group was dequeued from a particular device. 288 of times a group was dequeued from a particular device.
281 289
290- blkio.*_recursive
291 - Recursive version of various stats. These files show the
292 same information as their non-recursive counterparts but
293 include stats from all the descendant cgroups.
294
282Throttling/Upper limit policy files 295Throttling/Upper limit policy files
283----------------------------------- 296-----------------------------------
284- blkio.throttle.read_bps_device 297- blkio.throttle.read_bps_device
diff --git a/Documentation/cgroups/cgroup_event_listener.c b/Documentation/cgroups/cgroup_event_listener.c
deleted file mode 100644
index 3e082f96dc12..000000000000
--- a/Documentation/cgroups/cgroup_event_listener.c
+++ /dev/null
@@ -1,110 +0,0 @@
1/*
2 * cgroup_event_listener.c - Simple listener of cgroup events
3 *
4 * Copyright (C) Kirill A. Shutemov <kirill@shutemov.name>
5 */
6
7#include <assert.h>
8#include <errno.h>
9#include <fcntl.h>
10#include <libgen.h>
11#include <limits.h>
12#include <stdio.h>
13#include <string.h>
14#include <unistd.h>
15
16#include <sys/eventfd.h>
17
18#define USAGE_STR "Usage: cgroup_event_listener <path-to-control-file> <args>\n"
19
20int main(int argc, char **argv)
21{
22 int efd = -1;
23 int cfd = -1;
24 int event_control = -1;
25 char event_control_path[PATH_MAX];
26 char line[LINE_MAX];
27 int ret;
28
29 if (argc != 3) {
30 fputs(USAGE_STR, stderr);
31 return 1;
32 }
33
34 cfd = open(argv[1], O_RDONLY);
35 if (cfd == -1) {
36 fprintf(stderr, "Cannot open %s: %s\n", argv[1],
37 strerror(errno));
38 goto out;
39 }
40
41 ret = snprintf(event_control_path, PATH_MAX, "%s/cgroup.event_control",
42 dirname(argv[1]));
43 if (ret >= PATH_MAX) {
44 fputs("Path to cgroup.event_control is too long\n", stderr);
45 goto out;
46 }
47
48 event_control = open(event_control_path, O_WRONLY);
49 if (event_control == -1) {
50 fprintf(stderr, "Cannot open %s: %s\n", event_control_path,
51 strerror(errno));
52 goto out;
53 }
54
55 efd = eventfd(0, 0);
56 if (efd == -1) {
57 perror("eventfd() failed");
58 goto out;
59 }
60
61 ret = snprintf(line, LINE_MAX, "%d %d %s", efd, cfd, argv[2]);
62 if (ret >= LINE_MAX) {
63 fputs("Arguments string is too long\n", stderr);
64 goto out;
65 }
66
67 ret = write(event_control, line, strlen(line) + 1);
68 if (ret == -1) {
69 perror("Cannot write to cgroup.event_control");
70 goto out;
71 }
72
73 while (1) {
74 uint64_t result;
75
76 ret = read(efd, &result, sizeof(result));
77 if (ret == -1) {
78 if (errno == EINTR)
79 continue;
80 perror("Cannot read from eventfd");
81 break;
82 }
83 assert(ret == sizeof(result));
84
85 ret = access(event_control_path, W_OK);
86 if ((ret == -1) && (errno == ENOENT)) {
87 puts("The cgroup seems to have removed.");
88 ret = 0;
89 break;
90 }
91
92 if (ret == -1) {
93 perror("cgroup.event_control "
94 "is not accessible any more");
95 break;
96 }
97
98 printf("%s %s: crossed\n", argv[1], argv[2]);
99 }
100
101out:
102 if (efd >= 0)
103 close(efd);
104 if (event_control >= 0)
105 close(event_control);
106 if (cfd >= 0)
107 close(cfd);
108
109 return (ret != 0);
110}
diff --git a/Documentation/cgroups/cgroups.txt b/Documentation/cgroups/cgroups.txt
index 9e04196c4d78..bcf1a00b06a1 100644
--- a/Documentation/cgroups/cgroups.txt
+++ b/Documentation/cgroups/cgroups.txt
@@ -299,11 +299,9 @@ a cgroup hierarchy's release_agent path is empty.
2991.5 What does clone_children do ? 2991.5 What does clone_children do ?
300--------------------------------- 300---------------------------------
301 301
302If the clone_children flag is enabled (1) in a cgroup, then all 302This flag only affects the cpuset controller. If the clone_children
303cgroups created beneath will call the post_clone callbacks for each 303flag is enabled (1) in a cgroup, a new cpuset cgroup will copy its
304subsystem of the newly created cgroup. Usually when this callback is 304configuration from the parent during initialization.
305implemented for a subsystem, it copies the values of the parent
306subsystem, this is the case for the cpuset.
307 305
3081.6 How do I use cgroups ? 3061.6 How do I use cgroups ?
309-------------------------- 307--------------------------
@@ -553,16 +551,16 @@ call to cgroup_unload_subsys(). It should also set its_subsys.module =
553THIS_MODULE in its .c file. 551THIS_MODULE in its .c file.
554 552
555Each subsystem may export the following methods. The only mandatory 553Each subsystem may export the following methods. The only mandatory
556methods are create/destroy. Any others that are null are presumed to 554methods are css_alloc/free. Any others that are null are presumed to
557be successful no-ops. 555be successful no-ops.
558 556
559struct cgroup_subsys_state *create(struct cgroup *cgrp) 557struct cgroup_subsys_state *css_alloc(struct cgroup *cgrp)
560(cgroup_mutex held by caller) 558(cgroup_mutex held by caller)
561 559
562Called to create a subsystem state object for a cgroup. The 560Called to allocate a subsystem state object for a cgroup. The
563subsystem should allocate its subsystem state object for the passed 561subsystem should allocate its subsystem state object for the passed
564cgroup, returning a pointer to the new object on success or a 562cgroup, returning a pointer to the new object on success or a
565negative error code. On success, the subsystem pointer should point to 563ERR_PTR() value. On success, the subsystem pointer should point to
566a structure of type cgroup_subsys_state (typically embedded in a 564a structure of type cgroup_subsys_state (typically embedded in a
567larger subsystem-specific object), which will be initialized by the 565larger subsystem-specific object), which will be initialized by the
568cgroup system. Note that this will be called at initialization to 566cgroup system. Note that this will be called at initialization to
@@ -571,24 +569,33 @@ identified by the passed cgroup object having a NULL parent (since
571it's the root of the hierarchy) and may be an appropriate place for 569it's the root of the hierarchy) and may be an appropriate place for
572initialization code. 570initialization code.
573 571
574void destroy(struct cgroup *cgrp) 572int css_online(struct cgroup *cgrp)
575(cgroup_mutex held by caller) 573(cgroup_mutex held by caller)
576 574
577The cgroup system is about to destroy the passed cgroup; the subsystem 575Called after @cgrp successfully completed all allocations and made
578should do any necessary cleanup and free its subsystem state 576visible to cgroup_for_each_child/descendant_*() iterators. The
579object. By the time this method is called, the cgroup has already been 577subsystem may choose to fail creation by returning -errno. This
580unlinked from the file system and from the child list of its parent; 578callback can be used to implement reliable state sharing and
581cgroup->parent is still valid. (Note - can also be called for a 579propagation along the hierarchy. See the comment on
582newly-created cgroup if an error occurs after this subsystem's 580cgroup_for_each_descendant_pre() for details.
583create() method has been called for the new cgroup).
584 581
585int pre_destroy(struct cgroup *cgrp); 582void css_offline(struct cgroup *cgrp);
586 583
587Called before checking the reference count on each subsystem. This may 584This is the counterpart of css_online() and called iff css_online()
588be useful for subsystems which have some extra references even if 585has succeeded on @cgrp. This signifies the beginning of the end of
589there are not tasks in the cgroup. If pre_destroy() returns error code, 586@cgrp. @cgrp is being removed and the subsystem should start dropping
590rmdir() will fail with it. From this behavior, pre_destroy() can be 587all references it's holding on @cgrp. When all references are dropped,
591called multiple times against a cgroup. 588cgroup removal will proceed to the next step - css_free(). After this
589callback, @cgrp should be considered dead to the subsystem.
590
591void css_free(struct cgroup *cgrp)
592(cgroup_mutex held by caller)
593
594The cgroup system is about to free @cgrp; the subsystem should free
595its subsystem state object. By the time this method is called, @cgrp
596is completely unused; @cgrp->parent is still valid. (Note - can also
597be called for a newly-created cgroup if an error occurs after this
598subsystem's create() method has been called for the new cgroup).
592 599
593int can_attach(struct cgroup *cgrp, struct cgroup_taskset *tset) 600int can_attach(struct cgroup *cgrp, struct cgroup_taskset *tset)
594(cgroup_mutex held by caller) 601(cgroup_mutex held by caller)
@@ -635,14 +642,6 @@ void exit(struct task_struct *task)
635 642
636Called during task exit. 643Called during task exit.
637 644
638void post_clone(struct cgroup *cgrp)
639(cgroup_mutex held by caller)
640
641Called during cgroup_create() to do any parameter
642initialization which might be required before a task could attach. For
643example, in cpusets, no task may attach before 'cpus' and 'mems' are set
644up.
645
646void bind(struct cgroup *root) 645void bind(struct cgroup *root)
647(cgroup_mutex held by caller) 646(cgroup_mutex held by caller)
648 647
diff --git a/Documentation/cgroups/cpusets.txt b/Documentation/cgroups/cpusets.txt
index cefd3d8bbd11..12e01d432bfe 100644
--- a/Documentation/cgroups/cpusets.txt
+++ b/Documentation/cgroups/cpusets.txt
@@ -218,7 +218,7 @@ and name space for cpusets, with a minimum of additional kernel code.
218The cpus and mems files in the root (top_cpuset) cpuset are 218The cpus and mems files in the root (top_cpuset) cpuset are
219read-only. The cpus file automatically tracks the value of 219read-only. The cpus file automatically tracks the value of
220cpu_online_mask using a CPU hotplug notifier, and the mems file 220cpu_online_mask using a CPU hotplug notifier, and the mems file
221automatically tracks the value of node_states[N_HIGH_MEMORY]--i.e., 221automatically tracks the value of node_states[N_MEMORY]--i.e.,
222nodes with memory--using the cpuset_track_online_nodes() hook. 222nodes with memory--using the cpuset_track_online_nodes() hook.
223 223
224 224
diff --git a/Documentation/cgroups/freezer-subsystem.txt b/Documentation/cgroups/freezer-subsystem.txt
index 7e62de1e59ff..c96a72cbb30a 100644
--- a/Documentation/cgroups/freezer-subsystem.txt
+++ b/Documentation/cgroups/freezer-subsystem.txt
@@ -49,13 +49,49 @@ prevent the freeze/unfreeze cycle from becoming visible to the tasks
49being frozen. This allows the bash example above and gdb to run as 49being frozen. This allows the bash example above and gdb to run as
50expected. 50expected.
51 51
52The freezer subsystem in the container filesystem defines a file named 52The cgroup freezer is hierarchical. Freezing a cgroup freezes all
53freezer.state. Writing "FROZEN" to the state file will freeze all tasks in the 53tasks beloning to the cgroup and all its descendant cgroups. Each
54cgroup. Subsequently writing "THAWED" will unfreeze the tasks in the cgroup. 54cgroup has its own state (self-state) and the state inherited from the
55Reading will return the current state. 55parent (parent-state). Iff both states are THAWED, the cgroup is
56THAWED.
56 57
57Note freezer.state doesn't exist in root cgroup, which means root cgroup 58The following cgroupfs files are created by cgroup freezer.
58is non-freezable. 59
60* freezer.state: Read-write.
61
62 When read, returns the effective state of the cgroup - "THAWED",
63 "FREEZING" or "FROZEN". This is the combined self and parent-states.
64 If any is freezing, the cgroup is freezing (FREEZING or FROZEN).
65
66 FREEZING cgroup transitions into FROZEN state when all tasks
67 belonging to the cgroup and its descendants become frozen. Note that
68 a cgroup reverts to FREEZING from FROZEN after a new task is added
69 to the cgroup or one of its descendant cgroups until the new task is
70 frozen.
71
72 When written, sets the self-state of the cgroup. Two values are
73 allowed - "FROZEN" and "THAWED". If FROZEN is written, the cgroup,
74 if not already freezing, enters FREEZING state along with all its
75 descendant cgroups.
76
77 If THAWED is written, the self-state of the cgroup is changed to
78 THAWED. Note that the effective state may not change to THAWED if
79 the parent-state is still freezing. If a cgroup's effective state
80 becomes THAWED, all its descendants which are freezing because of
81 the cgroup also leave the freezing state.
82
83* freezer.self_freezing: Read only.
84
85 Shows the self-state. 0 if the self-state is THAWED; otherwise, 1.
86 This value is 1 iff the last write to freezer.state was "FROZEN".
87
88* freezer.parent_freezing: Read only.
89
90 Shows the parent-state. 0 if none of the cgroup's ancestors is
91 frozen; otherwise, 1.
92
93The root cgroup is non-freezable and the above interface files don't
94exist.
59 95
60* Examples of usage : 96* Examples of usage :
61 97
@@ -85,18 +121,3 @@ to unfreeze all tasks in the container :
85 121
86This is the basic mechanism which should do the right thing for user space task 122This is the basic mechanism which should do the right thing for user space task
87in a simple scenario. 123in a simple scenario.
88
89It's important to note that freezing can be incomplete. In that case we return
90EBUSY. This means that some tasks in the cgroup are busy doing something that
91prevents us from completely freezing the cgroup at this time. After EBUSY,
92the cgroup will remain partially frozen -- reflected by freezer.state reporting
93"FREEZING" when read. The state will remain "FREEZING" until one of these
94things happens:
95
96 1) Userspace cancels the freezing operation by writing "THAWED" to
97 the freezer.state file
98 2) Userspace retries the freezing operation by writing "FROZEN" to
99 the freezer.state file (writing "FREEZING" is not legal
100 and returns EINVAL)
101 3) The tasks that blocked the cgroup from entering the "FROZEN"
102 state disappear from the cgroup's set of tasks.
diff --git a/Documentation/cgroups/memcg_test.txt b/Documentation/cgroups/memcg_test.txt
index fc8fa97a09ac..ce94a83a7d9a 100644
--- a/Documentation/cgroups/memcg_test.txt
+++ b/Documentation/cgroups/memcg_test.txt
@@ -399,8 +399,7 @@ Under below explanation, we assume CONFIG_MEM_RES_CTRL_SWAP=y.
399 399
400 9.10 Memory thresholds 400 9.10 Memory thresholds
401 Memory controller implements memory thresholds using cgroups notification 401 Memory controller implements memory thresholds using cgroups notification
402 API. You can use Documentation/cgroups/cgroup_event_listener.c to test 402 API. You can use tools/cgroup/cgroup_event_listener.c to test it.
403 it.
404 403
405 (Shell-A) Create cgroup and run event listener 404 (Shell-A) Create cgroup and run event listener
406 # mkdir /cgroup/A 405 # mkdir /cgroup/A
diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt
index c07f7b4fb88d..8b8c28b9864c 100644
--- a/Documentation/cgroups/memory.txt
+++ b/Documentation/cgroups/memory.txt
@@ -71,6 +71,11 @@ Brief summary of control files.
71 memory.oom_control # set/show oom controls. 71 memory.oom_control # set/show oom controls.
72 memory.numa_stat # show the number of memory usage per numa node 72 memory.numa_stat # show the number of memory usage per numa node
73 73
74 memory.kmem.limit_in_bytes # set/show hard limit for kernel memory
75 memory.kmem.usage_in_bytes # show current kernel memory allocation
76 memory.kmem.failcnt # show the number of kernel memory usage hits limits
77 memory.kmem.max_usage_in_bytes # show max kernel memory usage recorded
78
74 memory.kmem.tcp.limit_in_bytes # set/show hard limit for tcp buf memory 79 memory.kmem.tcp.limit_in_bytes # set/show hard limit for tcp buf memory
75 memory.kmem.tcp.usage_in_bytes # show current tcp buf memory allocation 80 memory.kmem.tcp.usage_in_bytes # show current tcp buf memory allocation
76 memory.kmem.tcp.failcnt # show the number of tcp buf memory usage hits limits 81 memory.kmem.tcp.failcnt # show the number of tcp buf memory usage hits limits
@@ -144,9 +149,9 @@ Figure 1 shows the important aspects of the controller
1443. Each page has a pointer to the page_cgroup, which in turn knows the 1493. Each page has a pointer to the page_cgroup, which in turn knows the
145 cgroup it belongs to 150 cgroup it belongs to
146 151
147The accounting is done as follows: mem_cgroup_charge() is invoked to set up 152The accounting is done as follows: mem_cgroup_charge_common() is invoked to
148the necessary data structures and check if the cgroup that is being charged 153set up the necessary data structures and check if the cgroup that is being
149is over its limit. If it is, then reclaim is invoked on the cgroup. 154charged is over its limit. If it is, then reclaim is invoked on the cgroup.
150More details can be found in the reclaim section of this document. 155More details can be found in the reclaim section of this document.
151If everything goes well, a page meta-data-structure called page_cgroup is 156If everything goes well, a page meta-data-structure called page_cgroup is
152updated. page_cgroup has its own LRU on cgroup. 157updated. page_cgroup has its own LRU on cgroup.
@@ -268,20 +273,73 @@ the amount of kernel memory used by the system. Kernel memory is fundamentally
268different than user memory, since it can't be swapped out, which makes it 273different than user memory, since it can't be swapped out, which makes it
269possible to DoS the system by consuming too much of this precious resource. 274possible to DoS the system by consuming too much of this precious resource.
270 275
276Kernel memory won't be accounted at all until limit on a group is set. This
277allows for existing setups to continue working without disruption. The limit
278cannot be set if the cgroup have children, or if there are already tasks in the
279cgroup. Attempting to set the limit under those conditions will return -EBUSY.
280When use_hierarchy == 1 and a group is accounted, its children will
281automatically be accounted regardless of their limit value.
282
283After a group is first limited, it will be kept being accounted until it
284is removed. The memory limitation itself, can of course be removed by writing
285-1 to memory.kmem.limit_in_bytes. In this case, kmem will be accounted, but not
286limited.
287
271Kernel memory limits are not imposed for the root cgroup. Usage for the root 288Kernel memory limits are not imposed for the root cgroup. Usage for the root
272cgroup may or may not be accounted. 289cgroup may or may not be accounted. The memory used is accumulated into
290memory.kmem.usage_in_bytes, or in a separate counter when it makes sense.
291(currently only for tcp).
292The main "kmem" counter is fed into the main counter, so kmem charges will
293also be visible from the user counter.
273 294
274Currently no soft limit is implemented for kernel memory. It is future work 295Currently no soft limit is implemented for kernel memory. It is future work
275to trigger slab reclaim when those limits are reached. 296to trigger slab reclaim when those limits are reached.
276 297
2772.7.1 Current Kernel Memory resources accounted 2982.7.1 Current Kernel Memory resources accounted
278 299
300* stack pages: every process consumes some stack pages. By accounting into
301kernel memory, we prevent new processes from being created when the kernel
302memory usage is too high.
303
304* slab pages: pages allocated by the SLAB or SLUB allocator are tracked. A copy
305of each kmem_cache is created everytime the cache is touched by the first time
306from inside the memcg. The creation is done lazily, so some objects can still be
307skipped while the cache is being created. All objects in a slab page should
308belong to the same memcg. This only fails to hold when a task is migrated to a
309different memcg during the page allocation by the cache.
310
279* sockets memory pressure: some sockets protocols have memory pressure 311* sockets memory pressure: some sockets protocols have memory pressure
280thresholds. The Memory Controller allows them to be controlled individually 312thresholds. The Memory Controller allows them to be controlled individually
281per cgroup, instead of globally. 313per cgroup, instead of globally.
282 314
283* tcp memory pressure: sockets memory pressure for the tcp protocol. 315* tcp memory pressure: sockets memory pressure for the tcp protocol.
284 316
3172.7.3 Common use cases
318
319Because the "kmem" counter is fed to the main user counter, kernel memory can
320never be limited completely independently of user memory. Say "U" is the user
321limit, and "K" the kernel limit. There are three possible ways limits can be
322set:
323
324 U != 0, K = unlimited:
325 This is the standard memcg limitation mechanism already present before kmem
326 accounting. Kernel memory is completely ignored.
327
328 U != 0, K < U:
329 Kernel memory is a subset of the user memory. This setup is useful in
330 deployments where the total amount of memory per-cgroup is overcommited.
331 Overcommiting kernel memory limits is definitely not recommended, since the
332 box can still run out of non-reclaimable memory.
333 In this case, the admin could set up K so that the sum of all groups is
334 never greater than the total memory, and freely set U at the cost of his
335 QoS.
336
337 U != 0, K >= U:
338 Since kmem charges will also be fed to the user counter and reclaim will be
339 triggered for the cgroup for both kinds of memory. This setup gives the
340 admin a unified view of memory, and it is also useful for people who just
341 want to track kernel memory usage.
342
2853. User Interface 3433. User Interface
286 344
2870. Configuration 3450. Configuration
@@ -290,6 +348,7 @@ a. Enable CONFIG_CGROUPS
290b. Enable CONFIG_RESOURCE_COUNTERS 348b. Enable CONFIG_RESOURCE_COUNTERS
291c. Enable CONFIG_MEMCG 349c. Enable CONFIG_MEMCG
292d. Enable CONFIG_MEMCG_SWAP (to use swap extension) 350d. Enable CONFIG_MEMCG_SWAP (to use swap extension)
351d. Enable CONFIG_MEMCG_KMEM (to use kmem extension)
293 352
2941. Prepare the cgroups (see cgroups.txt, Why are cgroups needed?) 3531. Prepare the cgroups (see cgroups.txt, Why are cgroups needed?)
295# mount -t tmpfs none /sys/fs/cgroup 354# mount -t tmpfs none /sys/fs/cgroup
@@ -406,6 +465,11 @@ About use_hierarchy, see Section 6.
406 Because rmdir() moves all pages to parent, some out-of-use page caches can be 465 Because rmdir() moves all pages to parent, some out-of-use page caches can be
407 moved to the parent. If you want to avoid that, force_empty will be useful. 466 moved to the parent. If you want to avoid that, force_empty will be useful.
408 467
468 Also, note that when memory.kmem.limit_in_bytes is set the charges due to
469 kernel pages will still be seen. This is not considered a failure and the
470 write will still return success. In this case, it is expected that
471 memory.kmem.usage_in_bytes == memory.usage_in_bytes.
472
409 About use_hierarchy, see Section 6. 473 About use_hierarchy, see Section 6.
410 474
4115.2 stat file 4755.2 stat file
@@ -466,6 +530,10 @@ Note:
4665.3 swappiness 5305.3 swappiness
467 531
468Similar to /proc/sys/vm/swappiness, but affecting a hierarchy of groups only. 532Similar to /proc/sys/vm/swappiness, but affecting a hierarchy of groups only.
533Please note that unlike the global swappiness, memcg knob set to 0
534really prevents from any swapping even if there is a swap storage
535available. This might lead to memcg OOM killer if there are no file
536pages to reclaim.
469 537
470Following cgroups' swappiness can't be changed. 538Following cgroups' swappiness can't be changed.
471- root cgroup (uses /proc/sys/vm/swappiness). 539- root cgroup (uses /proc/sys/vm/swappiness).
diff --git a/Documentation/cgroups/net_prio.txt b/Documentation/cgroups/net_prio.txt
index 01b322635591..a82cbd28ea8a 100644
--- a/Documentation/cgroups/net_prio.txt
+++ b/Documentation/cgroups/net_prio.txt
@@ -51,3 +51,5 @@ One usage for the net_prio cgroup is with mqprio qdisc allowing application
51traffic to be steered to hardware/driver based traffic classes. These mappings 51traffic to be steered to hardware/driver based traffic classes. These mappings
52can then be managed by administrators or other networking protocols such as 52can then be managed by administrators or other networking protocols such as
53DCBX. 53DCBX.
54
55A new net_prio cgroup inherits the parent's configuration.
diff --git a/Documentation/cgroups/resource_counter.txt b/Documentation/cgroups/resource_counter.txt
index 0c4a344e78fa..c4d99ed0b418 100644
--- a/Documentation/cgroups/resource_counter.txt
+++ b/Documentation/cgroups/resource_counter.txt
@@ -83,16 +83,17 @@ to work with it.
83 res_counter->lock internally (it must be called with res_counter->lock 83 res_counter->lock internally (it must be called with res_counter->lock
84 held). The force parameter indicates whether we can bypass the limit. 84 held). The force parameter indicates whether we can bypass the limit.
85 85
86 e. void res_counter_uncharge[_locked] 86 e. u64 res_counter_uncharge[_locked]
87 (struct res_counter *rc, unsigned long val) 87 (struct res_counter *rc, unsigned long val)
88 88
89 When a resource is released (freed) it should be de-accounted 89 When a resource is released (freed) it should be de-accounted
90 from the resource counter it was accounted to. This is called 90 from the resource counter it was accounted to. This is called
91 "uncharging". 91 "uncharging". The return value of this function indicate the amount
92 of charges still present in the counter.
92 93
93 The _locked routines imply that the res_counter->lock is taken. 94 The _locked routines imply that the res_counter->lock is taken.
94 95
95 f. void res_counter_uncharge_until 96 f. u64 res_counter_uncharge_until
96 (struct res_counter *rc, struct res_counter *top, 97 (struct res_counter *rc, struct res_counter *top,
97 unsinged long val) 98 unsinged long val)
98 99
diff --git a/Documentation/coccinelle.txt b/Documentation/coccinelle.txt
index cf44eb6499b4..dffa2d620d6d 100644
--- a/Documentation/coccinelle.txt
+++ b/Documentation/coccinelle.txt
@@ -87,6 +87,10 @@ As any static code analyzer, Coccinelle produces false
87positives. Thus, reports must be carefully checked, and patches 87positives. Thus, reports must be carefully checked, and patches
88reviewed. 88reviewed.
89 89
90To enable verbose messages set the V= variable, for example:
91
92 make coccicheck MODE=report V=1
93
90 94
91 Using Coccinelle with a single semantic patch 95 Using Coccinelle with a single semantic patch
92~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 96~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/Documentation/cpu-freq/cpu-drivers.txt b/Documentation/cpu-freq/cpu-drivers.txt
index c436096351f8..72f70b16d299 100644
--- a/Documentation/cpu-freq/cpu-drivers.txt
+++ b/Documentation/cpu-freq/cpu-drivers.txt
@@ -111,6 +111,12 @@ policy->governor must contain the "default policy" for
111For setting some of these values, the frequency table helpers might be 111For setting some of these values, the frequency table helpers might be
112helpful. See the section 2 for more information on them. 112helpful. See the section 2 for more information on them.
113 113
114SMP systems normally have same clock source for a group of cpus. For these the
115.init() would be called only once for the first online cpu. Here the .init()
116routine must initialize policy->cpus with mask of all possible cpus (Online +
117Offline) that share the clock. Then the core would copy this mask onto
118policy->related_cpus and will reset policy->cpus to carry only online cpus.
119
114 120
1151.3 verify 1211.3 verify
116------------ 122------------
diff --git a/Documentation/cpu-freq/user-guide.txt b/Documentation/cpu-freq/user-guide.txt
index 04f6b32993e6..ff2f28332cc4 100644
--- a/Documentation/cpu-freq/user-guide.txt
+++ b/Documentation/cpu-freq/user-guide.txt
@@ -190,11 +190,11 @@ scaling_max_freq show the current "policy limits" (in
190 first set scaling_max_freq, then 190 first set scaling_max_freq, then
191 scaling_min_freq. 191 scaling_min_freq.
192 192
193affected_cpus : List of CPUs that require software coordination 193affected_cpus : List of Online CPUs that require software
194 of frequency. 194 coordination of frequency.
195 195
196related_cpus : List of CPUs that need some sort of frequency 196related_cpus : List of Online + Offline CPUs that need software
197 coordination, whether software or hardware. 197 coordination of frequency.
198 198
199scaling_driver : Hardware driver for cpufreq. 199scaling_driver : Hardware driver for cpufreq.
200 200
diff --git a/Documentation/cpu-hotplug.txt b/Documentation/cpu-hotplug.txt
index 66ef8f35613d..9f401350f502 100644
--- a/Documentation/cpu-hotplug.txt
+++ b/Documentation/cpu-hotplug.txt
@@ -207,6 +207,30 @@ by making it not-removable.
207 207
208In such cases you will also notice that the online file is missing under cpu0. 208In such cases you will also notice that the online file is missing under cpu0.
209 209
210Q: Is CPU0 removable on X86?
211A: Yes. If kernel is compiled with CONFIG_BOOTPARAM_HOTPLUG_CPU0=y, CPU0 is
212removable by default. Otherwise, CPU0 is also removable by kernel option
213cpu0_hotplug.
214
215But some features depend on CPU0. Two known dependencies are:
216
2171. Resume from hibernate/suspend depends on CPU0. Hibernate/suspend will fail if
218CPU0 is offline and you need to online CPU0 before hibernate/suspend can
219continue.
2202. PIC interrupts also depend on CPU0. CPU0 can't be removed if a PIC interrupt
221is detected.
222
223It's said poweroff/reboot may depend on CPU0 on some machines although I haven't
224seen any poweroff/reboot failure so far after CPU0 is offline on a few tested
225machines.
226
227Please let me know if you know or see any other dependencies of CPU0.
228
229If the dependencies are under your control, you can turn on CPU0 hotplug feature
230either by CONFIG_BOOTPARAM_HOTPLUG_CPU0 or by kernel parameter cpu0_hotplug.
231
232--Fenghua Yu <fenghua.yu@intel.com>
233
210Q: How do i find out if a particular CPU is not removable? 234Q: How do i find out if a particular CPU is not removable?
211A: Depending on the implementation, some architectures may show this by the 235A: Depending on the implementation, some architectures may show this by the
212absence of the "online" file. This is done if it can be determined ahead of 236absence of the "online" file. This is done if it can be determined ahead of
diff --git a/Documentation/device-mapper/cache-policies.txt b/Documentation/device-mapper/cache-policies.txt
new file mode 100644
index 000000000000..d7c440b444cc
--- /dev/null
+++ b/Documentation/device-mapper/cache-policies.txt
@@ -0,0 +1,77 @@
1Guidance for writing policies
2=============================
3
4Try to keep transactionality out of it. The core is careful to
5avoid asking about anything that is migrating. This is a pain, but
6makes it easier to write the policies.
7
8Mappings are loaded into the policy at construction time.
9
10Every bio that is mapped by the target is referred to the policy.
11The policy can return a simple HIT or MISS or issue a migration.
12
13Currently there's no way for the policy to issue background work,
14e.g. to start writing back dirty blocks that are going to be evicte
15soon.
16
17Because we map bios, rather than requests it's easy for the policy
18to get fooled by many small bios. For this reason the core target
19issues periodic ticks to the policy. It's suggested that the policy
20doesn't update states (eg, hit counts) for a block more than once
21for each tick. The core ticks by watching bios complete, and so
22trying to see when the io scheduler has let the ios run.
23
24
25Overview of supplied cache replacement policies
26===============================================
27
28multiqueue
29----------
30
31This policy is the default.
32
33The multiqueue policy has two sets of 16 queues: one set for entries
34waiting for the cache and another one for those in the cache.
35Cache entries in the queues are aged based on logical time. Entry into
36the cache is based on variable thresholds and queue selection is based
37on hit count on entry. The policy aims to take different cache miss
38costs into account and to adjust to varying load patterns automatically.
39
40Message and constructor argument pairs are:
41 'sequential_threshold <#nr_sequential_ios>' and
42 'random_threshold <#nr_random_ios>'.
43
44The sequential threshold indicates the number of contiguous I/Os
45required before a stream is treated as sequential. The random threshold
46is the number of intervening non-contiguous I/Os that must be seen
47before the stream is treated as random again.
48
49The sequential and random thresholds default to 512 and 4 respectively.
50
51Large, sequential ios are probably better left on the origin device
52since spindles tend to have good bandwidth. The io_tracker counts
53contiguous I/Os to try to spot when the io is in one of these sequential
54modes.
55
56cleaner
57-------
58
59The cleaner writes back all dirty blocks in a cache to decommission it.
60
61Examples
62========
63
64The syntax for a table is:
65 cache <metadata dev> <cache dev> <origin dev> <block size>
66 <#feature_args> [<feature arg>]*
67 <policy> <#policy_args> [<policy arg>]*
68
69The syntax to send a message using the dmsetup command is:
70 dmsetup message <mapped device> 0 sequential_threshold 1024
71 dmsetup message <mapped device> 0 random_threshold 8
72
73Using dmsetup:
74 dmsetup create blah --table "0 268435456 cache /dev/sdb /dev/sdc \
75 /dev/sdd 512 0 mq 4 sequential_threshold 1024 random_threshold 8"
76 creates a 128GB large mapped device named 'blah' with the
77 sequential threshold set to 1024 and the random_threshold set to 8.
diff --git a/Documentation/device-mapper/cache.txt b/Documentation/device-mapper/cache.txt
new file mode 100644
index 000000000000..f50470abe241
--- /dev/null
+++ b/Documentation/device-mapper/cache.txt
@@ -0,0 +1,243 @@
1Introduction
2============
3
4dm-cache is a device mapper target written by Joe Thornber, Heinz
5Mauelshagen, and Mike Snitzer.
6
7It aims to improve performance of a block device (eg, a spindle) by
8dynamically migrating some of its data to a faster, smaller device
9(eg, an SSD).
10
11This device-mapper solution allows us to insert this caching at
12different levels of the dm stack, for instance above the data device for
13a thin-provisioning pool. Caching solutions that are integrated more
14closely with the virtual memory system should give better performance.
15
16The target reuses the metadata library used in the thin-provisioning
17library.
18
19The decision as to what data to migrate and when is left to a plug-in
20policy module. Several of these have been written as we experiment,
21and we hope other people will contribute others for specific io
22scenarios (eg. a vm image server).
23
24Glossary
25========
26
27 Migration - Movement of the primary copy of a logical block from one
28 device to the other.
29 Promotion - Migration from slow device to fast device.
30 Demotion - Migration from fast device to slow device.
31
32The origin device always contains a copy of the logical block, which
33may be out of date or kept in sync with the copy on the cache device
34(depending on policy).
35
36Design
37======
38
39Sub-devices
40-----------
41
42The target is constructed by passing three devices to it (along with
43other parameters detailed later):
44
451. An origin device - the big, slow one.
46
472. A cache device - the small, fast one.
48
493. A small metadata device - records which blocks are in the cache,
50 which are dirty, and extra hints for use by the policy object.
51 This information could be put on the cache device, but having it
52 separate allows the volume manager to configure it differently,
53 e.g. as a mirror for extra robustness.
54
55Fixed block size
56----------------
57
58The origin is divided up into blocks of a fixed size. This block size
59is configurable when you first create the cache. Typically we've been
60using block sizes of 256k - 1024k.
61
62Having a fixed block size simplifies the target a lot. But it is
63something of a compromise. For instance, a small part of a block may be
64getting hit a lot, yet the whole block will be promoted to the cache.
65So large block sizes are bad because they waste cache space. And small
66block sizes are bad because they increase the amount of metadata (both
67in core and on disk).
68
69Writeback/writethrough
70----------------------
71
72The cache has two modes, writeback and writethrough.
73
74If writeback, the default, is selected then a write to a block that is
75cached will go only to the cache and the block will be marked dirty in
76the metadata.
77
78If writethrough is selected then a write to a cached block will not
79complete until it has hit both the origin and cache devices. Clean
80blocks should remain clean.
81
82A simple cleaner policy is provided, which will clean (write back) all
83dirty blocks in a cache. Useful for decommissioning a cache.
84
85Migration throttling
86--------------------
87
88Migrating data between the origin and cache device uses bandwidth.
89The user can set a throttle to prevent more than a certain amount of
90migration occuring at any one time. Currently we're not taking any
91account of normal io traffic going to the devices. More work needs
92doing here to avoid migrating during those peak io moments.
93
94For the time being, a message "migration_threshold <#sectors>"
95can be used to set the maximum number of sectors being migrated,
96the default being 204800 sectors (or 100MB).
97
98Updating on-disk metadata
99-------------------------
100
101On-disk metadata is committed every time a REQ_SYNC or REQ_FUA bio is
102written. If no such requests are made then commits will occur every
103second. This means the cache behaves like a physical disk that has a
104write cache (the same is true of the thin-provisioning target). If
105power is lost you may lose some recent writes. The metadata should
106always be consistent in spite of any crash.
107
108The 'dirty' state for a cache block changes far too frequently for us
109to keep updating it on the fly. So we treat it as a hint. In normal
110operation it will be written when the dm device is suspended. If the
111system crashes all cache blocks will be assumed dirty when restarted.
112
113Per-block policy hints
114----------------------
115
116Policy plug-ins can store a chunk of data per cache block. It's up to
117the policy how big this chunk is, but it should be kept small. Like the
118dirty flags this data is lost if there's a crash so a safe fallback
119value should always be possible.
120
121For instance, the 'mq' policy, which is currently the default policy,
122uses this facility to store the hit count of the cache blocks. If
123there's a crash this information will be lost, which means the cache
124may be less efficient until those hit counts are regenerated.
125
126Policy hints affect performance, not correctness.
127
128Policy messaging
129----------------
130
131Policies will have different tunables, specific to each one, so we
132need a generic way of getting and setting these. Device-mapper
133messages are used. Refer to cache-policies.txt.
134
135Discard bitset resolution
136-------------------------
137
138We can avoid copying data during migration if we know the block has
139been discarded. A prime example of this is when mkfs discards the
140whole block device. We store a bitset tracking the discard state of
141blocks. However, we allow this bitset to have a different block size
142from the cache blocks. This is because we need to track the discard
143state for all of the origin device (compare with the dirty bitset
144which is just for the smaller cache device).
145
146Target interface
147================
148
149Constructor
150-----------
151
152 cache <metadata dev> <cache dev> <origin dev> <block size>
153 <#feature args> [<feature arg>]*
154 <policy> <#policy args> [policy args]*
155
156 metadata dev : fast device holding the persistent metadata
157 cache dev : fast device holding cached data blocks
158 origin dev : slow device holding original data blocks
159 block size : cache unit size in sectors
160
161 #feature args : number of feature arguments passed
162 feature args : writethrough. (The default is writeback.)
163
164 policy : the replacement policy to use
165 #policy args : an even number of arguments corresponding to
166 key/value pairs passed to the policy
167 policy args : key/value pairs passed to the policy
168 E.g. 'sequential_threshold 1024'
169 See cache-policies.txt for details.
170
171Optional feature arguments are:
172 writethrough : write through caching that prohibits cache block
173 content from being different from origin block content.
174 Without this argument, the default behaviour is to write
175 back cache block contents later for performance reasons,
176 so they may differ from the corresponding origin blocks.
177
178A policy called 'default' is always registered. This is an alias for
179the policy we currently think is giving best all round performance.
180
181As the default policy could vary between kernels, if you are relying on
182the characteristics of a specific policy, always request it by name.
183
184Status
185------
186
187<#used metadata blocks>/<#total metadata blocks> <#read hits> <#read misses>
188<#write hits> <#write misses> <#demotions> <#promotions> <#blocks in cache>
189<#dirty> <#features> <features>* <#core args> <core args>* <#policy args>
190<policy args>*
191
192#used metadata blocks : Number of metadata blocks used
193#total metadata blocks : Total number of metadata blocks
194#read hits : Number of times a READ bio has been mapped
195 to the cache
196#read misses : Number of times a READ bio has been mapped
197 to the origin
198#write hits : Number of times a WRITE bio has been mapped
199 to the cache
200#write misses : Number of times a WRITE bio has been
201 mapped to the origin
202#demotions : Number of times a block has been removed
203 from the cache
204#promotions : Number of times a block has been moved to
205 the cache
206#blocks in cache : Number of blocks resident in the cache
207#dirty : Number of blocks in the cache that differ
208 from the origin
209#feature args : Number of feature args to follow
210feature args : 'writethrough' (optional)
211#core args : Number of core arguments (must be even)
212core args : Key/value pairs for tuning the core
213 e.g. migration_threshold
214#policy args : Number of policy arguments to follow (must be even)
215policy args : Key/value pairs
216 e.g. 'sequential_threshold 1024
217
218Messages
219--------
220
221Policies will have different tunables, specific to each one, so we
222need a generic way of getting and setting these. Device-mapper
223messages are used. (A sysfs interface would also be possible.)
224
225The message format is:
226
227 <key> <value>
228
229E.g.
230 dmsetup message my_cache 0 sequential_threshold 1024
231
232Examples
233========
234
235The test suite can be found here:
236
237https://github.com/jthornber/thinp-test-suite
238
239dmsetup create my_cache --table '0 41943040 cache /dev/mapper/metadata \
240 /dev/mapper/ssd /dev/mapper/origin 512 1 writeback default 0'
241dmsetup create my_cache --table '0 41943040 cache /dev/mapper/metadata \
242 /dev/mapper/ssd /dev/mapper/origin 1024 1 writeback \
243 mq 4 sequential_threshold 1024 random_threshold 8'
diff --git a/Documentation/device-mapper/dm-raid.txt b/Documentation/device-mapper/dm-raid.txt
index 728c38c242d6..b428556197c9 100644
--- a/Documentation/device-mapper/dm-raid.txt
+++ b/Documentation/device-mapper/dm-raid.txt
@@ -30,6 +30,7 @@ The target is named "raid" and it accepts the following parameters:
30 raid10 Various RAID10 inspired algorithms chosen by additional params 30 raid10 Various RAID10 inspired algorithms chosen by additional params
31 - RAID10: Striped Mirrors (aka 'Striping on top of mirrors') 31 - RAID10: Striped Mirrors (aka 'Striping on top of mirrors')
32 - RAID1E: Integrated Adjacent Stripe Mirroring 32 - RAID1E: Integrated Adjacent Stripe Mirroring
33 - RAID1E: Integrated Offset Stripe Mirroring
33 - and other similar RAID10 variants 34 - and other similar RAID10 variants
34 35
35 Reference: Chapter 4 of 36 Reference: Chapter 4 of
@@ -64,15 +65,15 @@ The target is named "raid" and it accepts the following parameters:
64 synchronisation state for each region. 65 synchronisation state for each region.
65 66
66 [raid10_copies <# copies>] 67 [raid10_copies <# copies>]
67 [raid10_format near] 68 [raid10_format <near|far|offset>]
68 These two options are used to alter the default layout of 69 These two options are used to alter the default layout of
69 a RAID10 configuration. The number of copies is can be 70 a RAID10 configuration. The number of copies is can be
70 specified, but the default is 2. There are other variations 71 specified, but the default is 2. There are also three
71 to how the copies are laid down - the default and only current 72 variations to how the copies are laid down - the default
72 option is "near". Near copies are what most people think of 73 is "near". Near copies are what most people think of with
73 with respect to mirroring. If these options are left 74 respect to mirroring. If these options are left unspecified,
74 unspecified, or 'raid10_copies 2' and/or 'raid10_format near' 75 or 'raid10_copies 2' and/or 'raid10_format near' are given,
75 are given, then the layouts for 2, 3 and 4 devices are: 76 then the layouts for 2, 3 and 4 devices are:
76 2 drives 3 drives 4 drives 77 2 drives 3 drives 4 drives
77 -------- ---------- -------------- 78 -------- ---------- --------------
78 A1 A1 A1 A1 A2 A1 A1 A2 A2 79 A1 A1 A1 A1 A2 A1 A1 A2 A2
@@ -85,6 +86,33 @@ The target is named "raid" and it accepts the following parameters:
85 3-device layout is what might be called a 'RAID1E - Integrated 86 3-device layout is what might be called a 'RAID1E - Integrated
86 Adjacent Stripe Mirroring'. 87 Adjacent Stripe Mirroring'.
87 88
89 If 'raid10_copies 2' and 'raid10_format far', then the layouts
90 for 2, 3 and 4 devices are:
91 2 drives 3 drives 4 drives
92 -------- -------------- --------------------
93 A1 A2 A1 A2 A3 A1 A2 A3 A4
94 A3 A4 A4 A5 A6 A5 A6 A7 A8
95 A5 A6 A7 A8 A9 A9 A10 A11 A12
96 .. .. .. .. .. .. .. .. ..
97 A2 A1 A3 A1 A2 A2 A1 A4 A3
98 A4 A3 A6 A4 A5 A6 A5 A8 A7
99 A6 A5 A9 A7 A8 A10 A9 A12 A11
100 .. .. .. .. .. .. .. .. ..
101
102 If 'raid10_copies 2' and 'raid10_format offset', then the
103 layouts for 2, 3 and 4 devices are:
104 2 drives 3 drives 4 drives
105 -------- ------------ -----------------
106 A1 A2 A1 A2 A3 A1 A2 A3 A4
107 A2 A1 A3 A1 A2 A2 A1 A4 A3
108 A3 A4 A4 A5 A6 A5 A6 A7 A8
109 A4 A3 A6 A4 A5 A6 A5 A8 A7
110 A5 A6 A7 A8 A9 A9 A10 A11 A12
111 A6 A5 A9 A7 A8 A10 A9 A12 A11
112 .. .. .. .. .. .. .. .. ..
113 Here we see layouts closely akin to 'RAID1E - Integrated
114 Offset Stripe Mirroring'.
115
88<#raid_devs>: The number of devices composing the array. 116<#raid_devs>: The number of devices composing the array.
89 Each device consists of two entries. The first is the device 117 Each device consists of two entries. The first is the device
90 containing the metadata (if any); the second is the one containing the 118 containing the metadata (if any); the second is the one containing the
@@ -141,3 +169,6 @@ Version History
1411.2.0 Handle creation of arrays that contain failed devices. 1691.2.0 Handle creation of arrays that contain failed devices.
1421.3.0 Added support for RAID 10 1701.3.0 Added support for RAID 10
1431.3.1 Allow device replacement/rebuild for RAID 10 1711.3.1 Allow device replacement/rebuild for RAID 10
1721.3.2 Fix/improve redundancy checking for RAID10
1731.4.0 Non-functional change. Removes arg from mapping function.
1741.4.1 Add RAID10 "far" and "offset" algorithm support.
diff --git a/Documentation/devices.txt b/Documentation/devices.txt
index b6251cca9263..08f01e79c41a 100644
--- a/Documentation/devices.txt
+++ b/Documentation/devices.txt
@@ -2561,9 +2561,6 @@ Your cooperation is appreciated.
2561 192 = /dev/usb/yurex1 First USB Yurex device 2561 192 = /dev/usb/yurex1 First USB Yurex device
2562 ... 2562 ...
2563 209 = /dev/usb/yurex16 16th USB Yurex device 2563 209 = /dev/usb/yurex16 16th USB Yurex device
2564 240 = /dev/usb/dabusb0 First daubusb device
2565 ...
2566 243 = /dev/usb/dabusb3 Fourth dabusb device
2567 2564
2568180 block USB block devices 2565180 block USB block devices
2569 0 = /dev/uba First USB block device 2566 0 = /dev/uba First USB block device
diff --git a/Documentation/devicetree/bindings/arc/interrupts.txt b/Documentation/devicetree/bindings/arc/interrupts.txt
new file mode 100644
index 000000000000..9a5d562435ea
--- /dev/null
+++ b/Documentation/devicetree/bindings/arc/interrupts.txt
@@ -0,0 +1,24 @@
1* ARC700 incore Interrupt Controller
2
3 The core interrupt controller provides 32 prioritised interrupts (2 levels)
4 to ARC700 core.
5
6Properties:
7
8- compatible: "snps,arc700-intc"
9- interrupt-controller: This is an interrupt controller.
10- #interrupt-cells: Must be <1>.
11
12 Single Cell "interrupts" property of a device specifies the IRQ number
13 between 0 to 31
14
15 intc accessed via the special ARC AUX register interface, hence "reg" property
16 is not specified.
17
18Example:
19
20 intc: interrupt-controller {
21 compatible = "snps,arc700-intc";
22 interrupt-controller;
23 #interrupt-cells = <1>;
24 };
diff --git a/Documentation/devicetree/bindings/arm/altera/socfpga-reset.txt b/Documentation/devicetree/bindings/arm/altera/socfpga-reset.txt
new file mode 100644
index 000000000000..ecdb57d69dbf
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/altera/socfpga-reset.txt
@@ -0,0 +1,11 @@
1Altera SOCFPGA Reset Manager
2
3Required properties:
4- compatible : "altr,rst-mgr"
5- reg : Should contain 1 register ranges(address and length)
6
7Example:
8 rstmgr@ffd05000 {
9 compatible = "altr,rst-mgr";
10 reg = <0xffd05000 0x1000>;
11 };
diff --git a/Documentation/devicetree/bindings/arm/altera/socfpga-system.txt b/Documentation/devicetree/bindings/arm/altera/socfpga-system.txt
new file mode 100644
index 000000000000..f4d04a067282
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/altera/socfpga-system.txt
@@ -0,0 +1,13 @@
1Altera SOCFPGA System Manager
2
3Required properties:
4- compatible : "altr,sys-mgr"
5- reg : Should contain 1 register ranges(address and length)
6- cpu1-start-addr : CPU1 start address in hex.
7
8Example:
9 sysmgr@ffd08000 {
10 compatible = "altr,sys-mgr";
11 reg = <0xffd08000 0x1000>;
12 cpu1-start-addr = <0xffd080c4>;
13 };
diff --git a/Documentation/devicetree/bindings/arm/arch_timer.txt b/Documentation/devicetree/bindings/arm/arch_timer.txt
index 52478c83d0cc..20746e5abe6f 100644
--- a/Documentation/devicetree/bindings/arm/arch_timer.txt
+++ b/Documentation/devicetree/bindings/arm/arch_timer.txt
@@ -1,13 +1,14 @@
1* ARM architected timer 1* ARM architected timer
2 2
3ARM Cortex-A7 and Cortex-A15 have a per-core architected timer, which 3ARM cores may have a per-core architected timer, which provides per-cpu timers.
4provides per-cpu timers.
5 4
6The timer is attached to a GIC to deliver its per-processor interrupts. 5The timer is attached to a GIC to deliver its per-processor interrupts.
7 6
8** Timer node properties: 7** Timer node properties:
9 8
10- compatible : Should at least contain "arm,armv7-timer". 9- compatible : Should at least contain one of
10 "arm,armv7-timer"
11 "arm,armv8-timer"
11 12
12- interrupts : Interrupt list for secure, non-secure, virtual and 13- interrupts : Interrupt list for secure, non-secure, virtual and
13 hypervisor timers, in that order. 14 hypervisor timers, in that order.
diff --git a/Documentation/devicetree/bindings/arm/arm-boards b/Documentation/devicetree/bindings/arm/arm-boards
index fc81a7d6b0f1..db5858e32d3f 100644
--- a/Documentation/devicetree/bindings/arm/arm-boards
+++ b/Documentation/devicetree/bindings/arm/arm-boards
@@ -9,6 +9,10 @@ Required properties (in root node):
9 9
10FPGA type interrupt controllers, see the versatile-fpga-irq binding doc. 10FPGA type interrupt controllers, see the versatile-fpga-irq binding doc.
11 11
12In the root node the Integrator/CP must have a /cpcon node pointing
13to the CP control registers, and the Integrator/AP must have a
14/syscon node pointing to the Integrator/AP system controller.
15
12 16
13ARM Versatile Application and Platform Baseboards 17ARM Versatile Application and Platform Baseboards
14------------------------------------------------- 18-------------------------------------------------
diff --git a/Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt b/Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt
index 70c0dc5f00ed..61df564c0d23 100644
--- a/Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt
+++ b/Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt
@@ -6,9 +6,15 @@ Required properties:
6- interrupt-controller: Identifies the node as an interrupt controller. 6- interrupt-controller: Identifies the node as an interrupt controller.
7- #interrupt-cells: The number of cells to define the interrupts. Should be 1. 7- #interrupt-cells: The number of cells to define the interrupts. Should be 1.
8 The cell is the IRQ number 8 The cell is the IRQ number
9
9- reg: Should contain PMIC registers location and length. First pair 10- reg: Should contain PMIC registers location and length. First pair
10 for the main interrupt registers, second pair for the per-CPU 11 for the main interrupt registers, second pair for the per-CPU
11 interrupt registers 12 interrupt registers. For this last pair, to be compliant with SMP
13 support, the "virtual" must be use (For the record, these registers
14 automatically map to the interrupt controller registers of the
15 current CPU)
16
17
12 18
13Example: 19Example:
14 20
@@ -18,6 +24,6 @@ Example:
18 #address-cells = <1>; 24 #address-cells = <1>;
19 #size-cells = <1>; 25 #size-cells = <1>;
20 interrupt-controller; 26 interrupt-controller;
21 reg = <0xd0020000 0x1000>, 27 reg = <0xd0020a00 0x1d0>,
22 <0xd0021000 0x1000>; 28 <0xd0021070 0x58>;
23 }; 29 };
diff --git a/Documentation/devicetree/bindings/arm/armada-370-xp-pmsu.txt b/Documentation/devicetree/bindings/arm/armada-370-xp-pmsu.txt
new file mode 100644
index 000000000000..926b4d6aae7e
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/armada-370-xp-pmsu.txt
@@ -0,0 +1,20 @@
1Power Management Service Unit(PMSU)
2-----------------------------------
3Available on Marvell SOCs: Armada 370 and Armada XP
4
5Required properties:
6
7- compatible: "marvell,armada-370-xp-pmsu"
8
9- reg: Should contain PMSU registers location and length. First pair
10 for the per-CPU SW Reset Control registers, second pair for the
11 Power Management Service Unit.
12
13Example:
14
15armada-370-xp-pmsu@d0022000 {
16 compatible = "marvell,armada-370-xp-pmsu";
17 reg = <0xd0022100 0x430>,
18 <0xd0020800 0x20>;
19};
20
diff --git a/Documentation/devicetree/bindings/arm/armada-370-xp-timer.txt b/Documentation/devicetree/bindings/arm/armada-370-xp-timer.txt
deleted file mode 100644
index 8b6ea2267c94..000000000000
--- a/Documentation/devicetree/bindings/arm/armada-370-xp-timer.txt
+++ /dev/null
@@ -1,11 +0,0 @@
1Marvell Armada 370 and Armada XP Global Timers
2----------------------------------------------
3
4Required properties:
5- compatible: Should be "marvell,armada-370-xp-timer"
6- interrupts: Should contain the list of Global Timer interrupts
7- reg: Should contain the base address of the Global Timer registers
8
9Optional properties:
10- marvell,timer-25Mhz: Tells whether the Global timer supports the 25
11 Mhz fixed mode (available on Armada XP and not on Armada 370)
diff --git a/Documentation/devicetree/bindings/arm/armadeus.txt b/Documentation/devicetree/bindings/arm/armadeus.txt
new file mode 100644
index 000000000000..9821283ff516
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/armadeus.txt
@@ -0,0 +1,6 @@
1Armadeus i.MX Platforms Device Tree Bindings
2-----------------------------------------------
3
4APF51: i.MX51 based module.
5Required root node properties:
6 - compatible = "armadeus,imx51-apf51", "fsl,imx51";
diff --git a/Documentation/devicetree/bindings/arm/atmel-aic.txt b/Documentation/devicetree/bindings/arm/atmel-aic.txt
index 19078bf5cca8..ad031211b5b8 100644
--- a/Documentation/devicetree/bindings/arm/atmel-aic.txt
+++ b/Documentation/devicetree/bindings/arm/atmel-aic.txt
@@ -4,7 +4,7 @@ Required properties:
4- compatible: Should be "atmel,<chip>-aic" 4- compatible: Should be "atmel,<chip>-aic"
5- interrupt-controller: Identifies the node as an interrupt controller. 5- interrupt-controller: Identifies the node as an interrupt controller.
6- interrupt-parent: For single AIC system, it is an empty property. 6- interrupt-parent: For single AIC system, it is an empty property.
7- #interrupt-cells: The number of cells to define the interrupts. It sould be 3. 7- #interrupt-cells: The number of cells to define the interrupts. It should be 3.
8 The first cell is the IRQ number (aka "Peripheral IDentifier" on datasheet). 8 The first cell is the IRQ number (aka "Peripheral IDentifier" on datasheet).
9 The second cell is used to specify flags: 9 The second cell is used to specify flags:
10 bits[3:0] trigger type and level flags: 10 bits[3:0] trigger type and level flags:
diff --git a/Documentation/devicetree/bindings/arm/atmel-at91.txt b/Documentation/devicetree/bindings/arm/atmel-at91.txt
index d187e9f7cf1c..1196290082d1 100644
--- a/Documentation/devicetree/bindings/arm/atmel-at91.txt
+++ b/Documentation/devicetree/bindings/arm/atmel-at91.txt
@@ -7,6 +7,12 @@ PIT Timer required properties:
7- interrupts: Should contain interrupt for the PIT which is the IRQ line 7- interrupts: Should contain interrupt for the PIT which is the IRQ line
8 shared across all System Controller members. 8 shared across all System Controller members.
9 9
10System Timer (ST) required properties:
11- compatible: Should be "atmel,at91rm9200-st"
12- reg: Should contain registers location and length
13- interrupts: Should contain interrupt for the ST which is the IRQ line
14 shared across all System Controller members.
15
10TC/TCLIB Timer required properties: 16TC/TCLIB Timer required properties:
11- compatible: Should be "atmel,<chip>-tcb". 17- compatible: Should be "atmel,<chip>-tcb".
12 <chip> can be "at91rm9200" or "at91sam9x5" 18 <chip> can be "at91rm9200" or "at91sam9x5"
diff --git a/Documentation/devicetree/bindings/arm/bcm/bcm11351.txt b/Documentation/devicetree/bindings/arm/bcm/bcm11351.txt
new file mode 100644
index 000000000000..fb7b5cd2652f
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/bcm/bcm11351.txt
@@ -0,0 +1,9 @@
1Broadcom BCM11351 device tree bindings
2-------------------------------------------
3
4Boards with the bcm281xx SoC family (which includes bcm11130, bcm11140,
5bcm11351, bcm28145, bcm28155 SoCs) shall have the following properties:
6
7Required root node property:
8
9compatible = "bcm,bcm11351";
diff --git a/Documentation/devicetree/bindings/arm/calxeda.txt b/Documentation/devicetree/bindings/arm/calxeda.txt
index 4755caaccba6..25fcf96795ca 100644
--- a/Documentation/devicetree/bindings/arm/calxeda.txt
+++ b/Documentation/devicetree/bindings/arm/calxeda.txt
@@ -1,8 +1,15 @@
1Calxeda Highbank Platforms Device Tree Bindings 1Calxeda Platforms Device Tree Bindings
2----------------------------------------------- 2-----------------------------------------------
3 3
4Boards with Calxeda Cortex-A9 based Highbank SOC shall have the following 4Boards with Calxeda Cortex-A9 based ECX-1000 (Highbank) SOC shall have the
5properties. 5following properties.
6 6
7Required root node properties: 7Required root node properties:
8 - compatible = "calxeda,highbank"; 8 - compatible = "calxeda,highbank";
9
10
11Boards with Calxeda Cortex-A15 based ECX-2000 SOC shall have the following
12properties.
13
14Required root node properties:
15 - compatible = "calxeda,ecx-2000";
diff --git a/Documentation/devicetree/bindings/arm/coherency-fabric.txt b/Documentation/devicetree/bindings/arm/coherency-fabric.txt
new file mode 100644
index 000000000000..17d8cd107559
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/coherency-fabric.txt
@@ -0,0 +1,21 @@
1Coherency fabric
2----------------
3Available on Marvell SOCs: Armada 370 and Armada XP
4
5Required properties:
6
7- compatible: "marvell,coherency-fabric"
8
9- reg: Should contain coherency fabric registers location and
10 length. First pair for the coherency fabric registers, second pair
11 for the per-CPU fabric registers registers.
12
13Example:
14
15coherency-fabric@d0020200 {
16 compatible = "marvell,coherency-fabric";
17 reg = <0xd0020200 0xb0>,
18 <0xd0021810 0x1c>;
19
20};
21
diff --git a/Documentation/devicetree/bindings/arm/cpus.txt b/Documentation/devicetree/bindings/arm/cpus.txt
new file mode 100644
index 000000000000..f32494dbfe19
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/cpus.txt
@@ -0,0 +1,77 @@
1* ARM CPUs binding description
2
3The device tree allows to describe the layout of CPUs in a system through
4the "cpus" node, which in turn contains a number of subnodes (ie "cpu")
5defining properties for every cpu.
6
7Bindings for CPU nodes follow the ePAPR standard, available from:
8
9http://devicetree.org
10
11For the ARM architecture every CPU node must contain the following properties:
12
13- device_type: must be "cpu"
14- reg: property matching the CPU MPIDR[23:0] register bits
15 reg[31:24] bits must be set to 0
16- compatible: should be one of:
17 "arm,arm1020"
18 "arm,arm1020e"
19 "arm,arm1022"
20 "arm,arm1026"
21 "arm,arm720"
22 "arm,arm740"
23 "arm,arm7tdmi"
24 "arm,arm920"
25 "arm,arm922"
26 "arm,arm925"
27 "arm,arm926"
28 "arm,arm940"
29 "arm,arm946"
30 "arm,arm9tdmi"
31 "arm,cortex-a5"
32 "arm,cortex-a7"
33 "arm,cortex-a8"
34 "arm,cortex-a9"
35 "arm,cortex-a15"
36 "arm,arm1136"
37 "arm,arm1156"
38 "arm,arm1176"
39 "arm,arm11mpcore"
40 "faraday,fa526"
41 "intel,sa110"
42 "intel,sa1100"
43 "marvell,feroceon"
44 "marvell,mohawk"
45 "marvell,xsc3"
46 "marvell,xscale"
47
48Example:
49
50 cpus {
51 #size-cells = <0>;
52 #address-cells = <1>;
53
54 CPU0: cpu@0 {
55 device_type = "cpu";
56 compatible = "arm,cortex-a15";
57 reg = <0x0>;
58 };
59
60 CPU1: cpu@1 {
61 device_type = "cpu";
62 compatible = "arm,cortex-a15";
63 reg = <0x1>;
64 };
65
66 CPU2: cpu@100 {
67 device_type = "cpu";
68 compatible = "arm,cortex-a7";
69 reg = <0x100>;
70 };
71
72 CPU3: cpu@101 {
73 device_type = "cpu";
74 compatible = "arm,cortex-a7";
75 reg = <0x101>;
76 };
77 };
diff --git a/Documentation/devicetree/bindings/arm/davinci.txt b/Documentation/devicetree/bindings/arm/davinci.txt
new file mode 100644
index 000000000000..cfaeda4274e6
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/davinci.txt
@@ -0,0 +1,17 @@
1Texas Instruments DaVinci Platforms Device Tree Bindings
2--------------------------------------------------------
3
4DA850/OMAP-L138/AM18x Evaluation Module (EVM) board
5Required root node properties:
6 - compatible = "ti,da850-evm", "ti,da850";
7
8EnBW AM1808 based CMC board
9Required root node properties:
10 - compatible = "enbw,cmc", "ti,da850;
11
12Generic DaVinci Boards
13----------------------
14
15DA850/OMAP-L138/AM18x generic board
16Required root node properties:
17 - compatible = "ti,da850";
diff --git a/Documentation/devicetree/bindings/arm/davinci/nand.txt b/Documentation/devicetree/bindings/arm/davinci/nand.txt
index e37241f1fdd8..3545ea704b50 100644
--- a/Documentation/devicetree/bindings/arm/davinci/nand.txt
+++ b/Documentation/devicetree/bindings/arm/davinci/nand.txt
@@ -23,29 +23,24 @@ Recommended properties :
23- ti,davinci-nand-buswidth: buswidth 8 or 16 23- ti,davinci-nand-buswidth: buswidth 8 or 16
24- ti,davinci-nand-use-bbt: use flash based bad block table support. 24- ti,davinci-nand-use-bbt: use flash based bad block table support.
25 25
26Example (enbw_cmc board): 26nand device bindings may contain additional sub-nodes describing
27aemif@60000000 { 27partitions of the address space. See partition.txt for more detail.
28 compatible = "ti,davinci-aemif"; 28
29 #address-cells = <2>; 29Example(da850 EVM ):
30 #size-cells = <1>; 30nand_cs3@62000000 {
31 reg = <0x68000000 0x80000>; 31 compatible = "ti,davinci-nand";
32 ranges = <2 0 0x60000000 0x02000000 32 reg = <0x62000000 0x807ff
33 3 0 0x62000000 0x02000000 33 0x68000000 0x8000>;
34 4 0 0x64000000 0x02000000 34 ti,davinci-chipselect = <1>;
35 5 0 0x66000000 0x02000000 35 ti,davinci-mask-ale = <0>;
36 6 0 0x68000000 0x02000000>; 36 ti,davinci-mask-cle = <0>;
37 nand@3,0 { 37 ti,davinci-mask-chipsel = <0>;
38 compatible = "ti,davinci-nand"; 38 ti,davinci-ecc-mode = "hw";
39 reg = <3 0x0 0x807ff 39 ti,davinci-ecc-bits = <4>;
40 6 0x0 0x8000>; 40 ti,davinci-nand-use-bbt;
41 #address-cells = <1>; 41
42 #size-cells = <1>; 42 partition@180000 {
43 ti,davinci-chipselect = <1>; 43 label = "ubifs";
44 ti,davinci-mask-ale = <0>; 44 reg = <0x180000 0x7e80000>;
45 ti,davinci-mask-cle = <0>;
46 ti,davinci-mask-chipsel = <0>;
47 ti,davinci-ecc-mode = "hw";
48 ti,davinci-ecc-bits = <4>;
49 ti,davinci-nand-use-bbt;
50 }; 45 };
51}; 46};
diff --git a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
index 6528e215c5fe..5216b419016a 100644
--- a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
+++ b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
@@ -4,14 +4,13 @@ Exynos processors include support for multiple power domains which are used
4to gate power to one or more peripherals on the processor. 4to gate power to one or more peripherals on the processor.
5 5
6Required Properties: 6Required Properties:
7- compatiable: should be one of the following. 7- compatible: should be one of the following.
8 * samsung,exynos4210-pd - for exynos4210 type power domain. 8 * samsung,exynos4210-pd - for exynos4210 type power domain.
9- reg: physical base address of the controller and length of memory mapped 9- reg: physical base address of the controller and length of memory mapped
10 region. 10 region.
11 11
12Optional Properties: 12Node of a device using power domains must have a samsung,power-domain property
13- samsung,exynos4210-pd-off: Specifies that the power domain is in turned-off 13defined with a phandle to respective power domain.
14 state during boot and remains to be turned-off until explicitly turned-on.
15 14
16Example: 15Example:
17 16
@@ -19,3 +18,11 @@ Example:
19 compatible = "samsung,exynos4210-pd"; 18 compatible = "samsung,exynos4210-pd";
20 reg = <0x10023C00 0x10>; 19 reg = <0x10023C00 0x10>;
21 }; 20 };
21
22Example of the node using power domain:
23
24 node {
25 /* ... */
26 samsung,power-domain = <&lcd0>;
27 /* ... */
28 };
diff --git a/Documentation/devicetree/bindings/arm/fsl.txt b/Documentation/devicetree/bindings/arm/fsl.txt
index ac9e7516756e..e935d7d4ac43 100644
--- a/Documentation/devicetree/bindings/arm/fsl.txt
+++ b/Documentation/devicetree/bindings/arm/fsl.txt
@@ -5,6 +5,14 @@ i.MX23 Evaluation Kit
5Required root node properties: 5Required root node properties:
6 - compatible = "fsl,imx23-evk", "fsl,imx23"; 6 - compatible = "fsl,imx23-evk", "fsl,imx23";
7 7
8i.MX25 Product Development Kit
9Required root node properties:
10 - compatible = "fsl,imx25-pdk", "fsl,imx25";
11
12i.MX27 Product Development Kit
13Required root node properties:
14 - compatible = "fsl,imx27-pdk", "fsl,imx27";
15
8i.MX28 Evaluation Kit 16i.MX28 Evaluation Kit
9Required root node properties: 17Required root node properties:
10 - compatible = "fsl,imx28-evk", "fsl,imx28"; 18 - compatible = "fsl,imx28-evk", "fsl,imx28";
@@ -41,6 +49,10 @@ i.MX6 Quad SABRE Smart Device Board
41Required root node properties: 49Required root node properties:
42 - compatible = "fsl,imx6q-sabresd", "fsl,imx6q"; 50 - compatible = "fsl,imx6q-sabresd", "fsl,imx6q";
43 51
52i.MX6 Quad SABRE Automotive Board
53Required root node properties:
54 - compatible = "fsl,imx6q-sabreauto", "fsl,imx6q";
55
44Generic i.MX boards 56Generic i.MX boards
45------------------- 57-------------------
46 58
diff --git a/Documentation/devicetree/bindings/arm/gic.txt b/Documentation/devicetree/bindings/arm/gic.txt
index 62eb8df1e08d..3dfb0c0384f5 100644
--- a/Documentation/devicetree/bindings/arm/gic.txt
+++ b/Documentation/devicetree/bindings/arm/gic.txt
@@ -42,7 +42,7 @@ Main node required properties:
42 42
43Optional 43Optional
44- interrupts : Interrupt source of the parent interrupt controller on 44- interrupts : Interrupt source of the parent interrupt controller on
45 secondary GICs, or VGIC maintainance interrupt on primary GIC (see 45 secondary GICs, or VGIC maintenance interrupt on primary GIC (see
46 below). 46 below).
47 47
48- cpu-offset : per-cpu offset within the distributor and cpu interface 48- cpu-offset : per-cpu offset within the distributor and cpu interface
@@ -74,7 +74,7 @@ Required properties:
74 virtual interface control register base and size. The 2nd additional 74 virtual interface control register base and size. The 2nd additional
75 region is the GIC virtual cpu interface register base and size. 75 region is the GIC virtual cpu interface register base and size.
76 76
77- interrupts : VGIC maintainance interrupt. 77- interrupts : VGIC maintenance interrupt.
78 78
79Example: 79Example:
80 80
diff --git a/Documentation/devicetree/bindings/arm/kirkwood.txt b/Documentation/devicetree/bindings/arm/kirkwood.txt
new file mode 100644
index 000000000000..98cce9a653eb
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/kirkwood.txt
@@ -0,0 +1,27 @@
1Marvell Kirkwood Platforms Device Tree Bindings
2-----------------------------------------------
3
4Boards with a SoC of the Marvell Kirkwood
5shall have the following property:
6
7Required root node property:
8
9compatible: must contain "marvell,kirkwood";
10
11In order to support the kirkwood cpufreq driver, there must be a node
12cpus/cpu@0 with three clocks, "cpu_clk", "ddrclk" and "powersave",
13where the "powersave" clock is a gating clock used to switch the CPU
14between the "cpu_clk" and the "ddrclk".
15
16Example:
17
18 cpus {
19 #address-cells = <1>;
20 #size-cells = <0>;
21
22 cpu@0 {
23 device_type = "cpu";
24 compatible = "marvell,sheeva-88SV131";
25 clocks = <&core_clk 1>, <&core_clk 3>, <&gate_clk 11>;
26 clock-names = "cpu_clk", "ddrclk", "powersave";
27 };
diff --git a/Documentation/devicetree/bindings/arm/l2cc.txt b/Documentation/devicetree/bindings/arm/l2cc.txt
index 7ca52161e7ab..cbef09b5c8a7 100644
--- a/Documentation/devicetree/bindings/arm/l2cc.txt
+++ b/Documentation/devicetree/bindings/arm/l2cc.txt
@@ -10,6 +10,12 @@ Required properties:
10 "arm,pl310-cache" 10 "arm,pl310-cache"
11 "arm,l220-cache" 11 "arm,l220-cache"
12 "arm,l210-cache" 12 "arm,l210-cache"
13 "marvell,aurora-system-cache": Marvell Controller designed to be
14 compatible with the ARM one, with system cache mode (meaning
15 maintenance operations on L1 are broadcasted to the L2 and L2
16 performs the same operation).
17 "marvell,"aurora-outer-cache: Marvell Controller designed to be
18 compatible with the ARM one with outer cache mode.
13- cache-unified : Specifies the cache is a unified cache. 19- cache-unified : Specifies the cache is a unified cache.
14- cache-level : Should be set to 2 for a level 2 cache. 20- cache-level : Should be set to 2 for a level 2 cache.
15- reg : Physical base address and size of cache controller's memory mapped 21- reg : Physical base address and size of cache controller's memory mapped
@@ -29,6 +35,9 @@ Optional properties:
29 filter. Addresses in the filter window are directed to the M1 port. Other 35 filter. Addresses in the filter window are directed to the M1 port. Other
30 addresses will go to the M0 port. 36 addresses will go to the M0 port.
31- interrupts : 1 combined interrupt. 37- interrupts : 1 combined interrupt.
38- cache-id-part: cache id part number to be used if it is not present
39 on hardware
40- wt-override: If present then L2 is forced to Write through mode
32 41
33Example: 42Example:
34 43
@@ -37,7 +46,7 @@ L2: cache-controller {
37 reg = <0xfff12000 0x1000>; 46 reg = <0xfff12000 0x1000>;
38 arm,data-latency = <1 1 1>; 47 arm,data-latency = <1 1 1>;
39 arm,tag-latency = <2 2 2>; 48 arm,tag-latency = <2 2 2>;
40 arm,filter-latency = <0x80000000 0x8000000>; 49 arm,filter-ranges = <0x80000000 0x8000000>;
41 cache-unified; 50 cache-unified;
42 cache-level = <2>; 51 cache-level = <2>;
43 interrupts = <45>; 52 interrupts = <45>;
diff --git a/Documentation/devicetree/bindings/arm/omap/counter.txt b/Documentation/devicetree/bindings/arm/omap/counter.txt
new file mode 100644
index 000000000000..5bd8aa091315
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/omap/counter.txt
@@ -0,0 +1,15 @@
1OMAP Counter-32K bindings
2
3Required properties:
4- compatible: Must be "ti,omap-counter32k" for OMAP controllers
5- reg: Contains timer register address range (base address and length)
6- ti,hwmods: Name of the hwmod associated to the counter, which is typically
7 "counter_32k"
8
9Example:
10
11counter32k: counter@4a304000 {
12 compatible = "ti,omap-counter32k";
13 reg = <0x4a304000 0x20>;
14 ti,hwmods = "counter_32k";
15};
diff --git a/Documentation/devicetree/bindings/arm/omap/omap.txt b/Documentation/devicetree/bindings/arm/omap/omap.txt
index d0051a750587..f8288ea1b530 100644
--- a/Documentation/devicetree/bindings/arm/omap/omap.txt
+++ b/Documentation/devicetree/bindings/arm/omap/omap.txt
@@ -39,16 +39,16 @@ Boards:
39- OMAP3 Tobi with Overo : Commercial expansion board with daughter board 39- OMAP3 Tobi with Overo : Commercial expansion board with daughter board
40 compatible = "ti,omap3-tobi", "ti,omap3-overo", "ti,omap3" 40 compatible = "ti,omap3-tobi", "ti,omap3-overo", "ti,omap3"
41 41
42- OMAP4 SDP : Software Developement Board 42- OMAP4 SDP : Software Development Board
43 compatible = "ti,omap4-sdp", "ti,omap4430" 43 compatible = "ti,omap4-sdp", "ti,omap4430"
44 44
45- OMAP4 PandaBoard : Low cost community board 45- OMAP4 PandaBoard : Low cost community board
46 compatible = "ti,omap4-panda", "ti,omap4430" 46 compatible = "ti,omap4-panda", "ti,omap4430"
47 47
48- OMAP3 EVM : Software Developement Board for OMAP35x, AM/DM37x 48- OMAP3 EVM : Software Development Board for OMAP35x, AM/DM37x
49 compatible = "ti,omap3-evm", "ti,omap3" 49 compatible = "ti,omap3-evm", "ti,omap3"
50 50
51- AM335X EVM : Software Developement Board for AM335x 51- AM335X EVM : Software Development Board for AM335x
52 compatible = "ti,am335x-evm", "ti,am33xx", "ti,omap3" 52 compatible = "ti,am335x-evm", "ti,am33xx", "ti,omap3"
53 53
54- AM335X Bone : Low cost community board 54- AM335X Bone : Low cost community board
diff --git a/Documentation/devicetree/bindings/arm/omap/timer.txt b/Documentation/devicetree/bindings/arm/omap/timer.txt
new file mode 100644
index 000000000000..8732d4d41f8b
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/omap/timer.txt
@@ -0,0 +1,31 @@
1OMAP Timer bindings
2
3Required properties:
4- compatible: Must be "ti,omap2-timer" for OMAP2+ controllers.
5- reg: Contains timer register address range (base address and
6 length).
7- interrupts: Contains the interrupt information for the timer. The
8 format is being dependent on which interrupt controller
9 the OMAP device uses.
10- ti,hwmods: Name of the hwmod associated to the timer, "timer<X>",
11 where <X> is the instance number of the timer from the
12 HW spec.
13
14Optional properties:
15- ti,timer-alwon: Indicates the timer is in an alway-on power domain.
16- ti,timer-dsp: Indicates the timer can interrupt the on-chip DSP in
17 addition to the ARM CPU.
18- ti,timer-pwm: Indicates the timer can generate a PWM output.
19- ti,timer-secure: Indicates the timer is reserved on a secure OMAP device
20 and therefore cannot be used by the kernel.
21
22Example:
23
24timer12: timer@48304000 {
25 compatible = "ti,omap2-timer";
26 reg = <0x48304000 0x400>;
27 interrupts = <95>;
28 ti,hwmods = "timer12"
29 ti,timer-alwon;
30 ti,timer-secure;
31};
diff --git a/Documentation/devicetree/bindings/arm/psci.txt b/Documentation/devicetree/bindings/arm/psci.txt
new file mode 100644
index 000000000000..433afe9cb590
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/psci.txt
@@ -0,0 +1,55 @@
1* Power State Coordination Interface (PSCI)
2
3Firmware implementing the PSCI functions described in ARM document number
4ARM DEN 0022A ("Power State Coordination Interface System Software on ARM
5processors") can be used by Linux to initiate various CPU-centric power
6operations.
7
8Issue A of the specification describes functions for CPU suspend, hotplug
9and migration of secure software.
10
11Functions are invoked by trapping to the privilege level of the PSCI
12firmware (specified as part of the binding below) and passing arguments
13in a manner similar to that specified by AAPCS:
14
15 r0 => 32-bit Function ID / return value
16 {r1 - r3} => Parameters
17
18Note that the immediate field of the trapping instruction must be set
19to #0.
20
21
22Main node required properties:
23
24 - compatible : Must be "arm,psci"
25
26 - method : The method of calling the PSCI firmware. Permitted
27 values are:
28
29 "smc" : SMC #0, with the register assignments specified
30 in this binding.
31
32 "hvc" : HVC #0, with the register assignments specified
33 in this binding.
34
35Main node optional properties:
36
37 - cpu_suspend : Function ID for CPU_SUSPEND operation
38
39 - cpu_off : Function ID for CPU_OFF operation
40
41 - cpu_on : Function ID for CPU_ON operation
42
43 - migrate : Function ID for MIGRATE operation
44
45
46Example:
47
48 psci {
49 compatible = "arm,psci";
50 method = "smc";
51 cpu_suspend = <0x95c10000>;
52 cpu_off = <0x95c10001>;
53 cpu_on = <0x95c10002>;
54 migrate = <0x95c10003>;
55 };
diff --git a/Documentation/devicetree/bindings/arm/sirf.txt b/Documentation/devicetree/bindings/arm/sirf.txt
index 1881e1c6dda5..c6ba6d3c747f 100644
--- a/Documentation/devicetree/bindings/arm/sirf.txt
+++ b/Documentation/devicetree/bindings/arm/sirf.txt
@@ -1,3 +1,9 @@
1prima2 "cb" evaluation board 1CSR SiRFprimaII and SiRFmarco device tree bindings.
2========================================
3
2Required root node properties: 4Required root node properties:
3 - compatible = "sirf,prima2-cb", "sirf,prima2"; 5 - compatible:
6 - "sirf,prima2-cb" : prima2 "cb" evaluation board
7 - "sirf,marco-cb" : marco "cb" evaluation board
8 - "sirf,prima2" : prima2 device based board
9 - "sirf,marco" : marco device based board
diff --git a/Documentation/devicetree/bindings/arm/spear/shirq.txt b/Documentation/devicetree/bindings/arm/spear/shirq.txt
new file mode 100644
index 000000000000..13fbb8866bd6
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/spear/shirq.txt
@@ -0,0 +1,48 @@
1* SPEAr Shared IRQ layer (shirq)
2
3SPEAr3xx architecture includes shared/multiplexed irqs for certain set
4of devices. The multiplexor provides a single interrupt to parent
5interrupt controller (VIC) on behalf of a group of devices.
6
7There can be multiple groups available on SPEAr3xx variants but not
8exceeding 4. The number of devices in a group can differ, further they
9may share same set of status/mask registers spanning across different
10bit masks. Also in some cases the group may not have enable or other
11registers. This makes software little complex.
12
13A single node in the device tree is used to describe the shared
14interrupt multiplexor (one node for all groups). A group in the
15interrupt controller shares config/control registers with other groups.
16For example, a 32-bit interrupt enable/disable config register can
17accommodate upto 4 interrupt groups.
18
19Required properties:
20 - compatible: should be, either of
21 - "st,spear300-shirq"
22 - "st,spear310-shirq"
23 - "st,spear320-shirq"
24 - interrupt-controller: Identifies the node as an interrupt controller.
25 - #interrupt-cells: should be <1> which basically contains the offset
26 (starting from 0) of interrupts for all the groups.
27 - reg: Base address and size of shirq registers.
28 - interrupts: The list of interrupts generated by the groups which are
29 then connected to a parent interrupt controller. Each group is
30 associated with one of the interrupts, hence number of interrupts (to
31 parent) is equal to number of groups. The format of the interrupt
32 specifier depends in the interrupt parent controller.
33
34 Optional properties:
35 - interrupt-parent: pHandle of the parent interrupt controller, if not
36 inherited from the parent node.
37
38Example:
39
40The following is an example from the SPEAr320 SoC dtsi file.
41
42shirq: interrupt-controller@0xb3000000 {
43 compatible = "st,spear320-shirq";
44 reg = <0xb3000000 0x1000>;
45 interrupts = <28 29 30 1>;
46 #interrupt-cells = <1>;
47 interrupt-controller;
48};
diff --git a/Documentation/devicetree/bindings/arm/ste-nomadik.txt b/Documentation/devicetree/bindings/arm/ste-nomadik.txt
new file mode 100644
index 000000000000..19bca04b81c9
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/ste-nomadik.txt
@@ -0,0 +1,27 @@
1ST-Ericsson Nomadik Device Tree Bindings
2
3For various board the "board" node may contain specific properties
4that pertain to this particular board, such as board-specific GPIOs.
5
6Boards with the Nomadik SoC include:
7
8S8815 "MiniKit" manufactured by Calao Systems:
9
10Required root node property:
11
12compatible="calaosystems,usb-s8815";
13
14Required node: usb-s8815
15
16Example:
17
18usb-s8815 {
19 ethernet-gpio {
20 gpios = <&gpio3 19 0x1>;
21 interrupts = <19 0x1>;
22 interrupt-parent = <&gpio3>;
23 };
24 mmcsd-gpio {
25 gpios = <&gpio3 16 0x1>;
26 };
27};
diff --git a/Documentation/devicetree/bindings/arm/tegra.txt b/Documentation/devicetree/bindings/arm/tegra.txt
index 6e69d2e5e766..ed9c85334436 100644
--- a/Documentation/devicetree/bindings/arm/tegra.txt
+++ b/Documentation/devicetree/bindings/arm/tegra.txt
@@ -1,14 +1,34 @@
1NVIDIA Tegra device tree bindings 1NVIDIA Tegra device tree bindings
2------------------------------------------- 2-------------------------------------------
3 3
4Boards with the tegra20 SoC shall have the following properties: 4SoCs
5-------------------------------------------
5 6
6Required root node property: 7Each device tree must specify which Tegra SoC it uses, using one of the
8following compatible values:
7 9
8compatible = "nvidia,tegra20"; 10 nvidia,tegra20
11 nvidia,tegra30
9 12
10Boards with the tegra30 SoC shall have the following properties: 13Boards
14-------------------------------------------
11 15
12Required root node property: 16Each device tree must specify which one or more of the following
17board-specific compatible values:
13 18
14compatible = "nvidia,tegra30"; 19 ad,medcom-wide
20 ad,plutux
21 ad,tamonten
22 ad,tec
23 compal,paz00
24 compulab,trimslice
25 nvidia,beaver
26 nvidia,cardhu
27 nvidia,cardhu-a02
28 nvidia,cardhu-a04
29 nvidia,harmony
30 nvidia,seaboard
31 nvidia,ventana
32 nvidia,whistler
33 toradex,colibri_t20-512
34 toradex,iris
diff --git a/Documentation/devicetree/bindings/arm/vexpress-sysreg.txt b/Documentation/devicetree/bindings/arm/vexpress-sysreg.txt
new file mode 100644
index 000000000000..9cf3f25544c7
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/vexpress-sysreg.txt
@@ -0,0 +1,50 @@
1ARM Versatile Express system registers
2--------------------------------------
3
4This is a system control registers block, providing multiple low level
5platform functions like board detection and identification, software
6interrupt generation, MMC and NOR Flash control etc.
7
8Required node properties:
9- compatible value : = "arm,vexpress,sysreg";
10- reg : physical base address and the size of the registers window
11- gpio-controller : specifies that the node is a GPIO controller
12- #gpio-cells : size of the GPIO specifier, should be 2:
13 - first cell is the pseudo-GPIO line number:
14 0 - MMC CARDIN
15 1 - MMC WPROT
16 2 - NOR FLASH WPn
17 - second cell can take standard GPIO flags (currently ignored).
18
19Example:
20 v2m_sysreg: sysreg@10000000 {
21 compatible = "arm,vexpress-sysreg";
22 reg = <0x10000000 0x1000>;
23 gpio-controller;
24 #gpio-cells = <2>;
25 };
26
27This block also can also act a bridge to the platform's configuration
28bus via "system control" interface, addressing devices with site number,
29position in the board stack, config controller, function and device
30numbers - see motherboard's TRM for more details.
31
32The node describing a config device must refer to the sysreg node via
33"arm,vexpress,config-bridge" phandle (can be also defined in the node's
34parent) and relies on the board topology properties - see main vexpress
35node documentation for more details. It must must also define the
36following property:
37- arm,vexpress-sysreg,func : must contain two cells:
38 - first cell defines function number (eg. 1 for clock generator,
39 2 for voltage regulators etc.)
40 - device number (eg. osc 0, osc 1 etc.)
41
42Example:
43 mcc {
44 arm,vexpress,config-bridge = <&v2m_sysreg>;
45
46 osc@0 {
47 compatible = "arm,vexpress-osc";
48 arm,vexpress-sysreg,func = <1 0>;
49 };
50 };
diff --git a/Documentation/devicetree/bindings/arm/vexpress.txt b/Documentation/devicetree/bindings/arm/vexpress.txt
index ec8b50cbb2e8..ae49161e478a 100644
--- a/Documentation/devicetree/bindings/arm/vexpress.txt
+++ b/Documentation/devicetree/bindings/arm/vexpress.txt
@@ -11,6 +11,10 @@ the motherboard file using a /include/ directive. As the motherboard
11can be initialized in one of two different configurations ("memory 11can be initialized in one of two different configurations ("memory
12maps"), care must be taken to include the correct one. 12maps"), care must be taken to include the correct one.
13 13
14
15Root node
16---------
17
14Required properties in the root node: 18Required properties in the root node:
15- compatible value: 19- compatible value:
16 compatible = "arm,vexpress,<model>", "arm,vexpress"; 20 compatible = "arm,vexpress,<model>", "arm,vexpress";
@@ -45,6 +49,10 @@ Optional properties in the root node:
45 - Coretile Express A9x4 (V2P-CA9) HBI-0225: 49 - Coretile Express A9x4 (V2P-CA9) HBI-0225:
46 arm,hbi = <0x225>; 50 arm,hbi = <0x225>;
47 51
52
53CPU nodes
54---------
55
48Top-level standard "cpus" node is required. It must contain a node 56Top-level standard "cpus" node is required. It must contain a node
49with device_type = "cpu" property for every available core, eg.: 57with device_type = "cpu" property for every available core, eg.:
50 58
@@ -59,6 +67,52 @@ with device_type = "cpu" property for every available core, eg.:
59 }; 67 };
60 }; 68 };
61 69
70
71Configuration infrastructure
72----------------------------
73
74The platform has an elaborated configuration system, consisting of
75microcontrollers residing on the mother- and daughterboards known
76as Motherboard/Daughterboard Configuration Controller (MCC and DCC).
77The controllers are responsible for the platform initialization
78(reset generation, flash programming, FPGA bitfiles loading etc.)
79but also control clock generators, voltage regulators, gather
80environmental data like temperature, power consumption etc. Even
81the video output switch (FPGA) is controlled that way.
82
83Nodes describing devices controlled by this infrastructure should
84point at the bridge device node:
85- bridge phandle:
86 arm,vexpress,config-bridge = <phandle>;
87This property can be also defined in a parent node (eg. for a DCC)
88and is effective for all children.
89
90
91Platform topology
92-----------------
93
94As Versatile Express can be configured in number of physically
95different setups, the device tree should describe platform topology.
96Root node and main motherboard node must define the following
97property, describing physical location of the children nodes:
98- site number:
99 arm,vexpress,site = <number>;
100 where 0 means motherboard, 1 or 2 are daugtherboard sites,
101 0xf means "master" site (site containing main CPU tile)
102- when daughterboards are stacked on one site, their position
103 in the stack be be described with:
104 arm,vexpress,position = <number>;
105- when describing tiles consisting more than one DCC, its number
106 can be described with:
107 arm,vexpress,dcc = <number>;
108
109Any of the numbers above defaults to zero if not defined in
110the node or any of its parent.
111
112
113Motherboard
114-----------
115
62The motherboard description file provides a single "motherboard" node 116The motherboard description file provides a single "motherboard" node
63using 2 address cells corresponding to the Static Memory Bus used 117using 2 address cells corresponding to the Static Memory Bus used
64between the motherboard and the tile. The first cell defines the Chip 118between the motherboard and the tile. The first cell defines the Chip
@@ -87,22 +141,30 @@ can be used to obtain required phandle in the tile's "aliases" node:
87- SP804 timers: 141- SP804 timers:
88 v2m_timer01 and v2m_timer23 142 v2m_timer01 and v2m_timer23
89 143
90Current Linux implementation requires a "arm,v2m_timer" alias 144The tile description should define a "smb" node, describing the
91pointing at one of the motherboard's SP804 timers, if it is to be 145Static Memory Bus between the tile and motherboard. It must define
92used as the system timer. This alias should be defined in the 146the following properties:
93motherboard files. 147- "simple-bus" compatible value (to ensure creation of the children)
148 compatible = "simple-bus";
149- mapping of the SMB CS/offset addresses into main address space:
150 #address-cells = <2>;
151 #size-cells = <1>;
152 ranges = <...>;
153- interrupts mapping:
154 #interrupt-cells = <1>;
155 interrupt-map-mask = <0 0 63>;
156 interrupt-map = <...>;
94 157
95The tile description must define "ranges", "interrupt-map-mask" and
96"interrupt-map" properties to translate the motherboard's address
97and interrupt space into one used by the tile's processor.
98 158
99Abbreviated example: 159Example of a VE tile description (simplified)
160---------------------------------------------
100 161
101/dts-v1/; 162/dts-v1/;
102 163
103/ { 164/ {
104 model = "V2P-CA5s"; 165 model = "V2P-CA5s";
105 arm,hbi = <0x225>; 166 arm,hbi = <0x225>;
167 arm,vexpress,site = <0xf>;
106 compatible = "arm,vexpress-v2p-ca5s", "arm,vexpress"; 168 compatible = "arm,vexpress-v2p-ca5s", "arm,vexpress";
107 interrupt-parent = <&gic>; 169 interrupt-parent = <&gic>;
108 #address-cells = <1>; 170 #address-cells = <1>;
@@ -134,13 +196,29 @@ Abbreviated example:
134 <0x2c000100 0x100>; 196 <0x2c000100 0x100>;
135 }; 197 };
136 198
137 motherboard { 199 dcc {
200 compatible = "simple-bus";
201 arm,vexpress,config-bridge = <&v2m_sysreg>;
202
203 osc@0 {
204 compatible = "arm,vexpress-osc";
205 };
206 };
207
208 smb {
209 compatible = "simple-bus";
210
211 #address-cells = <2>;
212 #size-cells = <1>;
138 /* CS0 is visible at 0x08000000 */ 213 /* CS0 is visible at 0x08000000 */
139 ranges = <0 0 0x08000000 0x04000000>; 214 ranges = <0 0 0x08000000 0x04000000>;
215
216 #interrupt-cells = <1>;
140 interrupt-map-mask = <0 0 63>; 217 interrupt-map-mask = <0 0 63>;
141 /* Active high IRQ 0 is connected to GIC's SPI0 */ 218 /* Active high IRQ 0 is connected to GIC's SPI0 */
142 interrupt-map = <0 0 0 &gic 0 0 4>; 219 interrupt-map = <0 0 0 &gic 0 0 4>;
220
221 /include/ "vexpress-v2m-rs1.dtsi"
143 }; 222 };
144}; 223};
145 224
146/include/ "vexpress-v2m-rs1.dtsi"
diff --git a/Documentation/devicetree/bindings/arm/vt8500.txt b/Documentation/devicetree/bindings/arm/vt8500.txt
index d657832c6819..87dc1ddf4770 100644
--- a/Documentation/devicetree/bindings/arm/vt8500.txt
+++ b/Documentation/devicetree/bindings/arm/vt8500.txt
@@ -12,3 +12,11 @@ compatible = "wm,wm8505";
12Boards with the Wondermedia WM8650 SoC shall have the following properties: 12Boards with the Wondermedia WM8650 SoC shall have the following properties:
13Required root node property: 13Required root node property:
14compatible = "wm,wm8650"; 14compatible = "wm,wm8650";
15
16Boards with the Wondermedia WM8750 SoC shall have the following properties:
17Required root node property:
18compatible = "wm,wm8750";
19
20Boards with the Wondermedia WM8850 SoC shall have the following properties:
21Required root node property:
22compatible = "wm,wm8850";
diff --git a/Documentation/devicetree/bindings/ata/exynos-sata-phy.txt b/Documentation/devicetree/bindings/ata/exynos-sata-phy.txt
new file mode 100644
index 000000000000..37824fac688e
--- /dev/null
+++ b/Documentation/devicetree/bindings/ata/exynos-sata-phy.txt
@@ -0,0 +1,14 @@
1* Samsung SATA PHY Controller
2
3SATA PHY nodes are defined to describe on-chip SATA Physical layer controllers.
4Each SATA PHY controller should have its own node.
5
6Required properties:
7- compatible : compatible list, contains "samsung,exynos5-sata-phy"
8- reg : <registers mapping>
9
10Example:
11 sata@ffe07000 {
12 compatible = "samsung,exynos5-sata-phy";
13 reg = <0xffe07000 0x1000>;
14 };
diff --git a/Documentation/devicetree/bindings/ata/exynos-sata.txt b/Documentation/devicetree/bindings/ata/exynos-sata.txt
new file mode 100644
index 000000000000..0849f1025e34
--- /dev/null
+++ b/Documentation/devicetree/bindings/ata/exynos-sata.txt
@@ -0,0 +1,17 @@
1* Samsung AHCI SATA Controller
2
3SATA nodes are defined to describe on-chip Serial ATA controllers.
4Each SATA controller should have its own node.
5
6Required properties:
7- compatible : compatible list, contains "samsung,exynos5-sata"
8- interrupts : <interrupt mapping for SATA IRQ>
9- reg : <registers mapping>
10- samsung,sata-freq : <frequency in MHz>
11
12Example:
13 sata@ffe08000 {
14 compatible = "samsung,exynos5-sata";
15 reg = <0xffe08000 0x1000>;
16 interrupts = <115>;
17 };
diff --git a/Documentation/devicetree/bindings/bus/omap-ocp2scp.txt b/Documentation/devicetree/bindings/bus/omap-ocp2scp.txt
index d2fe064a828b..63dd8051521c 100644
--- a/Documentation/devicetree/bindings/bus/omap-ocp2scp.txt
+++ b/Documentation/devicetree/bindings/bus/omap-ocp2scp.txt
@@ -2,9 +2,27 @@
2 2
3properties: 3properties:
4- compatible : Should be "ti,omap-ocp2scp" 4- compatible : Should be "ti,omap-ocp2scp"
5- reg : Address and length of the register set for the device
5- #address-cells, #size-cells : Must be present if the device has sub-nodes 6- #address-cells, #size-cells : Must be present if the device has sub-nodes
6- ranges : the child address space are mapped 1:1 onto the parent address space 7- ranges : the child address space are mapped 1:1 onto the parent address space
7- ti,hwmods : must be "ocp2scp_usb_phy" 8- ti,hwmods : must be "ocp2scp_usb_phy"
8 9
9Sub-nodes: 10Sub-nodes:
10All the devices connected to ocp2scp are described using sub-node to ocp2scp 11All the devices connected to ocp2scp are described using sub-node to ocp2scp
12
13ocp2scp@4a0ad000 {
14 compatible = "ti,omap-ocp2scp";
15 reg = <0x4a0ad000 0x1f>;
16 #address-cells = <1>;
17 #size-cells = <1>;
18 ranges;
19 ti,hwmods = "ocp2scp_usb_phy";
20
21 subnode1 {
22 ...
23 };
24
25 subnode2 {
26 ...
27 };
28};
diff --git a/Documentation/devicetree/bindings/bus/ti-gpmc.txt b/Documentation/devicetree/bindings/bus/ti-gpmc.txt
new file mode 100644
index 000000000000..5ddb2e9efaaa
--- /dev/null
+++ b/Documentation/devicetree/bindings/bus/ti-gpmc.txt
@@ -0,0 +1,84 @@
1Device tree bindings for OMAP general purpose memory controllers (GPMC)
2
3The actual devices are instantiated from the child nodes of a GPMC node.
4
5Required properties:
6
7 - compatible: Should be set to one of the following:
8
9 ti,omap2420-gpmc (omap2420)
10 ti,omap2430-gpmc (omap2430)
11 ti,omap3430-gpmc (omap3430 & omap3630)
12 ti,omap4430-gpmc (omap4430 & omap4460 & omap543x)
13 ti,am3352-gpmc (am335x devices)
14
15 - reg: A resource specifier for the register space
16 (see the example below)
17 - ti,hwmods: Should be set to "ti,gpmc" until the DT transition is
18 completed.
19 - #address-cells: Must be set to 2 to allow memory address translation
20 - #size-cells: Must be set to 1 to allow CS address passing
21 - gpmc,num-cs: The maximum number of chip-select lines that controller
22 can support.
23 - gpmc,num-waitpins: The maximum number of wait pins that controller can
24 support.
25 - ranges: Must be set up to reflect the memory layout with four
26 integer values for each chip-select line in use:
27
28 <cs-number> 0 <physical address of mapping> <size>
29
30 Currently, calculated values derived from the contents
31 of the per-CS register GPMC_CONFIG7 (as set up by the
32 bootloader) are used for the physical address decoding.
33 As this will change in the future, filling correct
34 values here is a requirement.
35
36Timing properties for child nodes. All are optional and default to 0.
37
38 - gpmc,sync-clk: Minimum clock period for synchronous mode, in picoseconds
39
40 Chip-select signal timings corresponding to GPMC_CONFIG2:
41 - gpmc,cs-on: Assertion time
42 - gpmc,cs-rd-off: Read deassertion time
43 - gpmc,cs-wr-off: Write deassertion time
44
45 ADV signal timings corresponding to GPMC_CONFIG3:
46 - gpmc,adv-on: Assertion time
47 - gpmc,adv-rd-off: Read deassertion time
48 - gpmc,adv-wr-off: Write deassertion time
49
50 WE signals timings corresponding to GPMC_CONFIG4:
51 - gpmc,we-on: Assertion time
52 - gpmc,we-off: Deassertion time
53
54 OE signals timings corresponding to GPMC_CONFIG4:
55 - gpmc,oe-on: Assertion time
56 - gpmc,oe-off: Deassertion time
57
58 Access time and cycle time timings corresponding to GPMC_CONFIG5:
59 - gpmc,page-burst-access: Multiple access word delay
60 - gpmc,access: Start-cycle to first data valid delay
61 - gpmc,rd-cycle: Total read cycle time
62 - gpmc,wr-cycle: Total write cycle time
63
64The following are only applicable to OMAP3+ and AM335x:
65 - gpmc,wr-access
66 - gpmc,wr-data-mux-bus
67
68
69Example for an AM33xx board:
70
71 gpmc: gpmc@50000000 {
72 compatible = "ti,am3352-gpmc";
73 ti,hwmods = "gpmc";
74 reg = <0x50000000 0x2000>;
75 interrupts = <100>;
76
77 gpmc,num-cs = <8>;
78 gpmc,num-waitpins = <2>;
79 #address-cells = <2>;
80 #size-cells = <1>;
81 ranges = <0 0 0x08000000 0x10000000>; /* CS0 @addr 0x8000000, size 0x10000000 */
82
83 /* child nodes go here */
84 };
diff --git a/Documentation/devicetree/bindings/clock/imx23-clock.txt b/Documentation/devicetree/bindings/clock/imx23-clock.txt
index a0b867ef8d96..5083c0b834b2 100644
--- a/Documentation/devicetree/bindings/clock/imx23-clock.txt
+++ b/Documentation/devicetree/bindings/clock/imx23-clock.txt
@@ -52,7 +52,7 @@ clocks and IDs.
52 lcdif 38 52 lcdif 38
53 etm 39 53 etm 39
54 usb 40 54 usb 40
55 usb_pwr 41 55 usb_phy 41
56 56
57Examples: 57Examples:
58 58
@@ -60,11 +60,6 @@ clks: clkctrl@80040000 {
60 compatible = "fsl,imx23-clkctrl"; 60 compatible = "fsl,imx23-clkctrl";
61 reg = <0x80040000 0x2000>; 61 reg = <0x80040000 0x2000>;
62 #clock-cells = <1>; 62 #clock-cells = <1>;
63 clock-output-names =
64 ...
65 "uart", /* 32 */
66 ...
67 "end_of_list";
68}; 63};
69 64
70auart0: serial@8006c000 { 65auart0: serial@8006c000 {
diff --git a/Documentation/devicetree/bindings/clock/imx25-clock.txt b/Documentation/devicetree/bindings/clock/imx25-clock.txt
new file mode 100644
index 000000000000..db4f2f05c4d0
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/imx25-clock.txt
@@ -0,0 +1,158 @@
1* Clock bindings for Freescale i.MX25
2
3Required properties:
4- compatible: Should be "fsl,imx25-ccm"
5- reg: Address and length of the register set
6- interrupts: Should contain CCM interrupt
7- #clock-cells: Should be <1>
8
9The clock consumer should specify the desired clock by having the clock
10ID in its "clocks" phandle cell. The following is a full list of i.MX25
11clocks and IDs.
12
13 Clock ID
14 ---------------------------
15 dummy 0
16 osc 1
17 mpll 2
18 upll 3
19 mpll_cpu_3_4 4
20 cpu_sel 5
21 cpu 6
22 ahb 7
23 usb_div 8
24 ipg 9
25 per0_sel 10
26 per1_sel 11
27 per2_sel 12
28 per3_sel 13
29 per4_sel 14
30 per5_sel 15
31 per6_sel 16
32 per7_sel 17
33 per8_sel 18
34 per9_sel 19
35 per10_sel 20
36 per11_sel 21
37 per12_sel 22
38 per13_sel 23
39 per14_sel 24
40 per15_sel 25
41 per0 26
42 per1 27
43 per2 28
44 per3 29
45 per4 30
46 per5 31
47 per6 32
48 per7 33
49 per8 34
50 per9 35
51 per10 36
52 per11 37
53 per12 38
54 per13 39
55 per14 40
56 per15 41
57 csi_ipg_per 42
58 epit_ipg_per 43
59 esai_ipg_per 44
60 esdhc1_ipg_per 45
61 esdhc2_ipg_per 46
62 gpt_ipg_per 47
63 i2c_ipg_per 48
64 lcdc_ipg_per 49
65 nfc_ipg_per 50
66 owire_ipg_per 51
67 pwm_ipg_per 52
68 sim1_ipg_per 53
69 sim2_ipg_per 54
70 ssi1_ipg_per 55
71 ssi2_ipg_per 56
72 uart_ipg_per 57
73 ata_ahb 58
74 reserved 59
75 csi_ahb 60
76 emi_ahb 61
77 esai_ahb 62
78 esdhc1_ahb 63
79 esdhc2_ahb 64
80 fec_ahb 65
81 lcdc_ahb 66
82 rtic_ahb 67
83 sdma_ahb 68
84 slcdc_ahb 69
85 usbotg_ahb 70
86 reserved 71
87 reserved 72
88 reserved 73
89 reserved 74
90 can1_ipg 75
91 can2_ipg 76
92 csi_ipg 77
93 cspi1_ipg 78
94 cspi2_ipg 79
95 cspi3_ipg 80
96 dryice_ipg 81
97 ect_ipg 82
98 epit1_ipg 83
99 epit2_ipg 84
100 reserved 85
101 esdhc1_ipg 86
102 esdhc2_ipg 87
103 fec_ipg 88
104 reserved 89
105 reserved 90
106 reserved 91
107 gpt1_ipg 92
108 gpt2_ipg 93
109 gpt3_ipg 94
110 gpt4_ipg 95
111 reserved 96
112 reserved 97
113 reserved 98
114 iim_ipg 99
115 reserved 100
116 reserved 101
117 kpp_ipg 102
118 lcdc_ipg 103
119 reserved 104
120 pwm1_ipg 105
121 pwm2_ipg 106
122 pwm3_ipg 107
123 pwm4_ipg 108
124 rngb_ipg 109
125 reserved 110
126 scc_ipg 111
127 sdma_ipg 112
128 sim1_ipg 113
129 sim2_ipg 114
130 slcdc_ipg 115
131 spba_ipg 116
132 ssi1_ipg 117
133 ssi2_ipg 118
134 tsc_ipg 119
135 uart1_ipg 120
136 uart2_ipg 121
137 uart3_ipg 122
138 uart4_ipg 123
139 uart5_ipg 124
140 reserved 125
141 wdt_ipg 126
142
143Examples:
144
145clks: ccm@53f80000 {
146 compatible = "fsl,imx25-ccm";
147 reg = <0x53f80000 0x4000>;
148 interrupts = <31>;
149};
150
151uart1: serial@43f90000 {
152 compatible = "fsl,imx25-uart", "fsl,imx21-uart";
153 reg = <0x43f90000 0x4000>;
154 interrupts = <45>;
155 clocks = <&clks 79>, <&clks 50>;
156 clock-names = "ipg", "per";
157 status = "disabled";
158};
diff --git a/Documentation/devicetree/bindings/clock/imx28-clock.txt b/Documentation/devicetree/bindings/clock/imx28-clock.txt
index aa2af2866fe8..e6587af62ff0 100644
--- a/Documentation/devicetree/bindings/clock/imx28-clock.txt
+++ b/Documentation/devicetree/bindings/clock/imx28-clock.txt
@@ -73,8 +73,8 @@ clocks and IDs.
73 can1 59 73 can1 59
74 usb0 60 74 usb0 60
75 usb1 61 75 usb1 61
76 usb0_pwr 62 76 usb0_phy 62
77 usb1_pwr 63 77 usb1_phy 63
78 enet_out 64 78 enet_out 64
79 79
80Examples: 80Examples:
@@ -83,11 +83,6 @@ clks: clkctrl@80040000 {
83 compatible = "fsl,imx28-clkctrl"; 83 compatible = "fsl,imx28-clkctrl";
84 reg = <0x80040000 0x2000>; 84 reg = <0x80040000 0x2000>;
85 #clock-cells = <1>; 85 #clock-cells = <1>;
86 clock-output-names =
87 ...
88 "uart", /* 45 */
89 ...
90 "end_of_list";
91}; 86};
92 87
93auart0: serial@8006a000 { 88auart0: serial@8006a000 {
diff --git a/Documentation/devicetree/bindings/clock/imx31-clock.txt b/Documentation/devicetree/bindings/clock/imx31-clock.txt
new file mode 100644
index 000000000000..19df842c694f
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/imx31-clock.txt
@@ -0,0 +1,91 @@
1* Clock bindings for Freescale i.MX31
2
3Required properties:
4- compatible: Should be "fsl,imx31-ccm"
5- reg: Address and length of the register set
6- interrupts: Should contain CCM interrupt
7- #clock-cells: Should be <1>
8
9The clock consumer should specify the desired clock by having the clock
10ID in its "clocks" phandle cell. The following is a full list of i.MX31
11clocks and IDs.
12
13 Clock ID
14 -----------------------
15 dummy 0
16 ckih 1
17 ckil 2
18 mpll 3
19 spll 4
20 upll 5
21 mcu_main 6
22 hsp 7
23 ahb 8
24 nfc 9
25 ipg 10
26 per_div 11
27 per 12
28 csi_sel 13
29 fir_sel 14
30 csi_div 15
31 usb_div_pre 16
32 usb_div_post 17
33 fir_div_pre 18
34 fir_div_post 19
35 sdhc1_gate 20
36 sdhc2_gate 21
37 gpt_gate 22
38 epit1_gate 23
39 epit2_gate 24
40 iim_gate 25
41 ata_gate 26
42 sdma_gate 27
43 cspi3_gate 28
44 rng_gate 29
45 uart1_gate 30
46 uart2_gate 31
47 ssi1_gate 32
48 i2c1_gate 33
49 i2c2_gate 34
50 i2c3_gate 35
51 hantro_gate 36
52 mstick1_gate 37
53 mstick2_gate 38
54 csi_gate 39
55 rtc_gate 40
56 wdog_gate 41
57 pwm_gate 42
58 sim_gate 43
59 ect_gate 44
60 usb_gate 45
61 kpp_gate 46
62 ipu_gate 47
63 uart3_gate 48
64 uart4_gate 49
65 uart5_gate 50
66 owire_gate 51
67 ssi2_gate 52
68 cspi1_gate 53
69 cspi2_gate 54
70 gacc_gate 55
71 emi_gate 56
72 rtic_gate 57
73 firi_gate 58
74
75Examples:
76
77clks: ccm@53f80000{
78 compatible = "fsl,imx31-ccm";
79 reg = <0x53f80000 0x4000>;
80 interrupts = <0 31 0x04 0 53 0x04>;
81 #clock-cells = <1>;
82};
83
84uart1: serial@43f90000 {
85 compatible = "fsl,imx31-uart", "fsl,imx21-uart";
86 reg = <0x43f90000 0x4000>;
87 interrupts = <45>;
88 clocks = <&clks 10>, <&clks 30>;
89 clock-names = "ipg", "per";
90 status = "disabled";
91};
diff --git a/Documentation/devicetree/bindings/clock/imx5-clock.txt b/Documentation/devicetree/bindings/clock/imx5-clock.txt
new file mode 100644
index 000000000000..2a0c904c46ae
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/imx5-clock.txt
@@ -0,0 +1,192 @@
1* Clock bindings for Freescale i.MX5
2
3Required properties:
4- compatible: Should be "fsl,<soc>-ccm" , where <soc> can be imx51 or imx53
5- reg: Address and length of the register set
6- interrupts: Should contain CCM interrupt
7- #clock-cells: Should be <1>
8
9The clock consumer should specify the desired clock by having the clock
10ID in its "clocks" phandle cell. The following is a full list of i.MX5
11clocks and IDs.
12
13 Clock ID
14 ---------------------------
15 dummy 0
16 ckil 1
17 osc 2
18 ckih1 3
19 ckih2 4
20 ahb 5
21 ipg 6
22 axi_a 7
23 axi_b 8
24 uart_pred 9
25 uart_root 10
26 esdhc_a_pred 11
27 esdhc_b_pred 12
28 esdhc_c_s 13
29 esdhc_d_s 14
30 emi_sel 15
31 emi_slow_podf 16
32 nfc_podf 17
33 ecspi_pred 18
34 ecspi_podf 19
35 usboh3_pred 20
36 usboh3_podf 21
37 usb_phy_pred 22
38 usb_phy_podf 23
39 cpu_podf 24
40 di_pred 25
41 tve_di 26
42 tve_s 27
43 uart1_ipg_gate 28
44 uart1_per_gate 29
45 uart2_ipg_gate 30
46 uart2_per_gate 31
47 uart3_ipg_gate 32
48 uart3_per_gate 33
49 i2c1_gate 34
50 i2c2_gate 35
51 gpt_ipg_gate 36
52 pwm1_ipg_gate 37
53 pwm1_hf_gate 38
54 pwm2_ipg_gate 39
55 pwm2_hf_gate 40
56 gpt_hf_gate 41
57 fec_gate 42
58 usboh3_per_gate 43
59 esdhc1_ipg_gate 44
60 esdhc2_ipg_gate 45
61 esdhc3_ipg_gate 46
62 esdhc4_ipg_gate 47
63 ssi1_ipg_gate 48
64 ssi2_ipg_gate 49
65 ssi3_ipg_gate 50
66 ecspi1_ipg_gate 51
67 ecspi1_per_gate 52
68 ecspi2_ipg_gate 53
69 ecspi2_per_gate 54
70 cspi_ipg_gate 55
71 sdma_gate 56
72 emi_slow_gate 57
73 ipu_s 58
74 ipu_gate 59
75 nfc_gate 60
76 ipu_di1_gate 61
77 vpu_s 62
78 vpu_gate 63
79 vpu_reference_gate 64
80 uart4_ipg_gate 65
81 uart4_per_gate 66
82 uart5_ipg_gate 67
83 uart5_per_gate 68
84 tve_gate 69
85 tve_pred 70
86 esdhc1_per_gate 71
87 esdhc2_per_gate 72
88 esdhc3_per_gate 73
89 esdhc4_per_gate 74
90 usb_phy_gate 75
91 hsi2c_gate 76
92 mipi_hsc1_gate 77
93 mipi_hsc2_gate 78
94 mipi_esc_gate 79
95 mipi_hsp_gate 80
96 ldb_di1_div_3_5 81
97 ldb_di1_div 82
98 ldb_di0_div_3_5 83
99 ldb_di0_div 84
100 ldb_di1_gate 85
101 can2_serial_gate 86
102 can2_ipg_gate 87
103 i2c3_gate 88
104 lp_apm 89
105 periph_apm 90
106 main_bus 91
107 ahb_max 92
108 aips_tz1 93
109 aips_tz2 94
110 tmax1 95
111 tmax2 96
112 tmax3 97
113 spba 98
114 uart_sel 99
115 esdhc_a_sel 100
116 esdhc_b_sel 101
117 esdhc_a_podf 102
118 esdhc_b_podf 103
119 ecspi_sel 104
120 usboh3_sel 105
121 usb_phy_sel 106
122 iim_gate 107
123 usboh3_gate 108
124 emi_fast_gate 109
125 ipu_di0_gate 110
126 gpc_dvfs 111
127 pll1_sw 112
128 pll2_sw 113
129 pll3_sw 114
130 ipu_di0_sel 115
131 ipu_di1_sel 116
132 tve_ext_sel 117
133 mx51_mipi 118
134 pll4_sw 119
135 ldb_di1_sel 120
136 di_pll4_podf 121
137 ldb_di0_sel 122
138 ldb_di0_gate 123
139 usb_phy1_gate 124
140 usb_phy2_gate 125
141 per_lp_apm 126
142 per_pred1 127
143 per_pred2 128
144 per_podf 129
145 per_root 130
146 ssi_apm 131
147 ssi1_root_sel 132
148 ssi2_root_sel 133
149 ssi3_root_sel 134
150 ssi_ext1_sel 135
151 ssi_ext2_sel 136
152 ssi_ext1_com_sel 137
153 ssi_ext2_com_sel 138
154 ssi1_root_pred 139
155 ssi1_root_podf 140
156 ssi2_root_pred 141
157 ssi2_root_podf 142
158 ssi_ext1_pred 143
159 ssi_ext1_podf 144
160 ssi_ext2_pred 145
161 ssi_ext2_podf 146
162 ssi1_root_gate 147
163 ssi2_root_gate 148
164 ssi3_root_gate 149
165 ssi_ext1_gate 150
166 ssi_ext2_gate 151
167 epit1_ipg_gate 152
168 epit1_hf_gate 153
169 epit2_ipg_gate 154
170 epit2_hf_gate 155
171 can_sel 156
172 can1_serial_gate 157
173 can1_ipg_gate 158
174 owire_gate 159
175
176Examples (for mx53):
177
178clks: ccm@53fd4000{
179 compatible = "fsl,imx53-ccm";
180 reg = <0x53fd4000 0x4000>;
181 interrupts = <0 71 0x04 0 72 0x04>;
182 #clock-cells = <1>;
183};
184
185can1: can@53fc8000 {
186 compatible = "fsl,imx53-flexcan", "fsl,p1010-flexcan";
187 reg = <0x53fc8000 0x4000>;
188 interrupts = <82>;
189 clocks = <&clks 158>, <&clks 157>;
190 clock-names = "ipg", "per";
191 status = "disabled";
192};
diff --git a/Documentation/devicetree/bindings/clock/imx6q-clock.txt b/Documentation/devicetree/bindings/clock/imx6q-clock.txt
index 492bd991d52a..969b38e06ad3 100644
--- a/Documentation/devicetree/bindings/clock/imx6q-clock.txt
+++ b/Documentation/devicetree/bindings/clock/imx6q-clock.txt
@@ -187,9 +187,9 @@ clocks and IDs.
187 pll3_usb_otg 172 187 pll3_usb_otg 172
188 pll4_audio 173 188 pll4_audio 173
189 pll5_video 174 189 pll5_video 174
190 pll6_mlb 175 190 pll8_mlb 175
191 pll7_usb_host 176 191 pll7_usb_host 176
192 pll8_enet 177 192 pll6_enet 177
193 ssi1_ipg 178 193 ssi1_ipg 178
194 ssi2_ipg 179 194 ssi2_ipg 179
195 ssi3_ipg 180 195 ssi3_ipg 180
@@ -198,6 +198,13 @@ clocks and IDs.
198 usbphy2 183 198 usbphy2 183
199 ldb_di0_div_3_5 184 199 ldb_di0_div_3_5 184
200 ldb_di1_div_3_5 185 200 ldb_di1_div_3_5 185
201 sata_ref 186
202 sata_ref_100m 187
203 pcie_ref 188
204 pcie_ref_125m 189
205 enet_ref 190
206 usbphy1_gate 191
207 usbphy2_gate 192
201 208
202Examples: 209Examples:
203 210
@@ -206,10 +213,6 @@ clks: ccm@020c4000 {
206 reg = <0x020c4000 0x4000>; 213 reg = <0x020c4000 0x4000>;
207 interrupts = <0 87 0x04 0 88 0x04>; 214 interrupts = <0 87 0x04 0 88 0x04>;
208 #clock-cells = <1>; 215 #clock-cells = <1>;
209 clock-output-names = ...
210 "uart_ipg",
211 "uart_serial",
212 ...;
213}; 216};
214 217
215uart1: serial@02020000 { 218uart1: serial@02020000 {
diff --git a/Documentation/devicetree/bindings/clock/mvebu-core-clock.txt b/Documentation/devicetree/bindings/clock/mvebu-core-clock.txt
new file mode 100644
index 000000000000..1e662948661e
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/mvebu-core-clock.txt
@@ -0,0 +1,47 @@
1* Core Clock bindings for Marvell MVEBU SoCs
2
3Marvell MVEBU SoCs usually allow to determine core clock frequencies by
4reading the Sample-At-Reset (SAR) register. The core clock consumer should
5specify the desired clock by having the clock ID in its "clocks" phandle cell.
6
7The following is a list of provided IDs and clock names on Armada 370/XP:
8 0 = tclk (Internal Bus clock)
9 1 = cpuclk (CPU clock)
10 2 = nbclk (L2 Cache clock)
11 3 = hclk (DRAM control clock)
12 4 = dramclk (DDR clock)
13
14The following is a list of provided IDs and clock names on Kirkwood and Dove:
15 0 = tclk (Internal Bus clock)
16 1 = cpuclk (CPU0 clock)
17 2 = l2clk (L2 Cache clock derived from CPU0 clock)
18 3 = ddrclk (DDR controller clock derived from CPU0 clock)
19
20Required properties:
21- compatible : shall be one of the following:
22 "marvell,armada-370-core-clock" - For Armada 370 SoC core clocks
23 "marvell,armada-xp-core-clock" - For Armada XP SoC core clocks
24 "marvell,dove-core-clock" - for Dove SoC core clocks
25 "marvell,kirkwood-core-clock" - for Kirkwood SoC (except mv88f6180)
26 "marvell,mv88f6180-core-clock" - for Kirkwood MV88f6180 SoC
27- reg : shall be the register address of the Sample-At-Reset (SAR) register
28- #clock-cells : from common clock binding; shall be set to 1
29
30Optional properties:
31- clock-output-names : from common clock binding; allows overwrite default clock
32 output names ("tclk", "cpuclk", "l2clk", "ddrclk")
33
34Example:
35
36core_clk: core-clocks@d0214 {
37 compatible = "marvell,dove-core-clock";
38 reg = <0xd0214 0x4>;
39 #clock-cells = <1>;
40};
41
42spi0: spi@10600 {
43 compatible = "marvell,orion-spi";
44 /* ... */
45 /* get tclk from core clock provider */
46 clocks = <&core_clk 0>;
47};
diff --git a/Documentation/devicetree/bindings/clock/mvebu-cpu-clock.txt b/Documentation/devicetree/bindings/clock/mvebu-cpu-clock.txt
new file mode 100644
index 000000000000..feb830130714
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/mvebu-cpu-clock.txt
@@ -0,0 +1,21 @@
1Device Tree Clock bindings for cpu clock of Marvell EBU platforms
2
3Required properties:
4- compatible : shall be one of the following:
5 "marvell,armada-xp-cpu-clock" - cpu clocks for Armada XP
6- reg : Address and length of the clock complex register set
7- #clock-cells : should be set to 1.
8- clocks : shall be the input parent clock phandle for the clock.
9
10cpuclk: clock-complex@d0018700 {
11 #clock-cells = <1>;
12 compatible = "marvell,armada-xp-cpu-clock";
13 reg = <0xd0018700 0xA0>;
14 clocks = <&coreclk 1>;
15}
16
17cpu@0 {
18 compatible = "marvell,sheeva-v7";
19 reg = <0>;
20 clocks = <&cpuclk 0>;
21};
diff --git a/Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt b/Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt
new file mode 100644
index 000000000000..cffc93d97f54
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt
@@ -0,0 +1,119 @@
1* Gated Clock bindings for Marvell Orion SoCs
2
3Marvell Dove and Kirkwood allow some peripheral clocks to be gated to save
4some power. The clock consumer should specify the desired clock by having
5the clock ID in its "clocks" phandle cell. The clock ID is directly mapped to
6the corresponding clock gating control bit in HW to ease manual clock lookup
7in datasheet.
8
9The following is a list of provided IDs for Armada 370:
10ID Clock Peripheral
11-----------------------------------
120 Audio AC97 Cntrl
131 pex0_en PCIe 0 Clock out
142 pex1_en PCIe 1 Clock out
153 ge1 Gigabit Ethernet 1
164 ge0 Gigabit Ethernet 0
175 pex0 PCIe Cntrl 0
189 pex1 PCIe Cntrl 1
1915 sata0 SATA Host 0
2017 sdio SDHCI Host
2125 tdm Time Division Mplx
2228 ddr DDR Cntrl
2330 sata1 SATA Host 0
24
25The following is a list of provided IDs for Armada XP:
26ID Clock Peripheral
27-----------------------------------
280 audio Audio Cntrl
291 ge3 Gigabit Ethernet 3
302 ge2 Gigabit Ethernet 2
313 ge1 Gigabit Ethernet 1
324 ge0 Gigabit Ethernet 0
335 pex0 PCIe Cntrl 0
346 pex1 PCIe Cntrl 1
357 pex2 PCIe Cntrl 2
368 pex3 PCIe Cntrl 3
3713 bp
3814 sata0lnk
3915 sata0 SATA Host 0
4016 lcd LCD Cntrl
4117 sdio SDHCI Host
4218 usb0 USB Host 0
4319 usb1 USB Host 1
4420 usb2 USB Host 2
4522 xor0 XOR DMA 0
4623 crypto CESA engine
4725 tdm Time Division Mplx
4828 xor1 XOR DMA 1
4929 sata1lnk
5030 sata1 SATA Host 0
51
52The following is a list of provided IDs for Dove:
53ID Clock Peripheral
54-----------------------------------
550 usb0 USB Host 0
561 usb1 USB Host 1
572 ge Gigabit Ethernet
583 sata SATA Host
594 pex0 PCIe Cntrl 0
605 pex1 PCIe Cntrl 1
618 sdio0 SDHCI Host 0
629 sdio1 SDHCI Host 1
6310 nand NAND Cntrl
6411 camera Camera Cntrl
6512 i2s0 I2S Cntrl 0
6613 i2s1 I2S Cntrl 1
6715 crypto CESA engine
6821 ac97 AC97 Cntrl
6922 pdma Peripheral DMA
7023 xor0 XOR DMA 0
7124 xor1 XOR DMA 1
7230 gephy Gigabit Ethernel PHY
73Note: gephy(30) is implemented as a parent clock of ge(2)
74
75The following is a list of provided IDs for Kirkwood:
76ID Clock Peripheral
77-----------------------------------
780 ge0 Gigabit Ethernet 0
792 pex0 PCIe Cntrl 0
803 usb0 USB Host 0
814 sdio SDIO Cntrl
825 tsu Transp. Stream Unit
836 dunit SDRAM Cntrl
847 runit Runit
858 xor0 XOR DMA 0
869 audio I2S Cntrl 0
8714 sata0 SATA Host 0
8815 sata1 SATA Host 1
8916 xor1 XOR DMA 1
9017 crypto CESA engine
9118 pex1 PCIe Cntrl 1
9219 ge1 Gigabit Ethernet 1
9320 tdm Time Division Mplx
94
95Required properties:
96- compatible : shall be one of the following:
97 "marvell,dove-gating-clock" - for Dove SoC clock gating
98 "marvell,kirkwood-gating-clock" - for Kirkwood SoC clock gating
99- reg : shall be the register address of the Clock Gating Control register
100- #clock-cells : from common clock binding; shall be set to 1
101
102Optional properties:
103- clocks : default parent clock phandle (e.g. tclk)
104
105Example:
106
107gate_clk: clock-gating-control@d0038 {
108 compatible = "marvell,dove-gating-clock";
109 reg = <0xd0038 0x4>;
110 /* default parent clock is tclk */
111 clocks = <&core_clk 0>;
112 #clock-cells = <1>;
113};
114
115sdio0: sdio@92000 {
116 compatible = "marvell,dove-sdhci";
117 /* get clk gate bit 8 (sdio0) */
118 clocks = <&gate_clk 8>;
119};
diff --git a/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt b/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt
new file mode 100644
index 000000000000..0921fac73528
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt
@@ -0,0 +1,205 @@
1NVIDIA Tegra20 Clock And Reset Controller
2
3This binding uses the common clock binding:
4Documentation/devicetree/bindings/clock/clock-bindings.txt
5
6The CAR (Clock And Reset) Controller on Tegra is the HW module responsible
7for muxing and gating Tegra's clocks, and setting their rates.
8
9Required properties :
10- compatible : Should be "nvidia,tegra20-car"
11- reg : Should contain CAR registers location and length
12- clocks : Should contain phandle and clock specifiers for two clocks:
13 the 32 KHz "32k_in", and the board-specific oscillator "osc".
14- #clock-cells : Should be 1.
15 In clock consumers, this cell represents the clock ID exposed by the CAR.
16
17 The first 96 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB
18 registers. These IDs often match those in the CAR's RST_DEVICES registers,
19 but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In
20 this case, those clocks are assigned IDs above 95 in order to highlight
21 this issue. Implementations that interpret these clock IDs as bit values
22 within the CLK_OUT_ENB or RST_DEVICES registers should be careful to
23 explicitly handle these special cases.
24
25 The balance of the clocks controlled by the CAR are assigned IDs of 96 and
26 above.
27
28 0 cpu
29 1 unassigned
30 2 unassigned
31 3 ac97
32 4 rtc
33 5 tmr
34 6 uart1
35 7 unassigned (register bit affects uart2 and vfir)
36 8 gpio
37 9 sdmmc2
38 10 unassigned (register bit affects spdif_in and spdif_out)
39 11 i2s1
40 12 i2c1
41 13 ndflash
42 14 sdmmc1
43 15 sdmmc4
44 16 twc
45 17 pwm
46 18 i2s2
47 19 epp
48 20 unassigned (register bit affects vi and vi_sensor)
49 21 2d
50 22 usbd
51 23 isp
52 24 3d
53 25 ide
54 26 disp2
55 27 disp1
56 28 host1x
57 29 vcp
58 30 unassigned
59 31 cache2
60
61 32 mem
62 33 ahbdma
63 34 apbdma
64 35 unassigned
65 36 kbc
66 37 stat_mon
67 38 pmc
68 39 fuse
69 40 kfuse
70 41 sbc1
71 42 snor
72 43 spi1
73 44 sbc2
74 45 xio
75 46 sbc3
76 47 dvc
77 48 dsi
78 49 unassigned (register bit affects tvo and cve)
79 50 mipi
80 51 hdmi
81 52 csi
82 53 tvdac
83 54 i2c2
84 55 uart3
85 56 unassigned
86 57 emc
87 58 usb2
88 59 usb3
89 60 mpe
90 61 vde
91 62 bsea
92 63 bsev
93
94 64 speedo
95 65 uart4
96 66 uart5
97 67 i2c3
98 68 sbc4
99 69 sdmmc3
100 70 pcie
101 71 owr
102 72 afi
103 73 csite
104 74 unassigned
105 75 avpucq
106 76 la
107 77 unassigned
108 78 unassigned
109 79 unassigned
110 80 unassigned
111 81 unassigned
112 82 unassigned
113 83 unassigned
114 84 irama
115 85 iramb
116 86 iramc
117 87 iramd
118 88 cram2
119 89 audio_2x a/k/a audio_2x_sync_clk
120 90 clk_d
121 91 unassigned
122 92 sus
123 93 cdev1
124 94 cdev2
125 95 unassigned
126
127 96 uart2
128 97 vfir
129 98 spdif_in
130 99 spdif_out
131 100 vi
132 101 vi_sensor
133 102 tvo
134 103 cve
135 104 osc
136 105 clk_32k a/k/a clk_s
137 106 clk_m
138 107 sclk
139 108 cclk
140 109 hclk
141 110 pclk
142 111 blink
143 112 pll_a
144 113 pll_a_out0
145 114 pll_c
146 115 pll_c_out1
147 116 pll_d
148 117 pll_d_out0
149 118 pll_e
150 119 pll_m
151 120 pll_m_out1
152 121 pll_p
153 122 pll_p_out1
154 123 pll_p_out2
155 124 pll_p_out3
156 125 pll_p_out4
157 126 pll_s
158 127 pll_u
159 128 pll_x
160 129 cop a/k/a avp
161 130 audio a/k/a audio_sync_clk
162 131 pll_ref
163 132 twd
164
165Example SoC include file:
166
167/ {
168 tegra_car: clock {
169 compatible = "nvidia,tegra20-car";
170 reg = <0x60006000 0x1000>;
171 #clock-cells = <1>;
172 };
173
174 usb@c5004000 {
175 clocks = <&tegra_car 58>; /* usb2 */
176 };
177};
178
179Example board file:
180
181/ {
182 clocks {
183 compatible = "simple-bus";
184 #address-cells = <1>;
185 #size-cells = <0>;
186
187 osc: clock@0 {
188 compatible = "fixed-clock";
189 reg = <0>;
190 #clock-cells = <0>;
191 clock-frequency = <12000000>;
192 };
193
194 clk_32k: clock@1 {
195 compatible = "fixed-clock";
196 reg = <1>;
197 #clock-cells = <0>;
198 clock-frequency = <32768>;
199 };
200 };
201
202 &tegra_car {
203 clocks = <&clk_32k> <&osc>;
204 };
205};
diff --git a/Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt b/Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt
new file mode 100644
index 000000000000..f3da3be5fcad
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt
@@ -0,0 +1,262 @@
1NVIDIA Tegra30 Clock And Reset Controller
2
3This binding uses the common clock binding:
4Documentation/devicetree/bindings/clock/clock-bindings.txt
5
6The CAR (Clock And Reset) Controller on Tegra is the HW module responsible
7for muxing and gating Tegra's clocks, and setting their rates.
8
9Required properties :
10- compatible : Should be "nvidia,tegra30-car"
11- reg : Should contain CAR registers location and length
12- clocks : Should contain phandle and clock specifiers for two clocks:
13 the 32 KHz "32k_in", and the board-specific oscillator "osc".
14- #clock-cells : Should be 1.
15 In clock consumers, this cell represents the clock ID exposed by the CAR.
16
17 The first 130 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB
18 registers. These IDs often match those in the CAR's RST_DEVICES registers,
19 but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In
20 this case, those clocks are assigned IDs above 160 in order to highlight
21 this issue. Implementations that interpret these clock IDs as bit values
22 within the CLK_OUT_ENB or RST_DEVICES registers should be careful to
23 explicitly handle these special cases.
24
25 The balance of the clocks controlled by the CAR are assigned IDs of 160 and
26 above.
27
28 0 cpu
29 1 unassigned
30 2 unassigned
31 3 unassigned
32 4 rtc
33 5 timer
34 6 uarta
35 7 unassigned (register bit affects uartb and vfir)
36 8 gpio
37 9 sdmmc2
38 10 unassigned (register bit affects spdif_in and spdif_out)
39 11 i2s1
40 12 i2c1
41 13 ndflash
42 14 sdmmc1
43 15 sdmmc4
44 16 unassigned
45 17 pwm
46 18 i2s2
47 19 epp
48 20 unassigned (register bit affects vi and vi_sensor)
49 21 2d
50 22 usbd
51 23 isp
52 24 3d
53 25 unassigned
54 26 disp2
55 27 disp1
56 28 host1x
57 29 vcp
58 30 i2s0
59 31 cop_cache
60
61 32 mc
62 33 ahbdma
63 34 apbdma
64 35 unassigned
65 36 kbc
66 37 statmon
67 38 pmc
68 39 unassigned (register bit affects fuse and fuse_burn)
69 40 kfuse
70 41 sbc1
71 42 nor
72 43 unassigned
73 44 sbc2
74 45 unassigned
75 46 sbc3
76 47 i2c5
77 48 dsia
78 49 unassigned (register bit affects cve and tvo)
79 50 mipi
80 51 hdmi
81 52 csi
82 53 tvdac
83 54 i2c2
84 55 uartc
85 56 unassigned
86 57 emc
87 58 usb2
88 59 usb3
89 60 mpe
90 61 vde
91 62 bsea
92 63 bsev
93
94 64 speedo
95 65 uartd
96 66 uarte
97 67 i2c3
98 68 sbc4
99 69 sdmmc3
100 70 pcie
101 71 owr
102 72 afi
103 73 csite
104 74 pciex
105 75 avpucq
106 76 la
107 77 unassigned
108 78 unassigned
109 79 dtv
110 80 ndspeed
111 81 i2cslow
112 82 dsib
113 83 unassigned
114 84 irama
115 85 iramb
116 86 iramc
117 87 iramd
118 88 cram2
119 89 unassigned
120 90 audio_2x a/k/a audio_2x_sync_clk
121 91 unassigned
122 92 csus
123 93 cdev2
124 94 cdev1
125 95 unassigned
126
127 96 cpu_g
128 97 cpu_lp
129 98 3d2
130 99 mselect
131 100 tsensor
132 101 i2s3
133 102 i2s4
134 103 i2c4
135 104 sbc5
136 105 sbc6
137 106 d_audio
138 107 apbif
139 108 dam0
140 109 dam1
141 110 dam2
142 111 hda2codec_2x
143 112 atomics
144 113 audio0_2x
145 114 audio1_2x
146 115 audio2_2x
147 116 audio3_2x
148 117 audio4_2x
149 118 audio5_2x
150 119 actmon
151 120 extern1
152 121 extern2
153 122 extern3
154 123 sata_oob
155 124 sata
156 125 hda
157 127 se
158 128 hda2hdmi
159 129 sata_cold
160
161 160 uartb
162 161 vfir
163 162 spdif_in
164 163 spdif_out
165 164 vi
166 165 vi_sensor
167 166 fuse
168 167 fuse_burn
169 168 cve
170 169 tvo
171
172 170 clk_32k
173 171 clk_m
174 172 clk_m_div2
175 173 clk_m_div4
176 174 pll_ref
177 175 pll_c
178 176 pll_c_out1
179 177 pll_m
180 178 pll_m_out1
181 179 pll_p
182 180 pll_p_out1
183 181 pll_p_out2
184 182 pll_p_out3
185 183 pll_p_out4
186 184 pll_a
187 185 pll_a_out0
188 186 pll_d
189 187 pll_d_out0
190 188 pll_d2
191 189 pll_d2_out0
192 190 pll_u
193 191 pll_x
194 192 pll_x_out0
195 193 pll_e
196 194 spdif_in_sync
197 195 i2s0_sync
198 196 i2s1_sync
199 197 i2s2_sync
200 198 i2s3_sync
201 199 i2s4_sync
202 200 vimclk
203 201 audio0
204 202 audio1
205 203 audio2
206 204 audio3
207 205 audio4
208 206 audio5
209 207 clk_out_1 (extern1)
210 208 clk_out_2 (extern2)
211 209 clk_out_3 (extern3)
212 210 sclk
213 211 blink
214 212 cclk_g
215 213 cclk_lp
216 214 twd
217 215 cml0
218 216 cml1
219 217 hclk
220 218 pclk
221
222Example SoC include file:
223
224/ {
225 tegra_car: clock {
226 compatible = "nvidia,tegra30-car";
227 reg = <0x60006000 0x1000>;
228 #clock-cells = <1>;
229 };
230
231 usb@c5004000 {
232 clocks = <&tegra_car 58>; /* usb2 */
233 };
234};
235
236Example board file:
237
238/ {
239 clocks {
240 compatible = "simple-bus";
241 #address-cells = <1>;
242 #size-cells = <0>;
243
244 osc: clock@0 {
245 compatible = "fixed-clock";
246 reg = <0>;
247 #clock-cells = <0>;
248 clock-frequency = <12000000>;
249 };
250
251 clk_32k: clock@1 {
252 compatible = "fixed-clock";
253 reg = <1>;
254 #clock-cells = <0>;
255 clock-frequency = <32768>;
256 };
257 };
258
259 &tegra_car {
260 clocks = <&clk_32k> <&osc>;
261 };
262};
diff --git a/Documentation/devicetree/bindings/clock/prima2-clock.txt b/Documentation/devicetree/bindings/clock/prima2-clock.txt
new file mode 100644
index 000000000000..5016979c0f78
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/prima2-clock.txt
@@ -0,0 +1,73 @@
1* Clock bindings for CSR SiRFprimaII
2
3Required properties:
4- compatible: Should be "sirf,prima2-clkc"
5- reg: Address and length of the register set
6- interrupts: Should contain clock controller interrupt
7- #clock-cells: Should be <1>
8
9The clock consumer should specify the desired clock by having the clock
10ID in its "clocks" phandle cell. The following is a full list of prima2
11clocks and IDs.
12
13 Clock ID
14 ---------------------------
15 rtc 0
16 osc 1
17 pll1 2
18 pll2 3
19 pll3 4
20 mem 5
21 sys 6
22 security 7
23 dsp 8
24 gps 9
25 mf 10
26 io 11
27 cpu 12
28 uart0 13
29 uart1 14
30 uart2 15
31 tsc 16
32 i2c0 17
33 i2c1 18
34 spi0 19
35 spi1 20
36 pwmc 21
37 efuse 22
38 pulse 23
39 dmac0 24
40 dmac1 25
41 nand 26
42 audio 27
43 usp0 28
44 usp1 29
45 usp2 30
46 vip 31
47 gfx 32
48 mm 33
49 lcd 34
50 vpp 35
51 mmc01 36
52 mmc23 37
53 mmc45 38
54 usbpll 39
55 usb0 40
56 usb1 41
57
58Examples:
59
60clks: clock-controller@88000000 {
61 compatible = "sirf,prima2-clkc";
62 reg = <0x88000000 0x1000>;
63 interrupts = <3>;
64 #clock-cells = <1>;
65};
66
67i2c0: i2c@b00e0000 {
68 cell-index = <0>;
69 compatible = "sirf,prima2-i2c";
70 reg = <0xb00e0000 0x10000>;
71 interrupts = <24>;
72 clocks = <&clks 17>;
73};
diff --git a/Documentation/devicetree/bindings/clock/zynq-7000.txt b/Documentation/devicetree/bindings/clock/zynq-7000.txt
new file mode 100644
index 000000000000..23ae1db1bc13
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/zynq-7000.txt
@@ -0,0 +1,55 @@
1Device Tree Clock bindings for the Zynq 7000 EPP
2
3The Zynq EPP has several different clk providers, each with there own bindings.
4The purpose of this document is to document their usage.
5
6See clock_bindings.txt for more information on the generic clock bindings.
7See Chapter 25 of Zynq TRM for more information about Zynq clocks.
8
9== PLLs ==
10
11Used to describe the ARM_PLL, DDR_PLL, and IO_PLL.
12
13Required properties:
14- #clock-cells : shall be 0 (only one clock is output from this node)
15- compatible : "xlnx,zynq-pll"
16- reg : pair of u32 values, which are the address offsets within the SLCR
17 of the relevant PLL_CTRL register and PLL_CFG register respectively
18- clocks : phandle for parent clock. should be the phandle for ps_clk
19
20Optional properties:
21- clock-output-names : name of the output clock
22
23Example:
24 armpll: armpll {
25 #clock-cells = <0>;
26 compatible = "xlnx,zynq-pll";
27 clocks = <&ps_clk>;
28 reg = <0x100 0x110>;
29 clock-output-names = "armpll";
30 };
31
32== Peripheral clocks ==
33
34Describes clock node for the SDIO, SMC, SPI, QSPI, and UART clocks.
35
36Required properties:
37- #clock-cells : shall be 1
38- compatible : "xlnx,zynq-periph-clock"
39- reg : a single u32 value, describing the offset within the SLCR where
40 the CLK_CTRL register is found for this peripheral
41- clocks : phandle for parent clocks. should hold phandles for
42 the IO_PLL, ARM_PLL, and DDR_PLL in order
43- clock-output-names : names of the output clock(s). For peripherals that have
44 two output clocks (for example, the UART), two clocks
45 should be listed.
46
47Example:
48 uart_clk: uart_clk {
49 #clock-cells = <1>;
50 compatible = "xlnx,zynq-periph-clock";
51 clocks = <&iopll &armpll &ddrpll>;
52 reg = <0x154>;
53 clock-output-names = "uart0_ref_clk",
54 "uart1_ref_clk";
55 };
diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-spear.txt b/Documentation/devicetree/bindings/cpufreq/cpufreq-spear.txt
new file mode 100644
index 000000000000..f3d44984d91c
--- /dev/null
+++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-spear.txt
@@ -0,0 +1,42 @@
1SPEAr cpufreq driver
2-------------------
3
4SPEAr SoC cpufreq driver for CPU frequency scaling.
5It supports both uniprocessor (UP) and symmetric multiprocessor (SMP) systems
6which share clock across all CPUs.
7
8Required properties:
9- cpufreq_tbl: Table of frequencies CPU could be transitioned into, in the
10 increasing order.
11
12Optional properties:
13- clock-latency: Specify the possible maximum transition latency for clock, in
14 unit of nanoseconds.
15
16Both required and optional properties listed above must be defined under node
17/cpus/cpu@0.
18
19Examples:
20--------
21cpus {
22
23 <...>
24
25 cpu@0 {
26 compatible = "arm,cortex-a9";
27 reg = <0>;
28
29 <...>
30
31 cpufreq_tbl = < 166000
32 200000
33 250000
34 300000
35 400000
36 500000
37 600000 >;
38 };
39
40 <...>
41
42};
diff --git a/Documentation/devicetree/bindings/crypto/fsl-sec4.txt b/Documentation/devicetree/bindings/crypto/fsl-sec4.txt
index bd7ce120bc13..e4022776ac6e 100644
--- a/Documentation/devicetree/bindings/crypto/fsl-sec4.txt
+++ b/Documentation/devicetree/bindings/crypto/fsl-sec4.txt
@@ -56,6 +56,12 @@ PROPERTIES
56 Value type: <string> 56 Value type: <string>
57 Definition: Must include "fsl,sec-v4.0" 57 Definition: Must include "fsl,sec-v4.0"
58 58
59 - fsl,sec-era
60 Usage: optional
61 Value type: <u32>
62 Definition: A standard property. Define the 'ERA' of the SEC
63 device.
64
59 - #address-cells 65 - #address-cells
60 Usage: required 66 Usage: required
61 Value type: <u32> 67 Value type: <u32>
@@ -107,6 +113,7 @@ PROPERTIES
107EXAMPLE 113EXAMPLE
108 crypto@300000 { 114 crypto@300000 {
109 compatible = "fsl,sec-v4.0"; 115 compatible = "fsl,sec-v4.0";
116 fsl,sec-era = <2>;
110 #address-cells = <1>; 117 #address-cells = <1>;
111 #size-cells = <1>; 118 #size-cells = <1>;
112 reg = <0x300000 0x10000>; 119 reg = <0x300000 0x10000>;
diff --git a/Documentation/devicetree/bindings/dma/arm-pl330.txt b/Documentation/devicetree/bindings/dma/arm-pl330.txt
index 36e27d54260b..267565894db9 100644
--- a/Documentation/devicetree/bindings/dma/arm-pl330.txt
+++ b/Documentation/devicetree/bindings/dma/arm-pl330.txt
@@ -10,7 +10,11 @@ Required properties:
10 - interrupts: interrupt number to the cpu. 10 - interrupts: interrupt number to the cpu.
11 11
12Optional properties: 12Optional properties:
13- dma-coherent : Present if dma operations are coherent 13 - dma-coherent : Present if dma operations are coherent
14 - #dma-cells: must be <1>. used to represent the number of integer
15 cells in the dmas property of client device.
16 - dma-channels: contains the total number of DMA channels supported by the DMAC
17 - dma-requests: contains the total number of DMA requests supported by the DMAC
14 18
15Example: 19Example:
16 20
@@ -18,16 +22,23 @@ Example:
18 compatible = "arm,pl330", "arm,primecell"; 22 compatible = "arm,pl330", "arm,primecell";
19 reg = <0x12680000 0x1000>; 23 reg = <0x12680000 0x1000>;
20 interrupts = <99>; 24 interrupts = <99>;
25 #dma-cells = <1>;
26 #dma-channels = <8>;
27 #dma-requests = <32>;
21 }; 28 };
22 29
23Client drivers (device nodes requiring dma transfers from dev-to-mem or 30Client drivers (device nodes requiring dma transfers from dev-to-mem or
24mem-to-dev) should specify the DMA channel numbers using a two-value pair 31mem-to-dev) should specify the DMA channel numbers and dma channel names
25as shown below. 32as shown below.
26 33
27 [property name] = <[phandle of the dma controller] [dma request id]>; 34 [property name] = <[phandle of the dma controller] [dma request id]>;
35 [property name] = <[dma channel name]>
28 36
29 where 'dma request id' is the dma request number which is connected 37 where 'dma request id' is the dma request number which is connected
30 to the client controller. The 'property name' is recommended to be 38 to the client controller. The 'property name' 'dmas' and 'dma-names'
31 of the form <name>-dma-channel. 39 as required by the generic dma device tree binding helpers. The dma
40 names correspond 1:1 with the dma request ids in the dmas property.
32 41
33 Example: tx-dma-channel = <&pdma0 12>; 42 Example: dmas = <&pdma0 12
43 &pdma1 11>;
44 dma-names = "tx", "rx";
diff --git a/Documentation/devicetree/bindings/dma/dma.txt b/Documentation/devicetree/bindings/dma/dma.txt
new file mode 100644
index 000000000000..8f504e6bae14
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/dma.txt
@@ -0,0 +1,81 @@
1* Generic DMA Controller and DMA request bindings
2
3Generic binding to provide a way for a driver using DMA Engine to retrieve the
4DMA request or channel information that goes from a hardware device to a DMA
5controller.
6
7
8* DMA controller
9
10Required property:
11- #dma-cells: Must be at least 1. Used to provide DMA controller
12 specific information. See DMA client binding below for
13 more details.
14
15Optional properties:
16- dma-channels: Number of DMA channels supported by the controller.
17- dma-requests: Number of DMA requests signals supported by the
18 controller.
19
20Example:
21
22 dma: dma@48000000 {
23 compatible = "ti,omap-sdma";
24 reg = <0x48000000 0x1000>;
25 interrupts = <0 12 0x4
26 0 13 0x4
27 0 14 0x4
28 0 15 0x4>;
29 #dma-cells = <1>;
30 dma-channels = <32>;
31 dma-requests = <127>;
32 };
33
34
35* DMA client
36
37Client drivers should specify the DMA property using a phandle to the controller
38followed by DMA controller specific data.
39
40Required property:
41- dmas: List of one or more DMA specifiers, each consisting of
42 - A phandle pointing to DMA controller node
43 - A number of integer cells, as determined by the
44 #dma-cells property in the node referenced by phandle
45 containing DMA controller specific information. This
46 typically contains a DMA request line number or a
47 channel number, but can contain any data that is used
48 required for configuring a channel.
49- dma-names: Contains one identifier string for each DMA specifier in
50 the dmas property. The specific strings that can be used
51 are defined in the binding of the DMA client device.
52 Multiple DMA specifiers can be used to represent
53 alternatives and in this case the dma-names for those
54 DMA specifiers must be identical (see examples).
55
56Examples:
57
581. A device with one DMA read channel, one DMA write channel:
59
60 i2c1: i2c@1 {
61 ...
62 dmas = <&dma 2 /* read channel */
63 &dma 3>; /* write channel */
64 dma-names = "rx", "tx";
65 ...
66 };
67
682. A single read-write channel with three alternative DMA controllers:
69
70 dmas = <&dma1 5
71 &dma2 7
72 &dma3 2>;
73 dma-names = "rx-tx", "rx-tx", "rx-tx";
74
753. A device with three channels, one of which has two alternatives:
76
77 dmas = <&dma1 2 /* read channel */
78 &dma1 3 /* write channel */
79 &dma2 0 /* error read */
80 &dma3 0>; /* alternative error read */
81 dma-names = "rx", "tx", "error", "error";
diff --git a/Documentation/devicetree/bindings/dma/mv-xor.txt b/Documentation/devicetree/bindings/dma/mv-xor.txt
new file mode 100644
index 000000000000..7c6cb7fcecd2
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/mv-xor.txt
@@ -0,0 +1,40 @@
1* Marvell XOR engines
2
3Required properties:
4- compatible: Should be "marvell,orion-xor"
5- reg: Should contain registers location and length (two sets)
6 the first set is the low registers, the second set the high
7 registers for the XOR engine.
8- clocks: pointer to the reference clock
9
10The DT node must also contains sub-nodes for each XOR channel that the
11XOR engine has. Those sub-nodes have the following required
12properties:
13- interrupts: interrupt of the XOR channel
14
15And the following optional properties:
16- dmacap,memcpy to indicate that the XOR channel is capable of memcpy operations
17- dmacap,memset to indicate that the XOR channel is capable of memset operations
18- dmacap,xor to indicate that the XOR channel is capable of xor operations
19
20Example:
21
22xor@d0060900 {
23 compatible = "marvell,orion-xor";
24 reg = <0xd0060900 0x100
25 0xd0060b00 0x100>;
26 clocks = <&coreclk 0>;
27 status = "okay";
28
29 xor00 {
30 interrupts = <51>;
31 dmacap,memcpy;
32 dmacap,xor;
33 };
34 xor01 {
35 interrupts = <52>;
36 dmacap,memcpy;
37 dmacap,xor;
38 dmacap,memset;
39 };
40};
diff --git a/Documentation/devicetree/bindings/dma/snps-dma.txt b/Documentation/devicetree/bindings/dma/snps-dma.txt
index c0d85dbcada5..d58675ea1abf 100644
--- a/Documentation/devicetree/bindings/dma/snps-dma.txt
+++ b/Documentation/devicetree/bindings/dma/snps-dma.txt
@@ -3,15 +3,61 @@
3Required properties: 3Required properties:
4- compatible: "snps,dma-spear1340" 4- compatible: "snps,dma-spear1340"
5- reg: Address range of the DMAC registers 5- reg: Address range of the DMAC registers
6- interrupt: Should contain the DMAC interrupt number
7- dma-channels: Number of channels supported by hardware
8- dma-requests: Number of DMA request lines supported, up to 16
9- dma-masters: Number of AHB masters supported by the controller
10- #dma-cells: must be <3>
11- chan_allocation_order: order of allocation of channel, 0 (default): ascending,
12 1: descending
13- chan_priority: priority of channels. 0 (default): increase from chan 0->n, 1:
14 increase from chan n->0
15- block_size: Maximum block size supported by the controller
16- data_width: Maximum data width supported by hardware per AHB master
17 (0 - 8bits, 1 - 16bits, ..., 5 - 256bits)
18
19
20Optional properties:
6- interrupt-parent: Should be the phandle for the interrupt controller 21- interrupt-parent: Should be the phandle for the interrupt controller
7 that services interrupts for this device 22 that services interrupts for this device
8- interrupt: Should contain the DMAC interrupt number 23- is_private: The device channels should be marked as private and not for by the
24 general purpose DMA channel allocator. False if not passed.
9 25
10Example: 26Example:
11 27
12 dma@fc000000 { 28 dmahost: dma@fc000000 {
13 compatible = "snps,dma-spear1340"; 29 compatible = "snps,dma-spear1340";
14 reg = <0xfc000000 0x1000>; 30 reg = <0xfc000000 0x1000>;
15 interrupt-parent = <&vic1>; 31 interrupt-parent = <&vic1>;
16 interrupts = <12>; 32 interrupts = <12>;
33
34 dma-channels = <8>;
35 dma-requests = <16>;
36 dma-masters = <2>;
37 #dma-cells = <3>;
38 chan_allocation_order = <1>;
39 chan_priority = <1>;
40 block_size = <0xfff>;
41 data_width = <3 3 0 0>;
42 };
43
44DMA clients connected to the Designware DMA controller must use the format
45described in the dma.txt file, using a four-cell specifier for each channel.
46The four cells in order are:
47
481. A phandle pointing to the DMA controller
492. The DMA request line number
503. Source master for transfers on allocated channel
514. Destination master for transfers on allocated channel
52
53Example:
54
55 serial@e0000000 {
56 compatible = "arm,pl011", "arm,primecell";
57 reg = <0xe0000000 0x1000>;
58 interrupts = <0 35 0x4>;
59 status = "disabled";
60 dmas = <&dmahost 12 0 1>,
61 <&dmahost 13 0 1 0>;
62 dma-names = "rx", "rx";
17 }; 63 };
diff --git a/Documentation/devicetree/bindings/drm/exynos/g2d.txt b/Documentation/devicetree/bindings/drm/exynos/g2d.txt
new file mode 100644
index 000000000000..1eb124d35a99
--- /dev/null
+++ b/Documentation/devicetree/bindings/drm/exynos/g2d.txt
@@ -0,0 +1,22 @@
1Samsung 2D Graphic Accelerator using DRM frame work
2
3Samsung FIMG2D is a graphics 2D accelerator which supports Bit Block Transfer.
4We set the drawing-context registers for configuring rendering parameters and
5then start rendering.
6This driver is for SOCs which contain G2D IPs with version 4.1.
7
8Required properties:
9 -compatible:
10 should be "samsung,exynos-g2d-41".
11 -reg:
12 physical base address of the controller and length
13 of memory mapped region.
14 -interrupts:
15 interrupt combiner values.
16
17Example:
18 g2d {
19 compatible = "samsung,exynos-g2d-41";
20 reg = <0x10850000 0x1000>;
21 interrupts = <0 91 0>;
22 };
diff --git a/Documentation/devicetree/bindings/drm/exynos/hdmi.txt b/Documentation/devicetree/bindings/drm/exynos/hdmi.txt
new file mode 100644
index 000000000000..589edee37394
--- /dev/null
+++ b/Documentation/devicetree/bindings/drm/exynos/hdmi.txt
@@ -0,0 +1,22 @@
1Device-Tree bindings for drm hdmi driver
2
3Required properties:
4- compatible: value should be "samsung,exynos5-hdmi".
5- reg: physical base address of the hdmi and length of memory mapped
6 region.
7- interrupts: interrupt number to the cpu.
8- hpd-gpio: following information about the hotplug gpio pin.
9 a) phandle of the gpio controller node.
10 b) pin number within the gpio controller.
11 c) pin function mode.
12 d) optional flags and pull up/down.
13 e) drive strength.
14
15Example:
16
17 hdmi {
18 compatible = "samsung,exynos5-hdmi";
19 reg = <0x14530000 0x100000>;
20 interrupts = <0 95 0>;
21 hpd-gpio = <&gpx3 7 0xf 1 3>;
22 };
diff --git a/Documentation/devicetree/bindings/drm/exynos/hdmiddc.txt b/Documentation/devicetree/bindings/drm/exynos/hdmiddc.txt
new file mode 100644
index 000000000000..fa166d945809
--- /dev/null
+++ b/Documentation/devicetree/bindings/drm/exynos/hdmiddc.txt
@@ -0,0 +1,12 @@
1Device-Tree bindings for hdmiddc driver
2
3Required properties:
4- compatible: value should be "samsung,exynos5-hdmiddc".
5- reg: I2C address of the hdmiddc device.
6
7Example:
8
9 hdmiddc {
10 compatible = "samsung,exynos5-hdmiddc";
11 reg = <0x50>;
12 };
diff --git a/Documentation/devicetree/bindings/drm/exynos/hdmiphy.txt b/Documentation/devicetree/bindings/drm/exynos/hdmiphy.txt
new file mode 100644
index 000000000000..858f4f9b902f
--- /dev/null
+++ b/Documentation/devicetree/bindings/drm/exynos/hdmiphy.txt
@@ -0,0 +1,12 @@
1Device-Tree bindings for hdmiphy driver
2
3Required properties:
4- compatible: value should be "samsung,exynos5-hdmiphy".
5- reg: I2C address of the hdmiphy device.
6
7Example:
8
9 hdmiphy {
10 compatible = "samsung,exynos5-hdmiphy";
11 reg = <0x38>;
12 };
diff --git a/Documentation/devicetree/bindings/drm/exynos/mixer.txt b/Documentation/devicetree/bindings/drm/exynos/mixer.txt
new file mode 100644
index 000000000000..9b2ea0343566
--- /dev/null
+++ b/Documentation/devicetree/bindings/drm/exynos/mixer.txt
@@ -0,0 +1,15 @@
1Device-Tree bindings for mixer driver
2
3Required properties:
4- compatible: value should be "samsung,exynos5-mixer".
5- reg: physical base address of the mixer and length of memory mapped
6 region.
7- interrupts: interrupt number to the cpu.
8
9Example:
10
11 mixer {
12 compatible = "samsung,exynos5-mixer";
13 reg = <0x14450000 0x10000>;
14 interrupts = <0 94 0>;
15 };
diff --git a/Documentation/devicetree/bindings/drm/tilcdc/panel.txt b/Documentation/devicetree/bindings/drm/tilcdc/panel.txt
new file mode 100644
index 000000000000..9301c330d1a6
--- /dev/null
+++ b/Documentation/devicetree/bindings/drm/tilcdc/panel.txt
@@ -0,0 +1,59 @@
1Device-Tree bindings for tilcdc DRM generic panel output driver
2
3Required properties:
4 - compatible: value should be "ti,tilcdc,panel".
5 - panel-info: configuration info to configure LCDC correctly for the panel
6 - ac-bias: AC Bias Pin Frequency
7 - ac-bias-intrpt: AC Bias Pin Transitions per Interrupt
8 - dma-burst-sz: DMA burst size
9 - bpp: Bits per pixel
10 - fdd: FIFO DMA Request Delay
11 - sync-edge: Horizontal and Vertical Sync Edge: 0=rising 1=falling
12 - sync-ctrl: Horizontal and Vertical Sync: Control: 0=ignore
13 - raster-order: Raster Data Order Select: 1=Most-to-least 0=Least-to-most
14 - fifo-th: DMA FIFO threshold
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'
17 should be the preferred/default resolution. Refer to
18 Documentation/devicetree/bindings/video/display-timing.txt for display
19 timing binding details.
20
21Recommended properties:
22 - pinctrl-names, pinctrl-0: the pincontrol settings to configure
23 muxing properly for pins that connect to TFP410 device
24
25Example:
26
27 /* Settings for CDTech_S035Q01 / LCD3 cape: */
28 lcd3 {
29 compatible = "ti,tilcdc,panel";
30 pinctrl-names = "default";
31 pinctrl-0 = <&bone_lcd3_cape_lcd_pins>;
32 panel-info {
33 ac-bias = <255>;
34 ac-bias-intrpt = <0>;
35 dma-burst-sz = <16>;
36 bpp = <16>;
37 fdd = <0x80>;
38 sync-edge = <0>;
39 sync-ctrl = <1>;
40 raster-order = <0>;
41 fifo-th = <0>;
42 };
43 display-timings {
44 native-mode = <&timing0>;
45 timing0: 320x240 {
46 hactive = <320>;
47 vactive = <240>;
48 hback-porch = <21>;
49 hfront-porch = <58>;
50 hsync-len = <47>;
51 vback-porch = <11>;
52 vfront-porch = <23>;
53 vsync-len = <2>;
54 clock-frequency = <8000000>;
55 hsync-active = <0>;
56 vsync-active = <0>;
57 };
58 };
59 };
diff --git a/Documentation/devicetree/bindings/drm/tilcdc/slave.txt b/Documentation/devicetree/bindings/drm/tilcdc/slave.txt
new file mode 100644
index 000000000000..3d2c52460dca
--- /dev/null
+++ b/Documentation/devicetree/bindings/drm/tilcdc/slave.txt
@@ -0,0 +1,18 @@
1Device-Tree bindings for tilcdc DRM encoder slave output driver
2
3Required properties:
4 - compatible: value should be "ti,tilcdc,slave".
5 - i2c: the phandle for the i2c device the encoder slave is connected to
6
7Recommended properties:
8 - pinctrl-names, pinctrl-0: the pincontrol settings to configure
9 muxing properly for pins that connect to TFP410 device
10
11Example:
12
13 hdmi {
14 compatible = "ti,tilcdc,slave";
15 i2c = <&i2c0>;
16 pinctrl-names = "default";
17 pinctrl-0 = <&nxp_hdmi_bonelt_pins>;
18 };
diff --git a/Documentation/devicetree/bindings/drm/tilcdc/tfp410.txt b/Documentation/devicetree/bindings/drm/tilcdc/tfp410.txt
new file mode 100644
index 000000000000..a58ae7756fc6
--- /dev/null
+++ b/Documentation/devicetree/bindings/drm/tilcdc/tfp410.txt
@@ -0,0 +1,21 @@
1Device-Tree bindings for tilcdc DRM TFP410 output driver
2
3Required properties:
4 - compatible: value should be "ti,tilcdc,tfp410".
5 - i2c: the phandle for the i2c device to use for DDC
6
7Recommended properties:
8 - pinctrl-names, pinctrl-0: the pincontrol settings to configure
9 muxing properly for pins that connect to TFP410 device
10 - powerdn-gpio: the powerdown GPIO, pulled low to power down the
11 TFP410 device (for DPMS_OFF)
12
13Example:
14
15 dvicape {
16 compatible = "ti,tilcdc,tfp410";
17 i2c = <&i2c2>;
18 pinctrl-names = "default";
19 pinctrl-0 = <&bone_dvi_cape_dvi_00A1_pins>;
20 powerdn-gpio = <&gpio2 31 0>;
21 };
diff --git a/Documentation/devicetree/bindings/drm/tilcdc/tilcdc.txt b/Documentation/devicetree/bindings/drm/tilcdc/tilcdc.txt
new file mode 100644
index 000000000000..e5f130159ae1
--- /dev/null
+++ b/Documentation/devicetree/bindings/drm/tilcdc/tilcdc.txt
@@ -0,0 +1,21 @@
1Device-Tree bindings for tilcdc DRM driver
2
3Required properties:
4 - compatible: value should be "ti,am33xx-tilcdc".
5 - interrupts: the interrupt number
6 - reg: base address and size of the LCDC device
7
8Recommended properties:
9 - interrupt-parent: the phandle for the interrupt controller that
10 services interrupts for this device.
11 - ti,hwmods: Name of the hwmod associated to the LCDC
12
13Example:
14
15 fb: fb@4830e000 {
16 compatible = "ti,am33xx-tilcdc";
17 reg = <0x4830e000 0x1000>;
18 interrupt-parent = <&intc>;
19 interrupts = <36>;
20 ti,hwmods = "lcdc";
21 };
diff --git a/Documentation/devicetree/bindings/gpio/gpio-poweroff.txt b/Documentation/devicetree/bindings/gpio/gpio-poweroff.txt
new file mode 100644
index 000000000000..d4eab9227ea4
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-poweroff.txt
@@ -0,0 +1,36 @@
1Driver a GPIO line that can be used to turn the power off.
2
3The driver supports both level triggered and edge triggered power off.
4At driver load time, the driver will request the given gpio line and
5install a pm_power_off handler. If the optional properties 'input' is
6not found, the GPIO line will be driven in the inactive
7state. Otherwise its configured as an input.
8
9When the pm_power_off is called, the gpio is configured as an output,
10and drive active, so triggering a level triggered power off
11condition. This will also cause an inactive->active edge condition, so
12triggering positive edge triggered power off. After a delay of 100ms,
13the GPIO is set to inactive, thus causing an active->inactive edge,
14triggering negative edge triggered power off. After another 100ms
15delay the GPIO is driver active again. If the power is still on and
16the CPU still running after a 3000ms delay, a WARN_ON(1) is emitted.
17
18Required properties:
19- compatible : should be "gpio-poweroff".
20- gpios : The GPIO to set high/low, see "gpios property" in
21 Documentation/devicetree/bindings/gpio/gpio.txt. If the pin should be
22 low to power down the board set it to "Active Low", otherwise set
23 gpio to "Active High".
24
25Optional properties:
26- input : Initially configure the GPIO line as an input. Only reconfigure
27 it to an output when the pm_power_off function is called. If this optional
28 property is not specified, the GPIO is initialized as an output in its
29 inactive state.
30
31Examples:
32
33gpio-poweroff {
34 compatible = "gpio-poweroff";
35 gpios = <&gpio 4 0>;
36};
diff --git a/Documentation/devicetree/bindings/gpio/gpio-stmpe.txt b/Documentation/devicetree/bindings/gpio/gpio-stmpe.txt
new file mode 100644
index 000000000000..a0e4cf885213
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-stmpe.txt
@@ -0,0 +1,18 @@
1STMPE gpio
2----------
3
4Required properties:
5 - compatible: "st,stmpe-gpio"
6
7Optional properties:
8 - st,norequest-mask: bitmask specifying which GPIOs should _not_ be requestable
9 due to different usage (e.g. touch, keypad)
10
11Node name must be stmpe_gpio and should be child node of stmpe node to which it
12belongs.
13
14Example:
15 stmpe_gpio {
16 compatible = "st,stmpe-gpio";
17 st,norequest-mask = <0x20>; //gpio 5 can't be used
18 };
diff --git a/Documentation/devicetree/bindings/gpio/gpio.txt b/Documentation/devicetree/bindings/gpio/gpio.txt
index 4e16ba4feab0..a33628759d36 100644
--- a/Documentation/devicetree/bindings/gpio/gpio.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio.txt
@@ -75,4 +75,40 @@ Example of two SOC GPIO banks defined as gpio-controller nodes:
75 gpio-controller; 75 gpio-controller;
76 }; 76 };
77 77
782.1) gpio-controller and pinctrl subsystem
79------------------------------------------
78 80
81gpio-controller on a SOC might be tightly coupled with the pinctrl
82subsystem, in the sense that the pins can be used by other functions
83together with optional gpio feature.
84
85While the pin allocation is totally managed by the pin ctrl subsystem,
86gpio (under gpiolib) is still maintained by gpio drivers. It may happen
87that different pin ranges in a SoC is managed by different gpio drivers.
88
89This makes it logical to let gpio drivers announce their pin ranges to
90the pin ctrl subsystem and call 'pinctrl_request_gpio' in order to
91request the corresponding pin before any gpio usage.
92
93For this, the gpio controller can use a pinctrl phandle and pins to
94announce the pinrange to the pin ctrl subsystem. For example,
95
96 qe_pio_e: gpio-controller@1460 {
97 #gpio-cells = <2>;
98 compatible = "fsl,qe-pario-bank-e", "fsl,qe-pario-bank";
99 reg = <0x1460 0x18>;
100 gpio-controller;
101 gpio-ranges = <&pinctrl1 20 10>, <&pinctrl2 50 20>;
102
103 }
104
105where,
106 &pinctrl1 and &pinctrl2 is the phandle to the pinctrl DT node.
107
108 Next values specify the base pin and number of pins for the range
109 handled by 'qe_pio_e' gpio. In the given example from base pin 20 to
110 pin 29 under pinctrl1 and pin 50 to pin 69 under pinctrl2 is handled
111 by this gpio controller.
112
113The pinctrl node must have "#gpio-range-cells" property to show number of
114arguments to pass with phandle from gpio controllers node.
diff --git a/Documentation/devicetree/bindings/gpio/gpio_atmel.txt b/Documentation/devicetree/bindings/gpio/gpio_atmel.txt
index 66efc804806a..85f8c0d084fa 100644
--- a/Documentation/devicetree/bindings/gpio/gpio_atmel.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio_atmel.txt
@@ -9,6 +9,10 @@ Required properties:
9 unused). 9 unused).
10- gpio-controller: Marks the device node as a GPIO controller. 10- gpio-controller: Marks the device node as a GPIO controller.
11 11
12optional properties:
13- #gpio-lines: Number of gpio if absent 32.
14
15
12Example: 16Example:
13 pioA: gpio@fffff200 { 17 pioA: gpio@fffff200 {
14 compatible = "atmel,at91rm9200-gpio"; 18 compatible = "atmel,at91rm9200-gpio";
@@ -16,5 +20,6 @@ Example:
16 interrupts = <2 4>; 20 interrupts = <2 4>;
17 #gpio-cells = <2>; 21 #gpio-cells = <2>;
18 gpio-controller; 22 gpio-controller;
23 #gpio-lines = <19>;
19 }; 24 };
20 25
diff --git a/Documentation/devicetree/bindings/gpio/spear_spics.txt b/Documentation/devicetree/bindings/gpio/spear_spics.txt
new file mode 100644
index 000000000000..96c37eb15075
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/spear_spics.txt
@@ -0,0 +1,50 @@
1=== ST Microelectronics SPEAr SPI CS Driver ===
2
3SPEAr platform provides a provision to control chipselects of ARM PL022 Prime
4Cell spi controller through its system registers, which otherwise remains under
5PL022 control. If chipselect remain under PL022 control then they would be
6released as soon as transfer is over and TxFIFO becomes empty. This is not
7desired by some of the device protocols above spi which expect (multiple)
8transfers without releasing their chipselects.
9
10Chipselects can be controlled by software by turning them as GPIOs. SPEAr
11provides another interface through system registers through which software can
12directly control each PL022 chipselect. Hence, it is natural for SPEAr to export
13the control of this interface as gpio.
14
15Required properties:
16
17 * compatible: should be defined as "st,spear-spics-gpio"
18 * reg: mentioning address range of spics controller
19 * st-spics,peripcfg-reg: peripheral configuration register offset
20 * st-spics,sw-enable-bit: bit offset to enable sw control
21 * st-spics,cs-value-bit: bit offset to drive chipselect low or high
22 * st-spics,cs-enable-mask: chip select number bit mask
23 * st-spics,cs-enable-shift: chip select number program offset
24 * gpio-controller: Marks the device node as gpio controller
25 * #gpio-cells: should be 1 and will mention chip select number
26
27All the above bit offsets are within peripcfg register.
28
29Example:
30-------
31spics: spics@e0700000{
32 compatible = "st,spear-spics-gpio";
33 reg = <0xe0700000 0x1000>;
34 st-spics,peripcfg-reg = <0x3b0>;
35 st-spics,sw-enable-bit = <12>;
36 st-spics,cs-value-bit = <11>;
37 st-spics,cs-enable-mask = <3>;
38 st-spics,cs-enable-shift = <8>;
39 gpio-controller;
40 #gpio-cells = <2>;
41};
42
43
44spi0: spi@e0100000 {
45 status = "okay";
46 num-cs = <3>;
47 cs-gpios = <&gpio1 7 0>, <&spics 0>,
48 <&spics 1>;
49 ...
50}
diff --git a/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt b/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt
new file mode 100644
index 000000000000..b4fa934ae3a2
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt
@@ -0,0 +1,191 @@
1NVIDIA Tegra host1x
2
3Required properties:
4- compatible: "nvidia,tegra<chip>-host1x"
5- reg: Physical base address and length of the controller's registers.
6- interrupts: The interrupt outputs from the controller.
7- #address-cells: The number of cells used to represent physical base addresses
8 in the host1x address space. Should be 1.
9- #size-cells: The number of cells used to represent the size of an address
10 range in the host1x address space. Should be 1.
11- ranges: The mapping of the host1x address space to the CPU address space.
12
13The host1x top-level node defines a number of children, each representing one
14of the following host1x client modules:
15
16- mpe: video encoder
17
18 Required properties:
19 - compatible: "nvidia,tegra<chip>-mpe"
20 - reg: Physical base address and length of the controller's registers.
21 - interrupts: The interrupt outputs from the controller.
22
23- vi: video input
24
25 Required properties:
26 - compatible: "nvidia,tegra<chip>-vi"
27 - reg: Physical base address and length of the controller's registers.
28 - interrupts: The interrupt outputs from the controller.
29
30- epp: encoder pre-processor
31
32 Required properties:
33 - compatible: "nvidia,tegra<chip>-epp"
34 - reg: Physical base address and length of the controller's registers.
35 - interrupts: The interrupt outputs from the controller.
36
37- isp: image signal processor
38
39 Required properties:
40 - compatible: "nvidia,tegra<chip>-isp"
41 - reg: Physical base address and length of the controller's registers.
42 - interrupts: The interrupt outputs from the controller.
43
44- gr2d: 2D graphics engine
45
46 Required properties:
47 - compatible: "nvidia,tegra<chip>-gr2d"
48 - reg: Physical base address and length of the controller's registers.
49 - interrupts: The interrupt outputs from the controller.
50
51- gr3d: 3D graphics engine
52
53 Required properties:
54 - compatible: "nvidia,tegra<chip>-gr3d"
55 - reg: Physical base address and length of the controller's registers.
56
57- dc: display controller
58
59 Required properties:
60 - compatible: "nvidia,tegra<chip>-dc"
61 - reg: Physical base address and length of the controller's registers.
62 - interrupts: The interrupt outputs from the controller.
63
64 Each display controller node has a child node, named "rgb", that represents
65 the RGB output associated with the controller. It can take the following
66 optional properties:
67 - nvidia,ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing
68 - nvidia,hpd-gpio: specifies a GPIO used for hotplug detection
69 - nvidia,edid: supplies a binary EDID blob
70
71- hdmi: High Definition Multimedia Interface
72
73 Required properties:
74 - compatible: "nvidia,tegra<chip>-hdmi"
75 - reg: Physical base address and length of the controller's registers.
76 - interrupts: The interrupt outputs from the controller.
77 - vdd-supply: regulator for supply voltage
78 - pll-supply: regulator for PLL
79
80 Optional properties:
81 - nvidia,ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing
82 - nvidia,hpd-gpio: specifies a GPIO used for hotplug detection
83 - nvidia,edid: supplies a binary EDID blob
84
85- tvo: TV encoder output
86
87 Required properties:
88 - compatible: "nvidia,tegra<chip>-tvo"
89 - reg: Physical base address and length of the controller's registers.
90 - interrupts: The interrupt outputs from the controller.
91
92- dsi: display serial interface
93
94 Required properties:
95 - compatible: "nvidia,tegra<chip>-dsi"
96 - reg: Physical base address and length of the controller's registers.
97
98Example:
99
100/ {
101 ...
102
103 host1x {
104 compatible = "nvidia,tegra20-host1x", "simple-bus";
105 reg = <0x50000000 0x00024000>;
106 interrupts = <0 65 0x04 /* mpcore syncpt */
107 0 67 0x04>; /* mpcore general */
108
109 #address-cells = <1>;
110 #size-cells = <1>;
111
112 ranges = <0x54000000 0x54000000 0x04000000>;
113
114 mpe {
115 compatible = "nvidia,tegra20-mpe";
116 reg = <0x54040000 0x00040000>;
117 interrupts = <0 68 0x04>;
118 };
119
120 vi {
121 compatible = "nvidia,tegra20-vi";
122 reg = <0x54080000 0x00040000>;
123 interrupts = <0 69 0x04>;
124 };
125
126 epp {
127 compatible = "nvidia,tegra20-epp";
128 reg = <0x540c0000 0x00040000>;
129 interrupts = <0 70 0x04>;
130 };
131
132 isp {
133 compatible = "nvidia,tegra20-isp";
134 reg = <0x54100000 0x00040000>;
135 interrupts = <0 71 0x04>;
136 };
137
138 gr2d {
139 compatible = "nvidia,tegra20-gr2d";
140 reg = <0x54140000 0x00040000>;
141 interrupts = <0 72 0x04>;
142 };
143
144 gr3d {
145 compatible = "nvidia,tegra20-gr3d";
146 reg = <0x54180000 0x00040000>;
147 };
148
149 dc@54200000 {
150 compatible = "nvidia,tegra20-dc";
151 reg = <0x54200000 0x00040000>;
152 interrupts = <0 73 0x04>;
153
154 rgb {
155 status = "disabled";
156 };
157 };
158
159 dc@54240000 {
160 compatible = "nvidia,tegra20-dc";
161 reg = <0x54240000 0x00040000>;
162 interrupts = <0 74 0x04>;
163
164 rgb {
165 status = "disabled";
166 };
167 };
168
169 hdmi {
170 compatible = "nvidia,tegra20-hdmi";
171 reg = <0x54280000 0x00040000>;
172 interrupts = <0 75 0x04>;
173 status = "disabled";
174 };
175
176 tvo {
177 compatible = "nvidia,tegra20-tvo";
178 reg = <0x542c0000 0x00040000>;
179 interrupts = <0 76 0x04>;
180 status = "disabled";
181 };
182
183 dsi {
184 compatible = "nvidia,tegra20-dsi";
185 reg = <0x54300000 0x00040000>;
186 status = "disabled";
187 };
188 };
189
190 ...
191};
diff --git a/Documentation/devicetree/bindings/hwmon/vexpress.txt b/Documentation/devicetree/bindings/hwmon/vexpress.txt
new file mode 100644
index 000000000000..9c27ed694bbb
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/vexpress.txt
@@ -0,0 +1,23 @@
1Versatile Express hwmon sensors
2-------------------------------
3
4Requires node properties:
5- "compatible" value : one of
6 "arm,vexpress-volt"
7 "arm,vexpress-amp"
8 "arm,vexpress-temp"
9 "arm,vexpress-power"
10 "arm,vexpress-energy"
11- "arm,vexpress-sysreg,func" when controlled via vexpress-sysreg
12 (see Documentation/devicetree/bindings/arm/vexpress-sysreg.txt
13 for more details)
14
15Optional node properties:
16- label : string describing the monitored value
17
18Example:
19 energy@0 {
20 compatible = "arm,vexpress-energy";
21 arm,vexpress-sysreg,func = <13 0>;
22 label = "A15 Jcore";
23 };
diff --git a/Documentation/devicetree/bindings/i2c/brcm,bcm2835-i2c.txt b/Documentation/devicetree/bindings/i2c/brcm,bcm2835-i2c.txt
new file mode 100644
index 000000000000..e9de3756752b
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/brcm,bcm2835-i2c.txt
@@ -0,0 +1,20 @@
1Broadcom BCM2835 I2C controller
2
3Required properties:
4- compatible : Should be "brcm,bcm2835-i2c".
5- reg: Should contain register location and length.
6- interrupts: Should contain interrupt.
7- clocks : The clock feeding the I2C controller.
8
9Recommended properties:
10- clock-frequency : desired I2C bus clock frequency in Hz.
11
12Example:
13
14i2c@20205000 {
15 compatible = "brcm,bcm2835-i2c";
16 reg = <0x7e205000 0x1000>;
17 interrupts = <2 21>;
18 clocks = <&clk_i2c>;
19 clock-frequency = <100000>;
20};
diff --git a/Documentation/devicetree/bindings/i2c/atmel-i2c.txt b/Documentation/devicetree/bindings/i2c/i2c-at91.txt
index b689a0d9441c..b689a0d9441c 100644
--- a/Documentation/devicetree/bindings/i2c/atmel-i2c.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-at91.txt
diff --git a/Documentation/devicetree/bindings/i2c/i2c-cbus-gpio.txt b/Documentation/devicetree/bindings/i2c/i2c-cbus-gpio.txt
new file mode 100644
index 000000000000..8ce9cd2855b5
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-cbus-gpio.txt
@@ -0,0 +1,27 @@
1Device tree bindings for i2c-cbus-gpio driver
2
3Required properties:
4 - compatible = "i2c-cbus-gpio";
5 - gpios: clk, dat, sel
6 - #address-cells = <1>;
7 - #size-cells = <0>;
8
9Optional properties:
10 - child nodes conforming to i2c bus binding
11
12Example:
13
14i2c@0 {
15 compatible = "i2c-cbus-gpio";
16 gpios = <&gpio 66 0 /* clk */
17 &gpio 65 0 /* dat */
18 &gpio 64 0 /* sel */
19 >;
20 #address-cells = <1>;
21 #size-cells = <0>;
22
23 retu-mfd: retu@1 {
24 compatible = "retu-mfd";
25 reg = <0x1>;
26 };
27};
diff --git a/Documentation/devicetree/bindings/i2c/davinci.txt b/Documentation/devicetree/bindings/i2c/i2c-davinci.txt
index 2dc935b4113d..2dc935b4113d 100644
--- a/Documentation/devicetree/bindings/i2c/davinci.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-davinci.txt
diff --git a/Documentation/devicetree/bindings/i2c/gpio-i2c.txt b/Documentation/devicetree/bindings/i2c/i2c-gpio.txt
index 4f8ec947c6bd..4f8ec947c6bd 100644
--- a/Documentation/devicetree/bindings/i2c/gpio-i2c.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-gpio.txt
diff --git a/Documentation/devicetree/bindings/i2c/fsl-imx-i2c.txt b/Documentation/devicetree/bindings/i2c/i2c-imx.txt
index f3cf43b66f7e..3614242e7732 100644
--- a/Documentation/devicetree/bindings/i2c/fsl-imx-i2c.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-imx.txt
@@ -12,13 +12,13 @@ Optional properties:
12Examples: 12Examples:
13 13
14i2c@83fc4000 { /* I2C2 on i.MX51 */ 14i2c@83fc4000 { /* I2C2 on i.MX51 */
15 compatible = "fsl,imx51-i2c", "fsl,imx1-i2c"; 15 compatible = "fsl,imx51-i2c", "fsl,imx21-i2c";
16 reg = <0x83fc4000 0x4000>; 16 reg = <0x83fc4000 0x4000>;
17 interrupts = <63>; 17 interrupts = <63>;
18}; 18};
19 19
20i2c@70038000 { /* HS-I2C on i.MX51 */ 20i2c@70038000 { /* HS-I2C on i.MX51 */
21 compatible = "fsl,imx51-i2c", "fsl,imx1-i2c"; 21 compatible = "fsl,imx51-i2c", "fsl,imx21-i2c";
22 reg = <0x70038000 0x4000>; 22 reg = <0x70038000 0x4000>;
23 interrupts = <64>; 23 interrupts = <64>;
24 clock-frequency = <400000>; 24 clock-frequency = <400000>;
diff --git a/Documentation/devicetree/bindings/i2c/fsl-i2c.txt b/Documentation/devicetree/bindings/i2c/i2c-mpc.txt
index 1eacd6b20ed5..1eacd6b20ed5 100644
--- a/Documentation/devicetree/bindings/i2c/fsl-i2c.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-mpc.txt
diff --git a/Documentation/devicetree/bindings/i2c/i2c-mux-gpio.txt b/Documentation/devicetree/bindings/i2c/i2c-mux-gpio.txt
new file mode 100644
index 000000000000..66709a825541
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-mux-gpio.txt
@@ -0,0 +1,81 @@
1GPIO-based I2C Bus Mux
2
3This binding describes an I2C bus multiplexer that uses GPIOs to
4route the I2C signals.
5
6 +-----+ +-----+
7 | dev | | dev |
8 +------------+ +-----+ +-----+
9 | SoC | | |
10 | | /--------+--------+
11 | +------+ | +------+ child bus A, on GPIO value set to 0
12 | | I2C |-|--| Mux |
13 | +------+ | +--+---+ child bus B, on GPIO value set to 1
14 | | | \----------+--------+--------+
15 | +------+ | | | | |
16 | | GPIO |-|-----+ +-----+ +-----+ +-----+
17 | +------+ | | dev | | dev | | dev |
18 +------------+ +-----+ +-----+ +-----+
19
20Required properties:
21- compatible: i2c-mux-gpio
22- i2c-parent: The phandle of the I2C bus that this multiplexer's master-side
23 port is connected to.
24- mux-gpios: list of gpios used to control the muxer
25* Standard I2C mux properties. See mux.txt in this directory.
26* I2C child bus nodes. See mux.txt in this directory.
27
28Optional properties:
29- idle-state: value to set the muxer to when idle. When no value is
30 given, it defaults to the last value used.
31
32For each i2c child node, an I2C child bus will be created. They will
33be numbered based on their order in the device tree.
34
35Whenever an access is made to a device on a child bus, the value set
36in the revelant node's reg property will be output using the list of
37GPIOs, the first in the list holding the least-significant value.
38
39If an idle state is defined, using the idle-state (optional) property,
40whenever an access is not being made to a device on a child bus, the
41GPIOs will be set according to the idle value.
42
43If an idle state is not defined, the most recently used value will be
44left programmed into hardware whenever no access is being made to a
45device on a child bus.
46
47Example:
48 i2cmux {
49 compatible = "i2c-mux-gpio";
50 #address-cells = <1>;
51 #size-cells = <0>;
52 mux-gpios = <&gpio1 22 0 &gpio1 23 0>;
53 i2c-parent = <&i2c1>;
54
55 i2c@1 {
56 reg = <1>;
57 #address-cells = <1>;
58 #size-cells = <0>;
59
60 ssd1307: oled@3c {
61 compatible = "solomon,ssd1307fb-i2c";
62 reg = <0x3c>;
63 pwms = <&pwm 4 3000>;
64 reset-gpios = <&gpio2 7 1>;
65 reset-active-low;
66 };
67 };
68
69 i2c@3 {
70 reg = <3>;
71 #address-cells = <1>;
72 #size-cells = <0>;
73
74 pca9555: pca9555@20 {
75 compatible = "nxp,pca9555";
76 gpio-controller;
77 #gpio-cells = <2>;
78 reg = <0x20>;
79 };
80 };
81 };
diff --git a/Documentation/devicetree/bindings/i2c/mux.txt b/Documentation/devicetree/bindings/i2c/i2c-mux.txt
index af84cce5cd7b..af84cce5cd7b 100644
--- a/Documentation/devicetree/bindings/i2c/mux.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-mux.txt
diff --git a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
new file mode 100644
index 000000000000..f46d928aa73d
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
@@ -0,0 +1,18 @@
1
2* Marvell MV64XXX I2C controller
3
4Required properties :
5
6 - reg : Offset and length of the register set for the device
7 - compatible : Should be "marvell,mv64xxx-i2c"
8 - interrupts : The interrupt number
9 - clock-frequency : Desired I2C bus clock frequency in Hz.
10
11Examples:
12
13 i2c@11000 {
14 compatible = "marvell,mv64xxx-i2c";
15 reg = <0x11000 0x20>;
16 interrupts = <29>;
17 clock-frequency = <100000>;
18 };
diff --git a/Documentation/devicetree/bindings/i2c/nomadik.txt b/Documentation/devicetree/bindings/i2c/i2c-nomadik.txt
index 72065b0ff680..72065b0ff680 100644
--- a/Documentation/devicetree/bindings/i2c/nomadik.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-nomadik.txt
diff --git a/Documentation/devicetree/bindings/i2c/i2c-ocores.txt b/Documentation/devicetree/bindings/i2c/i2c-ocores.txt
index c15781f4dc8c..1637c298a1b3 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-ocores.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-ocores.txt
@@ -1,7 +1,7 @@
1Device tree configuration for i2c-ocores 1Device tree configuration for i2c-ocores
2 2
3Required properties: 3Required properties:
4- compatible : "opencores,i2c-ocores" 4- compatible : "opencores,i2c-ocores" or "aeroflexgaisler,i2cmst"
5- reg : bus address start and address range size of device 5- reg : bus address start and address range size of device
6- interrupts : interrupt number 6- interrupts : interrupt number
7- clock-frequency : frequency of bus clock in Hz 7- clock-frequency : frequency of bus clock in Hz
diff --git a/Documentation/devicetree/bindings/i2c/cavium-i2c.txt b/Documentation/devicetree/bindings/i2c/i2c-octeon.txt
index dced82ebe31d..dced82ebe31d 100644
--- a/Documentation/devicetree/bindings/i2c/cavium-i2c.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-octeon.txt
diff --git a/Documentation/devicetree/bindings/i2c/omap-i2c.txt b/Documentation/devicetree/bindings/i2c/i2c-omap.txt
index 56564aa4b444..56564aa4b444 100644
--- a/Documentation/devicetree/bindings/i2c/omap-i2c.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-omap.txt
diff --git a/Documentation/devicetree/bindings/i2c/pnx.txt b/Documentation/devicetree/bindings/i2c/i2c-pnx.txt
index fe98ada33ee4..fe98ada33ee4 100644
--- a/Documentation/devicetree/bindings/i2c/pnx.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-pnx.txt
diff --git a/Documentation/devicetree/bindings/i2c/ce4100-i2c.txt b/Documentation/devicetree/bindings/i2c/i2c-pxa-pci-ce4100.txt
index 569b16248514..569b16248514 100644
--- a/Documentation/devicetree/bindings/i2c/ce4100-i2c.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-pxa-pci-ce4100.txt
diff --git a/Documentation/devicetree/bindings/i2c/mrvl-i2c.txt b/Documentation/devicetree/bindings/i2c/i2c-pxa.txt
index 0f7945019f6f..12b78ac507e9 100644
--- a/Documentation/devicetree/bindings/i2c/mrvl-i2c.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-pxa.txt
@@ -31,21 +31,3 @@ Examples:
31 reg = <0xd4025000 0x1000>; 31 reg = <0xd4025000 0x1000>;
32 interrupts = <58>; 32 interrupts = <58>;
33 }; 33 };
34
35* Marvell MV64XXX I2C controller
36
37Required properties :
38
39 - reg : Offset and length of the register set for the device
40 - compatible : Should be "marvell,mv64xxx-i2c"
41 - interrupts : The interrupt number
42 - clock-frequency : Desired I2C bus clock frequency in Hz.
43
44Examples:
45
46 i2c@11000 {
47 compatible = "marvell,mv64xxx-i2c";
48 reg = <0x11000 0x20>;
49 interrupts = <29>;
50 clock-frequency = <100000>;
51 };
diff --git a/Documentation/devicetree/bindings/i2c/samsung-i2c.txt b/Documentation/devicetree/bindings/i2c/i2c-s3c2410.txt
index b6cb5a12c672..f98d4c5b5cca 100644
--- a/Documentation/devicetree/bindings/i2c/samsung-i2c.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-s3c2410.txt
@@ -8,16 +8,24 @@ Required properties:
8 (b) "samsung, s3c2440-i2c", for i2c compatible with s3c2440 i2c. 8 (b) "samsung, s3c2440-i2c", for i2c compatible with s3c2440 i2c.
9 (c) "samsung, s3c2440-hdmiphy-i2c", for s3c2440-like i2c used 9 (c) "samsung, s3c2440-hdmiphy-i2c", for s3c2440-like i2c used
10 inside HDMIPHY block found on several samsung SoCs 10 inside HDMIPHY block found on several samsung SoCs
11 (d) "samsung, exynos5440-i2c", for s3c2440-like i2c used
12 on EXYNOS5440 which does not need GPIO configuration.
11 - reg: physical base address of the controller and length of memory mapped 13 - reg: physical base address of the controller and length of memory mapped
12 region. 14 region.
13 - interrupts: interrupt number to the cpu. 15 - interrupts: interrupt number to the cpu.
14 - samsung,i2c-sda-delay: Delay (in ns) applied to data line (SDA) edges. 16 - samsung,i2c-sda-delay: Delay (in ns) applied to data line (SDA) edges.
15 17
18Required for all cases except "samsung,s3c2440-hdmiphy-i2c":
19 - Samsung GPIO variant (deprecated):
20 - gpios: The order of the gpios should be the following: <SDA, SCL>.
21 The gpio specifier depends on the gpio controller. Required in all
22 cases except for "samsung,s3c2440-hdmiphy-i2c" whose input/output
23 lines are permanently wired to the respective clienta
24 - Pinctrl variant (preferred, if available):
25 - pinctrl-0: Pin control group to be used for this controller.
26 - pinctrl-names: Should contain only one value - "default".
27
16Optional properties: 28Optional properties:
17 - gpios: The order of the gpios should be the following: <SDA, SCL>.
18 The gpio specifier depends on the gpio controller. Required in all
19 cases except for "samsung,s3c2440-hdmiphy-i2c" whose input/output
20 lines are permanently wired to the respective client
21 - samsung,i2c-slave-addr: Slave address in multi-master enviroment. If not 29 - samsung,i2c-slave-addr: Slave address in multi-master enviroment. If not
22 specified, default value is 0. 30 specified, default value is 0.
23 - samsung,i2c-max-bus-freq: Desired frequency in Hz of the bus. If not 31 - samsung,i2c-max-bus-freq: Desired frequency in Hz of the bus. If not
@@ -31,8 +39,14 @@ Example:
31 interrupts = <345>; 39 interrupts = <345>;
32 samsung,i2c-sda-delay = <100>; 40 samsung,i2c-sda-delay = <100>;
33 samsung,i2c-max-bus-freq = <100000>; 41 samsung,i2c-max-bus-freq = <100000>;
42 /* Samsung GPIO variant begins here */
34 gpios = <&gpd1 2 0 /* SDA */ 43 gpios = <&gpd1 2 0 /* SDA */
35 &gpd1 3 0 /* SCL */>; 44 &gpd1 3 0 /* SCL */>;
45 /* Samsung GPIO variant ends here */
46 /* Pinctrl variant begins here */
47 pinctrl-0 = <&i2c3_bus>;
48 pinctrl-names = "default";
49 /* Pinctrl variant ends here */
36 #address-cells = <1>; 50 #address-cells = <1>;
37 #size-cells = <0>; 51 #size-cells = <0>;
38 52
diff --git a/Documentation/devicetree/bindings/i2c/sirf-i2c.txt b/Documentation/devicetree/bindings/i2c/i2c-sirf.txt
index 7baf9e133fa8..7baf9e133fa8 100644
--- a/Documentation/devicetree/bindings/i2c/sirf-i2c.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-sirf.txt
diff --git a/Documentation/devicetree/bindings/i2c/arm-versatile.txt b/Documentation/devicetree/bindings/i2c/i2c-versatile.txt
index 361d31c51b6f..361d31c51b6f 100644
--- a/Documentation/devicetree/bindings/i2c/arm-versatile.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-versatile.txt
diff --git a/Documentation/devicetree/bindings/i2c/xiic.txt b/Documentation/devicetree/bindings/i2c/i2c-xiic.txt
index ceabbe91ae44..ceabbe91ae44 100644
--- a/Documentation/devicetree/bindings/i2c/xiic.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-xiic.txt
diff --git a/Documentation/devicetree/bindings/i2c/ina209.txt b/Documentation/devicetree/bindings/i2c/ina209.txt
new file mode 100644
index 000000000000..9dd2bee80840
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/ina209.txt
@@ -0,0 +1,18 @@
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/i2c/max6697.txt b/Documentation/devicetree/bindings/i2c/max6697.txt
new file mode 100644
index 000000000000..5f793998e4a4
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/max6697.txt
@@ -0,0 +1,64 @@
1max6697 properties
2
3Required properties:
4- compatible:
5 Should be one of
6 maxim,max6581
7 maxim,max6602
8 maxim,max6622
9 maxim,max6636
10 maxim,max6689
11 maxim,max6693
12 maxim,max6694
13 maxim,max6697
14 maxim,max6698
15 maxim,max6699
16- reg: I2C address
17
18Optional properties:
19
20- smbus-timeout-disable
21 Set to disable SMBus timeout. If not specified, SMBus timeout will be
22 enabled.
23- extended-range-enable
24 Only valid for MAX6581. Set to enable extended temperature range.
25 Extended temperature will be disabled if not specified.
26- beta-compensation-enable
27 Only valid for MAX6693 and MX6694. Set to enable beta compensation on
28 remote temperature channel 1.
29 Beta compensation will be disabled if not specified.
30- alert-mask
31 Alert bit mask. Alert disabled for bits set.
32 Select bit 0 for local temperature, bit 1..7 for remote temperatures.
33 If not specified, alert will be enabled for all channels.
34- over-temperature-mask
35 Over-temperature bit mask. Over-temperature reporting disabled for
36 bits set.
37 Select bit 0 for local temperature, bit 1..7 for remote temperatures.
38 If not specified, over-temperature reporting will be enabled for all
39 channels.
40- resistance-cancellation
41 Boolean for all chips other than MAX6581. Set to enable resistance
42 cancellation on remote temperature channel 1.
43 For MAX6581, resistance cancellation enabled for all channels if
44 specified as boolean, otherwise as per bit mask specified.
45 Only supported for remote temperatures (bit 1..7).
46 If not specified, resistance cancellation will be disabled for all
47 channels.
48- transistor-ideality
49 For MAX6581 only. Two values; first is bit mask, second is ideality
50 select value as per MAX6581 data sheet. Select bit 1..7 for remote
51 channels.
52 Transistor ideality will be initialized to default (1.008) if not
53 specified.
54
55Example:
56
57temp-sensor@1a {
58 compatible = "maxim,max6697";
59 reg = <0x1a>;
60 smbus-timeout-disable;
61 resistance-cancellation;
62 alert-mask = <0x72>;
63 over-temperature-mask = <0x7f>;
64};
diff --git a/Documentation/devicetree/bindings/i2c/trivial-devices.txt b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
index 2f5322b119eb..446859fcdca4 100644
--- a/Documentation/devicetree/bindings/i2c/trivial-devices.txt
+++ b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
@@ -55,5 +55,7 @@ st-micro,24c256 i2c serial eeprom (24cxx)
55stm,m41t00 Serial Access TIMEKEEPER 55stm,m41t00 Serial Access TIMEKEEPER
56stm,m41t62 Serial real-time clock (RTC) with alarm 56stm,m41t62 Serial real-time clock (RTC) with alarm
57stm,m41t80 M41T80 - SERIAL ACCESS RTC WITH ALARMS 57stm,m41t80 M41T80 - SERIAL ACCESS RTC WITH ALARMS
58taos,tsl2550 Ambient Light Sensor with SMBUS/Two Wire Serial Interface
58ti,tsc2003 I2C Touch-Screen Controller 59ti,tsc2003 I2C Touch-Screen Controller
59ti,tmp102 Low Power Digital Temperature Sensor with SMBUS/Two Wire Serial Interface 60ti,tmp102 Low Power Digital Temperature Sensor with SMBUS/Two Wire Serial Interface
61ti,tmp275 Digital Temperature Sensor
diff --git a/Documentation/devicetree/bindings/input/lpc32xx-key.txt b/Documentation/devicetree/bindings/input/lpc32xx-key.txt
index 31afd5014c48..bcf62f856358 100644
--- a/Documentation/devicetree/bindings/input/lpc32xx-key.txt
+++ b/Documentation/devicetree/bindings/input/lpc32xx-key.txt
@@ -1,19 +1,22 @@
1NXP LPC32xx Key Scan Interface 1NXP LPC32xx Key Scan Interface
2 2
3This binding is based on the matrix-keymap binding with the following
4changes:
5
3Required Properties: 6Required Properties:
4- compatible: Should be "nxp,lpc3220-key" 7- compatible: Should be "nxp,lpc3220-key"
5- reg: Physical base address of the controller and length of memory mapped 8- reg: Physical base address of the controller and length of memory mapped
6 region. 9 region.
7- interrupts: The interrupt number to the cpu. 10- interrupts: The interrupt number to the cpu.
8- keypad,num-rows: Number of rows and columns, e.g. 1: 1x1, 6: 6x6
9- keypad,num-columns: Must be equal to keypad,num-rows since LPC32xx only
10 supports square matrices
11- nxp,debounce-delay-ms: Debounce delay in ms 11- nxp,debounce-delay-ms: Debounce delay in ms
12- nxp,scan-delay-ms: Repeated scan period in ms 12- nxp,scan-delay-ms: Repeated scan period in ms
13- linux,keymap: the key-code to be reported when the key is pressed 13- linux,keymap: the key-code to be reported when the key is pressed
14 and released, see also 14 and released, see also
15 Documentation/devicetree/bindings/input/matrix-keymap.txt 15 Documentation/devicetree/bindings/input/matrix-keymap.txt
16 16
17Note: keypad,num-rows and keypad,num-columns are required, and must be equal
18since LPC32xx only supports square matrices
19
17Example: 20Example:
18 21
19 key@40050000 { 22 key@40050000 {
diff --git a/Documentation/devicetree/bindings/input/matrix-keymap.txt b/Documentation/devicetree/bindings/input/matrix-keymap.txt
index 3cd8b98ccd2d..c54919fad17e 100644
--- a/Documentation/devicetree/bindings/input/matrix-keymap.txt
+++ b/Documentation/devicetree/bindings/input/matrix-keymap.txt
@@ -9,6 +9,12 @@ Required properties:
9 row << 24 | column << 16 | key-code 9 row << 24 | column << 16 | key-code
10 10
11Optional properties: 11Optional properties:
12Properties for the number of rows and columns are optional because some
13drivers will use fixed values for these.
14- keypad,num-rows: Number of row lines connected to the keypad controller.
15- keypad,num-columns: Number of column lines connected to the keypad
16 controller.
17
12Some users of this binding might choose to specify secondary keymaps for 18Some users of this binding might choose to specify secondary keymaps for
13cases where there is a modifier key such as a Fn key. Proposed names 19cases where there is a modifier key such as a Fn key. Proposed names
14for said properties are "linux,fn-keymap" or with another descriptive 20for said properties are "linux,fn-keymap" or with another descriptive
@@ -17,3 +23,5 @@ word for the modifier other from "Fn".
17Example: 23Example:
18 linux,keymap = < 0x00030012 24 linux,keymap = < 0x00030012
19 0x0102003a >; 25 0x0102003a >;
26 keypad,num-rows = <2>;
27 keypad,num-columns = <8>;
diff --git a/Documentation/devicetree/bindings/input/omap-keypad.txt b/Documentation/devicetree/bindings/input/omap-keypad.txt
index f2fa5e10493d..34ed1c60ff95 100644
--- a/Documentation/devicetree/bindings/input/omap-keypad.txt
+++ b/Documentation/devicetree/bindings/input/omap-keypad.txt
@@ -6,19 +6,16 @@ A key can be placed at each intersection of a unique row and a unique column.
6The keypad controller can sense a key-press and key-release and report the 6The keypad controller can sense a key-press and key-release and report the
7event using a interrupt to the cpu. 7event using a interrupt to the cpu.
8 8
9This binding is based on the matrix-keymap binding with the following
10changes:
11
12keypad,num-rows and keypad,num-columns are required.
13
9Required SoC Specific Properties: 14Required SoC Specific Properties:
10- compatible: should be one of the following 15- compatible: should be one of the following
11 - "ti,omap4-keypad": For controllers compatible with omap4 keypad 16 - "ti,omap4-keypad": For controllers compatible with omap4 keypad
12 controller. 17 controller.
13 18
14Required Board Specific Properties, in addition to those specified by
15the shared matrix-keyboard bindings:
16- keypad,num-rows: Number of row lines connected to the keypad
17 controller.
18
19- keypad,num-columns: Number of column lines connected to the
20 keypad controller.
21
22Optional Properties specific to linux: 19Optional Properties specific to linux:
23- linux,keypad-no-autorepeat: do no enable autorepeat feature. 20- linux,keypad-no-autorepeat: do no enable autorepeat feature.
24 21
diff --git a/Documentation/devicetree/bindings/input/tca8418_keypad.txt b/Documentation/devicetree/bindings/input/tca8418_keypad.txt
index 2a1538f0053f..255185009167 100644
--- a/Documentation/devicetree/bindings/input/tca8418_keypad.txt
+++ b/Documentation/devicetree/bindings/input/tca8418_keypad.txt
@@ -1,8 +1,10 @@
1This binding is based on the matrix-keymap binding with the following
2changes:
3
4keypad,num-rows and keypad,num-columns are required.
1 5
2Required properties: 6Required properties:
3- compatible: "ti,tca8418" 7- compatible: "ti,tca8418"
4- reg: the I2C address 8- reg: the I2C address
5- interrupts: IRQ line number, should trigger on falling edge 9- interrupts: IRQ line number, should trigger on falling edge
6- keypad,num-rows: The number of rows
7- keypad,num-columns: The number of columns
8- linux,keymap: Keys definitions, see keypad-matrix. 10- linux,keymap: Keys definitions, see keypad-matrix.
diff --git a/Documentation/devicetree/bindings/input/touchscreen/bu21013.txt b/Documentation/devicetree/bindings/input/touchscreen/bu21013.txt
new file mode 100644
index 000000000000..ca5a2c86480c
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/touchscreen/bu21013.txt
@@ -0,0 +1,28 @@
1* Rohm BU21013 Touch Screen
2
3Required properties:
4 - compatible : "rohm,bu21013_tp"
5 - reg : I2C device address
6
7Optional properties:
8 - touch-gpio : GPIO pin registering a touch event
9 - <supply_name>-supply : Phandle to a regulator supply
10 - rohm,touch-max-x : Maximum outward permitted limit in the X axis
11 - rohm,touch-max-y : Maximum outward permitted limit in the Y axis
12 - rohm,flip-x : Flip touch coordinates on the X axis
13 - rohm,flip-y : Flip touch coordinates on the Y axis
14
15Example:
16
17 i2c@80110000 {
18 bu21013_tp@0x5c {
19 compatible = "rohm,bu21013_tp";
20 reg = <0x5c>;
21 touch-gpio = <&gpio2 20 0x4>;
22 avdd-supply = <&ab8500_ldo_aux1_reg>;
23
24 rohm,touch-max-x = <384>;
25 rohm,touch-max-y = <704>;
26 rohm,flip-y;
27 };
28 };
diff --git a/Documentation/devicetree/bindings/interrupt-controller/allwinner,sunxi-ic.txt b/Documentation/devicetree/bindings/interrupt-controller/allwinner,sunxi-ic.txt
new file mode 100644
index 000000000000..7f9fb85f5456
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/allwinner,sunxi-ic.txt
@@ -0,0 +1,104 @@
1Allwinner Sunxi Interrupt Controller
2
3Required properties:
4
5- compatible : should be "allwinner,sunxi-ic"
6- reg : Specifies base physical address and size of the registers.
7- interrupt-controller : Identifies the node as an interrupt controller
8- #interrupt-cells : Specifies the number of cells needed to encode an
9 interrupt source. The value shall be 1.
10
11The interrupt sources are as follows:
12
130: ENMI
141: UART0
152: UART1
163: UART2
174: UART3
185: IR0
196: IR1
207: I2C0
218: I2C1
229: I2C2
2310: SPI0
2411: SPI1
2512: SPI2
2613: SPDIF
2714: AC97
2815: TS
2916: I2S
3017: UART4
3118: UART5
3219: UART6
3320: UART7
3421: KEYPAD
3522: TIMER0
3623: TIMER1
3724: TIMER2
3825: TIMER3
3926: CAN
4027: DMA
4128: PIO
4229: TOUCH_PANEL
4330: AUDIO_CODEC
4431: LRADC
4532: SDMC0
4633: SDMC1
4734: SDMC2
4835: SDMC3
4936: MEMSTICK
5037: NAND
5138: USB0
5239: USB1
5340: USB2
5441: SCR
5542: CSI0
5643: CSI1
5744: LCDCTRL0
5845: LCDCTRL1
5946: MP
6047: DEFEBE0
6148: DEFEBE1
6249: PMU
6350: SPI3
6451: TZASC
6552: PATA
6653: VE
6754: SS
6855: EMAC
6956: SATA
7057: GPS
7158: HDMI
7259: TVE
7360: ACE
7461: TVD
7562: PS2_0
7663: PS2_1
7764: USB3
7865: USB4
7966: PLE_PFM
8067: TIMER4
8168: TIMER5
8269: GPU_GP
8370: GPU_GPMMU
8471: GPU_PP0
8572: GPU_PPMMU0
8673: GPU_PMU
8774: GPU_RSV0
8875: GPU_RSV1
8976: GPU_RSV2
9077: GPU_RSV3
9178: GPU_RSV4
9279: GPU_RSV5
9380: GPU_RSV6
9482: SYNC_TIMER0
9583: SYNC_TIMER1
96
97Example:
98
99intc: interrupt-controller {
100 compatible = "allwinner,sunxi-ic";
101 reg = <0x01c20400 0x400>;
102 interrupt-controller;
103 #interrupt-cells = <2>;
104};
diff --git a/Documentation/devicetree/bindings/leds/common.txt b/Documentation/devicetree/bindings/leds/common.txt
new file mode 100644
index 000000000000..2d88816dd550
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/common.txt
@@ -0,0 +1,23 @@
1Common leds properties.
2
3Optional properties for child nodes:
4- label : The label for this LED. If omitted, the label is
5 taken from the node name (excluding the unit address).
6
7- linux,default-trigger : This parameter, if present, is a
8 string defining the trigger assigned to the LED. Current triggers are:
9 "backlight" - LED will act as a back-light, controlled by the framebuffer
10 system
11 "default-on" - LED will turn on (but for leds-gpio see "default-state"
12 property in Documentation/devicetree/bindings/gpio/led.txt)
13 "heartbeat" - LED "double" flashes at a load average based rate
14 "ide-disk" - LED indicates disk activity
15 "timer" - LED flashes at a fixed, configurable rate
16
17Examples:
18
19system-status {
20 label = "Status";
21 linux,default-trigger = "heartbeat";
22 ...
23};
diff --git a/Documentation/devicetree/bindings/gpio/led.txt b/Documentation/devicetree/bindings/leds/leds-gpio.txt
index edc83c1c0d54..df1b3080f6b8 100644
--- a/Documentation/devicetree/bindings/gpio/led.txt
+++ b/Documentation/devicetree/bindings/leds/leds-gpio.txt
@@ -10,16 +10,10 @@ LED sub-node properties:
10- gpios : Should specify the LED's GPIO, see "gpios property" in 10- gpios : Should specify the LED's GPIO, see "gpios property" in
11 Documentation/devicetree/bindings/gpio/gpio.txt. Active low LEDs should be 11 Documentation/devicetree/bindings/gpio/gpio.txt. Active low LEDs should be
12 indicated using flags in the GPIO specifier. 12 indicated using flags in the GPIO specifier.
13- label : (optional) The label for this LED. If omitted, the label is 13- label : (optional)
14 taken from the node name (excluding the unit address). 14 see Documentation/devicetree/bindings/leds/common.txt
15- linux,default-trigger : (optional) This parameter, if present, is a 15- linux,default-trigger : (optional)
16 string defining the trigger assigned to the LED. Current triggers are: 16 see Documentation/devicetree/bindings/leds/common.txt
17 "backlight" - LED will act as a back-light, controlled by the framebuffer
18 system
19 "default-on" - LED will turn on, but see "default-state" below
20 "heartbeat" - LED "double" flashes at a load average based rate
21 "ide-disk" - LED indicates disk activity
22 "timer" - LED flashes at a fixed, configurable rate
23- default-state: (optional) The initial state of the LED. Valid 17- default-state: (optional) The initial state of the LED. Valid
24 values are "on", "off", and "keep". If the LED is already on or off 18 values are "on", "off", and "keep". If the LED is already on or off
25 and the default-state property is set the to same value, then no 19 and the default-state property is set the to same value, then no
diff --git a/Documentation/devicetree/bindings/leds/leds-ns2.txt b/Documentation/devicetree/bindings/leds/leds-ns2.txt
new file mode 100644
index 000000000000..aef3aca34d2d
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/leds-ns2.txt
@@ -0,0 +1,26 @@
1Binding for dual-GPIO LED found on Network Space v2 (and parents).
2
3Required properties:
4- compatible: "lacie,ns2-leds".
5
6Each LED is represented as a sub-node of the ns2-leds device.
7
8Required sub-node properties:
9- cmd-gpio: Command LED GPIO. See OF device-tree GPIO specification.
10- slow-gpio: Slow LED GPIO. See OF device-tree GPIO specification.
11
12Optional sub-node properties:
13- label: Name for this LED. If omitted, the label is taken from the node name.
14- linux,default-trigger: Trigger assigned to the LED.
15
16Example:
17
18ns2-leds {
19 compatible = "lacie,ns2-leds";
20
21 blue-sata {
22 label = "ns2:blue:sata";
23 slow-gpio = <&gpio0 29 0>;
24 cmd-gpio = <&gpio0 30 0>;
25 };
26};
diff --git a/Documentation/devicetree/bindings/leds/leds-pwm.txt b/Documentation/devicetree/bindings/leds/leds-pwm.txt
new file mode 100644
index 000000000000..7297107cf832
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/leds-pwm.txt
@@ -0,0 +1,48 @@
1LED connected to PWM
2
3Required properties:
4- compatible : should be "pwm-leds".
5
6Each LED is represented as a sub-node of the pwm-leds device. Each
7node's name represents the name of the corresponding LED.
8
9LED sub-node properties:
10- pwms : PWM property to point to the PWM device (phandle)/port (id) and to
11 specify the period time to be used: <&phandle id period_ns>;
12- pwm-names : (optional) Name to be used by the PWM subsystem for the PWM device
13 For the pwms and pwm-names property please refer to:
14 Documentation/devicetree/bindings/pwm/pwm.txt
15- max-brightness : Maximum brightness possible for the LED
16- label : (optional)
17 see Documentation/devicetree/bindings/leds/common.txt
18- linux,default-trigger : (optional)
19 see Documentation/devicetree/bindings/leds/common.txt
20
21Example:
22
23twl_pwm: pwm {
24 /* provides two PWMs (id 0, 1 for PWM1 and PWM2) */
25 compatible = "ti,twl6030-pwm";
26 #pwm-cells = <2>;
27};
28
29twl_pwmled: pwmled {
30 /* provides one PWM (id 0 for Charing indicator LED) */
31 compatible = "ti,twl6030-pwmled";
32 #pwm-cells = <2>;
33};
34
35pwmleds {
36 compatible = "pwm-leds";
37 kpad {
38 label = "omap4::keypad";
39 pwms = <&twl_pwm 0 7812500>;
40 max-brightness = <127>;
41 };
42
43 charging {
44 label = "omap4:green:chrg";
45 pwms = <&twl_pwmled 0 7812500>;
46 max-brightness = <255>;
47 };
48};
diff --git a/Documentation/devicetree/bindings/leds/tca6507.txt b/Documentation/devicetree/bindings/leds/tca6507.txt
new file mode 100644
index 000000000000..2b6693b972fb
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/tca6507.txt
@@ -0,0 +1,33 @@
1LEDs conected to tca6507
2
3Required properties:
4- compatible : should be : "ti,tca6507".
5
6Each led is represented as a sub-node of the ti,tca6507 device.
7
8LED sub-node properties:
9- label : (optional) see Documentation/devicetree/bindings/leds/common.txt
10- reg : number of LED line (could be from 0 to 6)
11- linux,default-trigger : (optional)
12 see Documentation/devicetree/bindings/leds/common.txt
13
14Examples:
15
16tca6507@45 {
17 compatible = "ti,tca6507";
18 #address-cells = <1>;
19 #size-cells = <0>;
20 reg = <0x45>;
21
22 led0: red-aux@0 {
23 label = "red:aux";
24 reg = <0x0>;
25 };
26
27 led1: green-aux@1 {
28 label = "green:aux";
29 reg = <0x5>;
30 linux,default-trigger = "default-on";
31 };
32};
33
diff --git a/Documentation/devicetree/bindings/media/gpio-ir-receiver.txt b/Documentation/devicetree/bindings/media/gpio-ir-receiver.txt
new file mode 100644
index 000000000000..56e726ef4bf2
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/gpio-ir-receiver.txt
@@ -0,0 +1,16 @@
1Device-Tree bindings for GPIO IR receiver
2
3Required properties:
4 - compatible: should be "gpio-ir-receiver".
5 - gpios: specifies GPIO used for IR signal reception.
6
7Optional properties:
8 - linux,rc-map-name: Linux specific remote control map name.
9
10Example node:
11
12 ir: ir-receiver {
13 compatible = "gpio-ir-receiver";
14 gpios = <&gpio0 19 1>;
15 linux,rc-map-name = "rc-rc6-mce";
16 };
diff --git a/Documentation/devicetree/bindings/media/s5p-mfc.txt b/Documentation/devicetree/bindings/media/s5p-mfc.txt
new file mode 100644
index 000000000000..67ec3d4ccc7f
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/s5p-mfc.txt
@@ -0,0 +1,23 @@
1* Samsung Multi Format Codec (MFC)
2
3Multi Format Codec (MFC) is the IP present in Samsung SoCs which
4supports high resolution decoding and encoding functionalities.
5The MFC device driver is a v4l2 driver which can encode/decode
6video raw/elementary streams and has support for all popular
7video codecs.
8
9Required properties:
10 - compatible : value should be either one among the following
11 (a) "samsung,mfc-v5" for MFC v5 present in Exynos4 SoCs
12 (b) "samsung,mfc-v6" for MFC v6 present in Exynos5 SoCs
13
14 - reg : Physical base address of the IP registers and length of memory
15 mapped region.
16
17 - interrupts : MFC interrupt number to the CPU.
18
19 - samsung,mfc-r : Base address of the first memory bank used by MFC
20 for DMA contiguous memory allocation and its size.
21
22 - samsung,mfc-l : Base address of the second memory bank used by MFC
23 for DMA contiguous memory allocation and its size.
diff --git a/Documentation/devicetree/bindings/metag/meta-intc.txt b/Documentation/devicetree/bindings/metag/meta-intc.txt
new file mode 100644
index 000000000000..8c47dcbfabc6
--- /dev/null
+++ b/Documentation/devicetree/bindings/metag/meta-intc.txt
@@ -0,0 +1,82 @@
1* Meta External Trigger Controller Binding
2
3This binding specifies what properties must be available in the device tree
4representation of a Meta external trigger controller.
5
6Required properties:
7
8 - compatible: Specifies the compatibility list for the interrupt controller.
9 The type shall be <string> and the value shall include "img,meta-intc".
10
11 - num-banks: Specifies the number of interrupt banks (each of which can
12 handle 32 interrupt sources).
13
14 - interrupt-controller: The presence of this property identifies the node
15 as an interupt controller. No property value shall be defined.
16
17 - #interrupt-cells: Specifies the number of cells needed to encode an
18 interrupt source. The type shall be a <u32> and the value shall be 2.
19
20 - #address-cells: Specifies the number of cells needed to encode an
21 address. The type shall be <u32> and the value shall be 0. As such,
22 'interrupt-map' nodes do not have to specify a parent unit address.
23
24Optional properties:
25
26 - no-mask: The controller doesn't have any mask registers.
27
28* Interrupt Specifier Definition
29
30 Interrupt specifiers consists of 2 cells encoded as follows:
31
32 - <1st-cell>: The interrupt-number that identifies the interrupt source.
33
34 - <2nd-cell>: The Linux interrupt flags containing level-sense information,
35 encoded as follows:
36 1 = edge triggered
37 4 = level-sensitive
38
39* Examples
40
41Example 1:
42
43 /*
44 * Meta external trigger block
45 */
46 intc: intc {
47 // This is an interrupt controller node.
48 interrupt-controller;
49
50 // No address cells so that 'interrupt-map' nodes which
51 // reference this interrupt controller node do not need a parent
52 // address specifier.
53 #address-cells = <0>;
54
55 // Two cells to encode interrupt sources.
56 #interrupt-cells = <2>;
57
58 // Number of interrupt banks
59 num-banks = <2>;
60
61 // No HWMASKEXT is available (specify on Chorus2 and Comet ES1)
62 no-mask;
63
64 // Compatible with Meta hardware trigger block.
65 compatible = "img,meta-intc";
66 };
67
68Example 2:
69
70 /*
71 * An interrupt generating device that is wired to a Meta external
72 * trigger block.
73 */
74 uart1: uart@0x02004c00 {
75 // Interrupt source '5' that is level-sensitive.
76 // Note that there are only two cells as specified in the
77 // interrupt parent's '#interrupt-cells' property.
78 interrupts = <5 4 /* level */>;
79
80 // The interrupt controller that this device is wired to.
81 interrupt-parent = <&intc>;
82 };
diff --git a/Documentation/devicetree/bindings/mfd/ab8500.txt b/Documentation/devicetree/bindings/mfd/ab8500.txt
index ce83c8d3c00e..c3a14e0ad0ad 100644
--- a/Documentation/devicetree/bindings/mfd/ab8500.txt
+++ b/Documentation/devicetree/bindings/mfd/ab8500.txt
@@ -13,9 +13,6 @@ Required parent device properties:
13 4 = active high level-sensitive 13 4 = active high level-sensitive
14 8 = active low level-sensitive 14 8 = active low level-sensitive
15 15
16Optional parent device properties:
17- reg : contains the PRCMU mailbox address for the AB8500 i2c port
18
19The AB8500 consists of a large and varied group of sub-devices: 16The AB8500 consists of a large and varied group of sub-devices:
20 17
21Device IRQ Names Supply Names Description 18Device IRQ Names Supply Names Description
@@ -24,7 +21,32 @@ ab8500-bm : : : Battery Manager
24ab8500-btemp : : : Battery Temperature 21ab8500-btemp : : : Battery Temperature
25ab8500-charger : : : Battery Charger 22ab8500-charger : : : Battery Charger
26ab8500-codec : : : Audio Codec 23ab8500-codec : : : Audio Codec
27ab8500-fg : : : Fuel Gauge 24ab8500-fg : : vddadc : Fuel Gauge
25 : NCONV_ACCU : : Accumulate N Sample Conversion
26 : BATT_OVV : : Battery Over Voltage
27 : LOW_BAT_F : : LOW threshold battery voltage
28 : CC_INT_CALIB : : Coulomb Counter Internal Calibration
29 : CCEOC : : Coulomb Counter End of Conversion
30ab8500-btemp : : vtvout : Battery Temperature
31 : BAT_CTRL_INDB : : Battery Removal Indicator
32 : BTEMP_LOW : : Btemp < BtempLow, if battery temperature is lower than -10°C
33 : BTEMP_LOW_MEDIUM : : BtempLow < Btemp < BtempMedium,if battery temperature is between -10 and 0°C
34 : BTEMP_MEDIUM_HIGH : : BtempMedium < Btemp < BtempHigh,if battery temperature is between 0°C and“MaxTemp
35 : BTEMP_HIGH : : Btemp > BtempHigh, if battery temperature is higher than “MaxTemp
36ab8500-charger : : vddadc : Charger interface
37 : MAIN_CH_UNPLUG_DET : : main charger unplug detection management (not in 8505)
38 : MAIN_CHARGE_PLUG_DET : : main charger plug detection management (not in 8505)
39 : MAIN_EXT_CH_NOT_OK : : main charger not OK
40 : MAIN_CH_TH_PROT_R : : Die temp is above main charger
41 : MAIN_CH_TH_PROT_F : : Die temp is below main charger
42 : VBUS_DET_F : : VBUS falling detected
43 : VBUS_DET_R : : VBUS rising detected
44 : USB_LINK_STATUS : : USB link status has changed
45 : USB_CH_TH_PROT_R : : Die temp is above usb charger
46 : USB_CH_TH_PROT_F : : Die temp is below usb charger
47 : USB_CHARGER_NOT_OKR : : allowed USB charger not ok detection
48 : VBUS_OVV : : Overvoltage on Vbus ball detected (USB charge is stopped)
49 : CH_WD_EXP : : Charger watchdog detected
28ab8500-gpadc : HW_CONV_END : vddadc : Analogue to Digital Converter 50ab8500-gpadc : HW_CONV_END : vddadc : Analogue to Digital Converter
29 SW_CONV_END : : 51 SW_CONV_END : :
30ab8500-gpio : : : GPIO Controller 52ab8500-gpio : : : GPIO Controller
@@ -61,9 +83,8 @@ Non-standard child device properties:
61 - stericsson,amic2-bias-vamic1 : Analoge Mic wishes to use a non-standard Vamic 83 - stericsson,amic2-bias-vamic1 : Analoge Mic wishes to use a non-standard Vamic
62 - stericsson,earpeice-cmv : Earpeice voltage (only: 950 | 1100 | 1270 | 1580) 84 - stericsson,earpeice-cmv : Earpeice voltage (only: 950 | 1100 | 1270 | 1580)
63 85
64ab8500@5 { 86ab8500 {
65 compatible = "stericsson,ab8500"; 87 compatible = "stericsson,ab8500";
66 reg = <5>; /* mailbox 5 is i2c */
67 interrupts = <0 40 0x4>; 88 interrupts = <0 40 0x4>;
68 interrupt-controller; 89 interrupt-controller;
69 #interrupt-cells = <2>; 90 #interrupt-cells = <2>;
diff --git a/Documentation/devicetree/bindings/mfd/max8925.txt b/Documentation/devicetree/bindings/mfd/max8925.txt
new file mode 100644
index 000000000000..4f0dc6638e5e
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/max8925.txt
@@ -0,0 +1,64 @@
1* Maxim max8925 Power Management IC
2
3Required parent device properties:
4- compatible : "maxim,max8925"
5- reg : the I2C slave address for the max8925 chip
6- interrupts : IRQ line for the max8925 chip
7- interrupt-controller: describes the max8925 as an interrupt
8 controller (has its own domain)
9- #interrupt-cells : should be 1.
10 - The cell is the max8925 local IRQ number
11
12Optional parent device properties:
13- maxim,tsc-irq: there are 2 IRQ lines for max8925, one is indicated in
14 interrupts property, the other is indicated here.
15
16max8925 consists of a large and varied group of sub-devices:
17
18Device Supply Names Description
19------ ------------ -----------
20max8925-onkey : : On key
21max8925-rtc : : RTC
22max8925-regulator : : Regulators
23max8925-backlight : : Backlight
24max8925-touch : : Touchscreen
25max8925-power : : Charger
26
27Example:
28
29 pmic: max8925@3c {
30 compatible = "maxim,max8925";
31 reg = <0x3c>;
32 interrupts = <1>;
33 interrupt-parent = <&intcmux4>;
34 interrupt-controller;
35 #interrupt-cells = <1>;
36 maxim,tsc-irq = <0>;
37
38 regulators {
39 SDV1 {
40 regulator-min-microvolt = <637500>;
41 regulator-max-microvolt = <1425000>;
42 regulator-boot-on;
43 regulator-always-on;
44 };
45
46 LDO1 {
47 regulator-min-microvolt = <750000>;
48 regulator-max-microvolt = <3900000>;
49 regulator-boot-on;
50 regulator-always-on;
51 };
52
53 };
54 backlight {
55 maxim,max8925-dual-string = <0>;
56 };
57 charger {
58 batt-detect = <0>;
59 topoff-threshold = <1>;
60 fast-charge = <7>;
61 no-temp-support = <0>;
62 no-insert-detect = <0>;
63 };
64 };
diff --git a/Documentation/devicetree/bindings/mfd/stmpe.txt b/Documentation/devicetree/bindings/mfd/stmpe.txt
new file mode 100644
index 000000000000..56edb5520685
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/stmpe.txt
@@ -0,0 +1,28 @@
1* ST Microelectronics STMPE Multi-Functional Device
2
3STMPE is an MFD device which may expose the following inbuilt devices: gpio,
4keypad, touchscreen, adc, pwm, rotator.
5
6Required properties:
7 - compatible : "st,stmpe[610|801|811|1601|2401|2403]"
8 - reg : I2C/SPI address of the device
9
10Optional properties:
11 - interrupts : The interrupt outputs from the controller
12 - interrupt-controller : Marks the device node as an interrupt controller
13 - interrupt-parent : Specifies which IRQ controller we're connected to
14 - wakeup-source : Marks the input device as wakable
15 - st,autosleep-timeout : Valid entries (ms); 4, 16, 32, 64, 128, 256, 512 and 1024
16
17Example:
18
19 stmpe1601: stmpe1601@40 {
20 compatible = "st,stmpe1601";
21 reg = <0x40>;
22 interrupts = <26 0x4>;
23 interrupt-parent = <&gpio6>;
24 interrupt-controller;
25
26 wakeup-source;
27 st,autosleep-timeout = <1024>;
28 };
diff --git a/Documentation/devicetree/bindings/mfd/tps6507x.txt b/Documentation/devicetree/bindings/mfd/tps6507x.txt
new file mode 100755
index 000000000000..8fffa3c5ed40
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/tps6507x.txt
@@ -0,0 +1,91 @@
1TPS6507x Power Management Integrated Circuit
2
3Required properties:
4- compatible: "ti,tps6507x"
5- reg: I2C slave address
6- regulators: This is the list of child nodes that specify the regulator
7 initialization data for defined regulators. Not all regulators for the
8 given device need to be present. The definition for each of these nodes
9 is defined using the standard binding for regulators found at
10 Documentation/devicetree/bindings/regulator/regulator.txt.
11 The regulator is matched with the regulator-compatible.
12
13 The valid regulator-compatible values are:
14 tps6507x: vdcdc1, vdcdc2, vdcdc3, vldo1, vldo2
15- xxx-supply: Input voltage supply regulator.
16 These entries are required if regulators are enabled for a device.
17 Missing of these properties can cause the regulator registration
18 fails.
19 If some of input supply is powered through battery or always-on
20 supply then also it is require to have these parameters with proper
21 node handle of always on power supply.
22 tps6507x:
23 vindcdc1_2-supply: VDCDC1 and VDCDC2 input.
24 vindcdc3-supply : VDCDC3 input.
25 vldo1_2-supply : VLDO1 and VLDO2 input.
26
27Regulator Optional properties:
28- defdcdc_default: It's property of DCDC2 and DCDC3 regulators.
29 0: If defdcdc pin of DCDC2/DCDC3 is pulled to GND.
30 1: If defdcdc pin of DCDC2/DCDC3 is driven HIGH.
31 If this property is not defined, it defaults to 0 (not enabled).
32
33Example:
34
35 pmu: tps6507x@48 {
36 compatible = "ti,tps6507x";
37 reg = <0x48>;
38
39 vindcdc1_2-supply = <&vbat>;
40 vindcdc3-supply = <...>;
41 vinldo1_2-supply = <...>;
42
43 regulators {
44 #address-cells = <1>;
45 #size-cells = <0>;
46
47 vdcdc1_reg: regulator@0 {
48 regulator-compatible = "VDCDC1";
49 reg = <0>;
50 regulator-min-microvolt = <3150000>;
51 regulator-max-microvolt = <3450000>;
52 regulator-always-on;
53 regulator-boot-on;
54 };
55 vdcdc2_reg: regulator@1 {
56 regulator-compatible = "VDCDC2";
57 reg = <1>;
58 regulator-min-microvolt = <1710000>;
59 regulator-max-microvolt = <3450000>;
60 regulator-always-on;
61 regulator-boot-on;
62 defdcdc_default = <1>;
63 };
64 vdcdc3_reg: regulator@2 {
65 regulator-compatible = "VDCDC3";
66 reg = <2>;
67 regulator-min-microvolt = <950000>
68 regulator-max-microvolt = <1350000>;
69 regulator-always-on;
70 regulator-boot-on;
71 defdcdc_default = <1>;
72 };
73 ldo1_reg: regulator@3 {
74 regulator-compatible = "LDO1";
75 reg = <3>;
76 regulator-min-microvolt = <1710000>;
77 regulator-max-microvolt = <1890000>;
78 regulator-always-on;
79 regulator-boot-on;
80 };
81 ldo2_reg: regulator@4 {
82 regulator-compatible = "LDO2";
83 reg = <4>;
84 regulator-min-microvolt = <1140000>;
85 regulator-max-microvolt = <1320000>;
86 regulator-always-on;
87 regulator-boot-on;
88 };
89 };
90
91 };
diff --git a/Documentation/devicetree/bindings/mips/cavium/dma-engine.txt b/Documentation/devicetree/bindings/mips/cavium/dma-engine.txt
index cb4291e3b1d1..a5bdff400002 100644
--- a/Documentation/devicetree/bindings/mips/cavium/dma-engine.txt
+++ b/Documentation/devicetree/bindings/mips/cavium/dma-engine.txt
@@ -1,7 +1,7 @@
1* DMA Engine. 1* DMA Engine.
2 2
3The Octeon DMA Engine transfers between the Boot Bus and main memory. 3The Octeon DMA Engine transfers between the Boot Bus and main memory.
4The DMA Engine will be refered to by phandle by any device that is 4The DMA Engine will be referred to by phandle by any device that is
5connected to it. 5connected to it.
6 6
7Properties: 7Properties:
diff --git a/Documentation/devicetree/bindings/mips/cpu_irq.txt b/Documentation/devicetree/bindings/mips/cpu_irq.txt
new file mode 100644
index 000000000000..13aa4b62c62a
--- /dev/null
+++ b/Documentation/devicetree/bindings/mips/cpu_irq.txt
@@ -0,0 +1,47 @@
1MIPS CPU interrupt controller
2
3On MIPS the mips_cpu_intc_init() helper can be used to initialize the 8 CPU
4IRQs from a devicetree file and create a irq_domain for IRQ controller.
5
6With the irq_domain in place we can describe how the 8 IRQs are wired to the
7platforms internal interrupt controller cascade.
8
9Below is an example of a platform describing the cascade inside the devicetree
10and the code used to load it inside arch_init_irq().
11
12Required properties:
13- compatible : Should be "mti,cpu-interrupt-controller"
14
15Example devicetree:
16 cpu-irq: cpu-irq@0 {
17 #address-cells = <0>;
18
19 interrupt-controller;
20 #interrupt-cells = <1>;
21
22 compatible = "mti,cpu-interrupt-controller";
23 };
24
25 intc: intc@200 {
26 compatible = "ralink,rt2880-intc";
27 reg = <0x200 0x100>;
28
29 interrupt-controller;
30 #interrupt-cells = <1>;
31
32 interrupt-parent = <&cpu-irq>;
33 interrupts = <2>;
34 };
35
36
37Example platform irq.c:
38static struct of_device_id __initdata of_irq_ids[] = {
39 { .compatible = "mti,cpu-interrupt-controller", .data = mips_cpu_intc_init },
40 { .compatible = "ralink,rt2880-intc", .data = intc_of_init },
41 {},
42};
43
44void __init arch_init_irq(void)
45{
46 of_irq_init(of_irq_ids);
47}
diff --git a/Documentation/devicetree/bindings/misc/atmel-ssc.txt b/Documentation/devicetree/bindings/misc/atmel-ssc.txt
new file mode 100644
index 000000000000..38e51ad2e07e
--- /dev/null
+++ b/Documentation/devicetree/bindings/misc/atmel-ssc.txt
@@ -0,0 +1,15 @@
1* Atmel SSC driver.
2
3Required properties:
4- compatible: "atmel,at91rm9200-ssc" or "atmel,at91sam9g45-ssc"
5 - atmel,at91rm9200-ssc: support pdc transfer
6 - atmel,at91sam9g45-ssc: support dma transfer
7- reg: Should contain SSC registers location and length
8- interrupts: Should contain SSC interrupt
9
10Example:
11ssc0: ssc@fffbc000 {
12 compatible = "atmel,at91rm9200-ssc";
13 reg = <0xfffbc000 0x4000>;
14 interrupts = <14 4 5>;
15};
diff --git a/Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhci.txt b/Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhci.txt
new file mode 100644
index 000000000000..59476fbdbfa1
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhci.txt
@@ -0,0 +1,18 @@
1Broadcom BCM2835 SDHCI controller
2
3This file documents differences between the core properties described
4by mmc.txt and the properties that represent the BCM2835 controller.
5
6Required properties:
7- compatible : Should be "brcm,bcm2835-sdhci".
8- clocks : The clock feeding the SDHCI controller.
9
10Example:
11
12sdhci: sdhci {
13 compatible = "brcm,bcm2835-sdhci";
14 reg = <0x7e300000 0x100>;
15 interrupts = <2 30>;
16 clocks = <&clk_mmc>;
17 bus-width = <4>;
18};
diff --git a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
index 792768953330..6d1c0988cfc7 100644
--- a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
+++ b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
@@ -4,18 +4,18 @@
4The Synopsis designware mobile storage host controller is used to interface 4The Synopsis designware mobile storage host controller is used to interface
5a SoC with storage medium such as eMMC or SD/MMC cards. This file documents 5a SoC with storage medium such as eMMC or SD/MMC cards. This file documents
6differences between the core Synopsis dw mshc controller properties described 6differences between the core Synopsis dw mshc controller properties described
7by synposis-dw-mshc.txt and the properties used by the Samsung Exynos specific 7by synopsis-dw-mshc.txt and the properties used by the Samsung Exynos specific
8extensions to the Synopsis Designware Mobile Storage Host Controller. 8extensions to the Synopsis Designware Mobile Storage Host Controller.
9 9
10Required Properties: 10Required Properties:
11 11
12* compatible: should be 12* compatible: should be
13 - "samsung,exynos4210-dw-mshc": for controllers with Samsung Exynos4210 13 - "samsung,exynos4210-dw-mshc": for controllers with Samsung Exynos4210
14 specific extentions. 14 specific extensions.
15 - "samsung,exynos4412-dw-mshc": for controllers with Samsung Exynos4412 15 - "samsung,exynos4412-dw-mshc": for controllers with Samsung Exynos4412
16 specific extentions. 16 specific extensions.
17 - "samsung,exynos5250-dw-mshc": for controllers with Samsung Exynos5250 17 - "samsung,exynos5250-dw-mshc": for controllers with Samsung Exynos5250
18 specific extentions. 18 specific extensions.
19 19
20* samsung,dw-mshc-ciu-div: Specifies the divider value for the card interface 20* samsung,dw-mshc-ciu-div: Specifies the divider value for the card interface
21 unit (ciu) clock. This property is applicable only for Exynos5 SoC's and 21 unit (ciu) clock. This property is applicable only for Exynos5 SoC's and
diff --git a/Documentation/devicetree/bindings/mmc/mmc.txt b/Documentation/devicetree/bindings/mmc/mmc.txt
index 8e2e0ba2f486..85aada2263d5 100644
--- a/Documentation/devicetree/bindings/mmc/mmc.txt
+++ b/Documentation/devicetree/bindings/mmc/mmc.txt
@@ -6,21 +6,49 @@ Interpreted by the OF core:
6- reg: Registers location and length. 6- reg: Registers location and length.
7- interrupts: Interrupts used by the MMC controller. 7- interrupts: Interrupts used by the MMC controller.
8 8
9Required properties:
10- bus-width: Number of data lines, can be <1>, <4>, or <8>
11
12Card detection: 9Card detection:
13If no property below is supplied, standard SDHCI card detect is used. 10If no property below is supplied, host native card detect is used.
14Only one of the properties in this section should be supplied: 11Only one of the properties in this section should be supplied:
15 - broken-cd: There is no card detection available; polling must be used. 12 - broken-cd: There is no card detection available; polling must be used.
16 - cd-gpios: Specify GPIOs for card detection, see gpio binding 13 - cd-gpios: Specify GPIOs for card detection, see gpio binding
17 - non-removable: non-removable slot (like eMMC); assume always present. 14 - non-removable: non-removable slot (like eMMC); assume always present.
18 15
19Optional properties: 16Optional properties:
17- bus-width: Number of data lines, can be <1>, <4>, or <8>. The default
18 will be <1> if the property is absent.
20- wp-gpios: Specify GPIOs for write protection, see gpio binding 19- wp-gpios: Specify GPIOs for write protection, see gpio binding
21- cd-inverted: when present, polarity on the cd gpio line is inverted 20- cd-inverted: when present, polarity on the CD line is inverted. See the note
22- wp-inverted: when present, polarity on the wp gpio line is inverted 21 below for the case, when a GPIO is used for the CD line
22- wp-inverted: when present, polarity on the WP line is inverted. See the note
23 below for the case, when a GPIO is used for the WP line
23- max-frequency: maximum operating clock frequency 24- max-frequency: maximum operating clock frequency
25- no-1-8-v: when present, denotes that 1.8v card voltage is not supported on
26 this system, even if the controller claims it is.
27- cap-sd-highspeed: SD high-speed timing is supported
28- cap-mmc-highspeed: MMC high-speed timing is supported
29- cap-power-off-card: powering off the card is safe
30- cap-sdio-irq: enable SDIO IRQ signalling on this interface
31
32*NOTE* on CD and WP polarity. To use common for all SD/MMC host controllers line
33polarity properties, we have to fix the meaning of the "normal" and "inverted"
34line levels. We choose to follow the SDHCI standard, which specifies both those
35lines as "active low." Therefore, using the "cd-inverted" property means, that
36the CD line is active high, i.e. it is high, when a card is inserted. Similar
37logic applies to the "wp-inverted" property.
38
39CD and WP lines can be implemented on the hardware in one of two ways: as GPIOs,
40specified in cd-gpios and wp-gpios properties, or as dedicated pins. Polarity of
41dedicated pins can be specified, using *-inverted properties. GPIO polarity can
42also be specified using the OF_GPIO_ACTIVE_LOW flag. This creates an ambiguity
43in the latter case. We choose to use the XOR logic for GPIO CD and WP lines.
44This means, the two properties are "superimposed," for example leaving the
45OF_GPIO_ACTIVE_LOW flag clear and specifying the respective *-inverted
46property results in a double-inversion and actually means the "normal" line
47polarity is in effect.
48
49Optional SDIO properties:
50- keep-power-in-suspend: Preserves card power during a suspend/resume cycle
51- enable-sdio-wakeup: Enables wake up of host system on SDIO IRQ assertion
24 52
25Example: 53Example:
26 54
@@ -33,4 +61,6 @@ sdhci@ab000000 {
33 cd-inverted; 61 cd-inverted;
34 wp-gpios = <&gpio 70 0>; 62 wp-gpios = <&gpio 70 0>;
35 max-frequency = <50000000>; 63 max-frequency = <50000000>;
64 keep-power-in-suspend;
65 enable-sdio-wakeup;
36} 66}
diff --git a/Documentation/devicetree/bindings/mmc/orion-sdio.txt b/Documentation/devicetree/bindings/mmc/orion-sdio.txt
new file mode 100644
index 000000000000..84f0ebd67a13
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/orion-sdio.txt
@@ -0,0 +1,17 @@
1* Marvell orion-sdio controller
2
3This file documents differences between the core properties in mmc.txt
4and the properties used by the orion-sdio driver.
5
6- compatible: Should be "marvell,orion-sdio"
7- clocks: reference to the clock of the SDIO interface
8
9Example:
10
11 mvsdio@d00d4000 {
12 compatible = "marvell,orion-sdio";
13 reg = <0xd00d4000 0x200>;
14 interrupts = <54>;
15 clocks = <&gateclk 17>;
16 status = "disabled";
17 };
diff --git a/Documentation/devicetree/bindings/mmc/samsung-sdhci.txt b/Documentation/devicetree/bindings/mmc/samsung-sdhci.txt
index 630a7d7f4718..3b3a1ee055ff 100644
--- a/Documentation/devicetree/bindings/mmc/samsung-sdhci.txt
+++ b/Documentation/devicetree/bindings/mmc/samsung-sdhci.txt
@@ -12,10 +12,6 @@ is used. The Samsung's SDHCI controller bindings extends this as listed below.
12[A] The property "samsung,cd-pinmux-gpio" can be used as stated in the 12[A] The property "samsung,cd-pinmux-gpio" can be used as stated in the
13 "Optional Board Specific Properties" section below. 13 "Optional Board Specific Properties" section below.
14 14
15[B] If core card-detect bindings and "samsung,cd-pinmux-gpio" property
16 is not specified, it is assumed that there is no card detection
17 mechanism used.
18
19Required SoC Specific Properties: 15Required SoC Specific Properties:
20- compatible: should be one of the following 16- compatible: should be one of the following
21 - "samsung,s3c6410-sdhci": For controllers compatible with s3c6410 sdhci 17 - "samsung,s3c6410-sdhci": For controllers compatible with s3c6410 sdhci
@@ -24,14 +20,18 @@ Required SoC Specific Properties:
24 controller. 20 controller.
25 21
26Required Board Specific Properties: 22Required Board Specific Properties:
27- gpios: Should specify the gpios used for clock, command and data lines. The 23- Samsung GPIO variant (will be completely replaced by pinctrl):
28 gpio specifier format depends on the gpio controller. 24 - gpios: Should specify the gpios used for clock, command and data lines. The
25 gpio specifier format depends on the gpio controller.
26- Pinctrl variant (preferred if available):
27 - pinctrl-0: Should specify pin control groups used for this controller.
28 - pinctrl-names: Should contain only one value - "default".
29 29
30Optional Board Specific Properties: 30Optional Board Specific Properties:
31- samsung,cd-pinmux-gpio: Specifies the card detect line that is routed 31- samsung,cd-pinmux-gpio: Specifies the card detect line that is routed
32 through a pinmux to the card-detect pin of the card slot. This property 32 through a pinmux to the card-detect pin of the card slot. This property
33 should be used only if none of the mmc core card-detect properties are 33 should be used only if none of the mmc core card-detect properties are
34 used. 34 used. Only for Samsung GPIO variant.
35 35
36Example: 36Example:
37 sdhci@12530000 { 37 sdhci@12530000 {
@@ -40,14 +40,20 @@ Example:
40 interrupts = <0 75 0>; 40 interrupts = <0 75 0>;
41 bus-width = <4>; 41 bus-width = <4>;
42 cd-gpios = <&gpk2 2 2 3 3>; 42 cd-gpios = <&gpk2 2 2 3 3>;
43
44 /* Samsung GPIO variant */
43 gpios = <&gpk2 0 2 0 3>, /* clock line */ 45 gpios = <&gpk2 0 2 0 3>, /* clock line */
44 <&gpk2 1 2 0 3>, /* command line */ 46 <&gpk2 1 2 0 3>, /* command line */
45 <&gpk2 3 2 3 3>, /* data line 0 */ 47 <&gpk2 3 2 3 3>, /* data line 0 */
46 <&gpk2 4 2 3 3>, /* data line 1 */ 48 <&gpk2 4 2 3 3>, /* data line 1 */
47 <&gpk2 5 2 3 3>, /* data line 2 */ 49 <&gpk2 5 2 3 3>, /* data line 2 */
48 <&gpk2 6 2 3 3>; /* data line 3 */ 50 <&gpk2 6 2 3 3>; /* data line 3 */
51
52 /* Pinctrl variant */
53 pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus4>;
54 pinctrl-names = "default";
49 }; 55 };
50 56
51 Note: This example shows both SoC specific and board specific properties 57 Note: This example shows both SoC specific and board specific properties
52 in a single device node. The properties can be actually be seperated 58 in a single device node. The properties can be actually be separated
53 into SoC specific node and board specific node. 59 into SoC specific node and board specific node.
diff --git a/Documentation/devicetree/bindings/mmc/synposis-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/synopsis-dw-mshc.txt
index 06cd32d08052..726fd2122a13 100644
--- a/Documentation/devicetree/bindings/mmc/synposis-dw-mshc.txt
+++ b/Documentation/devicetree/bindings/mmc/synopsis-dw-mshc.txt
@@ -26,8 +26,16 @@ Required Properties:
26 * bus-width: as documented in mmc core bindings. 26 * bus-width: as documented in mmc core bindings.
27 27
28 * wp-gpios: specifies the write protect gpio line. The format of the 28 * wp-gpios: specifies the write protect gpio line. The format of the
29 gpio specifier depends on the gpio controller. If the write-protect 29 gpio specifier depends on the gpio controller. If a GPIO is not used
30 line is not available, this property is optional. 30 for write-protect, this property is optional.
31
32 * disable-wp: If the wp-gpios property isn't present then (by default)
33 we'd assume that the write protect is hooked up directly to the
34 controller's special purpose write protect line (accessible via
35 the WRTPRT register). However, it's possible that we simply don't
36 want write protect. In that case specify 'disable-wp'.
37 NOTE: This property is not required for slots known to always
38 connect to eMMC or SDIO cards.
31 39
32Optional properties: 40Optional properties:
33 41
diff --git a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
index be76a23b34c4..ed271fc255b2 100644
--- a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
+++ b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
@@ -19,6 +19,7 @@ ti,dual-volt: boolean, supports dual voltage cards
19"supply-name" examples are "vmmc", "vmmc_aux" etc 19"supply-name" examples are "vmmc", "vmmc_aux" etc
20ti,non-removable: non-removable slot (like eMMC) 20ti,non-removable: non-removable slot (like eMMC)
21ti,needs-special-reset: Requires a special softreset sequence 21ti,needs-special-reset: Requires a special softreset sequence
22ti,needs-special-hs-handling: HSMMC IP needs special setting for handling High Speed
22 23
23Example: 24Example:
24 mmc1: mmc@0x4809c000 { 25 mmc1: mmc@0x4809c000 {
diff --git a/Documentation/devicetree/bindings/mmc/tmio_mmc.txt b/Documentation/devicetree/bindings/mmc/tmio_mmc.txt
new file mode 100644
index 000000000000..df204e18e030
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/tmio_mmc.txt
@@ -0,0 +1,20 @@
1* Toshiba Mobile IO SD/MMC controller
2
3The tmio-mmc driver doesn't probe its devices actively, instead its binding to
4devices is managed by either MFD drivers or by the sh_mobile_sdhi platform
5driver. Those drivers supply the tmio-mmc driver with platform data, that either
6describe hardware capabilities, known to them, or are obtained by them from
7their own platform data or from their DT information. In the latter case all
8compulsory and any optional properties, common to all SD/MMC drivers, as
9described in mmc.txt, can be used. Additionally the following tmio_mmc-specific
10optional bindings can be used.
11
12Optional properties:
13- toshiba,mmc-wrprotect-disable: write-protect detection is unavailable
14
15When used with Renesas SDHI hardware, the following compatibility strings
16configure various model-specific properties:
17
18"renesas,sh7372-sdhi": (default) compatible with SH7372
19"renesas,r8a7740-sdhi": compatible with R8A7740: certain MMC/SD commands have to
20 wait for the interface to become idle.
diff --git a/Documentation/devicetree/bindings/mmc/vt8500-sdmmc.txt b/Documentation/devicetree/bindings/mmc/vt8500-sdmmc.txt
new file mode 100644
index 000000000000..d7fb6abb3eb8
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/vt8500-sdmmc.txt
@@ -0,0 +1,23 @@
1* Wondermedia WM8505/WM8650 SD/MMC Host Controller
2
3This file documents differences between the core properties described
4by mmc.txt and the properties used by the wmt-sdmmc driver.
5
6Required properties:
7- compatible: Should be "wm,wm8505-sdhc".
8- interrupts: Two interrupts are required - regular irq and dma irq.
9
10Optional properties:
11- sdon-inverted: SD_ON bit is inverted on the controller
12
13Examples:
14
15sdhc@d800a000 {
16 compatible = "wm,wm8505-sdhc";
17 reg = <0xd800a000 0x1000>;
18 interrupts = <20 21>;
19 clocks = <&sdhc>;
20 bus-width = <4>;
21 sdon-inverted;
22};
23
diff --git a/Documentation/devicetree/bindings/mtd/denali-nand.txt b/Documentation/devicetree/bindings/mtd/denali-nand.txt
new file mode 100644
index 000000000000..b04d03a1d499
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/denali-nand.txt
@@ -0,0 +1,23 @@
1* Denali NAND controller
2
3Required properties:
4 - compatible : should be "denali,denali-nand-dt"
5 - reg : should contain registers location and length for data and reg.
6 - reg-names: Should contain the reg names "nand_data" and "denali_reg"
7 - interrupts : The interrupt number.
8 - dm-mask : DMA bit mask
9
10The device tree may optionally contain sub-nodes describing partitions of the
11address space. See partition.txt for more detail.
12
13Examples:
14
15nand: nand@ff900000 {
16 #address-cells = <1>;
17 #size-cells = <1>;
18 compatible = "denali,denali-nand-dt";
19 reg = <0xff900000 0x100000>, <0xffb80000 0x10000>;
20 reg-names = "nand_data", "denali_reg";
21 interrupts = <0 144 4>;
22 dma-mask = <0xffffffff>;
23};
diff --git a/Documentation/devicetree/bindings/mtd/elm.txt b/Documentation/devicetree/bindings/mtd/elm.txt
new file mode 100644
index 000000000000..8c1528c421d4
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/elm.txt
@@ -0,0 +1,16 @@
1Error location module
2
3Required properties:
4- compatible: Must be "ti,am33xx-elm"
5- reg: physical base address and size of the registers map.
6- interrupts: Interrupt number for the elm.
7
8Optional properties:
9- ti,hwmods: Name of the hwmod associated to the elm
10
11Example:
12elm: elm@0 {
13 compatible = "ti,am3352-elm";
14 reg = <0x48080000 0x2000>;
15 interrupts = <4>;
16};
diff --git a/Documentation/devicetree/bindings/mtd/flctl-nand.txt b/Documentation/devicetree/bindings/mtd/flctl-nand.txt
new file mode 100644
index 000000000000..427f46dc60ad
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/flctl-nand.txt
@@ -0,0 +1,49 @@
1FLCTL NAND controller
2
3Required properties:
4- compatible : "renesas,shmobile-flctl-sh7372"
5- reg : Address range of the FLCTL
6- interrupts : flste IRQ number
7- nand-bus-width : bus width to NAND chip
8
9Optional properties:
10- dmas: DMA specifier(s)
11- dma-names: name for each DMA specifier. Valid names are
12 "data_tx", "data_rx", "ecc_tx", "ecc_rx"
13
14The DMA fields are not used yet in the driver but are listed here for
15completing the bindings.
16
17The device tree may optionally contain sub-nodes describing partitions of the
18address space. See partition.txt for more detail.
19
20Example:
21
22 flctl@e6a30000 {
23 #address-cells = <1>;
24 #size-cells = <1>;
25 compatible = "renesas,shmobile-flctl-sh7372";
26 reg = <0xe6a30000 0x100>;
27 interrupts = <0x0d80>;
28
29 nand-bus-width = <16>;
30
31 dmas = <&dmac 1 /* data_tx */
32 &dmac 2;> /* data_rx */
33 dma-names = "data_tx", "data_rx";
34
35 system@0 {
36 label = "system";
37 reg = <0x0 0x8000000>;
38 };
39
40 userdata@8000000 {
41 label = "userdata";
42 reg = <0x8000000 0x10000000>;
43 };
44
45 cache@18000000 {
46 label = "cache";
47 reg = <0x18000000 0x8000000>;
48 };
49 };
diff --git a/Documentation/devicetree/bindings/mtd/fsmc-nand.txt b/Documentation/devicetree/bindings/mtd/fsmc-nand.txt
index e2c663b354d2..2240ac09f6ba 100644
--- a/Documentation/devicetree/bindings/mtd/fsmc-nand.txt
+++ b/Documentation/devicetree/bindings/mtd/fsmc-nand.txt
@@ -1,11 +1,9 @@
1* FSMC NAND 1* FSMC NAND
2 2
3Required properties: 3Required properties:
4- compatible : "st,spear600-fsmc-nand" 4- compatible : "st,spear600-fsmc-nand", "stericsson,fsmc-nand"
5- reg : Address range of the mtd chip 5- reg : Address range of the mtd chip
6- reg-names: Should contain the reg names "fsmc_regs" and "nand_data" 6- reg-names: Should contain the reg names "fsmc_regs", "nand_data", "nand_addr" and "nand_cmd"
7- st,ale-off : Chip specific offset to ALE
8- st,cle-off : Chip specific offset to CLE
9 7
10Optional properties: 8Optional properties:
11- bank-width : Width (in bytes) of the device. If not present, the width 9- bank-width : Width (in bytes) of the device. If not present, the width
@@ -19,10 +17,10 @@ Example:
19 #address-cells = <1>; 17 #address-cells = <1>;
20 #size-cells = <1>; 18 #size-cells = <1>;
21 reg = <0xd1800000 0x1000 /* FSMC Register */ 19 reg = <0xd1800000 0x1000 /* FSMC Register */
22 0xd2000000 0x4000>; /* NAND Base */ 20 0xd2000000 0x0010 /* NAND Base DATA */
23 reg-names = "fsmc_regs", "nand_data"; 21 0xd2020000 0x0010 /* NAND Base ADDR */
24 st,ale-off = <0x20000>; 22 0xd2010000 0x0010>; /* NAND Base CMD */
25 st,cle-off = <0x10000>; 23 reg-names = "fsmc_regs", "nand_data", "nand_addr", "nand_cmd";
26 24
27 bank-width = <1>; 25 bank-width = <1>;
28 nand-skip-bbtscan; 26 nand-skip-bbtscan;
diff --git a/Documentation/devicetree/bindings/mtd/gpmc-nand.txt b/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
new file mode 100644
index 000000000000..e7f8d7ed47eb
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
@@ -0,0 +1,80 @@
1Device tree bindings for GPMC connected NANDs
2
3GPMC connected NAND (found on OMAP boards) are represented as child nodes of
4the GPMC controller with a name of "nand".
5
6All timing relevant properties as well as generic gpmc child properties are
7explained in a separate documents - please refer to
8Documentation/devicetree/bindings/bus/ti-gpmc.txt
9
10For NAND specific properties such as ECC modes or bus width, please refer to
11Documentation/devicetree/bindings/mtd/nand.txt
12
13
14Required properties:
15
16 - reg: The CS line the peripheral is connected to
17
18Optional properties:
19
20 - nand-bus-width: Set this numeric value to 16 if the hardware
21 is wired that way. If not specified, a bus
22 width of 8 is assumed.
23
24 - ti,nand-ecc-opt: A string setting the ECC layout to use. One of:
25
26 "sw" Software method (default)
27 "hw" Hardware method
28 "hw-romcode" gpmc hamming mode method & romcode layout
29 "bch4" 4-bit BCH ecc code
30 "bch8" 8-bit BCH ecc code
31
32 - elm_id: Specifies elm device node. This is required to support BCH
33 error correction using ELM module.
34
35For inline partiton table parsing (optional):
36
37 - #address-cells: should be set to 1
38 - #size-cells: should be set to 1
39
40Example for an AM33xx board:
41
42 gpmc: gpmc@50000000 {
43 compatible = "ti,am3352-gpmc";
44 ti,hwmods = "gpmc";
45 reg = <0x50000000 0x1000000>;
46 interrupts = <100>;
47 gpmc,num-cs = <8>;
48 gpmc,num-waitpins = <2>;
49 #address-cells = <2>;
50 #size-cells = <1>;
51 ranges = <0 0 0x08000000 0x2000>; /* CS0: NAND */
52 elm_id = <&elm>;
53
54 nand@0,0 {
55 reg = <0 0 0>; /* CS0, offset 0 */
56 nand-bus-width = <16>;
57 ti,nand-ecc-opt = "bch8";
58
59 gpmc,sync-clk = <0>;
60 gpmc,cs-on = <0>;
61 gpmc,cs-rd-off = <44>;
62 gpmc,cs-wr-off = <44>;
63 gpmc,adv-on = <6>;
64 gpmc,adv-rd-off = <34>;
65 gpmc,adv-wr-off = <44>;
66 gpmc,we-off = <40>;
67 gpmc,oe-off = <54>;
68 gpmc,access = <64>;
69 gpmc,rd-cycle = <82>;
70 gpmc,wr-cycle = <82>;
71 gpmc,wr-access = <40>;
72 gpmc,wr-data-mux-bus = <0>;
73
74 #address-cells = <1>;
75 #size-cells = <1>;
76
77 /* partitions go here */
78 };
79 };
80
diff --git a/Documentation/devicetree/bindings/mtd/gpmc-onenand.txt b/Documentation/devicetree/bindings/mtd/gpmc-onenand.txt
new file mode 100644
index 000000000000..deec9da224a2
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/gpmc-onenand.txt
@@ -0,0 +1,43 @@
1Device tree bindings for GPMC connected OneNANDs
2
3GPMC connected OneNAND (found on OMAP boards) are represented as child nodes of
4the GPMC controller with a name of "onenand".
5
6All timing relevant properties as well as generic gpmc child properties are
7explained in a separate documents - please refer to
8Documentation/devicetree/bindings/bus/ti-gpmc.txt
9
10Required properties:
11
12 - reg: The CS line the peripheral is connected to
13
14Optional properties:
15
16 - dma-channel: DMA Channel index
17
18For inline partiton table parsing (optional):
19
20 - #address-cells: should be set to 1
21 - #size-cells: should be set to 1
22
23Example for an OMAP3430 board:
24
25 gpmc: gpmc@6e000000 {
26 compatible = "ti,omap3430-gpmc";
27 ti,hwmods = "gpmc";
28 reg = <0x6e000000 0x1000000>;
29 interrupts = <20>;
30 gpmc,num-cs = <8>;
31 gpmc,num-waitpins = <4>;
32 #address-cells = <2>;
33 #size-cells = <1>;
34
35 onenand@0 {
36 reg = <0 0 0>; /* CS0, offset 0 */
37
38 #address-cells = <1>;
39 #size-cells = <1>;
40
41 /* partitions go here */
42 };
43 };
diff --git a/Documentation/devicetree/bindings/mtd/m25p80.txt b/Documentation/devicetree/bindings/mtd/m25p80.txt
new file mode 100644
index 000000000000..6d3d57609470
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/m25p80.txt
@@ -0,0 +1,29 @@
1* MTD SPI driver for ST M25Pxx (and similar) serial flash chips
2
3Required properties:
4- #address-cells, #size-cells : Must be present if the device has sub-nodes
5 representing partitions.
6- compatible : Should be the manufacturer and the name of the chip. Bear in mind
7 the DT binding is not Linux-only, but in case of Linux, see the
8 "m25p_ids" table in drivers/mtd/devices/m25p80.c for the list of
9 supported chips.
10- reg : Chip-Select number
11- spi-max-frequency : Maximum frequency of the SPI bus the chip can operate at
12
13Optional properties:
14- m25p,fast-read : Use the "fast read" opcode to read data from the chip instead
15 of the usual "read" opcode. This opcode is not supported by
16 all chips and support for it can not be detected at runtime.
17 Refer to your chips' datasheet to check if this is supported
18 by your chip.
19
20Example:
21
22 flash: m25p80@0 {
23 #address-cells = <1>;
24 #size-cells = <1>;
25 compatible = "spansion,m25p80";
26 reg = <0>;
27 spi-max-frequency = <40000000>;
28 m25p,fast-read;
29 };
diff --git a/Documentation/devicetree/bindings/mtd/mtd-physmap.txt b/Documentation/devicetree/bindings/mtd/mtd-physmap.txt
index 94de19b8f16b..61c5ec850f2f 100644
--- a/Documentation/devicetree/bindings/mtd/mtd-physmap.txt
+++ b/Documentation/devicetree/bindings/mtd/mtd-physmap.txt
@@ -23,6 +23,12 @@ file systems on embedded devices.
23 unaligned accesses as implemented in the JFFS2 code via memcpy(). 23 unaligned accesses as implemented in the JFFS2 code via memcpy().
24 By defining "no-unaligned-direct-access", the flash will not be 24 By defining "no-unaligned-direct-access", the flash will not be
25 exposed directly to the MTD users (e.g. JFFS2) any more. 25 exposed directly to the MTD users (e.g. JFFS2) any more.
26 - linux,mtd-name: allow to specify the mtd name for retro capability with
27 physmap-flash drivers as boot loader pass the mtd partition via the old
28 device name physmap-flash.
29 - use-advanced-sector-protection: boolean to enable support for the
30 advanced sector protection (Spansion: PPB - Persistent Protection
31 Bits) locking.
26 32
27For JEDEC compatible devices, the following additional properties 33For JEDEC compatible devices, the following additional properties
28are defined: 34are defined:
diff --git a/Documentation/devicetree/bindings/net/can/grcan.txt b/Documentation/devicetree/bindings/net/can/grcan.txt
new file mode 100644
index 000000000000..34ef3498f887
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/can/grcan.txt
@@ -0,0 +1,28 @@
1Aeroflex Gaisler GRCAN and GRHCAN CAN controllers.
2
3The GRCAN and CRHCAN CAN controllers are available in the GRLIB VHDL IP core
4library.
5
6Note: These properties are built from the AMBA plug&play in a Leon SPARC system
7(the ordinary environment for GRCAN and GRHCAN). There are no dts files for
8sparc.
9
10Required properties:
11
12- name : Should be "GAISLER_GRCAN", "01_03d", "GAISLER_GRHCAN" or "01_034"
13
14- reg : Address and length of the register set for the device
15
16- freq : Frequency of the external oscillator clock in Hz (the frequency of
17 the amba bus in the ordinary case)
18
19- interrupts : Interrupt number for this device
20
21Optional properties:
22
23- systemid : If not present or if the value of the least significant 16 bits
24 of this 32-bit property is smaller than GRCAN_TXBUG_SAFE_GRLIB_VERSION
25 a bug workaround is activated.
26
27For further information look in the documentation for the GLIB IP core library:
28http://www.gaisler.com/products/grlib/grip.pdf
diff --git a/Documentation/devicetree/bindings/net/cdns-emac.txt b/Documentation/devicetree/bindings/net/cdns-emac.txt
new file mode 100644
index 000000000000..09055c2495f0
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/cdns-emac.txt
@@ -0,0 +1,23 @@
1* Cadence EMAC Ethernet controller
2
3Required properties:
4- compatible: Should be "cdns,[<chip>-]{emac}"
5 Use "cdns,at91rm9200-emac" Atmel at91rm9200 SoC.
6 or the generic form: "cdns,emac".
7- reg: Address and length of the register set for the device
8- interrupts: Should contain macb interrupt
9- phy-mode: String, operation mode of the PHY interface.
10 Supported values are: "mii", "rmii".
11
12Optional properties:
13- local-mac-address: 6 bytes, mac address
14
15Examples:
16
17 macb0: ethernet@fffc4000 {
18 compatible = "cdns,at91rm9200-emac";
19 reg = <0xfffc4000 0x4000>;
20 interrupts = <21>;
21 phy-mode = "rmii";
22 local-mac-address = [3a 0e 03 04 05 06];
23 };
diff --git a/Documentation/devicetree/bindings/net/cpsw.txt b/Documentation/devicetree/bindings/net/cpsw.txt
index dcaabe9fe869..ecfdf756d10f 100644
--- a/Documentation/devicetree/bindings/net/cpsw.txt
+++ b/Documentation/devicetree/bindings/net/cpsw.txt
@@ -9,27 +9,23 @@ Required properties:
9 number 9 number
10- interrupt-parent : The parent interrupt controller 10- interrupt-parent : The parent interrupt controller
11- cpdma_channels : Specifies number of channels in CPDMA 11- cpdma_channels : Specifies number of channels in CPDMA
12- host_port_no : Specifies host port shift
13- cpdma_reg_ofs : Specifies CPDMA submodule register offset
14- cpdma_sram_ofs : Specifies CPDMA SRAM offset
15- ale_reg_ofs : Specifies ALE submodule register offset
16- ale_entries : Specifies No of entries ALE can hold 12- ale_entries : Specifies No of entries ALE can hold
17- host_port_reg_ofs : Specifies host port register offset
18- hw_stats_reg_ofs : Specifies hardware statistics register offset
19- bd_ram_ofs : Specifies internal desciptor RAM offset
20- bd_ram_size : Specifies internal descriptor RAM size 13- bd_ram_size : Specifies internal descriptor RAM size
21- rx_descs : Specifies number of Rx descriptors 14- rx_descs : Specifies number of Rx descriptors
22- mac_control : Specifies Default MAC control register content 15- mac_control : Specifies Default MAC control register content
23 for the specific platform 16 for the specific platform
24- slaves : Specifies number for slaves 17- slaves : Specifies number for slaves
25- slave_reg_ofs : Specifies slave register offset 18- cpts_active_slave : Specifies the slave to use for time stamping
26- sliver_reg_ofs : Specifies slave sliver register offset 19- cpts_clock_mult : Numerator to convert input clock ticks into nanoseconds
20- cpts_clock_shift : Denominator to convert input clock ticks into nanoseconds
27- phy_id : Specifies slave phy id 21- phy_id : Specifies slave phy id
28- mac-address : Specifies slave MAC address 22- mac-address : Specifies slave MAC address
29 23
30Optional properties: 24Optional properties:
31- ti,hwmods : Must be "cpgmac0" 25- ti,hwmods : Must be "cpgmac0"
32- no_bd_ram : Must be 0 or 1 26- no_bd_ram : Must be 0 or 1
27- dual_emac : Specifies Switch to act as Dual EMAC
28- dual_emac_res_vlan : Specifies VID to be used to segregate the ports
33 29
34Note: "ti,hwmods" field is used to fetch the base address and irq 30Note: "ti,hwmods" field is used to fetch the base address and irq
35resources from TI, omap hwmod data base during device registration. 31resources from TI, omap hwmod data base during device registration.
@@ -45,30 +41,22 @@ Examples:
45 interrupts = <55 0x4>; 41 interrupts = <55 0x4>;
46 interrupt-parent = <&intc>; 42 interrupt-parent = <&intc>;
47 cpdma_channels = <8>; 43 cpdma_channels = <8>;
48 host_port_no = <0>;
49 cpdma_reg_ofs = <0x800>;
50 cpdma_sram_ofs = <0xa00>;
51 ale_reg_ofs = <0xd00>;
52 ale_entries = <1024>; 44 ale_entries = <1024>;
53 host_port_reg_ofs = <0x108>;
54 hw_stats_reg_ofs = <0x900>;
55 bd_ram_ofs = <0x2000>;
56 bd_ram_size = <0x2000>; 45 bd_ram_size = <0x2000>;
57 no_bd_ram = <0>; 46 no_bd_ram = <0>;
58 rx_descs = <64>; 47 rx_descs = <64>;
59 mac_control = <0x20>; 48 mac_control = <0x20>;
60 slaves = <2>; 49 slaves = <2>;
50 cpts_active_slave = <0>;
51 cpts_clock_mult = <0x80000000>;
52 cpts_clock_shift = <29>;
61 cpsw_emac0: slave@0 { 53 cpsw_emac0: slave@0 {
62 slave_reg_ofs = <0x208>; 54 phy_id = <&davinci_mdio>, <0>;
63 sliver_reg_ofs = <0xd80>;
64 phy_id = "davinci_mdio.16:00";
65 /* Filled in by U-Boot */ 55 /* Filled in by U-Boot */
66 mac-address = [ 00 00 00 00 00 00 ]; 56 mac-address = [ 00 00 00 00 00 00 ];
67 }; 57 };
68 cpsw_emac1: slave@1 { 58 cpsw_emac1: slave@1 {
69 slave_reg_ofs = <0x308>; 59 phy_id = <&davinci_mdio>, <1>;
70 sliver_reg_ofs = <0xdc0>;
71 phy_id = "davinci_mdio.16:01";
72 /* Filled in by U-Boot */ 60 /* Filled in by U-Boot */
73 mac-address = [ 00 00 00 00 00 00 ]; 61 mac-address = [ 00 00 00 00 00 00 ];
74 }; 62 };
@@ -79,30 +67,22 @@ Examples:
79 compatible = "ti,cpsw"; 67 compatible = "ti,cpsw";
80 ti,hwmods = "cpgmac0"; 68 ti,hwmods = "cpgmac0";
81 cpdma_channels = <8>; 69 cpdma_channels = <8>;
82 host_port_no = <0>;
83 cpdma_reg_ofs = <0x800>;
84 cpdma_sram_ofs = <0xa00>;
85 ale_reg_ofs = <0xd00>;
86 ale_entries = <1024>; 70 ale_entries = <1024>;
87 host_port_reg_ofs = <0x108>;
88 hw_stats_reg_ofs = <0x900>;
89 bd_ram_ofs = <0x2000>;
90 bd_ram_size = <0x2000>; 71 bd_ram_size = <0x2000>;
91 no_bd_ram = <0>; 72 no_bd_ram = <0>;
92 rx_descs = <64>; 73 rx_descs = <64>;
93 mac_control = <0x20>; 74 mac_control = <0x20>;
94 slaves = <2>; 75 slaves = <2>;
76 cpts_active_slave = <0>;
77 cpts_clock_mult = <0x80000000>;
78 cpts_clock_shift = <29>;
95 cpsw_emac0: slave@0 { 79 cpsw_emac0: slave@0 {
96 slave_reg_ofs = <0x208>; 80 phy_id = <&davinci_mdio>, <0>;
97 sliver_reg_ofs = <0xd80>;
98 phy_id = "davinci_mdio.16:00";
99 /* Filled in by U-Boot */ 81 /* Filled in by U-Boot */
100 mac-address = [ 00 00 00 00 00 00 ]; 82 mac-address = [ 00 00 00 00 00 00 ];
101 }; 83 };
102 cpsw_emac1: slave@1 { 84 cpsw_emac1: slave@1 {
103 slave_reg_ofs = <0x308>; 85 phy_id = <&davinci_mdio>, <1>;
104 sliver_reg_ofs = <0xdc0>;
105 phy_id = "davinci_mdio.16:01";
106 /* Filled in by U-Boot */ 86 /* Filled in by U-Boot */
107 mac-address = [ 00 00 00 00 00 00 ]; 87 mac-address = [ 00 00 00 00 00 00 ];
108 }; 88 };
diff --git a/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt b/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt
new file mode 100644
index 000000000000..859a6fa7569c
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt
@@ -0,0 +1,23 @@
1* Marvell Armada 370 / Armada XP Ethernet Controller (NETA)
2
3Required properties:
4- compatible: should be "marvell,armada-370-neta".
5- reg: address and length of the register set for the device.
6- interrupts: interrupt for the device
7- phy: A phandle to a phy node defining the PHY address (as the reg
8 property, a single integer).
9- phy-mode: The interface between the SoC and the PHY (a string that
10 of_get_phy_mode() can understand)
11- clocks: a pointer to the reference clock for this device.
12
13Example:
14
15ethernet@d0070000 {
16 compatible = "marvell,armada-370-neta";
17 reg = <0xd0070000 0x2500>;
18 interrupts = <8>;
19 clocks = <&gate_clk 4>;
20 status = "okay";
21 phy = <&phy0>;
22 phy-mode = "rgmii-id";
23};
diff --git a/Documentation/devicetree/bindings/net/marvell-orion-mdio.txt b/Documentation/devicetree/bindings/net/marvell-orion-mdio.txt
new file mode 100644
index 000000000000..34e7aafa321c
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/marvell-orion-mdio.txt
@@ -0,0 +1,35 @@
1* Marvell MDIO Ethernet Controller interface
2
3The Ethernet controllers of the Marvel Kirkwood, Dove, Orion5x,
4MV78xx0, Armada 370 and Armada XP have an identical unit that provides
5an interface with the MDIO bus. This driver handles this MDIO
6interface.
7
8Required properties:
9- compatible: "marvell,orion-mdio"
10- reg: address and length of the SMI register
11
12The child nodes of the MDIO driver are the individual PHY devices
13connected to this MDIO bus. They must have a "reg" property given the
14PHY address on the MDIO bus.
15
16Example at the SoC level:
17
18mdio {
19 #address-cells = <1>;
20 #size-cells = <0>;
21 compatible = "marvell,orion-mdio";
22 reg = <0xd0072004 0x4>;
23};
24
25And at the board level:
26
27mdio {
28 phy0: ethernet-phy@0 {
29 reg = <0>;
30 };
31
32 phy1: ethernet-phy@1 {
33 reg = <1>;
34 };
35}
diff --git a/Documentation/devicetree/bindings/net/mdio-gpio.txt b/Documentation/devicetree/bindings/net/mdio-gpio.txt
index bc9549529014..c79bab025369 100644
--- a/Documentation/devicetree/bindings/net/mdio-gpio.txt
+++ b/Documentation/devicetree/bindings/net/mdio-gpio.txt
@@ -8,9 +8,16 @@ gpios property as described in section VIII.1 in the following order:
8 8
9MDC, MDIO. 9MDC, MDIO.
10 10
11Note: Each gpio-mdio bus should have an alias correctly numbered in "aliases"
12node.
13
11Example: 14Example:
12 15
13mdio { 16aliases {
17 mdio-gpio0 = <&mdio0>;
18};
19
20mdio0: mdio {
14 compatible = "virtual,mdio-gpio"; 21 compatible = "virtual,mdio-gpio";
15 #address-cells = <1>; 22 #address-cells = <1>;
16 #size-cells = <0>; 23 #size-cells = <0>;
diff --git a/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt
new file mode 100644
index 000000000000..dff0e5f995e2
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt
@@ -0,0 +1,60 @@
1* Allwinner A1X Pin Controller
2
3The pins controlled by sunXi pin controller are organized in banks,
4each bank has 32 pins. Each pin has 7 multiplexing functions, with
5the first two functions being GPIO in and out. The configuration on
6the pins includes drive strength and pull-up.
7
8Required properties:
9- compatible: "allwinner,<soc>-pinctrl". Supported SoCs for now are:
10 sun5i-a13.
11- reg: Should contain the register physical address and length for the
12 pin controller.
13
14Please refer to pinctrl-bindings.txt in this directory for details of the
15common pinctrl bindings used by client devices.
16
17A pinctrl node should contain at least one subnodes representing the
18pinctrl groups available on the machine. Each subnode will list the
19pins it needs, and how they should be configured, with regard to muxer
20configuration, drive strength and pullups. If one of these options is
21not set, its actual value will be unspecified.
22
23Required subnode-properties:
24
25- allwinner,pins: List of strings containing the pin name.
26- allwinner,function: Function to mux the pins listed above to.
27
28Optional subnode-properties:
29- allwinner,drive: Integer. Represents the current sent to the pin
30 0: 10 mA
31 1: 20 mA
32 2: 30 mA
33 3: 40 mA
34- allwinner,pull: Integer.
35 0: No resistor
36 1: Pull-up resistor
37 2: Pull-down resistor
38
39Examples:
40
41pinctrl@01c20800 {
42 compatible = "allwinner,sun5i-a13-pinctrl";
43 reg = <0x01c20800 0x400>;
44 #address-cells = <1>;
45 #size-cells = <0>;
46
47 uart1_pins_a: uart1@0 {
48 allwinner,pins = "PE10", "PE11";
49 allwinner,function = "uart1";
50 allwinner,drive = <0>;
51 allwinner,pull = <0>;
52 };
53
54 uart1_pins_b: uart1@1 {
55 allwinner,pins = "PG3", "PG4";
56 allwinner,function = "uart1";
57 allwinner,drive = <0>;
58 allwinner,pull = <0>;
59 };
60};
diff --git a/Documentation/devicetree/bindings/pinctrl/atmel,at91-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/atmel,at91-pinctrl.txt
new file mode 100644
index 000000000000..bc50899e0c81
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/atmel,at91-pinctrl.txt
@@ -0,0 +1,142 @@
1* Atmel AT91 Pinmux Controller
2
3The AT91 Pinmux Controler, enables the IC
4to share one PAD to several functional blocks. The sharing is done by
5multiplexing the PAD input/output signals. For each PAD there are up to
68 muxing options (called periph modes). Since different modules require
7different PAD settings (like pull up, keeper, etc) the contoller controls
8also the PAD settings parameters.
9
10Please refer to pinctrl-bindings.txt in this directory for details of the
11common pinctrl bindings used by client devices, including the meaning of the
12phrase "pin configuration node".
13
14Atmel AT91 pin configuration node is a node of a group of pins which can be
15used for a specific device or function. This node represents both mux and config
16of the pins in that group. The 'pins' selects the function mode(also named pin
17mode) this pin can work on and the 'config' configures various pad settings
18such as pull-up, multi drive, etc.
19
20Required properties for iomux controller:
21- compatible: "atmel,at91rm9200-pinctrl"
22- atmel,mux-mask: array of mask (periph per bank) to describe if a pin can be
23 configured in this periph mode. All the periph and bank need to be describe.
24
25How to create such array:
26
27Each column will represent the possible peripheral of the pinctrl
28Each line will represent a pio bank
29
30Take an example on the 9260
31Peripheral: 2 ( A and B)
32Bank: 3 (A, B and C)
33=>
34
35 /* A B */
36 0xffffffff 0xffc00c3b /* pioA */
37 0xffffffff 0x7fff3ccf /* pioB */
38 0xffffffff 0x007fffff /* pioC */
39
40For each peripheral/bank we will descibe in a u32 if a pin can can be
41configured in it by putting 1 to the pin bit (1 << pin)
42
43Let's take the pioA on peripheral B
44From the datasheet Table 10-2.
45Peripheral B
46PA0 MCDB0
47PA1 MCCDB
48PA2
49PA3 MCDB3
50PA4 MCDB2
51PA5 MCDB1
52PA6
53PA7
54PA8
55PA9
56PA10 ETX2
57PA11 ETX3
58PA12
59PA13
60PA14
61PA15
62PA16
63PA17
64PA18
65PA19
66PA20
67PA21
68PA22 ETXER
69PA23 ETX2
70PA24 ETX3
71PA25 ERX2
72PA26 ERX3
73PA27 ERXCK
74PA28 ECRS
75PA29 ECOL
76PA30 RXD4
77PA31 TXD4
78
79=> 0xffc00c3b
80
81Required properties for pin configuration node:
82- atmel,pins: 4 integers array, represents a group of pins mux and config
83 setting. The format is atmel,pins = <PIN_BANK PIN_BANK_NUM PERIPH CONFIG>.
84 The PERIPH 0 means gpio, PERIPH 1 is periph A, PERIPH 2 is periph B...
85 PIN_BANK 0 is pioA, PIN_BANK 1 is pioB...
86
87Bits used for CONFIG:
88PULL_UP (1 << 0): indicate this pin need a pull up.
89MULTIDRIVE (1 << 1): indicate this pin need to be configured as multidrive.
90DEGLITCH (1 << 2): indicate this pin need deglitch.
91PULL_DOWN (1 << 3): indicate this pin need a pull down.
92DIS_SCHMIT (1 << 4): indicate this pin need to disable schmit trigger.
93DEBOUNCE (1 << 16): indicate this pin need debounce.
94DEBOUNCE_VAL (0x3fff << 17): debounce val.
95
96NOTE:
97Some requirements for using atmel,at91rm9200-pinctrl binding:
981. We have pin function node defined under at91 controller node to represent
99 what pinmux functions this SoC supports.
1002. The driver can use the function node's name and pin configuration node's
101 name describe the pin function and group hierarchy.
102 For example, Linux at91 pinctrl driver takes the function node's name
103 as the function name and pin configuration node's name as group name to
104 create the map table.
1053. Each pin configuration node should have a phandle, devices can set pins
106 configurations by referring to the phandle of that pin configuration node.
1074. The gpio controller must be describe in the pinctrl simple-bus.
108
109Examples:
110
111pinctrl@fffff400 {
112 #address-cells = <1>;
113 #size-cells = <1>;
114 ranges;
115 compatible = "atmel,at91rm9200-pinctrl", "simple-bus";
116 reg = <0xfffff400 0x600>;
117
118 atmel,mux-mask = <
119 /* A B */
120 0xffffffff 0xffc00c3b /* pioA */
121 0xffffffff 0x7fff3ccf /* pioB */
122 0xffffffff 0x007fffff /* pioC */
123 >;
124
125 /* shared pinctrl settings */
126 dbgu {
127 pinctrl_dbgu: dbgu-0 {
128 atmel,pins =
129 <1 14 0x1 0x0 /* PB14 periph A */
130 1 15 0x1 0x1>; /* PB15 periph A with pullup */
131 };
132 };
133};
134
135dbgu: serial@fffff200 {
136 compatible = "atmel,at91sam9260-usart";
137 reg = <0xfffff200 0x200>;
138 interrupts = <1 4 7>;
139 pinctrl-names = "default";
140 pinctrl-0 = <&pinctrl_dbgu>;
141 status = "disabled";
142};
diff --git a/Documentation/devicetree/bindings/pinctrl/marvell,kirkwood-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/marvell,kirkwood-pinctrl.txt
index 361bccb7ec89..95daf6335c37 100644
--- a/Documentation/devicetree/bindings/pinctrl/marvell,kirkwood-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/marvell,kirkwood-pinctrl.txt
@@ -7,8 +7,10 @@ Required properties:
7- compatible: "marvell,88f6180-pinctrl", 7- compatible: "marvell,88f6180-pinctrl",
8 "marvell,88f6190-pinctrl", "marvell,88f6192-pinctrl", 8 "marvell,88f6190-pinctrl", "marvell,88f6192-pinctrl",
9 "marvell,88f6281-pinctrl", "marvell,88f6282-pinctrl" 9 "marvell,88f6281-pinctrl", "marvell,88f6282-pinctrl"
10 "marvell,98dx4122-pinctrl"
10 11
11This driver supports all kirkwood variants, i.e. 88f6180, 88f619x, and 88f628x. 12This driver supports all kirkwood variants, i.e. 88f6180, 88f619x, and 88f628x.
13It also support the 88f6281-based variant in the 98dx412x Bobcat SoCs.
12 14
13Available mpp pins/groups and functions: 15Available mpp pins/groups and functions:
14Note: brackets (x) are not part of the mpp name for marvell,function and given 16Note: brackets (x) are not part of the mpp name for marvell,function and given
@@ -277,3 +279,40 @@ mpp46 46 gpio, ts(mp10), tdm(fs), lcd(hsync)
277mpp47 47 gpio, ts(mp11), tdm(drx), lcd(vsync) 279mpp47 47 gpio, ts(mp11), tdm(drx), lcd(vsync)
278mpp48 48 gpio, ts(mp12), tdm(dtx), lcd(d16) 280mpp48 48 gpio, ts(mp12), tdm(dtx), lcd(d16)
279mpp49 49 gpo, tdm(rx0ql), pex(clkreq), lcd(d17) 281mpp49 49 gpo, tdm(rx0ql), pex(clkreq), lcd(d17)
282
283* Marvell Bobcat 98dx4122
284
285name pins functions
286================================================================================
287mpp0 0 gpio, nand(io2), spi(cs)
288mpp1 1 gpo, nand(io3), spi(mosi)
289mpp2 2 gpo, nand(io4), spi(sck)
290mpp3 3 gpo, nand(io5), spi(miso)
291mpp4 4 gpio, nand(io6), uart0(rxd)
292mpp5 5 gpo, nand(io7), uart0(txd)
293mpp6 6 sysrst(out), spi(mosi)
294mpp7 7 gpo, pex(rsto), spi(cs)
295mpp8 8 gpio, twsi0(sda), uart0(rts), uart1(rts)
296mpp9 9 gpio, twsi(sck), uart0(cts), uart1(cts)
297mpp10 10 gpo, spi(sck), uart0(txd)
298mpp11 11 gpio, spi(miso), uart0(rxd)
299mpp13 13 gpio, uart1(txd)
300mpp14 14 gpio, uart1(rxd)
301mpp15 15 gpio, uart0(rts)
302mpp16 16 gpio, uart0(cts)
303mpp18 18 gpo, nand(io0)
304mpp19 19 gpo, nand(io1)
305mpp34 34 gpio
306mpp35 35 gpio
307mpp36 36 gpio
308mpp37 37 gpio
309mpp38 38 gpio
310mpp39 39 gpio
311mpp40 40 gpio
312mpp41 41 gpio
313mpp42 42 gpio
314mpp43 43 gpio
315mpp44 44 gpio
316mpp45 45 gpio
317mpp49 49 gpio
318
diff --git a/Documentation/devicetree/bindings/pinctrl/nvidia,tegra114-pinmux.txt b/Documentation/devicetree/bindings/pinctrl/nvidia,tegra114-pinmux.txt
new file mode 100644
index 000000000000..e204d009f16c
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/nvidia,tegra114-pinmux.txt
@@ -0,0 +1,120 @@
1NVIDIA Tegra114 pinmux controller
2
3The Tegra114 pinctrl binding is very similar to the Tegra20 and Tegra30
4pinctrl binding, as described in nvidia,tegra20-pinmux.txt and
5nvidia,tegra30-pinmux.txt. In fact, this document assumes that binding as
6a baseline, and only documents the differences between the two bindings.
7
8Required properties:
9- compatible: "nvidia,tegra114-pinmux"
10- reg: Should contain the register physical address and length for each of
11 the pad control and mux registers. The first bank of address must be the
12 driver strength pad control register address and second bank address must
13 be pinmux register address.
14
15Tegra114 adds the following optional properties for pin configuration subnodes:
16- nvidia,enable-input: Integer. Enable the pin's input path. 0: no, 1: yes.
17- nvidia,open-drain: Integer. Enable open drain mode. 0: no, 1: yes.
18- nvidia,lock: Integer. Lock the pin configuration against further changes
19 until reset. 0: no, 1: yes.
20- nvidia,io-reset: Integer. Reset the IO path. 0: no, 1: yes.
21- nvidia,rcv-sel: Integer. Select VIL/VIH receivers. 0: normal, 1: high.
22- nvidia,drive-type: Integer. Valid range 0...3.
23
24As with Tegra20 and Terga30, see the Tegra TRM for complete details regarding
25which groups support which functionality.
26
27Valid values for pin and group names are:
28
29 per-pin mux groups:
30
31 These all support nvidia,function, nvidia,tristate, nvidia,pull,
32 nvidia,enable-input, nvidia,lock. Some support nvidia,open-drain,
33 nvidia,io-reset and nvidia,rcv-sel.
34
35 ulpi_data0_po1, ulpi_data1_po2, ulpi_data2_po3, ulpi_data3_po4,
36 ulpi_data4_po5, ulpi_data5_po6, ulpi_data6_po7, ulpi_data7_po0,
37 ulpi_clk_py0, ulpi_dir_py1, ulpi_nxt_py2, ulpi_stp_py3, dap3_fs_pp0,
38 dap3_din_pp1, dap3_dout_pp2, dap3_sclk_pp3, pv0, pv1, sdmmc1_clk_pz0,
39 sdmmc1_cmd_pz1, sdmmc1_dat3_py4, sdmmc1_dat2_py5, sdmmc1_dat1_py6,
40 sdmmc1_dat0_py7, clk2_out_pw5, clk2_req_pcc5, hdmi_int_pn7, ddc_scl_pv4,
41 ddc_sda_pv5, uart2_rxd_pc3, uart2_txd_pc2, uart2_rts_n_pj6,
42 uart2_cts_n_pj5, uart3_txd_pw6, uart3_rxd_pw7, uart3_cts_n_pa1,
43 uart3_rts_n_pc0, pu0, pu1, pu2, pu3, pu4, pu5, pu6, gen1_i2c_sda_pc5,
44 gen1_i2c_scl_pc4, dap4_fs_pp4, dap4_din_pp5, dap4_dout_pp6, dap4_sclk_pp7,
45 clk3_out_pee0, clk3_req_pee1, gmi_wp_n_pc7, gmi_iordy_pi5, gmi_wait_pi7,
46 gmi_adv_n_pk0, gmi_clk_pk1, gmi_cs0_n_pj0, gmi_cs1_n_pj2, gmi_cs2_n_pk3,
47 gmi_cs3_n_pk4, gmi_cs4_n_pk2, gmi_cs6_n_pi3, gmi_cs7_n_pi6, gmi_ad0_pg0,
48 gmi_ad1_pg1, gmi_ad2_pg2, gmi_ad3_pg3, gmi_ad4_pg4, gmi_ad5_pg5,
49 gmi_ad6_pg6, gmi_ad7_pg7, gmi_ad8_ph0, gmi_ad9_ph1, gmi_ad10_ph2,
50 gmi_ad11_ph3, gmi_ad12_ph4, gmi_ad13_ph5, gmi_ad14_ph6, gmi_ad15_ph7,
51 gmi_a16_pj7, gmi_a17_pb0, gmi_a18_pb1, gmi_a19_pk7, gmi_wr_n_pi0,
52 gmi_oe_n_pi1, gmi_dqs_p_pj3, gmi_rst_n_pi4, gen2_i2c_scl_pt5,
53 gen2_i2c_sda_pt6, sdmmc4_clk_pcc4, sdmmc4_cmd_pt7, sdmmc4_dat0_paa0,
54 sdmmc4_dat1_paa1, sdmmc4_dat2_paa2, sdmmc4_dat3_paa3, sdmmc4_dat4_paa4,
55 sdmmc4_dat5_paa5, sdmmc4_dat6_paa6, sdmmc4_dat7_paa7, cam_mclk_pcc0,
56 pcc1, pbb0, cam_i2c_scl_pbb1, cam_i2c_sda_pbb2, pbb3, pbb4, pbb5, pbb6,
57 pbb7, pcc2, pwr_i2c_scl_pz6, pwr_i2c_sda_pz7, kb_row0_pr0, kb_row1_pr1,
58 kb_row2_pr2, kb_row3_pr3, kb_row4_pr4, kb_row5_pr5, kb_row6_pr6,
59 kb_row7_pr7, kb_row8_ps0, kb_row9_ps1, kb_row10_ps2, kb_col0_pq0,
60 kb_col1_pq1, kb_col2_pq2, kb_col3_pq3, kb_col4_pq4, kb_col5_pq5,
61 kb_col6_pq6, kb_col7_pq7, clk_32k_out_pa0, sys_clk_req_pz5, core_pwr_req,
62 cpu_pwr_req, pwr_int_n, owr, dap1_fs_pn0, dap1_din_pn1, dap1_dout_pn2,
63 dap1_sclk_pn3, clk1_req_pee2, clk1_out_pw4, spdif_in_pk6, spdif_out_pk5,
64 dap2_fs_pa2, dap2_din_pa4, dap2_dout_pa5, dap2_sclk_pa3, dvfs_pwm_px0,
65 gpio_x1_aud_px1, gpio_x3_aud_px3, dvfs_clk_px2, gpio_x4_aud_px4,
66 gpio_x5_aud_px5, gpio_x6_aud_px6, gpio_x7_aud_px7, sdmmc3_clk_pa6,
67 sdmmc3_cmd_pa7, sdmmc3_dat0_pb7, sdmmc3_dat1_pb6, sdmmc3_dat2_pb5,
68 sdmmc3_dat3_pb4, hdmi_cec_pee3, sdmmc1_wp_n_pv3, sdmmc3_cd_n_pv2,
69 gpio_w2_aud_pw2, gpio_w3_aud_pw3, usb_vbus_en0_pn4, usb_vbus_en1_pn5,
70 sdmmc3_clk_lb_in_pee5, sdmmc3_clk_lb_out_pee4, reset_out_n.
71
72 drive groups:
73
74 These all support nvidia,pull-down-strength, nvidia,pull-up-strength,
75 nvidia,slew-rate-rising, nvidia,slew-rate-falling. Most but not all
76 support nvidia,high-speed-mode, nvidia,schmitt, nvidia,low-power-mode
77 and nvidia,drive-type.
78
79 ao1, ao2, at1, at2, at3, at4, at5, cdev1, cdev2, dap1, dap2, dap3, dap4,
80 dbg, sdio3, spi, uaa, uab, uart2, uart3, sdio1, ddc, gma, gme, gmf, gmg,
81 gmh, owr, uda.
82
83Example:
84
85 pinmux: pinmux {
86 compatible = "nvidia,tegra114-pinmux";
87 reg = <0x70000868 0x148 /* Pad control registers */
88 0x70003000 0x40c>; /* PinMux registers */
89 };
90
91Example board file extract:
92
93 pinctrl {
94 sdmmc4_default: pinmux {
95 sdmmc4_clk_pcc4 {
96 nvidia,pins = "sdmmc4_clk_pcc4",
97 nvidia,function = "sdmmc4";
98 nvidia,pull = <0>;
99 nvidia,tristate = <0>;
100 };
101 sdmmc4_dat0_paa0 {
102 nvidia,pins = "sdmmc4_dat0_paa0",
103 "sdmmc4_dat1_paa1",
104 "sdmmc4_dat2_paa2",
105 "sdmmc4_dat3_paa3",
106 "sdmmc4_dat4_paa4",
107 "sdmmc4_dat5_paa5",
108 "sdmmc4_dat6_paa6",
109 "sdmmc4_dat7_paa7";
110 nvidia,function = "sdmmc4";
111 nvidia,pull = <2>;
112 nvidia,tristate = <0>;
113 };
114 };
115 };
116
117 sdhci@78000400 {
118 pinctrl-names = "default";
119 pinctrl-0 = <&sdmmc4_default>;
120 };
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-sirf.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-sirf.txt
new file mode 100644
index 000000000000..c596a6ad3285
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-sirf.txt
@@ -0,0 +1,47 @@
1CSR SiRFprimaII pinmux controller
2
3Required properties:
4- compatible : "sirf,prima2-pinctrl"
5- reg : Address range of the pinctrl registers
6- interrupts : Interrupts used by every GPIO group
7- gpio-controller : Indicates this device is a GPIO controller
8- interrupt-controller : Marks the device node as an interrupt controller
9Optional properties:
10- sirf,pullups : if n-th bit of m-th bank is set, set a pullup on GPIO-n of bank m
11- sirf,pulldowns : if n-th bit of m-th bank is set, set a pulldown on GPIO-n of bank m
12
13Please refer to pinctrl-bindings.txt in this directory for details of the common
14pinctrl bindings used by client devices.
15
16SiRFprimaII's pinmux nodes act as a container for an abitrary number of subnodes.
17Each of these subnodes represents some desired configuration for a group of pins.
18
19Required subnode-properties:
20- sirf,pins : An array of strings. Each string contains the name of a group.
21- sirf,function: A string containing the name of the function to mux to the
22 group.
23
24 Valid values for group and function names can be found from looking at the
25 group and function arrays in driver files:
26 drivers/pinctrl/pinctrl-sirf.c
27
28For example, pinctrl might have subnodes like the following:
29 uart2_pins_a: uart2@0 {
30 uart {
31 sirf,pins = "uart2grp";
32 sirf,function = "uart2";
33 };
34 };
35 uart2_noflow_pins_a: uart2@1 {
36 uart {
37 sirf,pins = "uart2_nostreamctrlgrp";
38 sirf,function = "uart2_nostreamctrl";
39 };
40 };
41
42For a specific board, if it wants to use uart2 without hardware flow control,
43it can add the following to its board-specific .dts file.
44uart2: uart@0xb0070000 {
45 pinctrl-names = "default";
46 pinctrl-0 = <&uart2_noflow_pins_a>;
47}
diff --git a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
index 03dee50532f5..4598a47aa0cd 100644
--- a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
@@ -7,14 +7,21 @@ on-chip controllers onto these pads.
7 7
8Required Properties: 8Required Properties:
9- compatible: should be one of the following. 9- compatible: should be one of the following.
10 - "samsung,pinctrl-exynos4210": for Exynos4210 compatible pin-controller. 10 - "samsung,exynos4210-pinctrl": for Exynos4210 compatible pin-controller.
11 - "samsung,pinctrl-exynos5250": for Exynos5250 compatible pin-controller. 11 - "samsung,exynos4x12-pinctrl": for Exynos4x12 compatible pin-controller.
12 - "samsung,exynos5250-pinctrl": for Exynos5250 compatible pin-controller.
12 13
13- reg: Base address of the pin controller hardware module and length of 14- reg: Base address of the pin controller hardware module and length of
14 the address space it occupies. 15 the address space it occupies.
15 16
16- interrupts: interrupt specifier for the controller. The format and value of 17- Pin banks as child nodes: Pin banks of the controller are represented by child
17 the interrupt specifier depends on the interrupt parent for the controller. 18 nodes of the controller node. Bank name is taken from name of the node. Each
19 bank node must contain following properties:
20
21 - gpio-controller: identifies the node as a gpio controller and pin bank.
22 - #gpio-cells: number of cells in GPIO specifier. Since the generic GPIO
23 binding is used, the amount of cells must be specified as 2. See generic
24 GPIO binding documentation for description of particular cells.
18 25
19- Pin mux/config groups as child nodes: The pin mux (selecting pin function 26- Pin mux/config groups as child nodes: The pin mux (selecting pin function
20 mode) and pin config (pull up/down, driver strength) settings are represented 27 mode) and pin config (pull up/down, driver strength) settings are represented
@@ -72,16 +79,24 @@ used as system wakeup events.
72A. External GPIO Interrupts: For supporting external gpio interrupts, the 79A. External GPIO Interrupts: For supporting external gpio interrupts, the
73 following properties should be specified in the pin-controller device node. 80 following properties should be specified in the pin-controller device node.
74 81
75- interrupt-controller: identifies the controller node as interrupt-parent. 82 - interrupt-parent: phandle of the interrupt parent to which the external
76- #interrupt-cells: the value of this property should be 2. 83 GPIO interrupts are forwarded to.
77 - First Cell: represents the external gpio interrupt number local to the 84 - interrupts: interrupt specifier for the controller. The format and value of
78 external gpio interrupt space of the controller. 85 the interrupt specifier depends on the interrupt parent for the controller.
79 - Second Cell: flags to identify the type of the interrupt 86
80 - 1 = rising edge triggered 87 In addition, following properties must be present in node of every bank
81 - 2 = falling edge triggered 88 of pins supporting GPIO interrupts:
82 - 3 = rising and falling edge triggered 89
83 - 4 = high level triggered 90 - interrupt-controller: identifies the controller node as interrupt-parent.
84 - 8 = low level triggered 91 - #interrupt-cells: the value of this property should be 2.
92 - First Cell: represents the external gpio interrupt number local to the
93 external gpio interrupt space of the controller.
94 - Second Cell: flags to identify the type of the interrupt
95 - 1 = rising edge triggered
96 - 2 = falling edge triggered
97 - 3 = rising and falling edge triggered
98 - 4 = high level triggered
99 - 8 = low level triggered
85 100
86B. External Wakeup Interrupts: For supporting external wakeup interrupts, a 101B. External Wakeup Interrupts: For supporting external wakeup interrupts, a
87 child node representing the external wakeup interrupt controller should be 102 child node representing the external wakeup interrupt controller should be
@@ -94,6 +109,11 @@ B. External Wakeup Interrupts: For supporting external wakeup interrupts, a
94 found on Samsung Exynos4210 SoC. 109 found on Samsung Exynos4210 SoC.
95 - interrupt-parent: phandle of the interrupt parent to which the external 110 - interrupt-parent: phandle of the interrupt parent to which the external
96 wakeup interrupts are forwarded to. 111 wakeup interrupts are forwarded to.
112 - interrupts: interrupt used by multiplexed wakeup interrupts.
113
114 In addition, following properties must be present in node of every bank
115 of pins supporting wake-up interrupts:
116
97 - interrupt-controller: identifies the node as interrupt-parent. 117 - interrupt-controller: identifies the node as interrupt-parent.
98 - #interrupt-cells: the value of this property should be 2 118 - #interrupt-cells: the value of this property should be 2
99 - First Cell: represents the external wakeup interrupt number local to 119 - First Cell: represents the external wakeup interrupt number local to
@@ -105,18 +125,72 @@ B. External Wakeup Interrupts: For supporting external wakeup interrupts, a
105 - 4 = high level triggered 125 - 4 = high level triggered
106 - 8 = low level triggered 126 - 8 = low level triggered
107 127
128 Node of every bank of pins supporting direct wake-up interrupts (without
129 multiplexing) must contain following properties:
130
131 - interrupt-parent: phandle of the interrupt parent to which the external
132 wakeup interrupts are forwarded to.
133 - interrupts: interrupts of the interrupt parent which are used for external
134 wakeup interrupts from pins of the bank, must contain interrupts for all
135 pins of the bank.
136
108Aliases: 137Aliases:
109 138
110All the pin controller nodes should be represented in the aliases node using 139All the pin controller nodes should be represented in the aliases node using
111the following format 'pinctrl{n}' where n is a unique number for the alias. 140the following format 'pinctrl{n}' where n is a unique number for the alias.
112 141
142Example: A pin-controller node with pin banks:
143
144 pinctrl_0: pinctrl@11400000 {
145 compatible = "samsung,exynos4210-pinctrl";
146 reg = <0x11400000 0x1000>;
147 interrupts = <0 47 0>;
148
149 /* ... */
150
151 /* Pin bank without external interrupts */
152 gpy0: gpy0 {
153 gpio-controller;
154 #gpio-cells = <2>;
155 };
156
157 /* ... */
158
159 /* Pin bank with external GPIO or muxed wake-up interrupts */
160 gpj0: gpj0 {
161 gpio-controller;
162 #gpio-cells = <2>;
163
164 interrupt-controller;
165 #interrupt-cells = <2>;
166 };
167
168 /* ... */
169
170 /* Pin bank with external direct wake-up interrupts */
171 gpx0: gpx0 {
172 gpio-controller;
173 #gpio-cells = <2>;
174
175 interrupt-controller;
176 interrupt-parent = <&gic>;
177 interrupts = <0 16 0>, <0 17 0>, <0 18 0>, <0 19 0>,
178 <0 20 0>, <0 21 0>, <0 22 0>, <0 23 0>;
179 #interrupt-cells = <2>;
180 };
181
182 /* ... */
183 };
184
113Example 1: A pin-controller node with pin groups. 185Example 1: A pin-controller node with pin groups.
114 186
115 pinctrl_0: pinctrl@11400000 { 187 pinctrl_0: pinctrl@11400000 {
116 compatible = "samsung,pinctrl-exynos4210"; 188 compatible = "samsung,exynos4210-pinctrl";
117 reg = <0x11400000 0x1000>; 189 reg = <0x11400000 0x1000>;
118 interrupts = <0 47 0>; 190 interrupts = <0 47 0>;
119 191
192 /* ... */
193
120 uart0_data: uart0-data { 194 uart0_data: uart0-data {
121 samsung,pins = "gpa0-0", "gpa0-1"; 195 samsung,pins = "gpa0-0", "gpa0-1";
122 samsung,pin-function = <2>; 196 samsung,pin-function = <2>;
@@ -156,22 +230,16 @@ Example 1: A pin-controller node with pin groups.
156Example 2: A pin-controller node with external wakeup interrupt controller node. 230Example 2: A pin-controller node with external wakeup interrupt controller node.
157 231
158 pinctrl_1: pinctrl@11000000 { 232 pinctrl_1: pinctrl@11000000 {
159 compatible = "samsung,pinctrl-exynos4210"; 233 compatible = "samsung,exynos4210-pinctrl";
160 reg = <0x11000000 0x1000>; 234 reg = <0x11000000 0x1000>;
161 interrupts = <0 46 0>; 235 interrupts = <0 46 0>
162 interrupt-controller; 236
163 #interrupt-cells = <2>; 237 /* ... */
164 238
165 wakup_eint: wakeup-interrupt-controller { 239 wakeup-interrupt-controller {
166 compatible = "samsung,exynos4210-wakeup-eint"; 240 compatible = "samsung,exynos4210-wakeup-eint";
167 interrupt-parent = <&gic>; 241 interrupt-parent = <&gic>;
168 interrupt-controller; 242 interrupts = <0 32 0>;
169 #interrupt-cells = <2>;
170 interrupts = <0 16 0>, <0 17 0>, <0 18 0>, <0 19 0>,
171 <0 20 0>, <0 21 0>, <0 22 0>, <0 23 0>,
172 <0 24 0>, <0 25 0>, <0 26 0>, <0 27 0>,
173 <0 28 0>, <0 29 0>, <0 30 0>, <0 31 0>,
174 <0 32 0>;
175 }; 243 };
176 }; 244 };
177 245
@@ -190,7 +258,8 @@ Example 4: Set up the default pin state for uart controller.
190 258
191 static int s3c24xx_serial_probe(struct platform_device *pdev) { 259 static int s3c24xx_serial_probe(struct platform_device *pdev) {
192 struct pinctrl *pinctrl; 260 struct pinctrl *pinctrl;
193 ... 261
194 ... 262 /* ... */
263
195 pinctrl = devm_pinctrl_get_select_default(&pdev->dev); 264 pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
196 } 265 }
diff --git a/Documentation/devicetree/bindings/pinctrl/ste,nomadik.txt b/Documentation/devicetree/bindings/pinctrl/ste,nomadik.txt
new file mode 100644
index 000000000000..9a2f3f420526
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/ste,nomadik.txt
@@ -0,0 +1,140 @@
1ST Ericsson Nomadik pinmux controller
2
3Required properties:
4- compatible: "stericsson,nmk-pinctrl", "stericsson,nmk-pinctrl-db8540",
5 "stericsson,nmk-pinctrl-stn8815"
6- reg: Should contain the register physical address and length of the PRCMU.
7
8Please refer to pinctrl-bindings.txt in this directory for details of the
9common pinctrl bindings used by client devices, including the meaning of the
10phrase "pin configuration node".
11
12ST Ericsson's pin configuration nodes act as a container for an arbitrary number of
13subnodes. Each of these subnodes represents some desired configuration for a
14pin, a group, or a list of pins or groups. This configuration can include the
15mux function to select on those pin(s)/group(s), and various pin configuration
16parameters, such as input, output, pull up, pull down...
17
18The name of each subnode is not important; all subnodes should be enumerated
19and processed purely based on their content.
20
21Required subnode-properties:
22- ste,pins : An array of strings. Each string contains the name of a pin or
23 group.
24
25Optional subnode-properties:
26- ste,function: A string containing the name of the function to mux to the
27 pin or group.
28
29- ste,config: Handle of pin configuration node (e.g. ste,config = <&slpm_in_wkup_pdis>)
30
31- ste,input : <0/1/2>
32 0: input with no pull
33 1: input with pull up,
34 2: input with pull down,
35
36- ste,output: <0/1/2>
37 0: output low,
38 1: output high,
39 2: output (value is not specified).
40
41- ste,sleep: <0/1>
42 0: sleep mode disable,
43 1: sleep mode enable.
44
45- ste,sleep-input: <0/1/2/3>
46 0: sleep input with no pull,
47 1: sleep input with pull up,
48 2: sleep input with pull down.
49 3: sleep input and keep last input configuration (no pull, pull up or pull down).
50
51- ste,sleep-output: <0/1/2>
52 0: sleep output low,
53 1: sleep output high,
54 2: sleep output (value is not specified).
55
56- ste,sleep-gpio: <0/1>
57 0: disable sleep gpio mode,
58 1: enable sleep gpio mode.
59
60- ste,sleep-wakeup: <0/1>
61 0: wake-up detection enabled,
62 1: wake-up detection disabled.
63
64- ste,sleep-pull-disable: <0/1>
65 0: GPIO pull-up or pull-down resistor is enabled, when pin is an input,
66 1: GPIO pull-up and pull-down resistor are disabled.
67
68Example board file extract:
69
70 pinctrl@80157000 {
71 compatible = "stericsson,nmk-pinctrl";
72 reg = <0x80157000 0x2000>;
73
74 pinctrl-names = "default";
75
76 slpm_in_wkup_pdis: slpm_in_wkup_pdis {
77 ste,sleep = <1>;
78 ste,sleep-input = <3>;
79 ste,sleep-wakeup = <1>;
80 ste,sleep-pull-disable = <0>;
81 };
82
83 slpm_out_hi_wkup_pdis: slpm_out_hi_wkup_pdis {
84 ste,sleep = <1>;
85 ste,sleep-output = <1>;
86 ste,sleep-wakeup = <1>;
87 ste,sleep-pull-disable = <0>;
88 };
89
90 slpm_out_wkup_pdis: slpm_out_wkup_pdis {
91 ste,sleep = <1>;
92 ste,sleep-output = <2>;
93 ste,sleep-wakeup = <1>;
94 ste,sleep-pull-disable = <0>;
95 };
96
97 uart0 {
98 uart0_default_mux: uart0_mux {
99 u0_default_mux {
100 ste,function = "u0";
101 ste,pins = "u0_a_1";
102 };
103 };
104 uart0_default_mode: uart0_default {
105 uart0_default_cfg1 {
106 ste,pins = "GPIO0", "GPIO2";
107 ste,input = <1>;
108 };
109
110 uart0_default_cfg2 {
111 ste,pins = "GPIO1", "GPIO3";
112 ste,output = <1>;
113 };
114 };
115 uart0_sleep_mode: uart0_sleep {
116 uart0_sleep_cfg1 {
117 ste,pins = "GPIO0", "GPIO2";
118 ste,config = <&slpm_in_wkup_pdis>;
119 };
120 uart0_sleep_cfg2 {
121 ste,pins = "GPIO1";
122 ste,config = <&slpm_out_hi_wkup_pdis>;
123 };
124 uart0_sleep_cfg3 {
125 ste,pins = "GPIO3";
126 ste,config = <&slpm_out_wkup_pdis>;
127 };
128 };
129 };
130 };
131
132 uart@80120000 {
133 compatible = "arm,pl011", "arm,primecell";
134 reg = <0x80120000 0x1000>;
135 interrupts = <0 11 0x4>;
136
137 pinctrl-names = "default","sleep";
138 pinctrl-0 = <&uart0_default_mux>, <&uart0_default_mode>;
139 pinctrl-1 = <&uart0_sleep_mode>;
140 };
diff --git a/Documentation/devicetree/bindings/power_supply/ab8500/btemp.txt b/Documentation/devicetree/bindings/power_supply/ab8500/btemp.txt
new file mode 100644
index 000000000000..0ba1bcc7f33a
--- /dev/null
+++ b/Documentation/devicetree/bindings/power_supply/ab8500/btemp.txt
@@ -0,0 +1,16 @@
1=== AB8500 Battery Temperature Monitor Driver ===
2
3The properties below describes the node for btemp driver.
4
5Required Properties:
6- compatible = Shall be: "stericsson,ab8500-btemp"
7- battery = Shall be battery specific information
8
9 Example:
10 ab8500_btemp {
11 compatible = "stericsson,ab8500-btemp";
12 battery = <&ab8500_battery>;
13 };
14
15For information on battery specific node, Ref:
16Documentation/devicetree/bindings/power_supply/ab8500/fg.txt
diff --git a/Documentation/devicetree/bindings/power_supply/ab8500/chargalg.txt b/Documentation/devicetree/bindings/power_supply/ab8500/chargalg.txt
new file mode 100644
index 000000000000..ef5328371122
--- /dev/null
+++ b/Documentation/devicetree/bindings/power_supply/ab8500/chargalg.txt
@@ -0,0 +1,16 @@
1=== AB8500 Charging Algorithm Driver ===
2
3The properties below describes the node for chargalg driver.
4
5Required Properties:
6- compatible = Shall be: "stericsson,ab8500-chargalg"
7- battery = Shall be battery specific information
8
9Example:
10ab8500_chargalg {
11 compatible = "stericsson,ab8500-chargalg";
12 battery = <&ab8500_battery>;
13};
14
15For information on battery specific node, Ref:
16Documentation/devicetree/bindings/power_supply/ab8500/fg.txt
diff --git a/Documentation/devicetree/bindings/power_supply/ab8500/charger.txt b/Documentation/devicetree/bindings/power_supply/ab8500/charger.txt
new file mode 100644
index 000000000000..6bdbb08ea9e0
--- /dev/null
+++ b/Documentation/devicetree/bindings/power_supply/ab8500/charger.txt
@@ -0,0 +1,25 @@
1=== AB8500 Charger Driver ===
2
3Required Properties:
4- compatible = Shall be "stericsson,ab8500-charger"
5- battery = Shall be battery specific information
6 Example:
7 ab8500_charger {
8 compatible = "stericsson,ab8500-charger";
9 battery = <&ab8500_battery>;
10 };
11
12- vddadc-supply: Supply for USB and Main charger
13 Example:
14 ab8500-charger {
15 vddadc-supply = <&ab8500_ldo_tvout_reg>;
16 }
17- autopower_cfg:
18 Boolean value depicting the presence of 'automatic poweron after powerloss'
19 Example:
20 ab8500-charger {
21 autopower_cfg;
22 };
23
24For information on battery specific node, Ref:
25Documentation/devicetree/bindings/power_supply/ab8500/fg.txt
diff --git a/Documentation/devicetree/bindings/power_supply/ab8500/fg.txt b/Documentation/devicetree/bindings/power_supply/ab8500/fg.txt
new file mode 100644
index 000000000000..ccafcb9112fb
--- /dev/null
+++ b/Documentation/devicetree/bindings/power_supply/ab8500/fg.txt
@@ -0,0 +1,58 @@
1=== AB8500 Fuel Gauge Driver ===
2
3AB8500 is a mixed signal multimedia and power management
4device comprising: power and energy-management-module,
5wall-charger, usb-charger, audio codec, general purpose adc,
6tvout, clock management and sim card interface.
7
8Fuelgauge support is part of energy-management-modules, other
9components of this module are:
10main-charger, usb-combo-charger and battery-temperature-monitoring.
11
12The properties below describes the node for fuelgauge driver.
13
14Required Properties:
15- compatible = This shall be: "stericsson,ab8500-fg"
16- battery = Shall be battery specific information
17 Example:
18 ab8500_fg {
19 compatible = "stericsson,ab8500-fg";
20 battery = <&ab8500_battery>;
21 };
22
23dependent node:
24 ab8500_battery: ab8500_battery {
25 };
26 This node will provide information on 'thermistor interface' and
27 'battery technology type' used.
28
29Properties of this node are:
30thermistor-on-batctrl:
31 A boolean value indicating thermistor interface to battery
32
33 Note:
34 'btemp' and 'batctrl' are the pins interfaced for battery temperature
35 measurement, 'btemp' signal is used when NTC(negative temperature
36 coefficient) resister is interfaced external to battery whereas
37 'batctrl' pin is used when NTC resister is internal to battery.
38
39 Example:
40 ab8500_battery: ab8500_battery {
41 thermistor-on-batctrl;
42 };
43 indicates: NTC resister is internal to battery, 'batctrl' is used
44 for thermal measurement.
45
46 The absence of property 'thermal-on-batctrl' indicates
47 NTC resister is external to battery and 'btemp' signal is used
48 for thermal measurement.
49
50battery-type:
51 This shall be the battery manufacturing technology type,
52 allowed types are:
53 "UNKNOWN" "NiMH" "LION" "LIPO" "LiFe" "NiCd" "LiMn"
54 Example:
55 ab8500_battery: ab8500_battery {
56 stericsson,battery-type = "LIPO";
57 }
58
diff --git a/Documentation/devicetree/bindings/power_supply/max8925_batter.txt b/Documentation/devicetree/bindings/power_supply/max8925_batter.txt
new file mode 100644
index 000000000000..d7e3e0c0f71d
--- /dev/null
+++ b/Documentation/devicetree/bindings/power_supply/max8925_batter.txt
@@ -0,0 +1,18 @@
1max8925-battery bindings
2~~~~~~~~~~~~~~~~
3
4Optional properties :
5 - batt-detect: whether support battery detect
6 - topoff-threshold: set charging current in topoff mode
7 - fast-charge: set charging current in fast mode
8 - no-temp-support: whether support temperature protection detect
9 - no-insert-detect: whether support insert detect
10
11Example:
12 charger {
13 batt-detect = <0>;
14 topoff-threshold = <1>;
15 fast-charge = <7>;
16 no-temp-support = <0>;
17 no-insert-detect = <0>;
18 };
diff --git a/Documentation/devicetree/bindings/power_supply/qnap-poweroff.txt b/Documentation/devicetree/bindings/power_supply/qnap-poweroff.txt
new file mode 100644
index 000000000000..9a599d27bd75
--- /dev/null
+++ b/Documentation/devicetree/bindings/power_supply/qnap-poweroff.txt
@@ -0,0 +1,13 @@
1* QNAP Power Off
2
3QNAP NAS devices have a microcontroller controlling the main power
4supply. This microcontroller is connected to UART1 of the Kirkwood and
5Orion5x SoCs. Sending the charactor 'A', at 19200 baud, tells the
6microcontroller to turn the power off. This driver adds a handler to
7pm_power_off which is called to turn the power off.
8
9Required Properties:
10- compatible: Should be "qnap,power-off"
11
12- reg: Address and length of the register set for UART1
13- clocks: tclk clock
diff --git a/Documentation/devicetree/bindings/power_supply/restart-poweroff.txt b/Documentation/devicetree/bindings/power_supply/restart-poweroff.txt
new file mode 100644
index 000000000000..5776e684afda
--- /dev/null
+++ b/Documentation/devicetree/bindings/power_supply/restart-poweroff.txt
@@ -0,0 +1,8 @@
1* Restart Power Off
2
3Buffalo Linkstation LS-XHL and LS-CHLv2, and other devices power off
4by restarting and letting u-boot keep hold of the machine until the
5user presses a button.
6
7Required Properties:
8- compatible: Should be "restart-poweroff"
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/guts.txt b/Documentation/devicetree/bindings/powerpc/fsl/guts.txt
index 9e7a2417dac5..7f150b5012cc 100644
--- a/Documentation/devicetree/bindings/powerpc/fsl/guts.txt
+++ b/Documentation/devicetree/bindings/powerpc/fsl/guts.txt
@@ -17,9 +17,20 @@ Recommended properties:
17 contains a functioning "reset control register" (i.e. the board 17 contains a functioning "reset control register" (i.e. the board
18 is wired to reset upon setting the HRESET_REQ bit in this register). 18 is wired to reset upon setting the HRESET_REQ bit in this register).
19 19
20Example: 20 - fsl,liodn-bits : Indicates the number of defined bits in the LIODN
21 registers, for those SOCs that have a PAMU device.
22
23Examples:
21 global-utilities@e0000 { /* global utilities block */ 24 global-utilities@e0000 { /* global utilities block */
22 compatible = "fsl,mpc8548-guts"; 25 compatible = "fsl,mpc8548-guts";
23 reg = <e0000 1000>; 26 reg = <e0000 1000>;
24 fsl,has-rstcr; 27 fsl,has-rstcr;
25 }; 28 };
29
30 guts: global-utilities@e0000 {
31 compatible = "fsl,qoriq-device-config-1.0";
32 reg = <0xe0000 0xe00>;
33 fsl,has-rstcr;
34 #sleep-cells = <1>;
35 fsl,liodn-bits = <12>;
36 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/pamu.txt b/Documentation/devicetree/bindings/powerpc/fsl/pamu.txt
new file mode 100644
index 000000000000..1f5e329f756c
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/pamu.txt
@@ -0,0 +1,140 @@
1Freescale Peripheral Management Access Unit (PAMU) Device Tree Binding
2
3DESCRIPTION
4
5The PAMU is an I/O MMU that provides device-to-memory access control and
6address translation capabilities.
7
8Required properties:
9
10- compatible : <string>
11 First entry is a version-specific string, such as
12 "fsl,pamu-v1.0". The second is "fsl,pamu".
13- ranges : <prop-encoded-array>
14 A standard property. Utilized to describe the memory mapped
15 I/O space utilized by the controller. The size should
16 be set to the total size of the register space of all
17 physically present PAMU controllers. For example, for
18 PAMU v1.0, on an SOC that has five PAMU devices, the size
19 is 0x5000.
20- interrupts : <prop-encoded-array>
21 Interrupt mappings. The first tuple is the normal PAMU
22 interrupt, used for reporting access violations. The second
23 is for PAMU hardware errors, such as PAMU operation errors
24 and ECC errors.
25- #address-cells: <u32>
26 A standard property.
27- #size-cells : <u32>
28 A standard property.
29
30Optional properties:
31- reg : <prop-encoded-array>
32 A standard property. It represents the CCSR registers of
33 all child PAMUs combined. Include it to provide support
34 for legacy drivers.
35- interrupt-parent : <phandle>
36 Phandle to interrupt controller
37
38Child nodes:
39
40Each child node represents one PAMU controller. Each SOC device that is
41connected to a specific PAMU device should have a "fsl,pamu-phandle" property
42that links to the corresponding specific child PAMU controller.
43
44- reg : <prop-encoded-array>
45 A standard property. Specifies the physical address and
46 length (relative to the parent 'ranges' property) of this
47 PAMU controller's configuration registers. The size should
48 be set to the size of this PAMU controllers's register space.
49 For PAMU v1.0, this size is 0x1000.
50- fsl,primary-cache-geometry
51 : <prop-encoded-array>
52 Two cells that specify the geometry of the primary PAMU
53 cache. The first is the number of cache lines, and the
54 second is the number of "ways". For direct-mapped caches,
55 specify a value of 1.
56- fsl,secondary-cache-geometry
57 : <prop-encoded-array>
58 Two cells that specify the geometry of the secondary PAMU
59 cache. The first is the number of cache lines, and the
60 second is the number of "ways". For direct-mapped caches,
61 specify a value of 1.
62
63Device nodes:
64
65Devices that have LIODNs need to specify links to the parent PAMU controller
66(the actual PAMU controller that this device is connected to) and a pointer to
67the LIODN register, if applicable.
68
69- fsl,iommu-parent
70 : <phandle>
71 Phandle to the single, specific PAMU controller node to which
72 this device is connect. The PAMU topology is represented in
73 the device tree to assist code that dynamically determines the
74 best LIODN values to minimize PAMU cache thrashing.
75
76- fsl,liodn-reg : <prop-encoded-array>
77 Two cells that specify the location of the LIODN register
78 for this device. Required for devices that have a single
79 LIODN. The first cell is a phandle to a node that contains
80 the registers where the LIODN is to be set. The second is
81 the offset from the first "reg" resource of the node where
82 the specific LIODN register is located.
83
84
85Example:
86
87 iommu@20000 {
88 compatible = "fsl,pamu-v1.0", "fsl,pamu";
89 reg = <0x20000 0x5000>;
90 ranges = <0 0x20000 0x5000>;
91 #address-cells = <1>;
92 #size-cells = <1>;
93 interrupts = <
94 24 2 0 0
95 16 2 1 30>;
96
97 pamu0: pamu@0 {
98 reg = <0 0x1000>;
99 fsl,primary-cache-geometry = <32 1>;
100 fsl,secondary-cache-geometry = <128 2>;
101 };
102
103 pamu1: pamu@1000 {
104 reg = <0x1000 0x1000>;
105 fsl,primary-cache-geometry = <32 1>;
106 fsl,secondary-cache-geometry = <128 2>;
107 };
108
109 pamu2: pamu@2000 {
110 reg = <0x2000 0x1000>;
111 fsl,primary-cache-geometry = <32 1>;
112 fsl,secondary-cache-geometry = <128 2>;
113 };
114
115 pamu3: pamu@3000 {
116 reg = <0x3000 0x1000>;
117 fsl,primary-cache-geometry = <32 1>;
118 fsl,secondary-cache-geometry = <128 2>;
119 };
120
121 pamu4: pamu@4000 {
122 reg = <0x4000 0x1000>;
123 fsl,primary-cache-geometry = <32 1>;
124 fsl,secondary-cache-geometry = <128 2>;
125 };
126 };
127
128 guts: global-utilities@e0000 {
129 compatible = "fsl,qoriq-device-config-1.0";
130 reg = <0xe0000 0xe00>;
131 fsl,has-rstcr;
132 #sleep-cells = <1>;
133 fsl,liodn-bits = <12>;
134 };
135
136/include/ "qoriq-dma-0.dtsi"
137 dma@100300 {
138 fsl,iommu-parent = <&pamu0>;
139 fsl,liodn-reg = <&guts 0x584>; /* DMA2LIODNR */
140 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/raideng.txt b/Documentation/devicetree/bindings/powerpc/fsl/raideng.txt
new file mode 100644
index 000000000000..4ad29b9ac2ac
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/raideng.txt
@@ -0,0 +1,81 @@
1* Freescale 85xx RAID Engine nodes
2
3RAID Engine nodes are defined to describe on-chip RAID accelerators. Each RAID
4Engine should have a separate node.
5
6Supported chips:
7P5020, P5040
8
9Required properties:
10
11- compatible: Should contain "fsl,raideng-v1.0" as the value
12 This identifies RAID Engine block. 1 in 1.0 represents
13 major number whereas 0 represents minor number. The
14 version matches the hardware IP version.
15- reg: offset and length of the register set for the device
16- ranges: standard ranges property specifying the translation
17 between child address space and parent address space
18
19Example:
20 /* P5020 */
21 raideng: raideng@320000 {
22 compatible = "fsl,raideng-v1.0";
23 #address-cells = <1>;
24 #size-cells = <1>;
25 reg = <0x320000 0x10000>;
26 ranges = <0 0x320000 0x10000>;
27 };
28
29
30There must be a sub-node for each job queue present in RAID Engine
31This node must be a sub-node of the main RAID Engine node
32
33- compatible: Should contain "fsl,raideng-v1.0-job-queue" as the value
34 This identifies the job queue interface
35- reg: offset and length of the register set for job queue
36- ranges: standard ranges property specifying the translation
37 between child address space and parent address space
38
39Example:
40 /* P5020 */
41 raideng_jq0@1000 {
42 compatible = "fsl,raideng-v1.0-job-queue";
43 reg = <0x1000 0x1000>;
44 ranges = <0x0 0x1000 0x1000>;
45 };
46
47
48There must be a sub-node for each job ring present in RAID Engine
49This node must be a sub-node of job queue node
50
51- compatible: Must contain "fsl,raideng-v1.0-job-ring" as the value
52 This identifies job ring. Should contain either
53 "fsl,raideng-v1.0-hp-ring" or "fsl,raideng-v1.0-lp-ring"
54 depending upon whether ring has high or low priority
55- reg: offset and length of the register set for job ring
56- interrupts: interrupt mapping for job ring IRQ
57
58Optional property:
59
60- fsl,liodn: Specifies the LIODN to be used for Job Ring. This
61 property is normally set by firmware. Value
62 is of 12-bits which is the LIODN number for this JR.
63 This property is used by the IOMMU (PAMU) to distinquish
64 transactions from this JR and than be able to do address
65 translation & protection accordingly.
66
67Example:
68 /* P5020 */
69 raideng_jq0@1000 {
70 compatible = "fsl,raideng-v1.0-job-queue";
71 reg = <0x1000 0x1000>;
72 ranges = <0x0 0x1000 0x1000>;
73
74 raideng_jr0: jr@0 {
75 compatible = "fsl,raideng-v1.0-job-ring", "fsl,raideng-v1.0-hp-ring";
76 reg = <0x0 0x400>;
77 interrupts = <139 2 0 0>;
78 interrupt-parent = <&mpic>;
79 fsl,liodn = <0x41>;
80 };
81 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/srio.txt b/Documentation/devicetree/bindings/powerpc/fsl/srio.txt
index b039bcbee134..07abf0f2f440 100644
--- a/Documentation/devicetree/bindings/powerpc/fsl/srio.txt
+++ b/Documentation/devicetree/bindings/powerpc/fsl/srio.txt
@@ -8,9 +8,9 @@ Properties:
8 Definition: Must include "fsl,srio" for IP blocks with IP Block 8 Definition: Must include "fsl,srio" for IP blocks with IP Block
9 Revision Register (SRIO IPBRR1) Major ID equal to 0x01c0. 9 Revision Register (SRIO IPBRR1) Major ID equal to 0x01c0.
10 10
11 Optionally, a compatiable string of "fsl,srio-vX.Y" where X is Major 11 Optionally, a compatible string of "fsl,srio-vX.Y" where X is Major
12 version in IP Block Revision Register and Y is Minor version. If this 12 version in IP Block Revision Register and Y is Minor version. If this
13 compatiable is provided it should be ordered before "fsl,srio". 13 compatible is provided it should be ordered before "fsl,srio".
14 14
15 - reg 15 - reg
16 Usage: required 16 Usage: required
diff --git a/Documentation/devicetree/bindings/pwm/atmel-tcb-pwm.txt b/Documentation/devicetree/bindings/pwm/atmel-tcb-pwm.txt
new file mode 100644
index 000000000000..de0eaed86651
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/atmel-tcb-pwm.txt
@@ -0,0 +1,18 @@
1Atmel TCB PWM controller
2
3Required properties:
4- compatible: should be "atmel,tcb-pwm"
5- #pwm-cells: Should be 3. The first cell specifies the per-chip index
6 of the PWM to use, the second cell is the period in nanoseconds and
7 bit 0 in the third cell is used to encode the polarity of PWM output.
8 Set bit 0 of the third cell in PWM specifier to 1 for inverse polarity &
9 set to 0 for normal polarity.
10- tc-block: The Timer Counter block to use as a PWM chip.
11
12Example:
13
14pwm {
15 compatible = "atmel,tcb-pwm";
16 #pwm-cells = <3>;
17 tc-block = <1>;
18};
diff --git a/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt b/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt
new file mode 100644
index 000000000000..131e8c11d26f
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt
@@ -0,0 +1,23 @@
1TI SOC ECAP based APWM controller
2
3Required properties:
4- compatible: Must be "ti,am33xx-ecap"
5- #pwm-cells: Should be 3. Number of cells being used to specify PWM property.
6 First cell specifies the per-chip index of the PWM to use, the second
7 cell is the period in nanoseconds and bit 0 in the third cell is used to
8 encode the polarity of PWM output. Set bit 0 of the third in PWM specifier
9 to 1 for inverse polarity & set to 0 for normal polarity.
10- reg: physical base address and size of the registers map.
11
12Optional properties:
13- ti,hwmods: Name of the hwmod associated to the ECAP:
14 "ecap<x>", <x> being the 0-based instance number from the HW spec
15
16Example:
17
18ecap0: ecap@0 {
19 compatible = "ti,am33xx-ecap";
20 #pwm-cells = <3>;
21 reg = <0x48300100 0x80>;
22 ti,hwmods = "ecap0";
23};
diff --git a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
new file mode 100644
index 000000000000..4fc7079d822e
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
@@ -0,0 +1,23 @@
1TI SOC EHRPWM based PWM controller
2
3Required properties:
4- compatible : Must be "ti,am33xx-ehrpwm"
5- #pwm-cells: Should be 3. Number of cells being used to specify PWM property.
6 First cell specifies the per-chip index of the PWM to use, the second
7 cell is the period in nanoseconds and bit 0 in the third cell is used to
8 encode the polarity of PWM output. Set bit 0 of the third in PWM specifier
9 to 1 for inverse polarity & set to 0 for normal polarity.
10- reg: physical base address and size of the registers map.
11
12Optional properties:
13- ti,hwmods: Name of the hwmod associated to the EHRPWM:
14 "ehrpwm<x>", <x> being the 0-based instance number from the HW spec
15
16Example:
17
18ehrpwm0: ehrpwm@0 {
19 compatible = "ti,am33xx-ehrpwm";
20 #pwm-cells = <3>;
21 reg = <0x48300200 0x100>;
22 ti,hwmods = "ehrpwm0";
23};
diff --git a/Documentation/devicetree/bindings/pwm/pwm-tipwmss.txt b/Documentation/devicetree/bindings/pwm/pwm-tipwmss.txt
new file mode 100644
index 000000000000..f7eae77f8354
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/pwm-tipwmss.txt
@@ -0,0 +1,31 @@
1TI SOC based PWM Subsystem
2
3Required properties:
4- compatible: Must be "ti,am33xx-pwmss";
5- reg: physical base address and size of the registers map.
6- address-cells: Specify the number of u32 entries needed in child nodes.
7 Should set to 1.
8- size-cells: specify number of u32 entries needed to specify child nodes size
9 in reg property. Should set to 1.
10- ranges: describes the address mapping of a memory-mapped bus. Should set to
11 physical address map of child's base address, physical address within
12 parent's address space and length of the address map. For am33xx,
13 3 set of child register maps present, ECAP register space, EQEP
14 register space, EHRPWM register space.
15
16Also child nodes should also populated under PWMSS DT node.
17
18Example:
19pwmss0: pwmss@48300000 {
20 compatible = "ti,am33xx-pwmss";
21 reg = <0x48300000 0x10>;
22 ti,hwmods = "epwmss0";
23 #address-cells = <1>;
24 #size-cells = <1>;
25 status = "disabled";
26 ranges = <0x48300100 0x48300100 0x80 /* ECAP */
27 0x48300180 0x48300180 0x80 /* EQEP */
28 0x48300200 0x48300200 0x80>; /* EHRPWM */
29
30 /* child nodes go here */
31};
diff --git a/Documentation/devicetree/bindings/pwm/pwm.txt b/Documentation/devicetree/bindings/pwm/pwm.txt
index 73ec962bfe8c..06e67247859a 100644
--- a/Documentation/devicetree/bindings/pwm/pwm.txt
+++ b/Documentation/devicetree/bindings/pwm/pwm.txt
@@ -37,10 +37,21 @@ device:
37 pwm-names = "backlight"; 37 pwm-names = "backlight";
38 }; 38 };
39 39
40Note that in the example above, specifying the "pwm-names" is redundant
41because the name "backlight" would be used as fallback anyway.
42
40pwm-specifier typically encodes the chip-relative PWM number and the PWM 43pwm-specifier typically encodes the chip-relative PWM number and the PWM
41period in nanoseconds. Note that in the example above, specifying the 44period in nanoseconds.
42"pwm-names" is redundant because the name "backlight" would be used as 45
43fallback anyway. 46Optionally, the pwm-specifier can encode a number of flags in a third cell:
47- bit 0: PWM signal polarity (0: normal polarity, 1: inverse polarity)
48
49Example with optional PWM specifier for inverse polarity
50
51 bl: backlight {
52 pwms = <&pwm 0 5000000 1>;
53 pwm-names = "backlight";
54 };
44 55
452) PWM controller nodes 562) PWM controller nodes
46----------------------- 57-----------------------
diff --git a/Documentation/devicetree/bindings/pwm/spear-pwm.txt b/Documentation/devicetree/bindings/pwm/spear-pwm.txt
new file mode 100644
index 000000000000..3ac779d83386
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/spear-pwm.txt
@@ -0,0 +1,18 @@
1== ST SPEAr SoC PWM controller ==
2
3Required properties:
4- compatible: should be one of:
5 - "st,spear320-pwm"
6 - "st,spear1340-pwm"
7- reg: physical base address and length of the controller's registers
8- #pwm-cells: number of cells used to specify PWM which is fixed to 2 on
9 SPEAr. The first cell specifies the per-chip index of the PWM to use and
10 the second cell is the period in nanoseconds.
11
12Example:
13
14 pwm: pwm@a8000000 {
15 compatible ="st,spear320-pwm";
16 reg = <0xa8000000 0x1000>;
17 #pwm-cells = <2>;
18 };
diff --git a/Documentation/devicetree/bindings/pwm/ti,twl-pwm.txt b/Documentation/devicetree/bindings/pwm/ti,twl-pwm.txt
new file mode 100644
index 000000000000..2943ee5fce00
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/ti,twl-pwm.txt
@@ -0,0 +1,17 @@
1Texas Instruments TWL series PWM drivers
2
3Supported PWMs:
4On TWL4030 series: PWM1 and PWM2
5On TWL6030 series: PWM0 and PWM1
6
7Required properties:
8- compatible: "ti,twl4030-pwm" or "ti,twl6030-pwm"
9- #pwm-cells: should be 2. The first cell specifies the per-chip index
10 of the PWM to use and the second cell is the period in nanoseconds.
11
12Example:
13
14twl_pwm: pwm {
15 compatible = "ti,twl6030-pwm";
16 #pwm-cells = <2>;
17};
diff --git a/Documentation/devicetree/bindings/pwm/ti,twl-pwmled.txt b/Documentation/devicetree/bindings/pwm/ti,twl-pwmled.txt
new file mode 100644
index 000000000000..cb64f3acc10f
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/ti,twl-pwmled.txt
@@ -0,0 +1,17 @@
1Texas Instruments TWL series PWM drivers connected to LED terminals
2
3Supported PWMs:
4On TWL4030 series: PWMA and PWMB (connected to LEDA and LEDB terminals)
5On TWL6030 series: LED PWM (mainly used as charging indicator LED)
6
7Required properties:
8- compatible: "ti,twl4030-pwmled" or "ti,twl6030-pwmled"
9- #pwm-cells: should be 2. The first cell specifies the per-chip index
10 of the PWM to use and the second cell is the period in nanoseconds.
11
12Example:
13
14twl_pwmled: pwmled {
15 compatible = "ti,twl6030-pwmled";
16 #pwm-cells = <2>;
17};
diff --git a/Documentation/devicetree/bindings/pwm/vt8500-pwm.txt b/Documentation/devicetree/bindings/pwm/vt8500-pwm.txt
new file mode 100644
index 000000000000..d21d82d29855
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/vt8500-pwm.txt
@@ -0,0 +1,20 @@
1VIA/Wondermedia VT8500/WM8xxx series SoC PWM controller
2
3Required properties:
4- compatible: should be "via,vt8500-pwm"
5- reg: physical base address and length of the controller's registers
6- #pwm-cells: Should be 3. Number of cells being used to specify PWM property.
7 First cell specifies the per-chip index of the PWM to use, the second
8 cell is the period in nanoseconds and bit 0 in the third cell is used to
9 encode the polarity of PWM output. Set bit 0 of the third in PWM specifier
10 to 1 for inverse polarity & set to 0 for normal polarity.
11- clocks: phandle to the PWM source clock
12
13Example:
14
15pwm1: pwm@d8220000 {
16 #pwm-cells = <3>;
17 compatible = "via,vt8500-pwm";
18 reg = <0xd8220000 0x1000>;
19 clocks = <&clkpwm>;
20};
diff --git a/Documentation/devicetree/bindings/regulator/anatop-regulator.txt b/Documentation/devicetree/bindings/regulator/anatop-regulator.txt
index 357758cb6e92..758eae24082a 100644
--- a/Documentation/devicetree/bindings/regulator/anatop-regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/anatop-regulator.txt
@@ -9,6 +9,11 @@ Required properties:
9- anatop-min-voltage: Minimum voltage of this regulator 9- anatop-min-voltage: Minimum voltage of this regulator
10- anatop-max-voltage: Maximum voltage of this regulator 10- anatop-max-voltage: Maximum voltage of this regulator
11 11
12Optional properties:
13- anatop-delay-reg-offset: Anatop MFD step time register offset
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
16
12Any property defined as part of the core regulator 17Any property defined as part of the core regulator
13binding, defined in regulator.txt, can also be used. 18binding, defined in regulator.txt, can also be used.
14 19
@@ -23,6 +28,9 @@ Example:
23 anatop-reg-offset = <0x140>; 28 anatop-reg-offset = <0x140>;
24 anatop-vol-bit-shift = <9>; 29 anatop-vol-bit-shift = <9>;
25 anatop-vol-bit-width = <5>; 30 anatop-vol-bit-width = <5>;
31 anatop-delay-reg-offset = <0x170>;
32 anatop-delay-bit-shift = <24>;
33 anatop-delay-bit-width = <2>;
26 anatop-min-bit-val = <1>; 34 anatop-min-bit-val = <1>;
27 anatop-min-voltage = <725000>; 35 anatop-min-voltage = <725000>;
28 anatop-max-voltage = <1300000>; 36 anatop-max-voltage = <1300000>;
diff --git a/Documentation/devicetree/bindings/regulator/gpio-regulator.txt b/Documentation/devicetree/bindings/regulator/gpio-regulator.txt
new file mode 100644
index 000000000000..63c659800c03
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/gpio-regulator.txt
@@ -0,0 +1,37 @@
1GPIO controlled regulators
2
3Required properties:
4- compatible : Must be "regulator-gpio".
5- states : Selection of available voltages and GPIO configs.
6 if there are no states, then use a fixed regulator
7
8Optional properties:
9- enable-gpio : GPIO to use to enable/disable the regulator.
10- gpios : GPIO group used to control voltage.
11- startup-delay-us : Startup time in microseconds.
12- enable-active-high : Polarity of GPIO is active high (default is low).
13
14Any property defined as part of the core regulator binding defined in
15regulator.txt can also be used.
16
17Example:
18
19 mmciv: gpio-regulator {
20 compatible = "regulator-gpio";
21
22 regulator-name = "mmci-gpio-supply";
23 regulator-min-microvolt = <1800000>;
24 regulator-max-microvolt = <2600000>;
25 regulator-boot-on;
26
27 enable-gpio = <&gpio0 23 0x4>;
28 gpios = <&gpio0 24 0x4
29 &gpio0 25 0x4>;
30 states = <1800000 0x3
31 2200000 0x2
32 2600000 0x1
33 2900000 0x0>;
34
35 startup-delay-us = <100000>;
36 enable-active-high;
37 };
diff --git a/Documentation/devicetree/bindings/regulator/max8925-regulator.txt b/Documentation/devicetree/bindings/regulator/max8925-regulator.txt
new file mode 100644
index 000000000000..0057695aae8f
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/max8925-regulator.txt
@@ -0,0 +1,40 @@
1Max8925 Voltage regulators
2
3Required nodes:
4-nodes:
5 - SDV1 for SDV SDV1
6 - SDV2 for SDV SDV2
7 - SDV3 for SDV SDV3
8 - LDO1 for LDO LDO1
9 - LDO2 for LDO LDO2
10 - LDO3 for LDO LDO3
11 - LDO4 for LDO LDO4
12 - LDO5 for LDO LDO5
13 - LDO6 for LDO LDO6
14 - LDO7 for LDO LDO7
15 - LDO8 for LDO LDO8
16 - LDO9 for LDO LDO9
17 - LDO10 for LDO LDO10
18 - LDO11 for LDO LDO11
19 - LDO12 for LDO LDO12
20 - LDO13 for LDO LDO13
21 - LDO14 for LDO LDO14
22 - LDO15 for LDO LDO15
23 - LDO16 for LDO LDO16
24 - LDO17 for LDO LDO17
25 - LDO18 for LDO LDO18
26 - LDO19 for LDO LDO19
27 - LDO20 for LDO LDO20
28
29Optional properties:
30- Any optional property defined in bindings/regulator/regulator.txt
31
32Example:
33
34 SDV1 {
35 regulator-min-microvolt = <637500>;
36 regulator-max-microvolt = <1425000>;
37 regulator-boot-on;
38 regulator-always-on;
39 };
40
diff --git a/Documentation/devicetree/bindings/regulator/max8997-regulator.txt b/Documentation/devicetree/bindings/regulator/max8997-regulator.txt
new file mode 100644
index 000000000000..9fd69a18b0ba
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/max8997-regulator.txt
@@ -0,0 +1,146 @@
1* Maxim MAX8997 Voltage and Current Regulator
2
3The Maxim MAX8997 is a multi-function device which includes volatage and
4current regulators, rtc, charger controller and other sub-blocks. It is
5interfaced to the host controller using a i2c interface. Each sub-block is
6addressed by the host system using different i2c slave address. This document
7describes the bindings for 'pmic' sub-block of max8997.
8
9Required properties:
10- compatible: Should be "maxim,max8997-pmic".
11- reg: Specifies the i2c slave address of the pmic block. It should be 0x66.
12
13- max8997,pmic-buck1-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
14 units for buck1 when changing voltage using gpio dvs. Refer to [1] below
15 for additional information.
16
17- max8997,pmic-buck2-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
18 units for buck2 when changing voltage using gpio dvs. Refer to [1] below
19 for additional information.
20
21- max8997,pmic-buck5-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
22 units for buck5 when changing voltage using gpio dvs. Refer to [1] below
23 for additional information.
24
25[1] If none of the 'max8997,pmic-buck[1/2/5]-uses-gpio-dvs' optional
26 property is specified, the 'max8997,pmic-buck[1/2/5]-dvs-voltage'
27 property should specify atleast one voltage level (which would be a
28 safe operating voltage).
29
30 If either of the 'max8997,pmic-buck[1/2/5]-uses-gpio-dvs' optional
31 property is specified, then all the eigth voltage values for the
32 'max8997,pmic-buck[1/2/5]-dvs-voltage' should be specified.
33
34Optional properties:
35- interrupt-parent: Specifies the phandle of the interrupt controller to which
36 the interrupts from max8997 are delivered to.
37- interrupts: Interrupt specifiers for two interrupt sources.
38 - First interrupt specifier is for 'irq1' interrupt.
39 - Second interrupt specifier is for 'alert' interrupt.
40- max8997,pmic-buck1-uses-gpio-dvs: 'buck1' can be controlled by gpio dvs.
41- max8997,pmic-buck2-uses-gpio-dvs: 'buck2' can be controlled by gpio dvs.
42- max8997,pmic-buck5-uses-gpio-dvs: 'buck5' can be controlled by gpio dvs.
43
44Additional properties required if either of the optional properties are used:
45- max8997,pmic-ignore-gpiodvs-side-effect: When GPIO-DVS mode is used for
46 multiple bucks, changing the voltage value of one of the bucks may affect
47 that of another buck, which is the side effect of the change (set_voltage).
48 Use this property to ignore such side effects and change the voltage.
49
50- max8997,pmic-buck125-default-dvs-idx: Default voltage setting selected from
51 the possible 8 options selectable by the dvs gpios. The value of this
52 property should be between 0 and 7. If not specified or if out of range, the
53 default value of this property is set to 0.
54
55- max8997,pmic-buck125-dvs-gpios: GPIO specifiers for three host gpio's used
56 for dvs. The format of the gpio specifier depends in the gpio controller.
57
58Regulators: The regulators of max8997 that have to be instantiated should be
59included in a sub-node named 'regulators'. Regulator nodes included in this
60sub-node should be of the format as listed below.
61
62 regulator_name {
63 standard regulator bindings here
64 };
65
66The following are the names of the regulators that the max8997 pmic block
67supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number
68as per the datasheet of max8997.
69
70 - LDOn
71 - valid values for n are 1 to 18 and 21
72 - Example: LDO0, LD01, LDO2, LDO21
73 - BUCKn
74 - valid values for n are 1 to 7.
75 - Example: BUCK1, BUCK2, BUCK3, BUCK7
76
77 - ENVICHG: Battery Charging Current Monitor Output. This is a fixed
78 voltage type regulator
79
80 - ESAFEOUT1: (ldo19)
81 - ESAFEOUT2: (ld020)
82
83 - CHARGER_CV: main battery charger voltage control
84 - CHARGER: main battery charger current control
85 - CHARGER_TOPOFF: end of charge current threshold level
86
87The bindings inside the regulator nodes use the standard regulator bindings
88which are documented elsewhere.
89
90Example:
91
92 max8997_pmic@66 {
93 compatible = "maxim,max8997-pmic";
94 interrupt-parent = <&wakeup_eint>;
95 reg = <0x66>;
96 interrupts = <4 0>, <3 0>;
97
98 max8997,pmic-buck1-uses-gpio-dvs;
99 max8997,pmic-buck2-uses-gpio-dvs;
100 max8997,pmic-buck5-uses-gpio-dvs;
101
102 max8997,pmic-ignore-gpiodvs-side-effect;
103 max8997,pmic-buck125-default-dvs-idx = <0>;
104
105 max8997,pmic-buck125-dvs-gpios = <&gpx0 0 1 0 0>, /* SET1 */
106 <&gpx0 1 1 0 0>, /* SET2 */
107 <&gpx0 2 1 0 0>; /* SET3 */
108
109 max8997,pmic-buck1-dvs-voltage = <1350000>, <1300000>,
110 <1250000>, <1200000>,
111 <1150000>, <1100000>,
112 <1000000>, <950000>;
113
114 max8997,pmic-buck2-dvs-voltage = <1100000>, <1100000>,
115 <1100000>, <1100000>,
116 <1000000>, <1000000>,
117 <1000000>, <1000000>;
118
119 max8997,pmic-buck5-dvs-voltage = <1200000>, <1200000>,
120 <1200000>, <1200000>,
121 <1200000>, <1200000>,
122 <1200000>, <1200000>;
123
124 regulators {
125 ldo1_reg: LDO1 {
126 regulator-name = "VDD_ABB_3.3V";
127 regulator-min-microvolt = <3300000>;
128 regulator-max-microvolt = <3300000>;
129 };
130
131 ldo2_reg: LDO2 {
132 regulator-name = "VDD_ALIVE_1.1V";
133 regulator-min-microvolt = <1100000>;
134 regulator-max-microvolt = <1100000>;
135 regulator-always-on;
136 };
137
138 buck1_reg: BUCK1 {
139 regulator-name = "VDD_ARM_1.2V";
140 regulator-min-microvolt = <950000>;
141 regulator-max-microvolt = <1350000>;
142 regulator-always-on;
143 regulator-boot-on;
144 };
145 };
146 };
diff --git a/Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt b/Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt
new file mode 100644
index 000000000000..a35ff99003a5
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt
@@ -0,0 +1,152 @@
1* Samsung S5M8767 Voltage and Current Regulator
2
3The Samsung S5M8767 is a multi-function device which includes volatage and
4current regulators, rtc, charger controller and other sub-blocks. It is
5interfaced to the host controller using a i2c interface. Each sub-block is
6addressed by the host system using different i2c slave address. This document
7describes the bindings for 'pmic' sub-block of s5m8767.
8
9Required properties:
10- compatible: Should be "samsung,s5m8767-pmic".
11- reg: Specifies the i2c slave address of the pmic block. It should be 0x66.
12
13- s5m8767,pmic-buck2-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
14 units for buck2 when changing voltage using gpio dvs. Refer to [1] below
15 for additional information.
16
17- s5m8767,pmic-buck3-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
18 units for buck3 when changing voltage using gpio dvs. Refer to [1] below
19 for additional information.
20
21- s5m8767,pmic-buck4-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
22 units for buck4 when changing voltage using gpio dvs. Refer to [1] below
23 for additional information.
24
25- s5m8767,pmic-buck-ds-gpios: GPIO specifiers for three host gpio's used
26 for selecting GPIO DVS lines. It is one-to-one mapped to dvs gpio lines.
27
28[1] If none of the 's5m8767,pmic-buck[2/3/4]-uses-gpio-dvs' optional
29 property is specified, the 's5m8767,pmic-buck[2/3/4]-dvs-voltage'
30 property should specify atleast one voltage level (which would be a
31 safe operating voltage).
32
33 If either of the 's5m8767,pmic-buck[2/3/4]-uses-gpio-dvs' optional
34 property is specified, then all the eight voltage values for the
35 's5m8767,pmic-buck[2/3/4]-dvs-voltage' should be specified.
36
37Optional properties:
38- interrupt-parent: Specifies the phandle of the interrupt controller to which
39 the interrupts from s5m8767 are delivered to.
40- interrupts: Interrupt specifiers for two interrupt sources.
41 - First interrupt specifier is for 'irq1' interrupt.
42 - Second interrupt specifier is for 'alert' interrupt.
43- s5m8767,pmic-buck2-uses-gpio-dvs: 'buck2' can be controlled by gpio dvs.
44- s5m8767,pmic-buck3-uses-gpio-dvs: 'buck3' can be controlled by gpio dvs.
45- s5m8767,pmic-buck4-uses-gpio-dvs: 'buck4' can be controlled by gpio dvs.
46
47Additional properties required if either of the optional properties are used:
48
49- s5m8767,pmic-buck234-default-dvs-idx: Default voltage setting selected from
50 the possible 8 options selectable by the dvs gpios. The value of this
51 property should be between 0 and 7. If not specified or if out of range, the
52 default value of this property is set to 0.
53
54- s5m8767,pmic-buck-dvs-gpios: GPIO specifiers for three host gpio's used
55 for dvs. The format of the gpio specifier depends in the gpio controller.
56
57Regulators: The regulators of s5m8767 that have to be instantiated should be
58included in a sub-node named 'regulators'. Regulator nodes included in this
59sub-node should be of the format as listed below.
60
61 regulator_name {
62 ldo1_reg: LDO1 {
63 regulator-name = "VDD_ALIVE_1.0V";
64 regulator-min-microvolt = <1100000>;
65 regulator-max-microvolt = <1100000>;
66 regulator-always-on;
67 regulator-boot-on;
68 op_mode = <1>; /* Normal Mode */
69 };
70 };
71The above regulator entries are defined in regulator bindings documentation
72except op_mode description.
73 - op_mode: describes the different operating modes of the LDO's with
74 power mode change in SOC. The different possible values are,
75 0 - always off mode
76 1 - on in normal mode
77 2 - low power mode
78 3 - suspend mode
79
80The following are the names of the regulators that the s5m8767 pmic block
81supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number
82as per the datasheet of s5m8767.
83
84 - LDOn
85 - valid values for n are 1 to 28
86 - Example: LDO0, LD01, LDO28
87 - BUCKn
88 - valid values for n are 1 to 9.
89 - Example: BUCK1, BUCK2, BUCK9
90
91The bindings inside the regulator nodes use the standard regulator bindings
92which are documented elsewhere.
93
94Example:
95
96 s5m8767_pmic@66 {
97 compatible = "samsung,s5m8767-pmic";
98 reg = <0x66>;
99
100 s5m8767,pmic-buck2-uses-gpio-dvs;
101 s5m8767,pmic-buck3-uses-gpio-dvs;
102 s5m8767,pmic-buck4-uses-gpio-dvs;
103
104 s5m8767,pmic-buck-default-dvs-idx = <0>;
105
106 s5m8767,pmic-buck-dvs-gpios = <&gpx0 0 1 0 0>, /* DVS1 */
107 <&gpx0 1 1 0 0>, /* DVS2 */
108 <&gpx0 2 1 0 0>; /* DVS3 */
109
110 s5m8767,pmic-buck-ds-gpios = <&gpx2 3 1 0 0>, /* SET1 */
111 <&gpx2 4 1 0 0>, /* SET2 */
112 <&gpx2 5 1 0 0>; /* SET3 */
113
114 s5m8767,pmic-buck2-dvs-voltage = <1350000>, <1300000>,
115 <1250000>, <1200000>,
116 <1150000>, <1100000>,
117 <1000000>, <950000>;
118
119 s5m8767,pmic-buck3-dvs-voltage = <1100000>, <1100000>,
120 <1100000>, <1100000>,
121 <1000000>, <1000000>,
122 <1000000>, <1000000>;
123
124 s5m8767,pmic-buck4-dvs-voltage = <1200000>, <1200000>,
125 <1200000>, <1200000>,
126 <1200000>, <1200000>,
127 <1200000>, <1200000>;
128
129 regulators {
130 ldo1_reg: LDO1 {
131 regulator-name = "VDD_ABB_3.3V";
132 regulator-min-microvolt = <3300000>;
133 regulator-max-microvolt = <3300000>;
134 op_mode = <1>; /* Normal Mode */
135 };
136
137 ldo2_reg: LDO2 {
138 regulator-name = "VDD_ALIVE_1.1V";
139 regulator-min-microvolt = <1100000>;
140 regulator-max-microvolt = <1100000>;
141 regulator-always-on;
142 };
143
144 buck1_reg: BUCK1 {
145 regulator-name = "VDD_MIF_1.2V";
146 regulator-min-microvolt = <950000>;
147 regulator-max-microvolt = <1350000>;
148 regulator-always-on;
149 regulator-boot-on;
150 };
151 };
152 };
diff --git a/Documentation/devicetree/bindings/regulator/tps51632-regulator.txt b/Documentation/devicetree/bindings/regulator/tps51632-regulator.txt
new file mode 100644
index 000000000000..2f7e44a96414
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/tps51632-regulator.txt
@@ -0,0 +1,27 @@
1TPS51632 Voltage regulators
2
3Required properties:
4- compatible: Must be "ti,tps51632"
5- reg: I2C slave address
6
7Optional properties:
8- ti,enable-pwm-dvfs: Enable the DVFS voltage control through the PWM interface.
9- ti,dvfs-step-20mV: The 20mV step voltage when PWM DVFS enabled. Missing this
10 will set 10mV step voltage in PWM DVFS mode. In normal mode, the voltage
11 step is 10mV as per datasheet.
12
13Any property defined as part of the core regulator binding, defined in
14regulator.txt, can also be used.
15
16Example:
17
18 tps51632 {
19 compatible = "ti,tps51632";
20 reg = <0x43>;
21 regulator-name = "tps51632-vout";
22 regulator-min-microvolt = <500000>;
23 regulator-max-microvolt = <1500000>;
24 regulator-boot-on;
25 ti,enable-pwm-dvfs;
26 ti,dvfs-step-20mV;
27 };
diff --git a/Documentation/devicetree/bindings/regulator/tps62360-regulator.txt b/Documentation/devicetree/bindings/regulator/tps62360-regulator.txt
index c8ca6b8f6582..1b20c3dbcdb8 100644
--- a/Documentation/devicetree/bindings/regulator/tps62360-regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/tps62360-regulator.txt
@@ -17,9 +17,9 @@ Optional properties:
17- ti,vsel1-gpio: Gpio for controlling VSEL1 line. 17- ti,vsel1-gpio: Gpio for controlling VSEL1 line.
18 If this property is missing, then assume that there is no GPIO 18 If this property is missing, then assume that there is no GPIO
19 for vsel1 control. 19 for vsel1 control.
20- ti,vsel0-state-high: Inital state of vsel0 input is high. 20- ti,vsel0-state-high: Initial state of vsel0 input is high.
21 If this property is missing, then assume the state as low (0). 21 If this property is missing, then assume the state as low (0).
22- ti,vsel1-state-high: Inital state of vsel1 input is high. 22- ti,vsel1-state-high: Initial state of vsel1 input is high.
23 If this property is missing, then assume the state as low (0). 23 If this property is missing, then assume the state as low (0).
24 24
25Any property defined as part of the core regulator binding, defined in 25Any property defined as part of the core regulator binding, defined in
diff --git a/Documentation/devicetree/bindings/regulator/tps65090.txt b/Documentation/devicetree/bindings/regulator/tps65090.txt
new file mode 100644
index 000000000000..313a60ba61d8
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/tps65090.txt
@@ -0,0 +1,122 @@
1TPS65090 regulators
2
3Required properties:
4- compatible: "ti,tps65090"
5- reg: I2C slave address
6- interrupts: the interrupt outputs of the controller
7- regulators: A node that houses a sub-node for each regulator within the
8 device. Each sub-node is identified using the node's name, with valid
9 values listed below. The content of each sub-node is defined by the
10 standard binding for regulators; see regulator.txt.
11 dcdc[1-3], fet[1-7] and ldo[1-2] respectively.
12- vsys[1-3]-supply: The input supply for DCDC[1-3] respectively.
13- infet[1-7]-supply: The input supply for FET[1-7] respectively.
14- vsys-l[1-2]-supply: The input supply for LDO[1-2] respectively.
15
16Optional properties:
17- ti,enable-ext-control: This is applicable for DCDC1, DCDC2 and DCDC3.
18 If DCDCs are externally controlled then this property should be there.
19- "dcdc-ext-control-gpios: This is applicable for DCDC1, DCDC2 and DCDC3.
20 If DCDCs are externally controlled and if it is from GPIO then GPIO
21 number should be provided. If it is externally controlled and no GPIO
22 entry then driver will just configure this rails as external control
23 and will not provide any enable/disable APIs.
24
25Each regulator is defined using the standard binding for regulators.
26
27Example:
28
29 tps65090@48 {
30 compatible = "ti,tps65090";
31 reg = <0x48>;
32 interrupts = <0 88 0x4>;
33
34 vsys1-supply = <&some_reg>;
35 vsys2-supply = <&some_reg>;
36 vsys3-supply = <&some_reg>;
37 infet1-supply = <&some_reg>;
38 infet2-supply = <&some_reg>;
39 infet3-supply = <&some_reg>;
40 infet4-supply = <&some_reg>;
41 infet5-supply = <&some_reg>;
42 infet6-supply = <&some_reg>;
43 infet7-supply = <&some_reg>;
44 vsys_l1-supply = <&some_reg>;
45 vsys_l2-supply = <&some_reg>;
46
47 regulators {
48 dcdc1 {
49 regulator-name = "dcdc1";
50 regulator-boot-on;
51 regulator-always-on;
52 ti,enable-ext-control;
53 dcdc-ext-control-gpios = <&gpio 10 0>;
54 };
55
56 dcdc2 {
57 regulator-name = "dcdc2";
58 regulator-boot-on;
59 regulator-always-on;
60 };
61
62 dcdc3 {
63 regulator-name = "dcdc3";
64 regulator-boot-on;
65 regulator-always-on;
66 };
67
68 fet1 {
69 regulator-name = "fet1";
70 regulator-boot-on;
71 regulator-always-on;
72 };
73
74 fet2 {
75 regulator-name = "fet2";
76 regulator-boot-on;
77 regulator-always-on;
78 };
79
80 fet3 {
81 regulator-name = "fet3";
82 regulator-boot-on;
83 regulator-always-on;
84 };
85
86 fet4 {
87 regulator-name = "fet4";
88 regulator-boot-on;
89 regulator-always-on;
90 };
91
92 fet5 {
93 regulator-name = "fet5";
94 regulator-boot-on;
95 regulator-always-on;
96 };
97
98 fet6 {
99 regulator-name = "fet6";
100 regulator-boot-on;
101 regulator-always-on;
102 };
103
104 fet7 {
105 regulator-name = "fet7";
106 regulator-boot-on;
107 regulator-always-on;
108 };
109
110 ldo1 {
111 regulator-name = "ldo1";
112 regulator-boot-on;
113 regulator-always-on;
114 };
115
116 ldo2 {
117 regulator-name = "ldo2";
118 regulator-boot-on;
119 regulator-always-on;
120 };
121 };
122 };
diff --git a/Documentation/devicetree/bindings/regulator/tps65217.txt b/Documentation/devicetree/bindings/regulator/tps65217.txt
index d316fb895daf..4f05d208c95c 100644
--- a/Documentation/devicetree/bindings/regulator/tps65217.txt
+++ b/Documentation/devicetree/bindings/regulator/tps65217.txt
@@ -11,6 +11,9 @@ Required properties:
11 using the standard binding for regulators found at 11 using the standard binding for regulators found at
12 Documentation/devicetree/bindings/regulator/regulator.txt. 12 Documentation/devicetree/bindings/regulator/regulator.txt.
13 13
14Optional properties:
15- ti,pmic-shutdown-controller: Telling the PMIC to shutdown on PWR_EN toggle.
16
14 The valid names for regulators are: 17 The valid names for regulators are:
15 tps65217: dcdc1, dcdc2, dcdc3, ldo1, ldo2, ldo3 and ldo4 18 tps65217: dcdc1, dcdc2, dcdc3, ldo1, ldo2, ldo3 and ldo4
16 19
@@ -20,6 +23,7 @@ Example:
20 23
21 tps: tps@24 { 24 tps: tps@24 {
22 compatible = "ti,tps65217"; 25 compatible = "ti,tps65217";
26 ti,pmic-shutdown-controller;
23 27
24 regulators { 28 regulators {
25 dcdc1_reg: dcdc1 { 29 dcdc1_reg: dcdc1 {
diff --git a/Documentation/devicetree/bindings/regulator/vexpress.txt b/Documentation/devicetree/bindings/regulator/vexpress.txt
new file mode 100644
index 000000000000..d775f72487aa
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/vexpress.txt
@@ -0,0 +1,32 @@
1Versatile Express voltage regulators
2------------------------------------
3
4Requires node properties:
5- "compatible" value: "arm,vexpress-volt"
6- "arm,vexpress-sysreg,func" when controlled via vexpress-sysreg
7 (see Documentation/devicetree/bindings/arm/vexpress-sysreg.txt
8 for more details)
9
10Required regulator properties:
11- "regulator-name"
12- "regulator-always-on"
13
14Optional regulator properties:
15- "regulator-min-microvolt"
16- "regulator-max-microvolt"
17
18See Documentation/devicetree/bindings/regulator/regulator.txt
19for more details about the regulator properties.
20
21When no "regulator-[min|max]-microvolt" properties are defined,
22the device is treated as fixed (or rather "read-only") regulator.
23
24Example:
25 volt@0 {
26 compatible = "arm,vexpress-volt";
27 arm,vexpress-sysreg,func = <2 0>;
28 regulator-name = "Cores";
29 regulator-min-microvolt = <800000>;
30 regulator-max-microvolt = <1050000>;
31 regulator-always-on;
32 };
diff --git a/Documentation/devicetree/bindings/rtc/imxdi-rtc.txt b/Documentation/devicetree/bindings/rtc/imxdi-rtc.txt
new file mode 100644
index 000000000000..c9d80d7da141
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/imxdi-rtc.txt
@@ -0,0 +1,17 @@
1* i.MX25 Real Time Clock controller
2
3This binding supports the following chips: i.MX25, i.MX53
4
5Required properties:
6- compatible: should be: "fsl,imx25-rtc"
7- reg: physical base address of the controller and length of memory mapped
8 region.
9- interrupts: rtc alarm interrupt
10
11Example:
12
13rtc@80056000 {
14 compatible = "fsl,imx53-rtc", "fsl,imx25-rtc";
15 reg = <0x80056000 2000>;
16 interrupts = <29>;
17};
diff --git a/Documentation/devicetree/bindings/rtc/nvidia,tegra20-rtc.txt b/Documentation/devicetree/bindings/rtc/nvidia,tegra20-rtc.txt
new file mode 100644
index 000000000000..93f45e9dce7c
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/nvidia,tegra20-rtc.txt
@@ -0,0 +1,19 @@
1NVIDIA Tegra20 real-time clock
2
3The Tegra RTC maintains seconds and milliseconds counters, and five alarm
4registers. The alarms and other interrupts may wake the system from low-power
5state.
6
7Required properties:
8
9- compatible : should be "nvidia,tegra20-rtc".
10- reg : Specifies base physical address and size of the registers.
11- interrupts : A single interrupt specifier.
12
13Example:
14
15timer {
16 compatible = "nvidia,tegra20-rtc";
17 reg = <0x7000e000 0x100>;
18 interrupts = <0 2 0x04>;
19};
diff --git a/Documentation/devicetree/bindings/rtc/orion-rtc.txt b/Documentation/devicetree/bindings/rtc/orion-rtc.txt
new file mode 100644
index 000000000000..3bf63ffa5160
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/orion-rtc.txt
@@ -0,0 +1,18 @@
1* Mvebu Real Time Clock
2
3RTC controller for the Kirkwood, the Dove, the Armada 370 and the
4Armada XP SoCs
5
6Required properties:
7- compatible : Should be "marvell,orion-rtc"
8- reg: physical base address of the controller and length of memory mapped
9 region.
10- interrupts: IRQ line for the RTC.
11
12Example:
13
14rtc@10300 {
15 compatible = "marvell,orion-rtc";
16 reg = <0xd0010300 0x20>;
17 interrupts = <50>;
18};
diff --git a/Documentation/devicetree/bindings/rtc/rtc-omap.txt b/Documentation/devicetree/bindings/rtc/rtc-omap.txt
new file mode 100644
index 000000000000..b47aa415c820
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/rtc-omap.txt
@@ -0,0 +1,17 @@
1TI Real Time Clock
2
3Required properties:
4- compatible: "ti,da830-rtc"
5- reg: Address range of rtc register set
6- interrupts: rtc timer, alarm interrupts in order
7- interrupt-parent: phandle for the interrupt controller
8
9Example:
10
11rtc@1c23000 {
12 compatible = "ti,da830-rtc";
13 reg = <0x23000 0x1000>;
14 interrupts = <19
15 19>;
16 interrupt-parent = <&intc>;
17};
diff --git a/Documentation/devicetree/bindings/rtc/s3c-rtc.txt b/Documentation/devicetree/bindings/rtc/s3c-rtc.txt
index 90ec45fd33ec..7ac7259fe9ea 100644
--- a/Documentation/devicetree/bindings/rtc/s3c-rtc.txt
+++ b/Documentation/devicetree/bindings/rtc/s3c-rtc.txt
@@ -7,7 +7,7 @@ Required properties:
7- reg: physical base address of the controller and length of memory mapped 7- reg: physical base address of the controller and length of memory mapped
8 region. 8 region.
9- interrupts: Two interrupt numbers to the cpu should be specified. First 9- interrupts: Two interrupt numbers to the cpu should be specified. First
10 interrupt number is the rtc alarm interupt and second interrupt number 10 interrupt number is the rtc alarm interrupt and second interrupt number
11 is the rtc tick interrupt. The number of cells representing a interrupt 11 is the rtc tick interrupt. The number of cells representing a interrupt
12 depends on the parent interrupt controller. 12 depends on the parent interrupt controller.
13 13
diff --git a/Documentation/devicetree/bindings/serial/lantiq_asc.txt b/Documentation/devicetree/bindings/serial/lantiq_asc.txt
new file mode 100644
index 000000000000..5b78591aaa46
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/lantiq_asc.txt
@@ -0,0 +1,16 @@
1Lantiq SoC ASC serial controller
2
3Required properties:
4- compatible : Should be "lantiq,asc"
5- reg : Address and length of the register set for the device
6- interrupts: the 3 (tx rx err) interrupt numbers. The interrupt specifier
7 depends on the interrupt-parent interrupt controller.
8
9Example:
10
11asc1: serial@E100C00 {
12 compatible = "lantiq,asc";
13 reg = <0xE100C00 0x400>;
14 interrupt-parent = <&icu0>;
15 interrupts = <112 113 114>;
16};
diff --git a/Documentation/devicetree/bindings/serial/nvidia,tegra20-hsuart.txt b/Documentation/devicetree/bindings/serial/nvidia,tegra20-hsuart.txt
new file mode 100644
index 000000000000..392a4493eebd
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/nvidia,tegra20-hsuart.txt
@@ -0,0 +1,24 @@
1NVIDIA Tegra20/Tegra30 high speed (DMA based) UART controller driver.
2
3Required properties:
4- compatible : should be "nvidia,tegra30-hsuart", "nvidia,tegra20-hsuart".
5- reg: Should contain UART controller registers location and length.
6- interrupts: Should contain UART controller interrupts.
7- nvidia,dma-request-selector : The Tegra DMA controller's phandle and
8 request selector for this UART controller.
9
10Optional properties:
11- nvidia,enable-modem-interrupt: Enable modem interrupts. Should be enable
12 only if all 8 lines of UART controller are pinmuxed.
13
14Example:
15
16serial@70006000 {
17 compatible = "nvidia,tegra30-hsuart", "nvidia,tegra20-hsuart";
18 reg = <0x70006000 0x40>;
19 reg-shift = <2>;
20 interrupts = <0 36 0x04>;
21 nvidia,dma-request-selector = <&apbdma 8>;
22 nvidia,enable-modem-interrupt;
23 status = "disabled";
24};
diff --git a/Documentation/devicetree/bindings/sound/ak4104.txt b/Documentation/devicetree/bindings/sound/ak4104.txt
new file mode 100644
index 000000000000..b902ee39cf89
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/ak4104.txt
@@ -0,0 +1,22 @@
1AK4104 S/PDIF transmitter
2
3This device supports SPI mode only.
4
5Required properties:
6
7 - compatible : "asahi-kasei,ak4104"
8
9 - reg : The chip select number on the SPI bus
10
11Optional properties:
12
13 - reset-gpio : a GPIO spec for the reset pin. If specified, it will be
14 deasserted before communication to the device starts.
15
16Example:
17
18spdif: ak4104@0 {
19 compatible = "asahi-kasei,ak4104";
20 reg = <0>;
21 spi-max-frequency = <5000000>;
22};
diff --git a/Documentation/devicetree/bindings/sound/ak4642.txt b/Documentation/devicetree/bindings/sound/ak4642.txt
new file mode 100644
index 000000000000..623d4e70ae11
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/ak4642.txt
@@ -0,0 +1,17 @@
1AK4642 I2C transmitter
2
3This device supports I2C mode only.
4
5Required properties:
6
7 - compatible : "asahi-kasei,ak4642" or "asahi-kasei,ak4643" or "asahi-kasei,ak4648"
8 - reg : The chip select number on the I2C bus
9
10Example:
11
12&i2c {
13 ak4648: ak4648@0x12 {
14 compatible = "asahi-kasei,ak4642";
15 reg = <0x12>;
16 };
17};
diff --git a/Documentation/devicetree/bindings/sound/atmel-at91sam9g20ek-wm8731-audio.txt b/Documentation/devicetree/bindings/sound/atmel-at91sam9g20ek-wm8731-audio.txt
new file mode 100644
index 000000000000..9c5a9947b64d
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/atmel-at91sam9g20ek-wm8731-audio.txt
@@ -0,0 +1,26 @@
1* Atmel at91sam9g20ek wm8731 audio complex
2
3Required properties:
4 - compatible: "atmel,at91sam9g20ek-wm8731-audio"
5 - atmel,model: The user-visible name of this sound complex.
6 - atmel,audio-routing: A list of the connections between audio components.
7 - atmel,ssc-controller: The phandle of the SSC controller
8 - atmel,audio-codec: The phandle of the WM8731 audio codec
9Optional properties:
10 - pinctrl-names, pinctrl-0: Please refer to pinctrl-bindings.txt
11
12Example:
13sound {
14 compatible = "atmel,at91sam9g20ek-wm8731-audio";
15 pinctrl-names = "default";
16 pinctrl-0 = <&pinctrl_pck0_as_mck>;
17
18 atmel,model = "wm8731 @ AT91SAMG20EK";
19
20 atmel,audio-routing =
21 "Ext Spk", "LHPOUT",
22 "Int MIC", "MICIN";
23
24 atmel,ssc-controller = <&ssc0>;
25 atmel,audio-codec = <&wm8731>;
26};
diff --git a/Documentation/devicetree/bindings/sound/cs4271.txt b/Documentation/devicetree/bindings/sound/cs4271.txt
index c81b5fd5a5bc..e2cd1d7539e5 100644
--- a/Documentation/devicetree/bindings/sound/cs4271.txt
+++ b/Documentation/devicetree/bindings/sound/cs4271.txt
@@ -18,6 +18,20 @@ Optional properties:
18 18
19 - reset-gpio: a GPIO spec to define which pin is connected to the chip's 19 - reset-gpio: a GPIO spec to define which pin is connected to the chip's
20 !RESET pin 20 !RESET pin
21 - cirrus,amuteb-eq-bmutec: When given, the Codec's AMUTEB=BMUTEC flag
22 is enabled.
23 - cirrus,enable-soft-reset:
24 The CS4271 requires its LRCLK and MCLK to be stable before its RESET
25 line is de-asserted. That also means that clocks cannot be changed
26 without putting the chip back into hardware reset, which also requires
27 a complete re-initialization of all registers.
28
29 One (undocumented) workaround is to assert and de-assert the PDN bit
30 in the MODE2 register. This workaround can be enabled with this DT
31 property.
32
33 Note that this is not needed in case the clocks are stable
34 throughout the entire runtime of the codec.
21 35
22Examples: 36Examples:
23 37
diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm9712.txt b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm9712.txt
new file mode 100644
index 000000000000..be35d34e8b26
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm9712.txt
@@ -0,0 +1,51 @@
1NVIDIA Tegra audio complex
2
3Required properties:
4- compatible : "nvidia,tegra-audio-wm9712"
5- nvidia,model : The user-visible name of this sound complex.
6- nvidia,audio-routing : A list of the connections between audio components.
7 Each entry is a pair of strings, the first being the connection's sink,
8 the second being the connection's source. Valid names for sources and
9 sinks are the WM9712's pins, and the jacks on the board:
10
11 WM9712 pins:
12
13 * MONOOUT
14 * HPOUTL
15 * HPOUTR
16 * LOUT2
17 * ROUT2
18 * OUT3
19 * LINEINL
20 * LINEINR
21 * PHONE
22 * PCBEEP
23 * MIC1
24 * MIC2
25 * Mic Bias
26
27 Board connectors:
28
29 * Headphone
30 * LineIn
31 * Mic
32
33- nvidia,ac97-controller : The phandle of the Tegra AC97 controller
34
35
36Example:
37
38sound {
39 compatible = "nvidia,tegra-audio-wm9712-colibri_t20",
40 "nvidia,tegra-audio-wm9712";
41 nvidia,model = "Toradex Colibri T20";
42
43 nvidia,audio-routing =
44 "Headphone", "HPOUTL",
45 "Headphone", "HPOUTR",
46 "LineIn", "LINEINL",
47 "LineIn", "LINEINR",
48 "Mic", "MIC1";
49
50 nvidia,ac97-controller = <&ac97>;
51};
diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra20-ac97.txt b/Documentation/devicetree/bindings/sound/nvidia,tegra20-ac97.txt
new file mode 100644
index 000000000000..c1454979c1ef
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/nvidia,tegra20-ac97.txt
@@ -0,0 +1,22 @@
1NVIDIA Tegra 20 AC97 controller
2
3Required properties:
4- compatible : "nvidia,tegra20-ac97"
5- reg : Should contain AC97 controller registers location and length
6- interrupts : Should contain AC97 interrupt
7- nvidia,dma-request-selector : The Tegra DMA controller's phandle and
8 request selector for the AC97 controller
9- nvidia,codec-reset-gpio : The Tegra GPIO controller's phandle and the number
10 of the GPIO used to reset the external AC97 codec
11- nvidia,codec-sync-gpio : The Tegra GPIO controller's phandle and the number
12 of the GPIO corresponding with the AC97 DAP _FS line
13Example:
14
15ac97@70002000 {
16 compatible = "nvidia,tegra20-ac97";
17 reg = <0x70002000 0x200>;
18 interrupts = <0 81 0x04>;
19 nvidia,dma-request-selector = <&apbdma 12>;
20 nvidia,codec-reset-gpio = <&gpio 170 0>;
21 nvidia,codec-sync-gpio = <&gpio 120 0>;
22};
diff --git a/Documentation/devicetree/bindings/sound/omap-abe-twl6040.txt b/Documentation/devicetree/bindings/sound/omap-abe-twl6040.txt
index 65dec876cb2d..fd40c852d7c7 100644
--- a/Documentation/devicetree/bindings/sound/omap-abe-twl6040.txt
+++ b/Documentation/devicetree/bindings/sound/omap-abe-twl6040.txt
@@ -12,7 +12,7 @@ Required properties:
12 12
13Optional properties: 13Optional properties:
14- ti,dmic: phandle for the OMAP dmic node if the machine have it connected 14- ti,dmic: phandle for the OMAP dmic node if the machine have it connected
15- ti,jack_detection: Need to be set to <1> if the board capable to detect jack 15- ti,jack_detection: Need to be present if the board capable to detect jack
16 insertion, removal. 16 insertion, removal.
17 17
18Available audio endpoints for the audio-routing table: 18Available audio endpoints for the audio-routing table:
@@ -59,7 +59,7 @@ sound {
59 compatible = "ti,abe-twl6040"; 59 compatible = "ti,abe-twl6040";
60 ti,model = "SDP4430"; 60 ti,model = "SDP4430";
61 61
62 ti,jack-detection = <1>; 62 ti,jack-detection;
63 ti,mclk-freq = <38400000>; 63 ti,mclk-freq = <38400000>;
64 64
65 ti,mcpdm = <&mcpdm>; 65 ti,mcpdm = <&mcpdm>;
diff --git a/Documentation/devicetree/bindings/sound/omap-twl4030.txt b/Documentation/devicetree/bindings/sound/omap-twl4030.txt
index 6fae51c7f766..1ab6bc8404d5 100644
--- a/Documentation/devicetree/bindings/sound/omap-twl4030.txt
+++ b/Documentation/devicetree/bindings/sound/omap-twl4030.txt
@@ -6,6 +6,52 @@ Required properties:
6- ti,mcbsp: phandle for the McBSP node 6- ti,mcbsp: phandle for the McBSP node
7- ti,codec: phandle for the twl4030 audio node 7- ti,codec: phandle for the twl4030 audio node
8 8
9Optional properties:
10- ti,mcbsp-voice: phandle for the McBSP node connected to the voice port of twl
11- ti, jack-det-gpio: Jack detect GPIO
12- ti,audio-routing: List of connections between audio components.
13 Each entry is a pair of strings, the first being the connection's sink,
14 the second being the connection's source.
15 If the routing is not provided all possible connection will be available
16
17Available audio endpoints for the audio-routing table:
18
19Board connectors:
20 * Headset Stereophone
21 * Earpiece Spk
22 * Handsfree Spk
23 * Ext Spk
24 * Main Mic
25 * Sub Mic
26 * Headset Mic
27 * Carkit Mic
28 * Digital0 Mic
29 * Digital1 Mic
30 * Line In
31
32twl4030 pins:
33 * HSOL
34 * HSOR
35 * EARPIECE
36 * HFL
37 * HFR
38 * PREDRIVEL
39 * PREDRIVER
40 * CARKITL
41 * CARKITR
42 * MAINMIC
43 * SUBMIC
44 * HSMIC
45 * DIGIMIC0
46 * DIGIMIC1
47 * CARKITMIC
48 * AUXL
49 * AUXR
50
51 * Headset Mic Bias
52 * Mic Bias 1 /* Used for Main Mic or Digimic0 */
53 * Mic Bias 2 /* Used for Sub Mic or Digimic1 */
54
9Example: 55Example:
10 56
11sound { 57sound {
diff --git a/Documentation/devicetree/bindings/sound/renesas,fsi.txt b/Documentation/devicetree/bindings/sound/renesas,fsi.txt
new file mode 100644
index 000000000000..c5be003f413e
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/renesas,fsi.txt
@@ -0,0 +1,26 @@
1Renesas FSI
2
3Required properties:
4- compatible : "renesas,sh_fsi2" or "renesas,sh_fsi"
5- reg : Should contain the register physical address and length
6- interrupts : Should contain FSI interrupt
7
8- fsia,spdif-connection : FSI is connected by S/PDFI
9- fsia,stream-mode-support : FSI supports 16bit stream mode.
10- fsia,use-internal-clock : FSI uses internal clock when master mode.
11
12- fsib,spdif-connection : same as fsia
13- fsib,stream-mode-support : same as fsia
14- fsib,use-internal-clock : same as fsia
15
16Example:
17
18sh_fsi2: sh_fsi2@0xec230000 {
19 compatible = "renesas,sh_fsi2";
20 reg = <0xec230000 0x400>;
21 interrupts = <0 146 0x4>;
22
23 fsia,spdif-connection;
24 fsia,stream-mode-support;
25 fsia,use-internal-clock;
26};
diff --git a/Documentation/devicetree/bindings/sound/samsung,smdk-wm8994.txt b/Documentation/devicetree/bindings/sound/samsung,smdk-wm8994.txt
new file mode 100644
index 000000000000..4686646fb122
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/samsung,smdk-wm8994.txt
@@ -0,0 +1,14 @@
1Samsung SMDK audio complex
2
3Required properties:
4- compatible : "samsung,smdk-wm8994"
5- samsung,i2s-controller: The phandle of the Samsung I2S0 controller
6- samsung,audio-codec: The phandle of the WM8994 audio codec
7Example:
8
9sound {
10 compatible = "samsung,smdk-wm8994";
11
12 samsung,i2s-controller = <&i2s0>;
13 samsung,audio-codec = <&wm8994>;
14};
diff --git a/Documentation/devicetree/bindings/sound/samsung-i2s.txt b/Documentation/devicetree/bindings/sound/samsung-i2s.txt
new file mode 100644
index 000000000000..3070046da2e5
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/samsung-i2s.txt
@@ -0,0 +1,63 @@
1* Samsung I2S controller
2
3Required SoC Specific Properties:
4
5- compatible : "samsung,i2s-v5"
6- reg: physical base address of the controller and length of memory mapped
7 region.
8- dmas: list of DMA controller phandle and DMA request line ordered pairs.
9- dma-names: identifier string for each DMA request line in the dmas property.
10 These strings correspond 1:1 with the ordered pairs in dmas.
11
12Optional SoC Specific Properties:
13
14- samsung,supports-6ch: If the I2S Primary sound source has 5.1 Channel
15 support, this flag is enabled.
16- samsung,supports-rstclr: This flag should be set if I2S software reset bit
17 control is required. When this flag is set I2S software reset bit will be
18 enabled or disabled based on need.
19- samsung,supports-secdai:If I2S block has a secondary FIFO and internal DMA,
20 then this flag is enabled.
21- samsung,idma-addr: Internal DMA register base address of the audio
22 sub system(used in secondary sound source).
23
24Required Board Specific Properties:
25
26- gpios: The gpio specifier for data out,data in, LRCLK, CDCLK and SCLK
27 interface lines. The format of the gpio specifier depends on the gpio
28 controller.
29 The syntax of samsung gpio specifier is
30 <[phandle of the gpio controller node]
31 [pin number within the gpio controller]
32 [mux function]
33 [flags and pull up/down]
34 [drive strength]>
35
36Example:
37
38- SoC Specific Portion:
39
40i2s@03830000 {
41 compatible = "samsung,i2s-v5";
42 reg = <0x03830000 0x100>;
43 dmas = <&pdma0 10
44 &pdma0 9
45 &pdma0 8>;
46 dma-names = "tx", "rx", "tx-sec";
47 samsung,supports-6ch;
48 samsung,supports-rstclr;
49 samsung,supports-secdai;
50 samsung,idma-addr = <0x03000000>;
51};
52
53- Board Specific Portion:
54
55i2s@03830000 {
56 gpios = <&gpz 0 2 0 0>, /* I2S_0_SCLK */
57 <&gpz 1 2 0 0>, /* I2S_0_CDCLK */
58 <&gpz 2 2 0 0>, /* I2S_0_LRCK */
59 <&gpz 3 2 0 0>, /* I2S_0_SDI */
60 <&gpz 4 2 0 0>, /* I2S_0_SDO[1] */
61 <&gpz 5 2 0 0>, /* I2S_0_SDO[2] */
62 <&gpz 6 2 0 0>; /* I2S_0_SDO[3] */
63};
diff --git a/Documentation/devicetree/bindings/sound/tlv320aic3x.txt b/Documentation/devicetree/bindings/sound/tlv320aic3x.txt
index e7b98f41fa5f..f47c3f589fd0 100644
--- a/Documentation/devicetree/bindings/sound/tlv320aic3x.txt
+++ b/Documentation/devicetree/bindings/sound/tlv320aic3x.txt
@@ -11,6 +11,12 @@ Optional properties:
11 11
12- gpio-reset - gpio pin number used for codec reset 12- gpio-reset - gpio pin number used for codec reset
13- ai3x-gpio-func - <array of 2 int> - AIC3X_GPIO1 & AIC3X_GPIO2 Functionality 13- ai3x-gpio-func - <array of 2 int> - AIC3X_GPIO1 & AIC3X_GPIO2 Functionality
14- ai3x-micbias-vg - MicBias Voltage required.
15 1 - MICBIAS output is powered to 2.0V,
16 2 - MICBIAS output is powered to 2.5V,
17 3 - MICBIAS output is connected to AVDD,
18 If this node is not mentioned or if the value is incorrect, then MicBias
19 is powered down.
14 20
15Example: 21Example:
16 22
diff --git a/Documentation/devicetree/bindings/sound/wm8962.txt b/Documentation/devicetree/bindings/sound/wm8962.txt
new file mode 100644
index 000000000000..dceb3b1c2bb7
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/wm8962.txt
@@ -0,0 +1,16 @@
1WM8962 audio CODEC
2
3This device supports I2C only.
4
5Required properties:
6
7 - compatible : "wlf,wm8962"
8
9 - reg : the I2C address of the device.
10
11Example:
12
13codec: wm8962@1a {
14 compatible = "wlf,wm8962";
15 reg = <0x1a>;
16};
diff --git a/Documentation/devicetree/bindings/spi/nvidia,tegra20-sflash.txt b/Documentation/devicetree/bindings/spi/nvidia,tegra20-sflash.txt
new file mode 100644
index 000000000000..7b53da5cb75b
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/nvidia,tegra20-sflash.txt
@@ -0,0 +1,26 @@
1NVIDIA Tegra20 SFLASH controller.
2
3Required properties:
4- compatible : should be "nvidia,tegra20-sflash".
5- reg: Should contain SFLASH registers location and length.
6- interrupts: Should contain SFLASH interrupts.
7- nvidia,dma-request-selector : The Tegra DMA controller's phandle and
8 request selector for this SFLASH controller.
9
10Recommended properties:
11- spi-max-frequency: Definition as per
12 Documentation/devicetree/bindings/spi/spi-bus.txt
13
14Example:
15
16spi@7000c380 {
17 compatible = "nvidia,tegra20-sflash";
18 reg = <0x7000c380 0x80>;
19 interrupts = <0 39 0x04>;
20 nvidia,dma-request-selector = <&apbdma 16>;
21 spi-max-frequency = <25000000>;
22 #address-cells = <1>;
23 #size-cells = <0>;
24 status = "disabled";
25};
26
diff --git a/Documentation/devicetree/bindings/spi/nvidia,tegra20-slink.txt b/Documentation/devicetree/bindings/spi/nvidia,tegra20-slink.txt
new file mode 100644
index 000000000000..eefe15e3d95e
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/nvidia,tegra20-slink.txt
@@ -0,0 +1,26 @@
1NVIDIA Tegra20/Tegra30 SLINK controller.
2
3Required properties:
4- compatible : should be "nvidia,tegra20-slink", "nvidia,tegra30-slink".
5- reg: Should contain SLINK registers location and length.
6- interrupts: Should contain SLINK interrupts.
7- nvidia,dma-request-selector : The Tegra DMA controller's phandle and
8 request selector for this SLINK controller.
9
10Recommended properties:
11- spi-max-frequency: Definition as per
12 Documentation/devicetree/bindings/spi/spi-bus.txt
13
14Example:
15
16spi@7000d600 {
17 compatible = "nvidia,tegra20-slink";
18 reg = <0x7000d600 0x200>;
19 interrupts = <0 82 0x04>;
20 nvidia,dma-request-selector = <&apbdma 16>;
21 spi-max-frequency = <25000000>;
22 #address-cells = <1>;
23 #size-cells = <0>;
24 status = "disabled";
25};
26
diff --git a/Documentation/devicetree/bindings/spi/omap-spi.txt b/Documentation/devicetree/bindings/spi/omap-spi.txt
index 81df374adbb9..938809c6829b 100644
--- a/Documentation/devicetree/bindings/spi/omap-spi.txt
+++ b/Documentation/devicetree/bindings/spi/omap-spi.txt
@@ -6,7 +6,9 @@ Required properties:
6 - "ti,omap4-spi" for OMAP4+. 6 - "ti,omap4-spi" for OMAP4+.
7- ti,spi-num-cs : Number of chipselect supported by the instance. 7- ti,spi-num-cs : Number of chipselect supported by the instance.
8- ti,hwmods: Name of the hwmod associated to the McSPI 8- ti,hwmods: Name of the hwmod associated to the McSPI
9 9- ti,pindir-d0-out-d1-in: Select the D0 pin as output and D1 as
10 input. The default is D0 as input and
11 D1 as output.
10 12
11Example: 13Example:
12 14
diff --git a/Documentation/devicetree/bindings/spi/sh-msiof.txt b/Documentation/devicetree/bindings/spi/sh-msiof.txt
new file mode 100644
index 000000000000..e6222106ca36
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/sh-msiof.txt
@@ -0,0 +1,12 @@
1Renesas MSIOF spi controller
2
3Required properties:
4- compatible : "renesas,sh-msiof" for SuperH or
5 "renesas,sh-mobile-msiof" for SH Mobile series
6- reg : Offset and length of the register set for the device
7- interrupts : interrupt line used by MSIOF
8
9Optional properties:
10- num-cs : total number of chip-selects
11- renesas,tx-fifo-size : Overrides the default tx fifo size given in words
12- renesas,rx-fifo-size : Overrides the default rx fifo size given in words
diff --git a/Documentation/devicetree/bindings/spi/spi-bus.txt b/Documentation/devicetree/bindings/spi/spi-bus.txt
index d2c33d0f533e..296015e3c632 100644
--- a/Documentation/devicetree/bindings/spi/spi-bus.txt
+++ b/Documentation/devicetree/bindings/spi/spi-bus.txt
@@ -12,6 +12,7 @@ The SPI master node requires the following properties:
12- #size-cells - should be zero. 12- #size-cells - should be zero.
13- compatible - name of SPI bus controller following generic names 13- compatible - name of SPI bus controller following generic names
14 recommended practice. 14 recommended practice.
15- cs-gpios - (optional) gpios chip select.
15No other properties are required in the SPI bus node. It is assumed 16No other properties are required in the SPI bus node. It is assumed
16that a driver for an SPI bus device will understand that it is an SPI bus. 17that a driver for an SPI bus device will understand that it is an SPI bus.
17However, the binding does not attempt to define the specific method for 18However, the binding does not attempt to define the specific method for
@@ -24,6 +25,22 @@ support describing the chip select layout.
24Optional property: 25Optional property:
25- num-cs : total number of chipselects 26- num-cs : total number of chipselects
26 27
28If cs-gpios is used the number of chip select will automatically increased
29with max(cs-gpios > hw cs)
30
31So if for example the controller has 2 CS lines, and the cs-gpios
32property looks like this:
33
34cs-gpios = <&gpio1 0 0> <0> <&gpio1 1 0> <&gpio1 2 0>;
35
36Then it should be configured so that num_chipselect = 4 with the
37following mapping:
38
39cs0 : &gpio1 0 0
40cs1 : native
41cs2 : &gpio1 1 0
42cs3 : &gpio1 2 0
43
27SPI slave nodes must be children of the SPI master node and can 44SPI slave nodes must be children of the SPI master node and can
28contain the following properties. 45contain the following properties.
29- reg - (required) chip select address of device. 46- reg - (required) chip select address of device.
@@ -36,6 +53,11 @@ contain the following properties.
36 shifted clock phase (CPHA) mode 53 shifted clock phase (CPHA) mode
37- spi-cs-high - (optional) Empty property indicating device requires 54- spi-cs-high - (optional) Empty property indicating device requires
38 chip select active high 55 chip select active high
56- spi-3wire - (optional) Empty property indicating device requires
57 3-wire mode.
58
59If a gpio chipselect is used for the SPI slave the gpio number will be passed
60via the cs_gpio
39 61
40SPI example for an MPC5200 SPI bus: 62SPI example for an MPC5200 SPI bus:
41 spi@f00 { 63 spi@f00 {
diff --git a/Documentation/devicetree/bindings/spi/spi_atmel.txt b/Documentation/devicetree/bindings/spi/spi_atmel.txt
new file mode 100644
index 000000000000..07e04cdc0c9e
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/spi_atmel.txt
@@ -0,0 +1,26 @@
1Atmel SPI device
2
3Required properties:
4- compatible : should be "atmel,at91rm9200-spi".
5- reg: Address and length of the register set for the device
6- interrupts: Should contain spi interrupt
7- cs-gpios: chipselects
8
9Example:
10
11spi1: spi@fffcc000 {
12 compatible = "atmel,at91rm9200-spi";
13 reg = <0xfffcc000 0x4000>;
14 interrupts = <13 4 5>;
15 #address-cells = <1>;
16 #size-cells = <0>;
17 cs-gpios = <&pioB 3 0>;
18 status = "okay";
19
20 mmc-slot@0 {
21 compatible = "mmc-spi-slot";
22 reg = <0>;
23 gpios = <&pioC 4 0>; /* CD */
24 spi-max-frequency = <25000000>;
25 };
26};
diff --git a/Documentation/devicetree/bindings/staging/iio/adc/mxs-lradc.txt b/Documentation/devicetree/bindings/staging/iio/adc/mxs-lradc.txt
index 801d58cb6d4d..46882058b59b 100644
--- a/Documentation/devicetree/bindings/staging/iio/adc/mxs-lradc.txt
+++ b/Documentation/devicetree/bindings/staging/iio/adc/mxs-lradc.txt
@@ -5,6 +5,12 @@ Required properties:
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: Should contain the LRADC interrupts 6- interrupts: Should contain the LRADC interrupts
7 7
8Optional properties:
9- fsl,lradc-touchscreen-wires: Number of wires used to connect the touchscreen
10 to LRADC. Valid value is either 4 or 5. If this
11 property is not present, then the touchscreen is
12 disabled.
13
8Examples: 14Examples:
9 15
10 lradc@80050000 { 16 lradc@80050000 {
diff --git a/Documentation/devicetree/bindings/thermal/db8500-thermal.txt b/Documentation/devicetree/bindings/thermal/db8500-thermal.txt
new file mode 100644
index 000000000000..2e1c06fad81f
--- /dev/null
+++ b/Documentation/devicetree/bindings/thermal/db8500-thermal.txt
@@ -0,0 +1,44 @@
1* ST-Ericsson DB8500 Thermal
2
3** Thermal node properties:
4
5- compatible : "stericsson,db8500-thermal";
6- reg : address range of the thermal sensor registers;
7- interrupts : interrupts generated from PRCMU;
8- interrupt-names : "IRQ_HOTMON_LOW" and "IRQ_HOTMON_HIGH";
9- num-trips : number of total trip points, this is required, set it 0 if none,
10 if greater than 0, the following properties must be defined;
11- tripN-temp : temperature of trip point N, should be in ascending order;
12- tripN-type : type of trip point N, should be one of "active" "passive" "hot"
13 "critical";
14- tripN-cdev-num : number of the cooling devices which can be bound to trip
15 point N, this is required if trip point N is defined, set it 0 if none,
16 otherwise the following cooling device names must be defined;
17- tripN-cdev-nameM : name of the No. M cooling device of trip point N;
18
19Usually the num-trips and tripN-*** are separated in board related dts files.
20
21Example:
22thermal@801573c0 {
23 compatible = "stericsson,db8500-thermal";
24 reg = <0x801573c0 0x40>;
25 interrupts = <21 0x4>, <22 0x4>;
26 interrupt-names = "IRQ_HOTMON_LOW", "IRQ_HOTMON_HIGH";
27
28 num-trips = <3>;
29
30 trip0-temp = <75000>;
31 trip0-type = "active";
32 trip0-cdev-num = <1>;
33 trip0-cdev-name0 = "thermal-cpufreq-0";
34
35 trip1-temp = <80000>;
36 trip1-type = "active";
37 trip1-cdev-num = <2>;
38 trip1-cdev-name0 = "thermal-cpufreq-0";
39 trip1-cdev-name1 = "thermal-fan";
40
41 trip2-temp = <85000>;
42 trip2-type = "critical";
43 trip2-cdev-num = <0>;
44}
diff --git a/Documentation/devicetree/bindings/thermal/dove-thermal.txt b/Documentation/devicetree/bindings/thermal/dove-thermal.txt
new file mode 100644
index 000000000000..6f474677d472
--- /dev/null
+++ b/Documentation/devicetree/bindings/thermal/dove-thermal.txt
@@ -0,0 +1,18 @@
1* Dove Thermal
2
3This driver is for Dove SoCs which contain a thermal sensor.
4
5Required properties:
6- compatible : "marvell,dove-thermal"
7- reg : Address range of the thermal registers
8
9The reg properties should contain two ranges. The first is for the
10three Thermal Manager registers, while the second range contains the
11Thermal Diode Control Registers.
12
13Example:
14
15 thermal@10078 {
16 compatible = "marvell,dove-thermal";
17 reg = <0xd001c 0x0c>, <0xd005c 0x08>;
18 };
diff --git a/Documentation/devicetree/bindings/thermal/kirkwood-thermal.txt b/Documentation/devicetree/bindings/thermal/kirkwood-thermal.txt
new file mode 100644
index 000000000000..8c0f5eb86da7
--- /dev/null
+++ b/Documentation/devicetree/bindings/thermal/kirkwood-thermal.txt
@@ -0,0 +1,15 @@
1* Kirkwood Thermal
2
3This version is for Kirkwood 88F8262 & 88F6283 SoCs. Other kirkwoods
4don't contain a thermal sensor.
5
6Required properties:
7- compatible : "marvell,kirkwood-thermal"
8- reg : Address range of the thermal registers
9
10Example:
11
12 thermal@10078 {
13 compatible = "marvell,kirkwood-thermal";
14 reg = <0x10078 0x4>;
15 };
diff --git a/Documentation/devicetree/bindings/thermal/rcar-thermal.txt b/Documentation/devicetree/bindings/thermal/rcar-thermal.txt
new file mode 100644
index 000000000000..28ef498a66e5
--- /dev/null
+++ b/Documentation/devicetree/bindings/thermal/rcar-thermal.txt
@@ -0,0 +1,29 @@
1* Renesas R-Car Thermal
2
3Required properties:
4- compatible : "renesas,rcar-thermal"
5- reg : Address range of the thermal registers.
6 The 1st reg will be recognized as common register
7 if it has "interrupts".
8
9Option properties:
10
11- interrupts : use interrupt
12
13Example (non interrupt support):
14
15thermal@e61f0100 {
16 compatible = "renesas,rcar-thermal";
17 reg = <0xe61f0100 0x38>;
18};
19
20Example (interrupt support):
21
22thermal@e61f0000 {
23 compatible = "renesas,rcar-thermal";
24 reg = <0xe61f0000 0x14
25 0xe61f0100 0x38
26 0xe61f0200 0x38
27 0xe61f0300 0x38>;
28 interrupts = <0 69 4>;
29};
diff --git a/Documentation/devicetree/bindings/timer/allwinner,sunxi-timer.txt b/Documentation/devicetree/bindings/timer/allwinner,sunxi-timer.txt
new file mode 100644
index 000000000000..0c7b64e95a61
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/allwinner,sunxi-timer.txt
@@ -0,0 +1,17 @@
1Allwinner A1X SoCs Timer Controller
2
3Required properties:
4
5- compatible : should be "allwinner,sunxi-timer"
6- reg : Specifies base physical address and size of the registers.
7- interrupts : The interrupt of the first timer
8- clocks: phandle to the source clock (usually a 24 MHz fixed clock)
9
10Example:
11
12timer {
13 compatible = "allwinner,sunxi-timer";
14 reg = <0x01c20c00 0x400>;
15 interrupts = <22>;
16 clocks = <&osc>;
17};
diff --git a/Documentation/devicetree/bindings/timer/marvell,armada-370-xp-timer.txt b/Documentation/devicetree/bindings/timer/marvell,armada-370-xp-timer.txt
new file mode 100644
index 000000000000..36381129d141
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/marvell,armada-370-xp-timer.txt
@@ -0,0 +1,15 @@
1Marvell Armada 370 and Armada XP Timers
2---------------------------------------
3
4Required properties:
5- compatible: Should be "marvell,armada-370-xp-timer"
6- interrupts: Should contain the list of Global Timer interrupts and
7 then local timer interrupts
8- reg: Should contain location and length for timers register. First
9 pair for the Global Timer registers, second pair for the
10 local/private timers.
11- clocks: clock driving the timer hardware
12
13Optional properties:
14- marvell,timer-25Mhz: Tells whether the Global timer supports the 25
15 Mhz fixed mode (available on Armada XP and not on Armada 370)
diff --git a/Documentation/devicetree/bindings/timer/nvidia,tegra20-timer.txt b/Documentation/devicetree/bindings/timer/nvidia,tegra20-timer.txt
new file mode 100644
index 000000000000..e019fdc38773
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/nvidia,tegra20-timer.txt
@@ -0,0 +1,21 @@
1NVIDIA Tegra20 timer
2
3The Tegra20 timer provides four 29-bit timer channels and a single 32-bit free
4running counter. The first two channels may also trigger a watchdog reset.
5
6Required properties:
7
8- compatible : should be "nvidia,tegra20-timer".
9- reg : Specifies base physical address and size of the registers.
10- interrupts : A list of 4 interrupts; one per timer channel.
11
12Example:
13
14timer {
15 compatible = "nvidia,tegra20-timer";
16 reg = <0x60005000 0x60>;
17 interrupts = <0 0 0x04
18 0 1 0x04
19 0 41 0x04
20 0 42 0x04>;
21};
diff --git a/Documentation/devicetree/bindings/timer/nvidia,tegra30-timer.txt b/Documentation/devicetree/bindings/timer/nvidia,tegra30-timer.txt
new file mode 100644
index 000000000000..906109d4c593
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/nvidia,tegra30-timer.txt
@@ -0,0 +1,23 @@
1NVIDIA Tegra30 timer
2
3The Tegra30 timer provides ten 29-bit timer channels, a single 32-bit free
4running counter, and 5 watchdog modules. The first two channels may also
5trigger a legacy watchdog reset.
6
7Required properties:
8
9- compatible : should be "nvidia,tegra30-timer", "nvidia,tegra20-timer".
10- reg : Specifies base physical address and size of the registers.
11- interrupts : A list of 6 interrupts; one per each of timer channels 1
12 through 5, and one for the shared interrupt for the remaining channels.
13
14timer {
15 compatible = "nvidia,tegra30-timer", "nvidia,tegra20-timer";
16 reg = <0x60005000 0x400>;
17 interrupts = <0 0 0x04
18 0 1 0x04
19 0 41 0x04
20 0 42 0x04
21 0 121 0x04
22 0 122 0x04>;
23};
diff --git a/Documentation/devicetree/bindings/tty/serial/arc-uart.txt b/Documentation/devicetree/bindings/tty/serial/arc-uart.txt
new file mode 100644
index 000000000000..5cae2eb686f8
--- /dev/null
+++ b/Documentation/devicetree/bindings/tty/serial/arc-uart.txt
@@ -0,0 +1,26 @@
1* Synopsys ARC UART : Non standard UART used in some of the ARC FPGA boards
2
3Required properties:
4- compatible : "snps,arc-uart"
5- reg : offset and length of the register set for the device.
6- interrupts : device interrupt
7- clock-frequency : the input clock frequency for the UART
8- current-speed : baud rate for UART
9
10e.g.
11
12arcuart0: serial@c0fc1000 {
13 compatible = "snps,arc-uart";
14 reg = <0xc0fc1000 0x100>;
15 interrupts = <5>;
16 clock-frequency = <80000000>;
17 current-speed = <115200>;
18 status = "okay";
19};
20
21Note: Each port should have an alias correctly numbered in "aliases" node.
22
23e.g.
24aliases {
25 serial0 = &arcuart0;
26};
diff --git a/Documentation/devicetree/bindings/tty/serial/efm32-uart.txt b/Documentation/devicetree/bindings/tty/serial/efm32-uart.txt
index 6588b6950a7f..8e080b893b49 100644
--- a/Documentation/devicetree/bindings/tty/serial/efm32-uart.txt
+++ b/Documentation/devicetree/bindings/tty/serial/efm32-uart.txt
@@ -5,10 +5,16 @@ Required properties:
5- reg : Address and length of the register set 5- reg : Address and length of the register set
6- interrupts : Should contain uart interrupt 6- interrupts : Should contain uart interrupt
7 7
8Optional properties:
9- location : Decides the location of the USART I/O pins.
10 Allowed range : [0 .. 5]
11 Default: 0
12
8Example: 13Example:
9 14
10uart@0x4000c400 { 15uart@0x4000c400 {
11 compatible = "efm32,uart"; 16 compatible = "efm32,uart";
12 reg = <0x4000c400 0x400>; 17 reg = <0x4000c400 0x400>;
13 interrupts = <15>; 18 interrupts = <15>;
19 location = <0>;
14}; 20};
diff --git a/Documentation/devicetree/bindings/tty/serial/fsl-mxs-auart.txt b/Documentation/devicetree/bindings/tty/serial/fsl-mxs-auart.txt
index 2ee903fad25c..273a8d5b3300 100644
--- a/Documentation/devicetree/bindings/tty/serial/fsl-mxs-auart.txt
+++ b/Documentation/devicetree/bindings/tty/serial/fsl-mxs-auart.txt
@@ -6,11 +6,19 @@ Required properties:
6- reg : Address and length of the register set for the device 6- reg : Address and length of the register set for the device
7- interrupts : Should contain the auart interrupt numbers 7- interrupts : Should contain the auart interrupt numbers
8 8
9Optional properties:
10- fsl,auart-dma-channel : The DMA channels, the first is for RX, the other
11 is for TX. If you add this property, it also means that you
12 will enable the DMA support for the auart.
13 Note: due to the hardware bug in imx23(see errata : 2836),
14 only the imx28 can enable the DMA support for the auart.
15
9Example: 16Example:
10auart0: serial@8006a000 { 17auart0: serial@8006a000 {
11 compatible = "fsl,imx28-auart", "fsl,imx23-auart"; 18 compatible = "fsl,imx28-auart", "fsl,imx23-auart";
12 reg = <0x8006a000 0x2000>; 19 reg = <0x8006a000 0x2000>;
13 interrupts = <112 70 71>; 20 interrupts = <112 70 71>;
21 fsl,auart-dma-channel = <8 9>;
14}; 22};
15 23
16Note: Each auart port should have an alias correctly numbered in "aliases" 24Note: Each auart port should have an alias correctly numbered in "aliases"
diff --git a/Documentation/devicetree/bindings/tty/serial/of-serial.txt b/Documentation/devicetree/bindings/tty/serial/of-serial.txt
index ba385f2e0ddc..8f01cb190f25 100644
--- a/Documentation/devicetree/bindings/tty/serial/of-serial.txt
+++ b/Documentation/devicetree/bindings/tty/serial/of-serial.txt
@@ -11,10 +11,16 @@ Required properties:
11 - "nvidia,tegra20-uart" 11 - "nvidia,tegra20-uart"
12 - "nxp,lpc3220-uart" 12 - "nxp,lpc3220-uart"
13 - "ibm,qpace-nwp-serial" 13 - "ibm,qpace-nwp-serial"
14 - "altr,16550-FIFO32"
15 - "altr,16550-FIFO64"
16 - "altr,16550-FIFO128"
14 - "serial" if the port type is unknown. 17 - "serial" if the port type is unknown.
15- reg : offset and length of the register set for the device. 18- reg : offset and length of the register set for the device.
16- interrupts : should contain uart interrupt. 19- interrupts : should contain uart interrupt.
17- clock-frequency : the input clock frequency for the UART. 20- clock-frequency : the input clock frequency for the UART
21 or
22 clocks phandle to refer to the clk used as per Documentation/devicetree
23 /bindings/clock/clock-bindings.txt
18 24
19Optional properties: 25Optional properties:
20- current-speed : the current active speed of the UART. 26- current-speed : the current active speed of the UART.
diff --git a/Documentation/devicetree/bindings/usb/am33xx-usb.txt b/Documentation/devicetree/bindings/usb/am33xx-usb.txt
index ca8fa56e9f03..ea840f7f9258 100644
--- a/Documentation/devicetree/bindings/usb/am33xx-usb.txt
+++ b/Documentation/devicetree/bindings/usb/am33xx-usb.txt
@@ -1,14 +1,35 @@
1AM33XX MUSB GLUE 1AM33XX MUSB GLUE
2 - compatible : Should be "ti,musb-am33xx" 2 - compatible : Should be "ti,musb-am33xx"
3 - reg : offset and length of register sets, first usbss, then for musb instances
4 - interrupts : usbss, musb instance interrupts in order
3 - ti,hwmods : must be "usb_otg_hs" 5 - ti,hwmods : must be "usb_otg_hs"
4 - multipoint : Should be "1" indicating the musb controller supports 6 - multipoint : Should be "1" indicating the musb controller supports
5 multipoint. This is a MUSB configuration-specific setting. 7 multipoint. This is a MUSB configuration-specific setting.
6 - num_eps : Specifies the number of endpoints. This is also a 8 - num-eps : Specifies the number of endpoints. This is also a
7 MUSB configuration-specific setting. Should be set to "16" 9 MUSB configuration-specific setting. Should be set to "16"
8 - ram_bits : Specifies the ram address size. Should be set to "12" 10 - ram-bits : Specifies the ram address size. Should be set to "12"
9 - port0_mode : Should be "3" to represent OTG. "1" signifies HOST and "2" 11 - port0-mode : Should be "3" to represent OTG. "1" signifies HOST and "2"
10 represents PERIPHERAL. 12 represents PERIPHERAL.
11 - port1_mode : Should be "1" to represent HOST. "3" signifies OTG and "2" 13 - port1-mode : Should be "1" to represent HOST. "3" signifies OTG and "2"
12 represents PERIPHERAL. 14 represents PERIPHERAL.
13 - power : Should be "250". This signifies the controller can supply upto 15 - power : Should be "250". This signifies the controller can supply upto
14 500mA when operating in host mode. 16 500mA when operating in host mode.
17
18Example:
19
20usb@47400000 {
21 compatible = "ti,musb-am33xx";
22 reg = <0x47400000 0x1000 /* usbss */
23 0x47401000 0x800 /* musb instance 0 */
24 0x47401800 0x800>; /* musb instance 1 */
25 interrupts = <17 /* usbss */
26 18 /* musb instance 0 */
27 19>; /* musb instance 1 */
28 multipoint = <1>;
29 num-eps = <16>;
30 ram-bits = <12>;
31 port0-mode = <3>;
32 port1-mode = <3>;
33 power = <250>;
34 ti,hwmods = "usb_otg_hs";
35};
diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt b/Documentation/devicetree/bindings/usb/dwc3.txt
new file mode 100644
index 000000000000..7a95c651ceb3
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/dwc3.txt
@@ -0,0 +1,22 @@
1synopsys DWC3 CORE
2
3DWC3- USB3 CONTROLLER
4
5Required properties:
6 - compatible: must be "synopsys,dwc3"
7 - reg : Address and length of the register set for the device
8 - interrupts: Interrupts used by the dwc3 controller.
9 - usb-phy : array of phandle for the PHY device
10
11Optional properties:
12 - tx-fifo-resize: determines if the FIFO *has* to be reallocated.
13
14This is usually a subnode to DWC3 glue to which it is connected.
15
16dwc3@4a030000 {
17 compatible = "synopsys,dwc3";
18 reg = <0x4a030000 0xcfff>;
19 interrupts = <0 92 4>
20 usb-phy = <&usb2_phy>, <&usb3,phy>;
21 tx-fifo-resize;
22};
diff --git a/Documentation/devicetree/bindings/usb/ehci-orion.txt b/Documentation/devicetree/bindings/usb/ehci-orion.txt
new file mode 100644
index 000000000000..6bc09ec14c4d
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/ehci-orion.txt
@@ -0,0 +1,15 @@
1* EHCI controller, Orion Marvell variants
2
3Required properties:
4- compatible: must be "marvell,orion-ehci"
5- reg: physical base address of the controller and length of memory mapped
6 region.
7- interrupts: The EHCI interrupt
8
9Example:
10
11 ehci@50000 {
12 compatible = "marvell,orion-ehci";
13 reg = <0x50000 0x1000>;
14 interrupts = <19>;
15 };
diff --git a/Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt b/Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt
index e9b005dc7625..34c952883276 100644
--- a/Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt
+++ b/Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt
@@ -11,6 +11,7 @@ Required properties :
11 - phy_type : Should be one of "ulpi" or "utmi". 11 - phy_type : Should be one of "ulpi" or "utmi".
12 - nvidia,vbus-gpio : If present, specifies a gpio that needs to be 12 - nvidia,vbus-gpio : If present, specifies a gpio that needs to be
13 activated for the bus to be powered. 13 activated for the bus to be powered.
14 - nvidia,phy : phandle of the PHY instance, the controller is connected to.
14 15
15Required properties for phy_type == ulpi: 16Required properties for phy_type == ulpi:
16 - nvidia,phy-reset-gpio : The GPIO used to reset the PHY. 17 - nvidia,phy-reset-gpio : The GPIO used to reset the PHY.
@@ -27,3 +28,5 @@ Optional properties:
27 registers are accessed through the APB_MISC base address instead of 28 registers are accessed through the APB_MISC base address instead of
28 the USB controller. Since this is a legacy issue it probably does not 29 the USB controller. Since this is a legacy issue it probably does not
29 warrant a compatible string of its own. 30 warrant a compatible string of its own.
31 - nvidia,needs-double-reset : boolean is to be set for some of the Tegra2
32 USB ports, which need reset twice due to hardware issues.
diff --git a/Documentation/devicetree/bindings/usb/nvidia,tegra20-usb-phy.txt b/Documentation/devicetree/bindings/usb/nvidia,tegra20-usb-phy.txt
new file mode 100644
index 000000000000..6bdaba2f0aa1
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/nvidia,tegra20-usb-phy.txt
@@ -0,0 +1,17 @@
1Tegra SOC USB PHY
2
3The device node for Tegra SOC USB PHY:
4
5Required properties :
6 - compatible : Should be "nvidia,tegra20-usb-phy".
7 - reg : Address and length of the register set for the USB PHY interface.
8 - phy_type : Should be one of "ulpi" or "utmi".
9
10Required properties for phy_type == ulpi:
11 - nvidia,phy-reset-gpio : The GPIO used to reset the PHY.
12
13Optional properties:
14 - nvidia,has-legacy-mode : boolean indicates whether this controller can
15 operate in legacy mode (as APX 2500 / 2600). In legacy mode some
16 registers are accessed through the APB_MISC base address instead of
17 the USB controller. \ No newline at end of file
diff --git a/Documentation/devicetree/bindings/usb/omap-usb.txt b/Documentation/devicetree/bindings/usb/omap-usb.txt
index 29a043ecda52..1ef0ce71f8fa 100644
--- a/Documentation/devicetree/bindings/usb/omap-usb.txt
+++ b/Documentation/devicetree/bindings/usb/omap-usb.txt
@@ -1,8 +1,11 @@
1OMAP GLUE 1OMAP GLUE AND OTHER OMAP SPECIFIC COMPONENTS
2 2
3OMAP MUSB GLUE 3OMAP MUSB GLUE
4 - compatible : Should be "ti,omap4-musb" or "ti,omap3-musb" 4 - compatible : Should be "ti,omap4-musb" or "ti,omap3-musb"
5 - ti,hwmods : must be "usb_otg_hs" 5 - ti,hwmods : must be "usb_otg_hs"
6 - ti,has-mailbox : to specify that omap uses an external mailbox
7 (in control module) to communicate with the musb core during device connect
8 and disconnect.
6 - multipoint : Should be "1" indicating the musb controller supports 9 - multipoint : Should be "1" indicating the musb controller supports
7 multipoint. This is a MUSB configuration-specific setting. 10 multipoint. This is a MUSB configuration-specific setting.
8 - num_eps : Specifies the number of endpoints. This is also a 11 - num_eps : Specifies the number of endpoints. This is also a
@@ -16,13 +19,19 @@ OMAP MUSB GLUE
16 - power : Should be "50". This signifies the controller can supply upto 19 - power : Should be "50". This signifies the controller can supply upto
17 100mA when operating in host mode. 20 100mA when operating in host mode.
18 21
22Optional properties:
23 - ctrl-module : phandle of the control module this glue uses to write to
24 mailbox
25
19SOC specific device node entry 26SOC specific device node entry
20usb_otg_hs: usb_otg_hs@4a0ab000 { 27usb_otg_hs: usb_otg_hs@4a0ab000 {
21 compatible = "ti,omap4-musb"; 28 compatible = "ti,omap4-musb";
22 ti,hwmods = "usb_otg_hs"; 29 ti,hwmods = "usb_otg_hs";
30 ti,has-mailbox;
23 multipoint = <1>; 31 multipoint = <1>;
24 num_eps = <16>; 32 num_eps = <16>;
25 ram_bits = <12>; 33 ram_bits = <12>;
34 ctrl-module = <&omap_control_usb>;
26}; 35};
27 36
28Board specific device node entry 37Board specific device node entry
@@ -31,3 +40,26 @@ Board specific device node entry
31 mode = <3>; 40 mode = <3>;
32 power = <50>; 41 power = <50>;
33}; 42};
43
44OMAP CONTROL USB
45
46Required properties:
47 - compatible: Should be "ti,omap-control-usb"
48 - reg : Address and length of the register set for the device. It contains
49 the address of "control_dev_conf" and "otghs_control" or "phy_power_usb"
50 depending upon omap4 or omap5.
51 - reg-names: The names of the register addresses corresponding to the registers
52 filled in "reg".
53 - ti,type: This is used to differentiate whether the control module has
54 usb mailbox or usb3 phy power. omap4 has usb mailbox in control module to
55 notify events to the musb core and omap5 has usb3 phy power register to
56 power on usb3 phy. Should be "1" if it has mailbox and "2" if it has usb3
57 phy power.
58
59omap_control_usb: omap-control-usb@4a002300 {
60 compatible = "ti,omap-control-usb";
61 reg = <0x4a002300 0x4>,
62 <0x4a00233c 0x4>;
63 reg-names = "control_dev_conf", "otghs_control";
64 ti,type = <1>;
65};
diff --git a/Documentation/devicetree/bindings/usb/samsung-usbphy.txt b/Documentation/devicetree/bindings/usb/samsung-usbphy.txt
new file mode 100644
index 000000000000..033194934f64
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/samsung-usbphy.txt
@@ -0,0 +1,55 @@
1* Samsung's usb phy transceiver
2
3The Samsung's phy transceiver is used for controlling usb phy for
4s3c-hsotg as well as ehci-s5p and ohci-exynos usb controllers
5across Samsung SOCs.
6TODO: Adding the PHY binding with controller(s) according to the under
7developement generic PHY driver.
8
9Required properties:
10
11Exynos4210:
12- compatible : should be "samsung,exynos4210-usbphy"
13- reg : base physical address of the phy registers and length of memory mapped
14 region.
15
16Exynos5250:
17- compatible : should be "samsung,exynos5250-usbphy"
18- reg : base physical address of the phy registers and length of memory mapped
19 region.
20
21Optional properties:
22- #address-cells: should be '1' when usbphy node has a child node with 'reg'
23 property.
24- #size-cells: should be '1' when usbphy node has a child node with 'reg'
25 property.
26- ranges: allows valid translation between child's address space and parent's
27 address space.
28
29- The child node 'usbphy-sys' to the node 'usbphy' is for the system controller
30 interface for usb-phy. It should provide the following information required by
31 usb-phy controller to control phy.
32 - reg : base physical address of PHY_CONTROL registers.
33 The size of this register is the total sum of size of all PHY_CONTROL
34 registers that the SoC has. For example, the size will be
35 '0x4' in case we have only one PHY_CONTROL register (e.g.
36 OTHERS register in S3C64XX or USB_PHY_CONTROL register in S5PV210)
37 and, '0x8' in case we have two PHY_CONTROL registers (e.g.
38 USBDEVICE_PHY_CONTROL and USBHOST_PHY_CONTROL registers in exynos4x).
39 and so on.
40
41Example:
42 - Exynos4210
43
44 usbphy@125B0000 {
45 #address-cells = <1>;
46 #size-cells = <1>;
47 compatible = "samsung,exynos4210-usbphy";
48 reg = <0x125B0000 0x100>;
49 ranges;
50
51 usbphy-sys {
52 /* USB device and host PHY_CONTROL registers */
53 reg = <0x10020704 0x8>;
54 };
55 };
diff --git a/Documentation/devicetree/bindings/usb/usb-phy.txt b/Documentation/devicetree/bindings/usb/usb-phy.txt
index 80d4148cb661..61496f5cb095 100644
--- a/Documentation/devicetree/bindings/usb/usb-phy.txt
+++ b/Documentation/devicetree/bindings/usb/usb-phy.txt
@@ -4,14 +4,39 @@ OMAP USB2 PHY
4 4
5Required properties: 5Required properties:
6 - compatible: Should be "ti,omap-usb2" 6 - compatible: Should be "ti,omap-usb2"
7 - reg : Address and length of the register set for the device. Also 7 - reg : Address and length of the register set for the device.
8add the address of control module dev conf register until a driver for 8
9control module is added 9Optional properties:
10 - ctrl-module : phandle of the control module used by PHY driver to power on
11 the PHY.
10 12
11This is usually a subnode of ocp2scp to which it is connected. 13This is usually a subnode of ocp2scp to which it is connected.
12 14
13usb2phy@4a0ad080 { 15usb2phy@4a0ad080 {
14 compatible = "ti,omap-usb2"; 16 compatible = "ti,omap-usb2";
15 reg = <0x4a0ad080 0x58>, 17 reg = <0x4a0ad080 0x58>;
16 <0x4a002300 0x4>; 18 ctrl-module = <&omap_control_usb>;
19};
20
21OMAP USB3 PHY
22
23Required properties:
24 - compatible: Should be "ti,omap-usb3"
25 - reg : Address and length of the register set for the device.
26 - reg-names: The names of the register addresses corresponding to the registers
27 filled in "reg".
28
29Optional properties:
30 - ctrl-module : phandle of the control module used by PHY driver to power on
31 the PHY.
32
33This is usually a subnode of ocp2scp to which it is connected.
34
35usb3phy@4a084400 {
36 compatible = "ti,omap-usb3";
37 reg = <0x4a084400 0x80>,
38 <0x4a084800 0x64>,
39 <0x4a084c00 0x40>;
40 reg-names = "phy_rx", "phy_tx", "pll_ctrl";
41 ctrl-module = <&omap_control_usb>;
17}; 42};
diff --git a/Documentation/devicetree/bindings/usb/usb3503.txt b/Documentation/devicetree/bindings/usb/usb3503.txt
new file mode 100644
index 000000000000..6813a715fc7d
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/usb3503.txt
@@ -0,0 +1,20 @@
1SMSC USB3503 High-Speed Hub Controller
2
3Required properties:
4- compatible: Should be "smsc,usb3503".
5- reg: Specifies the i2c slave address, it should be 0x08.
6- connect-gpios: Should specify GPIO for connect.
7- intn-gpios: Should specify GPIO for interrupt.
8- reset-gpios: Should specify GPIO for reset.
9- initial-mode: Should specify initial mode.
10 (1 for HUB mode, 2 for STANDBY mode)
11
12Examples:
13 usb3503@08 {
14 compatible = "smsc,usb3503";
15 reg = <0x08>;
16 connect-gpios = <&gpx3 0 1>;
17 intn-gpios = <&gpx3 4 1>;
18 reset-gpios = <&gpx3 5 1>;
19 initial-mode = <1>;
20 };
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 9de2b9ff9d6e..19e1ef73ab0d 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -5,6 +5,7 @@ using them to avoid name-space collisions.
5 5
6ad Avionic Design GmbH 6ad Avionic Design GmbH
7adi Analog Devices, Inc. 7adi Analog Devices, Inc.
8ak Asahi Kasei Corp.
8amcc Applied Micro Circuits Corporation (APM, formally AMCC) 9amcc Applied Micro Circuits Corporation (APM, formally AMCC)
9apm Applied Micro Circuits Corporation (APM) 10apm Applied Micro Circuits Corporation (APM)
10arm ARM Ltd. 11arm ARM Ltd.
@@ -13,6 +14,7 @@ bosch Bosch Sensortec GmbH
13brcm Broadcom Corporation 14brcm Broadcom Corporation
14cavium Cavium, Inc. 15cavium Cavium, Inc.
15chrp Common Hardware Reference Platform 16chrp Common Hardware Reference Platform
17cirrus Cirrus Logic, Inc.
16cortina Cortina Systems, Inc. 18cortina Cortina Systems, Inc.
17dallas Maxim Integrated Products (formerly Dallas Semiconductor) 19dallas Maxim Integrated Products (formerly Dallas Semiconductor)
18denx Denx Software Engineering 20denx Denx Software Engineering
@@ -25,6 +27,7 @@ gef GE Fanuc Intelligent Platforms Embedded Systems, Inc.
25hp Hewlett Packard 27hp Hewlett Packard
26ibm International Business Machines (IBM) 28ibm International Business Machines (IBM)
27idt Integrated Device Technologies, Inc. 29idt Integrated Device Technologies, Inc.
30img Imagination Technologies Ltd.
28intercontrol Inter Control Group 31intercontrol Inter Control Group
29linux Linux-specific binding 32linux Linux-specific binding
30marvell Marvell Technology Group Ltd. 33marvell Marvell Technology Group Ltd.
@@ -34,21 +37,27 @@ national National Semiconductor
34nintendo Nintendo 37nintendo Nintendo
35nvidia NVIDIA 38nvidia NVIDIA
36nxp NXP Semiconductors 39nxp NXP Semiconductors
40onnn ON Semiconductor Corp.
37picochip Picochip Ltd 41picochip Picochip Ltd
38powervr Imagination Technologies 42powervr PowerVR (deprecated, use img)
39qcom Qualcomm, Inc. 43qcom Qualcomm, Inc.
40ramtron Ramtron International 44ramtron Ramtron International
41realtek Realtek Semiconductor Corp. 45realtek Realtek Semiconductor Corp.
46renesas Renesas Electronics Corporation
42samsung Samsung Semiconductor 47samsung Samsung Semiconductor
43sbs Smart Battery System 48sbs Smart Battery System
44schindler Schindler 49schindler Schindler
45sil Silicon Image 50sil Silicon Image
46simtek 51simtek
47sirf SiRF Technology, Inc. 52sirf SiRF Technology, Inc.
53snps Synopsys, Inc.
48st STMicroelectronics 54st STMicroelectronics
55ste ST-Ericsson
49stericsson ST-Ericsson 56stericsson ST-Ericsson
50ti Texas Instruments 57ti Texas Instruments
58toshiba Toshiba Corporation
51via VIA Technologies, Inc. 59via VIA Technologies, Inc.
52wlf Wolfson Microelectronics 60wlf Wolfson Microelectronics
53wm Wondermedia Technologies, Inc. 61wm Wondermedia Technologies, Inc.
62winbond Winbond Electronics corp.
54xlnx Xilinx 63xlnx Xilinx
diff --git a/Documentation/devicetree/bindings/video/backlight/max8925-backlight.txt b/Documentation/devicetree/bindings/video/backlight/max8925-backlight.txt
new file mode 100644
index 000000000000..b4cffdaa4137
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/backlight/max8925-backlight.txt
@@ -0,0 +1,10 @@
188pm860x-backlight bindings
2
3Optional properties:
4 - maxim,max8925-dual-string: whether support dual string
5
6Example:
7
8 backlights {
9 maxim,max8925-dual-string = <0>;
10 };
diff --git a/Documentation/devicetree/bindings/video/display-timing.txt b/Documentation/devicetree/bindings/video/display-timing.txt
new file mode 100644
index 000000000000..150038552bc3
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/display-timing.txt
@@ -0,0 +1,109 @@
1display-timing bindings
2=======================
3
4display-timings node
5--------------------
6
7required properties:
8 - none
9
10optional properties:
11 - native-mode: The native mode for the display, in case multiple modes are
12 provided. When omitted, assume the first node is the native.
13
14timing subnode
15--------------
16
17required properties:
18 - hactive, vactive: display resolution
19 - hfront-porch, hback-porch, hsync-len: horizontal display timing parameters
20 in pixels
21 vfront-porch, vback-porch, vsync-len: vertical display timing parameters in
22 lines
23 - clock-frequency: display clock in Hz
24
25optional properties:
26 - hsync-active: hsync pulse is active low/high/ignored
27 - vsync-active: vsync pulse is active low/high/ignored
28 - de-active: data-enable pulse is active low/high/ignored
29 - pixelclk-active: with
30 - active high = drive pixel data on rising edge/
31 sample data on falling edge
32 - active low = drive pixel data on falling edge/
33 sample data on rising edge
34 - ignored = ignored
35 - interlaced (bool): boolean to enable interlaced mode
36 - doublescan (bool): boolean to enable doublescan mode
37
38All the optional properties that are not bool follow the following logic:
39 <1>: high active
40 <0>: low active
41 omitted: not used on hardware
42
43There are different ways of describing the capabilities of a display. The
44devicetree representation corresponds to the one commonly found in datasheets
45for displays. If a display supports multiple signal timings, the native-mode
46can be specified.
47
48The parameters are defined as:
49
50 +----------+-------------------------------------+----------+-------+
51 | | ↑ | | |
52 | | |vback_porch | | |
53 | | ↓ | | |
54 +----------#######################################----------+-------+
55 | # ↑ # | |
56 | # | # | |
57 | hback # | # hfront | hsync |
58 | porch # | hactive # porch | len |
59 |<-------->#<-------+--------------------------->#<-------->|<----->|
60 | # | # | |
61 | # |vactive # | |
62 | # | # | |
63 | # ↓ # | |
64 +----------#######################################----------+-------+
65 | | ↑ | | |
66 | | |vfront_porch | | |
67 | | ↓ | | |
68 +----------+-------------------------------------+----------+-------+
69 | | ↑ | | |
70 | | |vsync_len | | |
71 | | ↓ | | |
72 +----------+-------------------------------------+----------+-------+
73
74Example:
75
76 display-timings {
77 native-mode = <&timing0>;
78 timing0: 1080p24 {
79 /* 1920x1080p24 */
80 clock-frequency = <52000000>;
81 hactive = <1920>;
82 vactive = <1080>;
83 hfront-porch = <25>;
84 hback-porch = <25>;
85 hsync-len = <25>;
86 vback-porch = <2>;
87 vfront-porch = <2>;
88 vsync-len = <2>;
89 hsync-active = <1>;
90 };
91 };
92
93Every required property also supports the use of ranges, so the commonly used
94datasheet description with minimum, typical and maximum values can be used.
95
96Example:
97
98 timing1: timing {
99 /* 1920x1080p24 */
100 clock-frequency = <148500000>;
101 hactive = <1920>;
102 vactive = <1080>;
103 hsync-len = <0 44 60>;
104 hfront-porch = <80 88 95>;
105 hback-porch = <100 148 160>;
106 vfront-porch = <0 4 6>;
107 vback-porch = <0 36 50>;
108 vsync-len = <0 5 6>;
109 };
diff --git a/Documentation/devicetree/bindings/video/exynos_dp.txt b/Documentation/devicetree/bindings/video/exynos_dp.txt
new file mode 100644
index 000000000000..c60da67a5d76
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/exynos_dp.txt
@@ -0,0 +1,80 @@
1The Exynos display port interface should be configured based on
2the type of panel connected to it.
3
4We use two nodes:
5 -dp-controller node
6 -dptx-phy node(defined inside dp-controller node)
7
8For the DP-PHY initialization, we use the dptx-phy node.
9Required properties for dptx-phy:
10 -reg:
11 Base address of DP PHY register.
12 -samsung,enable-mask:
13 The bit-mask used to enable/disable DP PHY.
14
15For the Panel initialization, we read data from dp-controller node.
16Required properties for dp-controller:
17 -compatible:
18 should be "samsung,exynos5-dp".
19 -reg:
20 physical base address of the controller and length
21 of memory mapped region.
22 -interrupts:
23 interrupt combiner values.
24 -interrupt-parent:
25 phandle to Interrupt combiner node.
26 -samsung,color-space:
27 input video data format.
28 COLOR_RGB = 0, COLOR_YCBCR422 = 1, COLOR_YCBCR444 = 2
29 -samsung,dynamic-range:
30 dynamic range for input video data.
31 VESA = 0, CEA = 1
32 -samsung,ycbcr-coeff:
33 YCbCr co-efficients for input video.
34 COLOR_YCBCR601 = 0, COLOR_YCBCR709 = 1
35 -samsung,color-depth:
36 number of bits per colour component.
37 COLOR_6 = 0, COLOR_8 = 1, COLOR_10 = 2, COLOR_12 = 3
38 -samsung,link-rate:
39 link rate supported by the panel.
40 LINK_RATE_1_62GBPS = 0x6, LINK_RATE_2_70GBPS = 0x0A
41 -samsung,lane-count:
42 number of lanes supported by the panel.
43 LANE_COUNT1 = 1, LANE_COUNT2 = 2, LANE_COUNT4 = 4
44
45Optional properties for dp-controller:
46 -interlaced:
47 interlace scan mode.
48 Progressive if defined, Interlaced if not defined
49 -vsync-active-high:
50 VSYNC polarity configuration.
51 High if defined, Low if not defined
52 -hsync-active-high:
53 HSYNC polarity configuration.
54 High if defined, Low if not defined
55
56Example:
57
58SOC specific portion:
59 dp-controller {
60 compatible = "samsung,exynos5-dp";
61 reg = <0x145b0000 0x10000>;
62 interrupts = <10 3>;
63 interrupt-parent = <&combiner>;
64
65 dptx-phy {
66 reg = <0x10040720>;
67 samsung,enable-mask = <1>;
68 };
69
70 };
71
72Board Specific portion:
73 dp-controller {
74 samsung,color-space = <0>;
75 samsung,dynamic-range = <0>;
76 samsung,ycbcr-coeff = <0>;
77 samsung,color-depth = <1>;
78 samsung,link-rate = <0x0a>;
79 samsung,lane-count = <4>;
80 };
diff --git a/Documentation/devicetree/bindings/video/ssd1307fb.txt b/Documentation/devicetree/bindings/video/ssd1307fb.txt
new file mode 100644
index 000000000000..3d0060cff062
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/ssd1307fb.txt
@@ -0,0 +1,24 @@
1* Solomon SSD1307 Framebuffer Driver
2
3Required properties:
4 - compatible: Should be "solomon,ssd1307fb-<bus>". The only supported bus for
5 now is i2c.
6 - reg: Should contain address of the controller on the I2C bus. Most likely
7 0x3c or 0x3d
8 - pwm: Should contain the pwm to use according to the OF device tree PWM
9 specification [0]
10 - reset-gpios: Should contain the GPIO used to reset the OLED display
11
12Optional properties:
13 - reset-active-low: Is the reset gpio is active on physical low?
14
15[0]: Documentation/devicetree/bindings/pwm/pwm.txt
16
17Examples:
18ssd1307: oled@3c {
19 compatible = "solomon,ssd1307fb-i2c";
20 reg = <0x3c>;
21 pwms = <&pwm 4 3000>;
22 reset-gpios = <&gpio2 7>;
23 reset-active-low;
24};
diff --git a/Documentation/devicetree/bindings/w1/fsl-imx-owire.txt b/Documentation/devicetree/bindings/w1/fsl-imx-owire.txt
new file mode 100644
index 000000000000..ecf42c07684d
--- /dev/null
+++ b/Documentation/devicetree/bindings/w1/fsl-imx-owire.txt
@@ -0,0 +1,19 @@
1* Freescale i.MX One wire bus master controller
2
3Required properties:
4- compatible : should be "fsl,imx21-owire"
5- reg : Address and length of the register set for the device
6
7Optional properties:
8- clocks : phandle of clock that supplies the module (required if platform
9 clock bindings use device tree)
10
11Example:
12
13- From imx53.dtsi:
14owire: owire@63fa4000 {
15 compatible = "fsl,imx53-owire", "fsl,imx21-owire";
16 reg = <0x63fa4000 0x4000>;
17 clocks = <&clks 159>;
18 status = "disabled";
19};
diff --git a/Documentation/devicetree/bindings/watchdog/atmel-at91rm9200-wdt.txt b/Documentation/devicetree/bindings/watchdog/atmel-at91rm9200-wdt.txt
new file mode 100644
index 000000000000..d4d86cf8f9eb
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/atmel-at91rm9200-wdt.txt
@@ -0,0 +1,9 @@
1Atmel AT91RM9200 System Timer Watchdog
2
3Required properties:
4- compatible: must be "atmel,at91sam9260-wdt".
5
6Example:
7 watchdog@fffffd00 {
8 compatible = "atmel,at91rm9200-wdt";
9 };
diff --git a/Documentation/devicetree/bindings/watchdog/atmel-wdt.txt b/Documentation/devicetree/bindings/watchdog/atmel-wdt.txt
new file mode 100644
index 000000000000..fcdd48f7dcff
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/atmel-wdt.txt
@@ -0,0 +1,19 @@
1* Atmel Watchdog Timers
2
3** at91sam9-wdt
4
5Required properties:
6- compatible: must be "atmel,at91sam9260-wdt".
7- reg: physical base address of the controller and length of memory mapped
8 region.
9
10Optional properties:
11- timeout-sec: contains the watchdog timeout in seconds.
12
13Example:
14
15 watchdog@fffffd40 {
16 compatible = "atmel,at91sam9260-wdt";
17 reg = <0xfffffd40 0x10>;
18 timeout-sec = <10>;
19 };
diff --git a/Documentation/devicetree/bindings/watchdog/brcm,bcm2835-pm-wdog.txt b/Documentation/devicetree/bindings/watchdog/brcm,bcm2835-pm-wdog.txt
new file mode 100644
index 000000000000..d209366b4a69
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/brcm,bcm2835-pm-wdog.txt
@@ -0,0 +1,13 @@
1BCM2835 Watchdog timer
2
3Required properties:
4
5- compatible : should be "brcm,bcm2835-pm-wdt"
6- reg : Specifies base physical address and size of the registers.
7
8Example:
9
10watchdog {
11 compatible = "brcm,bcm2835-pm-wdt";
12 reg = <0x7e100000 0x28>;
13};
diff --git a/Documentation/devicetree/bindings/watchdog/davinci-wdt.txt b/Documentation/devicetree/bindings/watchdog/davinci-wdt.txt
new file mode 100644
index 000000000000..75558ccd9a05
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/davinci-wdt.txt
@@ -0,0 +1,12 @@
1DaVinci Watchdog Timer (WDT) Controller
2
3Required properties:
4- compatible : Should be "ti,davinci-wdt"
5- reg : Should contain WDT registers location and length
6
7Examples:
8
9wdt: wdt@2320000 {
10 compatible = "ti,davinci-wdt";
11 reg = <0x02320000 0x80>;
12};
diff --git a/Documentation/devicetree/bindings/watchdog/marvel.txt b/Documentation/devicetree/bindings/watchdog/marvel.txt
index 0b2503ab0a05..5dc8d30061ce 100644
--- a/Documentation/devicetree/bindings/watchdog/marvel.txt
+++ b/Documentation/devicetree/bindings/watchdog/marvel.txt
@@ -5,10 +5,15 @@ Required Properties:
5- Compatibility : "marvell,orion-wdt" 5- Compatibility : "marvell,orion-wdt"
6- reg : Address of the timer registers 6- reg : Address of the timer registers
7 7
8Optional properties:
9
10- timeout-sec : Contains the watchdog timeout in seconds
11
8Example: 12Example:
9 13
10 wdt@20300 { 14 wdt@20300 {
11 compatible = "marvell,orion-wdt"; 15 compatible = "marvell,orion-wdt";
12 reg = <0x20300 0x28>; 16 reg = <0x20300 0x28>;
17 timeout-sec = <10>;
13 status = "okay"; 18 status = "okay";
14 }; 19 };
diff --git a/Documentation/devicetree/bindings/watchdog/pnx4008-wdt.txt b/Documentation/devicetree/bindings/watchdog/pnx4008-wdt.txt
index 7c7f6887c796..556d06c17c92 100644
--- a/Documentation/devicetree/bindings/watchdog/pnx4008-wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/pnx4008-wdt.txt
@@ -5,9 +5,13 @@ Required properties:
5- reg: physical base address of the controller and length of memory mapped 5- reg: physical base address of the controller and length of memory mapped
6 region. 6 region.
7 7
8Optional properties:
9- timeout-sec: contains the watchdog timeout in seconds.
10
8Example: 11Example:
9 12
10 watchdog@4003C000 { 13 watchdog@4003C000 {
11 compatible = "nxp,pnx4008-wdt"; 14 compatible = "nxp,pnx4008-wdt";
12 reg = <0x4003C000 0x1000>; 15 reg = <0x4003C000 0x1000>;
16 timeout-sec = <10>;
13 }; 17 };
diff --git a/Documentation/devicetree/bindings/watchdog/qca-ar7130-wdt.txt b/Documentation/devicetree/bindings/watchdog/qca-ar7130-wdt.txt
new file mode 100644
index 000000000000..7a89e5f85415
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/qca-ar7130-wdt.txt
@@ -0,0 +1,13 @@
1* Qualcomm Atheros AR7130 Watchdog Timer (WDT) Controller
2
3Required properties:
4- compatible: must be "qca,ar7130-wdt"
5- reg: physical base address of the controller and length of memory mapped
6 region.
7
8Example:
9
10wdt@18060008 {
11 compatible = "qca,ar9330-wdt", "qca,ar7130-wdt";
12 reg = <0x18060008 0x8>;
13};
diff --git a/Documentation/devicetree/bindings/watchdog/samsung-wdt.txt b/Documentation/devicetree/bindings/watchdog/samsung-wdt.txt
index 79ead8263ae4..2aa486cc1ff6 100644
--- a/Documentation/devicetree/bindings/watchdog/samsung-wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/samsung-wdt.txt
@@ -2,10 +2,13 @@
2 2
3The Samsung's Watchdog controller is used for resuming system operation 3The Samsung's Watchdog controller is used for resuming system operation
4after a preset amount of time during which the WDT reset event has not 4after a preset amount of time during which the WDT reset event has not
5occured. 5occurred.
6 6
7Required properties: 7Required properties:
8- compatible : should be "samsung,s3c2410-wdt" 8- compatible : should be "samsung,s3c2410-wdt"
9- reg : base physical address of the controller and length of memory mapped 9- reg : base physical address of the controller and length of memory mapped
10 region. 10 region.
11- interrupts : interrupt number to the cpu. 11- interrupts : interrupt number to the cpu.
12
13Optional properties:
14- timeout-sec : contains the watchdog timeout in seconds.
diff --git a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
new file mode 100644
index 000000000000..0b2717775600
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
@@ -0,0 +1,13 @@
1Allwinner sunXi Watchdog timer
2
3Required properties:
4
5- compatible : should be "allwinner,sunxi-wdt"
6- reg : Specifies base physical address and size of the registers.
7
8Example:
9
10wdt: watchdog@01c20c90 {
11 compatible = "allwinner,sunxi-wdt";
12 reg = <0x01c20c90 0x10>;
13};
diff --git a/Documentation/devicetree/bindings/watchdog/twl4030-wdt.txt b/Documentation/devicetree/bindings/watchdog/twl4030-wdt.txt
new file mode 100644
index 000000000000..80a37193c0b8
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/twl4030-wdt.txt
@@ -0,0 +1,10 @@
1Device tree bindings for twl4030-wdt driver (TWL4030 watchdog)
2
3Required properties:
4 compatible = "ti,twl4030-wdt";
5
6Example:
7
8watchdog {
9 compatible = "ti,twl4030-wdt";
10};
diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
index d4d66757354e..b2fb2f5e1922 100644
--- a/Documentation/devicetree/booting-without-of.txt
+++ b/Documentation/devicetree/booting-without-of.txt
@@ -1228,7 +1228,7 @@ hierarchy and routing of interrupts in the hardware.
1228The interrupt tree model is fully described in the 1228The interrupt tree model is fully described in the
1229document "Open Firmware Recommended Practice: Interrupt 1229document "Open Firmware Recommended Practice: Interrupt
1230Mapping Version 0.9". The document is available at: 1230Mapping Version 0.9". The document is available at:
1231<http://playground.sun.com/1275/practice>. 1231<http://www.openfirmware.org/ofwg/practice/>
1232 1232
12331) interrupts property 12331) interrupts property
1234---------------------- 1234----------------------
diff --git a/Documentation/devicetree/usage-model.txt b/Documentation/devicetree/usage-model.txt
index dca90fe22a90..ef9d06c9f8fd 100644
--- a/Documentation/devicetree/usage-model.txt
+++ b/Documentation/devicetree/usage-model.txt
@@ -347,7 +347,7 @@ later), which will happily live at the base of the Linux /sys/devices
347tree. Therefore, if a DT node is at the root of the tree, then it 347tree. Therefore, if a DT node is at the root of the tree, then it
348really probably is best registered as a platform_device. 348really probably is best registered as a platform_device.
349 349
350Linux board support code calls of_platform_populate(NULL, NULL, NULL) 350Linux board support code calls of_platform_populate(NULL, NULL, NULL, NULL)
351to kick off discovery of devices at the root of the tree. The 351to kick off discovery of devices at the root of the tree. The
352parameters are all NULL because when starting from the root of the 352parameters are all NULL because when starting from the root of the
353tree, there is no need to provide a starting node (the first NULL), a 353tree, there is no need to provide a starting node (the first NULL), a
diff --git a/Documentation/dma-buf-sharing.txt b/Documentation/dma-buf-sharing.txt
index ad86fb86c9a0..4966b1be42ac 100644
--- a/Documentation/dma-buf-sharing.txt
+++ b/Documentation/dma-buf-sharing.txt
@@ -302,7 +302,11 @@ Access to a dma_buf from the kernel context involves three steps:
302 void dma_buf_vunmap(struct dma_buf *dmabuf, void *vaddr) 302 void dma_buf_vunmap(struct dma_buf *dmabuf, void *vaddr)
303 303
304 The vmap call can fail if there is no vmap support in the exporter, or if it 304 The vmap call can fail if there is no vmap support in the exporter, or if it
305 runs out of vmalloc space. Fallback to kmap should be implemented. 305 runs out of vmalloc space. Fallback to kmap should be implemented. Note that
306 the dma-buf layer keeps a reference count for all vmap access and calls down
307 into the exporter's vmap function only when no vmapping exists, and only
308 unmaps it once. Protection against concurrent vmap/vunmap calls is provided
309 by taking the dma_buf->lock mutex.
306 310
3073. Finish access 3113. Finish access
308 312
@@ -376,7 +380,7 @@ Being able to mmap an export dma-buf buffer object has 2 main use-cases:
376 leaving the cpu domain and flushing caches at fault time. Note that all the 380 leaving the cpu domain and flushing caches at fault time. Note that all the
377 dma_buf files share the same anon inode, hence the exporter needs to replace 381 dma_buf files share the same anon inode, hence the exporter needs to replace
378 the dma_buf file stored in vma->vm_file with it's own if pte shootdown is 382 the dma_buf file stored in vma->vm_file with it's own if pte shootdown is
379 requred. This is because the kernel uses the underlying inode's address_space 383 required. This is because the kernel uses the underlying inode's address_space
380 for vma tracking (and hence pte tracking at shootdown time with 384 for vma tracking (and hence pte tracking at shootdown time with
381 unmap_mapping_range). 385 unmap_mapping_range).
382 386
@@ -388,7 +392,7 @@ Being able to mmap an export dma-buf buffer object has 2 main use-cases:
388 Exporters that shoot down mappings (for any reasons) shall not do any 392 Exporters that shoot down mappings (for any reasons) shall not do any
389 synchronization at fault time with outstanding device operations. 393 synchronization at fault time with outstanding device operations.
390 Synchronization is an orthogonal issue to sharing the backing storage of a 394 Synchronization is an orthogonal issue to sharing the backing storage of a
391 buffer and hence should not be handled by dma-buf itself. This is explictly 395 buffer and hence should not be handled by dma-buf itself. This is explicitly
392 mentioned here because many people seem to want something like this, but if 396 mentioned here because many people seem to want something like this, but if
393 different exporters handle this differently, buffer sharing can fail in 397 different exporters handle this differently, buffer sharing can fail in
394 interesting ways depending upong the exporter (if userspace starts depending 398 interesting ways depending upong the exporter (if userspace starts depending
diff --git a/Documentation/dontdiff b/Documentation/dontdiff
index 74c25c8d8884..b89a739a3276 100644
--- a/Documentation/dontdiff
+++ b/Documentation/dontdiff
@@ -181,7 +181,6 @@ modversions.h*
181nconf 181nconf
182ncscope.* 182ncscope.*
183offset.h 183offset.h
184offsets.h
185oui.c* 184oui.c*
186page-types 185page-types
187parse.c 186parse.c
diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver-model/devres.txt
index 43cff70465ab..b4671459857f 100644
--- a/Documentation/driver-model/devres.txt
+++ b/Documentation/driver-model/devres.txt
@@ -266,7 +266,8 @@ IOMAP
266 devm_ioremap() 266 devm_ioremap()
267 devm_ioremap_nocache() 267 devm_ioremap_nocache()
268 devm_iounmap() 268 devm_iounmap()
269 devm_request_and_ioremap() : checks resource, requests region, ioremaps 269 devm_ioremap_resource() : checks resource, requests memory region, ioremaps
270 devm_request_and_ioremap() : obsoleted by devm_ioremap_resource()
270 pcim_iomap() 271 pcim_iomap()
271 pcim_iounmap() 272 pcim_iounmap()
272 pcim_iomap_table() : array of mapped addresses indexed by BAR 273 pcim_iomap_table() : array of mapped addresses indexed by BAR
@@ -288,3 +289,7 @@ PINCTRL
288PWM 289PWM
289 devm_pwm_get() 290 devm_pwm_get()
290 devm_pwm_put() 291 devm_pwm_put()
292
293PHY
294 devm_usb_get_phy()
295 devm_usb_put_phy()
diff --git a/Documentation/dvb/get_dvb_firmware b/Documentation/dvb/get_dvb_firmware
index 32bc56b13b1c..5d5ee4c13fa6 100755
--- a/Documentation/dvb/get_dvb_firmware
+++ b/Documentation/dvb/get_dvb_firmware
@@ -23,7 +23,7 @@ use IO::Handle;
23 23
24@components = ( "sp8870", "sp887x", "tda10045", "tda10046", 24@components = ( "sp8870", "sp887x", "tda10045", "tda10046",
25 "tda10046lifeview", "av7110", "dec2000t", "dec2540t", 25 "tda10046lifeview", "av7110", "dec2000t", "dec2540t",
26 "dec3000s", "vp7041", "dibusb", "nxt2002", "nxt2004", 26 "dec3000s", "vp7041", "vp7049", "dibusb", "nxt2002", "nxt2004",
27 "or51211", "or51132_qam", "or51132_vsb", "bluebird", 27 "or51211", "or51132_qam", "or51132_vsb", "bluebird",
28 "opera1", "cx231xx", "cx18", "cx23885", "pvrusb2", "mpc718", 28 "opera1", "cx231xx", "cx18", "cx23885", "pvrusb2", "mpc718",
29 "af9015", "ngene", "az6027", "lme2510_lg", "lme2510c_s7395", 29 "af9015", "ngene", "az6027", "lme2510_lg", "lme2510c_s7395",
@@ -289,6 +289,19 @@ sub vp7041 {
289 $outfile; 289 $outfile;
290} 290}
291 291
292sub vp7049 {
293 my $fwfile = "dvb-usb-vp7049-0.95.fw";
294 my $url = "http://ao2.it/sites/default/files/blog/2012/11/06/linux-support-digicom-digitune-s-vp7049-udtt7049/$fwfile";
295 my $hash = "5609fd295168aea88b25ff43a6f79c36";
296
297 checkstandard();
298
299 wgetfile($fwfile, $url);
300 verify($fwfile, $hash);
301
302 $fwfile;
303}
304
292sub dibusb { 305sub dibusb {
293 my $url = "http://www.linuxtv.org/downloads/firmware/dvb-usb-dibusb-5.0.0.11.fw"; 306 my $url = "http://www.linuxtv.org/downloads/firmware/dvb-usb-dibusb-5.0.0.11.fw";
294 my $outfile = "dvb-dibusb-5.0.0.11.fw"; 307 my $outfile = "dvb-dibusb-5.0.0.11.fw";
@@ -677,7 +690,7 @@ sub drxk_terratec_h5 {
677} 690}
678 691
679sub drxk_terratec_htc_stick { 692sub drxk_terratec_htc_stick {
680 my $url = "http://ftp.terratec.de/Receiver/Cinergy_HTC_Stick/Updates/"; 693 my $url = "http://ftp.terratec.de/Receiver/Cinergy_HTC_Stick/Updates/History/";
681 my $zipfile = "Cinergy_HTC_Stick_Drv_5.09.1202.00_XP_Vista_7.exe"; 694 my $zipfile = "Cinergy_HTC_Stick_Drv_5.09.1202.00_XP_Vista_7.exe";
682 my $hash = "6722a2442a05423b781721fbc069ed5e"; 695 my $hash = "6722a2442a05423b781721fbc069ed5e";
683 my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 0); 696 my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 0);
diff --git a/Documentation/dynamic-debug-howto.txt b/Documentation/dynamic-debug-howto.txt
index 6e1684981da2..72322c6d7352 100644
--- a/Documentation/dynamic-debug-howto.txt
+++ b/Documentation/dynamic-debug-howto.txt
@@ -6,8 +6,16 @@ This document describes how to use the dynamic debug (dyndbg) feature.
6 6
7Dynamic debug is designed to allow you to dynamically enable/disable 7Dynamic debug is designed to allow you to dynamically enable/disable
8kernel code to obtain additional kernel information. Currently, if 8kernel code to obtain additional kernel information. Currently, if
9CONFIG_DYNAMIC_DEBUG is set, then all pr_debug()/dev_dbg() calls can 9CONFIG_DYNAMIC_DEBUG is set, then all pr_debug()/dev_dbg() and
10be dynamically enabled per-callsite. 10print_hex_dump_debug()/print_hex_dump_bytes() calls can be dynamically
11enabled per-callsite.
12
13If CONFIG_DYNAMIC_DEBUG is not set, print_hex_dump_debug() is just
14shortcut for print_hex_dump(KERN_DEBUG).
15
16For print_hex_dump_debug()/print_hex_dump_bytes(), format string is
17its 'prefix_str' argument, if it is constant string; or "hexdump"
18in case 'prefix_str' is build dynamically.
11 19
12Dynamic debug has even more useful features: 20Dynamic debug has even more useful features:
13 21
@@ -202,6 +210,9 @@ The flags are:
202 t Include thread ID in messages not generated from interrupt context 210 t Include thread ID in messages not generated from interrupt context
203 _ No flags are set. (Or'd with others on input) 211 _ No flags are set. (Or'd with others on input)
204 212
213For print_hex_dump_debug() and print_hex_dump_bytes(), only 'p' flag
214have meaning, other flags ignored.
215
205For display, the flags are preceded by '=' 216For display, the flags are preceded by '='
206(mnemonic: what the flags are currently equal to). 217(mnemonic: what the flags are currently equal to).
207 218
diff --git a/Documentation/fault-injection/notifier-error-inject.txt b/Documentation/fault-injection/notifier-error-inject.txt
index c83526c364e5..09adabef513f 100644
--- a/Documentation/fault-injection/notifier-error-inject.txt
+++ b/Documentation/fault-injection/notifier-error-inject.txt
@@ -1,7 +1,7 @@
1Notifier error injection 1Notifier error injection
2======================== 2========================
3 3
4Notifier error injection provides the ability to inject artifical errors to 4Notifier error injection provides the ability to inject artificial errors to
5specified notifier chain callbacks. It is useful to test the error handling of 5specified notifier chain callbacks. It is useful to test the error handling of
6notifier call chain failures which is rarely executed. There are kernel 6notifier call chain failures which is rarely executed. There are kernel
7modules that can be used to test the following notifiers. 7modules that can be used to test the following notifiers.
@@ -14,7 +14,7 @@ modules that can be used to test the following notifiers.
14CPU notifier error injection module 14CPU notifier error injection module
15----------------------------------- 15-----------------------------------
16This feature can be used to test the error handling of the CPU notifiers by 16This feature can be used to test the error handling of the CPU notifiers by
17injecting artifical errors to CPU notifier chain callbacks. 17injecting artificial errors to CPU notifier chain callbacks.
18 18
19If the notifier call chain should be failed with some events notified, write 19If the notifier call chain should be failed with some events notified, write
20the error code to debugfs interface 20the error code to debugfs interface
diff --git a/Documentation/filesystems/00-INDEX b/Documentation/filesystems/00-INDEX
index 8c624a18f67d..8042050eb265 100644
--- a/Documentation/filesystems/00-INDEX
+++ b/Documentation/filesystems/00-INDEX
@@ -38,6 +38,8 @@ dnotify_test.c
38 - example program for dnotify 38 - example program for dnotify
39ecryptfs.txt 39ecryptfs.txt
40 - docs on eCryptfs: stacked cryptographic filesystem for Linux. 40 - docs on eCryptfs: stacked cryptographic filesystem for Linux.
41efivarfs.txt
42 - info for the efivarfs filesystem.
41exofs.txt 43exofs.txt
42 - info, usage, mount options, design about EXOFS. 44 - info, usage, mount options, design about EXOFS.
43ext2.txt 45ext2.txt
@@ -48,6 +50,8 @@ ext4.txt
48 - info, mount options and specifications for the Ext4 filesystem. 50 - info, mount options and specifications for the Ext4 filesystem.
49files.txt 51files.txt
50 - info on file management in the Linux kernel. 52 - info on file management in the Linux kernel.
53f2fs.txt
54 - info and mount options for the F2FS filesystem.
51fuse.txt 55fuse.txt
52 - info on the Filesystem in User SpacE including mount options. 56 - info on the Filesystem in User SpacE including mount options.
53gfs2.txt 57gfs2.txt
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index e540a24e5d06..0706d32a61e6 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -10,6 +10,7 @@ be able to use diff(1).
10--------------------------- dentry_operations -------------------------- 10--------------------------- dentry_operations --------------------------
11prototypes: 11prototypes:
12 int (*d_revalidate)(struct dentry *, unsigned int); 12 int (*d_revalidate)(struct dentry *, unsigned int);
13 int (*d_weak_revalidate)(struct dentry *, unsigned int);
13 int (*d_hash)(const struct dentry *, const struct inode *, 14 int (*d_hash)(const struct dentry *, const struct inode *,
14 struct qstr *); 15 struct qstr *);
15 int (*d_compare)(const struct dentry *, const struct inode *, 16 int (*d_compare)(const struct dentry *, const struct inode *,
@@ -25,6 +26,7 @@ prototypes:
25locking rules: 26locking rules:
26 rename_lock ->d_lock may block rcu-walk 27 rename_lock ->d_lock may block rcu-walk
27d_revalidate: no no yes (ref-walk) maybe 28d_revalidate: no no yes (ref-walk) maybe
29d_weak_revalidate:no no yes no
28d_hash no no no maybe 30d_hash no no no maybe
29d_compare: yes no no maybe 31d_compare: yes no no maybe
30d_delete: no yes no no 32d_delete: no yes no no
@@ -80,7 +82,6 @@ rename: yes (all) (see below)
80readlink: no 82readlink: no
81follow_link: no 83follow_link: no
82put_link: no 84put_link: no
83truncate: yes (see below)
84setattr: yes 85setattr: yes
85permission: no (may not block if called in rcu-walk mode) 86permission: no (may not block if called in rcu-walk mode)
86get_acl: no 87get_acl: no
@@ -96,11 +97,6 @@ atomic_open: yes
96 Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on 97 Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on
97victim. 98victim.
98 cross-directory ->rename() has (per-superblock) ->s_vfs_rename_sem. 99 cross-directory ->rename() has (per-superblock) ->s_vfs_rename_sem.
99 ->truncate() is never called directly - it's a callback, not a
100method. It's called by vmtruncate() - deprecated library function used by
101->setattr(). Locking information above applies to that call (i.e. is
102inherited from ->setattr() - vmtruncate() is used when ATTR_SIZE had been
103passed).
104 100
105See Documentation/filesystems/directory-locking for more detailed discussion 101See Documentation/filesystems/directory-locking for more detailed discussion
106of the locking scheme for directory operations. 102of the locking scheme for directory operations.
diff --git a/Documentation/filesystems/caching/backend-api.txt b/Documentation/filesystems/caching/backend-api.txt
index 382d52cdaf2d..d78bab9622c6 100644
--- a/Documentation/filesystems/caching/backend-api.txt
+++ b/Documentation/filesystems/caching/backend-api.txt
@@ -308,6 +308,18 @@ performed on the denizens of the cache. These are held in a structure of type:
308 obtained by calling object->cookie->def->get_aux()/get_attr(). 308 obtained by calling object->cookie->def->get_aux()/get_attr().
309 309
310 310
311 (*) Invalidate data object [mandatory]:
312
313 int (*invalidate_object)(struct fscache_operation *op)
314
315 This is called to invalidate a data object (as pointed to by op->object).
316 All the data stored for this object should be discarded and an
317 attr_changed operation should be performed. The caller will follow up
318 with an object update operation.
319
320 fscache_op_complete() must be called on op before returning.
321
322
311 (*) Discard object [mandatory]: 323 (*) Discard object [mandatory]:
312 324
313 void (*drop_object)(struct fscache_object *object) 325 void (*drop_object)(struct fscache_object *object)
@@ -419,7 +431,10 @@ performed on the denizens of the cache. These are held in a structure of type:
419 431
420 If an I/O error occurs, fscache_io_error() should be called and -ENOBUFS 432 If an I/O error occurs, fscache_io_error() should be called and -ENOBUFS
421 returned if possible or fscache_end_io() called with a suitable error 433 returned if possible or fscache_end_io() called with a suitable error
422 code.. 434 code.
435
436 fscache_put_retrieval() should be called after a page or pages are dealt
437 with. This will complete the operation when all pages are dealt with.
423 438
424 439
425 (*) Request pages be read from cache [mandatory]: 440 (*) Request pages be read from cache [mandatory]:
@@ -526,6 +541,27 @@ FS-Cache provides some utilities that a cache backend may make use of:
526 error value should be 0 if successful and an error otherwise. 541 error value should be 0 if successful and an error otherwise.
527 542
528 543
544 (*) Record that one or more pages being retrieved or allocated have been dealt
545 with:
546
547 void fscache_retrieval_complete(struct fscache_retrieval *op,
548 int n_pages);
549
550 This is called to record the fact that one or more pages have been dealt
551 with and are no longer the concern of this operation. When the number of
552 pages remaining in the operation reaches 0, the operation will be
553 completed.
554
555
556 (*) Record operation completion:
557
558 void fscache_op_complete(struct fscache_operation *op);
559
560 This is called to record the completion of an operation. This deducts
561 this operation from the parent object's run state, potentially permitting
562 one or more pending operations to start running.
563
564
529 (*) Set highest store limit: 565 (*) Set highest store limit:
530 566
531 void fscache_set_store_limit(struct fscache_object *object, 567 void fscache_set_store_limit(struct fscache_object *object,
diff --git a/Documentation/filesystems/caching/netfs-api.txt b/Documentation/filesystems/caching/netfs-api.txt
index 7cc6bf2871eb..97e6c0ecc5ef 100644
--- a/Documentation/filesystems/caching/netfs-api.txt
+++ b/Documentation/filesystems/caching/netfs-api.txt
@@ -35,8 +35,9 @@ This document contains the following sections:
35 (12) Index and data file update 35 (12) Index and data file update
36 (13) Miscellaneous cookie operations 36 (13) Miscellaneous cookie operations
37 (14) Cookie unregistration 37 (14) Cookie unregistration
38 (15) Index and data file invalidation 38 (15) Index invalidation
39 (16) FS-Cache specific page flags. 39 (16) Data file invalidation
40 (17) FS-Cache specific page flags.
40 41
41 42
42============================= 43=============================
@@ -767,13 +768,42 @@ the cookies for "child" indices, objects and pages have been relinquished
767first. 768first.
768 769
769 770
770================================ 771==================
771INDEX AND DATA FILE INVALIDATION 772INDEX INVALIDATION
772================================ 773==================
774
775There is no direct way to invalidate an index subtree. To do this, the caller
776should relinquish and retire the cookie they have, and then acquire a new one.
777
778
779======================
780DATA FILE INVALIDATION
781======================
782
783Sometimes it will be necessary to invalidate an object that contains data.
784Typically this will be necessary when the server tells the netfs of a foreign
785change - at which point the netfs has to throw away all the state it had for an
786inode and reload from the server.
787
788To indicate that a cache object should be invalidated, the following function
789can be called:
790
791 void fscache_invalidate(struct fscache_cookie *cookie);
792
793This can be called with spinlocks held as it defers the work to a thread pool.
794All extant storage, retrieval and attribute change ops at this point are
795cancelled and discarded. Some future operations will be rejected until the
796cache has had a chance to insert a barrier in the operations queue. After
797that, operations will be queued again behind the invalidation operation.
798
799The invalidation operation will perform an attribute change operation and an
800auxiliary data update operation as it is very likely these will have changed.
801
802Using the following function, the netfs can wait for the invalidation operation
803to have reached a point at which it can start submitting ordinary operations
804once again:
773 805
774There is no direct way to invalidate an index subtree or a data file. To do 806 void fscache_wait_on_invalidate(struct fscache_cookie *cookie);
775this, the caller should relinquish and retire the cookie they have, and then
776acquire a new one.
777 807
778 808
779=========================== 809===========================
diff --git a/Documentation/filesystems/caching/object.txt b/Documentation/filesystems/caching/object.txt
index 58313348da87..100ff41127e4 100644
--- a/Documentation/filesystems/caching/object.txt
+++ b/Documentation/filesystems/caching/object.txt
@@ -216,7 +216,14 @@ servicing netfs requests:
216 The normal running state. In this state, requests the netfs makes will be 216 The normal running state. In this state, requests the netfs makes will be
217 passed on to the cache. 217 passed on to the cache.
218 218
219 (6) State FSCACHE_OBJECT_UPDATING. 219 (6) State FSCACHE_OBJECT_INVALIDATING.
220
221 The object is undergoing invalidation. When the state comes here, it
222 discards all pending read, write and attribute change operations as it is
223 going to clear out the cache entirely and reinitialise it. It will then
224 continue to the FSCACHE_OBJECT_UPDATING state.
225
226 (7) State FSCACHE_OBJECT_UPDATING.
220 227
221 The state machine comes here to update the object in the cache from the 228 The state machine comes here to update the object in the cache from the
222 netfs's records. This involves updating the auxiliary data that is used 229 netfs's records. This involves updating the auxiliary data that is used
@@ -225,13 +232,13 @@ servicing netfs requests:
225And there are terminal states in which an object cleans itself up, deallocates 232And there are terminal states in which an object cleans itself up, deallocates
226memory and potentially deletes stuff from disk: 233memory and potentially deletes stuff from disk:
227 234
228 (7) State FSCACHE_OBJECT_LC_DYING. 235 (8) State FSCACHE_OBJECT_LC_DYING.
229 236
230 The object comes here if it is dying because of a lookup or creation 237 The object comes here if it is dying because of a lookup or creation
231 error. This would be due to a disk error or system error of some sort. 238 error. This would be due to a disk error or system error of some sort.
232 Temporary data is cleaned up, and the parent is released. 239 Temporary data is cleaned up, and the parent is released.
233 240
234 (8) State FSCACHE_OBJECT_DYING. 241 (9) State FSCACHE_OBJECT_DYING.
235 242
236 The object comes here if it is dying due to an error, because its parent 243 The object comes here if it is dying due to an error, because its parent
237 cookie has been relinquished by the netfs or because the cache is being 244 cookie has been relinquished by the netfs or because the cache is being
@@ -241,27 +248,27 @@ memory and potentially deletes stuff from disk:
241 can destroy themselves. This object waits for all its children to go away 248 can destroy themselves. This object waits for all its children to go away
242 before advancing to the next state. 249 before advancing to the next state.
243 250
244 (9) State FSCACHE_OBJECT_ABORT_INIT. 251(10) State FSCACHE_OBJECT_ABORT_INIT.
245 252
246 The object comes to this state if it was waiting on its parent in 253 The object comes to this state if it was waiting on its parent in
247 FSCACHE_OBJECT_INIT, but its parent died. The object will destroy itself 254 FSCACHE_OBJECT_INIT, but its parent died. The object will destroy itself
248 so that the parent may proceed from the FSCACHE_OBJECT_DYING state. 255 so that the parent may proceed from the FSCACHE_OBJECT_DYING state.
249 256
250(10) State FSCACHE_OBJECT_RELEASING. 257(11) State FSCACHE_OBJECT_RELEASING.
251(11) State FSCACHE_OBJECT_RECYCLING. 258(12) State FSCACHE_OBJECT_RECYCLING.
252 259
253 The object comes to one of these two states when dying once it is rid of 260 The object comes to one of these two states when dying once it is rid of
254 all its children, if it is dying because the netfs relinquished its 261 all its children, if it is dying because the netfs relinquished its
255 cookie. In the first state, the cached data is expected to persist, and 262 cookie. In the first state, the cached data is expected to persist, and
256 in the second it will be deleted. 263 in the second it will be deleted.
257 264
258(12) State FSCACHE_OBJECT_WITHDRAWING. 265(13) State FSCACHE_OBJECT_WITHDRAWING.
259 266
260 The object transits to this state if the cache decides it wants to 267 The object transits to this state if the cache decides it wants to
261 withdraw the object from service, perhaps to make space, but also due to 268 withdraw the object from service, perhaps to make space, but also due to
262 error or just because the whole cache is being withdrawn. 269 error or just because the whole cache is being withdrawn.
263 270
264(13) State FSCACHE_OBJECT_DEAD. 271(14) State FSCACHE_OBJECT_DEAD.
265 272
266 The object transits to this state when the in-memory object record is 273 The object transits to this state when the in-memory object record is
267 ready to be deleted. The object processor shouldn't ever see an object in 274 ready to be deleted. The object processor shouldn't ever see an object in
diff --git a/Documentation/filesystems/caching/operations.txt b/Documentation/filesystems/caching/operations.txt
index b6b070c57cbf..bee2a5f93d60 100644
--- a/Documentation/filesystems/caching/operations.txt
+++ b/Documentation/filesystems/caching/operations.txt
@@ -174,7 +174,7 @@ Operations are used through the following procedure:
174 necessary (the object might have died whilst the thread was waiting). 174 necessary (the object might have died whilst the thread was waiting).
175 175
176 When it has finished doing its processing, it should call 176 When it has finished doing its processing, it should call
177 fscache_put_operation() on it. 177 fscache_op_complete() and fscache_put_operation() on it.
178 178
179 (4) The operation holds an effective lock upon the object, preventing other 179 (4) The operation holds an effective lock upon the object, preventing other
180 exclusive ops conflicting until it is released. The operation can be 180 exclusive ops conflicting until it is released. The operation can be
diff --git a/Documentation/filesystems/efivarfs.txt b/Documentation/filesystems/efivarfs.txt
new file mode 100644
index 000000000000..c477af086e65
--- /dev/null
+++ b/Documentation/filesystems/efivarfs.txt
@@ -0,0 +1,16 @@
1
2efivarfs - a (U)EFI variable filesystem
3
4The efivarfs filesystem was created to address the shortcomings of
5using entries in sysfs to maintain EFI variables. The old sysfs EFI
6variables code only supported variables of up to 1024 bytes. This
7limitation existed in version 0.99 of the EFI specification, but was
8removed before any full releases. Since variables can now be larger
9than a single page, sysfs isn't the best interface for this.
10
11Variables can be created, deleted and modified with the efivarfs
12filesystem.
13
14efivarfs is typically mounted like this,
15
16 mount -t efivarfs none /sys/firmware/efi/efivars
diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt
index 104322bf378c..34ea4f1fa6ea 100644
--- a/Documentation/filesystems/ext4.txt
+++ b/Documentation/filesystems/ext4.txt
@@ -200,12 +200,9 @@ inode_readahead_blks=n This tuning parameter controls the maximum
200 table readahead algorithm will pre-read into 200 table readahead algorithm will pre-read into
201 the buffer cache. The default value is 32 blocks. 201 the buffer cache. The default value is 32 blocks.
202 202
203nouser_xattr Disables Extended User Attributes. If you have extended 203nouser_xattr Disables Extended User Attributes. See the
204 attribute support enabled in the kernel configuration 204 attr(5) manual page and http://acl.bestbits.at/
205 (CONFIG_EXT4_FS_XATTR), extended attribute support 205 for more information about extended attributes.
206 is enabled by default on mount. See the attr(5) manual
207 page and http://acl.bestbits.at/ for more information
208 about extended attributes.
209 206
210noacl This option disables POSIX Access Control List 207noacl This option disables POSIX Access Control List
211 support. If ACL support is enabled in the kernel 208 support. If ACL support is enabled in the kernel
diff --git a/Documentation/filesystems/f2fs.txt b/Documentation/filesystems/f2fs.txt
new file mode 100644
index 000000000000..dcf338e62b71
--- /dev/null
+++ b/Documentation/filesystems/f2fs.txt
@@ -0,0 +1,421 @@
1================================================================================
2WHAT IS Flash-Friendly File System (F2FS)?
3================================================================================
4
5NAND flash memory-based storage devices, such as SSD, eMMC, and SD cards, have
6been equipped on a variety systems ranging from mobile to server systems. Since
7they are known to have different characteristics from the conventional rotating
8disks, a file system, an upper layer to the storage device, should adapt to the
9changes from the sketch in the design level.
10
11F2FS is a file system exploiting NAND flash memory-based storage devices, which
12is based on Log-structured File System (LFS). The design has been focused on
13addressing the fundamental issues in LFS, which are snowball effect of wandering
14tree and high cleaning overhead.
15
16Since a NAND flash memory-based storage device shows different characteristic
17according to its internal geometry or flash memory management scheme, namely FTL,
18F2FS and its tools support various parameters not only for configuring on-disk
19layout, but also for selecting allocation and cleaning algorithms.
20
21The file system formatting tool, "mkfs.f2fs", is available from the following
22git tree:
23>> git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git
24
25For reporting bugs and sending patches, please use the following mailing list:
26>> linux-f2fs-devel@lists.sourceforge.net
27
28================================================================================
29BACKGROUND AND DESIGN ISSUES
30================================================================================
31
32Log-structured File System (LFS)
33--------------------------------
34"A log-structured file system writes all modifications to disk sequentially in
35a log-like structure, thereby speeding up both file writing and crash recovery.
36The log is the only structure on disk; it contains indexing information so that
37files can be read back from the log efficiently. In order to maintain large free
38areas on disk for fast writing, we divide the log into segments and use a
39segment cleaner to compress the live information from heavily fragmented
40segments." from Rosenblum, M. and Ousterhout, J. K., 1992, "The design and
41implementation of a log-structured file system", ACM Trans. Computer Systems
4210, 1, 26–52.
43
44Wandering Tree Problem
45----------------------
46In LFS, when a file data is updated and written to the end of log, its direct
47pointer block is updated due to the changed location. Then the indirect pointer
48block is also updated due to the direct pointer block update. In this manner,
49the upper index structures such as inode, inode map, and checkpoint block are
50also updated recursively. This problem is called as wandering tree problem [1],
51and in order to enhance the performance, it should eliminate or relax the update
52propagation as much as possible.
53
54[1] Bityutskiy, A. 2005. JFFS3 design issues. http://www.linux-mtd.infradead.org/
55
56Cleaning Overhead
57-----------------
58Since LFS is based on out-of-place writes, it produces so many obsolete blocks
59scattered across the whole storage. In order to serve new empty log space, it
60needs to reclaim these obsolete blocks seamlessly to users. This job is called
61as a cleaning process.
62
63The process consists of three operations as follows.
641. A victim segment is selected through referencing segment usage table.
652. It loads parent index structures of all the data in the victim identified by
66 segment summary blocks.
673. It checks the cross-reference between the data and its parent index structure.
684. It moves valid data selectively.
69
70This cleaning job may cause unexpected long delays, so the most important goal
71is to hide the latencies to users. And also definitely, it should reduce the
72amount of valid data to be moved, and move them quickly as well.
73
74================================================================================
75KEY FEATURES
76================================================================================
77
78Flash Awareness
79---------------
80- Enlarge the random write area for better performance, but provide the high
81 spatial locality
82- Align FS data structures to the operational units in FTL as best efforts
83
84Wandering Tree Problem
85----------------------
86- Use a term, “node”, that represents inodes as well as various pointer blocks
87- Introduce Node Address Table (NAT) containing the locations of all the “node”
88 blocks; this will cut off the update propagation.
89
90Cleaning Overhead
91-----------------
92- Support a background cleaning process
93- Support greedy and cost-benefit algorithms for victim selection policies
94- Support multi-head logs for static/dynamic hot and cold data separation
95- Introduce adaptive logging for efficient block allocation
96
97================================================================================
98MOUNT OPTIONS
99================================================================================
100
101background_gc_off Turn off cleaning operations, namely garbage collection,
102 triggered in background when I/O subsystem is idle.
103disable_roll_forward Disable the roll-forward recovery routine
104discard Issue discard/TRIM commands when a segment is cleaned.
105no_heap Disable heap-style segment allocation which finds free
106 segments for data from the beginning of main area, while
107 for node from the end of main area.
108nouser_xattr Disable Extended User Attributes. Note: xattr is enabled
109 by default if CONFIG_F2FS_FS_XATTR is selected.
110noacl Disable POSIX Access Control List. Note: acl is enabled
111 by default if CONFIG_F2FS_FS_POSIX_ACL is selected.
112active_logs=%u Support configuring the number of active logs. In the
113 current design, f2fs supports only 2, 4, and 6 logs.
114 Default number is 6.
115disable_ext_identify Disable the extension list configured by mkfs, so f2fs
116 does not aware of cold files such as media files.
117
118================================================================================
119DEBUGFS ENTRIES
120================================================================================
121
122/sys/kernel/debug/f2fs/ contains information about all the partitions mounted as
123f2fs. Each file shows the whole f2fs information.
124
125/sys/kernel/debug/f2fs/status includes:
126 - major file system information managed by f2fs currently
127 - average SIT information about whole segments
128 - current memory footprint consumed by f2fs.
129
130================================================================================
131USAGE
132================================================================================
133
1341. Download userland tools and compile them.
135
1362. Skip, if f2fs was compiled statically inside kernel.
137 Otherwise, insert the f2fs.ko module.
138 # insmod f2fs.ko
139
1403. Create a directory trying to mount
141 # mkdir /mnt/f2fs
142
1434. Format the block device, and then mount as f2fs
144 # mkfs.f2fs -l label /dev/block_device
145 # mount -t f2fs /dev/block_device /mnt/f2fs
146
147Format options
148--------------
149-l [label] : Give a volume label, up to 256 unicode name.
150-a [0 or 1] : Split start location of each area for heap-based allocation.
151 1 is set by default, which performs this.
152-o [int] : Set overprovision ratio in percent over volume size.
153 5 is set by default.
154-s [int] : Set the number of segments per section.
155 1 is set by default.
156-z [int] : Set the number of sections per zone.
157 1 is set by default.
158-e [str] : Set basic extension list. e.g. "mp3,gif,mov"
159
160================================================================================
161DESIGN
162================================================================================
163
164On-disk Layout
165--------------
166
167F2FS divides the whole volume into a number of segments, each of which is fixed
168to 2MB in size. A section is composed of consecutive segments, and a zone
169consists of a set of sections. By default, section and zone sizes are set to one
170segment size identically, but users can easily modify the sizes by mkfs.
171
172F2FS splits the entire volume into six areas, and all the areas except superblock
173consists of multiple segments as described below.
174
175 align with the zone size <-|
176 |-> align with the segment size
177 _________________________________________________________________________
178 | | | Segment | Node | Segment | |
179 | Superblock | Checkpoint | Info. | Address | Summary | Main |
180 | (SB) | (CP) | Table (SIT) | Table (NAT) | Area (SSA) | |
181 |____________|_____2______|______N______|______N______|______N_____|__N___|
182 . .
183 . .
184 . .
185 ._________________________________________.
186 |_Segment_|_..._|_Segment_|_..._|_Segment_|
187 . .
188 ._________._________
189 |_section_|__...__|_
190 . .
191 .________.
192 |__zone__|
193
194- Superblock (SB)
195 : It is located at the beginning of the partition, and there exist two copies
196 to avoid file system crash. It contains basic partition information and some
197 default parameters of f2fs.
198
199- Checkpoint (CP)
200 : It contains file system information, bitmaps for valid NAT/SIT sets, orphan
201 inode lists, and summary entries of current active segments.
202
203- Segment Information Table (SIT)
204 : It contains segment information such as valid block count and bitmap for the
205 validity of all the blocks.
206
207- Node Address Table (NAT)
208 : It is composed of a block address table for all the node blocks stored in
209 Main area.
210
211- Segment Summary Area (SSA)
212 : It contains summary entries which contains the owner information of all the
213 data and node blocks stored in Main area.
214
215- Main Area
216 : It contains file and directory data including their indices.
217
218In order to avoid misalignment between file system and flash-based storage, F2FS
219aligns the start block address of CP with the segment size. Also, it aligns the
220start block address of Main area with the zone size by reserving some segments
221in SSA area.
222
223Reference the following survey for additional technical details.
224https://wiki.linaro.org/WorkingGroups/Kernel/Projects/FlashCardSurvey
225
226File System Metadata Structure
227------------------------------
228
229F2FS adopts the checkpointing scheme to maintain file system consistency. At
230mount time, F2FS first tries to find the last valid checkpoint data by scanning
231CP area. In order to reduce the scanning time, F2FS uses only two copies of CP.
232One of them always indicates the last valid data, which is called as shadow copy
233mechanism. In addition to CP, NAT and SIT also adopt the shadow copy mechanism.
234
235For file system consistency, each CP points to which NAT and SIT copies are
236valid, as shown as below.
237
238 +--------+----------+---------+
239 | CP | SIT | NAT |
240 +--------+----------+---------+
241 . . . .
242 . . . .
243 . . . .
244 +-------+-------+--------+--------+--------+--------+
245 | CP #0 | CP #1 | SIT #0 | SIT #1 | NAT #0 | NAT #1 |
246 +-------+-------+--------+--------+--------+--------+
247 | ^ ^
248 | | |
249 `----------------------------------------'
250
251Index Structure
252---------------
253
254The key data structure to manage the data locations is a "node". Similar to
255traditional file structures, F2FS has three types of node: inode, direct node,
256indirect node. F2FS assigns 4KB to an inode block which contains 923 data block
257indices, two direct node pointers, two indirect node pointers, and one double
258indirect node pointer as described below. One direct node block contains 1018
259data blocks, and one indirect node block contains also 1018 node blocks. Thus,
260one inode block (i.e., a file) covers:
261
262 4KB * (923 + 2 * 1018 + 2 * 1018 * 1018 + 1018 * 1018 * 1018) := 3.94TB.
263
264 Inode block (4KB)
265 |- data (923)
266 |- direct node (2)
267 | `- data (1018)
268 |- indirect node (2)
269 | `- direct node (1018)
270 | `- data (1018)
271 `- double indirect node (1)
272 `- indirect node (1018)
273 `- direct node (1018)
274 `- data (1018)
275
276Note that, all the node blocks are mapped by NAT which means the location of
277each node is translated by the NAT table. In the consideration of the wandering
278tree problem, F2FS is able to cut off the propagation of node updates caused by
279leaf data writes.
280
281Directory Structure
282-------------------
283
284A directory entry occupies 11 bytes, which consists of the following attributes.
285
286- hash hash value of the file name
287- ino inode number
288- len the length of file name
289- type file type such as directory, symlink, etc
290
291A dentry block consists of 214 dentry slots and file names. Therein a bitmap is
292used to represent whether each dentry is valid or not. A dentry block occupies
2934KB with the following composition.
294
295 Dentry Block(4 K) = bitmap (27 bytes) + reserved (3 bytes) +
296 dentries(11 * 214 bytes) + file name (8 * 214 bytes)
297
298 [Bucket]
299 +--------------------------------+
300 |dentry block 1 | dentry block 2 |
301 +--------------------------------+
302 . .
303 . .
304 . [Dentry Block Structure: 4KB] .
305 +--------+----------+----------+------------+
306 | bitmap | reserved | dentries | file names |
307 +--------+----------+----------+------------+
308 [Dentry Block: 4KB] . .
309 . .
310 . .
311 +------+------+-----+------+
312 | hash | ino | len | type |
313 +------+------+-----+------+
314 [Dentry Structure: 11 bytes]
315
316F2FS implements multi-level hash tables for directory structure. Each level has
317a hash table with dedicated number of hash buckets as shown below. Note that
318"A(2B)" means a bucket includes 2 data blocks.
319
320----------------------
321A : bucket
322B : block
323N : MAX_DIR_HASH_DEPTH
324----------------------
325
326level #0 | A(2B)
327 |
328level #1 | A(2B) - A(2B)
329 |
330level #2 | A(2B) - A(2B) - A(2B) - A(2B)
331 . | . . . .
332level #N/2 | A(2B) - A(2B) - A(2B) - A(2B) - A(2B) - ... - A(2B)
333 . | . . . .
334level #N | A(4B) - A(4B) - A(4B) - A(4B) - A(4B) - ... - A(4B)
335
336The number of blocks and buckets are determined by,
337
338 ,- 2, if n < MAX_DIR_HASH_DEPTH / 2,
339 # of blocks in level #n = |
340 `- 4, Otherwise
341
342 ,- 2^n, if n < MAX_DIR_HASH_DEPTH / 2,
343 # of buckets in level #n = |
344 `- 2^((MAX_DIR_HASH_DEPTH / 2) - 1), Otherwise
345
346When F2FS finds a file name in a directory, at first a hash value of the file
347name is calculated. Then, F2FS scans the hash table in level #0 to find the
348dentry consisting of the file name and its inode number. If not found, F2FS
349scans the next hash table in level #1. In this way, F2FS scans hash tables in
350each levels incrementally from 1 to N. In each levels F2FS needs to scan only
351one bucket determined by the following equation, which shows O(log(# of files))
352complexity.
353
354 bucket number to scan in level #n = (hash value) % (# of buckets in level #n)
355
356In the case of file creation, F2FS finds empty consecutive slots that cover the
357file name. F2FS searches the empty slots in the hash tables of whole levels from
3581 to N in the same way as the lookup operation.
359
360The following figure shows an example of two cases holding children.
361 --------------> Dir <--------------
362 | |
363 child child
364
365 child - child [hole] - child
366
367 child - child - child [hole] - [hole] - child
368
369 Case 1: Case 2:
370 Number of children = 6, Number of children = 3,
371 File size = 7 File size = 7
372
373Default Block Allocation
374------------------------
375
376At runtime, F2FS manages six active logs inside "Main" area: Hot/Warm/Cold node
377and Hot/Warm/Cold data.
378
379- Hot node contains direct node blocks of directories.
380- Warm node contains direct node blocks except hot node blocks.
381- Cold node contains indirect node blocks
382- Hot data contains dentry blocks
383- Warm data contains data blocks except hot and cold data blocks
384- Cold data contains multimedia data or migrated data blocks
385
386LFS has two schemes for free space management: threaded log and copy-and-compac-
387tion. The copy-and-compaction scheme which is known as cleaning, is well-suited
388for devices showing very good sequential write performance, since free segments
389are served all the time for writing new data. However, it suffers from cleaning
390overhead under high utilization. Contrarily, the threaded log scheme suffers
391from random writes, but no cleaning process is needed. F2FS adopts a hybrid
392scheme where the copy-and-compaction scheme is adopted by default, but the
393policy is dynamically changed to the threaded log scheme according to the file
394system status.
395
396In order to align F2FS with underlying flash-based storage, F2FS allocates a
397segment in a unit of section. F2FS expects that the section size would be the
398same as the unit size of garbage collection in FTL. Furthermore, with respect
399to the mapping granularity in FTL, F2FS allocates each section of the active
400logs from different zones as much as possible, since FTL can write the data in
401the active logs into one allocation unit according to its mapping granularity.
402
403Cleaning process
404----------------
405
406F2FS does cleaning both on demand and in the background. On-demand cleaning is
407triggered when there are not enough free segments to serve VFS calls. Background
408cleaner is operated by a kernel thread, and triggers the cleaning job when the
409system is idle.
410
411F2FS supports two victim selection policies: greedy and cost-benefit algorithms.
412In the greedy algorithm, F2FS selects a victim segment having the smallest number
413of valid blocks. In the cost-benefit algorithm, F2FS selects a victim segment
414according to the segment age and the number of valid blocks in order to address
415log block thrashing problem in the greedy algorithm. F2FS adopts the greedy
416algorithm for on-demand cleaner, while background cleaner adopts cost-benefit
417algorithm.
418
419In order to identify whether the data in the victim segment are valid or not,
420F2FS manages a bitmap. Each bit represents the validity of a block, and the
421bitmap is composed of a bit stream covering whole blocks in main area.
diff --git a/Documentation/filesystems/nfs/nfs41-server.txt b/Documentation/filesystems/nfs/nfs41-server.txt
index 092fad92a3f0..01c2db769791 100644
--- a/Documentation/filesystems/nfs/nfs41-server.txt
+++ b/Documentation/filesystems/nfs/nfs41-server.txt
@@ -39,21 +39,10 @@ interoperability problems with future clients. Known issues:
39 from a linux client are possible, but we aren't really 39 from a linux client are possible, but we aren't really
40 conformant with the spec (for example, we don't use kerberos 40 conformant with the spec (for example, we don't use kerberos
41 on the backchannel correctly). 41 on the backchannel correctly).
42 - Incomplete backchannel support: incomplete backchannel gss
43 support and no support for BACKCHANNEL_CTL mean that
44 callbacks (hence delegations and layouts) may not be
45 available and clients confused by the incomplete
46 implementation may fail.
47 - We do not support SSV, which provides security for shared 42 - We do not support SSV, which provides security for shared
48 client-server state (thus preventing unauthorized tampering 43 client-server state (thus preventing unauthorized tampering
49 with locks and opens, for example). It is mandatory for 44 with locks and opens, for example). It is mandatory for
50 servers to support this, though no clients use it yet. 45 servers to support this, though no clients use it yet.
51 - Mandatory operations which we do not support, such as
52 DESTROY_CLIENTID, are not currently used by clients, but will be
53 (and the spec recommends their uses in common cases), and
54 clients should not be expected to know how to recover from the
55 case where they are not supported. This will eventually cause
56 interoperability failures.
57 46
58In addition, some limitations are inherited from the current NFSv4 47In addition, some limitations are inherited from the current NFSv4
59implementation: 48implementation:
@@ -89,7 +78,7 @@ Operations
89 | | MNI | or OPT) | | 78 | | MNI | or OPT) | |
90 +----------------------+------------+--------------+----------------+ 79 +----------------------+------------+--------------+----------------+
91 | ACCESS | REQ | | Section 18.1 | 80 | ACCESS | REQ | | Section 18.1 |
92NS | BACKCHANNEL_CTL | REQ | | Section 18.33 | 81I | BACKCHANNEL_CTL | REQ | | Section 18.33 |
93I | BIND_CONN_TO_SESSION | REQ | | Section 18.34 | 82I | BIND_CONN_TO_SESSION | REQ | | Section 18.34 |
94 | CLOSE | REQ | | Section 18.2 | 83 | CLOSE | REQ | | Section 18.2 |
95 | COMMIT | REQ | | Section 18.3 | 84 | COMMIT | REQ | | Section 18.3 |
@@ -99,7 +88,7 @@ NS*| DELEGPURGE | OPT | FDELG (REQ) | Section 18.5 |
99 | DELEGRETURN | OPT | FDELG, | Section 18.6 | 88 | DELEGRETURN | OPT | FDELG, | Section 18.6 |
100 | | | DDELG, pNFS | | 89 | | | DDELG, pNFS | |
101 | | | (REQ) | | 90 | | | (REQ) | |
102NS | DESTROY_CLIENTID | REQ | | Section 18.50 | 91I | DESTROY_CLIENTID | REQ | | Section 18.50 |
103I | DESTROY_SESSION | REQ | | Section 18.37 | 92I | DESTROY_SESSION | REQ | | Section 18.37 |
104I | EXCHANGE_ID | REQ | | Section 18.35 | 93I | EXCHANGE_ID | REQ | | Section 18.35 |
105I | FREE_STATEID | REQ | | Section 18.38 | 94I | FREE_STATEID | REQ | | Section 18.38 |
@@ -192,7 +181,6 @@ EXCHANGE_ID:
192 181
193CREATE_SESSION: 182CREATE_SESSION:
194* backchannel attributes are ignored 183* backchannel attributes are ignored
195* backchannel security parameters are ignored
196 184
197SEQUENCE: 185SEQUENCE:
198* no support for dynamic slot table renegotiation (optional) 186* no support for dynamic slot table renegotiation (optional)
@@ -202,7 +190,7 @@ Nonstandard compound limitations:
202 ca_maxrequestsize request and a ca_maxresponsesize reply, so we may 190 ca_maxrequestsize request and a ca_maxresponsesize reply, so we may
203 fail to live up to the promise we made in CREATE_SESSION fore channel 191 fail to live up to the promise we made in CREATE_SESSION fore channel
204 negotiation. 192 negotiation.
205* No more than one IO operation (read, write, readdir) allowed per 193* No more than one read-like operation allowed per compound; encoding
206 compound. 194 replies that cross page boundaries (except for read data) not handled.
207 195
208See also http://wiki.linux-nfs.org/wiki/index.php/Server_4.0_and_4.1_issues. 196See also http://wiki.linux-nfs.org/wiki/index.php/Server_4.0_and_4.1_issues.
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting
index 0742feebc6e2..4db22f6491e0 100644
--- a/Documentation/filesystems/porting
+++ b/Documentation/filesystems/porting
@@ -281,7 +281,7 @@ ext2_write_failed and callers for an example.
281 281
282[mandatory] 282[mandatory]
283 283
284 ->truncate is going away. The whole truncate sequence needs to be 284 ->truncate is gone. The whole truncate sequence needs to be
285implemented in ->setattr, which is now mandatory for filesystems 285implemented in ->setattr, which is now mandatory for filesystems
286implementing on-disk size changes. Start with a copy of the old inode_setattr 286implementing on-disk size changes. Start with a copy of the old inode_setattr
287and vmtruncate, and the reorder the vmtruncate + foofs_vmtruncate sequence to 287and vmtruncate, and the reorder the vmtruncate + foofs_vmtruncate sequence to
@@ -441,3 +441,7 @@ d_make_root() drops the reference to inode if dentry allocation fails.
441two, it gets "is it an O_EXCL or equivalent?" boolean argument. Note that 441two, it gets "is it an O_EXCL or equivalent?" boolean argument. Note that
442local filesystems can ignore tha argument - they are guaranteed that the 442local filesystems can ignore tha argument - they are guaranteed that the
443object doesn't exist. It's remote/distributed ones that might care... 443object doesn't exist. It's remote/distributed ones that might care...
444--
445[mandatory]
446 FS_REVAL_DOT is gone; if you used to have it, add ->d_weak_revalidate()
447in your dentry operations instead.
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index a1793d670cd0..fd8d0d594fc7 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -33,7 +33,7 @@ Table of Contents
33 2 Modifying System Parameters 33 2 Modifying System Parameters
34 34
35 3 Per-Process Parameters 35 3 Per-Process Parameters
36 3.1 /proc/<pid>/oom_score_adj - Adjust the oom-killer 36 3.1 /proc/<pid>/oom_adj & /proc/<pid>/oom_score_adj - Adjust the oom-killer
37 score 37 score
38 3.2 /proc/<pid>/oom_score - Display current oom-killer score 38 3.2 /proc/<pid>/oom_score - Display current oom-killer score
39 3.3 /proc/<pid>/io - Display the IO accounting fields 39 3.3 /proc/<pid>/io - Display the IO accounting fields
@@ -41,6 +41,7 @@ Table of Contents
41 3.5 /proc/<pid>/mountinfo - Information about mounts 41 3.5 /proc/<pid>/mountinfo - Information about mounts
42 3.6 /proc/<pid>/comm & /proc/<pid>/task/<tid>/comm 42 3.6 /proc/<pid>/comm & /proc/<pid>/task/<tid>/comm
43 3.7 /proc/<pid>/task/<tid>/children - Information about task children 43 3.7 /proc/<pid>/task/<tid>/children - Information about task children
44 3.8 /proc/<pid>/fdinfo/<fd> - Information about opened file
44 45
45 4 Configuring procfs 46 4 Configuring procfs
46 4.1 Mount options 47 4.1 Mount options
@@ -142,7 +143,7 @@ Table 1-1: Process specific entries in /proc
142 pagemap Page table 143 pagemap Page table
143 stack Report full stack trace, enable via CONFIG_STACKTRACE 144 stack Report full stack trace, enable via CONFIG_STACKTRACE
144 smaps a extension based on maps, showing the memory consumption of 145 smaps a extension based on maps, showing the memory consumption of
145 each mapping 146 each mapping and flags associated with it
146.............................................................................. 147..............................................................................
147 148
148For example, to get the status information of a process, all you have to do is 149For example, to get the status information of a process, all you have to do is
@@ -181,6 +182,7 @@ read the file /proc/PID/status:
181 CapPrm: 0000000000000000 182 CapPrm: 0000000000000000
182 CapEff: 0000000000000000 183 CapEff: 0000000000000000
183 CapBnd: ffffffffffffffff 184 CapBnd: ffffffffffffffff
185 Seccomp: 0
184 voluntary_ctxt_switches: 0 186 voluntary_ctxt_switches: 0
185 nonvoluntary_ctxt_switches: 1 187 nonvoluntary_ctxt_switches: 1
186 188
@@ -237,6 +239,7 @@ Table 1-2: Contents of the status files (as of 2.6.30-rc7)
237 CapPrm bitmap of permitted capabilities 239 CapPrm bitmap of permitted capabilities
238 CapEff bitmap of effective capabilities 240 CapEff bitmap of effective capabilities
239 CapBnd bitmap of capabilities bounding set 241 CapBnd bitmap of capabilities bounding set
242 Seccomp seccomp mode, like prctl(PR_GET_SECCOMP, ...)
240 Cpus_allowed mask of CPUs on which this process may run 243 Cpus_allowed mask of CPUs on which this process may run
241 Cpus_allowed_list Same as previous, but in "list format" 244 Cpus_allowed_list Same as previous, but in "list format"
242 Mems_allowed mask of memory nodes allowed to this process 245 Mems_allowed mask of memory nodes allowed to this process
@@ -415,8 +418,9 @@ Swap: 0 kB
415KernelPageSize: 4 kB 418KernelPageSize: 4 kB
416MMUPageSize: 4 kB 419MMUPageSize: 4 kB
417Locked: 374 kB 420Locked: 374 kB
421VmFlags: rd ex mr mw me de
418 422
419The first of these lines shows the same information as is displayed for the 423the first of these lines shows the same information as is displayed for the
420mapping in /proc/PID/maps. The remaining lines show the size of the mapping 424mapping in /proc/PID/maps. The remaining lines show the size of the mapping
421(size), the amount of the mapping that is currently resident in RAM (RSS), the 425(size), the amount of the mapping that is currently resident in RAM (RSS), the
422process' proportional share of this mapping (PSS), the number of clean and 426process' proportional share of this mapping (PSS), the number of clean and
@@ -430,6 +434,41 @@ and a page is modified, the file page is replaced by a private anonymous copy.
430"Swap" shows how much would-be-anonymous memory is also used, but out on 434"Swap" shows how much would-be-anonymous memory is also used, but out on
431swap. 435swap.
432 436
437"VmFlags" field deserves a separate description. This member represents the kernel
438flags associated with the particular virtual memory area in two letter encoded
439manner. The codes are the following:
440 rd - readable
441 wr - writeable
442 ex - executable
443 sh - shared
444 mr - may read
445 mw - may write
446 me - may execute
447 ms - may share
448 gd - stack segment growns down
449 pf - pure PFN range
450 dw - disabled write to the mapped file
451 lo - pages are locked in memory
452 io - memory mapped I/O area
453 sr - sequential read advise provided
454 rr - random read advise provided
455 dc - do not copy area on fork
456 de - do not expand area on remapping
457 ac - area is accountable
458 nr - swap space is not reserved for the area
459 ht - area uses huge tlb pages
460 nl - non-linear mapping
461 ar - architecture specific flag
462 dd - do not include area into core dump
463 mm - mixed map area
464 hg - huge page advise flag
465 nh - no-huge page advise flag
466 mg - mergable advise flag
467
468Note that there is no guarantee that every flag and associated mnemonic will
469be present in all further kernel releases. Things get changed, the flags may
470be vanished or the reverse -- new added.
471
433This file is only present if the CONFIG_MMU kernel configuration option is 472This file is only present if the CONFIG_MMU kernel configuration option is
434enabled. 473enabled.
435 474
@@ -1320,10 +1359,10 @@ of the kernel.
1320CHAPTER 3: PER-PROCESS PARAMETERS 1359CHAPTER 3: PER-PROCESS PARAMETERS
1321------------------------------------------------------------------------------ 1360------------------------------------------------------------------------------
1322 1361
13233.1 /proc/<pid>/oom_score_adj- Adjust the oom-killer score 13623.1 /proc/<pid>/oom_adj & /proc/<pid>/oom_score_adj- Adjust the oom-killer score
1324-------------------------------------------------------------------------------- 1363--------------------------------------------------------------------------------
1325 1364
1326This file can be used to adjust the badness heuristic used to select which 1365These file can be used to adjust the badness heuristic used to select which
1327process gets killed in out of memory conditions. 1366process gets killed in out of memory conditions.
1328 1367
1329The badness heuristic assigns a value to each candidate task ranging from 0 1368The badness heuristic assigns a value to each candidate task ranging from 0
@@ -1361,6 +1400,12 @@ same system, cpuset, mempolicy, or memory controller resources to use at least
1361equivalent to discounting 50% of the task's allowed memory from being considered 1400equivalent to discounting 50% of the task's allowed memory from being considered
1362as scoring against the task. 1401as scoring against the task.
1363 1402
1403For backwards compatibility with previous kernels, /proc/<pid>/oom_adj may also
1404be used to tune the badness score. Its acceptable values range from -16
1405(OOM_ADJUST_MIN) to +15 (OOM_ADJUST_MAX) and a special value of -17
1406(OOM_DISABLE) to disable oom killing entirely for that task. Its value is
1407scaled linearly with /proc/<pid>/oom_score_adj.
1408
1364The value of /proc/<pid>/oom_score_adj may be reduced no lower than the last 1409The value of /proc/<pid>/oom_score_adj may be reduced no lower than the last
1365value set by a CAP_SYS_RESOURCE process. To reduce the value any lower 1410value set by a CAP_SYS_RESOURCE process. To reduce the value any lower
1366requires CAP_SYS_RESOURCE. 1411requires CAP_SYS_RESOURCE.
@@ -1375,7 +1420,9 @@ minimal amount of work.
1375------------------------------------------------------------- 1420-------------------------------------------------------------
1376 1421
1377This file can be used to check the current score used by the oom-killer is for 1422This file can be used to check the current score used by the oom-killer is for
1378any given <pid>. 1423any given <pid>. Use it together with /proc/<pid>/oom_score_adj to tune which
1424process should be killed in an out-of-memory situation.
1425
1379 1426
13803.3 /proc/<pid>/io - Display the IO accounting fields 14273.3 /proc/<pid>/io - Display the IO accounting fields
1381------------------------------------------------------- 1428-------------------------------------------------------
@@ -1587,6 +1634,93 @@ pids, so one need to either stop or freeze processes being inspected
1587if precise results are needed. 1634if precise results are needed.
1588 1635
1589 1636
16373.7 /proc/<pid>/fdinfo/<fd> - Information about opened file
1638---------------------------------------------------------------
1639This file provides information associated with an opened file. The regular
1640files have at least two fields -- 'pos' and 'flags'. The 'pos' represents
1641the current offset of the opened file in decimal form [see lseek(2) for
1642details] and 'flags' denotes the octal O_xxx mask the file has been
1643created with [see open(2) for details].
1644
1645A typical output is
1646
1647 pos: 0
1648 flags: 0100002
1649
1650The files such as eventfd, fsnotify, signalfd, epoll among the regular pos/flags
1651pair provide additional information particular to the objects they represent.
1652
1653 Eventfd files
1654 ~~~~~~~~~~~~~
1655 pos: 0
1656 flags: 04002
1657 eventfd-count: 5a
1658
1659 where 'eventfd-count' is hex value of a counter.
1660
1661 Signalfd files
1662 ~~~~~~~~~~~~~~
1663 pos: 0
1664 flags: 04002
1665 sigmask: 0000000000000200
1666
1667 where 'sigmask' is hex value of the signal mask associated
1668 with a file.
1669
1670 Epoll files
1671 ~~~~~~~~~~~
1672 pos: 0
1673 flags: 02
1674 tfd: 5 events: 1d data: ffffffffffffffff
1675
1676 where 'tfd' is a target file descriptor number in decimal form,
1677 'events' is events mask being watched and the 'data' is data
1678 associated with a target [see epoll(7) for more details].
1679
1680 Fsnotify files
1681 ~~~~~~~~~~~~~~
1682 For inotify files the format is the following
1683
1684 pos: 0
1685 flags: 02000000
1686 inotify wd:3 ino:9e7e sdev:800013 mask:800afce ignored_mask:0 fhandle-bytes:8 fhandle-type:1 f_handle:7e9e0000640d1b6d
1687
1688 where 'wd' is a watch descriptor in decimal form, ie a target file
1689 descriptor number, 'ino' and 'sdev' are inode and device where the
1690 target file resides and the 'mask' is the mask of events, all in hex
1691 form [see inotify(7) for more details].
1692
1693 If the kernel was built with exportfs support, the path to the target
1694 file is encoded as a file handle. The file handle is provided by three
1695 fields 'fhandle-bytes', 'fhandle-type' and 'f_handle', all in hex
1696 format.
1697
1698 If the kernel is built without exportfs support the file handle won't be
1699 printed out.
1700
1701 If there is no inotify mark attached yet the 'inotify' line will be omitted.
1702
1703 For fanotify files the format is
1704
1705 pos: 0
1706 flags: 02
1707 fanotify flags:10 event-flags:0
1708 fanotify mnt_id:12 mflags:40 mask:38 ignored_mask:40000003
1709 fanotify ino:4f969 sdev:800013 mflags:0 mask:3b ignored_mask:40000000 fhandle-bytes:8 fhandle-type:1 f_handle:69f90400c275b5b4
1710
1711 where fanotify 'flags' and 'event-flags' are values used in fanotify_init
1712 call, 'mnt_id' is the mount point identifier, 'mflags' is the value of
1713 flags associated with mark which are tracked separately from events
1714 mask. 'ino', 'sdev' are target inode and device, 'mask' is the events
1715 mask and 'ignored_mask' is the mask of events which are to be ignored.
1716 All in hex format. Incorporation of 'mflags', 'mask' and 'ignored_mask'
1717 does provide information about flags and mask used in fanotify_mark
1718 call [see fsnotify manpage for details].
1719
1720 While the first three lines are mandatory and always printed, the rest is
1721 optional and may be omitted if no marks created yet.
1722
1723
1590------------------------------------------------------------------------------ 1724------------------------------------------------------------------------------
1591Configuring procfs 1725Configuring procfs
1592------------------------------------------------------------------------------ 1726------------------------------------------------------------------------------
diff --git a/Documentation/filesystems/vfat.txt b/Documentation/filesystems/vfat.txt
index de1e6c4dccff..d230dd9c99b0 100644
--- a/Documentation/filesystems/vfat.txt
+++ b/Documentation/filesystems/vfat.txt
@@ -111,6 +111,15 @@ tz=UTC -- Interpret timestamps as UTC rather than local time.
111 useful when mounting devices (like digital cameras) 111 useful when mounting devices (like digital cameras)
112 that are set to UTC in order to avoid the pitfalls of 112 that are set to UTC in order to avoid the pitfalls of
113 local time. 113 local time.
114time_offset=minutes
115 -- Set offset for conversion of timestamps from local time
116 used by FAT to UTC. I.e. <minutes> minutes will be subtracted
117 from each timestamp to convert it to UTC used internally by
118 Linux. This is useful when time zone set in sys_tz is
119 not the time zone used by the filesystem. Note that this
120 option still does not provide correct time stamps in all
121 cases in presence of DST - time stamps in a different DST
122 setting will be off by one hour.
114 123
115showexec -- If set, the execute permission bits of the file will be 124showexec -- If set, the execute permission bits of the file will be
116 allowed only if the extension part of the name is .EXE, 125 allowed only if the extension part of the name is .EXE,
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index 2ee133e030c3..bc4b06b3160a 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -350,7 +350,6 @@ struct inode_operations {
350 int (*readlink) (struct dentry *, char __user *,int); 350 int (*readlink) (struct dentry *, char __user *,int);
351 void * (*follow_link) (struct dentry *, struct nameidata *); 351 void * (*follow_link) (struct dentry *, struct nameidata *);
352 void (*put_link) (struct dentry *, struct nameidata *, void *); 352 void (*put_link) (struct dentry *, struct nameidata *, void *);
353 void (*truncate) (struct inode *);
354 int (*permission) (struct inode *, int); 353 int (*permission) (struct inode *, int);
355 int (*get_acl)(struct inode *, int); 354 int (*get_acl)(struct inode *, int);
356 int (*setattr) (struct dentry *, struct iattr *); 355 int (*setattr) (struct dentry *, struct iattr *);
@@ -431,16 +430,6 @@ otherwise noted.
431 started might not be in the page cache at the end of the 430 started might not be in the page cache at the end of the
432 walk). 431 walk).
433 432
434 truncate: Deprecated. This will not be called if ->setsize is defined.
435 Called by the VFS to change the size of a file. The
436 i_size field of the inode is set to the desired size by the
437 VFS before this method is called. This method is called by
438 the truncate(2) system call and related functionality.
439
440 Note: ->truncate and vmtruncate are deprecated. Do not add new
441 instances/calls of these. Filesystems should be converted to do their
442 truncate sequence via ->setattr().
443
444 permission: called by the VFS to check for access rights on a POSIX-like 433 permission: called by the VFS to check for access rights on a POSIX-like
445 filesystem. 434 filesystem.
446 435
@@ -911,6 +900,7 @@ defined:
911 900
912struct dentry_operations { 901struct dentry_operations {
913 int (*d_revalidate)(struct dentry *, unsigned int); 902 int (*d_revalidate)(struct dentry *, unsigned int);
903 int (*d_weak_revalidate)(struct dentry *, unsigned int);
914 int (*d_hash)(const struct dentry *, const struct inode *, 904 int (*d_hash)(const struct dentry *, const struct inode *,
915 struct qstr *); 905 struct qstr *);
916 int (*d_compare)(const struct dentry *, const struct inode *, 906 int (*d_compare)(const struct dentry *, const struct inode *,
@@ -926,8 +916,13 @@ struct dentry_operations {
926 916
927 d_revalidate: called when the VFS needs to revalidate a dentry. This 917 d_revalidate: called when the VFS needs to revalidate a dentry. This
928 is called whenever a name look-up finds a dentry in the 918 is called whenever a name look-up finds a dentry in the
929 dcache. Most filesystems leave this as NULL, because all their 919 dcache. Most local filesystems leave this as NULL, because all their
930 dentries in the dcache are valid 920 dentries in the dcache are valid. Network filesystems are different
921 since things can change on the server without the client necessarily
922 being aware of it.
923
924 This function should return a positive value if the dentry is still
925 valid, and zero or a negative error code if it isn't.
931 926
932 d_revalidate may be called in rcu-walk mode (flags & LOOKUP_RCU). 927 d_revalidate may be called in rcu-walk mode (flags & LOOKUP_RCU).
933 If in rcu-walk mode, the filesystem must revalidate the dentry without 928 If in rcu-walk mode, the filesystem must revalidate the dentry without
@@ -938,6 +933,20 @@ struct dentry_operations {
938 If a situation is encountered that rcu-walk cannot handle, return 933 If a situation is encountered that rcu-walk cannot handle, return
939 -ECHILD and it will be called again in ref-walk mode. 934 -ECHILD and it will be called again in ref-walk mode.
940 935
936 d_weak_revalidate: called when the VFS needs to revalidate a "jumped" dentry.
937 This is called when a path-walk ends at dentry that was not acquired by
938 doing a lookup in the parent directory. This includes "/", "." and "..",
939 as well as procfs-style symlinks and mountpoint traversal.
940
941 In this case, we are less concerned with whether the dentry is still
942 fully correct, but rather that the inode is still valid. As with
943 d_revalidate, most local filesystems will set this to NULL since their
944 dcache entries are always valid.
945
946 This function has the same return code semantics as d_revalidate.
947
948 d_weak_revalidate is only called after leaving rcu-walk mode.
949
941 d_hash: called when the VFS adds a dentry to the hash table. The first 950 d_hash: called when the VFS adds a dentry to the hash table. The first
942 dentry passed to d_hash is the parent directory that the name is 951 dentry passed to d_hash is the parent directory that the name is
943 to be hashed into. The inode is the dentry's inode. 952 to be hashed into. The inode is the dentry's inode.
diff --git a/Documentation/filesystems/xfs.txt b/Documentation/filesystems/xfs.txt
index 3fc0c31a6f5d..3e4b3dd1e046 100644
--- a/Documentation/filesystems/xfs.txt
+++ b/Documentation/filesystems/xfs.txt
@@ -43,7 +43,7 @@ When mounting an XFS filesystem, the following options are accepted.
43 Issue command to let the block device reclaim space freed by the 43 Issue command to let the block device reclaim space freed by the
44 filesystem. This is useful for SSD devices, thinly provisioned 44 filesystem. This is useful for SSD devices, thinly provisioned
45 LUNs and virtual machine images, but may have a performance 45 LUNs and virtual machine images, but may have a performance
46 impact. This option is incompatible with the nodelaylog option. 46 impact.
47 47
48 dmapi 48 dmapi
49 Enable the DMAPI (Data Management API) event callouts. 49 Enable the DMAPI (Data Management API) event callouts.
@@ -72,8 +72,15 @@ When mounting an XFS filesystem, the following options are accepted.
72 Indicates that XFS is allowed to create inodes at any location 72 Indicates that XFS is allowed to create inodes at any location
73 in the filesystem, including those which will result in inode 73 in the filesystem, including those which will result in inode
74 numbers occupying more than 32 bits of significance. This is 74 numbers occupying more than 32 bits of significance. This is
75 provided for backwards compatibility, but causes problems for 75 the default allocation option. Applications which do not handle
76 backup applications that cannot handle large inode numbers. 76 inode numbers bigger than 32 bits, should use inode32 option.
77
78 inode32
79 Indicates that XFS is limited to create inodes at locations which
80 will not result in inode numbers with more than 32 bits of
81 significance. This is provided for backwards compatibility, since
82 64 bits inode numbers might cause problems for some applications
83 that cannot handle large inode numbers.
77 84
78 largeio/nolargeio 85 largeio/nolargeio
79 If "nolargeio" is specified, the optimal I/O reported in 86 If "nolargeio" is specified, the optimal I/O reported in
diff --git a/Documentation/firmware_class/README b/Documentation/firmware_class/README
index 815b711bcd85..43fada989e65 100644
--- a/Documentation/firmware_class/README
+++ b/Documentation/firmware_class/README
@@ -22,12 +22,17 @@
22 - calls request_firmware(&fw_entry, $FIRMWARE, device) 22 - calls request_firmware(&fw_entry, $FIRMWARE, device)
23 - kernel searchs the fimware image with name $FIRMWARE directly 23 - kernel searchs the fimware image with name $FIRMWARE directly
24 in the below search path of root filesystem: 24 in the below search path of root filesystem:
25 User customized search path by module parameter 'path'[1]
25 "/lib/firmware/updates/" UTS_RELEASE, 26 "/lib/firmware/updates/" UTS_RELEASE,
26 "/lib/firmware/updates", 27 "/lib/firmware/updates",
27 "/lib/firmware/" UTS_RELEASE, 28 "/lib/firmware/" UTS_RELEASE,
28 "/lib/firmware" 29 "/lib/firmware"
29 - If found, goto 7), else goto 2) 30 - If found, goto 7), else goto 2)
30 31
32 [1], the 'path' is a string parameter which length should be less
33 than 256, user should pass 'firmware_class.path=$CUSTOMIZED_PATH'
34 if firmware_class is built in kernel(the general situation)
35
31 2), userspace: 36 2), userspace:
32 - /sys/class/firmware/xxx/{loading,data} appear. 37 - /sys/class/firmware/xxx/{loading,data} appear.
33 - hotplug gets called with a firmware identifier in $FIRMWARE 38 - hotplug gets called with a firmware identifier in $FIRMWARE
@@ -114,3 +119,10 @@
114 on the setup, so I think that the choice on what firmware to make 119 on the setup, so I think that the choice on what firmware to make
115 persistent should be left to userspace. 120 persistent should be left to userspace.
116 121
122 about firmware cache:
123 --------------------
124 After firmware cache mechanism is introduced during system sleep,
125 request_firmware can be called safely inside device's suspend and
126 resume callback, and callers need't cache the firmware by
127 themselves any more for dealing with firmware loss during system
128 resume.
diff --git a/Documentation/gpio.txt b/Documentation/gpio.txt
index e08a883de36e..77a1d11af723 100644
--- a/Documentation/gpio.txt
+++ b/Documentation/gpio.txt
@@ -439,6 +439,48 @@ slower clock delays the rising edge of SCK, and the I2C master adjusts its
439signaling rate accordingly. 439signaling rate accordingly.
440 440
441 441
442GPIO controllers and the pinctrl subsystem
443------------------------------------------
444
445A GPIO controller on a SOC might be tightly coupled with the pinctrl
446subsystem, in the sense that the pins can be used by other functions
447together with an optional gpio feature. We have already covered the
448case where e.g. a GPIO controller need to reserve a pin or set the
449direction of a pin by calling any of:
450
451pinctrl_request_gpio()
452pinctrl_free_gpio()
453pinctrl_gpio_direction_input()
454pinctrl_gpio_direction_output()
455
456But how does the pin control subsystem cross-correlate the GPIO
457numbers (which are a global business) to a certain pin on a certain
458pin controller?
459
460This is done by registering "ranges" of pins, which are essentially
461cross-reference tables. These are described in
462Documentation/pinctrl.txt
463
464While the pin allocation is totally managed by the pinctrl subsystem,
465gpio (under gpiolib) is still maintained by gpio drivers. It may happen
466that different pin ranges in a SoC is managed by different gpio drivers.
467
468This makes it logical to let gpio drivers announce their pin ranges to
469the pin ctrl subsystem before it will call 'pinctrl_request_gpio' in order
470to request the corresponding pin to be prepared by the pinctrl subsystem
471before any gpio usage.
472
473For this, the gpio controller can register its pin range with pinctrl
474subsystem. There are two ways of doing it currently: with or without DT.
475
476For with DT support refer to Documentation/devicetree/bindings/gpio/gpio.txt.
477
478For non-DT support, user can call gpiochip_add_pin_range() with appropriate
479parameters to register a range of gpio pins with a pinctrl driver. For this
480exact name string of pinctrl device has to be passed as one of the
481argument to this routine.
482
483
442What do these conventions omit? 484What do these conventions omit?
443=============================== 485===============================
444One of the biggest things these conventions omit is pin multiplexing, since 486One of the biggest things these conventions omit is pin multiplexing, since
diff --git a/Documentation/hid/hid-sensor.txt b/Documentation/hid/hid-sensor.txt
index 948b0989c433..948b0989c433 100755..100644
--- a/Documentation/hid/hid-sensor.txt
+++ b/Documentation/hid/hid-sensor.txt
diff --git a/Documentation/hid/uhid.txt b/Documentation/hid/uhid.txt
index 4627c4241ece..3c741214dfbb 100644
--- a/Documentation/hid/uhid.txt
+++ b/Documentation/hid/uhid.txt
@@ -108,7 +108,7 @@ the request was handled successfully.
108 UHID_FEATURE_ANSWER: 108 UHID_FEATURE_ANSWER:
109 If you receive a UHID_FEATURE request you must answer with this request. You 109 If you receive a UHID_FEATURE request you must answer with this request. You
110 must copy the "id" field from the request into the answer. Set the "err" field 110 must copy the "id" field from the request into the answer. Set the "err" field
111 to 0 if no error occured or to EIO if an I/O error occurred. 111 to 0 if no error occurred or to EIO if an I/O error occurred.
112 If "err" is 0 then you should fill the buffer of the answer with the results 112 If "err" is 0 then you should fill the buffer of the answer with the results
113 of the feature request and set "size" correspondingly. 113 of the feature request and set "size" correspondingly.
114 114
diff --git a/Documentation/hwmon/adm1275 b/Documentation/hwmon/adm1275
index 2cfa25667123..15b4a20d5062 100644
--- a/Documentation/hwmon/adm1275
+++ b/Documentation/hwmon/adm1275
@@ -15,7 +15,7 @@ Supported chips:
15 Addresses scanned: - 15 Addresses scanned: -
16 Datasheet: www.analog.com/static/imported-files/data_sheets/ADM1276.pdf 16 Datasheet: www.analog.com/static/imported-files/data_sheets/ADM1276.pdf
17 17
18Author: Guenter Roeck <guenter.roeck@ericsson.com> 18Author: Guenter Roeck <linux@roeck-us.net>
19 19
20 20
21Description 21Description
diff --git a/Documentation/hwmon/ads7828 b/Documentation/hwmon/ads7828
index 2bbebe6f771f..f6e263e0f607 100644
--- a/Documentation/hwmon/ads7828
+++ b/Documentation/hwmon/ads7828
@@ -4,29 +4,47 @@ Kernel driver ads7828
4Supported chips: 4Supported chips:
5 * Texas Instruments/Burr-Brown ADS7828 5 * Texas Instruments/Burr-Brown ADS7828
6 Prefix: 'ads7828' 6 Prefix: 'ads7828'
7 Addresses scanned: I2C 0x48, 0x49, 0x4a, 0x4b 7 Datasheet: Publicly available at the Texas Instruments website:
8 Datasheet: Publicly available at the Texas Instruments website :
9 http://focus.ti.com/lit/ds/symlink/ads7828.pdf 8 http://focus.ti.com/lit/ds/symlink/ads7828.pdf
10 9
10 * Texas Instruments ADS7830
11 Prefix: 'ads7830'
12 Datasheet: Publicly available at the Texas Instruments website:
13 http://focus.ti.com/lit/ds/symlink/ads7830.pdf
14
11Authors: 15Authors:
12 Steve Hardy <shardy@redhat.com> 16 Steve Hardy <shardy@redhat.com>
17 Vivien Didelot <vivien.didelot@savoirfairelinux.com>
18 Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
19
20Platform data
21-------------
22
23The ads7828 driver accepts an optional ads7828_platform_data structure (defined
24in include/linux/platform_data/ads7828.h). The structure fields are:
13 25
14Module Parameters 26* diff_input: (bool) Differential operation
15----------------- 27 set to true for differential mode, false for default single ended mode.
16 28
17* se_input: bool (default Y) 29* ext_vref: (bool) External reference
18 Single ended operation - set to N for differential mode 30 set to true if it operates with an external reference, false for default
19* int_vref: bool (default Y) 31 internal reference.
20 Operate with the internal 2.5V reference - set to N for external reference 32
21* vref_mv: int (default 2500) 33* vref_mv: (unsigned int) Voltage reference
22 If using an external reference, set this to the reference voltage in mV 34 if using an external reference, set this to the reference voltage in mV,
35 otherwise it will default to the internal value (2500mV). This value will be
36 bounded with limits accepted by the chip, described in the datasheet.
37
38 If no structure is provided, the configuration defaults to single ended
39 operation and internal voltage reference (2.5V).
23 40
24Description 41Description
25----------- 42-----------
26 43
27This driver implements support for the Texas Instruments ADS7828. 44This driver implements support for the Texas Instruments ADS7828 and ADS7830.
28 45
29This device is a 12-bit 8-channel A-D converter. 46The ADS7828 device is a 12-bit 8-channel A/D converter, while the ADS7830 does
478-bit sampling.
30 48
31It can operate in single ended mode (8 +ve inputs) or in differential mode, 49It can operate in single ended mode (8 +ve inputs) or in differential mode,
32where 4 differential pairs can be measured. 50where 4 differential pairs can be measured.
@@ -34,3 +52,7 @@ where 4 differential pairs can be measured.
34The chip also has the facility to use an external voltage reference. This 52The chip also has the facility to use an external voltage reference. This
35may be required if your hardware supplies the ADS7828 from a 5V supply, see 53may be required if your hardware supplies the ADS7828 from a 5V supply, see
36the datasheet for more details. 54the datasheet for more details.
55
56There is no reliable way to identify this chip, so the driver will not scan
57some addresses to try to auto-detect it. That means that you will have to
58statically declare the device in the platform support code.
diff --git a/Documentation/hwmon/adt7410 b/Documentation/hwmon/adt7410
index 96004000dc2a..58150c480e56 100644
--- a/Documentation/hwmon/adt7410
+++ b/Documentation/hwmon/adt7410
@@ -4,9 +4,14 @@ Kernel driver adt7410
4Supported chips: 4Supported chips:
5 * Analog Devices ADT7410 5 * Analog Devices ADT7410
6 Prefix: 'adt7410' 6 Prefix: 'adt7410'
7 Addresses scanned: I2C 0x48 - 0x4B 7 Addresses scanned: None
8 Datasheet: Publicly available at the Analog Devices website 8 Datasheet: Publicly available at the Analog Devices website
9 http://www.analog.com/static/imported-files/data_sheets/ADT7410.pdf 9 http://www.analog.com/static/imported-files/data_sheets/ADT7410.pdf
10 * Analog Devices ADT7420
11 Prefix: 'adt7420'
12 Addresses scanned: None
13 Datasheet: Publicly available at the Analog Devices website
14 http://www.analog.com/static/imported-files/data_sheets/ADT7420.pdf
10 15
11Author: Hartmut Knaack <knaack.h@gmx.de> 16Author: Hartmut Knaack <knaack.h@gmx.de>
12 17
@@ -27,6 +32,10 @@ value per second or even justget one sample on demand for power saving.
27Besides, it can completely power down its ADC, if power management is 32Besides, it can completely power down its ADC, if power management is
28required. 33required.
29 34
35The ADT7420 is register compatible, the only differences being the package,
36a slightly narrower operating temperature range (-40°C to +150°C), and a
37better accuracy (0.25°C instead of 0.50°C.)
38
30Configuration Notes 39Configuration Notes
31------------------- 40-------------------
32 41
diff --git a/Documentation/hwmon/coretemp b/Documentation/hwmon/coretemp
index f17256f069ba..fec5a9bf755f 100644
--- a/Documentation/hwmon/coretemp
+++ b/Documentation/hwmon/coretemp
@@ -66,6 +66,7 @@ Process Processor TjMax(C)
66 i5 3470T 91 66 i5 3470T 91
67 67
6832nm Core i3/i5/i7 Processors 6832nm Core i3/i5/i7 Processors
69 i7 2600 98
69 i7 660UM/640/620, 640LM/620, 620M, 610E 105 70 i7 660UM/640/620, 640LM/620, 620M, 610E 105
70 i5 540UM/520/430, 540M/520/450/430 105 71 i5 540UM/520/430, 540M/520/450/430 105
71 i3 330E, 370M/350/330 90 rPGA, 105 BGA 72 i3 330E, 370M/350/330 90 rPGA, 105 BGA
@@ -79,7 +80,10 @@ Process Processor TjMax(C)
79 P4505/P4500 90 80 P4505/P4500 90
80 81
8132nm Atom Processors 8232nm Atom Processors
83 S1260/1220 95
84 S1240 102
82 Z2460 90 85 Z2460 90
86 Z2760 90
83 D2700/2550/2500 100 87 D2700/2550/2500 100
84 N2850/2800/2650/2600 100 88 N2850/2800/2650/2600 100
85 89
@@ -98,14 +102,21 @@ Process Processor TjMax(C)
98 102
9945nm Atom Processors 10345nm Atom Processors
100 D525/510/425/410 100 104 D525/510/425/410 100
105 K525/510/425/410 100
106 Z670/650 90
101 Z560/550/540/530P/530/520PT/520/515/510PT/510P 90 107 Z560/550/540/530P/530/520PT/520/515/510PT/510P 90
102 Z510/500 90 108 Z510/500 90
109 N570/550 100
103 N475/470/455/450 100 110 N475/470/455/450 100
104 N280/270 90 111 N280/270 90
105 330/230 125 112 330/230 125
106 E680/660/640/620 90 113 E680/660/640/620 90
107 E680T/660T/640T/620T 110 114 E680T/660T/640T/620T 110
115 E665C/645C 90
116 E665CT/645CT 110
108 CE4170/4150/4110 110 117 CE4170/4150/4110 110
118 CE4200 series unknown
119 CE5300 series unknown
109 120
11045nm Core2 Processors 12145nm Core2 Processors
111 Solo ULV SU3500/3300 100 122 Solo ULV SU3500/3300 100
diff --git a/Documentation/hwmon/da9055 b/Documentation/hwmon/da9055
new file mode 100644
index 000000000000..855c3f536e00
--- /dev/null
+++ b/Documentation/hwmon/da9055
@@ -0,0 +1,47 @@
1Supported chips:
2 * Dialog Semiconductors DA9055 PMIC
3 Prefix: 'da9055'
4 Datasheet: Datasheet is not publicly available.
5
6Authors: David Dajun Chen <dchen@diasemi.com>
7
8Description
9-----------
10
11The DA9055 provides an Analogue to Digital Converter (ADC) with 10 bits
12resolution and track and hold circuitry combined with an analogue input
13multiplexer. The analogue input multiplexer will allow conversion of up to 5
14different inputs. The track and hold circuit ensures stable input voltages at
15the input of the ADC during the conversion.
16
17The ADC is used to measure the following inputs:
18Channel 0: VDDOUT - measurement of the system voltage
19Channel 1: ADC_IN1 - high impedance input (0 - 2.5V)
20Channel 2: ADC_IN2 - high impedance input (0 - 2.5V)
21Channel 3: ADC_IN3 - high impedance input (0 - 2.5V)
22Channel 4: Internal Tjunc. - sense (internal temp. sensor)
23
24By using sysfs attributes we can measure the system voltage VDDOUT,
25chip junction temperature and auxiliary channels voltages.
26
27Voltage Monitoring
28------------------
29
30Voltages are sampled in a AUTO mode it can be manually sampled too and results
31are stored in a 10 bit ADC.
32
33The system voltage is calculated as:
34 Milli volt = ((ADC value * 1000) / 85) + 2500
35
36The voltages on ADC channels 1, 2 and 3 are calculated as:
37 Milli volt = (ADC value * 1000) / 102
38
39Temperature Monitoring
40----------------------
41
42Temperatures are sampled by a 10 bit ADC. Junction temperatures
43are monitored by the ADC channels.
44
45The junction temperature is calculated:
46 Degrees celsius = -0.4084 * (ADC_RES - T_OFFSET) + 307.6332
47The junction temperature attribute is supported by the driver.
diff --git a/Documentation/hwmon/ina209 b/Documentation/hwmon/ina209
new file mode 100644
index 000000000000..672501de4509
--- /dev/null
+++ b/Documentation/hwmon/ina209
@@ -0,0 +1,93 @@
1Kernel driver ina209
2=====================
3
4Supported chips:
5 * Burr-Brown / Texas Instruments INA209
6 Prefix: 'ina209'
7 Addresses scanned: -
8 Datasheet:
9 http://www.ti.com/lit/gpn/ina209
10
11Author: Paul Hays <Paul.Hays@cattail.ca>
12Author: Ira W. Snyder <iws@ovro.caltech.edu>
13Author: Guenter Roeck <linux@roeck-us.net>
14
15
16Description
17-----------
18
19The TI / Burr-Brown INA209 monitors voltage, current, and power on the high side
20of a D.C. power supply. It can perform measurements and calculations in the
21background to supply readings at any time. It includes a programmable
22calibration multiplier to scale the displayed current and power values.
23
24
25Sysfs entries
26-------------
27
28The INA209 chip is highly configurable both via hardwiring and via
29the I2C bus. See the datasheet for details.
30
31This tries to expose most monitoring features of the hardware via
32sysfs. It does not support every feature of this chip.
33
34
35in0_input shunt voltage (mV)
36in0_input_highest shunt voltage historical maximum reading (mV)
37in0_input_lowest shunt voltage historical minimum reading (mV)
38in0_reset_history reset shunt voltage history
39in0_max shunt voltage max alarm limit (mV)
40in0_min shunt voltage min alarm limit (mV)
41in0_crit_max shunt voltage crit max alarm limit (mV)
42in0_crit_min shunt voltage crit min alarm limit (mV)
43in0_max_alarm shunt voltage max alarm limit exceeded
44in0_min_alarm shunt voltage min alarm limit exceeded
45in0_crit_max_alarm shunt voltage crit max alarm limit exceeded
46in0_crit_min_alarm shunt voltage crit min alarm limit exceeded
47
48in1_input bus voltage (mV)
49in1_input_highest bus voltage historical maximum reading (mV)
50in1_input_lowest bus voltage historical minimum reading (mV)
51in1_reset_history reset bus voltage history
52in1_max bus voltage max alarm limit (mV)
53in1_min bus voltage min alarm limit (mV)
54in1_crit_max bus voltage crit max alarm limit (mV)
55in1_crit_min bus voltage crit min alarm limit (mV)
56in1_max_alarm bus voltage max alarm limit exceeded
57in1_min_alarm bus voltage min alarm limit exceeded
58in1_crit_max_alarm bus voltage crit max alarm limit exceeded
59in1_crit_min_alarm bus voltage crit min alarm limit exceeded
60
61power1_input power measurement (uW)
62power1_input_highest power historical maximum reading (uW)
63power1_reset_history reset power history
64power1_max power max alarm limit (uW)
65power1_crit power crit alarm limit (uW)
66power1_max_alarm power max alarm limit exceeded
67power1_crit_alarm power crit alarm limit exceeded
68
69curr1_input current measurement (mA)
70
71update_interval data conversion time; affects number of samples used
72 to average results for shunt and bus voltages.
73
74General Remarks
75---------------
76
77The power and current registers in this chip require that the calibration
78register is programmed correctly before they are used. Normally this is expected
79to be done in the BIOS. In the absence of BIOS programming, the shunt resistor
80voltage can be provided using platform data. The driver uses platform data from
81the ina2xx driver for this purpose. If calibration register data is not provided
82via platform data, the driver checks if the calibration register has been
83programmed (ie has a value not equal to zero). If so, this value is retained.
84Otherwise, a default value reflecting a shunt resistor value of 10 mOhm is
85programmed into the calibration register.
86
87
88Output Pins
89-----------
90
91Output pin programming is a board feature which depends on the BIOS. It is
92outside the scope of a hardware monitoring driver to enable or disable output
93pins.
diff --git a/Documentation/hwmon/it87 b/Documentation/hwmon/it87
index 87850d86c559..c263740f0cba 100644
--- a/Documentation/hwmon/it87
+++ b/Documentation/hwmon/it87
@@ -30,6 +30,14 @@ Supported chips:
30 Prefix: 'it8728' 30 Prefix: 'it8728'
31 Addresses scanned: from Super I/O config space (8 I/O ports) 31 Addresses scanned: from Super I/O config space (8 I/O ports)
32 Datasheet: Not publicly available 32 Datasheet: Not publicly available
33 * IT8771E
34 Prefix: 'it8771'
35 Addresses scanned: from Super I/O config space (8 I/O ports)
36 Datasheet: Not publicly available
37 * IT8772E
38 Prefix: 'it8772'
39 Addresses scanned: from Super I/O config space (8 I/O ports)
40 Datasheet: Not publicly available
33 * IT8782F 41 * IT8782F
34 Prefix: 'it8782' 42 Prefix: 'it8782'
35 Addresses scanned: from Super I/O config space (8 I/O ports) 43 Addresses scanned: from Super I/O config space (8 I/O ports)
@@ -83,8 +91,8 @@ Description
83----------- 91-----------
84 92
85This driver implements support for the IT8705F, IT8712F, IT8716F, 93This driver implements support for the IT8705F, IT8712F, IT8716F,
86IT8718F, IT8720F, IT8721F, IT8726F, IT8728F, IT8758E, IT8781F, IT8782F, 94IT8718F, IT8720F, IT8721F, IT8726F, IT8728F, IT8758E, IT8771E, IT8772E,
87IT8783E/F, and SiS950 chips. 95IT8782F, IT8783E/F, and SiS950 chips.
88 96
89These chips are 'Super I/O chips', supporting floppy disks, infrared ports, 97These chips are 'Super I/O chips', supporting floppy disks, infrared ports,
90joysticks and other miscellaneous stuff. For hardware monitoring, they 98joysticks and other miscellaneous stuff. For hardware monitoring, they
@@ -118,8 +126,8 @@ The IT8726F is just bit enhanced IT8716F with additional hardware
118for AMD power sequencing. Therefore the chip will appear as IT8716F 126for AMD power sequencing. Therefore the chip will appear as IT8716F
119to userspace applications. 127to userspace applications.
120 128
121The IT8728F is considered compatible with the IT8721F, until a datasheet 129The IT8728F, IT8771E, and IT8772E are considered compatible with the IT8721F,
122becomes available (hopefully.) 130until a datasheet becomes available (hopefully.)
123 131
124Temperatures are measured in degrees Celsius. An alarm is triggered once 132Temperatures are measured in degrees Celsius. An alarm is triggered once
125when the Overtemperature Shutdown limit is crossed. 133when the Overtemperature Shutdown limit is crossed.
@@ -209,3 +217,13 @@ doesn't use CPU cycles.
209Trip points must be set properly before switching to automatic fan speed 217Trip points must be set properly before switching to automatic fan speed
210control mode. The driver will perform basic integrity checks before 218control mode. The driver will perform basic integrity checks before
211actually switching to automatic control mode. 219actually switching to automatic control mode.
220
221
222Temperature offset attributes
223-----------------------------
224
225The driver supports temp[1-3]_offset sysfs attributes to adjust the reported
226temperature for thermal diodes or diode-connected thermal transistors.
227If a temperature sensor is configured for thermistors, the attribute values
228are ignored. If the thermal sensor type is Intel PECI, the temperature offset
229must be programmed to the critical CPU temperature.
diff --git a/Documentation/hwmon/jc42 b/Documentation/hwmon/jc42
index 66ecb9fc8246..868d74d6b773 100644
--- a/Documentation/hwmon/jc42
+++ b/Documentation/hwmon/jc42
@@ -17,12 +17,13 @@ Supported chips:
17 * Maxim MAX6604 17 * Maxim MAX6604
18 Datasheets: 18 Datasheets:
19 http://datasheets.maxim-ic.com/en/ds/MAX6604.pdf 19 http://datasheets.maxim-ic.com/en/ds/MAX6604.pdf
20 * Microchip MCP9804, MCP9805, MCP98242, MCP98243, MCP9843 20 * Microchip MCP9804, MCP9805, MCP98242, MCP98243, MCP98244, MCP9843
21 Datasheets: 21 Datasheets:
22 http://ww1.microchip.com/downloads/en/DeviceDoc/22203C.pdf 22 http://ww1.microchip.com/downloads/en/DeviceDoc/22203C.pdf
23 http://ww1.microchip.com/downloads/en/DeviceDoc/21977b.pdf 23 http://ww1.microchip.com/downloads/en/DeviceDoc/21977b.pdf
24 http://ww1.microchip.com/downloads/en/DeviceDoc/21996a.pdf 24 http://ww1.microchip.com/downloads/en/DeviceDoc/21996a.pdf
25 http://ww1.microchip.com/downloads/en/DeviceDoc/22153c.pdf 25 http://ww1.microchip.com/downloads/en/DeviceDoc/22153c.pdf
26 http://ww1.microchip.com/downloads/en/DeviceDoc/22327A.pdf
26 * NXP Semiconductors SE97, SE97B, SE98, SE98A 27 * NXP Semiconductors SE97, SE97B, SE98, SE98A
27 Datasheets: 28 Datasheets:
28 http://www.nxp.com/documents/data_sheet/SE97.pdf 29 http://www.nxp.com/documents/data_sheet/SE97.pdf
@@ -48,7 +49,7 @@ Supported chips:
48 Addresses scanned: I2C 0x18 - 0x1f 49 Addresses scanned: I2C 0x18 - 0x1f
49 50
50Author: 51Author:
51 Guenter Roeck <guenter.roeck@ericsson.com> 52 Guenter Roeck <linux@roeck-us.net>
52 53
53 54
54Description 55Description
diff --git a/Documentation/hwmon/lineage-pem b/Documentation/hwmon/lineage-pem
index 2ba5ed126858..83b2ddc160c8 100644
--- a/Documentation/hwmon/lineage-pem
+++ b/Documentation/hwmon/lineage-pem
@@ -8,7 +8,7 @@ Supported devices:
8 Documentation: 8 Documentation:
9 http://www.lineagepower.com/oem/pdf/CPLI2C.pdf 9 http://www.lineagepower.com/oem/pdf/CPLI2C.pdf
10 10
11Author: Guenter Roeck <guenter.roeck@ericsson.com> 11Author: Guenter Roeck <linux@roeck-us.net>
12 12
13 13
14Description 14Description
diff --git a/Documentation/hwmon/lm25066 b/Documentation/hwmon/lm25066
index a21db81c4591..26025e419d35 100644
--- a/Documentation/hwmon/lm25066
+++ b/Documentation/hwmon/lm25066
@@ -19,7 +19,7 @@ Supported chips:
19 Datasheet: 19 Datasheet:
20 http://www.national.com/pf/LM/LM5066.html 20 http://www.national.com/pf/LM/LM5066.html
21 21
22Author: Guenter Roeck <guenter.roeck@ericsson.com> 22Author: Guenter Roeck <linux@roeck-us.net>
23 23
24 24
25Description 25Description
diff --git a/Documentation/hwmon/lm73 b/Documentation/hwmon/lm73
new file mode 100644
index 000000000000..8af059dcb642
--- /dev/null
+++ b/Documentation/hwmon/lm73
@@ -0,0 +1,90 @@
1Kernel driver lm73
2==================
3
4Supported chips:
5 * Texas Instruments LM73
6 Prefix: 'lm73'
7 Addresses scanned: I2C 0x48, 0x49, 0x4a, 0x4c, 0x4d, and 0x4e
8 Datasheet: Publicly available at the Texas Instruments website
9 http://www.ti.com/product/lm73
10
11Author: Guillaume Ligneul <guillaume.ligneul@gmail.com>
12Documentation: Chris Verges <kg4ysn@gmail.com>
13
14
15Description
16-----------
17
18The LM73 is a digital temperature sensor. All temperature values are
19given in degrees Celsius.
20
21Measurement Resolution Support
22------------------------------
23
24The LM73 supports four resolutions, defined in terms of degrees C per
25LSB: 0.25, 0.125, 0.0625, and 0.3125. Changing the resolution mode
26affects the conversion time of the LM73's analog-to-digital converter.
27From userspace, the desired resolution can be specified as a function of
28conversion time via the 'update_interval' sysfs attribute for the
29device. This attribute will normalize ranges of input values to the
30maximum times defined for the resolution in the datasheet.
31
32 Resolution Conv. Time Input Range
33 (C/LSB) (msec) (msec)
34 --------------------------------------
35 0.25 14 0..14
36 0.125 28 15..28
37 0.0625 56 29..56
38 0.03125 112 57..infinity
39 --------------------------------------
40
41The following examples show how the 'update_interval' attribute can be
42used to change the conversion time:
43
44 $ echo 0 > update_interval
45 $ cat update_interval
46 14
47 $ cat temp1_input
48 24250
49
50 $ echo 22 > update_interval
51 $ cat update_interval
52 28
53 $ cat temp1_input
54 24125
55
56 $ echo 56 > update_interval
57 $ cat update_interval
58 56
59 $ cat temp1_input
60 24062
61
62 $ echo 85 > update_interval
63 $ cat update_interval
64 112
65 $ cat temp1_input
66 24031
67
68As shown here, the lm73 driver automatically adjusts any user input for
69'update_interval' via a step function. Reading back the
70'update_interval' value after a write operation will confirm the
71conversion time actively in use.
72
73Mathematically, the resolution can be derived from the conversion time
74via the following function:
75
76 g(x) = 0.250 * [log(x/14) / log(2)]
77
78where 'x' is the output from 'update_interval' and 'g(x)' is the
79resolution in degrees C per LSB.
80
81Alarm Support
82-------------
83
84The LM73 features a simple over-temperature alarm mechanism. This
85feature is exposed via the sysfs attributes.
86
87The attributes 'temp1_max_alarm' and 'temp1_min_alarm' are flags
88provided by the LM73 that indicate whether the measured temperature has
89passed the 'temp1_max' and 'temp1_min' thresholds, respectively. These
90values _must_ be read to clear the registers on the LM73.
diff --git a/Documentation/hwmon/ltc2978 b/Documentation/hwmon/ltc2978
index c365f9beb5dd..e4d75c606c97 100644
--- a/Documentation/hwmon/ltc2978
+++ b/Documentation/hwmon/ltc2978
@@ -5,13 +5,13 @@ Supported chips:
5 * Linear Technology LTC2978 5 * Linear Technology LTC2978
6 Prefix: 'ltc2978' 6 Prefix: 'ltc2978'
7 Addresses scanned: - 7 Addresses scanned: -
8 Datasheet: http://cds.linear.com/docs/Datasheet/2978fa.pdf 8 Datasheet: http://www.linear.com/product/ltc2978
9 * Linear Technology LTC3880 9 * Linear Technology LTC3880
10 Prefix: 'ltc3880' 10 Prefix: 'ltc3880'
11 Addresses scanned: - 11 Addresses scanned: -
12 Datasheet: http://cds.linear.com/docs/Datasheet/3880f.pdf 12 Datasheet: http://www.linear.com/product/ltc3880
13 13
14Author: Guenter Roeck <guenter.roeck@ericsson.com> 14Author: Guenter Roeck <linux@roeck-us.net>
15 15
16 16
17Description 17Description
diff --git a/Documentation/hwmon/ltc4261 b/Documentation/hwmon/ltc4261
index eba2e2c4b94d..9378a75c6134 100644
--- a/Documentation/hwmon/ltc4261
+++ b/Documentation/hwmon/ltc4261
@@ -8,7 +8,7 @@ Supported chips:
8 Datasheet: 8 Datasheet:
9 http://cds.linear.com/docs/Datasheet/42612fb.pdf 9 http://cds.linear.com/docs/Datasheet/42612fb.pdf
10 10
11Author: Guenter Roeck <guenter.roeck@ericsson.com> 11Author: Guenter Roeck <linux@roeck-us.net>
12 12
13 13
14Description 14Description
diff --git a/Documentation/hwmon/max16064 b/Documentation/hwmon/max16064
index f8b478076f6d..d59cc7829bec 100644
--- a/Documentation/hwmon/max16064
+++ b/Documentation/hwmon/max16064
@@ -7,7 +7,7 @@ Supported chips:
7 Addresses scanned: - 7 Addresses scanned: -
8 Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX16064.pdf 8 Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX16064.pdf
9 9
10Author: Guenter Roeck <guenter.roeck@ericsson.com> 10Author: Guenter Roeck <linux@roeck-us.net>
11 11
12 12
13Description 13Description
diff --git a/Documentation/hwmon/max16065 b/Documentation/hwmon/max16065
index c11f64a1f2ad..208a29e43010 100644
--- a/Documentation/hwmon/max16065
+++ b/Documentation/hwmon/max16065
@@ -24,7 +24,7 @@ Supported chips:
24 http://datasheets.maxim-ic.com/en/ds/MAX16070-MAX16071.pdf 24 http://datasheets.maxim-ic.com/en/ds/MAX16070-MAX16071.pdf
25 25
26 26
27Author: Guenter Roeck <guenter.roeck@ericsson.com> 27Author: Guenter Roeck <linux@roeck-us.net>
28 28
29 29
30Description 30Description
diff --git a/Documentation/hwmon/max34440 b/Documentation/hwmon/max34440
index 04482226db20..37cbf472a19d 100644
--- a/Documentation/hwmon/max34440
+++ b/Documentation/hwmon/max34440
@@ -16,8 +16,18 @@ Supported chips:
16 Prefixes: 'max34446' 16 Prefixes: 'max34446'
17 Addresses scanned: - 17 Addresses scanned: -
18 Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX34446.pdf 18 Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX34446.pdf
19 * Maxim MAX34460
20 PMBus 12-Channel Voltage Monitor & Sequencer
21 Prefix: 'max34460'
22 Addresses scanned: -
23 Datasheet: http://datasheets.maximintegrated.com/en/ds/MAX34460.pdf
24 * Maxim MAX34461
25 PMBus 16-Channel Voltage Monitor & Sequencer
26 Prefix: 'max34461'
27 Addresses scanned: -
28 Datasheet: http://datasheets.maximintegrated.com/en/ds/MAX34461.pdf
19 29
20Author: Guenter Roeck <guenter.roeck@ericsson.com> 30Author: Guenter Roeck <linux@roeck-us.net>
21 31
22 32
23Description 33Description
@@ -26,6 +36,9 @@ Description
26This driver supports hardware montoring for Maxim MAX34440 PMBus 6-Channel 36This driver supports hardware montoring for Maxim MAX34440 PMBus 6-Channel
27Power-Supply Manager, MAX34441 PMBus 5-Channel Power-Supply Manager 37Power-Supply Manager, MAX34441 PMBus 5-Channel Power-Supply Manager
28and Intelligent Fan Controller, and MAX34446 PMBus Power-Supply Data Logger. 38and Intelligent Fan Controller, and MAX34446 PMBus Power-Supply Data Logger.
39It also supports the MAX34460 and MAX34461 PMBus Voltage Monitor & Sequencers.
40The MAX34460 supports 12 voltage channels, and the MAX34461 supports 16 voltage
41channels.
29 42
30The driver is a client driver to the core PMBus driver. Please see 43The driver is a client driver to the core PMBus driver. Please see
31Documentation/hwmon/pmbus for details on PMBus client drivers. 44Documentation/hwmon/pmbus for details on PMBus client drivers.
@@ -109,3 +122,6 @@ temp[1-8]_reset_history Write any value to reset history.
109 122
110 temp7 and temp8 attributes only exist for MAX34440. 123 temp7 and temp8 attributes only exist for MAX34440.
111 MAX34446 only supports temp[1-3]. 124 MAX34446 only supports temp[1-3].
125
126MAX34460 supports attribute groups in[1-12] and temp[1-5].
127MAX34461 supports attribute groups in[1-16] and temp[1-5].
diff --git a/Documentation/hwmon/max6697 b/Documentation/hwmon/max6697
new file mode 100644
index 000000000000..6594177ededa
--- /dev/null
+++ b/Documentation/hwmon/max6697
@@ -0,0 +1,58 @@
1Kernel driver max6697
2=====================
3
4Supported chips:
5 * Maxim MAX6581
6 Prefix: 'max6581'
7 Datasheet: http://datasheets.maximintegrated.com/en/ds/MAX6581.pdf
8 * Maxim MAX6602
9 Prefix: 'max6602'
10 Datasheet: http://datasheets.maximintegrated.com/en/ds/MAX6602.pdf
11 * Maxim MAX6622
12 Prefix: 'max6622'
13 Datasheet: http://datasheets.maximintegrated.com/en/ds/MAX6622.pdf
14 * Maxim MAX6636
15 Prefix: 'max6636'
16 Datasheet: http://datasheets.maximintegrated.com/en/ds/MAX6636.pdf
17 * Maxim MAX6689
18 Prefix: 'max6689'
19 Datasheet: http://datasheets.maximintegrated.com/en/ds/MAX6689.pdf
20 * Maxim MAX6693
21 Prefix: 'max6693'
22 Datasheet: http://datasheets.maximintegrated.com/en/ds/MAX6693.pdf
23 * Maxim MAX6694
24 Prefix: 'max6694'
25 Datasheet: http://datasheets.maximintegrated.com/en/ds/MAX6694.pdf
26 * Maxim MAX6697
27 Prefix: 'max6697'
28 Datasheet: http://datasheets.maximintegrated.com/en/ds/MAX6697.pdf
29 * Maxim MAX6698
30 Prefix: 'max6698'
31 Datasheet: http://datasheets.maximintegrated.com/en/ds/MAX6698.pdf
32 * Maxim MAX6699
33 Prefix: 'max6699'
34 Datasheet: http://datasheets.maximintegrated.com/en/ds/MAX6699.pdf
35
36Author:
37 Guenter Roeck <linux@roeck-us.net>
38
39Description
40-----------
41
42This driver implements support for several MAX6697 compatible temperature sensor
43chips. The chips support one local temperature sensor plus four, six, or seven
44remote temperature sensors. Remote temperature sensors are diode-connected
45thermal transitors, except for MAX6698 which supports three diode-connected
46thermal transistors plus three thermistors in addition to the local temperature
47sensor.
48
49The driver provides the following sysfs attributes. temp1 is the local (chip)
50temperature, temp[2..n] are remote temperatures. The actually supported
51per-channel attributes are chip type and channel dependent.
52
53tempX_input RO temperature
54tempX_max RW temperature maximum threshold
55tempX_max_alarm RO temperature maximum threshold alarm
56tempX_crit RW temperature critical threshold
57tempX_crit_alarm RO temperature critical threshold alarm
58tempX_fault RO temperature diode fault (remote sensors only)
diff --git a/Documentation/hwmon/max8688 b/Documentation/hwmon/max8688
index fe849871df32..e78078638b91 100644
--- a/Documentation/hwmon/max8688
+++ b/Documentation/hwmon/max8688
@@ -7,7 +7,7 @@ Supported chips:
7 Addresses scanned: - 7 Addresses scanned: -
8 Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX8688.pdf 8 Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX8688.pdf
9 9
10Author: Guenter Roeck <guenter.roeck@ericsson.com> 10Author: Guenter Roeck <linux@roeck-us.net>
11 11
12 12
13Description 13Description
diff --git a/Documentation/hwmon/pmbus b/Documentation/hwmon/pmbus
index f90f99920cc5..cf756ed48ff9 100644
--- a/Documentation/hwmon/pmbus
+++ b/Documentation/hwmon/pmbus
@@ -34,7 +34,7 @@ Supported chips:
34 Addresses scanned: - 34 Addresses scanned: -
35 Datasheet: n.a. 35 Datasheet: n.a.
36 36
37Author: Guenter Roeck <guenter.roeck@ericsson.com> 37Author: Guenter Roeck <linux@roeck-us.net>
38 38
39 39
40Description 40Description
@@ -138,7 +138,7 @@ Sysfs entries
138 138
139When probing the chip, the driver identifies which PMBus registers are 139When probing the chip, the driver identifies which PMBus registers are
140supported, and determines available sensors from this information. 140supported, and determines available sensors from this information.
141Attribute files only exist if respective sensors are suported by the chip. 141Attribute files only exist if respective sensors are supported by the chip.
142Labels are provided to inform the user about the sensor associated with 142Labels are provided to inform the user about the sensor associated with
143a given sysfs entry. 143a given sysfs entry.
144 144
diff --git a/Documentation/hwmon/smm665 b/Documentation/hwmon/smm665
index 59e316140542..a341eeedab75 100644
--- a/Documentation/hwmon/smm665
+++ b/Documentation/hwmon/smm665
@@ -29,7 +29,7 @@ Supported chips:
29 http://www.summitmicro.com/prod_select/summary/SMM766/SMM766_2086.pdf 29 http://www.summitmicro.com/prod_select/summary/SMM766/SMM766_2086.pdf
30 http://www.summitmicro.com/prod_select/summary/SMM766B/SMM766B_2122.pdf 30 http://www.summitmicro.com/prod_select/summary/SMM766B/SMM766B_2122.pdf
31 31
32Author: Guenter Roeck <guenter.roeck@ericsson.com> 32Author: Guenter Roeck <linux@roeck-us.net>
33 33
34 34
35Module Parameters 35Module Parameters
diff --git a/Documentation/hwmon/sysfs-interface b/Documentation/hwmon/sysfs-interface
index 1f4dd855a299..79f8257dd790 100644
--- a/Documentation/hwmon/sysfs-interface
+++ b/Documentation/hwmon/sysfs-interface
@@ -722,14 +722,14 @@ add/subtract if it has been divided before the add/subtract.
722What to do if a value is found to be invalid, depends on the type of the 722What to do if a value is found to be invalid, depends on the type of the
723sysfs attribute that is being set. If it is a continuous setting like a 723sysfs attribute that is being set. If it is a continuous setting like a
724tempX_max or inX_max attribute, then the value should be clamped to its 724tempX_max or inX_max attribute, then the value should be clamped to its
725limits using SENSORS_LIMIT(value, min_limit, max_limit). If it is not 725limits using clamp_val(value, min_limit, max_limit). If it is not continuous
726continuous like for example a tempX_type, then when an invalid value is 726like for example a tempX_type, then when an invalid value is written,
727written, -EINVAL should be returned. 727-EINVAL should be returned.
728 728
729Example1, temp1_max, register is a signed 8 bit value (-128 - 127 degrees): 729Example1, temp1_max, register is a signed 8 bit value (-128 - 127 degrees):
730 730
731 long v = simple_strtol(buf, NULL, 10) / 1000; 731 long v = simple_strtol(buf, NULL, 10) / 1000;
732 v = SENSORS_LIMIT(v, -128, 127); 732 v = clamp_val(v, -128, 127);
733 /* write v to register */ 733 /* write v to register */
734 734
735Example2, fan divider setting, valid values 2, 4 and 8: 735Example2, fan divider setting, valid values 2, 4 and 8:
diff --git a/Documentation/hwmon/ucd9000 b/Documentation/hwmon/ucd9000
index 0df5f276505b..805e33edb978 100644
--- a/Documentation/hwmon/ucd9000
+++ b/Documentation/hwmon/ucd9000
@@ -11,7 +11,7 @@ Supported chips:
11 http://focus.ti.com/lit/ds/symlink/ucd9090.pdf 11 http://focus.ti.com/lit/ds/symlink/ucd9090.pdf
12 http://focus.ti.com/lit/ds/symlink/ucd90910.pdf 12 http://focus.ti.com/lit/ds/symlink/ucd90910.pdf
13 13
14Author: Guenter Roeck <guenter.roeck@ericsson.com> 14Author: Guenter Roeck <linux@roeck-us.net>
15 15
16 16
17Description 17Description
diff --git a/Documentation/hwmon/ucd9200 b/Documentation/hwmon/ucd9200
index fd7d07b1908a..1e8060e631bd 100644
--- a/Documentation/hwmon/ucd9200
+++ b/Documentation/hwmon/ucd9200
@@ -15,7 +15,7 @@ Supported chips:
15 http://focus.ti.com/lit/ds/symlink/ucd9246.pdf 15 http://focus.ti.com/lit/ds/symlink/ucd9246.pdf
16 http://focus.ti.com/lit/ds/symlink/ucd9248.pdf 16 http://focus.ti.com/lit/ds/symlink/ucd9248.pdf
17 17
18Author: Guenter Roeck <guenter.roeck@ericsson.com> 18Author: Guenter Roeck <linux@roeck-us.net>
19 19
20 20
21Description 21Description
diff --git a/Documentation/hwmon/vexpress b/Documentation/hwmon/vexpress
new file mode 100644
index 000000000000..557d6d5ad90d
--- /dev/null
+++ b/Documentation/hwmon/vexpress
@@ -0,0 +1,34 @@
1Kernel driver vexpress
2======================
3
4Supported systems:
5 * ARM Ltd. Versatile Express platform
6 Prefix: 'vexpress'
7 Datasheets:
8 * "Hardware Description" sections of the Technical Reference Manuals
9 for the Versatile Express boards:
10 http://infocenter.arm.com/help/topic/com.arm.doc.subset.boards.express/index.html
11 * Section "4.4.14. System Configuration registers" of the V2M-P1 TRM:
12 http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0447-/index.html
13
14Author: Pawel Moll
15
16Description
17-----------
18
19Versatile Express platform (http://www.arm.com/versatileexpress/) is a
20reference & prototyping system for ARM Ltd. processors. It can be set up
21from a wide range of boards, each of them containing (apart of the main
22chip/FPGA) a number of microcontrollers responsible for platform
23configuration and control. Theses microcontrollers can also monitor the
24board and its environment by a number of internal and external sensors,
25providing information about power lines voltages and currents, board
26temperature and power usage. Some of them also calculate consumed energy
27and provide a cumulative use counter.
28
29The configuration devices are _not_ memory mapped and must be accessed
30via a custom interface, abstracted by the "vexpress_config" API.
31
32As these devices are non-discoverable, they must be described in a Device
33Tree passed to the kernel. Details of the DT binding for them can be found
34in Documentation/devicetree/bindings/hwmon/vexpress.txt.
diff --git a/Documentation/hwmon/zl6100 b/Documentation/hwmon/zl6100
index a995b41724fd..756b57c6b73e 100644
--- a/Documentation/hwmon/zl6100
+++ b/Documentation/hwmon/zl6100
@@ -54,7 +54,7 @@ http://archive.ericsson.net/service/internet/picov/get?DocNo=28701-EN/LZT146401
54http://archive.ericsson.net/service/internet/picov/get?DocNo=28701-EN/LZT146256 54http://archive.ericsson.net/service/internet/picov/get?DocNo=28701-EN/LZT146256
55 55
56 56
57Author: Guenter Roeck <guenter.roeck@ericsson.com> 57Author: Guenter Roeck <linux@roeck-us.net>
58 58
59 59
60Description 60Description
@@ -121,12 +121,26 @@ in1_max_alarm Input voltage high alarm.
121in1_lcrit_alarm Input voltage critical low alarm. 121in1_lcrit_alarm Input voltage critical low alarm.
122in1_crit_alarm Input voltage critical high alarm. 122in1_crit_alarm Input voltage critical high alarm.
123 123
124in2_label "vout1" 124in2_label "vmon"
125in2_input Measured output voltage. 125in2_input Measured voltage on VMON (ZL2004) or VDRV (ZL9101M,
126in2_lcrit Critical minimum output Voltage. 126 ZL9117M) pin. Reported voltage is 16x the voltage on the
127in2_crit Critical maximum output voltage. 127 pin (adjusted internally by the chip).
128in2_lcrit_alarm Critical output voltage critical low alarm. 128in2_lcrit Critical minumum VMON/VDRV Voltage.
129in2_crit_alarm Critical output voltage critical high alarm. 129in2_crit Critical maximum VMON/VDRV voltage.
130in2_lcrit_alarm VMON/VDRV voltage critical low alarm.
131in2_crit_alarm VMON/VDRV voltage critical high alarm.
132
133 vmon attributes are supported on ZL2004, ZL9101M,
134 and ZL9117M only.
135
136inX_label "vout1"
137inX_input Measured output voltage.
138inX_lcrit Critical minimum output Voltage.
139inX_crit Critical maximum output voltage.
140inX_lcrit_alarm Critical output voltage critical low alarm.
141inX_crit_alarm Critical output voltage critical high alarm.
142
143 X is 3 for ZL2004, ZL9101M, and ZL9117M, 2 otherwise.
130 144
131curr1_label "iout1" 145curr1_label "iout1"
132curr1_input Measured output current. 146curr1_input Measured output current.
diff --git a/Documentation/i2c/busses/i2c-i801 b/Documentation/i2c/busses/i2c-i801
index 157416e78cc4..d55b8ab2d10f 100644
--- a/Documentation/i2c/busses/i2c-i801
+++ b/Documentation/i2c/busses/i2c-i801
@@ -22,6 +22,8 @@ Supported adapters:
22 * Intel Panther Point (PCH) 22 * Intel Panther Point (PCH)
23 * Intel Lynx Point (PCH) 23 * Intel Lynx Point (PCH)
24 * Intel Lynx Point-LP (PCH) 24 * Intel Lynx Point-LP (PCH)
25 * Intel Avoton (SOC)
26 * Intel Wellsburg (PCH)
25 Datasheets: Publicly available at the Intel website 27 Datasheets: Publicly available at the Intel website
26 28
27On Intel Patsburg and later chipsets, both the normal host SMBus controller 29On Intel Patsburg and later chipsets, both the normal host SMBus controller
diff --git a/Documentation/i2c/busses/i2c-ismt b/Documentation/i2c/busses/i2c-ismt
new file mode 100644
index 000000000000..737355822c0b
--- /dev/null
+++ b/Documentation/i2c/busses/i2c-ismt
@@ -0,0 +1,36 @@
1Kernel driver i2c-ismt
2
3Supported adapters:
4 * Intel S12xx series SOCs
5
6Authors:
7 Bill Brown <bill.e.brown@intel.com>
8
9
10Module Parameters
11-----------------
12
13* bus_speed (unsigned int)
14Allows changing of the bus speed. Normally, the bus speed is set by the BIOS
15and never needs to be changed. However, some SMBus analyzers are too slow for
16monitoring the bus during debug, thus the need for this module parameter.
17Specify the bus speed in kHz.
18Available bus frequency settings:
19 0 no change
20 80 kHz
21 100 kHz
22 400 kHz
23 1000 kHz
24
25
26Description
27-----------
28
29The S12xx series of SOCs have a pair of integrated SMBus 2.0 controllers
30targeted primarily at the microserver and storage markets.
31
32The S12xx series contain a pair of PCI functions. An output of lspci will show
33something similar to the following:
34
35 00:13.0 System peripheral: Intel Corporation Centerton SMBus 2.0 Controller 0
36 00:13.1 System peripheral: Intel Corporation Centerton SMBus 2.0 Controller 1
diff --git a/Documentation/i2c/busses/i2c-sis630 b/Documentation/i2c/busses/i2c-sis630
index 0b9697366930..ee7943631074 100644
--- a/Documentation/i2c/busses/i2c-sis630
+++ b/Documentation/i2c/busses/i2c-sis630
@@ -4,9 +4,11 @@ Supported adapters:
4 * Silicon Integrated Systems Corp (SiS) 4 * Silicon Integrated Systems Corp (SiS)
5 630 chipset (Datasheet: available at http://www.sfr-fresh.com/linux) 5 630 chipset (Datasheet: available at http://www.sfr-fresh.com/linux)
6 730 chipset 6 730 chipset
7 964 chipset
7 * Possible other SiS chipsets ? 8 * Possible other SiS chipsets ?
8 9
9Author: Alexander Malysh <amalysh@web.de> 10Author: Alexander Malysh <amalysh@web.de>
11 Amaury Decrême <amaury.decreme@gmail.com> - SiS964 support
10 12
11Module Parameters 13Module Parameters
12----------------- 14-----------------
@@ -18,6 +20,7 @@ Module Parameters
18* high_clock = [1|0] Forcibly set Host Master Clock to 56KHz (default, 20* high_clock = [1|0] Forcibly set Host Master Clock to 56KHz (default,
19 what your BIOS use). DANGEROUS! This should be a bit 21 what your BIOS use). DANGEROUS! This should be a bit
20 faster, but freeze some systems (i.e. my Laptop). 22 faster, but freeze some systems (i.e. my Laptop).
23 SIS630/730 chip only.
21 24
22 25
23Description 26Description
@@ -36,6 +39,12 @@ or like this:
3600:00.0 Host bridge: Silicon Integrated Systems [SiS] 730 Host (rev 02) 3900:00.0 Host bridge: Silicon Integrated Systems [SiS] 730 Host (rev 02)
3700:01.0 ISA bridge: Silicon Integrated Systems [SiS] 85C503/5513 4000:01.0 ISA bridge: Silicon Integrated Systems [SiS] 85C503/5513
38 41
42or like this:
43
4400:00.0 Host bridge: Silicon Integrated Systems [SiS] 760/M760 Host (rev 02)
4500:02.0 ISA bridge: Silicon Integrated Systems [SiS] SiS964 [MuTIOL Media IO]
46 LPC Controller (rev 36)
47
39in your 'lspci' output , then this driver is for your chipset. 48in your 'lspci' output , then this driver is for your chipset.
40 49
41Thank You 50Thank You
diff --git a/Documentation/i2c/instantiating-devices b/Documentation/i2c/instantiating-devices
index abf63615ee05..22182660dda7 100644
--- a/Documentation/i2c/instantiating-devices
+++ b/Documentation/i2c/instantiating-devices
@@ -91,7 +91,7 @@ Example (from the nxp OHCI driver):
91 91
92static const unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END }; 92static const unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END };
93 93
94static int __devinit usb_hcd_nxp_probe(struct platform_device *pdev) 94static int usb_hcd_nxp_probe(struct platform_device *pdev)
95{ 95{
96 (...) 96 (...)
97 struct i2c_adapter *i2c_adap; 97 struct i2c_adapter *i2c_adap;
diff --git a/Documentation/i2c/smbus-protocol b/Documentation/i2c/smbus-protocol
index 49f5b680809d..6012b12b3510 100644
--- a/Documentation/i2c/smbus-protocol
+++ b/Documentation/i2c/smbus-protocol
@@ -23,6 +23,12 @@ don't match these function names. For some of the operations which pass a
23single data byte, the functions using SMBus protocol operation names execute 23single data byte, the functions using SMBus protocol operation names execute
24a different protocol operation entirely. 24a different protocol operation entirely.
25 25
26Each transaction type corresponds to a functionality flag. Before calling a
27transaction function, a device driver should always check (just once) for
28the corresponding functionality flag to ensure that the underlying I2C
29adapter supports the transaction in question. See
30<file:Documentation/i2c/functionality> for the details.
31
26 32
27Key to symbols 33Key to symbols
28============== 34==============
@@ -49,6 +55,8 @@ This sends a single bit to the device, at the place of the Rd/Wr bit.
49 55
50A Addr Rd/Wr [A] P 56A Addr Rd/Wr [A] P
51 57
58Functionality flag: I2C_FUNC_SMBUS_QUICK
59
52 60
53SMBus Receive Byte: i2c_smbus_read_byte() 61SMBus Receive Byte: i2c_smbus_read_byte()
54========================================== 62==========================================
@@ -60,6 +68,8 @@ the previous SMBus command.
60 68
61S Addr Rd [A] [Data] NA P 69S Addr Rd [A] [Data] NA P
62 70
71Functionality flag: I2C_FUNC_SMBUS_READ_BYTE
72
63 73
64SMBus Send Byte: i2c_smbus_write_byte() 74SMBus Send Byte: i2c_smbus_write_byte()
65======================================== 75========================================
@@ -69,6 +79,8 @@ to a device. See Receive Byte for more information.
69 79
70S Addr Wr [A] Data [A] P 80S Addr Wr [A] Data [A] P
71 81
82Functionality flag: I2C_FUNC_SMBUS_WRITE_BYTE
83
72 84
73SMBus Read Byte: i2c_smbus_read_byte_data() 85SMBus Read Byte: i2c_smbus_read_byte_data()
74============================================ 86============================================
@@ -78,6 +90,8 @@ The register is specified through the Comm byte.
78 90
79S Addr Wr [A] Comm [A] S Addr Rd [A] [Data] NA P 91S Addr Wr [A] Comm [A] S Addr Rd [A] [Data] NA P
80 92
93Functionality flag: I2C_FUNC_SMBUS_READ_BYTE_DATA
94
81 95
82SMBus Read Word: i2c_smbus_read_word_data() 96SMBus Read Word: i2c_smbus_read_word_data()
83============================================ 97============================================
@@ -88,6 +102,8 @@ byte. But this time, the data is a complete word (16 bits).
88 102
89S Addr Wr [A] Comm [A] S Addr Rd [A] [DataLow] A [DataHigh] NA P 103S Addr Wr [A] Comm [A] S Addr Rd [A] [DataLow] A [DataHigh] NA P
90 104
105Functionality flag: I2C_FUNC_SMBUS_READ_WORD_DATA
106
91Note the convenience function i2c_smbus_read_word_swapped is 107Note the convenience function i2c_smbus_read_word_swapped is
92available for reads where the two data bytes are the other way 108available for reads where the two data bytes are the other way
93around (not SMBus compliant, but very popular.) 109around (not SMBus compliant, but very popular.)
@@ -102,6 +118,8 @@ the Read Byte operation.
102 118
103S Addr Wr [A] Comm [A] Data [A] P 119S Addr Wr [A] Comm [A] Data [A] P
104 120
121Functionality flag: I2C_FUNC_SMBUS_WRITE_BYTE_DATA
122
105 123
106SMBus Write Word: i2c_smbus_write_word_data() 124SMBus Write Word: i2c_smbus_write_word_data()
107============================================== 125==============================================
@@ -112,13 +130,15 @@ specified through the Comm byte.
112 130
113S Addr Wr [A] Comm [A] DataLow [A] DataHigh [A] P 131S Addr Wr [A] Comm [A] DataLow [A] DataHigh [A] P
114 132
133Functionality flag: I2C_FUNC_SMBUS_WRITE_WORD_DATA
134
115Note the convenience function i2c_smbus_write_word_swapped is 135Note the convenience function i2c_smbus_write_word_swapped is
116available for writes where the two data bytes are the other way 136available for writes where the two data bytes are the other way
117around (not SMBus compliant, but very popular.) 137around (not SMBus compliant, but very popular.)
118 138
119 139
120SMBus Process Call: i2c_smbus_process_call() 140SMBus Process Call:
121============================================= 141===================
122 142
123This command selects a device register (through the Comm byte), sends 143This command selects a device register (through the Comm byte), sends
12416 bits of data to it, and reads 16 bits of data in return. 14416 bits of data to it, and reads 16 bits of data in return.
@@ -126,6 +146,8 @@ This command selects a device register (through the Comm byte), sends
126S Addr Wr [A] Comm [A] DataLow [A] DataHigh [A] 146S Addr Wr [A] Comm [A] DataLow [A] DataHigh [A]
127 S Addr Rd [A] [DataLow] A [DataHigh] NA P 147 S Addr Rd [A] [DataLow] A [DataHigh] NA P
128 148
149Functionality flag: I2C_FUNC_SMBUS_PROC_CALL
150
129 151
130SMBus Block Read: i2c_smbus_read_block_data() 152SMBus Block Read: i2c_smbus_read_block_data()
131============================================== 153==============================================
@@ -137,6 +159,8 @@ of data is specified by the device in the Count byte.
137S Addr Wr [A] Comm [A] 159S Addr Wr [A] Comm [A]
138 S Addr Rd [A] [Count] A [Data] A [Data] A ... A [Data] NA P 160 S Addr Rd [A] [Count] A [Data] A [Data] A ... A [Data] NA P
139 161
162Functionality flag: I2C_FUNC_SMBUS_READ_BLOCK_DATA
163
140 164
141SMBus Block Write: i2c_smbus_write_block_data() 165SMBus Block Write: i2c_smbus_write_block_data()
142================================================ 166================================================
@@ -147,6 +171,8 @@ Comm byte. The amount of data is specified in the Count byte.
147 171
148S Addr Wr [A] Comm [A] Count [A] Data [A] Data [A] ... [A] Data [A] P 172S Addr Wr [A] Comm [A] Count [A] Data [A] Data [A] ... [A] Data [A] P
149 173
174Functionality flag: I2C_FUNC_SMBUS_WRITE_BLOCK_DATA
175
150 176
151SMBus Block Write - Block Read Process Call 177SMBus Block Write - Block Read Process Call
152=========================================== 178===========================================
@@ -160,6 +186,8 @@ This command selects a device register (through the Comm byte), sends
160S Addr Wr [A] Comm [A] Count [A] Data [A] ... 186S Addr Wr [A] Comm [A] Count [A] Data [A] ...
161 S Addr Rd [A] [Count] A [Data] ... A P 187 S Addr Rd [A] [Count] A [Data] ... A P
162 188
189Functionality flag: I2C_FUNC_SMBUS_BLOCK_PROC_CALL
190
163 191
164SMBus Host Notify 192SMBus Host Notify
165================= 193=================
@@ -229,15 +257,7 @@ designated register that is specified through the Comm byte.
229S Addr Wr [A] Comm [A] 257S Addr Wr [A] Comm [A]
230 S Addr Rd [A] [Data] A [Data] A ... A [Data] NA P 258 S Addr Rd [A] [Data] A [Data] A ... A [Data] NA P
231 259
232 260Functionality flag: I2C_FUNC_SMBUS_READ_I2C_BLOCK
233I2C Block Read (2 Comm bytes)
234=============================
235
236This command reads a block of bytes from a device, from a
237designated register that is specified through the two Comm bytes.
238
239S Addr Wr [A] Comm1 [A] Comm2 [A]
240 S Addr Rd [A] [Data] A [Data] A ... A [Data] NA P
241 261
242 262
243I2C Block Write: i2c_smbus_write_i2c_block_data() 263I2C Block Write: i2c_smbus_write_i2c_block_data()
@@ -249,3 +269,5 @@ Comm byte. Note that command lengths of 0, 2, or more bytes are
249supported as they are indistinguishable from data. 269supported as they are indistinguishable from data.
250 270
251S Addr Wr [A] Comm [A] Data [A] Data [A] ... [A] Data [A] P 271S Addr Wr [A] Comm [A] Data [A] Data [A] ... [A] Data [A] P
272
273Functionality flag: I2C_FUNC_SMBUS_WRITE_I2C_BLOCK
diff --git a/Documentation/i2c/writing-clients b/Documentation/i2c/writing-clients
index 3a94b0e6f601..6b344b516bff 100644
--- a/Documentation/i2c/writing-clients
+++ b/Documentation/i2c/writing-clients
@@ -365,8 +365,6 @@ in terms of it. Never use this function directly!
365 s32 i2c_smbus_read_word_data(struct i2c_client *client, u8 command); 365 s32 i2c_smbus_read_word_data(struct i2c_client *client, u8 command);
366 s32 i2c_smbus_write_word_data(struct i2c_client *client, 366 s32 i2c_smbus_write_word_data(struct i2c_client *client,
367 u8 command, u16 value); 367 u8 command, u16 value);
368 s32 i2c_smbus_process_call(struct i2c_client *client,
369 u8 command, u16 value);
370 s32 i2c_smbus_read_block_data(struct i2c_client *client, 368 s32 i2c_smbus_read_block_data(struct i2c_client *client,
371 u8 command, u8 *values); 369 u8 command, u8 *values);
372 s32 i2c_smbus_write_block_data(struct i2c_client *client, 370 s32 i2c_smbus_write_block_data(struct i2c_client *client,
@@ -381,6 +379,8 @@ These ones were removed from i2c-core because they had no users, but could
381be added back later if needed: 379be added back later if needed:
382 380
383 s32 i2c_smbus_write_quick(struct i2c_client *client, u8 value); 381 s32 i2c_smbus_write_quick(struct i2c_client *client, u8 value);
382 s32 i2c_smbus_process_call(struct i2c_client *client,
383 u8 command, u16 value);
384 s32 i2c_smbus_block_process_call(struct i2c_client *client, 384 s32 i2c_smbus_block_process_call(struct i2c_client *client,
385 u8 command, u8 length, u8 *values); 385 u8 command, u8 length, u8 *values);
386 386
diff --git a/Documentation/input/alps.txt b/Documentation/input/alps.txt
index ae8ba9a74ce1..e544c7ff8cfa 100644
--- a/Documentation/input/alps.txt
+++ b/Documentation/input/alps.txt
@@ -3,10 +3,26 @@ ALPS Touchpad Protocol
3 3
4Introduction 4Introduction
5------------ 5------------
6 6Currently the ALPS touchpad driver supports five protocol versions in use by
7Currently the ALPS touchpad driver supports four protocol versions in use by 7ALPS touchpads, called versions 1, 2, 3, 4 and 5.
8ALPS touchpads, called versions 1, 2, 3, and 4. Information about the various 8
9protocol versions is contained in the following sections. 9Since roughly mid-2010 several new ALPS touchpads have been released and
10integrated into a variety of laptops and netbooks. These new touchpads
11have enough behavior differences that the alps_model_data definition
12table, describing the properties of the different versions, is no longer
13adequate. The design choices were to re-define the alps_model_data
14table, with the risk of regression testing existing devices, or isolate
15the new devices outside of the alps_model_data table. The latter design
16choice was made. The new touchpad signatures are named: "Rushmore",
17"Pinnacle", and "Dolphin", which you will see in the alps.c code.
18For the purposes of this document, this group of ALPS touchpads will
19generically be called "new ALPS touchpads".
20
21We experimented with probing the ACPI interface _HID (Hardware ID)/_CID
22(Compatibility ID) definition as a way to uniquely identify the
23different ALPS variants but there did not appear to be a 1:1 mapping.
24In fact, it appeared to be an m:n mapping between the _HID and actual
25hardware type.
10 26
11Detection 27Detection
12--------- 28---------
@@ -20,9 +36,13 @@ If the E6 report is successful, the touchpad model is identified using the "E7
20report" sequence: E8-E7-E7-E7-E9. The response is the model signature and is 36report" sequence: E8-E7-E7-E7-E9. The response is the model signature and is
21matched against known models in the alps_model_data_array. 37matched against known models in the alps_model_data_array.
22 38
23With protocol versions 3 and 4, the E7 report model signature is always 39For older touchpads supporting protocol versions 3 and 4, the E7 report
2473-02-64. To differentiate between these versions, the response from the 40model signature is always 73-02-64. To differentiate between these
25"Enter Command Mode" sequence must be inspected as described below. 41versions, the response from the "Enter Command Mode" sequence must be
42inspected as described below.
43
44The new ALPS touchpads have an E7 signature of 73-03-50 or 73-03-0A but
45seem to be better differentiated by the EC Command Mode response.
26 46
27Command Mode 47Command Mode
28------------ 48------------
@@ -47,6 +67,14 @@ address of the register being read, and the third contains the value of the
47register. Registers are written by writing the value one nibble at a time 67register. Registers are written by writing the value one nibble at a time
48using the same encoding used for addresses. 68using the same encoding used for addresses.
49 69
70For the new ALPS touchpads, the EC command is used to enter command
71mode. The response in the new ALPS touchpads is significantly different,
72and more important in determining the behavior. This code has been
73separated from the original alps_model_data table and put in the
74alps_identify function. For example, there seem to be two hardware init
75sequences for the "Dolphin" touchpads as determined by the second byte
76of the EC response.
77
50Packet Format 78Packet Format
51------------- 79-------------
52 80
@@ -133,7 +161,7 @@ number of contacts (f1 and f0 in the table below).
133 161
134This packet only appears after a position packet with the mt bit set, and 162This packet only appears after a position packet with the mt bit set, and
135usually only appears when there are two or more contacts (although 163usually only appears when there are two or more contacts (although
136occassionally it's seen with only a single contact). 164occasionally it's seen with only a single contact).
137 165
138The final v3 packet type is the trackstick packet. 166The final v3 packet type is the trackstick packet.
139 167
@@ -187,3 +215,28 @@ There are several things worth noting here.
187 well. 215 well.
188 216
189So far no v4 devices with tracksticks have been encountered. 217So far no v4 devices with tracksticks have been encountered.
218
219ALPS Absolute Mode - Protocol Version 5
220---------------------------------------
221This is basically Protocol Version 3 but with different logic for packet
222decode. It uses the same alps_process_touchpad_packet_v3 call with a
223specialized decode_fields function pointer to correctly interpret the
224packets. This appears to only be used by the Dolphin devices.
225
226For single-touch, the 6-byte packet format is:
227
228 byte 0: 1 1 0 0 1 0 0 0
229 byte 1: 0 x6 x5 x4 x3 x2 x1 x0
230 byte 2: 0 y6 y5 y4 y3 y2 y1 y0
231 byte 3: 0 M R L 1 m r l
232 byte 4: y10 y9 y8 y7 x10 x9 x8 x7
233 byte 5: 0 z6 z5 z4 z3 z2 z1 z0
234
235For mt, the format is:
236
237 byte 0: 1 1 1 n3 1 n2 n1 x24
238 byte 1: 1 y7 y6 y5 y4 y3 y2 y1
239 byte 2: ? x2 x1 y12 y11 y10 y9 y8
240 byte 3: 0 x23 x22 x21 x20 x19 x18 x17
241 byte 4: 0 x9 x8 x7 x6 x5 x4 x3
242 byte 5: 0 x16 x15 x14 x13 x12 x11 x10
diff --git a/Documentation/input/event-codes.txt b/Documentation/input/event-codes.txt
index 53305bd08182..f1ea2c69648d 100644
--- a/Documentation/input/event-codes.txt
+++ b/Documentation/input/event-codes.txt
@@ -196,6 +196,17 @@ EV_MSC:
196EV_MSC events are used for input and output events that do not fall under other 196EV_MSC events are used for input and output events that do not fall under other
197categories. 197categories.
198 198
199A few EV_MSC codes have special meaning:
200
201* MSC_TIMESTAMP:
202 - Used to report the number of microseconds since the last reset. This event
203 should be coded as an uint32 value, which is allowed to wrap around with
204 no special consequence. It is assumed that the time difference between two
205 consecutive events is reliable on a reasonable time scale (hours).
206 A reset to zero can happen, in which case the time since the last event is
207 unknown. If the device does not provide this information, the driver must
208 not provide it to user space.
209
199EV_LED: 210EV_LED:
200---------- 211----------
201EV_LED events are used for input and output to set and query the state of 212EV_LED events are used for input and output to set and query the state of
diff --git a/Documentation/intel_txt.txt b/Documentation/intel_txt.txt
index 849de1a78e77..91d89c540709 100644
--- a/Documentation/intel_txt.txt
+++ b/Documentation/intel_txt.txt
@@ -192,7 +192,7 @@ grub.conf needs to be modified as follows:
192 192
193The kernel option for enabling Intel TXT support is found under the 193The kernel option for enabling Intel TXT support is found under the
194Security top-level menu and is called "Enable Intel(R) Trusted 194Security top-level menu and is called "Enable Intel(R) Trusted
195Execution Technology (TXT)". It is marked as EXPERIMENTAL and 195Execution Technology (TXT)". It is considered EXPERIMENTAL and
196depends on the generic x86 support (to allow maximum flexibility in 196depends on the generic x86 support (to allow maximum flexibility in
197kernel build options), since the tboot code will detect whether the 197kernel build options), since the tboot code will detect whether the
198platform actually supports Intel TXT and thus whether any of the 198platform actually supports Intel TXT and thus whether any of the
diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt
index 2152b0e7237d..3210540f8bd3 100644
--- a/Documentation/ioctl/ioctl-number.txt
+++ b/Documentation/ioctl/ioctl-number.txt
@@ -179,7 +179,7 @@ Code Seq#(hex) Include File Comments
179'V' C0 media/davinci/vpfe_capture.h conflict! 179'V' C0 media/davinci/vpfe_capture.h conflict!
180'V' C0 media/si4713.h conflict! 180'V' C0 media/si4713.h conflict!
181'W' 00-1F linux/watchdog.h conflict! 181'W' 00-1F linux/watchdog.h conflict!
182'W' 00-1F linux/wanrouter.h conflict! 182'W' 00-1F linux/wanrouter.h conflict! (pre 3.9)
183'W' 00-3F sound/asound.h conflict! 183'W' 00-3F sound/asound.h conflict!
184'X' all fs/xfs/xfs_fs.h conflict! 184'X' all fs/xfs/xfs_fs.h conflict!
185 and fs/xfs/linux-2.6/xfs_ioctl32.h 185 and fs/xfs/linux-2.6/xfs_ioctl32.h
diff --git a/Documentation/kbuild/kconfig-language.txt b/Documentation/kbuild/kconfig-language.txt
index a686f9cd69c1..c858f8419eba 100644
--- a/Documentation/kbuild/kconfig-language.txt
+++ b/Documentation/kbuild/kconfig-language.txt
@@ -388,26 +388,3 @@ config FOO
388 depends on BAR && m 388 depends on BAR && m
389 389
390limits FOO to module (=m) or disabled (=n). 390limits FOO to module (=m) or disabled (=n).
391
392Kconfig symbol existence
393~~~~~~~~~~~~~~~~~~~~~~~~
394The following two methods produce the same kconfig symbol dependencies
395but differ greatly in kconfig symbol existence (production) in the
396generated config file.
397
398case 1:
399
400config FOO
401 tristate "about foo"
402 depends on BAR
403
404vs. case 2:
405
406if BAR
407config FOO
408 tristate "about foo"
409endif
410
411In case 1, the symbol FOO will always exist in the config file (given
412no other dependencies). In case 2, the symbol FOO will only exist in
413the config file if BAR is enabled.
diff --git a/Documentation/kbuild/kconfig.txt b/Documentation/kbuild/kconfig.txt
index a09f1a6a830c..b8b77bbc784f 100644
--- a/Documentation/kbuild/kconfig.txt
+++ b/Documentation/kbuild/kconfig.txt
@@ -46,6 +46,12 @@ KCONFIG_OVERWRITECONFIG
46If you set KCONFIG_OVERWRITECONFIG in the environment, Kconfig will not 46If you set KCONFIG_OVERWRITECONFIG in the environment, Kconfig will not
47break symlinks when .config is a symlink to somewhere else. 47break symlinks when .config is a symlink to somewhere else.
48 48
49CONFIG_
50--------------------------------------------------
51If you set CONFIG_ in the environment, Kconfig will prefix all symbols
52with its value when saving the configuration, instead of using the default,
53"CONFIG_".
54
49______________________________________________________________________ 55______________________________________________________________________
50Environment variables for '{allyes/allmod/allno/rand}config' 56Environment variables for '{allyes/allmod/allno/rand}config'
51 57
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
index ec9ae6708691..5198b742fde1 100644
--- a/Documentation/kbuild/makefiles.txt
+++ b/Documentation/kbuild/makefiles.txt
@@ -1175,15 +1175,39 @@ When kbuild executes, the following steps are followed (roughly):
1175 in an init section in the image. Platform code *must* copy the 1175 in an init section in the image. Platform code *must* copy the
1176 blob to non-init memory prior to calling unflatten_device_tree(). 1176 blob to non-init memory prior to calling unflatten_device_tree().
1177 1177
1178 Example: 1178 To use this command, simply add *.dtb into obj-y or targets, or make
1179 #arch/x86/platform/ce4100/Makefile 1179 some other target depend on %.dtb
1180 clean-files := *dtb.S
1181 1180
1182 DTC_FLAGS := -p 1024 1181 A central rule exists to create $(obj)/%.dtb from $(src)/%.dts;
1183 obj-y += foo.dtb.o 1182 architecture Makefiles do no need to explicitly write out that rule.
1184 1183
1185 $(obj)/%.dtb: $(src)/%.dts 1184 Example:
1186 $(call cmd,dtc) 1185 targets += $(dtb-y)
1186 clean-files += *.dtb
1187 DTC_FLAGS ?= -p 1024
1188
1189 dtc_cpp
1190 This is just like dtc as describe above, except that the C pre-
1191 processor is invoked upon the .dtsp file before compiling the result
1192 with dtc.
1193
1194 In order for build dependencies to work, all files compiled using
1195 dtc_cpp must use the C pre-processor's #include functionality and not
1196 dtc's /include/ functionality.
1197
1198 Using the C pre-processor allows use of #define to create named
1199 constants. In turn, the #defines will typically appear in a header
1200 file, which may be shared with regular C code. Since the dtc language
1201 represents a data structure rather than code in C syntax, similar
1202 restrictions are placed on a header file included by a device tree
1203 file as for a header file included by an assembly language file.
1204 In particular, the C pre-processor is passed -x assembler-with-cpp,
1205 which sets macro __ASSEMBLY__. __DTS__ is also set. These allow header
1206 files to restrict their content to that compatible with device tree
1207 source.
1208
1209 A central rule exists to create $(obj)/%.dtb from $(src)/%.dtsp;
1210 architecture Makefiles do no need to explicitly write out that rule.
1187 1211
1188--- 6.8 Custom kbuild commands 1212--- 6.8 Custom kbuild commands
1189 1213
diff --git a/Documentation/kbuild/modules.txt b/Documentation/kbuild/modules.txt
index 3fb39e0116b4..69372fb98cf8 100644
--- a/Documentation/kbuild/modules.txt
+++ b/Documentation/kbuild/modules.txt
@@ -470,7 +470,7 @@ build.
470 470
471 Sometimes, an external module uses exported symbols from 471 Sometimes, an external module uses exported symbols from
472 another external module. kbuild needs to have full knowledge of 472 another external module. kbuild needs to have full knowledge of
473 all symbols to avoid spitting out warnings about undefined 473 all symbols to avoid spliitting out warnings about undefined
474 symbols. Three solutions exist for this situation. 474 symbols. Three solutions exist for this situation.
475 475
476 NOTE: The method with a top-level kbuild file is recommended 476 NOTE: The method with a top-level kbuild file is recommended
diff --git a/Documentation/kernel-doc-nano-HOWTO.txt b/Documentation/kernel-doc-nano-HOWTO.txt
index 3d8a97747f77..99b57abddf8a 100644
--- a/Documentation/kernel-doc-nano-HOWTO.txt
+++ b/Documentation/kernel-doc-nano-HOWTO.txt
@@ -64,6 +64,8 @@ Example kernel-doc function comment:
64 * comment lines. 64 * comment lines.
65 * 65 *
66 * The longer description can have multiple paragraphs. 66 * The longer description can have multiple paragraphs.
67 *
68 * Return: Describe the return value of foobar.
67 */ 69 */
68 70
69The short description following the subject can span multiple lines 71The short description following the subject can span multiple lines
@@ -78,6 +80,8 @@ If a function parameter is "..." (varargs), it should be listed in
78kernel-doc notation as: 80kernel-doc notation as:
79 * @...: description 81 * @...: description
80 82
83The return value, if any, should be described in a dedicated section
84named "Return".
81 85
82Example kernel-doc data structure comment. 86Example kernel-doc data structure comment.
83 87
@@ -222,6 +226,9 @@ only a "*").
222"section header:" names must be unique per function (or struct, 226"section header:" names must be unique per function (or struct,
223union, typedef, enum). 227union, typedef, enum).
224 228
229Use the section header "Return" for sections describing the return value
230of a function.
231
225Avoid putting a spurious blank line after the function name, or else the 232Avoid putting a spurious blank line after the function name, or else the
226description will be repeated! 233description will be repeated!
227 234
@@ -237,21 +244,21 @@ patterns, which are highlighted appropriately.
237NOTE 1: The multi-line descriptive text you provide does *not* recognize 244NOTE 1: The multi-line descriptive text you provide does *not* recognize
238line breaks, so if you try to format some text nicely, as in: 245line breaks, so if you try to format some text nicely, as in:
239 246
240 Return codes 247 Return:
241 0 - cool 248 0 - cool
242 1 - invalid arg 249 1 - invalid arg
243 2 - out of memory 250 2 - out of memory
244 251
245this will all run together and produce: 252this will all run together and produce:
246 253
247 Return codes 0 - cool 1 - invalid arg 2 - out of memory 254 Return: 0 - cool 1 - invalid arg 2 - out of memory
248 255
249NOTE 2: If the descriptive text you provide has lines that begin with 256NOTE 2: If the descriptive text you provide has lines that begin with
250some phrase followed by a colon, each of those phrases will be taken as 257some phrase followed by a colon, each of those phrases will be taken as
251a new section heading, which means you should similarly try to avoid text 258a new section heading, which means you should similarly try to avoid text
252like: 259like:
253 260
254 Return codes: 261 Return:
255 0: cool 262 0: cool
256 1: invalid arg 263 1: invalid arg
257 2: out of memory 264 2: out of memory
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 9776f068306b..4609e81dbc37 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -446,12 +446,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
446 possible to determine what the correct size should be. 446 possible to determine what the correct size should be.
447 This option provides an override for these situations. 447 This option provides an override for these situations.
448 448
449 capability.disable=
450 [SECURITY] Disable capabilities. This would normally
451 be used only if an alternative security model is to be
452 configured. Potentially dangerous and should only be
453 used if you are entirely sure of the consequences.
454
455 ccw_timeout_log [S390] 449 ccw_timeout_log [S390]
456 See Documentation/s390/CommonIO for details. 450 See Documentation/s390/CommonIO for details.
457 451
@@ -570,6 +564,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
570 UART at the specified I/O port or MMIO address, 564 UART at the specified I/O port or MMIO address,
571 switching to the matching ttyS device later. The 565 switching to the matching ttyS device later. The
572 options are the same as for ttyS, above. 566 options are the same as for ttyS, above.
567 hvc<n> Use the hypervisor console device <n>. This is for
568 both Xen and PowerPC hypervisors.
573 569
574 If the device connected to the port is not a TTY but a braille 570 If the device connected to the port is not a TTY but a braille
575 device, prepend "brl," before the device type, for instance 571 device, prepend "brl," before the device type, for instance
@@ -600,6 +596,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
600 is selected automatically. Check 596 is selected automatically. Check
601 Documentation/kdump/kdump.txt for further details. 597 Documentation/kdump/kdump.txt for further details.
602 598
599 crashkernel_low=size[KMG]
600 [KNL, x86] parts under 4G.
601
603 crashkernel=range1:size1[,range2:size2,...][@offset] 602 crashkernel=range1:size1[,range2:size2,...][@offset]
604 [KNL] Same as above, but depends on the memory 603 [KNL] Same as above, but depends on the memory
605 in the running system. The syntax of range is 604 in the running system. The syntax of range is
@@ -760,6 +759,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
760 759
761 earlyprintk= [X86,SH,BLACKFIN] 760 earlyprintk= [X86,SH,BLACKFIN]
762 earlyprintk=vga 761 earlyprintk=vga
762 earlyprintk=xen
763 earlyprintk=serial[,ttySn[,baudrate]] 763 earlyprintk=serial[,ttySn[,baudrate]]
764 earlyprintk=ttySn[,baudrate] 764 earlyprintk=ttySn[,baudrate]
765 earlyprintk=dbgp[debugController#] 765 earlyprintk=dbgp[debugController#]
@@ -777,6 +777,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
777 The VGA output is eventually overwritten by the real 777 The VGA output is eventually overwritten by the real
778 console. 778 console.
779 779
780 The xen output can only be used by Xen PV guests.
781
780 ekgdboc= [X86,KGDB] Allow early kernel console debugging 782 ekgdboc= [X86,KGDB] Allow early kernel console debugging
781 ekgdboc=kbd 783 ekgdboc=kbd
782 784
@@ -905,6 +907,24 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
905 gpt [EFI] Forces disk with valid GPT signature but 907 gpt [EFI] Forces disk with valid GPT signature but
906 invalid Protective MBR to be treated as GPT. 908 invalid Protective MBR to be treated as GPT.
907 909
910 grcan.enable0= [HW] Configuration of physical interface 0. Determines
911 the "Enable 0" bit of the configuration register.
912 Format: 0 | 1
913 Default: 0
914 grcan.enable1= [HW] Configuration of physical interface 1. Determines
915 the "Enable 0" bit of the configuration register.
916 Format: 0 | 1
917 Default: 0
918 grcan.select= [HW] Select which physical interface to use.
919 Format: 0 | 1
920 Default: 0
921 grcan.txsize= [HW] Sets the size of the tx buffer.
922 Format: <unsigned int> such that (txsize & ~0x1fffc0) == 0.
923 Default: 1024
924 grcan.rxsize= [HW] Sets the size of the rx buffer.
925 Format: <unsigned int> such that (rxsize & ~0x1fffc0) == 0.
926 Default: 1024
927
908 hashdist= [KNL,NUMA] Large hashes allocated during boot 928 hashdist= [KNL,NUMA] Large hashes allocated during boot
909 are distributed across NUMA nodes. Defaults on 929 are distributed across NUMA nodes. Defaults on
910 for 64-bit NUMA, off otherwise. 930 for 64-bit NUMA, off otherwise.
@@ -958,6 +978,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
958 If specified, z/VM IUCV HVC accepts connections 978 If specified, z/VM IUCV HVC accepts connections
959 from listed z/VM user IDs only. 979 from listed z/VM user IDs only.
960 980
981 hwthread_map= [METAG] Comma-separated list of Linux cpu id to
982 hardware thread id mappings.
983 Format: <cpu>:<hwthread>
984
961 keep_bootcon [KNL] 985 keep_bootcon [KNL]
962 Do not unregister boot console at start. This is only 986 Do not unregister boot console at start. This is only
963 useful for debugging when something happens in the window 987 useful for debugging when something happens in the window
@@ -1027,16 +1051,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1027 Claim all unknown PCI IDE storage controllers. 1051 Claim all unknown PCI IDE storage controllers.
1028 1052
1029 idle= [X86] 1053 idle= [X86]
1030 Format: idle=poll, idle=mwait, idle=halt, idle=nomwait 1054 Format: idle=poll, idle=halt, idle=nomwait
1031 Poll forces a polling idle loop that can slightly 1055 Poll forces a polling idle loop that can slightly
1032 improve the performance of waking up a idle CPU, but 1056 improve the performance of waking up a idle CPU, but
1033 will use a lot of power and make the system run hot. 1057 will use a lot of power and make the system run hot.
1034 Not recommended. 1058 Not recommended.
1035 idle=mwait: On systems which support MONITOR/MWAIT but
1036 the kernel chose to not use it because it doesn't save
1037 as much power as a normal idle loop, use the
1038 MONITOR/MWAIT idle loop anyways. Performance should be
1039 the same as idle=poll.
1040 idle=halt: Halt is forced to be used for CPU idle. 1059 idle=halt: Halt is forced to be used for CPU idle.
1041 In such case C2/C3 won't be used again. 1060 In such case C2/C3 won't be used again.
1042 idle=nomwait: Disable mwait for CPU C-states 1061 idle=nomwait: Disable mwait for CPU C-states
@@ -1119,6 +1138,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1119 0 disables intel_idle and fall back on acpi_idle. 1138 0 disables intel_idle and fall back on acpi_idle.
1120 1 to 6 specify maximum depth of C-state. 1139 1 to 6 specify maximum depth of C-state.
1121 1140
1141 intel_pstate= [X86]
1142 disable
1143 Do not enable intel_pstate as the default
1144 scaling driver for the supported processors
1145
1122 intremap= [X86-64, Intel-IOMMU] 1146 intremap= [X86-64, Intel-IOMMU]
1123 on enable Interrupt Remapping (default) 1147 on enable Interrupt Remapping (default)
1124 off disable Interrupt Remapping 1148 off disable Interrupt Remapping
@@ -1304,6 +1328,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1304 lapic [X86-32,APIC] Enable the local APIC even if BIOS 1328 lapic [X86-32,APIC] Enable the local APIC even if BIOS
1305 disabled it. 1329 disabled it.
1306 1330
1331 lapic= [x86,APIC] "notscdeadline" Do not use TSC deadline
1332 value for LAPIC timer one-shot implementation. Default
1333 back to the programmable timer unit in the LAPIC.
1334
1307 lapic_timer_c2_ok [X86,APIC] trust the local apic timer 1335 lapic_timer_c2_ok [X86,APIC] trust the local apic timer
1308 in C2 power state. 1336 in C2 power state.
1309 1337
@@ -1481,9 +1509,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1481 mem=nn[KMG] [KNL,BOOT] Force usage of a specific amount of memory 1509 mem=nn[KMG] [KNL,BOOT] Force usage of a specific amount of memory
1482 Amount of memory to be used when the kernel is not able 1510 Amount of memory to be used when the kernel is not able
1483 to see the whole system memory or for test. 1511 to see the whole system memory or for test.
1484 [X86-32] Use together with memmap= to avoid physical 1512 [X86] Work as limiting max address. Use together
1485 address space collisions. Without memmap= PCI devices 1513 with memmap= to avoid physical address space collisions.
1486 could be placed at addresses belonging to unused RAM. 1514 Without memmap= PCI devices could be placed at addresses
1515 belonging to unused RAM.
1487 1516
1488 mem=nopentium [BUGS=X86-32] Disable usage of 4MB pages for kernel 1517 mem=nopentium [BUGS=X86-32] Disable usage of 4MB pages for kernel
1489 memory. 1518 memory.
@@ -1869,10 +1898,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1869 wfi(ARM) instruction doesn't work correctly and not to 1898 wfi(ARM) instruction doesn't work correctly and not to
1870 use it. This is also useful when using JTAG debugger. 1899 use it. This is also useful when using JTAG debugger.
1871 1900
1872 no-hlt [BUGS=X86-32] Tells the kernel that the hlt
1873 instruction doesn't work correctly and not to
1874 use it.
1875
1876 no_file_caps Tells the kernel not to honor file capabilities. The 1901 no_file_caps Tells the kernel not to honor file capabilities. The
1877 only way then for a file to be executed with privilege 1902 only way then for a file to be executed with privilege
1878 is to be setuid root or executed by root. 1903 is to be setuid root or executed by root.
@@ -1984,6 +2009,20 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1984 2009
1985 nox2apic [X86-64,APIC] Do not enable x2APIC mode. 2010 nox2apic [X86-64,APIC] Do not enable x2APIC mode.
1986 2011
2012 cpu0_hotplug [X86] Turn on CPU0 hotplug feature when
2013 CONFIG_BOOTPARAM_HOTPLUG_CPU0 is off.
2014 Some features depend on CPU0. Known dependencies are:
2015 1. Resume from suspend/hibernate depends on CPU0.
2016 Suspend/hibernate will fail if CPU0 is offline and you
2017 need to online CPU0 before suspend/hibernate.
2018 2. PIC interrupts also depend on CPU0. CPU0 can't be
2019 removed if a PIC interrupt is detected.
2020 It's said poweroff/reboot may depend on CPU0 on some
2021 machines although I haven't seen such issues so far
2022 after CPU0 is offline on a few tested machines.
2023 If the dependencies are under your control, you can
2024 turn on cpu0_hotplug.
2025
1987 nptcg= [IA-64] Override max number of concurrent global TLB 2026 nptcg= [IA-64] Override max number of concurrent global TLB
1988 purges which is reported from either PAL_VM_SUMMARY or 2027 purges which is reported from either PAL_VM_SUMMARY or
1989 SAL PALO. 2028 SAL PALO.
@@ -1996,6 +2035,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1996 2035
1997 nr_uarts= [SERIAL] maximum number of UARTs to be registered. 2036 nr_uarts= [SERIAL] maximum number of UARTs to be registered.
1998 2037
2038 numa_balancing= [KNL,X86] Enable or disable automatic NUMA balancing.
2039 Allowed values are enable and disable
2040
1999 numa_zonelist_order= [KNL, BOOT] Select zonelist order for NUMA. 2041 numa_zonelist_order= [KNL, BOOT] Select zonelist order for NUMA.
2000 one of ['zone', 'node', 'default'] can be specified 2042 one of ['zone', 'node', 'default'] can be specified
2001 This can be set from sysctl after boot. 2043 This can be set from sysctl after boot.
@@ -2193,6 +2235,21 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2193 This sorting is done to get a device 2235 This sorting is done to get a device
2194 order compatible with older (<= 2.4) kernels. 2236 order compatible with older (<= 2.4) kernels.
2195 nobfsort Don't sort PCI devices into breadth-first order. 2237 nobfsort Don't sort PCI devices into breadth-first order.
2238 pcie_bus_tune_off Disable PCIe MPS (Max Payload Size)
2239 tuning and use the BIOS-configured MPS defaults.
2240 pcie_bus_safe Set every device's MPS to the largest value
2241 supported by all devices below the root complex.
2242 pcie_bus_perf Set device MPS to the largest allowable MPS
2243 based on its parent bus. Also set MRRS (Max
2244 Read Request Size) to the largest supported
2245 value (no larger than the MPS that the device
2246 or bus can support) for best performance.
2247 pcie_bus_peer2peer Set every device's MPS to 128B, which
2248 every device is guaranteed to support. This
2249 configuration allows peer-to-peer DMA between
2250 any pair of devices, possibly at the cost of
2251 reduced performance. This also guarantees
2252 that hot-added devices will work.
2196 cbiosize=nn[KMG] The fixed amount of bus space which is 2253 cbiosize=nn[KMG] The fixed amount of bus space which is
2197 reserved for the CardBus bridge's IO window. 2254 reserved for the CardBus bridge's IO window.
2198 The default value is 256 bytes. 2255 The default value is 256 bytes.
@@ -2214,6 +2271,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2214 the default. 2271 the default.
2215 off: Turn ECRC off 2272 off: Turn ECRC off
2216 on: Turn ECRC on. 2273 on: Turn ECRC on.
2274 hpiosize=nn[KMG] The fixed amount of bus space which is
2275 reserved for hotplug bridge's IO window.
2276 Default size is 256 bytes.
2277 hpmemsize=nn[KMG] The fixed amount of bus space which is
2278 reserved for hotplug bridge's memory window.
2279 Default size is 2 megabytes.
2217 realloc= Enable/disable reallocating PCI bridge resources 2280 realloc= Enable/disable reallocating PCI bridge resources
2218 if allocations done by BIOS are too small to 2281 if allocations done by BIOS are too small to
2219 accommodate resources required by all child 2282 accommodate resources required by all child
@@ -2394,6 +2457,27 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2394 ramdisk_size= [RAM] Sizes of RAM disks in kilobytes 2457 ramdisk_size= [RAM] Sizes of RAM disks in kilobytes
2395 See Documentation/blockdev/ramdisk.txt. 2458 See Documentation/blockdev/ramdisk.txt.
2396 2459
2460 rcu_nocbs= [KNL,BOOT]
2461 In kernels built with CONFIG_RCU_NOCB_CPU=y, set
2462 the specified list of CPUs to be no-callback CPUs.
2463 Invocation of these CPUs' RCU callbacks will
2464 be offloaded to "rcuoN" kthreads created for
2465 that purpose. This reduces OS jitter on the
2466 offloaded CPUs, which can be useful for HPC and
2467 real-time workloads. It can also improve energy
2468 efficiency for asymmetric multiprocessors.
2469
2470 rcu_nocb_poll [KNL,BOOT]
2471 Rather than requiring that offloaded CPUs
2472 (specified by rcu_nocbs= above) explicitly
2473 awaken the corresponding "rcuoN" kthreads,
2474 make these kthreads poll for callbacks.
2475 This improves the real-time response for the
2476 offloaded CPUs by relieving them of the need to
2477 wake up the corresponding kthread, but degrades
2478 energy efficiency by requiring that the kthreads
2479 periodically wake up to do the polling.
2480
2397 rcutree.blimit= [KNL,BOOT] 2481 rcutree.blimit= [KNL,BOOT]
2398 Set maximum number of finished RCU callbacks to process 2482 Set maximum number of finished RCU callbacks to process
2399 in one batch. 2483 in one batch.
@@ -2859,6 +2943,22 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2859 to facilitate early boot debugging. 2943 to facilitate early boot debugging.
2860 See also Documentation/trace/events.txt 2944 See also Documentation/trace/events.txt
2861 2945
2946 trace_options=[option-list]
2947 [FTRACE] Enable or disable tracer options at boot.
2948 The option-list is a comma delimited list of options
2949 that can be enabled or disabled just as if you were
2950 to echo the option name into
2951
2952 /sys/kernel/debug/tracing/trace_options
2953
2954 For example, to enable stacktrace option (to dump the
2955 stack trace of each event), add to the command line:
2956
2957 trace_options=stacktrace
2958
2959 See also Documentation/trace/ftrace.txt "trace options"
2960 section.
2961
2862 transparent_hugepage= 2962 transparent_hugepage=
2863 [KNL] 2963 [KNL]
2864 Format: [always|madvise|never] 2964 Format: [always|madvise|never]
diff --git a/Documentation/kref.txt b/Documentation/kref.txt
index 48ba715d5a63..ddf85a5dde0c 100644
--- a/Documentation/kref.txt
+++ b/Documentation/kref.txt
@@ -213,3 +213,91 @@ presentation on krefs, which can be found at:
213and: 213and:
214 http://www.kroah.com/linux/talks/ols_2004_kref_talk/ 214 http://www.kroah.com/linux/talks/ols_2004_kref_talk/
215 215
216
217The above example could also be optimized using kref_get_unless_zero() in
218the following way:
219
220static struct my_data *get_entry()
221{
222 struct my_data *entry = NULL;
223 mutex_lock(&mutex);
224 if (!list_empty(&q)) {
225 entry = container_of(q.next, struct my_data, link);
226 if (!kref_get_unless_zero(&entry->refcount))
227 entry = NULL;
228 }
229 mutex_unlock(&mutex);
230 return entry;
231}
232
233static void release_entry(struct kref *ref)
234{
235 struct my_data *entry = container_of(ref, struct my_data, refcount);
236
237 mutex_lock(&mutex);
238 list_del(&entry->link);
239 mutex_unlock(&mutex);
240 kfree(entry);
241}
242
243static void put_entry(struct my_data *entry)
244{
245 kref_put(&entry->refcount, release_entry);
246}
247
248Which is useful to remove the mutex lock around kref_put() in put_entry(), but
249it's important that kref_get_unless_zero is enclosed in the same critical
250section that finds the entry in the lookup table,
251otherwise kref_get_unless_zero may reference already freed memory.
252Note that it is illegal to use kref_get_unless_zero without checking its
253return value. If you are sure (by already having a valid pointer) that
254kref_get_unless_zero() will return true, then use kref_get() instead.
255
256The function kref_get_unless_zero also makes it possible to use rcu
257locking for lookups in the above example:
258
259struct my_data
260{
261 struct rcu_head rhead;
262 .
263 struct kref refcount;
264 .
265 .
266};
267
268static struct my_data *get_entry_rcu()
269{
270 struct my_data *entry = NULL;
271 rcu_read_lock();
272 if (!list_empty(&q)) {
273 entry = container_of(q.next, struct my_data, link);
274 if (!kref_get_unless_zero(&entry->refcount))
275 entry = NULL;
276 }
277 rcu_read_unlock();
278 return entry;
279}
280
281static void release_entry_rcu(struct kref *ref)
282{
283 struct my_data *entry = container_of(ref, struct my_data, refcount);
284
285 mutex_lock(&mutex);
286 list_del_rcu(&entry->link);
287 mutex_unlock(&mutex);
288 kfree_rcu(entry, rhead);
289}
290
291static void put_entry(struct my_data *entry)
292{
293 kref_put(&entry->refcount, release_entry_rcu);
294}
295
296But note that the struct kref member needs to remain in valid memory for a
297rcu grace period after release_entry_rcu was called. That can be accomplished
298by using kfree_rcu(entry, rhead) as done above, or by calling synchronize_rcu()
299before using kfree, but note that synchronize_rcu() may sleep for a
300substantial amount of time.
301
302
303Thomas Hellstrom <thellstrom@vmware.com>
diff --git a/Documentation/laptops/thinkpad-acpi.txt b/Documentation/laptops/thinkpad-acpi.txt
index 9d666828915a..cf7bc6cb9719 100644
--- a/Documentation/laptops/thinkpad-acpi.txt
+++ b/Documentation/laptops/thinkpad-acpi.txt
@@ -1398,7 +1398,7 @@ Sysfs notes:
1398EXPERIMENTAL: UWB 1398EXPERIMENTAL: UWB
1399----------------- 1399-----------------
1400 1400
1401This feature is marked EXPERIMENTAL because it has not been extensively 1401This feature is considered EXPERIMENTAL because it has not been extensively
1402tested and validated in various ThinkPad models yet. The feature may not 1402tested and validated in various ThinkPad models yet. The feature may not
1403work as expected. USE WITH CAUTION! To use this feature, you need to supply 1403work as expected. USE WITH CAUTION! To use this feature, you need to supply
1404the experimental=1 parameter when loading the module. 1404the experimental=1 parameter when loading the module.
diff --git a/Documentation/leds/00-INDEX b/Documentation/leds/00-INDEX
index 5fefe374892f..5246090ef15c 100644
--- a/Documentation/leds/00-INDEX
+++ b/Documentation/leds/00-INDEX
@@ -6,5 +6,7 @@ leds-lp5521.txt
6 - notes on how to use the leds-lp5521 driver. 6 - notes on how to use the leds-lp5521 driver.
7leds-lp5523.txt 7leds-lp5523.txt
8 - notes on how to use the leds-lp5523 driver. 8 - notes on how to use the leds-lp5523 driver.
9leds-lp55xx.txt
10 - description about lp55xx common driver.
9leds-lm3556.txt 11leds-lm3556.txt
10 - notes on how to use the leds-lm3556 driver. 12 - notes on how to use the leds-lm3556 driver.
diff --git a/Documentation/leds/leds-lp5521.txt b/Documentation/leds/leds-lp5521.txt
index 0e542ab3d4a0..270f57196339 100644
--- a/Documentation/leds/leds-lp5521.txt
+++ b/Documentation/leds/leds-lp5521.txt
@@ -17,19 +17,8 @@ lp5521:channelx, where x is 0 .. 2
17All three channels can be also controlled using the engine micro programs. 17All three channels can be also controlled using the engine micro programs.
18More details of the instructions can be found from the public data sheet. 18More details of the instructions can be found from the public data sheet.
19 19
20Control interface for the engines: 20LP5521 has the internal program memory for running various LED patterns.
21x is 1 .. 3 21For the details, please refer to 'firmware' section in leds-lp55xx.txt
22enginex_mode : disabled, load, run
23enginex_load : store program (visible only in engine load mode)
24
25Example (start to blink the channel 2 led):
26cd /sys/class/leds/lp5521:channel2/device
27echo "load" > engine3_mode
28echo "037f4d0003ff6000" > engine3_load
29echo "run" > engine3_mode
30
31stop the engine:
32echo "disabled" > engine3_mode
33 22
34sysfs contains a selftest entry. 23sysfs contains a selftest entry.
35The test communicates with the chip and checks that 24The test communicates with the chip and checks that
@@ -47,7 +36,7 @@ The name of each channel can be configurable.
47If the name field is not defined, the default name will be set to 'xxxx:channelN' 36If the name field is not defined, the default name will be set to 'xxxx:channelN'
48(XXXX : pdata->label or i2c client name, N : channel number) 37(XXXX : pdata->label or i2c client name, N : channel number)
49 38
50static struct lp5521_led_config lp5521_led_config[] = { 39static struct lp55xx_led_config lp5521_led_config[] = {
51 { 40 {
52 .name = "red", 41 .name = "red",
53 .chan_nr = 0, 42 .chan_nr = 0,
@@ -81,10 +70,10 @@ static void lp5521_enable(bool state)
81 /* Control of chip enable signal */ 70 /* Control of chip enable signal */
82} 71}
83 72
84static struct lp5521_platform_data lp5521_platform_data = { 73static struct lp55xx_platform_data lp5521_platform_data = {
85 .led_config = lp5521_led_config, 74 .led_config = lp5521_led_config,
86 .num_channels = ARRAY_SIZE(lp5521_led_config), 75 .num_channels = ARRAY_SIZE(lp5521_led_config),
87 .clock_mode = LP5521_CLOCK_EXT, 76 .clock_mode = LP55XX_CLOCK_EXT,
88 .setup_resources = lp5521_setup, 77 .setup_resources = lp5521_setup,
89 .release_resources = lp5521_release, 78 .release_resources = lp5521_release,
90 .enable = lp5521_enable, 79 .enable = lp5521_enable,
@@ -105,47 +94,9 @@ example of update_config :
105 LP5521_CP_MODE_AUTO | LP5521_R_TO_BATT | \ 94 LP5521_CP_MODE_AUTO | LP5521_R_TO_BATT | \
106 LP5521_CLK_INT) 95 LP5521_CLK_INT)
107 96
108static struct lp5521_platform_data lp5521_pdata = { 97static struct lp55xx_platform_data lp5521_pdata = {
109 .led_config = lp5521_led_config, 98 .led_config = lp5521_led_config,
110 .num_channels = ARRAY_SIZE(lp5521_led_config), 99 .num_channels = ARRAY_SIZE(lp5521_led_config),
111 .clock_mode = LP5521_CLOCK_INT, 100 .clock_mode = LP55XX_CLOCK_INT,
112 .update_config = LP5521_CONFIGS, 101 .update_config = LP5521_CONFIGS,
113}; 102};
114
115LED patterns : LP5521 has autonomous operation without external control.
116Pattern data can be defined in the platform data.
117
118example of led pattern data :
119
120/* RGB(50,5,0) 500ms on, 500ms off, infinite loop */
121static u8 pattern_red[] = {
122 0x40, 0x32, 0x60, 0x00, 0x40, 0x00, 0x60, 0x00,
123 };
124
125static u8 pattern_green[] = {
126 0x40, 0x05, 0x60, 0x00, 0x40, 0x00, 0x60, 0x00,
127 };
128
129static struct lp5521_led_pattern board_led_patterns[] = {
130 {
131 .r = pattern_red,
132 .g = pattern_green,
133 .size_r = ARRAY_SIZE(pattern_red),
134 .size_g = ARRAY_SIZE(pattern_green),
135 },
136};
137
138static struct lp5521_platform_data lp5521_platform_data = {
139 .led_config = lp5521_led_config,
140 .num_channels = ARRAY_SIZE(lp5521_led_config),
141 .clock_mode = LP5521_CLOCK_EXT,
142 .patterns = board_led_patterns,
143 .num_patterns = ARRAY_SIZE(board_led_patterns),
144};
145
146Then predefined led pattern(s) can be executed via the sysfs.
147To start the pattern #1,
148# echo 1 > /sys/bus/i2c/devices/xxxx/led_pattern
149(xxxx : i2c bus & slave address)
150To end the pattern,
151# echo 0 > /sys/bus/i2c/devices/xxxx/led_pattern
diff --git a/Documentation/leds/leds-lp5523.txt b/Documentation/leds/leds-lp5523.txt
index c2743f59f9ac..899fdad509fe 100644
--- a/Documentation/leds/leds-lp5523.txt
+++ b/Documentation/leds/leds-lp5523.txt
@@ -27,25 +27,8 @@ c) Default
27If both fields are NULL, 'lp5523' is used by default. 27If both fields are NULL, 'lp5523' is used by default.
28/sys/class/leds/lp5523:channelN (N: 0 ~ 8) 28/sys/class/leds/lp5523:channelN (N: 0 ~ 8)
29 29
30The chip provides 3 engines. Each engine can control channels without 30LP5523 has the internal program memory for running various LED patterns.
31interaction from the main CPU. Details of the micro engine code can be found 31For the details, please refer to 'firmware' section in leds-lp55xx.txt
32from the public data sheet. Leds can be muxed to different channels.
33
34Control interface for the engines:
35x is 1 .. 3
36enginex_mode : disabled, load, run
37enginex_load : microcode load (visible only in load mode)
38enginex_leds : led mux control (visible only in load mode)
39
40cd /sys/class/leds/lp5523:channel2/device
41echo "load" > engine3_mode
42echo "9d80400004ff05ff437f0000" > engine3_load
43echo "111111111" > engine3_leds
44echo "run" > engine3_mode
45
46sysfs contains a selftest entry. It measures each channel
47voltage level and checks if it looks reasonable. If the level is too high,
48the led is missing; if the level is too low, there is a short circuit.
49 32
50Selftest uses always the current from the platform data. 33Selftest uses always the current from the platform data.
51 34
@@ -58,7 +41,7 @@ Example platform data:
58 41
59Note - chan_nr can have values between 0 and 8. 42Note - chan_nr can have values between 0 and 8.
60 43
61static struct lp5523_led_config lp5523_led_config[] = { 44static struct lp55xx_led_config lp5523_led_config[] = {
62 { 45 {
63 .name = "D1", 46 .name = "D1",
64 .chan_nr = 0, 47 .chan_nr = 0,
@@ -88,10 +71,10 @@ static void lp5523_enable(bool state)
88 /* Control chip enable signal */ 71 /* Control chip enable signal */
89} 72}
90 73
91static struct lp5523_platform_data lp5523_platform_data = { 74static struct lp55xx_platform_data lp5523_platform_data = {
92 .led_config = lp5523_led_config, 75 .led_config = lp5523_led_config,
93 .num_channels = ARRAY_SIZE(lp5523_led_config), 76 .num_channels = ARRAY_SIZE(lp5523_led_config),
94 .clock_mode = LP5523_CLOCK_EXT, 77 .clock_mode = LP55XX_CLOCK_EXT,
95 .setup_resources = lp5523_setup, 78 .setup_resources = lp5523_setup,
96 .release_resources = lp5523_release, 79 .release_resources = lp5523_release,
97 .enable = lp5523_enable, 80 .enable = lp5523_enable,
diff --git a/Documentation/leds/leds-lp55xx.txt b/Documentation/leds/leds-lp55xx.txt
new file mode 100644
index 000000000000..ced41868d2d1
--- /dev/null
+++ b/Documentation/leds/leds-lp55xx.txt
@@ -0,0 +1,118 @@
1LP5521/LP5523/LP55231 Common Driver
2===================================
3
4Authors: Milo(Woogyom) Kim <milo.kim@ti.com>
5
6Description
7-----------
8LP5521, LP5523/55231 have common features as below.
9
10 Register access via the I2C
11 Device initialization/deinitialization
12 Create LED class devices for multiple output channels
13 Device attributes for user-space interface
14 Program memory for running LED patterns
15
16The LP55xx common driver provides these features using exported functions.
17 lp55xx_init_device() / lp55xx_deinit_device()
18 lp55xx_register_leds() / lp55xx_unregister_leds()
19 lp55xx_regsister_sysfs() / lp55xx_unregister_sysfs()
20
21( Driver Structure Data )
22
23In lp55xx common driver, two different data structure is used.
24
25o lp55xx_led
26 control multi output LED channels such as led current, channel index.
27o lp55xx_chip
28 general chip control such like the I2C and platform data.
29
30For example, LP5521 has maximum 3 LED channels.
31LP5523/55231 has 9 output channels.
32
33lp55xx_chip for LP5521 ... lp55xx_led #1
34 lp55xx_led #2
35 lp55xx_led #3
36
37lp55xx_chip for LP5523 ... lp55xx_led #1
38 lp55xx_led #2
39 .
40 .
41 lp55xx_led #9
42
43( Chip Dependent Code )
44
45To support device specific configurations, special structure
46'lpxx_device_config' is used.
47
48 Maximum number of channels
49 Reset command, chip enable command
50 Chip specific initialization
51 Brightness control register access
52 Setting LED output current
53 Program memory address access for running patterns
54 Additional device specific attributes
55
56( Firmware Interface )
57
58LP55xx family devices have the internal program memory for running
59various LED patterns.
60This pattern data is saved as a file in the user-land or
61hex byte string is written into the memory through the I2C.
62LP55xx common driver supports the firmware interface.
63
64LP55xx chips have three program engines.
65To load and run the pattern, the programming sequence is following.
66 (1) Select an engine number (1/2/3)
67 (2) Mode change to load
68 (3) Write pattern data into selected area
69 (4) Mode change to run
70
71The LP55xx common driver provides simple interfaces as below.
72select_engine : Select which engine is used for running program
73run_engine : Start program which is loaded via the firmware interface
74firmware : Load program data
75
76For example, run blinking pattern in engine #1 of LP5521
77echo 1 > /sys/bus/i2c/devices/xxxx/select_engine
78echo 1 > /sys/class/firmware/lp5521/loading
79echo "4000600040FF6000" > /sys/class/firmware/lp5521/data
80echo 0 > /sys/class/firmware/lp5521/loading
81echo 1 > /sys/bus/i2c/devices/xxxx/run_engine
82
83For example, run blinking pattern in engine #3 of LP55231
84echo 3 > /sys/bus/i2c/devices/xxxx/select_engine
85echo 1 > /sys/class/firmware/lp55231/loading
86echo "9d0740ff7e0040007e00a0010000" > /sys/class/firmware/lp55231/data
87echo 0 > /sys/class/firmware/lp55231/loading
88echo 1 > /sys/bus/i2c/devices/xxxx/run_engine
89
90To start blinking patterns in engine #2 and #3 simultaneously,
91for idx in 2 3
92do
93 echo $idx > /sys/class/leds/red/device/select_engine
94 sleep 0.1
95 echo 1 > /sys/class/firmware/lp5521/loading
96 echo "4000600040FF6000" > /sys/class/firmware/lp5521/data
97 echo 0 > /sys/class/firmware/lp5521/loading
98done
99echo 1 > /sys/class/leds/red/device/run_engine
100
101Here is another example for LP5523.
102echo 2 > /sys/bus/i2c/devices/xxxx/select_engine
103echo 1 > /sys/class/firmware/lp5523/loading
104echo "9d80400004ff05ff437f0000" > /sys/class/firmware/lp5523/data
105echo 0 > /sys/class/firmware/lp5523/loading
106echo 1 > /sys/bus/i2c/devices/xxxx/run_engine
107
108As soon as 'loading' is set to 0, registered callback is called.
109Inside the callback, the selected engine is loaded and memory is updated.
110To run programmed pattern, 'run_engine' attribute should be enabled.
111
112( 'run_engine' and 'firmware_cb' )
113The sequence of running the program data is common.
114But each device has own specific register addresses for commands.
115To support this, 'run_engine' and 'firmware_cb' are configurable in each driver.
116run_engine : Control the selected engine
117firmware_cb : The callback function after loading the firmware is done.
118 Chip specific commands for loading and updating program memory.
diff --git a/Documentation/lockstat.txt b/Documentation/lockstat.txt
index cef00d42ed5b..dd2f7b26ca30 100644
--- a/Documentation/lockstat.txt
+++ b/Documentation/lockstat.txt
@@ -65,7 +65,7 @@ that had to wait on lock acquisition.
65 65
66 - CONFIGURATION 66 - CONFIGURATION
67 67
68Lock statistics are enabled via CONFIG_LOCK_STATS. 68Lock statistics are enabled via CONFIG_LOCK_STAT.
69 69
70 - USAGE 70 - USAGE
71 71
diff --git a/Documentation/magic-number.txt b/Documentation/magic-number.txt
index 82761a31d64d..76d80a64bbe1 100644
--- a/Documentation/magic-number.txt
+++ b/Documentation/magic-number.txt
@@ -122,7 +122,7 @@ SLAB_C_MAGIC 0x4f17a36d kmem_cache mm/slab.c
122COW_MAGIC 0x4f4f4f4d cow_header_v1 arch/um/drivers/ubd_user.c 122COW_MAGIC 0x4f4f4f4d cow_header_v1 arch/um/drivers/ubd_user.c
123I810_CARD_MAGIC 0x5072696E i810_card sound/oss/i810_audio.c 123I810_CARD_MAGIC 0x5072696E i810_card sound/oss/i810_audio.c
124TRIDENT_CARD_MAGIC 0x5072696E trident_card sound/oss/trident.c 124TRIDENT_CARD_MAGIC 0x5072696E trident_card sound/oss/trident.c
125ROUTER_MAGIC 0x524d4157 wan_device include/linux/wanrouter.h 125ROUTER_MAGIC 0x524d4157 wan_device [in wanrouter.h pre 3.9]
126SCC_MAGIC 0x52696368 gs_port drivers/char/scc.h 126SCC_MAGIC 0x52696368 gs_port drivers/char/scc.h
127SAVEKMSG_MAGIC1 0x53415645 savekmsg arch/*/amiga/config.c 127SAVEKMSG_MAGIC1 0x53415645 savekmsg arch/*/amiga/config.c
128GDA_MAGIC 0x58464552 gda arch/mips/include/asm/sn/gda.h 128GDA_MAGIC 0x58464552 gda arch/mips/include/asm/sn/gda.h
diff --git a/Documentation/media-framework.txt b/Documentation/media-framework.txt
index 802875413873..77bd0a42f19d 100644
--- a/Documentation/media-framework.txt
+++ b/Documentation/media-framework.txt
@@ -336,7 +336,7 @@ Calls to media_entity_pipeline_start() can be nested. The pipeline pointer must
336be identical for all nested calls to the function. 336be identical for all nested calls to the function.
337 337
338media_entity_pipeline_start() may return an error. In that case, it will 338media_entity_pipeline_start() may return an error. In that case, it will
339clean up any the changes it did by itself. 339clean up any of the changes it did by itself.
340 340
341When stopping the stream, drivers must notify the entities with 341When stopping the stream, drivers must notify the entities with
342 342
diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt
index 2759f7c188f0..fa5d8a9ae205 100644
--- a/Documentation/memory-barriers.txt
+++ b/Documentation/memory-barriers.txt
@@ -251,12 +251,13 @@ And there are a number of things that _must_ or _must_not_ be assumed:
251 251
252 And for: 252 And for:
253 253
254 *A = X; Y = *A; 254 *A = X; *(A + 4) = Y;
255 255
256 we may get either of: 256 we may get any of:
257 257
258 STORE *A = X; Y = LOAD *A; 258 STORE *A = X; STORE *(A + 4) = Y;
259 STORE *A = Y = X; 259 STORE *(A + 4) = Y; STORE *A = X;
260 STORE {*A, *(A + 4) } = {X, Y};
260 261
261 262
262========================= 263=========================
@@ -1684,6 +1685,7 @@ explicit lock operations, described later). These include:
1684 1685
1685 xchg(); 1686 xchg();
1686 cmpxchg(); 1687 cmpxchg();
1688 atomic_xchg();
1687 atomic_cmpxchg(); 1689 atomic_cmpxchg();
1688 atomic_inc_return(); 1690 atomic_inc_return();
1689 atomic_dec_return(); 1691 atomic_dec_return();
diff --git a/Documentation/memory-hotplug.txt b/Documentation/memory-hotplug.txt
index 6d0c2519cf47..8e5eacbdcfa3 100644
--- a/Documentation/memory-hotplug.txt
+++ b/Documentation/memory-hotplug.txt
@@ -161,7 +161,8 @@ a recent addition and not present on older kernels.
161 in the memory block. 161 in the memory block.
162'state' : read-write 162'state' : read-write
163 at read: contains online/offline state of memory. 163 at read: contains online/offline state of memory.
164 at write: user can specify "online", "offline" command 164 at write: user can specify "online_kernel",
165 "online_movable", "online", "offline" command
165 which will be performed on al sections in the block. 166 which will be performed on al sections in the block.
166'phys_device' : read-only: designed to show the name of physical memory 167'phys_device' : read-only: designed to show the name of physical memory
167 device. This is not well implemented now. 168 device. This is not well implemented now.
@@ -255,6 +256,17 @@ For onlining, you have to write "online" to the section's state file as:
255 256
256% echo online > /sys/devices/system/memory/memoryXXX/state 257% echo online > /sys/devices/system/memory/memoryXXX/state
257 258
259This onlining will not change the ZONE type of the target memory section,
260If the memory section is in ZONE_NORMAL, you can change it to ZONE_MOVABLE:
261
262% echo online_movable > /sys/devices/system/memory/memoryXXX/state
263(NOTE: current limit: this memory section must be adjacent to ZONE_MOVABLE)
264
265And if the memory section is in ZONE_MOVABLE, you can change it to ZONE_NORMAL:
266
267% echo online_kernel > /sys/devices/system/memory/memoryXXX/state
268(NOTE: current limit: this memory section must be adjacent to ZONE_NORMAL)
269
258After this, section memoryXXX's state will be 'online' and the amount of 270After this, section memoryXXX's state will be 'online' and the amount of
259available memory will be increased. 271available memory will be increased.
260 272
@@ -377,15 +389,21 @@ The third argument is passed by pointer of struct memory_notify.
377struct memory_notify { 389struct memory_notify {
378 unsigned long start_pfn; 390 unsigned long start_pfn;
379 unsigned long nr_pages; 391 unsigned long nr_pages;
392 int status_change_nid_normal;
393 int status_change_nid_high;
380 int status_change_nid; 394 int status_change_nid;
381} 395}
382 396
383start_pfn is start_pfn of online/offline memory. 397start_pfn is start_pfn of online/offline memory.
384nr_pages is # of pages of online/offline memory. 398nr_pages is # of pages of online/offline memory.
385status_change_nid is set node id when N_HIGH_MEMORY of nodemask is (will be) 399status_change_nid_normal is set node id when N_NORMAL_MEMORY of nodemask
400is (will be) set/clear, if this is -1, then nodemask status is not changed.
401status_change_nid_high is set node id when N_HIGH_MEMORY of nodemask
402is (will be) set/clear, if this is -1, then nodemask status is not changed.
403status_change_nid is set node id when N_MEMORY of nodemask is (will be)
386set/clear. It means a new(memoryless) node gets new memory by online and a 404set/clear. It means a new(memoryless) node gets new memory by online and a
387node loses all memory. If this is -1, then nodemask status is not changed. 405node loses all memory. If this is -1, then nodemask status is not changed.
388If status_changed_nid >= 0, callback should create/discard structures for the 406If status_changed_nid* >= 0, callback should create/discard structures for the
389node if necessary. 407node if necessary.
390 408
391-------------- 409--------------
diff --git a/Documentation/metag/00-INDEX b/Documentation/metag/00-INDEX
new file mode 100644
index 000000000000..db11c513bd5c
--- /dev/null
+++ b/Documentation/metag/00-INDEX
@@ -0,0 +1,4 @@
100-INDEX
2 - this file
3kernel-ABI.txt
4 - Documents metag ABI details
diff --git a/Documentation/metag/kernel-ABI.txt b/Documentation/metag/kernel-ABI.txt
new file mode 100644
index 000000000000..7b8dee83b9c1
--- /dev/null
+++ b/Documentation/metag/kernel-ABI.txt
@@ -0,0 +1,256 @@
1 ==========================
2 KERNEL ABIS FOR METAG ARCH
3 ==========================
4
5This document describes the Linux ABIs for the metag architecture, and has the
6following sections:
7
8 (*) Outline of registers
9 (*) Userland registers
10 (*) Kernel registers
11 (*) System call ABI
12 (*) Calling conventions
13
14
15====================
16OUTLINE OF REGISTERS
17====================
18
19The main Meta core registers are arranged in units:
20
21 UNIT Type DESCRIPTION GP EXT PRIV GLOBAL
22 ======= ======= =============== ======= ======= ======= =======
23 CT Special Control unit
24 D0 General Data unit 0 0-7 8-15 16-31 16-31
25 D1 General Data unit 1 0-7 8-15 16-31 16-31
26 A0 General Address unit 0 0-3 4-7 8-15 8-15
27 A1 General Address unit 1 0-3 4-7 8-15 8-15
28 PC Special PC unit 0 1
29 PORT Special Ports
30 TR Special Trigger unit 0-7
31 TT Special Trace unit 0-5
32 FX General FP unit 0-15
33
34GP registers form part of the main context.
35
36Extended context registers (EXT) may not be present on all hardware threads and
37can be context switched if support is enabled and the appropriate bits are set
38in e.g. the D0.8 register to indicate what extended state to preserve.
39
40Global registers are shared between threads and are privilege protected.
41
42See arch/metag/include/asm/metag_regs.h for definitions relating to core
43registers and the fields and bits they contain. See the TRMs for further details
44about special registers.
45
46Several special registers are preserved in the main context, these are the
47interesting ones:
48
49 REG (ALIAS) PURPOSE
50 ======================= ===============================================
51 CT.1 (TXMODE) Processor mode bits (particularly for DSP)
52 CT.2 (TXSTATUS) Condition flags and LSM_STEP (MGET/MSET step)
53 CT.3 (TXRPT) Branch repeat counter
54 PC.0 (PC) Program counter
55
56Some of the general registers have special purposes in the ABI and therefore
57have aliases:
58
59 D0 REG (ALIAS) PURPOSE D1 REG (ALIAS) PURPOSE
60 =============== =============== =============== =======================
61 D0.0 (D0Re0) 32bit result D1.0 (D1Re0) Top half of 64bit result
62 D0.1 (D0Ar6) Argument 6 D1.1 (D1Ar5) Argument 5
63 D0.2 (D0Ar4) Argument 4 D1.2 (D1Ar3) Argument 3
64 D0.3 (D0Ar2) Argument 2 D1.3 (D1Ar1) Argument 1
65 D0.4 (D0FrT) Frame temp D1.4 (D1RtP) Return pointer
66 D0.5 Call preserved D1.5 Call preserved
67 D0.6 Call preserved D1.6 Call preserved
68 D0.7 Call preserved D1.7 Call preserved
69
70 A0 REG (ALIAS) PURPOSE A1 REG (ALIAS) PURPOSE
71 =============== =============== =============== =======================
72 A0.0 (A0StP) Stack pointer A1.0 (A1GbP) Global base pointer
73 A0.1 (A0FrP) Frame pointer A1.1 (A1LbP) Local base pointer
74 A0.2 A1.2
75 A0.3 A1.3
76
77
78==================
79USERLAND REGISTERS
80==================
81
82All the general purpose D0, D1, A0, A1 registers are preserved when entering the
83kernel (including asynchronous events such as interrupts and timer ticks) except
84the following which have special purposes in the ABI:
85
86 REGISTERS WHEN STATUS PURPOSE
87 =============== ======= =============== ===============================
88 D0.8 DSP Preserved ECH, determines what extended
89 DSP state to preserve.
90 A0.0 (A0StP) ALWAYS Preserved Stack >= A0StP may be clobbered
91 at any time by the creation of a
92 signal frame.
93 A1.0 (A1GbP) SMP Clobbered Used as temporary for loading
94 kernel stack pointer and saving
95 core context.
96 A0.15 !SMP Protected Stores kernel stack pointer.
97 A1.15 ALWAYS Protected Stores kernel base pointer.
98
99On UP A0.15 is used to store the kernel stack pointer for storing the userland
100context. A0.15 is global between hardware threads though which means it cannot
101be used on SMP for this purpose. Since no protected local registers are
102available A1GbP is reserved for use as a temporary to allow a percpu stack
103pointer to be loaded for storing the rest of the context.
104
105
106================
107KERNEL REGISTERS
108================
109
110When in the kernel the following registers have special purposes in the ABI:
111
112 REGISTERS WHEN STATUS PURPOSE
113 =============== ======= =============== ===============================
114 A0.0 (A0StP) ALWAYS Preserved Stack >= A0StP may be clobbered
115 at any time by the creation of
116 an irq signal frame.
117 A1.0 (A1GbP) ALWAYS Preserved Reserved (kernel base pointer).
118
119
120===============
121SYSTEM CALL ABI
122===============
123
124When a system call is made, the following registers are effective:
125
126 REGISTERS CALL RETURN
127 =============== ======================= ===============================
128 D0.0 (D0Re0) Return value (or -errno)
129 D1.0 (D1Re0) System call number Clobbered
130 D0.1 (D0Ar6) Syscall arg #6 Preserved
131 D1.1 (D1Ar5) Syscall arg #5 Preserved
132 D0.2 (D0Ar4) Syscall arg #4 Preserved
133 D1.2 (D1Ar3) Syscall arg #3 Preserved
134 D0.3 (D0Ar2) Syscall arg #2 Preserved
135 D1.3 (D1Ar1) Syscall arg #1 Preserved
136
137Due to the limited number of argument registers and some system calls with badly
138aligned 64-bit arguments, 64-bit values are always packed in consecutive
139arguments, even if this is contrary to the normal calling conventions (where the
140two halves would go in a matching pair of data registers).
141
142For example fadvise64_64 usually has the signature:
143
144 long sys_fadvise64_64(i32 fd, i64 offs, i64 len, i32 advice);
145
146But for metag fadvise64_64 is wrapped so that the 64-bit arguments are packed:
147
148 long sys_fadvise64_64_metag(i32 fd, i32 offs_lo,
149 i32 offs_hi, i32 len_lo,
150 i32 len_hi, i32 advice)
151
152So the arguments are packed in the registers like this:
153
154 D0 REG (ALIAS) VALUE D1 REG (ALIAS) VALUE
155 =============== =============== =============== =======================
156 D0.1 (D0Ar6) advice D1.1 (D1Ar5) hi(len)
157 D0.2 (D0Ar4) lo(len) D1.2 (D1Ar3) hi(offs)
158 D0.3 (D0Ar2) lo(offs) D1.3 (D1Ar1) fd
159
160
161===================
162CALLING CONVENTIONS
163===================
164
165These calling conventions apply to both user and kernel code. The stack grows
166from low addresses to high addresses in the metag ABI. The stack pointer (A0StP)
167should always point to the next free address on the stack and should at all
168times be 64-bit aligned. The following registers are effective at the point of a
169call:
170
171 REGISTERS CALL RETURN
172 =============== ======================= ===============================
173 D0.0 (D0Re0) 32bit return value
174 D1.0 (D1Re0) Upper half of 64bit return value
175 D0.1 (D0Ar6) 32bit argument #6 Clobbered
176 D1.1 (D1Ar5) 32bit argument #5 Clobbered
177 D0.2 (D0Ar4) 32bit argument #4 Clobbered
178 D1.2 (D1Ar3) 32bit argument #3 Clobbered
179 D0.3 (D0Ar2) 32bit argument #2 Clobbered
180 D1.3 (D1Ar1) 32bit argument #1 Clobbered
181 D0.4 (D0FrT) Clobbered
182 D1.4 (D1RtP) Return pointer Clobbered
183 D{0-1}.{5-7} Preserved
184 A0.0 (A0StP) Stack pointer Preserved
185 A1.0 (A0GbP) Preserved
186 A0.1 (A0FrP) Frame pointer Preserved
187 A1.1 (A0LbP) Preserved
188 A{0-1},{2-3} Clobbered
189
19064-bit arguments are placed in matching pairs of registers (i.e. the same
191register number in both D0 and D1 units), with the least significant half in D0
192and the most significant half in D1, leaving a gap where necessary. Futher
193arguments are stored on the stack in reverse order (earlier arguments at higher
194addresses):
195
196 ADDRESS 0 1 2 3 4 5 6 7
197 =============== ===== ===== ===== ===== ===== ===== ===== =====
198 A0StP -->
199 A0StP-0x08 32bit argument #8 32bit argument #7
200 A0StP-0x10 32bit argument #10 32bit argument #9
201
202Function prologues tend to look a bit like this:
203
204 /* If frame pointer in use, move it to frame temp register so it can be
205 easily pushed onto stack */
206 MOV D0FrT,A0FrP
207
208 /* If frame pointer in use, set it to stack pointer */
209 ADD A0FrP,A0StP,#0
210
211 /* Preserve D0FrT, D1RtP, D{0-1}.{5-7} on stack, incrementing A0StP */
212 MSETL [A0StP++],D0FrT,D0.5,D0.6,D0.7
213
214 /* Allocate some stack space for local variables */
215 ADD A0StP,A0StP,#0x10
216
217At this point the stack would look like this:
218
219 ADDRESS 0 1 2 3 4 5 6 7
220 =============== ===== ===== ===== ===== ===== ===== ===== =====
221 A0StP -->
222 A0StP-0x08
223 A0StP-0x10
224 A0StP-0x18 Old D0.7 Old D1.7
225 A0StP-0x20 Old D0.6 Old D1.6
226 A0StP-0x28 Old D0.5 Old D1.5
227 A0FrP --> Old A0FrP (frame ptr) Old D1RtP (return ptr)
228 A0FrP-0x08 32bit argument #8 32bit argument #7
229 A0FrP-0x10 32bit argument #10 32bit argument #9
230
231Function epilogues tend to differ depending on the use of a frame pointer. An
232example of a frame pointer epilogue:
233
234 /* Restore D0FrT, D1RtP, D{0-1}.{5-7} from stack, incrementing A0FrP */
235 MGETL D0FrT,D0.5,D0.6,D0.7,[A0FrP++]
236 /* Restore stack pointer to where frame pointer was before increment */
237 SUB A0StP,A0FrP,#0x20
238 /* Restore frame pointer from frame temp */
239 MOV A0FrP,D0FrT
240 /* Return to caller via restored return pointer */
241 MOV PC,D1RtP
242
243If the function hasn't touched the frame pointer, MGETL cannot be safely used
244with A0StP as it always increments and that would expose the stack to clobbering
245by interrupts (kernel) or signals (user). Therefore it's common to see the MGETL
246split into separate GETL instructions:
247
248 /* Restore D0FrT, D1RtP, D{0-1}.{5-7} from stack */
249 GETL D0FrT,D1RtP,[A0StP+#-0x30]
250 GETL D0.5,D1.5,[A0StP+#-0x28]
251 GETL D0.6,D1.6,[A0StP+#-0x20]
252 GETL D0.7,D1.7,[A0StP+#-0x18]
253 /* Restore stack pointer */
254 SUB A0StP,A0StP,#0x30
255 /* Return to caller via restored return pointer */
256 MOV PC,D1RtP
diff --git a/Documentation/misc-devices/mei/mei-amt-version.c b/Documentation/misc-devices/mei/mei-amt-version.c
index 01804f216312..49e4f770864a 100644
--- a/Documentation/misc-devices/mei/mei-amt-version.c
+++ b/Documentation/misc-devices/mei/mei-amt-version.c
@@ -214,7 +214,7 @@ out:
214} 214}
215 215
216/*************************************************************************** 216/***************************************************************************
217 * Intel Advanced Management Technolgy ME Client 217 * Intel Advanced Management Technology ME Client
218 ***************************************************************************/ 218 ***************************************************************************/
219 219
220#define AMT_MAJOR_VERSION 1 220#define AMT_MAJOR_VERSION 1
@@ -256,7 +256,7 @@ struct amt_code_versions {
256} __attribute__((packed)); 256} __attribute__((packed));
257 257
258/*************************************************************************** 258/***************************************************************************
259 * Intel Advanced Management Technolgy Host Interface 259 * Intel Advanced Management Technology Host Interface
260 ***************************************************************************/ 260 ***************************************************************************/
261 261
262struct amt_host_if_msg_header { 262struct amt_host_if_msg_header {
diff --git a/Documentation/mmc/mmc-dev-attrs.txt b/Documentation/mmc/mmc-dev-attrs.txt
index 22ae8441489f..0d98fac8893b 100644
--- a/Documentation/mmc/mmc-dev-attrs.txt
+++ b/Documentation/mmc/mmc-dev-attrs.txt
@@ -25,6 +25,8 @@ All attributes are read-only.
25 serial Product Serial Number (from CID Register) 25 serial Product Serial Number (from CID Register)
26 erase_size Erase group size 26 erase_size Erase group size
27 preferred_erase_size Preferred erase size 27 preferred_erase_size Preferred erase size
28 raw_rpmb_size_mult RPMB partition size
29 rel_sectors Reliable write sector count
28 30
29Note on Erase Size and Preferred Erase Size: 31Note on Erase Size and Preferred Erase Size:
30 32
@@ -65,6 +67,11 @@ Note on Erase Size and Preferred Erase Size:
65 67
66 "preferred_erase_size" is in bytes. 68 "preferred_erase_size" is in bytes.
67 69
70Note on raw_rpmb_size_mult:
71 "raw_rpmb_size_mult" is a mutliple of 128kB block.
72 RPMB size in byte is calculated by using the following equation:
73 RPMB partition size = 128kB x raw_rpmb_size_mult
74
68SD/MMC/SDIO Clock Gating Attribute 75SD/MMC/SDIO Clock Gating Attribute
69================================== 76==================================
70 77
diff --git a/Documentation/namespaces/resource-control.txt b/Documentation/namespaces/resource-control.txt
new file mode 100644
index 000000000000..abc13c394738
--- /dev/null
+++ b/Documentation/namespaces/resource-control.txt
@@ -0,0 +1,14 @@
1There are a lot of kinds of objects in the kernel that don't have
2individual limits or that have limits that are ineffective when a set
3of processes is allowed to switch user ids. With user namespaces
4enabled in a kernel for people who don't trust their users or their
5users programs to play nice this problems becomes more acute.
6
7Therefore it is recommended that memory control groups be enabled in
8kernels that enable user namespaces, and it is further recommended
9that userspace configure memory control groups to limit how much
10memory user's they don't trust to play nice can use.
11
12Memory control groups can be configured by installing the libcgroup
13package present on most distros editing /etc/cgrules.conf,
14/etc/cgconfig.conf and setting up libpam-cgroup.
diff --git a/Documentation/networking/00-INDEX b/Documentation/networking/00-INDEX
index 2cc3c7733a2f..258d9b92c36f 100644
--- a/Documentation/networking/00-INDEX
+++ b/Documentation/networking/00-INDEX
@@ -52,8 +52,6 @@ de4x5.txt
52 - the Digital EtherWORKS DE4?? and DE5?? PCI Ethernet driver 52 - the Digital EtherWORKS DE4?? and DE5?? PCI Ethernet driver
53decnet.txt 53decnet.txt
54 - info on using the DECnet networking layer in Linux. 54 - info on using the DECnet networking layer in Linux.
55depca.txt
56 - the Digital DEPCA/EtherWORKS DE1?? and DE2?? LANCE Ethernet driver
57dl2k.txt 55dl2k.txt
58 - README for D-Link DL2000-based Gigabit Ethernet Adapters (dl2k.ko). 56 - README for D-Link DL2000-based Gigabit Ethernet Adapters (dl2k.ko).
59dm9000.txt 57dm9000.txt
@@ -72,8 +70,6 @@ e1000e.txt
72 - README for the Intel Gigabit Ethernet Driver (e1000e). 70 - README for the Intel Gigabit Ethernet Driver (e1000e).
73eql.txt 71eql.txt
74 - serial IP load balancing 72 - serial IP load balancing
75ewrk3.txt
76 - the Digital EtherWORKS 3 DE203/4/5 Ethernet driver
77fib_trie.txt 73fib_trie.txt
78 - Level Compressed Trie (LC-trie) notes: a structure for routing. 74 - Level Compressed Trie (LC-trie) notes: a structure for routing.
79filter.txt 75filter.txt
@@ -126,8 +122,6 @@ ltpc.txt
126 - the Apple or Farallon LocalTalk PC card driver 122 - the Apple or Farallon LocalTalk PC card driver
127mac80211-injection.txt 123mac80211-injection.txt
128 - HOWTO use packet injection with mac80211 124 - HOWTO use packet injection with mac80211
129multicast.txt
130 - Behaviour of cards under Multicast
131multiqueue.txt 125multiqueue.txt
132 - HOWTO for multiqueue network device support. 126 - HOWTO for multiqueue network device support.
133netconsole.txt 127netconsole.txt
diff --git a/Documentation/networking/DLINK.txt b/Documentation/networking/DLINK.txt
deleted file mode 100644
index 55d24433d151..000000000000
--- a/Documentation/networking/DLINK.txt
+++ /dev/null
@@ -1,203 +0,0 @@
1Released 1994-06-13
2
3
4 CONTENTS:
5
6 1. Introduction.
7 2. License.
8 3. Files in this release.
9 4. Installation.
10 5. Problems and tuning.
11 6. Using the drivers with earlier releases.
12 7. Acknowledgments.
13
14
15 1. INTRODUCTION.
16
17 This is a set of Ethernet drivers for the D-Link DE-600/DE-620
18 pocket adapters, for the parallel port on a Linux based machine.
19 Some adapter "clones" will also work. Xircom is _not_ a clone...
20 These drivers _can_ be used as loadable modules,
21 and were developed for use on Linux 1.1.13 and above.
22 For use on Linux 1.0.X, or earlier releases, see below.
23
24 I have used these drivers for NFS, ftp, telnet and X-clients on
25 remote machines. Transmissions with ftp seems to work as
26 good as can be expected (i.e. > 80k bytes/sec) from a
27 parallel port...:-) Receive speeds will be about 60-80% of this.
28 Depending on your machine, somewhat higher speeds can be achieved.
29
30 All comments/fixes to Bjorn Ekwall (bj0rn@blox.se).
31
32
33 2. LICENSE.
34
35 This program is free software; you can redistribute it
36 and/or modify it under the terms of the GNU General Public
37 License as published by the Free Software Foundation; either
38 version 2, or (at your option) any later version.
39
40 This program is distributed in the hope that it will be
41 useful, but WITHOUT ANY WARRANTY; without even the implied
42 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
43 PURPOSE. See the GNU General Public License for more
44 details.
45
46 You should have received a copy of the GNU General Public
47 License along with this program; if not, write to the Free
48 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
49 02139, USA.
50
51
52 3. FILES IN THIS RELEASE.
53
54 README.DLINK This file.
55 de600.c The Source (may it be with You :-) for the DE-600
56 de620.c ditto for the DE-620
57 de620.h Macros for de620.c
58
59 If you are upgrading from the d-link tar release, there will
60 also be a "dlink-patches" file that will patch Linux 1.1.18:
61 linux/drivers/net/Makefile
62 linux/drivers/net/CONFIG
63 linux/drivers/net/MODULES
64 linux/drivers/net/Space.c
65 linux/config.in
66 Apply the patch by:
67 "cd /usr/src; patch -p0 < linux/drivers/net/dlink-patches"
68 The old source, "linux/drivers/net/d_link.c", can be removed.
69
70
71 4. INSTALLATION.
72
73 o Get the latest net binaries, according to current net.wisdom.
74
75 o Read the NET-2 and Ethernet HOWTOs and modify your setup.
76
77 o If your parallel port has a strange address or irq,
78 modify "linux/drivers/net/CONFIG" accordingly, or adjust
79 the parameters in the "tuning" section in the sources.
80
81 If you are going to use the drivers as loadable modules, do _not_
82 enable them while doing "make config", but instead make sure that
83 the drivers are included in "linux/drivers/net/MODULES".
84
85 If you are _not_ going to use the driver(s) as loadable modules,
86 but instead have them included in the kernel, remember to enable
87 the drivers while doing "make config".
88
89 o To include networking and DE600/DE620 support in your kernel:
90 # cd /linux
91 (as modules:)
92 # make config (answer yes on CONFIG_NET and CONFIG_INET)
93 (else included in the kernel:)
94 # make config (answer yes on CONFIG _NET, _INET and _DE600 or _DE620)
95 # make clean
96 # make zImage (or whatever magic you usually do)
97
98 o I use lilo to boot multiple kernels, so that I at least
99 can have one working kernel :-). If you do too, append
100 these lines to /etc/lilo/config:
101
102 image = /linux/zImage
103 label = newlinux
104 root = /dev/hda2 (or whatever YOU have...)
105
106 # /etc/lilo/install
107
108 o Do "sync" and reboot the new kernel with a D-Link
109 DE-600/DE-620 pocket adapter connected.
110
111 o The adapter can be configured with ifconfig eth?
112 where the actual number is decided by the kernel
113 when the drivers are initialized.
114
115
116 5. "PROBLEMS" AND TUNING,
117
118 o If you see error messages from the driver, and if the traffic
119 stops on the adapter, try to do "ifconfig" and "route" once
120 more, just as in "rc.inet1". This should take care of most
121 problems, including effects from power loss, or adapters that
122 aren't connected to the printer port in some way or another.
123 You can somewhat change the behaviour by enabling/disabling
124 the macro SHUTDOWN_WHEN_LOST in the "tuning" section.
125 For the DE-600 there is another macro, CHECK_LOST_DE600,
126 that you might want to read about in the "tuning" section.
127
128 o Some machines have trouble handling the parallel port and
129 the adapter at high speed. If you experience problems:
130
131 DE-600:
132 - The adapter is not recognized at boot, i.e. an Ethernet
133 address of 00:80:c8:... is not shown, try to add another
134 "; SLOW_DOWN_IO"
135 at DE600_SLOW_DOWN in the "tuning" section. As a last resort,
136 uncomment: "#define REALLY_SLOW_IO" (see <asm/io.h> for hints).
137
138 - You experience "timeout" messages: first try to add another
139 "; SLOW_DOWN_IO"
140 at DE600_SLOW_DOWN in the "tuning" section, _then_ try to
141 increase the value (original value: 5) at
142 "if (tickssofar < 5)" near line 422.
143
144 DE-620:
145 - Your parallel port might be "sluggish". To cater for
146 this, there are the macros LOWSPEED and READ_DELAY/WRITE_DELAY
147 in the "tuning" section. Your first step should be to enable
148 LOWSPEED, and after that you can "tune" the XXX_DELAY values.
149
150 o If the adapter _is_ recognized at boot but you get messages
151 about "Network Unreachable", then the problem is probably
152 _not_ with the driver. Check your net configuration instead
153 (ifconfig and route) in "rc.inet1".
154
155 o There is some rudimentary support for debugging, look at
156 the source. Use "-DDE600_DEBUG=3" or "-DDE620_DEBUG=3"
157 when compiling, or include it in "linux/drivers/net/CONFIG".
158 IF YOU HAVE PROBLEMS YOU CAN'T SOLVE: PLEASE COMPILE THE DRIVER
159 WITH DEBUGGING ENABLED, AND SEND ME THE RESULTING OUTPUT!
160
161
162 6. USING THE DRIVERS WITH EARLIER RELEASES.
163
164 The later 1.1.X releases of the Linux kernel include some
165 changes in the networking layer (a.k.a. NET3). This affects
166 these drivers in a few places. The hints that follow are
167 _not_ tested by me, since I don't have the disk space to keep
168 all releases on-line.
169 Known needed changes to date:
170 - release patchfile: some patches will fail, but they should
171 be easy to apply "by hand", since they are trivial.
172 (Space.c: d_link_init() is now called de600_probe())
173 - de600.c: change "mark_bh(NET_BH)" to "mark_bh(INET_BH)".
174 - de620.c: (maybe) change the code around "netif_rx(skb);" to be
175 similar to the code around "dev_rint(...)" in de600.c
176
177
178 7. ACKNOWLEDGMENTS.
179
180 These drivers wouldn't have been done without the base
181 (and support) from Ross Biro, and D-Link Systems Inc.
182 The driver relies upon GPL-ed source from D-Link Systems Inc.
183 and from Russel Nelson at Crynwr Software <nelson@crynwr.com>.
184
185 Additional input also from:
186 Donald Becker <becker@super.org>, Alan Cox <A.Cox@swansea.ac.uk>
187 and Fred N. van Kempen <waltje@uWalt.NL.Mugnet.ORG>
188
189 DE-600 alpha release primary victim^H^H^H^H^H^Htester:
190 - Erik Proper <erikp@cs.kun.nl>.
191 Good input also from several users, most notably
192 - Mark Burton <markb@ordern.demon.co.uk>.
193
194 DE-620 alpha release victims^H^H^H^H^H^H^Htesters:
195 - J. Joshua Kopper <kopper@rtsg.mot.com>
196 - Olav Kvittem <Olav.Kvittem@uninett.no>
197 - Germano Caronni <caronni@nessie.cs.id.ethz.ch>
198 - Jeremy Fitzhardinge <jeremy@suite.sw.oz.au>
199
200
201 Happy hacking!
202
203 Bjorn Ekwall == bj0rn@blox.se
diff --git a/Documentation/networking/LICENSE.qlcnic b/Documentation/networking/LICENSE.qlcnic
index e7fb2c6023bc..2ae3b64983ab 100644
--- a/Documentation/networking/LICENSE.qlcnic
+++ b/Documentation/networking/LICENSE.qlcnic
@@ -1,4 +1,4 @@
1Copyright (c) 2009-2011 QLogic Corporation 1Copyright (c) 2009-2013 QLogic Corporation
2QLogic Linux qlcnic NIC Driver 2QLogic Linux qlcnic NIC Driver
3 3
4You may modify and redistribute the device driver code under the 4You may modify and redistribute the device driver code under the
diff --git a/Documentation/networking/batman-adv.txt b/Documentation/networking/batman-adv.txt
index a173d2a879f5..c1d82047a4b1 100644
--- a/Documentation/networking/batman-adv.txt
+++ b/Documentation/networking/batman-adv.txt
@@ -203,7 +203,8 @@ abled during run time. Following log_levels are defined:
2032 - Enable messages related to route added / changed / deleted 2032 - Enable messages related to route added / changed / deleted
2044 - Enable messages related to translation table operations 2044 - Enable messages related to translation table operations
2058 - Enable messages related to bridge loop avoidance 2058 - Enable messages related to bridge loop avoidance
20615 - enable all messages 20616 - Enable messaged related to DAT, ARP snooping and parsing
20731 - Enable all messages
207 208
208The debug output can be changed at runtime using the file 209The debug output can be changed at runtime using the file
209/sys/class/net/bat0/mesh/log_level. e.g. 210/sys/class/net/bat0/mesh/log_level. e.g.
diff --git a/Documentation/networking/cs89x0.txt b/Documentation/networking/cs89x0.txt
index c725d33b316f..0e190180eec8 100644
--- a/Documentation/networking/cs89x0.txt
+++ b/Documentation/networking/cs89x0.txt
@@ -36,7 +36,6 @@ TABLE OF CONTENTS
36 4.1 Compiling the Driver as a Loadable Module 36 4.1 Compiling the Driver as a Loadable Module
37 4.2 Compiling the driver to support memory mode 37 4.2 Compiling the driver to support memory mode
38 4.3 Compiling the driver to support Rx DMA 38 4.3 Compiling the driver to support Rx DMA
39 4.4 Compiling the Driver into the Kernel
40 39
415.0 TESTING AND TROUBLESHOOTING 405.0 TESTING AND TROUBLESHOOTING
42 5.1 Known Defects and Limitations 41 5.1 Known Defects and Limitations
@@ -364,84 +363,6 @@ The compile-time optionality for DMA was removed in the 2.3 kernel
364series. DMA support is now unconditionally part of the driver. It is 363series. DMA support is now unconditionally part of the driver. It is
365enabled by the 'use_dma=1' module option. 364enabled by the 'use_dma=1' module option.
366 365
3674.4 COMPILING THE DRIVER INTO THE KERNEL
368
369If your Linux distribution already has support for the cs89x0 driver
370then simply copy the source file to the /usr/src/linux/drivers/net
371directory to replace the original ones and run the make utility to
372rebuild the kernel. See Step 3 for rebuilding the kernel.
373
374If your Linux does not include the cs89x0 driver, you need to edit three
375configuration files, copy the source file to the /usr/src/linux/drivers/net
376directory, and then run the make utility to rebuild the kernel.
377
3781. Edit the following configuration files by adding the statements as
379indicated. (When possible, try to locate the added text to the section of the
380file containing similar statements).
381
382
383a.) In /usr/src/linux/drivers/net/Config.in, add:
384
385tristate 'CS89x0 support' CONFIG_CS89x0
386
387Example:
388
389 if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
390 tristate 'ICL EtherTeam 16i/32 support' CONFIG_ETH16I
391 fi
392
393 tristate 'CS89x0 support' CONFIG_CS89x0
394
395 tristate 'NE2000/NE1000 support' CONFIG_NE2000
396 if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
397 tristate 'NI5210 support' CONFIG_NI52
398
399
400b.) In /usr/src/linux/drivers/net/Makefile, add the following lines:
401
402ifeq ($(CONFIG_CS89x0),y)
403L_OBJS += cs89x0.o
404else
405 ifeq ($(CONFIG_CS89x0),m)
406 M_OBJS += cs89x0.o
407 endif
408endif
409
410
411c.) In /linux/drivers/net/Space.c file, add the line:
412
413extern int cs89x0_probe(struct device *dev);
414
415
416Example:
417
418 extern int ultra_probe(struct device *dev);
419 extern int wd_probe(struct device *dev);
420 extern int el2_probe(struct device *dev);
421
422 extern int cs89x0_probe(struct device *dev);
423
424 extern int ne_probe(struct device *dev);
425 extern int hp_probe(struct device *dev);
426 extern int hp_plus_probe(struct device *dev);
427
428
429Also add:
430
431 #ifdef CONFIG_CS89x0
432 { cs89x0_probe,0 },
433 #endif
434
435
4362.) Copy the driver source files (cs89x0.c and cs89x0.h)
437into the /usr/src/linux/drivers/net directory.
438
439
4403.) Go to /usr/src/linux directory and run 'make config' followed by 'make'
441(or make bzImage) to rebuild the kernel.
442
4434.) Use the DOS 'setup' utility to disable plug and play on the NIC.
444
445 366
4465.0 TESTING AND TROUBLESHOOTING 3675.0 TESTING AND TROUBLESHOOTING
447=============================================================================== 368===============================================================================
diff --git a/Documentation/networking/depca.txt b/Documentation/networking/depca.txt
deleted file mode 100644
index 24c6b26e5658..000000000000
--- a/Documentation/networking/depca.txt
+++ /dev/null
@@ -1,92 +0,0 @@
1
2DE10x
3=====
4
5Memory Addresses:
6
7 SW1 SW2 SW3 SW4
864K on on on on d0000 dbfff
9 off on on on c0000 cbfff
10 off off on on e0000 ebfff
11
1232K on on off on d8000 dbfff
13 off on off on c8000 cbfff
14 off off off on e8000 ebfff
15
16DBR ROM on on dc000 dffff
17 off on cc000 cffff
18 off off ec000 effff
19
20Note that the 2K mode is set by SW3/SW4 on/off or off/off. Address
21assignment is through the RBSA register.
22
23I/O Address:
24 SW5
250x300 on
260x200 off
27
28Remote Boot:
29 SW6
30Disable on
31Enable off
32
33Remote Boot Timeout:
34 SW7
352.5min on
3630s off
37
38IRQ:
39 SW8 SW9 SW10 SW11 SW12
402 on off off off off
413 off on off off off
424 off off on off off
435 off off off on off
447 off off off off on
45
46DE20x
47=====
48
49Memory Size:
50
51 SW3 SW4
5264K on on
5332K off on
542K on off
552K off off
56
57Start Addresses:
58
59 SW1 SW2 SW3 SW4
6064K on on on on c0000 cffff
61 on off on on d0000 dffff
62 off on on on e0000 effff
63
6432K on on off off c8000 cffff
65 on off off off d8000 dffff
66 off on off off e8000 effff
67
68Illegal off off - - - -
69
70I/O Address:
71 SW5
720x300 on
730x200 off
74
75Remote Boot:
76 SW6
77Disable on
78Enable off
79
80Remote Boot Timeout:
81 SW7
822.5min on
8330s off
84
85IRQ:
86 SW8 SW9 SW10 SW11 SW12
875 on off off off off
889 off on off off off
8910 off off on off off
9011 off off off on off
9115 off off off off on
92
diff --git a/Documentation/networking/ewrk3.txt b/Documentation/networking/ewrk3.txt
deleted file mode 100644
index 90e9e5f16e6b..000000000000
--- a/Documentation/networking/ewrk3.txt
+++ /dev/null
@@ -1,46 +0,0 @@
1The EtherWORKS 3 driver in this distribution is designed to work with all
2kernels > 1.1.33 (approx) and includes tools in the 'ewrk3tools'
3subdirectory to allow set up of the card, similar to the MSDOS
4'NICSETUP.EXE' tools provided on the DOS drivers disk (type 'make' in that
5subdirectory to make the tools).
6
7The supported cards are DE203, DE204 and DE205. All other cards are NOT
8supported - refer to 'depca.c' for running the LANCE based network cards and
9'de4x5.c' for the DIGITAL Semiconductor PCI chip based adapters from
10Digital.
11
12The ability to load this driver as a loadable module has been included and
13used extensively during the driver development (to save those long reboot
14sequences). To utilise this ability, you have to do 8 things:
15
16 0) have a copy of the loadable modules code installed on your system.
17 1) copy ewrk3.c from the /linux/drivers/net directory to your favourite
18 temporary directory.
19 2) edit the source code near line 1898 to reflect the I/O address and
20 IRQ you're using.
21 3) compile ewrk3.c, but include -DMODULE in the command line to ensure
22 that the correct bits are compiled (see end of source code).
23 4) if you are wanting to add a new card, goto 5. Otherwise, recompile a
24 kernel with the ewrk3 configuration turned off and reboot.
25 5) insmod ewrk3.o
26 [Alan Cox: Changed this so you can insmod ewrk3.o irq=x io=y]
27 [Adam Kropelin: Multiple cards now supported by irq=x1,x2 io=y1,y2]
28 6) run the net startup bits for your new eth?? interface manually
29 (usually /etc/rc.inet[12] at boot time).
30 7) enjoy!
31
32 Note that autoprobing is not allowed in loadable modules - the system is
33 already up and running and you're messing with interrupts.
34
35 To unload a module, turn off the associated interface
36 'ifconfig eth?? down' then 'rmmod ewrk3'.
37
38The performance we've achieved so far has been measured through the 'ttcp'
39tool at 975kB/s. This measures the total TCP stack performance which
40includes the card, so don't expect to get much nearer the 1.25MB/s
41theoretical Ethernet rate.
42
43
44Enjoy!
45
46Dave
diff --git a/Documentation/networking/filter.txt b/Documentation/networking/filter.txt
index bbf2005270b5..cdb3e40b9d14 100644
--- a/Documentation/networking/filter.txt
+++ b/Documentation/networking/filter.txt
@@ -17,12 +17,12 @@ creating filters.
17 17
18LSF is much simpler than BPF. One does not have to worry about 18LSF is much simpler than BPF. One does not have to worry about
19devices or anything like that. You simply create your filter 19devices or anything like that. You simply create your filter
20code, send it to the kernel via the SO_ATTACH_FILTER ioctl and 20code, send it to the kernel via the SO_ATTACH_FILTER option and
21if your filter code passes the kernel check on it, you then 21if your filter code passes the kernel check on it, you then
22immediately begin filtering data on that socket. 22immediately begin filtering data on that socket.
23 23
24You can also detach filters from your socket via the 24You can also detach filters from your socket via the
25SO_DETACH_FILTER ioctl. This will probably not be used much 25SO_DETACH_FILTER option. This will probably not be used much
26since when you close a socket that has a filter on it the 26since when you close a socket that has a filter on it the
27filter is automagically removed. The other less common case 27filter is automagically removed. The other less common case
28may be adding a different filter on the same socket where you had another 28may be adding a different filter on the same socket where you had another
@@ -31,12 +31,19 @@ the old one and placing your new one in its place, assuming your
31filter has passed the checks, otherwise if it fails the old filter 31filter has passed the checks, otherwise if it fails the old filter
32will remain on that socket. 32will remain on that socket.
33 33
34SO_LOCK_FILTER option allows to lock the filter attached to a
35socket. Once set, a filter cannot be removed or changed. This allows
36one process to setup a socket, attach a filter, lock it then drop
37privileges and be assured that the filter will be kept until the
38socket is closed.
39
34Examples 40Examples
35======== 41========
36 42
37Ioctls- 43Ioctls-
38setsockopt(sockfd, SOL_SOCKET, SO_ATTACH_FILTER, &Filter, sizeof(Filter)); 44setsockopt(sockfd, SOL_SOCKET, SO_ATTACH_FILTER, &Filter, sizeof(Filter));
39setsockopt(sockfd, SOL_SOCKET, SO_DETACH_FILTER, &value, sizeof(value)); 45setsockopt(sockfd, SOL_SOCKET, SO_DETACH_FILTER, &value, sizeof(value));
46setsockopt(sockfd, SOL_SOCKET, SO_LOCK_FILTER, &value, sizeof(value));
40 47
41See the BSD bpf.4 manpage and the BSD Packet Filter paper written by 48See the BSD bpf.4 manpage and the BSD Packet Filter paper written by
42Steven McCanne and Van Jacobson of Lawrence Berkeley Laboratory. 49Steven McCanne and Van Jacobson of Lawrence Berkeley Laboratory.
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index c7fc10724948..dc2dc87d2557 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -26,20 +26,33 @@ route/max_size - INTEGER
26 Maximum number of routes allowed in the kernel. Increase 26 Maximum number of routes allowed in the kernel. Increase
27 this when using large numbers of interfaces and/or routes. 27 this when using large numbers of interfaces and/or routes.
28 28
29neigh/default/gc_thresh1 - INTEGER
30 Minimum number of entries to keep. Garbage collector will not
31 purge entries if there are fewer than this number.
32 Default: 256
33
29neigh/default/gc_thresh3 - INTEGER 34neigh/default/gc_thresh3 - INTEGER
30 Maximum number of neighbor entries allowed. Increase this 35 Maximum number of neighbor entries allowed. Increase this
31 when using large numbers of interfaces and when communicating 36 when using large numbers of interfaces and when communicating
32 with large numbers of directly-connected peers. 37 with large numbers of directly-connected peers.
38 Default: 1024
33 39
34neigh/default/unres_qlen_bytes - INTEGER 40neigh/default/unres_qlen_bytes - INTEGER
35 The maximum number of bytes which may be used by packets 41 The maximum number of bytes which may be used by packets
36 queued for each unresolved address by other network layers. 42 queued for each unresolved address by other network layers.
37 (added in linux 3.3) 43 (added in linux 3.3)
44 Setting negative value is meaningless and will return error.
45 Default: 65536 Bytes(64KB)
38 46
39neigh/default/unres_qlen - INTEGER 47neigh/default/unres_qlen - INTEGER
40 The maximum number of packets which may be queued for each 48 The maximum number of packets which may be queued for each
41 unresolved address by other network layers. 49 unresolved address by other network layers.
42 (deprecated in linux 3.3) : use unres_qlen_bytes instead. 50 (deprecated in linux 3.3) : use unres_qlen_bytes instead.
51 Prior to linux 3.3, the default value is 3 which may cause
52 unexpected packet loss. The current default value is calculated
53 according to default value of unres_qlen_bytes and true size of
54 packet.
55 Default: 31
43 56
44mtu_expires - INTEGER 57mtu_expires - INTEGER
45 Time, in seconds, that cached PMTU information is kept. 58 Time, in seconds, that cached PMTU information is kept.
@@ -117,17 +130,6 @@ somaxconn - INTEGER
117 Defaults to 128. See also tcp_max_syn_backlog for additional tuning 130 Defaults to 128. See also tcp_max_syn_backlog for additional tuning
118 for TCP sockets. 131 for TCP sockets.
119 132
120tcp_abc - INTEGER
121 Controls Appropriate Byte Count (ABC) defined in RFC3465.
122 ABC is a way of increasing congestion window (cwnd) more slowly
123 in response to partial acknowledgments.
124 Possible values are:
125 0 increase cwnd once per acknowledgment (no ABC)
126 1 increase cwnd once per acknowledgment of full sized segment
127 2 allow increase cwnd by two if acknowledgment is
128 of two segments to compensate for delayed acknowledgments.
129 Default: 0 (off)
130
131tcp_abort_on_overflow - BOOLEAN 133tcp_abort_on_overflow - BOOLEAN
132 If listening service is too slow to accept new connections, 134 If listening service is too slow to accept new connections,
133 reset them. Default state is FALSE. It means that if overflow 135 reset them. Default state is FALSE. It means that if overflow
@@ -199,15 +201,17 @@ tcp_early_retrans - INTEGER
199 Default: 2 201 Default: 2
200 202
201tcp_ecn - INTEGER 203tcp_ecn - INTEGER
202 Enable Explicit Congestion Notification (ECN) in TCP. ECN is only 204 Control use of Explicit Congestion Notification (ECN) by TCP.
203 used when both ends of the TCP flow support it. It is useful to 205 ECN is used only when both ends of the TCP connection indicate
204 avoid losses due to congestion (when the bottleneck router supports 206 support for it. This feature is useful in avoiding losses due
205 ECN). 207 to congestion by allowing supporting routers to signal
208 congestion before having to drop packets.
206 Possible values are: 209 Possible values are:
207 0 disable ECN 210 0 Disable ECN. Neither initiate nor accept ECN.
208 1 ECN enabled 211 1 Enable ECN when requested by incoming connections and
209 2 Only server-side ECN enabled. If the other end does 212 also request ECN on outgoing connection attempts.
210 not support ECN, behavior is like with ECN disabled. 213 2 Enable ECN when requested by incoming connections
214 but do not request ECN on outgoing connections.
211 Default: 2 215 Default: 2
212 216
213tcp_fack - BOOLEAN 217tcp_fack - BOOLEAN
@@ -215,15 +219,14 @@ tcp_fack - BOOLEAN
215 The value is not used, if tcp_sack is not enabled. 219 The value is not used, if tcp_sack is not enabled.
216 220
217tcp_fin_timeout - INTEGER 221tcp_fin_timeout - INTEGER
218 Time to hold socket in state FIN-WAIT-2, if it was closed 222 The length of time an orphaned (no longer referenced by any
219 by our side. Peer can be broken and never close its side, 223 application) connection will remain in the FIN_WAIT_2 state
220 or even died unexpectedly. Default value is 60sec. 224 before it is aborted at the local end. While a perfectly
221 Usual value used in 2.2 was 180 seconds, you may restore 225 valid "receive only" state for an un-orphaned connection, an
222 it, but remember that if your machine is even underloaded WEB server, 226 orphaned connection in FIN_WAIT_2 state could otherwise wait
223 you risk to overflow memory with kilotons of dead sockets, 227 forever for the remote to close its end of the connection.
224 FIN-WAIT-2 sockets are less dangerous than FIN-WAIT-1, 228 Cf. tcp_max_orphans
225 because they eat maximum 1.5K of memory, but they tend 229 Default: 60 seconds
226 to live longer. Cf. tcp_max_orphans.
227 230
228tcp_frto - INTEGER 231tcp_frto - INTEGER
229 Enables Forward RTO-Recovery (F-RTO) defined in RFC4138. 232 Enables Forward RTO-Recovery (F-RTO) defined in RFC4138.
@@ -495,7 +498,7 @@ tcp_fastopen - INTEGER
495tcp_syn_retries - INTEGER 498tcp_syn_retries - INTEGER
496 Number of times initial SYNs for an active TCP connection attempt 499 Number of times initial SYNs for an active TCP connection attempt
497 will be retransmitted. Should not be higher than 255. Default value 500 will be retransmitted. Should not be higher than 255. Default value
498 is 6, which corresponds to 63seconds till the last restransmission 501 is 6, which corresponds to 63seconds till the last retransmission
499 with the current initial RTO of 1second. With this the final timeout 502 with the current initial RTO of 1second. With this the final timeout
500 for an active TCP connection attempt will happen after 127seconds. 503 for an active TCP connection attempt will happen after 127seconds.
501 504
@@ -1323,6 +1326,12 @@ force_tllao - BOOLEAN
1323 race condition where the sender deletes the cached link-layer address 1326 race condition where the sender deletes the cached link-layer address
1324 prior to receiving a response to a previous solicitation." 1327 prior to receiving a response to a previous solicitation."
1325 1328
1329ndisc_notify - BOOLEAN
1330 Define mode for notification of address and device changes.
1331 0 - (default): do nothing
1332 1 - Generate unsolicited neighbour advertisements when device is brought
1333 up or hardware address changes.
1334
1326icmp/*: 1335icmp/*:
1327ratelimit - INTEGER 1336ratelimit - INTEGER
1328 Limit the maximal rates for sending ICMPv6 packets. 1337 Limit the maximal rates for sending ICMPv6 packets.
@@ -1514,6 +1523,20 @@ cookie_preserve_enable - BOOLEAN
1514 1523
1515 Default: 1 1524 Default: 1
1516 1525
1526cookie_hmac_alg - STRING
1527 Select the hmac algorithm used when generating the cookie value sent by
1528 a listening sctp socket to a connecting client in the INIT-ACK chunk.
1529 Valid values are:
1530 * md5
1531 * sha1
1532 * none
1533 Ability to assign md5 or sha1 as the selected alg is predicated on the
1534 configuration of those algorithms at build time (CONFIG_CRYPTO_MD5 and
1535 CONFIG_CRYPTO_SHA1).
1536
1537 Default: Dependent on configuration. MD5 if available, else SHA1 if
1538 available, else none.
1539
1517rcvbuf_policy - INTEGER 1540rcvbuf_policy - INTEGER
1518 Determines if the receive buffer is attributed to the socket or to 1541 Determines if the receive buffer is attributed to the socket or to
1519 association. SCTP supports the capability to create multiple 1542 association. SCTP supports the capability to create multiple
@@ -1526,7 +1549,7 @@ rcvbuf_policy - INTEGER
1526 blocking. 1549 blocking.
1527 1550
1528 1: rcvbuf space is per association 1551 1: rcvbuf space is per association
1529 0: recbuf space is per socket 1552 0: rcvbuf space is per socket
1530 1553
1531 Default: 0 1554 Default: 0
1532 1555
diff --git a/Documentation/networking/multicast.txt b/Documentation/networking/multicast.txt
deleted file mode 100644
index b06c8c69266f..000000000000
--- a/Documentation/networking/multicast.txt
+++ /dev/null
@@ -1,63 +0,0 @@
1Behaviour of Cards Under Multicast
2==================================
3
4This is how they currently behave, not what the hardware can do--for example,
5the Lance driver doesn't use its filter, even though the code for loading
6it is in the DEC Lance-based driver.
7
8The following are requirements for multicasting
9-----------------------------------------------
10AppleTalk Multicast hardware filtering not important but
11 avoid cards only doing promisc
12IP-Multicast Multicast hardware filters really help
13IP-MRoute AllMulti hardware filters are of no help
14
15
16Board Multicast AllMulti Promisc Filter
17------------------------------------------------------------------------
183c501 YES YES YES Software
193c503 YES YES YES Hardware
203c505 YES NO YES Hardware
213c507 NO NO NO N/A
223c509 YES YES YES Software
233c59x YES YES YES Software
24ac3200 YES YES YES Hardware
25apricot YES PROMISC YES Hardware
26arcnet NO NO NO N/A
27at1700 PROMISC PROMISC YES Software
28atp PROMISC PROMISC YES Software
29cs89x0 YES YES YES Software
30de4x5 YES YES YES Hardware
31de600 NO NO NO N/A
32de620 PROMISC PROMISC YES Software
33depca YES PROMISC YES Hardware
34dmfe YES YES YES Software(*)
35e2100 YES YES YES Hardware
36eepro YES PROMISC YES Hardware
37eexpress NO NO NO N/A
38ewrk3 YES PROMISC YES Hardware
39hp-plus YES YES YES Hardware
40hp YES YES YES Hardware
41hp100 YES YES YES Hardware
42ibmtr NO NO NO N/A
43ioc3-eth YES YES YES Hardware
44lance YES YES YES Software(#)
45ne YES YES YES Hardware
46ni52 <------------------ Buggy ------------------>
47ni65 YES YES YES Software(#)
48seeq NO NO NO N/A
49sgiseek <------------------ Buggy ------------------>
50smc-ultra YES YES YES Hardware
51sunlance YES YES YES Hardware
52tulip YES YES YES Hardware
53wavelan YES PROMISC YES Hardware
54wd YES YES YES Hardware
55xirc2ps_cs YES YES YES Hardware
56znet YES YES YES Software
57
58
59PROMISC = This multicast mode is in fact promiscuous mode. Avoid using
60cards who go PROMISC on any multicast in a multicast kernel.
61
62(#) = Hardware multicast support is not used yet.
63(*) = Hardware support for Davicom 9132 chipset only.
diff --git a/Documentation/networking/netconsole.txt b/Documentation/networking/netconsole.txt
index 2e9e0ae2cd45..a5d574a9ae09 100644
--- a/Documentation/networking/netconsole.txt
+++ b/Documentation/networking/netconsole.txt
@@ -1,9 +1,10 @@
1 1
2started by Ingo Molnar <mingo@redhat.com>, 2001.09.17 2started by Ingo Molnar <mingo@redhat.com>, 2001.09.17
32.6 port and netpoll api by Matt Mackall <mpm@selenic.com>, Sep 9 2003 32.6 port and netpoll api by Matt Mackall <mpm@selenic.com>, Sep 9 2003
4IPv6 support by Cong Wang <xiyou.wangcong@gmail.com>, Jan 1 2013
4 5
5Please send bug reports to Matt Mackall <mpm@selenic.com> 6Please send bug reports to Matt Mackall <mpm@selenic.com>
6and Satyam Sharma <satyam.sharma@gmail.com> 7Satyam Sharma <satyam.sharma@gmail.com>, and Cong Wang <xiyou.wangcong@gmail.com>
7 8
8Introduction: 9Introduction:
9============= 10=============
@@ -41,6 +42,10 @@ Examples:
41 42
42 insmod netconsole netconsole=@/,@10.0.0.2/ 43 insmod netconsole netconsole=@/,@10.0.0.2/
43 44
45 or using IPv6
46
47 insmod netconsole netconsole=@/,@fd00:1:2:3::1/
48
44It also supports logging to multiple remote agents by specifying 49It also supports logging to multiple remote agents by specifying
45parameters for the multiple agents separated by semicolons and the 50parameters for the multiple agents separated by semicolons and the
46complete string enclosed in "quotes", thusly: 51complete string enclosed in "quotes", thusly:
diff --git a/Documentation/networking/netdev-features.txt b/Documentation/networking/netdev-features.txt
index 4164f5c02e4b..f310edec8a77 100644
--- a/Documentation/networking/netdev-features.txt
+++ b/Documentation/networking/netdev-features.txt
@@ -164,4 +164,4 @@ read the CRC recorded by the NIC on receipt of the packet.
164This requests that the NIC receive all possible frames, including errored 164This requests that the NIC receive all possible frames, including errored
165frames (such as bad FCS, etc). This can be helpful when sniffing a link with 165frames (such as bad FCS, etc). This can be helpful when sniffing a link with
166bad packets on it. Some NICs may receive more packets if also put into normal 166bad packets on it. Some NICs may receive more packets if also put into normal
167PROMISC mdoe. 167PROMISC mode.
diff --git a/Documentation/networking/nf_conntrack-sysctl.txt b/Documentation/networking/nf_conntrack-sysctl.txt
new file mode 100644
index 000000000000..70da5086153d
--- /dev/null
+++ b/Documentation/networking/nf_conntrack-sysctl.txt
@@ -0,0 +1,176 @@
1/proc/sys/net/netfilter/nf_conntrack_* Variables:
2
3nf_conntrack_acct - BOOLEAN
4 0 - disabled (default)
5 not 0 - enabled
6
7 Enable connection tracking flow accounting. 64-bit byte and packet
8 counters per flow are added.
9
10nf_conntrack_buckets - INTEGER (read-only)
11 Size of hash table. If not specified as parameter during module
12 loading, the default size is calculated by dividing total memory
13 by 16384 to determine the number of buckets but the hash table will
14 never have fewer than 32 or more than 16384 buckets.
15
16nf_conntrack_checksum - BOOLEAN
17 0 - disabled
18 not 0 - enabled (default)
19
20 Verify checksum of incoming packets. Packets with bad checksums are
21 in INVALID state. If this is enabled, such packets will not be
22 considered for connection tracking.
23
24nf_conntrack_count - INTEGER (read-only)
25 Number of currently allocated flow entries.
26
27nf_conntrack_events - BOOLEAN
28 0 - disabled
29 not 0 - enabled (default)
30
31 If this option is enabled, the connection tracking code will
32 provide userspace with connection tracking events via ctnetlink.
33
34nf_conntrack_events_retry_timeout - INTEGER (seconds)
35 default 15
36
37 This option is only relevant when "reliable connection tracking
38 events" are used. Normally, ctnetlink is "lossy", that is,
39 events are normally dropped when userspace listeners can't keep up.
40
41 Userspace can request "reliable event mode". When this mode is
42 active, the conntrack will only be destroyed after the event was
43 delivered. If event delivery fails, the kernel periodically
44 re-tries to send the event to userspace.
45
46 This is the maximum interval the kernel should use when re-trying
47 to deliver the destroy event.
48
49 A higher number means there will be fewer delivery retries and it
50 will take longer for a backlog to be processed.
51
52nf_conntrack_expect_max - INTEGER
53 Maximum size of expectation table. Default value is
54 nf_conntrack_buckets / 256. Minimum is 1.
55
56nf_conntrack_frag6_high_thresh - INTEGER
57 default 262144
58
59 Maximum memory used to reassemble IPv6 fragments. When
60 nf_conntrack_frag6_high_thresh bytes of memory is allocated for this
61 purpose, the fragment handler will toss packets until
62 nf_conntrack_frag6_low_thresh is reached.
63
64nf_conntrack_frag6_low_thresh - INTEGER
65 default 196608
66
67 See nf_conntrack_frag6_low_thresh
68
69nf_conntrack_frag6_timeout - INTEGER (seconds)
70 default 60
71
72 Time to keep an IPv6 fragment in memory.
73
74nf_conntrack_generic_timeout - INTEGER (seconds)
75 default 600
76
77 Default for generic timeout. This refers to layer 4 unknown/unsupported
78 protocols.
79
80nf_conntrack_helper - BOOLEAN
81 0 - disabled
82 not 0 - enabled (default)
83
84 Enable automatic conntrack helper assignment.
85
86nf_conntrack_icmp_timeout - INTEGER (seconds)
87 default 30
88
89 Default for ICMP timeout.
90
91nf_conntrack_icmpv6_timeout - INTEGER (seconds)
92 default 30
93
94 Default for ICMP6 timeout.
95
96nf_conntrack_log_invalid - INTEGER
97 0 - disable (default)
98 1 - log ICMP packets
99 6 - log TCP packets
100 17 - log UDP packets
101 33 - log DCCP packets
102 41 - log ICMPv6 packets
103 136 - log UDPLITE packets
104 255 - log packets of any protocol
105
106 Log invalid packets of a type specified by value.
107
108nf_conntrack_max - INTEGER
109 Size of connection tracking table. Default value is
110 nf_conntrack_buckets value * 4.
111
112nf_conntrack_tcp_be_liberal - BOOLEAN
113 0 - disabled (default)
114 not 0 - enabled
115
116 Be conservative in what you do, be liberal in what you accept from others.
117 If it's non-zero, we mark only out of window RST segments as INVALID.
118
119nf_conntrack_tcp_loose - BOOLEAN
120 0 - disabled
121 not 0 - enabled (default)
122
123 If it is set to zero, we disable picking up already established
124 connections.
125
126nf_conntrack_tcp_max_retrans - INTEGER
127 default 3
128
129 Maximum number of packets that can be retransmitted without
130 received an (acceptable) ACK from the destination. If this number
131 is reached, a shorter timer will be started.
132
133nf_conntrack_tcp_timeout_close - INTEGER (seconds)
134 default 10
135
136nf_conntrack_tcp_timeout_close_wait - INTEGER (seconds)
137 default 60
138
139nf_conntrack_tcp_timeout_established - INTEGER (seconds)
140 default 432000 (5 days)
141
142nf_conntrack_tcp_timeout_fin_wait - INTEGER (seconds)
143 default 120
144
145nf_conntrack_tcp_timeout_last_ack - INTEGER (seconds)
146 default 30
147
148nf_conntrack_tcp_timeout_max_retrans - INTEGER (seconds)
149 default 300
150
151nf_conntrack_tcp_timeout_syn_recv - INTEGER (seconds)
152 default 60
153
154nf_conntrack_tcp_timeout_syn_sent - INTEGER (seconds)
155 default 120
156
157nf_conntrack_tcp_timeout_time_wait - INTEGER (seconds)
158 default 120
159
160nf_conntrack_tcp_timeout_unacknowledged - INTEGER (seconds)
161 default 300
162
163nf_conntrack_timestamp - BOOLEAN
164 0 - disabled (default)
165 not 0 - enabled
166
167 Enable connection tracking flow timestamping.
168
169nf_conntrack_udp_timeout - INTEGER (seconds)
170 default 30
171
172nf_conntrack_udp_timeout_stream2 - INTEGER (seconds)
173 default 180
174
175 This extended timeout will be used in case there is an UDP stream
176 detected.
diff --git a/Documentation/networking/operstates.txt b/Documentation/networking/operstates.txt
index 1a77a3cfae54..97694572338b 100644
--- a/Documentation/networking/operstates.txt
+++ b/Documentation/networking/operstates.txt
@@ -88,6 +88,10 @@ set this flag. On netif_carrier_off(), the scheduler stops sending
88packets. The name 'carrier' and the inversion are historical, think of 88packets. The name 'carrier' and the inversion are historical, think of
89it as lower layer. 89it as lower layer.
90 90
91Note that for certain kind of soft-devices, which are not managing any
92real hardware, there is possible to set this bit from userpsace.
93One should use TVL IFLA_CARRIER to do so.
94
91netif_carrier_ok() can be used to query that bit. 95netif_carrier_ok() can be used to query that bit.
92 96
93__LINK_STATE_DORMANT, maps to IFF_DORMANT: 97__LINK_STATE_DORMANT, maps to IFF_DORMANT:
diff --git a/Documentation/networking/packet_mmap.txt b/Documentation/networking/packet_mmap.txt
index 1c08a4b0981f..94444b152fbc 100644
--- a/Documentation/networking/packet_mmap.txt
+++ b/Documentation/networking/packet_mmap.txt
@@ -3,9 +3,9 @@
3-------------------------------------------------------------------------------- 3--------------------------------------------------------------------------------
4 4
5This file documents the mmap() facility available with the PACKET 5This file documents the mmap() facility available with the PACKET
6socket interface on 2.4 and 2.6 kernels. This type of sockets is used for 6socket interface on 2.4/2.6/3.x kernels. This type of sockets is used for
7capture network traffic with utilities like tcpdump or any other that needs 7i) capture network traffic with utilities like tcpdump, ii) transmit network
8raw access to network interface. 8traffic, or any other that needs raw access to network interface.
9 9
10You can find the latest version of this document at: 10You can find the latest version of this document at:
11 http://wiki.ipxwarzone.com/index.php5?title=Linux_packet_mmap 11 http://wiki.ipxwarzone.com/index.php5?title=Linux_packet_mmap
@@ -21,19 +21,18 @@ Please send your comments to
21+ Why use PACKET_MMAP 21+ Why use PACKET_MMAP
22-------------------------------------------------------------------------------- 22--------------------------------------------------------------------------------
23 23
24In Linux 2.4/2.6 if PACKET_MMAP is not enabled, the capture process is very 24In Linux 2.4/2.6/3.x if PACKET_MMAP is not enabled, the capture process is very
25inefficient. It uses very limited buffers and requires one system call 25inefficient. It uses very limited buffers and requires one system call to
26to capture each packet, it requires two if you want to get packet's 26capture each packet, it requires two if you want to get packet's timestamp
27timestamp (like libpcap always does). 27(like libpcap always does).
28 28
29In the other hand PACKET_MMAP is very efficient. PACKET_MMAP provides a size 29In the other hand PACKET_MMAP is very efficient. PACKET_MMAP provides a size
30configurable circular buffer mapped in user space that can be used to either 30configurable circular buffer mapped in user space that can be used to either
31send or receive packets. This way reading packets just needs to wait for them, 31send or receive packets. This way reading packets just needs to wait for them,
32most of the time there is no need to issue a single system call. Concerning 32most of the time there is no need to issue a single system call. Concerning
33transmission, multiple packets can be sent through one system call to get the 33transmission, multiple packets can be sent through one system call to get the
34highest bandwidth. 34highest bandwidth. By using a shared buffer between the kernel and the user
35By using a shared buffer between the kernel and the user also has the benefit 35also has the benefit of minimizing packet copies.
36of minimizing packet copies.
37 36
38It's fine to use PACKET_MMAP to improve the performance of the capture and 37It's fine to use PACKET_MMAP to improve the performance of the capture and
39transmission process, but it isn't everything. At least, if you are capturing 38transmission process, but it isn't everything. At least, if you are capturing
@@ -41,7 +40,8 @@ at high speeds (this is relative to the cpu speed), you should check if the
41device driver of your network interface card supports some sort of interrupt 40device driver of your network interface card supports some sort of interrupt
42load mitigation or (even better) if it supports NAPI, also make sure it is 41load mitigation or (even better) if it supports NAPI, also make sure it is
43enabled. For transmission, check the MTU (Maximum Transmission Unit) used and 42enabled. For transmission, check the MTU (Maximum Transmission Unit) used and
44supported by devices of your network. 43supported by devices of your network. CPU IRQ pinning of your network interface
44card can also be an advantage.
45 45
46-------------------------------------------------------------------------------- 46--------------------------------------------------------------------------------
47+ How to use mmap() to improve capture process 47+ How to use mmap() to improve capture process
@@ -87,9 +87,7 @@ the following process:
87socket creation and destruction is straight forward, and is done 87socket creation and destruction is straight forward, and is done
88the same way with or without PACKET_MMAP: 88the same way with or without PACKET_MMAP:
89 89
90int fd; 90 int fd = socket(PF_PACKET, mode, htons(ETH_P_ALL));
91
92fd= socket(PF_PACKET, mode, htons(ETH_P_ALL))
93 91
94where mode is SOCK_RAW for the raw interface were link level 92where mode is SOCK_RAW for the raw interface were link level
95information can be captured or SOCK_DGRAM for the cooked 93information can be captured or SOCK_DGRAM for the cooked
@@ -163,11 +161,23 @@ As capture, each frame contains two parts:
163 161
164 A complete tutorial is available at: http://wiki.gnu-log.net/ 162 A complete tutorial is available at: http://wiki.gnu-log.net/
165 163
164By default, the user should put data at :
165 frame base + TPACKET_HDRLEN - sizeof(struct sockaddr_ll)
166
167So, whatever you choose for the socket mode (SOCK_DGRAM or SOCK_RAW),
168the beginning of the user data will be at :
169 frame base + TPACKET_ALIGN(sizeof(struct tpacket_hdr))
170
171If you wish to put user data at a custom offset from the beginning of
172the frame (for payload alignment with SOCK_RAW mode for instance) you
173can set tp_net (with SOCK_DGRAM) or tp_mac (with SOCK_RAW). In order
174to make this work it must be enabled previously with setsockopt()
175and the PACKET_TX_HAS_OFF option.
176
166-------------------------------------------------------------------------------- 177--------------------------------------------------------------------------------
167+ PACKET_MMAP settings 178+ PACKET_MMAP settings
168-------------------------------------------------------------------------------- 179--------------------------------------------------------------------------------
169 180
170
171To setup PACKET_MMAP from user level code is done with a call like 181To setup PACKET_MMAP from user level code is done with a call like
172 182
173 - Capture process 183 - Capture process
@@ -201,7 +211,6 @@ indeed, packet_set_ring checks that the following condition is true
201 211
202 frames_per_block * tp_block_nr == tp_frame_nr 212 frames_per_block * tp_block_nr == tp_frame_nr
203 213
204
205Lets see an example, with the following values: 214Lets see an example, with the following values:
206 215
207 tp_block_size= 4096 216 tp_block_size= 4096
@@ -227,7 +236,6 @@ be spawned across two blocks, so there are some details you have to take into
227account when choosing the frame_size. See "Mapping and use of the circular 236account when choosing the frame_size. See "Mapping and use of the circular
228buffer (ring)". 237buffer (ring)".
229 238
230
231-------------------------------------------------------------------------------- 239--------------------------------------------------------------------------------
232+ PACKET_MMAP setting constraints 240+ PACKET_MMAP setting constraints
233-------------------------------------------------------------------------------- 241--------------------------------------------------------------------------------
@@ -264,7 +272,6 @@ User space programs can include /usr/include/sys/user.h and
264The pagesize can also be determined dynamically with the getpagesize (2) 272The pagesize can also be determined dynamically with the getpagesize (2)
265system call. 273system call.
266 274
267
268 Block number limit 275 Block number limit
269-------------------- 276--------------------
270 277
@@ -284,7 +291,6 @@ called pg_vec, its size limits the number of blocks that can be allocated.
284 v block #2 291 v block #2
285 block #1 292 block #1
286 293
287
288kmalloc allocates any number of bytes of physically contiguous memory from 294kmalloc allocates any number of bytes of physically contiguous memory from
289a pool of pre-determined sizes. This pool of memory is maintained by the slab 295a pool of pre-determined sizes. This pool of memory is maintained by the slab
290allocator which is at the end the responsible for doing the allocation and 296allocator which is at the end the responsible for doing the allocation and
@@ -299,7 +305,6 @@ pointers to blocks is
299 305
300 131072/4 = 32768 blocks 306 131072/4 = 32768 blocks
301 307
302
303 PACKET_MMAP buffer size calculator 308 PACKET_MMAP buffer size calculator
304------------------------------------ 309------------------------------------
305 310
@@ -340,7 +345,6 @@ and a value for <frame size> of 2048 bytes. These parameters will yield
340and hence the buffer will have a 262144 MiB size. So it can hold 345and hence the buffer will have a 262144 MiB size. So it can hold
341262144 MiB / 2048 bytes = 134217728 frames 346262144 MiB / 2048 bytes = 134217728 frames
342 347
343
344Actually, this buffer size is not possible with an i386 architecture. 348Actually, this buffer size is not possible with an i386 architecture.
345Remember that the memory is allocated in kernel space, in the case of 349Remember that the memory is allocated in kernel space, in the case of
346an i386 kernel's memory size is limited to 1GiB. 350an i386 kernel's memory size is limited to 1GiB.
@@ -372,7 +376,6 @@ the following (from include/linux/if_packet.h):
372 - Start+tp_net: Packet data, aligned to TPACKET_ALIGNMENT=16. 376 - Start+tp_net: Packet data, aligned to TPACKET_ALIGNMENT=16.
373 - Pad to align to TPACKET_ALIGNMENT=16 377 - Pad to align to TPACKET_ALIGNMENT=16
374 */ 378 */
375
376 379
377 The following are conditions that are checked in packet_set_ring 380 The following are conditions that are checked in packet_set_ring
378 381
@@ -413,7 +416,6 @@ and the following flags apply:
413 #define TP_STATUS_LOSING 4 416 #define TP_STATUS_LOSING 4
414 #define TP_STATUS_CSUMNOTREADY 8 417 #define TP_STATUS_CSUMNOTREADY 8
415 418
416
417TP_STATUS_COPY : This flag indicates that the frame (and associated 419TP_STATUS_COPY : This flag indicates that the frame (and associated
418 meta information) has been truncated because it's 420 meta information) has been truncated because it's
419 larger than tp_frame_size. This packet can be 421 larger than tp_frame_size. This packet can be
@@ -462,7 +464,6 @@ packets are in the ring:
462It doesn't incur in a race condition to first check the status value and 464It doesn't incur in a race condition to first check the status value and
463then poll for frames. 465then poll for frames.
464 466
465
466++ Transmission process 467++ Transmission process
467Those defines are also used for transmission: 468Those defines are also used for transmission:
468 469
@@ -494,6 +495,196 @@ The user can also use poll() to check if a buffer is available:
494 retval = poll(&pfd, 1, timeout); 495 retval = poll(&pfd, 1, timeout);
495 496
496------------------------------------------------------------------------------- 497-------------------------------------------------------------------------------
498+ What TPACKET versions are available and when to use them?
499-------------------------------------------------------------------------------
500
501 int val = tpacket_version;
502 setsockopt(fd, SOL_PACKET, PACKET_VERSION, &val, sizeof(val));
503 getsockopt(fd, SOL_PACKET, PACKET_VERSION, &val, sizeof(val));
504
505where 'tpacket_version' can be TPACKET_V1 (default), TPACKET_V2, TPACKET_V3.
506
507TPACKET_V1:
508 - Default if not otherwise specified by setsockopt(2)
509 - RX_RING, TX_RING available
510 - VLAN metadata information available for packets
511 (TP_STATUS_VLAN_VALID)
512
513TPACKET_V1 --> TPACKET_V2:
514 - Made 64 bit clean due to unsigned long usage in TPACKET_V1
515 structures, thus this also works on 64 bit kernel with 32 bit
516 userspace and the like
517 - Timestamp resolution in nanoseconds instead of microseconds
518 - RX_RING, TX_RING available
519 - How to switch to TPACKET_V2:
520 1. Replace struct tpacket_hdr by struct tpacket2_hdr
521 2. Query header len and save
522 3. Set protocol version to 2, set up ring as usual
523 4. For getting the sockaddr_ll,
524 use (void *)hdr + TPACKET_ALIGN(hdrlen) instead of
525 (void *)hdr + TPACKET_ALIGN(sizeof(struct tpacket_hdr))
526
527TPACKET_V2 --> TPACKET_V3:
528 - Flexible buffer implementation:
529 1. Blocks can be configured with non-static frame-size
530 2. Read/poll is at a block-level (as opposed to packet-level)
531 3. Added poll timeout to avoid indefinite user-space wait
532 on idle links
533 4. Added user-configurable knobs:
534 4.1 block::timeout
535 4.2 tpkt_hdr::sk_rxhash
536 - RX Hash data available in user space
537 - Currently only RX_RING available
538
539-------------------------------------------------------------------------------
540+ AF_PACKET fanout mode
541-------------------------------------------------------------------------------
542
543In the AF_PACKET fanout mode, packet reception can be load balanced among
544processes. This also works in combination with mmap(2) on packet sockets.
545
546Minimal example code by David S. Miller (try things like "./test eth0 hash",
547"./test eth0 lb", etc.):
548
549#include <stddef.h>
550#include <stdlib.h>
551#include <stdio.h>
552#include <string.h>
553
554#include <sys/types.h>
555#include <sys/wait.h>
556#include <sys/socket.h>
557#include <sys/ioctl.h>
558
559#include <unistd.h>
560
561#include <linux/if_ether.h>
562#include <linux/if_packet.h>
563
564#include <net/if.h>
565
566static const char *device_name;
567static int fanout_type;
568static int fanout_id;
569
570#ifndef PACKET_FANOUT
571# define PACKET_FANOUT 18
572# define PACKET_FANOUT_HASH 0
573# define PACKET_FANOUT_LB 1
574#endif
575
576static int setup_socket(void)
577{
578 int err, fd = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_IP));
579 struct sockaddr_ll ll;
580 struct ifreq ifr;
581 int fanout_arg;
582
583 if (fd < 0) {
584 perror("socket");
585 return EXIT_FAILURE;
586 }
587
588 memset(&ifr, 0, sizeof(ifr));
589 strcpy(ifr.ifr_name, device_name);
590 err = ioctl(fd, SIOCGIFINDEX, &ifr);
591 if (err < 0) {
592 perror("SIOCGIFINDEX");
593 return EXIT_FAILURE;
594 }
595
596 memset(&ll, 0, sizeof(ll));
597 ll.sll_family = AF_PACKET;
598 ll.sll_ifindex = ifr.ifr_ifindex;
599 err = bind(fd, (struct sockaddr *) &ll, sizeof(ll));
600 if (err < 0) {
601 perror("bind");
602 return EXIT_FAILURE;
603 }
604
605 fanout_arg = (fanout_id | (fanout_type << 16));
606 err = setsockopt(fd, SOL_PACKET, PACKET_FANOUT,
607 &fanout_arg, sizeof(fanout_arg));
608 if (err) {
609 perror("setsockopt");
610 return EXIT_FAILURE;
611 }
612
613 return fd;
614}
615
616static void fanout_thread(void)
617{
618 int fd = setup_socket();
619 int limit = 10000;
620
621 if (fd < 0)
622 exit(fd);
623
624 while (limit-- > 0) {
625 char buf[1600];
626 int err;
627
628 err = read(fd, buf, sizeof(buf));
629 if (err < 0) {
630 perror("read");
631 exit(EXIT_FAILURE);
632 }
633 if ((limit % 10) == 0)
634 fprintf(stdout, "(%d) \n", getpid());
635 }
636
637 fprintf(stdout, "%d: Received 10000 packets\n", getpid());
638
639 close(fd);
640 exit(0);
641}
642
643int main(int argc, char **argp)
644{
645 int fd, err;
646 int i;
647
648 if (argc != 3) {
649 fprintf(stderr, "Usage: %s INTERFACE {hash|lb}\n", argp[0]);
650 return EXIT_FAILURE;
651 }
652
653 if (!strcmp(argp[2], "hash"))
654 fanout_type = PACKET_FANOUT_HASH;
655 else if (!strcmp(argp[2], "lb"))
656 fanout_type = PACKET_FANOUT_LB;
657 else {
658 fprintf(stderr, "Unknown fanout type [%s]\n", argp[2]);
659 exit(EXIT_FAILURE);
660 }
661
662 device_name = argp[1];
663 fanout_id = getpid() & 0xffff;
664
665 for (i = 0; i < 4; i++) {
666 pid_t pid = fork();
667
668 switch (pid) {
669 case 0:
670 fanout_thread();
671
672 case -1:
673 perror("fork");
674 exit(EXIT_FAILURE);
675 }
676 }
677
678 for (i = 0; i < 4; i++) {
679 int status;
680
681 wait(&status);
682 }
683
684 return 0;
685}
686
687-------------------------------------------------------------------------------
497+ PACKET_TIMESTAMP 688+ PACKET_TIMESTAMP
498------------------------------------------------------------------------------- 689-------------------------------------------------------------------------------
499 690
@@ -519,6 +710,13 @@ the networking stack is used (the behavior before this setting was added).
519See include/linux/net_tstamp.h and Documentation/networking/timestamping 710See include/linux/net_tstamp.h and Documentation/networking/timestamping
520for more information on hardware timestamps. 711for more information on hardware timestamps.
521 712
713-------------------------------------------------------------------------------
714+ Miscellaneous bits
715-------------------------------------------------------------------------------
716
717- Packet sockets work well together with Linux socket filters, thus you also
718 might want to have a look at Documentation/networking/filter.txt
719
522-------------------------------------------------------------------------------- 720--------------------------------------------------------------------------------
523+ THANKS 721+ THANKS
524-------------------------------------------------------------------------------- 722--------------------------------------------------------------------------------
diff --git a/Documentation/networking/phy.txt b/Documentation/networking/phy.txt
index 95e5f5985a2a..d5b1a3935245 100644
--- a/Documentation/networking/phy.txt
+++ b/Documentation/networking/phy.txt
@@ -103,7 +103,7 @@ Letting the PHY Abstraction Layer do Everything
103 103
104 Now, to connect, just call this function: 104 Now, to connect, just call this function:
105 105
106 phydev = phy_connect(dev, phy_name, &adjust_link, flags, interface); 106 phydev = phy_connect(dev, phy_name, &adjust_link, interface);
107 107
108 phydev is a pointer to the phy_device structure which represents the PHY. If 108 phydev is a pointer to the phy_device structure which represents the PHY. If
109 phy_connect is successful, it will return the pointer. dev, here, is the 109 phy_connect is successful, it will return the pointer. dev, here, is the
@@ -113,7 +113,9 @@ Letting the PHY Abstraction Layer do Everything
113 current state, though the PHY will not yet be truly operational at this 113 current state, though the PHY will not yet be truly operational at this
114 point. 114 point.
115 115
116 flags is a u32 which can optionally contain phy-specific flags. 116 PHY-specific flags should be set in phydev->dev_flags prior to the call
117 to phy_connect() such that the underlying PHY driver can check for flags
118 and perform specific operations based on them.
117 This is useful if the system has put hardware restrictions on 119 This is useful if the system has put hardware restrictions on
118 the PHY/controller, of which the PHY needs to be aware. 120 the PHY/controller, of which the PHY needs to be aware.
119 121
@@ -185,11 +187,10 @@ Doing it all yourself
185 start, or disables then frees them for stop. 187 start, or disables then frees them for stop.
186 188
187 struct phy_device * phy_attach(struct net_device *dev, const char *phy_id, 189 struct phy_device * phy_attach(struct net_device *dev, const char *phy_id,
188 u32 flags, phy_interface_t interface); 190 phy_interface_t interface);
189 191
190 Attaches a network device to a particular PHY, binding the PHY to a generic 192 Attaches a network device to a particular PHY, binding the PHY to a generic
191 driver if none was found during bus initialization. Passes in 193 driver if none was found during bus initialization.
192 any phy-specific flags as needed.
193 194
194 int phy_start_aneg(struct phy_device *phydev); 195 int phy_start_aneg(struct phy_device *phydev);
195 196
diff --git a/Documentation/networking/stmmac.txt b/Documentation/networking/stmmac.txt
index ef9ee71b4d7f..f9fa6db40a52 100644
--- a/Documentation/networking/stmmac.txt
+++ b/Documentation/networking/stmmac.txt
@@ -29,11 +29,9 @@ The kernel configuration option is STMMAC_ETH:
29 dma_txsize: DMA tx ring size; 29 dma_txsize: DMA tx ring size;
30 buf_sz: DMA buffer size; 30 buf_sz: DMA buffer size;
31 tc: control the HW FIFO threshold; 31 tc: control the HW FIFO threshold;
32 tx_coe: Enable/Disable Tx Checksum Offload engine;
33 watchdog: transmit timeout (in milliseconds); 32 watchdog: transmit timeout (in milliseconds);
34 flow_ctrl: Flow control ability [on/off]; 33 flow_ctrl: Flow control ability [on/off];
35 pause: Flow Control Pause Time; 34 pause: Flow Control Pause Time;
36 tmrate: timer period (only if timer optimisation is configured).
37 35
383) Command line options 363) Command line options
39Driver parameters can be also passed in command line by using: 37Driver parameters can be also passed in command line by using:
@@ -60,17 +58,19 @@ Then the poll method will be scheduled at some future point.
60The incoming packets are stored, by the DMA, in a list of pre-allocated socket 58The incoming packets are stored, by the DMA, in a list of pre-allocated socket
61buffers in order to avoid the memcpy (Zero-copy). 59buffers in order to avoid the memcpy (Zero-copy).
62 60
634.3) Timer-Driver Interrupt 614.3) Interrupt Mitigation
64Instead of having the device that asynchronously notifies the frame receptions, 62The driver is able to mitigate the number of its DMA interrupts
65the driver configures a timer to generate an interrupt at regular intervals. 63using NAPI for the reception on chips older than the 3.50.
66Based on the granularity of the timer, the frames that are received by the 64New chips have an HW RX-Watchdog used for this mitigation.
67device will experience different levels of latency. Some NICs have dedicated 65
68timer device to perform this task. STMMAC can use either the RTC device or the 66On Tx-side, the mitigation schema is based on a SW timer that calls the
69TMU channel 2 on STLinux platforms. 67tx function (stmmac_tx) to reclaim the resource after transmitting the
70The timers frequency can be passed to the driver as parameter; when change it, 68frames.
71take care of both hardware capability and network stability/performance impact. 69Also there is another parameter (like a threshold) used to program
72Several performance tests on STM platforms showed this optimisation allows to 70the descriptors avoiding to set the interrupt on completion bit in
73spare the CPU while having the maximum throughput. 71when the frame is sent (xmit).
72
73Mitigation parameters can be tuned by ethtool.
74 74
754.4) WOL 754.4) WOL
76Wake up on Lan feature through Magic and Unicast frames are supported for the 76Wake up on Lan feature through Magic and Unicast frames are supported for the
@@ -121,6 +121,7 @@ struct plat_stmmacenet_data {
121 int bugged_jumbo; 121 int bugged_jumbo;
122 int pmt; 122 int pmt;
123 int force_sf_dma_mode; 123 int force_sf_dma_mode;
124 int riwt_off;
124 void (*fix_mac_speed)(void *priv, unsigned int speed); 125 void (*fix_mac_speed)(void *priv, unsigned int speed);
125 void (*bus_setup)(void __iomem *ioaddr); 126 void (*bus_setup)(void __iomem *ioaddr);
126 int (*init)(struct platform_device *pdev); 127 int (*init)(struct platform_device *pdev);
@@ -156,6 +157,7 @@ Where:
156 o pmt: core has the embedded power module (optional). 157 o pmt: core has the embedded power module (optional).
157 o force_sf_dma_mode: force DMA to use the Store and Forward mode 158 o force_sf_dma_mode: force DMA to use the Store and Forward mode
158 instead of the Threshold. 159 instead of the Threshold.
160 o riwt_off: force to disable the RX watchdog feature and switch to NAPI mode.
159 o fix_mac_speed: this callback is used for modifying some syscfg registers 161 o fix_mac_speed: this callback is used for modifying some syscfg registers
160 (on ST SoCs) according to the link speed negotiated by the 162 (on ST SoCs) according to the link speed negotiated by the
161 physical layer . 163 physical layer .
diff --git a/Documentation/networking/tuntap.txt b/Documentation/networking/tuntap.txt
index c0aab985bad9..949d5dcdd9a3 100644
--- a/Documentation/networking/tuntap.txt
+++ b/Documentation/networking/tuntap.txt
@@ -105,6 +105,83 @@ Copyright (C) 1999-2000 Maxim Krasnyansky <max_mk@yahoo.com>
105 Proto [2 bytes] 105 Proto [2 bytes]
106 Raw protocol(IP, IPv6, etc) frame. 106 Raw protocol(IP, IPv6, etc) frame.
107 107
108 3.3 Multiqueue tuntap interface:
109
110 From version 3.8, Linux supports multiqueue tuntap which can uses multiple
111 file descriptors (queues) to parallelize packets sending or receiving. The
112 device allocation is the same as before, and if user wants to create multiple
113 queues, TUNSETIFF with the same device name must be called many times with
114 IFF_MULTI_QUEUE flag.
115
116 char *dev should be the name of the device, queues is the number of queues to
117 be created, fds is used to store and return the file descriptors (queues)
118 created to the caller. Each file descriptor were served as the interface of a
119 queue which could be accessed by userspace.
120
121 #include <linux/if.h>
122 #include <linux/if_tun.h>
123
124 int tun_alloc_mq(char *dev, int queues, int *fds)
125 {
126 struct ifreq ifr;
127 int fd, err, i;
128
129 if (!dev)
130 return -1;
131
132 memset(&ifr, 0, sizeof(ifr));
133 /* Flags: IFF_TUN - TUN device (no Ethernet headers)
134 * IFF_TAP - TAP device
135 *
136 * IFF_NO_PI - Do not provide packet information
137 * IFF_MULTI_QUEUE - Create a queue of multiqueue device
138 */
139 ifr.ifr_flags = IFF_TAP | IFF_NO_PI | IFF_MULTI_QUEUE;
140 strcpy(ifr.ifr_name, dev);
141
142 for (i = 0; i < queues; i++) {
143 if ((fd = open("/dev/net/tun", O_RDWR)) < 0)
144 goto err;
145 err = ioctl(fd, TUNSETIFF, (void *)&ifr);
146 if (err) {
147 close(fd);
148 goto err;
149 }
150 fds[i] = fd;
151 }
152
153 return 0;
154 err:
155 for (--i; i >= 0; i--)
156 close(fds[i]);
157 return err;
158 }
159
160 A new ioctl(TUNSETQUEUE) were introduced to enable or disable a queue. When
161 calling it with IFF_DETACH_QUEUE flag, the queue were disabled. And when
162 calling it with IFF_ATTACH_QUEUE flag, the queue were enabled. The queue were
163 enabled by default after it was created through TUNSETIFF.
164
165 fd is the file descriptor (queue) that we want to enable or disable, when
166 enable is true we enable it, otherwise we disable it
167
168 #include <linux/if.h>
169 #include <linux/if_tun.h>
170
171 int tun_set_queue(int fd, int enable)
172 {
173 struct ifreq ifr;
174
175 memset(&ifr, 0, sizeof(ifr));
176
177 if (enable)
178 ifr.ifr_flags = IFF_ATTACH_QUEUE;
179 else
180 ifr.ifr_flags = IFF_DETACH_QUEUE;
181
182 return ioctl(fd, TUNSETQUEUE, (void *)&ifr);
183 }
184
108Universal TUN/TAP device driver Frequently Asked Question. 185Universal TUN/TAP device driver Frequently Asked Question.
109 186
1101. What platforms are supported by TUN/TAP driver ? 1871. What platforms are supported by TUN/TAP driver ?
diff --git a/Documentation/networking/vxlan.txt b/Documentation/networking/vxlan.txt
index 5b34b762d7d5..6d993510f091 100644
--- a/Documentation/networking/vxlan.txt
+++ b/Documentation/networking/vxlan.txt
@@ -32,7 +32,7 @@ no entry is in the forwarding table.
32 # ip link delete vxlan0 32 # ip link delete vxlan0
33 33
343. Show vxlan info 343. Show vxlan info
35 # ip -d show vxlan0 35 # ip -d link show vxlan0
36 36
37It is possible to create, destroy and display the vxlan 37It is possible to create, destroy and display the vxlan
38forwarding table using the new bridge command. 38forwarding table using the new bridge command.
@@ -41,7 +41,7 @@ forwarding table using the new bridge command.
41 # bridge fdb add to 00:17:42:8a:b4:05 dst 192.19.0.2 dev vxlan0 41 # bridge fdb add to 00:17:42:8a:b4:05 dst 192.19.0.2 dev vxlan0
42 42
432. Delete forwarding table entry 432. Delete forwarding table entry
44 # bridge fdb delete 00:17:42:8a:b4:05 44 # bridge fdb delete 00:17:42:8a:b4:05 dev vxlan0
45 45
463. Show forwarding table 463. Show forwarding table
47 # bridge fdb show dev vxlan0 47 # bridge fdb show dev vxlan0
diff --git a/Documentation/nfc/nfc-hci.txt b/Documentation/nfc/nfc-hci.txt
index 89a339c9b079..0686c9e211c2 100644
--- a/Documentation/nfc/nfc-hci.txt
+++ b/Documentation/nfc/nfc-hci.txt
@@ -17,10 +17,12 @@ HCI
17HCI registers as an nfc device with NFC Core. Requests coming from userspace are 17HCI registers as an nfc device with NFC Core. Requests coming from userspace are
18routed through netlink sockets to NFC Core and then to HCI. From this point, 18routed through netlink sockets to NFC Core and then to HCI. From this point,
19they are translated in a sequence of HCI commands sent to the HCI layer in the 19they are translated in a sequence of HCI commands sent to the HCI layer in the
20host controller (the chip). The sending context blocks while waiting for the 20host controller (the chip). Commands can be executed synchronously (the sending
21response to arrive. 21context blocks waiting for response) or asynchronously (the response is returned
22from HCI Rx context).
22HCI events can also be received from the host controller. They will be handled 23HCI events can also be received from the host controller. They will be handled
23and a translation will be forwarded to NFC Core as needed. 24and a translation will be forwarded to NFC Core as needed. There are hooks to
25let the HCI driver handle proprietary events or override standard behavior.
24HCI uses 2 execution contexts: 26HCI uses 2 execution contexts:
25- one for executing commands : nfc_hci_msg_tx_work(). Only one command 27- one for executing commands : nfc_hci_msg_tx_work(). Only one command
26can be executing at any given moment. 28can be executing at any given moment.
@@ -33,6 +35,8 @@ The Session initialization is an HCI standard which must unfortunately
33support proprietary gates. This is the reason why the driver will pass a list 35support proprietary gates. This is the reason why the driver will pass a list
34of proprietary gates that must be part of the session. HCI will ensure all 36of proprietary gates that must be part of the session. HCI will ensure all
35those gates have pipes connected when the hci device is set up. 37those gates have pipes connected when the hci device is set up.
38In case the chip supports pre-opened gates and pseudo-static pipes, the driver
39can pass that information to HCI core.
36 40
37HCI Gates and Pipes 41HCI Gates and Pipes
38------------------- 42-------------------
@@ -46,6 +50,13 @@ without knowing the pipe connected to it.
46Driver interface 50Driver interface
47---------------- 51----------------
48 52
53A driver is generally written in two parts : the physical link management and
54the HCI management. This makes it easier to maintain a driver for a chip that
55can be connected using various phy (i2c, spi, ...)
56
57HCI Management
58--------------
59
49A driver would normally register itself with HCI and provide the following 60A driver would normally register itself with HCI and provide the following
50entry points: 61entry points:
51 62
@@ -53,58 +64,113 @@ struct nfc_hci_ops {
53 int (*open)(struct nfc_hci_dev *hdev); 64 int (*open)(struct nfc_hci_dev *hdev);
54 void (*close)(struct nfc_hci_dev *hdev); 65 void (*close)(struct nfc_hci_dev *hdev);
55 int (*hci_ready) (struct nfc_hci_dev *hdev); 66 int (*hci_ready) (struct nfc_hci_dev *hdev);
56 int (*xmit)(struct nfc_hci_dev *hdev, struct sk_buff *skb); 67 int (*xmit) (struct nfc_hci_dev *hdev, struct sk_buff *skb);
57 int (*start_poll)(struct nfc_hci_dev *hdev, u32 protocols); 68 int (*start_poll) (struct nfc_hci_dev *hdev,
58 int (*target_from_gate)(struct nfc_hci_dev *hdev, u8 gate, 69 u32 im_protocols, u32 tm_protocols);
59 struct nfc_target *target); 70 int (*dep_link_up)(struct nfc_hci_dev *hdev, struct nfc_target *target,
71 u8 comm_mode, u8 *gb, size_t gb_len);
72 int (*dep_link_down)(struct nfc_hci_dev *hdev);
73 int (*target_from_gate) (struct nfc_hci_dev *hdev, u8 gate,
74 struct nfc_target *target);
60 int (*complete_target_discovered) (struct nfc_hci_dev *hdev, u8 gate, 75 int (*complete_target_discovered) (struct nfc_hci_dev *hdev, u8 gate,
61 struct nfc_target *target); 76 struct nfc_target *target);
62 int (*data_exchange) (struct nfc_hci_dev *hdev, 77 int (*im_transceive) (struct nfc_hci_dev *hdev,
63 struct nfc_target *target, 78 struct nfc_target *target, struct sk_buff *skb,
64 struct sk_buff *skb, struct sk_buff **res_skb); 79 data_exchange_cb_t cb, void *cb_context);
80 int (*tm_send)(struct nfc_hci_dev *hdev, struct sk_buff *skb);
65 int (*check_presence)(struct nfc_hci_dev *hdev, 81 int (*check_presence)(struct nfc_hci_dev *hdev,
66 struct nfc_target *target); 82 struct nfc_target *target);
83 int (*event_received)(struct nfc_hci_dev *hdev, u8 gate, u8 event,
84 struct sk_buff *skb);
67}; 85};
68 86
69- open() and close() shall turn the hardware on and off. 87- open() and close() shall turn the hardware on and off.
70- hci_ready() is an optional entry point that is called right after the hci 88- hci_ready() is an optional entry point that is called right after the hci
71session has been set up. The driver can use it to do additional initialization 89session has been set up. The driver can use it to do additional initialization
72that must be performed using HCI commands. 90that must be performed using HCI commands.
73- xmit() shall simply write a frame to the chip. 91- xmit() shall simply write a frame to the physical link.
74- start_poll() is an optional entrypoint that shall set the hardware in polling 92- start_poll() is an optional entrypoint that shall set the hardware in polling
75mode. This must be implemented only if the hardware uses proprietary gates or a 93mode. This must be implemented only if the hardware uses proprietary gates or a
76mechanism slightly different from the HCI standard. 94mechanism slightly different from the HCI standard.
95- dep_link_up() is called after a p2p target has been detected, to finish
96the p2p connection setup with hardware parameters that need to be passed back
97to nfc core.
98- dep_link_down() is called to bring the p2p link down.
77- target_from_gate() is an optional entrypoint to return the nfc protocols 99- target_from_gate() is an optional entrypoint to return the nfc protocols
78corresponding to a proprietary gate. 100corresponding to a proprietary gate.
79- complete_target_discovered() is an optional entry point to let the driver 101- complete_target_discovered() is an optional entry point to let the driver
80perform additional proprietary processing necessary to auto activate the 102perform additional proprietary processing necessary to auto activate the
81discovered target. 103discovered target.
82- data_exchange() must be implemented by the driver if proprietary HCI commands 104- im_transceive() must be implemented by the driver if proprietary HCI commands
83are required to send data to the tag. Some tag types will require custom 105are required to send data to the tag. Some tag types will require custom
84commands, others can be written to using the standard HCI commands. The driver 106commands, others can be written to using the standard HCI commands. The driver
85can check the tag type and either do proprietary processing, or return 1 to ask 107can check the tag type and either do proprietary processing, or return 1 to ask
86for standard processing. 108for standard processing. The data exchange command itself must be sent
109asynchronously.
110- tm_send() is called to send data in the case of a p2p connection
87- check_presence() is an optional entry point that will be called regularly 111- check_presence() is an optional entry point that will be called regularly
88by the core to check that an activated tag is still in the field. If this is 112by the core to check that an activated tag is still in the field. If this is
89not implemented, the core will not be able to push tag_lost events to the user 113not implemented, the core will not be able to push tag_lost events to the user
90space 114space
115- event_received() is called to handle an event coming from the chip. Driver
116can handle the event or return 1 to let HCI attempt standard processing.
91 117
92On the rx path, the driver is responsible to push incoming HCP frames to HCI 118On the rx path, the driver is responsible to push incoming HCP frames to HCI
93using nfc_hci_recv_frame(). HCI will take care of re-aggregation and handling 119using nfc_hci_recv_frame(). HCI will take care of re-aggregation and handling
94This must be done from a context that can sleep. 120This must be done from a context that can sleep.
95 121
96SHDLC 122PHY Management
97----- 123--------------
124
125The physical link (i2c, ...) management is defined by the following struture:
126
127struct nfc_phy_ops {
128 int (*write)(void *dev_id, struct sk_buff *skb);
129 int (*enable)(void *dev_id);
130 void (*disable)(void *dev_id);
131};
132
133enable(): turn the phy on (power on), make it ready to transfer data
134disable(): turn the phy off
135write(): Send a data frame to the chip. Note that to enable higher
136layers such as an llc to store the frame for re-emission, this function must
137not alter the skb. It must also not return a positive result (return 0 for
138success, negative for failure).
139
140Data coming from the chip shall be sent directly to nfc_hci_recv_frame().
141
142LLC
143---
144
145Communication between the CPU and the chip often requires some link layer
146protocol. Those are isolated as modules managed by the HCI layer. There are
147currently two modules : nop (raw transfert) and shdlc.
148A new llc must implement the following functions:
149
150struct nfc_llc_ops {
151 void *(*init) (struct nfc_hci_dev *hdev, xmit_to_drv_t xmit_to_drv,
152 rcv_to_hci_t rcv_to_hci, int tx_headroom,
153 int tx_tailroom, int *rx_headroom, int *rx_tailroom,
154 llc_failure_t llc_failure);
155 void (*deinit) (struct nfc_llc *llc);
156 int (*start) (struct nfc_llc *llc);
157 int (*stop) (struct nfc_llc *llc);
158 void (*rcv_from_drv) (struct nfc_llc *llc, struct sk_buff *skb);
159 int (*xmit_from_hci) (struct nfc_llc *llc, struct sk_buff *skb);
160};
161
162- init() : allocate and init your private storage
163- deinit() : cleanup
164- start() : establish the logical connection
165- stop () : terminate the logical connection
166- rcv_from_drv() : handle data coming from the chip, going to HCI
167- xmit_from_hci() : handle data sent by HCI, going to the chip
98 168
99Most chips use shdlc to ensure integrity and delivery ordering of the HCP 169The llc must be registered with nfc before it can be used. Do that by
100frames between the host controller (the chip) and hosts (entities connected 170calling nfc_llc_register(const char *name, struct nfc_llc_ops *ops);
101to the chip, like the cpu). In order to simplify writing the driver, an shdlc 171
102layer is available for use by the driver. 172Again, note that the llc does not handle the physical link. It is thus very
103When used, the driver actually registers with shdlc, and shdlc will register 173easy to mix any physical link with any llc for a given chip driver.
104with HCI. HCI sees shdlc as the driver and thus send its HCP frames
105through shdlc->xmit.
106SHDLC adds a new execution context (nfc_shdlc_sm_work()) to run its state
107machine and handle both its rx and tx path.
108 174
109Included Drivers 175Included Drivers
110---------------- 176----------------
@@ -117,10 +183,12 @@ Execution Contexts
117 183
118The execution contexts are the following: 184The execution contexts are the following:
119- IRQ handler (IRQH): 185- IRQ handler (IRQH):
120fast, cannot sleep. stores incoming frames into an shdlc rx queue 186fast, cannot sleep. sends incoming frames to HCI where they are passed to
187the current llc. In case of shdlc, the frame is queued in shdlc rx queue.
121 188
122- SHDLC State Machine worker (SMW) 189- SHDLC State Machine worker (SMW)
123handles shdlc rx & tx queues. Dispatches HCI cmd responses. 190Only when llc_shdlc is used: handles shdlc rx & tx queues.
191Dispatches HCI cmd responses.
124 192
125- HCI Tx Cmd worker (MSGTXWQ) 193- HCI Tx Cmd worker (MSGTXWQ)
126Serializes execution of HCI commands. Completes execution in case of response 194Serializes execution of HCI commands. Completes execution in case of response
@@ -166,6 +234,15 @@ waiting command execution. Response processing involves invoking the completion
166callback that was provided by nfc_hci_msg_tx_work() when it sent the command. 234callback that was provided by nfc_hci_msg_tx_work() when it sent the command.
167The completion callback will then wake the syscall context. 235The completion callback will then wake the syscall context.
168 236
237It is also possible to execute the command asynchronously using this API:
238
239static int nfc_hci_execute_cmd_async(struct nfc_hci_dev *hdev, u8 pipe, u8 cmd,
240 const u8 *param, size_t param_len,
241 data_exchange_cb_t cb, void *cb_context)
242
243The workflow is the same, except that the API call returns immediately, and
244the callback will be called with the result from the SMW context.
245
169Workflow receiving an HCI event or command 246Workflow receiving an HCI event or command
170------------------------------------------ 247------------------------------------------
171 248
diff --git a/Documentation/nfc/nfc-pn544.txt b/Documentation/nfc/nfc-pn544.txt
index 2fcac9f5996e..b36ca14ca2d6 100644
--- a/Documentation/nfc/nfc-pn544.txt
+++ b/Documentation/nfc/nfc-pn544.txt
@@ -1,32 +1,15 @@
1Kernel driver for the NXP Semiconductors PN544 Near Field 1Kernel driver for the NXP Semiconductors PN544 Near Field
2Communication chip 2Communication chip
3 3
4Author: Jari Vanhala
5Contact: Matti Aaltonen (matti.j.aaltonen at nokia.com)
6
7General 4General
8------- 5-------
9 6
10The PN544 is an integrated transmission module for contactless 7The PN544 is an integrated transmission module for contactless
11communication. The driver goes under drives/nfc/ and is compiled as a 8communication. The driver goes under drives/nfc/ and is compiled as a
12module named "pn544". It registers a misc device and creates a device 9module named "pn544".
13file named "/dev/pn544".
14 10
15Host Interfaces: I2C, SPI and HSU, this driver supports currently only I2C. 11Host Interfaces: I2C, SPI and HSU, this driver supports currently only I2C.
16 12
17The Interface
18-------------
19
20The driver offers a sysfs interface for a hardware test and an IOCTL
21interface for selecting between two operating modes. There are read,
22write and poll functions for transferring messages. The two operating
23modes are the normal (HCI) mode and the firmware update mode.
24
25PN544 is controlled by sending messages from the userspace to the
26chip. The main function of the driver is just to pass those messages
27without caring about the message content.
28
29
30Protocols 13Protocols
31--------- 14---------
32 15
@@ -47,68 +30,3 @@ and third (LSB) bytes of the message. The maximum FW message length is
47 30
48For the ETSI HCI specification see 31For the ETSI HCI specification see
49http://www.etsi.org/WebSite/Technologies/ProtocolSpecification.aspx 32http://www.etsi.org/WebSite/Technologies/ProtocolSpecification.aspx
50
51The Hardware Test
52-----------------
53
54The idea of the test is that it can performed by reading from the
55corresponding sysfs file. The test is implemented in the board file
56and it should test that PN544 can be put into the firmware update
57mode. If the test is not implemented the sysfs file does not get
58created.
59
60Example:
61> cat /sys/module/pn544/drivers/i2c\:pn544/3-002b/nfc_test
621
63
64Normal Operation
65----------------
66
67PN544 is powered up when the device file is opened, otherwise it's
68turned off. Only one instance can use the device at a time.
69
70Userspace applications control PN544 with HCI messages. The hardware
71sends an interrupt when data is available for reading. Data is
72physically read when the read function is called by a userspace
73application. Poll() checks the read interrupt state. Configuration and
74self testing are also done from the userspace using read and write.
75
76Example platform data:
77
78static int rx71_pn544_nfc_request_resources(struct i2c_client *client)
79{
80 /* Get and setup the HW resources for the device */
81}
82
83static void rx71_pn544_nfc_free_resources(void)
84{
85 /* Release the HW resources */
86}
87
88static void rx71_pn544_nfc_enable(int fw)
89{
90 /* Turn the device on */
91}
92
93static int rx71_pn544_nfc_test(void)
94{
95 /*
96 * Put the device into the FW update mode
97 * and then back to the normal mode.
98 * Check the behavior and return one on success,
99 * zero on failure.
100 */
101}
102
103static void rx71_pn544_nfc_disable(void)
104{
105 /* turn the power off */
106}
107
108static struct pn544_nfc_platform_data rx71_nfc_data = {
109 .request_resources = rx71_pn544_nfc_request_resources,
110 .free_resources = rx71_pn544_nfc_free_resources,
111 .enable = rx71_pn544_nfc_enable,
112 .test = rx71_pn544_nfc_test,
113 .disable = rx71_pn544_nfc_disable,
114};
diff --git a/Documentation/pinctrl.txt b/Documentation/pinctrl.txt
index 3b4ee5328868..a2b57e0a1db0 100644
--- a/Documentation/pinctrl.txt
+++ b/Documentation/pinctrl.txt
@@ -364,6 +364,9 @@ will get an pin number into its handled number range. Further it is also passed
364the range ID value, so that the pin controller knows which range it should 364the range ID value, so that the pin controller knows which range it should
365deal with. 365deal with.
366 366
367Calling pinctrl_add_gpio_range from pinctrl driver is DEPRECATED. Please see
368section 2.1 of Documentation/devicetree/bindings/gpio/gpio.txt on how to bind
369pinctrl and gpio drivers.
367 370
368PINMUX interfaces 371PINMUX interfaces
369================= 372=================
@@ -969,6 +972,18 @@ pinmux core.
969Pin control requests from drivers 972Pin control requests from drivers
970================================= 973=================================
971 974
975When a device driver is about to probe the device core will automatically
976attempt to issue pinctrl_get_select_default() on these devices.
977This way driver writers do not need to add any of the boilerplate code
978of the type found below. However when doing fine-grained state selection
979and not using the "default" state, you may have to do some device driver
980handling of the pinctrl handles and states.
981
982So if you just want to put the pins for a certain device into the default
983state and be done with it, there is nothing you need to do besides
984providing the proper mapping table. The device core will take care of
985the rest.
986
972Generally it is discouraged to let individual drivers get and enable pin 987Generally it is discouraged to let individual drivers get and enable pin
973control. So if possible, handle the pin control in platform code or some other 988control. So if possible, handle the pin control in platform code or some other
974place where you have access to all the affected struct device * pointers. In 989place where you have access to all the affected struct device * pointers. In
@@ -1094,9 +1109,9 @@ situations that can be electrically unpleasant, you will certainly want to
1094mux in and bias pins in a certain way before the GPIO subsystems starts to 1109mux in and bias pins in a certain way before the GPIO subsystems starts to
1095deal with them. 1110deal with them.
1096 1111
1097The above can be hidden: using pinctrl hogs, the pin control driver may be 1112The above can be hidden: using the device core, the pinctrl core may be
1098setting up the config and muxing for the pins when it is probing, 1113setting up the config and muxing for the pins right before the device is
1099nevertheless orthogonal to the GPIO subsystem. 1114probing, nevertheless orthogonal to the GPIO subsystem.
1100 1115
1101But there are also situations where it makes sense for the GPIO subsystem 1116But there are also situations where it makes sense for the GPIO subsystem
1102to communicate directly with with the pinctrl subsystem, using the latter 1117to communicate directly with with the pinctrl subsystem, using the latter
@@ -1193,4 +1208,6 @@ foo_switch()
1193 ... 1208 ...
1194} 1209}
1195 1210
1196The above has to be done from process context. 1211The above has to be done from process context. The reservation of the pins
1212will be done when the state is activated, so in effect one specific pin
1213can be used by different functions at different times on a running system.
diff --git a/Documentation/power/freezing-of-tasks.txt b/Documentation/power/freezing-of-tasks.txt
index 6ec291ea1c78..85894d83b352 100644
--- a/Documentation/power/freezing-of-tasks.txt
+++ b/Documentation/power/freezing-of-tasks.txt
@@ -223,3 +223,8 @@ since they ask the freezer to skip freezing this task, since it is anyway
223only after the entire suspend/hibernation sequence is complete. 223only after the entire suspend/hibernation sequence is complete.
224So, to summarize, use [un]lock_system_sleep() instead of directly using 224So, to summarize, use [un]lock_system_sleep() instead of directly using
225mutex_[un]lock(&pm_mutex). That would prevent freezing failures. 225mutex_[un]lock(&pm_mutex). That would prevent freezing failures.
226
227V. Miscellaneous
228/sys/power/pm_freeze_timeout controls how long it will cost at most to freeze
229all user space processes or all freezable kernel threads, in unit of millisecond.
230The default value is 20000, with range of unsigned integer.
diff --git a/Documentation/power/opp.txt b/Documentation/power/opp.txt
index 3035d00757ad..425c51d56aef 100644
--- a/Documentation/power/opp.txt
+++ b/Documentation/power/opp.txt
@@ -1,6 +1,5 @@
1*=============* 1Operating Performance Points (OPP) Library
2* OPP Library * 2==========================================
3*=============*
4 3
5(C) 2009-2010 Nishanth Menon <nm@ti.com>, Texas Instruments Incorporated 4(C) 2009-2010 Nishanth Menon <nm@ti.com>, Texas Instruments Incorporated
6 5
@@ -16,15 +15,31 @@ Contents
16 15
171. Introduction 161. Introduction
18=============== 17===============
181.1 What is an Operating Performance Point (OPP)?
19
19Complex SoCs of today consists of a multiple sub-modules working in conjunction. 20Complex SoCs of today consists of a multiple sub-modules working in conjunction.
20In an operational system executing varied use cases, not all modules in the SoC 21In an operational system executing varied use cases, not all modules in the SoC
21need to function at their highest performing frequency all the time. To 22need to function at their highest performing frequency all the time. To
22facilitate this, sub-modules in a SoC are grouped into domains, allowing some 23facilitate this, sub-modules in a SoC are grouped into domains, allowing some
23domains to run at lower voltage and frequency while other domains are loaded 24domains to run at lower voltage and frequency while other domains run at
24more. The set of discrete tuples consisting of frequency and voltage pairs that 25voltage/frequency pairs that are higher.
26
27The set of discrete tuples consisting of frequency and voltage pairs that
25the device will support per domain are called Operating Performance Points or 28the device will support per domain are called Operating Performance Points or
26OPPs. 29OPPs.
27 30
31As an example:
32Let us consider an MPU device which supports the following:
33{300MHz at minimum voltage of 1V}, {800MHz at minimum voltage of 1.2V},
34{1GHz at minimum voltage of 1.3V}
35
36We can represent these as three OPPs as the following {Hz, uV} tuples:
37{300000000, 1000000}
38{800000000, 1200000}
39{1000000000, 1300000}
40
411.2 Operating Performance Points Library
42
28OPP library provides a set of helper functions to organize and query the OPP 43OPP library provides a set of helper functions to organize and query the OPP
29information. The library is located in drivers/base/power/opp.c and the header 44information. The library is located in drivers/base/power/opp.c and the header
30is located in include/linux/opp.h. OPP library can be enabled by enabling 45is located in include/linux/opp.h. OPP library can be enabled by enabling
diff --git a/Documentation/power/pm_qos_interface.txt b/Documentation/power/pm_qos_interface.txt
index 17e130a80347..79a2a58425ee 100644
--- a/Documentation/power/pm_qos_interface.txt
+++ b/Documentation/power/pm_qos_interface.txt
@@ -99,7 +99,7 @@ reading the aggregated value does not require any locking mechanism.
99 99
100From kernel mode the use of this interface is the following: 100From kernel mode the use of this interface is the following:
101 101
102int dev_pm_qos_add_request(device, handle, value): 102int dev_pm_qos_add_request(device, handle, type, value):
103Will insert an element into the list for that identified device with the 103Will insert an element into the list for that identified device with the
104target value. Upon change to this list the new target is recomputed and any 104target value. Upon change to this list the new target is recomputed and any
105registered notifiers are called only if the target value is now different. 105registered notifiers are called only if the target value is now different.
diff --git a/Documentation/power/power_supply_class.txt b/Documentation/power/power_supply_class.txt
index 9c647bd7c5a9..3f10b39b0346 100644
--- a/Documentation/power/power_supply_class.txt
+++ b/Documentation/power/power_supply_class.txt
@@ -123,6 +123,9 @@ CONSTANT_CHARGE_VOLTAGE - constant charge voltage programmed by charger.
123CONSTANT_CHARGE_VOLTAGE_MAX - maximum charge voltage supported by the 123CONSTANT_CHARGE_VOLTAGE_MAX - maximum charge voltage supported by the
124power supply object. 124power supply object.
125 125
126CHARGE_CONTROL_LIMIT - current charge control limit setting
127CHARGE_CONTROL_LIMIT_MAX - maximum charge control limit setting
128
126ENERGY_FULL, ENERGY_EMPTY - same as above but for energy. 129ENERGY_FULL, ENERGY_EMPTY - same as above but for energy.
127 130
128CAPACITY - capacity in percents. 131CAPACITY - capacity in percents.
diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt
index 4abe83e1045a..6c9f5d9aa115 100644
--- a/Documentation/power/runtime_pm.txt
+++ b/Documentation/power/runtime_pm.txt
@@ -426,6 +426,10 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
426 'power.runtime_error' is set or 'power.disable_depth' is greater than 426 'power.runtime_error' is set or 'power.disable_depth' is greater than
427 zero) 427 zero)
428 428
429 bool pm_runtime_active(struct device *dev);
430 - return true if the device's runtime PM status is 'active' or its
431 'power.disable_depth' field is not equal to zero, or false otherwise
432
429 bool pm_runtime_suspended(struct device *dev); 433 bool pm_runtime_suspended(struct device *dev);
430 - return true if the device's runtime PM status is 'suspended' and its 434 - return true if the device's runtime PM status is 'suspended' and its
431 'power.disable_depth' field is equal to zero, or false otherwise 435 'power.disable_depth' field is equal to zero, or false otherwise
@@ -642,12 +646,13 @@ out the following operations:
642 * During system suspend it calls pm_runtime_get_noresume() and 646 * During system suspend it calls pm_runtime_get_noresume() and
643 pm_runtime_barrier() for every device right before executing the 647 pm_runtime_barrier() for every device right before executing the
644 subsystem-level .suspend() callback for it. In addition to that it calls 648 subsystem-level .suspend() callback for it. In addition to that it calls
645 pm_runtime_disable() for every device right after executing the 649 __pm_runtime_disable() with 'false' as the second argument for every device
646 subsystem-level .suspend() callback for it. 650 right before executing the subsystem-level .suspend_late() callback for it.
647 651
648 * During system resume it calls pm_runtime_enable() and pm_runtime_put_sync() 652 * During system resume it calls pm_runtime_enable() and pm_runtime_put_sync()
649 for every device right before and right after executing the subsystem-level 653 for every device right after executing the subsystem-level .resume_early()
650 .resume() callback for it, respectively. 654 callback and right after executing the subsystem-level .resume() callback
655 for it, respectively.
651 656
6527. Generic subsystem callbacks 6577. Generic subsystem callbacks
653 658
diff --git a/Documentation/powerpc/cpu_features.txt b/Documentation/powerpc/cpu_features.txt
index ffa4183fdb8b..ae09df8722c8 100644
--- a/Documentation/powerpc/cpu_features.txt
+++ b/Documentation/powerpc/cpu_features.txt
@@ -11,10 +11,10 @@ split instruction and data caches, and if the CPU supports the DOZE and NAP
11sleep modes. 11sleep modes.
12 12
13Detection of the feature set is simple. A list of processors can be found in 13Detection of the feature set is simple. A list of processors can be found in
14arch/ppc/kernel/cputable.c. The PVR register is masked and compared with each 14arch/powerpc/kernel/cputable.c. The PVR register is masked and compared with
15value in the list. If a match is found, the cpu_features of cur_cpu_spec is 15each value in the list. If a match is found, the cpu_features of cur_cpu_spec
16assigned to the feature bitmask for this processor and a __setup_cpu function 16is assigned to the feature bitmask for this processor and a __setup_cpu
17is called. 17function is called.
18 18
19C code may test 'cur_cpu_spec[smp_processor_id()]->cpu_features' for a 19C code may test 'cur_cpu_spec[smp_processor_id()]->cpu_features' for a
20particular feature bit. This is done in quite a few places, for example 20particular feature bit. This is done in quite a few places, for example
@@ -51,6 +51,6 @@ should be used in the majority of cases.
51 51
52The END_FTR_SECTION macros are implemented by storing information about this 52The END_FTR_SECTION macros are implemented by storing information about this
53code in the '__ftr_fixup' ELF section. When do_cpu_ftr_fixups 53code in the '__ftr_fixup' ELF section. When do_cpu_ftr_fixups
54(arch/ppc/kernel/misc.S) is invoked, it will iterate over the records in 54(arch/powerpc/kernel/misc.S) is invoked, it will iterate over the records in
55__ftr_fixup, and if the required feature is not present it will loop writing 55__ftr_fixup, and if the required feature is not present it will loop writing
56nop's from each BEGIN_FTR_SECTION to END_FTR_SECTION. 56nop's from each BEGIN_FTR_SECTION to END_FTR_SECTION.
diff --git a/Documentation/powerpc/ptrace.txt b/Documentation/powerpc/ptrace.txt
index f4a5499b7bc6..f2a7a3919772 100644
--- a/Documentation/powerpc/ptrace.txt
+++ b/Documentation/powerpc/ptrace.txt
@@ -127,6 +127,22 @@ Some examples of using the structure to:
127 p.addr2 = (uint64_t) end_range; 127 p.addr2 = (uint64_t) end_range;
128 p.condition_value = 0; 128 p.condition_value = 0;
129 129
130- set a watchpoint in server processors (BookS)
131
132 p.version = 1;
133 p.trigger_type = PPC_BREAKPOINT_TRIGGER_RW;
134 p.addr_mode = PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE;
135 or
136 p.addr_mode = PPC_BREAKPOINT_MODE_EXACT;
137
138 p.condition_mode = PPC_BREAKPOINT_CONDITION_NONE;
139 p.addr = (uint64_t) begin_range;
140 /* For PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE addr2 needs to be specified, where
141 * addr2 - addr <= 8 Bytes.
142 */
143 p.addr2 = (uint64_t) end_range;
144 p.condition_value = 0;
145
1303. PTRACE_DELHWDEBUG 1463. PTRACE_DELHWDEBUG
131 147
132Takes an integer which identifies an existing breakpoint or watchpoint 148Takes an integer which identifies an existing breakpoint or watchpoint
diff --git a/Documentation/powerpc/transactional_memory.txt b/Documentation/powerpc/transactional_memory.txt
new file mode 100644
index 000000000000..c907be41d60f
--- /dev/null
+++ b/Documentation/powerpc/transactional_memory.txt
@@ -0,0 +1,175 @@
1Transactional Memory support
2============================
3
4POWER kernel support for this feature is currently limited to supporting
5its use by user programs. It is not currently used by the kernel itself.
6
7This file aims to sum up how it is supported by Linux and what behaviour you
8can expect from your user programs.
9
10
11Basic overview
12==============
13
14Hardware Transactional Memory is supported on POWER8 processors, and is a
15feature that enables a different form of atomic memory access. Several new
16instructions are presented to delimit transactions; transactions are
17guaranteed to either complete atomically or roll back and undo any partial
18changes.
19
20A simple transaction looks like this:
21
22begin_move_money:
23 tbegin
24 beq abort_handler
25
26 ld r4, SAVINGS_ACCT(r3)
27 ld r5, CURRENT_ACCT(r3)
28 subi r5, r5, 1
29 addi r4, r4, 1
30 std r4, SAVINGS_ACCT(r3)
31 std r5, CURRENT_ACCT(r3)
32
33 tend
34
35 b continue
36
37abort_handler:
38 ... test for odd failures ...
39
40 /* Retry the transaction if it failed because it conflicted with
41 * someone else: */
42 b begin_move_money
43
44
45The 'tbegin' instruction denotes the start point, and 'tend' the end point.
46Between these points the processor is in 'Transactional' state; any memory
47references will complete in one go if there are no conflicts with other
48transactional or non-transactional accesses within the system. In this
49example, the transaction completes as though it were normal straight-line code
50IF no other processor has touched SAVINGS_ACCT(r3) or CURRENT_ACCT(r3); an
51atomic move of money from the current account to the savings account has been
52performed. Even though the normal ld/std instructions are used (note no
53lwarx/stwcx), either *both* SAVINGS_ACCT(r3) and CURRENT_ACCT(r3) will be
54updated, or neither will be updated.
55
56If, in the meantime, there is a conflict with the locations accessed by the
57transaction, the transaction will be aborted by the CPU. Register and memory
58state will roll back to that at the 'tbegin', and control will continue from
59'tbegin+4'. The branch to abort_handler will be taken this second time; the
60abort handler can check the cause of the failure, and retry.
61
62Checkpointed registers include all GPRs, FPRs, VRs/VSRs, LR, CCR/CR, CTR, FPCSR
63and a few other status/flag regs; see the ISA for details.
64
65Causes of transaction aborts
66============================
67
68- Conflicts with cache lines used by other processors
69- Signals
70- Context switches
71- See the ISA for full documentation of everything that will abort transactions.
72
73
74Syscalls
75========
76
77Performing syscalls from within transaction is not recommended, and can lead
78to unpredictable results.
79
80Syscalls do not by design abort transactions, but beware: The kernel code will
81not be running in transactional state. The effect of syscalls will always
82remain visible, but depending on the call they may abort your transaction as a
83side-effect, read soon-to-be-aborted transactional data that should not remain
84invisible, etc. If you constantly retry a transaction that constantly aborts
85itself by calling a syscall, you'll have a livelock & make no progress.
86
87Simple syscalls (e.g. sigprocmask()) "could" be OK. Even things like write()
88from, say, printf() should be OK as long as the kernel does not access any
89memory that was accessed transactionally.
90
91Consider any syscalls that happen to work as debug-only -- not recommended for
92production use. Best to queue them up till after the transaction is over.
93
94
95Signals
96=======
97
98Delivery of signals (both sync and async) during transactions provides a second
99thread state (ucontext/mcontext) to represent the second transactional register
100state. Signal delivery 'treclaim's to capture both register states, so signals
101abort transactions. The usual ucontext_t passed to the signal handler
102represents the checkpointed/original register state; the signal appears to have
103arisen at 'tbegin+4'.
104
105If the sighandler ucontext has uc_link set, a second ucontext has been
106delivered. For future compatibility the MSR.TS field should be checked to
107determine the transactional state -- if so, the second ucontext in uc->uc_link
108represents the active transactional registers at the point of the signal.
109
110For 64-bit processes, uc->uc_mcontext.regs->msr is a full 64-bit MSR and its TS
111field shows the transactional mode.
112
113For 32-bit processes, the mcontext's MSR register is only 32 bits; the top 32
114bits are stored in the MSR of the second ucontext, i.e. in
115uc->uc_link->uc_mcontext.regs->msr. The top word contains the transactional
116state TS.
117
118However, basic signal handlers don't need to be aware of transactions
119and simply returning from the handler will deal with things correctly:
120
121Transaction-aware signal handlers can read the transactional register state
122from the second ucontext. This will be necessary for crash handlers to
123determine, for example, the address of the instruction causing the SIGSEGV.
124
125Example signal handler:
126
127 void crash_handler(int sig, siginfo_t *si, void *uc)
128 {
129 ucontext_t *ucp = uc;
130 ucontext_t *transactional_ucp = ucp->uc_link;
131
132 if (ucp_link) {
133 u64 msr = ucp->uc_mcontext.regs->msr;
134 /* May have transactional ucontext! */
135#ifndef __powerpc64__
136 msr |= ((u64)transactional_ucp->uc_mcontext.regs->msr) << 32;
137#endif
138 if (MSR_TM_ACTIVE(msr)) {
139 /* Yes, we crashed during a transaction. Oops. */
140 fprintf(stderr, "Transaction to be restarted at 0x%llx, but "
141 "crashy instruction was at 0x%llx\n",
142 ucp->uc_mcontext.regs->nip,
143 transactional_ucp->uc_mcontext.regs->nip);
144 }
145 }
146
147 fix_the_problem(ucp->dar);
148 }
149
150
151Failure cause codes used by kernel
152==================================
153
154These are defined in <asm/reg.h>, and distinguish different reasons why the
155kernel aborted a transaction:
156
157 TM_CAUSE_RESCHED Thread was rescheduled.
158 TM_CAUSE_FAC_UNAV FP/VEC/VSX unavailable trap.
159 TM_CAUSE_SYSCALL Currently unused; future syscalls that must abort
160 transactions for consistency will use this.
161 TM_CAUSE_SIGNAL Signal delivered.
162 TM_CAUSE_MISC Currently unused.
163
164These can be checked by the user program's abort handler as TEXASR[0:7].
165
166
167GDB
168===
169
170GDB and ptrace are not currently TM-aware. If one stops during a transaction,
171it looks like the transaction has just started (the checkpointed state is
172presented). The transaction cannot then be continued and will take the failure
173handler route. Furthermore, the transactional 2nd register state will be
174inaccessible. GDB can currently be used on programs using TM, but not sensibly
175in parts within transactions.
diff --git a/Documentation/prctl/seccomp_filter.txt b/Documentation/prctl/seccomp_filter.txt
index 597c3c581375..1e469ef75778 100644
--- a/Documentation/prctl/seccomp_filter.txt
+++ b/Documentation/prctl/seccomp_filter.txt
@@ -95,12 +95,15 @@ SECCOMP_RET_KILL:
95 95
96SECCOMP_RET_TRAP: 96SECCOMP_RET_TRAP:
97 Results in the kernel sending a SIGSYS signal to the triggering 97 Results in the kernel sending a SIGSYS signal to the triggering
98 task without executing the system call. The kernel will 98 task without executing the system call. siginfo->si_call_addr
99 rollback the register state to just before the system call 99 will show the address of the system call instruction, and
100 entry such that a signal handler in the task will be able to 100 siginfo->si_syscall and siginfo->si_arch will indicate which
101 inspect the ucontext_t->uc_mcontext registers and emulate 101 syscall was attempted. The program counter will be as though
102 system call success or failure upon return from the signal 102 the syscall happened (i.e. it will not point to the syscall
103 handler. 103 instruction). The return value register will contain an arch-
104 dependent value -- if resuming execution, set it to something
105 sensible. (The architecture dependency is because replacing
106 it with -ENOSYS could overwrite some useful information.)
104 107
105 The SECCOMP_RET_DATA portion of the return value will be passed 108 The SECCOMP_RET_DATA portion of the return value will be passed
106 as si_errno. 109 as si_errno.
@@ -123,6 +126,18 @@ SECCOMP_RET_TRACE:
123 the BPF program return value will be available to the tracer 126 the BPF program return value will be available to the tracer
124 via PTRACE_GETEVENTMSG. 127 via PTRACE_GETEVENTMSG.
125 128
129 The tracer can skip the system call by changing the syscall number
130 to -1. Alternatively, the tracer can change the system call
131 requested by changing the system call to a valid syscall number. If
132 the tracer asks to skip the system call, then the system call will
133 appear to return the value that the tracer puts in the return value
134 register.
135
136 The seccomp check will not be run again after the tracer is
137 notified. (This means that seccomp-based sandboxes MUST NOT
138 allow use of ptrace, even of other sandboxed processes, without
139 extreme care; ptracers can use this mechanism to escape.)
140
126SECCOMP_RET_ALLOW: 141SECCOMP_RET_ALLOW:
127 Results in the system call being executed. 142 Results in the system call being executed.
128 143
@@ -161,3 +176,50 @@ architecture supports both ptrace_event and seccomp, it will be able to
161support seccomp filter with minor fixup: SIGSYS support and seccomp return 176support seccomp filter with minor fixup: SIGSYS support and seccomp return
162value checking. Then it must just add CONFIG_HAVE_ARCH_SECCOMP_FILTER 177value checking. Then it must just add CONFIG_HAVE_ARCH_SECCOMP_FILTER
163to its arch-specific Kconfig. 178to its arch-specific Kconfig.
179
180
181
182Caveats
183-------
184
185The vDSO can cause some system calls to run entirely in userspace,
186leading to surprises when you run programs on different machines that
187fall back to real syscalls. To minimize these surprises on x86, make
188sure you test with
189/sys/devices/system/clocksource/clocksource0/current_clocksource set to
190something like acpi_pm.
191
192On x86-64, vsyscall emulation is enabled by default. (vsyscalls are
193legacy variants on vDSO calls.) Currently, emulated vsyscalls will honor seccomp, with a few oddities:
194
195- A return value of SECCOMP_RET_TRAP will set a si_call_addr pointing to
196 the vsyscall entry for the given call and not the address after the
197 'syscall' instruction. Any code which wants to restart the call
198 should be aware that (a) a ret instruction has been emulated and (b)
199 trying to resume the syscall will again trigger the standard vsyscall
200 emulation security checks, making resuming the syscall mostly
201 pointless.
202
203- A return value of SECCOMP_RET_TRACE will signal the tracer as usual,
204 but the syscall may not be changed to another system call using the
205 orig_rax register. It may only be changed to -1 order to skip the
206 currently emulated call. Any other change MAY terminate the process.
207 The rip value seen by the tracer will be the syscall entry address;
208 this is different from normal behavior. The tracer MUST NOT modify
209 rip or rsp. (Do not rely on other changes terminating the process.
210 They might work. For example, on some kernels, choosing a syscall
211 that only exists in future kernels will be correctly emulated (by
212 returning -ENOSYS).
213
214To detect this quirky behavior, check for addr & ~0x0C00 ==
2150xFFFFFFFFFF600000. (For SECCOMP_RET_TRACE, use rip. For
216SECCOMP_RET_TRAP, use siginfo->si_call_addr.) Do not check any other
217condition: future kernels may improve vsyscall emulation and current
218kernels in vsyscall=native mode will behave differently, but the
219instructions at 0xF...F600{0,4,8,C}00 will not be system calls in these
220cases.
221
222Note that modern systems are unlikely to use vsyscalls at all -- they
223are a legacy feature and they are considerably slower than standard
224syscalls. New code will use the vDSO, and vDSO-issued system calls
225are indistinguishable from normal system calls.
diff --git a/Documentation/printk-formats.txt b/Documentation/printk-formats.txt
index 8ffb274367c7..6e953564de03 100644
--- a/Documentation/printk-formats.txt
+++ b/Documentation/printk-formats.txt
@@ -53,6 +53,14 @@ Struct Resources:
53 For printing struct resources. The 'R' and 'r' specifiers result in a 53 For printing struct resources. The 'R' and 'r' specifiers result in a
54 printed resource with ('R') or without ('r') a decoded flags member. 54 printed resource with ('R') or without ('r') a decoded flags member.
55 55
56Physical addresses:
57
58 %pa 0x01234567 or 0x0123456789abcdef
59
60 For printing a phys_addr_t type (and its derivatives, such as
61 resource_size_t) which can vary based on build options, regardless of
62 the width of the CPU data path. Passed by reference.
63
56Raw buffer as a hex string: 64Raw buffer as a hex string:
57 %*ph 00 01 02 ... 3f 65 %*ph 00 01 02 ... 3f
58 %*phC 00:01:02: ... :3f 66 %*phC 00:01:02: ... :3f
@@ -150,9 +158,9 @@ s64 SHOULD be printed with %lld/%llx, (long long):
150 printk("%lld", (long long)s64_var); 158 printk("%lld", (long long)s64_var);
151 159
152If <type> is dependent on a config option for its size (e.g., sector_t, 160If <type> is dependent on a config option for its size (e.g., sector_t,
153blkcnt_t, phys_addr_t, resource_size_t) or is architecture-dependent 161blkcnt_t) or is architecture-dependent for its size (e.g., tcflag_t), use a
154for its size (e.g., tcflag_t), use a format specifier of its largest 162format specifier of its largest possible type and explicitly cast to it.
155possible type and explicitly cast to it. Example: 163Example:
156 164
157 printk("test: sector number/total blocks: %llu/%llu\n", 165 printk("test: sector number/total blocks: %llu/%llu\n",
158 (unsigned long long)sector, (unsigned long long)blockcount); 166 (unsigned long long)sector, (unsigned long long)blockcount);
@@ -162,5 +170,5 @@ Reminder: sizeof() result is of type size_t.
162Thank you for your cooperation and attention. 170Thank you for your cooperation and attention.
163 171
164 172
165By Randy Dunlap <rdunlap@xenotime.net> and 173By Randy Dunlap <rdunlap@infradead.org> and
166Andrew Murray <amurray@mpc-data.co.uk> 174Andrew Murray <amurray@mpc-data.co.uk>
diff --git a/Documentation/rpmsg.txt b/Documentation/rpmsg.txt
index 409d9f964c5b..f7edc3aa1e92 100644
--- a/Documentation/rpmsg.txt
+++ b/Documentation/rpmsg.txt
@@ -236,7 +236,7 @@ static int rpmsg_sample_probe(struct rpmsg_channel *rpdev)
236 return 0; 236 return 0;
237} 237}
238 238
239static void __devexit rpmsg_sample_remove(struct rpmsg_channel *rpdev) 239static void rpmsg_sample_remove(struct rpmsg_channel *rpdev)
240{ 240{
241 dev_info(&rpdev->dev, "rpmsg sample client driver is removed\n"); 241 dev_info(&rpdev->dev, "rpmsg sample client driver is removed\n");
242} 242}
@@ -253,7 +253,7 @@ static struct rpmsg_driver rpmsg_sample_client = {
253 .id_table = rpmsg_driver_sample_id_table, 253 .id_table = rpmsg_driver_sample_id_table,
254 .probe = rpmsg_sample_probe, 254 .probe = rpmsg_sample_probe,
255 .callback = rpmsg_sample_cb, 255 .callback = rpmsg_sample_cb,
256 .remove = __devexit_p(rpmsg_sample_remove), 256 .remove = rpmsg_sample_remove,
257}; 257};
258 258
259static int __init init(void) 259static int __init init(void)
diff --git a/Documentation/scsi/ChangeLog.megaraid_sas b/Documentation/scsi/ChangeLog.megaraid_sas
index da03146c182a..09673c7fc8ee 100644
--- a/Documentation/scsi/ChangeLog.megaraid_sas
+++ b/Documentation/scsi/ChangeLog.megaraid_sas
@@ -1,3 +1,12 @@
1Release Date : Sat. Feb 9, 2013 17:00:00 PST 2013 -
2 (emaild-id:megaraidlinux@lsi.com)
3 Adam Radford
4Current Version : 06.506.00.00-rc1
5Old Version : 06.504.01.00-rc1
6 1. Add 4k FastPath DIF support.
7 2. Dont load DevHandle unless FastPath enabled.
8 3. Version and Changelog update.
9-------------------------------------------------------------------------------
1Release Date : Mon. Oct 1, 2012 17:00:00 PST 2012 - 10Release Date : Mon. Oct 1, 2012 17:00:00 PST 2012 -
2 (emaild-id:megaraidlinux@lsi.com) 11 (emaild-id:megaraidlinux@lsi.com)
3 Adam Radford 12 Adam Radford
diff --git a/Documentation/scsi/hptiop.txt b/Documentation/scsi/hptiop.txt
index 9605179711f4..4a4f47e759cd 100644
--- a/Documentation/scsi/hptiop.txt
+++ b/Documentation/scsi/hptiop.txt
@@ -37,7 +37,7 @@ For Intel IOP based adapters, the controller IOP is accessed via PCI BAR0:
37 0x40 Inbound Queue Port 37 0x40 Inbound Queue Port
38 0x44 Outbound Queue Port 38 0x44 Outbound Queue Port
39 39
40For Marvell IOP based adapters, the IOP is accessed via PCI BAR0 and BAR1: 40For Marvell not Frey IOP based adapters, the IOP is accessed via PCI BAR0 and BAR1:
41 41
42 BAR0 offset Register 42 BAR0 offset Register
43 0x20400 Inbound Doorbell Register 43 0x20400 Inbound Doorbell Register
@@ -55,9 +55,31 @@ For Marvell IOP based adapters, the IOP is accessed via PCI BAR0 and BAR1:
55 0x40-0x1040 Inbound Queue 55 0x40-0x1040 Inbound Queue
56 0x1040-0x2040 Outbound Queue 56 0x1040-0x2040 Outbound Queue
57 57
58For Marvell Frey IOP based adapters, the IOP is accessed via PCI BAR0 and BAR1:
58 59
59I/O Request Workflow 60 BAR0 offset Register
60---------------------- 61 0x0 IOP configuration information.
62
63 BAR1 offset Register
64 0x4000 Inbound List Base Address Low
65 0x4004 Inbound List Base Address High
66 0x4018 Inbound List Write Pointer
67 0x402C Inbound List Configuration and Control
68 0x4050 Outbound List Base Address Low
69 0x4054 Outbound List Base Address High
70 0x4058 Outbound List Copy Pointer Shadow Base Address Low
71 0x405C Outbound List Copy Pointer Shadow Base Address High
72 0x4088 Outbound List Interrupt Cause
73 0x408C Outbound List Interrupt Enable
74 0x1020C PCIe Function 0 Interrupt Enable
75 0x10400 PCIe Function 0 to CPU Message A
76 0x10420 CPU to PCIe Function 0 Message A
77 0x10480 CPU to PCIe Function 0 Doorbell
78 0x10484 CPU to PCIe Function 0 Doorbell Enable
79
80
81I/O Request Workflow of Not Marvell Frey
82------------------------------------------
61 83
62All queued requests are handled via inbound/outbound queue port. 84All queued requests are handled via inbound/outbound queue port.
63A request packet can be allocated in either IOP or host memory. 85A request packet can be allocated in either IOP or host memory.
@@ -101,6 +123,45 @@ register 0. An outbound message with the same value indicates the completion
101of an inbound message. 123of an inbound message.
102 124
103 125
126I/O Request Workflow of Marvell Frey
127--------------------------------------
128
129All queued requests are handled via inbound/outbound list.
130
131To send a request to the controller:
132
133 - Allocate a free request in host DMA coherent memory.
134
135 Requests allocated in host memory must be aligned on 32-bytes boundary.
136
137 - Fill the request with index of the request in the flag.
138
139 Fill a free inbound list unit with the physical address and the size of
140 the request.
141
142 Set up the inbound list write pointer with the index of previous unit,
143 round to 0 if the index reaches the supported count of requests.
144
145 - Post the inbound list writer pointer to IOP.
146
147 - The IOP process the request. When the request is completed, the flag of
148 the request with or-ed IOPMU_QUEUE_MASK_HOST_BITS will be put into a
149 free outbound list unit and the index of the outbound list unit will be
150 put into the copy pointer shadow register. An outbound interrupt will be
151 generated.
152
153 - The host read the outbound list copy pointer shadow register and compare
154 with previous saved read ponter N. If they are different, the host will
155 read the (N+1)th outbound list unit.
156
157 The host get the index of the request from the (N+1)th outbound list
158 unit and complete the request.
159
160Non-queued requests (reset communication/reset/flush etc) can be sent via PCIe
161Function 0 to CPU Message A register. The CPU to PCIe Function 0 Message register
162with the same value indicates the completion of message.
163
164
104User-level Interface 165User-level Interface
105--------------------- 166---------------------
106 167
@@ -112,7 +173,7 @@ The driver exposes following sysfs attributes:
112 173
113 174
114----------------------------------------------------------------------------- 175-----------------------------------------------------------------------------
115Copyright (C) 2006-2009 HighPoint Technologies, Inc. All Rights Reserved. 176Copyright (C) 2006-2012 HighPoint Technologies, Inc. All Rights Reserved.
116 177
117 This file is distributed in the hope that it will be useful, 178 This file is distributed in the hope that it will be useful,
118 but WITHOUT ANY WARRANTY; without even the implied warranty of 179 but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/Documentation/security/00-INDEX b/Documentation/security/00-INDEX
index eeed1de546d4..414235c1fcfc 100644
--- a/Documentation/security/00-INDEX
+++ b/Documentation/security/00-INDEX
@@ -12,6 +12,8 @@ apparmor.txt
12 - documentation on the AppArmor security extension. 12 - documentation on the AppArmor security extension.
13credentials.txt 13credentials.txt
14 - documentation about credentials in Linux. 14 - documentation about credentials in Linux.
15keys-ecryptfs.txt
16 - description of the encryption keys for the ecryptfs filesystem.
15keys-request-key.txt 17keys-request-key.txt
16 - description of the kernel key request service. 18 - description of the kernel key request service.
17keys-trusted-encrypted.txt 19keys-trusted-encrypted.txt
diff --git a/Documentation/security/keys.txt b/Documentation/security/keys.txt
index 7d9ca92022d8..7b4145d00452 100644
--- a/Documentation/security/keys.txt
+++ b/Documentation/security/keys.txt
@@ -994,6 +994,23 @@ payload contents" for more information.
994 reference pointer if successful. 994 reference pointer if successful.
995 995
996 996
997(*) A keyring can be created by:
998
999 struct key *keyring_alloc(const char *description, uid_t uid, gid_t gid,
1000 const struct cred *cred,
1001 key_perm_t perm,
1002 unsigned long flags,
1003 struct key *dest);
1004
1005 This creates a keyring with the given attributes and returns it. If dest
1006 is not NULL, the new keyring will be linked into the keyring to which it
1007 points. No permission checks are made upon the destination keyring.
1008
1009 Error EDQUOT can be returned if the keyring would overload the quota (pass
1010 KEY_ALLOC_NOT_IN_QUOTA in flags if the keyring shouldn't be accounted
1011 towards the user's quota). Error ENOMEM can also be returned.
1012
1013
997(*) To check the validity of a key, this function can be called: 1014(*) To check the validity of a key, this function can be called:
998 1015
999 int validate_key(struct key *key); 1016 int validate_key(struct key *key);
diff --git a/Documentation/serial/driver b/Documentation/serial/driver
index 0a25a9191864..067c47d46917 100644
--- a/Documentation/serial/driver
+++ b/Documentation/serial/driver
@@ -133,6 +133,16 @@ hardware.
133 Interrupts: locally disabled. 133 Interrupts: locally disabled.
134 This call must not sleep 134 This call must not sleep
135 135
136 send_xchar(port,ch)
137 Transmit a high priority character, even if the port is stopped.
138 This is used to implement XON/XOFF flow control and tcflow(). If
139 the serial driver does not implement this function, the tty core
140 will append the character to the circular buffer and then call
141 start_tx() / stop_tx() to flush the data out.
142
143 Locking: none.
144 Interrupts: caller dependent.
145
136 stop_rx(port) 146 stop_rx(port)
137 Stop receiving characters; the port is in the process of 147 Stop receiving characters; the port is in the process of
138 being closed. 148 being closed.
@@ -242,9 +252,8 @@ hardware.
242 252
243 pm(port,state,oldstate) 253 pm(port,state,oldstate)
244 Perform any power management related activities on the specified 254 Perform any power management related activities on the specified
245 port. State indicates the new state (defined by ACPI D0-D3), 255 port. State indicates the new state (defined by
246 oldstate indicates the previous state. Essentially, D0 means 256 enum uart_pm_state), oldstate indicates the previous state.
247 fully on, D3 means powered down.
248 257
249 This function should not be used to grab any resources. 258 This function should not be used to grab any resources.
250 259
@@ -255,6 +264,10 @@ hardware.
255 Locking: none. 264 Locking: none.
256 Interrupts: caller dependent. 265 Interrupts: caller dependent.
257 266
267 set_wake(port,state)
268 Enable/disable power management wakeup on serial activity. Not
269 currently implemented.
270
258 type(port) 271 type(port)
259 Return a pointer to a string constant describing the specified 272 Return a pointer to a string constant describing the specified
260 port, or return NULL, in which case the string 'unknown' is 273 port, or return NULL, in which case the string 'unknown' is
@@ -307,6 +320,31 @@ hardware.
307 Locking: none. 320 Locking: none.
308 Interrupts: caller dependent. 321 Interrupts: caller dependent.
309 322
323 poll_init(port)
324 Called by kgdb to perform the minimal hardware initialization needed
325 to support poll_put_char() and poll_get_char(). Unlike ->startup()
326 this should not request interrupts.
327
328 Locking: tty_mutex and tty_port->mutex taken.
329 Interrupts: n/a.
330
331 poll_put_char(port,ch)
332 Called by kgdb to write a single character directly to the serial
333 port. It can and should block until there is space in the TX FIFO.
334
335 Locking: none.
336 Interrupts: caller dependent.
337 This call must not sleep
338
339 poll_get_char(port)
340 Called by kgdb to read a single character directly from the serial
341 port. If data is available, it should be returned; otherwise
342 the function should return NO_POLL_CHAR immediately.
343
344 Locking: none.
345 Interrupts: caller dependent.
346 This call must not sleep
347
310Other functions 348Other functions
311--------------- 349---------------
312 350
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
index d90d8ec2853d..ce6581c8ca26 100644
--- a/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -890,8 +890,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
890 enable_msi - Enable Message Signaled Interrupt (MSI) (default = off) 890 enable_msi - Enable Message Signaled Interrupt (MSI) (default = off)
891 power_save - Automatic power-saving timeout (in second, 0 = 891 power_save - Automatic power-saving timeout (in second, 0 =
892 disable) 892 disable)
893 power_save_controller - Reset HD-audio controller in power-saving mode 893 power_save_controller - Support runtime D3 of HD-audio controller
894 (default = on) 894 (-1 = on for supported chip (default), false = off,
895 true = force to on even for unsupported hardware)
895 align_buffer_size - Force rounding of buffer/period sizes to multiples 896 align_buffer_size - Force rounding of buffer/period sizes to multiples
896 of 128 bytes. This is more efficient in terms of memory 897 of 128 bytes. This is more efficient in terms of memory
897 access but isn't required by the HDA spec and prevents 898 access but isn't required by the HDA spec and prevents
@@ -1905,7 +1906,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
1905 vid - Vendor ID for the device (optional) 1906 vid - Vendor ID for the device (optional)
1906 pid - Product ID for the device (optional) 1907 pid - Product ID for the device (optional)
1907 nrpacks - Max. number of packets per URB (default: 8) 1908 nrpacks - Max. number of packets per URB (default: 8)
1908 async_unlink - Use async unlink mode (default: yes)
1909 device_setup - Device specific magic number (optional) 1909 device_setup - Device specific magic number (optional)
1910 - Influence depends on the device 1910 - Influence depends on the device
1911 - Default: 0x0000 1911 - Default: 0x0000
@@ -1917,8 +1917,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
1917 NB: nrpacks parameter can be modified dynamically via sysfs. 1917 NB: nrpacks parameter can be modified dynamically via sysfs.
1918 Don't put the value over 20. Changing via sysfs has no sanity 1918 Don't put the value over 20. Changing via sysfs has no sanity
1919 check. 1919 check.
1920 NB: async_unlink=0 would cause Oops. It remains just for
1921 debugging purpose (if any).
1922 NB: ignore_ctl_error=1 may help when you get an error at accessing 1920 NB: ignore_ctl_error=1 may help when you get an error at accessing
1923 the mixer element such as URB error -22. This happens on some 1921 the mixer element such as URB error -22. This happens on some
1924 buggy USB device or the controller. 1922 buggy USB device or the controller.
diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt
index 16dfe57f1731..bb8b0dc532b8 100644
--- a/Documentation/sound/alsa/HD-Audio-Models.txt
+++ b/Documentation/sound/alsa/HD-Audio-Models.txt
@@ -53,7 +53,7 @@ ALC882/883/885/888/889
53 acer-aspire-8930g Acer Aspire 8330G/6935G 53 acer-aspire-8930g Acer Aspire 8330G/6935G
54 acer-aspire Acer Aspire others 54 acer-aspire Acer Aspire others
55 inv-dmic Inverted internal mic workaround 55 inv-dmic Inverted internal mic workaround
56 no-primary-hp VAIO Z workaround (for fixed speaker DAC) 56 no-primary-hp VAIO Z/VGC-LN51JGB workaround (for fixed speaker DAC)
57 57
58ALC861/660 58ALC861/660
59========== 59==========
diff --git a/Documentation/sound/alsa/HD-Audio.txt b/Documentation/sound/alsa/HD-Audio.txt
index 7813c06a5c71..d4faa63ff352 100644
--- a/Documentation/sound/alsa/HD-Audio.txt
+++ b/Documentation/sound/alsa/HD-Audio.txt
@@ -176,14 +176,14 @@ support the automatic probing (yet as of 2.6.28). And, BIOS is often,
176yes, pretty often broken. It sets up wrong values and screws up the 176yes, pretty often broken. It sets up wrong values and screws up the
177driver. 177driver.
178 178
179The preset model is provided basically to overcome such a situation. 179The preset model (or recently called as "fix-up") is provided
180When the matching preset model is found in the white-list, the driver 180basically to overcome such a situation. When the matching preset
181assumes the static configuration of that preset and builds the mixer 181model is found in the white-list, the driver assumes the static
182elements and PCM streams based on the static information. Thus, if 182configuration of that preset with the correct pin setup, etc.
183you have a newer machine with a slightly different PCI SSID from the 183Thus, if you have a newer machine with a slightly different PCI SSID
184existing one, you may have a good chance to re-use the same model. 184(or codec SSID) from the existing one, you may have a good chance to
185You can pass the `model` option to specify the preset model instead of 185re-use the same model. You can pass the `model` option to specify the
186PCI SSID look-up. 186preset model instead of PCI (and codec-) SSID look-up.
187 187
188What `model` option values are available depends on the codec chip. 188What `model` option values are available depends on the codec chip.
189Check your codec chip from the codec proc file (see "Codec Proc-File" 189Check your codec chip from the codec proc file (see "Codec Proc-File"
@@ -199,17 +199,12 @@ non-working HD-audio hardware is to check HD-audio codec and several
199different `model` option values. If you have any luck, some of them 199different `model` option values. If you have any luck, some of them
200might suit with your device well. 200might suit with your device well.
201 201
202Some codecs such as ALC880 have a special model option `model=test`. 202There are a few special model option values:
203This configures the driver to provide as many mixer controls as 203- when 'nofixup' is passed, the device-specific fixups in the codec
204possible for every single pin feature except for the unsolicited 204 parser are skipped.
205events (and maybe some other specials). Adjust each mixer element and 205- when `generic` is passed, the codec-specific parser is skipped and
206try the I/O in the way of trial-and-error until figuring out the whole 206 only the generic parser is used.
207I/O pin mappings.
208 207
209Note that `model=generic` has a special meaning. It means to use the
210generic parser regardless of the codec. Usually the codec-specific
211parser is much better than the generic parser (as now). Thus this
212option is more about the debugging purpose.
213 208
214Speaker and Headphone Output 209Speaker and Headphone Output
215~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 210~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -387,9 +382,8 @@ init_verbs::
387 (separated with a space). 382 (separated with a space).
388hints:: 383hints::
389 Shows / stores hint strings for codec parsers for any use. 384 Shows / stores hint strings for codec parsers for any use.
390 Its format is `key = value`. For example, passing `hp_detect = yes` 385 Its format is `key = value`. For example, passing `jack_detect = no`
391 to IDT/STAC codec parser will result in the disablement of the 386 will disable the jack detection of the machine completely.
392 headphone detection.
393init_pin_configs:: 387init_pin_configs::
394 Shows the initial pin default config values set by BIOS. 388 Shows the initial pin default config values set by BIOS.
395driver_pin_configs:: 389driver_pin_configs::
@@ -421,6 +415,61 @@ re-configure based on that state, run like below:
421------------------------------------------------------------------------ 415------------------------------------------------------------------------
422 416
423 417
418Hint Strings
419~~~~~~~~~~~~
420The codec parser have several switches and adjustment knobs for
421matching better with the actual codec or device behavior. Many of
422them can be adjusted dynamically via "hints" strings as mentioned in
423the section above. For example, by passing `jack_detect = no` string
424via sysfs or a patch file, you can disable the jack detection, thus
425the codec parser will skip the features like auto-mute or mic
426auto-switch. As a boolean value, either `yes`, `no`, `true`, `false`,
427`1` or `0` can be passed.
428
429The generic parser supports the following hints:
430
431- jack_detect (bool): specify whether the jack detection is available
432 at all on this machine; default true
433- inv_jack_detect (bool): indicates that the jack detection logic is
434 inverted
435- trigger_sense (bool): indicates that the jack detection needs the
436 explicit call of AC_VERB_SET_PIN_SENSE verb
437- inv_eapd (bool): indicates that the EAPD is implemented in the
438 inverted logic
439- pcm_format_first (bool): sets the PCM format before the stream tag
440 and channel ID
441- sticky_stream (bool): keep the PCM format, stream tag and ID as long
442 as possible; default true
443- spdif_status_reset (bool): reset the SPDIF status bits at each time
444 the SPDIF stream is set up
445- pin_amp_workaround (bool): the output pin may have multiple amp
446 values
447- single_adc_amp (bool): ADCs can have only single input amps
448- auto_mute (bool): enable/disable the headphone auto-mute feature;
449 default true
450- auto_mic (bool): enable/disable the mic auto-switch feature; default
451 true
452- line_in_auto_switch (bool): enable/disable the line-in auto-switch
453 feature; default false
454- need_dac_fix (bool): limits the DACs depending on the channel count
455- primary_hp (bool): probe headphone jacks as the primary outputs;
456 default true
457- multi_cap_vol (bool): provide multiple capture volumes
458- inv_dmic_split (bool): provide split internal mic volume/switch for
459 phase-inverted digital mics
460- indep_hp (bool): provide the independent headphone PCM stream and
461 the corresponding mixer control, if available
462- add_stereo_mix_input (bool): add the stereo mix (analog-loopback
463 mix) to the input mux if available
464- add_out_jack_modes (bool): add "xxx Jack Mode" enum controls to each
465 output jack for allowing to change the headphone amp capability
466- add_in_jack_modes (bool): add "xxx Jack Mode" enum controls to each
467 input jack for allowing to change the mic bias vref
468- power_down_unused (bool): power down the unused widgets
469- mixer_nid (int): specifies the widget NID of the analog-loopback
470 mixer
471
472
424Early Patching 473Early Patching
425~~~~~~~~~~~~~~ 474~~~~~~~~~~~~~~
426When CONFIG_SND_HDA_PATCH_LOADER=y is set, you can pass a "patch" as a 475When CONFIG_SND_HDA_PATCH_LOADER=y is set, you can pass a "patch" as a
@@ -445,7 +494,7 @@ A patch file is a plain text file which looks like below:
445 0x20 0x400 0xff 494 0x20 0x400 0xff
446 495
447 [hint] 496 [hint]
448 hp_detect = yes 497 jack_detect = no
449------------------------------------------------------------------------ 498------------------------------------------------------------------------
450 499
451The file needs to have a line `[codec]`. The next line should contain 500The file needs to have a line `[codec]`. The next line should contain
@@ -531,6 +580,13 @@ cable is unplugged. Thus, if you hear noises, suspect first the
531power-saving. See /sys/module/snd_hda_intel/parameters/power_save to 580power-saving. See /sys/module/snd_hda_intel/parameters/power_save to
532check the current value. If it's non-zero, the feature is turned on. 581check the current value. If it's non-zero, the feature is turned on.
533 582
583The recent kernel supports the runtime PM for the HD-audio controller
584chip, too. It means that the HD-audio controller is also powered up /
585down dynamically. The feature is enabled only for certain controller
586chips like Intel LynxPoint. You can enable/disable this feature
587forcibly by setting `power_save_controller` option, which is also
588available at /sys/module/snd_hda_intel/parameters directory.
589
534 590
535Tracepoints 591Tracepoints
536~~~~~~~~~~~ 592~~~~~~~~~~~
@@ -587,8 +643,9 @@ The latest development codes for HD-audio are found on sound git tree:
587- git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git 643- git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
588 644
589The master branch or for-next branches can be used as the main 645The master branch or for-next branches can be used as the main
590development branches in general while the HD-audio specific patches 646development branches in general while the development for the current
591are committed in topic/hda branch. 647and next kernels are found in for-linus and for-next branches,
648respectively.
592 649
593If you are using the latest Linus tree, it'd be better to pull the 650If you are using the latest Linus tree, it'd be better to pull the
594above GIT tree onto it. If you are using the older kernels, an easy 651above GIT tree onto it. If you are using the older kernels, an easy
@@ -699,7 +756,11 @@ won't be always updated. For example, the volume values are usually
699cached in the driver, and thus changing the widget amp value directly 756cached in the driver, and thus changing the widget amp value directly
700via hda-verb won't change the mixer value. 757via hda-verb won't change the mixer value.
701 758
702The hda-verb program is found in the ftp directory: 759The hda-verb program is included now in alsa-tools:
760
761- git://git.alsa-project.org/alsa-tools.git
762
763Also, the old stand-alone package is found in the ftp directory:
703 764
704- ftp://ftp.suse.com/pub/people/tiwai/misc/ 765- ftp://ftp.suse.com/pub/people/tiwai/misc/
705 766
@@ -777,3 +838,18 @@ A git repository is available:
777 838
778See README file in the tarball for more details about hda-emu 839See README file in the tarball for more details about hda-emu
779program. 840program.
841
842
843hda-jack-retask
844~~~~~~~~~~~~~~~
845hda-jack-retask is a user-friendly GUI program to manipulate the
846HD-audio pin control for jack retasking. If you have a problem about
847the jack assignment, try this program and check whether you can get
848useful results. Once when you figure out the proper pin assignment,
849it can be fixed either in the driver code statically or via passing a
850firmware patch file (see "Early Patching" section).
851
852The program is included in alsa-tools now:
853
854- git://git.alsa-project.org/alsa-tools.git
855
diff --git a/Documentation/sound/alsa/compress_offload.txt b/Documentation/sound/alsa/compress_offload.txt
index 90e9b3a11abc..0bcc55155911 100644
--- a/Documentation/sound/alsa/compress_offload.txt
+++ b/Documentation/sound/alsa/compress_offload.txt
@@ -145,6 +145,52 @@ Modifications include:
145- Addition of encoding options when required (derived from OpenMAX IL) 145- Addition of encoding options when required (derived from OpenMAX IL)
146- Addition of rateControlSupported (missing in OpenMAX AL) 146- Addition of rateControlSupported (missing in OpenMAX AL)
147 147
148Gapless Playback
149================
150When playing thru an album, the decoders have the ability to skip the encoder
151delay and padding and directly move from one track content to another. The end
152user can perceive this as gapless playback as we dont have silence while
153switching from one track to another
154
155Also, there might be low-intensity noises due to encoding. Perfect gapless is
156difficult to reach with all types of compressed data, but works fine with most
157music content. The decoder needs to know the encoder delay and encoder padding.
158So we need to pass this to DSP. This metadata is extracted from ID3/MP4 headers
159and are not present by default in the bitstream, hence the need for a new
160interface to pass this information to the DSP. Also DSP and userspace needs to
161switch from one track to another and start using data for second track.
162
163The main additions are:
164
165- set_metadata
166This routine sets the encoder delay and encoder padding. This can be used by
167decoder to strip the silence. This needs to be set before the data in the track
168is written.
169
170- set_next_track
171This routine tells DSP that metadata and write operation sent after this would
172correspond to subsequent track
173
174- partial drain
175This is called when end of file is reached. The userspace can inform DSP that
176EOF is reached and now DSP can start skipping padding delay. Also next write
177data would belong to next track
178
179Sequence flow for gapless would be:
180- Open
181- Get caps / codec caps
182- Set params
183- Set metadata of the first track
184- Fill data of the first track
185- Trigger start
186- User-space finished sending all,
187- Indicaite next track data by sending set_next_track
188- Set metadata of the next track
189- then call partial_drain to flush most of buffer in DSP
190- Fill data of the next track
191- DSP switches to second track
192(note: order for partial_drain and write for next track can be reversed as well)
193
148Not supported: 194Not supported:
149 195
150- Support for VoIP/circuit-switched calls is not the target of this 196- Support for VoIP/circuit-switched calls is not the target of this
diff --git a/Documentation/sparse.txt b/Documentation/sparse.txt
index 4909d4116356..eceab1308a8c 100644
--- a/Documentation/sparse.txt
+++ b/Documentation/sparse.txt
@@ -49,6 +49,24 @@ be generated without __CHECK_ENDIAN__.
49__bitwise - noisy stuff; in particular, __le*/__be* are that. We really 49__bitwise - noisy stuff; in particular, __le*/__be* are that. We really
50don't want to drown in noise unless we'd explicitly asked for it. 50don't want to drown in noise unless we'd explicitly asked for it.
51 51
52Using sparse for lock checking
53~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
54
55The following macros are undefined for gcc and defined during a sparse
56run to use the "context" tracking feature of sparse, applied to
57locking. These annotations tell sparse when a lock is held, with
58regard to the annotated function's entry and exit.
59
60__must_hold - The specified lock is held on function entry and exit.
61
62__acquires - The specified lock is held on function exit, but not entry.
63
64__releases - The specified lock is held on function entry, but not exit.
65
66If the function enters and exits without the lock held, acquiring and
67releasing the lock inside the function in a balanced way, no
68annotation is needed. The tree annotations above are for cases where
69sparse would otherwise report a context imbalance.
52 70
53Getting sparse 71Getting sparse
54~~~~~~~~~~~~~~ 72~~~~~~~~~~~~~~
diff --git a/Documentation/spi/spi-summary b/Documentation/spi/spi-summary
index 7312ec14dd89..2331eb214146 100644
--- a/Documentation/spi/spi-summary
+++ b/Documentation/spi/spi-summary
@@ -345,7 +345,7 @@ SPI protocol drivers somewhat resemble platform device drivers:
345 }, 345 },
346 346
347 .probe = CHIP_probe, 347 .probe = CHIP_probe,
348 .remove = __devexit_p(CHIP_remove), 348 .remove = CHIP_remove,
349 .suspend = CHIP_suspend, 349 .suspend = CHIP_suspend,
350 .resume = CHIP_resume, 350 .resume = CHIP_resume,
351 }; 351 };
@@ -355,7 +355,7 @@ device whose board_info gave a modalias of "CHIP". Your probe() code
355might look like this unless you're creating a device which is managing 355might look like this unless you're creating a device which is managing
356a bus (appearing under /sys/class/spi_master). 356a bus (appearing under /sys/class/spi_master).
357 357
358 static int __devinit CHIP_probe(struct spi_device *spi) 358 static int CHIP_probe(struct spi_device *spi)
359 { 359 {
360 struct CHIP *chip; 360 struct CHIP *chip;
361 struct CHIP_platform_data *pdata; 361 struct CHIP_platform_data *pdata;
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt
index 2907ba6c3607..ccd42589e124 100644
--- a/Documentation/sysctl/kernel.txt
+++ b/Documentation/sysctl/kernel.txt
@@ -38,6 +38,7 @@ show up in /proc/sys/kernel:
38- l2cr [ PPC only ] 38- l2cr [ PPC only ]
39- modprobe ==> Documentation/debugging-modules.txt 39- modprobe ==> Documentation/debugging-modules.txt
40- modules_disabled 40- modules_disabled
41- msg_next_id [ sysv ipc ]
41- msgmax 42- msgmax
42- msgmnb 43- msgmnb
43- msgmni 44- msgmni
@@ -62,7 +63,9 @@ show up in /proc/sys/kernel:
62- rtsig-max 63- rtsig-max
63- rtsig-nr 64- rtsig-nr
64- sem 65- sem
66- sem_next_id [ sysv ipc ]
65- sg-big-buff [ generic SCSI device (sg) ] 67- sg-big-buff [ generic SCSI device (sg) ]
68- shm_next_id [ sysv ipc ]
66- shm_rmid_forced 69- shm_rmid_forced
67- shmall 70- shmall
68- shmmax [ sysv ipc ] 71- shmmax [ sysv ipc ]
@@ -320,6 +323,22 @@ to false.
320 323
321============================================================== 324==============================================================
322 325
326msg_next_id, sem_next_id, and shm_next_id:
327
328These three toggles allows to specify desired id for next allocated IPC
329object: message, semaphore or shared memory respectively.
330
331By default they are equal to -1, which means generic allocation logic.
332Possible values to set are in range {0..INT_MAX}.
333
334Notes:
3351) kernel doesn't guarantee, that new object will have desired id. So,
336it's up to userspace, how to handle an object with "wrong" id.
3372) Toggle with non-default value will be set back to -1 by kernel after
338successful IPC object allocation.
339
340==============================================================
341
323nmi_watchdog: 342nmi_watchdog:
324 343
325Enables/Disables the NMI watchdog on x86 systems. When the value is 344Enables/Disables the NMI watchdog on x86 systems. When the value is
@@ -542,6 +561,19 @@ are doing anyway :)
542 561
543============================================================== 562==============================================================
544 563
564shmall:
565
566This parameter sets the total amount of shared memory pages that
567can be used system wide. Hence, SHMALL should always be at least
568ceil(shmmax/PAGE_SIZE).
569
570If you are not sure what the default PAGE_SIZE is on your Linux
571system, you can run the following command:
572
573# getconf PAGE_SIZE
574
575==============================================================
576
545shmmax: 577shmmax:
546 578
547This value can be used to query and set the run time limit 579This value can be used to query and set the run time limit
diff --git a/Documentation/telephony/00-INDEX b/Documentation/telephony/00-INDEX
deleted file mode 100644
index 4ffe0ed5b6fb..000000000000
--- a/Documentation/telephony/00-INDEX
+++ /dev/null
@@ -1,4 +0,0 @@
100-INDEX
2 - this file.
3ixj.txt
4 - document describing the Quicknet drivers.
diff --git a/Documentation/telephony/ixj.txt b/Documentation/telephony/ixj.txt
deleted file mode 100644
index db94fb6c5678..000000000000
--- a/Documentation/telephony/ixj.txt
+++ /dev/null
@@ -1,394 +0,0 @@
1Linux Quicknet-Drivers-Howto
2Quicknet Technologies, Inc. (www.quicknet.net)
3Version 0.3.4 December 18, 1999
4
51.0 Introduction
6
7This document describes the first GPL release version of the Linux
8driver for the Quicknet Internet PhoneJACK and Internet LineJACK
9cards. More information about these cards is available at
10www.quicknet.net. The driver version discussed in this document is
110.3.4.
12
13These cards offer nice telco style interfaces to use your standard
14telephone/key system/PBX as the user interface for VoIP applications.
15The Internet LineJACK also offers PSTN connectivity for a single line
16Internet to PSTN gateway. Of course, you can add more than one card
17to a system to obtain multi-line functionality. At this time, the
18driver supports the POTS port on both the Internet PhoneJACK and the
19Internet LineJACK, but the PSTN port on the latter card is not yet
20supported.
21
22This document, and the drivers for the cards, are intended for a
23limited audience that includes technically capable programmers who
24would like to experiment with Quicknet cards. The drivers are
25considered in ALPHA status and are not yet considered stable enough
26for general, widespread use in an unlimited audience.
27
28That's worth saying again:
29
30THE LINUX DRIVERS FOR QUICKNET CARDS ARE PRESENTLY IN A ALPHA STATE
31AND SHOULD NOT BE CONSIDERED AS READY FOR NORMAL WIDESPREAD USE.
32
33They are released early in the spirit of Internet development and to
34make this technology available to innovators who would benefit from
35early exposure.
36
37When we promote the device driver to "beta" level it will be
38considered ready for non-programmer, non-technical users. Until then,
39please be aware that these drivers may not be stable and may affect
40the performance of your system.
41
42
431.1 Latest Additions/Improvements
44
45The 0.3.4 version of the driver is the first GPL release. Several
46features had to be removed from the prior binary only module, mostly
47for reasons of Intellectual Property rights. We can't release
48information that is not ours - so certain aspects of the driver had to
49be removed to protect the rights of others.
50
51Specifically, very old Internet PhoneJACK cards have non-standard
52G.723.1 codecs (due to the early nature of the DSPs in those days).
53The auto-conversion code to bring those cards into compliance with
54today's standards is available as a binary only module to those people
55needing it. If you bought your card after 1997 or so, you are OK -
56it's only the very old cards that are affected.
57
58Also, the code to download G.728/G.729/G.729a codecs to the DSP is
59available as a binary only module as well. This IP is not ours to
60release.
61
62Hooks are built into the GPL driver to allow it to work with other
63companion modules that are completely separate from this module.
64
651.2 Copyright, Trademarks, Disclaimer, & Credits
66
67Copyright
68
69Copyright (c) 1999 Quicknet Technologies, Inc. Permission is granted
70to freely copy and distribute this document provided you preserve it
71in its original form. For corrections and minor changes contact the
72maintainer at linux@quicknet.net.
73
74Trademarks
75
76Internet PhoneJACK and Internet LineJACK are registered trademarks of
77Quicknet Technologies, Inc.
78
79Disclaimer
80
81Much of the info in this HOWTO is early information released by
82Quicknet Technologies, Inc. for the express purpose of allowing early
83testing and use of the Linux drivers developed for their products.
84While every attempt has been made to be thorough, complete and
85accurate, the information contained here may be unreliable and there
86are likely a number of errors in this document. Please let the
87maintainer know about them. Since this is free documentation, it
88should be obvious that neither I nor previous authors can be held
89legally responsible for any errors.
90
91Credits
92
93This HOWTO was written by:
94
95 Greg Herlein <gherlein@quicknet.net>
96 Ed Okerson <eokerson@quicknet.net>
97
981.3 Future Plans: You Can Help
99
100Please let the maintainer know of any errors in facts, opinions,
101logic, spelling, grammar, clarity, links, etc. But first, if the date
102is over a month old, check to see that you have the latest
103version. Please send any info that you think belongs in this document.
104
105You can also contribute code and/or bug-fixes for the sample
106applications.
107
108
1091.4 Where to get things
110
111Info on latest versions of the driver are here:
112
113http://web.archive.org/web/*/http://www.quicknet.net/develop.htm
114
1151.5 Mailing List
116
117Quicknet operates a mailing list to provide a public forum on using
118these drivers.
119
120To subscribe to the linux-sdk mailing list, send an email to:
121
122 majordomo@linux.quicknet.net
123
124In the body of the email, type:
125
126 subscribe linux-sdk <your-email-address>
127
128Please delete any signature block that you would normally add to the
129bottom of your email - it tends to confuse majordomo.
130
131To send mail to the list, address your mail to
132
133 linux-sdk@linux.quicknet.net
134
135Your message will go out to everyone on the list.
136
137To unsubscribe to the linux-sdk mailing list, send an email to:
138
139 majordomo@linux.quicknet.net
140
141In the body of the email, type:
142
143 unsubscribe linux-sdk <your-email-address>
144
145
146
1472.0 Requirements
148
1492.1 Quicknet Card(s)
150
151You will need at least one Internet PhoneJACK or Internet LineJACK
152cards. These are ISA or PCI bus devices that use Plug-n-Play for
153configuration, and use no IRQs. The driver will support up to 16
154cards in any one system, of any mix between the two types.
155
156Note that you will need two cards to do any useful testing alone, since
157you will need a card on both ends of the connection. Of course, if
158you are doing collaborative work, perhaps your friends or coworkers
159have cards too. If not, we'll gladly sell them some!
160
161
1622.2 ISAPNP
163
164Since the Quicknet cards are Plug-n-Play devices, you will need the
165isapnp tools package to configure the cards, or you can use the isapnp
166module to autoconfigure them. The former package probably came with
167your Linux distribution. Documentation on this package is available
168online at:
169
170http://mailer.wiwi.uni-marburg.de/linux/LDP/HOWTO/Plug-and-Play-HOWTO.html
171
172The isapnp autoconfiguration is available on the Quicknet website at:
173
174 http://www.quicknet.net/develop.htm
175
176though it may be in the kernel by the time you read this.
177
178
1793.0 Card Configuration
180
181If you did not get your drivers as part of the linux kernel, do the
182following to install them:
183
184 a. untar the distribution file. We use the following command:
185 tar -xvzf ixj-0.x.x.tgz
186
187This creates a subdirectory holding all the necessary files. Go to that
188subdirectory.
189
190 b. run the "ixj_dev_create" script to remove any stray device
191files left in the /dev directory, and to create the new officially
192designated device files. Note that the old devices were called
193/dev/ixj, and the new method uses /dev/phone.
194
195 c. type "make;make install" - this will compile and install the
196module.
197
198 d. type "depmod -av" to rebuild all your kernel version dependencies.
199
200 e. if you are using the isapnp module to configure the cards
201 automatically, then skip to step f. Otherwise, ensure that you
202 have run the isapnp configuration utility to properly configure
203 the cards.
204
205 e1. The Internet PhoneJACK has one configuration register that
206 requires 16 IO ports. The Internet LineJACK card has two
207 configuration registers and isapnp reports that IO 0
208 requires 16 IO ports and IO 1 requires 8. The Quicknet
209 driver assumes that these registers are configured to be
210 contiguous, i.e. if IO 0 is set to 0x340 then IO 1 should
211 be set to 0x350.
212
213 Make sure that none of the cards overlap if you have
214 multiple cards in the system.
215
216 If you are new to the isapnp tools, you can jumpstart
217 yourself by doing the following:
218
219 e2. go to the /etc directory and run pnpdump to get a blank
220 isapnp.conf file.
221
222 pnpdump > /etc/isapnp.conf
223
224 e3. edit the /etc/isapnp.conf file to set the IO warnings and
225 the register IO addresses. The IO warnings means that you
226 should find the line in the file that looks like this:
227
228 (CONFLICT (IO FATAL)(IRQ FATAL)(DMA FATAL)(MEM FATAL)) # or WARNING
229
230 and you should edit the line to look like this:
231
232 (CONFLICT (IO WARNING)(IRQ FATAL)(DMA FATAL)(MEM FATAL)) #
233 or WARNING
234
235 The next step is to set the IO port addresses. The issue
236 here is that isapnp does not identify all of the ports out
237 there. Specifically any device that does not have a driver
238 or module loaded by Linux will not be registered. This
239 includes older sound cards and network cards. We have
240 found that the IO port 0x300 is often used even though
241 isapnp claims that no-one is using those ports. We
242 recommend that for a single card installation that port
243 0x340 (and 0x350) be used. The IO port line should change
244 from this:
245
246 (IO 0 (SIZE 16) (BASE 0x0300) (CHECK))
247
248 to this:
249
250 (IO 0 (SIZE 16) (BASE 0x0340) )
251
252 e4. if you have multiple Quicknet cards, make sure that you do
253 not have any overlaps. Be especially careful if you are
254 mixing Internet PhoneJACK and Internet LineJACK cards in
255 the same system. In these cases we recommend moving the
256 IO port addresses to the 0x400 block. Please note that on
257 a few machines the 0x400 series are used. Feel free to
258 experiment with other addresses. Our cards have been
259 proven to work using IO addresses of up to 0xFF0.
260
261 e5. the last step is to uncomment the activation line so the
262 drivers will be associated with the port. This means the
263 line (immediately below) the IO line should go from this:
264
265 # (ACT Y)
266
267 to this:
268
269 (ACT Y)
270
271 Once you have finished editing the isapnp.conf file you
272 must submit it into the pnp driverconfigure the cards.
273 This is done using the following command:
274
275 isapnp isapnp.conf
276
277 If this works you should see a line that identifies the
278 Quicknet device, the IO port(s) chosen, and a message
279 "Enabled OK".
280
281 f. if you are loading the module by hand, use insmod. An example
282of this would look like this:
283
284 insmod phonedev
285 insmod ixj dspio=0x320,0x310 xio=0,0x330
286
287Then verify the module loaded by running lsmod. If you are not using a
288module that matches your kernel version, you may need to "force" the
289load using the -f option in the insmod command.
290
291 insmod phonedev
292 insmod -f ixj dspio=0x320,0x310 xio=0,0x330
293
294
295If you are using isapnp to autoconfigure your card, then you do NOT
296need any of the above, though you need to use depmod to load the
297driver, like this:
298
299 depmod ixj
300
301which will result in the needed drivers getting loaded automatically.
302
303 g. if you are planning on having the kernel automatically request
304the module for you, then you need to edit /etc/conf.modules and add the
305following lines:
306
307 options ixj dspio=0x340 xio=0x330 ixjdebug=0
308
309If you do this, then when you execute an application that uses the
310module the kernel will request that it is loaded.
311
312 h. if you want non-root users to be able to read and write to the
313ixj devices (this is a good idea!) you should do the following:
314
315 - decide upon a group name to use and create that group if
316 needed. Add the user names to that group that you wish to
317 have access to the device. For example, we typically will
318 create a group named "ixj" in /etc/group and add all users
319 to that group that we want to run software that can use the
320 ixjX devices.
321
322 - change the permissions on the device files, like this:
323
324 chgrp ixj /dev/ixj*
325 chmod 660 /dev/ixj*
326
327Once this is done, then non-root users should be able to use the
328devices. If you have enabled autoloading of modules, then the user
329should be able to open the device and have the module loaded
330automatically for them.
331
332
3334.0 Driver Installation problems.
334
335We have tested these drivers on the 2.2.9, 2.2.10, 2.2.12, and 2.2.13 kernels
336and in all cases have eventually been able to get the drivers to load and
337run. We have found four types of problems that prevent this from happening.
338The problems and solutions are:
339
340 a. A step was missed in the installation. Go back and use section 3
341as a checklist. Many people miss running the ixj_dev_create script and thus
342never load the device names into the filesystem.
343
344 b. The kernel is inconsistently linked. We have found this problem in
345the Out Of the Box installation of several distributions. The symptoms
346are that neither driver will load, and that the unknown symbols include "jiffy"
347and "kmalloc". The solution is to recompile both the kernel and the
348modules. The command string for the final compile looks like this:
349
350 In the kernel directory:
351 1. cp .config /tmp
352 2. make mrproper
353 3. cp /tmp/.config .
354 4. make clean;make bzImage;make modules;make modules_install
355
356This rebuilds both the kernel and all the modules and makes sure they all
357have the same linkages. This generally solves the problem once the new
358kernel is installed and the system rebooted.
359
360 c. The kernel has been patched, then unpatched. This happens when
361someone decides to use an earlier kernel after they load a later kernel.
362The symptoms are proceeding through all three above steps and still not
363being able to load the driver. What has happened is that the generated
364header files are out of sync with the kernel itself. The solution is
365to recompile (again) using "make mrproper". This will remove and then
366regenerate all the necessary header files. Once this is done, then you
367need to install and reboot the kernel. We have not seen any problem
368loading one of our drivers after this treatment.
369
3705.0 Known Limitations
371
372We cannot currently play "dial-tone" and listen for DTMF digits at the
373same time using the ISA PhoneJACK. This is a bug in the 8020 DSP chip
374used on that product. All other Quicknet products function normally
375in this regard. We have a work-around, but it's not done yet. Until
376then, if you want dial-tone, you can always play a recorded dial-tone
377sound into the audio until you have gathered the DTMF digits.
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
diff --git a/Documentation/thermal/exynos_thermal_emulation b/Documentation/thermal/exynos_thermal_emulation
new file mode 100644
index 000000000000..b73bbfb697bb
--- /dev/null
+++ b/Documentation/thermal/exynos_thermal_emulation
@@ -0,0 +1,53 @@
1EXYNOS EMULATION MODE
2========================
3
4Copyright (C) 2012 Samsung Electronics
5
6Written by Jonghwa Lee <jonghwa3.lee@samsung.com>
7
8Description
9-----------
10
11Exynos 4x12 (4212, 4412) and 5 series provide emulation mode for thermal management unit.
12Thermal emulation mode supports software debug for TMU's operation. User can set temperature
13manually with software code and TMU will read current temperature from user value not from
14sensor's value.
15
16Enabling CONFIG_EXYNOS_THERMAL_EMUL option will make this support in available.
17When it's enabled, sysfs node will be created under
18/sys/bus/platform/devices/'exynos device name'/ with name of 'emulation'.
19
20The sysfs node, 'emulation', will contain value 0 for the initial state. When you input any
21temperature you want to update to sysfs node, it automatically enable emulation mode and
22current temperature will be changed into it.
23(Exynos also supports user changable delay time which would be used to delay of
24 changing temperature. However, this node only uses same delay of real sensing time, 938us.)
25
26Exynos emulation mode requires synchronous of value changing and enabling. It means when you
27want to update the any value of delay or next temperature, then you have to enable emulation
28mode at the same time. (Or you have to keep the mode enabling.) If you don't, it fails to
29change the value to updated one and just use last succeessful value repeatedly. That's why
30this node gives users the right to change termerpature only. Just one interface makes it more
31simply to use.
32
33Disabling emulation mode only requires writing value 0 to sysfs node.
34
35
36TEMP 120 |
37 |
38 100 |
39 |
40 80 |
41 | +-----------
42 60 | | |
43 | +-------------| |
44 40 | | | |
45 | | | |
46 20 | | | +----------
47 | | | | |
48 0 |______________|_____________|__________|__________|_________
49 A A A A TIME
50 |<----->| |<----->| |<----->| |
51 | 938us | | | | | |
52emulation : 0 50 | 70 | 20 | 0
53current temp : sensor 50 70 20 sensor
diff --git a/Documentation/thermal/intel_powerclamp.txt b/Documentation/thermal/intel_powerclamp.txt
new file mode 100644
index 000000000000..332de4a39b5a
--- /dev/null
+++ b/Documentation/thermal/intel_powerclamp.txt
@@ -0,0 +1,307 @@
1 =======================
2 INTEL POWERCLAMP DRIVER
3 =======================
4By: Arjan van de Ven <arjan@linux.intel.com>
5 Jacob Pan <jacob.jun.pan@linux.intel.com>
6
7Contents:
8 (*) Introduction
9 - Goals and Objectives
10
11 (*) Theory of Operation
12 - Idle Injection
13 - Calibration
14
15 (*) Performance Analysis
16 - Effectiveness and Limitations
17 - Power vs Performance
18 - Scalability
19 - Calibration
20 - Comparison with Alternative Techniques
21
22 (*) Usage and Interfaces
23 - Generic Thermal Layer (sysfs)
24 - Kernel APIs (TBD)
25
26============
27INTRODUCTION
28============
29
30Consider the situation where a system’s power consumption must be
31reduced at runtime, due to power budget, thermal constraint, or noise
32level, and where active cooling is not preferred. Software managed
33passive power reduction must be performed to prevent the hardware
34actions that are designed for catastrophic scenarios.
35
36Currently, P-states, T-states (clock modulation), and CPU offlining
37are used for CPU throttling.
38
39On Intel CPUs, C-states provide effective power reduction, but so far
40they’re only used opportunistically, based on workload. With the
41development of intel_powerclamp driver, the method of synchronizing
42idle injection across all online CPU threads was introduced. The goal
43is to achieve forced and controllable C-state residency.
44
45Test/Analysis has been made in the areas of power, performance,
46scalability, and user experience. In many cases, clear advantage is
47shown over taking the CPU offline or modulating the CPU clock.
48
49
50===================
51THEORY OF OPERATION
52===================
53
54Idle Injection
55--------------
56
57On modern Intel processors (Nehalem or later), package level C-state
58residency is available in MSRs, thus also available to the kernel.
59
60These MSRs are:
61 #define MSR_PKG_C2_RESIDENCY 0x60D
62 #define MSR_PKG_C3_RESIDENCY 0x3F8
63 #define MSR_PKG_C6_RESIDENCY 0x3F9
64 #define MSR_PKG_C7_RESIDENCY 0x3FA
65
66If the kernel can also inject idle time to the system, then a
67closed-loop control system can be established that manages package
68level C-state. The intel_powerclamp driver is conceived as such a
69control system, where the target set point is a user-selected idle
70ratio (based on power reduction), and the error is the difference
71between the actual package level C-state residency ratio and the target idle
72ratio.
73
74Injection is controlled by high priority kernel threads, spawned for
75each online CPU.
76
77These kernel threads, with SCHED_FIFO class, are created to perform
78clamping actions of controlled duty ratio and duration. Each per-CPU
79thread synchronizes its idle time and duration, based on the rounding
80of jiffies, so accumulated errors can be prevented to avoid a jittery
81effect. Threads are also bound to the CPU such that they cannot be
82migrated, unless the CPU is taken offline. In this case, threads
83belong to the offlined CPUs will be terminated immediately.
84
85Running as SCHED_FIFO and relatively high priority, also allows such
86scheme to work for both preemptable and non-preemptable kernels.
87Alignment of idle time around jiffies ensures scalability for HZ
88values. This effect can be better visualized using a Perf timechart.
89The following diagram shows the behavior of kernel thread
90kidle_inject/cpu. During idle injection, it runs monitor/mwait idle
91for a given "duration", then relinquishes the CPU to other tasks,
92until the next time interval.
93
94The NOHZ schedule tick is disabled during idle time, but interrupts
95are not masked. Tests show that the extra wakeups from scheduler tick
96have a dramatic impact on the effectiveness of the powerclamp driver
97on large scale systems (Westmere system with 80 processors).
98
99CPU0
100 ____________ ____________
101kidle_inject/0 | sleep | mwait | sleep |
102 _________| |________| |_______
103 duration
104CPU1
105 ____________ ____________
106kidle_inject/1 | sleep | mwait | sleep |
107 _________| |________| |_______
108 ^
109 |
110 |
111 roundup(jiffies, interval)
112
113Only one CPU is allowed to collect statistics and update global
114control parameters. This CPU is referred to as the controlling CPU in
115this document. The controlling CPU is elected at runtime, with a
116policy that favors BSP, taking into account the possibility of a CPU
117hot-plug.
118
119In terms of dynamics of the idle control system, package level idle
120time is considered largely as a non-causal system where its behavior
121cannot be based on the past or current input. Therefore, the
122intel_powerclamp driver attempts to enforce the desired idle time
123instantly as given input (target idle ratio). After injection,
124powerclamp moniors the actual idle for a given time window and adjust
125the next injection accordingly to avoid over/under correction.
126
127When used in a causal control system, such as a temperature control,
128it is up to the user of this driver to implement algorithms where
129past samples and outputs are included in the feedback. For example, a
130PID-based thermal controller can use the powerclamp driver to
131maintain a desired target temperature, based on integral and
132derivative gains of the past samples.
133
134
135
136Calibration
137-----------
138During scalability testing, it is observed that synchronized actions
139among CPUs become challenging as the number of cores grows. This is
140also true for the ability of a system to enter package level C-states.
141
142To make sure the intel_powerclamp driver scales well, online
143calibration is implemented. The goals for doing such a calibration
144are:
145
146a) determine the effective range of idle injection ratio
147b) determine the amount of compensation needed at each target ratio
148
149Compensation to each target ratio consists of two parts:
150
151 a) steady state error compensation
152 This is to offset the error occurring when the system can
153 enter idle without extra wakeups (such as external interrupts).
154
155 b) dynamic error compensation
156 When an excessive amount of wakeups occurs during idle, an
157 additional idle ratio can be added to quiet interrupts, by
158 slowing down CPU activities.
159
160A debugfs file is provided for the user to examine compensation
161progress and results, such as on a Westmere system.
162[jacob@nex01 ~]$ cat
163/sys/kernel/debug/intel_powerclamp/powerclamp_calib
164controlling cpu: 0
165pct confidence steady dynamic (compensation)
1660 0 0 0
1671 1 0 0
1682 1 1 0
1693 3 1 0
1704 3 1 0
1715 3 1 0
1726 3 1 0
1737 3 1 0
1748 3 1 0
175...
17630 3 2 0
17731 3 2 0
17832 3 1 0
17933 3 2 0
18034 3 1 0
18135 3 2 0
18236 3 1 0
18337 3 2 0
18438 3 1 0
18539 3 2 0
18640 3 3 0
18741 3 1 0
18842 3 2 0
18943 3 1 0
19044 3 1 0
19145 3 2 0
19246 3 3 0
19347 3 0 0
19448 3 2 0
19549 3 3 0
196
197Calibration occurs during runtime. No offline method is available.
198Steady state compensation is used only when confidence levels of all
199adjacent ratios have reached satisfactory level. A confidence level
200is accumulated based on clean data collected at runtime. Data
201collected during a period without extra interrupts is considered
202clean.
203
204To compensate for excessive amounts of wakeup during idle, additional
205idle time is injected when such a condition is detected. Currently,
206we have a simple algorithm to double the injection ratio. A possible
207enhancement might be to throttle the offending IRQ, such as delaying
208EOI for level triggered interrupts. But it is a challenge to be
209non-intrusive to the scheduler or the IRQ core code.
210
211
212CPU Online/Offline
213------------------
214Per-CPU kernel threads are started/stopped upon receiving
215notifications of CPU hotplug activities. The intel_powerclamp driver
216keeps track of clamping kernel threads, even after they are migrated
217to other CPUs, after a CPU offline event.
218
219
220=====================
221Performance Analysis
222=====================
223This section describes the general performance data collected on
224multiple systems, including Westmere (80P) and Ivy Bridge (4P, 8P).
225
226Effectiveness and Limitations
227-----------------------------
228The maximum range that idle injection is allowed is capped at 50
229percent. As mentioned earlier, since interrupts are allowed during
230forced idle time, excessive interrupts could result in less
231effectiveness. The extreme case would be doing a ping -f to generated
232flooded network interrupts without much CPU acknowledgement. In this
233case, little can be done from the idle injection threads. In most
234normal cases, such as scp a large file, applications can be throttled
235by the powerclamp driver, since slowing down the CPU also slows down
236network protocol processing, which in turn reduces interrupts.
237
238When control parameters change at runtime by the controlling CPU, it
239may take an additional period for the rest of the CPUs to catch up
240with the changes. During this time, idle injection is out of sync,
241thus not able to enter package C- states at the expected ratio. But
242this effect is minor, in that in most cases change to the target
243ratio is updated much less frequently than the idle injection
244frequency.
245
246Scalability
247-----------
248Tests also show a minor, but measurable, difference between the 4P/8P
249Ivy Bridge system and the 80P Westmere server under 50% idle ratio.
250More compensation is needed on Westmere for the same amount of
251target idle ratio. The compensation also increases as the idle ratio
252gets larger. The above reason constitutes the need for the
253calibration code.
254
255On the IVB 8P system, compared to an offline CPU, powerclamp can
256achieve up to 40% better performance per watt. (measured by a spin
257counter summed over per CPU counting threads spawned for all running
258CPUs).
259
260====================
261Usage and Interfaces
262====================
263The powerclamp driver is registered to the generic thermal layer as a
264cooling device. Currently, it’s not bound to any thermal zones.
265
266jacob@chromoly:/sys/class/thermal/cooling_device14$ grep . *
267cur_state:0
268max_state:50
269type:intel_powerclamp
270
271Example usage:
272- To inject 25% idle time
273$ sudo sh -c "echo 25 > /sys/class/thermal/cooling_device80/cur_state
274"
275
276If the system is not busy and has more than 25% idle time already,
277then the powerclamp driver will not start idle injection. Using Top
278will not show idle injection kernel threads.
279
280If the system is busy (spin test below) and has less than 25% natural
281idle time, powerclamp kernel threads will do idle injection, which
282appear running to the scheduler. But the overall system idle is still
283reflected. In this example, 24.1% idle is shown. This helps the
284system admin or user determine the cause of slowdown, when a
285powerclamp driver is in action.
286
287
288Tasks: 197 total, 1 running, 196 sleeping, 0 stopped, 0 zombie
289Cpu(s): 71.2%us, 4.7%sy, 0.0%ni, 24.1%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
290Mem: 3943228k total, 1689632k used, 2253596k free, 74960k buffers
291Swap: 4087804k total, 0k used, 4087804k free, 945336k cached
292
293 PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
294 3352 jacob 20 0 262m 644 428 S 286 0.0 0:17.16 spin
295 3341 root -51 0 0 0 0 D 25 0.0 0:01.62 kidle_inject/0
296 3344 root -51 0 0 0 0 D 25 0.0 0:01.60 kidle_inject/3
297 3342 root -51 0 0 0 0 D 25 0.0 0:01.61 kidle_inject/1
298 3343 root -51 0 0 0 0 D 25 0.0 0:01.60 kidle_inject/2
299 2935 jacob 20 0 696m 125m 35m S 5 3.3 0:31.11 firefox
300 1546 root 20 0 158m 20m 6640 S 3 0.5 0:26.97 Xorg
301 2100 jacob 20 0 1223m 88m 30m S 3 2.3 0:23.68 compiz
302
303Tests have shown that by using the powerclamp driver as a cooling
304device, a PID based userspace thermal controller can manage to
305control CPU temperature effectively, when no other thermal influence
306is added. For example, a UltraBook user can compile the kernel under
307certain temperature (below most active trip points).
diff --git a/Documentation/thermal/nouveau_thermal b/Documentation/thermal/nouveau_thermal
new file mode 100644
index 000000000000..efceb7828f54
--- /dev/null
+++ b/Documentation/thermal/nouveau_thermal
@@ -0,0 +1,81 @@
1Kernel driver nouveau
2===================
3
4Supported chips:
5* NV43+
6
7Authors: Martin Peres (mupuf) <martin.peres@labri.fr>
8
9Description
10---------
11
12This driver allows to read the GPU core temperature, drive the GPU fan and
13set temperature alarms.
14
15Currently, due to the absence of in-kernel API to access HWMON drivers, Nouveau
16cannot access any of the i2c external monitoring chips it may find. If you
17have one of those, temperature and/or fan management through Nouveau's HWMON
18interface is likely not to work. This document may then not cover your situation
19entirely.
20
21Temperature management
22--------------------
23
24Temperature is exposed under as a read-only HWMON attribute temp1_input.
25
26In order to protect the GPU from overheating, Nouveau supports 4 configurable
27temperature thresholds:
28
29 * Fan_boost: Fan speed is set to 100% when reaching this temperature;
30 * Downclock: The GPU will be downclocked to reduce its power dissipation;
31 * Critical: The GPU is put on hold to further lower power dissipation;
32 * Shutdown: Shut the computer down to protect your GPU.
33
34WARNING: Some of these thresholds may not be used by Nouveau depending
35on your chipset.
36
37The default value for these thresholds comes from the GPU's vbios. These
38thresholds can be configured thanks to the following HWMON attributes:
39
40 * Fan_boost: temp1_auto_point1_temp and temp1_auto_point1_temp_hyst;
41 * Downclock: temp1_max and temp1_max_hyst;
42 * Critical: temp1_crit and temp1_crit_hyst;
43 * Shutdown: temp1_emergency and temp1_emergency_hyst.
44
45NOTE: Remember that the values are stored as milli degrees Celcius. Don't forget
46to multiply!
47
48Fan management
49------------
50
51Not all cards have a drivable fan. If you do, then the following HWMON
52attributes should be available:
53
54 * pwm1_enable: Current fan management mode (NONE, MANUAL or AUTO);
55 * pwm1: Current PWM value (power percentage);
56 * pwm1_min: The minimum PWM speed allowed;
57 * pwm1_max: The maximum PWM speed allowed (bypassed when hitting Fan_boost);
58
59You may also have the following attribute:
60
61 * fan1_input: Speed in RPM of your fan.
62
63Your fan can be driven in different modes:
64
65 * 0: The fan is left untouched;
66 * 1: The fan can be driven in manual (use pwm1 to change the speed);
67 * 2; The fan is driven automatically depending on the temperature.
68
69NOTE: Be sure to use the manual mode if you want to drive the fan speed manually
70
71NOTE2: Not all fan management modes may be supported on all chipsets. We are
72working on it.
73
74Bug reports
75---------
76
77Thermal management on Nouveau is new and may not work on all cards. If you have
78inquiries, please ping mupuf on IRC (#nouveau, freenode).
79
80Bug reports should be filled on Freedesktop's bug tracker. Please follow
81http://nouveau.freedesktop.org/wiki/Bugs
diff --git a/Documentation/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt
index ca1a1a34970e..6859661c9d31 100644
--- a/Documentation/thermal/sysfs-api.txt
+++ b/Documentation/thermal/sysfs-api.txt
@@ -55,6 +55,8 @@ temperature) and throttle appropriate devices.
55 .get_trip_type: get the type of certain trip point. 55 .get_trip_type: get the type of certain trip point.
56 .get_trip_temp: get the temperature above which the certain trip point 56 .get_trip_temp: get the temperature above which the certain trip point
57 will be fired. 57 will be fired.
58 .set_emul_temp: set the emulation temperature which helps in debugging
59 different threshold temperature points.
58 60
591.1.2 void thermal_zone_device_unregister(struct thermal_zone_device *tz) 611.1.2 void thermal_zone_device_unregister(struct thermal_zone_device *tz)
60 62
@@ -112,6 +114,29 @@ temperature) and throttle appropriate devices.
112 trip: indicates which trip point the cooling devices is associated with 114 trip: indicates which trip point the cooling devices is associated with
113 in this thermal zone. 115 in this thermal zone.
114 116
1171.4 Thermal Zone Parameters
1181.4.1 struct thermal_bind_params
119 This structure defines the following parameters that are used to bind
120 a zone with a cooling device for a particular trip point.
121 .cdev: The cooling device pointer
122 .weight: The 'influence' of a particular cooling device on this zone.
123 This is on a percentage scale. The sum of all these weights
124 (for a particular zone) cannot exceed 100.
125 .trip_mask:This is a bit mask that gives the binding relation between
126 this thermal zone and cdev, for a particular trip point.
127 If nth bit is set, then the cdev and thermal zone are bound
128 for trip point n.
129 .match: This call back returns success(0) if the 'tz and cdev' need to
130 be bound, as per platform data.
1311.4.2 struct thermal_zone_params
132 This structure defines the platform level parameters for a thermal zone.
133 This data, for each thermal zone should come from the platform layer.
134 This is an optional feature where some platforms can choose not to
135 provide this data.
136 .governor_name: Name of the thermal governor used for this zone
137 .num_tbps: Number of thermal_bind_params entries for this zone
138 .tbp: thermal_bind_params entries
139
1152. sysfs attributes structure 1402. sysfs attributes structure
116 141
117RO read only value 142RO read only value
@@ -126,9 +151,11 @@ Thermal zone device sys I/F, created once it's registered:
126 |---type: Type of the thermal zone 151 |---type: Type of the thermal zone
127 |---temp: Current temperature 152 |---temp: Current temperature
128 |---mode: Working mode of the thermal zone 153 |---mode: Working mode of the thermal zone
154 |---policy: Thermal governor used for this zone
129 |---trip_point_[0-*]_temp: Trip point temperature 155 |---trip_point_[0-*]_temp: Trip point temperature
130 |---trip_point_[0-*]_type: Trip point type 156 |---trip_point_[0-*]_type: Trip point type
131 |---trip_point_[0-*]_hyst: Hysteresis value for this trip point 157 |---trip_point_[0-*]_hyst: Hysteresis value for this trip point
158 |---emul_temp: Emulated temperature set node
132 159
133Thermal cooling device sys I/F, created once it's registered: 160Thermal cooling device sys I/F, created once it's registered:
134/sys/class/thermal/cooling_device[0-*]: 161/sys/class/thermal/cooling_device[0-*]:
@@ -187,6 +214,10 @@ mode
187 charge of the thermal management. 214 charge of the thermal management.
188 RW, Optional 215 RW, Optional
189 216
217policy
218 One of the various thermal governors used for a particular zone.
219 RW, Required
220
190trip_point_[0-*]_temp 221trip_point_[0-*]_temp
191 The temperature above which trip point will be fired. 222 The temperature above which trip point will be fired.
192 Unit: millidegree Celsius 223 Unit: millidegree Celsius
@@ -224,6 +255,16 @@ passive
224 Valid values: 0 (disabled) or greater than 1000 255 Valid values: 0 (disabled) or greater than 1000
225 RW, Optional 256 RW, Optional
226 257
258emul_temp
259 Interface to set the emulated temperature method in thermal zone
260 (sensor). After setting this temperature, the thermal zone may pass
261 this temperature to platform emulation function if registered or
262 cache it locally. This is useful in debugging different temperature
263 threshold and its associated cooling action. This is write only node
264 and writing 0 on this node should disable emulation.
265 Unit: millidegree Celsius
266 WO, Optional
267
227***************************** 268*****************************
228* Cooling device attributes * 269* Cooling device attributes *
229***************************** 270*****************************
@@ -264,6 +305,7 @@ method, the sys I/F structure will be built like this:
264 |---type: acpitz 305 |---type: acpitz
265 |---temp: 37000 306 |---temp: 37000
266 |---mode: enabled 307 |---mode: enabled
308 |---policy: step_wise
267 |---trip_point_0_temp: 100000 309 |---trip_point_0_temp: 100000
268 |---trip_point_0_type: critical 310 |---trip_point_0_type: critical
269 |---trip_point_1_temp: 80000 311 |---trip_point_1_temp: 80000
@@ -300,8 +342,44 @@ The framework includes a simple notification mechanism, in the form of a
300netlink event. Netlink socket initialization is done during the _init_ 342netlink event. Netlink socket initialization is done during the _init_
301of the framework. Drivers which intend to use the notification mechanism 343of the framework. Drivers which intend to use the notification mechanism
302just need to call thermal_generate_netlink_event() with two arguments viz 344just need to call thermal_generate_netlink_event() with two arguments viz
303(originator, event). Typically the originator will be an integer assigned 345(originator, event). The originator is a pointer to struct thermal_zone_device
304to a thermal_zone_device when it registers itself with the framework. The 346from where the event has been originated. An integer which represents the
347thermal zone device will be used in the message to identify the zone. The
305event will be one of:{THERMAL_AUX0, THERMAL_AUX1, THERMAL_CRITICAL, 348event will be one of:{THERMAL_AUX0, THERMAL_AUX1, THERMAL_CRITICAL,
306THERMAL_DEV_FAULT}. Notification can be sent when the current temperature 349THERMAL_DEV_FAULT}. Notification can be sent when the current temperature
307crosses any of the configured thresholds. 350crosses any of the configured thresholds.
351
3525. Export Symbol APIs:
353
3545.1: get_tz_trend:
355This function returns the trend of a thermal zone, i.e the rate of change
356of temperature of the thermal zone. Ideally, the thermal sensor drivers
357are supposed to implement the callback. If they don't, the thermal
358framework calculated the trend by comparing the previous and the current
359temperature values.
360
3615.2:get_thermal_instance:
362This function returns the thermal_instance corresponding to a given
363{thermal_zone, cooling_device, trip_point} combination. Returns NULL
364if such an instance does not exist.
365
3665.3:notify_thermal_framework:
367This function handles the trip events from sensor drivers. It starts
368throttling the cooling devices according to the policy configured.
369For CRITICAL and HOT trip points, this notifies the respective drivers,
370and does actual throttling for other trip points i.e ACTIVE and PASSIVE.
371The throttling policy is based on the configured platform data; if no
372platform data is provided, this uses the step_wise throttling policy.
373
3745.4:thermal_cdev_update:
375This function serves as an arbitrator to set the state of a cooling
376device. It sets the cooling device to the deepest cooling state if
377possible.
378
3795.5:thermal_register_governor:
380This function lets the various thermal governors to register themselves
381with the Thermal framework. At run time, depending on a zone's platform
382data, a particular governor is used for throttling.
383
3845.6:thermal_unregister_governor:
385This function unregisters a governor from the thermal framework.
diff --git a/Documentation/trace/events-power.txt b/Documentation/trace/events-power.txt
index cf794af22855..e1498ff8cf94 100644
--- a/Documentation/trace/events-power.txt
+++ b/Documentation/trace/events-power.txt
@@ -17,7 +17,7 @@ Cf. include/trace/events/power.h for the events definitions.
171. Power state switch events 171. Power state switch events
18============================ 18============================
19 19
201.1 New trace API 201.1 Trace API
21----------------- 21-----------------
22 22
23A 'cpu' event class gathers the CPU-related events: cpuidle and 23A 'cpu' event class gathers the CPU-related events: cpuidle and
@@ -41,31 +41,6 @@ The event which has 'state=4294967295' in the trace is very important to the use
41space tools which are using it to detect the end of the current state, and so to 41space tools which are using it to detect the end of the current state, and so to
42correctly draw the states diagrams and to calculate accurate statistics etc. 42correctly draw the states diagrams and to calculate accurate statistics etc.
43 43
441.2 DEPRECATED trace API
45------------------------
46
47A new Kconfig option CONFIG_EVENT_POWER_TRACING_DEPRECATED with the default value of
48'y' has been created. This allows the legacy trace power API to be used conjointly
49with the new trace API.
50The Kconfig option, the old trace API (in include/trace/events/power.h) and the
51old trace points will disappear in a future release (namely 2.6.41).
52
53power_start "type=%lu state=%lu cpu_id=%lu"
54power_frequency "type=%lu state=%lu cpu_id=%lu"
55power_end "cpu_id=%lu"
56
57The 'type' parameter takes one of those macros:
58 . POWER_NONE = 0,
59 . POWER_CSTATE = 1, /* C-State */
60 . POWER_PSTATE = 2, /* Frequency change or DVFS */
61
62The 'state' parameter is set depending on the type:
63 . Target C-state for type=POWER_CSTATE,
64 . Target frequency for type=POWER_PSTATE,
65
66power_end is used to indicate the exit of a state, corresponding to the latest
67power_start event.
68
692. Clocks events 442. Clocks events
70================ 45================
71The clock events are used for clock enable/disable and for 46The clock events are used for clock enable/disable and for
diff --git a/Documentation/trace/ftrace.txt b/Documentation/trace/ftrace.txt
index 6f51fed45f2d..a372304aef10 100644
--- a/Documentation/trace/ftrace.txt
+++ b/Documentation/trace/ftrace.txt
@@ -1842,6 +1842,89 @@ an error.
1842 # cat buffer_size_kb 1842 # cat buffer_size_kb
184385 184385
1844 1844
1845Snapshot
1846--------
1847CONFIG_TRACER_SNAPSHOT makes a generic snapshot feature
1848available to all non latency tracers. (Latency tracers which
1849record max latency, such as "irqsoff" or "wakeup", can't use
1850this feature, since those are already using the snapshot
1851mechanism internally.)
1852
1853Snapshot preserves a current trace buffer at a particular point
1854in time without stopping tracing. Ftrace swaps the current
1855buffer with a spare buffer, and tracing continues in the new
1856current (=previous spare) buffer.
1857
1858The following debugfs files in "tracing" are related to this
1859feature:
1860
1861 snapshot:
1862
1863 This is used to take a snapshot and to read the output
1864 of the snapshot. Echo 1 into this file to allocate a
1865 spare buffer and to take a snapshot (swap), then read
1866 the snapshot from this file in the same format as
1867 "trace" (described above in the section "The File
1868 System"). Both reads snapshot and tracing are executable
1869 in parallel. When the spare buffer is allocated, echoing
1870 0 frees it, and echoing else (positive) values clear the
1871 snapshot contents.
1872 More details are shown in the table below.
1873
1874 status\input | 0 | 1 | else |
1875 --------------+------------+------------+------------+
1876 not allocated |(do nothing)| alloc+swap |(do nothing)|
1877 --------------+------------+------------+------------+
1878 allocated | free | swap | clear |
1879 --------------+------------+------------+------------+
1880
1881Here is an example of using the snapshot feature.
1882
1883 # echo 1 > events/sched/enable
1884 # echo 1 > snapshot
1885 # cat snapshot
1886# tracer: nop
1887#
1888# entries-in-buffer/entries-written: 71/71 #P:8
1889#
1890# _-----=> irqs-off
1891# / _----=> need-resched
1892# | / _---=> hardirq/softirq
1893# || / _--=> preempt-depth
1894# ||| / delay
1895# TASK-PID CPU# |||| TIMESTAMP FUNCTION
1896# | | | |||| | |
1897 <idle>-0 [005] d... 2440.603828: sched_switch: prev_comm=swapper/5 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=snapshot-test-2 next_pid=2242 next_prio=120
1898 sleep-2242 [005] d... 2440.603846: sched_switch: prev_comm=snapshot-test-2 prev_pid=2242 prev_prio=120 prev_state=R ==> next_comm=kworker/5:1 next_pid=60 next_prio=120
1899[...]
1900 <idle>-0 [002] d... 2440.707230: sched_switch: prev_comm=swapper/2 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=snapshot-test-2 next_pid=2229 next_prio=120
1901
1902 # cat trace
1903# tracer: nop
1904#
1905# entries-in-buffer/entries-written: 77/77 #P:8
1906#
1907# _-----=> irqs-off
1908# / _----=> need-resched
1909# | / _---=> hardirq/softirq
1910# || / _--=> preempt-depth
1911# ||| / delay
1912# TASK-PID CPU# |||| TIMESTAMP FUNCTION
1913# | | | |||| | |
1914 <idle>-0 [007] d... 2440.707395: sched_switch: prev_comm=swapper/7 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=snapshot-test-2 next_pid=2243 next_prio=120
1915 snapshot-test-2-2229 [002] d... 2440.707438: sched_switch: prev_comm=snapshot-test-2 prev_pid=2229 prev_prio=120 prev_state=S ==> next_comm=swapper/2 next_pid=0 next_prio=120
1916[...]
1917
1918
1919If you try to use this snapshot feature when current tracer is
1920one of the latency tracers, you will get the following results.
1921
1922 # echo wakeup > current_tracer
1923 # echo 1 > snapshot
1924bash: echo: write error: Device or resource busy
1925 # cat snapshot
1926cat: snapshot: Device or resource busy
1927
1845----------- 1928-----------
1846 1929
1847More details can be found in the source code, in the 1930More details can be found in the source code, in the
diff --git a/Documentation/usb/error-codes.txt b/Documentation/usb/error-codes.txt
index b3f606b81a03..9c3eb845ebe5 100644
--- a/Documentation/usb/error-codes.txt
+++ b/Documentation/usb/error-codes.txt
@@ -21,6 +21,8 @@ Non-USB-specific:
21 21
22USB-specific: 22USB-specific:
23 23
24-EBUSY The URB is already active.
25
24-ENODEV specified USB-device or bus doesn't exist 26-ENODEV specified USB-device or bus doesn't exist
25 27
26-ENOENT specified interface or endpoint does not exist or 28-ENOENT specified interface or endpoint does not exist or
@@ -35,9 +37,8 @@ USB-specific:
35 d) ISO: number_of_packets is < 0 37 d) ISO: number_of_packets is < 0
36 e) various other cases 38 e) various other cases
37 39
38-EAGAIN a) specified ISO start frame too early 40-EXDEV ISO: URB_ISO_ASAP wasn't specified and all the frames
39 b) (using ISO-ASAP) too much scheduled for the future 41 the URB would be scheduled in have already expired.
40 wait some time and try again.
41 42
42-EFBIG Host controller driver can't schedule that many ISO frames. 43-EFBIG Host controller driver can't schedule that many ISO frames.
43 44
diff --git a/Documentation/usb/mass-storage.txt b/Documentation/usb/mass-storage.txt
index e9b9334627bf..59063ad7a60d 100644
--- a/Documentation/usb/mass-storage.txt
+++ b/Documentation/usb/mass-storage.txt
@@ -20,9 +20,9 @@
20 20
21 This document describes how to use the gadget from user space, its 21 This document describes how to use the gadget from user space, its
22 relation to mass storage function (or MSF) and different gadgets 22 relation to mass storage function (or MSF) and different gadgets
23 using it, and how it differs from File Storage Gadget (or FSG). It 23 using it, and how it differs from File Storage Gadget (or FSG)
24 will talk only briefly about how to use MSF within composite 24 (which is no longer included in Linux). It will talk only briefly
25 gadgets. 25 about how to use MSF within composite gadgets.
26 26
27* Module parameters 27* Module parameters
28 28
@@ -198,16 +198,15 @@
198 The Mass Storage Function and thus the Mass Storage Gadget has been 198 The Mass Storage Function and thus the Mass Storage Gadget has been
199 based on the File Storage Gadget. The difference between the two is 199 based on the File Storage Gadget. The difference between the two is
200 that MSG is a composite gadget (ie. uses the composite framework) 200 that MSG is a composite gadget (ie. uses the composite framework)
201 while file storage gadget is a traditional gadget. From userspace 201 while file storage gadget was a traditional gadget. From userspace
202 point of view this distinction does not really matter, but from 202 point of view this distinction does not really matter, but from
203 kernel hacker's point of view, this means that (i) MSG does not 203 kernel hacker's point of view, this means that (i) MSG does not
204 duplicate code needed for handling basic USB protocol commands and 204 duplicate code needed for handling basic USB protocol commands and
205 (ii) MSF can be used in any other composite gadget. 205 (ii) MSF can be used in any other composite gadget.
206 206
207 Because of that, File Storage Gadget has been deprecated and 207 Because of that, File Storage Gadget has been removed in Linux 3.8.
208 scheduled to be removed in Linux 3.8. All users need to transition 208 All users need to transition to the Mass Storage Gadget. The two
209 to the Mass Storage Gadget by that time. The two gadgets behave 209 gadgets behave mostly the same from the outside except:
210 mostly the same from the outside except:
211 210
212 1. In FSG the “removable” and “cdrom” module parameters set the flag 211 1. In FSG the “removable” and “cdrom” module parameters set the flag
213 for all logical units whereas in MSG they accept a list of y/n 212 for all logical units whereas in MSG they accept a list of y/n
diff --git a/Documentation/video4linux/CARDLIST.au0828 b/Documentation/video4linux/CARDLIST.au0828
index a8a65753e544..55a21deab7db 100644
--- a/Documentation/video4linux/CARDLIST.au0828
+++ b/Documentation/video4linux/CARDLIST.au0828
@@ -1,5 +1,5 @@
1 0 -> Unknown board (au0828) 1 0 -> Unknown board (au0828)
2 1 -> Hauppauge HVR950Q (au0828) [2040:7200,2040:7210,2040:7217,2040:721b,2040:721e,2040:721f,2040:7280,0fd9:0008,2040:7260,2040:7213] 2 1 -> Hauppauge HVR950Q (au0828) [2040:7200,2040:7210,2040:7217,2040:721b,2040:721e,2040:721f,2040:7280,0fd9:0008,2040:7260,2040:7213,2040:7270]
3 2 -> Hauppauge HVR850 (au0828) [2040:7240] 3 2 -> Hauppauge HVR850 (au0828) [2040:7240]
4 3 -> DViCO FusionHDTV USB (au0828) [0fe9:d620] 4 3 -> DViCO FusionHDTV USB (au0828) [0fe9:d620]
5 4 -> Hauppauge HVR950Q rev xxF8 (au0828) [2040:7201,2040:7211,2040:7281] 5 4 -> Hauppauge HVR950Q rev xxF8 (au0828) [2040:7201,2040:7211,2040:7281]
diff --git a/Documentation/video4linux/CARDLIST.cx23885 b/Documentation/video4linux/CARDLIST.cx23885
index 1299b5e82d7f..9f056d512e35 100644
--- a/Documentation/video4linux/CARDLIST.cx23885
+++ b/Documentation/video4linux/CARDLIST.cx23885
@@ -36,3 +36,5 @@
36 35 -> TeVii S471 [d471:9022] 36 35 -> TeVii S471 [d471:9022]
37 36 -> Hauppauge WinTV-HVR1255 [0070:2259] 37 36 -> Hauppauge WinTV-HVR1255 [0070:2259]
38 37 -> Prof Revolution DVB-S2 8000 [8000:3034] 38 37 -> Prof Revolution DVB-S2 8000 [8000:3034]
39 38 -> Hauppauge WinTV-HVR4400 [0070:c108,0070:c138,0070:c12a,0070:c1f8]
40 39 -> AVerTV Hybrid Express Slim HC81R [1461:d939]
diff --git a/Documentation/video4linux/CARDLIST.em28xx b/Documentation/video4linux/CARDLIST.em28xx
index d99262dda533..3f12865b2a88 100644
--- a/Documentation/video4linux/CARDLIST.em28xx
+++ b/Documentation/video4linux/CARDLIST.em28xx
@@ -76,7 +76,7 @@
76 76 -> KWorld PlusTV 340U or UB435-Q (ATSC) (em2870) [1b80:a340] 76 76 -> KWorld PlusTV 340U or UB435-Q (ATSC) (em2870) [1b80:a340]
77 77 -> EM2874 Leadership ISDBT (em2874) 77 77 -> EM2874 Leadership ISDBT (em2874)
78 78 -> PCTV nanoStick T2 290e (em28174) 78 78 -> PCTV nanoStick T2 290e (em28174)
79 79 -> Terratec Cinergy H5 (em2884) [0ccd:008e,0ccd:00ac,0ccd:10a2,0ccd:10ad] 79 79 -> Terratec Cinergy H5 (em2884) [0ccd:10a2,0ccd:10ad]
80 80 -> PCTV DVB-S2 Stick (460e) (em28174) 80 80 -> PCTV DVB-S2 Stick (460e) (em28174)
81 81 -> Hauppauge WinTV HVR 930C (em2884) [2040:1605] 81 81 -> Hauppauge WinTV HVR 930C (em2884) [2040:1605]
82 82 -> Terratec Cinergy HTC Stick (em2884) [0ccd:00b2] 82 82 -> Terratec Cinergy HTC Stick (em2884) [0ccd:00b2]
@@ -84,3 +84,4 @@
84 84 -> MaxMedia UB425-TC (em2874) [1b80:e425] 84 84 -> MaxMedia UB425-TC (em2874) [1b80:e425]
85 85 -> PCTV QuatroStick (510e) (em2884) [2304:0242] 85 85 -> PCTV QuatroStick (510e) (em2884) [2304:0242]
86 86 -> PCTV QuatroStick nano (520e) (em2884) [2013:0251] 86 86 -> PCTV QuatroStick nano (520e) (em2884) [2013:0251]
87 87 -> Terratec Cinergy HTC USB XS (em2884) [0ccd:008e,0ccd:00ac]
diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134
index 94d9025aa82d..b3ad68309109 100644
--- a/Documentation/video4linux/CARDLIST.saa7134
+++ b/Documentation/video4linux/CARDLIST.saa7134
@@ -189,3 +189,4 @@
189188 -> Sensoray 811/911 [6000:0811,6000:0911] 189188 -> Sensoray 811/911 [6000:0811,6000:0911]
190189 -> Kworld PC150-U [17de:a134] 190189 -> Kworld PC150-U [17de:a134]
191190 -> Asus My Cinema PS3-100 [1043:48cd] 191190 -> Asus My Cinema PS3-100 [1043:48cd]
192191 -> Hawell HW-9004V1
diff --git a/Documentation/video4linux/bttv/Cards b/Documentation/video4linux/bttv/Cards
index db833ced2cb8..a8fb6e2d3c8b 100644
--- a/Documentation/video4linux/bttv/Cards
+++ b/Documentation/video4linux/bttv/Cards
@@ -43,7 +43,7 @@ Very nice card if you only have satellite TV but several tuners connected
43to the card via composite. 43to the card via composite.
44 44
45Many thanks to Matrix-Vision for giving us 2 cards for free which made 45Many thanks to Matrix-Vision for giving us 2 cards for free which made
46Bt848a/Bt849 single crytal operation support possible!!! 46Bt848a/Bt849 single crystal operation support possible!!!
47 47
48 48
49 49
diff --git a/Documentation/video4linux/bttv/Sound-FAQ b/Documentation/video4linux/bttv/Sound-FAQ
index 395f6c6fdd98..d3f1d7783d1c 100644
--- a/Documentation/video4linux/bttv/Sound-FAQ
+++ b/Documentation/video4linux/bttv/Sound-FAQ
@@ -82,7 +82,7 @@ card installed, you might to check out if you can read these registers
82values used by the windows driver. A tool to do this is available 82values used by the windows driver. A tool to do this is available
83from ftp://telepresence.dmem.strath.ac.uk/pub/bt848/winutil, but it 83from ftp://telepresence.dmem.strath.ac.uk/pub/bt848/winutil, but it
84does'nt work with bt878 boards according to some reports I received. 84does'nt work with bt878 boards according to some reports I received.
85Another one with bt878 suport is available from 85Another one with bt878 support is available from
86http://btwincap.sourceforge.net/Files/btspy2.00.zip 86http://btwincap.sourceforge.net/Files/btspy2.00.zip
87 87
88You might also dig around in the *.ini files of the Windows applications. 88You might also dig around in the *.ini files of the Windows applications.
diff --git a/Documentation/video4linux/et61x251.txt b/Documentation/video4linux/et61x251.txt
deleted file mode 100644
index e0cdae491858..000000000000
--- a/Documentation/video4linux/et61x251.txt
+++ /dev/null
@@ -1,315 +0,0 @@
1
2 ET61X[12]51 PC Camera Controllers
3 Driver for Linux
4 =================================
5
6 - Documentation -
7
8
9Index
10=====
111. Copyright
122. Disclaimer
133. License
144. Overview and features
155. Module dependencies
166. Module loading
177. Module parameters
188. Optional device control through "sysfs"
199. Supported devices
2010. Notes for V4L2 application developers
2111. Contact information
22
23
241. Copyright
25============
26Copyright (C) 2006-2007 by Luca Risolia <luca.risolia@studio.unibo.it>
27
28
292. Disclaimer
30=============
31Etoms is a trademark of Etoms Electronics Corp.
32This software is not developed or sponsored by Etoms Electronics.
33
34
353. License
36==========
37This program is free software; you can redistribute it and/or modify
38it under the terms of the GNU General Public License as published by
39the Free Software Foundation; either version 2 of the License, or
40(at your option) any later version.
41
42This program is distributed in the hope that it will be useful,
43but WITHOUT ANY WARRANTY; without even the implied warranty of
44MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45GNU General Public License for more details.
46
47You should have received a copy of the GNU General Public License
48along with this program; if not, write to the Free Software
49Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
50
51
524. Overview and features
53========================
54This driver supports the video interface of the devices mounting the ET61X151
55or ET61X251 PC Camera Controllers.
56
57It's worth to note that Etoms Electronics has never collaborated with the
58author during the development of this project; despite several requests,
59Etoms Electronics also refused to release enough detailed specifications of
60the video compression engine.
61
62The driver relies on the Video4Linux2 and USB core modules. It has been
63designed to run properly on SMP systems as well.
64
65The latest version of the ET61X[12]51 driver can be found at the following URL:
66http://www.linux-projects.org/
67
68Some of the features of the driver are:
69
70- full compliance with the Video4Linux2 API (see also "Notes for V4L2
71 application developers" paragraph);
72- available mmap or read/poll methods for video streaming through isochronous
73 data transfers;
74- automatic detection of image sensor;
75- support for any window resolutions and optional panning within the maximum
76 pixel area of image sensor;
77- image downscaling with arbitrary scaling factors from 1 and 2 in both
78 directions (see "Notes for V4L2 application developers" paragraph);
79- two different video formats for uncompressed or compressed data in low or
80 high compression quality (see also "Notes for V4L2 application developers"
81 paragraph);
82- full support for the capabilities of every possible image sensors that can
83 be connected to the ET61X[12]51 bridges, including, for instance, red, green,
84 blue and global gain adjustments and exposure control (see "Supported
85 devices" paragraph for details);
86- use of default color settings for sunlight conditions;
87- dynamic I/O interface for both ET61X[12]51 and image sensor control (see
88 "Optional device control through 'sysfs'" paragraph);
89- dynamic driver control thanks to various module parameters (see "Module
90 parameters" paragraph);
91- up to 64 cameras can be handled at the same time; they can be connected and
92 disconnected from the host many times without turning off the computer, if
93 the system supports hotplugging;
94- no known bugs.
95
96
975. Module dependencies
98======================
99For it to work properly, the driver needs kernel support for Video4Linux and
100USB.
101
102The following options of the kernel configuration file must be enabled and
103corresponding modules must be compiled:
104
105 # Multimedia devices
106 #
107 CONFIG_VIDEO_DEV=m
108
109To enable advanced debugging functionality on the device through /sysfs:
110
111 # Multimedia devices
112 #
113 CONFIG_VIDEO_ADV_DEBUG=y
114
115 # USB support
116 #
117 CONFIG_USB=m
118
119In addition, depending on the hardware being used, the modules below are
120necessary:
121
122 # USB Host Controller Drivers
123 #
124 CONFIG_USB_EHCI_HCD=m
125 CONFIG_USB_UHCI_HCD=m
126 CONFIG_USB_OHCI_HCD=m
127
128And finally:
129
130 # USB Multimedia devices
131 #
132 CONFIG_USB_ET61X251=m
133
134
1356. Module loading
136=================
137To use the driver, it is necessary to load the "et61x251" module into memory
138after every other module required: "videodev", "v4l2_common", "compat_ioctl32",
139"usbcore" and, depending on the USB host controller you have, "ehci-hcd",
140"uhci-hcd" or "ohci-hcd".
141
142Loading can be done as shown below:
143
144 [root@localhost home]# modprobe et61x251
145
146At this point the devices should be recognized. You can invoke "dmesg" to
147analyze kernel messages and verify that the loading process has gone well:
148
149 [user@localhost home]$ dmesg
150
151
1527. Module parameters
153====================
154Module parameters are listed below:
155-------------------------------------------------------------------------------
156Name: video_nr
157Type: short array (min = 0, max = 64)
158Syntax: <-1|n[,...]>
159Description: Specify V4L2 minor mode number:
160 -1 = use next available
161 n = use minor number n
162 You can specify up to 64 cameras this way.
163 For example:
164 video_nr=-1,2,-1 would assign minor number 2 to the second
165 registered camera and use auto for the first one and for every
166 other camera.
167Default: -1
168-------------------------------------------------------------------------------
169Name: force_munmap
170Type: bool array (min = 0, max = 64)
171Syntax: <0|1[,...]>
172Description: Force the application to unmap previously mapped buffer memory
173 before calling any VIDIOC_S_CROP or VIDIOC_S_FMT ioctl's. Not
174 all the applications support this feature. This parameter is
175 specific for each detected camera.
176 0 = do not force memory unmapping
177 1 = force memory unmapping (save memory)
178Default: 0
179-------------------------------------------------------------------------------
180Name: frame_timeout
181Type: uint array (min = 0, max = 64)
182Syntax: <n[,...]>
183Description: Timeout for a video frame in seconds. This parameter is
184 specific for each detected camera. This parameter can be
185 changed at runtime thanks to the /sys filesystem interface.
186Default: 2
187-------------------------------------------------------------------------------
188Name: debug
189Type: ushort
190Syntax: <n>
191Description: Debugging information level, from 0 to 3:
192 0 = none (use carefully)
193 1 = critical errors
194 2 = significant information
195 3 = more verbose messages
196 Level 3 is useful for testing only, when only one device
197 is used at the same time. It also shows some more information
198 about the hardware being detected. This module parameter can be
199 changed at runtime thanks to the /sys filesystem interface.
200Default: 2
201-------------------------------------------------------------------------------
202
203
2048. Optional device control through "sysfs"
205==========================================
206If the kernel has been compiled with the CONFIG_VIDEO_ADV_DEBUG option enabled,
207it is possible to read and write both the ET61X[12]51 and the image sensor
208registers by using the "sysfs" filesystem interface.
209
210There are four files in the /sys/class/video4linux/videoX directory for each
211registered camera: "reg", "val", "i2c_reg" and "i2c_val". The first two files
212control the ET61X[12]51 bridge, while the other two control the sensor chip.
213"reg" and "i2c_reg" hold the values of the current register index where the
214following reading/writing operations are addressed at through "val" and
215"i2c_val". Their use is not intended for end-users, unless you know what you
216are doing. Remember that you must be logged in as root before writing to them.
217
218As an example, suppose we were to want to read the value contained in the
219register number 1 of the sensor register table - which is usually the product
220identifier - of the camera registered as "/dev/video0":
221
222 [root@localhost #] cd /sys/class/video4linux/video0
223 [root@localhost #] echo 1 > i2c_reg
224 [root@localhost #] cat i2c_val
225
226Note that if the sensor registers cannot be read, "cat" will fail.
227To avoid race conditions, all the I/O accesses to the files are serialized.
228
229
2309. Supported devices
231====================
232None of the names of the companies as well as their products will be mentioned
233here. They have never collaborated with the author, so no advertising.
234
235From the point of view of a driver, what unambiguously identify a device are
236its vendor and product USB identifiers. Below is a list of known identifiers of
237devices mounting the ET61X[12]51 PC camera controllers:
238
239Vendor ID Product ID
240--------- ----------
2410x102c 0x6151
2420x102c 0x6251
2430x102c 0x6253
2440x102c 0x6254
2450x102c 0x6255
2460x102c 0x6256
2470x102c 0x6257
2480x102c 0x6258
2490x102c 0x6259
2500x102c 0x625a
2510x102c 0x625b
2520x102c 0x625c
2530x102c 0x625d
2540x102c 0x625e
2550x102c 0x625f
2560x102c 0x6260
2570x102c 0x6261
2580x102c 0x6262
2590x102c 0x6263
2600x102c 0x6264
2610x102c 0x6265
2620x102c 0x6266
2630x102c 0x6267
2640x102c 0x6268
2650x102c 0x6269
266
267The following image sensors are supported:
268
269Model Manufacturer
270----- ------------
271TAS5130D1B Taiwan Advanced Sensor Corporation
272
273All the available control settings of each image sensor are supported through
274the V4L2 interface.
275
276
27710. Notes for V4L2 application developers
278=========================================
279This driver follows the V4L2 API specifications. In particular, it enforces two
280rules:
281
282- exactly one I/O method, either "mmap" or "read", is associated with each
283file descriptor. Once it is selected, the application must close and reopen the
284device to switch to the other I/O method;
285
286- although it is not mandatory, previously mapped buffer memory should always
287be unmapped before calling any "VIDIOC_S_CROP" or "VIDIOC_S_FMT" ioctl's.
288The same number of buffers as before will be allocated again to match the size
289of the new video frames, so you have to map the buffers again before any I/O
290attempts on them.
291
292Consistently with the hardware limits, this driver also supports image
293downscaling with arbitrary scaling factors from 1 and 2 in both directions.
294However, the V4L2 API specifications don't correctly define how the scaling
295factor can be chosen arbitrarily by the "negotiation" of the "source" and
296"target" rectangles. To work around this flaw, we have added the convention
297that, during the negotiation, whenever the "VIDIOC_S_CROP" ioctl is issued, the
298scaling factor is restored to 1.
299
300This driver supports two different video formats: the first one is the "8-bit
301Sequential Bayer" format and can be used to obtain uncompressed video data
302from the device through the current I/O method, while the second one provides
303"raw" compressed video data (without frame headers not related to the
304compressed data). The current compression quality may vary from 0 to 1 and can
305be selected or queried thanks to the VIDIOC_S_JPEGCOMP and VIDIOC_G_JPEGCOMP
306V4L2 ioctl's.
307
308
30911. Contact information
310=======================
311The author may be contacted by e-mail at <luca.risolia@studio.unibo.it>.
312
313GPG/PGP encrypted e-mail's are accepted. The GPG key ID of the author is
314'FCE635A4'; the public 1024-bit key should be available at any keyserver;
315the fingerprint is: '88E8 F32F 7244 68BA 3958 5D40 99DA 5D2A FCE6 35A4'.
diff --git a/Documentation/video4linux/extract_xc3028.pl b/Documentation/video4linux/extract_xc3028.pl
index 47877deae6d7..47877deae6d7 100644..100755
--- a/Documentation/video4linux/extract_xc3028.pl
+++ b/Documentation/video4linux/extract_xc3028.pl
diff --git a/Documentation/video4linux/fimc.txt b/Documentation/video4linux/fimc.txt
index fd02d9a4930a..25f4d3402722 100644
--- a/Documentation/video4linux/fimc.txt
+++ b/Documentation/video4linux/fimc.txt
@@ -58,7 +58,7 @@ Not currently supported:
584.1. Media device interface 584.1. Media device interface
59 59
60The driver supports Media Controller API as defined at 60The driver supports Media Controller API as defined at
61http://http://linuxtv.org/downloads/v4l-dvb-apis/media_common.html 61http://linuxtv.org/downloads/v4l-dvb-apis/media_common.html
62The media device driver name is "SAMSUNG S5P FIMC". 62The media device driver name is "SAMSUNG S5P FIMC".
63 63
64The purpose of this interface is to allow changing assignment of FIMC instances 64The purpose of this interface is to allow changing assignment of FIMC instances
diff --git a/Documentation/video4linux/ibmcam.txt b/Documentation/video4linux/ibmcam.txt
deleted file mode 100644
index a51055211e62..000000000000
--- a/Documentation/video4linux/ibmcam.txt
+++ /dev/null
@@ -1,323 +0,0 @@
1README for Linux device driver for the IBM "C-It" USB video camera
2
3INTRODUCTION:
4
5This driver does not use all features known to exist in
6the IBM camera. However most of needed features work well.
7
8This driver was developed using logs of observed USB traffic
9which was produced by standard Windows driver (c-it98.sys).
10I did not have data sheets from Xirlink.
11
12Video formats:
13 128x96 [model 1]
14 176x144
15 320x240 [model 2]
16 352x240 [model 2]
17 352x288
18Frame rate: 3 - 30 frames per second (FPS)
19External interface: USB
20Internal interface: Video For Linux (V4L)
21Supported controls:
22- by V4L: Contrast, Brightness, Color, Hue
23- by driver options: frame rate, lighting conditions, video format,
24 default picture settings, sharpness.
25
26SUPPORTED CAMERAS:
27
28Xirlink "C-It" camera, also known as "IBM PC Camera".
29The device uses proprietary ASIC (and compression method);
30it is manufactured by Xirlink. See http://xirlinkwebcam.sourceforge.net,
31http://www.ibmpccamera.com, or http://www.c-itnow.com/ for details and pictures.
32
33This very chipset ("X Chip", as marked at the factory)
34is used in several other cameras, and they are supported
35as well:
36
37- IBM NetCamera
38- Veo Stingray
39
40The Linux driver was developed with camera with following
41model number (or FCC ID): KSX-XVP510. This camera has three
42interfaces, each with one endpoint (control, iso, iso). This
43type of cameras is referred to as "model 1". These cameras are
44no longer manufactured.
45
46Xirlink now manufactures new cameras which are somewhat different.
47In particular, following models [FCC ID] belong to that category:
48
49XVP300 [KSX-X9903]
50XVP600 [KSX-X9902]
51XVP610 [KSX-X9902]
52
53(see http://www.xirlink.com/ibmpccamera/ for updates, they refer
54to these new cameras by Windows driver dated 12-27-99, v3005 BETA)
55These cameras have two interfaces, one endpoint in each (iso, bulk).
56Such type of cameras is referred to as "model 2". They are supported
57(with exception of 352x288 native mode).
58
59Some IBM NetCameras (Model 4) are made to generate only compressed
60video streams. This is great for performance, but unfortunately
61nobody knows how to decompress the stream :-( Therefore, these
62cameras are *unsupported* and if you try to use one of those, all
63you get is random colored horizontal streaks, not the image!
64If you have one of those cameras, you probably should return it
65to the store and get something that is supported.
66
67Tell me more about all that "model" business
68--------------------------------------------
69
70I just invented model numbers to uniquely identify flavors of the
71hardware/firmware that were sold. It was very confusing to use
72brand names or some other internal numbering schemes. So I found
73by experimentation that all Xirlink chipsets fall into four big
74classes, and I called them "models". Each model is programmed in
75its own way, and each model sends back the video in its own way.
76
77Quirks of Model 2 cameras:
78-------------------------
79
80Model 2 does not have hardware contrast control. Corresponding V4L
81control is implemented in software, which is not very nice to your
82CPU, but at least it works.
83
84This driver provides 352x288 mode by switching the camera into
85quasi-352x288 RGB mode (800 Kbits per frame) essentially limiting
86this mode to 10 frames per second or less, in ideal conditions on
87the bus (USB is shared, after all). The frame rate
88has to be programmed very conservatively. Additional concern is that
89frame rate depends on brightness setting; therefore the picture can
90be good at one brightness and broken at another! I did not want to fix
91the frame rate at slowest setting, but I had to move it pretty much down
92the scale (so that framerate option barely matters). I also noticed that
93camera after first powering up produces frames slightly faster than during
94consecutive uses. All this means that if you use 352x288 (which is
95default), be warned - you may encounter broken picture on first connect;
96try to adjust brightness - brighter image is slower, so USB will be able
97to send all data. However if you regularly use Model 2 cameras you may
98prefer 176x144 which makes perfectly good I420, with no scaling and
99lesser demands on USB (300 Kbits per second, or 26 frames per second).
100
101Another strange effect of 352x288 mode is the fine vertical grid visible
102on some colored surfaces. I am sure it is caused by me not understanding
103what the camera is trying to say. Blame trade secrets for that.
104
105The camera that I had also has a hardware quirk: if disconnected,
106it needs few minutes to "relax" before it can be plugged in again
107(poorly designed USB processor reset circuit?)
108
109[Veo Stingray with Product ID 0x800C is also Model 2, but I haven't
110observed this particular flaw in it.]
111
112Model 2 camera can be programmed for very high sensitivity (even starlight
113may be enough), this makes it convenient for tinkering with. The driver
114code has enough comments to help a programmer to tweak the camera
115as s/he feels necessary.
116
117WHAT YOU NEED:
118
119- A supported IBM PC (C-it) camera (model 1 or 2)
120
121- A Linux box with USB support (2.3/2.4; 2.2 w/backport may work)
122
123- A Video4Linux compatible frame grabber program such as xawtv.
124
125HOW TO COMPILE THE DRIVER:
126
127You need to compile the driver only if you are a developer
128or if you want to make changes to the code. Most distributions
129precompile all modules, so you can go directly to the next
130section "HOW TO USE THE DRIVER".
131
132The ibmcam driver uses usbvideo helper library (module),
133so if you are studying the ibmcam code you will be led there.
134
135The driver itself consists of only one file in usb/ directory:
136ibmcam.c. This file is included into the Linux kernel build
137process if you configure the kernel for CONFIG_USB_IBMCAM.
138Run "make xconfig" and in USB section you will find the IBM
139camera driver. Select it, save the configuration and recompile.
140
141HOW TO USE THE DRIVER:
142
143I recommend to compile driver as a module. This gives you an
144easier access to its configuration. The camera has many more
145settings than V4L can operate, so some settings are done using
146module options.
147
148To begin with, on most modern Linux distributions the driver
149will be automatically loaded whenever you plug the supported
150camera in. Therefore, you don't need to do anything. However
151if you want to experiment with some module parameters then
152you can load and unload the driver manually, with camera
153plugged in or unplugged.
154
155Typically module is installed with command 'modprobe', like this:
156
157# modprobe ibmcam framerate=1
158
159Alternatively you can use 'insmod' in similar fashion:
160
161# insmod /lib/modules/2.x.y/usb/ibmcam.o framerate=1
162
163Module can be inserted with camera connected or disconnected.
164
165The driver can have options, though some defaults are provided.
166
167Driver options: (* indicates that option is model-dependent)
168
169Name Type Range [default] Example
170-------------- -------------- -------------- ------------------
171debug Integer 0-9 [0] debug=1
172flags Integer 0-0xFF [0] flags=0x0d
173framerate Integer 0-6 [2] framerate=1
174hue_correction Integer 0-255 [128] hue_correction=115
175init_brightness Integer 0-255 [128] init_brightness=100
176init_contrast Integer 0-255 [192] init_contrast=200
177init_color Integer 0-255 [128] init_color=130
178init_hue Integer 0-255 [128] init_hue=115
179lighting Integer 0-2* [1] lighting=2
180sharpness Integer 0-6* [4] sharpness=3
181size Integer 0-2* [2] size=1
182
183Options for Model 2 only:
184
185Name Type Range [default] Example
186-------------- -------------- -------------- ------------------
187init_model2_rg Integer 0..255 [0x70] init_model2_rg=128
188init_model2_rg2 Integer 0..255 [0x2f] init_model2_rg2=50
189init_model2_sat Integer 0..255 [0x34] init_model2_sat=65
190init_model2_yb Integer 0..255 [0xa0] init_model2_yb=200
191
192debug You don't need this option unless you are a developer.
193 If you are a developer then you will see in the code
194 what values do what. 0=off.
195
196flags This is a bit mask, and you can combine any number of
197 bits to produce what you want. Usually you don't want
198 any of extra features this option provides:
199
200 FLAGS_RETRY_VIDIOCSYNC 1 This bit allows to retry failed
201 VIDIOCSYNC ioctls without failing.
202 Will work with xawtv, will not
203 with xrealproducer. Default is
204 not set.
205 FLAGS_MONOCHROME 2 Activates monochrome (b/w) mode.
206 FLAGS_DISPLAY_HINTS 4 Shows colored pixels which have
207 magic meaning to developers.
208 FLAGS_OVERLAY_STATS 8 Shows tiny numbers on screen,
209 useful only for debugging.
210 FLAGS_FORCE_TESTPATTERN 16 Shows blue screen with numbers.
211 FLAGS_SEPARATE_FRAMES 32 Shows each frame separately, as
212 it was received from the camera.
213 Default (not set) is to mix the
214 preceding frame in to compensate
215 for occasional loss of Isoc data
216 on high frame rates.
217 FLAGS_CLEAN_FRAMES 64 Forces "cleanup" of each frame
218 prior to use; relevant only if
219 FLAGS_SEPARATE_FRAMES is set.
220 Default is not to clean frames,
221 this is a little faster but may
222 produce flicker if frame rate is
223 too high and Isoc data gets lost.
224 FLAGS_NO_DECODING 128 This flag turns the video stream
225 decoder off, and dumps the raw
226 Isoc data from the camera into
227 the reading process. Useful to
228 developers, but not to users.
229
230framerate This setting controls frame rate of the camera. This is
231 an approximate setting (in terms of "worst" ... "best")
232 because camera changes frame rate depending on amount
233 of light available. Setting 0 is slowest, 6 is fastest.
234 Beware - fast settings are very demanding and may not
235 work well with all video sizes. Be conservative.
236
237hue_correction This highly optional setting allows to adjust the
238 hue of the image in a way slightly different from
239 what usual "hue" control does. Both controls affect
240 YUV colorspace: regular "hue" control adjusts only
241 U component, and this "hue_correction" option similarly
242 adjusts only V component. However usually it is enough
243 to tweak only U or V to compensate for colored light or
244 color temperature; this option simply allows more
245 complicated correction when and if it is necessary.
246
247init_brightness These settings specify _initial_ values which will be
248init_contrast used to set up the camera. If your V4L application has
249init_color its own controls to adjust the picture then these
250init_hue controls will be used too. These options allow you to
251 preconfigure the camera when it gets connected, before
252 any V4L application connects to it. Good for webcams.
253
254init_model2_rg These initial settings alter color balance of the
255init_model2_rg2 camera on hardware level. All four settings may be used
256init_model2_sat to tune the camera to specific lighting conditions. These
257init_model2_yb settings only apply to Model 2 cameras.
258
259lighting This option selects one of three hardware-defined
260 photosensitivity settings of the camera. 0=bright light,
261 1=Medium (default), 2=Low light. This setting affects
262 frame rate: the dimmer the lighting the lower the frame
263 rate (because longer exposition time is needed). The
264 Model 2 cameras allow values more than 2 for this option,
265 thus enabling extremely high sensitivity at cost of frame
266 rate, color saturation and imaging sensor noise.
267
268sharpness This option controls smoothing (noise reduction)
269 made by camera. Setting 0 is most smooth, setting 6
270 is most sharp. Be aware that CMOS sensor used in the
271 camera is pretty noisy, so if you choose 6 you will
272 be greeted with "snowy" image. Default is 4. Model 2
273 cameras do not support this feature.
274
275size This setting chooses one of several image sizes that are
276 supported by this driver. Cameras may support more, but
277 it's difficult to reverse-engineer all formats.
278 Following video sizes are supported:
279
280 size=0 128x96 (Model 1 only)
281 size=1 160x120
282 size=2 176x144
283 size=3 320x240 (Model 2 only)
284 size=4 352x240 (Model 2 only)
285 size=5 352x288
286 size=6 640x480 (Model 3 only)
287
288 The 352x288 is the native size of the Model 1 sensor
289 array, so it's the best resolution the camera can
290 yield. The best resolution of Model 2 is 176x144, and
291 larger images are produced by stretching the bitmap.
292 Model 3 has sensor with 640x480 grid, and it works too,
293 but the frame rate will be exceptionally low (1-2 FPS);
294 it may be still OK for some applications, like security.
295 Choose the image size you need. The smaller image can
296 support faster frame rate. Default is 352x288.
297
298For more information and the Troubleshooting FAQ visit this URL:
299
300 http://www.linux-usb.org/ibmcam/
301
302WHAT NEEDS TO BE DONE:
303
304- The button on the camera is not used. I don't know how to get to it.
305 I know now how to read button on Model 2, but what to do with it?
306
307- Camera reports its status back to the driver; however I don't know
308 what returned data means. If camera fails at some initialization
309 stage then something should be done, and I don't do that because
310 I don't even know that some command failed. This is mostly Model 1
311 concern because Model 2 uses different commands which do not return
312 status (and seem to complete successfully every time).
313
314- Some flavors of Model 4 NetCameras produce only compressed video
315 streams, and I don't know how to decode them.
316
317CREDITS:
318
319The code is based in no small part on the CPiA driver by Johannes Erdfelt,
320Randy Dunlap, and others. Big thanks to them for their pioneering work on that
321and the USB stack.
322
323I also thank John Lightsey for his donation of the Veo Stingray camera.
diff --git a/Documentation/video4linux/m5602.txt b/Documentation/video4linux/m5602.txt
deleted file mode 100644
index 4450ab13f37b..000000000000
--- a/Documentation/video4linux/m5602.txt
+++ /dev/null
@@ -1,12 +0,0 @@
1This document describes the ALi m5602 bridge connected
2to the following supported sensors:
3OmniVision OV9650,
4Samsung s5k83a,
5Samsung s5k4aa,
6Micron mt9m111,
7Pixel plus PO1030
8
9This driver mimics the windows drivers, which have a braindead implementation sending bayer-encoded frames at VGA resolution.
10In a perfect world we should be able to reprogram the m5602 and the connected sensor in hardware instead, supporting a range of resolutions and pixelformats
11
12Anyway, have fun and please report any bugs to m560x-driver-devel@lists.sourceforge.net
diff --git a/Documentation/video4linux/ov511.txt b/Documentation/video4linux/ov511.txt
deleted file mode 100644
index b3326b167ada..000000000000
--- a/Documentation/video4linux/ov511.txt
+++ /dev/null
@@ -1,288 +0,0 @@
1-------------------------------------------------------------------------------
2Readme for Linux device driver for the OmniVision OV511 USB to camera bridge IC
3-------------------------------------------------------------------------------
4
5Author: Mark McClelland
6Homepage: http://alpha.dyndns.org/ov511
7
8INTRODUCTION:
9
10This is a driver for the OV511, a USB-only chip used in many "webcam" devices.
11Any camera using the OV511/OV511+ and the OV6620/OV7610/20/20AE should work.
12Video capture devices that use the Philips SAA7111A decoder also work. It
13supports streaming and capture of color or monochrome video via the Video4Linux
14API. Most V4L apps are compatible with it. Most resolutions with a width and
15height that are a multiple of 8 are supported.
16
17If you need more information, please visit the OV511 homepage at the above URL.
18
19WHAT YOU NEED:
20
21- If you want to help with the development, get the chip's specification docs at
22 http://www.ovt.com/omniusbp.html
23
24- A Video4Linux compatible frame grabber program (I recommend vidcat and xawtv)
25 vidcat is part of the w3cam package: http://mpx.freeshell.net/
26 xawtv is available at: http://linux.bytesex.org/xawtv/
27
28HOW TO USE IT:
29
30Note: These are simplified instructions. For complete instructions see:
31 http://alpha.dyndns.org/ov511/install.html
32
33You must have first compiled USB support, support for your specific USB host
34controller (UHCI or OHCI), and Video4Linux support for your kernel (I recommend
35making them modules.) Make sure "Enforce bandwidth allocation" is NOT enabled.
36
37Next, (as root):
38
39 modprobe usbcore
40 modprobe usb-uhci <OR> modprobe usb-ohci
41 modprobe videodev
42 modprobe ov511
43
44If it is not already there (it usually is), create the video device:
45
46 mknod /dev/video0 c 81 0
47
48Optionally, symlink /dev/video to /dev/video0
49
50You will have to set permissions on this device to allow you to read/write
51from it:
52
53 chmod 666 /dev/video
54 chmod 666 /dev/video0 (if necessary)
55
56Now you are ready to run a video app! Both vidcat and xawtv work well for me
57at 640x480.
58
59[Using vidcat:]
60
61 vidcat -s 640x480 -p c > test.jpg
62 xview test.jpg
63
64[Using xawtv:]
65
66From the main xawtv directory:
67
68 make clean
69 ./configure
70 make
71 make install
72
73Now you should be able to run xawtv. Right click for the options dialog.
74
75MODULE PARAMETERS:
76
77 You can set these with: insmod ov511 NAME=VALUE
78 There is currently no way to set these on a per-camera basis.
79
80 NAME: autobright
81 TYPE: integer (Boolean)
82 DEFAULT: 1
83 DESC: Brightness is normally under automatic control and can't be set
84 manually by the video app. Set to 0 for manual control.
85
86 NAME: autogain
87 TYPE: integer (Boolean)
88 DEFAULT: 1
89 DESC: Auto Gain Control enable. This feature is not yet implemented.
90
91 NAME: autoexp
92 TYPE: integer (Boolean)
93 DEFAULT: 1
94 DESC: Auto Exposure Control enable. This feature is not yet implemented.
95
96 NAME: debug
97 TYPE: integer (0-6)
98 DEFAULT: 3
99 DESC: Sets the threshold for printing debug messages. The higher the value,
100 the more is printed. The levels are cumulative, and are as follows:
101 0=no debug messages
102 1=init/detection/unload and other significant messages
103 2=some warning messages
104 3=config/control function calls
105 4=most function calls and data parsing messages
106 5=highly repetitive mesgs
107
108 NAME: snapshot
109 TYPE: integer (Boolean)
110 DEFAULT: 0
111 DESC: Set to 1 to enable snapshot mode. read()/VIDIOCSYNC will block until
112 the snapshot button is pressed. Note: enabling this mode disables
113 /proc/video/ov511/<minor#>/button
114
115 NAME: cams
116 TYPE: integer (1-4 for OV511, 1-31 for OV511+)
117 DEFAULT: 1
118 DESC: Number of cameras allowed to stream simultaneously on a single bus.
119 Values higher than 1 reduce the data rate of each camera, allowing two
120 or more to be used at once. If you have a complicated setup involving
121 both OV511 and OV511+ cameras, trial-and-error may be necessary for
122 finding the optimum setting.
123
124 NAME: compress
125 TYPE: integer (Boolean)
126 DEFAULT: 0
127 DESC: Set this to 1 to turn on the camera's compression engine. This can
128 potentially increase the frame rate at the expense of quality, if you
129 have a fast CPU. You must load the proper compression module for your
130 camera before starting your application (ov511_decomp or ov518_decomp).
131
132 NAME: testpat
133 TYPE: integer (Boolean)
134 DEFAULT: 0
135 DESC: This configures the camera's sensor to transmit a colored test-pattern
136 instead of an image. This does not work correctly yet.
137
138 NAME: dumppix
139 TYPE: integer (0-2)
140 DEFAULT: 0
141 DESC: Dumps raw pixel data and skips post-processing and format conversion.
142 It is for debugging purposes only. Options are:
143 0: Disable (default)
144 1: Dump raw data from camera, excluding headers and trailers
145 2: Dumps data exactly as received from camera
146
147 NAME: led
148 TYPE: integer (0-2)
149 DEFAULT: 1 (Always on)
150 DESC: Controls whether the LED (the little light) on the front of the camera
151 is always off (0), always on (1), or only on when driver is open (2).
152 This is not supported with the OV511, and might only work with certain
153 cameras (ones that actually have the LED wired to the control pin, and
154 not just hard-wired to be on all the time).
155
156 NAME: dump_bridge
157 TYPE: integer (Boolean)
158 DEFAULT: 0
159 DESC: Dumps the bridge (OV511[+] or OV518[+]) register values to the system
160 log. Only useful for serious debugging/development purposes.
161
162 NAME: dump_sensor
163 TYPE: integer (Boolean)
164 DEFAULT: 0
165 DESC: Dumps the sensor register values to the system log. Only useful for
166 serious debugging/development purposes.
167
168 NAME: printph
169 TYPE: integer (Boolean)
170 DEFAULT: 0
171 DESC: Setting this to 1 will dump the first 12 bytes of each isoc frame. This
172 is only useful if you are trying to debug problems with the isoc data
173 stream (i.e.: camera initializes, but vidcat hangs until Ctrl-C). Be
174 warned that this dumps a large number of messages to your kernel log.
175
176 NAME: phy, phuv, pvy, pvuv, qhy, qhuv, qvy, qvuv
177 TYPE: integer (0-63 for phy and phuv, 0-255 for rest)
178 DEFAULT: OV511 default values
179 DESC: These are registers 70h - 77h of the OV511, which control the
180 prediction ranges and quantization thresholds of the compressor, for
181 the Y and UV channels in the horizontal and vertical directions. See
182 the OV511 or OV511+ data sheet for more detailed descriptions. These
183 normally do not need to be changed.
184
185 NAME: lightfreq
186 TYPE: integer (0, 50, or 60)
187 DEFAULT: 0 (use sensor default)
188 DESC: Sets the sensor to match your lighting frequency. This can reduce the
189 appearance of "banding", i.e. horizontal lines or waves of light and
190 dark that are often caused by artificial lighting. Valid values are:
191 0 - Use default (depends on sensor, most likely 60 Hz)
192 50 - For European and Asian 50 Hz power
193 60 - For American 60 Hz power
194
195 NAME: bandingfilter
196 TYPE: integer (Boolean)
197 DEFAULT: 0 (off)
198 DESC: Enables the sensor´s banding filter exposure algorithm. This reduces
199 or stabilizes the "banding" caused by some artificial light sources
200 (especially fluorescent). You might have to set lightfreq correctly for
201 this to work right. As an added bonus, this sometimes makes it
202 possible to capture your monitor´s output.
203
204 NAME: fastset
205 TYPE: integer (Boolean)
206 DEFAULT: 0 (off)
207 DESC: Allows picture settings (brightness, contrast, color, and hue) to take
208 effect immediately, even in the middle of a frame. This reduces the
209 time to change settings, but can ruin frames during the change. Only
210 affects OmniVision sensors.
211
212 NAME: force_palette
213 TYPE: integer (Boolean)
214 DEFAULT: 0 (off)
215 DESC: Forces the palette (color format) to a specific value. If an
216 application requests a different palette, it will be rejected, thereby
217 forcing it to try others until it succeeds. This is useful for forcing
218 greyscale mode with a color camera, for example. Supported modes are:
219 0 (Allows all the following formats)
220 1 VIDEO_PALETTE_GREY (Linear greyscale)
221 10 VIDEO_PALETTE_YUV420 (YUV 4:2:0 Planar)
222 15 VIDEO_PALETTE_YUV420P (YUV 4:2:0 Planar, same as 10)
223
224 NAME: backlight
225 TYPE: integer (Boolean)
226 DEFAULT: 0 (off)
227 DESC: Setting this flag changes the exposure algorithm for OmniVision sensors
228 such that objects in the camera's view (i.e. your head) can be clearly
229 seen when they are illuminated from behind. It reduces or eliminates
230 the sensor's auto-exposure function, so it should only be used when
231 needed. Additionally, it is only supported with the OV6620 and OV7620.
232
233 NAME: unit_video
234 TYPE: Up to 16 comma-separated integers
235 DEFAULT: 0,0,0... (automatically assign the next available minor(s))
236 DESC: You can specify up to 16 minor numbers to be assigned to ov511 devices.
237 For example, "unit_video=1,3" will make the driver use /dev/video1 and
238 /dev/video3 for the first two devices it detects. Additional devices
239 will be assigned automatically starting at the first available device
240 node (/dev/video0 in this case). Note that you cannot specify 0 as a
241 minor number. This feature requires kernel version 2.4.5 or higher.
242
243 NAME: remove_zeros
244 TYPE: integer (Boolean)
245 DEFAULT: 0 (do not skip any incoming data)
246 DESC: Setting this to 1 will remove zero-padding from incoming data. This
247 will compensate for the blocks of corruption that can appear when the
248 camera cannot keep up with the speed of the USB bus (eg. at low frame
249 resolutions). This feature is always enabled when compression is on.
250
251 NAME: mirror
252 TYPE: integer (Boolean)
253 DEFAULT: 0 (off)
254 DESC: Setting this to 1 will reverse ("mirror") the image horizontally. This
255 might be necessary if your camera has a custom lens assembly. This has
256 no effect with video capture devices.
257
258 NAME: ov518_color
259 TYPE: integer (Boolean)
260 DEFAULT: 0 (off)
261 DESC: Enable OV518 color support. This is off by default since it doesn't
262 work most of the time. If you want to try it, you must also load
263 ov518_decomp with the "nouv=0" parameter. If you get improper colors or
264 diagonal lines through the image, restart your video app and try again.
265 Repeat as necessary.
266
267WORKING FEATURES:
268 o Color streaming/capture at most widths and heights that are multiples of 8.
269 o Monochrome (use force_palette=1 to enable)
270 o Setting/getting of saturation, contrast, brightness, and hue (only some of
271 them work the OV7620 and OV7620AE)
272 o /proc status reporting
273 o SAA7111A video capture support at 320x240 and 640x480
274 o Compression support
275 o SMP compatibility
276
277HOW TO CONTACT ME:
278
279You can email me at mark@alpha.dyndns.org . Please prefix the subject line
280with "OV511: " so that I am certain to notice your message.
281
282CREDITS:
283
284The code is based in no small part on the CPiA driver by Johannes Erdfelt,
285Randy Dunlap, and others. Big thanks to them for their pioneering work on that
286and the USB stack. Thanks to Bret Wallach for getting camera reg IO, ISOC, and
287image capture working. Thanks to Orion Sky Lawlor, Kevin Moore, and Claudio
288Matsuoka for their work as well.
diff --git a/Documentation/video4linux/se401.txt b/Documentation/video4linux/se401.txt
deleted file mode 100644
index bd6526ec8dd7..000000000000
--- a/Documentation/video4linux/se401.txt
+++ /dev/null
@@ -1,54 +0,0 @@
1Linux driver for SE401 based USB cameras
2
3Copyright, 2001, Jeroen Vreeken
4
5
6INTRODUCTION:
7
8The SE401 chip is the used in low-cost usb webcams.
9It is produced by Endpoints Inc. (www.endpoints.com).
10It interfaces directly to a cmos image sensor and USB. The only other major
11part in a se401 based camera is a dram chip.
12
13The following cameras are known to work with this driver:
14
15Aox se401 (non-branded) cameras
16Philips PVCV665 USB VGA webcam 'Vesta Fun'
17Kensington VideoCAM PC Camera Model 67014
18Kensington VideoCAM PC Camera Model 67015
19Kensington VideoCAM PC Camera Model 67016
20Kensington VideoCAM PC Camera Model 67017
21
22
23WHAT YOU NEED:
24
25- USB support
26- VIDEO4LINUX support
27
28More information about USB support for linux can be found at:
29http://www.linux-usb.org
30
31
32MODULE OPTIONS:
33
34When the driver is compiled as a module you can also use the 'flickerless'
35option. With it exposure is limited to values that do not interfere with the
36net frequency. Valid options for this option are 0, 50 and 60. (0=disable,
3750=50hz, 60=60hz)
38
39
40KNOWN PROBLEMS:
41
42The driver works fine with the usb-ohci and uhci host controller drivers,
43the default settings also work with usb-uhci. But sending more than one bulk
44transfer at a time with usb-uhci doesn't work yet.
45Users of usb-ohci and uhci can safely enlarge SE401_NUMSBUF in se401.h in
46order to increase the throughput (and thus framerate).
47
48
49HELP:
50
51The latest info on this driver can be found at:
52http://members.chello.nl/~j.vreeken/se401/
53And questions to me can be send to:
54pe1rxq@amsat.org
diff --git a/Documentation/video4linux/si470x.txt b/Documentation/video4linux/si470x.txt
index 3a7823e01b4d..98c32925eb39 100644
--- a/Documentation/video4linux/si470x.txt
+++ b/Documentation/video4linux/si470x.txt
@@ -53,6 +53,9 @@ Testing is usually done with most application under Debian/testing:
53- kradio - Comfortable Radio Application for KDE 53- kradio - Comfortable Radio Application for KDE
54- radio - ncurses-based radio application 54- radio - ncurses-based radio application
55- mplayer - The Ultimate Movie Player For Linux 55- mplayer - The Ultimate Movie Player For Linux
56- v4l2-ctl - Collection of command line video4linux utilities
57For example, you can use:
58v4l2-ctl -d /dev/radio0 --set-ctrl=volume=10,mute=0 --set-freq=95.21 --all
56 59
57There is also a library libv4l, which can be used. It's going to have a function 60There is also a library libv4l, which can be used. It's going to have a function
58for frequency seeking, either by using hardware functionality as in radio-si470x 61for frequency seeking, either by using hardware functionality as in radio-si470x
@@ -75,8 +78,10 @@ commands. Please adjust the audio devices to your needs (/dev/dsp* and hw:x,x).
75If you just want to test audio (very poor quality): 78If you just want to test audio (very poor quality):
76cat /dev/dsp1 > /dev/dsp 79cat /dev/dsp1 > /dev/dsp
77 80
78If you use OSS try: 81If you use sox + OSS try:
79sox -2 --endian little -r 96000 -t oss /dev/dsp1 -t oss /dev/dsp 82sox -2 --endian little -r 96000 -t oss /dev/dsp1 -t oss /dev/dsp
83or using sox + alsa:
84sox --endian little -c 2 -S -r 96000 -t alsa hw:1 -t alsa -r 96000 hw:0
80 85
81If you use arts try: 86If you use arts try:
82arecord -D hw:1,0 -r96000 -c2 -f S16_LE | artsdsp aplay -B - 87arecord -D hw:1,0 -r96000 -c2 -f S16_LE | artsdsp aplay -B -
diff --git a/Documentation/video4linux/soc-camera.txt b/Documentation/video4linux/soc-camera.txt
index 3f87c7da4ca2..f62fcdbc8b9f 100644
--- a/Documentation/video4linux/soc-camera.txt
+++ b/Documentation/video4linux/soc-camera.txt
@@ -9,32 +9,36 @@ The following terms are used in this document:
9 of connecting to a variety of systems and interfaces, typically uses i2c for 9 of connecting to a variety of systems and interfaces, typically uses i2c for
10 control and configuration, and a parallel or a serial bus for data. 10 control and configuration, and a parallel or a serial bus for data.
11 - camera host - an interface, to which a camera is connected. Typically a 11 - camera host - an interface, to which a camera is connected. Typically a
12 specialised interface, present on many SoCs, e.g., PXA27x and PXA3xx, SuperH, 12 specialised interface, present on many SoCs, e.g. PXA27x and PXA3xx, SuperH,
13 AVR32, i.MX27, i.MX31. 13 AVR32, i.MX27, i.MX31.
14 - camera host bus - a connection between a camera host and a camera. Can be 14 - camera host bus - a connection between a camera host and a camera. Can be
15 parallel or serial, consists of data and control lines, e.g., clock, vertical 15 parallel or serial, consists of data and control lines, e.g. clock, vertical
16 and horizontal synchronization signals. 16 and horizontal synchronization signals.
17 17
18Purpose of the soc-camera subsystem 18Purpose of the soc-camera subsystem
19----------------------------------- 19-----------------------------------
20 20
21The soc-camera subsystem provides a unified API between camera host drivers and 21The soc-camera subsystem initially provided a unified API between camera host
22camera sensor drivers. It implements a V4L2 interface to the user, currently 22drivers and camera sensor drivers. Later the soc-camera sensor API has been
23only the mmap method is supported. 23replaced with the V4L2 standard subdev API. This also made camera driver re-use
24with non-soc-camera hosts possible. The camera host API to the soc-camera core
25has been preserved.
24 26
25This subsystem has been written to connect drivers for System-on-Chip (SoC) 27Soc-camera implements a V4L2 interface to the user, currently only the "mmap"
26video capture interfaces with drivers for CMOS camera sensor chips to enable 28method is supported by host drivers. However, the soc-camera core also provides
27the reuse of sensor drivers with various hosts. The subsystem has been designed 29support for the "read" method.
28to support multiple camera host interfaces and multiple cameras per interface, 30
29although most applications have only one camera sensor. 31The subsystem has been designed to support multiple camera host interfaces and
32multiple cameras per interface, although most applications have only one camera
33sensor.
30 34
31Existing drivers 35Existing drivers
32---------------- 36----------------
33 37
34As of 2.6.27-rc4 there are two host drivers in the mainline: pxa_camera.c for 38As of 3.7 there are seven host drivers in the mainline: atmel-isi.c,
35PXA27x SoCs and sh_mobile_ceu_camera.c for SuperH SoCs, and four sensor drivers: 39mx1_camera.c (broken, scheduled for removal), mx2_camera.c, mx3_camera.c,
36mt9m001.c, mt9m111.c, mt9v022.c and a generic soc_camera_platform.c driver. This 40omap1_camera.c, pxa_camera.c, sh_mobile_ceu_camera.c, and multiple sensor
37list is not supposed to be updated, look for more examples in your tree. 41drivers under drivers/media/i2c/soc_camera/.
38 42
39Camera host API 43Camera host API
40--------------- 44---------------
@@ -45,38 +49,37 @@ soc_camera_host_register(struct soc_camera_host *);
45 49
46function. The host object can be initialized as follows: 50function. The host object can be initialized as follows:
47 51
48static struct soc_camera_host pxa_soc_camera_host = { 52 struct soc_camera_host *ici;
49 .drv_name = PXA_CAM_DRV_NAME, 53 ici->drv_name = DRV_NAME;
50 .ops = &pxa_soc_camera_host_ops, 54 ici->ops = &camera_host_ops;
51}; 55 ici->priv = pcdev;
56 ici->v4l2_dev.dev = &pdev->dev;
57 ici->nr = pdev->id;
52 58
53All camera host methods are passed in a struct soc_camera_host_ops: 59All camera host methods are passed in a struct soc_camera_host_ops:
54 60
55static struct soc_camera_host_ops pxa_soc_camera_host_ops = { 61static struct soc_camera_host_ops camera_host_ops = {
56 .owner = THIS_MODULE, 62 .owner = THIS_MODULE,
57 .add = pxa_camera_add_device, 63 .add = camera_add_device,
58 .remove = pxa_camera_remove_device, 64 .remove = camera_remove_device,
59 .suspend = pxa_camera_suspend, 65 .set_fmt = camera_set_fmt_cap,
60 .resume = pxa_camera_resume, 66 .try_fmt = camera_try_fmt_cap,
61 .set_fmt_cap = pxa_camera_set_fmt_cap, 67 .init_videobuf2 = camera_init_videobuf2,
62 .try_fmt_cap = pxa_camera_try_fmt_cap, 68 .poll = camera_poll,
63 .init_videobuf = pxa_camera_init_videobuf, 69 .querycap = camera_querycap,
64 .reqbufs = pxa_camera_reqbufs, 70 .set_bus_param = camera_set_bus_param,
65 .poll = pxa_camera_poll, 71 /* The rest of host operations are optional */
66 .querycap = pxa_camera_querycap,
67 .try_bus_param = pxa_camera_try_bus_param,
68 .set_bus_param = pxa_camera_set_bus_param,
69}; 72};
70 73
71.add and .remove methods are called when a sensor is attached to or detached 74.add and .remove methods are called when a sensor is attached to or detached
72from the host, apart from performing host-internal tasks they shall also call 75from the host. .set_bus_param is used to configure physical connection
73sensor driver's .init and .release methods respectively. .suspend and .resume 76parameters between the host and the sensor. .init_videobuf2 is called by
74methods implement host's power-management functionality and its their 77soc-camera core when a video-device is opened, the host driver would typically
75responsibility to call respective sensor's methods. .try_bus_param and 78call vb2_queue_init() in this method. Further video-buffer management is
76.set_bus_param are used to negotiate physical connection parameters between the 79implemented completely by the specific camera host driver. If the host driver
77host and the sensor. .init_videobuf is called by soc-camera core when a 80supports non-standard pixel format conversion, it should implement a
78video-device is opened, further video-buffer management is implemented completely 81.get_formats and, possibly, a .put_formats operations. See below for more
79by the specific camera host driver. The rest of the methods are called from 82details about format conversion. The rest of the methods are called from
80respective V4L2 operations. 83respective V4L2 operations.
81 84
82Camera API 85Camera API
@@ -84,37 +87,21 @@ Camera API
84 87
85Sensor drivers can use struct soc_camera_link, typically provided by the 88Sensor drivers can use struct soc_camera_link, typically provided by the
86platform, and used to specify to which camera host bus the sensor is connected, 89platform, and used to specify to which camera host bus the sensor is connected,
87and arbitrarily provide platform .power and .reset methods for the camera. 90and optionally provide platform .power and .reset methods for the camera. This
88soc_camera_device_register() and soc_camera_device_unregister() functions are 91struct is provided to the camera driver via the I2C client device platform data
89used to add a sensor driver to or remove one from the system. The registration 92and can be obtained, using the soc_camera_i2c_to_link() macro. Care should be
90function takes a pointer to struct soc_camera_device as the only parameter. 93taken, when using soc_camera_vdev_to_subdev() and when accessing struct
91This struct can be initialized as follows: 94soc_camera_device, using v4l2_get_subdev_hostdata(): both only work, when
92 95running on an soc-camera host. The actual camera driver operation is implemented
93 /* link to driver operations */ 96using the V4L2 subdev API. Additionally soc-camera camera drivers can use
94 icd->ops = &mt9m001_ops; 97auxiliary soc-camera helper functions like soc_camera_power_on() and
95 /* link to the underlying physical (e.g., i2c) device */ 98soc_camera_power_off(), which switch regulators, provided by the platform and call
96 icd->control = &client->dev; 99board-specific power switching methods. soc_camera_apply_board_flags() takes
97 /* window geometry */ 100camera bus configuration capability flags and applies any board transformations,
98 icd->x_min = 20; 101e.g. signal polarity inversion. soc_mbus_get_fmtdesc() can be used to obtain a
99 icd->y_min = 12; 102pixel format descriptor, corresponding to a certain media-bus pixel format code.
100 icd->x_current = 20; 103soc_camera_limit_side() can be used to restrict beginning and length of a frame
101 icd->y_current = 12; 104side, based on camera capabilities.
102 icd->width_min = 48;
103 icd->width_max = 1280;
104 icd->height_min = 32;
105 icd->height_max = 1024;
106 icd->y_skip_top = 1;
107 /* camera bus ID, typically obtained from platform data */
108 icd->iface = icl->bus_id;
109
110struct soc_camera_ops provides .probe and .remove methods, which are called by
111the soc-camera core, when a camera is matched against or removed from a camera
112host bus, .init, .release, .suspend, and .resume are called from the camera host
113driver as discussed above. Other members of this struct provide respective V4L2
114functionality.
115
116struct soc_camera_device also links to an array of struct soc_camera_data_format,
117listing pixel formats, supported by the camera.
118 105
119VIDIOC_S_CROP and VIDIOC_S_FMT behaviour 106VIDIOC_S_CROP and VIDIOC_S_FMT behaviour
120---------------------------------------- 107----------------------------------------
@@ -153,8 +140,25 @@ implemented.
153User window geometry is kept in .user_width and .user_height fields in struct 140User window geometry is kept in .user_width and .user_height fields in struct
154soc_camera_device and used by the soc-camera core and host drivers. The core 141soc_camera_device and used by the soc-camera core and host drivers. The core
155updates these fields upon successful completion of a .s_fmt() call, but if these 142updates these fields upon successful completion of a .s_fmt() call, but if these
156fields change elsewhere, e.g., during .s_crop() processing, the host driver is 143fields change elsewhere, e.g. during .s_crop() processing, the host driver is
157responsible for updating them. 144responsible for updating them.
158 145
146Format conversion
147-----------------
148
149V4L2 distinguishes between pixel formats, as they are stored in memory, and as
150they are transferred over a media bus. Soc-camera provides support to
151conveniently manage these formats. A table of standard transformations is
152maintained by soc-camera core, which describes, what FOURCC pixel format will
153be obtained, if a media-bus pixel format is stored in memory according to
154certain rules. E.g. if V4L2_MBUS_FMT_YUYV8_2X8 data is sampled with 8 bits per
155sample and stored in memory in the little-endian order with no gaps between
156bytes, data in memory will represent the V4L2_PIX_FMT_YUYV FOURCC format. These
157standard transformations will be used by soc-camera or by camera host drivers to
158configure camera drivers to produce the FOURCC format, requested by the user,
159using the VIDIOC_S_FMT ioctl(). Apart from those standard format conversions,
160host drivers can also provide their own conversion rules by implementing a
161.get_formats and, if required, a .put_formats methods.
162
159-- 163--
160Author: Guennadi Liakhovetski <g.liakhovetski@gmx.de> 164Author: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
diff --git a/Documentation/video4linux/stv680.txt b/Documentation/video4linux/stv680.txt
deleted file mode 100644
index e3de33645308..000000000000
--- a/Documentation/video4linux/stv680.txt
+++ /dev/null
@@ -1,53 +0,0 @@
1Linux driver for STV0680 based USB cameras
2
3Copyright, 2001, Kevin Sisson
4
5
6INTRODUCTION:
7
8STMicroelectronics produces the STV0680B chip, which comes in two
9types, -001 and -003. The -003 version allows the recording and downloading
10of sound clips from the camera, and allows a flash attachment. Otherwise,
11it uses the same commands as the -001 version. Both versions support a
12variety of SDRAM sizes and sensors, allowing for a maximum of 26 VGA or 20
13CIF pictures. The STV0680 supports either a serial or a usb interface, and
14video is possible through the usb interface.
15
16The following cameras are known to work with this driver, although any
17camera with Vendor/Product codes of 0553/0202 should work:
18
19Aiptek Pencam (various models)
20Nisis QuickPix 2
21Radio Shack 'Kid's digital camera' (#60-1207)
22At least one Trust Spycam model
23Several other European brand models
24
25WHAT YOU NEED:
26
27- USB support
28- VIDEO4LINUX support
29
30More information about USB support for linux can be found at:
31http://www.linux-usb.org
32
33
34MODULE OPTIONS:
35
36When the driver is compiled as a module, you can set a "swapRGB=1"
37option, if necessary, for those applications that require it
38(such as xawtv). However, the driver should detect and set this
39automatically, so this option should not normally be used.
40
41
42KNOWN PROBLEMS:
43
44The driver seems to work better with the usb-ohci than the usb-uhci host
45controller driver.
46
47HELP:
48
49The latest info on this driver can be found at:
50http://personal.clt.bellsouth.net/~kjsisson or at
51http://stv0680-usb.sourceforge.net
52
53Any questions to me can be send to: kjsisson@bellsouth.net
diff --git a/Documentation/video4linux/v4l2-controls.txt b/Documentation/video4linux/v4l2-controls.txt
index cfe52c798d74..676f87366025 100644
--- a/Documentation/video4linux/v4l2-controls.txt
+++ b/Documentation/video4linux/v4l2-controls.txt
@@ -715,14 +715,20 @@ a control of this type whenever the first control belonging to a new control
715class is added. 715class is added.
716 716
717 717
718Proposals for Extensions 718Adding Notify Callbacks
719======================== 719=======================
720
721Sometimes the platform or bridge driver needs to be notified when a control
722from a sub-device driver changes. You can set a notify callback by calling
723this function:
720 724
721Some ideas for future extensions to the spec: 725void v4l2_ctrl_notify(struct v4l2_ctrl *ctrl,
726 void (*notify)(struct v4l2_ctrl *ctrl, void *priv), void *priv);
722 727
7231) Add a V4L2_CTRL_FLAG_HEX to have values shown as hexadecimal instead of 728Whenever the give control changes value the notify callback will be called
724decimal. Useful for e.g. video_mute_yuv. 729with a pointer to the control and the priv pointer that was passed with
730v4l2_ctrl_notify. Note that the control's handler lock is held when the
731notify function is called.
725 732
7262) It is possible to mark in the controls array which controls have been 733There can be only one notify function per control handler. Any attempt
727successfully written and which failed by for example adding a bit to the 734to set another notify function will cause a WARN_ON.
728control ID. Not sure if it is worth the effort, though.
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt
index 32bfe926e8d7..a300b283a1a0 100644
--- a/Documentation/video4linux/v4l2-framework.txt
+++ b/Documentation/video4linux/v4l2-framework.txt
@@ -68,8 +68,7 @@ Structure of the framework
68The framework closely resembles the driver structure: it has a v4l2_device 68The framework closely resembles the driver structure: it has a v4l2_device
69struct for the device instance data, a v4l2_subdev struct to refer to 69struct for the device instance data, a v4l2_subdev struct to refer to
70sub-device instances, the video_device struct stores V4L2 device node data 70sub-device instances, the video_device struct stores V4L2 device node data
71and in the future a v4l2_fh struct will keep track of filehandle instances 71and the v4l2_fh struct keeps track of filehandle instances.
72(this is not yet implemented).
73 72
74The V4L2 framework also optionally integrates with the media framework. If a 73The V4L2 framework also optionally integrates with the media framework. If a
75driver sets the struct v4l2_device mdev field, sub-devices and video nodes 74driver sets the struct v4l2_device mdev field, sub-devices and video nodes
@@ -174,8 +173,7 @@ The recommended approach is as follows:
174 173
175static atomic_t drv_instance = ATOMIC_INIT(0); 174static atomic_t drv_instance = ATOMIC_INIT(0);
176 175
177static int __devinit drv_probe(struct pci_dev *pdev, 176static int drv_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
178 const struct pci_device_id *pci_id)
179{ 177{
180 ... 178 ...
181 state->instance = atomic_inc_return(&drv_instance) - 1; 179 state->instance = atomic_inc_return(&drv_instance) - 1;
diff --git a/Documentation/video4linux/w9968cf.txt b/Documentation/video4linux/w9968cf.txt
deleted file mode 100644
index 9649450f3b90..000000000000
--- a/Documentation/video4linux/w9968cf.txt
+++ /dev/null
@@ -1,458 +0,0 @@
1
2 W996[87]CF JPEG USB Dual Mode Camera Chip
3 Driver for Linux 2.6 (basic version)
4 =========================================
5
6 - Documentation -
7
8
9Index
10=====
111. Copyright
122. Disclaimer
133. License
144. Overview
155. Supported devices
166. Module dependencies
177. Module loading
188. Module parameters
199. Contact information
2010. Credits
21
22
231. Copyright
24============
25Copyright (C) 2002-2004 by Luca Risolia <luca.risolia@studio.unibo.it>
26
27
282. Disclaimer
29=============
30Winbond is a trademark of Winbond Electronics Corporation.
31This software is not sponsored or developed by Winbond.
32
33
343. License
35==========
36This program is free software; you can redistribute it and/or modify
37it under the terms of the GNU General Public License as published by
38the Free Software Foundation; either version 2 of the License, or
39(at your option) any later version.
40
41This program is distributed in the hope that it will be useful,
42but WITHOUT ANY WARRANTY; without even the implied warranty of
43MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
44GNU General Public License for more details.
45
46You should have received a copy of the GNU General Public License
47along with this program; if not, write to the Free Software
48Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
49
50
514. Overview
52===========
53This driver supports the video streaming capabilities of the devices mounting
54Winbond W9967CF and Winbond W9968CF JPEG USB Dual Mode Camera Chips. OV681
55based cameras should be supported as well.
56
57The driver is divided into two modules: the basic one, "w9968cf", is needed for
58the supported devices to work; the second one, "w9968cf-vpp", is an optional
59module, which provides some useful video post-processing functions like video
60decoding, up-scaling and colour conversions.
61
62Note that the official kernels do neither include nor support the second
63module for performance purposes. Therefore, it is always recommended to
64download and install the latest and complete release of the driver,
65replacing the existing one, if present.
66
67The latest and full-featured version of the W996[87]CF driver can be found at:
68http://www.linux-projects.org. Please refer to the documentation included in
69that package, if you are going to use it.
70
71Up to 32 cameras can be handled at the same time. They can be connected and
72disconnected from the host many times without turning off the computer, if
73your system supports the hotplug facility.
74
75To change the default settings for each camera, many parameters can be passed
76through command line when the module is loaded into memory.
77
78The driver relies on the Video4Linux, USB and I2C core modules. It has been
79designed to run properly on SMP systems as well. An additional module,
80"ovcamchip", is mandatory; it provides support for some OmniVision image
81sensors connected to the W996[87]CF chips; if found in the system, the module
82will be automatically loaded by default (provided that the kernel has been
83compiled with the automatic module loading option).
84
85
865. Supported devices
87====================
88At the moment, known W996[87]CF and OV681 based devices are:
89- Aroma Digi Pen VGA Dual Mode ADG-5000 (unknown image sensor)
90- AVerMedia AVerTV USB (SAA7111A, Philips FI1216Mk2 tuner, PT2313L audio chip)
91- Creative Labs Video Blaster WebCam Go (OmniVision OV7610 sensor)
92- Creative Labs Video Blaster WebCam Go Plus (OmniVision OV7620 sensor)
93- Lebon LDC-035A (unknown image sensor)
94- Ezonics EZ-802 EZMega Cam (OmniVision OV8610C sensor)
95- OmniVision OV8610-EDE (OmniVision OV8610 sensor)
96- OPCOM Digi Pen VGA Dual Mode Pen Camera (unknown image sensor)
97- Pretec Digi Pen-II (OmniVision OV7620 sensor)
98- Pretec DigiPen-480 (OmniVision OV8610 sensor)
99
100If you know any other W996[87]CF or OV681 based cameras, please contact me.
101
102The list above does not imply that all those devices work with this driver: up
103until now only webcams that have an image sensor supported by the "ovcamchip"
104module work. Kernel messages will always tell you whether this is case.
105
106Possible external microcontrollers of those webcams are not supported: this
107means that still images cannot be downloaded from the device memory.
108
109Furthermore, it's worth to note that I was only able to run tests on my
110"Creative Labs Video Blaster WebCam Go". Donations of other models, for
111additional testing and full support, would be much appreciated.
112
113
1146. Module dependencies
115======================
116For it to work properly, the driver needs kernel support for Video4Linux, USB
117and I2C, and the "ovcamchip" module for the image sensor. Make sure you are not
118actually using any external "ovcamchip" module, given that the W996[87]CF
119driver depends on the version of the module present in the official kernels.
120
121The following options of the kernel configuration file must be enabled and
122corresponding modules must be compiled:
123
124 # Multimedia devices
125 #
126 CONFIG_VIDEO_DEV=m
127
128 # I2C support
129 #
130 CONFIG_I2C=m
131
132The I2C core module can be compiled statically in the kernel as well.
133
134 # OmniVision Camera Chip support
135 #
136 CONFIG_VIDEO_OVCAMCHIP=m
137
138 # USB support
139 #
140 CONFIG_USB=m
141
142In addition, depending on the hardware being used, only one of the modules
143below is necessary:
144
145 # USB Host Controller Drivers
146 #
147 CONFIG_USB_EHCI_HCD=m
148 CONFIG_USB_UHCI_HCD=m
149 CONFIG_USB_OHCI_HCD=m
150
151And finally:
152
153 # USB Multimedia devices
154 #
155 CONFIG_USB_W9968CF=m
156
157
1587. Module loading
159=================
160To use the driver, it is necessary to load the "w9968cf" module into memory
161after every other module required.
162
163Loading can be done this way, from root:
164
165 [root@localhost home]# modprobe usbcore
166 [root@localhost home]# modprobe i2c-core
167 [root@localhost home]# modprobe videodev
168 [root@localhost home]# modprobe w9968cf
169
170At this point the pertinent devices should be recognized: "dmesg" can be used
171to analyze kernel messages:
172
173 [user@localhost home]$ dmesg
174
175There are a lot of parameters the module can use to change the default
176settings for each device. To list every possible parameter with a brief
177explanation about them and which syntax to use, it is recommended to run the
178"modinfo" command:
179
180 [root@locahost home]# modinfo w9968cf
181
182
1838. Module parameters
184====================
185Module parameters are listed below:
186-------------------------------------------------------------------------------
187Name: ovmod_load
188Type: bool
189Syntax: <0|1>
190Description: Automatic 'ovcamchip' module loading: 0 disabled, 1 enabled.
191 If enabled, 'insmod' searches for the required 'ovcamchip'
192 module in the system, according to its configuration, and
193 loads that module automatically. This action is performed as
194 once soon as the 'w9968cf' module is loaded into memory.
195Default: 1
196-------------------------------------------------------------------------------
197Name: simcams
198Type: int
199Syntax: <n>
200Description: Number of cameras allowed to stream simultaneously.
201 n may vary from 0 to 32.
202Default: 32
203-------------------------------------------------------------------------------
204Name: video_nr
205Type: int array (min = 0, max = 32)
206Syntax: <-1|n[,...]>
207Description: Specify V4L minor mode number.
208 -1 = use next available
209 n = use minor number n
210 You can specify up to 32 cameras this way.
211 For example:
212 video_nr=-1,2,-1 would assign minor number 2 to the second
213 recognized camera and use auto for the first one and for every
214 other camera.
215Default: -1
216-------------------------------------------------------------------------------
217Name: packet_size
218Type: int array (min = 0, max = 32)
219Syntax: <n[,...]>
220Description: Specify the maximum data payload size in bytes for alternate
221 settings, for each device. n is scaled between 63 and 1023.
222Default: 1023
223-------------------------------------------------------------------------------
224Name: max_buffers
225Type: int array (min = 0, max = 32)
226Syntax: <n[,...]>
227Description: For advanced users.
228 Specify the maximum number of video frame buffers to allocate
229 for each device, from 2 to 32.
230Default: 2
231-------------------------------------------------------------------------------
232Name: double_buffer
233Type: bool array (min = 0, max = 32)
234Syntax: <0|1[,...]>
235Description: Hardware double buffering: 0 disabled, 1 enabled.
236 It should be enabled if you want smooth video output: if you
237 obtain out of sync. video, disable it, or try to
238 decrease the 'clockdiv' module parameter value.
239Default: 1 for every device.
240-------------------------------------------------------------------------------
241Name: clamping
242Type: bool array (min = 0, max = 32)
243Syntax: <0|1[,...]>
244Description: Video data clamping: 0 disabled, 1 enabled.
245Default: 0 for every device.
246-------------------------------------------------------------------------------
247Name: filter_type
248Type: int array (min = 0, max = 32)
249Syntax: <0|1|2[,...]>
250Description: Video filter type.
251 0 none, 1 (1-2-1) 3-tap filter, 2 (2-3-6-3-2) 5-tap filter.
252 The filter is used to reduce noise and aliasing artifacts
253 produced by the CCD or CMOS image sensor.
254Default: 0 for every device.
255-------------------------------------------------------------------------------
256Name: largeview
257Type: bool array (min = 0, max = 32)
258Syntax: <0|1[,...]>
259Description: Large view: 0 disabled, 1 enabled.
260Default: 1 for every device.
261-------------------------------------------------------------------------------
262Name: upscaling
263Type: bool array (min = 0, max = 32)
264Syntax: <0|1[,...]>
265Description: Software scaling (for non-compressed video only):
266 0 disabled, 1 enabled.
267 Disable it if you have a slow CPU or you don't have enough
268 memory.
269Default: 0 for every device.
270Note: If 'w9968cf-vpp' is not present, this parameter is set to 0.
271-------------------------------------------------------------------------------
272Name: decompression
273Type: int array (min = 0, max = 32)
274Syntax: <0|1|2[,...]>
275Description: Software video decompression:
276 0 = disables decompression
277 (doesn't allow formats needing decompression).
278 1 = forces decompression
279 (allows formats needing decompression only).
280 2 = allows any permitted formats.
281 Formats supporting (de)compressed video are YUV422P and
282 YUV420P/YUV420 in any resolutions where width and height are
283 multiples of 16.
284Default: 2 for every device.
285Note: If 'w9968cf-vpp' is not present, forcing decompression is not
286 allowed; in this case this parameter is set to 2.
287-------------------------------------------------------------------------------
288Name: force_palette
289Type: int array (min = 0, max = 32)
290Syntax: <0|9|10|13|15|8|7|1|6|3|4|5[,...]>
291Description: Force picture palette.
292 In order:
293 0 = Off - allows any of the following formats:
294 9 = UYVY 16 bpp - Original video, compression disabled
295 10 = YUV420 12 bpp - Original video, compression enabled
296 13 = YUV422P 16 bpp - Original video, compression enabled
297 15 = YUV420P 12 bpp - Original video, compression enabled
298 8 = YUVY 16 bpp - Software conversion from UYVY
299 7 = YUV422 16 bpp - Software conversion from UYVY
300 1 = GREY 8 bpp - Software conversion from UYVY
301 6 = RGB555 16 bpp - Software conversion from UYVY
302 3 = RGB565 16 bpp - Software conversion from UYVY
303 4 = RGB24 24 bpp - Software conversion from UYVY
304 5 = RGB32 32 bpp - Software conversion from UYVY
305 When not 0, this parameter will override 'decompression'.
306Default: 0 for every device. Initial palette is 9 (UYVY).
307Note: If 'w9968cf-vpp' is not present, this parameter is set to 9.
308-------------------------------------------------------------------------------
309Name: force_rgb
310Type: bool array (min = 0, max = 32)
311Syntax: <0|1[,...]>
312Description: Read RGB video data instead of BGR:
313 1 = use RGB component ordering.
314 0 = use BGR component ordering.
315 This parameter has effect when using RGBX palettes only.
316Default: 0 for every device.
317-------------------------------------------------------------------------------
318Name: autobright
319Type: bool array (min = 0, max = 32)
320Syntax: <0|1[,...]>
321Description: Image sensor automatically changes brightness:
322 0 = no, 1 = yes
323Default: 0 for every device.
324-------------------------------------------------------------------------------
325Name: autoexp
326Type: bool array (min = 0, max = 32)
327Syntax: <0|1[,...]>
328Description: Image sensor automatically changes exposure:
329 0 = no, 1 = yes
330Default: 1 for every device.
331-------------------------------------------------------------------------------
332Name: lightfreq
333Type: int array (min = 0, max = 32)
334Syntax: <50|60[,...]>
335Description: Light frequency in Hz:
336 50 for European and Asian lighting, 60 for American lighting.
337Default: 50 for every device.
338-------------------------------------------------------------------------------
339Name: bandingfilter
340Type: bool array (min = 0, max = 32)
341Syntax: <0|1[,...]>
342Description: Banding filter to reduce effects of fluorescent
343 lighting:
344 0 disabled, 1 enabled.
345 This filter tries to reduce the pattern of horizontal
346 light/dark bands caused by some (usually fluorescent) lighting.
347Default: 0 for every device.
348-------------------------------------------------------------------------------
349Name: clockdiv
350Type: int array (min = 0, max = 32)
351Syntax: <-1|n[,...]>
352Description: Force pixel clock divisor to a specific value (for experts):
353 n may vary from 0 to 127.
354 -1 for automatic value.
355 See also the 'double_buffer' module parameter.
356Default: -1 for every device.
357-------------------------------------------------------------------------------
358Name: backlight
359Type: bool array (min = 0, max = 32)
360Syntax: <0|1[,...]>
361Description: Objects are lit from behind:
362 0 = no, 1 = yes
363Default: 0 for every device.
364-------------------------------------------------------------------------------
365Name: mirror
366Type: bool array (min = 0, max = 32)
367Syntax: <0|1[,...]>
368Description: Reverse image horizontally:
369 0 = no, 1 = yes
370Default: 0 for every device.
371-------------------------------------------------------------------------------
372Name: monochrome
373Type: bool array (min = 0, max = 32)
374Syntax: <0|1[,...]>
375Description: The image sensor is monochrome:
376 0 = no, 1 = yes
377Default: 0 for every device.
378-------------------------------------------------------------------------------
379Name: brightness
380Type: long array (min = 0, max = 32)
381Syntax: <n[,...]>
382Description: Set picture brightness (0-65535).
383 This parameter has no effect if 'autobright' is enabled.
384Default: 31000 for every device.
385-------------------------------------------------------------------------------
386Name: hue
387Type: long array (min = 0, max = 32)
388Syntax: <n[,...]>
389Description: Set picture hue (0-65535).
390Default: 32768 for every device.
391-------------------------------------------------------------------------------
392Name: colour
393Type: long array (min = 0, max = 32)
394Syntax: <n[,...]>
395Description: Set picture saturation (0-65535).
396Default: 32768 for every device.
397-------------------------------------------------------------------------------
398Name: contrast
399Type: long array (min = 0, max = 32)
400Syntax: <n[,...]>
401Description: Set picture contrast (0-65535).
402Default: 50000 for every device.
403-------------------------------------------------------------------------------
404Name: whiteness
405Type: long array (min = 0, max = 32)
406Syntax: <n[,...]>
407Description: Set picture whiteness (0-65535).
408Default: 32768 for every device.
409-------------------------------------------------------------------------------
410Name: debug
411Type: int
412Syntax: <n>
413Description: Debugging information level, from 0 to 6:
414 0 = none (use carefully)
415 1 = critical errors
416 2 = significant information
417 3 = configuration or general messages
418 4 = warnings
419 5 = called functions
420 6 = function internals
421 Level 5 and 6 are useful for testing only, when only one
422 device is used.
423Default: 2
424-------------------------------------------------------------------------------
425Name: specific_debug
426Type: bool
427Syntax: <0|1>
428Description: Enable or disable specific debugging messages:
429 0 = print messages concerning every level <= 'debug' level.
430 1 = print messages concerning the level indicated by 'debug'.
431Default: 0
432-------------------------------------------------------------------------------
433
434
4359. Contact information
436======================
437I may be contacted by e-mail at <luca.risolia@studio.unibo.it>.
438
439I can accept GPG/PGP encrypted e-mail. My GPG key ID is 'FCE635A4'.
440My public 1024-bit key should be available at your keyserver; the fingerprint
441is: '88E8 F32F 7244 68BA 3958 5D40 99DA 5D2A FCE6 35A4'.
442
443
44410. Credits
445==========
446The development would not have proceed much further without having looked at
447the source code of other drivers and without the help of several persons; in
448particular:
449
450- the I2C interface to kernel and high-level image sensor control routines have
451 been taken from the OV511 driver by Mark McClelland;
452
453- memory management code has been copied from the bttv driver by Ralph Metzler,
454 Marcus Metzler and Gerd Knorr;
455
456- the low-level I2C read function has been written by Frederic Jouault;
457
458- the low-level I2C fast write function has been written by Piotr Czerczak.
diff --git a/Documentation/video4linux/zc0301.txt b/Documentation/video4linux/zc0301.txt
deleted file mode 100644
index b41c83cf09f4..000000000000
--- a/Documentation/video4linux/zc0301.txt
+++ /dev/null
@@ -1,270 +0,0 @@
1
2 ZC0301 and ZC0301P Image Processor and Control Chip
3 Driver for Linux
4 ===================================================
5
6 - Documentation -
7
8
9Index
10=====
111. Copyright
122. Disclaimer
133. License
144. Overview and features
155. Module dependencies
166. Module loading
177. Module parameters
188. Supported devices
199. Notes for V4L2 application developers
2010. Contact information
2111. Credits
22
23
241. Copyright
25============
26Copyright (C) 2006-2007 by Luca Risolia <luca.risolia@studio.unibo.it>
27
28
292. Disclaimer
30=============
31This software is not developed or sponsored by Z-Star Microelectronics Corp.
32Trademarks are property of their respective owner.
33
34
353. License
36==========
37This program is free software; you can redistribute it and/or modify
38it under the terms of the GNU General Public License as published by
39the Free Software Foundation; either version 2 of the License, or
40(at your option) any later version.
41
42This program is distributed in the hope that it will be useful,
43but WITHOUT ANY WARRANTY; without even the implied warranty of
44MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45GNU General Public License for more details.
46
47You should have received a copy of the GNU General Public License
48along with this program; if not, write to the Free Software
49Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
50
51
524. Overview and features
53========================
54This driver supports the video interface of the devices mounting the ZC0301 or
55ZC0301P Image Processors and Control Chips.
56
57The driver relies on the Video4Linux2 and USB core modules. It has been
58designed to run properly on SMP systems as well.
59
60The latest version of the ZC0301[P] driver can be found at the following URL:
61http://www.linux-projects.org/
62
63Some of the features of the driver are:
64
65- full compliance with the Video4Linux2 API (see also "Notes for V4L2
66 application developers" paragraph);
67- available mmap or read/poll methods for video streaming through isochronous
68 data transfers;
69- automatic detection of image sensor;
70- video format is standard JPEG;
71- dynamic driver control thanks to various module parameters (see "Module
72 parameters" paragraph);
73- up to 64 cameras can be handled at the same time; they can be connected and
74 disconnected from the host many times without turning off the computer, if
75 the system supports hotplugging;
76
77
785. Module dependencies
79======================
80For it to work properly, the driver needs kernel support for Video4Linux and
81USB.
82
83The following options of the kernel configuration file must be enabled and
84corresponding modules must be compiled:
85
86 # Multimedia devices
87 #
88 CONFIG_VIDEO_DEV=m
89
90 # USB support
91 #
92 CONFIG_USB=m
93
94In addition, depending on the hardware being used, the modules below are
95necessary:
96
97 # USB Host Controller Drivers
98 #
99 CONFIG_USB_EHCI_HCD=m
100 CONFIG_USB_UHCI_HCD=m
101 CONFIG_USB_OHCI_HCD=m
102
103The ZC0301 controller also provides a built-in microphone interface. It is
104supported by the USB Audio driver thanks to the ALSA API:
105
106 # Sound
107 #
108 CONFIG_SOUND=y
109
110 # Advanced Linux Sound Architecture
111 #
112 CONFIG_SND=m
113
114 # USB devices
115 #
116 CONFIG_SND_USB_AUDIO=m
117
118And finally:
119
120 # V4L USB devices
121 #
122 CONFIG_USB_ZC0301=m
123
124
1256. Module loading
126=================
127To use the driver, it is necessary to load the "zc0301" module into memory
128after every other module required: "videodev", "v4l2_common", "compat_ioctl32",
129"usbcore" and, depending on the USB host controller you have, "ehci-hcd",
130"uhci-hcd" or "ohci-hcd".
131
132Loading can be done as shown below:
133
134 [root@localhost home]# modprobe zc0301
135
136At this point the devices should be recognized. You can invoke "dmesg" to
137analyze kernel messages and verify that the loading process has gone well:
138
139 [user@localhost home]$ dmesg
140
141
1427. Module parameters
143====================
144Module parameters are listed below:
145-------------------------------------------------------------------------------
146Name: video_nr
147Type: short array (min = 0, max = 64)
148Syntax: <-1|n[,...]>
149Description: Specify V4L2 minor mode number:
150 -1 = use next available
151 n = use minor number n
152 You can specify up to 64 cameras this way.
153 For example:
154 video_nr=-1,2,-1 would assign minor number 2 to the second
155 registered camera and use auto for the first one and for every
156 other camera.
157Default: -1
158-------------------------------------------------------------------------------
159Name: force_munmap
160Type: bool array (min = 0, max = 64)
161Syntax: <0|1[,...]>
162Description: Force the application to unmap previously mapped buffer memory
163 before calling any VIDIOC_S_CROP or VIDIOC_S_FMT ioctl's. Not
164 all the applications support this feature. This parameter is
165 specific for each detected camera.
166 0 = do not force memory unmapping
167 1 = force memory unmapping (save memory)
168Default: 0
169-------------------------------------------------------------------------------
170Name: frame_timeout
171Type: uint array (min = 0, max = 64)
172Syntax: <n[,...]>
173Description: Timeout for a video frame in seconds. This parameter is
174 specific for each detected camera. This parameter can be
175 changed at runtime thanks to the /sys filesystem interface.
176Default: 2
177-------------------------------------------------------------------------------
178Name: debug
179Type: ushort
180Syntax: <n>
181Description: Debugging information level, from 0 to 3:
182 0 = none (use carefully)
183 1 = critical errors
184 2 = significant information
185 3 = more verbose messages
186 Level 3 is useful for testing only, when only one device
187 is used at the same time. It also shows some information
188 about the hardware being detected. This module parameter can be
189 changed at runtime thanks to the /sys filesystem interface.
190Default: 2
191-------------------------------------------------------------------------------
192
193
1948. Supported devices
195====================
196None of the names of the companies as well as their products will be mentioned
197here. They have never collaborated with the author, so no advertising.
198
199From the point of view of a driver, what unambiguously identify a device are
200its vendor and product USB identifiers. Below is a list of known identifiers of
201devices mounting the ZC0301 Image Processor and Control Chips:
202
203Vendor ID Product ID
204--------- ----------
2050x041e 0x4017
2060x041e 0x401c
2070x041e 0x401e
2080x041e 0x401f
2090x041e 0x4022
2100x041e 0x4034
2110x041e 0x4035
2120x041e 0x4036
2130x041e 0x403a
2140x0458 0x7007
2150x0458 0x700c
2160x0458 0x700f
2170x046d 0x08ae
2180x055f 0xd003
2190x055f 0xd004
2200x0ac8 0x0301
2210x0ac8 0x301b
2220x0ac8 0x303b
2230x10fd 0x0128
2240x10fd 0x8050
2250x10fd 0x804e
226
227The list above does not imply that all those devices work with this driver: up
228until now only the ones that mount the following image sensors are supported;
229kernel messages will always tell you whether this is the case:
230
231Model Manufacturer
232----- ------------
233PAS202BCB PixArt Imaging, Inc.
234PB-0330 Photobit Corporation
235
236
2379. Notes for V4L2 application developers
238========================================
239This driver follows the V4L2 API specifications. In particular, it enforces two
240rules:
241
242- exactly one I/O method, either "mmap" or "read", is associated with each
243file descriptor. Once it is selected, the application must close and reopen the
244device to switch to the other I/O method;
245
246- although it is not mandatory, previously mapped buffer memory should always
247be unmapped before calling any "VIDIOC_S_CROP" or "VIDIOC_S_FMT" ioctl's.
248The same number of buffers as before will be allocated again to match the size
249of the new video frames, so you have to map the buffers again before any I/O
250attempts on them.
251
252
25310. Contact information
254=======================
255The author may be contacted by e-mail at <luca.risolia@studio.unibo.it>.
256
257GPG/PGP encrypted e-mail's are accepted. The GPG key ID of the author is
258'FCE635A4'; the public 1024-bit key should be available at any keyserver;
259the fingerprint is: '88E8 F32F 7244 68BA 3958 5D40 99DA 5D2A FCE6 35A4'.
260
261
26211. Credits
263===========
264- Information about the chip internals needed to enable the I2C protocol have
265 been taken from the documentation of the ZC030x Video4Linux1 driver written
266 by Andrew Birkett <andy@nobugs.org>;
267- The initialization values of the ZC0301 controller connected to the PAS202BCB
268 and PB-0330 image sensors have been taken from the SPCA5XX driver maintained
269 by Michel Xhaard <mxhaard@magic.fr>;
270- Stanislav Lechev donated one camera.
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index f6ec3a92e621..119358dfb742 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -219,19 +219,6 @@ allocation of vcpu ids. For example, if userspace wants
219single-threaded guest vcpus, it should make all vcpu ids be a multiple 219single-threaded guest vcpus, it should make all vcpu ids be a multiple
220of the number of vcpus per vcore. 220of the number of vcpus per vcore.
221 221
222On powerpc using book3s_hv mode, the vcpus are mapped onto virtual
223threads in one or more virtual CPU cores. (This is because the
224hardware requires all the hardware threads in a CPU core to be in the
225same partition.) The KVM_CAP_PPC_SMT capability indicates the number
226of vcpus per virtual core (vcore). The vcore id is obtained by
227dividing the vcpu id by the number of vcpus per vcore. The vcpus in a
228given vcore will always be in the same physical core as each other
229(though that might be a different physical core from time to time).
230Userspace can control the threading (SMT) mode of the guest by its
231allocation of vcpu ids. For example, if userspace wants
232single-threaded guest vcpus, it should make all vcpu ids be a multiple
233of the number of vcpus per vcore.
234
235For virtual cpus that have been created with S390 user controlled virtual 222For virtual cpus that have been created with S390 user controlled virtual
236machines, the resulting vcpu fd can be memory mapped at page offset 223machines, the resulting vcpu fd can be memory mapped at page offset
237KVM_S390_SIE_PAGE_OFFSET in order to obtain a memory map of the virtual 224KVM_S390_SIE_PAGE_OFFSET in order to obtain a memory map of the virtual
@@ -293,7 +280,7 @@ kvm_run' (see below).
2934.11 KVM_GET_REGS 2804.11 KVM_GET_REGS
294 281
295Capability: basic 282Capability: basic
296Architectures: all 283Architectures: all except ARM
297Type: vcpu ioctl 284Type: vcpu ioctl
298Parameters: struct kvm_regs (out) 285Parameters: struct kvm_regs (out)
299Returns: 0 on success, -1 on error 286Returns: 0 on success, -1 on error
@@ -314,7 +301,7 @@ struct kvm_regs {
3144.12 KVM_SET_REGS 3014.12 KVM_SET_REGS
315 302
316Capability: basic 303Capability: basic
317Architectures: all 304Architectures: all except ARM
318Type: vcpu ioctl 305Type: vcpu ioctl
319Parameters: struct kvm_regs (in) 306Parameters: struct kvm_regs (in)
320Returns: 0 on success, -1 on error 307Returns: 0 on success, -1 on error
@@ -345,7 +332,7 @@ struct kvm_sregs {
345 __u64 interrupt_bitmap[(KVM_NR_INTERRUPTS + 63) / 64]; 332 __u64 interrupt_bitmap[(KVM_NR_INTERRUPTS + 63) / 64];
346}; 333};
347 334
348/* ppc -- see arch/powerpc/include/asm/kvm.h */ 335/* ppc -- see arch/powerpc/include/uapi/asm/kvm.h */
349 336
350interrupt_bitmap is a bitmap of pending external interrupts. At most 337interrupt_bitmap is a bitmap of pending external interrupts. At most
351one bit may be set. This interrupt has been acknowledged by the APIC 338one bit may be set. This interrupt has been acknowledged by the APIC
@@ -600,7 +587,7 @@ struct kvm_fpu {
6004.24 KVM_CREATE_IRQCHIP 5874.24 KVM_CREATE_IRQCHIP
601 588
602Capability: KVM_CAP_IRQCHIP 589Capability: KVM_CAP_IRQCHIP
603Architectures: x86, ia64 590Architectures: x86, ia64, ARM
604Type: vm ioctl 591Type: vm ioctl
605Parameters: none 592Parameters: none
606Returns: 0 on success, -1 on error 593Returns: 0 on success, -1 on error
@@ -608,21 +595,39 @@ Returns: 0 on success, -1 on error
608Creates an interrupt controller model in the kernel. On x86, creates a virtual 595Creates an interrupt controller model in the kernel. On x86, creates a virtual
609ioapic, a virtual PIC (two PICs, nested), and sets up future vcpus to have a 596ioapic, a virtual PIC (two PICs, nested), and sets up future vcpus to have a
610local APIC. IRQ routing for GSIs 0-15 is set to both PIC and IOAPIC; GSI 16-23 597local APIC. IRQ routing for GSIs 0-15 is set to both PIC and IOAPIC; GSI 16-23
611only go to the IOAPIC. On ia64, a IOSAPIC is created. 598only go to the IOAPIC. On ia64, a IOSAPIC is created. On ARM, a GIC is
599created.
612 600
613 601
6144.25 KVM_IRQ_LINE 6024.25 KVM_IRQ_LINE
615 603
616Capability: KVM_CAP_IRQCHIP 604Capability: KVM_CAP_IRQCHIP
617Architectures: x86, ia64 605Architectures: x86, ia64, arm
618Type: vm ioctl 606Type: vm ioctl
619Parameters: struct kvm_irq_level 607Parameters: struct kvm_irq_level
620Returns: 0 on success, -1 on error 608Returns: 0 on success, -1 on error
621 609
622Sets the level of a GSI input to the interrupt controller model in the kernel. 610Sets the level of a GSI input to the interrupt controller model in the kernel.
623Requires that an interrupt controller model has been previously created with 611On some architectures it is required that an interrupt controller model has
624KVM_CREATE_IRQCHIP. Note that edge-triggered interrupts require the level 612been previously created with KVM_CREATE_IRQCHIP. Note that edge-triggered
625to be set to 1 and then back to 0. 613interrupts require the level to be set to 1 and then back to 0.
614
615ARM can signal an interrupt either at the CPU level, or at the in-kernel irqchip
616(GIC), and for in-kernel irqchip can tell the GIC to use PPIs designated for
617specific cpus. The irq field is interpreted like this:
618
619  bits: | 31 ... 24 | 23 ... 16 | 15 ... 0 |
620 field: | irq_type | vcpu_index | irq_id |
621
622The irq_type field has the following values:
623- irq_type[0]: out-of-kernel GIC: irq_id 0 is IRQ, irq_id 1 is FIQ
624- irq_type[1]: in-kernel GIC: SPI, irq_id between 32 and 1019 (incl.)
625 (the vcpu_index field is ignored)
626- irq_type[2]: in-kernel GIC: PPI, irq_id between 16 and 31 (incl.)
627
628(The irq_id field thus corresponds nicely to the IRQ ID in the ARM GIC specs)
629
630In both cases, level is used to raise/lower the line.
626 631
627struct kvm_irq_level { 632struct kvm_irq_level {
628 union { 633 union {
@@ -874,12 +879,12 @@ It is recommended that the lower 21 bits of guest_phys_addr and userspace_addr
874be identical. This allows large pages in the guest to be backed by large 879be identical. This allows large pages in the guest to be backed by large
875pages in the host. 880pages in the host.
876 881
877The flags field supports two flag, KVM_MEM_LOG_DIRTY_PAGES, which instructs 882The flags field supports two flags: KVM_MEM_LOG_DIRTY_PAGES and
878kvm to keep track of writes to memory within the slot. See KVM_GET_DIRTY_LOG 883KVM_MEM_READONLY. The former can be set to instruct KVM to keep track of
879ioctl. The KVM_CAP_READONLY_MEM capability indicates the availability of the 884writes to memory within the slot. See KVM_GET_DIRTY_LOG ioctl to know how to
880KVM_MEM_READONLY flag. When this flag is set for a memory region, KVM only 885use it. The latter can be set, if KVM_CAP_READONLY_MEM capability allows it,
881allows read accesses. Writes will be posted to userspace as KVM_EXIT_MMIO 886to make a new slot read-only. In this case, writes to this memory will be
882exits. 887posted to userspace as KVM_EXIT_MMIO exits.
883 888
884When the KVM_CAP_SYNC_MMU capability is available, changes in the backing of 889When the KVM_CAP_SYNC_MMU capability is available, changes in the backing of
885the memory region are automatically reflected into the guest. For example, an 890the memory region are automatically reflected into the guest. For example, an
@@ -913,7 +918,7 @@ documentation when it pops into existence).
9134.37 KVM_ENABLE_CAP 9184.37 KVM_ENABLE_CAP
914 919
915Capability: KVM_CAP_ENABLE_CAP 920Capability: KVM_CAP_ENABLE_CAP
916Architectures: ppc 921Architectures: ppc, s390
917Type: vcpu ioctl 922Type: vcpu ioctl
918Parameters: struct kvm_enable_cap (in) 923Parameters: struct kvm_enable_cap (in)
919Returns: 0 on success; -1 on error 924Returns: 0 on success; -1 on error
@@ -1194,12 +1199,15 @@ struct kvm_ppc_pvinfo {
1194This ioctl fetches PV specific information that need to be passed to the guest 1199This ioctl fetches PV specific information that need to be passed to the guest
1195using the device tree or other means from vm context. 1200using the device tree or other means from vm context.
1196 1201
1197For now the only implemented piece of information distributed here is an array 1202The hcall array defines 4 instructions that make up a hypercall.
1198of 4 instructions that make up a hypercall.
1199 1203
1200If any additional field gets added to this structure later on, a bit for that 1204If any additional field gets added to this structure later on, a bit for that
1201additional piece of information will be set in the flags bitmap. 1205additional piece of information will be set in the flags bitmap.
1202 1206
1207The flags bitmap is defined as:
1208
1209 /* the host supports the ePAPR idle hcall
1210 #define KVM_PPC_PVINFO_FLAGS_EV_IDLE (1<<0)
1203 1211
12044.48 KVM_ASSIGN_PCI_DEVICE 12124.48 KVM_ASSIGN_PCI_DEVICE
1205 1213
@@ -1731,7 +1739,68 @@ registers, find a list below:
1731 Arch | Register | Width (bits) 1739 Arch | Register | Width (bits)
1732 | | 1740 | |
1733 PPC | KVM_REG_PPC_HIOR | 64 1741 PPC | KVM_REG_PPC_HIOR | 64
1734 1742 PPC | KVM_REG_PPC_IAC1 | 64
1743 PPC | KVM_REG_PPC_IAC2 | 64
1744 PPC | KVM_REG_PPC_IAC3 | 64
1745 PPC | KVM_REG_PPC_IAC4 | 64
1746 PPC | KVM_REG_PPC_DAC1 | 64
1747 PPC | KVM_REG_PPC_DAC2 | 64
1748 PPC | KVM_REG_PPC_DABR | 64
1749 PPC | KVM_REG_PPC_DSCR | 64
1750 PPC | KVM_REG_PPC_PURR | 64
1751 PPC | KVM_REG_PPC_SPURR | 64
1752 PPC | KVM_REG_PPC_DAR | 64
1753 PPC | KVM_REG_PPC_DSISR | 32
1754 PPC | KVM_REG_PPC_AMR | 64
1755 PPC | KVM_REG_PPC_UAMOR | 64
1756 PPC | KVM_REG_PPC_MMCR0 | 64
1757 PPC | KVM_REG_PPC_MMCR1 | 64
1758 PPC | KVM_REG_PPC_MMCRA | 64
1759 PPC | KVM_REG_PPC_PMC1 | 32
1760 PPC | KVM_REG_PPC_PMC2 | 32
1761 PPC | KVM_REG_PPC_PMC3 | 32
1762 PPC | KVM_REG_PPC_PMC4 | 32
1763 PPC | KVM_REG_PPC_PMC5 | 32
1764 PPC | KVM_REG_PPC_PMC6 | 32
1765 PPC | KVM_REG_PPC_PMC7 | 32
1766 PPC | KVM_REG_PPC_PMC8 | 32
1767 PPC | KVM_REG_PPC_FPR0 | 64
1768 ...
1769 PPC | KVM_REG_PPC_FPR31 | 64
1770 PPC | KVM_REG_PPC_VR0 | 128
1771 ...
1772 PPC | KVM_REG_PPC_VR31 | 128
1773 PPC | KVM_REG_PPC_VSR0 | 128
1774 ...
1775 PPC | KVM_REG_PPC_VSR31 | 128
1776 PPC | KVM_REG_PPC_FPSCR | 64
1777 PPC | KVM_REG_PPC_VSCR | 32
1778 PPC | KVM_REG_PPC_VPA_ADDR | 64
1779 PPC | KVM_REG_PPC_VPA_SLB | 128
1780 PPC | KVM_REG_PPC_VPA_DTL | 128
1781 PPC | KVM_REG_PPC_EPCR | 32
1782 PPC | KVM_REG_PPC_EPR | 32
1783
1784ARM registers are mapped using the lower 32 bits. The upper 16 of that
1785is the register group type, or coprocessor number:
1786
1787ARM core registers have the following id bit patterns:
1788 0x4002 0000 0010 <index into the kvm_regs struct:16>
1789
1790ARM 32-bit CP15 registers have the following id bit patterns:
1791 0x4002 0000 000F <zero:1> <crn:4> <crm:4> <opc1:4> <opc2:3>
1792
1793ARM 64-bit CP15 registers have the following id bit patterns:
1794 0x4003 0000 000F <zero:1> <zero:4> <crm:4> <opc1:4> <zero:3>
1795
1796ARM CCSIDR registers are demultiplexed by CSSELR value:
1797 0x4002 0000 0011 00 <csselr:8>
1798
1799ARM 32-bit VFP control registers have the following id bit patterns:
1800 0x4002 0000 0012 1 <regno:12>
1801
1802ARM 64-bit FP registers have the following id bit patterns:
1803 0x4002 0000 0012 0 <regno:12>
1735 1804
17364.69 KVM_GET_ONE_REG 18054.69 KVM_GET_ONE_REG
1737 1806
@@ -1747,7 +1816,7 @@ kvm_one_reg struct passed in. On success, the register value can be found
1747at the memory location pointed to by "addr". 1816at the memory location pointed to by "addr".
1748 1817
1749The list of registers accessible using this interface is identical to the 1818The list of registers accessible using this interface is identical to the
1750list in 4.64. 1819list in 4.68.
1751 1820
1752 1821
17534.70 KVM_KVMCLOCK_CTRL 18224.70 KVM_KVMCLOCK_CTRL
@@ -1997,6 +2066,183 @@ return the hash table order in the parameter. (If the guest is using
1997the virtualized real-mode area (VRMA) facility, the kernel will 2066the virtualized real-mode area (VRMA) facility, the kernel will
1998re-create the VMRA HPTEs on the next KVM_RUN of any vcpu.) 2067re-create the VMRA HPTEs on the next KVM_RUN of any vcpu.)
1999 2068
20694.77 KVM_S390_INTERRUPT
2070
2071Capability: basic
2072Architectures: s390
2073Type: vm ioctl, vcpu ioctl
2074Parameters: struct kvm_s390_interrupt (in)
2075Returns: 0 on success, -1 on error
2076
2077Allows to inject an interrupt to the guest. Interrupts can be floating
2078(vm ioctl) or per cpu (vcpu ioctl), depending on the interrupt type.
2079
2080Interrupt parameters are passed via kvm_s390_interrupt:
2081
2082struct kvm_s390_interrupt {
2083 __u32 type;
2084 __u32 parm;
2085 __u64 parm64;
2086};
2087
2088type can be one of the following:
2089
2090KVM_S390_SIGP_STOP (vcpu) - sigp restart
2091KVM_S390_PROGRAM_INT (vcpu) - program check; code in parm
2092KVM_S390_SIGP_SET_PREFIX (vcpu) - sigp set prefix; prefix address in parm
2093KVM_S390_RESTART (vcpu) - restart
2094KVM_S390_INT_VIRTIO (vm) - virtio external interrupt; external interrupt
2095 parameters in parm and parm64
2096KVM_S390_INT_SERVICE (vm) - sclp external interrupt; sclp parameter in parm
2097KVM_S390_INT_EMERGENCY (vcpu) - sigp emergency; source cpu in parm
2098KVM_S390_INT_EXTERNAL_CALL (vcpu) - sigp external call; source cpu in parm
2099KVM_S390_INT_IO(ai,cssid,ssid,schid) (vm) - compound value to indicate an
2100 I/O interrupt (ai - adapter interrupt; cssid,ssid,schid - subchannel);
2101 I/O interruption parameters in parm (subchannel) and parm64 (intparm,
2102 interruption subclass)
2103KVM_S390_MCHK (vm, vcpu) - machine check interrupt; cr 14 bits in parm,
2104 machine check interrupt code in parm64 (note that
2105 machine checks needing further payload are not
2106 supported by this ioctl)
2107
2108Note that the vcpu ioctl is asynchronous to vcpu execution.
2109
21104.78 KVM_PPC_GET_HTAB_FD
2111
2112Capability: KVM_CAP_PPC_HTAB_FD
2113Architectures: powerpc
2114Type: vm ioctl
2115Parameters: Pointer to struct kvm_get_htab_fd (in)
2116Returns: file descriptor number (>= 0) on success, -1 on error
2117
2118This returns a file descriptor that can be used either to read out the
2119entries in the guest's hashed page table (HPT), or to write entries to
2120initialize the HPT. The returned fd can only be written to if the
2121KVM_GET_HTAB_WRITE bit is set in the flags field of the argument, and
2122can only be read if that bit is clear. The argument struct looks like
2123this:
2124
2125/* For KVM_PPC_GET_HTAB_FD */
2126struct kvm_get_htab_fd {
2127 __u64 flags;
2128 __u64 start_index;
2129 __u64 reserved[2];
2130};
2131
2132/* Values for kvm_get_htab_fd.flags */
2133#define KVM_GET_HTAB_BOLTED_ONLY ((__u64)0x1)
2134#define KVM_GET_HTAB_WRITE ((__u64)0x2)
2135
2136The `start_index' field gives the index in the HPT of the entry at
2137which to start reading. It is ignored when writing.
2138
2139Reads on the fd will initially supply information about all
2140"interesting" HPT entries. Interesting entries are those with the
2141bolted bit set, if the KVM_GET_HTAB_BOLTED_ONLY bit is set, otherwise
2142all entries. When the end of the HPT is reached, the read() will
2143return. If read() is called again on the fd, it will start again from
2144the beginning of the HPT, but will only return HPT entries that have
2145changed since they were last read.
2146
2147Data read or written is structured as a header (8 bytes) followed by a
2148series of valid HPT entries (16 bytes) each. The header indicates how
2149many valid HPT entries there are and how many invalid entries follow
2150the valid entries. The invalid entries are not represented explicitly
2151in the stream. The header format is:
2152
2153struct kvm_get_htab_header {
2154 __u32 index;
2155 __u16 n_valid;
2156 __u16 n_invalid;
2157};
2158
2159Writes to the fd create HPT entries starting at the index given in the
2160header; first `n_valid' valid entries with contents from the data
2161written, then `n_invalid' invalid entries, invalidating any previously
2162valid entries found.
2163
2164
21654.77 KVM_ARM_VCPU_INIT
2166
2167Capability: basic
2168Architectures: arm
2169Type: vcpu ioctl
2170Parameters: struct struct kvm_vcpu_init (in)
2171Returns: 0 on success; -1 on error
2172Errors:
2173  EINVAL:    the target is unknown, or the combination of features is invalid.
2174  ENOENT:    a features bit specified is unknown.
2175
2176This tells KVM what type of CPU to present to the guest, and what
2177optional features it should have.  This will cause a reset of the cpu
2178registers to their initial values.  If this is not called, KVM_RUN will
2179return ENOEXEC for that vcpu.
2180
2181Note that because some registers reflect machine topology, all vcpus
2182should be created before this ioctl is invoked.
2183
2184Possible features:
2185 - KVM_ARM_VCPU_POWER_OFF: Starts the CPU in a power-off state.
2186 Depends on KVM_CAP_ARM_PSCI.
2187
2188
21894.78 KVM_GET_REG_LIST
2190
2191Capability: basic
2192Architectures: arm
2193Type: vcpu ioctl
2194Parameters: struct kvm_reg_list (in/out)
2195Returns: 0 on success; -1 on error
2196Errors:
2197  E2BIG:     the reg index list is too big to fit in the array specified by
2198             the user (the number required will be written into n).
2199
2200struct kvm_reg_list {
2201 __u64 n; /* number of registers in reg[] */
2202 __u64 reg[0];
2203};
2204
2205This ioctl returns the guest registers that are supported for the
2206KVM_GET_ONE_REG/KVM_SET_ONE_REG calls.
2207
2208
22094.80 KVM_ARM_SET_DEVICE_ADDR
2210
2211Capability: KVM_CAP_ARM_SET_DEVICE_ADDR
2212Architectures: arm
2213Type: vm ioctl
2214Parameters: struct kvm_arm_device_address (in)
2215Returns: 0 on success, -1 on error
2216Errors:
2217 ENODEV: The device id is unknown
2218 ENXIO: Device not supported on current system
2219 EEXIST: Address already set
2220 E2BIG: Address outside guest physical address space
2221 EBUSY: Address overlaps with other device range
2222
2223struct kvm_arm_device_addr {
2224 __u64 id;
2225 __u64 addr;
2226};
2227
2228Specify a device address in the guest's physical address space where guests
2229can access emulated or directly exposed devices, which the host kernel needs
2230to know about. The id field is an architecture specific identifier for a
2231specific device.
2232
2233ARM divides the id field into two parts, a device id and an address type id
2234specific to the individual device.
2235
2236  bits: | 63 ... 32 | 31 ... 16 | 15 ... 0 |
2237 field: | 0x00000000 | device id | addr type id |
2238
2239ARM currently only require this when using the in-kernel GIC support for the
2240hardware VGIC features, using KVM_ARM_DEVICE_VGIC_V2 as the device id. When
2241setting the base address for the guest's mapping of the VGIC virtual CPU
2242and distributor interface, the ioctl must be called after calling
2243KVM_CREATE_IRQCHIP, but before calling KVM_RUN on any of the VCPUs. Calling
2244this ioctl twice for any of the base addresses will return -EEXIST.
2245
2000 2246
20015. The kvm_run structure 22475. The kvm_run structure
2002------------------------ 2248------------------------
@@ -2109,7 +2355,8 @@ executed a memory-mapped I/O instruction which could not be satisfied
2109by kvm. The 'data' member contains the written data if 'is_write' is 2355by kvm. The 'data' member contains the written data if 'is_write' is
2110true, and should be filled by application code otherwise. 2356true, and should be filled by application code otherwise.
2111 2357
2112NOTE: For KVM_EXIT_IO, KVM_EXIT_MMIO and KVM_EXIT_OSI, the corresponding 2358NOTE: For KVM_EXIT_IO, KVM_EXIT_MMIO, KVM_EXIT_OSI, KVM_EXIT_DCR,
2359 KVM_EXIT_PAPR and KVM_EXIT_EPR the corresponding
2113operations are complete (and guest state is consistent) only after userspace 2360operations are complete (and guest state is consistent) only after userspace
2114has re-entered the kernel with KVM_RUN. The kernel side will first finish 2361has re-entered the kernel with KVM_RUN. The kernel side will first finish
2115incomplete operations and then check for pending signals. Userspace 2362incomplete operations and then check for pending signals. Userspace
@@ -2212,6 +2459,41 @@ The possible hypercalls are defined in the Power Architecture Platform
2212Requirements (PAPR) document available from www.power.org (free 2459Requirements (PAPR) document available from www.power.org (free
2213developer registration required to access it). 2460developer registration required to access it).
2214 2461
2462 /* KVM_EXIT_S390_TSCH */
2463 struct {
2464 __u16 subchannel_id;
2465 __u16 subchannel_nr;
2466 __u32 io_int_parm;
2467 __u32 io_int_word;
2468 __u32 ipb;
2469 __u8 dequeued;
2470 } s390_tsch;
2471
2472s390 specific. This exit occurs when KVM_CAP_S390_CSS_SUPPORT has been enabled
2473and TEST SUBCHANNEL was intercepted. If dequeued is set, a pending I/O
2474interrupt for the target subchannel has been dequeued and subchannel_id,
2475subchannel_nr, io_int_parm and io_int_word contain the parameters for that
2476interrupt. ipb is needed for instruction parameter decoding.
2477
2478 /* KVM_EXIT_EPR */
2479 struct {
2480 __u32 epr;
2481 } epr;
2482
2483On FSL BookE PowerPC chips, the interrupt controller has a fast patch
2484interrupt acknowledge path to the core. When the core successfully
2485delivers an interrupt, it automatically populates the EPR register with
2486the interrupt vector number and acknowledges the interrupt inside
2487the interrupt controller.
2488
2489In case the interrupt controller lives in user space, we need to do
2490the interrupt acknowledge cycle through it to fetch the next to be
2491delivered interrupt vector using this exit.
2492
2493It gets triggered whenever both KVM_CAP_PPC_EPR are enabled and an
2494external interrupt has just been delivered into the guest. User space
2495should put the acknowledged interrupt vector into the 'epr' field.
2496
2215 /* Fix the size of the union. */ 2497 /* Fix the size of the union. */
2216 char padding[256]; 2498 char padding[256];
2217 }; 2499 };
@@ -2333,3 +2615,34 @@ For mmu types KVM_MMU_FSL_BOOKE_NOHV and KVM_MMU_FSL_BOOKE_HV:
2333 where "num_sets" is the tlb_sizes[] value divided by the tlb_ways[] value. 2615 where "num_sets" is the tlb_sizes[] value divided by the tlb_ways[] value.
2334 - The tsize field of mas1 shall be set to 4K on TLB0, even though the 2616 - The tsize field of mas1 shall be set to 4K on TLB0, even though the
2335 hardware ignores this value for TLB0. 2617 hardware ignores this value for TLB0.
2618
26196.4 KVM_CAP_S390_CSS_SUPPORT
2620
2621Architectures: s390
2622Parameters: none
2623Returns: 0 on success; -1 on error
2624
2625This capability enables support for handling of channel I/O instructions.
2626
2627TEST PENDING INTERRUPTION and the interrupt portion of TEST SUBCHANNEL are
2628handled in-kernel, while the other I/O instructions are passed to userspace.
2629
2630When this capability is enabled, KVM_EXIT_S390_TSCH will occur on TEST
2631SUBCHANNEL intercepts.
2632
26336.5 KVM_CAP_PPC_EPR
2634
2635Architectures: ppc
2636Parameters: args[0] defines whether the proxy facility is active
2637Returns: 0 on success; -1 on error
2638
2639This capability enables or disables the delivery of interrupts through the
2640external proxy facility.
2641
2642When enabled (args[0] != 0), every time the guest gets an external interrupt
2643delivered, it automatically exits into user space with a KVM_EXIT_EPR exit
2644to receive the topmost interrupt vector.
2645
2646When disabled (args[0] == 0), behavior is as if this facility is unsupported.
2647
2648When this capability is enabled, KVM_EXIT_EPR can occur.
diff --git a/Documentation/virtual/kvm/mmu.txt b/Documentation/virtual/kvm/mmu.txt
index fa5f1dbc6b23..43fcb761ed16 100644
--- a/Documentation/virtual/kvm/mmu.txt
+++ b/Documentation/virtual/kvm/mmu.txt
@@ -187,13 +187,6 @@ Shadow pages contain the following information:
187 perform a reverse map from a pte to a gfn. When role.direct is set, any 187 perform a reverse map from a pte to a gfn. When role.direct is set, any
188 element of this array can be calculated from the gfn field when used, in 188 element of this array can be calculated from the gfn field when used, in
189 this case, the array of gfns is not allocated. See role.direct and gfn. 189 this case, the array of gfns is not allocated. See role.direct and gfn.
190 slot_bitmap:
191 A bitmap containing one bit per memory slot. If the page contains a pte
192 mapping a page from memory slot n, then bit n of slot_bitmap will be set
193 (if a page is aliased among several slots, then it is not guaranteed that
194 all slots will be marked).
195 Used during dirty logging to avoid scanning a shadow page if none if its
196 pages need tracking.
197 root_count: 190 root_count:
198 A counter keeping track of how many hardware registers (guest cr3 or 191 A counter keeping track of how many hardware registers (guest cr3 or
199 pdptrs) are now pointing at the page. While this counter is nonzero, the 192 pdptrs) are now pointing at the page. While this counter is nonzero, the
diff --git a/Documentation/vm/frontswap.txt b/Documentation/vm/frontswap.txt
index 5ef2d1366425..c71a019be600 100644
--- a/Documentation/vm/frontswap.txt
+++ b/Documentation/vm/frontswap.txt
@@ -193,7 +193,7 @@ faster.
193 or maybe swap-over-nbd/NFS)? 193 or maybe swap-over-nbd/NFS)?
194 194
195No. First, the existing swap subsystem doesn't allow for any kind of 195No. First, the existing swap subsystem doesn't allow for any kind of
196swap hierarchy. Perhaps it could be rewritten to accomodate a hierarchy, 196swap hierarchy. Perhaps it could be rewritten to accommodate a hierarchy,
197but this would require fairly drastic changes. Even if it were 197but this would require fairly drastic changes. Even if it were
198rewritten, the existing swap subsystem uses the block I/O layer which 198rewritten, the existing swap subsystem uses the block I/O layer which
199assumes a swap device is fixed size and any page in it is linearly 199assumes a swap device is fixed size and any page in it is linearly
diff --git a/Documentation/vm/ksm.txt b/Documentation/vm/ksm.txt
index b392e496f816..f34a8ee6f860 100644
--- a/Documentation/vm/ksm.txt
+++ b/Documentation/vm/ksm.txt
@@ -58,6 +58,21 @@ sleep_millisecs - how many milliseconds ksmd should sleep before next scan
58 e.g. "echo 20 > /sys/kernel/mm/ksm/sleep_millisecs" 58 e.g. "echo 20 > /sys/kernel/mm/ksm/sleep_millisecs"
59 Default: 20 (chosen for demonstration purposes) 59 Default: 20 (chosen for demonstration purposes)
60 60
61merge_across_nodes - specifies if pages from different numa nodes can be merged.
62 When set to 0, ksm merges only pages which physically
63 reside in the memory area of same NUMA node. That brings
64 lower latency to access of shared pages. Systems with more
65 nodes, at significant NUMA distances, are likely to benefit
66 from the lower latency of setting 0. Smaller systems, which
67 need to minimize memory usage, are likely to benefit from
68 the greater sharing of setting 1 (default). You may wish to
69 compare how your system performs under each setting, before
70 deciding on which to use. merge_across_nodes setting can be
71 changed only when there are no ksm shared pages in system:
72 set run 2 to unmerge pages first, then to 1 after changing
73 merge_across_nodes, to remerge according to the new setting.
74 Default: 1 (merging across nodes as in earlier releases)
75
61run - set 0 to stop ksmd from running but keep merged pages, 76run - set 0 to stop ksmd from running but keep merged pages,
62 set 1 to run ksmd e.g. "echo 1 > /sys/kernel/mm/ksm/run", 77 set 1 to run ksmd e.g. "echo 1 > /sys/kernel/mm/ksm/run",
63 set 2 to stop ksmd and unmerge all pages currently merged, 78 set 2 to stop ksmd and unmerge all pages currently merged,
diff --git a/Documentation/vm/transhuge.txt b/Documentation/vm/transhuge.txt
index f734bb2a78dc..8785fb87d9c7 100644
--- a/Documentation/vm/transhuge.txt
+++ b/Documentation/vm/transhuge.txt
@@ -116,6 +116,13 @@ echo always >/sys/kernel/mm/transparent_hugepage/defrag
116echo madvise >/sys/kernel/mm/transparent_hugepage/defrag 116echo madvise >/sys/kernel/mm/transparent_hugepage/defrag
117echo never >/sys/kernel/mm/transparent_hugepage/defrag 117echo never >/sys/kernel/mm/transparent_hugepage/defrag
118 118
119By default kernel tries to use huge zero page on read page fault.
120It's possible to disable huge zero page by writing 0 or enable it
121back by writing 1:
122
123echo 0 >/sys/kernel/mm/transparent_hugepage/khugepaged/use_zero_page
124echo 1 >/sys/kernel/mm/transparent_hugepage/khugepaged/use_zero_page
125
119khugepaged will be automatically started when 126khugepaged will be automatically started when
120transparent_hugepage/enabled is set to "always" or "madvise, and it'll 127transparent_hugepage/enabled is set to "always" or "madvise, and it'll
121be automatically shutdown if it's set to "never". 128be automatically shutdown if it's set to "never".
@@ -197,6 +204,14 @@ thp_split is incremented every time a huge page is split into base
197 pages. This can happen for a variety of reasons but a common 204 pages. This can happen for a variety of reasons but a common
198 reason is that a huge page is old and is being reclaimed. 205 reason is that a huge page is old and is being reclaimed.
199 206
207thp_zero_page_alloc is incremented every time a huge zero page is
208 successfully allocated. It includes allocations which where
209 dropped due race with other allocation. Note, it doesn't count
210 every map of the huge zero page, only its allocation.
211
212thp_zero_page_alloc_failed is incremented if kernel fails to allocate
213 huge zero page and falls back to using small pages.
214
200As the system ages, allocating huge pages may be expensive as the 215As the system ages, allocating huge pages may be expensive as the
201system uses memory compaction to copy data around memory to free a 216system uses memory compaction to copy data around memory to free a
202huge page for use. There are some counters in /proc/vmstat to help 217huge page for use. There are some counters in /proc/vmstat to help
@@ -276,7 +291,7 @@ unaffected. libhugetlbfs will also work fine as usual.
276== Graceful fallback == 291== Graceful fallback ==
277 292
278Code walking pagetables but unware about huge pmds can simply call 293Code walking pagetables but unware about huge pmds can simply call
279split_huge_page_pmd(mm, pmd) where the pmd is the one returned by 294split_huge_page_pmd(vma, addr, pmd) where the pmd is the one returned by
280pmd_offset. It's trivial to make the code transparent hugepage aware 295pmd_offset. It's trivial to make the code transparent hugepage aware
281by just grepping for "pmd_offset" and adding split_huge_page_pmd where 296by just grepping for "pmd_offset" and adding split_huge_page_pmd where
282missing after pmd_offset returns the pmd. Thanks to the graceful 297missing after pmd_offset returns the pmd. Thanks to the graceful
@@ -299,7 +314,7 @@ diff --git a/mm/mremap.c b/mm/mremap.c
299 return NULL; 314 return NULL;
300 315
301 pmd = pmd_offset(pud, addr); 316 pmd = pmd_offset(pud, addr);
302+ split_huge_page_pmd(mm, pmd); 317+ split_huge_page_pmd(vma, addr, pmd);
303 if (pmd_none_or_clear_bad(pmd)) 318 if (pmd_none_or_clear_bad(pmd))
304 return NULL; 319 return NULL;
305 320
diff --git a/Documentation/w1/slaves/w1_therm b/Documentation/w1/slaves/w1_therm
index 874a8ca93feb..cc62a95e4776 100644
--- a/Documentation/w1/slaves/w1_therm
+++ b/Documentation/w1/slaves/w1_therm
@@ -34,9 +34,16 @@ currently supported. The driver also doesn't support reduced
34precision (which would also reduce the conversion time). 34precision (which would also reduce the conversion time).
35 35
36The module parameter strong_pullup can be set to 0 to disable the 36The module parameter strong_pullup can be set to 0 to disable the
37strong pullup or 1 to enable. If enabled the 5V strong pullup will be 37strong pullup, 1 to enable autodetection or 2 to force strong pullup.
38enabled when the conversion is taking place provided the master driver 38In case of autodetection, the driver will use the "READ POWER SUPPLY"
39must support the strong pullup (or it falls back to a pullup 39command to check if there are pariste powered devices on the bus.
40If so, it will activate the master's strong pullup.
41In case the detection of parasite devices using this command fails
42(seems to be the case with some DS18S20) the strong pullup can
43be force-enabled.
44If the strong pullup is enabled, the master's strong pullup will be
45driven when the conversion is taking place, provided the master driver
46does support the strong pullup (or it falls back to a pullup
40resistor). The DS18b20 temperature sensor specification lists a 47resistor). The DS18b20 temperature sensor specification lists a
41maximum current draw of 1.5mA and that a 5k pullup resistor is not 48maximum current draw of 1.5mA and that a 5k pullup resistor is not
42sufficient. The strong pullup is designed to provide the additional 49sufficient. The strong pullup is designed to provide the additional
diff --git a/Documentation/watchdog/watchdog-kernel-api.txt b/Documentation/watchdog/watchdog-kernel-api.txt
index 086638f6c82d..a0438f3957ca 100644
--- a/Documentation/watchdog/watchdog-kernel-api.txt
+++ b/Documentation/watchdog/watchdog-kernel-api.txt
@@ -1,6 +1,6 @@
1The Linux WatchDog Timer Driver Core kernel API. 1The Linux WatchDog Timer Driver Core kernel API.
2=============================================== 2===============================================
3Last reviewed: 22-May-2012 3Last reviewed: 12-Feb-2013
4 4
5Wim Van Sebroeck <wim@iguana.be> 5Wim Van Sebroeck <wim@iguana.be>
6 6
@@ -212,3 +212,15 @@ driver specific data to and a pointer to the data itself.
212The watchdog_get_drvdata function allows you to retrieve driver specific data. 212The watchdog_get_drvdata function allows you to retrieve driver specific data.
213The argument of this function is the watchdog device where you want to retrieve 213The argument of this function is the watchdog device where you want to retrieve
214data from. The function returns the pointer to the driver specific data. 214data from. The function returns the pointer to the driver specific data.
215
216To initialize the timeout field, the following function can be used:
217
218extern int watchdog_init_timeout(struct watchdog_device *wdd,
219 unsigned int timeout_parm, struct device *dev);
220
221The watchdog_init_timeout function allows you to initialize the timeout field
222using the module timeout parameter or by retrieving the timeout-sec property from
223the device tree (if the module timeout parameter is invalid). Best practice is
224to set the default timeout value as timeout value in the watchdog_device and
225then use this function to set the user "preferred" timeout value.
226This routine returns zero on success and a negative errno code for failure.
diff --git a/Documentation/x86/boot.txt b/Documentation/x86/boot.txt
index 9efceff51bfb..3840b6f28afb 100644
--- a/Documentation/x86/boot.txt
+++ b/Documentation/x86/boot.txt
@@ -57,6 +57,10 @@ Protocol 2.10: (Kernel 2.6.31) Added a protocol for relaxed alignment
57Protocol 2.11: (Kernel 3.6) Added a field for offset of EFI handover 57Protocol 2.11: (Kernel 3.6) Added a field for offset of EFI handover
58 protocol entry point. 58 protocol entry point.
59 59
60Protocol 2.12: (Kernel 3.8) Added the xloadflags field and extension fields
61 to struct boot_params for for loading bzImage and ramdisk
62 above 4G in 64bit.
63
60**** MEMORY LAYOUT 64**** MEMORY LAYOUT
61 65
62The traditional memory map for the kernel loader, used for Image or 66The traditional memory map for the kernel loader, used for Image or
@@ -182,7 +186,7 @@ Offset Proto Name Meaning
1820230/4 2.05+ kernel_alignment Physical addr alignment required for kernel 1860230/4 2.05+ kernel_alignment Physical addr alignment required for kernel
1830234/1 2.05+ relocatable_kernel Whether kernel is relocatable or not 1870234/1 2.05+ relocatable_kernel Whether kernel is relocatable or not
1840235/1 2.10+ min_alignment Minimum alignment, as a power of two 1880235/1 2.10+ min_alignment Minimum alignment, as a power of two
1850236/2 N/A pad3 Unused 1890236/2 2.12+ xloadflags Boot protocol option flags
1860238/4 2.06+ cmdline_size Maximum size of the kernel command line 1900238/4 2.06+ cmdline_size Maximum size of the kernel command line
187023C/4 2.07+ hardware_subarch Hardware subarchitecture 191023C/4 2.07+ hardware_subarch Hardware subarchitecture
1880240/8 2.07+ hardware_subarch_data Subarchitecture-specific data 1920240/8 2.07+ hardware_subarch_data Subarchitecture-specific data
@@ -373,7 +377,7 @@ Protocol: 2.00+
373 1 Loadlin 377 1 Loadlin
374 2 bootsect-loader (0x20, all other values reserved) 378 2 bootsect-loader (0x20, all other values reserved)
375 3 Syslinux 379 3 Syslinux
376 4 Etherboot/gPXE 380 4 Etherboot/gPXE/iPXE
377 5 ELILO 381 5 ELILO
378 7 GRUB 382 7 GRUB
379 8 U-Boot 383 8 U-Boot
@@ -381,10 +385,12 @@ Protocol: 2.00+
381 A Gujin 385 A Gujin
382 B Qemu 386 B Qemu
383 C Arcturus Networks uCbootloader 387 C Arcturus Networks uCbootloader
388 D kexec-tools
384 E Extended (see ext_loader_type) 389 E Extended (see ext_loader_type)
385 F Special (0xFF = undefined) 390 F Special (0xFF = undefined)
386 10 Reserved 391 10 Reserved
387 11 Minimal Linux Bootloader <http://sebastian-plotz.blogspot.de> 392 11 Minimal Linux Bootloader <http://sebastian-plotz.blogspot.de>
393 12 OVMF UEFI virtualization stack
388 394
389 Please contact <hpa@zytor.com> if you need a bootloader ID 395 Please contact <hpa@zytor.com> if you need a bootloader ID
390 value assigned. 396 value assigned.
@@ -581,6 +587,27 @@ Protocol: 2.10+
581 misaligned kernel. Therefore, a loader should typically try each 587 misaligned kernel. Therefore, a loader should typically try each
582 power-of-two alignment from kernel_alignment down to this alignment. 588 power-of-two alignment from kernel_alignment down to this alignment.
583 589
590Field name: xloadflags
591Type: read
592Offset/size: 0x236/2
593Protocol: 2.12+
594
595 This field is a bitmask.
596
597 Bit 0 (read): XLF_KERNEL_64
598 - If 1, this kernel has the legacy 64-bit entry point at 0x200.
599
600 Bit 1 (read): XLF_CAN_BE_LOADED_ABOVE_4G
601 - If 1, kernel/boot_params/cmdline/ramdisk can be above 4G.
602
603 Bit 2 (read): XLF_EFI_HANDOVER_32
604 - If 1, the kernel supports the 32-bit EFI handoff entry point
605 given at handover_offset.
606
607 Bit 3 (read): XLF_EFI_HANDOVER_64
608 - If 1, the kernel supports the 64-bit EFI handoff entry point
609 given at handover_offset + 0x200.
610
584Field name: cmdline_size 611Field name: cmdline_size
585Type: read 612Type: read
586Offset/size: 0x238/4 613Offset/size: 0x238/4
@@ -1013,7 +1040,7 @@ boot_params as that of 16-bit boot protocol, the boot loader should
1013also fill the additional fields of the struct boot_params as that 1040also fill the additional fields of the struct boot_params as that
1014described in zero-page.txt. 1041described in zero-page.txt.
1015 1042
1016After setupping the struct boot_params, the boot loader can load the 1043After setting up the struct boot_params, the boot loader can load the
101732/64-bit kernel in the same way as that of 16-bit boot protocol. 104432/64-bit kernel in the same way as that of 16-bit boot protocol.
1018 1045
1019In 32-bit boot protocol, the kernel is started by jumping to the 1046In 32-bit boot protocol, the kernel is started by jumping to the
@@ -1023,11 +1050,49 @@ In 32-bit boot protocol, the kernel is started by jumping to the
1023At entry, the CPU must be in 32-bit protected mode with paging 1050At entry, the CPU must be in 32-bit protected mode with paging
1024disabled; a GDT must be loaded with the descriptors for selectors 1051disabled; a GDT must be loaded with the descriptors for selectors
1025__BOOT_CS(0x10) and __BOOT_DS(0x18); both descriptors must be 4G flat 1052__BOOT_CS(0x10) and __BOOT_DS(0x18); both descriptors must be 4G flat
1026segment; __BOOS_CS must have execute/read permission, and __BOOT_DS 1053segment; __BOOT_CS must have execute/read permission, and __BOOT_DS
1027must have read/write permission; CS must be __BOOT_CS and DS, ES, SS 1054must have read/write permission; CS must be __BOOT_CS and DS, ES, SS
1028must be __BOOT_DS; interrupt must be disabled; %esi must hold the base 1055must be __BOOT_DS; interrupt must be disabled; %esi must hold the base
1029address of the struct boot_params; %ebp, %edi and %ebx must be zero. 1056address of the struct boot_params; %ebp, %edi and %ebx must be zero.
1030 1057
1058**** 64-bit BOOT PROTOCOL
1059
1060For machine with 64bit cpus and 64bit kernel, we could use 64bit bootloader
1061and we need a 64-bit boot protocol.
1062
1063In 64-bit boot protocol, the first step in loading a Linux kernel
1064should be to setup the boot parameters (struct boot_params,
1065traditionally known as "zero page"). The memory for struct boot_params
1066could be allocated anywhere (even above 4G) and initialized to all zero.
1067Then, the setup header at offset 0x01f1 of kernel image on should be
1068loaded into struct boot_params and examined. The end of setup header
1069can be calculated as follows:
1070
1071 0x0202 + byte value at offset 0x0201
1072
1073In addition to read/modify/write the setup header of the struct
1074boot_params as that of 16-bit boot protocol, the boot loader should
1075also fill the additional fields of the struct boot_params as described
1076in zero-page.txt.
1077
1078After setting up the struct boot_params, the boot loader can load
107964-bit kernel in the same way as that of 16-bit boot protocol, but
1080kernel could be loaded above 4G.
1081
1082In 64-bit boot protocol, the kernel is started by jumping to the
108364-bit kernel entry point, which is the start address of loaded
108464-bit kernel plus 0x200.
1085
1086At entry, the CPU must be in 64-bit mode with paging enabled.
1087The range with setup_header.init_size from start address of loaded
1088kernel and zero page and command line buffer get ident mapping;
1089a GDT must be loaded with the descriptors for selectors
1090__BOOT_CS(0x10) and __BOOT_DS(0x18); both descriptors must be 4G flat
1091segment; __BOOT_CS must have execute/read permission, and __BOOT_DS
1092must have read/write permission; CS must be __BOOT_CS and DS, ES, SS
1093must be __BOOT_DS; interrupt must be disabled; %rsi must hold the base
1094address of the struct boot_params.
1095
1031**** EFI HANDOVER PROTOCOL 1096**** EFI HANDOVER PROTOCOL
1032 1097
1033This protocol allows boot loaders to defer initialisation to the EFI 1098This protocol allows boot loaders to defer initialisation to the EFI
diff --git a/Documentation/x86/early-microcode.txt b/Documentation/x86/early-microcode.txt
new file mode 100644
index 000000000000..4aaf0dfb0cb8
--- /dev/null
+++ b/Documentation/x86/early-microcode.txt
@@ -0,0 +1,43 @@
1Early load microcode
2====================
3By Fenghua Yu <fenghua.yu@intel.com>
4
5Kernel can update microcode in early phase of boot time. Loading microcode early
6can fix CPU issues before they are observed during kernel boot time.
7
8Microcode is stored in an initrd file. The microcode is read from the initrd
9file and loaded to CPUs during boot time.
10
11The format of the combined initrd image is microcode in cpio format followed by
12the initrd image (maybe compressed). Kernel parses the combined initrd image
13during boot time. The microcode file in cpio name space is:
14kernel/x86/microcode/GenuineIntel.bin
15
16During BSP boot (before SMP starts), if the kernel finds the microcode file in
17the initrd file, it parses the microcode and saves matching microcode in memory.
18If matching microcode is found, it will be uploaded in BSP and later on in all
19APs.
20
21The cached microcode patch is applied when CPUs resume from a sleep state.
22
23There are two legacy user space interfaces to load microcode, either through
24/dev/cpu/microcode or through /sys/devices/system/cpu/microcode/reload file
25in sysfs.
26
27In addition to these two legacy methods, the early loading method described
28here is the third method with which microcode can be uploaded to a system's
29CPUs.
30
31The following example script shows how to generate a new combined initrd file in
32/boot/initrd-3.5.0.ucode.img with original microcode microcode.bin and
33original initrd image /boot/initrd-3.5.0.img.
34
35mkdir initrd
36cd initrd
37mkdir kernel
38mkdir kernel/x86
39mkdir kernel/x86/microcode
40cp ../microcode.bin kernel/x86/microcode/GenuineIntel.bin
41find .|cpio -oc >../ucode.cpio
42cd ..
43cat ucode.cpio /boot/initrd-3.5.0.img >/boot/initrd-3.5.0.ucode.img
diff --git a/Documentation/x86/x86_64/boot-options.txt b/Documentation/x86/x86_64/boot-options.txt
index de38429beb71..e015a83c3996 100644
--- a/Documentation/x86/x86_64/boot-options.txt
+++ b/Documentation/x86/x86_64/boot-options.txt
@@ -112,10 +112,6 @@ Timing
112 This can be used to work around timing problems on multiprocessor systems 112 This can be used to work around timing problems on multiprocessor systems
113 with not properly synchronized CPUs. 113 with not properly synchronized CPUs.
114 114
115 report_lost_ticks
116 Report when timer interrupts are lost because some code turned off
117 interrupts for too long.
118
119 nohpet 115 nohpet
120 Don't use the HPET timer. 116 Don't use the HPET timer.
121 117
diff --git a/Documentation/x86/zero-page.txt b/Documentation/x86/zero-page.txt
index cf5437deda81..199f453cb4de 100644
--- a/Documentation/x86/zero-page.txt
+++ b/Documentation/x86/zero-page.txt
@@ -19,6 +19,9 @@ Offset Proto Name Meaning
19090/010 ALL hd1_info hd1 disk parameter, OBSOLETE!! 19090/010 ALL hd1_info hd1 disk parameter, OBSOLETE!!
200A0/010 ALL sys_desc_table System description table (struct sys_desc_table) 200A0/010 ALL sys_desc_table System description table (struct sys_desc_table)
210B0/010 ALL olpc_ofw_header OLPC's OpenFirmware CIF and friends 210B0/010 ALL olpc_ofw_header OLPC's OpenFirmware CIF and friends
220C0/004 ALL ext_ramdisk_image ramdisk_image high 32bits
230C4/004 ALL ext_ramdisk_size ramdisk_size high 32bits
240C8/004 ALL ext_cmd_line_ptr cmd_line_ptr high 32bits
22140/080 ALL edid_info Video mode setup (struct edid_info) 25140/080 ALL edid_info Video mode setup (struct edid_info)
231C0/020 ALL efi_info EFI 32 information (struct efi_info) 261C0/020 ALL efi_info EFI 32 information (struct efi_info)
241E0/004 ALL alk_mem_k Alternative mem check, in KB 271E0/004 ALL alk_mem_k Alternative mem check, in KB
@@ -27,6 +30,7 @@ Offset Proto Name Meaning
271E9/001 ALL eddbuf_entries Number of entries in eddbuf (below) 301E9/001 ALL eddbuf_entries Number of entries in eddbuf (below)
281EA/001 ALL edd_mbr_sig_buf_entries Number of entries in edd_mbr_sig_buffer 311EA/001 ALL edd_mbr_sig_buf_entries Number of entries in edd_mbr_sig_buffer
29 (below) 32 (below)
331EF/001 ALL sentinel Used to detect broken bootloaders
30290/040 ALL edd_mbr_sig_buffer EDD MBR signatures 34290/040 ALL edd_mbr_sig_buffer EDD MBR signatures
312D0/A00 ALL e820_map E820 memory map table 352D0/A00 ALL e820_map E820 memory map table
32 (array of struct e820entry) 36 (array of struct e820entry)
diff --git a/Documentation/xtensa/atomctl.txt b/Documentation/xtensa/atomctl.txt
new file mode 100644
index 000000000000..10a8d1ff35ec
--- /dev/null
+++ b/Documentation/xtensa/atomctl.txt
@@ -0,0 +1,44 @@
1We Have Atomic Operation Control (ATOMCTL) Register.
2This register determines the effect of using a S32C1I instruction
3with various combinations of:
4
5 1. With and without an Coherent Cache Controller which
6 can do Atomic Transactions to the memory internally.
7
8 2. With and without An Intelligent Memory Controller which
9 can do Atomic Transactions itself.
10
11The Core comes up with a default value of for the three types of cache ops:
12
13 0x28: (WB: Internal, WT: Internal, BY:Exception)
14
15On the FPGA Cards we typically simulate an Intelligent Memory controller
16which can implement RCW transactions. For FPGA cards with an External
17Memory controller we let it to the atomic operations internally while
18doing a Cached (WB) transaction and use the Memory RCW for un-cached
19operations.
20
21For systems without an coherent cache controller, non-MX, we always
22use the memory controllers RCW, thought non-MX controlers likely
23support the Internal Operation.
24
25CUSTOMER-WARNING:
26 Virtually all customers buy their memory controllers from vendors that
27 don't support atomic RCW memory transactions and will likely want to
28 configure this register to not use RCW.
29
30Developers might find using RCW in Bypass mode convenient when testing
31with the cache being bypassed; for example studying cache alias problems.
32
33See Section 4.3.12.4 of ISA; Bits:
34
35 WB WT BY
36 5 4 | 3 2 | 1 0
37 2 Bit
38 Field
39 Values WB - Write Back WT - Write Thru BY - Bypass
40--------- --------------- ----------------- ----------------
41 0 Exception Exception Exception
42 1 RCW Transaction RCW Transaction RCW Transaction
43 2 Internal Operation Exception Reserved
44 3 Reserved Reserved Reserved
diff --git a/Documentation/zh_CN/CodingStyle b/Documentation/zh_CN/CodingStyle
index ecd9307a641f..654afd72eb24 100644
--- a/Documentation/zh_CN/CodingStyle
+++ b/Documentation/zh_CN/CodingStyle
@@ -462,13 +462,6 @@ config AUDIT
462 logging of avc messages output). Does not do system-call 462 logging of avc messages output). Does not do system-call
463 auditing without CONFIG_AUDITSYSCALL. 463 auditing without CONFIG_AUDITSYSCALL.
464 464
465仍然被认为不够稳定的功能应该被定义为依赖于“EXPERIMENTAL”:
466
467config SLUB
468 depends on EXPERIMENTAL && !ARCH_USES_SLAB_PAGE_STRUCT
469 bool "SLUB (Unqueued Allocator)"
470 ...
471
472而那些危险的功能(比如某些文件系统的写支持)应该在它们的提示字符串里显著的声明这 465而那些危险的功能(比如某些文件系统的写支持)应该在它们的提示字符串里显著的声明这
473一点: 466一点:
474 467
diff --git a/Documentation/zh_CN/arm/kernel_user_helpers.txt b/Documentation/zh_CN/arm/kernel_user_helpers.txt
new file mode 100644
index 000000000000..cd7fc8f34cf9
--- /dev/null
+++ b/Documentation/zh_CN/arm/kernel_user_helpers.txt
@@ -0,0 +1,284 @@
1Chinese translated version of Documentation/arm/kernel_user_helpers.txt
2
3If you have any comment or update to the content, please contact the
4original document maintainer directly. However, if you have a problem
5communicating in English you can also ask the Chinese maintainer for
6help. Contact the Chinese maintainer if this translation is outdated
7or if there is a problem with the translation.
8
9Maintainer: Nicolas Pitre <nicolas.pitre@linaro.org>
10 Dave Martin <dave.martin@linaro.org>
11Chinese maintainer: Fu Wei <tekkamanninja@gmail.com>
12---------------------------------------------------------------------
13Documentation/arm/kernel_user_helpers.txt 的中文翻译
14
15如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文
16交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻
17译存在问题,请联系中文版维护者。
18英文版维护者: Nicolas Pitre <nicolas.pitre@linaro.org>
19 Dave Martin <dave.martin@linaro.org>
20中文版维护者: 傅炜 Fu Wei <tekkamanninja@gmail.com>
21中文版翻译者: 傅炜 Fu Wei <tekkamanninja@gmail.com>
22中文版校译者: 宋冬生 Dongsheng Song <dongshneg.song@gmail.com>
23 傅炜 Fu Wei <tekkamanninja@gmail.com>
24
25
26以下为正文
27---------------------------------------------------------------------
28内核提供的用户空间辅助代码
29=========================
30
31在内核内存空间的固定地址处,有一个由内核提供并可从用户空间访问的代码
32段。它用于向用户空间提供因在许多 ARM CPU 中未实现的特性和/或指令而需
33内核提供帮助的某些操作。这些代码直接在用户模式下执行的想法是为了获得
34最佳效率,但那些与内核计数器联系过于紧密的部分,则被留给了用户库实现。
35事实上,此代码甚至可能因不同的 CPU 而异,这取决于其可用的指令集或它
36是否为 SMP 系统。换句话说,内核保留在不作出警告的情况下根据需要更改
37这些代码的权利。只有本文档描述的入口及其结果是保证稳定的。
38
39这与完全成熟的 VDSO 实现不同(但两者并不冲突),尽管如此,VDSO 可阻止
40某些通过常量高效跳转到那些代码段的汇编技巧。且由于那些代码段在返回用户
41代码前仅使用少量的代码周期,则一个 VDSO 间接远程调用将会在这些简单的
42操作上增加一个可测量的开销。
43
44在对那些拥有原生支持的新型处理器进行代码优化时,仅在已为其他操作使用
45了类似的新增指令,而导致二进制结果已与早期 ARM 处理器不兼容的情况下,
46用户空间才应绕过这些辅助代码,并在内联函数中实现这些操作(无论是通过
47编译器在代码中直接放置,还是作为库函数调用实现的一部分)。也就是说,
48如果你编译的代码不会为了其他目的使用新指令,则不要仅为了避免使用这些
49内核辅助代码,导致二进制程序无法在早期处理器上运行。
50
51新的辅助代码可能随着时间的推移而增加,所以新内核中的某些辅助代码在旧
52内核中可能不存在。因此,程序必须在对任何辅助代码调用假设是安全之前,
53检测 __kuser_helper_version 的值(见下文)。理想情况下,这种检测应该
54只在进程启动时执行一次;如果内核版本不支持所需辅助代码,则该进程可尽早
55中止执行。
56
57kuser_helper_version
58--------------------
59
60位置: 0xffff0ffc
61
62参考声明:
63
64 extern int32_t __kuser_helper_version;
65
66定义:
67
68 这个区域包含了当前运行内核实现的辅助代码版本号。用户空间可以通过读
69 取此版本号以确定特定的辅助代码是否存在。
70
71使用范例:
72
73#define __kuser_helper_version (*(int32_t *)0xffff0ffc)
74
75void check_kuser_version(void)
76{
77 if (__kuser_helper_version < 2) {
78 fprintf(stderr, "can't do atomic operations, kernel too old\n");
79 abort();
80 }
81}
82
83注意:
84
85 用户空间可以假设这个域的值不会在任何单个进程的生存期内改变。也就
86 是说,这个域可以仅在库的初始化阶段或进程启动阶段读取一次。
87
88kuser_get_tls
89-------------
90
91位置: 0xffff0fe0
92
93参考原型:
94
95 void * __kuser_get_tls(void);
96
97输入:
98
99 lr = 返回地址
100
101输出:
102
103 r0 = TLS 值
104
105被篡改的寄存器:
106
107
108
109定义:
110
111 获取之前通过 __ARM_NR_set_tls 系统调用设置的 TLS 值。
112
113使用范例:
114
115typedef void * (__kuser_get_tls_t)(void);
116#define __kuser_get_tls (*(__kuser_get_tls_t *)0xffff0fe0)
117
118void foo()
119{
120 void *tls = __kuser_get_tls();
121 printf("TLS = %p\n", tls);
122}
123
124注意:
125
126 - 仅在 __kuser_helper_version >= 1 时,此辅助代码存在
127 (从内核版本 2.6.12 开始)。
128
129kuser_cmpxchg
130-------------
131
132位置: 0xffff0fc0
133
134参考原型:
135
136 int __kuser_cmpxchg(int32_t oldval, int32_t newval, volatile int32_t *ptr);
137
138输入:
139
140 r0 = oldval
141 r1 = newval
142 r2 = ptr
143 lr = 返回地址
144
145输出:
146
147 r0 = 成功代码 (零或非零)
148 C flag = 如果 r0 == 0 则置 1,如果 r0 != 0 则清零。
149
150被篡改的寄存器:
151
152 r3, ip, flags
153
154定义:
155
156 仅在 *ptr 为 oldval 时原子保存 newval 于 *ptr 中。
157 如果 *ptr 被改变,则返回值为零,否则为非零值。
158 如果 *ptr 被改变,则 C flag 也会被置 1,以实现调用代码中的汇编
159 优化。
160
161使用范例:
162
163typedef int (__kuser_cmpxchg_t)(int oldval, int newval, volatile int *ptr);
164#define __kuser_cmpxchg (*(__kuser_cmpxchg_t *)0xffff0fc0)
165
166int atomic_add(volatile int *ptr, int val)
167{
168 int old, new;
169
170 do {
171 old = *ptr;
172 new = old + val;
173 } while(__kuser_cmpxchg(old, new, ptr));
174
175 return new;
176}
177
178注意:
179
180 - 这个例程已根据需要包含了内存屏障。
181
182 - 仅在 __kuser_helper_version >= 2 时,此辅助代码存在
183 (从内核版本 2.6.12 开始)。
184
185kuser_memory_barrier
186--------------------
187
188位置: 0xffff0fa0
189
190参考原型:
191
192 void __kuser_memory_barrier(void);
193
194输入:
195
196 lr = 返回地址
197
198输出:
199
200
201
202被篡改的寄存器:
203
204
205
206定义:
207
208 应用于任何需要内存屏障以防止手动数据修改带来的一致性问题,以及
209 __kuser_cmpxchg 中。
210
211使用范例:
212
213typedef void (__kuser_dmb_t)(void);
214#define __kuser_dmb (*(__kuser_dmb_t *)0xffff0fa0)
215
216注意:
217
218 - 仅在 __kuser_helper_version >= 3 时,此辅助代码存在
219 (从内核版本 2.6.15 开始)。
220
221kuser_cmpxchg64
222---------------
223
224位置: 0xffff0f60
225
226参考原型:
227
228 int __kuser_cmpxchg64(const int64_t *oldval,
229 const int64_t *newval,
230 volatile int64_t *ptr);
231
232输入:
233
234 r0 = 指向 oldval
235 r1 = 指向 newval
236 r2 = 指向目标值
237 lr = 返回地址
238
239输出:
240
241 r0 = 成功代码 (零或非零)
242 C flag = 如果 r0 == 0 则置 1,如果 r0 != 0 则清零。
243
244被篡改的寄存器:
245
246 r3, lr, flags
247
248定义:
249
250 仅在 *ptr 等于 *oldval 指向的 64 位值时,原子保存 *newval
251 指向的 64 位值于 *ptr 中。如果 *ptr 被改变,则返回值为零,
252 否则为非零值。
253
254 如果 *ptr 被改变,则 C flag 也会被置 1,以实现调用代码中的汇编
255 优化。
256
257使用范例:
258
259typedef int (__kuser_cmpxchg64_t)(const int64_t *oldval,
260 const int64_t *newval,
261 volatile int64_t *ptr);
262#define __kuser_cmpxchg64 (*(__kuser_cmpxchg64_t *)0xffff0f60)
263
264int64_t atomic_add64(volatile int64_t *ptr, int64_t val)
265{
266 int64_t old, new;
267
268 do {
269 old = *ptr;
270 new = old + val;
271 } while(__kuser_cmpxchg64(&old, &new, ptr));
272
273 return new;
274}
275
276注意:
277
278 - 这个例程已根据需要包含了内存屏障。
279
280 - 由于这个过程的代码长度(此辅助代码跨越 2 个常规的 kuser “槽”),
281 因此 0xffff0f80 不被作为有效的入口点。
282
283 - 仅在 __kuser_helper_version >= 5 时,此辅助代码存在
284 (从内核版本 3.1 开始)。
diff --git a/Documentation/zh_CN/arm64/memory.txt b/Documentation/zh_CN/arm64/memory.txt
index 83b519314706..a5f6283829f9 100644
--- a/Documentation/zh_CN/arm64/memory.txt
+++ b/Documentation/zh_CN/arm64/memory.txt
@@ -47,21 +47,21 @@ AArch64 Linux 内存布局:
47----------------------------------------------------------------------- 47-----------------------------------------------------------------------
480000000000000000 0000007fffffffff 512GB 用户空间 480000000000000000 0000007fffffffff 512GB 用户空间
49 49
50ffffff8000000000 ffffffbbfffcffff ~240GB vmalloc 50ffffff8000000000 ffffffbbfffeffff ~240GB vmalloc
51 51
52ffffffbbfffd0000 ffffffbcfffdffff 64KB [防护页] 52ffffffbbffff0000 ffffffbbffffffff 64KB [防护页]
53 53
54ffffffbbfffe0000 ffffffbcfffeffff 64KB PCI I/O 空间 54ffffffbc00000000 ffffffbdffffffff 8GB vmemmap
55 55
56ffffffbbffff0000 ffffffbcffffffff 64KB [防护页] 56ffffffbe00000000 ffffffbffbbfffff ~8GB [防护页,未来用于 vmmemap]
57 57
58ffffffbc00000000 ffffffbdffffffff 8GB vmemmap 58ffffffbffbe00000 ffffffbffbe0ffff 64KB PCI I/O 空间
59 59
60ffffffbe00000000 ffffffbffbffffff ~8GB [防护页,未来用于 vmmemap] 60ffffffbbffff0000 ffffffbcffffffff ~2MB [防护页]
61 61
62ffffffbffc000000 ffffffbfffffffff 64MB 模块 62ffffffbffc000000 ffffffbfffffffff 64MB 模块
63 63
64ffffffc000000000 ffffffffffffffff 256GB 内存空间 64ffffffc000000000 ffffffffffffffff 256GB 内核逻辑映射
65 65
66 66
674KB 页大小的转换表查找: 674KB 页大小的转换表查找:
diff --git a/Documentation/zh_CN/magic-number.txt b/Documentation/zh_CN/magic-number.txt
index 4263022f5002..2ebe539f5450 100644
--- a/Documentation/zh_CN/magic-number.txt
+++ b/Documentation/zh_CN/magic-number.txt
@@ -122,7 +122,7 @@ SLAB_C_MAGIC 0x4f17a36d kmem_cache mm/slab.c
122COW_MAGIC 0x4f4f4f4d cow_header_v1 arch/um/drivers/ubd_user.c 122COW_MAGIC 0x4f4f4f4d cow_header_v1 arch/um/drivers/ubd_user.c
123I810_CARD_MAGIC 0x5072696E i810_card sound/oss/i810_audio.c 123I810_CARD_MAGIC 0x5072696E i810_card sound/oss/i810_audio.c
124TRIDENT_CARD_MAGIC 0x5072696E trident_card sound/oss/trident.c 124TRIDENT_CARD_MAGIC 0x5072696E trident_card sound/oss/trident.c
125ROUTER_MAGIC 0x524d4157 wan_device include/linux/wanrouter.h 125ROUTER_MAGIC 0x524d4157 wan_device [in wanrouter.h pre 3.9]
126SCC_MAGIC 0x52696368 gs_port drivers/char/scc.h 126SCC_MAGIC 0x52696368 gs_port drivers/char/scc.h
127SAVEKMSG_MAGIC1 0x53415645 savekmsg arch/*/amiga/config.c 127SAVEKMSG_MAGIC1 0x53415645 savekmsg arch/*/amiga/config.c
128GDA_MAGIC 0x58464552 gda arch/mips/include/asm/sn/gda.h 128GDA_MAGIC 0x58464552 gda arch/mips/include/asm/sn/gda.h
diff --git a/Documentation/zh_CN/video4linux/v4l2-framework.txt b/Documentation/zh_CN/video4linux/v4l2-framework.txt
index 3e74f13af426..44c1d934c4e3 100644
--- a/Documentation/zh_CN/video4linux/v4l2-framework.txt
+++ b/Documentation/zh_CN/video4linux/v4l2-framework.txt
@@ -182,8 +182,7 @@ int iterate(void *p)
182 182
183static atomic_t drv_instance = ATOMIC_INIT(0); 183static atomic_t drv_instance = ATOMIC_INIT(0);
184 184
185static int __devinit drv_probe(struct pci_dev *pdev, 185static int drv_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
186 const struct pci_device_id *pci_id)
187{ 186{
188 ... 187 ...
189 state->instance = atomic_inc_return(&drv_instance) - 1; 188 state->instance = atomic_inc_return(&drv_instance) - 1;